PageSourceSearch

https://www.scientology-europe.be/theme/js/_combined_bs.js?_=03a5797d2

js scientology-europe.be collected 2026-10-10 02:24:47 UTC 1,008,619 bytes, 1,556 lines download raw bytes

1
2/* /theme/js/_store/i18nformat-currency.js */
3;(function(){function formatNumber(tsep,decsep,decplaces,v){var v1=v.toFixed(decplaces);var vparts=v1.split(".");var v2=vparts[0].replace(/./g,function(c,i,a){return i&&c!=="."&&((a.length-i)%3===0)?tsep+c:c;});var v3=v2;if(vparts.length>1){v3=v2+decsep+vparts[1]}
4return v3;}
5function fixLocale(l){return l.replace(/-/g,'_');}
6function noBreak(v){return v.replace(/ /g,"\u00A0");}
7function FormatCurrency(locale,currency,value,NoEmptyDecimals){locale=fixLocale(locale);var localeParts=locale.split(/_/);var lang=localeParts[0].toLowerCase();var currency=currency.toUpperCase();if(typeof currencyInfo[currency]!=="undefined"){if(typeof currencyInfo[currency][lang]!=="undefined"){var FormattedCurrency=noBreak(currencyInfo[currency][lang](value));}else{var FormattedCurrency=noBreak(currencyInfo[currency].default(value));}}else{if(typeof defaultCurrencyInfo[lang]!=="undefined"){var FormattedCurrency=noBreak(defaultCurrencyInfo[lang](value))+"\u00A0"+currency;}else{var FormattedCurrency=noBreak(defaultCurrencyInfo.default(value))+"\u00A0"+currency;}}
8if(typeof NoEmptyDecimals!=="boolean"){NoEmptyDecimals=(NoEmptyDecimals=="true"||NoEmptyDecimals=="1")?true:false;}
9if(NoEmptyDecimals===true){return FormattedCurrency.replace(/([\.,]0{1,2})([^0-9]*)$/,"$2");};return FormattedCurrency.trim();};window.FormatCurrency=FormatCurrency;var currencyInfo={"ARS":{"default":function(n){return"$"+formatNumber(".",",",2,n)+" ARS"},"es":function(n){return"AR$"+formatNumber(",",".",2,n)},"fr":function(n){return formatNumber(" ",",",2,n)+" $ ARS"},},"AUD":{"default":function(n){return"$"+formatNumber(",",".",2,n)+" AUD";},"en":function(n){return"AU$"+formatNumber(",",".",2,n);},"fr":function(n){return formatNumber(" ",",",2,n)+" $ AUD";},},"CAD":{"default":function(n){return"$"+formatNumber(",",".",2,n)+" CAD";},"en":function(n){return"C$"+formatNumber(",",".",2,n);},"fr":function(n){return formatNumber(" ",",",2,n)+" $ CA";}},"CHF":{"default":function(n){return formatNumber("'",".",2,n)+" CHF";},"de":function(n){return"CHF "+formatNumber("'",".",2,n);},"it":function(n){return"CHF "+formatNumber("'",".",2,n);},"fr":function(n){return"CHF "+formatNumber("'",".",2,n);},},"COP":{"default":function(n){return formatNumber(",",".",0,n)+" COP"},"es":function(n){return"CO$"+formatNumber(".",",",0,n)},},"CZK":{"default":function(n){return formatNumber(" ",",",2,n)+" CZK";},"cs":function(n){return formatNumber(" ",",",2,n)+" K\u010d";},},"DKK":{"default":function(n){return formatNumber(".",",",2,n)+" DKK";},"en":function(n){return formatNumber(".",",",2,n)+" Dkr.";},"da":function(n){return formatNumber(".",",",2,n)+" Dkr.";},"fo":function(n){return formatNumber(".",",",2,n)+" Dkr.";},},"EUR":{"default":function(n){return"\u20ac"+formatNumber(".",",",2,n)+" EUR";},"en":function(n){return"\u20ac"+formatNumber(",",".",2,n);},"de":function(n){return formatNumber(" ",",",2,n)+" \u20ac";},"fr":function(n){return formatNumber(" ",",",2,n)+" \u20ac";},"es":function(n){return formatNumber(".",",",2,n)+" \u20ac";},"nl":function(n){return"\u20ac"+formatNumber(".",",",2,n);},"it":function(n){return"\u20ac"+formatNumber(".",",",2,n);},"pt":function(n){return formatNumber(".",",",2,n)+"\u20ac";},"si":function(n){return formatNumber(".",",",2,n)+" \u20ac";},"ee":function(n){return formatNumber(" ",".",2,n)+" \u20ac";},"fi":function(n){return formatNumber(" ",",",2,n)+" \u20ac";},"el":function(n){return"\u20ac"+formatNumber(".",",",2,n);},},"GBP":{"default":function(n){return formatNumber(",",".",2,n)+" GBP";},"en":function(n){return"\u00a3"+formatNumber(",",".",2,n);},"fr":function(n){return formatNumber(" ",",",2,n)+" \u00a3";},"de":function(n){return formatNumber(".",",",2,n)+" \u00a3";},"es":function(n){return formatNumber(".",",",2,n)+" \u00a3";},},"HUF":{"default":function(n){return formatNumber(",",",",0,n)+" HUF";},"hu":function(n){return formatNumber("",",",0,n)+" Ft";},},"ILS":{"default":function(n){return formatNumber(",",".",2,n)+" ILS";},"he":function(n){return"\u20aa "+formatNumber(",",".",2,n);},"iw":function(n){return"\u20aa "+formatNumber(",",".",2,n);},},"INR":{"default":function(n){return formatNumber(",",".",2,n)+" INR";},"en":function(n){return"\u20b9"+formatNumber(",",".",2,n);},"hi":function(n){return"\u20b9"+formatNumber(",",".",2,n);},},"JPY":{"default":function(n){return formatNumber(",",".",0,n)+" JPY";},"en":function(n){return"\u00a5"+formatNumber(",",".",0,n);},"ja":function(n){return"\u00a5"+formatNumber(",",".",0,n);},"jp":function(n){return"\u00a5"+formatNumber(",",".",0,n);},},"KRW":{"default":function(n){return formatNumber(",",".",0,n)+" KRW";},"ko":function(n){return"\u20a9"+formatNumber(",",".",0,n);}},"KZT":{"default":function(n){return formatNumber(",",".",2,n)+" KZT";},"kk":function(n){return formatNumber(" ",",",2,n)+" \u20b8";},},"MXN":{"default":function(n){return formatNumber(",",".",2,n)+" MXN";},"es":function(n){return"MX$"+formatNumber(",",".",2,n);},"en":function(n){return"MX$"+formatNumber(",",".",2,n);},},"NOK":{"default":function(n){return formatNumber(".",",",2,n)+" NOK";},"no":function(n){return formatNumber(" ",",",2,n)+" Nkr";},},"NZD":{"default":function(n){return"$"+formatNumber(",",".",2,n)+" NZD"},"en":function(n){return"NZ$"+formatNumber(",",".",2,n)},"fr":function(n){return formatNumber(" ",",",2,n)+" $ NZD"},},"PLN":{"default":function(n){return formatNumber(" ",",",2,n)+" PLN";},"pl":function(n){return formatNumber(" ",",",2,n)+" z\u0142";},},"RUB":{"default":function(n){return formatNumber(",",".",0,n)+" RUB";},"ru":function(n){return formatNumber(" ",",",0,n)+" \u0440\u0443\u0431";},"uk":function(n){return formatNumber(" ",",",0,n)+" \u0440\u0443\u0431";},},"SEK":{"default":function(n){return formatNumber(".",",",2,n)+" SEK";},"sv":function(n){return formatNumber(".",",",2,n)+" Skr";},},"THB":{"default":function(n){return formatNumber(",",".",2,n)+" THB";},"th":function(n){return"\u0e3f"+formatNumber(",",".",2,n);},},"TRY":{"default":function(n){return formatNumber(".",",",2,n)+" TRY";},"tr":function(n){return formatNumber(".",",",2,n)+" \u20ba";},},"UAH":{"default":function(n){return formatNumber(" ",",",2,n)+" UAH";},"uk":function(n){return formatNumber(" ",",",2,n)+"\u20b4";},},"USD":{"default":function(n){return"$"+formatNumber(",",".",2,n)+" USD";},"en":function(n){return"$"+formatNumber(",",".",2,n);},"fr":function(n){return formatNumber(" ",",",2,n)+" $";},"es":function(n){return"$"+formatNumber(",",".",2,n);},"de":function(n){return"$"+formatNumber(",",".",2,n);}},"VEF":{"default":function(n){return formatNumber(",",".",0,n)+" VEF"},"es":function(n){return"Bs"+formatNumber(".",",",0,n)},},"ZAR":{"default":function(n){return formatNumber(",",".",2,n)+" ZAR";},"en":function(n){return"R "+formatNumber(",",".",2,n);},"af":function(n){return"R "+formatNumber(",",".",2,n);},},}
10var defaultCurrencyInfo={"default":function(n){return formatNumber(",",".",2,n)},"fr":function(n){return formatNumber(" ",",",2,n)},"ru":function(n){return formatNumber(" ",",",2,n)},"de":function(n){return formatNumber(" ",",",2,n)},"nl":function(n){return formatNumber(".",",",2,n)},"da":function(n){return formatNumber(".",",",2,n)},"no":function(n){return formatNumber(" ",",",2,n)},}}
vendor: 1,383 bytes, lines 10-18
10)();
11/* /theme/js/cookie-monster.js */
12;var cookieMonster={get:function(sKey){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(sKey).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;},set:function(sKey,sValue,vEnd,sPath,sDomain,bSecure){if(!sKey||/^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)){return false;}
13var sExpires="";if(vEnd){switch(vEnd.constructor){case Number:sExpires=vEnd===Infinity?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+vEnd;break;case String:sExpires="; expires="+vEnd;break;case Date:sExpires="; expires="+vEnd.toUTCString();break;}}
14document.cookie=encodeURIComponent(sKey)+"="+encodeURIComponent(sValue)+sExpires+(sDomain?"; domain="+sDomain:"")+(sPath?"; path="+sPath:"")+(bSecure?"; secure":"");return true;},remove:function(sKey,sPath,sDomain){if(!sKey||!this.has(sKey)){return false;}
15document.cookie=encodeURIComponent(sKey)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(sDomain?"; domain="+sDomain:"")+(sPath?"; path="+sPath:"");return true;},has:function(sKey){return(new RegExp("(?:^|;\\s*)"+encodeURIComponent(sKey).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=")).test(document.cookie);}};
16/* /theme/js/jquery-1.10.2.min.js */
17;/*!jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
18//@ source DISABLED MappingURL=jquery-1.10.2.min.map*/
vendor: 92,978 bytes, line 18
18(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
19/* /theme/js/underscore-min.js */
20;(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?(this._wrapped=n,void 0):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.5.2";var A=j.each=j.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var E="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(E);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(E);return r},j.find=j.detect=function(n,t,r){var e;return O(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var O=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:O(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,function(n){return n[t]})},j.where=function(n,t,r){return j.isEmpty(t)?r?void 0:[]:j[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},j.findWhere=function(n,t){return j.where(n,t,!0)},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.value},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a<e.computed&&(e={value:n,computed:a})}),e.value},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return arguments.length<2||r?n[j.random(n.length-1)]:j.shuffle(n).slice(0,Math.max(0,t))};var k=function(n){return j.isFunction(n)?n:function(t){return t[n]}};j.sortBy=function(n,t,r){var e=k(t);return j.pluck(j.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={},i=null==r?j.identity:k(r);return A(t,function(r,a){var o=i.call(e,r,a,t);n(u,o,r)}),u}};j.groupBy=F(function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)}),j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=null==r?j.identity:k(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return i},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,t,[])}
20,j.without=function(n){return j.difference(n,o.call(arguments,1))},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.indexOf(t,n)>=0})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},j.bindAll=function(n){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:new Date,a=null,i=n.apply(e,u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o;return function(){i=this,u=arguments,a=new Date;var c=function(){var l=new Date-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u)))},l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u)),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=w||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={}
20,r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var I={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};I.unescape=j.invert(I.escape);var T={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){return I[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","	":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};
20return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);
21/* /theme/bootstrap/js/bootstrap.min.js */
22;/*!* Bootstrap v3.3.4 (http://getbootstrap.com)
23* Copyright 2011-2015 Twitter, Inc.
24* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)*/
vendor: 32,025 bytes, line 24
24if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){
vendor: 1,501 bytes, line 24
24var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;
24e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
25/* /theme/js/modernizr.min.js */
26;;window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(n.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a){var e=a[d];if(!E(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),G(e,b,c))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return H("flexWrap")}
vendor: 4,869 bytes, line 26
26,s.flexboxlegacy=function(){return H("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.history=function(){return!!a.history&&!!history.pushState},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return B("background-color:rgba(150,255,150,.5)"),E(j.backgroundColor,"rgba")},s.multiplebgs=function(){return B("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return C("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return H("animationName")},s.csscolumns=function(){return H("columnCount")},s.csstransforms=function(){return!!H("transform")},s.csstransforms3d=function(){var a=!!H("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return H("transition")},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect};for(var I in s)A(s,I)&&(x=I.toLowerCase(),e[x]=s[I](),v.push((e[x]?"":"no-")+x));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" modernizr-"+(b?"":"no-")+a),e[a]=b}return e},B(""),i=k=null,e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=y,e.prefixed=function(a,b,c){return b?H(a,b,c):H(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" modernizr-js modernizr-"+v.join(" modernizr-"):""),e}(this,this.document),function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{dis
26play:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}function w(a){var b,c=a.getElementsByTagName("*"),d=c.length,e=RegExp("^(?:"+m().join("|")+")$","i"),f=[];while(d--)b=c[d],e.test(b.nodeName)&&f.push(b.applyElement(x(b)));return f}function x(a){var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(u+":"+a.nodeName);while(d--)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function y(a){var b,c=a.split("{"),d=c.length,e=RegExp("(^|[\\s,>+~])("+m().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),f="$1"+u+"\\:$2";while(d--)b=c[d]=c[d].split("}"),b[b.length-1]=b[b.length-1].replace(e,f),c[d]=b.join("}");return c.join("{")}function z(a){var b=a.length;while(b--)a[b].removeNode()}function A(a){function g(){clearTimeout(d._removeSheetTimer),b&&b.removeNode(!0),b=null}var b,c,d=n(a),e=a.namespaces,f=a.parentWindow;return!v||a.printShived?a:(typeof e[u]=="undefined"&&e.add(u),f.attachEvent("onbeforeprint",function(){g();var d,e,f,h=a.styleSheets,i=[],j=h.length,k=Array(j);while(j--)k[j]=h[j];while(f=k.pop())if(!f.disabled&&t.test(f.media)){try{d=f.imports,e=d.length}catch(m){e=0}for(j=0;j<e;j++)k.push(d[j]);try{i.push(f.cssText)}catch(m){}}i=y(i.reverse().join("")),c=w(a),b=l(a,i)}),f.attachEvent("onafterprint",function(){z(c),clearTimeout(d._removeSheetTimer),d._removeSheetTimer=setTimeout(g,500)}),a.printShived=!0,a)}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b);var t=/^$|\b(?:all|print)\b/,u="html5shiv",v=!k&&function(){var c=b.documentElement;return typeof b.namespaces!="undefined"&&typeof b.parentWindow!="undefined"&&typeof c.applyElement!="undefined"&&typeof c.removeNode!="undefined"&&typeof a.attachEvent!="undefined"}();s.type+=" print",s.shivPrint=A,A(b)}(this,document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
27/* /theme/tilt.jquery.js */
28;'use strict';(function($){$.fn.tilt=function(options){var requestTick=function requestTick(){if(this.ticking)return;requestAnimationFrame(updateTransforms.bind(this));this.ticking=true;};var bindEvents=function bindEvents(){var _this=this;$(this).on('mousemove',mouseMove);$(this).on('mouseenter',mouseEnter);if(this.settings.reset)$(this).on('mouseleave',mouseLeave);if(this.settings.glare)$(window).on('resize',updateGlareSize.bind(_this));};var setTransition=function setTransition(){var _this2=this;if(this.timeout!==undefined)clearTimeout(this.timeout);$(this).css({'transition':this.settings.speed+'ms '+this.settings.easing});if(this.settings.glare)this.glareElement.css({'transition':'opacity '+this.settings.speed+'ms '+this.settings.easing});this.timeout=setTimeout(function(){$(_this2).css({'transition':''});if(_this2.settings.glare)_this2.glareElement.css({'transition':''});},this.settings.speed);};var mouseEnter=function mouseEnter(event){this.ticking=false;$(this).css({'will-change':'transform'});setTransition.call(this);$(this).trigger("tilt.mouseEnter");};var getMousePositions=function getMousePositions(event){if(typeof event==="undefined"){event={pageX:$(this).offset().left+$(this).outerWidth()/2,pageY:$(this).offset().top+$(this).outerHeight()/2};}
29return{x:event.pageX,y:event.pageY};};var mouseMove=function mouseMove(event){this.mousePositions=getMousePositions(event);requestTick.call(this);};var mouseLeave=function mouseLeave(){setTransition.call(this);this.reset=true;requestTick.call(this);$(this).trigger("tilt.mouseLeave");};var getValues=function getValues(){var width=$(this).outerWidth();var height=$(this).outerHeight();var left=$(this).offset().left;var top=$(this).offset().top;var percentageX=(this.mousePositions.x-left)/width;var percentageY=(this.mousePositions.y-top)/height;var tiltX=(this.settings.maxTilt/2-percentageX*this.settings.maxTilt).toFixed(2);var tiltY=(percentageY*this.settings.maxTilt-this.settings.maxTilt/2).toFixed(2);var angle=Math.atan2(this.mousePositions.x-(left+width/2),-(this.mousePositions.y-(top+height/2)))*(180/Math.PI);return{tiltX:tiltX,tiltY:tiltY,'percentageX':percentageX*100,'percentageY':percentageY*100,angle:angle};};var updateTransforms=function updateTransforms(){this.transforms=getValues.call(this);if(this.reset){this.reset=false;$(this).css('transform','perspective('+this.settings.perspective+'px) rotateX(0deg) rotateY(0deg)');if(this.settings.glare){this.glareElement.css('transform','rotate(180deg) translate(-50%, -50%)');this.glareElement.css('opacity','0');}
30return;}else{$(this).css('transform','perspective('+this.settings.perspective+'px) rotateX('+(this.settings.axis==='x'?0:this.transforms.tiltY)+'deg) rotateY('+(this.settings.axis==='y'?0:this.transforms.tiltX)+'deg) scale3d('+this.settings.scale+','+this.settings.scale+','+this.settings.scale+')');if(this.settings.glare){this.glareElement.css('transform','rotate('+this.transforms.angle+'deg) translate(-50%, -50%)');this.glareElement.css('opacity',''+this.transforms.percentageY*this.settings.maxGlare/100);}}
31$(this).trigger("change",[this.transforms]);this.ticking=false;};var prepareGlare=function prepareGlare(){var glarePrerender=this.settings.glarePrerender;if(!glarePrerender)
32$(this).append('<div class="js-tilt-glare"><div class="js-tilt-glare-inner"></div></div>');this.glareElementWrapper=$(this).find(".js-tilt-glare");this.glareElement=$(this).find(".js-tilt-glare-inner");if(glarePrerender)return;var stretch={'position':'absolute','top':'0','left':'0','width':'100%','height':'100%'};this.glareElementWrapper.css(stretch).css({'overflow':'hidden'});this.glareElement.css({'position':'absolute','top':'50%','left':'50%','pointer-events':'none','background-image':'linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)','width':''+$(this).outerWidth()*2,'height':''+$(this).outerWidth()*2,'transform':'rotate(180deg) translate(-50%, -50%)','transform-origin':'0% 0%','o
32pacity':'0'});};var updateGlareSize=function updateGlareSize(){this.glareElement.css({'width':''+$(this).outerWidth()*2,'height':''+$(this).outerWidth()*2});};$.fn.tilt.destroy=function(){$(this).each(function(){$(this).find('.js-tilt-glare').remove();$(this).css({'will-change':'','transform':''});$(this).off('mousemove mouseenter mouseleave');});};$.fn.tilt.getValues=function(){var results=[];$(this).each(function(){this.mousePositions=getMousePositions.call(this);results.push(getValues.call(this));});return results;};$.fn.tilt.reset=function(){$(this).each(function(){var _this3=this;this.mousePositions=getMousePositions.call(this);this.settings=$(this).data('settings');mouseLeave.call(this);setTimeout(function(){_this3.reset=false;},this.settings.transition);});};return this.each(function(){var _this4=this;this.settings=$.extend({maxTilt:$(this).is('[data-tilt-max]')?$(this).data('tilt-max'):20,perspective:$(this).is('[data-tilt-perspective]')?$(this).data('tilt-perspective'):300,easing:$(this).is('[data-tilt-easing]')?$(this).data('tilt-easing'):'cubic-bezier(.03,.98,.52,.99)',scale:$(this).is('[data-tilt-scale]')?$(this).data('tilt-scale'):'1',speed:$(this).is('[data-tilt-speed]')?$(this).data('tilt-speed'):'400',transition:$(this).is('[data-tilt-transition]')?$(this).data('tilt-transition'):true,axis:$(this).is('[data-tilt-axis]')?$(this).data('tilt-axis'):null,reset:$(this).is('[data-tilt-reset]')?$(this).data('tilt-reset'):true,glare:$(this).is('[data-tilt-glare]')?$(this).data('tilt-glare'):false,maxGlare:$(this).is('[data-tilt-maxglare]')?$(this).data('tilt-maxglare'):1},options);this.init=function(){$(_this4).data('settings',_this4.settings);if(_this4.settings.glare)prepareGlare.call(_this4);bindEvents.call(_this4);};this.init();});};$('[data-tilt]').tilt();})(jQuery);
33/* /theme/video-js/video.min.js */
34;!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.videojs=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c||b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(2),i=d(h),j=a(5),k=d(j),l=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.mouseused_=!1,g.on("mousedown",g.handleMouseDown),g}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-big-play-button"},b.prototype.handleClick=function(a){var b=this.player_.play();if(!(this.mouseused_&&a.clientX&&a.clientY)){var c=this.player_.getChild("controlBar"),d=c&&c.getChild("playToggle");if(!d)return void this.player_.focus();var e=function(){return d.focus()};if(b&&b.then){var f=function(){};b.then(e,f)}else this.setTimeout(e,1)}},b.prototype.handleKeyPress=function(b){this.mouseused_=!1,a.prototype.handleKeyPress.call(this,b)},b.prototype.handleMouseDown=function(a){this.mouseused_=!0},b}(i["default"]);l.prototype.controlText_="Play Video",k["default"].registerComponent("BigPlayButton",l),c["default"]=l},{2:2,5:5}],2:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(3),i=d(h),j=a(5),k=d(j),l=a(86),m=d(l),n=a(88),o=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(b,a),b.prototype.createEl=function(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"button",b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};b=(0,n.assign)({className:this.buildCSSClass()},b),"button"!==a&&(m["default"].warn("Creating a Button with an HTML element of "+a+" is deprecated; use ClickableComponent instead."),b=(0,n.assign)({tabIndex:0},b),c=(0,n.assign)({role:"button"},c)),c=(0,n.assign)({type:"button","aria-live":"polite"},c);var d=k["default"].prototype.createEl.call(this,a,b,c);return this.createControlTextEl(d),d},b.prototype.addChild=function(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},c=this.constructor.name;return m["default"].warn("Adding an actionable (user controllable) child to a Button ("+c+") is not supported; use a ClickableComponent instead."),k["default"].prototype.addChild.call(this,a,b)},b.prototype.enable=function(){a.prototype.enable.call(this),this.el_.removeAttribute("disabled")},b.prototype.disable=function(){a.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},b.prototype.handleKeyPress=function(b){32!==b.which&&13!==b.which&&a.prototype.handleKeyPress.call(this,b)},b}(i["default"]);k["default"].registerComponent("Button",o),c["default"]=o},{3:3,5:5,86:86,88:88}],3:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=a(5),j=e(i),k=a(81),l=d(k),m=a(82),n=d(m),o=a(83),p=d(o),q=a(86),r=e(q),s=a(94),t=e(s),u=a(88),v=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.emitTapEvents(),e.enable(),e}return h(b,a),b.prototype.createEl=function(){var b=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"div",c=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},d=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};c=(0,u.assign)({className:this.buildCSSClass(),tabIndex:0},c),"button"===b&&r["default"].error("Creating a ClickableComponent with an HTML element of "+b+" is not supported; use a Button instead."),d=(0,u.assign)({role:"button","aria-live":"polite"},d),this.tabIndex_=c.tabIndex;var e=a.prototype.createEl.call(this,b,c,d);return this.createControlTextEl(e),e},b.prototype.createControlTextEl=function(a){return this.controlTextEl_=l.createEl("span",{className:"vjs-control-text"}),a&&a.appendChild(this.controlTextEl_),this.controlText(this.controlText_,a),this.controlTextEl_},b.prototype.controlText=function(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.el();if(!a)return this.controlText_||"Need Text";var c=this.localize(a);return this.controlText_=a,this.controlTextEl_.innerHTML=c,this.nonIconControl||b.setAttribute("title",c),this},b.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+a.prototype.buildCSSClass.call(this)},b.prototype.enable=function(){return this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},b.prototype.disable=function(){return this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},b.prototype.handleClick=function(a){},b.prototype.handleFocus=function(a){n.on(t["default"],"keydown",p.bind(this,this.handleKeyPress))},b.prototype.handleKeyPress=function(b){32===b.which||13===b.which?(b.preventDefault(),this.handleClick(b)):a.prototype.handleKeyPress&&a.prototype.handleKeyPress.call(this,b)},b.prototype.handleBlur=function(a){n.off(t["default"],"keydown",p.bind(this,this.handleKeyPress))},b}(j["default"]);j["default"].registerComponent("ClickableComponent",v),c["default"]=v},{5:5,81:81,82:82,83:83,86:86,88:88,94:94}],4:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(2),i=d(h),j=a(5),k=d(j),l=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.controlText(d&&d.controlText||g.localize("Close")),g}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-close-button "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){this.trigger({type:"close",bubbles:!1})},b}(i["default"]);k["default"].registerComponent("CloseButton",l),c["default"]=l},{2:2,5:5}],5:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var g=a(95),h=e(g),i=a(81),j=d(i),k=a(83),l=d(k),m=a(85),n=d(m),o=a(82),p=d(o),q=a(86),r=e(q),s=a(91),t=e(s),u=a(87),v=e(u),w=function(){function a(b,c,d){if(f(this,a),!b&&this.play?this.player_=b=this:this.player_=b,this.options_=(0,v["default"])({},this.options_),c=this.options_=(0,v["default"])(this.options_,c),this.id_=c.id||c.el&&c.el.id,!this.id_){var e=b&&b.id&&b.id()||"no_player";this.id_=e+"_component_"+n.newGUID()}this.name_=c.name||null,c.el?this.el_=c.el:!1!==c.createEl&&(this.el_=this.createEl()),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==c.initChildren&&this.initChildren(),this.ready(d),!1!==c.reportTouchActivity&&this.enableTouchActivity()}return a.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var a=this.children_.length-1;a>=0;a--)this.children_[a].dispose&&this.children_[a].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),j.removeElData(this.el_),this.el_=null},a.prototype.player=function(){return this.player_},a.prototype.options=function(a){return r["default"].warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),a?(this.options_=(0,v["default"])(this.options_,a),this.options_):this.options_},a.prototype.el=function(){return this.el_},a.prototype.createEl=function(a,b,c){return j.createEl(a,b,c)},a.prototype.localize=function(a){var b=this.player_.language&&this.player_.language(),c=this.player_.languages&&this.player_.languages();if(!b||!c)return a;var d=c[b];
34if(d&&d[a])return d[a];var e=b.split("-")[0],f=c[e];return f&&f[a]?f[a]:a},a.prototype.contentEl=function(){return this.contentEl_||this.el_},a.prototype.id=function(){return this.id_},a.prototype.name=function(){return this.name_},a.prototype.children=function(){return this.children_},a.prototype.getChildById=function(a){return this.childIndex_[a]},a.prototype.getChild=function(a){if(a)return a=(0,t["default"])(a),this.childNameIndex_[a]},a.prototype.addChild=function(b){var c=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},d=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this.children_.length,e=void 0,f=void 0;if("string"==typeof b){f=(0,t["default"])(b),c||(c={}),!0===c&&(r["default"].warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),c={});var g=c.componentClass||f;c.name=f;var h=a.getComponent(g);if(!h)throw new Error("Component "+g+" does not exist");if("function"!=typeof h)return null;e=new h(this.player_||this,c)}else e=b;if(this.children_.splice(d,0,e),"function"==typeof e.id&&(this.childIndex_[e.id()]=e),f=f||e.name&&(0,t["default"])(e.name()),f&&(this.childNameIndex_[f]=e),"function"==typeof e.el&&e.el()){var i=this.contentEl().children,j=i[d]||null;this.contentEl().insertBefore(e.el(),j)}return e},a.prototype.removeChild=function(a){if("string"==typeof a&&(a=this.getChild(a)),a&&this.children_){for(var b=!1,c=this.children_.length-1;c>=0;c--)if(this.children_[c]===a){b=!0,this.children_.splice(c,1);break}if(b){this.childIndex_[a.id()]=null,this.childNameIndex_[a.name()]=null;var d=a.el();d&&d.parentNode===this.contentEl()&&this.contentEl().removeChild(a.el())}}},a.prototype.initChildren=function(){var b=this,c=this.options_.children;if(c){var d=this.options_,e=function(a){var c=a.name,e=a.opts;if(d[c]!==undefined&&(e=d[c]),!1!==e){!0===e&&(e={}),e.playerOptions=b.options_.playerOptions;var f=b.addChild(c,e);f&&(b[c]=f)}},f=void 0,g=a.getComponent("Tech");f=Array.isArray(c)?c:Object.keys(c),f.concat(Object.keys(this.options_).filter(function(a){return!f.some(function(b){return"string"==typeof b?a===b:a===b.name})})).map(function(a){var d=void 0,e=void 0;return"string"==typeof a?(d=a,e=c[d]||b.options_[d]||{}):(d=a.name,e=a),{name:d,opts:e}}).filter(function(b){var c=a.getComponent(b.opts.componentClass||(0,t["default"])(b.name));return c&&!g.isTech(c)}).forEach(e)}},a.prototype.buildCSSClass=function(){return""},a.prototype.on=function(a,b,c){var d=this;if("string"==typeof a||Array.isArray(a))p.on(this.el_,a,l.bind(this,b));else{var e=a,f=b,g=l.bind(this,c),h=function(){return d.off(e,f,g)};h.guid=g.guid,this.on("dispose",h);var i=function(){return d.off("dispose",h)};i.guid=g.guid,a.nodeName?(p.on(e,f,g),p.on(e,"dispose",i)):"function"==typeof a.on&&(e.on(f,g),e.on("dispose",i))}return this},a.prototype.off=function(a,b,c){if(!a||"string"==typeof a||Array.isArray(a))p.off(this.el_,a,b);else{var d=a,e=b,f=l.bind(this,c);this.off("dispose",f),a.nodeName?(p.off(d,e,f),p.off(d,"dispose",f)):(d.off(e,f),d.off("dispose",f))}return this},a.prototype.one=function(a,b,c){var d=this,e=arguments;if("string"==typeof a||Array.isArray(a))p.one(this.el_,a,l.bind(this,b));else{var f=a,g=b,h=l.bind(this,c),i=function j(){d.off(f,g,j),h.apply(null,e)};i.guid=h.guid,this.on(f,g,i)}return this},a.prototype.trigger=function(a,b){return p.trigger(this.el_,a,b),this},a.prototype.ready=function(a){var b=arguments.length>1&&arguments[1]!==undefined&&arguments[1];return a&&(this.isReady_?b?a.call(this):this.setTimeout(a,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(a))),this},a.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var a=this.readyQueue_;this.readyQueue_=[],a&&a.length>0&&a.forEach(function(a){a.call(this)},this),this.trigger("ready")},1)},a.prototype.$=function(a,b){return j.$(a,b||this.contentEl())},a.prototype.$$=function(a,b){return j.$$(a,b||this.contentEl())},a.prototype.hasClass=function(a){return j.hasElClass(this.el_,a)},a.prototype.addClass=function(a){return j.addElClass(this.el_,a),this},a.prototype.removeClass=function(a){return j.removeElClass(this.el_,a),this},a.prototype.toggleClass=function(a,b){return j.toggleElClass(this.el_,a,b),this},a.prototype.show=function(){return this.removeClass("vjs-hidden"),this},a.prototype.hide=function(){return this.addClass("vjs-hidden"),this},a.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},a.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},a.prototype.getAttribute=function(a){return j.getAttribute(this.el_,a)},a.prototype.setAttribute=function(a,b){return j.setAttribute(this.el_,a,b),this},a.prototype.removeAttribute=function(a){return j.removeAttribute(this.el_,a),this},a.prototype.width=function(a,b){return this.dimension("width",a,b)},a.prototype.height=function(a,b){return this.dimension("height",a,b)},a.prototype.dimensions=function(a,b){return this.width(a,!0).height(b)},a.prototype.dimension=function(a,b,c){if(b!==undefined)return null!==b&&b===b||(b=0),-1!==(""+b).indexOf("%")||-1!==(""+b).indexOf("px")?this.el_.style[a]=b:this.el_.style[a]="auto"===b?"":b+"px",c||this.trigger("resize"),this;if(!this.el_)return 0;var d=this.el_.style[a],e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(this.el_["offset"+(0,t["default"])(a)],10)},a.prototype.currentDimension=function(a){var b=0;if("width"!==a&&"height"!==a)throw new Error("currentDimension only accepts width or height value");if("function"==typeof h["default"].getComputedStyle){var c=h["default"].getComputedStyle(this.el_);b=c.getPropertyValue(a)||c[a]}if(0===(b=parseFloat(b))){var d="offset"+(0,t["default"])(a);b=this.el_[d]}return b},a.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},a.prototype.currentWidth=function(){return this.currentDimension("width")},a.prototype.currentHeight=function(){return this.currentDimension("height")}
vendor: 36,075 bytes, line 34
34,a.prototype.focus=function(){this.el_.focus()},a.prototype.blur=function(){this.el_.blur()},a.prototype.emitTapEvents=function(){var a=0,b=null,c=void 0;this.on("touchstart",function(d){1===d.touches.length&&(b={pageX:d.touches[0].pageX,pageY:d.touches[0].pageY},a=(new Date).getTime(),c=!0)}),this.on("touchmove",function(a){if(a.touches.length>1)c=!1;else if(b){var d=a.touches[0].pageX-b.pageX,e=a.touches[0].pageY-b.pageY,f=Math.sqrt(d*d+e*e);f>10&&(c=!1)}});var d=function(){c=!1};this.on("touchleave",d),this.on("touchcancel",d),this.on("touchend",function(d){if(b=null,!0===c){(new Date).getTime()-a<200&&(d.preventDefault(),this.trigger("tap"))}})},a.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var a=l.bind(this.player(),this.player().reportUserActivity),b=void 0;this.on("touchstart",function(){a(),this.clearInterval(b),b=this.setInterval(a,250)});var c=function(c){a(),this.clearInterval(b)};this.on("touchmove",a),this.on("touchend",c),this.on("touchcancel",c)}},a.prototype.setTimeout=function(a,b){a=l.bind(this,a);var c=h["default"].setTimeout(a,b),d=function(){this.clearTimeout(c)};return d.guid="vjs-timeout-"+c,this.on("dispose",d),c},a.prototype.clearTimeout=function(a){h["default"].clearTimeout(a);var b=function(){};return b.guid="vjs-timeout-"+a,this.off("dispose",b),a},a.prototype.setInterval=function(a,b){a=l.bind(this,a);var c=h["default"].setInterval(a,b),d=function(){this.clearInterval(c)};return d.guid="vjs-interval-"+c,this.on("dispose",d),c},a.prototype.clearInterval=function(a){h["default"].clearInterval(a);var b=function(){};return b.guid="vjs-interval-"+a,this.off("dispose",b),a},a.registerComponent=function(b,c){if(b){if(b=(0,t["default"])(b),a.components_||(a.components_={}),"Player"===b&&a.components_[b]){var d=a.components_[b];if(d.players&&Object.keys(d.players).length>0&&Object.keys(d.players).map(function(a){return d.players[a]}).every(Boolean))throw new Error("Can not register Player component after player has been created")}return a.components_[b]=c,c}},a.getComponent=function(b){if(b)return b=(0,t["default"])(b),a.components_&&a.components_[b]?a.components_[b]:h["default"]&&h["default"].videojs&&h["default"].videojs[b]?(r["default"].warn("The "+b+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),h["default"].videojs[b]):void 0},a.extend=function(b){b=b||{},r["default"].warn("Component.extend({}) has been deprecated,  use videojs.extend(Component, {}) instead");var c=b.init||b.init||this.prototype.init||this.prototype.init||function(){},d=function(){c.apply(this,arguments)};d.prototype=Object.create(this.prototype),d.prototype.constructor=d,d.extend=a.extend;for(var e in b)b.hasOwnProperty(e)&&(d.prototype[e]=b[e]);return d},a}();w.registerComponent("Component",w),c["default"]=w},{81:81,82:82,83:83,85:85,86:86,87:87,91:91,95:95}],6:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(36),i=d(h),j=a(5),k=d(j),l=a(7),m=d(l),n=function(a){function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};e(this,b),d.tracks=c.audioTracks&&c.audioTracks();var g=f(this,a.call(this,c,d));return g.el_.setAttribute("aria-label","Audio Menu"),g}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-audio-button "+a.prototype.buildCSSClass.call(this)},b.prototype.createItems=function(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];this.hideThreshold_=1;var b=this.player_.audioTracks&&this.player_.audioTracks();if(!b)return a;for(var c=0;c<b.length;c++){var d=b[c];a.push(new m["default"](this.player_,{track:d,selectable:!0}))}return a},b}(i["default"]);n.prototype.controlText_="Audio Track",k["default"].registerComponent("AudioTrackButton",n),c["default"]=n},{36:36,5:5,7:7}],7:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(48),i=d(h),j=a(5),k=d(j),l=a(83),m=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(l),n=function(a){function b(c,d){e(this,b);var g=d.track,h=c.audioTracks();d.label=g.label||g.language||"Unknown",d.selected=g.enabled;var i=f(this,a.call(this,c,d));if(i.track=g,h){var j=m.bind(i,i.handleTracksChange);h.addEventListener("change",j),i.on("dispose",function(){h.removeEventListener("change",j)})}return i}return g(b,a),b.prototype.handleClick=function(b){var c=this.player_.audioTracks();if(a.prototype.handleClick.call(this,b),c)for(var d=0;d<c.length;d++){var e=c[d];e.enabled=e===this.track}},b.prototype.handleTracksChange=function(a){this.selected(this.track.enabled)},b}(i["default"]);k["default"].registerComponent("AudioTrackMenuItem",n),c["default"]=n},{48:48,5:5,83:83}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g);a(12),a(32),a(33),a(35),a(34),a(10),a(18),a(9),a(38),a(40),a(11),a(25),a(27),a(29),a(24),a(6),a(13),a(21);var i=function(a){function b(){return d(this,b),e(this,a.apply(this,arguments))}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},b}(h["default"]);i.prototype.options_={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},h["default"].registerComponent("ControlBar",i),c["default"]=i},{10:10,11:11,12:12,13:13,18:18,21:21,24:24,25:25,27:27,29:29,32:32,33:33,34:34,35:35,38:38,40:40,5:5,6:6,9:9}],9:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(2),i=d(h),j=a(5),k=d(j),l=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"fullscreenchange",g.handleFullscreenChange),g}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleFullscreenChange=function(a){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},b.prototype.handleClick=function(a){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},b}(i["default"]);l.prototype.controlText_="Fullscreen",k["default"].registerComponent("FullscreenToggle",l),c["default"]=l},{2:2,5:5}],10:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=a(81),j=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(i),k=function(a){function b(c,f){d(this,b);var g=e(this,a.call(this,c,f));return g.updateShowing(),g.on(g.player(),"durationchange",g.updateShowing),g}return f(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=j.createEl("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"</span>"+this.localize("LIVE")},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateShowing=function(a){this.player().duration()===Infinity?this.show():this.hide()},b}(h["default"]);h["default"].registerComponent("LiveDisplay",k),c["default"]=k},{5:5,81:81}],11:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(2),i=d(h),j=a(5),k=d(j),l=a(81),m=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(l),n=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"volumechange",g.update),c.tech_&&!1===c.tech_.featuresVolumeControl&&g.addClass("vjs-hidden"),g.on(c,"loadstart",function(){this.update(),!1===c.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),g}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){this.player_.muted(!this.player_.muted())},b.prototype.update=function(a){var b=this.player_.volume(),c=3;this.player_.muted()?c=0:b<.33?c=1:b<.67&&(c=2);var d=this.player_.muted()?"Unmute":"Mute";this.controlText()!==d&&this.controlText(d);for(var e=0;e<4;e++)m.removeElClass(this.el_,"vjs-vol-"+e);m.addElClass(this.el_,"vjs-vol-"+c)},b}(i["default"]);n.prototype.controlText_="Mute",k["default"].registerComponent("MuteToggle",n),c["default"]=n},{2:2,5:5,81:81}],12:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(2),i=d(h),j=a(5),k=d(j),l=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"play",g.handlePlay),g.on(c,"pause",g.handlePause),g}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-play-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){this.player_.paused()?this.player_.play():this.player_.pause()},b.prototype.handlePlay=function(a){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},b.prototype.handlePause=function(a){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},b}(i["default"]);l.prototype.controlText_="Play",k["default"].registerComponent("PlayToggle",l),c["default"]=l},{2:2,5:5}],13:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(47),i=d(h),j=a(49),k=d(j),l=a(14),m=d(l),n=a(5),o=d(n),p=a(81),q=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(p),r=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.updateVisibility(),g.updateLabel(),g.on(c,"loadstart",g.updateVisibility),g.on(c,"ratechange",g.updateLabel),g}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this);return this.labelEl_=q.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),b.appendChild(this.labelEl_),b},b.prototype.buildCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildCSSClass.call(this)},b.prototype.createMenu=function(){var a=new k["default"](this.player()),b=this.playbackRates();if(b)for(var c=b.length-1;c>=0;c--)a.addChild(new m["default"](this.player(),{rate:b[c]+"x"}));return a},b.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},b.prototype.handleClick=function(a){for(var b=this.player().playbackRate(),c=this.playbackRates(),d=c[0],e=0;e<c.length;e++)if(c[e]>b){d=c[e];break}this.player().playbackRate(d)},b.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},b.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},b.prototype.updateVisibility=function(a){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},b.prototype.updateLabel=function(a){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},b}(i["default"]);r.prototype.controlText_="Playback Rate",o["default"].registerComponent("PlaybackRateMenuButton",r),c["default"]=r},{14:14,47:47,49:49,5:5,81:81}],14:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(48),i=d(h),j=a(5),k=d(j),l=function(a){function b(c,d){e(this,b);var g=d.rate,h=parseFloat(g,10);d.label=g,d.selected=1===h,d.selectable=!0;var i=f(this,a.call(this,c,d));return i.label=g,i.rate=h,i.on(c,"ratechange",i.update),i}return g(b,a),b.prototype.handleClick=function(b){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},b.prototype.update=function(a){this.selected(this.player().playbackRate()===this.rate)},b}(i["default"]);l.prototype.contentElType="button",k["default"].registerComponent("PlaybackRateMenuItem",l),c["default"]=l},{48:48,5:5}],15:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=a(81),j=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(i),k=function(a){function b(c,f){d(this,b);var g=e(this,a.call(this,c,f));return g.partEls_=[],g.on(c,"progress",g.update),g}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},b.prototype.update=function(a){var b=this.player_.buffered(),c=this.player_.duration(),d=this.player_.bufferedEnd(),e=this.partEls_,f=function(a,b){var c=a/b||0;return 100*(c>=1?1:c)+"%"};this.el_.style.width=f(d,c);for(var g=0;g<b.length;g++){var h=b.start(g),i=b.end(g),k=e[g];k||(k=this.el_.appendChild(j.createEl()),e[g]=k),k.style.left=f(h,d),k.style.width=f(i-h,d)}for(var l=e.length;l>b.length;l--)this.el_.removeChild(e[l-1]);e.length=b.length},b}(h["default"]);h["default"].registerComponent("LoadProgressBar",k),c["default"]=k},{5:5,81:81}],16:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=a(5),j=e(i),k=a(81),l=d(k),m=a(83),n=d(m),o=a(84),p=e(o),q=a(80),r=e(q),s=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=l.createEl("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),c.on("ready",function(){e.on(c.controlBar.progressControl.el(),"mousemove",n.throttle(n.bind(e,e.handleMouseMove),25))}),e}return h(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},b.prototype.handleMouseMove=function(a){var b=this.player_.duration(),c=this.calculateDistance(a)*b,d=a.pageX-l.findElPosition(this.el().parentNode).left;this.update(c,d)},b.prototype.update=function(a,b){var c=(0,p["default"])(a,this.player_.duration());if(this.el().style.left=b+"px",this.el().setAttribute("data-current-time",c),this.keepTooltipsInside){var d=this.clampPosition_(b),e=b-d+1,f=parseFloat((0,r["default"])(this.tooltip,"width")),g=f/2;this.tooltip.innerHTML=c,this.tooltip.style.right="-"+(g-e)+"px"}},b.prototype.calculateDistance=function(a){return l.getPointerPosition(this.el().parentNode,a).x},b.prototype.clampPosition_=function(a){if(!this.keepTooltipsInside)return a;var b=parseFloat((0,r["default"])(this.player().el(),"width")),c=parseFloat((0,r["default"])(this.tooltip,"width")),d=c/2,e=a;return a<d?e=Math.ceil(d):a>b-d&&(e=Math.floor(b-d)),e},b}(j["default"]);j["default"].registerComponent("MouseTimeDisplay",s),c["default"]=s},{5:5,80:80,81:81,83:83,84:84}],17:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=d(h),j=a(83),k=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(j),l=a(84),m=d(l),n=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.updateDataAttr(),g.on(c,"timeupdate",g.updateDataAttr),c.ready(k.bind(g,g.updateDataAttr)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(g.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),g.keepTooltipsInside&&g.addClass("vjs-keep-tooltips-inside"),g}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},b.prototype.updateDataAttr=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("data-current-time",(0,m["default"])(b,this.player_.duration()))},b}(i["default"]);i["default"].registerComponent("PlayProgressBar",n),c["default"]=n},{5:5,83:83,84:84}],18:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g);a(19),a(16);var i=function(a){function b(){return d(this,b),e(this,a.apply(this,arguments))}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},b}(h["default"]);i.prototype.options_={children:["seekBar"]},h["default"].registerComponent("ProgressControl",i),c["default"]=i},{16:16,19:19,5:5}],19:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(57),i=d(h),j=a(5),k=d(j),l=a(83),m=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(l),n=a(84),o=d(n),p=a(80),q=d(p);a(15),a(17),a(20);var r=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"timeupdate",g.updateProgress),g.on(c,"ended",g.updateProgress),c.ready(m.bind(g,g.updateProgress)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(g.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),g.keepTooltipsInside&&(g.tooltipProgressBar=g.addChild("TooltipProgressBar")),g}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},b.prototype.updateProgress=function(a){if(this.updateAriaAttributes(this.el_),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.el_),this.tooltipProgressBar.el_.style.width=this.bar.el_.style.width;var b=parseFloat((0,q["default"])(this.player().el(),"width")),c=parseFloat((0,q["default"])(this.tooltipProgressBar.tooltip,"width")),d=this.tooltipProgressBar.el().style;d.maxWidth=Math.floor(b-c/2)+"px",d.minWidth=Math.ceil(c/2)+"px",d.right="-"+c/2+"px"}},b.prototype.updateAriaAttributes=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),a.setAttribute("aria-valuetext",(0,o["default"])(b,this.player_.duration()))},b.prototype.getPercent=function(){var a=this.player_.currentTime()/this.player_.duration();return a>=1?1:a},b.prototype.handleMouseDown=function(b){this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),a.prototype.handleMouseDown.call(this,b)},b.prototype.handleMouseMove=function(a){var b=this.calculateDistance(a)*this.player_.duration();b===this.player_.duration()&&(b-=.1),this.player_.currentTime(b)},b.prototype.handleMouseUp=function(b){a.prototype.handleMouseUp.call(this,b),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()},b.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},b.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},b}(i["default"]);r.prototype.options_={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},r.prototype.playerEvent="timeupdate",k["default"].registerComponent("SeekBar",r),c["default"]=r},{15:15,17:17,20:20,5:5,57:57,80:80,83:83,84:84}],20:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=d(h),j=a(83),k=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(j),l=a(84),m=d(l),n=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.updateDataAttr(),g.on(c,"timeupdate",g.updateDataAttr),c.ready(k.bind(g,g.updateDataAttr)),g}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar",innerHTML:'<div class="vjs-time-tooltip"></div>\n        <span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"});return this.tooltip=b.querySelector(".vjs-time-tooltip"),b},b.prototype.updateDataAttr=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),c=(0,m["default"])(b,this.player_.duration());this.el_.setAttribute("data-current-time",c),this.tooltip.innerHTML=c},b}(i["default"]);i["default"].registerComponent("TooltipProgressBar",n),c["default"]=n},{5:5,83:83,84:84}],21:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(22),i=d(h),j=a(5),k=d(j),l=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,{className:this.buildCSSClass()});return b.innerHTML="&nbsp;",b},b}(i["default"]);k["default"].registerComponent("CustomControlSpacer",l),c["default"]=l},{22:22,5:5}],22:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=function(a){function b(){return d(this,b),e(this,a.apply(this,arguments))}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b}(h["default"]);h["default"].registerComponent("Spacer",i),c["default"]=i},{5:5}],23:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(31),i=d(h),j=a(5),k=d(j),l=function(a){function b(c,d){e(this,b),d.track={player:c,kind:d.kind,label:d.kind+" settings",selectable:!1,"default":!1,mode:"disabled"},d.selectable=!1;var g=f(this,a.call(this,c,d));return g.addClass("vjs-texttrack-settings"),g.controlText(", opens "+d.kind+" settings dialog"),g}return g(b,a),b.prototype.handleClick=function(a){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").el_.focus()},b}(i["default"]);k["default"].registerComponent("CaptionSettingsMenuItem",l),c["default"]=l},{31:31,5:5}],24:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(30),i=d(h),j=a(5),k=d(j),l=a(23),m=d(l),n=function(a){function b(c,d,g){e(this,b);var h=f(this,a.call(this,c,d,g));return h.el_.setAttribute("aria-label","Captions Menu"),h}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-captions-button "+a.prototype.buildCSSClass.call(this)},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(b.push(new m["default"](this.player_,{kind:this.kind_})),this.hideThreshold_+=1),a.prototype.createItems.call(this,b)},b}(i["default"]);n.prototype.kind_="captions",n.prototype.controlText_="Captions",k["default"].registerComponent("CaptionsButton",n),c["default"]=n},{23:23,30:30,5:5}],25:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(30),i=d(h),j=a(5),k=d(j),l=a(26),m=d(l),n=a(91),o=d(n),p=function(a){function b(c,d,g){e(this,b);var h=f(this,a.call(this,c,d,g));return h.el_.setAttribute("aria-label","Chapters Menu"),h}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-chapters-button "+a.prototype.buildCSSClass.call(this)},b.prototype.update=function(b){this.track_&&(!b||"addtrack"!==b.type&&"removetrack"!==b.type)||this.setTrack(this.findChapter
34sTrack()),a.prototype.update.call(this)},b.prototype.setTrack=function(a){if(this.track_!==a){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var b=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);b&&b.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=a,this.track_){this.track_.mode="hidden";var c=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);c&&c.addEventListener("load",this.updateHandler_)}}},b.prototype.findChaptersTrack=function(){for(var a=this.player_.textTracks()||[],b=a.length-1;b>=0;b--){var c=a[b];if(c.kind===this.kind_)return c}},b.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize((0,o["default"])(this.kind_))},b.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),a.prototype.createMenu.call(this)},b.prototype.createItems=function(){var a=[];if(!this.track_)return a;var b=this.track_.cues;if(!b)return a;for(var c=0,d=b.length;c<d;c++){var e=b[c],f=new m["default"](this.player_,{track:this.track_,cue:e});a.push(f)}return a},b}(i["default"]);p.prototype.kind_="chapters",p.prototype.controlText_="Chapters",k["default"].registerComponent("ChaptersButton",p),c["default"]=p},{26:26,30:30,5:5,91:91}],26:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(48),i=d(h),j=a(5),k=d(j),l=a(83),m=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(l),n=function(a){function b(c,d){e(this,b);var g=d.track,h=d.cue,i=c.currentTime();d.selectable=!0,d.label=h.text,d.selected=h.startTime<=i&&i<h.endTime;var j=f(this,a.call(this,c,d));return j.track=g,j.cue=h,g.addEventListener("cuechange",m.bind(j,j.update)),j}return g(b,a),b.prototype.handleClick=function(b){a.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},b.prototype.update=function(a){var b=this.cue,c=this.player_.currentTime();this.selected(b.startTime<=c&&c<b.endTime)},b}(i["default"]);k["default"].registerComponent("ChaptersTrackMenuItem",n),c["default"]=n},{48:48,5:5,83:83}],27:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(30),i=d(h),j=a(5),k=d(j),l=a(83),m=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(l),n=function(a){function b(c,d,g){e(this,b);var h=f(this,a.call(this,c,d,g));h.el_.setAttribute("aria-label","Descriptions Menu");var i=c.textTracks();if(i){var j=m.bind(h,h.handleTracksChange);i.addEventListener("change",j),h.on("dispose",function(){i.removeEventListener("change",j)})}return h}return g(b,a),b.prototype.handleTracksChange=function(a){for(var b=this.player().textTracks(),c=!1,d=0,e=b.length;d<e;d++){var f=b[d];if(f.kind!==this.kind_&&"showing"===f.mode){c=!0;break}}c?this.disable():this.enable()},b.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildCSSClass.call(this)},b}(i["default"]);n.prototype.kind_="descriptions",n.prototype.controlText_="Descriptions",k["default"].registerComponent("DescriptionsButton",n),c["default"]=n},{30:30,5:5,83:83}],28:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(31),i=d(h),j=a(5),k=d(j),l=function(a){function b(c,d){e(this,b),d.track={player:c,kind:d.kind,label:d.kind+" off","default":!1,mode:"disabled"},d.selectable=!0;var g=f(this,a.call(this,c,d));return g.selected(!0),g}return g(b,a),b.prototype.handleTracksChange=function(a){for(var b=this.player().textTracks(),c=!0,d=0,e=b.length;d<e;d++){var f=b[d];if(f.kind===this.track.kind&&"showing"===f.mode){c=!1;break}}this.selected(c)},b}(i["default"]);k["default"].registerComponent("OffTextTrackMenuItem",l),c["default"]=l},{31:31,5:5}],29:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(30),i=d(h),j=a(5),k=d(j),l=function(a){function b(c,d,g){e(this,b);var h=f(this,a.call(this,c,d,g));return h.el_.setAttribute("aria-label","Subtitles Menu"),h}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+a.prototype.buildCSSClass.call(this)},b}(i["default"]);l.prototype.kind_="subtitles",l.prototype.controlText_="Subtitles",k["default"].registerComponent("SubtitlesButton",l),c["default"]=l},{30:30,5:5}],30:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(36),i=d(h),j=a(5),k=d(j),l=a(31),m=d(l),n=a(28),o=d(n),p=function(a){function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return e(this,b),d.tracks=c.textTracks(),f(this,a.call(this,c,d))}return g(b,a),b.prototype.createItems=function(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];a.push(new o["default"](this.player_,{kind:this.kind_})),this.hideThreshold_+=1;var b=this.player_.textTracks();if(!b)return a;for(var c=0;c<b.length;c++){var d=b[c];d.kind===this.kind_&&a.push(new m["default"](this.player_,{track:d,selectable:!0}))}return a},b}(i["default"]);k["default"].registerComponent("TextTrackButton",p),c["default"]=p},{28:28,31:31,36:36,5:5}],31:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}
vendor: 20,037 bytes, line 34
34,i=a(48),j=d(i),k=a(5),l=d(k),m=a(83),n=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(m),o=a(95),p=d(o),q=a(94),r=d(q),s=function(a){function b(c,d){e(this,b);var g=d.track,i=c.textTracks();d.label=g.label||g.language||"Unknown",d.selected=g["default"]||"showing"===g.mode;var j=f(this,a.call(this,c,d));if(j.track=g,i){var k=n.bind(j,j.handleTracksChange);c.on(["loadstart","texttrackchange"],k),i.addEventListener("change",k),j.on("dispose",function(){i.removeEventListener("change",k)})}if(i&&i.onchange===undefined){var l=void 0;j.on(["tap","click"],function(){if("object"!==h(p["default"].Event))try{l=new p["default"].Event("change")}catch(a){}l||(l=r["default"].createEvent("Event"),l.initEvent("change",!0,!0)),i.dispatchEvent(l)})}return j}return g(b,a),b.prototype.handleClick=function(b){var c=this.track.kind,d=this.player_.textTracks();if(a.prototype.handleClick.call(this,b),d)for(var e=0;e<d.length;e++){var f=d[e];f.kind===c&&(f===this.track?"showing"!==f.mode&&(f.mode="showing"):"disabled"!==f.mode&&(f.mode="disabled"))}},b.prototype.handleTracksChange=function(a){this.selected("showing"===this.track.mode)},b}(j["default"]);l["default"].registerComponent("TextTrackMenuItem",s),c["default"]=s},{48:48,5:5,83:83,94:94,95:95}],32:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=d(h),j=a(81),k=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(j),l=a(84),m=d(l),n=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"timeupdate",g.updateContent),g}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),c=this.localize("Current Time"),d=(0,m["default"])(b,this.player_.duration());d!==this.formattedTime_&&(this.formattedTime_=d,this.contentEl_.innerHTML='<span class="vjs-control-text">'+c+"</span> "+d)},b}(i["default"]);i["default"].registerComponent("CurrentTimeDisplay",n),c["default"]=n},{5:5,81:81,84:84}],33:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=d(h),j=a(81),k=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(j),l=a(84),m=d(l),n=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"durationchange",g.updateContent),g.on(c,"timeupdate",g.updateContent),g.on(c,"loadedmetadata",g.updateContent),g}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(a){var b=this.player_.duration();if(b&&this.duration_!==b){this.duration_=b;var c=this.localize("Duration Time"),d=(0,m["default"])(b);this.contentEl_.innerHTML='<span class="vjs-control-text">'+c+"</span> "+d}},b}(i["default"]);i["default"].registerComponent("DurationDisplay",n),c["default"]=n},{5:5,81:81,84:84}],34:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=d(h),j=a(81),k=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(j),l=a(84),m=d(l),n=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"timeupdate",g.updateContent),g.on(c,"durationchange",g.updateContent),g}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(a){if(this.player_.duration()){var b=this.localize("Remaining Time"),c=(0,m["default"])(this.player_.remainingTime());c!==this.formattedTime_&&(this.formattedTime_=c,this.contentEl_.innerHTML='<span class="vjs-control-text">'+b+"</span> -"+c)}},b}(i["default"]);i["default"].registerComponent("RemainingTimeDisplay",n),c["default"]=n},{5:5,81:81,84:84}],35:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=function(a){function b(){return d(this,b),e(this,a.apply(this,arguments))}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},b}(h["default"]);h["default"].registerComponent("TimeDivider",i),c["default"]=i},{5:5}],36:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(47),i=d(h),j=a(5),k=d(j),l=a(83),m=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(l),n=function(a){function b(c,d){e(this,b);var g=d.tracks,h=f(this,a.call(this,c,d));if(h.items.length<=1&&h.hide(),!g)return f(h);var i=m.bind(h,h.update);return g.addEventListener("removetrack",i),g.addEventListener("addtrack",i),h.player_.on("dispose",function(){g.removeEventListener("removetrack",i),g.removeEventListener("addtrack",i)}),h}return g(b,a),b}(i["default"]);k["default"].registerComponent("TrackButton",n),c["default"]=n},{47:47,5:5,83:83}],37:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(57),i=d(h),j=a(5),k=d(j),l=a(83),m=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(l);a(39);var n=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"volumechange",g.updateARIAAttributes),c.ready(m.bind(g,g.updateARIAAttributes)),g}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},b.prototype.handleMouseMove=function(a){this.checkMuted(),this.player_.volume(this.calculateDistance(a))},b.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},b.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},b.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},b.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},b.prototype.updateARIAAttributes=function(a){var b=(100*this.player_.volume()).toFixed(2);this.el_.setAttribute("aria-valuenow",b),this.el_.setAttribute("aria-valuetext",b+"%")},b}(i["default"]);n.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},n.prototype.playerEvent="volumechange",k["default"].registerComponent("VolumeBar",n),c["default"]=n},{39:39,5:5,57:57,83:83}],38:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g);a(37);var i=function(a){function b(c,f){d(this,b);var g=e(this,a.call(this,c,f));return c.tech_&&!1===c.tech_.featuresVolumeControl&&g.addClass("vjs-hidden"),g.on(c,"loadstart",function(){!1===c.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),g}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},b}(h["default"]);i.prototype.options_={children:["volumeBar"]},h["default"].registerComponent("VolumeControl",i),c["default"]=i},{37:37,5:5}],39:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=function(a){function b(){return d(this,b),e(this,a.apply(this,arguments))}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},b}(h["default"]);h["default"].registerComponent("VolumeLevel",i),c["default"]=i},{5:5}],40:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(83),i=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(h),j=a(5),k=d(j),l=a(54),m=d(l),n=a(53),o=d(n),p=a(11),q=d(p),r=a(37),s=d(r),t=function(a){function b(c){function d(){c.tech_&&!1===c.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}var g=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};e(this,b),g.inline===undefined&&(g.inline=!0),g.vertical===undefined&&(g.inline?g.vertical=!1:g.vertical=!0),g.volumeBar=g.volumeBar||{},g.volumeBar.vertical=!!g.vertical;var h=f(this,a.call(this,c,g));return h.on(c,"volumechange",h.volumeUpdate),h.on(c,"loadstart",h.volumeUpdate),d.call(h),h.on(c,"loadstart",d),h.on(h.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")}),h.on(h.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")}),h.on(h.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")}),h.on(h.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")}),h}return g(b,a),b.prototype.buildCSSClass=function(){var b="";return b=this.options_.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+a.prototype.buildCSSClass.call(this)+" "+b},b.prototype.createPopup=function(){var a=new m["default"](this.player_,{contentElType:"div"}),b=new s["default"](this.player_,this.options_.volumeBar);return a.addChild(b),this.menuContent=a,this.volumeBar=b,this.attachVolumeBarEvents(),a},b.prototype.handleClick=function(b){q["default"].prototype.handleClick.call(this),a.prototype.handleClick.call(this)},b.prototype.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],i.bind(this,this.handleMouseDown))},b.prototype.handleMouseDown=function(a){this.on(["mousemove","touchmove"],i.bind(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.el_.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},b.prototype.handleMouseUp=function(a){this.off(["mousemove","touchmove"],i.bind(this.volumeBar,this.volumeBar.handleMouseMove))},b}(o["default"]);t.prototype.volumeUpdate=q["default"].prototype.update,t.prototype.controlText_="Mute",k["default"].registerComponent("VolumeMenuButton",t),c["default"]=t},{11:11,37:37,5:5,53:53,54:54,83:83}],41:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=d(h),j=a(50),k=d(j),l=a(87),m=d(l),n=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.on(c,"error",g.open),g}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-error-display "+a.prototype.buildCSSClass.call(this)},b.prototype.content=function(){var a=this.player().error();return a?this.localize(a.message):""},b}(k["default"]);n.prototype.options_=(0,m["default"])(k["default"].prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),i["default"].registerComponent("ErrorDisplay",n),c["default"]=n},{5:5,50:50,87:87}],42:[function(a,b,c){"use strict";c.__esModule=!0;var d=a(82),e=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(d),f=function(){};f.prototype.allowedEvents_={},f.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},e.on(this,a,b),this.addEventListener=c},f.prototype.addEventListener=f.prototype.on,f.prototype.off=function(a,b){e.off(this,a,b)},f.prototype.removeEventListener=f.prototype.off,f.prototype.one=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},e.one(this,a,b),this.addEventListener=c},f.prototype.trigger=function(a){var b=a.type||a;"string"==typeof a&&(a={type:b}),a=e.fixEvent(a),this.allowedEvents_[b]&&this["on"+b]&&this["on"+b](a),e.trigger(this,a)},f.prototype.dispatchEvent=f.prototype.trigger,c["default"]=f},{82:82}],43:[function(a,b,c){"use strict";c.__esModule=!0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=a(86),f=function(a){return a&&a.__esModule?a:{"default":a}}(e),g=a(88),h=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+(void 0===b?"undefined":d(b)));a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.super_=b)},i=function(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},c=function(){a.apply(this,arguments)},d={};(0,g.isObject)(b)?("function"==typeof b.init&&(f["default"].warn("Constructor logic via init() is deprecated; please use constructor() instead."),b.constructor=b.init),b.constructor!==Object.prototype.constructor&&(c=b.constructor),d=b):"function"==typeof b&&(c=b),h(c,a);for(var e in d)d.hasOwnProperty(e)&&(c.prototype[e]=d[e]);return c};c["default"]=i},{86:86,88:88}],44:[function(a,b,c){"use strict";c.__esModule=!0;for(var d=a(94),e=function(a){return a&&a.__esModule?a:{"default":a}}(d),f={},g=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["
34webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],h=g[0],i=void 0,j=0;j<g.length;j++)if(g[j][1]in e["default"]){i=g[j];break}if(i)for(var k=0;k<i.length;k++)f[h[k]]=i[k];c["default"]=f},{94:94}],45:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=function(a){function b(){return d(this,b),e(this,a.apply(this,arguments))}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},b}(h["default"]);h["default"].registerComponent("LoadingSpinner",i),c["default"]=i},{5:5}],46:[function(a,b,c){"use strict";function d(a){if(a instanceof d)return a;"number"==typeof a?this.code=a:"string"==typeof a?this.message=a:(0,e.isObject)(a)&&("number"==typeof a.code&&(this.code=a.code),(0,e.assign)(this,a)),this.message||(this.message=d.defaultMessages[this.code]||"")}c.__esModule=!0;var e=a(88);d.prototype.code=0,d.prototype.message="",d.prototype.status=null,d.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],d.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 f=0;f<d.errorTypes.length;f++)d[d.errorTypes[f]]=f,d.prototype[d.errorTypes[f]]=f;c["default"]=d},{88:88}],47:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=a(3),j=e(i),k=a(5),l=e(k),m=a(49),n=e(m),o=a(81),p=d(o),q=a(83),r=d(q),s=a(91),t=e(s),u=function(a){function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};f(this,b);var e=g(this,a.call(this,c,d));return e.update(),e.enabled_=!0,e.el_.setAttribute("aria-haspopup","true"),e.el_.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}return h(b,a),b.prototype.update=function(){var a=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=a,this.addChild(a),this.buttonPressed_=!1,this.el_.setAttribute("aria-expanded","fal
34se"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},b.prototype.createMenu=function(){var a=new n["default"](this.player_);if(this.hideThreshold_=0,this.options_.title){var b=p.createEl("li",{className:"vjs-menu-title",innerHTML:(0,t["default"])(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,a.children_.unshift(b),p.insertElFirst(b,a.contentEl())}if(this.items=this.createItems(),this.items)for(var c=0;c<this.items.length;c++)a.addItem(this.items[c]);return a},b.prototype.createItems=function(){},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b.prototype.buildCSSClass=function(){var b="vjs-menu-button";return!0===this.options_.inline?b+="-inline":b+="-popup","vjs-menu-button "+b+" "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){this.one(this.menu.contentEl(),"mouseleave",r.bind(this,function(a){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},b.prototype.handleKeyPress=function(b){27===b.which||9===b.which?(this.buttonPressed_&&this.unpressButton(),9!==b.which&&b.preventDefault()):38===b.which||40===b.which?this.buttonPressed_||(this.pressButton(),b.preventDefault()):a.prototype.handleKeyPress.call(this,b)},b.prototype.handleSubmenuKeyPress=function(a){27!==a.which&&9!==a.which||(this.buttonPressed_&&this.unpressButton(),9!==a.which&&a.preventDefault())},b.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.lockShowing(),this.el_.setAttribute("aria-expanded","true"),this.menu.focus())},b.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.el_.focus())},b.prototype.disable=function(){return this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.enabled_=!1,a.prototype.disable.call(this)},b.prototype.enable=function(){return this.enabled_=!0,a.prototype.enable.call(this)},b}(j["default"]);l["default"].registerComponent("MenuButton",u),c["default"]=u},{3:3,49:49,5:5,81:81,83:83,91:91}],48:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(3),i=d(h),j=a(5),k=d(j),l=a(88),m=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.selectable=d.selectable,g.selected(d.selected),g.selectable?g.el_.setAttribute("role","menuitemcheckbox"):g.el_.setAttribute("role","menuitem"),g}return g(b,a),b.prototype.createEl=function(b,c,d){return this.nonIconControl=!0,a.prototype.createEl.call(this,"li",(0,l.assign)({className:"vjs-menu-item",innerHTML:this.localize(this.options_.label),tabIndex:-1},c),d)},b.prototype.handleClick=function(a){this.selected(!0)},b.prototype.selected=function(a){this.selectable&&(a?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(" ")))},b}(i["default"]);k["default"].registerComponent("MenuItem",m),c["default"]=m},{3:3,5:5,88:88}],49:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=function(a){return a&&a.__esModule?a:{"default":a}}(h),j=a(81),k=d(j),l=a(83),m=d(l),n=a(82),o=d(n),p=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));
vendor: 8,460 bytes, line 34
34return g.focusedChild_=-1,g.on("keydown",g.handleKeyPress),g}return g(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",m.bind(this,function(a){this.unlockShowing()}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=k.createEl(b,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var c=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return c.setAttribute("role","presentation"),c.appendChild(this.contentEl_),o.on(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepForward()):38!==a.which&&39!==a.which||(a.preventDefault(),this.stepBack())},b.prototype.stepForward=function(){var a=0;this.focusedChild_!==undefined&&(a=this.focusedChild_+1),this.focus(a)},b.prototype.stepBack=function(){var a=0;this.focusedChild_!==undefined&&(a=this.focusedChild_-1),this.focus(a)},b.prototype.focus=function(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,b=this.children().slice();b.length&&b[0].className&&/vjs-menu-title/.test(b[0].className)&&b.shift(),b.length>0&&(a<0?a=0:a>=b.length&&(a=b.length-1),this.focusedChild_=a,b[a].el_.focus())},b}(i["default"]);i["default"].registerComponent("Menu",p),c["default"]=p},{5:5,81:81,82:82,83:83}],50:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(81),i=d(h),j=a(83),k=d(j),l=a(5),m=function(a){return a&&a.__esModule?a:{"default":a}}(l),n="vjs-modal-dialog",o=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return g.opened_=g.hasBeenOpened_=g.hasBeenFilled_=!1,g.closeable(!g.options_.uncloseable),g.content(g.options_.content),g.contentEl_=i.createEl("div",{className:n+"-content"},{role:"document"}),g.descEl_=i.createEl("p",{className:n+"-description vjs-offscreen",id:g.el().getAttribute("aria-describedby")}),i.textContent(g.descEl_,g.description()),g.el_.appendChild(g.descEl_),g.el_.appendChild(g.contentEl_),g}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},b.prototype.buildCSSClass=function(){return n+" vjs-hidden "+a.prototype.buildCSSClass.call(this)},b.prototype.handleKeyPress=function(a){27===a.which&&this.closeable()&&this.close()},b.prototype.label=function(){return this.options_.label||this.localize("Modal Window")},b.prototype.description=function(){var a=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(a+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),a},b.prototype.open=function(){if(!this.opened_){var a=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!a.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&a.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",k.bind(this,this.handleKeyPress)),a.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}return this},b.prototype.opened=function(a){return"boolean"==typeof a&&this[a?"open":"close"](),this.opened_},b.prototype.close=function(){if(this.opened_){var a=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&a.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",k.bind(this,this.handleKeyPress)),a.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.options_.temporary&&this.dispose()}return this},b.prototype.closeable=function(a){if("boolean"==typeof a){var b=this.closeable_=!!a,c=this.getChild("closeButton");if(b&&!c){var d=this.contentEl_;this.contentEl_=this.el_,c=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=d,this.on(c,"close",this.close)}!b&&c&&(this.off(c,"close",this.close),this.removeChild(c),c.dispose())}return this.closeable_},b.prototype.fill=function(){return this.fillWith(this.content())},b.prototype.fillWith=function(a){var b=this.contentEl(),c=b.parentNode,d=b.nextSibling;return this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,c.removeChild(b),this.empty(),i.insertContent(b,a),this.trigger("modalfill"),d?c.insertBefore(b,d):c.appendChild(b),this},b.prototype.empty=function(){return this.trigger("beforemodalempty"),i.emptyEl(this.contentEl()),this.trigger("modalempty"),this},b.prototype.content=function(a){return void 0!==a&&(this.content_=a),this.content_},b}(m["default"]);o.prototype.options_={pauseOnOpen:!0,temporary:!0},m["default"].registerComponent("ModalDialog",o),c["default"]=o},{5:5,81:81,83:83}],51:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=a(5),j=e(i),k=a(94),l=e(k),m=a(95),n=e(m),o=a(82),p=d(o),q=a(81),r=d(q),s=a(83),t=d(s),u=a(85),v=d(u),w=a(78),x=d(w),y=a(86),z=e(y),A=a(91),B=e(A),C=a(90),D=a(79),E=a(89),F=d(E),G=a(44),H=e(G),I=a(46),J=e(I),K=a(97),L=e(K),M=a(88),N=a(87),O=e(N),P=a(69),Q=e(P),R=a(50),S=e(R),T=a(62),U=e(T),V=a(63),W=e(V),X=a(76),Y=e(X);a(61),a(59),a(55),a(68),a(45),a(1),a(4),a(8),a(41),a(71),a(60);var Z=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],$=function(a){function b(c,d,e){if(f(this,b),c.id=c.id||"vjs_video_"+v.newGUID(),d=(0,M.assign)(b.getTagSettings(c),d),d.initChildren=!1,d.createEl=!1,d.reportTouchActivity=!1,!d.language)if("function"==typeof c.closest){var h=c.closest("[lang]");h&&(d.language=h.getAttribute("lang"))}else for(var i=c;i&&1===i.nodeType;){if(r.getElAttributes(i).hasOwnProperty("lang")){d.language=i.getAttribute("lang");break}i=i.parentNode}var j=g(this,a.call(this,null,d,e));if(!j.options_||!j.options_.techOrder||!j.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(j.tag=c,j.tagAttributes=c&&r.getElAttributes(c),j.language(j.options_.language),d.languages){var k={};Object.getOwnPropertyNames(d.languages).forEach(function(a){k[a.toLowerCase()]=d.languages[a]}),j.languages_=k}else j.languages_=b.prototype.options_.languages;j.cache_={},j.poster_=d.poster||"",j.controls_=!!d.controls,c.controls=!1,j.scrubbing_=!1,j.el_=j.createEl();var l=(0,O["default"])(j.options_);if(d.plugins){var m=d.plugins;Object.getOwnPropertyNames(m).forEach(function(a){"function"==typeof this[a]?this[a](m[a]):z["default"].error("Unable to find plugin:",a)},j)}j.options_.playerOptions=l,j.initChildren(),j.isAudio("audio"===c.nodeName.toLowerCase()),j.controls()?j.addClass("vjs-controls-enabled"):j.addClass("vjs-controls-disabled"),j.el_.setAttribute("role","regi
34on"),j.isAudio()?j.el_.setAttribute("aria-label","audio player"):j.el_.setAttribute("aria-label","video player"),j.isAudio()&&j.addClass("vjs-audio"),j.flexNotSupported_()&&j.addClass("vjs-no-flex"),x.IS_IOS||j.addClass("vjs-workinghover"),b.players[j.id_]=j;var n="5.20.2".split(".")[0];return j.addClass("vjs-v"+n),j.userActive(!0),j.reportUserActivity(),j.listenForUserActivity_(),j.on("fullscreenchange",j.handleFullscreenChange_),j.on("stageclick",j.handleStageClick_),j}return h(b,a),b.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_),b.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(),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var b=this.tag,c=void 0,d=this.playerElIngest_=b.parentNode&&b.parentNode.hasAttribute&&b.parentNode.hasAttribute("data-vjs-player");c=this.el_=d?b.parentNode:a.prototype.createEl.call(this,"div"),b.setAttribute("tabindex","-1"),b.removeAttribute("width"),b.removeAttribute("height");var e=r.getElAttributes(b);if(Object.getOwnPropertyNames(e).forEach(function(a){"class"===a?c.className+=" "+e[a]:c.setAttribute(a,e[a])}),b.playerId=b.id,b.id+="_html5_api",b.className="vjs-tech",b.player=c.player=this,this.addClass("vjs-paused"),!0!==n["default"].VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=F.createStyleElement("vjs-styles-dimensions");var f=r.$(".vjs-styles-defaults"),g=r.$("head");g.insertBefore(this.styleEl_,f?f.nextSibling:g.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var h=b.getElementsByTagName("a"),i=0;i<h.length;i++){var j=h.item(i);r.addElClass(j,"vjs-hidden"),j.setAttribute("hidden","hidden")}return b.initNetworkState_=b.networkState,b.parentNode&&!d&&b.parentNode.insertBefore(c,b),r.insertElFirst(b,c),this.children_.unshift(b),this.el_=c,c},b.prototype.width=function(a){return this.dimension("width",a)},b.prototype.height=function(a){return this.dimension("height",a)},b.prototype.dimension=function(a,b){var c=a+"_";if(b===undefined)return this[c]||0;if(""===b)this[c]=undefined;else{var d=parseFloat(b);if(isNaN(d))return z["default"].error('Improper value "'+b+'" supplied for for '+a),this;this[c]=d}return this.updateStyleEl_(),this},b.prototype.fluid=function(a){if(a===undefined)return!!this.fluid_;this.fluid_=!!a,a?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},b.prototype.aspectRatio=function(a){if(a===undefined)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(a))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=a,this.fluid(!0),this.updateStyleEl_()},b.prototype.updateStyleEl_=function(){if(!0===n["default"].VIDEOJS_NO_DYNAMIC_STYLE){var a="number"==typeof this.width_?this.width_:this.options_.width,b="number"==typeof this.height_?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();return void(c&&(a>=0&&(c.width=a),b>=0&&(c.height=b)))}var d=void 0,e=void 0,f=void 0,g=void 0;f=this.aspectRatio_!==undefined&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var h=f.split(":"),i=h[1]/h[0];d=this.width_!==undefined?this.width_:this.height_!==undefined?this.height_/i:this.videoWidth()||300,e=this.height_!==undefined?this.height_:d*i,g=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(g),F.setTextContent(this.styleEl_,"\n      ."+g+" {\n        width: "+d+"px;\n        height: "+e+"px;\n      }\n\n      ."+g+".vjs-fluid {\n        padding-top: "+100*i+"%;\n      }\n    ")},b.prototype.loadTech_=function(a,b){var c=this;this.tech_&&this.unloadTech_(),"Html5"!==a&&this.tag&&(U["default"].getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=a,this.isReady_=!1;var d=(0,M.assign)({source:b,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+a+"_api",videoTracks:this.videoTracks_,textTracks:this.textTracks_,audioTracks:this.audioTracks_,autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,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"]},this.options_[a.toLowerCase()]);this.tag&&(d.tag=this.tag),b&&(this.currentType_=b.type,b.src===this.cache_.src&&this.cache_.currentTime>0&&(d.startTime=this.cache_.currentTime),this.cache_.sources=null,this.cache_.source=b,this.cache_.src=b.src);var e=U["default"].getTech(a);e||(e=j["default"].getComponent(a)),this.tech_=new e(d),this.tech_.ready(t.bind(this,this.handleTechReady_),!0),Q["default"].jsonToTextTracks(this.textTracksJson_||[],this.tech_),Z.forEach(function(a){c.on(c.tech_,a,c["handleTech"+(0,B["default"])(a)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"
34waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),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_,"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.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===a&&this.tag||r.insertElFirst(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},b.prototype.unloadTech_=function(){this.videoTracks_=this.videoTracks(),this.textTracks_=this.textTracks(),this.audioTracks_=this.audioTracks(),this.textTracksJson_=Q["default"].textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},b.prototype.tech=function(a){if(a&&a.IWillNotUseThisInPlugins)return this.tech_;var b="\n      Please make sure that you are not using this inside of a plugin.\n      To disable this alert and error, please pass in an object with\n      `IWillNotUseThisInPlugins` to the `tech` method. See\n      https://github.com/videojs/video.js/issues/2617 for more info.\n    ";throw n["default"].alert(b),new Error(b)},b.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),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_)},b.prototype.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_,"mousedown",this.handleTechClick_)},b.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused()){try{delete this.tag.poster}catch(a){(0,z["default"])("deleting tag.poster throws in some browsers",a)}this.play()}},b.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},b.prototype.hasStarted=function(a){return a!==undefined?(this.hasStarted_!==a&&(this.hasStarted_=a,a?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_},b.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},b.prototype.handleTechWaiting_=function(){var a=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return a.removeClass("vjs-waiting")})},b.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},b.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},b.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},b.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},b.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},b.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(z["default"].warn("Passing the `starttime` option to the player will be deprecated 
34in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},b.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},b.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},b.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},b.prototype.handleTechClick_=function(a){0===a.button&&this.controls()&&(this.paused()?this.play():this.pause())},b.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},b.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},b.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},b.prototype.handleTechTouchEnd_=function(a){a.preventDefault()},b.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},b.prototype.handleStageClick_=function(){this.reportUserActivity()},b.prototype.handleTechFullscreenChange_=function(a,b){b&&this.isFullscreen(b.isFullscreen),this.trigger("fullscreenchange")},b.prototype.handleTechError_=function(){var a=this.tech_.error();this.error(a)},b.prototype.handleTechTextData_=function(){var a=null;arguments.length>1&&(a=arguments[1]),this.trigger("textdata",a)},b.prototype.getCache=function(){return this.cache_},b.prototype.techCall_=function(a,b){if(this.tech_&&!this.tech_.isReady_)this.tech_.ready(function(){this[a](b)},!0);else try{this.tech_&&this.tech_[a](b)}catch(c){throw(0,z["default"])(c),c}},b.prototype.techGet_=function(a){if(this.tech_&&this.tech_.isReady_)try{return this.tech_[a]()}catch(b){throw this.tech_[a]===undefined?(0,z["default"])("Video.js: "+a+" method not defined for "+this.techName_+" playback technology.",b):"TypeError"===b.name?((0,z["default"])("Video.js: "+a+" unavailable on "+this.techName_+" playback technology element.",b),this.tech_.isReady_=!1):(0,z["default"])(b),b}},b.prototype.play=function(){return this.src()||this.currentSrc()?this.techCall_("play"):this.tech_.one("loadstart",function(){this.play()}),this},b.prototype.pause=function(){return this.techCall_("pause"),this},b.prototype.paused=function(){return!1!==this.techGet_("paused")},b.prototype.scrubbing=function(a){return a!==undefined?(this.scrubbing_=!!a,a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_},b.prototype.currentTime=function(a){return a!==undefined?(this.techCall_("setCurrentTime",a),this):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},b.prototype.duration=function(a){return a===undefined?this.cache_.duration!==undefined?this.cache_.duration:NaN:(a=parseFloat(a),a<0&&(a=Infinity),a!==this.cache_.duration&&(this.cache_.duration=a,a===Infinity?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},b.prototype.remainingTime=function(){return this.duration()-this.currentTime()},b.prototype.buffered=function(){var a=this.techGet_("buffered");return a&&a.length||(a=(0,C.createTimeRange)(0,0)),a},b.prototype.bufferedPercent=function(){return(0,D.bufferedPercent)(this.buffered(),this.duration())},b.prototype.bufferedEnd=function(){var a=this.buffered(),b=this.duration(),c=a.end(a.length-1);return c>b&&(c=b),c},b.prototype.volume=function(a){var b=void 0;return a!==undefined?(b=Math.max(0,Math.min(1,parseFloat(a))),this.cache_.volume=b,this.techCall_("setVolume",b),this):(b=parseFloat(this.techGet_("volume")),isNaN(b)?1:b)},b.prototype.muted=function(a){return a!==undefined?(this.techCall_("setMuted",a),this):this.techGet_("muted")||!1},b.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},b.prototype.isFullscreen=function(a){return a!==undefined?(this.isFullscreen_=!!a,this):!!this.isFullscreen_},b.prototype.requestFullscreen=function(){var a=H["default"];return this.isFullscreen(!0),a.requestFullscreen?(p.on(l["default"],a.fullscreenchange,t.bind(this,function b(c){this.isFullscreen(l["default"][a.fullscreenElement]),!1===this.isFullscreen()&&p.off(l["default"],a.fullscreenchange,b),this.trigger("fullscreenchange")})),this.el_[a.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},b.prototype.exitFullscreen=function(){var a=H["default"];return this.isFullscreen(!1),a.requestFullscreen?l["default"][a.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},b.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=l["default"].documentElement.style.overflow,p.on(l["default"],"keydown",t.bind(this,this.fullWindowOnEscKey)),l["default"].documentElement.style.overflow="hidden",r.addElClass(l["default"].body,"vjs-full-window"),this.trigger("enterFullWindow")},b.prototype.fullWindowOnEscKey=function(a){27===a.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},b.prototype.exitFullWindow=function(){this.isFullWindow=!1,p.off(l["default"],"keydown",this.fullWindowOnEscKey),l["default"].documentElement.style.overflow=this.docOrigOverflow,r.removeElClass(l["default"].body,"vjs-full-window"),this.trigger("exitFullWindow")},b.prototype.canPlayType=function(a){for(var b=void 0,c=0,d=this.options_.techOrder;c<d.length;c++){var e=(0,B["default"])(d[c]),f=U["default"].getTech(e);if(f||(f=j["default"].getComponent(e)),f){if(f.isSupported()&&(b=f.canPlayType(a)))return b}else z["default"].error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return""},b.prototype.selectSource=function(a){var b=this,c=this.options_.techOrder.map(B["default"]).map(function(a){return[a,U["default"].getTech(a)||j["default"].getComponent(a)]}).filter(function(a){var b=a[0],c=a[1];return c?c.isSupported():(z["default"].error('The "'+b+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),d=function(a,b,c){var d=void 0;return a.some(function(a){return b.some(function(b){if(d=c(a,b))return!0})}),d},e=function(a,c){var d=a[0];if(a[1].canPlaySource(c,b.options_[d.toLowerCase()]))return{source:c,tech:d}};return(this.options_.sourceOrder?d(a,c,function(a){return function(b,c){return a(c,b)}}(e)):d(c,a,e))||!1}
vendor: 22,968 bytes, line 34
34,b.prototype.src=function(a){if(a===undefined)return this.techGet_("src");var b=U["default"].getTech(this.techName_);return b||(b=j["default"].getComponent(this.techName_)),Array.isArray(a)?this.sourceList_(a):"string"==typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!b.canPlaySource(a,this.options_[this.techName_.toLowerCase()])?this.sourceList_([a]):(this.cache_.sources=null,this.cache_.source=a,this.cache_.src=a.src,this.currentType_=a.type||"",this.ready(function(){b.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",a):this.techCall_("src",a.src),"auto"===this.options_.preload&&this.load(),this.options_.autoplay&&this.play()},!0))),this},b.prototype.sourceList_=function(a){var b=this.selectSource(a);b?(b.tech===this.techName_?this.src(b.source):this.loadTech_(b.tech,b.source),this.cache_.sources=a):(this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),this.triggerReady())},b.prototype.load=function(){return this.techCall_("load"),this},b.prototype.reset=function(){return this.loadTech_((0,B["default"])(this.options_.techOrder[0]),null),this.techCall_("reset"),this},b.prototype.currentSources=function(){var a=this.currentSource(),b=[];return 0!==Object.keys(a).length&&b.push(a),this.cache_.sources||b},b.prototype.currentSource=function(){var a={},b=this.currentSrc();return b&&(a.src=b),this.cache_.source||a},b.prototype.currentSrc=function(){return this.techGet_("currentSrc")||this.cache_.src||""},b.prototype.currentType=function(){return this.currentType_||""},b.prototype.preload=function(a){return a!==undefined?(this.techCall_("setPreload",a),this.options_.preload=a,this):this.techGet_("preload")},b.prototype.autoplay=function(a){return a!==undefined?(this.techCall_("setAutoplay",a),this.options_.autoplay=a,this):this.techGet_("autoplay",a)},b.prototype.playsinline=function(a){return a!==undefined?(this.techCall_("setPlaysinline",a),this.options_.playsinline=a,this):this.techGet_("playsinline")},b.prototype.loop=function(a){return a!==undefined?(this.techCall_("setLoop",a),this.options_.loop=a,this):this.techGet_("loop")},b.prototype.poster=function(a){return a===undefined?this.poster_:(a||(a=""),this.poster_=a,this.techCall_("setPoster",a),this.trigger("posterchange"),this)},b.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},b.prototype.controls=function(a){return a!==undefined?(a=!!a,this.controls_!==a&&(this.controls_=a,this.usingNativeControls()&&this.techCall_("setControls",a),a?(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_())),this):!!this.controls_},b.prototype.usingNativeControls=function(a){return a!==undefined?(a=!!a,this.usingNativeControls_!==a&&(this.usingNativeControls_=a,a?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.usingNativeControls_},b.prototype.error=function(a){return a===undefined?this.error_||null:null===a?(this.error_=a,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.error_=new J["default"](a),this.addClass("vjs-error"),z["default"].error("(CODE:"+this.error_.code+" "+J["default"].errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),this)},b.prototype.reportUserActivity=function(a){this.userActivity_=!0},b.prototype.userActive=function(a){return a!==undefined?(a=!!a,a!==this.userActive_&&(this.userActive_=a,a?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.userActivity_=!1,this.tech_&&this.tech_.one("mousemove",function(a){a.stopPropagation(),a.preventDefault()}),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.userActive_},b.prototype.listenForUserActivity_=function(){var a=void 0,b=void 0,c=void 0,d=t.bind(this,this.reportUserActivity),e=function(a){a.screenX===b&&a.screenY===c||(b=a.screenX,c=a.screenY,d())},f=function(){d(),this.clearInterval(a),a=this.setInterval(d,250)},g=function(b){d(),this.clearInterval(a)};this.on("mousedown",f),this.on("mousemove",e),this.on("mouseup",g),this.on("keydown",d),this.on("keyup",d);var h=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(h);var a=this.options_.inactivityTimeout;a>0&&(h=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},a))}},250)},b.prototype.playbackRate=function(a){return a!==undefined?(this.techCall_("setPlaybackRate",a),this):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},b.prototype.isAudio=function(a){return a!==undefined?(this.isAudio_=!!a,this):!!this.isAudio_},b.prototype.videoTracks=function(){return this.tech_?this.tech_.videoTracks():(this.videoTracks_=this.videoTracks_||new Y["default"],this.videoTracks_)},b.prototype.audioTracks=function(){return this.tech_?this.tech_.audioTracks():(this.audioTracks_=this.audioTracks_||new W["default"],this.audioTracks_)},b.prototype.textTracks=function(){if(this.tech_)return this.tech_.textTracks()},b.prototype.remoteTextTracks=function(){if(this.tech_)return this.tech_.remoteTextTracks()},b.prototype.remoteTextTrackEls=function(){if(this.tech_)return this.tech_.remoteTextTrackEls()},b.prototype.addTextTrack=function(a,b,c){if(this.tech_)return this.tech_.addTextTrack(a,b,c)},b.prototype.addRemoteTextTrack=function(a,b){if(this.tech_)return this.tech_.addRemoteTextTrack(a,b)},b.prototype.removeRemoteTextTrack=function(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},b=a.track,c=b===undefined?arguments[0]:b;if(this.tech_)return this.tech_.removeRemoteTextTrack(c)},b.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},b.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},b.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},b.prototype.language=function(a){return a===undefined?this.language_:(this.language_=String(a).toLowerCase(),this)},b.prototype.languages=function(){return(0,O["default"])(b.prototype.options_.languages,this.languages_)},b.prototype.toJSON=function(){var a=(0,O["default"])(this.options_),b=a.tracks;a.tracks=[];for(var c=0;c<b.length;c++){var d=b[c];d=(0,O["default"])(d),d.player=undefined,a.tracks[c]=d}return a},b.prototype.createModal=function(a,b){var c=this;b=b||{},b.content=a||"";var d=new S["default"](this,b);return this.addChild(d),d.on("dispose",function(){c.removeChild(d)}),d.open()},b.getTagSettings=function(a){var b={sources:[],tracks:[]},c=r.getElAttributes(a),d=c["data-setup"];if(r.hasElClass(a,"vjs-fluid")&&(c.fluid=!0),null!==d){var e=(0,L["default"])(d||"{}"),f=e[0],g=e[1];f&&z["default"].error(f),(0,M.assign)(c,g)}if((0,M.assign)(b,c),a.hasChildNodes())for(var h=a.childNodes,i=0,j=h.length;i<j;i++){var k=h[i],l=k.nodeName.toLowerCase();"source"===l?b.sources.push(r.getElAttributes(k)):"track"===l&&b.tracks.push(r.getElAttributes(k))}return b},b.prototype.flexNotSupported_=function(){var a=l["default"].createElement("i");return!("flexBasis"in a.style||"webkitFlexBasis"in a.style||"mozFlexBasis"in a.style||"msFlexBasis"in a.style||"msFlexOrder"in a.style)},b}(j["default"]);$.players={};var _=n["default"].navigator;$.prototype.options_={techOrder:["hls","html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:_&&(_.languages&&_.languages[0]||_.userLanguage||_.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(a){$.prototype[a]=function(){return this.techGet_(a)}}),Z.forEach(function(a){$.prototype["handleTech"+(0,B["default"])(a)+"_"]=function(){return this.trigger(a)}}),j["default"].registerComponent("Player",$),c["default"]=$},{1:1,4:4,41:41,44:44,45:45,46:46,5:5,50:50,55:55,59:59,60:60,61:61,62:62,63:63,68:68,69:69,71:71,76:76,78:78,79:79,8:8,81:81,82:82,83:83,85:85,86:86,87:87,88:88,89:89,90:90,91:91,94:94,95:95,97:97}],52:[function(a,b,c){"use strict";c.__esModule=!0;var d=a(51),e=function(a){return a&&a.__esModule?a:{"default":a}}(d),f=function(a,b){e["default"].prototype[a]=b};c["default"]=f},{51:51}],53:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(3),i=d(h),j=a(5),k=d(j),l=function(a){function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};e(this,b);var g=f(this,a.call(this,c,d));return g.update(),g}return g(b,a),b.prototype.update=function(){var a=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=a,this.addChild(a),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},b.prototype.createPopup=function(){},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b.prototype.buildCSSClass=function(){var b="vjs-menu-button";return!0===this.options_.inline?b+="-inline":b+="-popup","vjs-menu-button "+b+" "+a.prototype.buildCSSClass.call(this)},b}(i["default"]);k["default"].registerComponent("PopupButton",l),c["default"]=l},{3:3,5:5}],54:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=function(a){return a&&a.__esModule?a:{"default":a}}(h),j=a(81),k=d(j),l=a(83),m=d(l),n=a(82),o=d(n),p=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",m.bind(this,function(){this.unlockShowing()}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=k.createEl(b,{className:"vjs-menu-content"});var c=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return c.appendChild(this.contentEl_),o.on(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b}(i["default"]);i["default"].registerComponent("Popup",p),c["default"]=p},{5:5,81:81,82:82,83:83}],55:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=a(3),j=e(i),k=a(5),l=e(k),m=a(83),n=d(m),o=a(81),p=d(o),q=a(78),r=d(q),s=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.update(),c.on("posterchange",n.bind(e,e.update)),e}return h(b,a),b.prototype.dispose=function(){this.player().off("posterchange",this.update),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=p.createEl("div",{className:"vjs-poster",tabIndex:-1});return r.BACKGROUND_SIZE_SUPPORTED||(this.fallbackImg_=p.createEl("img"),a.appendChild(this.fallbackImg_)),a},b.prototype.update=function(a){var b=this.player().poster();this.setSrc(b),b?this.show():this.hide()},b.prototype.setSrc=function(a){if(this.fallbackImg_)this.fallbackImg_.src=a;else{var b="";a&&(b='url("'+a+'")'),this.el_.style.backgroundImage=b}},b.prototype.handleClick=function(a){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},b}(j["default"]);l["default"].registerComponent("PosterImage",s),c["default"]=s},{3:3,5:5,78:78,81:81,83:83}],56:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){b&&(p=b),n["default"].setTimeout(q,a)}c.__esModule=!0,c.hasLoaded=c.autoSetupTimeout=c.autoSetup=undefined;var g=a(81),h=e(g),i=a(82),j=e(i),k=a(94),l=d(k),m=a(95),n=d(m),o=!1,p=void 0,q=function(){if(h.isReal()){var a=l["default"].getElementsByTagName("video"),b=l["default"].getElementsByTagName("audio"),c=[];if(a&&a.length>0)for(var d=0,e=a.length;d<e;d++)c.push(a[d]);if(b&&b.length>0)for(var g=0,i=b.length;g<i;g++)c.push(b[g]);if(c&&c.length>0)for(var j=0,k=c.length;j<k;j++){var m=c[j];if(!m||!m.getAttribute){f(1);break}if(m.player===undefined){var n=m.getAttribute("data-setup");null!==n&&p(m)}}else o||f(1)}};h.isReal()&&"complete"===l["default"].readyState?o=!0:j.one(n["default"],"load",function(){o=!0});var r=function(){return o};c.autoSetup=q,c.autoSetupTimeout=f,c.hasLoaded=r},{81:81,82:82,94:94,95:95}],57:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a(5),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=a(81),j=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(i),k=a(88),l=function(a){function b(c,f){d(this,b);var g=e(this,a.call(this,c,f));return g.bar=g.getChild(g.options_.barName),g.vertical(!!g.options_.vertical),g.on("mousedown",g.handleMouseDown),g.on("touchstart",g.handleMouseDown),g.on("focus",g.handleFocus),g.on("blur",g.handleBlur),g.on("click",g.handleClick),g.on(c,"controlsvisible",g.update),g.on(c,g.playerEvent,g.update),g}return f(b,a),b.prototype.createEl=function(b){var c=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},d=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return c.className=c.className+" vjs-slider",c=(0,k.assign)({tabIndex:0},c),d=(0,k.assign)({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},d),a.prototype.createEl.call(this,b,c,d)},b.prototype.handleMouseDown=function(a){var b=this.bar.el_.ownerDocument;a.preventDefault(),j.blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(b,"mousemove",this.handleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchmove",this.handleMouseMove),this.on(b,"touchend",this.handleMouseUp),this.handleMouseMove(a)},b.prototype.handleMouseMove=function(a){},b.prototype.handleMouseUp=function(){var a=this.bar.el_.ownerDocument;j.unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(a,"mousemove",this.handleMouseMove),this.off(a,"mouseup",this.handleMouseUp),this.off(a,"touchmove",this.handleMouseMove),this.off(a,"touchend",this.handleMouseUp),this.update()},b.prototype.update=function(){if(this.el_){var a=this.getPercent(),b=this.bar;if(b){("number"!=typeof a||a!==a||a<0||a===Infinity)&&(a=0);var c=(100*a).toFixed(2)+"%";this.vertical()?b.el().style.height=c:b.el().style.width=c}}},b.prototype.calculateDistance=function(a){var b=j.getPointerPosition(this.el_,a);return this.vertical()?b.y:b.x},b.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepBack()):38!==a.which&&39!==a.which||(a.preventDefault(),this.stepForward())},b.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleClick=function(a){a.stopImmediatePropagation(),a.preventDefault()},b.prototype.vertical=function(a){return a===undefined?this.vertical_||!1:(this.vertical_=!!a,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},b}(h["default"]);h["default"].registerComponent("Slider",l),c["default"]=l},{5:5,81:81,88:88}],58:[function(a,b,c){"use strict";function d(a){return a.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},a.streamFromParts=function(a,b){return a+"&"+b},a.streamToParts=function(a){var b={connection:"",stream:""};if(!a)return b;var c=a.search(/&(?!\w+=)/),d=void 0;return-1!==c?d=c+1:0===(c=d=a.lastIndexOf("/")+1)&&(c=d=a.length),b.connection=a.substring(0,c),b.stream=a.substring(d,a.length),b},a.isStreamingType=function(b){return b in a.streamingFormats},a.RTMP_RE=/^rtmp[set]?:\/\//i,a.isStreamingSrc=function(b){return a.RTMP_RE.test(b)},a.rtmpSourceHandler={},a.rtmpSourceHandler.canPlayType=function(b){return a.isStreamingType(b)?"maybe":""},a.rtmpSourceHandler.canHandleSource=function(b,c){var d=a.rtmpSourceHandler.canPlayType(b.type);return d||(a.isStreamingSrc(b.src)?"maybe":"")},a.rtmpSourceHandler.handleSource=function(b,c,d){var e=a.streamToParts(b.src);c.setRtmpConnection(e.connection),c.setRtmpStream(e.stream)},a.registerSourceHandler(a.rtmpSourceHandler),a}c.__esModule=!0,c["default"]=d},{}],59:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){z[a]=function(){return this.el_.vjs_getProperty(a)}}c.__esModule=!0;for(var j=a(62),k=e(j),l=a(81),m=d(l),n=a(92),o=d(n),p=a(90),q=a(58),r=e(q),s=a(5),t=e(s),u=a(95),v=e(u),w=a(88),x=v["default"].navigator,y=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return c.source&&e.ready(function(){this.setSource(c.source)},!0),c.startTime&&e.ready(function(){this.load(),this.play(),this.currentTime(c.startTime)},!0),v["default"].videojs=v["default"].videojs||{},v["default"].videojs.Flash=v["default"].videojs.Flash||{},v["default"].videojs.Flash.onReady=b.onReady,v["default"].videojs.Flash.onEvent=b.onEvent,v["default"].videojs.Flash.onError=b.onError,e.on("seeked",function(){this.lastSeekTarget_=undefined}),e}return h(b,a),b.prototype.createEl=function(){var a=this.options_;if(!a.swf){a.swf="//vjs.zencdn.net/swf/5.4.1/video-js.swf"}var c=a.techId,d=(0,w.assign)({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.preload,loop:a.loop,muted:a.muted},a.flashVars),e=(0,w.assign)({wmode:"opaque",bgcolor:"#000000"},a.params),f=(0,w.assign)({id:c,name:c,"class":"vjs-tech"},a.attributes);return this.el_=b.embed(a.swf,d,e,f),this.el_.tech=this,this.el_},b.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},b.prototype.pause=function(){this.el_.vjs_pause()},b.prototype.src=function(a){return a===undefined?this.currentSrc():this.setSrc(a)},b.prototype.setSrc=function(a){var b=this;a=o.getAbsoluteURL(a),this.el_.vjs_src(a),this.autoplay()&&this.setTimeout(function(){return b.play()},0)},b.prototype.seeking=function(){return this.lastSeekTarget_!==undefined},b.prototype.setCurrentTime=function(b){var c=this.seekable();c.length&&(b=b>c.start(0)?b:c.start(0),b=b<c.end(c.length-1)?b:c.end(c.length-1),this.lastSeekTarget_=b,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",b),a.prototype.setCurrentTime.call(this))},b.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},b.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},b.prototype.duration=function(){if(0===this.readyState())return NaN;var a=this.el_.vjs_getProperty("duration");return a>=0?a:Infinity},b.prototype.load=function(){this.el_.vjs_load()},b.prototype.poster=function(){this.el_.vjs_getProperty("poster")},b.prototype.setPoster=function(){},b.prototype.seekable=function(){var a=this.duration();return 0===a?(0,p.createTimeRange)():(0,p.createTimeRange)(0,a)},b.prototype.buffered=function(){var a=this.el_.vjs_getProperty("buffered");
34return 0===a.length?(0,p.createTimeRange)():(0,p.createTimeRange)(a[0][0],a[0][1])},b.prototype.supportsFullScreen=function(){return!1},b.prototype.enterFullScreen=function(){return!1},b.prototype.getVideoPlaybackQuality=function(){var a=this.el_.vjs_getProperty("getVideoPlaybackQuality");return v["default"].performance&&"function"==typeof v["default"].performance.now?a.creationTime=v["default"].performance.now():v["default"].performance&&v["default"].performance.timing&&"number"==typeof v["default"].performance.timing.navigationStart&&(a.creationTime=v["default"].Date.now()-v["default"].performance.timing.navigationStart),a},b}(k["default"]),z=y.prototype,A="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),B="networkState,readyState,initialTime,startOffsetTime,paused,ended,videoWidth,videoHeight".split(","),C=0;C<A.length;C++)i(A[C]),function(a){var b=a.charAt(0).toUpperCase()+a.slice(1);z["set"+b]=function(b){return this.el_.vjs_setProperty(a,b)}}(A[C]);for(var D=0;D<B.length;D++)i(B[D]);y.isSupported=function(){return y.version()[0]>=10},k["default"].withSourceHandlers(y),y.nativeSourceHandler={},y.nativeSourceHandler.canPlayType=function(a){return a in y.formats?"maybe":""},y.nativeSourceHandler.canHandleSource=function(a,b){var c=void 0;return c=a.type?a.type.replace(/;.*/,"").toLowerCase():function(a){var b=o.getFileExtension(a);return b?"video/"+b:""}(a.src),y.nativeSourceHandler.canPlayType(c)},y.nativeSourceHandler.handleSource=function(a,b,c){b.setSrc(a.src)},y.nativeSourceHandler.dispose=function(){},y.registerSourceHandler(y.nativeSourceHandler),y.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},y.onReady=function(a){var b=m.getEl(a),c=b&&b.tech;c&&c.el()&&y.checkReady(c)},y.checkReady=function(a){a.el()&&(a.el().vjs_getProperty?a.triggerReady():this.setTimeout(function(){y.checkReady(a)},50))},y.onEvent=function(a,b){var c=m.getEl(a).tech,d=Array.prototype.slice.call(arguments,2);c.setTimeout(function(){c.trigger(b,d)},1)},y.onError=function(a,b){var c=m.getEl(a).tech;if("srcnotfound"===b)return c.error(4);c.error("FLASH: "+b)},y.version=function(){var a="0,0,0";try{a=new v["default"].ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{x.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(x.plugins["Shockwave Flash 2.0"]||x.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(c){}}return a.split(",")},y.embed=function(a,b,c,d){var e=y.getEmbedCode(a,b,c,d);return m.createEl("div",{innerHTML:e}).childNodes[0]},y.getEmbedCode=function(a,b,c,d){var e="",f="",g="";return b&&Object.getOwnPropertyNames(b).forEach(function(a){e+=a+"="+b[a]+"&amp;"}),c=(0,w.assign)({movie:a,flashvars:e,allowScriptAccess:"always",allowNetworking:"all"},c),Object.getOwnPropertyNames(c).forEach(function(a){f+='<param name="'+a+'" value="'+c[a]+'" />'}),d=(0,w.assign)({data:a,width:"100%",height:"100%"},d),Object.getOwnPropertyNames(d).forEach(function(a){g+=a+'="'+d[a]+'" '}),'<object type="application/x-shockwave-flash" '+g+">"+f+"</object>"},(0,r["default"])(y),t["default"].registerComponent("Flash",y),k["default"].registerTech("Flash",y),c["default"]=y},{5:5,58:58,62:62,81:81,88:88,90:90,92:92,95:95}],60:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=function(a,b){return a.raw=b,a}(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]),j=a(62),k=e(j),l=a(5),m=e(l),n=a(81),o=d(n),p=a(92),q=d(p),r=a(83),s=d(r),t=a(86),u=e(t),v=a(98),w=e(v),x=a(78),y=d(x),z=a(94),A=e(z),B=a(95),C=e(B),D=a(88),E=a(87),F=e(E),G=a(91),H=e(G),I=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d)),h=c.source,j=!1;if(h&&(e.el_.currentSrc!==h.src||c.tag&&3===c.tag.initNetworkState_)?e.setSource(h):e.handleLateInit_(e.el_),e.el_.hasChildNodes()){for(var k=e.el_.childNodes,l=k.length,m=[];l--;){var n=k[l];"track"===n.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().addTrackElement_(n),e.remoteTextTracks().addTrack_(n.track),j||e.el_.hasAttribute("crossorigin")||!q.isCrossOrigin(n.src)||(j=!0)):m.push(n))}for(var o=0;o<m.length;o++)e.el_.removeChild(m[o])}
vendor: 1,959 bytes, line 34
34return["audio","video"].forEach(function(a){var b=e.el()[a+"Tracks"],c=e[a+"Tracks"](),d=(0,H["default"])(a);e["featuresNative"+d+"Tracks"]&&b&&b.addEventListener&&(e["handle"+d+"TrackChange_"]=function(a){c.trigger({type:"change",target:c,currentTarget:c,srcElement:c})},e["handle"+d+"TrackAdd_"]=function(a){return c.addTrack(a.track)},e["handle"+d+"TrackRemove_"]=function(a){return c.removeTrack(a.track)},b.addEventListener("change",e["handle"+d+"TrackChange_"]),b.addEventListener("addtrack",e["handle"+d+"TrackAdd_"]),b.addEventListener("removetrack",e["handle"+d+"TrackRemove_"]),e["removeOld"+d+"Tracks_"]=function(a){return e.removeOldTracks_(c,b)},e.on("loadstart",e["removeOld"+d+"Tracks_"]))}),e.featuresNativeTextTracks&&(j&&u["default"].warn((0,w["default"])(i)),e.handleTextTrackChange_=s.bind(e,e.handleTextTrackChange),e.handleTextTrackAdd_=s.bind(e,e.handleTextTrackAdd),e.handleTextTrackRemove_=s.bind(e,e.handleTextTrackRemove),e.proxyNativeTextTracks_()),(y.TOUCH_ENABLED||y.IS_IPHONE||y.IS_NATIVE_ANDROID)&&!0===c.nativeControlsForTouch&&e.setControls(!0),e.proxyWebkitFullscreen_(),e.triggerReady(),e}return h(b,a),b.prototype.dispose=function(){var c=this;["audio","video","text"].forEach(function(a){var b=(0,H["default"])(a),d=c.el_[a+"Tracks"];d&&d.removeEventListener&&(d.removeEventListener("change",c["handle"+b+"TrackChange_"]),d.removeEventListener("addtrack",c["handle"+b+"TrackAdd_"]),d.removeEventListener("removetrack",c["handle"+b+"TrackRemove_"])),d&&c.off("loadstart",c["removeOld"+b+"Tracks_"])}),b.disposeMediaElement(this.el_),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=this.options_.tag;if(!a||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(a){var c=a.cloneNode(!0);a.parentNode&&a.parentNode.insertBefore(c,a),b.disposeMediaElement(a),a=c}else{a=A["default"].createElement("video");var d=this.options_.tag&&o.getElAttributes(this.options_.tag),e=(0,F["default"])({},d);
34y.TOUCH_ENABLED&&!0===this.options_.nativeControlsForTouch||delete e.controls,o.setElAttributes(a,(0,D.assign)(e,{id:this.options_.techId,"class":"vjs-tech"}))}a.playerId=this.options_.playerId}for(var f=["autoplay","preload","loop","muted","playsinline"],g=f.length-1;g>=0;g--){var h=f[g],i={};"undefined"!=typeof this.options_[h]&&(i[h]=this.options_[h]),o.setElAttributes(a,i)}return a},b.prototype.handleLateInit_=function(a){if(0!==a.networkState&&3!==a.networkState){if(0===a.readyState){var b=!1,c=function(){b=!0};this.on("loadstart",c);var d=function(){b||this.trigger("loadstart")};return this.on("loadedmetadata",d),void this.ready(function(){this.off("loadstart",c),this.off("loadedmetadata",d),b||this.trigger("loadstart")})}var e=["loadstart"];e.push("loadedmetadata"),a.readyState>=2&&e.push("loadeddata"),a.readyState>=3&&e.push("canplay"),a.readyState>=4&&e.push("canplaythrough"),this.ready(function(){e.forEach(function(a){this.trigger(a)},this)})}},b.prototype.proxyNativeTextTracks_=function(){var a=this.el().textTracks;if(a){for(var b=0;b<a.length;b++)this.textTracks().addTrack_(a[b]);a.addEventListener&&(a.addEventListener("change",this.handleTextTrackChange_),a.addEventListener("addtrack",this.handleTextTrackAdd_),a.addEventListener("removetrack",this.handleTextTrackRemove_)),this.on("loadstart",this.removeOldTextTracks_)}},b.prototype.handleTextTrackChange=function(a){var b=this.textTracks();this.textTracks().trigger({type:"change",target:b,currentTarget:b,srcElement:b})},b.prototype.handleTextTrackAdd=function(a){this.textTracks().addTrack_(a.track)},b.prototype.handleTextTrackRemove=function(a){this.textTracks().removeTrack_(a.track)},b.prototype.removeOldTracks_=function(a,b){var c=[];if(b){for(var d=0;d<a.length;d++){for(var e=a[d],f=!1,g=0;g<b.length;g++)if(b[g]===e){f=!0;break}f||c.push(e)}for(var h=0;h<c.length;h++){var i=c[h];a.removeTrack_(i)}}},b.prototype.removeOldTextTracks_=function(a){var b=this.textTracks(),c=this.el().textTracks;this.removeOldTracks_(b,c)},b.prototype.play=function(){var a=this.el_.play();a!==undefined&&"function"==typeof a.then&&a.then(null,function(a){})},b.prototype.setCurrentTime=function(a){try{this.el_.currentTime=a}catch(b){(0,u["default"])(b,"Video is not ready. (Video.js)")}},b.prototype.duration=function(){var a=this;if(this.el_.duration===Infinity&&y.IS_ANDROID&&y.IS_CHROME&&0===this.el_.currentTime){var b=function c(){a.el_.currentTime>0&&(a.el_.duration===Infinity&&a.trigger("durationchange"),a.off("timeupdate",c))};return this.on("timeupdate",b),NaN}return this.el_.duration||NaN},b.prototype.width=function(){return this.el_.offsetWidth},b.prototype.height=function(){return this.el_.offsetHeight},b.prototype.proxyWebkitFullscreen_=function(){var a=this;if("webkitDisplayingFullscreen"in this.el_){var b=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},c=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",b),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",c),this.on("dispose",function(){a.off("webkitbeginfullscreen",c),a.off("webkitendfullscreen",b)})}},b.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var a=C["default"].navigator&&C["default"].navigator.userAgent||"";if(/Android/.test(a)||!/Chrome|Mac OS X 10.5/.test(a))return!0}return!1},b.prototype.enterFullScreen=function(){var a=this.el_;a.paused&&a.networkState<=a.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){a.pause(),a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()},b.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},b.prototype.src=function(a){if(a===undefined)return this.el_.src;this.setSrc(a)},b.prototype.reset=function(){b.resetMediaElement(this.el_)},b.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},b.prototype.setControls=function(a){this.el_.controls=!!a},b.prototype.addTextTrack=function(b,c,d){return this.featuresNativeTextTracks?this.el_.addTextTrack(b,c,d):a.prototype.addTextTrack.call(this,b,c,d)},b.prototype.createRemoteTextTrack=function(b){if(!this.featuresNativeTextTracks)return a.prototype.createRemoteTextTrack.call(this,b);var c=A["default"].createElement("track");return b.kind&&(c.kind=b.kind),b.label&&(c.label=b.label),(b.language||b.srclang)&&(c.srclang=b.language||b.srclang),b["default"]&&(c["default"]=b["default"]),b.id&&(c.id=b.id),b.src&&(c.src=b.src),c},b.prototype.addRemoteTextTrack=function(b,c){var d=a.prototype.addRemoteTextTrack.call(this,b,c);return this.featuresNativeTextTracks&&this.el().appendChild(d),d},b.prototype.removeRemoteTextTrack=function(b){if(a.prototype.removeRemoteTextTrack.call(this,b),this.featuresNativeTextTracks)for(var c=this.$$("track"),d=c.length;d--;)b!==c[d]&&b!==c[d].track||this.el().removeChild(c[d])},b.prototype.playsinline=function(){return this.el_.hasAttribute("playsinline")},b.prototype.setPlaysinline=function(a){a?this.el_.setAttribute("playsinline","playsinline"):this.el_.removeAttribute("playsinline")},b.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var a={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(a.droppedVideoFrames=this.el().webkitDroppedFrameCount,a.totalVideoFrames=this.el().webkitDecodedFrameCount),C["default"].performance&&"function"==typeof C["default"].performance.now?a.creationTime=C["default"].performance.now():C["default"].performance&&C["default"].performance.timing&&"number"==typeof C["default"].performance.timing.navigationStart&&(a.creationTime=C["default"].Date.now()-C["default"].performance.timing.navigationStart),a},b}(k["default"]);
vendor: 5,796 bytes, line 34
34if(o.isReal()){I.TEST_VID=A["default"].createElement("video");var J=A["default"].createElement("track");J.kind="captions",J.srclang="en",J.label="English",I.TEST_VID.appendChild(J)}I.isSupported=function(){try{I.TEST_VID.volume=.5}catch(a){return!1}return!(!I.TEST_VID||!I.TEST_VID.canPlayType)},I.canControlVolume=function(){try{var a=I.TEST_VID.volume;return I.TEST_VID.volume=a/2+.1,a!==I.TEST_VID.volume}catch(b){return!1}},I.canControlPlaybackRate=function(){if(y.IS_ANDROID&&y.IS_CHROME&&y.CHROME_VERSION<58)return!1;try{var a=I.TEST_VID.playbackRate;return I.TEST_VID.playbackRate=a/2+.1,a!==I.TEST_VID.playbackRate}catch(b){return!1}},I.supportsNativeTextTracks=function(){return y.IS_ANY_SAFARI},I.supportsNativeVideoTracks=function(){return!(!I.TEST_VID||!I.TEST_VID.videoTracks)},I.supportsNativeAudioTracks=function(){return!(!I.TEST_VID||!I.TEST_VID.audioTracks)},I.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],I.prototype.featuresVolumeControl=I.canControlVolume(),I.prototype.featuresPlaybackRate=I.canControlPlaybackRate(),I.prototype.movingMediaElementInDOM=!y.IS_IOS,I.prototype.featuresFullscreenResize=!0,I.prototype.featuresProgressEvents=!0,I.prototype.featuresTimeupdateEvents=!0,I.prototype.featuresNativeTextTracks=I.supportsNativeTextTracks(),I.prototype.featuresNativeVideoTracks=I.supportsNativeVideoTracks(),I.prototype.featuresNativeAudioTracks=I.supportsNativeAudioTracks();var K=I.TEST_VID&&I.TEST_VID.constructor.prototype.canPlayType,L=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,M=/^video\/mp4/i;I.patchCanPlayType=function(){y.ANDROID_VERSION>=4&&!y.IS_FIREFOX?I.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&L.test(a)?"maybe":K.call(this,a)}:y.IS_OLD_ANDROID&&(I.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&M.test(a)?"maybe":K.call(this,a)})},I.unpatchCanPlayType=function(){var a=I.TEST_VID.constructor.prototype.canPlayType;return I.TEST_VID.constructor.prototype.canPlayType=K,a},I.patchCanPlayType(),I.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src"),"function"==typeof a.load&&function(){try{a.load()}catch(b){}}()}},I.resetMediaElement=function(a){if(a){for(var b=a.querySelectorAll("source"),c=b.length;c--;)a.removeChild(b[c]);a.removeAttribute("src"),"function"==typeof a.load&&function(){try{a.load()}catch(b){}}()}},["paused","currentTime","buffered","volume","muted","poster","preload","autoplay","controls","loop","error","seeking","seekable","ended","defaultMuted","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(a){I.prototype[a]=function(){return this.el_[a]}}),["volume","muted","src","poster","preload","autoplay","loop","playbackRate"].forEach(function(a){I.prototype["set"+(0,H["default"])(a)]=function(b){this.el_[a]=b}}),["pause","load"].forEach(function(a){I.prototype[a]=function(){return this.el_[a]()}}),k["default"].withSourceHandlers(I),I.nativeSourceHandler={},I.nativeSourceHandler.canPlayType=function(a){try{return I.TEST_VID.canPlayType(a)}catch(b){return""}},I.nativeSourceHandler.canHandleSource=function(a,b){if(a.type)return I.nativeSourceHandler.canPlayType(a.type);if(a.src){var c=q.getFileExtension(a.src);return I.nativeSourceHandler.canPlayType("video/"+c)}return""},I.nativeSourceHandler.handleSource=function(a,b,c){b.setSrc(a.src)},I.nativeSourceHandler.dispose=function(){},I.registerSourceHandler(I.nativeSourceHandler),m["default"].registerComponent("Html5",I),k["default"].registerTech("Html5",I),c["default"]=I},{5:5,62:62,78:78,81:81,83:83,86:86,87:87,88:88,91:91,92:92,94:94,95:95,98:98}],61:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(5),i=d(h),j=a(62),k=d(j),l=a(91),m=d(l),n=function(a){function b(c,d,g){e(this,b);var h=f(this,a.call(this,c,d,g));if(d.playerOptions.sources&&0!==d.playerOptions.sources.length)c.src(d.playerOptions.sources);else for(var j=0,l=d.playerOptions.techOrder;j<l.length;j++){var n=(0,m["default"])(l[j]),o=k["default"].getTech(n);if(n||(o=i["default"].getComponent(n)),o&&o.isSupported()){c.loadTech_(n);break}}return h}return g(b,a),b}(i["default"]);i["default"].registerComponent("MediaLoader",n),c["default"]=n},{5:5,62:62,91:91}],62:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a,b,c,d){var e=arguments.length>
344&&arguments[4]!==undefined?arguments[4]:{},f=a.textTracks();e.kind=b,c&&(e.label=c),d&&(e.language=d),e.tech=a;var g=new r["default"](e);return f.addTrack_(g),g}c.__esModule=!0;var i=a(5),j=d(i),k=a(66),l=d(k),m=a(65),n=d(m),o=a(87),p=d(o),q=a(72),r=d(q),s=a(70),t=d(s),u=a(76),v=d(u),w=a(63),x=d(w),y=a(83),z=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(y),A=a(86),B=d(A),C=a(90),D=a(79),E=a(46),F=d(E),G=a(95),H=d(G),I=a(94),J=d(I),K=a(88),L=function(b){function c(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){};e(this,c),a.reportTouchActivity=!1;var g=f(this,b.call(this,null,a,d));return g.hasStarted_=!1,g.on("playing",function(){this.hasStarted_=!0}),g.on("loadstart",function(){this.hasStarted_=!1}),g.textTracks_=a.textTracks,g.videoTracks_=a.videoTracks,g.audioTracks_=a.audioTracks,g.featuresProgressEvents||g.manualProgressOn(),g.featuresTimeupdateEvents||g.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(b){!1===a["native"+b+"Tracks"]&&(g["featuresNative"+b+"Tracks"]=!1)}),!1===a.nativeCaptions&&(g.featuresNativeTextTracks=!1),g.featuresNativeTextTracks||g.emulateTextTracks(),g.autoRemoteTextTracks_=new t["default"],g.initTextTrackListeners(),g.initTrackListeners(),a.nativeControlsForTouch||g.emitTapEvents(),g.constructor&&(g.name_=g.constructor.name||"Unknown Tech"),g}return g(c,b),c.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},c.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},c.prototype.trackProgress=function(a){this.stopTrackingProgress(),this.progressInterval=this.setInterval(z.bind(this,function(){var a=this.bufferedPercent();this.bufferedPercent_!==a&&this.trigger("progress"),this.bufferedPercent_=a,1===a&&this.stopTrackingProgress()}),500)},c.prototype.onDurationChange=function(a){this.duration_=this.duration()},c.prototype.buffered=function(){return(0,C.createTimeRange)(0,0)},c.prototype.bufferedPercent=function(){return(0,D.bufferedPercent)(this.buffered(),this.duration_)},c.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},c.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},c.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},c.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},c.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},c.prototype.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),b.prototype.dispose.call(this)},c.prototype.clearTracks=function(a){var b=this;a=[].concat(a),a.forEach(function(a){for(var c=b[a+"Tracks"]()||[],d=c.length;d--;){var e=c[d];"text"===a&&b.removeRemoteTextTrack(e),c.removeTrack_(e)}})},c.prototype.cleanupAutoTextTracks=function(){for(var a=this.autoRemoteTextTracks_||[],b=a.length;b--;){var c=a[b];this.removeRemoteTextTrack(c)}},c.prototype.reset=function(){},c.prototype.error=function(a){return a!==undefined&&(this.error_=new F["default"](a),this.trigger("error")),this.error_},c.prototype.played=function(){return this.hasStarted_?(0,C.createTimeRange)(0,0):(0,C.createTimeRange)()},c.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},c.prototype.initTextTrackListeners=function(){var a=z.bind(this,function(){this.trigger("texttrackchange")}),b=this.textTracks();b&&(b.addEventListener("removetrack",a),b.addEventListener("addtrack",a),this.on("dispose",z.bind(this,function(){b.removeEventListener("removetrack",a),b.removeEventListener("addtrack",a)})))},c.prototype.initTrackListeners=function(){var a=this;["video","audio"].forEach(function(b){var c=function(){a.trigger(b+"trackchange")},d=a[b+"Tracks"]();d.addEventListener("removetrack",c),d.addEventListener("addtrack",c),a.on("dispose",function(){d.removeEventListener("removetrack",c),d.removeEventListener("addtrack",c)})})},c.prototype.addWebVttScript_=function(){var b=this;if(!H["default"].WebVTT)if(J["default"].body.contains(this.el())){var c=a(99);if(!this.options_["vtt.js"]&&(0,K.isPlain)(c)&&Object.keys(c).length>0)return void this.trigger("vttjsloaded");var d=J["default"].createElement("script");d.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",d.onload=function(){b.trigger("vttjsloaded")},d.onerror=function(){b.trigger("vttjserror")},this.on("dispose",function(){d.onload=null,d.onerror=null}),H["default"].WebVTT=!0,this.el().parentNode.appendChild(d)}else this.ready(this.addWebVttScript_)},c.prototype.emulateTextTracks=function(){var a=this,b=this.textTracks();if(b){var c=this.remoteTextTracks(),d=function(a){return b.addTrack_(a.track)},e=function(a){return b.removeTrack_(a.track)};c.on("addtrack",d),c.on("removetrack",e),this.addWebVttScript_();var f=function(){return a.trigger("texttrackchange")},g=function(){f();for(var a=0;a<b.length;a++){var c=b[a];c.removeEventListener("cuechange",f),"showing"===c.mode&&c.addEventListener("cuechange",f)}};g(),b.addEventListener("change",g),b.addEventListener("addtrack",g),b.addEventListener("removetrack",g),this.on("dispose",function(){c.off("addtrack",d),c.off("removetrack",e),b.removeEventListener("change",g),b.removeEventListener("addtrack",g),b.removeEventListener("removetrack",g);for(var a=0;a<b.length;a++){b[a].removeEventListener("cuechange",f)}})}},c.prototype.videoTracks=function(){return this.videoTracks_=this.videoTracks_||new v["default"],this.videoTracks_},c.prototype.audioTracks=function(){return this.audioTracks_=this.audioTracks_||new x["default"],this.audioTracks_},c.prototype.textTracks=function(){return this.textTracks_=this.textTracks_||new t["default"],this.textTracks_},c.prototype.remoteTextTracks=function(){return this.remoteTextTracks_=this.remoteTextTracks_||new t["default"],this.remoteTextTracks_},c.prototype.remoteTextTrackEls=function(){return this.remoteTextTrackEls_=this.remoteTextTrackEls_||new n["default"],this.remoteTextTrackEls_},c.prototype.addTextTrack=function(a,b,c){if(!a)throw new Error("TextTrack kind is required but was not provided");return h(this,a,b,c)},c.prototype.createRemoteTextTrack=function(a){var b=(0,p["default"])(a,{tech:this});return new l["default"](b)},c.prototype.addRemoteTextTrack=function(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},b=arguments[1],c=this.createRemoteTextTrack(a);return!0!==b&&!1!==b&&(B["default"].warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),b=!0),this.remoteTextTrackEls().addTrackElement_(c),this.remoteTextTracks().addTrack_(c.track),!0!==b&&this.autoRemoteTextTracks_.addTrack_(c.track),c},c.prototype.removeRemoteTextTrack=function(a){var b=this.remoteTextTrackEls().getTrackElementByTrack_(a);this.remoteTextTrackEls().removeTrackElement_(b),this.remoteTextTracks().removeTrack_(a),this.autoRemoteTextTracks_.removeTrack_(a)},c.prototype.getVideoPlaybackQuality=function(){return{}},c.prototype.setPoster=function(){},c.prototype.playsinline=function(){},c.prototype.setPlaysinline=function(){},c.prototype.canPlayType=function(){return""},c.isTech=function(a){return a.prototype instanceof c||a instanceof c||a===c},c.registerTech=function(a,b){if(c.techs_||(c.techs_={}),!c.isTech(b))throw new Error("Tech "+a+" must be a Tech");return c.techs_[a]=b,b},c.getTech=function(a){return c.techs_&&c.techs_[a]?c.techs_[a]:H["default"]&&H["default"].videojs&&H["default"].videojs[a]?(B["default"].warn("The "+a+" tech w
34as added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),H["default"].videojs[a]):void 0},c}(j["default"]);L.prototype.textTracks_,L.prototype.audioTracks_,L.prototype.videoTracks_,L.prototype.featuresVolumeControl=!0,L.prototype.featuresFullscreenResize=!1,L.prototype.featuresPlaybackRate=!1,L.prototype.featuresProgressEvents=!1,L.prototype.featuresTimeupdateEvents=!1,L.prototype.featuresNativeTextTracks=!1,L.withSourceHandlers=function(a){a.registerSourceHandler=function(b,c){var d=a.sourceHandlers;d||(d=a.sourceHandlers=[]),c===undefined&&(c=d.length),d.splice(c,0,b)},a.canPlayType=function(b){for(var c=a.sourceHandlers||[],d=void 0,e=0;e<c.length;e++)if(d=c[e].canPlayType(b))return d;return""},a.selectSourceHandler=function(b,c){for(var d=a.sourceHandlers||[],e=0;e<d.length;e++)if(d[e].canHandleSource(b,c))return d[e];return null},a.canPlaySource=function(b,c){var d=a.selectSourceHandler(b,c);return d?d.canHandleSource(b,c):""},["seekable","duration"].forEach(function(a){var b=this[a];"function"==typeof b&&(this[a]=function(){return this.sourceHandler_&&this.sourceHandler_[a]?this.sourceHandler_[a].apply(this.sourceHandler_,arguments):b.apply(this,arguments)})},a.prototype),a.prototype.setSource=function(b){var c=a.selectSourceHandler(b,this.options_);return c||(a.nativeSourceHandler?c=a.nativeSourceHandler:B["default"].error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),c!==a.nativeSourceHandler&&(this.currentSource_=b,this.off(this.el_,"loadstart",a.prototype.firstLoadStartListener_),this.off(this.el_,"loadstart",a.prototype.successiveLoadStartListener_),this.one(this.el_,"loadstart",a.prototype.firstLoadStartListener_)),this.sourceHandler_=c.handleSource(b,this,this.options_),this.on("dispose",this.disposeSourceHandler),this},a.prototype.firstLoadStartListener_=function(){this.one(this.el_,"loadstart",a.prototype.successiveLoadStartListener_)},a.prototype.successiveLoadStartListener_=function(){this.disposeSourceHandler(),this.one(this.el_,"loadstart",a.prototype.successiveLoadStartListener_)},a.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.off(this.el_,"loadstart",a.prototype.firstLoadStartListener_),this.off(this.el_,"loadstart",a.prototype.successiveLoadStartListener_),this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},j["default"].registerComponent("Tech",L),j["default"].registerComponent("MediaTechController",L),L.registerTech("Tech",L),c["default"]=L},{46:46,5:5,63:63,65:65,66:66,70:70,72:72,76:76,79:79,83:83,86:86,87:87,88:88,90:90,94:94,95:95,99:99}],63:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(74),i=d(h),j=a(78),k=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(j),l=a(94),m=d(l),n=function(a,b){for(var c=0;c<a.length;c++)b.id!==a[c].id&&(a[c].enabled=!1)},o=function(a){function b(){var c,d,g=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];e(this,b);for(var h=void 0,j=g.length-1;j>=0;j--)if(g[j].enabled){n(g,g[j]);break}if(k.IS_IE8){h=m["default"].createElement("custom");for(var l in i["default"].prototype)"constructor"!==l&&(h[l]=i["default"].prototype[l]);for(var o in b.prototype)"constructor"!==o&&(h[o]=b.prototype[o])}return h=c=f(this,a.call(this,g,h)),h.changing_=!1,d=h,f(c,d)}return g(b,a),b.prototype.addTrack_=function(b){var c=this;b.enabled&&n(this,b),a.prototype.addTrack_.call(this,b),b.addEventListener&&b.addEventListener("enabledchange",function(){c.changing_||(c.changing_=!0,n(c,b),c.changing_=!1,c.trigger("change"))})},b.prototype.addTrack=function(a){this.addTrack_(a)},b.prototype.removeTrack=function(b){a.prototype.removeTrack_.call(this,b)},b}(i["default"]);c["default"]=o},{74:74,78:78,94:94}],64:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(73),i=a(75),j=d(i),k=a(87),l=d(k),m=a(78),n=function(a){if
vendor: 9,837 bytes, line 34
34(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(m),o=function(a){function b(){var c,d,g=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};e(this,b);var i=(0,l["default"])(g,{kind:h.AudioTrackKind[g.kind]||""}),j=c=f(this,a.call(this,i)),k=!1;if(n.IS_IE8)for(var m in b.prototype)"constructor"!==m&&(j[m]=b.prototype[m]);return Object.defineProperty(j,"enabled",{get:function(){return k},set:function(a){"boolean"==typeof a&&a!==k&&(k=a,this.trigger("enabledchange"))}}),i.enabled&&(j.enabled=i.enabled),j.loaded_=!0,d=j,f(c,d)}return g(b,a),b}(j["default"]);c["default"]=o},{73:73,75:75,78:78,87:87}],65:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var e=a(78),f=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(e),g=a(94),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=function(){function a(){var b=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];d(this,a);var c=this;if(f.IS_IE8){c=h["default"].createElement("custom");for(var e in a.prototype)"constructor"!==e&&(c[e]=a.prototype[e])}c.trackElements_=[],Object.defineProperty(c,"length",{get:function(){return this.trackElements_.length}});for(var g=0,i=b.length;g<i;g++)c.addTrackElement_(b[g]);if(f.IS_IE8)return c}return a.prototype.addTrackElement_=function(a){var b=this.trackElements_.length;""+b in this||Object.defineProperty(this,b,{get:function(){return this.trackElements_[b]}}),-1===this.trackElements_.indexOf(a)&&this.trackElements_.push(a)},a.prototype.getTrackElementByTrack_=function(a){for(var b=void 0,c=0,d=this.trackElements_.length;c<d;c++)if(a===this.trackElements_[c].track){b=this.trackElements_[c];break}return b},a.prototype.removeTrackElement_=function(a){for(var b=0,c=this.trackElements_.length;b<c;b++)if(a===this.trackElements_[b]){this.trackElements_.splice(b,1);break}},a}();c["default"]=i},{78:78,94:94}],66:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(78),i=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(h),j=a(94),k=d(j),l=a(42),m=d(l),n=a(72),o=d(n),p=0,q=2,r=function(a){function b(){var c=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};e(this,b);var d=f(this,a.call(this)),g=void 0,h=d;if(i.IS_IE8){h=k["default"].createElement("custom");for(var j in b.prototype)"constructor"!==j&&(h[j]=b.prototype[j])}var l=new o["default"](c);if(h.kind=l.kind,h.src=l.src,h.srclang=l.language,h.label=l.label,h["default"]=l["default"],Object.defineProperty(h,"readyState",{get:function(){return g}}),Object.defineProperty(h,"track",{get:function(){return l}}),g=p,l.addEventListener("loadeddata",function(){g=q,h.trigger({type:"load",target:h})}),i.IS_IE8){var m;return m=h,f(d,m)}return d}return g(b,a),b}(m["default"]);r.prototype.allowedEvents_={load:"load"},r.NONE=p,r.LOADING=1,r.LOADED=q,r.ERROR=3,c["default"]=r},{42:42,72:72,78:78,94:94}],67:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var e=a(78),f=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(e),g=a(94),h=function(a){return a&&a.__esModule?a:{"default":a}}(g),i=function(){function a(b){d(this,a);var c=this;if(f.IS_IE8){c=h["default"].createElement("custom");for(var e in a.prototype)"constructor"!==e&&(c[e]=a.prototype[e])}if(a.prototype.setCues_.call(c,b),Object.defineProperty(c,"length",{get:function(){return this.length_}}),f.IS_IE8)return c}return a.prototype.setCues_=function(a){var b=this.length||0,c=0,d=a.length;this.cues_=a,this.length_=a.length;var e=function(a){""+a in this||Object.defineProperty(this,""+a,{get:function(){return this.cues_[a]}})};if(b<d)for(c=b;c<d;c++)e.call(this,c)},a.prototype.getCueById=function(a){for(var b=null,c=0,d=this.length;c<d;c++){var e=this[c];if(e.id===a){b=e;break}}return b},a}();c["default"]=i},{78:78,94:94}],68:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a,b){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+b+")"}function i(a,b,c){try{a.style[b]=c}catch(d){return}}c.__esModule=!0;var j=a(5),k=d(j),l=a(83),m=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(l),n=a(95),o=d(n),p={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'},q=function(a){function b(c,d,g){e(this,b);var h=f(this,a.call(this,c,d,g));return c.on("loadstart",m.bind(h,h.toggleDisplay)),c.on("texttrackchange",m.bind(h,h.updateDisplay)),c.ready(m.bind(h,function(){if(c.tech_&&c.tech_.featuresNativeTextTracks)return void this.hide();c.on("fullscreenchange",m.bind(this,this.updateDisplay));for(var a=this.options_.playerOptions.tracks||[],b=0;b<a.length;b++)this.player_.addRemoteTextTrack(a[b],!0);var d={captions:1,subtitles:1},e=this.player_.textTracks(),f=void 0,g=void 0;if(e){for(var h=0;h<e.length;h++){var i=e[h];i["default"]&&("descriptions"!==i.kind||f?i.kind in d&&!g&&(g=i):f=i)}g?g.mode="showing":f&&(f.mode="showing")}})),h}return g(b,a),b.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},b.prototype.clearDisplay=function(){"function"==typeof o["default"].WebVTT&&o["default"].WebVTT.processCues(o["default"],[],this.el_)},b.prototype.updateDisplay=function(){var a=this.player_.textTracks();if(this.clearDisplay(),a){for(var b=null,c=null,d=a.length;d--;){var e=a[d];"showing"===e.mode&&("descriptions"===e.kind?b=e:c=e)}c?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(c)):b&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(b))}},b.prototype.updateForTrack=function(a){if("function"==typeof o["default"].WebVTT&&a.activeCues){for(var b=this.player_.textTrackSettings.getValues(),c=[],d=0;d<a.activeCues.length;d++)c.push(a.activeCues[d]);o["default"].WebVTT.processCues(o["default"],c,this.el_);for(var e=c.length;e--;){var f=c[e];if(f){var g=f.displayState;if(b.color&&(g.firstChild.style.color=b.color),b.textOpacity&&i(g.firstChild,"color",h(b.color||"#fff",b.textOpacity)),b.backgroundColor&&(g.firstChild.style.backgroundColor=b.backgroundColor),b.backgroundOpacity&&i(g.firstChild,"backgroundColor",h(b.backgroundColor||"#000",b.backgroundOpacity)),b.windowColor&&(b.windowOpacity?i(g,"backgroundColor",h(b.windowColor,b.windowOpacity)):g.style.backgroundColor=b.windowColor),b.edgeStyle&&("dropshadow"===b.edgeStyle?g.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===b.edgeStyle?g.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===b.edgeStyle?g.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===b.edgeStyle&&(g.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),b.fontPercent&&1!==b.fontPercent){var j=o["default"].parseFloat(g.style.fontSize);g.style.fontSize=j*b.fontPercent+"px",g.style.height="auto",g.style.top="auto",g.style.bottom="2px"}b.fontFamily&&"default"!==b.fontFamily&&("small-caps"===b.fontFamily?g.firstChild.style.fontVariant="small-caps":g.firstChild.style.fontFamily=p[b.fontFamily])}}}},b}(k["default"]);k["default"].registerComponent("TextTrackDisplay",q),c["default"]=q},{5:5,83:83,95:95}],69:[function(a,b,c){"use strict";c.__esModule=!0;var d=function(a){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(b,c,d){return a[c]&&(b[c]=a[c]),b},{cues:a.cues&&Array.prototype.map.call(a.cues,function(a){return{startTime:a.startTime,endTime:a.endTime,text:a.text,id:a.id}})})}
34,e=function(a){var b=a.$$("track"),c=Array.prototype.map.call(b,function(a){return a.track});return Array.prototype.map.call(b,function(a){var b=d(a.track);return a.src&&(b.src=a.src),b}).concat(Array.prototype.filter.call(a.textTracks(),function(a){return-1===c.indexOf(a)}).map(d))},f=function(a,b){return a.forEach(function(a){var c=b.addRemoteTextTrack(a).track;!a.src&&a.cues&&a.cues.forEach(function(a){return c.addCue(a)})}),b.textTracks()};c["default"]={textTracksToJson:e,jsonToTextTracks:f,trackToJson_:d}},{}],70:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=a(74),j=e(i),k=a(83),l=d(k),m=a(78),n=d(m),o=a(94),p=e(o),q=function(a){function b(){var c,d,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];f(this,b);var h=void 0;if(n.IS_IE8){h=p["default"].createElement("custom");for(var i in j["default"].prototype)"constructor"!==i&&(h[i]=j["default"].prototype[i]);for(var k in b.prototype)"constructor"!==k&&(h[k]=b.prototype[k])}return h=c=g(this,a.call(this,e,h)),d=h,g(c,d)}return h(b,a),b.prototype.addTrack_=function(b){a.prototype.addTrack_.call(this,b),b.addEventListener("modechange",l.bind(this,function(){this.trigger("change")}))},b}(j["default"]);c["default"]=q},{74:74,78:78,83:83,94:94}],71:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b){if(b&&(a=b(a)),a&&"none"!==a)return a}function j(a,b){return i(a.options[a.options.selectedIndex].value,b)}function k(a,b,c){if(b)for(var d=0;d<a.options.length;d++)if(i(a.options[d].value,c)===b){a.selectedIndex=d;break}}c.__esModule=!0;var l=a(95),m=e(l),n=a(5),o=e(n),p=a(81),q=a(83),r=d(q),s=a(88),t=d(s),u=a(86),v=e(u),w=["#000","Black"],x=["#00F","Blue"],y=["#0FF","Cyan"],z=["#0F0","Green"],A=["#F0F","Magenta"],B=["#F00","Red"],C=["#FFF","White"],D=["#FF0","Yellow"],E=["1","Opaque"],F=["0.5","Semi-Transparent"],G=["0","Transparent"],H={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[w,C,B,z,x,D,A,y]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[E,F,G]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[C,w,B,z,x,D,A,y]},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(a){return"1.00"===a?null:Number(a)}},textOpacity:{selector:".vjs-text-opacity >
34 select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[E,F]},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:[G,F,E]}};H.windowColor.options=H.backgroundColor.options;var I=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.setDefaults(),e.hide(),e.updateDisplay=r.bind(e,e.updateDisplay),d.persistTextTrackSettings===undefined&&(e.options_.persistTextTrackSettings=e.options_.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",function(){e.saveSettings(),e.hide()}),e.on(e.$(".vjs-default-button"),"click",function(){e.setDefaults(),e.updateDisplay()}),t.each(H,function(a){e.on(e.$(a.selector),"change",e.updateDisplay)}),e.options_.persistTextTrackSettings&&e.restoreSettings(),e}return h(b,a),b.prototype.createElSelect_=function(a){var b=this,c=H[a],d=c.id.replace("%s",this.id_);return[(0,p.createEl)("label",{className:"vjs-label",textContent:c.label},{"for":d}),(0,p.createEl)("select",{id:d},undefined,c.options.map(function(a){return(0,p.createEl)("option",{textContent:b.localize(a[1]),value:a[0]})}))]},b.prototype.createElFgColor_=function(){var a=(0,p.createEl)("legend",{textContent:this.localize("Text")}),b=this.createElSelect_("color"),c=(0,p.createEl)("span",{className:"vjs-text-opacity vjs-opacity"},undefined,this.createElSelect_("textOpacity"));return(0,p.createEl)("fieldset",{className:"vjs-fg-color vjs-tracksetting"},undefined,[a].concat(b,c))},b.prototype.createElBgColor_=function(){var a=(0,p.createEl)("legend",{textContent:this.localize("Background")}),b=this.createElSelect_("backgroundColor"),c=(0,p.createEl)("span",{className:"vjs-bg-opacity vjs-opacity"},undefined,this.createElSelect_("backgroundOpacity"));return(0,p.createEl)("fieldset",{className:"vjs-bg-color vjs-tracksetting"},undefined,[a].concat(b,c))},b.prototype.createElWinColor_=function(){var a=(0,p.createEl)("legend",{textContent:this.localize("Window")}),b=this.createElSelect_("windowColor"),c=(0,p.createEl)("span",{className:"vjs-window-opacity vjs-opacity"},undefined,this.createElSelect_("windowOpacity"));return(0,p.createEl)("fieldset",{className:"vjs-window-color vjs-tracksetting"},undefined,[a].concat(b,c))},b.prototype.createElColors_=function(){return(0,p.createEl)("div",{className:"vjs-tracksettings-colors"},undefined,[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()])},b.prototype.createElFont_=function(){var a=(0,p.createEl)("div",{className:"vjs-font-percent vjs-tracksetting"},undefined,this.createElSelect_("fontPercent")),b=(0,p.createEl)("div",{className:"vjs-edge-style vjs-tracksetting"},undefined,this.createElSelect_("edgeStyle")),c=(0,p.createEl)("div",{className:"vjs-font-family vjs-tracksetting"},undefined,this.createElSelect_("fontFamily"));return(0,p.createEl)("div",{className:"vjs-tracksettings-font"},undefined,[a,b,c])},b.prototype.createElControls_=function(){var a=(0,p.createEl)("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),b=(0,p.createEl)("button",{className:"vjs-done-button",textContent:"Done"});return(0,p.createEl)("div",{className:"vjs-tracksettings-controls"},undefined,[a,b])},b.prototype.createEl=function(){var a=(0,p.createEl)("div",{className:"vjs-tracksettings"},undefined,[this.createElColors_(),this.createElFont_(),this.createElControls_()]),b=(0,p.createEl)("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.id_,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),c=(0,p.createEl)("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.id_,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),d=(0,p.createEl)("div",undefined,{role:"document"},[b,c,a]);return(0,p.createEl)("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":b.id,"aria-describedby":c.id},d)},b.prototype.getValues=function(){var a=this;return t.reduce(H,function(b,c,d){var e=j(a.$(c.selector),c.parser);return e!==undefined&&(b[d]=e),b},{})},b.prototype.setValues=function(a){var b=this;t.each(H,function(c,d){k(b.$(c.selector),a[d],c.parser)})},b.prototype.setDefaults=function(){var a=this;t.each(H,function(b){var c=b.hasOwnProperty("default")?b["default"]:0;a.$(b.selector).selectedIndex=c})},b.prototype.restoreSettings=function(){var a=void 0;try{a=JSON.parse(m["default"].localStorage.getItem("vjs-text-track-settings"))}catch(b){v["default"].warn(b)}a&&this.setValues(a)},b.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var a=this.getValues();try{Object.keys(a).length?m["default"].localStorage.setItem("vjs-text-track-settings",JSON.stringify(a)):m["default"].localStorage.removeItem("vjs-text-track-settings")}catch(b){v["default"].warn(b)}}},b.prototype.updateDisplay=function(){var a=this.player_.getChild("textTrackDisplay");a&&a.updateDisplay()},b}(o["default"]);o["default"].registerComponent("TextTrackSettings",I),c["default"]=I},{5:5,81:81,83:83,86:86,88:88,95:95}],72:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=a(67),j=e(i),k=a(83),l=d(k),m=a(73),n=a(86),o=e(n),p=a(95),q=e(p),r=a(75),s=e(r),t=a(92),u=a(104),v=e(u),w=a(87),x=e(w),y=a(78),z=d(y),A=function(a,b){var c=new q["default"].WebVTT.Parser(q["default"],q["default"].vttjs,q["default"].WebVTT.StringDecoder()),d=[];c.oncue=function(a){b.addCue(a)},c.onparsingerror=function(a){d.push(a)},c.onflush=function(){b.trigger({type:"loadeddata",target:b})},c.parse(a),d.length>0&&(q["default"].console&&q["default"].console.groupCollapsed&&q["default"].console.groupCollapsed("Text Track parsing errors for "+b.src),d.forEach(function(a){return o["default"].error(a)}),q["default"].console&&q["default"].console.groupEnd&&q["default"].console.groupEnd()),c.flush()},B=function(a,b){var c={uri:a},d=(0,t.isCrossOrigin)(a);d&&(c.cors=d),(0,v["default"])(c,l.bind(this,function(a,c,d){if(a)return o["default"].error(a,c);if(b.loaded_=!0,"function"!=typeof q["default"].WebVTT){if(b.tech_){var e=function(){return A(d,b)};b.tech_.on("vttjsloaded",e),b.tech_.on("vttjserror",function(){o["default"].error("vttjs failed to load, stopping trying to process "+b.src),b.tech_.off("vttjsloaded",e)})}}else A(d,b)}))},C=function(a){function b(){var c,d,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};
34if(f(this,b),!e.tech)throw new Error("A tech was not provided.");var h=(0,x["default"])(e,{kind:m.TextTrackKind[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=m.TextTrackMode[h.mode]||"disabled",k=h["default"];"metadata"!==h.kind&&"chapters"!==h.kind||(i="hidden");var n=c=g(this,a.call(this,h));if(n.tech_=h.tech,z.IS_IE8)for(var o in b.prototype)"constructor"!==o&&(n[o]=b.prototype[o]);n.cues_=[],n.activeCues_=[];var p=new j["default"](n.cues_),q=new j["default"](n.activeCues_),r=!1,s=l.bind(n,function(){this.activeCues,r&&(this.trigger("cuechange"),r=!1)});return"disabled"!==i&&n.tech_.ready(function(){n.tech_.on("timeupdate",s)},!0),Object.defineProperty(n,"default",{get:function(){return k},set:function(){}}),Object.defineProperty(n,"mode",{get:function(){return i},set:function(a){var b=this;m.TextTrackMode[a]&&(i=a,"showing"===i&&this.tech_.ready(function(){b.tech_.on("timeupdate",s)},!0),this.trigger("modechange"))}}),Object.defineProperty(n,"cues",{get:function(){return this.loaded_?p:null},set:function(){}}),Object.defineProperty(n,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return q;for(var a=this.tech_.currentTime(),b=[],c=0,d=this.cues.length;c<d;c++){var e=this.cues[c];e.startTime<=a&&e.endTime>=a?b.push(e):e.startTime===e.endTime&&e.startTime<=a&&e.startTime+.5>=a&&b.push(e)}if(r=!1,b.length!==this.activeCues_.length)r=!0;else for(var f=0;f<b.length;f++)-1===this.activeCues_.indexOf(b[f])&&(r=!0);return this.activeCues_=b,q.setCues_(this.activeCues_),q},set:function(){}}),h.src?(n.src=h.src,B(h.src,n)):n.loaded_=!0,d=n,g(c,d)}return h(b,a),b.prototype.addCue=function(a){var b=a;if(q["default"].vttjs&&!(a instanceof q["default"].vttjs.VTTCue)){b=new q["default"].vttjs.VTTCue(a.startTime,a.endTime,a.text);for(var c in a)c in b||(b[c]=a[c]);b.id=a.id,b.originalCue_=a}var d=this.tech_.textTracks();if(d)for(var e=0;e<d.length;e++)d[e]!==this&&d[e].removeCue(b);this.cues_.push(b),this.cues.setCues_(this.cues_)},b.prototype.removeCue=function(a){for(var b=this.cues_.length;b--;){var c=this.cues_[b];if(c===a||c.originalCue_&&c.originalCue_===a){this.cues_.splice(b,1),this.cues.setCues_(this.cues_);break}}},b}(s["default"]);C.prototype.allowedEvents_={cuechange:"cuechange"},c["default"]=C},{104:104,67:67,73:73,75:75,78:78,83:83,86:86,87:87,92:92,95:95}],73:[function(a,b,c){"use strict";c.__esModule=!0;c.VideoTrackKind={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},c.AudioTrackKind={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},c.TextTrackKind={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},c.TextTrackMode={disabled:"disabled",hidden:"hidden",showing:"showing"}},{}],74:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(42),i=d(h),j=a(78),k=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(j),l=a(94),m=d(l),n=function(a){function b(){var c,d=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],g=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;e(this,b);var h=f(this,a.call(this));if(!g&&(g=h,k.IS_IE8)){g=m["default"].createElement("custom");for(var i in b.prototype)"constructor"!==i&&(g[i]=b.prototype[i])}g.tracks_=[],Object.defineProperty(g,"length",{get:function(){return this.tracks_.length}});for(var j=0;j<d.length;j++)g.addTrack_(d[j]);return c=g,f(h,c)}return g(b,a),b.prototype.addTrack_=function(a){var b=this.tracks_.length;""+b in this||Object.defineProperty(this,b,{get:function(){return this.tracks_[b]}}),-1===this.tracks_.indexOf(a)&&(this.tracks_.push(a),this.trigger({track:a,type:"addtrack"}))},b.prototype.removeTrack_=function(a){for(var b=void 0,c=0,d=this.length;c<d;c++)if(this[c]===a){b=this[c],b.off&&b.off(),this.tracks_.splice(c,1);break}b&&this.trigger({track:b,type:"removetrack"})},b.prototype.getTrackById=function(a){for(var b=null,c=0,d=this.length;c<d;c++){var e=this[c];if(e.id===a){b=e;break}}return b},b}(i["default"]);n.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var o in n.prototype.allowedEvents_)n.prototype["on"+o]=null;c["default"]=n},{42:42,78:78,94:94}],75:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var i=a(78),j=e(i),k=a(94),l=d(k),m=a(85),n=e(m),o=a(42),p=d(o),q=function(a){function b(){var c,d=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};f(this,b);var e=g(this,a.call(this)),h=e;if(j.IS_IE8){h=l["default"].createElement("custom");for(var i in b.prototype)"constructor"!==i&&(h[i]=b.prototype[i])}var k={id:d.id||"vjs_track_"+n.newGUID(),kind:d.kind||"",label:d.label||"",language:d.language||""};for(var m in k)!function(a){Object.defineProperty(h,a,{get:function(){return k[a]},set:function(){}})}(m);return c=h,g(e,c)}return h(b,a),b}(p["default"]);c["default"]=q},{42:42,78:78,85:85,94:94}],76:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;
34var h=a(74),i=d(h),j=a(78),k=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(j),l=a(94),m=d(l),n=function(a,b){for(var c=0;c<a.length;c++)b.id!==a[c].id&&(a[c].selected=!1)},o=function(a){function b(){var c,d,g=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];e(this,b);for(var h=void 0,j=g.length-1;j>=0;j--)if(g[j].selected){n(g,g[j]);break}if(k.IS_IE8){h=m["default"].createElement("custom");for(var l in i["default"].prototype)"constructor"!==l&&(h[l]=i["default"].prototype[l]);for(var o in b.prototype)"constructor"!==o&&(h[o]=b.prototype[o])}return h=c=f(this,a.call(this,g,h)),h.changing_=!1,Object.defineProperty(h,"selectedIndex",{get:function(){for(var a=0;a<this.length;a++)if(this[a].selected)return a;return-1},set:function(){}}),d=h,f(c,d)}return g(b,a),b.prototype.addTrack_=function(b){var c=this;b.selected&&n(this,b),a.prototype.addTrack_.call(this,b),b.addEventListener&&b.addEventListener("selectedchange",function(){c.changing_||(c.changing_=!0,n(c,b),c.changing_=!1,c.trigger("change"))})},b.prototype.addTrack=function(a){this.addTrack_(a)},b.prototype.removeTrack=function(b){a.prototype.removeTrack_.call(this,b)},b}(i["default"]);c["default"]=o},{74:74,78:78,94:94}],77:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a(73),i=a(75),j=d(i),k=a(87),l=d(k),m=a(78),n=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(m),o=function(a){function b(){var c,d,g=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};e(this,b);var i=(0,l["default"])(g,{kind:h.VideoTrackKind[g.kind]||""}),j=c=f(this,a.call(this,i)),k=!1;if(n.IS_IE8)for(var m in b.prototype)"constructor"!==m&&(j[m]=b.prototype[m]);return Object.defineProperty(j,"selected",{get:function(){return k},set:function(a){"boolean"==typeof a&&a!==k&&(k=a,this.trigger("selectedchange"))}}),i.selected&&(j.selected=i.selected),d=j,f(c,d)}return g(b,a),b}(j["default"]);c["default"]=o},{73:73,75:75,78:78,87:87}],78:[function(a,b,c){"use strict";c.__esModule=!0,c.BACKGROUND_SIZE_SUPPORTED=c.TOUCH_ENABLED=c.IS_ANY_SAFARI=c.IS_SAFARI=c.IE_VERSION=c.IS_IE8=c.CHROME_VERSION=c.IS_CHROME=c.IS_EDGE=c.IS_FIREFOX=c.IS_NATIVE_ANDROID=c.IS_OLD_ANDROID=c.ANDROID_VERSION=c.IS_ANDROID=c.IOS_VERSION=c.IS_IOS=c.IS_IPOD=c.IS_IPHONE=c.IS_IPAD=undefined;var d=a(81),e=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(d),f=a(95),g=function(a){return a&&a.__esModule?a:{"default":a}}(f),h=g["default"].navigator&&g["default"].navigator.userAgent||"",i=/AppleWebKit\/([\d.]+)/i.exec(h),j=i?parseFloat(i.pop()):null,k=c.IS_IPAD=/iPad/i.test(h),l=c.IS_IPHONE=/iPhone/i.test(h)&&!k,m=c.IS_IPOD=/iPod/i.test(h),n=c.IS_IOS=l||k||m,o=(c.IOS_VERSION=function(){var a=h.match(/OS (\d+)_/i);return a&&a[1]?a[1]:null}(),c.IS_ANDROID=/Android/i.test(h)),p=c.ANDROID_VERSION=function(){var a=h.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!a)return null;var b=a[1]&&parseFloat(a[1]),c=a[2]&&parseFloat(a[2]);return b&&c?parseFloat(a[1]+"."+a[2]):b||null}(),q=(c.IS_OLD_ANDROID=o&&/webkit/i.test(h)&&p<2.3,c.IS_NATIVE_ANDROID=o&&p<5&&j<537,c.IS_FIREFOX=/Firefox/i.test(h),c.IS_EDGE=/Edge/i.test(h)),r=c.IS_CHROME=!q&&/Chrome/i.test(h),s=(c.CHROME_VERSION=function(){var a=h.match(/Chrome\/(\d+)/);return a&&a[1]?parseFloat(a[1]):null}(),c.IS_IE8=/MSIE\s8\.0/.test(h),c.IE_VERSION=function(){var a=/MSIE\s(\d+)\.\d/.exec(h),b=a&&parseFloat(a[1]);return!b&&/Trident\/7.0/i.test(h)&&/rv:11.0/.test(h)&&(b=11),b}(),c.IS_SAFARI=/Safari/i.test(h)&&!r&&!o&&!q);c.IS_ANY_SAFARI=s||n,c.TOUCH_ENABLED=e.isReal()&&("ontouchstart"in g["default"]||g["default"].DocumentTouch&&g["default"].document instanceof g["default"].DocumentTouch),c.BACKGROUND_SIZE_SUPPORTED=e.isReal()&&"backgroundSize"in g["default"].document.createElement("video").style},{81:81,95:95}],79:[function(a,b,c){"use strict";function d(a,b){var c=0,d=void 0,f=void 0;if(!b)return 0;a&&a.length||(a=(0,e.createTimeRange)(0,0));for(var g=0;g<a.length;g++)d=a.start(g),f=a.end(g),f>b&&(f=b),c+=f-d;return c/b}c.__esModule=!0,c.bufferedPercent=d;var e=a(90)},{90:90}],80:[function(a,b,c){"use strict";function d(a,b){if(!a||!b)return"";if("function"==typeof f["default"].getComputedStyle){var c=f["default"].getComputedStyle(a);return c?c[b]:""}return a.currentStyle[b]||""}c.__esModule=!0,c["default"]=d;var e=a(95),f=function(a){return a&&a.__esModule?a:{"default":a}}(e)},{95:95}],81:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){return"string"==typeof a&&/\S/.test(a)}function f(a){if(/\s/.test(a))throw new Error("class has illegal whitespace characters")}
34function g(a){return new RegExp("(^|\\s)"+a+"($|\\s)")}function h(){return L["default"]===N["default"].document&&"undefined"!=typeof L["default"].createElement}function i(a){return(0,U.isObject)(a)&&1===a.nodeType}function j(a){return function(b,c){if(!e(b))return L["default"][a](null);e(c)&&(c=L["default"].querySelector(c));var d=i(c)?c:L["default"];return d[a]&&d[a](b)}}function k(a){return 0===a.indexOf("#")&&(a=a.slice(1)),L["default"].getElementById(a)}function l(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"div",b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},d=arguments[3],e=L["default"].createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];-1!==a.indexOf("aria-")||"role"===a||"type"===a?(R["default"].warn((0,T["default"])(J,a,c)),e.setAttribute(a,c)):"textContent"===a?m(e,c):e[a]=c}),Object.getOwnPropertyNames(c).forEach(function(a){e.setAttribute(a,c[a])}),d&&H(e,d),e}function m(a,b){return"undefined"==typeof a.textContent?a.innerText=b:a.textContent=b,a}function n(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)}function o(a){var b=a[W];return b||(b=a[W]=P.newGUID()),V[b]||(V[b]={}),V[b]}function p(a){var b=a[W];return!!b&&!!Object.getOwnPropertyNames(V[b]).length}function q(a){var b=a[W];if(b){delete V[b];try{delete a[W]}catch(c){a.removeAttribute?a.removeAttribute(W):a[W]=null}}}function r(a,b){return f(b),a.classList?a.classList.contains(b):g(b).test(a.className)}function s(a,b){return a.classList?a.classList.add(b):r(a,b)||(a.className=(a.className+" "+b).trim()),a}function t(a,b){return a.classList?a.classList.remove(b):(f(b),a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(" ")),a}function u(a,b,c){var d=r(a,b);if("function"==typeof c&&(c=c(a,b)),"boolean"!=typeof c&&(c=!d),c!==d)return c?s(a,b):t(a,b),a}function v(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||void 0===d||!1===d?a.removeAttribute(c):a.setAttribute(c,!0===d?"":d)})}function w(a){var b={};if(a&&a.attributes&&a.attributes.length>0)for(var c=a.attributes,d=c.length-1;d>=0;d--){var e=c[d].name,f=c[d].value;
vendor: 4,685 bytes, line 34
34"boolean"!=typeof a[e]&&-1===",autoplay,controls,loop,muted,default,".indexOf(","+e+",")||(f=null!==f),b[e]=f}return b}function x(a,b){return a.getAttribute(b)}function y(a,b,c){a.setAttribute(b,c)}function z(a,b){a.removeAttribute(b)}function A(){L["default"].body.focus(),L["default"].onselectstart=function(){return!1}}function B(){L["default"].onselectstart=function(){return!0}}function C(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=L["default"].documentElement,d=L["default"].body,e=c.clientLeft||d.clientLeft||0,f=N["default"].pageXOffset||d.scrollLeft,g=b.left+f-e,h=c.clientTop||d.clientTop||0,i=N["default"].pageYOffset||d.scrollTop,j=b.top+i-h;return{left:Math.round(g),top:Math.round(j)}}function D(a,b){var c={},d=C(a),e=a.offsetWidth,f=a.offsetHeight,g=d.top,h=d.left,i=b.pageY,j=b.pageX;return b.changedTouches&&(j=b.changedTouches[0].pageX,i=b.changedTouches[0].pageY),c.y=Math.max(0,Math.min(1,(g-i+f)/f)),c.x=Math.max(0,Math.min(1,(j-h)/e)),c}function E(a){return(0,U.isObject)(a)&&3===a.nodeType}function F(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function G(a){return"function"==typeof a&&(a=a()),(Array.isArray(a)?a:[a]).map(function(a){return"function"==typeof a&&(a=a()),i(a)||E(a)?a:"string"==typeof a&&/\S/.test(a)?L["default"].createTextNode(a):void 0}).filter(function(a){return a})}function H(a,b){return G(b).forEach(function(b){return a.appendChild(b)}),a}function I(a,b){return H(F(a),b)}c.__esModule=!0,c.$$=c.$=undefined;var J=function(a,b){return a.raw=b,a}(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]);c.isReal=h,c.isEl=i,c.getEl=k,c.createEl=l,c.textContent=m,c.insertElFirst=n,c.getElData=o,c.hasElData=p,c.removeElData=q,c.hasElClass=r,c.addElClass=s,c.removeElClass=t,c.toggleElClass=u,c.setElAttributes=v,c.getElAttributes=w,c.getAttribute=x,c.setAttribute=y,c.removeAttribute=z,c.blockTextSelection=A,c.unblockTextSelection=B,c.findElPosition=C,c.getPointerPosition=D,c.isTextNode=E,c.emptyEl=F,c.normalizeContent=G,c.appendContent=H,c.insertContent=I;var K=a(94),L=d(K),M=a(95),N=d(M),O=a(85),P=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}(O),Q=a(86),R=d(Q),S=a(98),T=d(S),U=a(88),V={},W="vdata"+(new Date).getTime();c.$=j("querySelector"),c.$$=j("querySelectorAll")},{85:85,86:86,88:88,94:94,95:95,98:98}],82:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){var c=n.getElData(a);0===c.handlers[b].length&&(delete c.handlers[b],a.removeEventListener?a.removeEventListener(b,c.dispatcher,!1):a.detachEvent&&a.detachEvent("on"+b,c.dispatcher)),Object.getOwnPropertyNames(c.handlers).length<=0&&(delete c.handlers,delete c.dispatcher,delete c.disabled),0===Object.getOwnPropertyNames(c).length&&n.removeElData(a)}function g(a,b,c,d){c.forEach(function(c){a(b,c,d)})}function h(a){function b(){return!0}function c(){return!1}if(!a||!a.isPropagationStopped){var d=a||t["default"].event;a={};for(var e in d)"layerX"!==e&&"layerY"!==e&&"keyLocation"!==e&&"webkitMovementX"!==e&&"webkitMovementY"!==e&&("returnValue"===e&&d.preventDefault||(a[e]=d[e]));if(a.target||(a.target=a.srcElement||v["default"]),a.relatedTarget||(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement),a.preventDefault=function(){d.preventDefault&&d.preventDefault(),a.returnValue=!1,d.returnValue=!1,a.defaultPrevented=!0},a.defaultPrevented=!1,a.stopPropagation=function(){d.stopPropagation&&d.stopPropagation(),a.cancelBubble=!0,d.cancelBubble=!0,a.isPropagationStopped=b},a.isPropagationStopped=c,a.stopImmediatePropagation=function(){d.stopImmediatePropagation&&d.stopImmediatePropagation(),a.isImmediatePropagationStopped=b,a.stopPropagation()},a.isImmediatePropagationStopped=c,null!==a.clientX&&a.clientX!==undefined){var f=v["default"].documentElement,g=v["default"].body;a.pageX=a.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=a.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)}
34a.which=a.charCode||a.keyCode,null!==a.button&&a.button!==undefined&&(a.button=1&a.button?0:4&a.button?1:2&a.button?2:0)}return a}function i(a,b,c){if(Array.isArray(b))return g(i,a,b,c);var d=n.getElData(a);if(d.handlers||(d.handlers={}),d.handlers[b]||(d.handlers[b]=[]),c.guid||(c.guid=p.newGUID()),d.handlers[b].push(c),d.dispatcher||(d.disabled=!1,d.dispatcher=function(b,c){if(!d.disabled){b=h(b);var e=d.handlers[b.type];if(e)for(var f=e.slice(0),g=0,i=f.length;g<i&&!b.isImmediatePropagationStopped();g++)try{f[g].call(a,b,c)}catch(j){r["default"].error(j)}}}),1===d.handlers[b].length)if(a.addEventListener){var e=!1;w&&x.indexOf(b)>-1&&(e={passive:!0}),a.addEventListener(b,d.dispatcher,e)}else a.attachEvent&&a.attachEvent("on"+b,d.dispatcher)}function j(a,b,c){if(n.hasElData(a)){var d=n.getElData(a);if(d.handlers){if(Array.isArray(b))return g(j,a,b,c);var e=function(b){d.handlers[b]=[],f(a,b)};if(b){var h=d.handlers[b];if(h){if(!c)return void e(b);if(c.guid)for(var i=0;i<h.length;i++)h[i].guid===c.guid&&h.splice(i--,1);f(a,b)}}else for(var k in d.handlers)e(k)}}}function k(a,b,c){var d=n.hasElData(a)?n.getElData(a):{},e=a.parentNode||a.ownerDocument;if("string"==typeof b&&(b={type:b,target:a}),b=h(b),d.dispatcher&&d.dispatcher.call(a,b,c),e&&!b.isPropagationStopped()&&!0===b.bubbles)k.call(null,e,b,c);else if(!e&&!b.defaultPrevented){var f=n.getElData(b.target);b.target[b.type]&&(f.disabled=!0,"function"==typeof b.target[b.type]&&b.target[b.type](),f.disabled=!1)}return!b.defaultPrevented}function l(a,b,c){if(Array.isArray(b))return g(l,a,b,c);var d=function e(){j(a,b,e),c.apply(this,arguments)};d.guid=c.guid=c.guid||p.newGUID(),i(a,b,d)}c.__esModule=!0,c.fixEvent=h,c.on=i,c.off=j,c.trigger=k,c.one=l;var m=a(81),n=e(m),o=a(85),p=e(o),q=a(86),r=d(q),s=a(95),t=d(s),u=a(94),v=d(u),w=!1;!function(){try{var a=Object.defineProperty({},"passive",{get:function(){w=!0}});t["default"].addEventListener("test",null,a)}catch(b){}}();var x=["touchstart","touchmove"]},{81:81,85:85,86:86,94:94,95:95}],83:[function(a,b,c){"use strict";c.__esModule=!0,c.throttle=c.bind=undefined;var d=a(85);c.bind=function(a,b,c){b.guid||(b.guid=(0,d.newGUID)());var e=function(){return b.apply(a,arguments)};return e.guid=c?c+"_"+b.guid:b.guid,e},c.throttle=function(a,b){var c=Date.now();return function(){var d=Date.now();d-c>=b&&(a.apply(undefined,arguments),c=d)}}},{85:85}],84:[function(a,b,c){"use strict";function d(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:a;a=a<0?0:a;var c=Math.floor(a%60),d=Math.floor(a/60%60),e=Math.floor(a/3600),f=Math.floor(b/60%60),g=Math.floor(b/3600);return(isNaN(a)||a===Infinity)&&(e=d=c="-"),e=e>0||g>0?e+":":"",d=((e||f>=10)&&d<10?"0"+d:d)+":",c=c<10?"0"+c:c,e+d+c}c.__esModule=!0,c["default"]=d},{}],85:[function(a,b,c){"use strict";function d(){return e++}c.__esModule=!0,c.newGUID=d;var e=1},{}],86:[function(a,b,c){"use strict";c.__esModule=!0,c.logByType=undefined;var d=a(95),e=function(a){return a&&a.__esModule?a:{"default":a}}(d),f=a(78),g=a(88),h=void 0,i=c.logByType=function(a,b){var c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!!f.IE_VERSION&&f.IE_VERSION<11;"log"!==a&&b.unshift(a.toUpperCase()+":"),h.history.push(b),b.unshift("VIDEOJS:");var d=e["default"].console&&e["default"].console[a];d&&(c&&(b=b.map(function(a){if((0,g.isObject)(a)||Array.isArray(a))try{return JSON.stringify(a)}catch(b){return String(a)}return String(a)}).join(" ")),d.apply?d[Array.isArray(b)?"apply":"call"](e["default"].console,b):d(b))};h=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];i("log",b)},h.history=[],h.error=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return i("error",b)},h.warn=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return i("warn",b)},c["default"]=h},{78:78,88:88,95:95}],87:[function(a,b,c){"use strict";function d(){for(var a={},b=arguments.length,c=Array(b),f=0;f<b;f++)c[f]=arguments[f];return c.forEach(function(b){b&&(0,e.each)(b,function(b,c){if(!(0,e.isPlain)(b))return void(a[c]=b);
34(0,e.isPlain)(a[c])||(a[c]={}),a[c]=d(a[c],b)})}),a}c.__esModule=!0,c["default"]=d;var e=a(88)},{88:88}],88:[function(a,b,c){"use strict";function d(a,b){k(a).forEach(function(c){return b(a[c],c)})}function e(a,b){var c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;return k(a).reduce(function(c,d){return b(c,a[d],d)},c)}function f(a){for(var b=arguments.length,c=Array(b>1?b-1:0),e=1;e<b;e++)c[e-1]=arguments[e];return Object.assign?Object.assign.apply(Object,[a].concat(c)):(c.forEach(function(b){b&&d(b,function(b,c){a[c]=b})}),a)}function g(a){return!!a&&"object"===(void 0===a?"undefined":i(a))}function h(a){return g(a)&&"[object Object]"===j.call(a)&&a.constructor===Object}c.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};c.each=d,c.reduce=e,c.assign=f,c.isObject=g,c.isPlain=h;var j=Object.prototype.toString,k=function(a){return g(a)?Object.keys(a):[]}},{}],89:[function(a,b,c){"use strict";c.__esModule=!0,c.setTextContent=c.createStyleElement=undefined;var d=a(94),e=function(a){return a&&a.__esModule?a:{"default":a}}(d);c.createStyleElement=function(a){var b=e["default"].createElement("style");return b.className=a,b},c.setTextContent=function(a,b){a.styleSheet?a.styleSheet.cssText=b:a.textContent=b}},{94:94}],90:[function(a,b,c){"use strict";function d(a,b,c){if(b<0||b>c)throw new Error("Failed to execute '"+a+"' on 'TimeRanges': The index provided ("+b+") is greater than or equal to the maximum bound ("+c+").")}function e(a,b,c,e){return e===undefined&&(i["default"].warn("DEPRECATED: Function '"+a+"' on 'TimeRanges' called without an index argument."),e=0),d(a,e,c.length-1),c[e][b]}function f(a){return a===undefined||0===a.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:a.length,start:e.bind(null,"start",0,a),end:e.bind(null,"end",1,a)}}function g(a,b){return Array.isArray(a)?f(a):a===undefined||b===undefined?f():f([[a,b]])}c.__esModule=!0,c.createTimeRange=undefined,c.createTimeRanges=g;var h=a(86),i=function(a){return a&&a.__esModule?a:{"default":a}}(h);c.createTimeRange=g},{86:86}],91:[function(a,b,c){"use strict";function d(a){return"string"!=typeof a?a:a.charAt(0).toUpperCase()+a.slice(1)}c.__esModule=!0,c["default"]=d},{}],92:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0,c.isCrossOrigin=c.getFileExtension=c.getAbsoluteURL=c.parseUrl=undefined;var e=a(94),f=d(e),g=a(95),h=d(g),i=c.parseUrl=function(a){var b=["protocol","hostname","port","pathname","search","hash","host"],c=f["default"].createElement("a");c.href=a;var d=""===c.host&&"file:"!==c.protocol,e=void 0;d&&(e=f["default"].createElement("div"),e.innerHTML='<a href="'+a+'"></a>',c=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),f["default"].body.appendChild(e));for(var g={},h=0;h<b.length;h++)g[b[h]]=c[b[h]];return"http:"===g.protocol&&(g.host=g.host.replace(/:80$/,"")),"https:"===g.protocol&&(g.host=g.host.replace(/:443$/,"")),d&&f["default"].body.removeChild(e),g};c.getAbsoluteURL=function(a){if(!a.match(/^https?:\/\//)){var b=f["default"].createElement("div");b.innerHTML='<a href="'+a+'">x</a>',a=b.firstChild.href}return a},c.getFileExtension=function(a){if("string"==typeof a){var b=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,c=b.exec(a);if(c)return c.pop().toLowerCase()}return""},c.isCrossOrigin=function(a){var b=h["default"].location,c=i(a);return(":"===c.protocol?b.protocol:c.protocol)+c.host!==b.protocol+b.host}},{94:94,95:95}],93:[function(b,c,d){"use strict";function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a){return a&&a.__esModule?a:{"default":a}}function g(a,b,c){var d=void 0;if("string"==typeof a){if(0===a.indexOf("#")&&(a=a.slice(1)),g.getPlayers()[a])return b&&S["default"].warn('Player "'+a+'" is already initialised. Options will not be applied.'),c&&g.getPlayers()[a].ready(c),g.getPlayers()[a];d=p.getEl(a)}else d=a;if(!d||!d.nodeName)throw new TypeError("The element or ID supplied is not val
34id. (videojs)");if(d.player||B["default"].players[d.playerId])return d.player||B["default"].players[d.playerId];b=b||{},g.hooks("beforesetup").forEach(function(a){var c=a(d,(0,F["default"])(b));if(!(0,V.isObject)(c)||Array.isArray(c))return void S["default"].error("please return an object in beforesetup hooks");b=(0,F["default"])(b,c)});var e=v["default"].getComponent("Player"),f=new e(d,b,c);return g.hooks("setup").forEach(function(a){return a(f)}),f}d.__esModule=!0;var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},i=b(95),j=f(i),k=b(94),l=f(k),m=b(78),n=e(m),o=b(81),p=e(o),q=b(56),r=e(q),s=b(89),t=e(s),u=b(5),v=f(u),w=b(42),x=f(w),y=b(82),z=e(y),A=b(51),B=f(A),C=b(52),D=f(C),E=b(87),F=f(E),G=b(83),H=e(G),I=b(72),J=f(I),K=b(64),L=f(K),M=b(77),N=f(M),O=b(90),P=b(84),Q=f(P),R=b(86),S=f(R),T=b(92),U=e(T),V=b(88),W=b(80),X=f(W),Y=b(43),Z=f(Y),$=b(104),_=f($),aa=b(62),ba=f(aa);if("undefined"==typeof HTMLVideoElement&&p.isReal()&&(l["default"].createElement("video"),l["default"].createElement("audio"),l["default"].createElement("track")),g.hooks_={},g.hooks=function(a,b){return g.hooks_[a]=g.hooks_[a]||[],b&&(g.hooks_[a]=g.hooks_[a].concat(b)),g.hooks_[a]},g.hook=function(a,b){g.hooks(a,b)},g.removeHook=function(a,b){var c=g.hooks(a).indexOf(b);return!(c<=-1)&&(g.hooks_[a]=g.hooks_[a].slice(),g.hooks_[a].splice(c,1),!0)},!0!==j["default"].VIDEOJS_NO_DYNAMIC_STYLE&&p.isReal()){var ca=p.$(".vjs-styles-defaults");if(!ca){ca=t.createStyleElement("vjs-styles-defaults");var da=p.$("head");da&&da.insertBefore(ca,da.firstChild),t.setTextContent(ca,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}r.autoSetupTimeout(1,g),g.VERSION="5.20.2",g.options=B["default"].prototype.options_,g.getPlayers=function(){return B["default"].players},g.players=B["default"].players,g.getComponent=v["default"].getComponent,g.registerComponent=function(a,b){ba["default"].isTech(b)&&S["default"].warn("The "+a+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),v["default"].registerComponent.call(v["default"],a,b)},g.getTech=ba["default"].getTech,g.registerTech=ba["default"].registerTech,g.browser=n,g.TOUCH_ENABLED=n.TOUCH_ENABLED,g.extend=Z["default"],g.mergeOptions=F["default"],g.bind=H.bind,g.plugin=D["default"],g.addLanguage=function(a,b){var c;return a=(""+a).toLowerCase(),g.options.languages=(0,F["default"])(g.options.languages,(c={},c[a]=b,c)),g.options.languages[a]},g.log=S["default"],g.createTimeRange=g.createTimeRanges=O.createTimeRanges,g.formatTime=Q["default"],g.parseUrl=U.parseUrl,g.isCrossOrigin=U.isCrossOrigin,g.EventTarget=x["default"],g.on=z.on,g.one=z.one,g.off=z.off,g.trigger=z.trigger,g.xhr=_["default"],g.TextTrack=J["default"],g.AudioTrack=L["default"],g.VideoTrack=N["default"],g.isEl=p.isEl,g.isTextNode=p.isTextNode,g.createEl=p.createEl,g.hasClass=p.hasElClass,g.addClass=p.addElClass,g.removeClass=p.removeElClass,g.toggleClass=p.toggleElClass,g.setAttributes=p.setElAttributes,g.getAttributes=p.getElAttributes,g.emptyEl=p.emptyEl,g.appendContent=p.appendContent,g.insertContent=p.insertContent,g.computedStyle=X["default"],"function"==typeof a&&a.amd?a("videojs",[],function(){return g}):"object"===(void 0===d?"undefined":h(d))&&"object"===(void 0===c?"undefined":h(c))&&(c.exports=g),d["default"]=g},{104:104,42:42,43:43,5:5,51:51,52:52,56:56,62:62,64:64,72:72,77:77,78:78,80:80,81:81,82:82,83:83,84:84,86:86,87:87,88:88,89:89,90:90,92:92,94:94,95:95}],94:[function(a,b,c){(function(c){var d=void 0!==c?c:"undefined"!=typeof window?window:{},e=a(96);if("undefined"!=typeof document)b.exports=document;else{var f=d["__GLOBAL_DOCUMENT_CACHE@4"];f||(f=d["__GLOBAL_DOCUMENT_CACHE@4"]=e),b.exports=f}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{96:96}],95:[function(a,b,c){(function(a){"undefined"!=typeof window?b.exports=window:void 0!==a?b.exports=a:"undefined"!=typeof self?b.exports=self:b.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],96:[function(a,b,c){},{}],97:[function(a,b,c){function d(a,b){var c,d=null;try{c=JSON.parse(a,b)}catch(e){d=e}return[d,c]}b.exports=d},{}],98:[function(a,b,c){function d(a){return a.replace(/\n\r?\s*/g,"")}b.exports=function(a){for(var b="",c=0;c<arguments.length;c++)b+=d(a[c])+(arguments[c+1]||"");return b}},{}],99:[function(a,b,c){var d=a(103),e=b.exports={WebVTT:a(100),VTTCue:a(101),VTTRegion:a(102)};d.vttjs=e,d.WebVTT=e.WebVTT;var f=e.VTTCue,g=e.VTTRegion,h=d.VTTCue,i=d.VTTRegion;e.shim=function(){d.VTTCue=f,d.VTTRegion=g},e.restore=function(){d.VTTCue=h,d.VTTRegion=i},d.VTTCue||e.shim()},{100:100,101:101,102:102,103:103}],100:[function(a,b,c){function d(a,b){this.name="ParsingError",this.co
vendor: 18,274 bytes, line 34
34de=a.code,this.message=b||a.message}function e(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function f(){this.values=r(null)}function g(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function h(a,b,c){function h(){var b=e(a);if(null===b)throw new d(d.Errors.BadTimeStamp,"Malformed timestamp: "+j);return a=a.replace(/^[^\sa-zA-Z-]+/,""),b}function i(){a=a.replace(/^\s+/,"")}var j=a;if(i(),b.startTime=h(),i(),"--\x3e"!==a.substr(0,3))throw new d(d.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+j);a=a.substr(3),i(),b.endTime=h(),i(),function(a,b){var d=new f;g(a,function(a,b){switch(a){case"region":for(var e=c.length-1;e>=0;e--)if(c[e].id===b){d.set(a,c[e].region);break}break;case"vertical":d.alt(a,b,["rl","lr"]);break;case"line":var f=b.split(","),g=f[0];d.integer(a,g),d.percent(a,g)&&d.set("snapToLines",!1),d.alt(a,g,["auto"]),2===f.length&&d.alt("lineAlign",f[1],["start","middle","end"]);break;case"position":f=b.split(","),d.percent(a,f[0]),2===f.length&&d.alt("positionAlign",f[1],["start","middle","end"]);break;case"size":d.percent(a,b);break;case"align":d.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=d.get("region",null),b.vertical=d.get("vertical",""),b.line=d.get("line","auto"),b.lineAlign=d.get("lineAlign","start"),b.snapToLines=d.get("snapToLines",!0),b.size=d.get("size",100),b.align=d.get("align","middle"),b.position=d.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=d.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}(a,b)}function i(a,b){function c(a){return s[a]}for(var d,f=a.document.createElement("div"),g=f,h=[];null!==(d=function(){if(!b)return null;var a=b.match(/^([^<]*)(<[^>]+>?)?/);return function(a){return b=b.substr(a.length),a}(a[1]?a[1]:a[2])}());)if("<"!==d[0])g.appendChild(a.document.createTextNode(function(a){for(;k=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(k[0],c);return a}(d)));else{if("/"===d[1]){h.length&&h[h.length-1]===d.substr(2).replace(">","")&&(h.pop(),g=g.parentNode);continue}var i,j=e(d.substr(1,d.length-2));if(j){i=a.document.createProcessingInstruction("timestamp",j),g.appendChild(i);continue}var k=d.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!k)continue;if(!(i=function(b,c){var d=t[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=u[b];return f&&c&&(e[f]=c.trim()),e}(k[1],k[3])))continue;if(!function(a,b){return!v[b.localName]||v[b.localName]===a.localName}(g,i))continue;k[2]&&(i.className=k[2].substr(1).replace("."," ")),h.push(k[1]),g.appendChild(i),g=i}return f}function j(a){for(var b=0;b<w.length;b++){var c=w[b];if(a>=c[0]&&a<=c[1])return!0}return!1}function k(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g<f.length;g++)if(d=f.charCodeAt(g),j(d))return"rtl";return"ltr"}function l(a){if("number"==typeof a.line&&(a.snapToLines||a.line>=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;e<c.length&&c[e]!==b;e++)"showing"===c[e].mode&&d++;return-1*++d}function m(){}function n(a,b,c){var d=/MSIE\s8\.0/.test(navigator.userAgent),e="rgba(255, 255, 255, 1)",f="rgba(0, 0, 0, 0.8)";d&&(e="rgb(255, 255, 255)",f="rgb(0, 0, 0)"),m.call(this),this.cue=b,this.cueDiv=i(a,b.text);var g={color:e,backgroundColor:f,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};d||(g.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl",g.unicodeBidi="plaintext"),this.applyStyles(g,this.cueDiv),this.div=a.document.createElement("div"),g={textAlign:"middle"===b.align?"center":b.align,font:c.font,whiteSpace:"pre-line",position:"absolute"},d||(g.direction=k(this.cueDiv),g.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(g),this.div.appendChild(this.cueDiv);var h=0;switch(b.positionAlign){case"start":h=b.position;break;case"middle":h=b.position-b.size/2;break;case"end":h=b.position-b.size}""===b.vertical?this.applyStyles({left:this.formatStyle(h,"%"),width:this.formatStyle(b.size,"%")}):this.applyStyles({top:this.formatStyle(h,"%"),height:this.formatStyle(b.size,"%")}),this.move=function(a){this.applyStyles({top:this.formatStyle(a.top,"px"),bottom:this.formatStyle(a.bottom,"px"),left:this.formatStyle(a.left,"px"),right:this.formatStyle(a.right,"px"),height:this.formatStyle(a.height,"px"),width:this.formatStyle(a.width,"px")})}}function o(a){var b,c,d,e,f=/MSIE\s8\.0/.test(navigator.userAgent);if(a.div){c=a.div.offsetHeight,d=a.div.offsetWidth,e=a.div.offsetTop;var g=(g=a.div.childNodes)&&(g=g[0])&&g.getClientRects&&g.getClientRects();a=a.div.getBoundingClientRect(),b=g?Math.max(g[0]&&g[0].height||0,a.height/g.length):0}this.left=a.left,this.right=a.right,this.top=a.top||e,this.height=a.height||c,this.bottom=a.bottom||e+(a.height||c),this.width=a.width||d,this.lineHeight=b!==undefined?b:a.lineHeight,f&&!this.lineHeight&&(this.lineHeight=13)}function p(a,b,c,d){var e=new o(b),f=b.cue,g=l(f),h=[];if(f.snapToLines){var i;switch(f.vertical){case"":h=["+y","-y"],i="height";break;case"rl":h=["+x","-x"],i="width";break;case"lr":h=["-x","+x"],i="width"}var j=e.lineHeight,k=j*Math.round(g),m=c[i]+j,n=h[0];Math.abs(k)>m&&(k=k<0?-1:1,k*=Math.ceil(m/j)*j),g<0&&(k+=""===f.vertical?c.height:c.width,h=h.reverse()),e.move(n,k)}else{var p=e.lineHeight/c.height*100;switch(f.lineAlign){case"middle":g-=p/2;break;case"end":g-=p}switch(f.vertical){case"":b.applyStyles({top:b.formatStyle(g,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(g,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(g,"%")})}h=["+y","-x","+x","-y"],e=new o(b)}var q=function(a,b){for(var e,f=new o(a),g=1,h=0;h<b.length;h++){for(;a.overlapsOppositeAxis(c,b[h])||a.within(c)&&a.overlapsAny(d);)a.move(b[h]);if(a.within(c))return a;var i=a.intersectPercentage(c);g>i&&(e=new o(a),g=i),a=new o(f)}return e||f}(e,h);b.move(q.toCSSCompatValues(c))}function q(){}var r=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();d.prototype=r(Error.prototype),d.prototype.constructor=d,d.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},f.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d<c.length;++d)if(b===c[d]){this.set(a,b);break}},integer:function(a,b){/^-?\d+$/.test(b)&&this.set(a,parseInt(b,10))},percent:function(a,b){return!!(b.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(b=parseFloat(b))>=0&&b<=100)&&(this.set(a,b),!0)}};var s={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},t={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={v:"title",lang:"lang"},v={rt:"ruby"},w=[[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]];m.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},m.prototype.formatStyle=function(a,b){return 0===a?0:a+b},n.prototype=r(m.prototype),n.prototype.constructor=n,o.prototype.move=function(a,b){switch(b=b!==undefined?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},o.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top},o.prototype.overlapsAny=function(a){for(var b=0;b<a.length;b++)if(this.overlaps(a[b]))return!0;return!1},o.prototype.within=function(a){return this.top>=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},o.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.left<a.left;case"-x":return this.right>a.right;case"+y":return this.top<a.top;case"-y":return this.bottom>a.bottom}},o.prototype.intersectPercentage=function(a){return Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left))*Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top))/(this.height*this.width)},o.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},o.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;return a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a,{left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c}},q.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},q.convertCueToDOMTree=function(a,b){return a&&b?i(a,b):null};q.processCues=function(a,b,c){if(!a||!b||!c)return null;for(;c.firstChild;)c.removeChild(c.firstChild);var d=a.document.createElement("div");if(d.style.position="absolute",d.style.left="0",d.style.right="0",d.style.top="0",d.style.bottom="0",d.style.margin="1.5%",c.appendChild(d),function(a){for(var b=0;b<a.length;b++)if(a[b].hasBeenReset||!a[b].displayState)return!0;return!1}(b)){var e=[],f=o.getSimpleBoxPosition(d),g=Math.round(.05*f.height*100)/100,h={font:g+"px sans-serif"};!function(){for(var c,g,i=0;i<b.length;i++)g=b[i],c=new n(a,g,h),d.appendChild(c.div),p(a,c,f,e),g.displayState=c.div,e.push(o.getSimpleBoxPosition(c))}()}else for(var i=0;i<b.length;i++)d.appendChild(b[i].displayState)},q.Parser=function(a,b,c){c||(c=b,b={}),b||(b={}),this.window=a,this.vttjs=b,this.state="INITIAL",this.buffer="",this.decoder=c||new TextDecoder("utf8"),this.regionList=[]},q.Parser.prototype={reportOrThrowError:function(a){if(!(a instanceof d))throw a;this.onparsingerror&&this.onparsingerror(a)},parse:function(a){function b(){for(var a=j.buffer,b=0;b<a.length&&"\r"!==a[b]&&"\n"!==a[b];)++b;var c=a.substr(0,b);return"\r"===a[b]&&++b,"\n"===a[b]&&++b,j.buffer=a.substr(b),c}function c(a){var b=new f;if(g(a,function(a,c){switch(a){case"id":b.set(a,c);break;case"width":b.percent(a,c);break;case"lines":b.integer(a,c);break;case"regionanchor":case"viewportanchor":var d=c.split(",");if(2!==d.length)break;var e=new f;if(e.percent("x",d[0]),e.percent("y",d[1]),!e.has("x")||!e.has("y"))break;b.set(a+"X",e.get("x")),b.set(a+"Y",e.get("y"));break;case"scroll":b.alt(a,c,["up"])}},/=/,/\s/),b.has("id")){var c=new(j.vttjs.VTTRegion||j.window.VTTRegion);c.width=b.get("width",100),c.lines=b.get("lines",3),c.regionAnchorX=b.get("regionanchorX",0),c.regionAnchorY=b.get("regionanchorY",100),c.viewportAnchorX=b.get("viewportanchorX",0),c.viewportAnchorY=b.get("viewportanchorY",100),c.scroll=b.get("scroll",""),j.onregion&&j.onregion(c),j.regionList.push({id:b.get("id"),region:c})}}function i(a){var b=new f;g(a,function(a,c){switch(a){case"MPEGT":b.integer(a+"S",c);break;case"LOCA":b.set(a+"L",e(c))}},/[^\d]:/,/,/),j.ontimestampmap&&j.ontimestampmap({MPEGTS:b.get("MPEGTS"),LOCAL:b.get("LOCAL")})}var j=this;a&&(j.buffer+=j.decoder.decode(a,{stream:!0}));try{var k;if("INITIAL"===j.state){if(!/\r\n|\n/.test(j.buffer))return this;k=b();var l=k.match(/^WEBVTT([ \t].*)?$/);if(!l||!l[0])throw new d(d.Errors.BadSignature);j.state="HEADER"}for(var m=!1;j.buffer;){if(!/\r\n|\n/.test(j.buffer))return this;switch(m?m=!1:k=b(),j.state){case"HEADER":/:/.test(k)?function(a){a.match(/X-TIMESTAMP-MAP/)?g(a,function(a,b){switch(a){case"X-TIMESTAMP-MAP":i(b)}},/=/):g(a,function(a,b){switch(a){case"Region":c(b)}},/:/)}(k):k||(j.state="ID");continue;case"NOTE":k||(j.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(k)){j.state="NOTE";break}if(!k)continue;if(j.cue=new(j.vttjs.VTTCue||j.window.VTTCue)(0,0,""),j.state="CUE",-1===k.indexOf("--\x3e")){j.cue.id=k;continue}case"CUE":try{h(k,j.cue,j.regionList)}catch(o){j.reportOrThrowError(o),j.cue=null,j.state="BADCUE";continue}j.state="CUETEXT";continue;case"CUETEXT":var n=-1!==k.indexOf("--\x3e");if(!k||n&&(m=!0)){j.oncue&&j.oncue(j.cue),j.cue=null,j.state="ID";continue}j.cue.text&&(j.cue.text+="\n"),j.cue.text+=k;continue;case"BADCUE":k||(j.state="ID");continue}}}catch(o){j.reportOrThrowError(o),"CUETEXT"===j.state&&j.cue&&j.oncue&&j.oncue(j.cue),j.cue=null,j.state="INITIAL"===j.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new d(d.Errors.BadSignature)}catch(b){a.reportOrThrowError(b)}return a.onflush&&a.onflush(),this}},b.exports=q},{}],101:[function(a,b,c){function d(a){return"string"==typeof a&&(!!i[a.toLowerCase()]&&a.toLowerCase())}function e(a){return"string"==typeof a&&(!!j[a.toLowerCase()]&&a.toLowerCase())}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)a[d]=c[d]}return a}function g(a,b,c){var g=this,i=/MSIE\s8\.0/.test(navigator.userAgent),j={};i?g=document.createElement("custom"):j.enumerable=!0,g.hasBeenReset=!1;var k="",l=!1,m=a,n=b,o=c,p=null,q="",r=!0,s="auto",t="start",u=50,v="middle",w=50,x="middle";if(Object.defineProperty(g,"id",f({},j,{get:function(){return k},set:function(a){k=""+a}})),Object.defineProperty(g,"pauseOnExit",f({},j,{get:function(){return l},set:function(a){l=!!a}})),Object.defineProperty(g,"startTime",f({},j,{get:function(){return m},set:function(a){if("number"!=typeof a)throw new TypeError("Start time must be set to a number.");m=a,this.hasBeenReset=!0}})),Object.defineProperty(g,"endTime",f({},j,{get:function(){return n},set:function(a){if("number"!=typeof a)throw new TypeError("End time must be set to a number.");n=a,this.hasBeenReset=!0}})),Object.defineProperty(g,"text",f({},j,{get:function(){return o},set:function(a){o=""+a,this.hasBeenReset=!0}})),Object.defineProperty(g,"region",f({},j,{get:function(){return p},set:function(a){p=a,this.hasBeenReset=!0}})),Object.defineProperty(g,"vertical",f({},j,{get:function(){return q},set:function(a){var b=d(a);if(!1===b)throw new SyntaxError("An invalid or illegal string was specified.");q=b,this.hasBeenReset=!0}})),Object.defineProperty(g,"snapToLines",f({},j,{get:function(){return r},set:function(a){r=!!a,this.hasBeenReset=!0}})),Object.defineProperty(g,"line",f({},j,{get:function(){return s},set:function(a){if("number"!=typeof a&&a!==h)throw new SyntaxError("An invalid number or illegal string was specified.");s=a,this.hasBeenReset=!0}})),Object.defineProperty(g,"lineAlign",f({},j,{get:function(){return t},set:function(a){var b=e(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b,this.hasBeenReset=!0}})),Object.defineProperty(g,"position",f({},j,{get:function(){return u},set:function(a){if(a<0||a>100)throw new Error("Position must be between 0 and 100.");u=a,this.hasBeenReset=!0}})),Object.defineProperty(g,"positionAlign",f({},j,{get:function(){return v},set:function(a){var b=e(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(g,"size",f({},j,{get:function(){return w},set:function(a){if(a<0||a>100)throw new Error("Size must be between 0 and 100.");w=a,this.hasBeenReset=!0}})),Object.defineProperty(g,"align",f({},j,{get:function(){return x},set:function(a){var b=e(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),g.displayState=undefined,i)return g}var h="auto",i={"":!0,lr:!0,rl:!0},j={start:!0,middle:!0,end:!0,left:!0,right:!0};g.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},b.exports=g},{}],102:[function(a,b,c){function d(a){return"string"==typeof a&&(!!g[a.toLowerCase()]&&a.toLowerCase())}function e(a){return"number"==typeof a&&a>=0&&a<=100}function f(){var a=100,b=3,c=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a}
34,set:function(b){if(!e(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!e(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return c},set:function(a){if(!e(a))throw new Error("RegionAnchorY must be between 0 and 100.");c=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!e(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!e(a))throw new Error("ViewportAnchorX must be between 0 and 100.");g=a}},scroll:{enumerable:!0,get:function(){return i},set:function(a){var b=d(a);if(!1===b)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var g={"":!0,up:!0};b.exports=f},{}],103:[function(a,b,c){(function(a){var c;c="undefined"!=typeof window?window:void 0!==a?a:"undefined"!=typeof self?self:{},b.exports=c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],104:[function(a,b,c){"use strict";function d(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function e(a,b,c){var d=a;return k(b)?(c=b,"string"==typeof a&&(d={uri:a})):d=m(b,{uri:a}),d.callback=c,d}function f(a,b,c){return b=e(a,b,c),g(b)}function g(a){function b(){4===m.readyState&&g()}function c(){var a=undefined;if(a=m.response?m.response:m.responseText||h(m),v)try{a=JSON.parse(a)}catch(b){}return a}function e(a){return clearTimeout(p),a instanceof Error||(a=new Error(""+(a||"Unknown XMLHttpRequest Error"))),a.statusCode=0,j(a,k)}function g(){if(!o){var b;clearTimeout(p),b=a.useXDR&&m.status===undefined?200:1223===m.status?204:m.status;var d=k,e=null;return 0!==b?(d={body:c(),statusCode:b,method:r,headers:{},url:q,rawRequest:m},m.getAllResponseHeaders&&(d.headers=l(m.getAllResponseHeaders()))):e=new Error("Internal XMLHttpRequest Error"),j(e,d,d.body)}}if("undefined"==typeof a.callback)throw new Error("callback argument missing");var i=!1,j=function(b,c,d){i||(i=!0,a.callback(b,c,d))},k={body:undefined,headers:{},statusCode:0,method:r,url:q,rawRequest:m},m=a.xhr||null;m||(m=a.cors||a.useXDR?new f.XDomainRequest:new f.XMLHttpRequest);var n,o,p,q=m.url=a.uri||a.url,r=m.method=a.method||"GET",s=a.body||a.data||null,t=m.headers=a.headers||{},u=!!a.sync,v=!1;if("json"in a&&(v=!0,t.accept||t.Accept||(t.Accept="application/json"),"GET"!==r&&"HEAD"!==r&&(t["content-type"]||t["Content-Type"]||(t["Content-Type"]="application/json"),s=JSON.stringify(a.json))),m.onreadystatechange=b,m.onload=g,m.onerror=e,m.onprogress=function(){},m.ontimeout=e,m.open(r,q,!u,a.username,a.password),u||(m.withCredentials=!!a.withCredentials),!u&&a.timeout>0&&(p=setTimeout(function(){o=!0,m.abort("timeout");var a=new Error("XMLHttpRequest timeout");a.code="ETIMEDOUT",e(a)},a.timeout)),m.setRequestHeader)for(n in t)t.hasOwnProperty(n)&&m.setRequestHeader(n,t[n]);else if(a.headers&&!d(a.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(m.responseType=a.responseType),"beforeSend"in a&&"function"==typeof a.beforeSend&&a.beforeSend(m),m.send(s),m}function h(a){if("document"===a.responseType)return a.responseXML;var b=204===a.status&&a.responseXML&&"parsererror"===a.responseXML.documentElement.nodeName;return""!==a.responseType||b?null:a.responseXML}function i(){}var j=a(95),k=a(105),l=a(108),m=a(109);b.exports=f,f.XMLHttpRequest=j.XMLHttpRequest||i,f.XDomainRequest="withCredentials"in new f.XMLHttpRequest?f.XMLHttpRequest:j.XDomainRequest,function(a,b){for(var c=0;c<a.length;c++)b(a[c])}(["get","put","post","patch","head","delete"],function(a){f["delete"===a?"del":a]=function(b,c,d){return c=e(b,c,d),c.method=a.toUpperCase(),g(c)}})},{105:105,108:108,109:109,95:95}],105:[function(a,b,c){function d(a){var b=e.call(a);return"[object Function]"===b||"function"==typeof a&&"[object RegExp]"!==b||"undefined"!=typeof window&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}b.exports=d;var e=Object.prototype.toString},{}],106:[function(a,b,c){function d(a,b,c){if(!h(b))throw new TypeError("iterator must be a function");arguments.length<3&&(c=this),"[object Array]"===i.call(a)?e(a,b,c):"string"==typeof a?f(a,b,c):g(a,b,c)}function e(a,b,c){for(var d=0,e=a.length;d<e;d++)j.call(a,d)&&b.call(c,a[d],d,a)}function f(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c,a.charAt(d),d,a)}function g(a,b,c){for(var d in a)j.call(a,d)&&b.call(c,a[d],d,a)}var h=a(105);b.exports=d;var i=Object.prototype.toString,j=Object.prototype.hasOwnProperty},{105:105}],107:[function(a,b,c){function d(a){return a.replace(/^\s*|\s*$/g,"")}c=b.exports=d,c.left=function(a){return a.replace(/^\s*/,"")},c.right=function(a){return a.replace(/\s*$/,"")}},{}],108:[function(a,b,c){var d=a(107),e=a(106),f=function(a){return"[object Array]"===Object.prototype.toString.call(a)};
vendor: 55,323 bytes, lines 34-173
34b.exports=function(a){if(!a)return{};var b={};return e(d(a).split("\n"),function(a){var c=a.indexOf(":"),e=d(a.slice(0,c)).toLowerCase(),g=d(a.slice(c+1));"undefined"==typeof b[e]?b[e]=g:f(b[e])?b[e].push(g):b[e]=[b[e],g]}),b}},{106:106,107:107}],109:[function(a,b,c){function d(){for(var a={},b=0;b<arguments.length;b++){var c=arguments[b];for(var d in c)e.call(c,d)&&(a[d]=c[d])}return a}b.exports=d;var e=Object.prototype.hasOwnProperty},{}]},{},[93])(93)});
35/* /theme/video-js/videojs-contrib-hls.js */
36;(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.videojsContribHls=f()}})(function(){var define,module,exports;return(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _slicedToArray=(function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i['return'])_i['return']();}finally{if(_d)throw _e;}}return _arr;}return function(arr,i){if(Array.isArray(arr)){return arr;}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i);}else{throw new TypeError('Invalid attempt to destructure non-iterable instance');}};})();function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
37var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var findAdCue=function findAdCue(track,mediaTime){var cues=track.cues;for(var i=0;i<cues.length;i++){var cue=cues[i];if(mediaTime>=cue.adStartTime&&mediaTime<=cue.adEndTime){return cue;}}
38return null;};var updateAdCues=function updateAdCues(media,track){var offset=arguments.length<=2||arguments[2]===undefined?0:arguments[2];if(!media.segments){return;}
39var mediaTime=offset;var cue=undefined;for(var i=0;i<media.segments.length;i++){var segment=media.segments[i];if(!cue){cue=findAdCue(track,mediaTime+segment.duration/2);}
40if(cue){if('cueIn'in segment){cue.endTime=mediaTime;cue.adEndTime=mediaTime;mediaTime+=segment.duration;cue=null;continue;}
41if(mediaTime<cue.endTime){mediaTime+=segment.duration;continue;}
42cue.endTime+=segment.duration;}else{if('cueOut'in segment){cue=new _globalWindow2['default'].VTTCue(mediaTime,mediaTime+segment.duration,segment.cueOut);cue.adStartTime=mediaTime;cue.adEndTime=mediaTime+parseFloat(segment.cueOut);track.addCue(cue);}
43if('cueOutCont'in segment){var adOffset=undefined;var adTotal=undefined;var _segment$cueOutCont$split$map=segment.cueOutCont.split('/').map(parseFloat);var _segment$cueOutCont$split$map2=_slicedToArray(_segment$cueOutCont$split$map,2);adOffset=_segment$cueOutCont$split$map2[0];adTotal=_segment$cueOutCont$split$map2[1];cue=new _globalWindow2['default'].VTTCue(mediaTime,mediaTime+segment.duration,'');cue.adStartTime=mediaTime-adOffset;cue.adEndTime=cue.adStartTime+adTotal;track.addCue(cue);}}
44mediaTime+=segment.duration;}};exports['default']={updateAdCues:updateAdCues,findAdCue:findAdCue};module.exports=exports['default'];},{"global/window":32}],2:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var textRange=function textRange(range,i){return range.start(i)+'-'+range.end(i);};var formatHexString=function formatHexString(e,i){var value=e.toString(16);return'00'.substring(0,2-value.length)+value+(i%2?' ':'');};var formatAsciiString=function formatAsciiString(e){if(e>=0x20&&e<0x7e){return String.fromCharCode(e);}
45return'.';};var createTransferableMessage=function createTransferableMessage(message){var transferable={};Object.keys(message).forEach(function(key){var value=message[key];if(ArrayBuffer.isView(value)){transferable[key]={bytes:value.buffer,byteOffset:value.byteOffset,byteLength:value.byteLength};}else{transferable[key]=value;}});return transferable;};var initSegmentId=function initSegmentId(initSegment){var byterange=initSegment.byterange||{length:Infinity,offset:0};return[byterange.length,byterange.offset,initSegment.resolvedUri].join(',');};var utils={hexDump:function hexDump(data){var bytes=Array.prototype.slice.call(data);var step=16;var result='';var hex=undefined;var ascii=undefined;for(var j=0;j<bytes.length/step;j++){hex=bytes.slice(j*step,j*step+step).map(formatHexString).join('');ascii=bytes.slice(j*step,j*step+step).map(formatAsciiString).join('');result+=hex+' '+ascii+'\n';}
46return result;},tagDump:function tagDump(tag){return utils.hexDump(tag.bytes);},textRanges:function textRanges(ranges){var result='';var i=undefined;for(i=0;i<ranges.length;i++){result+=textRange(ranges,i)+' ';}
47return result;},createTransferableMessage:createTransferableMessage,initSegmentId:initSegmentId};exports['default']=utils;module.exports=exports['default'];},{}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1};module.exports=exports["default"];},{}],4:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
48var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _aesDecrypter=require('aes-decrypter');var _binUtils=require('./bin-utils');var DecrypterWorker=function DecrypterWorker(self){self.onmessage=function(event){var data=event.data;var encrypted=new Uint8Array(data.encrypted.bytes,data.encrypted.byteOffset,data.encrypted.byteLength);var key=new Uint32Array(data.key.bytes,data.key.byteOffset,data.key.byteLength/4);var iv=new Uint32Array(data.iv.bytes,data.iv.byteOffset,data.iv.byteLength/4);new _aesDecrypter.Decrypter(encrypted,key,iv,function(err,bytes){_globalWindow2['default'].postMessage((0,_binUtils.createTransferableMessage)({source:data.source,decrypted:bytes}),[bytes.buffer]);});};};exports['default']=function(self){return new DecrypterWorker(self);};module.exports=exports['default'];},{"./bin-utils":2,"aes-decrypter":25,"global/window":32}],5:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x,_x2,_x3){var _again=true;_function:while(_again){var object=_x,property=_x2,receiver=_x3;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x=parent;_x2=property;_x3=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
49function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
50function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
51var _playlistLoader=require('./playlist-loader');var _playlistLoader2=_interopRequireDefault(_playlistLoader);var _segmentLoader=require('./segment-loader');var _segmentLoader2=_interopRequireDefault(_segmentLoader);var _vttSegmentLoader=require('./vtt-segment-loader');var _vttSegmentLoader2=_interopRequireDefault(_vttSegmentLoader);var _ranges=require('./ranges');var _ranges2=_interopRequireDefault(_ranges);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _adCueTags=require('./ad-cue-tags');var _adCueTags2=_interopRequireDefault(_adCueTags);var _syncController=require('./sync-controller');var _syncController2=_interopRequireDefault(_syncController);var _videojsContribMediaSourcesEs5CodecUtils=require('videojs-contrib-media-sources/es5/codec-utils');var _webworkify=require('webworkify');var _webworkify2=_interopRequireDefault(_webworkify);var _decrypterWorker=require('./decrypter-worker');var _decrypterWorker2=_interopRequireDefault(_decrypterWorker);var _config=require('./config');var _config2=_interopRequireDefault(_config);var _utilCodecsJs=require('./util/codecs.js');var _mediaGroups=require('./media-groups');var ABORT_EARLY_BLACKLIST_SECONDS=60*2;var Hls=undefined;var defaultCodecs={videoCodec:'avc1',videoObjectTypeIndicator:'.4d400d',audioProfile:'2'};var loaderStats=['mediaRequests','mediaRequestsAborted','mediaRequestsTimedout','mediaRequestsErrored','mediaTransferDuration','mediaBytesTransferred'];var sumLoaderStat=function sumLoaderStat(stat){return this.audioSegmentLoader_[stat]+this.mainSegmentLoader_[stat];};var mapLegacyAvcCodecs_=function mapLegacyAvcCodecs_(codecString){return codecString.replace(/avc1\.(\d+)\.(\d+)/i,function(match){return(0,_videojsContribMediaSourcesEs5CodecUtils.translateLegacyCodecs)([match])[0];});};exports.mapLegacyAvcCodecs_=mapLegacyAvcCodecs_;var makeMimeTypeString=function makeMimeTypeString(type,container,codecs){return type+'/'+container+'; codecs="'+codecs.filter(function(c){return!!c;}).join(', ')+'"';};var getContainerType=function getContainerType(media){if(media.segments&&media.segments.length&&media.segments[0].map){return'mp4';}
52return'mp2t';};var getCodecs=function getCodecs(media){var mediaAttributes=media.attributes||{};if(mediaAttributes.CODECS){return(0,_utilCodecsJs.parseCodecs)(mediaAttributes.CODECS);}
53return defaultCodecs;};var mimeTypesForPlaylist_=function mimeTypesForPlaylist_(master,media){var containerType=getContainerType(media);var codecInfo=getCodecs(media);var mediaAttributes=media.attributes||{};var isMuxed=true;var isMaat=false;if(!media){return[];}
54if(master.mediaGroups.AUDIO&&mediaAttributes.AUDIO){var audioGroup=master.mediaGroups.AUDIO[mediaAttributes.AUDIO];if(audioGroup){isMaat=true;isMuxed=false;for(var groupId in audioGroup){if(!audioGroup[groupId].uri){isMuxed=true;break;}}}}
55if(isMaat&&!codecInfo.audioProfile){_videoJs2['default'].log.warn('Multiple audio tracks present but no audio codec string is specified. '+'Attempting to use the default audio codec (mp4a.40.2)');codecInfo.audioProfile=defaultCodecs.audioProfile;}
56var codecStrings={};if(codecInfo.videoCodec){codecStrings.video=''+codecInfo.videoCodec+codecInfo.videoObjectTypeIndicator;}
57if(codecInfo.audioProfile){codecStrings.audio='mp4a.40.'+codecInfo.audioProfile;}
58var justAudio=makeMimeTypeString('audio',containerType,[codecStrings.audio]);var justVideo=makeMimeTypeString('video',containerType,[codecStrings.video]);var bothVideoAudio=makeMimeTypeString('video',containerType,[codecStrings.video,codecStrings.audio]);if(isMaat){if(!isMuxed&&codecStrings.video){return[justVideo,justAudio];}
59return[bothVideoAudio,justAudio];}
60if(!codecStrings.video){return[justAudio];}
61return[bothVideoAudio];};exports.mimeTypesForPlaylist_=mimeTypesForPlaylist_;var MasterPlaylistController=(function(_videojs$EventTarget){_inherits(MasterPlaylistController,_videojs$EventTarget);function MasterPlaylistController(options){var _this=this;_classCallCheck(this,MasterPlaylistController);_get(Object.getPrototypeOf(MasterPlaylistController.prototype),'constructor',this).call(this);var url=options.url;var withCredentials=options.withCredentials;var mode=options.mode;var tech=options.tech;var bandwidth=options.bandwidth;var externHls=options.externHls;var useCueTags=options.useCueTags;var blacklistDuration=options.blacklistDuration;var enableLowInitialPlaylist=options.enableLowInitialPlaylist;if(!url){throw new Error('A non-empty playlist URL is required');}
62Hls=externHls;this.withCredentials=withCredentials;this.tech_=tech;this.hls_=tech.hls;this.mode_=mode;this.useCueTags_=useCueTags;this.blacklistDuration=blacklistDuration;this.enableLowInitialPlaylist=enableLowInitialPlaylist;if(this.useCueTags_){this.cueTagsTrack_=this.tech_.addTextTrack('metadata','ad-cues');this.cueTagsTrack_.inBandMetadataTrackDispatchType='';}
63this.requestOptions_={withCredentials:this.withCredentials,timeout:null};this.mediaTypes_=(0,_mediaGroups.createMediaTypes)();this.mediaSource=new _videoJs2['default'].MediaSource({mode:mode});this.mediaSource.addEventListener('sourceopen',this.handleSourceOpen_.bind(this));this.seekable_=_videoJs2['default'].createTimeRanges();this.hasPlayed_=function(){return false;};this.syncController_=new _syncController2['default'](options);this.segmentMetadataTrack_=tech.addRemoteTextTrack({kind:'metadata',label:'segment-metadata'},false).track;this.decrypter_=(0,_webworkify2['default'])(_decrypterWorker2['default']);var segmentLoaderSettings={hls:this.hls_,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:function seekable(){return _this.seekable();},seeking:function seeking(){return _this.tech_.seeking();},duration:function duration(){return _this.mediaSource.duration;},hasPlayed:function hasPlayed(){return _this.hasPlayed_();},goalBufferLength:function goalBufferLength(){return _this.goalBufferLength();},bandwidth:bandwidth,syncController:this.syncController_,decrypter:this.decrypter_};this.masterPlaylistLoader_=new _playlistLoader2['default'](url,this.hls_,this.withCredentials);this.setupMasterPlaylistLoaderListeners_();this.mainSegmentLoader_=new _segmentLoader2['default'](_videoJs2['default'].mergeOptions(segmentLoaderSettings,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:'main'}),options);this.audioSegmentLoader_=new _segmentLoader2['default'](_videoJs2['default'].mergeOptions(segmentLoaderSettings,{loaderType:'audio'}),options);this.subtitleSegmentLoader_=new _vttSegmentLoader2['default'](_videoJs2['default'].mergeOptions(segmentLoaderSettings,{loaderType:'vtt'}),options);this.setupSegmentLoaderListeners_();loaderStats.forEach(function(stat){_this[stat+'_']=sumLoaderStat.bind(_this,stat);});this.masterPlaylistLoader_.load();}
64_createClass(MasterPlaylistController,[{key:'setupMasterPlaylistLoaderListeners_',value:function setupMasterPlaylistLoaderListeners_(){var _this2=this;this.masterPlaylistLoader_.on('loadedmetadata',function(){var media=_this2.masterPlaylistLoader_.media();var requestTimeout=_this2.masterPlaylistLoader_.targetDuration*1.5*1000;if(_this2.masterPlaylistLoader_.isLowestEnabledRendition_()){_this2.requestOptions_.timeout=0;}else{_this2.requestOptions_.timeout=requestTimeout;}
65if(media.endList&&_this2.tech_.preload()!=='none'){_this2.mainSegmentLoader_.playlist(media,_this2.requestOptions_);_this2.mainSegmentLoader_.load();}
66(0,_mediaGroups.setupMediaGroups)({segmentLoaders:{AUDIO:_this2.audioSegmentLoader_,SUBTITLES:_this2.subtitleSegmentLoader_,main:_this2.mainSegmentLoader_},tech:_this2.tech_,requestOptions:_this2.requestOptions_,masterPlaylistLoader:_this2.masterPlaylistLoader_,mode:_this2.mode_,hls:_this2.hls_,master:_this2.master(),mediaTypes:_this2.mediaTypes_,blacklistCurrentPlaylist:_this2.blacklistCurrentPlaylist.bind(_this2)});_this2.triggerPresenceUsage_(_this2.master(),media);try{_this2.setupSourceBuffers_();}catch(e){_videoJs2['default'].log.warn('Failed to create SourceBuffers',e);return _this2.mediaSource.endOfStream('decode');}
67_this2.setupFirstPlay();_this2.trigger('selectedinitialmedia');});this.masterPlaylistLoader_.on('loadedplaylist',function(){var updatedPlaylist=_this2.masterPlaylistLoader_.media();if(!updatedPlaylist){var selectedMedia=undefined;if(_this2.enableLowInitialPlaylist){selectedMedia=_this2.selectInitialPlaylist();}
68if(!selectedMedia){selectedMedia=_this2.selectPlaylist();}
69_this2.initialMedia_=selectedMedia;_this2.masterPlaylistLoader_.media(_this2.initialMedia_);return;}
70if(_this2.useCueTags_){_this2.updateAdCues_(updatedPlaylist);}
71_this2.mainSegmentLoader_.playlist(updatedPlaylist,_this2.requestOptions_);_this2.updateDuration();if(!_this2.tech_.paused()){_this2.mainSegmentLoader_.load();}
72if(!updatedPlaylist.endList){(function(){var addSeekableRange=function addSeekableRange(){var seekable=_this2.seekable();if(seekable.length!==0){_this2.mediaSource.addSeekableRange_(seekable.start(0),seekable.end(0));}};if(_this2.duration()!==Infinity){(function(){var onDurationchange=function onDurationchange(){if(_this2.duration()===Infinity){addSeekableRange();}else{_this2.tech_.one('durationchange',onDurationchange);}};_this2.tech_.one('durationchange',onDurationchange);})();}else{addSeekableRange();}})();}});this.masterPlaylistLoader_.on('error',function(){_this2.blacklistCurrentPlaylist(_this2.masterPlaylistLoader_.error);});this.masterPlaylistLoader_.on('mediachanging',function(){_this2.mainSegmentLoader_.abort();_this2.mainSegmentLoader_.pause();});this.masterPlaylistLoader_.on('mediachange',function(){var media=_this2.masterPlaylistLoader_.media();var requestTimeout=_this2.masterPlaylistLoader_.targetDuration*1.5*1000;if(_this2.masterPlaylistLoader_.isLowestEnabledRendition_()){_this2.requestOptions_.timeout=0;}else{_this2.requestOptions_.timeout=requestTimeout;}
73_this2.mainSegmentLoader_.playlist(media,_this2.requestOptions_);_this2.mainSegmentLoader_.load();_this2.tech_.trigger({type:'mediachange',bubbles:true});});this.masterPlaylistLoader_.on('playlistunchanged',function(){var updatedPlaylist=_this2.masterPlaylistLoader_.media();var playlistOutdated=_this2.stuckAtPlaylistEnd_(updatedPlaylist);if(playlistOutdated){_this2.blacklistCurrentPlaylist({message:'Playlist no longer updating.'});_this2.tech_.trigger('playliststuck');}});this.masterPlaylistLoader_.on('renditiondisabled',function(){_this2.tech_.trigger({type:'usage',name:'hls-rendition-disabled'});});this.masterPlaylistLoader_.on('renditionenabled',function(){_this2.tech_.trigger({type:'usage',name:'hls-rendition-enabled'});});}},{key:'triggerPresenceUsage_',value:function triggerPresenceUsage_(master,media){var mediaGroups=master.mediaGroups||{};var defaultDemuxed=true;var audioGroupKeys=Object.keys(mediaGroups.AUDIO);for(var mediaGroup in mediaGroups.AUDIO){for(var label in mediaGroups.AUDIO[mediaGroup]){var properties=mediaGroups.AUDIO[mediaGroup][label];if(!properties.uri){defaultDemuxed=false;}}}
74if(defaultDemuxed){this.tech_.trigger({type:'usage',name:'hls-demuxed'});}
75if(Object.keys(mediaGroups.SUBTITLES).length){this.tech_.trigger({type:'usage',name:'hls-webvtt'});}
76if(Hls.Playlist.isAes(media)){this.tech_.trigger({type:'usage',name:'hls-aes'});}
77if(Hls.Playlist.isFmp4(media)){this.tech_.trigger({type:'usage',name:'hls-fmp4'});}
78if(audioGroupKeys.length&&Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length>1){this.tech_.trigger({type:'usage',name:'hls-alternate-audio'});}
79if(this.useCueTags_){this.tech_.trigger({type:'usage',name:'hls-playlist-cue-tags'});}}},{key:'setupSegmentLoaderListeners_',value:function setupSegmentLoaderListeners_(){var _this3=this;this.mainSegmentLoader_.on('bandwidthupdate',function(){var nextPlaylist=_this3.selectPlaylist();var currentPlaylist=_this3.masterPlaylistLoader_.media();var buffered=_this3.tech_.buffered();var forwardBuffer=buffered.length?buffered.end(buffered.length-1)-_this3.tech_.currentTime():0;var bufferLowWaterLine=_this3.bufferLowWaterLine();if(!currentPlaylist.endList||_this3.duration()<_config2['default'].MAX_BUFFER_LOW_WATER_LINE||nextPlaylist.attributes.BANDWIDTH<currentPlaylist.attributes.BANDWIDTH||forwardBuffer>=bufferLowWaterLine){_this3.masterPlaylistLoader_.media(nextPlaylist);}
80_this3.tech_.trigger('bandwidthupdate');});this.mainSegmentLoader_.on('progress',function(){_this3.trigger('progress');});this.mainSegmentLoader_.on('error',function(){_this3.blacklistCurrentPlaylist(_this3.mainSegmentLoader_.error());});this.mainSegmentLoader_.on('syncinfoupdate',function(){_this3.onSyncInfoUpdate_();});this.mainSegmentLoader_.on('timestampoffset',function(){_this3.tech_.trigger({type:'usage',name:'hls-timestamp-offset'});});this.audioSegmentLoader_.on('syncinfoupdate',function(){_this3.onSyncInfoUpdate_();});this.mainSegmentLoader_.on('ended',function(){_this3.onEndOfStream();});this.mainSegmentLoader_.on('earlyabort',function(){_this3.blacklistCurrentPlaylist({message:'Aborted early because there isn\'t enough bandwidth to complete the '+'request without rebuffering.'},ABORT_EARLY_BLACKLIST_SECONDS);});this.mainSegmentLoader_.on('reseteverything',function(){_this3.tech_.trigger('hls-reset');});this.audioSegmentLoader_.on('ended',function(){_this3.onEndOfStream();});}},{key:'mediaSecondsLoaded_',value:function mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded);}},{key:'load',value:function load(){this.mainSegmentLoader_.load();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.load();}
81if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.load();}}},{key:'fastQualityChange_',value:function fastQualityChange_(){var media=this.selectPlaylist();if(media!==this.masterPlaylistLoader_.media()){this.masterPlaylistLoader_.media(media);this.mainSegmentLoader_.resetLoader();}}},{key:'play',value:function play(){if(this.setupFirstPlay()){return;}
82if(this.tech_.ended()){this.tech_.setCurrentTime(0);}
83if(this.hasPlayed_()){this.load();}
84var seekable=this.tech_.seekable();if(this.tech_.duration()===Infinity){if(this.tech_.currentTime()<seekable.start(0)){return this.tech_.setCurrentTime(seekable.end(seekable.length-1));}}}},{key:'setupFirstPlay',value:function setupFirstPlay(){var seekable=undefined;var media=this.masterPlaylistLoader_.media();if(media&&!this.tech_.paused()&&!this.hasPlayed_()){if(!media.endList){this.trigger('firstplay');seekable=this.seekable();if(seekable.length){this.tech_.setCurrentTime(seekable.end(0));}}
85this.hasPlayed_=function(){return true;};this.load();return true;}
86return false;}},{key:'handleSourceOpen_',value:function handleSourceOpen_(){try{this.setupSourceBuffers_();}catch(e){_videoJs2['default'].log.warn('Failed to create Source Buffers',e);return this.mediaSource.endOfStream('decode');}
87if(this.tech_.autoplay()){this.tech_.play();}
88this.trigger('sourceopen');}},{key:'onEndOfStream',value:function onEndOfStream(){var isEndOfStream=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){isEndOfStream=isEndOfStream&&this.audioSegmentLoader_.ended_;}
89if(isEndOfStream){this.mediaSource.endOfStream();}}},{key:'stuckAtPlaylistEnd_',value:function stuckAtPlaylistEnd_(playlist){var seekable=this.seekable();if(!seekable.length){return false;}
90var expired=this.syncController_.getExpiredTime(playlist,this.mediaSource.duration);if(expired===null){return false;}
91var absolutePlaylistEnd=Hls.Playlist.playlistEnd(playlist,expired);var currentTime=this.tech_.currentTime();var buffered=this.tech_.buffered();if(!buffered.length){return absolutePlaylistEnd-currentTime<=_ranges2['default'].TIME_FUDGE_FACTOR;}
92var bufferedEnd=buffered.end(buffered.length-1);return bufferedEnd-currentTime<=_ranges2['default'].TIME_FUDGE_FACTOR&&absolutePlaylistEnd-bufferedEnd<=_ranges2['default'].TIME_FUDGE_FACTOR;}},{key:'blacklistCurrentPlaylist',value:function blacklistCurrentPlaylist(error,blacklistDuration){if(error===undefined)error={};var currentPlaylist=undefined;var nextPlaylist=undefined;currentPlaylist=error.playlist||this.masterPlaylistLoader_.media();if(!currentPlaylist){this.error=error;try{return this.mediaSource.endOfStream('network');}catch(e){return this.trigger('error');}}
93var isFinalRendition=this.masterPlaylistLoader_.isFinalRendition_();if(isFinalRendition){_videoJs2['default'].log.warn('Problem encountered with the current '+'HLS playlist. Trying again since it is the final playlist.');this.tech_.trigger('retryplaylist');return this.masterPlaylistLoader_.load(isFinalRendition);}
94currentPlaylist.excludeUntil=Date.now()+(blacklistDuration?blacklistDuration:this.blacklistDuration)*1000;this.tech_.trigger('blacklistplaylist');this.tech_.trigger({type:'usage',name:'hls-rendition-blacklisted'});nextPlaylist=this.selectPlaylist();_videoJs2['default'].log.warn('Problem encountered with the current HLS playlist.'+(error.message?' '+error.message:'')+' Switching to another playlist.');return this.masterPlaylistLoader_.media(nextPlaylist);}},{key:'pauseLoading',value:function pauseLoading(){this.mainSegmentLoader_.pause();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.pause();}
95if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.pause();}}},{key:'setCurrentTime',value:function setCurrentTime(currentTime){var buffered=_ranges2['default'].findRange(this.tech_.buffered(),currentTime);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())){return 0;}
96if(!this.masterPlaylistLoader_.media().segments){return 0;}
97var isFlash=this.mode_==='flash'||this.mode_==='auto'&&!_videoJs2['default'].MediaSource.supportsNativeMediaSources();if(buffered&&buffered.length&&!isFlash){return currentTime;}
98this.mainSegmentLoader_.resetEverything();this.mainSegmentLoader_.abort();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.resetEverything();this.audioSegmentLoader_.abort();}
99if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.resetEverything();this.subtitleSegmentLoader_.abort();}
100this.load();}},{key:'duration',value:function duration(){if(!this.masterPlaylistLoader_){return 0;}
101if(this.mediaSource){return this.mediaSource.duration;}
102return Hls.Playlist.duration(this.masterPlaylistLoader_.media());}},{key:'seekable',value:function seekable(){return this.seekable_;}},{key:'onSyncInfoUpdate_',value:function onSyncInfoUpdate_(){var mainSeekable=undefined;var audioSeekable=undefined;if(!this.masterPlaylistLoader_){return;}
103var media=this.masterPlaylistLoader_.media();if(!media){return;}
104var expired=this.syncController_.getExpiredTime(media,this.mediaSource.duration);if(expired===null){return;}
105mainSeekable=Hls.Playlist.seekable(media,expired);if(mainSeekable.length===0){return;}
106if(this.mediaTypes_.AUDIO.activePlaylistLoader){media=this.mediaTypes_.AUDIO.activePlaylistLoader.media();expired=this.syncController_.getExpiredTime(media,this.mediaSource.duration);if(expired===null){return;}
107audioSeekable=Hls.Playlist.seekable(media,expired);if(audioSeekable.length===0){return;}}
108if(!audioSeekable){this.seekable_=mainSeekable;}else if(audioSeekable.start(0)>mainSeekable.end(0)||mainSeekable.start(0)>audioSeekable.end(0)){this.seekable_=mainSeekable;}else{this.seekable_=_videoJs2['default'].createTimeRanges([[audioSeekable.start(0)>mainSeekable.start(0)?audioSeekable.start(0):mainSeekable.start(0),audioSeekable.end(0)<mainSeekable.end(0)?audioSeekable.end(0):mainSeekable.end(0)]]);}
109this.tech_.trigger('seekablechanged');}},{key:'updateDuration',value:function updateDuration(){var _this4=this;var oldDuration=this.mediaSource.duration;var newDuration=Hls.Playlist.duration(this.masterPlaylistLoader_.media());var buffered=this.tech_.buffered();var setDuration=function setDuration(){_this4.mediaSource.duration=newDuration;_this4.tech_.trigger('durationchange');_this4.mediaSource.removeEventListener('sourceopen',setDuration);};if(buffered.length>0){newDuration=Math.max(newDuration,buffered.end(buffered.length-1));}
110if(oldDuration!==newDuration){if(this.mediaSource.readyState!=='open'){this.mediaSource.addEventListener('sourceopen',setDuration);}else{setDuration();}}}},{key:'dispose',value:function dispose(){var _this5=this;this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();['AUDIO','SUBTITLES'].forEach(function(type){var groups=_this5.mediaTypes_[type].groups;for(var id in groups){groups[id].forEach(function(group){if(group.playlistLoader){group.playlistLoader.dispose();}});}});this.audioSegmentLoader_.dispose();this.subtitleSegmentLoader_.dispose();}},{key:'master',value:function master(){return this.masterPlaylistLoader_.master;}},{key:'media',value:function media(){return this.masterPlaylistLoader_.media()||this.initialMedia_;}},{key:'setupSourceBuffers_',value:function setupSourceBuffers_(){var media=this.masterPlaylistLoader_.media();var mimeTypes=undefined;if(!media||this.mediaSource.readyState!=='open'){return;}
111mimeTypes=mimeTypesForPlaylist_(this.masterPlaylistLoader_.master,media);if(mimeTypes.length<1){this.error='No compatible SourceBuffer configuration for the variant stream:'+media.resolvedUri;return this.mediaSource.endOfStream('decode');}
112this.mainSegmentLoader_.mimeType(mimeTypes[0]);if(mimeTypes[1]){this.audioSegmentLoader_.mimeType(mimeTypes[1]);}
113this.excludeIncompatibleVariants_(media);}},{key:'excludeIncompatibleVariants_',value:function excludeIncompatibleVariants_(media){var master=this.masterPlaylistLoader_.master;var codecCount=2;var videoCodec=null;var codecs=undefined;if(media.attributes.CODECS){codecs=(0,_utilCodecsJs.parseCodecs)(media.attributes.CODECS);videoCodec=codecs.videoCodec;codecCount=codecs.codecCount;}
114master.playlists.forEach(function(variant){var variantCodecs={codecCount:2,videoCodec:null};if(variant.attributes.CODECS){var codecString=variant.attributes.CODECS;variantCodecs=(0,_utilCodecsJs.parseCodecs)(codecString);if(window.MediaSource&&window.MediaSource.isTypeSupported&&!window.MediaSource.isTypeSupported('video/mp4; codecs="'+mapLegacyAvcCodecs_(codecString)+'"')){variant.excludeUntil=Infinity;}}
115if(variantCodecs.codecCount!==codecCount){variant.excludeUntil=Infinity;}
116if(variantCodecs.videoCodec!==videoCodec){variant.excludeUntil=Infinity;}});}},{key:'updateAdCues_',value:function updateAdCues_(media){var offset=0;var seekable=this.seekable();if(seekable.length){offset=seekable.start(0);}
117_adCueTags2['default'].updateAdCues(media,this.cueTagsTrack_,offset);}},{key:'goalBufferLength',value:function goalBufferLength(){var currentTime=this.tech_.currentTime();var initial=_config2['default'].GOAL_BUFFER_LENGTH;var rate=_config2['default'].GOAL_BUFFER_LENGTH_RATE;var max=Math.max(initial,_config2['default'].MAX_GOAL_BUFFER_LENGTH);return Math.min(initial+currentTime*rate,max);}},{key:'bufferLowWaterLine',value:function bufferLowWaterLine(){var currentTime=this.tech_.currentTime();var initial=_config2['default'].BUFFER_LOW_WATER_LINE;var rate=_config2['default'].BUFFER_LOW_WATER_LINE_RATE;var max=Math.max(initial,_config2['default'].MAX_BUFFER_LOW_WATER_LINE);return Math.min(initial+currentTime*rate,max);}}]);return MasterPlaylistController;})(_videoJs2['default'].EventTarget);exports.MasterPlaylistController=MasterPlaylistController;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./ad-cue-tags":1,"./config":3,"./decrypter-worker":4,"./media-groups":6,"./playlist-loader":9,"./ranges":12,"./segment-loader":16,"./sync-controller":18,"./util/codecs.js":19,"./vtt-segment-loader":20,"videojs-contrib-media-sources/es5/codec-utils":65,"webworkify":76}],6:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
118var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _playlistLoader=require('./playlist-loader');var _playlistLoader2=_interopRequireDefault(_playlistLoader);var noop=function noop(){};var audioTrackKind_=function audioTrackKind_(properties){var kind=properties['default']?'main':'alternative';if(properties.characteristics&&properties.characteristics.indexOf('public.accessibility.describes-video')>=0){kind='main-desc';}
119return kind;};var stopLoaders=function stopLoaders(segmentLoader,mediaType){segmentLoader.abort();segmentLoader.pause();if(mediaType&&mediaType.activePlaylistLoader){mediaType.activePlaylistLoader.pause();mediaType.activePlaylistLoader=null;}};exports.stopLoaders=stopLoaders;var startLoaders=function startLoaders(playlistLoader,mediaType){mediaType.activePlaylistLoader=playlistLoader;playlistLoader.load();};exports.startLoaders=startLoaders;var onGroupChanged=function onGroupChanged(type,settings){return function(){var _settings$segmentLoaders=settings.segmentLoaders;var segmentLoader=_settings$segmentLoaders[type];var mainSegmentLoader=_settings$segmentLoaders.main;var mediaType=settings.mediaTypes[type];var activeTrack=mediaType.activeTrack();var activeGroup=mediaType.activeGroup(activeTrack);var previousActiveLoader=mediaType.activePlaylistLoader;stopLoaders(segmentLoader,mediaType);if(!activeGroup){return;}
120if(!activeGroup.playlistLoader){if(previousActiveLoader){mainSegmentLoader.resetEverything();}
121return;}
122segmentLoader.resyncLoader();startLoaders(activeGroup.playlistLoader,mediaType);};};exports.onGroupChanged=onGroupChanged;var onTrackChanged=function onTrackChanged(type,settings){return function(){var _settings$segmentLoaders2=settings.segmentLoaders;var segmentLoader=_settings$segmentLoaders2[type];var mainSegmentLoader=_settings$segmentLoaders2.main;var mediaType=settings.mediaTypes[type];var activeTrack=mediaType.activeTrack();var activeGroup=mediaType.activeGroup(activeTrack);var previousActiveLoader=mediaType.activePlaylistLoader;stopLoaders(segmentLoader,mediaType);if(!activeGroup){return;}
123if(!activeGroup.playlistLoader){mainSegmentLoader.resetEverything();return;}
124if(previousActiveLoader===activeGroup.playlistLoader){startLoaders(activeGroup.playlistLoader,mediaType);return;}
125if(segmentLoader.track){segmentLoader.track(activeTrack);}
126segmentLoader.resetEverything();startLoaders(activeGroup.playlistLoader,mediaType);};};exports.onTrackChanged=onTrackChanged;var onError={AUDIO:function AUDIO(type,settings){return function(){var segmentLoader=settings.segmentLoaders[type];var mediaType=settings.mediaTypes[type];var blacklistCurrentPlaylist=settings.blacklistCurrentPlaylist;stopLoaders(segmentLoader,mediaType);var activeTrack=mediaType.activeTrack();var activeGroup=mediaType.activeGroup();var id=(activeGroup.filter(function(group){return group['default'];})[0]||activeGroup[0]).id;var defaultTrack=mediaType.tracks[id];if(activeTrack===defaultTrack){blacklistCurrentPlaylist({message:'Problem encountered loading the default audio track.'});return;}
127_videoJs2['default'].log.warn('Problem encountered loading the alternate audio track.'+'Switching back to default.');for(var trackId in mediaType.tracks){mediaType.tracks[trackId].enabled=mediaType.tracks[trackId]===defaultTrack;}
128mediaType.onTrackChanged();};},SUBTITLES:function SUBTITLES(type,settings){return function(){var segmentLoader=settings.segmentLoaders[type];var mediaType=settings.mediaTypes[type];_videoJs2['default'].log.warn('Problem encountered loading the subtitle track.'+'Disabling subtitle track.');stopLoaders(segmentLoader,mediaType);var track=mediaType.activeTrack();if(track){track.mode='disabled';}
129mediaType.onTrackChanged();};}};exports.onError=onError;var setupListeners={AUDIO:function AUDIO(type,playlistLoader,settings){if(!playlistLoader){return;}
130var tech=settings.tech;var requestOptions=settings.requestOptions;var segmentLoader=settings.segmentLoaders[type];playlistLoader.on('loadedmetadata',function(){var media=playlistLoader.media();segmentLoader.playlist(media,requestOptions);if(!tech.paused()||media.endList&&tech.preload()!=='none'){segmentLoader.load();}});playlistLoader.on('loadedplaylist',function(){segmentLoader.playlist(playlistLoader.media(),requestOptions);if(!tech.paused()){segmentLoader.load();}});playlistLoader.on('error',onError[type](type,settings));},SUBTITLES:function SUBTITLES(type,playlistLoader,settings){var tech=settings.tech;var requestOptions=settings.requestOptions;var segmentLoader=settings.segmentLoaders[type];var mediaType=settings.mediaTypes[type];playlistLoader.on('loadedmetadata',function(){var media=playlistLoader.media();segmentLoader.playlist(media,requestOptions);segmentLoader.track(mediaType.activeTrack());if(!tech.paused()||media.endList&&tech.preload()!=='none'){segmentLoader.load();}});playlistLoader.on('loadedplaylist',function(){segmentLoader.playlist(playlistLoader.media(),requestOptions);if(!tech.paused()){segmentLoader.load();}});playlistLoader.on('error',onError[type](type,settings));}};exports.setupListeners=setupListeners;var initialize={'AUDIO':function AUDIO(type,settings){var mode=settings.mode;var hls=settings.hls;var segmentLoader=settings.segmentLoaders[type];var withCredentials=settings.requestOptions.withCredentials;var mediaGroups=settings.master.mediaGroups;var _settings$mediaTypes$type=settings.mediaTypes[type];var groups=_settings$mediaTypes$type.groups;var tracks=_settings$mediaTypes$type.tracks;if(!mediaGroups[type]||Object.keys(mediaGroups[type]).length===0||mode!=='html5'){mediaGroups[type]={main:{'default':{'default':true}}};}
131for(var groupId in mediaGroups[type]){if(!groups[groupId]){groups[groupId]=[];}
132for(var variantLabel in mediaGroups[type][groupId]){var properties=mediaGroups[type][groupId][variantLabel];var playlistLoader=undefined;if(properties.resolvedUri){playlistLoader=new _playlistLoader2['default'](properties.resolvedUri,hls,withCredentials);}else{playlistLoader=null;}
133properties=_videoJs2['default'].mergeOptions({id:variantLabel,playlistLoader:playlistLoader},properties);setupListeners[type](type,properties.playlistLoader,settings);groups[groupId].push(properties);if(typeof tracks[variantLabel]==='undefined'){var track=new _videoJs2['default'].AudioTrack({id:variantLabel,kind:audioTrackKind_(properties),enabled:false,language:properties.language,'default':properties['default'],label:variantLabel});tracks[variantLabel]=track;}}}
134segmentLoader.on('error',onError[type](type,settings));},'SUBTITLES':function SUBTITLES(type,settings){var tech=settings.tech;var hls=settings.hls;var segmentLoader=settings.segmentLoaders[type];var withCredentials=settings.requestOptions.withCredentials;var mediaGroups=settings.master.mediaGroups;var _settings$mediaTypes$type2=settings.mediaTypes[type];var groups=_settings$mediaTypes$type2.groups;var tracks=_settings$mediaTypes$type2.tracks;for(var groupId in mediaGroups[type]){if(!groups[groupId]){groups[groupId]=[];}
135for(var variantLabel in mediaGroups[type][groupId]){if(mediaGroups[type][groupId][variantLabel].forced){continue;}
136var properties=mediaGroups[type][groupId][variantLabel];properties=_videoJs2['default'].mergeOptions({id:variantLabel,playlistLoader:new _playlistLoader2['default'](properties.resolvedUri,hls,withCredentials)},properties);setupListeners[type](type,properties.playlistLoader,settings);groups[groupId].push(properties);if(typeof tracks[variantLabel]==='undefined'){var track=tech.addRemoteTextTrack({id:variantLabel,kind:'subtitles',enabled:false,language:properties.language,label:variantLabel},false).track;tracks[variantLabel]=track;}}}
137segmentLoader.on('error',onError[type](type,settings));},'CLOSED-CAPTIONS':function CLOSEDCAPTIONS(type,settings){var tech=settings.tech;var mediaGroups=settings.master.mediaGroups;var _settings$mediaTypes$type3=settings.mediaTypes[type];var groups=_settings$mediaTypes$type3.groups;var tracks=_settings$mediaTypes$type3.tracks;for(var groupId in mediaGroups[type]){if(!groups[groupId]){groups[groupId]=[];}
138for(var variantLabel in mediaGroups[type][groupId]){var properties=mediaGroups[type][groupId][variantLabel];if(!properties.instreamId.match(/CC\d/)){continue;}
139groups[groupId].push(_videoJs2['default'].mergeOptions({id:variantLabel},properties));if(typeof tracks[variantLabel]==='undefined'){var track=tech.addRemoteTextTrack({id:properties.instreamId,kind:'captions',enabled:false,language:properties.language,label:variantLabel},false).track;tracks[variantLabel]=track;}}}}};exports.initialize=initialize;var activeGroup=function activeGroup(type,settings){return function(track){var masterPlaylistLoader=settings.masterPlaylistLoader;var groups=settings.mediaTypes[type].groups;var media=masterPlaylistLoader.media();if(!media){return null;}
140var variants=null;if(media.attributes[type]){variants=groups[media.attributes[type]];}
141variants=variants||groups.main;if(typeof track==='undefined'){return variants;}
142if(track===null){return null;}
143return variants.filter(function(props){return props.id===track.id;})[0]||null;};};exports.activeGroup=activeGroup;var activeTrack={AUDIO:function AUDIO(type,settings){return function(){var tracks=settings.mediaTypes[type].tracks;for(var id in tracks){if(tracks[id].enabled){return tracks[id];}}
144return null;};},SUBTITLES:function SUBTITLES(type,settings){return function(){var tracks=settings.mediaTypes[type].tracks;for(var id in tracks){if(tracks[id].mode==='showing'){return tracks[id];}}
145return null;};}};exports.activeTrack=activeTrack;var setupMediaGroups=function setupMediaGroups(settings){['AUDIO','SUBTITLES','CLOSED-CAPTIONS'].forEach(function(type){initialize[type](type,settings);});var mediaTypes=settings.mediaTypes;var masterPlaylistLoader=settings.masterPlaylistLoader;var tech=settings.tech;var hls=settings.hls;['AUDIO','SUBTITLES'].forEach(function(type){mediaTypes[type].activeGroup=activeGroup(type,settings);mediaTypes[type].activeTrack=activeTrack[type](type,settings);mediaTypes[type].onGroupChanged=onGroupChanged(type,settings);mediaTypes[type].onTrackChanged=onTrackChanged(type,settings);});var audioGroup=mediaTypes.AUDIO.activeGroup();var groupId=(audioGroup.filter(function(group){return group['default'];})[0]||audioGroup[0]).id;mediaTypes.AUDIO.tracks[groupId].enabled=true;mediaTypes.AUDIO.onTrackChanged();masterPlaylistLoader.on('mediachange',function(){['AUDIO','SUBTITLES'].forEach(function(type){return mediaTypes[type].onGroupChanged();});});var onAudioTrackChanged=function onAudioTrackChanged(){mediaTypes.AUDIO.onTrackChanged();tech.trigger({type:'usage',name:'hls-audio-change'});};tech.audioTracks().addEventListener('change',onAudioTrackChanged);tech.remoteTextTracks().addEventListener('change',mediaTypes.SUBTITLES.onTrackChanged);hls.on('dispose',function(){tech.audioTracks().removeEventListener('change',onAudioTrackChanged);tech.remoteTextTracks().removeEventListener('change',mediaTypes.SUBTITLES.onTrackChanged);});tech.clearTracks('audio');for(var id in mediaTypes.AUDIO.tracks){tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);}};exports.setupMediaGroups=setupMediaGroups;var createMediaTypes=function createMediaTypes(){var mediaTypes={};['AUDIO','SUBTITLES','CLOSED-CAPTIONS'].forEach(function(type){mediaTypes[type]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:noop,activeTrack:noop,onGroupChanged:noop,onTrackChanged:noop};});return mediaTypes;};exports.createMediaTypes=createMediaTypes;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./playlist-loader":9}],7:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
146var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _binUtils=require('./bin-utils');var REQUEST_ERRORS={FAILURE:2,TIMEOUT:-101,ABORTED:-102};exports.REQUEST_ERRORS=REQUEST_ERRORS;var byterangeStr=function byterangeStr(byterange){var byterangeStart=undefined;var byterangeEnd=undefined;byterangeEnd=byterange.offset+byterange.length-1;byterangeStart=byterange.offset;return'bytes='+byterangeStart+'-'+byterangeEnd;};var segmentXhrHeaders=function segmentXhrHeaders(segment){var headers={};if(segment.byterange){headers.Range=byterangeStr(segment.byterange);}
147return headers;};var abortAll=function abortAll(activeXhrs){activeXhrs.forEach(function(xhr){xhr.abort();});};var getRequestStats=function getRequestStats(request){return{bandwidth:request.bandwidth,bytesReceived:request.bytesReceived||0,roundTripTime:request.roundTripTime||0};};var getProgressStats=function getProgressStats(progressEvent){var request=progressEvent.target;var roundTripTime=Date.now()-request.requestTime;var stats={bandwidth:Infinity,bytesReceived:0,roundTripTime:roundTripTime||0};stats.bytesReceived=progressEvent.loaded;stats.bandwidth=Math.floor(stats.bytesReceived/stats.roundTripTime*8*1000);return stats;};var handleErrors=function handleErrors(error,request){if(request.timedout){return{status:request.status,message:'HLS request timed-out at URL: '+request.uri,code:REQUEST_ERRORS.TIMEOUT,xhr:request};}
148if(request.aborted){return{status:request.status,message:'HLS request aborted at URL: '+request.uri,code:REQUEST_ERRORS.ABORTED,xhr:request};}
149if(error){return{status:request.status,message:'HLS request errored at URL: '+request.uri,code:REQUEST_ERRORS.FAILURE,xhr:request};}
150return null;};var handleKeyResponse=function handleKeyResponse(segment,finishProcessingFn){return function(error,request){var response=request.response;var errorObj=handleErrors(error,request);if(errorObj){return finishProcessingFn(errorObj,segment);}
151if(response.byteLength!==16){return finishProcessingFn({status:request.status,message:'Invalid HLS key at URL: '+request.uri,code:REQUEST_ERRORS.FAILURE,xhr:request},segment);}
152var view=new DataView(response);segment.key.bytes=new Uint32Array([view.getUint32(0),view.getUint32(4),view.getUint32(8),view.getUint32(12)]);return finishProcessingFn(null,segment);};};var handleInitSegmentResponse=function handleInitSegmentResponse(segment,finishProcessingFn){return function(error,request){var response=request.response;var errorObj=handleErrors(error,request);if(errorObj){return finishProcessingFn(errorObj,segment);}
153if(response.byteLength===0){return finishProcessingFn({status:request.status,message:'Empty HLS segment content at URL: '+request.uri,code:REQUEST_ERRORS.FAILURE,xhr:request},segment);}
154segment.map.bytes=new Uint8Array(request.response);return finishProcessingFn(null,segment);};};var handleSegmentResponse=function handleSegmentResponse(segment,finishProcessingFn){return function(error,request){var response=request.response;var errorObj=handleErrors(error,request);if(errorObj){return finishProcessingFn(errorObj,segment);}
155if(response.byteLength===0){return finishProcessingFn({status:request.status,message:'Empty HLS segment content at URL: '+request.uri,code:REQUEST_ERRORS.FAILURE,xhr:request},segment);}
156segment.stats=getRequestStats(request);if(segment.key){segment.encryptedBytes=new Uint8Array(request.response);}else{segment.bytes=new Uint8Array(request.response);}
157return finishProcessingFn(null,segment);};};var decryptSegment=function decryptSegment(decrypter,segment,doneFn){var decryptionHandler=function decryptionHandler(event){if(event.data.source===segment.requestId){decrypter.removeEventListener('message',decryptionHandler);var decrypted=event.data.decrypted;segment.bytes=new Uint8Array(decrypted.bytes,decrypted.byteOffset,decrypted.byteLength);return doneFn(null,segment);}};decrypter.addEventListener('message',decryptionHandler);decrypter.postMessage((0,_binUtils.createTransferableMessage)({source:segment.requestId,encrypted:segment.encryptedBytes,key:segment.key.bytes,iv:segment.key.iv}),[segment.encryptedBytes.buffer,segment.key.bytes.buffer]);};var getMostImportantError=function getMostImportantError(errors){return errors.reduce(function(prev,err){return err.code>prev.code?err:prev;});};var waitForCompletion=function waitForCompletion(activeXhrs,decrypter,doneFn){var errors=[];var count=0;return function(error,segment){if(error){abortAll(activeXhrs);errors.push(error);}
158count+=1;if(count===activeXhrs.length){segment.endOfAllRequests=Date.now();if(errors.length>0){var worstError=getMostImportantError(errors);return doneFn(worstError,segment);}
159if(segment.encryptedBytes){return decryptSegment(decrypter,segment,doneFn);}
160return doneFn(null,segment);}};};var handleProgress=function handleProgress(segment,progressFn){return function(event){segment.stats=_videoJs2['default'].mergeOptions(segment.stats,getProgressStats(event));if(!segment.stats.firstBytesReceivedAt&&segment.stats.bytesReceived){segment.stats.firstBytesReceivedAt=Date.now();}
161return progressFn(event,segment);};};var mediaSegmentRequest=function mediaSegmentRequest(xhr,xhrOptions,decryptionWorker,segment,progressFn,doneFn){var activeXhrs=[];var finishProcessingFn=waitForCompletion(activeXhrs,decryptionWorker,doneFn);if(segment.key){var keyRequestOptions=_videoJs2['default'].mergeOptions(xhrOptions,{uri:segment.key.resolvedUri,responseType:'arraybuffer'});var keyRequestCallback=handleKeyResponse(segment,finishProcessingFn);var keyXhr=xhr(keyRequestOptions,keyRequestCallback);activeXhrs.push(keyXhr);}
162if(segment.map&&!segment.map.bytes){var initSegmentOptions=_videoJs2['default'].mergeOptions(xhrOptions,{uri:segment.map.resolvedUri,responseType:'arraybuffer',headers:segmentXhrHeaders(segment.map)});var initSegmentRequestCallback=handleInitSegmentResponse(segment,finishProcessingFn);var initSegmentXhr=xhr(initSegmentOptions,initSegmentRequestCallback);activeXhrs.push(initSegmentXhr);}
163var segmentRequestOptions=_videoJs2['default'].mergeOptions(xhrOptions,{uri:segment.resolvedUri,responseType:'arraybuffer',headers:segmentXhrHeaders(segment)});var segmentRequestCallback=handleSegmentResponse(segment,finishProcessingFn);var segmentXhr=xhr(segmentRequestOptions,segmentRequestCallback);segmentXhr.addEventListener('progress',handleProgress(segment,progressFn));activeXhrs.push(segmentXhr);return function(){return abortAll(activeXhrs);};};exports.mediaSegmentRequest=mediaSegmentRequest;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./bin-utils":2}],8:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
164function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
165var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _ranges=require('./ranges');var _ranges2=_interopRequireDefault(_ranges);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var timerCancelEvents=['seeking','seeked','pause','playing','error'];var PlaybackWatcher=(function(){function PlaybackWatcher(options){var _this=this;_classCallCheck(this,PlaybackWatcher);this.tech_=options.tech;this.seekable=options.seekable;this.consecutiveUpdates=0;this.lastRecordedTime=null;this.timer_=null;this.checkCurrentTimeTimeout_=null;if(options.debug){this.logger_=_videoJs2['default'].log.bind(_videoJs2['default'],'playback-watcher ->');}
166this.logger_('initialize');var canPlayHandler=function canPlayHandler(){return _this.monitorCurrentTime_();};var waitingHandler=function waitingHandler(){return _this.techWaiting_();};var cancelTimerHandler=function cancelTimerHandler(){return _this.cancelTimer_();};var fixesBadSeeksHandler=function fixesBadSeeksHandler(){return _this.fixesBadSeeks_();};this.tech_.on('seekablechanged',fixesBadSeeksHandler);this.tech_.on('waiting',waitingHandler);this.tech_.on(timerCancelEvents,cancelTimerHandler);this.tech_.on('canplay',canPlayHandler);this.dispose=function(){_this.logger_('dispose');_this.tech_.off('seekablechanged',fixesBadSeeksHandler);_this.tech_.off('waiting',waitingHandler);_this.tech_.off(timerCancelEvents,cancelTimerHandler);_this.tech_.off('canplay',canPlayHandler);if(_this.checkCurrentTimeTimeout_){_globalWindow2['default'].clearTimeout(_this.checkCurrentTimeTimeout_);}
167_this.cancelTimer_();};}
168_createClass(PlaybackWatcher,[{key:'monitorCurrentTime_',value:function monitorCurrentTime_(){this.checkCurrentTime_();if(this.checkCurrentTimeTimeout_){_globalWindow2['default'].clearTimeout(this.checkCurrentTimeTimeout_);}
169this.checkCurrentTimeTimeout_=_globalWindow2['default'].setTimeout(this.monitorCurrentTime_.bind(this),250);}},{key:'checkCurrentTime_',value:function checkCurrentTime_(){if(this.tech_.seeking()&&this.fixesBadSeeks_()){this.consecutiveUpdates=0;this.lastRecordedTime=this.tech_.currentTime();return;}
170if(this.tech_.paused()||this.tech_.seeking()){return;}
171var currentTime=this.tech_.currentTime();var buffered=this.tech_.buffered();if(this.lastRecordedTime===currentTime&&(!buffered.length||currentTime+0.1>=buffered.end(buffered.length-1))){return this.techWaiting_();}
172if(this.consecutiveUpdates>=5&&currentTime===this.lastRecordedTime){this.consecutiveUpdates++;this.waiting_();}else if(currentTime===this.lastRecordedTime){this.consecutiveUpdates++;}else{this.consecutiveUpdates=0;this.lastRecordedTime=currentTime;}}},{key:'cancelTimer_',value:function cancelTimer_(){this.consecutiveUpdates=0;if(this.timer_){this.logger_('cancelTimer_');clearTimeout(this.timer_);}
173this.timer_=null;}},{key:'fixesBadSeeks_',value:function fixesBadSeeks_(){var seeking=this.tech_.seeking();var seekable=this.seekable();var currentTime=this.tech_.currentTime();
173var seekTo=undefined;if(seeking&&this.afterSeekableWindow_(seekable,currentTime)){var seekableEnd=seekable.end(seekable.length-1);seekTo=seekableEnd;}
174if(seeking&&this.beforeSeekableWindow_(seekable,currentTime)){var seekableStart=seekable.start(0);seekTo=seekableStart+0.1;}
175if(typeof seekTo!=='undefined'){this.logger_('Trying to seek outside of seekable at time '+currentTime+' with '+('seekable range '+_ranges2['default'].printableRange(seekable)+'. Seeking to ')+(seekTo+'.'));this.tech_.setCurrentTime(seekTo);return true;}
176return false;}},{key:'waiting_',value:function waiting_(){if(this.techWaiting_()){return;}
177var currentTime=this.tech_.currentTime();var buffered=this.tech_.buffered();var currentRange=_ranges2['default'].findRange(buffered,currentTime);if(currentRange.length&&currentTime+3<=currentRange.end(0)){this.cancelTimer_();this.tech_.setCurrentTime(currentTime);this.logger_('Stopped at '+currentTime+' while inside a buffered region '+('['+currentRange.start(0)+' -> '+currentRange.end(0)+']. Attempting to resume ')+'playback by seeking to the current time.');this.tech_.trigger({type:'usage',name:'hls-unknown-waiting'});return;}}},{key:'techWaiting_',value:function techWaiting_(){var seekable=this.seekable();var currentTime=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_()){return true;}
178if(this.tech_.seeking()||this.timer_!==null){return true;}
179if(this.beforeSeekableWindow_(seekable,currentTime)){var livePoint=seekable.end(seekable.length-1);this.logger_('Fell out of live window at time '+currentTime+'. Seeking to '+('live point (seekable end) '+livePoint));this.cancelTimer_();this.tech_.setCurrentTime(livePoint);this.tech_.trigger({type:'usage',name:'hls-live-resync'});return true;}
180var buffered=this.tech_.buffered();var nextRange=_ranges2['default'].findNextRange(buffered,currentTime);if(this.videoUnderflow_(nextRange,buffered,currentTime)){this.cancelTimer_();this.tech_.setCurrentTime(currentTime);this.tech_.trigger({type:'usage',name:'hls-video-underflow'});return true;}
181if(nextRange.length>0){var difference=nextRange.start(0)-currentTime;this.logger_('Stopped at '+currentTime+', setting timer for '+difference+', seeking '+('to '+nextRange.start(0)));this.timer_=setTimeout(this.skipTheGap_.bind(this),difference*1000,currentTime);return true;}
182return false;}},{key:'afterSeekableWindow_',value:function afterSeekableWindow_(seekable,currentTime){if(!seekable.length){return false;}
183if(currentTime>seekable.end(seekable.length-1)+0.1){return true;}
184return false;}},{key:'beforeSeekableWindow_',value:function beforeSeekableWindow_(seekable,currentTime){if(seekable.length&&seekable.start(0)>0&&currentTime<seekable.start(0)-0.1){return true;}
185return false;}},{key:'videoUnderflow_',value:function videoUnderflow_(nextRange,buffered,currentTime){if(nextRange.length===0){var gap=this.gapFromVideoUnderflow_(buffered,currentTime);if(gap){this.logger_('Encountered a gap in video from '+gap.start+' to '+gap.end+'. '+('Seeking to current time '+currentTime));return true;}}
186return false;}},{key:'skipTheGap_',value:function skipTheGap_(scheduledCurrentTime){var buffered=this.tech_.buffered();var currentTime=this.tech_.currentTime();var nextRange=_ranges2['default'].findNextRange(buffered,currentTime);this.cancelTimer_();if(nextRange.length===0||currentTime!==scheduledCurrentTime){return;}
187this.logger_('skipTheGap_:','currentTime:',currentTime,'scheduled currentTime:',scheduledCurrentTime,'nextRange start:',nextRange.start(0));this.tech_.setCurrentTime(nextRange.start(0)+_ranges2['default'].TIME_FUDGE_FACTOR);this.tech_.trigger({type:'usage',name:'hls-gap-skip'});}},{key:'gapFromVideoUnderflow_',value:function gapFromVideoUnderflow_(buffered,currentTime){var gaps=_ranges2['default'].findGaps(buffered);for(var i=0;i<gaps.length;i++){var start=gaps.start(i);var end=gaps.end(i);if(currentTime-start<4&&currentTime-start>2){return{start:start,end:end};}}
188return null;}},{key:'logger_',value:function logger_(){}}]);return PlaybackWatcher;})();exports['default']=PlaybackWatcher;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./ranges":12,"global/window":32}],9:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
189var _resolveUrl=require('./resolve-url');var _resolveUrl2=_interopRequireDefault(_resolveUrl);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _playlistJs=require('./playlist.js');var _m3u8Parser=require('m3u8-parser');var _m3u8Parser2=_interopRequireDefault(_m3u8Parser);var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var updateSegments=function updateSegments(original,update,offset){var result=update.slice();var length=undefined;var i=undefined;offset=offset||0;length=Math.min(original.length,update.length+offset);for(i=offset;i<length;i++){result[i-offset]=(0,_videoJs.mergeOptions)(original[i],result[i-offset]);}
190return result;};var updateMaster=function updateMaster(master,media){var changed=false;var result=(0,_videoJs.mergeOptions)(master,{});var i=master.playlists.length;var playlist=undefined;var segment=undefined;var j=undefined;while(i--){playlist=result.playlists[i];if(playlist.uri===media.uri){if(playlist.segments&&media.segments&&playlist.segments.length===media.segments.length&&playlist.mediaSequence===media.mediaSequence){continue;}
191result.playlists[i]=(0,_videoJs.mergeOptions)(playlist,media);result.playlists[media.uri]=result.playlists[i];if(playlist.segments){result.playlists[i].segments=updateSegments(playlist.segments,media.segments,media.mediaSequence-playlist.mediaSequence);}
192j=0;if(result.playlists[i].segments){j=result.playlists[i].segments.length;}
193while(j--){segment=result.playlists[i].segments[j];if(!segment.resolvedUri){segment.resolvedUri=(0,_resolveUrl2['default'])(playlist.resolvedUri,segment.uri);}
194if(segment.key&&!segment.key.resolvedUri){segment.key.resolvedUri=(0,_resolveUrl2['default'])(playlist.resolvedUri,segment.key.uri);}
195if(segment.map&&!segment.map.resolvedUri){segment.map.resolvedUri=(0,_resolveUrl2['default'])(playlist.resolvedUri,segment.map.uri);}}
196changed=true;}}
197return changed?result:null;};var PlaylistLoader=function PlaylistLoader(srcUrl,hls,withCredentials){var _this=this;var loader=this;var mediaUpdateTimeout=undefined;var request=undefined;var playlistRequestError=undefined;var haveMetadata=undefined;PlaylistLoader.prototype.constructor.call(this);this.hls_=hls;if(!srcUrl){throw new Error('A non-empty playlist URL is required');}
198playlistRequestError=function(xhr,url,startingState){loader.setBandwidth(request||xhr);request=null;if(startingState){loader.state=startingState;}
199loader.error={playlist:loader.master.playlists[url],status:xhr.status,message:'HLS playlist request error at URL: '+url,responseText:xhr.responseText,code:xhr.status>=500?4:2};loader.trigger('error');};haveMetadata=function(xhr,url){var parser=undefined;var refreshDelay=undefined;var update=undefined;loader.setBandwidth(request||xhr);request=null;loader.state='HAVE_METADATA';parser=new _m3u8Parser2['default'].Parser();parser.push(xhr.responseText);parser.end();parser.manifest.uri=url;parser.manifest.attributes=parser.manifest.attributes||{};update=updateMaster(loader.master,parser.manifest);refreshDelay=(parser.manifest.targetDuration||10)*1000;loader.targetDuration=parser.manifest.targetDuration;if(update){loader.master=update;loader.media_=loader.master.playlists[parser.manifest.uri];}else{refreshDelay/=2;loader.trigger('playlistunchanged');}
200if(!loader.media().endList){_globalWindow2['default'].clearTimeout(mediaUpdateTimeout);mediaUpdateTimeout=_globalWindow2['default'].setTimeout(function(){loader.trigger('mediaupdatetimeout');},refreshDelay);}
201loader.trigger('loadedplaylist');};loader.state='HAVE_NOTHING';loader.dispose=function(){loader.stopRequest();_globalWindow2['default'].clearTimeout(mediaUpdateTimeout);loader.off();};loader.stopRequest=function(){if(request){var oldRequest=request;request=null;oldRequest.onreadystatechange=null;oldRequest.abort();}};loader.enabledPlaylists_=function(){return loader.master.playlists.filter(_playlistJs.isEnabled).length;};loader.isLowestEnabledRendition_=function(){if(loader.master.playlists.length===1){return true;}
202var media=loader.media();var currentBandwidth=media.attributes.BANDWIDTH||Number.MAX_VALUE;return loader.master.playlists.filter(function(playlist){var enabled=(0,_playlistJs.isEnabled)(playlist);
202if(!enabled){return false;}
203return(playlist.attributes.BANDWIDTH||0)<currentBandwidth;}).length===0;};loader.isFinalRendition_=function(){return loader.master.playlists.filter(_playlistJs.isEnabled).length===1;};loader.media=function(playlist){var startingState=loader.state;var mediaChange=undefined;if(!playlist){return loader.media_;}
204if(loader.state==='HAVE_NOTHING'){throw new Error('Cannot switch media playlist from '+loader.state);}
205if(typeof playlist==='string'){if(!loader.master.playlists[playlist]){throw new Error('Unknown playlist URI: '+playlist);}
206playlist=loader.master.playlists[playlist];}
207mediaChange=!loader.media_||playlist.uri!==loader.media_.uri;if(loader.master.playlists[playlist.uri].endList){if(request){request.onreadystatechange=null;request.abort();request=null;}
208loader.state='HAVE_METADATA';loader.media_=playlist;if(mediaChange){loader.trigger('mediachanging');loader.trigger('mediachange');}
209return;}
210if(!mediaChange){return;}
211loader.state='SWITCHING_MEDIA';if(request){if((0,_resolveUrl2['default'])(loader.master.uri,playlist.uri)===request.url){return;}
212request.onreadystatechange=null;request.abort();request=null;}
213if(this.media_){this.trigger('mediachanging');}
214request=this.hls_.xhr({uri:(0,_resolveUrl2['default'])(loader.master.uri,playlist.uri),withCredentials:withCredentials},function(error,req){if(!request){return;}
215if(error){return playlistRequestError(request,playlist.uri,startingState);}
216haveMetadata(req,playlist.uri);if(startingState==='HAVE_MASTER'){loader.trigger('loadedmetadata');}else{loader.trigger('mediachange');}});};loader.setBandwidth=function(xhr){loader.bandwidth=xhr.bandwidth;};loader.on('mediaupdatetimeout',function(){if(loader.state!=='HAVE_METADATA'){return;}
217loader.state='HAVE_CURRENT_METADATA';request=this.hls_.xhr({uri:(0,_resolveUrl2['default'])(loader.master.uri,loader.media().uri),withCredentials:withCredentials},function(error,req){if(!request){return;}
218if(error){return playlistRequestError(request,loader.media().uri,'HAVE_METADATA');}
219haveMetadata(request,loader.media().uri);});});loader.pause=function(){loader.stopRequest();_globalWindow2['default'].clearTimeout(mediaUpdateTimeout);if(loader.state==='HAVE_NOTHING'){loader.started=false;}
220if(loader.state==='SWITCHING_MEDIA'){if(loader.media_){loader.state='HAVE_METADATA';}else{loader.state='HAVE_MASTER';}}else if(loader.state==='HAVE_CURRENT_METADATA'){loader.state='HAVE_METADATA';}};loader.load=function(isFinalRendition){var media=loader.media();_globalWindow2['default'].clearTimeout(mediaUpdateTimeout);if(isFinalRendition){var refreshDelay=media?media.targetDuration/2*1000:5*1000;mediaUpdateTimeout=_globalWindow2['default'].setTimeout(loader.load.bind(null,false),refreshDelay);return;}
221if(!loader.started){loader.start();return;}
222if(media&&!media.endList){loader.trigger('mediaupdatetimeout');}else{loader.trigger('loadedplaylist');}};loader.start=function(){loader.started=true;request=_this.hls_.xhr({uri:srcUrl,withCredentials:withCredentials},function(error,req){var parser=undefined;var playlist=undefined;var i=undefined;if(!request){return;}
223request=null;if(error){loader.error={status:req.status,message:'HLS playlist request error at URL: '+srcUrl,responseText:req.responseText,code:2};if(loader.state==='HAVE_NOTHING'){loader.started=false;}
224return loader.trigger('error');}
225parser=new _m3u8Parser2['default'].Parser();parser.push(req.responseText);parser.end();loader.state='HAVE_MASTER';parser.manifest.uri=srcUrl;if(parser.manifest.playlists){loader.master=parser.manifest;i=loader.master.playlists.length;while(i--){playlist=loader.master.playlists[i];loader.master.playlists[playlist.uri]=playlist;playlist.resolvedUri=(0,_resolveUrl2['default'])(loader.master.uri,playlist.uri);if(!playlist.attributes){playlist.attributes={};_videoJs.log.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');}}
226['AUDIO','SUBTITLES'].forEach(function(mediaType){for(var groupKey in loader.master.mediaGroups[mediaType]){for(var labelKey in loader.master.mediaGroups[mediaType][groupKey]){var mediaProperties=loader.master.mediaGroups[mediaType][groupKey][labelKey];if(mediaProperties.uri){mediaProperties.resolvedUri=(0,_resolveUrl2['default'])(loader.master.uri,mediaProperties.uri);}}}});loader.trigger('loadedplaylist');if(!request){loader.media(parser.manifest.playlists[0]);}
227return;}
228loader.master={mediaGroups:{'AUDIO':{},'VIDEO':{},'CLOSED-CAPTIONS':{},'SUBTITLES':{}},uri:_globalWindow2['default'].location.href,playlists:[{uri:srcUrl}]};loader.master.playlists[srcUrl]=loader.master.playlists[0];loader.master.playlists[0].resolvedUri=srcUrl;loader.master.playlists[0].attributes=loader.master.playlists[0].attributes||{};haveMetadata(req,srcUrl);return loader.trigger('loadedmetadata');});};};PlaylistLoader.prototype=new _videoJs.EventTarget();
vendor: 144,418 bytes, lines 228-694
228exports['default']=PlaylistLoader;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./playlist.js":11,"./resolve-url":15,"global/window":32,"m3u8-parser":33}],10:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
229var _config=require('./config');var _config2=_interopRequireDefault(_config);var _playlist=require('./playlist');var _playlist2=_interopRequireDefault(_playlist);var _utilCodecsJs=require('./util/codecs.js');var safeGetComputedStyle=function safeGetComputedStyle(el,property){var result=undefined;if(!el){return'';}
230result=window.getComputedStyle(el);if(!result){return'';}
231return result[property];};var stableSort=function stableSort(array,sortFn){var newArray=array.slice();array.sort(function(left,right){var cmp=sortFn(left,right);if(cmp===0){return newArray.indexOf(left)-newArray.indexOf(right);}
232return cmp;});};var comparePlaylistBandwidth=function comparePlaylistBandwidth(left,right){var leftBandwidth=undefined;var rightBandwidth=undefined;if(left.attributes.BANDWIDTH){leftBandwidth=left.attributes.BANDWIDTH;}
233leftBandwidth=leftBandwidth||window.Number.MAX_VALUE;if(right.attributes.BANDWIDTH){rightBandwidth=right.attributes.BANDWIDTH;}
234rightBandwidth=rightBandwidth||window.Number.MAX_VALUE;return leftBandwidth-rightBandwidth;};exports.comparePlaylistBandwidth=comparePlaylistBandwidth;var comparePlaylistResolution=function comparePlaylistResolution(left,right){var leftWidth=undefined;var rightWidth=undefined;if(left.attributes.RESOLUTION&&left.attributes.RESOLUTION.width){leftWidth=left.attributes.RESOLUTION.width;}
235leftWidth=leftWidth||window.Number.MAX_VALUE;if(right.attributes.RESOLUTION&&right.attributes.RESOLUTION.width){rightWidth=right.attributes.RESOLUTION.width;}
236rightWidth=rightWidth||window.Number.MAX_VALUE;if(leftWidth===rightWidth&&left.attributes.BANDWIDTH&&right.attributes.BANDWIDTH){return left.attributes.BANDWIDTH-right.attributes.BANDWIDTH;}
237return leftWidth-rightWidth;};exports.comparePlaylistResolution=comparePlaylistResolution;var simpleSelector=function simpleSelector(master,playerBandwidth,playerWidth,playerHeight){var sortedPlaylistReps=master.playlists.map(function(playlist){var width=undefined;var height=undefined;var bandwidth=undefined;width=playlist.attributes.RESOLUTION&&playlist.attributes.RESOLUTION.width;height=playlist.attributes.RESOLUTION&&playlist.attributes.RESOLUTION.height;bandwidth=playlist.attributes.BANDWIDTH;bandwidth=bandwidth||window.Number.MAX_VALUE;return{bandwidth:bandwidth,width:width,height:height,playlist:playlist};});stableSort(sortedPlaylistReps,function(left,right){return left.bandwidth-right.bandwidth;});sortedPlaylistReps=sortedPlaylistReps.filter(function(rep){return _playlist2['default'].isEnabled(rep.playlist);});var bandwidthPlaylistReps=sortedPlaylistReps.filter(function(rep){return rep.bandwidth*_config2['default'].BANDWIDTH_VARIANCE<playerBandwidth;});var highestRemainingBandwidthRep=bandwidthPlaylistReps[bandwidthPlaylistReps.length-1];var bandwidthBestRep=bandwidthPlaylistReps.filter(function(rep){return rep.bandwidth===highestRemainingBandwidthRep.bandwidth;})[0];var haveResolution=bandwidthPlaylistReps.filter(function(rep){return rep.width&&rep.height;});stableSort(haveResolution,function(left,right){return left.width-right.width;});var resolutionBestRepList=haveResolution.filter(function(rep){return rep.width===playerWidth&&rep.height===playerHeight;});highestRemainingBandwidthRep=resolutionBestRepList[resolutionBestRepList.length-1];var resolutionBestRep=resolutionBestRepList.filter(function(rep){return rep.bandwidth===highestRemainingBandwidthRep.bandwidth;})[0];var resolutionPlusOneList=undefined;var resolutionPlusOneSmallest=undefined;var resolutionPlusOneRep=undefined;if(!resolutionBestRep){resolutionPlusOneList=haveResolution.filter(function(rep){return rep.width>playerWidth||rep.height>playerHeight;});resolutionPlusOneSmallest=resolutionPlusOneList.filter(function(rep){return rep.width===resolutionPlusOneList[0].width&&rep.height===resolutionPlusOneList[0].height;});highestRemainingBandwidthRep=resolutionPlusOneSmallest[resolutionPlusOneSmallest.length-1];resolutionPlusOneRep=resolutionPlusOneSmallest.filter(function(rep){return rep.bandwidth===highestRemainingBandwidthRep.bandwidth;})[0];}
238return(resolutionPlusOneRep||resolutionBestRep||bandwidthBestRep||sortedPlaylistReps[0]).playlist;};exports.simpleSelector=simpleSelector;var lastBandwidthSelector=function lastBandwidthSelector(){return simpleSelector(this.playlists.master,this.systemBandwidth,parseInt(safeGetComputedStyle(this.tech_.el(),'width'),10),parseInt(safeGetComputedStyle(this.tech_.el(),'height'),10));};exports.lastBandwidthSelector=lastBandwidthSelector;var movingAverageBandwidthSelector=function movingAverageBandwidthSelector(decay){var average=-1;if(decay<0||decay>1){throw new Error('Moving average bandwidth decay must be between 0 and 1.');}
239return function(){if(average<0){average=this.systemBandwidth;}
240average=decay*this.systemBandwidth+(1-decay)*average;return simpleSelector(this.playlists.master,average,parseInt(safeGetComputedStyle(this.tech_.el(),'width'),10),parseInt(safeGetComputedStyle(this.tech_.el(),'height'),10));};};exports.movingAverageBandwidthSelector=movingAverageBandwidthSelector;var minRebufferMaxBandwidthSelector=function minRebufferMaxBandwidthSelector(settings){var master=settings.master;var currentTime=settings.currentTime;var bandwidth=settings.bandwidth;var duration=settings.duration;var segmentDuration=settings.segmentDuration;var timeUntilRebuffer=settings.timeUntilRebuffer;var currentTimeline=settings.currentTimeline;var syncController=settings.syncController;var bandwidthPlaylists=master.playlists.filter(function(playlist){return _playlist2['default'].isEnabled(playlist)&&_playlist2['default'].hasAttribute('BANDWIDTH',playlist);});var rebufferingEstimates=bandwidthPlaylists.map(function(playlist){var syncPoint=syncController.getSyncPoint(playlist,duration,currentTimeline,currentTime);var numRequests=syncPoint?1:2;var requestTimeEstimate=_playlist2['default'].estimateSegmentRequestTime(segmentDuration,bandwidth,playlist);var rebufferingImpact=requestTimeEstimate*numRequests-timeUntilRebuffer;return{playlist:playlist,rebufferingImpact:rebufferingImpact};});var noRebufferingPlaylists=rebufferingEstimates.filter(function(estimate){return estimate.rebufferingImpact<=0;});stableSort(noRebufferingPlaylists,function(a,b){return comparePlaylistBandwidth(b.playlist,a.playlist);});if(noRebufferingPlaylists.length){return noRebufferingPlaylists[0];}
241stableSort(rebufferingEstimates,function(a,b){return a.rebufferingImpact-b.rebufferingImpact;});return rebufferingEstimates[0]||null;};exports.minRebufferMaxBandwidthSelector=minRebufferMaxBandwidthSelector;var lowestBitrateCompatibleVariantSelector=function lowestBitrateCompatibleVariantSelector(){var playlists=this.playlists.master.playlists.filter(_playlist2['default'].isEnabled);stableSort(playlists,function(a,b){return comparePlaylistBandwidth(a,b);});var playlistsWithVideo=playlists.filter(function(playlist){return(0,_utilCodecsJs.parseCodecs)(playlist.attributes.CODECS).videoCodec;});return playlistsWithVideo[0]||null;};exports.lowestBitrateCompatibleVariantSelector=lowestBitrateCompatibleVariantSelector;},{"./config":3,"./playlist":11,"./util/codecs.js":19}],11:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
242var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var Playlist={UNSAFE_LIVE_SEGMENTS:3};var backwardDuration=function backwardDuration(playlist,endSequence){var result=0;var i=endSequence-playlist.mediaSequence;var segment=playlist.segments[i];if(segment){if(typeof segment.start!=='undefined'){return{result:segment.start,precise:true};}
243if(typeof segment.end!=='undefined'){return{result:segment.end-segment.duration,precise:true};}}
244while(i--){segment=playlist.segments[i];if(typeof segment.end!=='undefined'){return{result:result+segment.end,precise:true};}
245result+=segment.duration;if(typeof segment.start!=='undefined'){return{result:result+segment.start,precise:true};}}
246return{result:result,precise:false};};var forwardDuration=function forwardDuration(playlist,endSequence){var result=0;var segment=undefined;var i=endSequence-playlist.mediaSequence;for(;i<playlist.segments.length;i++){segment=playlist.segments[i];if(typeof segment.start!=='undefined'){return{result:segment.start-result,precise:true};}
247result+=segment.duration;if(typeof segment.end!=='undefined'){return{result:segment.end-result,precise:true};}}
248return{result:-1,precise:false};};var intervalDuration=function intervalDuration(playlist,endSequence,expired){var backward=undefined;var forward=undefined;if(typeof endSequence==='undefined'){endSequence=playlist.mediaSequence+playlist.segments.length;}
249if(endSequence<playlist.mediaSequence){return 0;}
250backward=backwardDuration(playlist,endSequence);if(backward.precise){return backward.result;}
251forward=forwardDuration(playlist,endSequence);if(forward.precise){return forward.result;}
252return backward.result+expired;};var duration=function duration(playlist,endSequence,expired){if(!playlist){return 0;}
253if(typeof expired!=='number'){expired=0;}
254if(typeof endSequence==='undefined'){if(playlist.totalDuration){return playlist.totalDuration;}
255if(!playlist.endList){return _globalWindow2['default'].Infinity;}}
256return intervalDuration(playlist,endSequence,expired);};exports.duration=duration;var sumDurations=function sumDurations(playlist,startIndex,endIndex){var durations=0;if(startIndex>endIndex){var _ref=[endIndex,startIndex];startIndex=_ref[0];endIndex=_ref[1];}
257if(startIndex<0){for(var i=startIndex;i<Math.min(0,endIndex);i++){durations+=playlist.targetDuration;}
258startIndex=0;}
259for(var i=startIndex;i<endIndex;i++){durations+=playlist.segments[i].duration;}
260return durations;};exports.sumDurations=sumDurations;var playlistEnd=function playlistEnd(playlist,expired,useSafeLiveEnd){if(!playlist||!playlist.segments){return null;}
261if(playlist.endList){return duration(playlist);}
262if(expired===null){return null;}
263expired=expired||0;var endSequence=useSafeLiveEnd?Math.max(0,playlist.segments.length-Playlist.UNSAFE_LIVE_SEGMENTS):Math.max(0,playlist.segments.length);return intervalDuration(playlist,playlist.mediaSequence+endSequence,expired);};exports.playlistEnd=playlistEnd;var seekable=function seekable(playlist,expired){var useSafeLiveEnd=true;var seekableStart=expired||0;var seekableEnd=playlistEnd(playlist,expired,useSafeLiveEnd);if(seekableEnd===null){return(0,_videoJs.createTimeRange)();}
264return(0,_videoJs.createTimeRange)(seekableStart,seekableEnd);};exports.seekable=seekable;var isWholeNumber=function isWholeNumber(num){return num-Math.floor(num)===0;};var roundSignificantDigit=function roundSignificantDigit(increment,num){if(isWholeNumber(num)){return num+increment*0.1;}
265var numDecimalDigits=num.toString().split('.')[1].length;for(var i=1;i<=numDecimalDigits;i++){var scale=Math.pow(10,i);var temp=num*scale;if(isWholeNumber(temp)||i===numDecimalDigits){return(temp+increment)/scale;}}};var ceilLeastSignificantDigit=roundSignificantDigit.bind(null,1);var floorLeastSignificantDigit=roundSignificantDigit.bind(null,-1);var getMediaInfoForTime=function getMediaInfoForTime(playlist,currentTime,startIndex,startTime){var i=undefined;var segment=undefined;var numSegments=playlist.segments.length;var time=currentTime-startTime;if(time<0){if(startIndex>0){for(i=startIndex-1;i>=0;i--){segment=playlist.segments[i];time+=floorLeastSignificantDigit(segment.duration);if(time>0){return{mediaIndex:i,startTime:startTime-sumDurations(playlist,startIndex,i)};}}}
266return{mediaIndex:0,startTime:currentTime};}
267if(startIndex<0){for(i=startIndex;i<0;i++){time-=playlist.targetDuration;if(time<0){return{mediaIndex:0,startTime:currentTime};}}
268startIndex=0;}
269for(i=startIndex;i<numSegments;i++){segment=playlist.segments[i];time-=ceilLeastSignificantDigit(segment.duration);if(time<0){return{mediaIndex:i,startTime:startTime+sumDurations(playlist,startIndex,i)};}}
270return{mediaIndex:numSegments-1,startTime:currentTime};};exports.getMediaInfoForTime=getMediaInfoForTime;var isBlacklisted=function isBlacklisted(playlist){return playlist.excludeUntil&&playlist.excludeUntil>Date.now();};exports.isBlacklisted=isBlacklisted;var isEnabled=function isEnabled(playlist){var blacklisted=isBlacklisted(playlist);return!playlist.disabled&&!blacklisted;};exports.isEnabled=isEnabled;var isAes=function isAes(media){for(var i=0;i<media.segments.length;i++){if(media.segments[i].key){return true;}}
271return false;};exports.isAes=isAes;var isFmp4=function isFmp4(media){for(var i=0;i<media.segments.length;i++){if(media.segments[i].map){return true;}}
272return false;};exports.isFmp4=isFmp4;var hasAttribute=function hasAttribute(attr,playlist){return playlist.attributes&&playlist.attributes[attr];};exports.hasAttribute=hasAttribute;var estimateSegmentRequestTime=function estimateSegmentRequestTime(segmentDuration,bandwidth,playlist){var bytesReceived=arguments.length<=3||arguments[3]===undefined?0:arguments[3];if(!hasAttribute('BANDWIDTH',playlist)){return NaN;}
273var size=segmentDuration*playlist.attributes.BANDWIDTH;return(size-bytesReceived*8)/bandwidth;};exports.estimateSegmentRequestTime=estimateSegmentRequestTime;Playlist.duration=duration;Playlist.seekable=seekable;Playlist.getMediaInfoForTime=getMediaInfoForTime;Playlist.isEnabled=isEnabled;Playlist.isBlacklisted=isBlacklisted;Playlist.playlistEnd=playlistEnd;Playlist.isAes=isAes;Playlist.isFmp4=isFmp4;Playlist.hasAttribute=hasAttribute;Playlist.estimateSegmentRequestTime=estimateSegmentRequestTime;exports['default']=Playlist;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"global/window":32}],12:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _slicedToArray=(function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i['return'])_i['return']();}finally{if(_d)throw _e;}}return _arr;}return function(arr,i){if(Array.isArray(arr)){return arr;}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i);}else{throw new TypeError('Invalid attempt to destructure non-iterable instance');}};})();function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
274var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var TIME_FUDGE_FACTOR=1/30;var clamp=function clamp(num,_ref){var _ref2=_slicedToArray(_ref,2);var start=_ref2[0];var end=_ref2[1];return Math.min(Math.max(start,num),end);};var filterRanges=function filterRanges(timeRanges,predicate){var results=[];var i=undefined;if(timeRanges&&timeRanges.length){for(i=0;i<timeRanges.length;i++){if(predicate(timeRanges.start(i),timeRanges.end(i))){results.push([timeRanges.start(i),timeRanges.end(i)]);}}}
275return _videoJs2['default'].createTimeRanges(results);};var findRange=function findRange(buffered,time){return filterRanges(buffered,function(start,end){return start-TIME_FUDGE_FACTOR<=time&&end+TIME_FUDGE_FACTOR>=time;});};var findNextRange=function findNextRange(timeRanges,time){return filterRanges(timeRanges,function(start){return start-TIME_FUDGE_FACTOR>=time;});};var findGaps=function findGaps(buffered){if(buffered.length<2){return _videoJs2['default'].createTimeRanges();}
276var ranges=[];for(var i=1;i<buffered.length;i++){var start=buffered.end(i-1);var end=buffered.start(i);ranges.push([start,end]);}
277return _videoJs2['default'].createTimeRanges(ranges);};var findSoleUncommonTimeRangesEnd=function findSoleUncommonTimeRangesEnd(original,update){var i=undefined;var start=undefined;var end=undefined;var result=[];var edges=[];var overlapsCurrentEnd=function overlapsCurrentEnd(span){return span[0]<=end&&span[1]>=end;};if(original){for(i=0;i<original.length;i++){start=original.start(i);end=original.end(i);edges.push([start,end]);}}
278if(update){for(i=0;i<update.length;i++){start=update.start(i);end=update.end(i);if(edges.some(overlapsCurrentEnd)){continue;}
279result.push(end);}}
280if(result.length!==1){return null;}
281return result[0];};var bufferIntersection=function bufferIntersection(bufferA,bufferB){var start=null;var end=null;var arity=0;var extents=[];var ranges=[];if(!bufferA||!bufferA.length||!bufferB||!bufferB.length){return _videoJs2['default'].createTimeRange();}
282var count=bufferA.length;while(count--){extents.push({time:bufferA.start(count),type:'start'});extents.push({time:bufferA.end(count),type:'end'});}
283count=bufferB.length;while(count--){extents.push({time:bufferB.start(count),type:'start'});extents.push({time:bufferB.end(count),type:'end'});}
284extents.sort(function(a,b){return a.time-b.time;});for(count=0;count<extents.length;count++){if(extents[count].type==='start'){arity++;if(arity===2){start=extents[count].time;}}else if(extents[count].type==='end'){arity--;if(arity===1){end=extents[count].time;}}
285if(start!==null&&end!==null){ranges.push([start,end]);start=null;end=null;}}
286return _videoJs2['default'].createTimeRanges(ranges);};var calculateBufferedPercent=function calculateBufferedPercent(adjustedRange,referenceRange,currentTime,buffered){var referenceDuration=referenceRange.end(0)-referenceRange.start(0);var adjustedDuration=adjustedRange.end(0)-adjustedRange.start(0);var bufferMissingFromAdjusted=referenceDuration-adjustedDuration;var adjustedIntersection=bufferIntersection(adjustedRange,buffered);var referenceIntersection=bufferIntersection(referenceRange,buffered);var adjustedOverlap=0;var referenceOverlap=0;var count=adjustedIntersection.length;while(count--){adjustedOverlap+=adjustedIntersection.end(count)-adjustedIntersection.start(count);if(adjustedIntersection.start(count)===currentTime){adjustedOverlap+=bufferMissingFromAdjusted;}}
287count=referenceIntersection.length;while(count--){referenceOverlap+=referenceIntersection.end(count)-referenceIntersection.start(count);}
288return Math.max(adjustedOverlap,referenceOverlap)/referenceDuration*100;};var getSegmentBufferedPercent=function getSegmentBufferedPercent(startOfSegment,segmentDuration,currentTime,buffered){var endOfSegment=startOfSegment+segmentDuration;var originalSegmentRange=_videoJs2['default'].createTimeRanges([[startOfSegment,endOfSegment]]);var adjustedSegmentRange=_videoJs2['default'].createTimeRanges([[clamp(startOfSegment,[currentTime,endOfSegment]),endOfSegment]]);if(adjustedSegmentRange.start(0)===adjustedSegmentRange.end(0)){return 0;}
289var percent=calculateBufferedPercent(adjustedSegmentRange,originalSegmentRange,currentTime,buffered);if(isNaN(percent)||percent===Infinity||percent===-Infinity){return 0;}
290return percent;};var printableRange=function printableRange(range){var strArr=[];if(!range||!range.length){return'';}
291for(var i=0;i<range.length;i++){strArr.push(range.start(i)+' => '+range.end(i));}
292return strArr.join(', ');};var timeUntilRebuffer=function timeUntilRebuffer(buffered,currentTime){var playbackRate=arguments.length<=2||arguments[2]===undefined?1:arguments[2];var bufferedEnd=buffered.length?buffered.end(buffered.length-1):0;return(bufferedEnd-currentTime)/playbackRate;};exports['default']={findRange:findRange,findNextRange:findNextRange,findGaps:findGaps,findSoleUncommonTimeRangesEnd:findSoleUncommonTimeRangesEnd,getSegmentBufferedPercent:getSegmentBufferedPercent,TIME_FUDGE_FACTOR:TIME_FUDGE_FACTOR,printableRange:printableRange,timeUntilRebuffer:timeUntilRebuffer};module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],13:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
293var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var defaultOptions={errorInterval:30,getSource:function getSource(next){var tech=this.tech({IWillNotUseThisInPlugins:true});var sourceObj=tech.currentSource_;return next(sourceObj);}};var initPlugin=function initPlugin(player,options){var lastCalled=0;var seekTo=0;var localOptions=_videoJs2['default'].mergeOptions(defaultOptions,options);player.ready(function(){player.trigger({type:'usage',name:'hls-error-reload-initialized'});});var loadedMetadataHandler=function loadedMetadataHandler(){if(seekTo){player.currentTime(seekTo);}};var setSource=function setSource(sourceObj){if(sourceObj===null||sourceObj===undefined){return;}
294seekTo=player.duration()!==Infinity&&player.currentTime()||0;player.one('loadedmetadata',loadedMetadataHandler);player.src(sourceObj);player.trigger({type:'usage',name:'hls-error-reload'});player.play();};var errorHandler=function errorHandler(){if(Date.now()-lastCalled<localOptions.errorInterval*1000){player.trigger({type:'usage',name:'hls-error-reload-canceled'});return;}
295if(!localOptions.getSource||typeof localOptions.getSource!=='function'){_videoJs2['default'].log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');return;}
296lastCalled=Date.now();return localOptions.getSource.call(player,setSource);};var cleanupEvents=function cleanupEvents(){player.off('loadedmetadata',loadedMetadataHandler);player.off('error',errorHandler);player.off('dispose',cleanupEvents);};var reinitPlugin=function reinitPlugin(newOptions){cleanupEvents();initPlugin(player,newOptions);};player.on('error',errorHandler);player.on('dispose',cleanupEvents);player.reloadSourceOnError=reinitPlugin;};var reloadSourceOnError=function reloadSourceOnError(options){initPlugin(this,options);};exports['default']=reloadSourceOnError;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],14:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
297var _playlistJs=require('./playlist.js');var enableFunction=function enableFunction(loader,playlistUri,changePlaylistFn,enable){var playlist=loader.master.playlists[playlistUri];var blacklisted=(0,_playlistJs.isBlacklisted)(playlist);var currentlyEnabled=(0,_playlistJs.isEnabled)(playlist);if(typeof enable==='undefined'){return currentlyEnabled;}
298if(enable){delete playlist.disabled;}else{playlist.disabled=true;}
299if(enable!==currentlyEnabled&&!blacklisted){changePlaylistFn();if(enable){loader.trigger('renditionenabled');}else{loader.trigger('renditiondisabled');}}
300return enable;};var Representation=function Representation(hlsHandler,playlist,id){_classCallCheck(this,Representation);var fastChangeFunction=hlsHandler.masterPlaylistController_.fastQualityChange_.bind(hlsHandler.masterPlaylistController_);if(playlist.attributes.RESOLUTION){var resolution=playlist.attributes.RESOLUTION;this.width=resolution.width;this.height=resolution.height;}
301this.bandwidth=playlist.attributes.BANDWIDTH;this.id=id;this.enabled=enableFunction.bind(this,hlsHandler.playlists,playlist.uri,fastChangeFunction);};var renditionSelectionMixin=function renditionSelectionMixin(hlsHandler){var playlists=hlsHandler.playlists;hlsHandler.representations=function(){return playlists.master.playlists.filter(function(media){return!(0,_playlistJs.isBlacklisted)(media);}).map(function(e,i){return new Representation(hlsHandler,e,e.uri);});};};exports['default']=renditionSelectionMixin;module.exports=exports['default'];},{"./playlist.js":11}],15:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
302var _urlToolkit=require('url-toolkit');var _urlToolkit2=_interopRequireDefault(_urlToolkit);var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var resolveUrl=function resolveUrl(baseURL,relativeURL){if(/^[a-z]+:/i.test(relativeURL)){return relativeURL;}
303if(!/\/\//i.test(baseURL)){baseURL=_urlToolkit2['default'].buildAbsoluteURL(_globalWindow2['default'].location.href,baseURL);}
304return _urlToolkit2['default'].buildAbsoluteURL(baseURL,relativeURL);};exports['default']=resolveUrl;module.exports=exports['default'];},{"global/window":32,"url-toolkit":63}],16:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x4,_x5,_x6){var _again=true;_function:while(_again){var object=_x4,property=_x5,receiver=_x6;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x4=parent;_x5=property;_x6=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
305function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
306function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
307var _playlist=require('./playlist');var _playlist2=_interopRequireDefault(_playlist);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _sourceUpdater=require('./source-updater');var _sourceUpdater2=_interopRequireDefault(_sourceUpdater);var _config=require('./config');var _config2=_interopRequireDefault(_config);var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _videojsContribMediaSourcesEs5RemoveCuesFromTrackJs=require('videojs-contrib-media-sources/es5/remove-cues-from-track.js');var _videojsContribMediaSourcesEs5RemoveCuesFromTrackJs2=_interopRequireDefault(_videojsContribMediaSourcesEs5RemoveCuesFromTrackJs);var _binUtils=require('./bin-utils');var _mediaSegmentRequest=require('./media-segment-request');var _ranges=require('./ranges');var _playlistSelectors=require('./playlist-selectors');var CHECK_BUFFER_DELAY=500;var detectEndOfStream=function detectEndOfStream(playlist,mediaSource,segmentIndex){if(!playlist||!mediaSource){return false;}
308var segments=playlist.segments;var appendedLastSegment=segmentIndex===segments.length;return playlist.endList&&mediaSource.readyState==='open'&&appendedLastSegment;};var finite=function finite(num){return typeof num==='number'&&isFinite(num);};var illegalMediaSwitch=function illegalMediaSwitch(loaderType,startingMedia,newSegmentMedia){if(loaderType!=='main'||!startingMedia||!newSegmentMedia){return null;}
309if(!newSegmentMedia.containsAudio&&!newSegmentMedia.containsVideo){return'Neither audio nor video found in segment.';}
310if(startingMedia.containsVideo&&!newSegmentMedia.containsVideo){return'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.';}
311if(!startingMedia.containsVideo&&newSegmentMedia.containsVideo){return'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.';}
312return null;};exports.illegalMediaSwitch=illegalMediaSwitch;var SegmentLoader=(function(_videojs$EventTarget){_inherits(SegmentLoader,_videojs$EventTarget);function SegmentLoader(settings){var _this=this;var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,SegmentLoader);_get(Object.getPrototypeOf(SegmentLoader.prototype),'constructor',this).call(this);if(!settings){throw new TypeError('Initialization settings are required');}
313if(typeof settings.currentTime!=='function'){throw new TypeError('No currentTime getter specified');}
314if(!settings.mediaSource){throw new TypeError('No MediaSource specified');}
315this.state='INIT';this.bandwidth=settings.bandwidth;this.throughput={rate:0,count:0};this.roundTrip=NaN;this.resetStats_();this.mediaIndex=null;this.hasPlayed_=settings.hasPlayed;this.currentTime_=settings.currentTime;this.seekable_=settings.seekable;this.seeking_=settings.seeking;this.duration_=settings.duration;this.mediaSource_=settings.mediaSource;this.hls_=settings.hls;this.loaderType_=settings.loaderType;this.startingMedia_=void 0;this.segmentMetadataTrack_=settings.segmentMetadataTrack;this.goalBufferLength_=settings.goalBufferLength;this.checkBufferTimeout_=null;this.error_=void 0;this.currentTimeline_=-1;this.pendingSegment_=null;this.mimeType_=null;this.sourceUpdater_=null;this.xhrOptions_=null;this.activeInitSegmentId_=null;this.initSegments_={};this.decrypter_=settings.decrypter;this.syncController_=settings.syncController;this.syncPoint_={segmentIndex:0,time:0};this.syncController_.on('syncinfoupdate',function(){return _this.trigger('syncinfoupdate');});this.mediaSource_.addEventListener('sourceopen',function(){return _this.ended_=false;});this.fetchAtBuffer_=false;if(options.debug){this.logger_=_videoJs2['default'].log.bind(_videoJs2['default'],'segment-loader',this.loaderType_,'->');}}
316_createClass(SegmentLoader,[{key:'resetStats_',value:function resetStats_(){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 dispose(){this.state='DISPOSED';this.pause();this.abort_();if(this.sourceUpdater_){this.sourceUpdater_.dispose();}
317this.resetStats_();}},{key:'abort',value:function abort(){if(this.state!=='WAITING'){if(this.pendingSegment_){this.pendingSegment_=null;}
318return;}
319this.abort_();this.state='READY';if(!this.paused()){this.monitorBuffer_();}}},{key:'abort_',value:function abort_(){if(this.pendingSegment_){this.pendingSegment_.abortRequests();}
320this.pendingSegment_=null;}},{key:'error',value:function error(_error){if(typeof _error!=='undefined'){this.error_=_error;}
321this.pendingSegment_=null;return this.error_;}},{key:'endOfStream',value:function endOfStream(){this.ended_=true;this.pause();this.trigger('ended');}},{key:'buffered_',value:function buffered_(){if(!this.sourceUpdater_){return _videoJs2['default'].createTimeRanges();}
322return this.sourceUpdater_.buffered();}},{key:'initSegment',value:function initSegment(map){var set=arguments.length<=1||arguments[1]===undefined?false:arguments[1];if(!map){return null;}
323var id=(0,_binUtils.initSegmentId)(map);var storedMap=this.initSegments_[id];if(set&&!storedMap&&map.bytes){this.initSegments_[id]=storedMap={resolvedUri:map.resolvedUri,byterange:map.byterange,bytes:map.bytes};}
324return storedMap||map;}},{key:'couldBeginLoading_',value:function couldBeginLoading_(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&this.state==='INIT')&&!this.paused();}},{key:'load',value:function load(){this.monitorBuffer_();if(!this.playlist_){return;}
325this.syncController_.setDateTimeMapping(this.playlist_);if(this.state==='INIT'&&this.couldBeginLoading_()){return this.init_();}
326if(!this.couldBeginLoading_()||this.state!=='READY'&&this.state!=='INIT'){return;}
327this.state='READY';}},{key:'init_',value:function init_(){this.state='READY';this.sourceUpdater_=new _sourceUpdater2['default'](this.mediaSource_,this.mimeType_);this.resetEverything();return this.monitorBuffer_();}},{key:'playlist',value:function playlist(newPlaylist){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(!newPlaylist){return;}
328var oldPlaylist=this.playlist_;var segmentInfo=this.pendingSegment_;this.playlist_=newPlaylist;this.xhrOptions_=options;if(!this.hasPlayed_()){newPlaylist.syncInfo={mediaSequence:newPlaylist.mediaSequence,time:0};}
329this.trigger('syncinfoupdate');if(this.state==='INIT'&&this.couldBeginLoading_()){return this.init_();}
330if(!oldPlaylist||oldPlaylist.uri!==newPlaylist.uri){if(this.mediaIndex!==null){this.resyncLoader();}
331return;}
332var mediaSequenceDiff=newPlaylist.mediaSequence-oldPlaylist.mediaSequence;this.logger_('mediaSequenceDiff',mediaSequenceDiff);if(this.mediaIndex!==null){this.mediaIndex-=mediaSequenceDiff;}
333if(segmentInfo){segmentInfo.mediaIndex-=mediaSequenceDiff;if(segmentInfo.mediaIndex>=0){segmentInfo.segment=newPlaylist.segments[segmentInfo.mediaIndex];}}
334this.syncController_.saveExpiredSegmentInfo(oldPlaylist,newPlaylist);}},{key:'pause',value:function pause(){if(this.checkBufferTimeout_){_globalWindow2['default'].clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=null;}}},{key:'paused',value:function paused(){return this.checkBufferTimeout_===null;}},{key:'mimeType',value:function mimeType(_mimeType){if(this.mimeType_){return;}
335this.mimeType_=_mimeType;if(this.state==='INIT'&&this.couldBeginLoading_()){this.init_();}}},{key:'resetEverything',value:function resetEverything(){this.ended_=false;this.resetLoader();this.remove(0,this.duration_());this.trigger('reseteverything');}},{key:'resetLoader',value:function resetLoader(){this.fetchAtBuffer_=false;this.resyncLoader();}},{key:'resyncLoader',value:function resyncLoader(){this.mediaIndex=null;this.syncPoint_=null;this.abort();}},{key:'remove',value:function remove(start,end){if(this.sourceUpdater_){this.sourceUpdater_.remove(start,end);}
336(0,_videojsContribMediaSourcesEs5RemoveCuesFromTrackJs2['default'])(start,end,this.segmentMetadataTrack_);}},{key:'monitorBuffer_',value:function monitorBuffer_(){if(this.checkBufferTimeout_){_globalWindow2['default'].clearTimeout(this.checkBufferTimeout_);}
337this.checkBufferTimeout_=_globalWindow2['default'].setTimeout(this.monitorBufferTick_.bind(this),1);}},{key:'monitorBufferTick_',value:function monitorBufferTick_(){if(this.state==='READY'){this.fillBuffer_();}
338if(this.checkBufferTimeout_){_globalWindow2['default'].clearTimeout(this.checkBufferTimeout_);}
339this.checkBufferTimeout_=_globalWindow2['default'].setTimeout(this.monitorBufferTick_.bind(this),CHECK_BUFFER_DELAY);}},{key:'fillBuffer_',value:function fillBuffer_(){if(this.sourceUpdater_.updating()){return;}
340if(!this.syncPoint_){this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());}
341var segmentInfo=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(!segmentInfo){return;}
342var isEndOfStream=detectEndOfStream(this.playlist_,this.mediaSource_,segmentInfo.mediaIndex);if(isEndOfStream){this.endOfStream();return;}
343if(segmentInfo.mediaIndex===this.playlist_.segments.length-1&&this.mediaSource_.readyState==='ended'&&!this.seeking_()){return;}
344if(segmentInfo.timeline!==this.currentTimeline_||segmentInfo.startOfSegment!==null&&segmentInfo.startOfSegment<this.sourceUpdater_.timestampOffset()){this.syncController_.reset();segmentInfo.timestampOffset=segmentInfo.startOfSegment;}
345this.loadSegment_(segmentInfo);}},{key:'checkBuffer_',value:function checkBuffer_(buffered,playlist,mediaIndex,hasPlayed,currentTime,syncPoint){var lastBufferedEnd=0;var startOfSegment=undefined;if(buffered.length){lastBufferedEnd=buffered.end(buffered.length-1);}
346var bufferedTime=Math.max(0,lastBufferedEnd-currentTime);if(!playlist.segments.length){return null;}
347if(bufferedTime>=this.goalBufferLength_()){return null;}
348if(!hasPlayed&&bufferedTime>=1){return null;}
349this.logger_('checkBuffer_','mediaIndex:',mediaIndex,'hasPlayed:',hasPlayed,'currentTime:',currentTime,'syncPoint:',syncPoint,'fetchAtBuffer:',this.fetchAtBuffer_,'bufferedTime:',bufferedTime);if(syncPoint===null){mediaIndex=this.getSyncSegmentCandidate_(playlist);this.logger_('getSync','mediaIndex:',mediaIndex);return this.generateSegmentInfo_(playlist,mediaIndex,null,true);}
350if(mediaIndex!==null){this.logger_('walkForward','mediaIndex:',mediaIndex+1);var segment=playlist.segments[mediaIndex];if(segment&&segment.end){startOfSegment=segment.end;}else{startOfSegment=lastBufferedEnd;}
351return this.generateSegmentInfo_(playlist,mediaIndex+1,startOfSegment,false);}
352if(this.fetchAtBuffer_){var mediaSourceInfo=_playlist2['default'].getMediaInfoForTime(playlist,lastBufferedEnd,syncPoint.segmentIndex,syncPoint.time);mediaIndex=mediaSourceInfo.mediaIndex;startOfSegment=mediaSourceInfo.startTime;}else{var mediaSourceInfo=_playlist2['default'].getMediaInfoForTime(playlist,currentTime,syncPoint.segmentIndex,syncPoint.time);mediaIndex=mediaSourceInfo.mediaIndex;startOfSegment=mediaSourceInfo.startTime;}
353this.logger_('getMediaIndexForTime','mediaIndex:',mediaIndex,'startOfSegment:',startOfSegment);return this.generateSegmentInfo_(playlist,mediaIndex,startOfSegment,false);}},{key:'getSyncSegmentCandidate_',value:function getSyncSegmentCandidate_(playlist){var _this2=this;if(this.currentTimeline_===-1){return 0;}
354var segmentIndexArray=playlist.segments.map(function(s,i){return{timeline:s.timeline,segmentIndex:i};}).filter(function(s){return s.timeline===_this2.currentTimeline_;});if(segmentIndexArray.length){return segmentIndexArray[Math.min(segmentIndexArray.length-1,1)].segmentIndex;}
355return Math.max(playlist.segments.length-1,0);}},{key:'generateSegmentInfo_',value:function generateSegmentInfo_(playlist,mediaIndex,startOfSegment,isSyncRequest){if(mediaIndex<0||mediaIndex>=playlist.segments.length){return null;}
356var segment=playlist.segments[mediaIndex];return{requestId:'segment-loader-'+Math.random(),uri:segment.resolvedUri,mediaIndex:mediaIndex,isSyncRequest:isSyncRequest,startOfSegment:startOfSegment,playlist:playlist,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:segment.timeline,duration:segment.duration,segment:segment};}},{key:'abortRequestEarly_',value:function abortRequestEarly_(stats){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH){return false;}
357if(Date.now()-(stats.firstBytesReceivedAt||Date.now())<1000){return false;}
358var currentTime=this.currentTime_();var measuredBandwidth=stats.bandwidth;var segmentDuration=this.pendingSegment_.duration;var requestTimeRemaining=_playlist2['default'].estimateSegmentRequestTime(segmentDuration,measuredBandwidth,this.playlist_,stats.bytesReceived);var timeUntilRebuffer=(0,_ranges.timeUntilRebuffer)(this.buffered_(),currentTime,this.hls_.tech_.playbackRate())-1;if(requestTimeRemaining<=timeUntilRebuffer){return false;}
359var switchCandidate=(0,_playlistSelectors.minRebufferMaxBandwidthSelector)({master:this.hls_.playlists.master,currentTime:currentTime,bandwidth:measuredBandwidth,duration:this.duration_(),segmentDuration:segmentDuration,timeUntilRebuffer:timeUntilRebuffer,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!switchCandidate){return;}
360var rebufferingImpact=requestTimeRemaining-timeUntilRebuffer;var timeSavedBySwitching=rebufferingImpact-switchCandidate.rebufferingImpact;var minimumTimeSaving=0.5;if(timeUntilRebuffer<=_ranges.TIME_FUDGE_FACTOR){minimumTimeSaving=1;}
361if(!switchCandidate.playlist||switchCandidate.playlist.uri===this.playlist_.uri||timeSavedBySwitching<minimumTimeSaving){return false;}
362this.bandwidth=switchCandidate.playlist.attributes.BANDWIDTH*_config2['default'].BANDWIDTH_VARIANCE+1;this.abort();this.trigger('earlyabort');return true;}},{key:'handleProgress_',value:function handleProgress_(event,simpleSegment){if(!this.pendingSegment_||simpleSegment.requestId!==this.pendingSegment_.requestId||this.abortRequestEarly_(simpleSegment.stats)){return;}
363this.trigger('progress');}},{key:'loadSegment_',value:function loadSegment_(segmentInfo){this.state='WAITING';this.pendingSegment_=segmentInfo;this.trimBackBuffer_(segmentInfo);segmentInfo.abortRequests=(0,_mediaSegmentRequest.mediaSegmentRequest)(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.createSimplifiedSegmentObj_(segmentInfo),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this));}},{key:'trimBackBuffer_',value:function trimBackBuffer_(segmentInfo){var seekable=this.seekable_();var currentTime=this.currentTime_();var removeToTime=0;if(seekable.length&&seekable.start(0)>0&&seekable.start(0)<currentTime){removeToTime=seekable.start(0);}else{removeToTime=currentTime-30;}
364if(removeToTime>0){this.remove(0,removeToTime);}}},{key:'createSimplifiedSegmentObj_',value:function createSimplifiedSegmentObj_(segmentInfo){var segment=segmentInfo.segment;var simpleSegment={resolvedUri:segment.resolvedUri,byterange:segment.byterange,requestId:segmentInfo.requestId};if(segment.key){var iv=segment.key.iv||new Uint32Array([0,0,0,segmentInfo.mediaIndex+segmentInfo.playlist.mediaSequence]);simpleSegment.key={resolvedUri:segment.key.resolvedUri,iv:iv};}
365if(segment.map){simpleSegment.map=this.initSegment(segment.map);}
366return simpleSegment;}},{key:'segmentRequestFinished_',value:function segmentRequestFinished_(error,simpleSegment){this.mediaRequests+=1;if(simpleSegment.stats){this.mediaBytesTransferred+=simpleSegment.stats.bytesReceived;this.mediaTransferDuration+=simpleSegment.stats.roundTripTime;}
367if(!this.pendingSegment_){this.mediaRequestsAborted+=1;return;}
368if(simpleSegment.requestId!==this.pendingSegment_.requestId){return;}
369if(error){this.pendingSegment_=null;this.state='READY';if(error.code===_mediaSegmentRequest.REQUEST_ERRORS.ABORTED){this.mediaRequestsAborted+=1;return;}
370this.pause();if(error.code===_mediaSegmentRequest.REQUEST_ERRORS.TIMEOUT){this.mediaRequestsTimedout+=1;this.bandwidth=1;this.roundTrip=NaN;this.trigger('bandwidthupdate');return;}
371this.mediaRequestsErrored+=1;this.error(error);this.trigger('error');return;}
372this.bandwidth=simpleSegment.stats.bandwidth;this.roundTrip=simpleSegment.stats.roundTripTime;if(simpleSegment.map){simpleSegment.map=this.initSegment(simpleSegment.map,true);}
373this.processSegmentResponse_(simpleSegment);}},{key:'processSegmentResponse_',value:function processSegmentResponse_(simpleSegment){var segmentInfo=this.pendingSegment_;segmentInfo.bytes=simpleSegment.bytes;if(simpleSegment.map){segmentInfo.segment.map.bytes=simpleSegment.map.bytes;}
374segmentInfo.endOfAllRequests=simpleSegment.endOfAllRequests;this.handleSegment_();}},{key:'handleSegment_',value:function handleSegment_(){var _this3=this;if(!this.pendingSegment_){this.state='READY';return;}
375var segmentInfo=this.pendingSegment_;var segment=segmentInfo.segment;var timingInfo=this.syncController_.probeSegmentInfo(segmentInfo);if(typeof this.startingMedia_==='undefined'&&timingInfo&&(timingInfo.containsAudio||timingInfo.containsVideo)){this.startingMedia_={containsAudio:timingInfo.containsAudio,containsVideo:timingInfo.containsVideo};}
376var illegalMediaSwitchError=illegalMediaSwitch(this.loaderType_,this.startingMedia_,timingInfo);if(illegalMediaSwitchError){this.error({message:illegalMediaSwitchError});this.trigger('error');return;}
377this.state='APPENDING';if(segmentInfo.isSyncRequest){this.trigger('syncinfoupdate');this.pendingSegment_=null;this.state='READY';return;}
378if(segmentInfo.timestampOffset!==null&&segmentInfo.timestampOffset!==this.sourceUpdater_.timestampOffset()){this.sourceUpdater_.timestampOffset(segmentInfo.timestampOffset);this.trigger('timestampoffset');}
379if(segment.map){(function(){var initId=(0,_binUtils.initSegmentId)(segment.map);if(!_this3.activeInitSegmentId_||_this3.activeInitSegmentId_!==initId){var initSegment=_this3.initSegment(segment.map);_this3.sourceUpdater_.appendBuffer(initSegment.bytes,function(){_this3.activeInitSegmentId_=initId;});}})();}
380segmentInfo.byteLength=segmentInfo.bytes.byteLength;if(typeof segment.start==='number'&&typeof segment.end==='number'){this.mediaSecondsLoaded+=segment.end-segment.start;}else{this.mediaSecondsLoaded+=segment.duration;}
381this.sourceUpdater_.appendBuffer(segmentInfo.bytes,this.handleUpdateEnd_.bind(this));}},{key:'handleUpdateEnd_',value:function handleUpdateEnd_(){this.logger_('handleUpdateEnd_','segmentInfo:',this.pendingSegment_);if(!this.pendingSegment_){this.state='READY';if(!this.paused()){this.monitorBuffer_();}
382return;}
383var segmentInfo=this.pendingSegment_;var segment=segmentInfo.segment;var isWalkingForward=this.mediaIndex!==null;this.pendingSegment_=null;this.recordThroughput_(segmentInfo);this.addSegmentMetadataCue_(segmentInfo);this.state='READY';this.mediaIndex=segmentInfo.mediaIndex;this.fetchAtBuffer_=true;this.currentTimeline_=segmentInfo.timeline;this.trigger('syncinfoupdate');if(segment.end&&this.currentTime_()-segment.end>segmentInfo.playlist.targetDuration*3){this.resetEverything();return;}
384if(isWalkingForward){this.trigger('bandwidthupdate');}
385this.trigger('progress');var isEndOfStream=detectEndOfStream(segmentInfo.playlist,this.mediaSource_,segmentInfo.mediaIndex+1);if(isEndOfStream){this.endOfStream();}
386if(!this.paused()){this.monitorBuffer_();}}},{key:'recordThroughput_',value:function recordThroughput_(segmentInfo){var rate=this.throughput.rate;var segmentProcessingTime=Date.now()-segmentInfo.endOfAllRequests+1;var segmentProcessingThroughput=Math.floor(segmentInfo.byteLength/segmentProcessingTime*8*1000);this.throughput.rate+=(segmentProcessingThroughput-rate)/++this.throughput.count;}},{key:'logger_',value:function logger_(){}},{key:'addSegmentMetadataCue_',value:function addSegmentMetadataCue_(segmentInfo){if(!this.segmentMetadataTrack_){return;}
387var segment=segmentInfo.segment;var start=segment.start;var end=segment.end;if(!finite(start)||!finite(end)){return;}
388(0,_videojsContribMediaSourcesEs5RemoveCuesFromTrackJs2['default'])(start,end,this.segmentMetadataTrack_);var Cue=_globalWindow2['default'].WebKitDataCue||_globalWindow2['default'].VTTCue;var value={uri:segmentInfo.uri,timeline:segmentInfo.timeline,playlist:segmentInfo.playlist.uri,start:start,end:end};var data=JSON.stringify(value);var cue=new Cue(start,end,data);cue.value=value;this.segmentMetadataTrack_.addCue(cue);}}]);return SegmentLoader;})(_videoJs2['default'].EventTarget);exports['default']=SegmentLoader;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./bin-utils":2,"./config":3,"./media-segment-request":7,"./playlist":11,"./playlist-selectors":10,"./ranges":12,"./source-updater":17,"global/window":32,"videojs-contrib-media-sources/es5/remove-cues-from-track.js":72}],17:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
389function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
390var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var noop=function noop(){};var SourceUpdater=(function(){function SourceUpdater(mediaSource,mimeType){var _this=this;_classCallCheck(this,SourceUpdater);var createSourceBuffer=function createSourceBuffer(){_this.sourceBuffer_=mediaSource.addSourceBuffer(mimeType);_this.onUpdateendCallback_=function(){var pendingCallback=_this.pendingCallback_;_this.pendingCallback_=null;if(pendingCallback){pendingCallback();}
391_this.runCallback_();};_this.sourceBuffer_.addEventListener('updateend',_this.onUpdateendCallback_);_this.runCallback_();};this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=mediaSource;this.processedAppend_=false;if(mediaSource.readyState==='closed'){mediaSource.addEventListener('sourceopen',createSourceBuffer);}else{createSourceBuffer();}}
392_createClass(SourceUpdater,[{key:'abort',value:function abort(done){var _this2=this;if(this.processedAppend_){this.queueCallback_(function(){_this2.sourceBuffer_.abort();},done);}}},{key:'appendBuffer',value:function appendBuffer(bytes,done){var _this3=this;this.processedAppend_=true;this.queueCallback_(function(){_this3.sourceBuffer_.appendBuffer(bytes);},done);}},{key:'buffered',value:function buffered(){if(!this.sourceBuffer_){return _videoJs2['default'].createTimeRanges();}
393return this.sourceBuffer_.buffered;}},{key:'remove',value:function remove(start,end){var _this4=this;if(this.processedAppend_){this.queueCallback_(function(){_this4.sourceBuffer_.remove(start,end);},noop);}}},{key:'updating',value:function updating(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_;}},{key:'timestampOffset',value:function timestampOffset(offset){var _this5=this;if(typeof offset!=='undefined'){this.queueCallback_(function(){_this5.sourceBuffer_.timestampOffset=offset;});this.timestampOffset_=offset;}
394return this.timestampOffset_;}},{key:'queueCallback_',value:function queueCallback_(callback,done){this.callbacks_.push([callback.bind(this),done]);this.runCallback_();}},{key:'runCallback_',value:function runCallback_(){var callbacks=undefined;if(!this.updating()&&this.callbacks_.length){callbacks=this.callbacks_.shift();this.pendingCallback_=callbacks[1];callbacks[0]();}}},{key:'dispose',value:function dispose(){this.sourceBuffer_.removeEventListener('updateend',this.onUpdateendCallback_);if(this.sourceBuffer_&&this.mediaSource.readyState==='open'){this.sourceBuffer_.abort();}}}]);return SourceUpdater;})();exports['default']=SourceUpdater;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],18:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x2,_x3,_x4){var _again=true;_function:while(_again){var object=_x2,property=_x3,receiver=_x4;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x2=parent;_x3=property;_x4=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
395function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
396function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
397var _muxJsLibMp4Probe=require('mux.js/lib/mp4/probe');var _muxJsLibMp4Probe2=_interopRequireDefault(_muxJsLibMp4Probe);var _muxJsLibToolsTsInspectorJs=require('mux.js/lib/tools/ts-inspector.js');var _playlist=require('./playlist');var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var syncPointStrategies=[{name:'VOD',run:function run(syncController,playlist,duration,currentTimeline,currentTime){if(duration!==Infinity){var syncPoint={time:0,segmentIndex:0};return syncPoint;}
398return null;}},{name:'ProgramDateTime',run:function run(syncController,playlist,duration,currentTimeline,currentTime){if(syncController.datetimeToDisplayTime&&playlist.dateTimeObject){var playlistTime=playlist.dateTimeObject.getTime()/1000;var playlistStart=playlistTime+syncController.datetimeToDisplayTime;var syncPoint={time:playlistStart,segmentIndex:0};return syncPoint;}
399return null;}},{name:'Segment',run:function run(syncController,playlist,duration,currentTimeline,currentTime){var segments=playlist.segments||[];var syncPoint=null;var lastDistance=null;currentTime=currentTime||0;for(var i=0;i<segments.length;i++){var segment=segments[i];if(segment.timeline===currentTimeline&&typeof segment.start!=='undefined'){var distance=Math.abs(currentTime-segment.start);if(lastDistance!==null&&lastDistance<distance){break;}
400if(!syncPoint||lastDistance===null||lastDistance>=distance){lastDistance=distance;syncPoint={time:segment.start,segmentIndex:i};}}}
401return syncPoint;}},{name:'Discontinuity',run:function run(syncController,playlist,duration,currentTimeline,currentTime){var syncPoint=null;currentTime=currentTime||0;if(playlist.discontinuityStarts&&playlist.discontinuityStarts.length){var lastDistance=null;for(var i=0;i<playlist.discontinuityStarts.length;i++){var segmentIndex=playlist.discontinuityStarts[i];var discontinuity=playlist.discontinuitySequence+i+1;var discontinuitySync=syncController.discontinuities[discontinuity];if(discontinuitySync){var distance=Math.abs(currentTime-discontinuitySync.time);if(lastDistance!==null&&lastDistance<distance){break;}
402if(!syncPoint||lastDistance===null||lastDistance>=distance){lastDistance=distance;syncPoint={time:discontinuitySync.time,segmentIndex:segmentIndex};}}}}
403return syncPoint;}},{name:'Playlist',run:function run(syncController,playlist,duration,currentTimeline,currentTime){if(playlist.syncInfo){var syncPoint={time:playlist.syncInfo.time,segmentIndex:playlist.syncInfo.mediaSequence-playlist.mediaSequence};return syncPoint;}
404return null;}}];exports.syncPointStrategies=syncPointStrategies;var SyncController=(function(_videojs$EventTarget){_inherits(SyncController,_videojs$EventTarget);function SyncController(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];_classCallCheck(this,SyncController);_get(Object.getPrototypeOf(SyncController.prototype),'constructor',this).call(this);this.inspectCache_=undefined;this.timelines=[];this.discontinuities=[];this.datetimeToDisplayTime=null;if(options.debug){this.logger_=_videoJs2['default'].log.bind(_videoJs2['default'],'sync-controller ->');}}
405_createClass(SyncController,[{key:'getSyncPoint',value:function getSyncPoint(playlist,duration,currentTimeline,currentTime){var syncPoints=this.runStrategies_(playlist,duration,currentTimeline,currentTime);if(!syncPoints.length){return null;}
406return this.selectSyncPoint_(syncPoints,{key:'time',value:currentTime});}},{key:'getExpiredTime',value:function getExpiredTime(playlist,duration){if(!playlist||!playlist.segments){return null;}
407var syncPoints=this.runStrategies_(playlist,duration,playlist.discontinuitySequence,0);if(!syncPoints.length){return null;}
408var syncPoint=this.selectSyncPoint_(syncPoints,{key:'segmentIndex',value:0});if(syncPoint.segmentIndex>0){syncPoint.time*=-1;}
409return Math.abs(syncPoint.time+(0,_playlist.sumDurations)(playlist,syncPoint.segmentIndex,0));}},{key:'runStrategies_',value:function runStrategies_(playlist,duration,currentTimeline,currentTime){var syncPoints=[];for(var i=0;i<syncPointStrategies.length;i++){var strategy=syncPointStrategies[i];var syncPoint=strategy.run(this,playlist,duration,currentTimeline,currentTime);if(syncPoint){syncPoint.strategy=strategy.name;syncPoints.push({strategy:strategy.name,syncPoint:syncPoint});this.logger_('syncPoint found via <'+strategy.name+'>:',syncPoint);}}
410return syncPoints;}},{key:'selectSyncPoint_',value:function selectSyncPoint_(syncPoints,target){var bestSyncPoint=syncPoints[0].syncPoint;var bestDistance=Math.abs(syncPoints[0].syncPoint[target.key]-target.value);var bestStrategy=syncPoints[0].strategy;for(var i=1;i<syncPoints.length;i++){var newDistance=Math.abs(syncPoints[i].syncPoint[target.key]-target.value);if(newDistance<bestDistance){bestDistance=newDistance;bestSyncPoint=syncPoints[i].syncPoint;bestStrategy=syncPoints[i].strategy;}}
411this.logger_('syncPoint with strategy <'+bestStrategy+'> chosen: ',bestSyncPoint);return bestSyncPoint;}},{key:'saveExpiredSegmentInfo',value:function saveExpiredSegmentInfo(oldPlaylist,newPlaylist){var mediaSequenceDiff=newPlaylist.mediaSequence-oldPlaylist.mediaSequence;for(var i=mediaSequenceDiff-1;i>=0;i--){var lastRemovedSegment=oldPlaylist.segments[i];if(lastRemovedSegment&&typeof lastRemovedSegment.start!=='undefined'){newPlaylist.syncInfo={mediaSequence:oldPlaylist.mediaSequence+i,time:lastRemovedSegment.start};this.logger_('playlist sync:',newPlaylist.syncInfo);this.trigger('syncinfoupdate');break;}}}},{key:'setDateTimeMapping',value:function setDateTimeMapping(playlist){if(!this.datetimeToDisplayTime&&playlist.dateTimeObject){var playlistTimestamp=playlist.dateTimeObject.getTime()/1000;this.datetimeToDisplayTime=-playlistTimestamp;}}},{key:'reset',value:function reset(){this.inspectCache_=undefined;}},{key:'probeSegmentInfo',value:function probeSegmentInfo(segmentInfo){var segment=segmentInfo.segment;var playlist=segmentInfo.playlist;var timingInfo=undefined;if(segment.map){timingInfo=this.probeMp4Segment_(segmentInfo);}else{timingInfo=this.probeTsSegment_(segmentInfo);}
412if(timingInfo){if(this.calculateSegmentTimeMapping_(segmentInfo,timingInfo)){this.saveDiscontinuitySyncInfo_(segmentInfo);if(!playlist.syncInfo){playlist.syncInfo={mediaSequence:playlist.mediaSequence+segmentInfo.mediaIndex,time:segment.start};}}}
413return timingInfo;}},{key:'probeMp4Segment_',value:function probeMp4Segment_(segmentInfo){var segment=segmentInfo.segment;var timescales=_muxJsLibMp4Probe2['default'].timescale(segment.map.bytes);var startTime=_muxJsLibMp4Probe2['default'].startTime(timescales,segmentInfo.bytes);if(segmentInfo.timestampOffset!==null){segmentInfo.timestampOffset-=startTime;}
414return{start:startTime,end:startTime+segment.duration};}},{key:'probeTsSegment_',value:function probeTsSegment_(segmentInfo){var timeInfo=(0,_muxJsLibToolsTsInspectorJs.inspect)(segmentInfo.bytes,this.inspectCache_);var segmentStartTime=undefined;var segmentEndTime=undefined;if(!timeInfo){return null;}
415if(timeInfo.video&&timeInfo.video.length===2){this.inspectCache_=timeInfo.video[1].dts;segmentStartTime=timeInfo.video[0].dtsTime;segmentEndTime=timeInfo.video[1].dtsTime;}else if(timeInfo.audio&&timeInfo.audio.length===2){this.inspectCache_=timeInfo.audio[1].dts;segmentStartTime=timeInfo.audio[0].dtsTime;segmentEndTime=timeInfo.audio[1].dtsTime;}
416return{start:segmentStartTime,end:segmentEndTime,containsVideo:timeInfo.video&&timeInfo.video.length===2,containsAudio:timeInfo.audio&&timeInfo.audio.length===2};}},{key:'timestampOffsetForTimeline',value:function timestampOffsetForTimeline(timeline){if(typeof this.timelines[timeline]==='undefined'){return null;}
417return this.timelines[timeline].time;}},{key:'calculateSegmentTimeMapping_',value:function calculateSegmentTimeMapping_(segmentInfo,timingInfo){var segment=segmentInfo.segment;var mappingObj=this.timelines[segmentInfo.timeline];if(segmentInfo.timestampOffset!==null){this.logger_('tsO:',segmentInfo.timestampOffset);mappingObj={time:segmentInfo.startOfSegment,mapping:segmentInfo.startOfSegment-timingInfo.start};this.timelines[segmentInfo.timeline]=mappingObj;this.trigger('timestampoffset');segment.start=segmentInfo.startOfSegment;segment.end=timingInfo.end+mappingObj.mapping;}else if(mappingObj){segment.start=timingInfo.start+mappingObj.mapping;segment.end=timingInfo.end+mappingObj.mapping;}else{return false;}
418return true;}},{key:'saveDiscontinuitySyncInfo_',value:function saveDiscontinuitySyncInfo_(segmentInfo){var playlist=segmentInfo.playlist;var segment=segmentInfo.segment;if(segment.discontinuity){this.discontinuities[segment.timeline]={time:segment.start,accuracy:0};}else if(playlist.discontinuityStarts.length){for(var i=0;i<playlist.discontinuityStarts.length;i++){var segmentIndex=playlist.discontinuityStarts[i];var discontinuity=playlist.discontinuitySequence+i+1;var mediaIndexDiff=segmentIndex-segmentInfo.mediaIndex;var accuracy=Math.abs(mediaIndexDiff);if(!this.discontinuities[discontinuity]||this.discontinuities[discontinuity].accuracy>accuracy){var time=undefined;if(mediaIndexDiff<0){time=segment.start-(0,_playlist.sumDurations)(playlist,segmentInfo.mediaIndex,segmentIndex);}else{time=segment.end+(0,_playlist.sumDurations)(playlist,segmentInfo.mediaIndex+1,segmentIndex);}
419this.discontinuities[discontinuity]={time:time,accuracy:accuracy};}}}}},{key:'logger_',value:function logger_(){}}]);return SyncController;})(_videoJs2['default'].EventTarget);exports['default']=SyncController;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./playlist":11,"mux.js/lib/mp4/probe":57,"mux.js/lib/tools/ts-inspector.js":59}],19:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var parseCodecs=function parseCodecs(){var codecs=arguments.length<=0||arguments[0]===undefined?'':arguments[0];var result={codecCount:0};var parsed=undefined;result.codecCount=codecs.split(',').length;result.codecCount=result.codecCount||2;parsed=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(codecs);if(parsed){result.videoCodec=parsed[2];result.videoObjectTypeIndicator=parsed[3];}
420result.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(codecs);result.audioProfile=result.audioProfile&&result.audioProfile[2];return result;};exports.parseCodecs=parseCodecs;},{}],20:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x3,_x4,_x5){var _again=true;_function:while(_again){var object=_x3,property=_x4,receiver=_x5;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x3=parent;_x4=property;_x5=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
421function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
422function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
423var _segmentLoader=require('./segment-loader');var _segmentLoader2=_interopRequireDefault(_segmentLoader);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _videojsContribMediaSourcesEs5RemoveCuesFromTrackJs=require('videojs-contrib-media-sources/es5/remove-cues-from-track.js');var _videojsContribMediaSourcesEs5RemoveCuesFromTrackJs2=_interopRequireDefault(_videojsContribMediaSourcesEs5RemoveCuesFromTrackJs);var _binUtils=require('./bin-utils');var VTT_LINE_TERMINATORS=new Uint8Array('\n\n'.split('').map(function(char){return char.charCodeAt(0);}));var uintToString=function uintToString(uintArray){return String.fromCharCode.apply(null,uintArray);};var VTTSegmentLoader=(function(_SegmentLoader){_inherits(VTTSegmentLoader,_SegmentLoader);function VTTSegmentLoader(settings){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,VTTSegmentLoader);_get(Object.getPrototypeOf(VTTSegmentLoader.prototype),'constructor',this).call(this,settings,options);this.mediaSource_=null;this.subtitlesTrack_=null;}
424_createClass(VTTSegmentLoader,[{key:'buffered_',value:function buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length){return _videoJs2['default'].createTimeRanges();}
425var cues=this.subtitlesTrack_.cues;var start=cues[0].startTime;var end=cues[cues.length-1].startTime;return _videoJs2['default'].createTimeRanges([[start,end]]);}},{key:'initSegment',value:function initSegment(map){var set=arguments.length<=1||arguments[1]===undefined?false:arguments[1];if(!map){return null;}
426var id=(0,_binUtils.initSegmentId)(map);var storedMap=this.initSegments_[id];if(set&&!storedMap&&map.bytes){var combinedByteLength=VTT_LINE_TERMINATORS.byteLength+map.bytes.byteLength;var combinedSegment=new Uint8Array(combinedByteLength);combinedSegment.set(map.bytes);combinedSegment.set(VTT_LINE_TERMINATORS,map.bytes.byteLength);this.initSegments_[id]=storedMap={resolvedUri:map.resolvedUri,byterange:map.byterange,bytes:combinedSegment};}
427return storedMap||map;}},{key:'couldBeginLoading_',value:function couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused();}},{key:'init_',value:function init_(){this.state='READY';this.resetEverything();return this.monitorBuffer_();}},{key:'track',value:function track(_track){if(typeof _track==='undefined'){return this.subtitlesTrack_;}
428this.subtitlesTrack_=_track;if(this.state==='INIT'&&this.couldBeginLoading_()){this.init_();}
429return this.subtitlesTrack_;}},{key:'remove',value:function remove(start,end){(0,_videojsContribMediaSourcesEs5RemoveCuesFromTrackJs2['default'])(start,end,this.subtitlesTrack_);}},{key:'fillBuffer_',value:function fillBuffer_(){var _this=this;if(!this.syncPoint_){this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());}
430var segmentInfo=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);segmentInfo=this.skipEmptySegments_(segmentInfo);if(!segmentInfo){return;}
431if(this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline)===null){var checkTimestampOffset=function checkTimestampOffset(){_this.state='READY';if(!_this.paused()){_this.monitorBuffer_();}};this.syncController_.one('timestampoffset',checkTimestampOffset);this.state='WAITING_ON_TIMELINE';return;}
432this.loadSegment_(segmentInfo);}},{key:'skipEmptySegments_',value:function skipEmptySegments_(segmentInfo){while(segmentInfo&&segmentInfo.segment.empty){segmentInfo=this.generateSegmentInfo_(segmentInfo.playlist,segmentInfo.mediaIndex+1,segmentInfo.startOfSegment+segmentInfo.duration,segmentInfo.isSyncRequest);}
433return segmentInfo;}},{key:'handleSegment_',value:function handleSegment_(){var _this2=this;if(!this.pendingSegment_||!this.subtitlesTrack_){this.state='READY';return;}
434this.state='APPENDING';var segmentInfo=this.pendingSegment_;var segment=segmentInfo.segment;if(typeof _globalWindow2['default'].WebVTT!=='function'&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var _ret=(function(){var loadHandler=function loadHandler(){_this2.handleSegment_();};_this2.state='WAITING_ON_VTTJS';_this2.subtitlesTrack_.tech_.one('vttjsloaded',loadHandler);_this2.subtitlesTrack_.tech_.one('vttjserror',function(){_this2.subtitlesTrack_.tech_.off('vttjsloaded',loadHandler);_this2.error({message:'Error loading vtt.js'});_this2.state='READY';_this2.pause();_this2.trigger('error');});return{v:undefined};})();if(typeof _ret==='object')return _ret.v;}
435segment.requested=true;try{this.parseVTTCues_(segmentInfo);}catch(e){this.error({message:e.message});this.state='READY';this.pause();return this.trigger('error');}
436this.updateTimeMapping_(segmentInfo,this.syncController_.timelines[segmentInfo.timeline],this.playlist_);if(segmentInfo.isSyncRequest){this.trigger('syncinfoupdate');this.pendingSegment_=null;this.state='READY';return;}
437segmentInfo.byteLength=segmentInfo.bytes.byteLength;this.mediaSecondsLoaded+=segment.duration;if(segmentInfo.cues.length){this.remove(segmentInfo.cues[0].endTime,segmentInfo.cues[segmentInfo.cues.length-1].endTime);}
438segmentInfo.cues.forEach(function(cue){_this2.subtitlesTrack_.addCue(cue);});this.handleUpdateEnd_();}},{key:'parseVTTCues_',value:function parseVTTCues_(segmentInfo){var decoder=undefined;var decodeBytesToString=false;if(typeof _globalWindow2['default'].TextDecoder==='function'){decoder=new _globalWindow2['default'].TextDecoder('utf8');}else{decoder=_globalWindow2['default'].WebVTT.StringDecoder();decodeBytesToString=true;}
439var parser=new _globalWindow2['default'].WebVTT.Parser(_globalWindow2['default'],_globalWindow2['default'].vttjs,decoder);segmentInfo.cues=[];segmentInfo.timestampmap={MPEGTS:0,LOCAL:0};parser.oncue=segmentInfo.cues.push.bind(segmentInfo.cues);parser.ontimestampmap=function(map){return segmentInfo.timestampmap=map;};parser.onparsingerror=function(error){_videoJs2['default'].log.warn('Error encountered when parsing cues: '+error.message);};if(segmentInfo.segment.map){var mapData=segmentInfo.segment.map.bytes;if(decodeBytesToString){mapData=uintToString(mapData);}
440parser.parse(mapData);}
441var segmentData=segmentInfo.bytes;if(decodeBytesToString){segmentData=uintToString(segmentData);}
442parser.parse(segmentData);parser.flush();}},{key:'updateTimeMapping_',value:function updateTimeMapping_(segmentInfo,mappingObj,playlist){var segment=segmentInfo.segment;if(!mappingObj){return;}
443if(!segmentInfo.cues.length){segment.empty=true;return;}
444var timestampmap=segmentInfo.timestampmap;var diff=timestampmap.MPEGTS/90000-timestampmap.LOCAL+mappingObj.mapping;segmentInfo.cues.forEach(function(cue){cue.startTime+=diff;cue.endTime+=diff;});if(!playlist.syncInfo){var firstStart=segmentInfo.cues[0].startTime;var lastStart=segmentInfo.cues[segmentInfo.cues.length-1].startTime;playlist.syncInfo={mediaSequence:playlist.mediaSequence+segmentInfo.mediaIndex,time:Math.min(firstStart,lastStart-segment.duration)};}}}]);return VTTSegmentLoader;})(_segmentLoader2['default']);exports['default']=VTTSegmentLoader;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./bin-utils":2,"./segment-loader":16,"global/window":32,"videojs-contrib-media-sources/es5/remove-cues-from-track.js":72}],21:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
445var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var xhrFactory=function xhrFactory(){var xhr=function XhrFunction(options,callback){options=(0,_videoJs.mergeOptions)({timeout:45e3},options);var beforeRequest=XhrFunction.beforeRequest||_videoJs2['default'].Hls.xhr.beforeRequest;if(beforeRequest&&typeof beforeRequest==='function'){var newOptions=beforeRequest(options);if(newOptions){options=newOptions;}}
446var request=(0,_videoJs.xhr)(options,function(error,response){var reqResponse=request.response;if(!error&&reqResponse){request.responseTime=Date.now();request.roundTripTime=request.responseTime-request.requestTime;request.bytesReceived=reqResponse.byteLength||reqResponse.length;if(!request.bandwidth){request.bandwidth=Math.floor(request.bytesReceived/request.roundTripTime*8*1000);}}
447if(error&&error.code==='ETIMEDOUT'){request.timedout=true;}
448if(!error&&!request.aborted&&response.statusCode!==200&&response.statusCode!==206&&response.statusCode!==0){error=new Error('XHR Failed with a response of: '+(request&&(reqResponse||request.responseText)));}
449callback(error,request);});var originalAbort=request.abort;request.abort=function(){request.aborted=true;return originalAbort.apply(request,arguments);};request.uri=options.uri;request.requestTime=Date.now();return request;};return xhr;};exports['default']=xhrFactory;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],22:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
450var precompute=function precompute(){var tables=[[[],[],[],[],[]],[[],[],[],[],[]]];var encTable=tables[0];var decTable=tables[1];var sbox=encTable[4];var sboxInv=decTable[4];var i=undefined;var x=undefined;var xInv=undefined;var d=[];var th=[];var x2=undefined;var x4=undefined;var x8=undefined;var s=undefined;var tEnc=undefined;var tDec=undefined;for(i=0;i<256;i++){th[(d[i]=i<<1^(i>>7)*283)^i]=i;}
451for(x=xInv=0;!sbox[x];x^=x2||1,xInv=th[xInv]||1){s=xInv^xInv<<1^xInv<<2^xInv<<3^xInv<<4;s=s>>8^s&255^99;sbox[x]=s;sboxInv[s]=x;x8=d[x4=d[x2=d[x]]];tDec=x8*0x1010101^x4*0x10001^x2*0x101^x*0x1010100;tEnc=d[s]*0x101^s*0x1010100;for(i=0;i<4;i++){encTable[i][x]=tEnc=tEnc<<24^tEnc>>>8;decTable[i][s]=tDec=tDec<<24^tDec>>>8;}}
452for(i=0;i<5;i++){encTable[i]=encTable[i].slice(0);decTable[i]=decTable[i].slice(0);}
453return tables;};var aesTables=null;var AES=(function(){function AES(key){_classCallCheck(this,AES);if(!aesTables){aesTables=precompute();}
454this._tables=[[aesTables[0][0].slice(),aesTables[0][1].slice(),aesTables[0][2].slice(),aesTables[0][3].slice(),aesTables[0][4].slice()],[aesTables[1][0].slice(),aesTables[1][1].slice(),aesTables[1][2].slice(),aesTables[1][3].slice(),aesTables[1][4].slice()]];var i=undefined;var j=undefined;var tmp=undefined;var encKey=undefined;var decKey=undefined;var sbox=this._tables[0][4];var decTable=this._tables[1];var keyLen=key.length;var rcon=1;if(keyLen!==4&&keyLen!==6&&keyLen!==8){throw new Error('Invalid aes key size');}
455encKey=key.slice(0);decKey=[];this._key=[encKey,decKey];for(i=keyLen;i<4*keyLen+28;i++){tmp=encKey[i-1];if(i%keyLen===0||keyLen===8&&i%keyLen===4){tmp=sbox[tmp>>>24]<<24^sbox[tmp>>16&255]<<16^sbox[tmp>>8&255]<<8^sbox[tmp&255];if(i%keyLen===0){tmp=tmp<<8^tmp>>>24^rcon<<24;rcon=rcon<<1^(rcon>>7)*283;}}
456encKey[i]=encKey[i-keyLen]^tmp;}
457for(j=0;i;j++,i--){tmp=encKey[j&3?i:i-4];if(i<=4||j<4){decKey[j]=tmp;}else{decKey[j]=decTable[0][sbox[tmp>>>24]]^decTable[1][sbox[tmp>>16&255]]^decTable[2][sbox[tmp>>8&255]]^decTable[3][sbox[tmp&255]];}}}
458_createClass(AES,[{key:'decrypt',value:function decrypt(encrypted0,encrypted1,encrypted2,encrypted3,out,offset){var key=this._key[1];var a=encrypted0^key[0];var b=encrypted3^key[1];var c=encrypted2^key[2];var d=encrypted1^key[3];var a2=undefined;var b2=undefined;var c2=undefined;var nInnerRounds=key.length/4-2;var i=undefined;var kIndex=4;var table=this._tables[1];var table0=table[0];var table1=table[1];var table2=table[2];var table3=table[3];var sbox=table[4];for(i=0;i<nInnerRounds;i++){a2=table0[a>>>24]^table1[b>>16&255]^table2[c>>8&255]^table3[d&255]^key[kIndex];b2=table0[b>>>24]^table1[c>>16&255]^table2[d>>8&255]^table3[a&255]^key[kIndex+1];c2=table0[c>>>24]^table1[d>>16&255]^table2[a>>8&255]^table3[b&255]^key[kIndex+2];d=table0[d>>>24]^table1[a>>16&255]^table2[b>>8&255]^table3[c&255]^key[kIndex+3];kIndex+=4;a=a2;b=b2;c=c2;}
459for(i=0;i<4;i++){out[(3&-i)+offset]=sbox[a>>>24]<<24^sbox[b>>16&255]<<16^sbox[c>>8&255]<<8^sbox[d&255]^key[kIndex++];a2=a;a=b;b=c;c=d;d=a2;}}}]);return AES;})();exports['default']=AES;module.exports=exports['default'];},{}],23:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x,_x2,_x3){var _again=true;_function:while(_again){var object=_x,property=_x2,receiver=_x3;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x=parent;_x2=property;_x3=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
460function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
461function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
462var _stream=require('./stream');var _stream2=_interopRequireDefault(_stream);var AsyncStream=(function(_Stream){_inherits(AsyncStream,_Stream);function AsyncStream(){_classCallCheck(this,AsyncStream);_get(Object.getPrototypeOf(AsyncStream.prototype),'constructor',this).call(this,_stream2['default']);this.jobs=[];this.delay=1;this.timeout_=null;}
463_createClass(AsyncStream,[{key:'processJob_',value:function processJob_(){this.jobs.shift()();if(this.jobs.length){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay);}else{this.timeout_=null;}}},{key:'push',value:function push(job){this.jobs.push(job);if(!this.timeout_){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay);}}}]);return AsyncStream;})(_stream2['default']);exports['default']=AsyncStream;module.exports=exports['default'];},{"./stream":26}],24:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
464function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
465var _aes=require('./aes');var _aes2=_interopRequireDefault(_aes);var _asyncStream=require('./async-stream');var _asyncStream2=_interopRequireDefault(_asyncStream);var _pkcs7=require('pkcs7');var ntoh=function ntoh(word){return word<<24|(word&0xff00)<<8|(word&0xff0000)>>8|word>>>24;};var decrypt=function decrypt(encrypted,key,initVector){var encrypted32=new Int32Array(encrypted.buffer,encrypted.byteOffset,encrypted.byteLength>>2);var decipher=new _aes2['default'](Array.prototype.slice.call(key));var decrypted=new Uint8Array(encrypted.byteLength);var decrypted32=new Int32Array(decrypted.buffer);var init0=undefined;var init1=undefined;var init2=undefined;var init3=undefined;var encrypted0=undefined;var encrypted1=undefined;var encrypted2=undefined;var encrypted3=undefined;var wordIx=undefined;init0=initVector[0];init1=initVector[1];init2=initVector[2];init3=initVector[3];for(wordIx=0;wordIx<encrypted32.length;wordIx+=4){encrypted0=ntoh(encrypted32[wordIx]);encrypted1=ntoh(encrypted32[wordIx+1]);encrypted2=ntoh(encrypted32[wordIx+2]);encrypted3=ntoh(encrypted32[wordIx+3]);decipher.decrypt(encrypted0,encrypted1,encrypted2,encrypted3,decrypted32,wordIx);decrypted32[wordIx]=ntoh(decrypted32[wordIx]^init0);decrypted32[wordIx+1]=ntoh(decrypted32[wordIx+1]^init1);decrypted32[wordIx+2]=ntoh(decrypted32[wordIx+2]^init2);decrypted32[wordIx+3]=ntoh(decrypted32[wordIx+3]^init3);init0=encrypted0;init1=encrypted1;init2=encrypted2;init3=encrypted3;}
466return decrypted;};exports.decrypt=decrypt;var Decrypter=(function(){function Decrypter(encrypted,key,initVector,done){_classCallCheck(this,Decrypter);var step=Decrypter.STEP;var encrypted32=new Int32Array(encrypted.buffer);var decrypted=new Uint8Array(encrypted.byteLength);var i=0;this.asyncStream_=new _asyncStream2['default']();this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i,i+step),key,initVector,decrypted));for(i=step;i<encrypted32.length;i+=step){initVector=new Uint32Array([ntoh(encrypted32[i-4]),ntoh(encrypted32[i-3]),ntoh(encrypted32[i-2]),ntoh(encrypted32[i-1])]);this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i,i+step),key,initVector,decrypted));}
467this.asyncStream_.push(function(){done(null,(0,_pkcs7.unpad)(decrypted));});}
468_createClass(Decrypter,[{key:'decryptChunk_',value:function decryptChunk_(encrypted,key,initVector,decrypted){return function(){var bytes=decrypt(encrypted,key,initVector);decrypted.set(bytes,encrypted.byteOffset);};}}],[{key:'STEP',get:function get(){return 32000;}}]);return Decrypter;})();exports.Decrypter=Decrypter;exports['default']={Decrypter:Decrypter,decrypt:decrypt};},{"./aes":22,"./async-stream":23,"pkcs7":28}],25:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
469var _decrypter=require('./decrypter');var _asyncStream=require('./async-stream');var _asyncStream2=_interopRequireDefault(_asyncStream);exports['default']={decrypt:_decrypter.decrypt,Decrypter:_decrypter.Decrypter,AsyncStream:_asyncStream2['default']};module.exports=exports['default'];},{"./async-stream":23,"./decrypter":24}],26:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
470var Stream=(function(){function Stream(){_classCallCheck(this,Stream);this.listeners={};}
471_createClass(Stream,[{key:'on',value:function on(type,listener){if(!this.listeners[type]){this.listeners[type]=[];}
472this.listeners[type].push(listener);}},{key:'off',value:function off(type,listener){var index=undefined;if(!this.listeners[type]){return false;}
473index=this.listeners[type].indexOf(listener);this.listeners[type].splice(index,1);return index>-1;}},{key:'trigger',value:function trigger(type){var callbacks=undefined;var i=undefined;var length=undefined;var args=undefined;callbacks=this.listeners[type];if(!callbacks){return;}
474if(arguments.length===2){length=callbacks.length;for(i=0;i<length;++i){callbacks[i].call(this,arguments[1]);}}else{args=Array.prototype.slice.call(arguments,1);length=callbacks.length;for(i=0;i<length;++i){callbacks[i].apply(this,args);}}}},{key:'dispose',value:function dispose(){this.listeners={};}},{key:'pipe',value:function pipe(destination){this.on('data',function(data){destination.push(data);});}}]);return Stream;})();exports['default']=Stream;module.exports=exports['default'];},{}],27:[function(require,module,exports){'use strict';var PADDING;module.exports=function pad(plaintext){var padding=PADDING[(plaintext.byteLength%16)||0],result=new Uint8Array(plaintext.byteLength+padding.length);result.set(plaintext);result.set(padding,plaintext.byteLength);return result;};PADDING=[[16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16],[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15],[14,14,14,14,14,14,14,14,14,14,14,14,14,14],[13,13,13,13,13,13,13,13,13,13,13,13,13],[12,12,12,12,12,12,12,12,12,12,12,12],[11,11,11,11,11,11,11,11,11,11,11],[10,10,10,10,10,10,10,10,10,10],[9,9,9,9,9,9,9,9,9],[8,8,8,8,8,8,8,8],[7,7,7,7,7,7,7],[6,6,6,6,6,6],[5,5,5,5,5],[4,4,4,4],[3,3,3],[2,2],[1]];},{}],28:[function(require,module,exports){'use strict';exports.pad=require('./pad.js');exports.unpad=require('./unpad.js');},{"./pad.js":27,"./unpad.js":29}],29:[function(require,module,exports){'use strict';module.exports=function unpad(padded){return padded.subarray(0,padded.byteLength-padded[padded.byteLength-1]);};},{}],30:[function(require,module,exports){},{}],31:[function(require,module,exports){(function(global){var topLevel=typeof global!=='undefined'?global:typeof window!=='undefined'?window:{}
475var minDoc=require('min-document');var doccy;if(typeof document!=='undefined'){doccy=document;}else{doccy=topLevel['__GLOBAL_DOCUMENT_CACHE@4'];if(!doccy){doccy=topLevel['__GLOBAL_DOCUMENT_CACHE@4']=minDoc;}}
476module.exports=doccy;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"min-document":30}],32:[function(require,module,exports){(function(global){var win;if(typeof window!=="undefined"){win=window;}else if(typeof global!=="undefined"){win=global;}else if(typeof self!=="undefined"){win=self;}else{win={};}
477module.exports=win;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],33:[function(require,module,exports){'use strict';var _lineStream=require('./line-stream');var _lineStream2=_interopRequireDefault(_lineStream);var _parseStream=require('./parse-stream');var _parseStream2=_interopRequireDefault(_parseStream);var _parser=require('./parser');var _parser2=_interopRequireDefault(_parser);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
478module.exports={LineStream:_lineStream2['default'],ParseStream:_parseStream2['default'],Parser:_parser2['default']};},{"./line-stream":34,"./parse-stream":35,"./parser":36}],34:[function(require,module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _stream=require('./stream');var _stream2=_interopRequireDefault(_stream);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
479function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
480function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}
481function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
482var LineStream=function(_Stream){_inherits(LineStream,_Stream);function LineStream(){_classCallCheck(this,LineStream);var _this=_possibleConstructorReturn(this,(LineStream.__proto__||Object.getPrototypeOf(LineStream)).call(this));_this.buffer='';return _this;}
483_createClass(LineStream,[{key:'push',value:function push(data){var nextNewline=void 0;this.buffer+=data;nextNewline=this.buffer.indexOf('\n');for(;nextNewline>-1;nextNewline=this.buffer.indexOf('\n')){this.trigger('data',this.buffer.substring(0,nextNewline));this.buffer=this.buffer.substring(nextNewline+1);}}}]);return LineStream;}(_stream2['default']);exports['default']=LineStream;},{"./stream":37}],35:[function(require,module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"])_i["return"]();}finally{if(_d)throw _e;}}return _arr;}return function(arr,i){if(Array.isArray(arr)){return arr;}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i);}else{throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _stream=require('./stream');var _stream2=_interopRequireDefault(_stream);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
484function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
485function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}
486function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
487var attributeSeparator=function attributeSeparator(){var key='[^=]*';var value='"[^"]*"|[^,]*';var keyvalue='(?:'+key+')=(?:'+value+')';return new RegExp('(?:^|,)('+keyvalue+')');};var parseAttributes=function parseAttributes(attributes){var attrs=attributes.split(attributeSeparator());var result={};var i=attrs.length;var attr=void 0;while(i--){if(attrs[i]===''){continue;}
488attr=/([^=]*)=(.*)/.exec(attrs[i]).slice(1);attr[0]=attr[0].replace(/^\s+|\s+$/g,'');attr[1]=attr[1].replace(/^\s+|\s+$/g,'');attr[1]=attr[1].replace(/^['"](.*)['"]$/g,'$1');result[attr[0]]=attr[1];}
489return result;};var ParseStream=function(_Stream){_inherits(ParseStream,_Stream);function ParseStream(){_classCallCheck(this,ParseStream);return _possibleConstructorReturn(this,(ParseStream.__proto__||Object.getPrototypeOf(ParseStream)).call(this));}
490_createClass(ParseStream,[{key:'push',value:function push(line){var match=void 0;var event=void 0;line=line.replace(/^[\u0000\s]+|[\u0000\s]+$/g,'');if(line.length===0){return;}
491if(line[0]!=='#'){this.trigger('data',{type:'uri',uri:line});return;}
492if(line.indexOf('#EXT')!==0){this.trigger('data',{type:'comment',text:line.slice(1)});return;}
493line=line.replace('\r','');match=/^#EXTM3U/.exec(line);if(match){this.trigger('data',{type:'tag',tagType:'m3u'});return;}
494match=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(line);if(match){event={type:'tag',tagType:'inf'};if(match[1]){event.duration=parseFloat(match[1]);}
495if(match[2]){event.title=match[2];}
496this.trigger('data',event);return;}
497match=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(line);if(match){event={type:'tag',tagType:'targetduration'};if(match[1]){event.duration=parseInt(match[1],10);}
498this.trigger('data',event);return;}
499match=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(line);if(match){event={type:'tag',tagType:'totalduration'};if(match[1]){event.duration=parseInt(match[1],10);}
500this.trigger('data',event);return;}
501match=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(line);if(match){event={type:'tag',tagType:'version'};if(match[1]){event.version=parseInt(match[1],10);}
502this.trigger('data',event);return;}
503match=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(line);if(match){event={type:'tag',tagType:'media-sequence'};if(match[1]){event.number=parseInt(match[1],10);}
504this.trigger('data',event);return;}
505match=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(line);if(match){event={type:'tag',tagType:'discontinuity-sequence'};if(match[1]){event.number=parseInt(match[1],10);}
506this.trigger('data',event);return;}
507match=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(line);if(match){event={type:'tag',tagType:'playlist-type'};if(match[1]){event.playlistType=match[1];}
508this.trigger('data',event);return;}
509match=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(line);if(match){event={type:'tag',tagType:'byterange'};if(match[1]){event.length=parseInt(match[1],10);}
510if(match[2]){event.offset=parseInt(match[2],10);}
511this.trigger('data',event);return;}
512match=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(line);if(match){event={type:'tag',tagType:'allow-cache'};if(match[1]){event.allowed=!/NO/.test(match[1]);}
513this.trigger('data',event);return;}
514match=/^#EXT-X-MAP:?(.*)$/.exec(line);if(match){event={type:'tag',tagType:'map'};if(match[1]){var attributes=parseAttributes(match[1]);if(attributes.URI){event.uri=attributes.URI;}
515if(attributes.BYTERANGE){var _attributes$BYTERANGE=attributes.BYTERANGE.split('@'),_attributes$BYTERANGE2=_slicedToArray(_attributes$BYTERANGE,2),length=_attributes$BYTERANGE2[0],offset=_attributes$BYTERANGE2[1];event.byterange={};if(length){event.byterange.length=parseInt(length,10);}
516if(offset){event.byterange.offset=parseInt(offset,10);}}}
517this.trigger('data',event);return;}
518match=/^#EXT-X-STREAM-INF:?(.*)$/.exec(line);if(match){event={type:'tag',tagType:'stream-inf'};if(match[1]){event.attributes=parseAttributes(match[1]);if(event.attributes.RESOLUTION){var split=event.attributes.RESOLUTION.split('x');var resolution={};if(split[0]){resolution.width=parseInt(split[0],10);}
519if(split[1]){resolution.height=parseInt(split[1],10);}
520event.attributes.RESOLUTION=resolution;}
521if(event.attributes.BANDWIDTH){event.attributes.BANDWIDTH=parseInt(event.attributes.BANDWIDTH,10);}
522if(event.attributes['PROGRAM-ID']){event.attributes['PROGRAM-ID']=parseInt(event.attributes['PROGRAM-ID'],10);}}
523this.trigger('data',event);return;}
524match=/^#EXT-X-MEDIA:?(.*)$/.exec(line);if(match){event={type:'tag',tagType:'media'};if(match[1]){event.attributes=parseAttributes(match[1]);}
525this.trigger('data',event);return;}
526match=/^#EXT-X-ENDLIST/.exec(line);if(match){this.trigger('data',{type:'tag',tagType:'endlist'});return;}
527match=/^#EXT-X-DISCONTINUITY/.exec(line);if(match){this.trigger('data',{type:'tag',tagType:'discontinuity'});return;}
528match=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(line);if(match){event={type:'tag',tagType:'program-date-time'};if(match[1]){event.dateTimeString=match[1];event.dateTimeObject=new Date(match[1]);}
529this.trigger('data',event);return;}
530match=/^#EXT-X-KEY:?(.*)$/.exec(line);if(match){event={type:'tag',tagType:'key'};if(match[1]){event.attributes=parseAttributes(match[1]);if(event.attributes.IV){if(event.attributes.IV.substring(0,2).toLowerCase()==='0x'){event.attributes.IV=event.attributes.IV.substring(2);}
531event.attributes.IV=event.attributes.IV.match(/.{8}/g);event.attributes.IV[0]=parseInt(event.attributes.IV[0],16);event.attributes.IV[1]=parseInt(event.attributes.IV[1],16);event.attributes.IV[2]=parseInt(event.attributes.IV[2],16);event.attributes.IV[3]=parseInt(event.attributes.IV[3],16);event.attributes.IV=new Uint32Array(event.attributes.IV);}}
532this.trigger('data',event);return;}
533match=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(line);if(match){event={type:'tag',tagType:'cue-out-cont'};if(match[1]){event.data=match[1];}else{event.data='';}
534this.trigger('data',event);return;}
535match=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(line);if(match){event={type:'tag',tagType:'cue-out'};if(match[1]){event.data=match[1];}else{event.data='';}
536this.trigger('data',event);return;}
537match=/^#EXT-X-CUE-IN:?(.*)?$/.exec(line);if(match){event={type:'tag',tagType:'cue-in'};if(match[1]){event.data=match[1];}else{event.data='';}
538this.trigger('data',event);return;}
539this.trigger('data',{type:'tag',data:line.slice(4)});}}]);return ParseStream;}(_stream2['default']);exports['default']=ParseStream;},{"./stream":37}],36:[function(require,module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _stream=require('./stream');var _stream2=_interopRequireDefault(_stream);var _lineStream=require('./line-stream');var _lineStream2=_interopRequireDefault(_lineStream);var _parseStream=require('./parse-stream');var _parseStream2=_interopRequireDefault(_parseStream);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
540function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
541function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}
542function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
543var Parser=function(_Stream){_inherits(Parser,_Stream);function Parser(){_classCallCheck(this,Parser);var _this=_possibleConstructorReturn(this,(Parser.__proto__||Object.getPrototypeOf(Parser)).call(this));_this.lineStream=new _lineStream2['default']();_this.parseStream=new _parseStream2['default']();_this.lineStream.pipe(_this.parseStream);var self=_this;var uris=[];var currentUri={};var currentMap=void 0;var _key=void 0;var noop=function noop(){};var defaultMediaGroups={'AUDIO':{},'VIDEO':{},'CLOSED-CAPTIONS':{},'SUBTITLES':{}};var currentTimeline=0;_this.manifest={allowCache:true,discontinuityStarts:[],segments:[]};_this.parseStream.on('data',function(entry){var mediaGroup=void 0;var rendition=void 0;({tag:function tag(){(({'allow-cache':function allowCache(){this.manifest.allowCache=entry.allowed;if(!('allowed'in entry)){this.trigger('info',{message:'defaulting allowCache to YES'});this.manifest.allowCache=true;}},byterange:function byterange(){var byterange={};if('length'in entry){currentUri.byterange=byterange;byterange.length=entry.length;if(!('offset'in entry)){this.trigger('info',{message:'defaulting offset to zero'});entry.offset=0;}}
544if('offset'in entry){currentUri.byterange=byterange;byterange.offset=entry.offset;}},endlist:function endlist(){this.manifest.endList=true;},inf:function inf(){if(!('mediaSequence'in this.manifest)){this.manifest.mediaSequence=0;this.trigger('info',{message:'defaulting media sequence to zero'});}
545if(!('discontinuitySequence'in this.manifest)){this.manifest.discontinuitySequence=0;this.trigger('info',{message:'defaulting discontinuity sequence to zero'});}
546if(entry.duration>0){currentUri.duration=entry.duration;}
547if(entry.duration===0){currentUri.duration=0.01;this.trigger('info',{message:'updating zero segment duration to a small value'});}
548this.manifest.segments=uris;},key:function key(){if(!entry.attributes){this.trigger('warn',{message:'ignoring key declaration without attribute list'});return;}
549if(entry.attributes.METHOD==='NONE'){_key=null;return;}
550if(!entry.attributes.URI){this.trigger('warn',{message:'ignoring key declaration without URI'});return;}
551if(!entry.attributes.METHOD){this.trigger('warn',{message:'defaulting key method to AES-128'});}
552_key={method:entry.attributes.METHOD||'AES-128',uri:entry.attributes.URI};if(typeof entry.attributes.IV!=='undefined'){_key.iv=entry.attributes.IV;}},'media-sequence':function mediaSequence(){if(!isFinite(entry.number)){this.trigger('warn',{message:'ignoring invalid media sequence: '+entry.number});return;}
553this.manifest.mediaSequence=entry.number;},'discontinuity-sequence':function discontinuitySequence(){if(!isFinite(entry.number)){this.trigger('warn',{message:'ignoring invalid discontinuity sequence: '+entry.number});return;}
554this.manifest.discontinuitySequence=entry.number;currentTimeline=entry.number;},'playlist-type':function playlistType(){if(!/VOD|EVENT/.test(entry.playlistType)){this.trigger('warn',{message:'ignoring unknown playlist type: '+entry.playlist});return;}
555this.manifest.playlistType=entry.playlistType;},map:function map(){currentMap={};if(entry.uri){currentMap.uri=entry.uri;}
556if(entry.byterange){currentMap.byterange=entry.byterange;}},'stream-inf':function streamInf(){this.manifest.playlists=uris;this.manifest.mediaGroups=this.manifest.mediaGroups||defaultMediaGroups;if(!entry.attributes){this.trigger('warn',{message:'ignoring empty stream-inf attributes'});return;}
557if(!currentUri.attributes){currentUri.attributes={};}
558_extends(currentUri.attributes,entry.attributes);},media:function media(){this.manifest.mediaGroups=this.manifest.mediaGroups||defaultMediaGroups;if(!(entry.attributes&&entry.attributes.TYPE&&entry.attributes['GROUP-ID']&&entry.attributes.NAME)){this.trigger('warn',{message:'ignoring incomplete or missing media group'});return;}
559var mediaGroupType=this.manifest.mediaGroups[entry.attributes.TYPE];mediaGroupType[entry.attributes['GROUP-ID']]=mediaGroupType[entry.attributes['GROUP-ID']]||{};mediaGroup=mediaGroupType[entry.attributes['GROUP-ID']];rendition={'default':/yes/i.test(entry.attributes.DEFAULT)};if(rendition['default']){rendition.autoselect=true;}else{rendition.autoselect=/yes/i.test(entry.attributes.AUTOSELECT);}
560if(entry.attributes.LANGUAGE){rendition.language=entry.attributes.LANGUAGE;}
561if(entry.attributes.URI){rendition.uri=entry.attributes.URI;}
562if(entry.attributes['INSTREAM-ID']){rendition.instreamId=entry.attributes['INSTREAM-ID'];}
563if(entry.attributes.CHARACTERISTICS){rendition.characteristics=entry.attributes.CHARACTERISTICS;}
564if(entry.attributes.FORCED){rendition.forced=/yes/i.test(entry.attributes.FORCED);}
565mediaGroup[entry.attributes.NAME]=rendition;},discontinuity:function discontinuity(){currentTimeline+=1;currentUri.discontinuity=true;this.manifest.discontinuityStarts.push(uris.length);},'program-date-time':function programDateTime(){this.manifest.dateTimeString=entry.dateTimeString;this.manifest.dateTimeObject=entry.dateTimeObject;},targetduration:function targetduration(){if(!isFinite(entry.duration)||entry.duration<0){this.trigger('warn',{message:'ignoring invalid target duration: '+entry.duration});return;}
566this.manifest.targetDuration=entry.duration;},totalduration:function totalduration(){if(!isFinite(entry.duration)||entry.duration<0){this.trigger('warn',{message:'ignoring invalid total duration: '+entry.duration});return;}
567this.manifest.totalDuration=entry.duration;},'cue-out':function cueOut(){currentUri.cueOut=entry.data;},'cue-out-cont':function cueOutCont(){currentUri.cueOutCont=entry.data;},'cue-in':function cueIn(){currentUri.cueIn=entry.data;}})[entry.tagType]||noop).call(self);},uri:function uri(){currentUri.uri=entry.uri;uris.push(currentUri);if(this.manifest.targetDuration&&!('duration'in currentUri)){this.trigger('warn',{message:'defaulting segment duration to the target duration'});currentUri.duration=this.manifest.targetDuration;}
568if(_key){currentUri.key=_key;}
569currentUri.timeline=currentTimeline;if(currentMap){currentUri.map=currentMap;}
570currentUri={};},comment:function comment(){}})[entry.type].call(self);});return _this;}
571_createClass(Parser,[{key:'push',value:function push(chunk){this.lineStream.push(chunk);}},{key:'end',value:function end(){this.lineStream.push('\n');}}]);return Parser;}(_stream2['default']);exports['default']=Parser;},{"./line-stream":34,"./parse-stream":35,"./stream":37}],37:[function(require,module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
572var Stream=function(){function Stream(){_classCallCheck(this,Stream);this.listeners={};}
573_createClass(Stream,[{key:'on',value:function on(type,listener){if(!this.listeners[type]){this.listeners[type]=[];}
574this.listeners[type].push(listener);}},{key:'off',value:function off(type,listener){if(!this.listeners[type]){return false;}
575var index=this.listeners[type].indexOf(listener);this.listeners[type].splice(index,1);return index>-1;}},{key:'trigger',value:function trigger(type){var callbacks=this.listeners[type];var i=void 0;var length=void 0;var args=void 0;if(!callbacks){return;}
576if(arguments.length===2){length=callbacks.length;for(i=0;i<length;++i){callbacks[i].call(this,arguments[1]);}}else{args=Array.prototype.slice.call(arguments,1);length=callbacks.length;for(i=0;i<length;++i){callbacks[i].apply(this,args);}}}},{key:'dispose',value:function dispose(){this.listeners={};}},{key:'pipe',value:function pipe(destination){this.on('data',function(data){destination.push(data);});}}]);return Stream;}();exports['default']=Stream;},{}],38:[function(require,module,exports){'use strict';var Stream=require('../utils/stream.js');var AacStream;AacStream=function(){var
577everything=new Uint8Array(),timeStamp=0;AacStream.prototype.init.call(this);this.setTimestamp=function(timestamp){timeStamp=timestamp;};this.parseId3TagSize=function(header,byteIndex){var
578returnSize=(header[byteIndex+6]<<21)|(header[byteIndex+7]<<14)|(header[byteIndex+8]<<7)|(header[byteIndex+9]),flags=header[byteIndex+5],footerPresent=(flags&16)>>4;if(footerPresent){return returnSize+20;}
579return returnSize+10;};this.parseAdtsSize=function(header,byteIndex){var
580lowThree=(header[byteIndex+5]&0xE0)>>5,middle=header[byteIndex+4]<<3,highTwo=header[byteIndex+3]&0x3<<11;return(highTwo|middle)|lowThree;};this.push=function(bytes){var
581frameSize=0,byteIndex=0,bytesLeft,chunk,packet,tempLength;if(everything.length){tempLength=everything.length;everything=new Uint8Array(bytes.byteLength+tempLength);everything.set(everything.subarray(0,tempLength));everything.set(bytes,tempLength);}else{everything=bytes;}
582while(everything.length-byteIndex>=3){if((everything[byteIndex]==='I'.charCodeAt(0))&&(everything[byteIndex+1]==='D'.charCodeAt(0))&&(everything[byteIndex+2]==='3'.charCodeAt(0))){if(everything.length-byteIndex<10){break;}
583frameSize=this.parseId3TagSize(everything,byteIndex);if(frameSize>everything.length){break;}
584chunk={type:'timed-metadata',data:everything.subarray(byteIndex,byteIndex+frameSize)};this.trigger('data',chunk);byteIndex+=frameSize;continue;}else if((everything[byteIndex]&0xff===0xff)&&((everything[byteIndex+1]&0xf0)===0xf0)){if(everything.length-byteIndex<7){break;}
585frameSize=this.parseAdtsSize(everything,byteIndex);if(frameSize>everything.length){break;}
586packet={type:'audio',data:everything.subarray(byteIndex,byteIndex+frameSize),pts:timeStamp,dts:timeStamp};this.trigger('data',packet);byteIndex+=frameSize;continue;}
587byteIndex++;}
588bytesLeft=everything.length-byteIndex;if(bytesLeft>0){everything=everything.subarray(byteIndex);}else{everything=new Uint8Array();}};};AacStream.prototype=new Stream();module.exports=AacStream;},{"../utils/stream.js":62}],39:[function(require,module,exports){'use strict';var ADTS_SAMPLING_FREQUENCIES=[96000,88200,64000,48000,44100,32000,24000,22050,16000,12000,11025,8000,7350];var parseSyncSafeInteger=function(data){return(data[0]<<21)|(data[1]<<14)|(data[2]<<7)|(data[3]);};var percentEncode=function(bytes,start,end){var i,result='';for(i=start;i<end;i++){result+='%'+('00'+bytes[i].toString(16)).slice(-2);}
589return result;};var parseIso88591=function(bytes,start,end){return unescape(percentEncode(bytes,start,end));};var parseId3TagSize=function(header,byteIndex){var
590returnSize=(header[byteIndex+6]<<21)|(header[byteIndex+7]<<14)|(header[byteIndex+8]<<7)|(header[byteIndex+9]),flags=header[byteIndex+5],footerPresent=(flags&16)>>4;if(footerPresent){return returnSize+20;}
591return returnSize+10;};var parseAdtsSize=function(header,byteIndex){var
592lowThree=(header[byteIndex+5]&0xE0)>>5,middle=header[byteIndex+4]<<3,highTwo=header[byteIndex+3]&0x3<<11;return(highTwo|middle)|lowThree;};var parseType=function(header,byteIndex){if((header[byteIndex]==='I'.charCodeAt(0))&&(header[byteIndex+1]==='D'.charCodeAt(0))&&(header[byteIndex+2]==='3'.charCodeAt(0))){return'timed-metadata';}else if((header[byteIndex]&0xff===0xff)&&((header[byteIndex+1]&0xf0)===0xf0)){return'audio';}
593return null;};var parseSampleRate=function(packet){var i=0;while(i+5<packet.length){if(packet[i]!==0xFF||(packet[i+1]&0xF6)!==0xF0){i++;continue;}
594return ADTS_SAMPLING_FREQUENCIES[(packet[i+2]&0x3c)>>>2];}
595return null;};var parseAacTimestamp=function(packet){var frameStart,frameSize,frame,frameHeader;frameStart=10;if(packet[5]&0x40){frameStart+=4;frameStart+=parseSyncSafeInteger(packet.subarray(10,14));}
596do{frameSize=parseSyncSafeInteger(packet.subarray(frameStart+4,frameStart+8));if(frameSize<1){return null;}
597frameHeader=String.fromCharCode(packet[frameStart],packet[frameStart+1],packet[frameStart+2],packet[frameStart+3]);if(frameHeader==='PRIV'){frame=packet.subarray(frameStart+10,frameStart+frameSize+10);for(var i=0;i<frame.byteLength;i++){if(frame[i]===0){var owner=parseIso88591(frame,0,i);if(owner==='com.apple.streaming.transportStreamTimestamp'){var d=frame.subarray(i+1);var size=((d[3]&0x01)<<30)|(d[4]<<22)|(d[5]<<14)|(d[6]<<6)|(d[7]>>>2);size*=4;size+=d[7]&0x03;return size;}
598break;}}}
599frameStart+=10;frameStart+=frameSize;}while(frameStart<packet.byteLength);return null;};module.exports={parseId3TagSize:parseId3TagSize,parseAdtsSize:parseAdtsSize,parseType:parseType,parseSampleRate:parseSampleRate,parseAacTimestamp:parseAacTimestamp};},{}],40:[function(require,module,exports){'use strict';var Stream=require('../utils/stream.js');var AdtsStream;var
600ADTS_SAMPLING_FREQUENCIES=[96000,88200,64000,48000,44100,32000,24000,22050,16000,12000,11025,8000,7350];AdtsStream=function(){var buffer;AdtsStream.prototype.init.call(this);this.push=function(packet){var
601i=0,frameNum=0,frameLength,protectionSkipBytes,frameEnd,oldBuffer,sampleCount,adtsFrameDuration;if(packet.type!=='audio'){return;}
602if(buffer){oldBuffer=buffer;buffer=new Uint8Array(oldBuffer.byteLength+packet.data.byteLength);buffer.set(oldBuffer);buffer.set(packet.data,oldBuffer.byteLength);}else{buffer=packet.data;}
603while(i+5<buffer.length){if(buffer[i]!==0xFF||(buffer[i+1]&0xF6)!==0xF0){i++;continue;}
604protectionSkipBytes=(~buffer[i+1]&0x01)*2;frameLength=((buffer[i+3]&0x03)<<11)|(buffer[i+4]<<3)|((buffer[i+5]&0xe0)>>5);sampleCount=((buffer[i+6]&0x03)+1)*1024;adtsFrameDuration=(sampleCount*90000)/ADTS_SAMPLING_FREQUENCIES[(buffer[i+2]&0x3c)>>>2];frameEnd=i+frameLength;if(buffer.byteLength<frameEnd){return;}
605this.trigger('data',{pts:packet.pts+(frameNum*adtsFrameDuration),dts:packet.dts+(frameNum*adtsFrameDuration),sampleCount:sampleCount,audioobjecttype:((buffer[i+2]>>>6)&0x03)+1,channelcount:((buffer[i+2]&1)<<2)|((buffer[i+3]&0xc0)>>>6),samplerate:ADTS_SAMPLING_FREQUENCIES[(buffer[i+2]&0x3c)>>>2],samplingfrequencyindex:(buffer[i+2]&0x3c)>>>2,samplesize:16,data:buffer.subarray(i+7+protectionSkipBytes,frameEnd)});if(buffer.byteLength===frameEnd){buffer=undefined;return;}
606frameNum++;buffer=buffer.subarray(frameEnd);}};this.flush=function(){this.trigger('done');};};AdtsStream.prototype=new Stream();module.exports=AdtsStream;},{"../utils/stream.js":62}],41:[function(require,module,exports){'use strict';var Stream=require('../utils/stream.js');var ExpGolomb=require('../utils/exp-golomb.js');var H264Stream,NalByteStream;var PROFILES_WITH_OPTIONAL_SPS_DATA;NalByteStream=function(){var
607syncPoint=0,i,buffer;NalByteStream.prototype.init.call(this);this.push=function(data){var swapBuffer;if(!buffer){buffer=data.data;}else{swapBuffer=new Uint8Array(buffer.byteLength+data.data.byteLength);swapBuffer.set(buffer);swapBuffer.set(data.data,buffer.byteLength);buffer=swapBuffer;}
608for(;syncPoint<buffer.byteLength-3;syncPoint++){if(buffer[syncPoint+2]===1){i=syncPoint+5;break;}}
609while(i<buffer.byteLength){switch(buffer[i]){case 0:if(buffer[i-1]!==0){i+=2;break;}else if(buffer[i-2]!==0){i++;break;}
610if(syncPoint+3!==i-2){this.trigger('data',buffer.subarray(syncPoint+3,i-2));}
611do{i++;}while(buffer[i]!==1&&i<buffer.length);syncPoint=i-2;i+=3;break;case 1:if(buffer[i-1]!==0||buffer[i-2]!==0){i+=3;break;}
612this.trigger('data',buffer.subarray(syncPoint+3,i-2));syncPoint=i-2;i+=3;break;default:i+=3;break;}}
613buffer=buffer.subarray(syncPoint);i-=syncPoint;syncPoint=0;};this.flush=function(){if(buffer&&buffer.byteLength>3){this.trigger('data',buffer.subarray(syncPoint+3));}
614buffer=null;syncPoint=0;this.trigger('done');};};NalByteStream.prototype=new Stream();PROFILES_WITH_OPTIONAL_SPS_DATA={100:true,110:true,122:true,244:true,44:true,83:true,86:true,118:true,128:true,138:true,139:true,134:true};H264Stream=function(){var
615nalByteStream=new NalByteStream(),self,trackId,currentPts,currentDts,discardEmulationPreventionBytes,readSequenceParameterSet,skipScalingList;H264Stream.prototype.init.call(this);self=this;this.push=function(packet){if(packet.type!=='video'){return;}
616trackId=packet.trackId;currentPts=packet.pts;currentDts=packet.dts;nalByteStream.push(packet);};nalByteStream.on('data',function(data){var
617event={trackId:trackId,pts:currentPts,dts:currentDts,data:data};switch(data[0]&0x1f){case 0x05:event.nalUnitType='slice_layer_without_partitioning_rbsp_idr';break;case 0x06:event.nalUnitType='sei_rbsp';event.escapedRBSP=discardEmulationPreventionBytes(data.subarray(1));break;case 0x07:event.nalUnitType='seq_parameter_set_rbsp';event.escapedRBSP=discardEmulationPreventionBytes(data.subarray(1));event.config=readSequenceParameterSet(event.escapedRBSP);break;case 0x08:event.nalUnitType='pic_parameter_set_rbsp';break;case 0x09:event.nalUnitType='access_unit_delimiter_rbsp';break;default:break;}
618self.trigger('data',event);});nalByteStream.on('done',function(){self.trigger('done');});this.flush=function(){nalByteStream.flush();};skipScalingList=function(count,expGolombDecoder){var
619lastScale=8,nextScale=8,j,deltaScale;for(j=0;j<count;j++){if(nextScale!==0){deltaScale=expGolombDecoder.readExpGolomb();nextScale=(lastScale+deltaScale+256)%256;}
620lastScale=(nextScale===0)?lastScale:nextScale;}};discardEmulationPreventionBytes=function(data){var
621length=data.byteLength,emulationPreventionBytesPositions=[],i=1,newLength,newData;while(i<length-2){if(data[i]===0&&data[i+1]===0&&data[i+2]===0x03){emulationPreventionBytesPositions.push(i+2);i+=2;}else{i++;}}
622if(emulationPreventionBytesPositions.length===0){return data;}
623newLength=length-emulationPreventionBytesPositions.length;newData=new Uint8Array(newLength);var sourceIndex=0;for(i=0;i<newLength;sourceIndex++,i++){if(sourceIndex===emulationPreventionBytesPositions[0]){sourceIndex++;emulationPreventionBytesPositions.shift();}
624newData[i]=data[sourceIndex];}
625return newData;};readSequenceParameterSet=function(data){var
626frameCropLeftOffset=0,frameCropRightOffset=0,frameCropTopOffset=0,frameCropBottomOffset=0,sarScale=1,expGolombDecoder,profileIdc,levelIdc,profileCompatibility,chromaFormatIdc,picOrderCntType,numRefFramesInPicOrderCntCycle,picWidthInMbsMinus1,picHeightInMapUnitsMinus1,frameMbsOnlyFlag,scalingListCount,sarRatio,aspectRatioIdc,i;expGolombDecoder=new ExpGolomb(data);profileIdc=expGolombDecoder.readUnsignedByte();profileCompatibility=expGolombDecoder.readUnsignedByte();levelIdc=expGolombDecoder.readUnsignedByte();expGolombDecoder.skipUnsignedExpGolomb();if(PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]){chromaFormatIdc=expGolombDecoder.readUnsignedExpGolomb();if(chromaFormatIdc===3){expGolombDecoder.skipBits(1);}
627expGolombDecoder.skipUnsignedExpGolomb();expGolombDecoder.skipUnsignedExpGolomb();expGolombDecoder.skipBits(1);if(expGolombDecoder.readBoolean()){scalingListCount=(chromaFormatIdc!==3)?8:12;for(i=0;i<scalingListCount;i++){if(expGolombDecoder.readBoolean()){if(i<6){skipScalingList(16,expGolombDecoder);}else{skipScalingList(64,expGolombDecoder);}}}}}
628expGolombDecoder.skipUnsignedExpGolomb();picOrderCntType=expGolombDecoder.readUnsignedExpGolomb();if(picOrderCntType===0){expGolombDecoder.readUnsignedExpGolomb();}else if(picOrderCntType===1){expGolombDecoder.skipBits(1);expGolombDecoder.skipExpGolomb();expGolombDecoder.skipExpGolomb();numRefFramesInPicOrderCntCycle=expGolombDecoder.readUnsignedExpGolomb();for(i=0;i<numRefFramesInPicOrderCntCycle;i++){expGolombDecoder.skipExpGolomb();}}
629expGolombDecoder.skipUnsignedExpGolomb();expGolombDecoder.skipBits(1);picWidthInMbsMinus1=expGolombDecoder.readUnsignedExpGolomb();picHeightInMapUnitsMinus1=expGolombDecoder.readUnsignedExpGolomb();frameMbsOnlyFlag=expGolombDecoder.readBits(1);if(frameMbsOnlyFlag===0){expGolombDecoder.skipBits(1);}
630expGolombDecoder.skipBits(1);if(expGolombDecoder.readBoolean()){frameCropLeftOffset=expGolombDecoder.readUnsignedExpGolomb();frameCropRightOffset=expGolombDecoder.readUnsignedExpGolomb();frameCropTopOffset=expGolombDecoder.readUnsignedExpGolomb();frameCropBottomOffset=expGolombDecoder.readUnsignedExpGolomb();}
631if(expGolombDecoder.readBoolean()){if(expGolombDecoder.readBoolean()){aspectRatioIdc=expGolombDecoder.readUnsignedByte();switch(aspectRatioIdc){case 1:sarRatio=[1,1];break;case 2:sarRatio=[12,11];break;case 3:sarRatio=[10,11];break;case 4:sarRatio=[16,11];break;case 5:sarRatio=[40,33];break;case 6:sarRatio=[24,11];break;case 7:sarRatio=[20,11];break;case 8:sarRatio=[32,11];break;case 9:sarRatio=[80,33];break;case 10:sarRatio=[18,11];break;case 11:sarRatio=[15,11];break;case 12:sarRatio=[64,33];break;case 13:sarRatio=[160,99];break;case 14:sarRatio=[4,3];break;case 15:sarRatio=[3,2];break;case 16:sarRatio=[2,1];break;case 255:{sarRatio=[expGolombDecoder.readUnsignedByte()<<8|expGolombDecoder.readUnsignedByte(),expGolombDecoder.readUnsignedByte()<<8|expGolombDecoder.readUnsignedByte()];break;}}
632if(sarRatio){sarScale=sarRatio[0]/sarRatio[1];}}}
633return{profileIdc:profileIdc,levelIdc:levelIdc,profileCompatibility:profileCompatibility,width:Math.ceil((((picWidthInMbsMinus1+1)*16)-frameCropLeftOffset*2-frameCropRightOffset*2)*sarScale),height:((2-frameMbsOnlyFlag)*(picHeightInMapUnitsMinus1+1)*16)-(frameCropTopOffset*2)-(frameCropBottomOffset*2)};};};H264Stream.prototype=new Stream();module.exports={H264Stream:H264Stream,NalByteStream:NalByteStream};},{"../utils/exp-golomb.js":61,"../utils/stream.js":62}],42:[function(require,module,exports){var highPrefix=[33,16,5,32,164,27];var lowPrefix=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252];var zeroFill=function(count){var a=[];while(count--){a.push(0);}
634return a;};var makeTable=function(metaTable){return Object.keys(metaTable).reduce(function(obj,key){obj[key]=new Uint8Array(metaTable[key].reduce(function(arr,part){return arr.concat(part);},[]));return obj;},{});};var coneOfSilence={96000:[highPrefix,[227,64],zeroFill(154),[56]],88200:[highPrefix,[231],zeroFill(170),[56]],64000:[highPrefix,[248,192],zeroFill(240),[56]],48000:[highPrefix,[255,192],zeroFill(268),[55,148,128],zeroFill(54),[112]],44100:[highPrefix,[255,192],zeroFill(268),[55,163,128],zeroFill(84),[112]],32000:[highPrefix,[255,192],zeroFill(268),[55,234],zeroFill(226),[112]],24000:[highPrefix,[255,192],zeroFill(268),[55,255,128],zeroFill(268),[111,112],zeroFill(126),[224]],16000:[highPrefix,[255,192],zeroFill(268),[55,255,128],zeroFill(268),[111,255],zeroFill(269),[223,108],zeroFill(195),[1,192]],12000:[lowPrefix,zeroFill(268),[3,127,248],zeroFill(268),[6,255,240],zeroFill(268),[13,255,224],zeroFill(268),[27,253,128],zeroFill(259),[56]],11025:[lowPrefix,zeroFill(268),[3,127,248],zeroFill(268),[6,255,240],zeroFill(268),[13,255,224],zeroFill(268),[27,255,192],zeroFill(268),[55,175,128],zeroFill(108),[112]],8000:[lowPrefix,zeroFill(268),[3,121,16],zeroFill(47),[7]]};module.exports=makeTable(coneOfSilence);},{}],43:[function(require,module,exports){'use strict';var Stream=require('../utils/stream.js');var CoalesceStream=function(options){this.numberOfTracks=0;this.metadataStream=options.metadataStream;this.videoTags=[];this.audioTags=[];this.videoTrack=null;this.audioTrack=null;this.pendingCaptions=[];this.pendingMetadata=[];this.pendingTracks=0;this.processedTracks=0;CoalesceStream.prototype.init.call(this);this.push=function(output){if(output.text){return this.pendingCaptions.push(output);}
635if(output.frames){return this.pendingMetadata.push(output);}
636if(output.track.type==='video'){this.videoTrack=output.track;this.videoTags=output.tags;this.pendingTracks++;}
637if(output.track.type==='audio'){this.audioTrack=output.track;this.audioTags=output.tags;this.pendingTracks++;}};};CoalesceStream.prototype=new Stream();CoalesceStream.prototype.flush=function(flushSource){var
638id3,caption,i,timelineStartPts,event={tags:{},captions:[],captionStreams:{},metadata:[]};if(this.pendingTracks<this.numberOfTracks){if(flushSource!=='VideoSegmentStream'&&flushSource!=='AudioSegmentStream'){return;}else if(this.pendingTracks===0){this.processedTracks++;if(this.processedTracks<this.numberOfTracks){return;}}}
639this.processedTracks+=this.pendingTracks;this.pendingTracks=0;if(this.processedTracks<this.numberOfTracks){return;}
640if(this.videoTrack){timelineStartPts=this.videoTrack.timelineStartInfo.pts;}else if(this.audioTrack){timelineStartPts=this.audioTrack.timelineStartInfo.pts;}
641event.tags.videoTags=this.videoTags;event.tags.audioTags=this.audioTags;for(i=0;i<this.pendingCaptions.length;i++){caption=this.pendingCaptions[i];caption.startTime=caption.startPts-timelineStartPts;caption.startTime/=90e3;caption.endTime=caption.endPts-timelineStartPts;caption.endTime/=90e3;event.captionStreams[caption.stream]=true;event.captions.push(caption);}
642for(i=0;i<this.pendingMetadata.length;i++){id3=this.pendingMetadata[i];id3.cueTime=id3.pts-timelineStartPts;id3.cueTime/=90e3;event.metadata.push(id3);}
643event.metadata.dispatchType=this.metadataStream.dispatchType;this.videoTrack=null;this.audioTrack=null;this.videoTags=[];this.audioTags=[];this.pendingCaptions.length=0;this.pendingMetadata.length=0;this.pendingTracks=0;this.processedTracks=0;this.trigger('data',event);this.trigger('done');};module.exports=CoalesceStream;},{"../utils/stream.js":62}],44:[function(require,module,exports){'use strict';var FlvTag=require('./flv-tag.js');var getFlvHeader=function(duration,audio,video){var
644headBytes=new Uint8Array(3+1+1+4),head=new DataView(headBytes.buffer),metadata,result,metadataLength;duration=duration||0;audio=audio===undefined?true:audio;video=video===undefined?true:video;head.setUint8(0,0x46);head.setUint8(1,0x4c);head.setUint8(2,0x56);head.setUint8(3,0x01);head.setUint8(4,(audio?0x04:0x00)|(video?0x01:0x00));head.setUint32(5,headBytes.byteLength);if(duration<=0){result=new Uint8Array(headBytes.byteLength+4);result.set(headBytes);result.set([0,0,0,0],headBytes.byteLength);return result;}
645metadata=new FlvTag(FlvTag.METADATA_TAG);metadata.pts=metadata.dts=0;metadata.writeMetaDataDouble('duration',duration);metadataLength=metadata.finalize().length;result=new Uint8Array(headBytes.byteLength+metadataLength);result.set(headBytes);result.set(head.byteLength,metadataLength);return result;};module.exports=getFlvHeader;},{"./flv-tag.js":45}],45:[function(require,module,exports){'use strict';var FlvTag;FlvTag=function(type,extraData){var
646adHoc=0,bufferStartSize=16384,prepareWrite=function(flv,count){var
647bytes,minLength=flv.position+count;if(minLength<flv.bytes.byteLength){return;}
648bytes=new Uint8Array(minLength*2);bytes.set(flv.bytes.subarray(0,flv.position),0);flv.bytes=bytes;flv.view=new DataView(flv.bytes.buffer);},widthBytes=FlvTag.widthBytes||new Uint8Array('width'.length),heightBytes=FlvTag.heightBytes||new Uint8Array('height'.length),videocodecidBytes=FlvTag.videocodecidBytes||new Uint8Array('videocodecid'.length),i;if(!FlvTag.widthBytes){for(i=0;i<'width'.length;i++){widthBytes[i]='width'.charCodeAt(i);}
649for(i=0;i<'height'.length;i++){heightBytes[i]='height'.charCodeAt(i);}
650for(i=0;i<'videocodecid'.length;i++){videocodecidBytes[i]='videocodecid'.charCodeAt(i);}
651FlvTag.widthBytes=widthBytes;FlvTag.heightBytes=heightBytes;FlvTag.videocodecidBytes=videocodecidBytes;}
652this.keyFrame=false;switch(type){case FlvTag.VIDEO_TAG:this.length=16;bufferStartSize*=6;break;case FlvTag.AUDIO_TAG:this.length=13;this.keyFrame=true;break;case FlvTag.METADATA_TAG:this.length=29;this.keyFrame=true;break;default:throw new Error('Unknown FLV tag type');}
653this.bytes=new Uint8Array(bufferStartSize);this.view=new DataView(this.bytes.buffer);this.bytes[0]=type;this.position=this.length;this.keyFrame=extraData;this.pts=0;this.dts=0;this.writeBytes=function(bytes,offset,length){var
654start=offset||0,end;length=length||bytes.byteLength;end=start+length;prepareWrite(this,length);this.bytes.set(bytes.subarray(start,end),this.position);this.position+=length;this.length=Math.max(this.length,this.position);};this.writeByte=function(byte){prepareWrite(this,1);this.bytes[this.position]=byte;this.position++;this.length=Math.max(this.length,this.position);};this.writeShort=function(short){prepareWrite(this,2);this.view.setUint16(this.position,short);this.position+=2;this.length=Math.max(this.length,this.position);};this.negIndex=function(pos){return this.bytes[this.length-pos];};this.nalUnitSize=function(){if(adHoc===0){return 0;}
655return this.length-(adHoc+4);};this.startNalUnit=function(){if(adHoc>0){throw new Error('Attempted to create new NAL wihout closing the old one');}
656adHoc=this.length;this.length+=4;this.position=this.length;};this.endNalUnit=function(nalContainer){var
657nalStart,nalLength;if(this.length===adHoc+4){this.length-=4;}else if(adHoc>0){nalStart=adHoc+4;nalLength=this.length-nalStart;this.position=adHoc;this.view.setUint32(this.position,nalLength);this.position=this.length;if(nalContainer){nalContainer.push(this.bytes.subarray(nalStart,nalStart+nalLength));}}
658adHoc=0;};this.writeMetaDataDouble=function(key,val){var i;prepareWrite(this,2+key.length+9);this.view.setUint16(this.position,key.length);this.position+=2;if(key==='width'){this.bytes.set(widthBytes,this.position);this.position+=5;}else if(key==='height'){this.bytes.set(heightBytes,this.position);this.position+=6;}else if(key==='videocodecid'){this.bytes.set(videocodecidBytes,this.position);this.position+=12;}else{for(i=0;i<key.length;i++){this.bytes[this.position]=key.charCodeAt(i);this.position++;}}
659this.position++;this.view.setFloat64(this.position,val);this.position+=8;this.length=Math.max(this.length,this.position);++adHoc;};this.writeMetaDataBoolean=function(key,val){var i;prepareWrite(this,2);this.view.setUint16(this.position,key.length);this.position+=2;for(i=0;i<key.length;i++){prepareWrite(this,1);this.bytes[this.position]=key.charCodeAt(i);this.position++;}
660prepareWrite(this,2);this.view.setUint8(this.position,0x01);this.position++;this.view.setUint8(this.position,val?0x01:0x00);this.position++;this.length=Math.max(this.length,this.position);++adHoc;};this.finalize=function(){var
661dtsDelta,len;switch(this.bytes[0]){case FlvTag.VIDEO_TAG:this.bytes[11]=((this.keyFrame||extraData)?0x10:0x20)|0x07;this.bytes[12]=extraData?0x00:0x01;dtsDelta=this.pts-this.dts;this.bytes[13]=(dtsDelta&0x00FF0000)>>>16;this.bytes[14]=(dtsDelta&0x0000FF00)>>>8;this.bytes[15]=(dtsDelta&0x000000FF)>>>0;break;case FlvTag.AUDIO_TAG:this.bytes[11]=0xAF;this.bytes[12]=extraData?0x00:0x01;break;case FlvTag.METADATA_TAG:this.position=11;this.view.setUint8(this.position,0x02);this.position++;this.view.setUint16(this.position,0x0A);this.position+=2;this.bytes.set([0x6f,0x6e,0x4d,0x65,0x74,0x61,0x44,0x61,0x74,0x61],this.position);this.position+=10;this.bytes[this.position]=0x08;this.position++;this.view.setUint32(this.position,adHoc);this.position=this.length;this.bytes.set([0,0,9],this.position);this.position+=3;this.length=this.position;break;}
662len=this.length-11;this.bytes[1]=(len&0x00FF0000)>>>16;this.bytes[2]=(len&0x0000FF00)>>>8;this.bytes[3]=(len&0x000000FF)>>>0;this.bytes[4]=(this.dts&0x00FF0000)>>>16;this.bytes[5]=(this.dts&0x0000FF00)>>>8;this.bytes[6]=(this.dts&0x000000FF)>>>0;this.bytes[7]=(this.dts&0xFF000000)>>>24;this.bytes[8]=0;this.bytes[9]=0;this.bytes[10]=0;prepareWrite(this,4);this.view.setUint32(this.length,this.length);this.length+=4;this.position+=4;this.bytes=this.bytes.subarray(0,this.length);this.frameTime=FlvTag.frameTime(this.bytes);return this;};};FlvTag.AUDIO_TAG=0x08;FlvTag.VIDEO_TAG=0x09;FlvTag.METADATA_TAG=0x12;FlvTag.isAudioFrame=function(tag){return FlvTag.AUDIO_TAG===tag[0];};FlvTag.isVideoFrame=function(tag){return FlvTag.VIDEO_TAG===tag[0];};FlvTag.isMetaData=function(tag){return FlvTag.METADATA_TAG===tag[0];};FlvTag.isKeyFrame=function(tag){if(FlvTag.isVideoFrame(tag)){return tag[11]===0x17;}
663if(FlvTag.isAudioFrame(tag)){return true;}
664if(FlvTag.isMetaData(tag)){return true;}
665return false;};FlvTag.frameTime=function(tag){var pts=tag[4]<<16;pts|=tag[5]<<8;pts|=tag[6]<<0;pts|=tag[7]<<24;return pts;};module.exports=FlvTag;},{}],46:[function(require,module,exports){module.exports={tag:require('./flv-tag'),Transmuxer:require('./transmuxer'),getFlvHeader:require('./flv-header')};},{"./flv-header":44,"./flv-tag":45,"./transmuxer":48}],47:[function(require,module,exports){'use strict';var TagList=function(){var self=this;this.list=[];this.push=function(tag){this.list.push({bytes:tag.bytes,dts:tag.dts,pts:tag.pts,keyFrame:tag.keyFrame,metaDataTag:tag.metaDataTag});};Object.defineProperty(this,'length',{get:function(){return self.list.length;}});};module.exports=TagList;},{}],48:[function(require,module,exports){'use strict';var Stream=require('../utils/stream.js');var FlvTag=require('./flv-tag.js');var m2ts=require('../m2ts/m2ts.js');var AdtsStream=require('../codecs/adts.js');var H264Stream=require('../codecs/h264').H264Stream;var CoalesceStream=require('./coalesce-stream.js');var TagList=require('./tag-list.js');var
666Transmuxer,VideoSegmentStream,AudioSegmentStream,collectTimelineInfo,metaDataTag,extraDataTag;collectTimelineInfo=function(track,data){if(typeof data.pts==='number'){if(track.timelineStartInfo.pts===undefined){track.timelineStartInfo.pts=data.pts;}else{track.timelineStartInfo.pts=Math.min(track.timelineStartInfo.pts,data.pts);}}
667if(typeof data.dts==='number'){if(track.timelineStartInfo.dts===undefined){track.timelineStartInfo.dts=data.dts;}else{track.timelineStartInfo.dts=Math.min(track.timelineStartInfo.dts,data.dts);}}};metaDataTag=function(track,pts){var
668tag=new FlvTag(FlvTag.METADATA_TAG);tag.dts=pts;tag.pts=pts;tag.writeMetaDataDouble('videocodecid',7);tag.writeMetaDataDouble('width',track.width);tag.writeMetaDataDouble('height',track.height);return tag;};extraDataTag=function(track,pts){var
669i,tag=new FlvTag(FlvTag.VIDEO_TAG,true);tag.dts=pts;tag.pts=pts;tag.writeByte(0x01);tag.writeByte(track.profileIdc);tag.writeByte(track.profileCompatibility);tag.writeByte(track.levelIdc);tag.writeByte(0xFC|0x03);tag.writeByte(0xE0|0x01);tag.writeShort(track.sps[0].length);tag.writeBytes(track.sps[0]);tag.writeByte(track.pps.length);for(i=0;i<track.pps.length;++i){tag.writeShort(track.pps[i].length);tag.writeBytes(track.pps[i]);}
670return tag;};AudioSegmentStream=function(track){var
671adtsFrames=[],videoKeyFrames=[],oldExtraData;AudioSegmentStream.prototype.init.call(this);this.push=function(data){collectTimelineInfo(track,data);if(track){track.audioobjecttype=data.audioobjecttype;track.channelcount=data.channelcount;track.samplerate=data.samplerate;track.samplingfrequencyindex=data.samplingfrequencyindex;track.samplesize=data.samplesize;track.extraData=(track.audioobjecttype<<11)|(track.samplingfrequencyindex<<7)|(track.channelcount<<3);}
672data.pts=Math.round(data.pts/90);data.dts=Math.round(data.dts/90);adtsFrames.push(data);};this.flush=function(){var currentFrame,adtsFrame,lastMetaPts,tags=new TagList();if(adtsFrames.length===0){this.trigger('done','AudioSegmentStream');return;}
673lastMetaPts=-Infinity;while(adtsFrames.length){currentFrame=adtsFrames.shift();if(videoKeyFrames.length&&currentFrame.pts>=videoKeyFrames[0]){lastMetaPts=videoKeyFrames.shift();this.writeMetaDataTags(tags,lastMetaPts);}
674if(track.extraData!==oldExtraData||currentFrame.pts-lastMetaPts>=1000){this.writeMetaDataTags(tags,currentFrame.pts);oldExtraData=track.extraData;lastMetaPts=currentFrame.pts;}
675adtsFrame=new FlvTag(FlvTag.AUDIO_TAG);adtsFrame.pts=currentFrame.pts;adtsFrame.dts=currentFrame.dts;adtsFrame.writeBytes(currentFrame.data);tags.push(adtsFrame.finalize());}
676videoKeyFrames.length=0;oldExtraData=null;this.trigger('data',{track:track,tags:tags.list});this.trigger('done','AudioSegmentStream');};this.writeMetaDataTags=function(tags,pts){var adtsFrame;adtsFrame=new FlvTag(FlvTag.METADATA_TAG);adtsFrame.pts=pts;adtsFrame.dts=pts;adtsFrame.writeMetaDataDouble('audiocodecid',10);adtsFrame.writeMetaDataBoolean('stereo',track.channelcount===2);adtsFrame.writeMetaDataDouble('audiosamplerate',track.samplerate);adtsFrame.writeMetaDataDouble('audiosamplesize',16);tags.push(adtsFrame.finalize());adtsFrame=new FlvTag(FlvTag.AUDIO_TAG,true);adtsFrame.pts=pts;adtsFrame.dts=pts;adtsFrame.view.setUint16(adtsFrame.position,track.extraData);adtsFrame.position+=2;adtsFrame.length=Math.max(adtsFrame.length,adtsFrame.position);tags.push(adtsFrame.finalize());};this.onVideoKeyFrame=function(pts){videoKeyFrames.push(pts);};};AudioSegmentStream.prototype=new Stream();VideoSegmentStream=function(track){var
677nalUnits=[],config,h264Frame;VideoSegmentStream.prototype.init.call(this);this.finishFrame=function(tags,frame){if(!frame){return;}
678if(config&&track&&track.newMetadata&&(frame.keyFrame||tags.length===0)){var metaTag=metaDataTag(config,frame.dts).finalize();var extraTag=extraDataTag(track,frame.dts).finalize();metaTag.metaDataTag=extraTag.metaDataTag=true;tags.push(metaTag);tags.push(extraTag);track.newMetadata=false;this.trigger('keyframe',frame.dts);}
679frame.endNalUnit();tags.push(frame.finalize());h264Frame=null;};this.push=function(data){collectTimelineInfo(track,data);data.pts=Math.round(data.pts/90);data.dts=Math.round(data.dts/90);nalUnits.push(data);};this.flush=function(){var
680currentNal,tags=new TagList();while(nalUnits.length){if(nalUnits[0].nalUnitType==='access_unit_delimiter_rbsp'){break;}
681nalUnits.shift();}
682if(nalUnits.length===0){this.trigger('done','VideoSegmentStream');return;}
683while(nalUnits.length){currentNal=nalUnits.shift();if(currentNal.nalUnitType==='seq_parameter_set_rbsp'){track.newMetadata=true;config=currentNal.config;track.width=config.width;track.height=config.height;track.sps=[currentNal.data];track.profileIdc=config.profileIdc;track.levelIdc=config.levelIdc;track.profileCompatibility=config.profileCompatibility;h264Frame.endNalUnit();}else if(currentNal.nalUnitType==='pic_parameter_set_rbsp'){track.newMetadata=true;track.pps=[currentNal.data];h264Frame.endNalUnit();}else if(currentNal.nalUnitType==='access_unit_delimiter_rbsp'){if(h264Frame){this.finishFrame(tags,h264Frame);}
684h264Frame=new FlvTag(FlvTag.VIDEO_TAG);h264Frame.pts=currentNal.pts;h264Frame.dts=currentNal.dts;}else{if(currentNal.nalUnitType==='slice_layer_without_partitioning_rbsp_idr'){h264Frame.keyFrame=true;}
685h264Frame.endNalUnit();}
686h264Frame.startNalUnit();h264Frame.writeBytes(currentNal.data);}
687if(h264Frame){this.finishFrame(tags,h264Frame);}
688this.trigger('data',{track:track,tags:tags.list});this.trigger('done','VideoSegmentStream');};};VideoSegmentStream.prototype=new Stream();Transmuxer=function(options){var
689self=this,packetStream,parseStream,elementaryStream,videoTimestampRolloverStream,audioTimestampRolloverStream,timedMetadataTimestampRolloverStream,adtsStream,h264Stream,videoSegmentStream,audioSegmentStream,captionStream,coalesceStream;Transmuxer.prototype.init.call(this);options=options||{};this.metadataStream=new m2ts.MetadataStream();options.metadataStream=this.metadataStream;packetStream=new m2ts.TransportPacketStream();parseStream=new m2ts.TransportParseStream();elementaryStream=new m2ts.ElementaryStream();videoTimestampRolloverStream=new m2ts.TimestampRolloverStream('video');audioTimestampRolloverStream=new m2ts.TimestampRolloverStream('audio');timedMetadataTimestampRolloverStream=new m2ts.TimestampRolloverStream('timed-metadata');adtsStream=new AdtsStream();h264Stream=new H264Stream();coalesceStream=new CoalesceStream(options);packetStream.pipe(parseStream).pipe(elementaryStream);elementaryStream.pipe(videoTimestampRolloverStream).pipe(h264Stream);elementaryStream.pipe(audioTimestampRolloverStream).pipe(adtsStream);elementaryStream.pipe(timedMetadataTimestampRolloverStream).pipe(this.metadataStream).pipe(coalesceStream);captionStream=new m2ts.CaptionStream();h264Stream.pipe(captionStream).pipe(coalesceStream);elementaryStream.on('data',function(data){var i,videoTrack,audioTrack;if(data.type==='metadata'){i=data.tracks.length;while(i--){if(data.tracks[i].type==='video'){videoTrack=data.tracks[i];}else if(data.tracks[i].type==='audio'){audioTrack=data.tracks[i];}}
690if(videoTrack&&!videoSegmentStream){coalesceStream.numberOfTracks++;videoSegmentStream=new VideoSegmentStream(videoTrack);h264Stream.pipe(videoSegmentStream).pipe(coalesceStream);}
691if(audioTrack&&!audioSegmentStream){coalesceStream.numberOfTracks++;audioSegmentStream=new AudioSegmentStream(audioTrack);adtsStream.pipe(audioSegmentStream).pipe(coalesceStream);if(videoSegmentStream){videoSegmentStream.on('keyframe',audioSegmentStream.onVideoKeyFrame);}}}});this.push=function(data){packetStream.push(data);};this.flush=function(){packetStream.flush();};this.resetCaptions=function(){captionStream.reset();};coalesceStream.on('data',function(event){self.trigger('data',event);});coalesceStream.on('done',function(){self.trigger('done');});};Transmuxer.prototype=new Stream();module.exports=Transmuxer;},{"../codecs/adts.js":40,"../codecs/h264":41,"../m2ts/m2ts.js":50,"../utils/stream.js":62,"./coalesce-stream.js":43,"./flv-tag.js":45,"./tag-list.js":47}],49:[function(require,module,exports){'use strict';var USER_DATA_REGISTERED_ITU_T_T35=4,RBSP_TRAILING_BITS=128,Stream=require('../utils/stream');var parseSei=function(bytes){var
692i=0,result={payloadType:-1,payloadSize:0},payloadType=0,payloadSize=0;while(i<bytes.byteLength){if(bytes[i]===RBSP_TRAILING_BITS){break;}
693while(bytes[i]===0xFF){payloadType+=255;i++;}
694payloadType+=bytes[i++];
694while(bytes[i]===0xFF){payloadSize+=255;i++;}
695payloadSize+=bytes[i++];if(!result.payload&&payloadType===USER_DATA_REGISTERED_ITU_T_T35){result.payloadType=payloadType;result.payloadSize=payloadSize;result.payload=bytes.subarray(i,i+payloadSize);break;}
696i+=payloadSize;payloadType=0;payloadSize=0;}
697return result;};var parseUserData=function(sei){if(sei.payload[0]!==181){return null;}
698if(((sei.payload[1]<<8)|sei.payload[2])!==49){return null;}
699if(String.fromCharCode(sei.payload[3],sei.payload[4],sei.payload[5],sei.payload[6])!=='GA94'){return null;}
700if(sei.payload[7]!==0x03){return null;}
701return sei.payload.subarray(8,sei.payload.length-1);};var parseCaptionPackets=function(pts,userData){var results=[],i,count,offset,data;if(!(userData[0]&0x40)){return results;}
702count=userData[0]&0x1f;for(i=0;i<count;i++){offset=i*3;data={type:userData[offset+2]&0x03,pts:pts};if(userData[offset+2]&0x04){data.ccData=(userData[offset+3]<<8)|userData[offset+4];results.push(data);}}
703return results;};var packetDropper={push:function(){}};var CaptionStream=function(){CaptionStream.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new Cea608Stream(0,0),new Cea608Stream(0,1),new Cea608Stream(1,0),new Cea608Stream(1,1)];this.reset();this.ccStreams_.forEach(function(cc){cc.on('data',this.trigger.bind(this,'data'));cc.on('done',this.trigger.bind(this,'done'));},this);};CaptionStream.prototype=new Stream();CaptionStream.prototype.push=function(event){var sei,userData;if(event.nalUnitType!=='sei_rbsp'){return;}
704sei=parseSei(event.escapedRBSP);if(sei.payloadType!==USER_DATA_REGISTERED_ITU_T_T35){return;}
705userData=parseUserData(sei);if(!userData){return;}
706if(event.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return;}else if((event.dts===this.latestDts_)&&(this.ignoreNextEqualDts_)){this.ignoreNextEqualDts_=false;return;}
707this.captionPackets_=this.captionPackets_.concat(parseCaptionPackets(event.pts,userData));this.latestDts_=event.dts;};CaptionStream.prototype.flush=function(){if(!this.captionPackets_.length){this.ccStreams_.forEach(function(cc){cc.flush();},this);return;}
708this.captionPackets_.forEach(function(elem,idx){elem.presortIndex=idx;});this.captionPackets_.sort(function(a,b){if(a.pts===b.pts){return a.presortIndex-b.presortIndex;}
709return a.pts-b.pts;});this.captionPackets_.forEach(function(packet){if(packet.type<2){this.dispatchCea608Packet(packet);}},this);this.captionPackets_.length=0;this.ccStreams_.forEach(function(cc){cc.flush();},this);return;};CaptionStream.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.activeCea608Channel_=null;this.activeCea608Streams_=[packetDropper,packetDropper];this.ccStreams_.forEach(function(ccStream){ccStream.reset();});};CaptionStream.prototype.dispatchCea608Packet=function(packet){if(this.setsChannel1Active(packet)&&this.activeCea608Channel_!==1){this.activeCea608Channel_=1;this.activeCea608Streams_=[this.ccStreams_[0],this.ccStreams_[2]];}else if(this.setsChannel2Active(packet)&&this.activeCea608Channel_!==2){this.activeCea608Channel_=2;this.activeCea608Streams_=[this.ccStreams_[1],this.ccStreams_[3]];}
710this.activeCea608Streams_[packet.type].push(packet);};CaptionStream.prototype.setsChannel1Active=function(packet){return((packet.ccData&0x7800)===0x1000);};CaptionStream.prototype.setsChannel2Active=function(packet){return((packet.ccData&0x7800)===0x1800);};var CHARACTER_TRANSLATION={0x2a:0xe1,0x5c:0xe9,0x5e:0xed,0x5f:0xf3,0x60:0xfa,0x7b:0xe7,0x7c:0xf7,0x7d:0xd1,0x7e:0xf1,0x7f:0x2588,0x0130:0xae,0x0131:0xb0,0x0132:0xbd,0x0133:0xbf,0x0134:0x2122,0x0135:0xa2,0x0136:0xa3,0x0137:0x266a,0x0138:0xe0,0x0139:0xa0,0x013a:0xe8,0x013b:0xe2,0x013c:0xea,0x013d:0xee,0x013e:0xf4,0x013f:0xfb,0x0220:0xc1,0x0221:0xc9,0x0222:0xd3,0x0223:0xda,0x0224:0xdc,0x0225:0xfc,0x0226:0x2018,0x0227:0xa1,0x0228:0x2a,0x0229:0x27,0x022a:0x2014,0x022b:0xa9,0x022c:0x2120,0x022d:0x2022,0x022e:0x201c,0x022f:0x201d,0x0230:0xc0,0x0231:0xc2,0x0232:0xc7,0x0233:0xc8,0x0234:0xca,0x0235:0xcb,0x0236:0xeb,0x0237:0xce,0x0238:0xcf,0x0239:0xef,0x023a:0xd4,0x023b:0xd9,0x023c:0xf9,0x023d:0xdb,0x023e:0xab,0
vendor: 8,261 bytes, lines 710-730
710x023f:0xbb,0x0320:0xc3,0x0321:0xe3,0x0322:0xcd,0x0323:0xcc,0x0324:0xec,0x0325:0xd2,0x0326:0xf2,0x0327:0xd5,0x0328:0xf5,0x0329:0x7b,0x032a:0x7d,0x032b:0x5c,0x032c:0x5e,0x032d:0x5f,0x032e:0x7c,0x032f:0x7e,0x0330:0xc4,0x0331:0xe4,0x0332:0xd6,0x0333:0xf6,0x0334:0xdf,0x0335:0xa5,0x0336:0xa4,0x0337:0x2502,0x0338:0xc5,0x0339:0xe5,0x033a:0xd8,0x033b:0xf8,0x033c:0x250c,0x033d:0x2510,0x033e:0x2514,0x033f:0x2518};var getCharFromCode=function(code){if(code===null){return'';}
711code=CHARACTER_TRANSLATION[code]||code;return String.fromCharCode(code);};var BOTTOM_ROW=14;var ROWS=[0x1100,0x1120,0x1200,0x1220,0x1500,0x1520,0x1600,0x1620,0x1700,0x1720,0x1000,0x1300,0x1320,0x1400,0x1420];var createDisplayBuffer=function(){var result=[],i=BOTTOM_ROW+1;while(i--){result.push('');}
712return result;};var Cea608Stream=function(field,dataChannel){Cea608Stream.prototype.init.call(this);this.field_=field||0;this.dataChannel_=dataChannel||0;this.name_='CC'+(((this.field_<<1)|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(packet){var data,swap,char0,char1,text;data=packet.ccData&0x7f7f;if(data===this.lastControlCode_){this.lastControlCode_=null;return;}
713if((data&0xf000)===0x1000){this.lastControlCode_=data;}else if(data!==this.PADDING_){this.lastControlCode_=null;}
714char0=data>>>8;char1=data&0xff;if(data===this.PADDING_){return;}else if(data===this.RESUME_CAPTION_LOADING_){this.mode_='popOn';}else if(data===this.END_OF_CAPTION_){this.clearFormatting(packet.pts);this.flushDisplayed(packet.pts);swap=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=swap;this.startPts_=packet.pts;}else if(data===this.ROLL_UP_2_ROWS_){this.topRow_=BOTTOM_ROW-1;this.mode_='rollUp';}else if(data===this.ROLL_UP_3_ROWS_){this.topRow_=BOTTOM_ROW-2;this.mode_='rollUp';}else if(data===this.ROLL_UP_4_ROWS_){this.topRow_=BOTTOM_ROW-3;this.mode_='rollUp';}else if(data===this.CARRIAGE_RETURN_){this.clearFormatting(packet.pts);this.flushDisplayed(packet.pts);this.shiftRowsUp_();this.startPts_=packet.pts;}else if(data===this.BACKSPACE_){if(this.mode_==='popOn'){this.nonDisplayed_[BOTTOM_ROW]=this.nonDisplayed_[BOTTOM_ROW].slice(0,-1);}else{this.displayed_[BOTTOM_ROW]=this.displayed_[BOTTOM_ROW].slice(0,-1);}}else if(data===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(packet.pts);this.displayed_=createDisplayBuffer();}else if(data===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=createDisplayBuffer();}else if(data===this.RESUME_DIRECT_CAPTIONING_){this.mode_='paintOn';}else if(this.isSpecialCharacter(char0,char1)){char0=(char0&0x03)<<8;text=getCharFromCode(char0|char1);this[this.mode_](packet.pts,text);this.column_++;}else if(this.isExtCharacter(char0,char1)){if(this.mode_==='popOn'){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1);}else{this.displayed_[BOTTOM_ROW]=this.displayed_[BOTTOM_ROW].slice(0,-1);}
715char0=(char0&0x03)<<8;text=getCharFromCode(char0|char1);this[this.mode_](packet.pts,text);this.column_++;}else if(this.isMidRowCode(char0,char1)){this.clearFormatting(packet.pts);this[this.mode_](packet.pts,' ');this.column_++;if((char1&0xe)===0xe){this.addFormatting(packet.pts,['i']);}
716if((char1&0x1)===0x1){this.addFormatting(packet.pts,['u']);}}else if(this.isOffsetControlCode(char0,char1)){this.column_+=(char1&0x03);}else if(this.isPAC(char0,char1)){var row=ROWS.indexOf(data&0x1f20);if(row!==this.row_){this.clearFormatting(packet.pts);this.row_=row;}
717if((char1&0x1)&&(this.formatting_.indexOf('u')===-1)){this.addFormatting(packet.pts,['u']);}
718if((data&0x10)===0x10){this.column_=((data&0xe)>>1)*4;}
719if(this.isColorPAC(char1)){if((char1&0xe)===0xe){this.addFormatting(packet.pts,['i']);}}}else if(this.isNormalChar(char0)){if(char1===0x00){char1=null;}
720text=getCharFromCode(char0);text+=getCharFromCode(char1);this[this.mode_](packet.pts,text);this.column_+=text.length;}};};Cea608Stream.prototype=new Stream();Cea608Stream.prototype.flushDisplayed=function(pts){var content=this.displayed_.map(function(row){return row.trim();}).join('\n').replace(/^\n+|\n+$/g,'');if(content.length){this.trigger('data',{startPts:this.startPts_,endPts:pts,text:content,stream:this.name_});}};Cea608Stream.prototype.reset=function(){this.mode_='popOn';this.topRow_=0;this.startPts_=0;this.displayed_=createDisplayBuffer();this.nonDisplayed_=createDisplayBuffer();this.lastControlCode_=null;this.column_=0;this.row_=BOTTOM_ROW;this.formatting_=[];};Cea608Stream.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=0x10;this.EXT_=0x11;this.CONTROL_=(0x14|this.field_)<<8;this.OFFSET_=0x17;}else if(this.dataChannel_===1){this.BASE_=0x18;this.EXT_=0x19;this.CONTROL_=(0x1c|this.field_)<<8;this.OFFSET_=0x1f;}
721this.PADDING_=0x0000;this.RESUME_CAPTION_LOADING_=this.CONTROL_|0x20;this.END_OF_CAPTION_=this.CONTROL_|0x2f;this.ROLL_UP_2_ROWS_=this.CONTROL_|0x25;this.ROLL_UP_3_ROWS_=this.CONTROL_|0x26;this.ROLL_UP_4_ROWS_=this.CONTROL_|0x27;this.CARRIAGE_RETURN_=this.CONTROL_|0x2d;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|0x29;this.BACKSPACE_=this.CONTROL_|0x21;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|0x2c;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|0x2e;};Cea608Stream.prototype.isSpecialCharacter=function(char0,char1){return(char0===this.EXT_&&char1>=0x30&&char1<=0x3f);};Cea608Stream.prototype.isExtCharacter=function(char0,char1){return((char0===(this.EXT_+1)||char0===(this.EXT_+2))&&(char1>=0x20&&char1<=0x3f));};Cea608Stream.prototype.isMidRowCode=function(char0,char1){return(char0===this.EXT_&&(char1>=0x20&&char1<=0x2f));};Cea608Stream.prototype.isOffsetControlCode=function(char0,char1){return(char0===this.OFFSET_&&(char1>=0x21&&char1<=0x23));};Cea608Stream.prototype.isPAC=function(char0,char1){return(char0>=this.BASE_&&char0<(this.BASE_+8)&&(char1>=0x40&&char1<=0x7f));};Cea608Stream.prototype.isColorPAC=function(char1){return((char1>=0x40&&char1<=0x4f)||(char1>=0x60&&char1<=0x7f));};Cea608Stream.prototype.isNormalChar=function(char){return(char>=0x20&&char<=0x7f);};Cea608Stream.prototype.addFormatting=function(pts,format){this.formatting_=this.formatting_.concat(format);var text=format.reduce(function(text,format){return text+'<'+format+'>';},'');this[this.mode_](pts,text);};Cea608Stream.prototype.clearFormatting=function(pts){if(!this.formatting_.length){return;}
722var text=this.formatting_.reverse().reduce(function(text,format){return text+'</'+format+'>';},'');this.formatting_=[];this[this.mode_](pts,text);};Cea608Stream.prototype.popOn=function(pts,text){var baseRow=this.nonDisplayed_[this.row_];baseRow+=text;this.nonDisplayed_[this.row_]=baseRow;};Cea608Stream.prototype.rollUp=function(pts,text){var baseRow=this.displayed_[BOTTOM_ROW];baseRow+=text;this.displayed_[BOTTOM_ROW]=baseRow;};Cea608Stream.prototype.shiftRowsUp_=function(){var i;for(i=0;i<this.topRow_;i++){this.displayed_[i]='';}
723for(i=this.topRow_;i<BOTTOM_ROW;i++){this.displayed_[i]=this.displayed_[i+1];}
724this.displayed_[BOTTOM_ROW]='';};Cea608Stream.prototype.paintOn=function(){};module.exports={CaptionStream:CaptionStream,Cea608Stream:Cea608Stream};},{"../utils/stream":62}],50:[function(require,module,exports){'use strict';var Stream=require('../utils/stream.js'),CaptionStream=require('./caption-stream'),StreamTypes=require('./stream-types'),TimestampRolloverStream=require('./timestamp-rollover-stream').TimestampRolloverStream;var m2tsStreamTypes=require('./stream-types.js');var TransportPacketStream,TransportParseStream,ElementaryStream;var
725MP2T_PACKET_LENGTH=188,SYNC_BYTE=0x47;TransportPacketStream=function(){var
726buffer=new Uint8Array(MP2T_PACKET_LENGTH),bytesInBuffer=0;TransportPacketStream.prototype.init.call(this);this.push=function(bytes){var
727startIndex=0,endIndex=MP2T_PACKET_LENGTH,everything;if(bytesInBuffer){everything=new Uint8Array(bytes.byteLength+bytesInBuffer);everything.set(buffer.subarray(0,bytesInBuffer));everything.set(bytes,bytesInBuffer);bytesInBuffer=0;}else{everything=bytes;}
728while(endIndex<everything.byteLength){if(everything[startIndex]===SYNC_BYTE&&everything[endIndex]===SYNC_BYTE){this.trigger('data',everything.subarray(startIndex,endIndex));startIndex+=MP2T_PACKET_LENGTH;endIndex+=MP2T_PACKET_LENGTH;continue;}
729startIndex++;endIndex++;}
730if(startIndex<everything.byteLength){buffer.set(everything.subarray(startIndex),0
vendor: 4,978 bytes, lines 730-747
730);bytesInBuffer=everything.byteLength-startIndex;}};this.flush=function(){if(bytesInBuffer===MP2T_PACKET_LENGTH&&buffer[0]===SYNC_BYTE){this.trigger('data',buffer);bytesInBuffer=0;}
731this.trigger('done');};};TransportPacketStream.prototype=new Stream();TransportParseStream=function(){var parsePsi,parsePat,parsePmt,self;TransportParseStream.prototype.init.call(this);self=this;this.packetsWaitingForPmt=[];this.programMapTable=undefined;parsePsi=function(payload,psi){var offset=0;if(psi.payloadUnitStartIndicator){offset+=payload[offset]+1;}
732if(psi.type==='pat'){parsePat(payload.subarray(offset),psi);}else{parsePmt(payload.subarray(offset),psi);}};parsePat=function(payload,pat){pat.section_number=payload[7];pat.last_section_number=payload[8];self.pmtPid=(payload[10]&0x1F)<<8|payload[11];pat.pmtPid=self.pmtPid;};parsePmt=function(payload,pmt){var sectionLength,tableEnd,programInfoLength,offset;if(!(payload[5]&0x01)){return;}
733self.programMapTable={};sectionLength=(payload[1]&0x0f)<<8|payload[2];tableEnd=3+sectionLength-4;programInfoLength=(payload[10]&0x0f)<<8|payload[11];offset=12+programInfoLength;while(offset<tableEnd){self.programMapTable[(payload[offset+1]&0x1F)<<8|payload[offset+2]]=payload[offset];offset+=((payload[offset+3]&0x0F)<<8|payload[offset+4])+5;}
734pmt.programMapTable=self.programMapTable;while(self.packetsWaitingForPmt.length){self.processPes_.apply(self,self.packetsWaitingForPmt.shift());}};this.push=function(packet){var
735result={},offset=4;result.payloadUnitStartIndicator=!!(packet[1]&0x40);result.pid=packet[1]&0x1f;result.pid<<=8;result.pid|=packet[2];if(((packet[3]&0x30)>>>4)>0x01){offset+=packet[offset]+1;}
736if(result.pid===0){result.type='pat';parsePsi(packet.subarray(offset),result);this.trigger('data',result);}else if(result.pid===this.pmtPid){result.type='pmt';parsePsi(packet.subarray(offset),result);this.trigger('data',result);}else if(this.programMapTable===undefined){this.packetsWaitingForPmt.push([packet,offset,result]);}else{this.processPes_(packet,offset,result);}};this.processPes_=function(packet,offset,result){result.streamType=this.programMapTable[result.pid];result.type='pes';result.data=packet.subarray(offset);this.trigger('data',result);};};TransportParseStream.prototype=new Stream();TransportParseStream.STREAM_TYPES={h264:0x1b,adts:0x0f};ElementaryStream=function(){var
737self=this,video={data:[],size:0},audio={data:[],size:0},timedMetadata={data:[],size:0},parsePes=function(payload,pes){var ptsDtsFlags;pes.packetLength=6+((payload[4]<<8)|payload[5]);pes.dataAlignmentIndicator=(payload[6]&0x04)!==0;ptsDtsFlags=payload[7];if(ptsDtsFlags&0xC0){pes.pts=(payload[9]&0x0E)<<27|(payload[10]&0xFF)<<20|(payload[11]&0xFE)<<12|(payload[12]&0xFF)<<5|(payload[13]&0xFE)>>>3;pes.pts*=4;pes.pts+=(payload[13]&0x06)>>>1;pes.dts=pes.pts;if(ptsDtsFlags&0x40){pes.dts=(payload[14]&0x0E)<<27|(payload[15]&0xFF)<<20|(payload[16]&0xFE)<<12|(payload[17]&0xFF)<<5|(payload[18]&0xFE)>>>3;pes.dts*=4;pes.dts+=(payload[18]&0x06)>>>1;}}
738pes.data=payload.subarray(9+payload[8]);},flushStream=function(stream,type,forceFlush){var
739packetData=new Uint8Array(stream.size),event={type:type},i=0,offset=0,packetFlushable=false,fragment;if(!stream.data.length||stream.size<9){return;}
740event.trackId=stream.data[0].pid;for(i=0;i<stream.data.length;i++){fragment=stream.data[i];packetData.set(fragment.data,offset);offset+=fragment.data.byteLength;}
741parsePes(packetData,event);packetFlushable=type==='video'||event.packetLength===stream.size;if(forceFlush||packetFlushable){stream.size=0;stream.data.length=0;}
742if(packetFlushable){self.trigger('data',event);}};ElementaryStream.prototype.init.call(this);this.push=function(data){({pat:function(){},pes:function(){var stream,streamType;switch(data.streamType){case StreamTypes.H264_STREAM_TYPE:case m2tsStreamTypes.H264_STREAM_TYPE:stream=video;streamType='video';break;case StreamTypes.ADTS_STREAM_TYPE:stream=audio;streamType='audio';break;case StreamTypes.METADATA_STREAM_TYPE:stream=timedMetadata;streamType='timed-metadata';break;default:return;}
743if(data.payloadUnitStartIndicator){flushStream(stream,streamType,true);}
744stream.data.push(data);stream.size+=data.data.byteLength;},pmt:function(){var
745event={type:'metadata',tracks:[]},programMapTable=data.programMapTable,k,track;for(k in programMapTable){if(programMapTable.hasOwnProperty(k)){track={timelineStartInfo:{baseMediaDecodeTime:0}};track.id=+k;if(programMapTable[k]===m2tsStreamTypes.H264_STREAM_TYPE){track.codec='avc';track.type='video';}else if(programMapTable[k]===m2tsStreamTypes.ADTS_STREAM_TYPE){track.codec='adts';track.type='audio';}
746event.tracks.push(track);}}
747self.trigger('data',event);}})[data.type]();};this.flush=function(){flushStream(video,'video');flushStream(audio,'audio');flushStream(timedMetadata,'timed-metadata');this.trigger('done');};};ElementaryStream.prototype=new Stream();var m2ts={PAT_PID:0x0000,MP2T_PACKET_LENGTH:MP2T_PACKET_LENGTH,TransportPacketStream:TransportPacketStream,TransportParseStream
vendor: 10,640 bytes, lines 747-788
747:TransportParseStream,ElementaryStream:ElementaryStream,TimestampRolloverStream:TimestampRolloverStream,CaptionStream:CaptionStream.CaptionStream,Cea608Stream:CaptionStream.Cea608Stream,MetadataStream:require('./metadata-stream')};for(var type in StreamTypes){if(StreamTypes.hasOwnProperty(type)){m2ts[type]=StreamTypes[type];}}
748module.exports=m2ts;},{"../utils/stream.js":62,"./caption-stream":49,"./metadata-stream":51,"./stream-types":53,"./stream-types.js":53,"./timestamp-rollover-stream":54}],51:[function(require,module,exports){'use strict';var
749Stream=require('../utils/stream'),StreamTypes=require('./stream-types'),percentEncode=function(bytes,start,end){var i,result='';for(i=start;i<end;i++){result+='%'+('00'+bytes[i].toString(16)).slice(-2);}
750return result;},parseUtf8=function(bytes,start,end){return decodeURIComponent(percentEncode(bytes,start,end));},parseIso88591=function(bytes,start,end){return unescape(percentEncode(bytes,start,end));},parseSyncSafeInteger=function(data){return(data[0]<<21)|(data[1]<<14)|(data[2]<<7)|(data[3]);},tagParsers={TXXX:function(tag){var i;if(tag.data[0]!==3){return;}
751for(i=1;i<tag.data.length;i++){if(tag.data[i]===0){tag.description=parseUtf8(tag.data,1,i);tag.value=parseUtf8(tag.data,i+1,tag.data.length).replace(/\0*$/,'');break;}}
752tag.data=tag.value;},WXXX:function(tag){var i;if(tag.data[0]!==3){return;}
753for(i=1;i<tag.data.length;i++){if(tag.data[i]===0){tag.description=parseUtf8(tag.data,1,i);tag.url=parseUtf8(tag.data,i+1,tag.data.length);break;}}},PRIV:function(tag){var i;for(i=0;i<tag.data.length;i++){if(tag.data[i]===0){tag.owner=parseIso88591(tag.data,0,i);break;}}
754tag.privateData=tag.data.subarray(i+1);tag.data=tag.privateData;}},MetadataStream;MetadataStream=function(options){var
755settings={debug:!!(options&&options.debug),descriptor:options&&options.descriptor},tagSize=0,buffer=[],bufferSize=0,i;MetadataStream.prototype.init.call(this);this.dispatchType=StreamTypes.METADATA_STREAM_TYPE.toString(16);if(settings.descriptor){for(i=0;i<settings.descriptor.length;i++){this.dispatchType+=('00'+settings.descriptor[i].toString(16)).slice(-2);}}
756this.push=function(chunk){var tag,frameStart,frameSize,frame,i,frameHeader;if(chunk.type!=='timed-metadata'){return;}
757if(chunk.dataAlignmentIndicator){bufferSize=0;buffer.length=0;}
758if(buffer.length===0&&(chunk.data.length<10||chunk.data[0]!=='I'.charCodeAt(0)||chunk.data[1]!=='D'.charCodeAt(0)||chunk.data[2]!=='3'.charCodeAt(0))){if(settings.debug){console.log('Skipping unrecognized metadata packet');}
759return;}
760buffer.push(chunk);bufferSize+=chunk.data.byteLength;if(buffer.length===1){tagSize=parseSyncSafeInteger(chunk.data.subarray(6,10));tagSize+=10;}
761if(bufferSize<tagSize){return;}
762tag={data:new Uint8Array(tagSize),frames:[],pts:buffer[0].pts,dts:buffer[0].dts};for(i=0;i<tagSize;){tag.data.set(buffer[0].data.subarray(0,tagSize-i),i);i+=buffer[0].data.byteLength;bufferSize-=buffer[0].data.byteLength;buffer.shift();}
763frameStart=10;if(tag.data[5]&0x40){frameStart+=4;frameStart+=parseSyncSafeInteger(tag.data.subarray(10,14));tagSize-=parseSyncSafeInteger(tag.data.subarray(16,20));}
764do{frameSize=parseSyncSafeInteger(tag.data.subarray(frameStart+4,frameStart+8));if(frameSize<1){return console.log('Malformed ID3 frame encountered. Skipping metadata parsing.');}
765frameHeader=String.fromCharCode(tag.data[frameStart],tag.data[frameStart+1],tag.data[frameStart+2],tag.data[frameStart+3]);frame={id:frameHeader,data:tag.data.subarray(frameStart+10,frameStart+frameSize+10)};frame.key=frame.id;if(tagParsers[frame.id]){tagParsers[frame.id](frame);if(frame.owner==='com.apple.streaming.transportStreamTimestamp'){var
766d=frame.data,size=((d[3]&0x01)<<30)|(d[4]<<22)|(d[5]<<14)|(d[6]<<6)|(d[7]>>>2);size*=4;size+=d[7]&0x03;frame.timeStamp=size;if(tag.pts===undefined&&tag.dts===undefined){tag.pts=frame.timeStamp;tag.dts=frame.timeStamp;}
767this.trigger('timestamp',frame);}}
768tag.frames.push(frame);frameStart+=10;frameStart+=frameSize;}while(frameStart<tagSize);this.trigger('data',tag);};};MetadataStream.prototype=new Stream();module.exports=MetadataStream;},{"../utils/stream":62,"./stream-types":53}],52:[function(require,module,exports){'use strict';var StreamTypes=require('./stream-types.js');var parsePid=function(packet){var pid=packet[1]&0x1f;pid<<=8;pid|=packet[2];return pid;};var parsePayloadUnitStartIndicator=function(packet){return!!(packet[1]&0x40);};var parseAdaptionField=function(packet){var offset=0;if(((packet[3]&0x30)>>>4)>0x01){offset+=packet[4]+1;}
769return offset;};var parseType=function(packet,pmtPid){var pid=parsePid(packet);if(pid===0){return'pat';}else if(pid===pmtPid){return'pmt';}else if(pmtPid){return'pes';}
770return null;};var parsePat=function(packet){var pusi=parsePayloadUnitStartIndicator(packet);var offset=4+parseAdaptionField(packet);if(pusi){offset+=packet[offset]+1;}
771return(packet[offset+10]&0x1f)<<8|packet[offset+11];};var parsePmt=function(packet){var programMapTable={};var pusi=parsePayloadUnitStartIndicator(packet);var payloadOffset=4+parseAdaptionField(packet);if(pusi){payloadOffset+=packet[payloadOffset]+1;}
772if(!(packet[payloadOffset+5]&0x01)){return;}
773var sectionLength,tableEnd,programInfoLength;sectionLength=(packet[payloadOffset+1]&0x0f)<<8|packet[payloadOffset+2];tableEnd=3+sectionLength-4;programInfoLength=(packet[payloadOffset+10]&0x0f)<<8|packet[payloadOffset+11];var offset=12+programInfoLength;while(offset<tableEnd){var i=payloadOffset+offset;programMapTable[(packet[i+1]&0x1F)<<8|packet[i+2]]=packet[i];offset+=((packet[i+3]&0x0F)<<8|packet[i+4])+5;}
774return programMapTable;};var parsePesType=function(packet,programMapTable){var pid=parsePid(packet);var type=programMapTable[pid];switch(type){case StreamTypes.H264_STREAM_TYPE:return'video';case StreamTypes.ADTS_STREAM_TYPE:return'audio';case StreamTypes.METADATA_STREAM_TYPE:return'timed-metadata';default:return null;}};var parsePesTime=function(packet){var pusi=parsePayloadUnitStartIndicator(packet);if(!pusi){return null;}
775var offset=4+parseAdaptionField(packet);if(offset>=packet.byteLength){return null;}
776var pes=null;var ptsDtsFlags;ptsDtsFlags=packet[offset+7];if(ptsDtsFlags&0xC0){pes={};pes.pts=(packet[offset+9]&0x0E)<<27|(packet[offset+10]&0xFF)<<20|(packet[offset+11]&0xFE)<<12|(packet[offset+12]&0xFF)<<5|(packet[offset+13]&0xFE)>>>3;pes.pts*=4;pes.pts+=(packet[offset+13]&0x06)>>>1;pes.dts=pes.pts;if(ptsDtsFlags&0x40){pes.dts=(packet[offset+14]&0x0E)<<27|(packet[offset+15]&0xFF)<<20|(packet[offset+16]&0xFE)<<12|(packet[offset+17]&0xFF)<<5|(packet[offset+18]&0xFE)>>>3;pes.dts*=4;pes.dts+=(packet[offset+18]&0x06)>>>1;}}
777return pes;};var parseNalUnitType=function(type){switch(type){case 0x05:return'slice_layer_without_partitioning_rbsp_idr';case 0x06:return'sei_rbsp';case 0x07:return'seq_parameter_set_rbsp';case 0x08:return'pic_parameter_set_rbsp';case 0x09:return'access_unit_delimiter_rbsp';default:return null;}};var videoPacketContainsKeyFrame=function(packet){var offset=4+parseAdaptionField(packet);var frameBuffer=packet.subarray(offset);var frameI=0;var frameSyncPoint=0;var foundKeyFrame=false;var nalType;for(;frameSyncPoint<frameBuffer.byteLength-3;frameSyncPoint++){if(frameBuffer[frameSyncPoint+2]===1){frameI=frameSyncPoint+5;break;}}
778while(frameI<frameBuffer.byteLength){switch(frameBuffer[frameI]){case 0:if(frameBuffer[frameI-1]!==0){frameI+=2;break;}else if(frameBuffer[frameI-2]!==0){frameI++;break;}
779if(frameSyncPoint+3!==frameI-2){nalType=parseNalUnitType(frameBuffer[frameSyncPoint+3]&0x1f);if(nalType==='slice_layer_without_partitioning_rbsp_idr'){foundKeyFrame=true;}}
780do{frameI++;}while(frameBuffer[frameI]!==1&&frameI<frameBuffer.length);frameSyncPoint=frameI-2;frameI+=3;break;case 1:if(frameBuffer[frameI-1]!==0||frameBuffer[frameI-2]!==0){frameI+=3;break;}
781nalType=parseNalUnitType(frameBuffer[frameSyncPoint+3]&0x1f);if(nalType==='slice_layer_without_partitioning_rbsp_idr'){foundKeyFrame=true;}
782frameSyncPoint=frameI-2;frameI+=3;break;default:frameI+=3;break;}}
783frameBuffer=frameBuffer.subarray(frameSyncPoint);frameI-=frameSyncPoint;frameSyncPoint=0;if(frameBuffer&&frameBuffer.byteLength>3){nalType=parseNalUnitType(frameBuffer[frameSyncPoint+3]&0x1f);if(nalType==='slice_layer_without_partitioning_rbsp_idr'){foundKeyFrame=true;}}
784return foundKeyFrame;};module.exports={parseType:parseType,parsePat:parsePat,parsePmt:parsePmt,parsePayloadUnitStartIndicator:parsePayloadUnitStartIndicator,parsePesType:parsePesType,parsePesTime:parsePesTime,videoPacketContainsKeyFrame:videoPacketContainsKeyFrame};},{"./stream-types.js":53}],53:[function(require,module,exports){'use strict';module.exports={H264_STREAM_TYPE:0x1B,ADTS_STREAM_TYPE:0x0F,METADATA_STREAM_TYPE:0x15};},{}],54:[function(require,module,exports){'use strict';var Stream=require('../utils/stream');var MAX_TS=8589934592;var RO_THRESH=4294967296;var handleRollover=function(value,reference){var direction=1;if(value>reference){direction=-1;}
785while(Math.abs(reference-value)>RO_THRESH){value+=(direction*MAX_TS);}
786return value;};var TimestampRolloverStream=function(type){var lastDTS,referenceDTS;TimestampRolloverStream.prototype.init.call(this);this.type_=type;this.push=function(data){if(data.type!==this.type_){return;}
787if(referenceDTS===undefined){referenceDTS=data.dts;}
788data.dts=handleRollover(data.dts,referenceDTS);data.pts=handleRollover(data.pts,referenceDTS);lastDTS=data.dts;this.trigger('data',data);};this.flush=function(){referenceDTS=lastDTS;this.trigger('done');};this.discontinuity=function(){referenceDTS=void 0;lastDTS=void 0;};};TimestampRolloverStream.prototype=new Stream();module.exports={TimestampRolloverStream:TimestampRolloverStream,handleRollover:handleRollover};},{"../utils/stream":62}],55:[function(require,module,exports){module.exports={generator:require('./mp4-generator'),Transmuxer:require('./transmuxer').Transmuxer,AudioSegmentStream:require('./transmuxer').AudioSegmentStream,VideoSegmentStream:require('./transmuxer').VideoSegmentStream};},{"./mp4-generator":56,"./transmuxer":58}],56:[function(require,module,exports){'use strict';var UINT32_MAX=Math.pow(2,32)-1;var box,dinf,esds,ftyp,mdat,mfhd,minf,moof,moov,mvex,mvhd,trak,tkhd,mdia,mdhd,hdlr,sdtp,stbl,stsd,traf,trex,trun,types,MAJOR_BRAND,MINOR_VERSION,AVC1_BRAND,VIDEO_HDLR,AUDIO_HDLR,HDLR_TYPES,VMHD,SMHD,DREF,STCO,STSC,STSZ,STTS;(function(){var i;types={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:[]};if(typeof Uint8Array==='undefined'){return;}
vendor: 9,126 bytes, lines 789-813
789for(i in types){if(types.hasOwnProperty(i)){types[i]=[i.charCodeAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)];}}
790MAJOR_BRAND=new Uint8Array(['i'.charCodeAt(0),'s'.charCodeAt(0),'o'.charCodeAt(0),'m'.charCodeAt(0)]);AVC1_BRAND=new Uint8Array(['a'.charCodeAt(0),'v'.charCodeAt(0),'c'.charCodeAt(0),'1'.charCodeAt(0)]);MINOR_VERSION=new Uint8Array([0,0,0,1]);VIDEO_HDLR=new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x69,0x64,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x56,0x69,0x64,0x65,0x6f,0x48,0x61,0x6e,0x64,0x6c,0x65,0x72,0x00]);AUDIO_HDLR=new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6f,0x75,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,0x6f,0x75,0x6e,0x64,0x48,0x61,0x6e,0x64,0x6c,0x65,0x72,0x00]);HDLR_TYPES={video:VIDEO_HDLR,audio:AUDIO_HDLR};DREF=new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0c,0x75,0x72,0x6c,0x20,0x00,0x00,0x00,0x01]);SMHD=new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]);STCO=new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]);STSC=STCO;STSZ=new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]);STTS=STCO;VMHD=new Uint8Array([0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]);}());box=function(type){var
791payload=[],size=0,i,result,view;for(i=1;i<arguments.length;i++){payload.push(arguments[i]);}
792i=payload.length;while(i--){size+=payload[i].byteLength;}
793result=new Uint8Array(size+8);view=new DataView(result.buffer,result.byteOffset,result.byteLength);view.setUint32(0,result.byteLength);result.set(type,4);for(i=0,size=8;i<payload.length;i++){result.set(payload[i],size);size+=payload[i].byteLength;}
794return result;};dinf=function(){return box(types.dinf,box(types.dref,DREF));};esds=function(track){return box(types.esds,new Uint8Array([0x00,0x00,0x00,0x00,0x03,0x19,0x00,0x00,0x00,0x04,0x11,0x40,0x15,0x00,0x06,0x00,0x00,0x00,0xda,0xc0,0x00,0x00,0xda,0xc0,0x05,0x02,(track.audioobjecttype<<3)|(track.samplingfrequencyindex>>>1),(track.samplingfrequencyindex<<7)|(track.channelcount<<3),0x06,0x01,0x02]));};ftyp=function(){return box(types.ftyp,MAJOR_BRAND,MINOR_VERSION,MAJOR_BRAND,AVC1_BRAND);};hdlr=function(type){return box(types.hdlr,HDLR_TYPES[type]);};mdat=function(data){return box(types.mdat,data);};mdhd=function(track){var result=new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x01,0x5f,0x90,(track.duration>>>24)&0xFF,(track.duration>>>16)&0xFF,(track.duration>>>8)&0xFF,track.duration&0xFF,0x55,0xc4,0x00,0x00]);if(track.samplerate){result[12]=(track.samplerate>>>24)&0xFF;result[13]=(track.samplerate>>>16)&0xFF;result[14]=(track.samplerate>>>8)&0xFF;result[15]=(track.samplerate)&0xFF;}
795return box(types.mdhd,result);};mdia=function(track){return box(types.mdia,mdhd(track),hdlr(track.type),minf(track));};mfhd=function(sequenceNumber){return box(types.mfhd,new Uint8Array([0x00,0x00,0x00,0x00,(sequenceNumber&0xFF000000)>>24,(sequenceNumber&0xFF0000)>>16,(sequenceNumber&0xFF00)>>8,sequenceNumber&0xFF]));};minf=function(track){return box(types.minf,track.type==='video'?box(types.vmhd,VMHD):box(types.smhd,SMHD),dinf(),stbl(track));};moof=function(sequenceNumber,tracks){var
796trackFragments=[],i=tracks.length;while(i--){trackFragments[i]=traf(tracks[i]);}
797return box.apply(null,[types.moof,mfhd(sequenceNumber)].concat(trackFragments));};moov=function(tracks){var
798i=tracks.length,boxes=[];while(i--){boxes[i]=trak(tracks[i]);}
799return box.apply(null,[types.moov,mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));};mvex=function(tracks){var
800i=tracks.length,boxes=[];while(i--){boxes[i]=trex(tracks[i]);}
801return box.apply(null,[types.mvex].concat(boxes));};mvhd=function(duration){var
802bytes=new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x01,0x5f,0x90,(duration&0xFF000000)>>24,(duration&0xFF0000)>>16,(duration&0xFF00)>>8,duration&0xFF,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff]);return box(types.mvhd,bytes);};sdtp=function(track){var
803samples=track.samples||[],bytes=new Uint8Array(4+samples.length),flags,i;for(i=0;i<samples.length;i++){flags=samples[i].flags;bytes[i+4]=(flags.dependsOn<<4)|(flags.isDependedOn<<2)|(flags.hasRedundancy);}
804return box(types.sdtp,bytes);};stbl=function(track){return box(types.stbl,stsd(track),box(types.stts,STTS),box(types.stsc,STSC),box(types.stsz,STSZ),box(types.stco,STCO));};(function(){var videoSample,audioSample;stsd=function(track){return box(types.stsd,new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01]),track.type==='video'?videoSample(track):audioSample(track));};videoSample=function(track){var
805sps=track.sps||[],pps=track.pps||[],sequenceParameterSets=[],pictureParameterSets=[],i;for(i=0;i<sps.length;i++){sequenceParameterSets.push((sps[i].byteLength&0xFF00)>>>8);sequenceParameterSets.push((sps[i].byteLength&0xFF));sequenceParameterSets=sequenceParameterSets.concat(Array.prototype.slice.call(sps[i]));}
806for(i=0;i<pps.length;i++){pictureParameterSets.push((pps[i].byteLength&0xFF00)>>>8);pictureParameterSets.push((pps[i].byteLength&0xFF));pictureParameterSets=pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));}
807return box(types.avc1,new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,(track.width&0xff00)>>8,track.width&0xff,(track.height&0xff00)>>8,track.height&0xff,0x00,0x48,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x13,0x76,0x69,0x64,0x65,0x6f,0x6a,0x73,0x2d,0x63,0x6f,0x6e,0x74,0x72,0x69,0x62,0x2d,0x68,0x6c,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x11,0x11]),box(types.avcC,new Uint8Array([0x01,track.profileIdc,track.profileCompatibility,track.levelIdc,0xff].concat([sps.length]).concat(sequenceParameterSets).concat([pps.length]).concat(pictureParameterSets))),box(types.btrt,new Uint8Array([0x00,0x1c,0x9c,0x80,0x00,0x2d,0xc6,0xc0,0x00,0x2d,0xc6,0xc0])));};audioSample=function(track){return box(types.mp4a,new Uint8Array([0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,(track.channelcount&0xff00)>>8,(track.channelcount&0xff),(track.samplesize&0xff00)>>8,(track.samplesize&0xff),0x00,0x00,0x00,0x00,(track.samplerate&0xff00)>>8,(track.samplerate&0xff),0x00,0x00]),esds(track));};}());tkhd=function(track){var result=new Uint8Array([0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,(track.id&0xFF000000)>>24,(track.id&0xFF0000)>>16,(track.id&0xFF00)>>8,track.id&0xFF,0x00,0x00,0x00,0x00,(track.duration&0xFF000000)>>24,(track.duration&0xFF0000)>>16,(track.duration&0xFF00)>>8,track.duration&0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,(track.width&0xFF00)>>8,track.width&0xFF,0x00,0x00,(track.height&0xFF00)>>8,track.height&0xFF,0x00,0x00]);return box(types.tkhd,result);};traf=function(track){var trackFragmentHeader,trackFragmentDecodeTime,trackFragmentRun,sampleDependencyTable,dataOffset,upperWordBaseMediaDecodeTime,lowerWordBaseMediaDecodeTime;trackFragmentHeader=box(types.tfhd,new Uint8Array([0x00,0x00,0x00,0x3a,(track.id&0xFF000000)>>24,(track.id&0xFF0000)>>16,(track.id&0xFF00)>>8,(track.id&0xFF),0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]));upperWordBaseMediaDecodeTime=Math.floor(track.baseMediaDecodeTime/(UINT32_MAX+1));lowerWordBaseMediaDecodeTime=Math.floor(track.baseMediaDecodeTime%(UINT32_MAX+1));trackFragmentDecodeTime=box(types.tfdt,new Uint8Array([0x01,0x00,0x00,0x00,(upperWordBaseMediaDecodeTime>>>24)&0xFF,(upperWordBaseMediaDecodeTime>>>16)&0xFF,(upperWordBaseMediaDecodeTime>>>8)&0xFF,upperWordBaseMediaDecodeTime&0xFF,(lowerWordBaseMediaDecodeTime>>>24)&0xFF,(lowerWordBaseMediaDecodeTime>>>16)&0xFF,(lowerWordBaseMediaDecodeTime>>>8)&0xFF,lowerWordBaseMediaDecodeTime&0xFF]));dataOffset=(32+
80820+
8098+
81016+
8118+
8128);if(track.type==='audio'){trackFragmentRun=trun(track,dataOffset);return box(types.traf,trackFragmentHeader,trackFragmentDecodeTime,trackFragmentRun);}
813sampleDependencyTable=sdtp(track);trackFragmentRun=trun(track,sampleDependencyTable.length+dataOffset);return box(types.traf,trackFragmentHeader,trackFragmentDecodeTime,trackFragmentRun,sampleDependencyTable);};trak=function(track){track.duration=track.duration||0xffffffff;return box(types.trak,tkhd(track),mdia(track));};trex=function(track){var result=new Uint8Array([0x00,0x00,0x00,0x00,(track.id&0xFF000000)>>24,(track.id&0xFF0000)>>16,(track.id&0xFF00)>>8,(track.id&0xFF),0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01]
vendor: 93,084 bytes, lines 813-1118
813);if(track.type!=='video'){result[result.length-1]=0x00;}
814return box(types.trex,result);};(function(){var audioTrun,videoTrun,trunHeader;trunHeader=function(samples,offset){var durationPresent=0,sizePresent=0,flagsPresent=0,compositionTimeOffset=0;if(samples.length){if(samples[0].duration!==undefined){durationPresent=0x1;}
815if(samples[0].size!==undefined){sizePresent=0x2;}
816if(samples[0].flags!==undefined){flagsPresent=0x4;}
817if(samples[0].compositionTimeOffset!==undefined){compositionTimeOffset=0x8;}}
818return[0x00,0x00,durationPresent|sizePresent|flagsPresent|compositionTimeOffset,0x01,(samples.length&0xFF000000)>>>24,(samples.length&0xFF0000)>>>16,(samples.length&0xFF00)>>>8,samples.length&0xFF,(offset&0xFF000000)>>>24,(offset&0xFF0000)>>>16,(offset&0xFF00)>>>8,offset&0xFF];};videoTrun=function(track,offset){var bytes,samples,sample,i;samples=track.samples||[];offset+=8+12+(16*samples.length);bytes=trunHeader(samples,offset);for(i=0;i<samples.length;i++){sample=samples[i];bytes=bytes.concat([(sample.duration&0xFF000000)>>>24,(sample.duration&0xFF0000)>>>16,(sample.duration&0xFF00)>>>8,sample.duration&0xFF,(sample.size&0xFF000000)>>>24,(sample.size&0xFF0000)>>>16,(sample.size&0xFF00)>>>8,sample.size&0xFF,(sample.flags.isLeading<<2)|sample.flags.dependsOn,(sample.flags.isDependedOn<<6)|(sample.flags.hasRedundancy<<4)|(sample.flags.paddingValue<<1)|sample.flags.isNonSyncSample,sample.flags.degradationPriority&0xF0<<8,sample.flags.degradationPriority&0x0F,(sample.compositionTimeOffset&0xFF000000)>>>24,(sample.compositionTimeOffset&0xFF0000)>>>16,(sample.compositionTimeOffset&0xFF00)>>>8,sample.compositionTimeOffset&0xFF]);}
819return box(types.trun,new Uint8Array(bytes));};audioTrun=function(track,offset){var bytes,samples,sample,i;samples=track.samples||[];offset+=8+12+(8*samples.length);bytes=trunHeader(samples,offset);for(i=0;i<samples.length;i++){sample=samples[i];bytes=bytes.concat([(sample.duration&0xFF000000)>>>24,(sample.duration&0xFF0000)>>>16,(sample.duration&0xFF00)>>>8,sample.duration&0xFF,(sample.size&0xFF000000)>>>24,(sample.size&0xFF0000)>>>16,(sample.size&0xFF00)>>>8,sample.size&0xFF]);}
820return box(types.trun,new Uint8Array(bytes));};trun=function(track,offset){if(track.type==='audio'){return audioTrun(track,offset);}
821return videoTrun(track,offset);};}());module.exports={ftyp:ftyp,mdat:mdat,moof:moof,moov:moov,initSegment:function(tracks){var
822fileType=ftyp(),movie=moov(tracks),result;result=new Uint8Array(fileType.byteLength+movie.byteLength);result.set(fileType);result.set(movie,fileType.byteLength);return result;}};},{}],57:[function(require,module,exports){'use strict';var findBox,parseType,timescale,startTime;findBox=function(data,path){var results=[],i,size,type,end,subresults;if(!path.length){return null;}
823for(i=0;i<data.byteLength;){size=data[i]<<24;size|=data[i+1]<<16;size|=data[i+2]<<8;size|=data[i+3];type=parseType(data.subarray(i+4,i+8));end=size>1?i+size:data.byteLength;if(type===path[0]){if(path.length===1){results.push(data.subarray(i+8,end));}else{subresults=findBox(data.subarray(i+8,end),path.slice(1));if(subresults.length){results=results.concat(subresults);}}}
824i=end;}
825return results;};parseType=function(buffer){var result='';result+=String.fromCharCode(buffer[0]);result+=String.fromCharCode(buffer[1]);result+=String.fromCharCode(buffer[2]);result+=String.fromCharCode(buffer[3]);return result;};timescale=function(init){var
826result={},traks=findBox(init,['moov','trak']);return traks.reduce(function(result,trak){var tkhd,version,index,id,mdhd;tkhd=findBox(trak,['tkhd'])[0];if(!tkhd){return null;}
827version=tkhd[0];index=version===0?12:20;id=tkhd[index]<<24|tkhd[index+1]<<16|tkhd[index+2]<<8|tkhd[index+3];mdhd=findBox(trak,['mdia','mdhd'])[0];if(!mdhd){return null;}
828version=mdhd[0];index=version===0?12:20;result[id]=mdhd[index]<<24|mdhd[index+1]<<16|mdhd[index+2]<<8|mdhd[index+3];return result;},result);};startTime=function(timescale,fragment){var trafs,baseTimes,result;trafs=findBox(fragment,['moof','traf']);baseTimes=[].concat.apply([],trafs.map(function(traf){return findBox(traf,['tfhd']).map(function(tfhd){var id,scale,baseTime;id=tfhd[4]<<24|tfhd[5]<<16|tfhd[6]<<8|tfhd[7];scale=timescale[id]||90e3;baseTime=findBox(traf,['tfdt']).map(function(tfdt){var version,result;version=tfdt[0];result=tfdt[4]<<24|tfdt[5]<<16|tfdt[6]<<8|tfdt[7];if(version===1){result*=Math.pow(2,32);result+=tfdt[8]<<24|tfdt[9]<<16|tfdt[10]<<8|tfdt[11];}
829return result;})[0];baseTime=baseTime||Infinity;return baseTime/scale;});}));result=Math.min.apply(null,baseTimes);return isFinite(result)?result:0;};module.exports={parseType:parseType,timescale:timescale,startTime:startTime};},{}],58:[function(require,module,exports){'use strict';var Stream=require('../utils/stream.js');var mp4=require('./mp4-generator.js');var m2ts=require('../m2ts/m2ts.js');var AdtsStream=require('../codecs/adts.js');var H264Stream=require('../codecs/h264').H264Stream;var AacStream=require('../aac');var coneOfSilence=require('../data/silence');var clock=require('../utils/clock');var AUDIO_PROPERTIES=['audioobjecttype','channelcount','samplerate','samplingfrequencyindex','samplesize'];var VIDEO_PROPERTIES=['width','height','profileIdc','levelIdc','profileCompatibility'];var ONE_SECOND_IN_TS=90000;var VideoSegmentStream,AudioSegmentStream,Transmuxer,CoalesceStream;var
830createDefaultSample,isLikelyAacData,collectDtsInfo,clearDtsInfo,calculateTrackBaseMediaDecodeTime,arrayEquals,sumFrameByteLengths;createDefaultSample=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}};};isLikelyAacData=function(data){if((data[0]==='I'.charCodeAt(0))&&(data[1]==='D'.charCodeAt(0))&&(data[2]==='3'.charCodeAt(0))){return true;}
831return false;};arrayEquals=function(a,b){var
832i;if(a.length!==b.length){return false;}
833for(i=0;i<a.length;i++){if(a[i]!==b[i]){return false;}}
834return true;};sumFrameByteLengths=function(array){var
835i,currentObj,sum=0;for(i=0;i<array.length;i++){currentObj=array[i];sum+=currentObj.data.byteLength;}
836return sum;};AudioSegmentStream=function(track){var
837adtsFrames=[],sequenceNumber=0,earliestAllowedDts=0,audioAppendStartTs=0,videoBaseMediaDecodeTime=Infinity;AudioSegmentStream.prototype.init.call(this);this.push=function(data){collectDtsInfo(track,data);if(track){AUDIO_PROPERTIES.forEach(function(prop){track[prop]=data[prop];});}
838adtsFrames.push(data);};this.setEarliestDts=function(earliestDts){earliestAllowedDts=earliestDts-track.timelineStartInfo.baseMediaDecodeTime;};this.setVideoBaseMediaDecodeTime=function(baseMediaDecodeTime){videoBaseMediaDecodeTime=baseMediaDecodeTime;};this.setAudioAppendStart=function(timestamp){audioAppendStartTs=timestamp;};this.flush=function(){var
839frames,moof,mdat,boxes;if(adtsFrames.length===0){this.trigger('done','AudioSegmentStream');return;}
840frames=this.trimAdtsFramesByEarliestDts_(adtsFrames);track.baseMediaDecodeTime=calculateTrackBaseMediaDecodeTime(track);this.prefixWithSilence_(track,frames);track.samples=this.generateSampleTable_(frames);mdat=mp4.mdat(this.concatenateFrameData_(frames));adtsFrames=[];moof=mp4.moof(sequenceNumber,[track]);boxes=new Uint8Array(moof.byteLength+mdat.byteLength);sequenceNumber++;boxes.set(moof);boxes.set(mdat,moof.byteLength);clearDtsInfo(track);this.trigger('data',{track:track,boxes:boxes});this.trigger('done','AudioSegmentStream');};this.prefixWithSilence_=function(track,frames){var
841baseMediaDecodeTimeTs,frameDuration=0,audioGapDuration=0,audioFillFrameCount=0,audioFillDuration=0,silentFrame,i;if(!frames.length){return;}
842baseMediaDecodeTimeTs=clock.audioTsToVideoTs(track.baseMediaDecodeTime,track.samplerate);frameDuration=Math.ceil(ONE_SECOND_IN_TS/(track.samplerate/1024));if(audioAppendStartTs&&videoBaseMediaDecodeTime){audioGapDuration=baseMediaDecodeTimeTs-Math.max(audioAppendStartTs,videoBaseMediaDecodeTime);audioFillFrameCount=Math.floor(audioGapDuration/frameDuration);audioFillDuration=audioFillFrameCount*frameDuration;}
843if(audioFillFrameCount<1||audioFillDuration>ONE_SECOND_IN_TS/2){return;}
844silentFrame=coneOfSilence[track.samplerate];if(!silentFrame){silentFrame=frames[0].data;}
845for(i=0;i<audioFillFrameCount;i++){frames.splice(i,0,{data:silentFrame});}
846track.baseMediaDecodeTime-=Math.floor(clock.videoTsToAudioTs(audioFillDuration,track.samplerate));};this.trimAdtsFramesByEarliestDts_=function(adtsFrames){if(track.minSegmentDts>=earliestAllowedDts){return adtsFrames;}
847track.minSegmentDts=Infinity;return adtsFrames.filter(function(currentFrame){if(currentFrame.dts>=earliestAllowedDts){track.minSegmentDts=Math.min(track.minSegmentDts,currentFrame.dts);track.minSegmentPts=track.minSegmentDts;return true;}
848return false;});};this.generateSampleTable_=function(frames){var
849i,currentFrame,samples=[];for(i=0;i<frames.length;i++){currentFrame=frames[i];samples.push({size:currentFrame.data.byteLength,duration:1024});}
850return samples;};this.concatenateFrameData_=function(frames){var
851i,currentFrame,dataOffset=0,data=new Uint8Array(sumFrameByteLengths(frames));for(i=0;i<frames.length;i++){currentFrame=frames[i];data.set(currentFrame.data,dataOffset);dataOffset+=currentFrame.data.byteLength;}
852return data;};};AudioSegmentStream.prototype=new Stream();VideoSegmentStream=function(track){var
853sequenceNumber=0,nalUnits=[],config,pps;VideoSegmentStream.prototype.init.call(this);delete track.minPTS;this.gopCache_=[];this.push=function(nalUnit){collectDtsInfo(track,nalUnit);if(nalUnit.nalUnitType==='seq_parameter_set_rbsp'&&!config){config=nalUnit.config;track.sps=[nalUnit.data];VIDEO_PROPERTIES.forEach(function(prop){track[prop]=config[prop];},this);}
854if(nalUnit.nalUnitType==='pic_parameter_set_rbsp'&&!pps){pps=nalUnit.data;track.pps=[nalUnit.data];}
855nalUnits.push(nalUnit);};this.flush=function(){var
856frames,gopForFusion,gops,moof,mdat,boxes;while(nalUnits.length){if(nalUnits[0].nalUnitType==='access_unit_delimiter_rbsp'){break;}
857nalUnits.shift();}
858if(nalUnits.length===0){this.resetStream_();this.trigger('done','VideoSegmentStream');return;}
859frames=this.groupNalsIntoFrames_(nalUnits);gops=this.groupFramesIntoGops_(frames);if(!gops[0][0].keyFrame){gopForFusion=this.getGopForFusion_(nalUnits[0],track);if(gopForFusion){gops.unshift(gopForFusion);gops.byteLength+=gopForFusion.byteLength;gops.nalCount+=gopForFusion.nalCount;gops.pts=gopForFusion.pts;gops.dts=gopForFusion.dts;gops.duration+=gopForFusion.duration;}else{gops=this.extendFirstKeyFrame_(gops);}}
860collectDtsInfo(track,gops);track.samples=this.generateSampleTable_(gops);mdat=mp4.mdat(this.concatenateNalData_(gops));this.gopCache_.unshift({gop:gops.pop(),pps:track.pps,sps:track.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);nalUnits=[];track.baseMediaDecodeTime=calculateTrackBaseMediaDecodeTime(track);this.trigger('baseMediaDecodeTime',track.baseMediaDecodeTime);this.trigger('timelineStartInfo',track.timelineStartInfo);moof=mp4.moof(sequenceNumber,[track]);boxes=new Uint8Array(moof.byteLength+mdat.byteLength);sequenceNumber++;boxes.set(moof);boxes.set(mdat,moof.byteLength);this.trigger('data',{track:track,boxes:boxes});this.resetStream_();this.trigger('done','VideoSegmentStream');};this.resetStream_=function(){clearDtsInfo(track);config=undefined;pps=undefined;};this.getGopForFusion_=function(nalUnit){var
861halfSecond=45000,allowableOverlap=10000,nearestDistance=Infinity,dtsDistance,nearestGopObj,currentGop,currentGopObj,i;for(i=0;i<this.gopCache_.length;i++){currentGopObj=this.gopCache_[i];currentGop=currentGopObj.gop;if(!(track.pps&&arrayEquals(track.pps[0],currentGopObj.pps[0]))||!(track.sps&&arrayEquals(track.sps[0],currentGopObj.sps[0]))){continue;}
862if(currentGop.dts<track.timelineStartInfo.dts){continue;}
863dtsDistance=(nalUnit.dts-currentGop.dts)-currentGop.duration;if(dtsDistance>=-allowableOverlap&&dtsDistance<=halfSecond){if(!nearestGopObj||nearestDistance>dtsDistance){nearestGopObj=currentGopObj;nearestDistance=dtsDistance;}}}
864if(nearestGopObj){return nearestGopObj.gop;}
865return null;};this.extendFirstKeyFrame_=function(gops){var currentGop;if(!gops[0][0].keyFrame&&gops.length>1){currentGop=gops.shift();gops.byteLength-=currentGop.byteLength;gops.nalCount-=currentGop.nalCount;gops[0][0].dts=currentGop.dts;gops[0][0].pts=currentGop.pts;gops[0][0].duration+=currentGop.duration;}
866return gops;};this.groupNalsIntoFrames_=function(nalUnits){var
867i,currentNal,currentFrame=[],frames=[];currentFrame.byteLength=0;for(i=0;i<nalUnits.length;i++){currentNal=nalUnits[i];if(currentNal.nalUnitType==='access_unit_delimiter_rbsp'){if(currentFrame.length){currentFrame.duration=currentNal.dts-currentFrame.dts;frames.push(currentFrame);}
868currentFrame=[currentNal];currentFrame.byteLength=currentNal.data.byteLength;currentFrame.pts=currentNal.pts;currentFrame.dts=currentNal.dts;}else{if(currentNal.nalUnitType==='slice_layer_without_partitioning_rbsp_idr'){currentFrame.keyFrame=true;}
869currentFrame.duration=currentNal.dts-currentFrame.dts;currentFrame.byteLength+=currentNal.data.byteLength;currentFrame.push(currentNal);}}
870if(frames.length&&(!currentFrame.duration||currentFrame.duration<=0)){currentFrame.duration=frames[frames.length-1].duration;}
871frames.push(currentFrame);return frames;};this.groupFramesIntoGops_=function(frames){var
872i,currentFrame,currentGop=[],gops=[];currentGop.byteLength=0;currentGop.nalCount=0;currentGop.duration=0;currentGop.pts=frames[0].pts;currentGop.dts=frames[0].dts;gops.byteLength=0;gops.nalCount=0;gops.duration=0;gops.pts=frames[0].pts;gops.dts=frames[0].dts;for(i=0;i<frames.length;i++){currentFrame=frames[i];if(currentFrame.keyFrame){if(currentGop.length){gops.push(currentGop);gops.byteLength+=currentGop.byteLength;gops.nalCount+=currentGop.nalCount;gops.duration+=currentGop.duration;}
873currentGop=[currentFrame];currentGop.nalCount=currentFrame.length;currentGop.byteLength=currentFrame.byteLength;currentGop.pts=currentFrame.pts;currentGop.dts=currentFrame.dts;currentGop.duration=currentFrame.duration;}else{currentGop.duration+=currentFrame.duration;currentGop.nalCount+=currentFrame.length;currentGop.byteLength+=currentFrame.byteLength;currentGop.push(currentFrame);}}
874if(gops.length&&currentGop.duration<=0){currentGop.duration=gops[gops.length-1].duration;}
875gops.byteLength+=currentGop.byteLength;gops.nalCount+=currentGop.nalCount;gops.duration+=currentGop.duration;gops.push(currentGop);return gops;};this.generateSampleTable_=function(gops,baseDataOffset){var
876h,i,sample,currentGop,currentFrame,dataOffset=baseDataOffset||0,samples=[];for(h=0;h<gops.length;h++){currentGop=gops[h];for(i=0;i<currentGop.length;i++){currentFrame=currentGop[i];sample=createDefaultSample();sample.dataOffset=dataOffset;sample.compositionTimeOffset=currentFrame.pts-currentFrame.dts;sample.duration=currentFrame.duration;sample.size=4*currentFrame.length;sample.size+=currentFrame.byteLength;if(currentFrame.keyFrame){sample.flags.dependsOn=2;}
877dataOffset+=sample.size;samples.push(sample);}}
878return samples;};this.concatenateNalData_=function(gops){var
879h,i,j,currentGop,currentFrame,currentNal,dataOffset=0,nalsByteLength=gops.byteLength,numberOfNals=gops.nalCount,totalByteLength=nalsByteLength+4*numberOfNals,data=new Uint8Array(totalByteLength),view=new DataView(data.buffer);for(h=0;h<gops.length;h++){currentGop=gops[h];for(i=0;i<currentGop.length;i++){currentFrame=currentGop[i];for(j=0;j<currentFrame.length;j++){currentNal=currentFrame[j];view.setUint32(dataOffset,currentNal.data.byteLength);dataOffset+=4;data.set(currentNal.data,dataOffset);dataOffset+=currentNal.data.byteLength;}}}
880return data;};};VideoSegmentStream.prototype=new Stream();collectDtsInfo=function(track,data){if(typeof data.pts==='number'){if(track.timelineStartInfo.pts===undefined){track.timelineStartInfo.pts=data.pts;}
881if(track.minSegmentPts===undefined){track.minSegmentPts=data.pts;}else{track.minSegmentPts=Math.min(track.minSegmentPts,data.pts);}
882if(track.maxSegmentPts===undefined){track.maxSegmentPts=data.pts;}else{track.maxSegmentPts=Math.max(track.maxSegmentPts,data.pts);}}
883if(typeof data.dts==='number'){if(track.timelineStartInfo.dts===undefined){track.timelineStartInfo.dts=data.dts;}
884if(track.minSegmentDts===undefined){track.minSegmentDts=data.dts;}else{track.minSegmentDts=Math.min(track.minSegmentDts,data.dts);}
885if(track.maxSegmentDts===undefined){track.maxSegmentDts=data.dts;}else{track.maxSegmentDts=Math.max(track.maxSegmentDts,data.dts);}}};clearDtsInfo=function(track){delete track.minSegmentDts;delete track.maxSegmentDts;delete track.minSegmentPts;delete track.maxSegmentPts;};calculateTrackBaseMediaDecodeTime=function(track){var
886baseMediaDecodeTime,scale,timeSinceStartOfTimeline=track.minSegmentDts-track.timelineStartInfo.dts;baseMediaDecodeTime=track.timelineStartInfo.baseMediaDecodeTime;baseMediaDecodeTime+=timeSinceStartOfTimeline;baseMediaDecodeTime=Math.max(0,baseMediaDecodeTime);if(track.type==='audio'){scale=track.samplerate/ONE_SECOND_IN_TS;baseMediaDecodeTime*=scale;baseMediaDecodeTime=Math.floor(baseMediaDecodeTime);}
887return baseMediaDecodeTime;};CoalesceStream=function(options,metadataStream){this.numberOfTracks=0;this.metadataStream=metadataStream;if(typeof options.remux!=='undefined'){this.remuxTracks=!!options.remux;}else{this.remuxTracks=true;}
888this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;CoalesceStream.prototype.init.call(this);this.push=function(output){if(output.text){return this.pendingCaptions.push(output);}
889if(output.frames){return this.pendingMetadata.push(output);}
890this.pendingTracks.push(output.track);this.pendingBoxes.push(output.boxes);this.pendingBytes+=output.boxes.byteLength;if(output.track.type==='video'){this.videoTrack=output.track;}
891if(output.track.type==='audio'){this.audioTrack=output.track;}};};CoalesceStream.prototype=new Stream();CoalesceStream.prototype.flush=function(flushSource){var
892offset=0,event={captions:[],captionStreams:{},metadata:[],info:{}},caption,id3,initSegment,timelineStartPts=0,i;if(this.pendingTracks.length<this.numberOfTracks){if(flushSource!=='VideoSegmentStream'&&flushSource!=='AudioSegmentStream'){return;}else if(this.remuxTracks){return;}else if(this.pendingTracks.length===0){this.emittedTracks++;if(this.emittedTracks>=this.numberOfTracks){this.trigger('done');this.emittedTracks=0;}
893return;}}
894if(this.videoTrack){timelineStartPts=this.videoTrack.timelineStartInfo.pts;VIDEO_PROPERTIES.forEach(function(prop){event.info[prop]=this.videoTrack[prop];},this);}else if(this.audioTrack){timelineStartPts=this.audioTrack.timelineStartInfo.pts;AUDIO_PROPERTIES.forEach(function(prop){event.info[prop]=this.audioTrack[prop];},this);}
895if(this.pendingTracks.length===1){event.type=this.pendingTracks[0].type;}else{event.type='combined';}
896this.emittedTracks+=this.pendingTracks.length;initSegment=mp4.initSegment(this.pendingTracks);event.initSegment=new Uint8Array(initSegment.byteLength);event.initSegment.set(initSegment);event.data=new Uint8Array(this.pendingBytes);for(i=0;i<this.pendingBoxes.length;i++){event.data.set(this.pendingBoxes[i],offset);offset+=this.pendingBoxes[i].byteLength;}
897for(i=0;i<this.pendingCaptions.length;i++){caption=this.pendingCaptions[i];caption.startTime=(caption.startPts-timelineStartPts);caption.startTime/=90e3;caption.endTime=(caption.endPts-timelineStartPts);caption.endTime/=90e3;event.captionStreams[caption.stream]=true;event.captions.push(caption);}
898for(i=0;i<this.pendingMetadata.length;i++){id3=this.pendingMetadata[i];id3.cueTime=(id3.pts-timelineStartPts);id3.cueTime/=90e3;event.metadata.push(id3);}
899event.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingCaptions.length=0;this.pendingBytes=0;this.pendingMetadata.length=0;this.trigger('data',event);if(this.emittedTracks>=this.numberOfTracks){this.trigger('done');this.emittedTracks=0;}};Transmuxer=function(options){var
900self=this,hasFlushed=true,videoTrack,audioTrack;Transmuxer.prototype.init.call(this);options=options||{};this.baseMediaDecodeTime=options.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var pipeline={};this.transmuxPipeline_=pipeline;pipeline.type='aac';pipeline.metadataStream=new m2ts.MetadataStream();pipeline.aacStream=new AacStream();pipeline.audioTimestampRolloverStream=new m2ts.TimestampRolloverStream('audio');pipeline.timedMetadataTimestampRolloverStream=new m2ts.TimestampRolloverStream('timed-metadata');pipeline.adtsStream=new AdtsStream();pipeline.coalesceStream=new CoalesceStream(options,pipeline.metadataStream);pipeline.headOfPipeline=pipeline.aacStream;pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);pipeline.metadataStream.on('timestamp',function(frame){pipeline.aacStream.setTimestamp(frame.timeStamp);});pipeline.aacStream.on('data',function(data){if(data.type==='timed-metadata'&&!pipeline.audioSegmentStream){audioTrack=audioTrack||{timelineStartInfo:{baseMediaDecodeTime:self.baseMediaDecodeTime},codec:'adts',type:'audio'};pipeline.coalesceStream.numberOfTracks++;pipeline.audioSegmentStream=new AudioSegmentStream(audioTrack);pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);}});pipeline.coalesceStream.on('data',this.trigger.bind(this,'data'));pipeline.coalesceStream.on('done',this.trigger.bind(this,'done'));};this.setupTsPipeline=function(){var pipeline={};this.transmuxPipeline_=pipeline;pipeline.type='ts';pipeline.metadataStream=new m2ts.MetadataStream();pipeline.packetStream=new m2ts.TransportPacketStream();pipeline.parseStream=new m2ts.TransportParseStream();pipeline.elementaryStream=new m2ts.ElementaryStream();pipeline.videoTimestampRolloverStream=new m2ts.TimestampRolloverStream('video');pipeline.audioTimestampRolloverStream=new m2ts.TimestampRolloverStream('audio');pipeline.timedMetadataTimestampRolloverStream=new m2ts.TimestampRolloverStream('timed-metadata');pipeline.adtsStream=new AdtsStream();pipeline.h264Stream=new H264Stream();pipeline.captionStream=new m2ts.CaptionStream();pipeline.coalesceStream=new CoalesceStream(options,pipeline.metadataStream);pipeline.headOfPipeline=pipeline.packetStream;pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream);pipeline.elementaryStream.pipe(pipeline.videoTimestampRolloverStream).pipe(pipeline.h264Stream);pipeline.elementaryStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);pipeline.elementaryStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);pipeline.elementaryStream.on('data',function(data){var i;if(data.type==='metadata'){i=data.tracks.length;while(i--){if(!videoTrack&&data.tracks[i].type==='video'){videoTrack=data.tracks[i];videoTrack.timelineStartInfo.baseMediaDecodeTime=self.baseMediaDecodeTime;}else if(!audioTrack&&data.tracks[i].type==='audio'){audioTrack=data.tracks[i];audioTrack.timelineStartInfo.baseMediaDecodeTime=self.baseMediaDecodeTime;}}
901if(videoTrack&&!pipeline.videoSegmentStream){pipeline.coalesceStream.numberOfTracks++;pipeline.videoSegmentStream=new VideoSegmentStream(videoTrack);pipeline.videoSegmentStream.on('timelineStartInfo',function(timelineStartInfo){if(audioTrack){audioTrack.timelineStartInfo=timelineStartInfo;pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts);}});pipeline.videoSegmentStream.on('baseMediaDecodeTime',function(baseMediaDecodeTime){if(audioTrack){pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);}});pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);}
902if(audioTrack&&!pipeline.audioSegmentStream){pipeline.coalesceStream.numberOfTracks++;pipeline.audioSegmentStream=new AudioSegmentStream(audioTrack);pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);}}});pipeline.coalesceStream.on('data',this.trigger.bind(this,'data'));pipeline.coalesceStream.on('done',this.trigger.bind(this,'done'));};this.setBaseMediaDecodeTime=function(baseMediaDecodeTime){var pipeline=this.transmuxPipeline_;this.baseMediaDecodeTime=baseMediaDecodeTime;if(audioTrack){audioTrack.timelineStartInfo.dts=undefined;audioTrack.timelineStartInfo.pts=undefined;clearDtsInfo(audioTrack);audioTrack.timelineStartInfo.baseMediaDecodeTime=baseMediaDecodeTime;if(pipeline.audioTimestampRolloverStream){pipeline.audioTimestampRolloverStream.discontinuity();}}
903if(videoTrack){if(pipeline.videoSegmentStream){pipeline.videoSegmentStream.gopCache_=[];pipeline.videoTimestampRolloverStream.discontinuity();}
904videoTrack.timelineStartInfo.dts=undefined;videoTrack.timelineStartInfo.pts=undefined;clearDtsInfo(videoTrack);pipeline.captionStream.reset();videoTrack.timelineStartInfo.baseMediaDecodeTime=baseMediaDecodeTime;}
905if(pipeline.timedMetadataTimestampRolloverStream){pipeline.timedMetadataTimestampRolloverStream.discontinuity();}};this.setAudioAppendStart=function(timestamp){if(audioTrack){this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);}};this.push=function(data){if(hasFlushed){var isAac=isLikelyAacData(data);if(isAac&&this.transmuxPipeline_.type!=='aac'){this.setupAacPipeline();}else if(!isAac&&this.transmuxPipeline_.type!=='ts'){this.setupTsPipeline();}
906hasFlushed=false;}
907this.transmuxPipeline_.headOfPipeline.push(data);};this.flush=function(){hasFlushed=true;this.transmuxPipeline_.headOfPipeline.flush();};this.resetCaptions=function(){if(this.transmuxPipeline_.captionStream){this.transmuxPipeline_.captionStream.reset();}};};Transmuxer.prototype=new Stream();module.exports={Transmuxer:Transmuxer,VideoSegmentStream:VideoSegmentStream,AudioSegmentStream:AudioSegmentStream,AUDIO_PROPERTIES:AUDIO_PROPERTIES,VIDEO_PROPERTIES:VIDEO_PROPERTIES};},{"../aac":38,"../codecs/adts.js":40,"../codecs/h264":41,"../data/silence":42,"../m2ts/m2ts.js":50,"../utils/clock":60,"../utils/stream.js":62,"./mp4-generator.js":56}],59:[function(require,module,exports){'use strict';var StreamTypes=require('../m2ts/stream-types.js');var handleRollover=require('../m2ts/timestamp-rollover-stream.js').handleRollover;var probe={};probe.ts=require('../m2ts/probe.js');probe.aac=require('../aac/probe.js');var
908PES_TIMESCALE=90000,MP2T_PACKET_LENGTH=188,SYNC_BYTE=0x47;var isLikelyAacData=function(data){if((data[0]==='I'.charCodeAt(0))&&(data[1]==='D'.charCodeAt(0))&&(data[2]==='3'.charCodeAt(0))){return true;}
909return false;};var parsePsi_=function(bytes,pmt){var
910startIndex=0,endIndex=MP2T_PACKET_LENGTH,packet,type;while(endIndex<bytes.byteLength){if(bytes[startIndex]===SYNC_BYTE&&bytes[endIndex]===SYNC_BYTE){packet=bytes.subarray(startIndex,endIndex);type=probe.ts.parseType(packet,pmt.pid);switch(type){case'pat':if(!pmt.pid){pmt.pid=probe.ts.parsePat(packet);}
911break;case'pmt':if(!pmt.table){pmt.table=probe.ts.parsePmt(packet);}
912break;default:break;}
913if(pmt.pid&&pmt.table){return;}
914startIndex+=MP2T_PACKET_LENGTH;endIndex+=MP2T_PACKET_LENGTH;continue;}
915startIndex++;endIndex++;}};var parseAudioPes_=function(bytes,pmt,result){var
916startIndex=0,endIndex=MP2T_PACKET_LENGTH,packet,type,pesType,pusi,parsed;var endLoop=false;while(endIndex<bytes.byteLength){if(bytes[startIndex]===SYNC_BYTE&&bytes[endIndex]===SYNC_BYTE){packet=bytes.subarray(startIndex,endIndex);type=probe.ts.parseType(packet,pmt.pid);switch(type){case'pes':pesType=probe.ts.parsePesType(packet,pmt.table);pusi=probe.ts.parsePayloadUnitStartIndicator(packet);if(pesType==='audio'&&pusi){parsed=probe.ts.parsePesTime(packet);if(parsed){parsed.type='audio';result.audio.push(parsed);endLoop=true;}}
917break;default:break;}
918if(endLoop){break;}
919startIndex+=MP2T_PACKET_LENGTH;endIndex+=MP2T_PACKET_LENGTH;continue;}
920startIndex++;endIndex++;}
921endIndex=bytes.byteLength;startIndex=endIndex-MP2T_PACKET_LENGTH;endLoop=false;while(startIndex>=0){if(bytes[startIndex]===SYNC_BYTE&&bytes[endIndex]===SYNC_BYTE){packet=bytes.subarray(startIndex,endIndex);type=probe.ts.parseType(packet,pmt.pid);switch(type){case'pes':pesType=probe.ts.parsePesType(packet,pmt.table);pusi=probe.ts.parsePayloadUnitStartIndicator(packet);if(pesType==='audio'&&pusi){parsed=probe.ts.parsePesTime(packet);if(parsed){parsed.type='audio';result.audio.push(parsed);endLoop=true;}}
922break;default:break;}
923if(endLoop){break;}
924startIndex-=MP2T_PACKET_LENGTH;endIndex-=MP2T_PACKET_LENGTH;continue;}
925startIndex--;endIndex--;}};var parseVideoPes_=function(bytes,pmt,result){var
926startIndex=0,endIndex=MP2T_PACKET_LENGTH,packet,type,pesType,pusi,parsed,frame,i,pes;var endLoop=false;var currentFrame={data:[],size:0};while(endIndex<bytes.byteLength){if(bytes[startIndex]===SYNC_BYTE&&bytes[endIndex]===SYNC_BYTE){packet=bytes.subarray(startIndex,endIndex);type=probe.ts.parseType(packet,pmt.pid);switch(type){case'pes':pesType=probe.ts.parsePesType(packet,pmt.table);pusi=probe.ts.parsePayloadUnitStartIndicator(packet);if(pesType==='video'){if(pusi&&!endLoop){parsed=probe.ts.parsePesTime(packet);if(parsed){parsed.type='video';result.video.push(parsed);endLoop=true;}}
927if(!result.firstKeyFrame){if(pusi){if(currentFrame.size!==0){frame=new Uint8Array(currentFrame.size);i=0;while(currentFrame.data.length){pes=currentFrame.data.shift();frame.set(pes,i);i+=pes.byteLength;}
928if(probe.ts.videoPacketContainsKeyFrame(frame)){result.firstKeyFrame=probe.ts.parsePesTime(frame);result.firstKeyFrame.type='video';}
929currentFrame.size=0;}}
930currentFrame.data.push(packet);currentFrame.size+=packet.byteLength;}}
931break;default:break;}
932if(endLoop&&result.firstKeyFrame){break;}
933startIndex+=MP2T_PACKET_LENGTH;endIndex+=MP2T_PACKET_LENGTH;continue;}
934startIndex++;endIndex++;}
935endIndex=bytes.byteLength;startIndex=endIndex-MP2T_PACKET_LENGTH;endLoop=false;while(startIndex>=0){if(bytes[startIndex]===SYNC_BYTE&&bytes[endIndex]===SYNC_BYTE){packet=bytes.subarray(startIndex,endIndex);type=probe.ts.parseType(packet,pmt.pid);switch(type){case'pes':pesType=probe.ts.parsePesType(packet,pmt.table);pusi=probe.ts.parsePayloadUnitStartIndicator(packet);if(pesType==='video'&&pusi){parsed=probe.ts.parsePesTime(packet);if(parsed){parsed.type='video';result.video.push(parsed);endLoop=true;}}
936break;default:break;}
937if(endLoop){break;}
938startIndex-=MP2T_PACKET_LENGTH;endIndex-=MP2T_PACKET_LENGTH;continue;}
939startIndex--;endIndex--;}};var adjustTimestamp_=function(segmentInfo,baseTimestamp){if(segmentInfo.audio&&segmentInfo.audio.length){var audioBaseTimestamp=baseTimestamp;if(typeof audioBaseTimestamp==='undefined'){audioBaseTimestamp=segmentInfo.audio[0].dts;}
940segmentInfo.audio.forEach(function(info){info.dts=handleRollover(info.dts,audioBaseTimestamp);info.pts=handleRollover(info.pts,audioBaseTimestamp);info.dtsTime=info.dts/PES_TIMESCALE;info.ptsTime=info.pts/PES_TIMESCALE;});}
941if(segmentInfo.video&&segmentInfo.video.length){var videoBaseTimestamp=baseTimestamp;if(typeof videoBaseTimestamp==='undefined'){videoBaseTimestamp=segmentInfo.video[0].dts;}
942segmentInfo.video.forEach(function(info){info.dts=handleRollover(info.dts,videoBaseTimestamp);info.pts=handleRollover(info.pts,videoBaseTimestamp);info.dtsTime=info.dts/PES_TIMESCALE;info.ptsTime=info.pts/PES_TIMESCALE;});if(segmentInfo.firstKeyFrame){var frame=segmentInfo.firstKeyFrame;frame.dts=handleRollover(frame.dts,videoBaseTimestamp);frame.pts=handleRollover(frame.pts,videoBaseTimestamp);frame.dtsTime=frame.dts/PES_TIMESCALE;frame.ptsTime=frame.dts/PES_TIMESCALE;}}};var inspectAac_=function(bytes){var
943endLoop=false,audioCount=0,sampleRate=null,timestamp=null,frameSize=0,byteIndex=0,packet;while(bytes.length-byteIndex>=3){var type=probe.aac.parseType(bytes,byteIndex);switch(type){case'timed-metadata':if(bytes.length-byteIndex<10){endLoop=true;break;}
944frameSize=probe.aac.parseId3TagSize(bytes,byteIndex);if(frameSize>bytes.length){endLoop=true;break;}
945if(timestamp===null){packet=bytes.subarray(byteIndex,byteIndex+frameSize);timestamp=probe.aac.parseAacTimestamp(packet);}
946byteIndex+=frameSize;break;case'audio':if(bytes.length-byteIndex<7){endLoop=true;break;}
947frameSize=probe.aac.parseAdtsSize(bytes,byteIndex);if(frameSize>bytes.length){endLoop=true;break;}
948if(sampleRate===null){packet=bytes.subarray(byteIndex,byteIndex+frameSize);sampleRate=probe.aac.parseSampleRate(packet);}
949audioCount++;byteIndex+=frameSize;break;default:byteIndex++;break;}
950if(endLoop){return null;}}
951if(sampleRate===null||timestamp===null){return null;}
952var audioTimescale=PES_TIMESCALE/sampleRate;var result={audio:[{type:'audio',dts:timestamp,pts:timestamp},{type:'audio',dts:timestamp+(audioCount*1024*audioTimescale),pts:timestamp+(audioCount*1024*audioTimescale)}]};return result;};var inspectTs_=function(bytes){var pmt={pid:null,table:null};var result={};parsePsi_(bytes,pmt);for(var pid in pmt.table){if(pmt.table.hasOwnProperty(pid)){var type=pmt.table[pid];switch(type){case StreamTypes.H264_STREAM_TYPE:result.video=[];parseVideoPes_(bytes,pmt,result);if(result.video.length===0){delete result.video;}
953break;case StreamTypes.ADTS_STREAM_TYPE:result.audio=[];parseAudioPes_(bytes,pmt,result);if(result.audio.length===0){delete result.audio;}
954break;default:break;}}}
955return result;};var inspect=function(bytes,baseTimestamp){var isAacData=isLikelyAacData(bytes);var result;if(isAacData){result=inspectAac_(bytes);}else{result=inspectTs_(bytes);}
956if(!result||(!result.audio&&!result.video)){return null;}
957adjustTimestamp_(result,baseTimestamp);return result;};module.exports={inspect:inspect};},{"../aac/probe.js":39,"../m2ts/probe.js":52,"../m2ts/stream-types.js":53,"../m2ts/timestamp-rollover-stream.js":54}],60:[function(require,module,exports){var
958ONE_SECOND_IN_TS=90000,secondsToVideoTs,secondsToAudioTs,videoTsToSeconds,audioTsToSeconds,audioTsToVideoTs,videoTsToAudioTs;secondsToVideoTs=function(seconds){return seconds*ONE_SECOND_IN_TS;};secondsToAudioTs=function(seconds,sampleRate){return seconds*sampleRate;};videoTsToSeconds=function(timestamp){return timestamp/ONE_SECOND_IN_TS;};audioTsToSeconds=function(timestamp,sampleRate){return timestamp/sampleRate;};audioTsToVideoTs=function(timestamp,sampleRate){return secondsToVideoTs(audioTsToSeconds(timestamp,sampleRate));};videoTsToAudioTs=function(timestamp,sampleRate){return secondsToAudioTs(videoTsToSeconds(timestamp),sampleRate);};module.exports={secondsToVideoTs:secondsToVideoTs,secondsToAudioTs:secondsToAudioTs,videoTsToSeconds:videoTsToSeconds,audioTsToSeconds:audioTsToSeconds,audioTsToVideoTs:audioTsToVideoTs,videoTsToAudioTs:videoTsToAudioTs};},{}],61:[function(require,module,exports){'use strict';var ExpGolomb;ExpGolomb=function(workingData){var
959workingBytesAvailable=workingData.byteLength,workingWord=0,workingBitsAvailable=0;this.length=function(){return(8*workingBytesAvailable);};this.bitsAvailable=function(){return(8*workingBytesAvailable)+workingBitsAvailable;};this.loadWord=function(){var
960position=workingData.byteLength-workingBytesAvailable,workingBytes=new Uint8Array(4),availableBytes=Math.min(4,workingBytesAvailable);if(availableBytes===0){throw new Error('no bytes available');}
961workingBytes.set(workingData.subarray(position,position+availableBytes));workingWord=new DataView(workingBytes.buffer).getUint32(0);workingBitsAvailable=availableBytes*8;workingBytesAvailable-=availableBytes;};this.skipBits=function(count){var skipBytes;if(workingBitsAvailable>count){workingWord<<=count;workingBitsAvailable-=count;}else{count-=workingBitsAvailable;skipBytes=Math.floor(count/8);count-=(skipBytes*8);workingBytesAvailable-=skipBytes;this.loadWord();workingWord<<=count;workingBitsAvailable-=count;}};this.readBits=function(size){var
962bits=Math.min(workingBitsAvailable,size),valu=workingWord>>>(32-bits);workingBitsAvailable-=bits;if(workingBitsAvailable>0){workingWord<<=bits;}else if(workingBytesAvailable>0){this.loadWord();}
963bits=size-bits;if(bits>0){return valu<<bits|this.readBits(bits);}
964return valu;};this.skipLeadingZeros=function(){var leadingZeroCount;for(leadingZeroCount=0;leadingZeroCount<workingBitsAvailable;++leadingZeroCount){if((workingWord&(0x80000000>>>leadingZeroCount))!==0){workingWord<<=leadingZeroCount;workingBitsAvailable-=leadingZeroCount;return leadingZeroCount;}}
965this.loadWord();return leadingZeroCount+this.skipLeadingZeros();};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros());};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros());};this.readUnsignedExpGolomb=function(){var clz=this.skipLeadingZeros();return this.readBits(clz+1)-1;};this.readExpGolomb=function(){var valu=this.readUnsignedExpGolomb();if(0x01&valu){return(1+valu)>>>1;}
966return-1*(valu>>>1);};this.readBoolean=function(){return this.readBits(1)===1;};this.readUnsignedByte=function(){return this.readBits(8);};this.loadWord();};module.exports=ExpGolomb;},{}],62:[function(require,module,exports){'use strict';var Stream=function(){this.init=function(){var listeners={};this.on=function(type,listener){if(!listeners[type]){listeners[type]=[];}
967listeners[type]=listeners[type].concat(listener);};this.off=function(type,listener){var index;if(!listeners[type]){return false;}
968index=listeners[type].indexOf(listener);listeners[type]=listeners[type].slice();listeners[type].splice(index,1);return index>-1;};this.trigger=function(type){var callbacks,i,length,args;callbacks=listeners[type];if(!callbacks){return;}
969if(arguments.length===2){length=callbacks.length;for(i=0;i<length;++i){callbacks[i].call(this,arguments[1]);}}else{args=[];i=arguments.length;for(i=1;i<arguments.length;++i){args.push(arguments[i]);}
970length=callbacks.length;for(i=0;i<length;++i){callbacks[i].apply(this,args);}}};this.dispose=function(){listeners={};};};};Stream.prototype.pipe=function(destination){this.on('data',function(data){destination.push(data);});this.on('done',function(flushSource){destination.flush(flushSource);});return destination;};Stream.prototype.push=function(data){this.trigger('data',data);};Stream.prototype.flush=function(flushSource){this.trigger('done',flushSource);};module.exports=Stream;},{}],63:[function(require,module,exports){(function(root){var URLToolkit={buildAbsoluteURL:function(baseURL,relativeURL){relativeURL=relativeURL.trim();if(/^[a-z]+:/i.test(relativeURL)){return relativeURL;}
971var relativeURLQuery=null;var relativeURLHash=null;var relativeURLHashSplit=/^([^#]*)(.*)$/.exec(relativeURL);if(relativeURLHashSplit){relativeURLHash=relativeURLHashSplit[2];relativeURL=relativeURLHashSplit[1];}
972var relativeURLQuerySplit=/^([^\?]*)(.*)$/.exec(relativeURL);if(relativeURLQuerySplit){relativeURLQuery=relativeURLQuerySplit[2];relativeURL=relativeURLQuerySplit[1];}
973var baseURLHashSplit=/^([^#]*)(.*)$/.exec(baseURL);if(baseURLHashSplit){baseURL=baseURLHashSplit[1];}
974var baseURLQuerySplit=/^([^\?]*)(.*)$/.exec(baseURL);if(baseURLQuerySplit){baseURL=baseURLQuerySplit[1];}
975var baseURLDomainSplit=/^(([a-z]+:)?\/\/[^:\/]+(:[0-9]+)?)?(\/?.*)$/i.exec(baseURL);if(!baseURLDomainSplit){throw new Error('Error trying to parse base URL.');}
976var baseURLProtocol=baseURLDomainSplit[2]||'';var baseURLProtocolDomain=baseURLDomainSplit[1]||'';var baseURLPath=baseURLDomainSplit[4];if(baseURLPath.indexOf('/')!==0&&baseURLProtocolDomain!==''){baseURLPath='/'+baseURLPath;}
977var builtURL=null;if(/^\/\//.test(relativeURL)){builtURL=baseURLProtocol+'//'+URLToolkit.buildAbsolutePath('',relativeURL.substring(2));}
978else if(/^\//.test(relativeURL)){builtURL=baseURLProtocolDomain+'/'+URLToolkit.buildAbsolutePath('',relativeURL.substring(1));}
979else{builtURL=URLToolkit.buildAbsolutePath(baseURLProtocolDomain+baseURLPath,relativeURL);}
980if(relativeURLQuery){builtURL+=relativeURLQuery;}
981if(relativeURLHash){builtURL+=relativeURLHash;}
982return builtURL;},buildAbsolutePath:function(basePath,relativePath){var sRelPath=relativePath;var nUpLn,sDir='',sPath=basePath.replace(/[^\/]*$/,sRelPath.replace(/(\/|^)(?:\.?\/+)+/g,'$1'));for(var nEnd,nStart=0;nEnd=sPath.indexOf('/../',nStart),nEnd>-1;nStart=nEnd+nUpLn){nUpLn=/^\/(?:\.\.\/)*/.exec(sPath.slice(nEnd))[0].length;sDir=(sDir+sPath.substring(nStart,nEnd)).replace(new RegExp('(?:\\\/+[^\\\/]*){0,'+((nUpLn-1)/3)+'}$'),'/');}
983return sDir+sPath.substr(nStart);}};if(typeof exports==='object'&&typeof module==='object')
984module.exports=URLToolkit;else if(typeof define==='function'&&define.amd)
985define([],function(){return URLToolkit;});else if(typeof exports==='object')
986exports["URLToolkit"]=URLToolkit;else
987root["URLToolkit"]=URLToolkit;})(this);},{}],64:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
988var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var deprecateOldCue=function deprecateOldCue(cue){Object.defineProperties(cue.frame,{id:{get:function get(){_videoJs2['default'].log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');return cue.value.key;}},value:{get:function get(){_videoJs2['default'].log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');return cue.value.data;}},privateData:{get:function get(){_videoJs2['default'].log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');return cue.value.data;}}});};var durationOfVideo=function durationOfVideo(duration){var dur=undefined;if(isNaN(duration)||Math.abs(duration)===Infinity){dur=Number.MAX_VALUE;}else{dur=duration;}
989return dur;};var addTextTrackData=function addTextTrackData(sourceHandler,captionArray,metadataArray){var Cue=_globalWindow2['default'].WebKitDataCue||_globalWindow2['default'].VTTCue;if(captionArray){captionArray.forEach(function(caption){var track=caption.stream;this.inbandTextTracks_[track].addCue(new Cue(caption.startTime+this.timestampOffset,caption.endTime+this.timestampOffset,caption.text));},sourceHandler);}
990if(metadataArray){(function(){var videoDuration=durationOfVideo(sourceHandler.mediaSource_.duration);metadataArray.forEach(function(metadata){var time=metadata.cueTime+this.timestampOffset;metadata.frames.forEach(function(frame){var cue=new Cue(time,time,frame.value||frame.url||frame.data||'');cue.frame=frame;cue.value=frame;deprecateOldCue(cue);this.metadataTrack_.addCue(cue);},this);},sourceHandler);if(sourceHandler.metadataTrack_&&sourceHandler.metadataTrack_.cues&&sourceHandler.metadataTrack_.cues.length){(function(){var cues=sourceHandler.metadataTrack_.cues;var cuesArray=[];for(var i=0;i<cues.length;i++){if(cues[i]){cuesArray.push(cues[i]);}}
991var cuesGroupedByStartTime=cuesArray.reduce(function(obj,cue){var timeSlot=obj[cue.startTime]||[];timeSlot.push(cue);obj[cue.startTime]=timeSlot;return obj;},{});var sortedStartTimes=Object.keys(cuesGroupedByStartTime).sort(function(a,b){return Number(a)-Number(b);});sortedStartTimes.forEach(function(startTime,idx){var cueGroup=cuesGroupedByStartTime[startTime];var nextTime=Number(sortedStartTimes[idx+1])||videoDuration;cueGroup.forEach(function(cue){cue.endTime=nextTime;});});})();}})();}};exports['default']={addTextTrackData:addTextTrackData,durationOfVideo:durationOfVideo};module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"global/window":32}],65:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var isAudioCodec=function isAudioCodec(codec){return(/mp4a\.\d+.\d+/i.test(codec));};var isVideoCodec=function isVideoCodec(codec){return(/avc1\.[\da-f]+/i.test(codec));};var parseContentType=function parseContentType(type){var object={type:'',parameters:{}};var parameters=type.trim().split(';');object.type=parameters.shift().trim();parameters.forEach(function(parameter){var pair=parameter.trim().split('=');if(pair.length>1){var _name=pair[0].replace(/"/g,'').trim();var value=pair[1].replace(/"/g,'').trim();object.parameters[_name]=value;}});return object;};var translateLegacyCodecs=function translateLegacyCodecs(codecs){return codecs.map(function(codec){return codec.replace(/avc1\.(\d+)\.(\d+)/i,function(orig,profile,avcLevel){var profileHex=('00'+Number(profile).toString(16)).slice(-2);var avcLevelHex=('00'+Number(avcLevel).toString(16)).slice(-2);return'avc1.'+profileHex+'00'+avcLevelHex;});});};exports['default']={isAudioCodec:isAudioCodec,parseContentType:parseContentType,isVideoCodec:isVideoCodec,translateLegacyCodecs:translateLegacyCodecs};module.exports=exports['default'];},{}],66:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var createTextTracksIfNecessary=function createTextTracksIfNecessary(sourceBuffer,mediaSource,segment){var player=mediaSource.player_;if(segment.captions&&segment.captions.length){if(!sourceBuffer.inbandTextTracks_){sourceBuffer.inbandTextTracks_={};}
992for(var trackId in segment.captionStreams){if(!sourceBuffer.inbandTextTracks_[trackId]){player.tech_.trigger({type:'usage',name:'hls-608'});var track=player.textTracks().getTrackById(trackId);if(track){sourceBuffer.inbandTextTracks_[trackId]=track;}else{sourceBuffer.inbandTextTracks_[trackId]=player.addRemoteTextTrack({kind:'captions',id:trackId,label:trackId},false).track;}}}}
993if(segment.metadata&&segment.metadata.length&&!sourceBuffer.metadataTrack_){sourceBuffer.metadataTrack_=player.addRemoteTextTrack({kind:'metadata',label:'Timed Metadata'},false).track;sourceBuffer.metadataTrack_.inBandMetadataTrackDispatchType=segment.metadata.dispatchType;}};exports['default']=createTextTracksIfNecessary;module.exports=exports['default'];},{}],67:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var flashConstants={TIME_BETWEEN_CHUNKS:1,BYTES_PER_CHUNK:1024*32};exports["default"]=flashConstants;module.exports=exports["default"];},{}],68:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x,_x2,_x3){var _again=true;_function:while(_again){var object=_x,property=_x2,receiver=_x3;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x=parent;_x2=property;_x3=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
994function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
995function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
996var _globalDocument=require('global/document');var _globalDocument2=_interopRequireDefault(_globalDocument);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _flashSourceBuffer=require('./flash-source-buffer');var _flashSourceBuffer2=_interopRequireDefault(_flashSourceBuffer);var _flashConstants=require('./flash-constants');var _flashConstants2=_interopRequireDefault(_flashConstants);var _codecUtils=require('./codec-utils');var FlashMediaSource=(function(_videojs$EventTarget){_inherits(FlashMediaSource,_videojs$EventTarget);function FlashMediaSource(){var _this=this;_classCallCheck(this,FlashMediaSource);_get(Object.getPrototypeOf(FlashMediaSource.prototype),'constructor',this).call(this);this.sourceBuffers=[];this.readyState='closed';this.on(['sourceopen','webkitsourceopen'],function(event){_this.swfObj=_globalDocument2['default'].getElementById(event.swfId);_this.player_=(0,_videoJs2['default'])(_this.swfObj.parentNode);_this.tech_=_this.swfObj.tech;_this.readyState='open';_this.tech_.on('seeking',function(){var i=_this.sourceBuffers.length;while(i--){_this.sourceBuffers[i].abort();}});if(_this.swfObj){_this.swfObj.vjs_load();}});}
997_createClass(FlashMediaSource,[{key:'addSeekableRange_',value:function addSeekableRange_(){}},{key:'addSourceBuffer',value:function addSourceBuffer(type){var parsedType=(0,_codecUtils.parseContentType)(type);var sourceBuffer=undefined;if(parsedType.type==='video/mp2t'||parsedType.type==='audio/mp2t'){sourceBuffer=new _flashSourceBuffer2['default'](this);}else{throw new Error('NotSupportedError (Video.js)');}
998this.sourceBuffers.push(sourceBuffer);return sourceBuffer;}},{key:'endOfStream',value:function endOfStream(error){if(error==='network'){this.tech_.error(2);}else if(error==='decode'){this.tech_.error(3);}
999if(this.readyState!=='ended'){this.readyState='ended';this.swfObj.vjs_endOfStream();}}}]);return FlashMediaSource;})(_videoJs2['default'].EventTarget);exports['default']=FlashMediaSource;try{Object.defineProperty(FlashMediaSource.prototype,'duration',{get:function get(){if(!this.swfObj){return NaN;}
1000return this.swfObj.vjs_getProperty('duration');},set:function set(value){var i=undefined;var oldDuration=this.swfObj.vjs_getProperty('duration');this.swfObj.vjs_setProperty('duration',value);if(value<oldDuration){for(i=0;i<this.sourceBuffers.length;i++){this.sourceBuffers[i].remove(value,oldDuration);}}
1001return value;}});}catch(e){FlashMediaSource.prototype.duration=NaN;}
1002for(var property in _flashConstants2['default']){FlashMediaSource[property]=_flashConstants2['default'][property];}
1003module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./codec-utils":65,"./flash-constants":67,"./flash-source-buffer":69,"global/document":31}],69:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x,_x2,_x3){var _again=true;_function:while(_again){var object=_x,property=_x2,receiver=_x3;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x=parent;_x2=property;_x3=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
1004function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
1005function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
1006var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _muxJsLibFlv=require('mux.js/lib/flv');var _muxJsLibFlv2=_interopRequireDefault(_muxJsLibFlv);var _removeCuesFromTrack=require('./remove-cues-from-track');var _removeCuesFromTrack2=_interopRequireDefault(_removeCuesFromTrack);var _createTextTracksIfNecessary=require('./create-text-tracks-if-necessary');var _createTextTracksIfNecessary2=_interopRequireDefault(_createTextTracksIfNecessary);var _addTextTrackData=require('./add-text-track-data');var _flashTransmuxerWorker=require('./flash-transmuxer-worker');var _flashTransmuxerWorker2=_interopRequireDefault(_flashTransmuxerWorker);var _webworkify=require('webworkify');var _webworkify2=_interopRequireDefault(_webworkify);var _flashConstants=require('./flash-constants');var _flashConstants2=_interopRequireDefault(_flashConstants);var scheduleTick=function scheduleTick(func){_globalWindow2['default'].setTimeout(func,_flashConstants2['default'].TIME_BETWEEN_CHUNKS);};var generateRandomString=function generateRandomString(){return Math.random().toString(36).slice(2,8);};var toDecimalPlaces=function toDecimalPlaces(num,places){if(typeof places!=='number'||places<0){places=0;}
1007var scale=Math.pow(10,places);return Math.round(num*scale)/scale;};var FlashSourceBuffer=(function(_videojs$EventTarget){_inherits(FlashSourceBuffer,_videojs$EventTarget);function FlashSourceBuffer(mediaSource){var _this=this;_classCallCheck(this,FlashSourceBuffer);_get(Object.getPrototypeOf(FlashSourceBuffer.prototype),'constructor',this).call(this);var encodedHeader=undefined;this.chunkSize_=_flashConstants2['default'].BYTES_PER_CHUNK;this.buffer_=[];this.bufferSize_=0;this.basePtsOffset_=NaN;this.mediaSource_=mediaSource;this.audioBufferEnd_=NaN;this.videoBufferEnd_=NaN;this.updating=false;this.timestampOffset_=0;encodedHeader=_globalWindow2['default'].btoa(String.fromCharCode.apply(null,Array.prototype.slice.call(_muxJsLibFlv2['default'].getFlvHeader())));var safePlayerId=this.mediaSource_.player_.id().replace(/[^a-zA-Z0-9]/g,'_');this.flashEncodedHeaderName_='vjs_flashEncodedHeader_'+safePlayerId+generateRandomString();this.flashEncodedDataName_='vjs_flashEncodedData_'+safePlayerId+generateRandomString();_globalWindow2['default'][this.flashEncodedHeaderName_]=function(){delete _globalWindow2['default'][_this.flashEncodedHeaderName_];return encodedHeader;};this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedHeaderName_);this.transmuxer_=(0,_webworkify2['default'])(_flashTransmuxerWorker2['default']);this.transmuxer_.postMessage({action:'init',options:{}});this.transmuxer_.onmessage=function(event){if(event.data.action==='data'){_this.receiveBuffer_(event.data.segment);}};this.one('updateend',function(){_this.mediaSource_.tech_.trigger('loadedmetadata');});Object.defineProperty(this,'timestampOffset',{get:function get(){return this.timestampOffset_;},set:function set(val){if(typeof val==='number'&&val>=0){this.timestampOffset_=val;this.mediaSource_.swfObj.vjs_discontinuity();this.basePtsOffset_=NaN;this.audioBufferEnd_=NaN;this.videoBufferEnd_=NaN;this.transmuxer_.postMessage({action:'reset'});}}});Object.defineProperty(this,'buffered',{get:function get(){if(!this.mediaSource_||!this.mediaSource_.swfObj||!('vjs_getProperty'in this.mediaSource_.swfObj)){return _videoJs2['default'].createTimeRange();}
1008var buffered=this.mediaSource_.swfObj.vjs_getProperty('buffered');if(buffered&&buffered.length){buffered[0][0]=toDecimalPlaces(buffered[0][0],3);buffered[0][1]=toDecimalPlaces(buffered[0][1],3);}
1009return _videoJs2['default'].createTimeRanges(buffered);}});this.mediaSource_.player_.on('seeked',function(){(0,_removeCuesFromTrack2['default'])(0,Infinity,_this.metadataTrack_);if(_this.inbandTextTracks_){for(var track in _this.inbandTextTracks_){(0,_removeCuesFromTrack2['default'])(0,Infinity,_this.inbandTextTracks_[track]);}}});var onHlsReset=this.onHlsReset_.bind(this);this.mediaSource_.player_.tech_.on('hls-reset',onHlsReset);this.mediaSource_.player_.tech_.hls.on('dispose',function(){_this.transmuxer_.terminate();_this.mediaSource_.player_.tech_.off('hls-reset',onHlsReset);});}
1010_createClass(FlashSourceBuffer,[{key:'appendBuffer',value:function appendBuffer(bytes){var error=undefined;if(this.updating){error=new Error('SourceBuffer.append() cannot be called '+'while an update is in progress');error.name='InvalidStateError';error.code=11;throw error;}
1011this.updating=true;this.mediaSource_.readyState='open';this.trigger({type:'update'});this.transmuxer_.postMessage({action:'push',data:bytes.buffer,byteOffset:bytes.byteOffset,byteLength:bytes.byteLength},[bytes.buffer]);this.transmuxer_.postMessage({action:'flush'});}},{key:'abort',value:function abort(){this.buffer_=[];this.bufferSize_=0;this.mediaSource_.swfObj.vjs_abort();if(this.updating){this.updating=false;this.trigger({type:'updateend'});}}},{key:'remove',value:function remove(start,end){(0,_removeCuesFromTrack2['default'])(start,end,this.metadataTrack_);if(this.inbandTextTracks_){for(var track in this.inbandTextTracks_){(0,_removeCuesFromTrack2['default'])(start,end,this.inbandTextTracks_[track]);}}
1012this.trigger({type:'update'});this.trigger({type:'updateend'});}},{key:'receiveBuffer_',value:function receiveBuffer_(segment){var _this2=this;(0,_createTextTracksIfNecessary2['default'])(this,this.mediaSource_,segment);(0,_addTextTrackData.addTextTrackData)(this,segment.captions,segment.metadata);scheduleTick(function(){var flvBytes=_this2.convertTagsToData_(segment);if(_this2.buffer_.length===0){scheduleTick(_this2.processBuffer_.bind(_this2));}
1013if(flvBytes){_this2.buffer_.push(flvBytes);_this2.bufferSize_+=flvBytes.byteLength;}});}},{key:'processBuffer_',value:function processBuffer_(){var _this3=this;var chunkSize=_flashConstants2['default'].BYTES_PER_CHUNK;if(!this.buffer_.length){if(this.updating!==false){this.updating=false;this.trigger({type:'updateend'});}
1014return;}
1015var chunk=this.buffer_[0].subarray(0,chunkSize);if(chunk.byteLength<chunkSize||this.buffer_[0].byteLength===chunkSize){this.buffer_.shift();}else{this.buffer_[0]=this.buffer_[0].subarray(chunkSize);}
1016this.bufferSize_-=chunk.byteLength;var binary=[];var length=chunk.byteLength;for(var i=0;i<length;i++){binary.push(String.fromCharCode(chunk[i]));}
1017var b64str=_globalWindow2['default'].btoa(binary.join(''));_globalWindow2['default'][this.flashEncodedDataName_]=function(){scheduleTick(_this3.processBuffer_.bind(_this3));delete _globalWindow2['default'][_this3.flashEncodedDataName_];return b64str;};this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedDataName_);}},{key:'convertTagsToData_',value:function convertTagsToData_(segmentData){var segmentByteLength=0;var tech=this.mediaSource_.tech_;var videoTargetPts=0;var segment=undefined;var videoTags=segmentData.tags.videoTags;var audioTags=segmentData.tags.audioTags;if(isNaN(this.basePtsOffset_)&&(videoTags.length||audioTags.length)){var firstVideoTag=videoTags[0]||{pts:Infinity};var firstAudioTag=audioTags[0]||{pts:Infinity};this.basePtsOffset_=Math.min(firstAudioTag.pts,firstVideoTag.pts);}
1018if(tech.seeking()){this.videoBufferEnd_=NaN;this.audioBufferEnd_=NaN;}
1019if(isNaN(this.videoBufferEnd_)){if(tech.buffered().length){videoTargetPts=tech.buffered().end(0)-this.timestampOffset;}
1020if(tech.seeking()){videoTargetPts=Math.max(videoTargetPts,tech.currentTime()-this.timestampOffset);}
1021videoTargetPts*=1e3;videoTargetPts+=this.basePtsOffset_;}else{videoTargetPts=this.videoBufferEnd_+0.1;}
1022var currentIndex=videoTags.length;if(currentIndex&&videoTags[currentIndex-1].pts>=videoTargetPts){while(--currentIndex){var currentTag=videoTags[currentIndex];if(currentTag.pts>videoTargetPts){continue;}
1023if(currentTag.keyFrame||currentTag.metaDataTag){break;}}
1024while(currentIndex){var nextTag=videoTags[currentIndex-1];if(!nextTag.metaDataTag){break;}
1025currentIndex--;}}
1026var filteredVideoTags=videoTags.slice(currentIndex);var audioTargetPts=undefined;if(isNaN(this.audioBufferEnd_)){audioTargetPts=videoTargetPts;}else{audioTargetPts=this.audioBufferEnd_+0.1;}
1027if(filteredVideoTags.length){audioTargetPts=Math.min(audioTargetPts,filteredVideoTags[0].pts);}
1028currentIndex=0;while(currentIndex<audioTags.length){if(audioTags[currentIndex].pts>=audioTargetPts){break;}
1029currentIndex++;}
1030var filteredAudioTags=audioTags.slice(currentIndex);if(filteredAudioTags.length){this.audioBufferEnd_=filteredAudioTags[filteredAudioTags.length-1].pts;}
1031if(filteredVideoTags.length){this.videoBufferEnd_=filteredVideoTags[filteredVideoTags.length-1].pts;}
1032var tags=this.getOrderedTags_(filteredVideoTags,filteredAudioTags);if(tags.length===0){return;}
1033if(tags[0].pts<videoTargetPts&&tech.seeking()){var fudgeFactor=1/30;var currentTime=tech.currentTime();var diff=(videoTargetPts-tags[0].pts)/1e3;var adjustedTime=currentTime-diff;if(adjustedTime<fudgeFactor){adjustedTime=0;}
1034try{this.mediaSource_.swfObj.vjs_adjustCurrentTime(adjustedTime);}catch(e){}}
1035for(var i=0;i<tags.length;i++){segmentByteLength+=tags[i].bytes.byteLength;}
1036segment=new Uint8Array(segmentByteLength);for(var i=0,j=0;i<tags.length;i++){segment.set(tags[i].bytes,j);j+=tags[i].bytes.byteLength;}
1037return segment;}},{key:'getOrderedTags_',value:function getOrderedTags_(videoTags,audioTags){var tag=undefined;var tags=[];while(videoTags.length||audioTags.length){if(!videoTags.length){tag=audioTags.shift();}else if(!audioTags.length){tag=videoTags.shift();}else if(audioTags[0].dts<videoTags[0].dts){tag=audioTags.shift();}else{tag=videoTags.shift();}
1038tags.push(tag);}
1039return tags;}},{key:'onHlsReset_',value:function onHlsReset_(){this.transmuxer_.postMessage({action:'resetCaptions'});}}]);return FlashSourceBuffer;})(_videoJs2['default'].EventTarget);exports['default']=FlashSourceBuffer;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./add-text-track-data":64,"./create-text-tracks-if-necessary":66,"./flash-constants":67,"./flash-transmuxer-worker":70,"./remove-cues-from-track":72,"global/window":32,"mux.js/lib/flv":46,"webworkify":76}],70:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
1040function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
1041var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _muxJsLibFlv=require('mux.js/lib/flv');var _muxJsLibFlv2=_interopRequireDefault(_muxJsLibFlv);var wireTransmuxerEvents=function wireTransmuxerEvents(transmuxer){transmuxer.on('data',function(segment){_globalWindow2['default'].postMessage({action:'data',segment:segment});});transmuxer.on('done',function(data){_globalWindow2['default'].postMessage({action:'done'});});};var MessageHandlers=(function(){function MessageHandlers(options){_classCallCheck(this,MessageHandlers);this.options=options||{};this.init();}
1042_createClass(MessageHandlers,[{key:'init',value:function init(){if(this.transmuxer){this.transmuxer.dispose();}
1043this.transmuxer=new _muxJsLibFlv2['default'].Transmuxer(this.options);wireTransmuxerEvents(this.transmuxer);}},{key:'push',value:function push(data){var segment=new Uint8Array(data.data,data.byteOffset,data.byteLength);this.transmuxer.push(segment);}},{key:'reset',value:function reset(){this.init();}},{key:'flush',value:function flush(){this.transmuxer.flush();}},{key:'resetCaptions',value:function resetCaptions(){this.transmuxer.resetCaptions();}}]);return MessageHandlers;})();var FlashTransmuxerWorker=function FlashTransmuxerWorker(self){self.onmessage=function(event){if(event.data.action==='init'&&event.data.options){this.messageHandlers=new MessageHandlers(event.data.options);return;}
1044if(!this.messageHandlers){this.messageHandlers=new MessageHandlers();}
1045if(event.data&&event.data.action&&event.data.action!=='init'){if(this.messageHandlers[event.data.action]){this.messageHandlers[event.data.action](event.data);}}};};exports['default']=function(self){return new FlashTransmuxerWorker(self);};module.exports=exports['default'];},{"global/window":32,"mux.js/lib/flv":46}],71:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x,_x2,_x3){var _again=true;_function:while(_again){var object=_x,property=_x2,receiver=_x3;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x=parent;_x2=property;_x3=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
1046function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
1047function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
1048var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _globalDocument=require('global/document');var _globalDocument2=_interopRequireDefault(_globalDocument);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _virtualSourceBuffer=require('./virtual-source-buffer');var _virtualSourceBuffer2=_interopRequireDefault(_virtualSourceBuffer);var _addTextTrackData=require('./add-text-track-data');var _codecUtils=require('./codec-utils');var HtmlMediaSource=(function(_videojs$EventTarget){_inherits(HtmlMediaSource,_videojs$EventTarget);function HtmlMediaSource(){var _this=this;_classCallCheck(this,HtmlMediaSource);_get(Object.getPrototypeOf(HtmlMediaSource.prototype),'constructor',this).call(this);var property=undefined;this.nativeMediaSource_=new _globalWindow2['default'].MediaSource();for(property in this.nativeMediaSource_){if(!(property in HtmlMediaSource.prototype)&&typeof this.nativeMediaSource_[property]==='function'){this[property]=this.nativeMediaSource_[property].bind(this.nativeMediaSource_);}}
1049this.duration_=NaN;Object.defineProperty(this,'duration',{get:function get(){if(this.duration_===Infinity){return this.duration_;}
1050return this.nativeMediaSource_.duration;},set:function set(duration){this.duration_=duration;if(duration!==Infinity){this.nativeMediaSource_.duration=duration;return;}}});Object.defineProperty(this,'seekable',{get:function get(){if(this.duration_===Infinity){return _videoJs2['default'].createTimeRanges([[0,this.nativeMediaSource_.duration]]);}
1051return this.nativeMediaSource_.seekable;}});Object.defineProperty(this,'readyState',{get:function get(){return this.nativeMediaSource_.readyState;}});Object.defineProperty(this,'activeSourceBuffers',{get:function get(){return this.activeSourceBuffers_;}});this.sourceBuffers=[];this.activeSourceBuffers_=[];this.updateActiveSourceBuffers_=function(){_this.activeSourceBuffers_.length=0;if(_this.sourceBuffers.length===1){var sourceBuffer=_this.sourceBuffers[0];sourceBuffer.appendAudioInitSegment_=true;sourceBuffer.audioDisabled_=!sourceBuffer.audioCodec_;_this.activeSourceBuffers_.push(sourceBuffer);return;}
1052var disableCombined=false;var disableAudioOnly=true;for(var i=0;i<_this.player_.audioTracks().length;i++){var track=_this.player_.audioTracks()[i];if(track.enabled&&track.kind!=='main'){disableCombined=true;disableAudioOnly=false;break;}}
1053_this.sourceBuffers.forEach(function(sourceBuffer){sourceBuffer.appendAudioInitSegment_=true;if(sourceBuffer.videoCodec_&&sourceBuffer.audioCodec_){sourceBuffer.audioDisabled_=disableCombined;}else if(sourceBuffer.videoCodec_&&!sourceBuffer.audioCodec_){sourceBuffer.audioDisabled_=true;disableAudioOnly=false;}else if(!sourceBuffer.videoCodec_&&sourceBuffer.audioCodec_){sourceBuffer.audioDisabled_=disableAudioOnly;if(disableAudioOnly){return;}}
1054_this.activeSourceBuffers_.push(sourceBuffer);});};this.onPlayerMediachange_=function(){_this.sourceBuffers.forEach(function(sourceBuffer){sourceBuffer.appendAudioInitSegment_=true;});};this.onHlsReset_=function(){_this.sourceBuffers.forEach(function(sourceBuffer){if(sourceBuffer.transmuxer_){sourceBuffer.transmuxer_.postMessage({action:'resetCaptions'});}});};['sourceopen','sourceclose','sourceended'].forEach(function(eventName){this.nativeMediaSource_.addEventListener(eventName,this.trigger.bind(this));},this);this.on('sourceopen',function(event){var video=_globalDocument2['default'].querySelector('[src="'+_this.url_+'"]');if(!video){return;}
1055_this.player_=(0,_videoJs2['default'])(video.parentNode);_this.player_.tech_.on('hls-reset',_this.onHlsReset_);if(_this.player_.audioTracks&&_this.player_.audioTracks()){_this.player_.audioTracks().on('change',_this.updateActiveSourceBuffers_);_this.player_.audioTracks().on('addtrack',_this.updateActiveSourceBuffers_);_this.player_.audioTracks().on('removetrack',_this.updateActiveSourceBuffers_);}
1056_this.player_.on('mediachange',_this.onPlayerMediachange_);});this.on('sourceended',function(event){var duration=(0,_addTextTrackData.durationOfVideo)(_this.duration);for(var i=0;i<_this.sourceBuffers.length;i++){var sourcebuffer=_this.sourceBuffers[i];var cues=sourcebuffer.metadataTrack_&&sourcebuffer.metadataTrack_.cues;if(cues&&cues.length){cues[cues.length-1].endTime=duration;}}});this.on('sourceclose',function(event){this.sourceBuffers.forEach(function(sourceBuffer){if(sourceBuffer.transmuxer_){sourceBuffer.transmuxer_.terminate();}});this.sourceBuffers.length=0;if(!this.player_){return;}
1057if(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_);}
1058if(this.player_.el_){this.player_.off('mediachange',this.onPlayerMediachange_);this.player_.tech_.off('hls-reset',this.onHlsReset_);}});}
1059_createClass(HtmlMediaSource,[{key:'addSeekableRange_',value:function addSeekableRange_(start,end){var error=undefined;if(this.duration!==Infinity){error=new Error('MediaSource.addSeekableRange() can only be invoked '+'when the duration is Infinity');error.name='InvalidStateError';error.code=11;throw error;}
1060if(end>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration)){this.nativeMediaSource_.duration=end;}}},{key:'addSourceBuffer',value:function addSourceBuffer(type){var buffer=undefined;var parsedType=(0,_codecUtils.parseContentType)(type);if(/^(video|audio)\/mp2t$/i.test(parsedType.type)){var codecs=[];if(parsedType.parameters&&parsedType.parameters.codecs){codecs=parsedType.parameters.codecs.split(',');codecs=(0,_codecUtils.translateLegacyCodecs)(codecs);codecs=codecs.filter(function(codec){return(0,_codecUtils.isAudioCodec)(codec)||(0,_codecUtils.isVideoCodec)(codec);});}
1061if(codecs.length===0){codecs=['avc1.4d400d','mp4a.40.2'];}
1062buffer=new _virtualSourceBuffer2['default'](this,codecs);if(this.sourceBuffers.length!==0){this.sourceBuffers[0].createRealSourceBuffers_();buffer.createRealSourceBuffers_();this.sourceBuffers[0].audioDisabled_=true;}}else{buffer=this.nativeMediaSource_.addSourceBuffer(type);}
1063this.sourceBuffers.push(buffer);return buffer;}}]);return HtmlMediaSource;})(_videoJs2['default'].EventTarget);exports['default']=HtmlMediaSource;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./add-text-track-data":64,"./codec-utils":65,"./virtual-source-buffer":75,"global/document":31,"global/window":32}],72:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var removeCuesFromTrack=function removeCuesFromTrack(start,end,track){var i=undefined;var cue=undefined;if(!track){return;}
1064if(!track.cues){return;}
1065i=track.cues.length;while(i--){cue=track.cues[i];if(cue.startTime<=end&&cue.endTime>=start){track.removeCue(cue);}}};exports["default"]=removeCuesFromTrack;module.exports=exports["default"];},{}],73:[function(require,module,exports){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
1066function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
1067var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _muxJsLibMp4=require('mux.js/lib/mp4');var _muxJsLibMp42=_interopRequireDefault(_muxJsLibMp4);var wireTransmuxerEvents=function wireTransmuxerEvents(transmuxer){transmuxer.on('data',function(segment){var initArray=segment.initSegment;segment.initSegment={data:initArray.buffer,byteOffset:initArray.byteOffset,byteLength:initArray.byteLength};var typedArray=segment.data;segment.data=typedArray.buffer;_globalWindow2['default'].postMessage({action:'data',segment:segment,byteOffset:typedArray.byteOffset,byteLength:typedArray.byteLength},[segment.data]);});if(transmuxer.captionStream){transmuxer.captionStream.on('data',function(caption){_globalWindow2['default'].postMessage({action:'caption',data:caption});});}
1068transmuxer.on('done',function(data){_globalWindow2['default'].postMessage({action:'done'});});};var MessageHandlers=(function(){function MessageHandlers(options){_classCallCheck(this,MessageHandlers);this.options=options||{};this.init();}
1069_createClass(MessageHandlers,[{key:'init',value:function init(){if(this.transmuxer){this.transmuxer.dispose();}
1070this.transmuxer=new _muxJsLibMp42['default'].Transmuxer(this.options);wireTransmuxerEvents(this.transmuxer);}},{key:'push',value:function push(data){var segment=new Uint8Array(data.data,data.byteOffset,data.byteLength);this.transmuxer.push(segment);}},{key:'reset',value:function reset(){this.init();}},{key:'setTimestampOffset',value:function setTimestampOffset(data){var timestampOffset=data.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(timestampOffset*90000));}},{key:'setAudioAppendStart',value:function setAudioAppendStart(data){this.transmuxer.setAudioAppendStart(Math.ceil(data.appendStart*90000));}},{key:'flush',value:function flush(data){this.transmuxer.flush();}},{key:'resetCaptions',value:function resetCaptions(){this.transmuxer.resetCaptions();}}]);return MessageHandlers;})();var TransmuxerWorker=function TransmuxerWorker(self){self.onmessage=function(event){if(event.data.action==='init'&&event.data.options){this.messageHandlers=new MessageHandlers(event.data.options);return;}
1071if(!this.messageHandlers){this.messageHandlers=new MessageHandlers();}
1072if(event.data&&event.data.action&&event.data.action!=='init'){if(this.messageHandlers[event.data.action]){this.messageHandlers[event.data.action](event.data);}}};};exports['default']=function(self){return new TransmuxerWorker(self);};module.exports=exports['default'];},{"global/window":32,"mux.js/lib/mp4":55}],74:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
1073var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _flashMediaSource=require('./flash-media-source');var _flashMediaSource2=_interopRequireDefault(_flashMediaSource);var _htmlMediaSource=require('./html-media-source');var _htmlMediaSource2=_interopRequireDefault(_htmlMediaSource);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var urlCount=0;var defaults={mode:'auto'};_videoJs2['default'].mediaSources={};var open=function open(msObjectURL,swfId){var mediaSource=_videoJs2['default'].mediaSources[msObjectURL];if(mediaSource){mediaSource.trigger({type:'sourceopen',swfId:swfId});}else{throw new Error('Media Source not found (Video.js)');}};var supportsNativeMediaSources=function supportsNativeMediaSources(){return!!_globalWindow2['default'].MediaSource&&!!_globalWindow2['default'].MediaSource.isTypeSupported&&_globalWindow2['default'].MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"');};var MediaSource=function MediaSource(options){var settings=_videoJs2['default'].mergeOptions(defaults,options);this.MediaSource={open:open,supportsNativeMediaSources:supportsNativeMediaSources};if(settings.mode==='html5'||settings.mode==='auto'&&supportsNativeMediaSources()){return new _htmlMediaSource2['default']();}else if(_videoJs2['default'].getTech('Flash')){return new _flashMediaSource2['default']();}
1074throw new Error('Cannot use Flash or Html5 to create a MediaSource for this video');};exports.MediaSource=MediaSource;MediaSource.open=open;MediaSource.supportsNativeMediaSources=supportsNativeMediaSources;var URL={createObjectURL:function createObjectURL(object){var objectUrlPrefix='blob:vjs-media-source/';var url=undefined;if(object instanceof _htmlMediaSource2['default']){url=_globalWindow2['default'].URL.createObjectURL(object.nativeMediaSource_);object.url_=url;return url;}
1075if(!(object instanceof _flashMediaSource2['default'])){url=_globalWindow2['default'].URL.createObjectURL(object);object.url_=url;return url;}
1076url=objectUrlPrefix+urlCount;urlCount++;_videoJs2['default'].mediaSources[url]=object;return url;}};exports.URL=URL;_videoJs2['default'].MediaSource=MediaSource;_videoJs2['default'].URL=URL;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./flash-media-source":68,"./html-media-source":71,"global/window":32}],75:[function(require,module,exports){(function(global){'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x,_x2,_x3){var _again=true;_function:while(_again){var object=_x,property=_x2,receiver=_x3;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x=parent;_x2=property;_x3=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
1077function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
1078function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
1079var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _createTextTracksIfNecessary=require('./create-text-tracks-if-necessary');var _createTextTracksIfNecessary2=_interopRequireDefault(_createTextTracksIfNecessary);var _removeCuesFromTrack=require('./remove-cues-from-track');var _removeCuesFromTrack2=_interopRequireDefault(_removeCuesFromTrack);var _addTextTrackData=require('./add-text-track-data');var _webworkify=require('webworkify');var _webworkify2=_interopRequireDefault(_webworkify);var _transmuxerWorker=require('./transmuxer-worker');var _transmuxerWorker2=_interopRequireDefault(_transmuxerWorker);var _codecUtils=require('./codec-utils');var makeWrappedSourceBuffer=function makeWrappedSourceBuffer(mediaSource,mimeType){var sourceBuffer=mediaSource.addSourceBuffer(mimeType);var wrapper=Object.create(null);wrapper.updating=false;wrapper.realBuffer_=sourceBuffer;var _loop=function(key){if(typeof sourceBuffer[key]==='function'){wrapper[key]=function(){return sourceBuffer[key].apply(sourceBuffer,arguments);};}else if(typeof wrapper[key]==='undefined'){Object.defineProperty(wrapper,key,{get:function get(){return sourceBuffer[key];},set:function set(v){return sourceBuffer[key]=v;}});}};for(var key in sourceBuffer){_loop(key);}
1080return wrapper;};var VirtualSourceBuffer=(function(_videojs$EventTarget){_inherits(VirtualSourceBuffer,_videojs$EventTarget);function VirtualSourceBuffer(mediaSource,codecs){var _this=this;_classCallCheck(this,VirtualSourceBuffer);_get(Object.getPrototypeOf(VirtualSourceBuffer.prototype),'constructor',this).call(this,_videoJs2['default'].EventTarget);this.timestampOffset_=0;this.pendingBuffers_=[];this.bufferUpdating_=false;this.mediaSource_=mediaSource;this.codecs_=codecs;this.audioCodec_=null;this.videoCodec_=null;this.audioDisabled_=false;this.appendAudioInitSegment_=true;var options={remux:false};this.codecs_.forEach(function(codec){if((0,_codecUtils.isAudioCodec)(codec)){_this.audioCodec_=codec;}else if((0,_codecUtils.isVideoCodec)(codec)){_this.videoCodec_=codec;}});this.transmuxer_=(0,_webworkify2['default'])(_transmuxerWorker2['default']);this.transmuxer_.postMessage({action:'init',options:options});this.transmuxer_.onmessage=function(event){if(event.data.action==='data'){return _this.data_(event);}
1081if(event.data.action==='done'){return _this.done_(event);}};Object.defineProperty(this,'timestampOffset',{get:function get(){return this.timestampOffset_;},set:function set(val){if(typeof val==='number'&&val>=0){this.timestampOffset_=val;this.appendAudioInitSegment_=true;this.transmuxer_.postMessage({action:'setTimestampOffset',timestampOffset:val});}}});Object.defineProperty(this,'appendWindowStart',{get:function get(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart;},set:function set(start){if(this.videoBuffer_){this.videoBuffer_.appendWindowStart=start;}
1082if(this.audioBuffer_){this.audioBuffer_.appendWindowStart=start;}}});Object.defineProperty(this,'updating',{get:function get(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating);}});Object.defineProperty(this,'buffered',{get:function get(){var start=null;var end=null;var arity=0;var extents=[];var ranges=[];if(!this.videoBuffer_&&!this.audioBuffer_){return _videoJs2['default'].createTimeRange();}
1083if(!this.videoBuffer_){return this.audioBuffer_.buffered;}
1084if(!this.audioBuffer_){return this.videoBuffer_.buffered;}
1085if(this.audioDisabled_){return this.videoBuffer_.buffered;}
1086if(this.videoBuffer_.buffered.length===0&&this.audioBuffer_.buffered.length===0){return _videoJs2['default'].createTimeRange();}
1087var videoBuffered=this.videoBuffer_.buffered;var audioBuffered=this.audioBuffer_.buffered;var count=videoBuffered.length;while(count--){extents.push({time:videoBuffered.start(count),type:'start'});extents.push({time:videoBuffered.end(count),type:'end'});}
1088count=audioBuffered.length;while(count--){extents.push({time:audioBuffered.start(count),type:'start'});extents.push({time:audioBuffered.end(count),type:'end'});}
1089extents.sort(function(a,b){return a.time-b.time;});for(count=0;count<extents.length;count++){if(extents[count].type==='start'){arity++;if(arity===2){start=extents[count].time;}}else if(extents[count].type==='end'){arity--;if(arity===1){end=extents[count].time;}}
1090if(start!==null&&end!==null){ranges.push([start,end]);start=null;end=null;}}
1091return _videoJs2['default'].createTimeRanges(ranges);}});}
1092_createClass(VirtualSourceBuffer,[{key:'data_',value:function data_(event){var segment=event.data.segment;segment.data=new Uint8Array(segment.data,event.data.byteOffset,event.data.byteLength);segment.initSegment=new Uint8Array(segment.initSegment.data,segment.initSegment.byteOffset,segment.initSegment.byteLength);(0,_createTextTracksIfNecessary2['default'])(this,this.mediaSource_,segment);this.pendingBuffers_.push(segment);return;}},{key:'done_',value:function done_(event){if(this.mediaSource_.readyState==='closed'){this.pendingBuffers_.length=0;return;}
1093this.processPendingSegments_();return;}},{key:'createRealSourceBuffers_',value:function createRealSourceBuffers_(){var _this2=this;var types=['audio','video'];types.forEach(function(type){if(!_this2[type+'Codec_']){return;}
1094if(_this2[type+'Buffer_']){return;}
1095var buffer=null;if(_this2.mediaSource_[type+'Buffer_']){buffer=_this2.mediaSource_[type+'Buffer_'];buffer.updating=false;}else{var codecProperty=type+'Codec_';var mimeType=type+'/mp4;codecs="'+_this2[codecProperty]+'"';buffer=makeWrappedSourceBuffer(_this2.mediaSource_.nativeMediaSource_,mimeType);_this2.mediaSource_[type+'Buffer_']=buffer;}
1096_this2[type+'Buffer_']=buffer;['update','updatestart','updateend'].forEach(function(event){buffer.addEventListener(event,function(){if(type==='audio'&&_this2.audioDisabled_){return;}
1097if(event==='updateend'){_this2[type+'Buffer_'].updating=false;}
1098var shouldTrigger=types.every(function(t){if(t==='audio'&&_this2.audioDisabled_){return true;}
1099if(type!==t&&_this2[t+'Buffer_']&&_this2[t+'Buffer_'].updating){return false;}
1100return true;});if(shouldTrigger){return _this2.trigger(event);}});});});}},{key:'appendBuffer',value:function appendBuffer(segment){this.bufferUpdating_=true;if(this.audioBuffer_&&this.audioBuffer_.buffered.length){var audioBuffered=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:'setAudioAppendStart',appendStart:audioBuffered.end(audioBuffered.length-1)});}
1101this.transmuxer_.postMessage({action:'push',data:segment.buffer,byteOffset:segment.byteOffset,byteLength:segment.byteLength},[segment.buffer]);this.transmuxer_.postMessage({action:'flush'});}},{key:'remove',value:function remove(start,end){if(this.videoBuffer_){this.videoBuffer_.updating=true;this.videoBuffer_.remove(start,end);}
1102if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.updating=true;this.audioBuffer_.remove(start,end);}
1103(0,_removeCuesFromTrack2['default'])(start,end,this.metadataTrack_);if(this.inbandTextTracks_){for(var track in this.inbandTextTracks_){(0,_removeCuesFromTrack2['default'])(start,end,this.inbandTextTracks_[track]);}}}},{key:'processPendingSegments_',value:function processPendingSegments_(){var sortedSegments={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};sortedSegments=this.pendingBuffers_.reduce(function(segmentObj,segment){var type=segment.type;var data=segment.data;var initSegment=segment.initSegment;segmentObj[type].segments.push(data);segmentObj[type].bytes+=data.byteLength;segmentObj[type].initSegment=initSegment;if(segment.captions){segmentObj.captions=segmentObj.captions.concat(segment.captions);}
1104if(segment.info){segmentObj[type].info=segment.info;}
1105if(segment.metadata){segmentObj.metadata=segmentObj.metadata.concat(segment.metadata);}
1106return segmentObj;},sortedSegments);if(!this.videoBuffer_&&!this.audioBuffer_){if(sortedSegments.video.bytes===0){this.videoCodec_=null;}
1107if(sortedSegments.audio.bytes===0){this.audioCodec_=null;}
1108this.createRealSourceBuffers_();}
1109if(sortedSegments.audio.info){this.mediaSource_.trigger({type:'audioinfo',info:sortedSegments.audio.info});}
1110if(sortedSegments.video.info){this.mediaSource_.trigger({type:'videoinfo',info:sortedSegments.video.info});}
1111if(this.appendAudioInitSegment_){if(!this.audioDisabled_&&this.audioBuffer_){sortedSegments.audio.segments.unshift(sortedSegments.audio.initSegment);sortedSegments.audio.bytes+=sortedSegments.audio.initSegment.byteLength;}
1112this.appendAudioInitSegment_=false;}
1113if(this.videoBuffer_){sortedSegments.video.segments.unshift(sortedSegments.video.initSegment);sortedSegments.video.bytes+=sortedSegments.video.initSegment.byteLength;this.concatAndAppendSegments_(sortedSegments.video,this.videoBuffer_);(0,_addTextTrackData.addTextTrackData)(this,sortedSegments.captions,sortedSegments.metadata);}
1114if(!this.audioDisabled_&&this.audioBuffer_){this.concatAndAppendSegments_(sortedSegments.audio,this.audioBuffer_);}
1115this.pendingBuffers_.length=0;this.bufferUpdating_=false;}},{key:'concatAndAppendSegments_',value:function concatAndAppendSegments_(segmentObj,destinationBuffer){var offset=0;var tempBuffer=undefined;if(segmentObj.bytes){tempBuffer=new Uint8Array(segmentObj.bytes);segmentObj.segments.forEach(function(segment){tempBuffer.set(segment,offset);offset+=segment.byteLength;});try{destinationBuffer.updating=true;destinationBuffer.appendBuffer(tempBuffer);}catch(error){if(this.mediaSource_.player_){this.mediaSource_.player_.error({code:-3,type:'APPEND_BUFFER_ERR',message:error.message,originalError:error});}}}}},{key:'abort',value:function abort(){if(this.videoBuffer_){this.videoBuffer_.abort();}
1116if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.abort();}
1117if(this.transmuxer_){this.transmuxer_.postMessage({action:'reset'});}
1118this.pendingBuffers_.length=0;this.bufferUpdating_=false;}}]);return VirtualSourceBuffer;})(_videoJs2['default'].EventTarget);exports['default']=VirtualSourceBuffer;module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./add-text-track-data":64,"./codec-utils":65,"./create-text-tracks-if-necessary":66,"./remove-cues-from-track":72,"./transmuxer-worker":73,"
1118webworkify":76}],76:[function(require,module,exports){var bundleFn=arguments[3];var sources=arguments[4];var cache=arguments[5];var stringify=JSON.stringify;module.exports=function(fn){var keys=[];var wkey;var cacheKeys=Object.keys(cache);for(var i=0,l=cacheKeys.length;i<l;i++){var key=cacheKeys[i];if(cache[key].exports===fn){wkey=key;break;}}
1119if(!wkey){wkey=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var wcache={};for(var i=0,l=cacheKeys.length;i<l;i++){var key=cacheKeys[i];wcache[key]=key;}
1120sources[wkey]=[Function(['require','module','exports'],'('+fn+')(self)'),wcache];}
1121var skey=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var scache={};scache[wkey]=wkey;sources[skey]=[Function(['require'],'require('+stringify(wkey)+')(self)'),scache];var src='('+bundleFn+')({'
1122+Object.keys(sources).map(function(key){return stringify(key)+':['
1123+sources[key][0]
1124+','+stringify(sources[key][1])+']';}).join(',')
1125+'},{},['+stringify(skey)+'])';var URL=window.URL||window.webkitURL||window.mozURL||window.msURL;return new Worker(URL.createObjectURL(new Blob([src],{type:'text/javascript'})));};},{}],77:[function(require,module,exports){(function(global){'use strict';var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if('value'in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x4,_x5,_x6){var _again=true;_function:while(_again){var object=_x4,property=_x5,receiver=_x6;_again=false;if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{_x4=parent;_x5=property;_x6=receiver;_again=true;desc=parent=undefined;continue _function;}}else if('value'in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}
1126function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}
1127function _inherits(subClass,superClass){if(typeof superClass!=='function'&&superClass!==null){throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
1128var _globalDocument=require('global/document');var _globalDocument2=_interopRequireDefault(_globalDocument);var _playlistLoader=require('./playlist-loader');var _playlistLoader2=_interopRequireDefault(_playlistLoader);var _playlist=require('./playlist');var _playlist2=_interopRequireDefault(_playlist);var _xhr=require('./xhr');var _xhr2=_interopRequireDefault(_xhr);var _aesDecrypter=require('aes-decrypter');var _binUtils=require('./bin-utils');var _binUtils2=_interopRequireDefault(_binUtils);var _videojsContribMediaSources=require('videojs-contrib-media-sources');var _m3u8Parser=require('m3u8-parser');var _m3u8Parser2=_interopRequireDefault(_m3u8Parser);var _videoJs=(typeof window!=="undefined"?window['videojs']:typeof global!=="undefined"?global['videojs']:null);var _videoJs2=_interopRequireDefault(_videoJs);var _masterPlaylistController=require('./master-playlist-controller');var _config=require('./config');var _config2=_interopRequireDefault(_config);var _renditionMixin=require('./rendition-mixin');var _renditionMixin2=_interopRequireDefault(_renditionMixin);var _globalWindow=require('global/window');var _globalWindow2=_interopRequireDefault(_globalWindow);var _playbackWatcher=require('./playback-watcher');var _playbackWatcher2=_interopRequireDefault(_playbackWatcher);var _reloadSourceOnError=require('./reload-source-on-error');var _reloadSourceOnError2=_interopRequireDefault(_reloadSourceOnError);var _playlistSelectorsJs=require('./playlist-selectors.js');var Hls={PlaylistLoader:_playlistLoader2['default'],Playlist:_playlist2['default'],Decrypter:_aesDecrypter.Decrypter,AsyncStream:_aesDecrypter.AsyncStream,decrypt:_aesDecrypter.decrypt,utils:_binUtils2['default'],STANDARD_PLAYLIST_SELECTOR:_playlistSelectorsJs.lastBandwidthSelector,INITIAL_PLAYLIST_SELECTOR:_playlistSelectorsJs.lowestBitrateCompatibleVariantSelector,comparePlaylistBandwidth:_playlistSelectorsJs.comparePlaylistBandwidth,comparePlaylistResolution:_playlistSelectorsJs.comparePlaylistResolution,xhr:(0,_xhr2['default'])()};var INITIAL_BANDWIDTH=4194304;['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(prop){Object.defineProperty(Hls,prop,{get:function get(){_videoJs2['default'].log.warn('using Hls.'+prop+' is UNSAFE be sure you know 
vendor: 12,742 bytes, lines 1128-1155
1128what you are doing');return _config2['default'][prop];},set:function set(value){_videoJs2['default'].log.warn('using Hls.'+prop+' is UNSAFE be sure you know what you are doing');if(typeof value!=='number'||value<0){_videoJs2['default'].log.warn('value of Hls.'+prop+' must be greater than or equal to 0');return;}
1129_config2['default'][prop]=value;}});});var handleHlsMediaChange=function handleHlsMediaChange(qualityLevels,playlistLoader){var newPlaylist=playlistLoader.media();var selectedIndex=-1;for(var i=0;i<qualityLevels.length;i++){if(qualityLevels[i].id===newPlaylist.uri){selectedIndex=i;break;}}
1130qualityLevels.selectedIndex_=selectedIndex;qualityLevels.trigger({selectedIndex:selectedIndex,type:'change'});};var handleHlsLoadedMetadata=function handleHlsLoadedMetadata(qualityLevels,hls){hls.representations().forEach(function(rep){qualityLevels.addQualityLevel(rep);});handleHlsMediaChange(qualityLevels,hls.playlists);};Hls.canPlaySource=function(){return _videoJs2['default'].log.warn('HLS is no longer a tech. Please remove it from '+'your player\'s techOrder.');};Hls.supportsNativeHls=(function(){var video=_globalDocument2['default'].createElement('video');if(!_videoJs2['default'].getTech('Html5').isSupported()){return false;}
1131var canPlay=['application/vnd.apple.mpegurl','audio/mpegurl','audio/x-mpegurl','application/x-mpegurl','video/x-mpegurl','video/mpegurl','application/mpegurl'];return canPlay.some(function(canItPlay){return(/maybe|probably/i.test(video.canPlayType(canItPlay)));});})();Hls.isSupported=function(){return _videoJs2['default'].log.warn('HLS is no longer a tech. Please remove it from '+'your player\'s techOrder.');};var Component=_videoJs2['default'].getComponent('Component');var HlsHandler=(function(_Component){_inherits(HlsHandler,_Component);function HlsHandler(source,tech,options){var _this=this;_classCallCheck(this,HlsHandler);_get(Object.getPrototypeOf(HlsHandler.prototype),'constructor',this).call(this,tech,options.hls);if(tech.options_&&tech.options_.playerId){var _player=(0,_videoJs2['default'])(tech.options_.playerId);if(!_player.hasOwnProperty('hls')){Object.defineProperty(_player,'hls',{get:function get(){_videoJs2['default'].log.warn('player.hls is deprecated. Use player.tech_.hls instead.');tech.trigger({type:'usage',name:'hls-player-access'});return _this;}});}}
1132this.tech_=tech;this.source_=source;this.stats={};this.ignoreNextSeekingEvent_=false;this.setOptions_();if(this.options_.overrideNative&&(tech.featuresNativeVideoTracks||tech.featuresNativeAudioTracks)){throw new Error('Overriding native HLS requires emulated tracks. '+'See https://git.io/vMpjB');}
1133this.on(_globalDocument2['default'],['fullscreenchange','webkitfullscreenchange','mozfullscreenchange','MSFullscreenChange'],function(event){var fullscreenElement=_globalDocument2['default'].fullscreenElement||_globalDocument2['default'].webkitFullscreenElement||_globalDocument2['default'].mozFullScreenElement||_globalDocument2['default'].msFullscreenElement;if(fullscreenElement&&fullscreenElement.contains(_this.tech_.el())){_this.masterPlaylistController_.fastQualityChange_();}});this.on(this.tech_,'seeking',function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=false;return;}
1134this.setCurrentTime(this.tech_.currentTime());});this.on(this.tech_,'error',function(){if(this.masterPlaylistController_){this.masterPlaylistController_.pauseLoading();}});this.on(this.tech_,'play',this.play);}
1135_createClass(HlsHandler,[{key:'setOptions_',value:function setOptions_(){var _this2=this;this.options_.withCredentials=this.options_.withCredentials||false;if(typeof this.options_.blacklistDuration!=='number'){this.options_.blacklistDuration=5*60;}
1136if(typeof this.options_.bandwidth!=='number'){this.options_.bandwidth=INITIAL_BANDWIDTH;}
1137this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===INITIAL_BANDWIDTH;['withCredentials','bandwidth'].forEach(function(option){if(typeof _this2.source_[option]!=='undefined'){_this2.options_[option]=_this2.source_[option];}});this.bandwidth=this.options_.bandwidth;}},{key:'src',value:function src(_src){var _this3=this;if(!_src){return;}
1138this.setOptions_();this.options_.url=this.source_.src;this.options_.tech=this.tech_;this.options_.externHls=Hls;this.masterPlaylistController_=new _masterPlaylistController.MasterPlaylistController(this.options_);this.playbackWatcher_=new _playbackWatcher2['default'](_videoJs2['default'].mergeOptions(this.options_,{seekable:function seekable(){return _this3.seekable();}}));this.masterPlaylistController_.on('error',function(){var player=_videoJs2['default'].players[_this3.tech_.options_.playerId];player.error(_this3.masterPlaylistController_.error);});this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):Hls.STANDARD_PLAYLIST_SELECTOR.bind(this);this.masterPlaylistController_.selectInitialPlaylist=Hls.INITIAL_PLAYLIST_SELECTOR.bind(this);this.playlists=this.masterPlaylistController_.masterPlaylistLoader_;this.mediaSource=this.masterPlaylistController_.mediaSource;Object.defineProperties(this,{selectPlaylist:{get:function get(){return this.masterPlaylistController_.selectPlaylist;},set:function set(selectPlaylist){this.masterPlaylistController_.selectPlaylist=selectPlaylist.bind(this);}},throughput:{get:function get(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate;},set:function set(throughput){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=throughput;this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1;}},bandwidth:{get:function get(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth;},set:function set(bandwidth){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=bandwidth;this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0};}},systemBandwidth:{get:function get(){var invBandwidth=1/(this.bandwidth||1);var invThroughput=undefined;if(this.throughput>0){invThroughput=1/this.throughput;}else{invThroughput=0;}
1139var systemBitrate=Math.floor(1/(invBandwidth+invThroughput));return systemBitrate;},set:function set(){_videoJs2['default'].log.error('The "systemBandwidth" property is read-only');}}});Object.defineProperties(this.stats,{bandwidth:{get:function get(){return _this3.bandwidth||0;},enumerable:true},mediaRequests:{get:function get(){return _this3.masterPlaylistController_.mediaRequests_()||0;},enumerable:true},mediaRequestsAborted:{get:function get(){return _this3.masterPlaylistController_.mediaRequestsAborted_()||0;},enumerable:true},mediaRequestsTimedout:{get:function get(){return _this3.masterPlaylistController_.mediaRequestsTimedout_()||0;},enumerable:true},mediaRequestsErrored:{get:function get(){return _this3.masterPlaylistController_.mediaRequestsErrored_()||0;},enumerable:true},mediaTransferDuration:{get:function get(){return _this3.masterPlaylistController_.mediaTransferDuration_()||0;},enumerable:true},mediaBytesTransferred:{get:function get(){return _this3.masterPlaylistController_.mediaBytesTransferred_()||0;},enumerable:true},mediaSecondsLoaded:{get:function get(){return _this3.masterPlaylistController_.mediaSecondsLoaded_()||0;},enumerable:true}});this.tech_.one('canplay',this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));this.masterPlaylistController_.on('selectedinitialmedia',function(){(0,_renditionMixin2['default'])(_this3);});this.on(this.masterPlaylistController_,'progress',function(){this.tech_.trigger('progress');});this.on(this.masterPlaylistController_,'firstplay',function(){this.ignoreNextSeekingEvent_=true;});this.tech_.ready(function(){return _this3.setupQualityLevels_();});if(!this.tech_.el()){return;}
1140this.tech_.src(_videoJs2['default'].URL.createObjectURL(this.masterPlaylistController_.mediaSource));}},{key:'setupQualityLevels_',value:function setupQualityLevels_(){var _this4=this;var player=_videoJs2['default'].players[this.tech_.options_.playerId];if(player&&player.qualityLevels){this.qualityLevels_=player.qualityLevels();this.masterPlaylistController_.on('selectedinitialmedia',function(){handleHlsLoadedMetadata(_this4.qualityLevels_,_this4);});this.playlists.on('mediachange',function(){handleHlsMediaChange(_this4.qualityLevels_,_this4.playlists);});}}},{key:'play',value:function play(){this.masterPlaylistController_.play();}},{key:'setCurrentTime',value:function setCurrentTime(currentTime){this.masterPlaylistController_.setCurrentTime(currentTime);}},{key:'duration',value:function duration(){return this.masterPlaylistController_.duration();}},{key:'seekable',value:function seekable(){return this.masterPlaylistController_.seekable();}},{key:'dispose',value:function dispose(){if(this.playbackWatcher_){this.playbackWatcher_.dispose();}
1141if(this.masterPlaylistController_){this.masterPlaylistController_.dispose();}
1142if(this.qualityLevels_){this.qualityLevels_.dispose();}
1143_get(Object.getPrototypeOf(HlsHandler.prototype),'dispose',this).call(this);}}]);return HlsHandler;})(Component);var HlsSourceHandler=function HlsSourceHandler(mode){return{canHandleSource:function canHandleSource(srcObj){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var localOptions=_videoJs2['default'].mergeOptions(_videoJs2['default'].options,options);if(localOptions.hls&&localOptions.hls.mode&&localOptions.hls.mode!==mode){return false;}
1144return HlsSourceHandler.canPlayType(srcObj.type,localOptions);},handleSource:function handleSource(source,tech){var options=arguments.length<=2||arguments[2]===undefined?{}:arguments[2];var localOptions=_videoJs2['default'].mergeOptions(_videoJs2['default'].options,options,{hls:{mode:mode}});if(mode==='flash'){tech.setTimeout(function(){tech.trigger('loadstart');},1);}
1145tech.hls=new HlsHandler(source,tech,localOptions);tech.hls.xhr=(0,_xhr2['default'])();tech.hls.src(source.src);return tech.hls;},canPlayType:function canPlayType(type){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var localOptions=_videoJs2['default'].mergeOptions(_videoJs2['default'].options,options);if(HlsSourceHandler.canPlayType(type,localOptions)){return'maybe';}
1146return'';}};};HlsSourceHandler.canPlayType=function(type,options){if(_videoJs2['default'].browser.IE_VERSION&&_videoJs2['default'].browser.IE_VERSION<=10){return false;}
1147var mpegurlRE=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;if(!options.hls.overrideNative&&Hls.supportsNativeHls){return false;}
1148return mpegurlRE.test(type);};if(typeof _videoJs2['default'].MediaSource==='undefined'||typeof _videoJs2['default'].URL==='undefined'){_videoJs2['default'].MediaSource=_videojsContribMediaSources.MediaSource;_videoJs2['default'].URL=_videojsContribMediaSources.URL;}
1149var flashTech=_videoJs2['default'].getTech('Flash');if(_videojsContribMediaSources.MediaSource.supportsNativeMediaSources()){_videoJs2['default'].getTech('Html5').registerSourceHandler(HlsSourceHandler('html5'),0);}
1150if(_globalWindow2['default'].Uint8Array&&flashTech){flashTech.registerSourceHandler(HlsSourceHandler('flash'));}
1151_videoJs2['default'].HlsHandler=HlsHandler;_videoJs2['default'].HlsSourceHandler=HlsSourceHandler;_videoJs2['default'].Hls=Hls;if(!_videoJs2['default'].use){_videoJs2['default'].registerComponent('Hls',Hls);}
1152_videoJs2['default'].m3u8=_m3u8Parser2['default'];_videoJs2['default'].options.hls=_videoJs2['default'].options.hls||{};if(_videoJs2['default'].registerPlugin){_videoJs2['default'].registerPlugin('reloadSourceOnError',_reloadSourceOnError2['default']);}else{_videoJs2['default'].plugin('reloadSourceOnError',_reloadSourceOnError2['default']);}
1153module.exports={Hls:Hls,HlsHandler:HlsHandler,HlsSourceHandler:HlsSourceHandler};}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./bin-utils":2,"./config":3,"./master-playlist-controller":5,"./playback-watcher":8,"./playlist":11,"./playlist-loader":9,"./playlist-selectors.js":10,"./reload-source-on-error":13,"./rendition-mixin":14,"./xhr":21,"aes-decrypter":25,"global/document":31,"global/window":32,"m3u8-parser":33,"videojs-contrib-media-sources":74}]},{},[77])(77)});
1154/* /theme/video-js/videojs-contrib-quality-levels.min.js */
1155;!function e(t,n,o){function i(r,u){if(!n[r]){if(!t[r]){var f="function"==typeof require&&require;if(!u&&f)return f(r,!0);if(l)return l(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var s=n[r]={exports:{}};t[r][0].call(s.exports,function(e){var n=t[r][1][e];return i(n?n:e)},s,s.exports,e,t,n,o)}return n[r].exports}for(var l="function"==typeof require&&require,r=0;r<o.length;r++)i(o[r]);return i}({1:[function(e,t,n){(function(t){"use strict";
1155function o(e){return e&&e.__esModule?e:{"default":e}}function i(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 r(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.__esModule=!0;var u="undefined"!=typeof window?window.videojs:"undefined"!=typeof t?t.videojs:null,f=o(u),d=e(4),s=o(d),a=e(2),c=o(a),p=function(e){function t(){var n;i(this,t);var o=l(this,e.call(this)),r=o;if(f["default"].browser.IS_IE8){r=s["default"].createElement("custom");for(var u in t.prototype)"constructor"!==u&&(r[u]=t.prototype[u])}return r.levels_=[],r.selectedIndex_=-1,Object.defineProperty(r,"selectedIndex",{get:function(){return r.selectedIndex_}}),Object.defineProperty(r,"length",{get:function(){return r.levels_.length}}),n=r,l(o,n)}return r(t,e),t.prototype.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new c["default"](e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},t.prototype.removeQualityLevel=function(e){for(var t=null,n=0,o=this.length;n<o;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},t.prototype.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var o=this[t];if(o.id===e)return o}return null},t.prototype.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},t}(f["default"].EventTarget);p.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(var y in p.prototype.allowedEvents_)p.prototype["on"+y]=null;n["default"]=p}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){(function(t){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var l="undefined"!=typeof window?window.videojs:"undefined"!=typeof t?t.videojs:null,r=o(l),u=e(4),f=o(u),d=function s(e){i(this,s);var t=this;if(r["default"].browser.IS_IE8){t=f["default"].createElement("custom");for(var n in s.prototype)"constructor"!==n&&(t[n]=s.prototype[n])}return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get:function(){return t.enabled_()},set:function(e){t.enabled_(e)}}),t};n["default"]=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t,n){},{}],4:[function(e,t,n){(function(n){var o="undefined"!=typeof n?n:"undefined"!=typeof window?window:{},i=e(3);if("undefined"!=typeof document)t.exports=document;else{var l=o["__GLOBAL_DOCUMENT_CACHE@4"];l||(l=o["__GLOBAL_DOCUMENT_CACHE@4"]=i),t.exports=l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(e,t,n){(function(t){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var i="undefined"!=typeof window?window.videojs:"undefined"!=typeof t?t.videojs:null,l=o(i),r=e(1),u=o(r),f=l["default"].registerPlugin||l["default"].plugin,d=function(e,t){var n=e.qualityLevels,o=new u["default"],i=function l(){o.dispose(),e.qualityLevels=n,e.off("dispose",l)};return e.on("dispose",i),e.qualityLevels=function(){return o},e.qualityLevels.VERSION="2.0.3",o},s=function(e){return d(this,l["default"].mergeOptions({},e))};
1155f("qualityLevels",s),s.VERSION="2.0.3",n["default"]=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[5]);
1156/* /theme/js/video-tr.js */
1157;(function(window,document,vjs){var hasLocalStorage;try{window.localStorage.setItem('modernizr','modernizr');window.localStorage.removeItem('modernizr');hasLocalStorage=true;}catch(e){hasLocalStorage=false;}
1158var options;try{var val;if(hasLocalStorage){val=window.localStorage.getItem('vjs');}else{val=document.cookie.replace(/(?:^|.*;)\s*vjs\s*=\s*([^;]*).*|^.*$/,'$1')||'';val=decodeURIComponent(val);}
1159options=JSON.parse(val)||{};}catch(e){options={};}
1160function saveOptions(){if(hasLocalStorage){window.localStorage.setItem('vjs',JSON.stringify(options));}else{document.cookie='vjs='+encodeURIComponent(JSON.stringify(options))+'; path=/';}}
1161var vjsOptions=vjs['options'];vjsOptions['nativeControlsForTouch']=true;if(navigator.userAgent.toLowerCase().indexOf('firefox')>-1&&navigator.platform.indexOf('Win')>-1){vjsOptions['techOrder']=["hls","html5","flash"];}
1162var vjsPlayer=vjs;function mjsPlayer(){var vid=this;vjsPlayer.apply(vid,arguments);vid.ready(function(){(options.volume===undefined)||vid.volume(options.volume);vid.on('volumechange',function(){options.volume=vid.volume();saveOptions();});var st=vid.textTracks(),tt;for(var i=0,l=st.length;i<l;i++){tt=st[i];if(options.subtitles!==undefined){if(options.subtitles===2){tt.show();}else if(options.subtitles===1){tt.hide();}else{tt.disable();}}}
1163if(tt){var stb=vid.controlBar.getChild('subtitlesButton');stb.on('click',function(e){if(tt.mode()===2){tt.disable();}else{tt.show();}
1164options.subtitles=tt.mode();saveOptions();});stb=stb.children()[0];if(stb){stb=stb.children();for(var i=0,l=stb.length;i<l;i++){stb[i].on('click',function(e){options.subtitles=tt.mode();saveOptions();});}}}});}
1165function F(){}
1166F.prototype=vjsPlayer.prototype;mjsPlayer.prototype=new F();for(var key in vjsPlayer){if(vjsPlayer.hasOwnProperty(key)){mjsPlayer[key]=vjsPlayer[key];}}
1167mjsPlayer.vjsPlayer=vjsPlayer;vjs['Player']=mjsPlayer;function setTracking(){this.off('ended',onEndedOnce);this.off('play',onPlayOnce);this.off('timeupdate',onProgressOnce);this.off('timeupdate',onProgressTwice);this.one('ended',onEndedOnce);this.one('play',onPlayOnce);this.on('timeupdate',onProgressOnce);}
1168var player=vjs.getComponent('Player'),triggerReady=player.prototype.triggerReady;player.prototype.triggerReady=function(){setTracking.call(this);triggerReady.call(this);};function onEndedOnce(e){_ga_send('Videos','Video Completed',getVideoId(this));}
1169function onPlayOnce(e){_ga_send('Videos','Play',getVideoId(this));}
1170function onProgressOnce(e){var progress;try{progress=this.currentTime()/this.duration();}catch(e){return;}
1171if(progress>=0.2){this.off('timeupdate',onProgressOnce);this.on('timeupdate',onProgressTwice);_ga_send('Videos','Watched 20%',getVideoId(this));}}
1172function onProgressTwice(e){var progress;try{progress=this.currentTime()/this.duration();}catch(e){return;}
1173if(progress>=0.8){this.off('timeupdate',onProgressTwice);_ga_send('Videos','Watched 80%',getVideoId(this));}}
1174function _ga_send(ec,ea,el){window._tr&&_tr.push(['_trackEvent',ec,ea,el]);window._paq&&_paq.push(['trackEvent',ec,ea,el]);window._gaq&&_gaq.push(['_trackEvent',ec,ea,el]);window.ga&&ga('send','event',ec,ea,el);window._gaq||window.ga||(window.console&&console.log.apply(console,arguments));}
1175function getVideoId(vid){var src=vid.src();var els=vid.el().getElementsByTagName('source');if(els.length>0){src=els[0].src;}
1176var hlsParts=vid.currentSrc().match(/([^/_]*)_.*[.]csmil\/master[.]m3u8$/);if(hlsParts&&hlsParts.length>=2){return hlsParts[1];}
1177var parts=src.match(/\?(?:.*&)?v=([^&]*)/);if(parts)return parts[1];parts=src.match(/[^\/]*$/);if(parts)return parts[0];return src;}})(window,document,window['videojs']);
1178/* /theme/gsc_headers/generic-utils.js */
1179;if(!window.logger){logger=function(){};logger.debug=function(){};}
1180if(!window.getStyle){function getStyle(oElm,strCssRule){var strValue="";if(document.defaultView&&document.defaultView.getComputedStyle){strValue=document.defaultView.getComputedStyle(oElm,"").getPropertyValue(strCssRule);}
1181else if(oElm.currentStyle){strCssRule=strCssRule.replace(/\-(\w)/g,function(strMatch,p1){return p1.toUpperCase();});strValue=oElm.currentStyle[strCssRule];}
1182return strValue;}}
1183if(!window.wireupTotalTouchControl){function wireupTotalTouchControl(aClass,aCallback,aTransparent){if(!globalIsMobile)return;for(var elem in{'touchstart':1,'touchmove':1,'touchcancel':1}){document.addEventListener(elem,function(e){if(e&&e.target&&e.target.classList&&(e.target.classList.contains(aClass)||e.target.parentNode.classList.contains(aClass))){if(!aTransparent){e.stopPropagation();e.stopImmediatePropagation();e.preventDefault();return false;}else{return true;}}
1184return true;},true);}
1185document.addEventListener('touchend',function(e){if(e&&e.target&&e.target.classList&&(e.target.classList.contains(aClass)||e.target.parentNode.classList.contains(aClass))){if(!aTransparent){aCallback(e);e.stopPropagation();e.stopImmediatePropagation();e.preventDefault();return false;}else{return aCallback(e);}}
1186return true;},true);}}
1187/* /theme/gsc_headers/video-101.js */
1188;var VideoController=function(opts){if(opts)for(var key in opts)this[key]=opts[key];}
1189VideoController.prototype=(function(){var me={};var autogeneratedId=0;me.init=function(aDomElem,aOpts){if(globalGetParams&&globalGetParams.headless)return{on:function(){},one:function(){},trigger:function(){},el:function(){},posterImage:{show:function(){}}};
1189var $elem=(aDomElem instanceof jQuery)?aDomElem:$(aDomElem),vid=(aDomElem instanceof jQuery)?aDomElem[0]:$elem[0];var domElemId=vid.id;if(!domElemId){domElemId='gsc_video_controller_'+autogeneratedId++;vid.id=domElemId;}
1190logger.debug('videoJS DOM elem ID: '+domElemId);if($('html').hasClass('device-android')){$elem.attr('controls','controls');vid.on=vid.addEventListener;vid.one=function(aEvent,aFunc){var theFunc=function(){aFunc.apply(this,arguments);vid.removeEventListener(aEvent,theFunc);};vid.addEventListener(aEvent,theFunc);}
1191vid.trigger=function(){$elem.trigger.apply($elem,arguments);}
1192vid.el=function(){return vid;}
1193vid.posterImage={show:function(){vid.load();}}}else{var opts=aOpts||{controls:true,autoplay:false};if(navigator.userAgent.toLowerCase().indexOf('firefox')>-1&&navigator.platform.indexOf("Win")>-1&&$elem.find('source').eq(0).attr('type')!='video/webm'){opts.techOrder=["hls","html5","flash"];}
1194vid=videojs(domElemId,opts);if(opts.showPosterOnVideoEnnd){vid.on('ended',function(){try{vid.cancelFullScreen();}catch(swallow){}
1195vid.posterImage.show();if(typeof vid.currentTime==='function')vid.currentTime(0);});}}
1196return vid;}
1197return me;})();$(document).ready(function(){videojs.options.strings={'en':{'Play':'Play','Pause':'Pause','Mute':'Mute','Unmute':'Mute','Current Time':'Current Time','Duration Time':'Duration Time','Fullscreen':'Fullscreen','Non-Fullscreen':'Non-Fullscreen'}};videojs.options.language='en';videojs.options.flash.swf='/theme/swf/video-js.swf';if(!$('html').hasClass('device-ipad')){$('[data-gsc-setup]').each(function(){});}});globalVideoController=new VideoController();
1198/* /theme/gsc_headers/responsive-slider.js */
1199;if(!window.loadJS){function loadJS(src,cb){var ref=window.document.getElementsByTagName("script")[0];var script=window.document.createElement("script");script.src=src;script.async=true;ref.parentNode.insertBefore(script,ref);if(cb&&typeof(cb)==="function"){script.onload=cb;}
1200return script;}}
1201var GscResponsiveSlider=function(opts){for(var key in opts)this[key]=opts[key];}
1202GscResponsiveSlider.prototype=(function(){var me={};me.domParent='#header';me.fsoSliderZoomHeight=575;var fsoSlideWidth=860;me.addControls=true;me.autoplayVideos=true;me.circularClone=false;me.slidesMax860=false;me.animationGracePeriod=1000;var $mySlides,animationGracePeriod,totalSlides,fsoSliderTop,slideholderDelta=0;var ipAnimation=0;var $mySlide,myDirection,extraMotion;var fsoSlideWidth2;var fsoSliderZoomTimeout=0;var fsoSliderZoomedIn=false;var fsoSliderResizeTimer=0;var $allNonImageElems,$allImageElems;var xRatio=1;var attrs=['top','bottom','left','right','width','height'];var dotHolderWidth;var currentActiveSlideIdx=0;var slideshowScrollTop,fsoSliderZoomedIn,lastSlideOffset,containerWideEnoughForNoSliding;var allZoomedInAppleDots,allNormalAppleDots,myTransform,mySlideholderElem,tooManyAppleDots,midwaySlideNumLow=0,midwaySlideNum=0;var isIpad;var textAnimationQueue=[];var $slideshowMainElem,slideshowMainElem,$slideSelectorElem,slideSelectorElem,$slideArrowHolder,slideArrowHolder,$slideArrowLeft,slideArrowLeft,$slideHolderDom,slideHolderDom;var customLeftPanel=false;var isCloned=false;var $mySlideshowHolder,$mySlideshowWrapper,plusOne,minusOne;me.init=function(){if(window.globalLang&&globalLang=="he"){plusOne=-1;minusOne=1;}else{plusOne=1;minusOne=-1;}
1203var that=this;if(!(this.domParent instanceof jQuery)){this.domParent=$(this.domParent);}
1204$slideshowMainElem=this.domParent.find('.slideshow-main');slideshowMainElem=$slideshowMainElem[0];if(!slideshowMainElem)return logger.error('There is no ".slideshow-main"!');if(!(this.domParent.find('.slide-wrapper')[0]))return logger.error('There is no ".slide-wrapper" on ".slideshow-main"!');if(this.touchMode===void 0&&this.domParent.find('.video-slide').length){this.touchMode='default';if(window.deviceCustomType!='desktop')this.zoomEnabled=false;}
1205if(this.touchMode===void 0)this.touchMode='default';if(window.deviceCustomType!='desktop'&&this.touchMode=='photoswipe')this.zoomEnabled=false;if(this.zoomEnabled&&!this.addControls)return logger.error('Conflicting options (zoomEnabled && !addControl
1205s): how am I supposed to enable zoom without adding controls?','error');if(this.zoomOnClick===void 0){if($slideshowMainElem.find('slide .video-js').length){this.zoomOnClick=false;logger.debug('setting zoomOnClick to false');}else{this.zoomOnClick=true;logger.debug('setting zoomOnClick to true');}}
1206if(this.hasLeftSidebar===void 0){if(!this.domParent.find('.slideshow-left-nav').length){this.hasLeftSidebar=false;logger.debug('setting hasLeftSidebar to false');}else{this.hasLeftSidebar=true;logger.debug('setting hasLeftSidebar to true');}}
1207if(this.useSimpleSliding===void 0){if($slideshowMainElem.find('slide .item:not(.left-panel-mobile-caption)').length){this.useSimpleSliding=false;this.slidesMax860=(this.slidesMax860===void 0?true:this.slidesMax860);logger.debug('setting useSimpleSliding to false');}else{this.useSimpleSliding=true;logger.debug('setting useSimpleSliding to true');}}
1208if(this.zoomEnabled===void 0){if(!$slideshowMainElem.find('slide .item:not(.left-panel-mobile-caption)').length){this.zoomEnabled=false;logger.debug('setting zoomEnabled to false');}else{this.zoomEnabled=true;logger.debug('setting zoomEnabled to true');}}
1209$mySlideshowHolder=this.domParent.find('.slideshow-holder');$mySlideshowWrapper=this.domParent.find('.slideshow-wrapper');$slideHolderDom=this.domParent.find('.slide-holder');slideHolderDom=$slideHolderDom[0];if(!slideHolderDom)return logger.error('There is no ".slide-holder"!');if(this.domParent.find('slide').length===1){$mySlideshowWrapper.addClass('slideshow-single-slide');}
1210var tempThis=this;if(window.deviceCustomType!='desktop'&&this.touchMode=='photoswipe'){loadJS('/theme/photoswipe/photoswipe.min.js?_=03a5797d2');loadJS('/theme/photoswipe/photoswipe-ui-default.min.js?_=03a5797d2');window.galleryItems=[];$('slide').each(function(){var $clone=$(this).clone();$clone.find('.image-holder').each(function(){$(this).css('width',(Math.round(parseFloat($(this).attr('data-width'))/860*1000000)/10000)+'%');$(this).css('height',(Math.round(parseFloat($(this).attr('data-height'))/575*1000000)/10000)+'%');});if($clone.find('.image-holder').length==1){$clone.addClass('js-single-image-slide');var $imgHolder=$clone.find('.image-holder').eq(0);var slideDims=[window.innerWidth,window.innerWidth*0.6686];var imageDims=[window.innerWidth*0.6686*parseFloat($imgHolder.attr('data-width'))/parseFloat($imgHolder.attr('data-height')),window.innerWidth*0.6686];if(imageDims[0]>$imgHolder.attr('data-width')){imageDims[0]=$imgHolder.attr('data-width');}
1211if(window.location.pathname!="/scientology-today/church-openings/grand-opening-scientology-media-productions.html"&&window.location.pathname!="/churches/bringing-scientology-world/scientology-media-productions.html"){$imgHolder.css('min-width',Math.floor(imageDims[0])+'px');}}
1212$clone.find('img[data-src]').each(function(){var imgSrc=determineImageSources(this);if(imgSrc)$(this).attr('srca',imgSrc[1]).removeAttr('data-src').removeAttr('src');});var theSlideHtml=$clone[0].outerHTML;if(!theSlideHtml.match(/js-preview/))theSlideHtml=theSlideHtml.replace(/image-holder/g,'image-holder js-preview');var slideObj={html:theSlideHtml.replace(/srca=/g,'src='),}
1213if(deviceCustomType=='mobile')slideObj.title=$clone.find('.text-item').html();galleryItems.push(slideObj);});$('.pswp')[0].className+=' zoomedIn slide-wrapper bs-slideshow';document.body.className+=' photoswipe-on slideshow-zoomed-in';$('.pswp .pswp__container').html('<div class="pswp__item"></div> <div class="pswp__item"></div> <div class="pswp__item"></div>');}
1214if(document.body.className.match(/templated-slider-build-2-1/)&&(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>767&&((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<1025||!document.body.className.match(/locale-en/))&&window.slideshowCaptionsOverflow){slideshowCaptionsOverflow();}
1215if(this.domParent.find('slide').length===0)window.console&&console.error&&console.error('ERROR: slideshow has no slides!');if(this.addControls){$mySlideshowHolder.append('\
1216                <div class="slide-controls">\
1217                    <div class="slide-arrow-holder slide-left-arrow2">\
1218                        <div class="arrow-bg"></div>\
1219                        <arrow></arrow>\
1220                    </div>\
1221                    <div class="slide-arrow-holder slide-right-arrow2">\
1222                        <div class="arrow-bg"></div>\
1223                        <arrow></arrow>\
1224                    </div>\
1225                </div>\
1226                <div class="slide-selectors"></div>\
1227                ');if(this.zoomEnabled){$mySlideshowHolder.append('\
1228                    <div class="slide-zoomer">\
1229                        <span class="click-to-expand">Expand</span>\
1230                    </div>\
1231                    ');$mySlideshowWrapper.before('\
1232                    <div class="fso-custom-slider-overlay fso-custom-slider-fader"></div>\
1233                    <div class="fso-slide-upper-bg fso-custom-slider-fader">\
1234                        <a href="#" class="closebtn"><span class="glyphicon glyphicon-remove-circle"></span></a>\
1235                    </div>\
1236                    <div class="fso-slide-lower-bg fso-custom-slider-fader">\
1237                        <div class="fso-slide-selectors slide-selectors"></div>\
1238                    </div>\
1239                    <div class="fso-custom-zoomer">\
1240                        <div class="slide-zoomer">\
1241                            <span class="click-to-expand">Close</span>\
1242                        </div>\
1243                    </div>\
1244                    ');}
1245$slideHolderDom.after('\
1246                <div class="fso-slide-mobile-numbers">\
1247                    <span class="slide-num"></span> / <span class="slide-total"></span>\
1248                </div>\
1249                ');}
1250$slideSelectorElem=this.domParent.find('.slide-selectors');slideSelectorElem=$slideSelectorElem[0];if(!slideSelectorElem&&this.addControls)return logger.error('There is no ".slide-selectors"!');$slideArrowHolder=this.domParent.find('.slide-arrow-holder');slideArrowHolder=$slideArrowHolder[0];if(!slideArrowHolder)return logger.error('There is no ".slide-arrow-holder"!');$slideArrowLeft=this.domParent.find('.slide-left-arrow2');slideArrowLeft=$slideArrowLeft[0];if(!slideArrowLeft)return logger.error('There is no left arrow: ".slide-left-arrow2"!');if(!(this.domParent.find('.slide-controls')[0]))return logger.error('There is no ".slide-controls"!');if(!(this.domParent.find('.slide-right-arrow2')[0]))return logger.error('There is no ".slide-right-arrow2"!');$mySlides=this.domParent.find('.slide-holder slide');animationGracePeriod=this.animationGracePeriod;totalSlides=this.domParent.find('slide').length;$allNonImageElems=$mySlides.find('div.item,h3.item,.inactive-dot');$allImageElems=$mySlides.find('img.item');myMinSlideLeft=-10-(fsoSlideWidth*(totalSlides-1));slideshowScrollTop=slideshowMainElem.offsetTop;myTransform=Modernizr.prefixed('transform');mySlideholderElem=this.domParent.find('.slide-holder')[0];isIpad=$('html').hasClass('device-ipad');simpleAnimation=this.useSimpleSliding;isCloned=this.circularClone;if($('html').hasClass('device-iphone')||globalIsIE)isCloned=this.circularClone=false;if(globalIsIOS)isCloned=this.circularClone=false;if(isCloned){$mySlideshowWrapper.addClass('slideshow-been-cloned');}else{$mySlideshowWrapper.addClass('slideshow-not-cloned');}
1251customLeftPanel=!!this.domParent.find('.custom-slide-leftnav').length;if(this.domParent.find('.slide-stretcher').length){var paddingBottom=getStyle(this.domParent.find('.slide-stretcher')[0],"padding-bottom");if(paddingBottom){var stretcherPaddingBottom=parseInt(paddingBottom.replace(/px/,''));if(!isNaN(stretcherPaddingBottom)){var stretchPercent=stretcherPaddingBottom/this.domParent.find('.slide-stretcher').width()*100;this.fsoSliderZoomHeight=fsoSlideWidth*stretchPercent/100;}}}
1252$(document).on('click','.new-age-caption-overlay,.video-slide-overlay.center-playbutton-overlay',function(e){var videlem=$(this).siblings('.video-js');playVideoJS(videlem);fireEvent('userInteraction','video-play');});if(!this.domParent.find('.fso-slide-active'))$mySlides.eq(0).addClass('fso-slide-active');if(totalSlides>30&&this.domParent.find('.slide-selectors').length){tooManyAppleDots=true;$('body').addClass('fso-slider-too-many-apple-dots');}else{tooManyAppleDots=false;$('body').addClass('fso-slider-not-too-many-apple-dots');}
1253for(var i=0;i<totalSlides;i++){(function(){var $thisSlide=$mySlides.eq(i);$thisSlide.find('.image-holder').each(function(){if($(this).hasClass('js-dynamic-size-set'))return;$(this).addClass('js-dynamic-size-set').css('width',(Math.round(parseFloat($(this).attr('data-width'))/860*1000000)/10000)+'%');$(this).css('height',(Math.round(parseFloat($(this).attr('data-height'))/575*1000000)/10000)+'%');});if(window.deviceCustomType=='desktop'||tempThis.touchMode!='photoswipe'){$thisSlide.find('.image-holder img[data-src]').each(function(){var tempSize=determineImageSources(this);if(tempSize&&tempSize[1]!=tempSize[0]){$(this).after($(this).clone().removeAttr('src').removeAttr('data-src').attr('data-double-src',tempSize[1]).addClass('zoomer-image'));}});if($thisSlide.hasClass('js-starting-slide')){$thisSlide.addClass('double-loaded').find('.zoomer-image').each(function(){$(this).attr('src',$(this).attr('data-double-src')).addClass('loaded');});}}else{if($thisSlide.find('.image-holder').length==1)$thisSlide.addClass('js-single-image-slide');}})();}
1254var tempFirstSlide=this.determineFirstSlide();if(window.deviceCustomType=='desktop'||tempThis.touchMode!='photoswipe')loadSurroundingSlides(Math.max(0,tempFirstSlide-1));if(!globalIsIOS&&!globalIsSafari){for(var i=0;i<totalSlides;i++){(function(){if(window.deviceCustomType!='desktop'&&tempThis.touchMode=='photoswipe')return;var $thisSlide=$mySlides.eq(i);setTimeout(function(){$thisSlide.find('.image-item[data-src]:not(.loaded),.image-holder img[data-src]:not(.loaded)').each(function(){var $myThisSlide=$thisSlide;var $this=$(this);var imgSrc=$this.attr('data-src');if($this.attr('data-height'))imgSrc=determineImageSources(this)[0];logger.debug('preloading #1: '+imgSrc);if($this.attr('src')!=imgSrc){$this.on('load',function(){$this.parents('.image-holder').removeClass('js-preview');});$this.css('background','none').addClass('loading-image-hide').attr('src',imgSrc).addClass('loaded');}else{$this.css('background','none').addClass('loaded');$this.parents('.image-holder').removeClass('js-preview');}
1255$this.load(function(){$this.removeClass('loading-image-hide');});});},500*i);})();}}
1256if(this.circularClone){logger.debug('cloning slides and sheep');var slideRefs=[];$mySlides.each(function(){slideRefs.push(this);var $cloned=$(this).clone();$cloned.find('video').each(function(){var myPoster=$(this).attr('poster');if(!myPoster)return;var posterDom=document.createElement("img");posterDom.src=myPoster;posterDom.style.position='absolute';this.parentNode.replaceChild(posterDom,this);if(this.parentNode&&this.parentNode.tagName&&this.parentNode.tagName.toLowerCase()==='div')this.parentNode.style.position='absolute';});$cloned.find('[id]').each(function(){$(this).attr('id',$(this).attr('id')+'_cloned_after');});if($cloned.attr('id'))$cloned.attr('id',$cloned.attr('id')+'_cloned_after');if($cloned.attr('class')){$cloned.attr('class',$cloned.attr('class').replace(/fso-slide-([0-9]*)/,function(match1){return match1+'_cloned_after';}));}
1257if($cloned.attr('data-slide-id')){$cloned.attr('data-slide-id',$cloned.attr('data-slide-id')+'_cloned_after');}
1258$cloned.appendTo($slideHolderDom);});for(var i=slideRefs.length-1;i>=0;i--){var $cloned=$(slideRefs[i]).clone();$cloned.find('video').each(function(){var myPoster=$(this).attr('poster');if(!myPoster)return;var posterDom=document.createElement("img");posterDom.src=myPoster;posterDom.style.position='absolute';this.parentNode.replaceChild(posterDom,this);});$cloned.find('[id]').each(function(){$(this).attr('id',$(this).attr('id')+'_cloned_before');});if($cloned.attr('id'))$cloned.attr('id',$cloned.attr('id')+'_cloned_before');if($cloned.attr('class')){$cloned.attr('class',$cloned.attr('class').replace(/fso-slide-([0-9]*)/,function(match1){return match1+'_cloned_before';}));}
1259if($cloned.attr('data-slide-id')){$cloned.attr('data-slide-id',$cloned.attr('data-slide-id')+'_cloned_before');}
1260$cloned.prependTo($slideHolderDom);};}
1261var dots_html='',thumb_class;for(var i=0;i<totalSlides;i++){dots_html+='<a class="slide-link" href="#slide'+(i+1)+'"><div class="slide-thumb';if(thumb_class=$mySlides.eq(i).attr('data-slide-thumb')){dots_html+=' '+thumb_class;}
1262if(thumb_class=$mySlides.eq(i).attr('data-slide-thumb-style')){dots_html+='" style="'+thumb_class;}
1263dots_html+='"><div class="slide-thumb-image"></div></div></a> ';}
1264$slideSelectorElem.addClass('scrolling-dots').html('\
1265        <div class="slide-dot-over slide-dot-over-left">\
1266            <a class="slide-first-link"></a>\
1267            <a class="slide-prev-next slide-prev" href="#">Prev</a>\
1268        </div>\
1269        <div class="slide-dots-holder">\
1270            <div class="slide-dots-holder-outer">\
1271                <div class="slide-dots-holder-inner">'+dots_html+'</div>\
1272            </div>\
1273        </div>\
1274        <div class="slide-dot-over slide-dot-over-right">\
1275            <a class="slide-prev-next slide-next" href="#">Next</a>\
1276            <a class="slide-last-link"></a>\
1277        </div>\
1278        ');$('.slide-dot-over.slide-dot-over-left').eq(1).width($('.slide-prev-next.slide-prev').eq(1).width()+27);$('.slide-dot-over.slide-dot-over-right').eq(1).width($('.slide-prev-next.slide-next').eq(1).width()+37);if(this.zoomEnabled){allZoomedInAppleDots=this.domParent.find('.slide-dots-holder').eq(0).find('.slide-link');allNormalAppleDots=this.domParent.find('.slide-dots-holder').eq(1).find('.slide-link');}else{allNormalAppleDots=this.domParent.find('.slide-dots-holder').eq(0).find('.slide-link');}
1279var tempPos=allNormalAppleDots.eq(totalSlides-1).position();if(!tempPos){if(this.addControls)
1280window.console&&console.error&&console.error('ERROR: slider dot error!');}else{lastSlideOffset=allNormalAppleDots.eq(totalSlides-1).position().left;if(isRTL)lastSlideOffset=allNormalAppleDots.eq(0).position().left-lastSlideOffset;}
1281this.domParent.find('.slide-link').on('click',function(){fireEvent('userInteraction','click-apple-dot');var myLink=$(this).attr('href');if(myLink[0]!='#')return true;replaceHash(myLink.substring(1));return false;});$slideArrowHolder.on('click',function(e){e.preventDefault();e.stopPropagation();var isLeftArrow=$(this).hasClass('slide-left-arrow2');if(isLeftArrow){sliderMovePrev();}
1282if(!isLeftArrow){that.sliderMoveNext();}
1283fireEvent('userInteraction','arrow-click');return false;});this.domParent.find('.fso-slide-mobile-numbers .slide-total').text(totalSlides);this.domParent.find('.fso-slide-mobile-numbers .slide-num').text(1);$(window).on('hashchange',function(){fsoSliderHashChange();});var myFirstSlide=this.determineFirstSlide();if(myFirstSlide===1){$mySlideshowHolder.addClass('slider-first-slide');$slideshowMainElem.attr('data-slide-active',0);this.slideHasChanged();if(this.autoplayVideos&&$mySlides.eq(0).find('.video-js').length)startVideoForSlide(0);}else{if(!isIpad){fsoSliderGotoSlide(myFirstSlide-1,!($slideshowMainElem.hasClass('js-slideshow-preinited')));if(this.autoplayVideos&&$mySlides.eq(myFirstSlide-1).find('.video-js').length)startVideoForSlide(myFirstSlide-1);}else{fsoSliderGotoSlide(myFirstSlide-1,false);sliderPositionSlides(true);}}
1284this.domParent.find('.fso-slide-mobile-numbers').css('opacity',1);this.domParent.find('.slide-prev').on('click',function(e){e.preventDefault();sliderMovePrev();fireEvent('userInteraction','prev-click');});this.domParent.find('.slide-next').on('click',function(e){e.preventDefault();that.sliderMoveNext();fireEvent('userInteraction','next-click');});if(this.zoomEnabled){$('#pre_banner_wrapper').addClass('fso-zoomer');$('#addthis').addClass('fso-zoomer');$('#banner').addClass('fso-zoomer');$('#content_container').addClass('fso-zoomer');$('#admin-menu').addClass('fso-zoomer');if(this.zoomOnClick){$slideHolderDom.on('click',function(e){if($('body').hasClass('editing'))return true;if($('body').hasClass('slide-captions-only'))return true;if(!globalIsMobile&&e&&e.target&&$(e.target).attr('class')&&($(e.target).attr('class').indexOf('vjs')>=0||$(e.target).parent().attr('class').indexOf('templated-video-slide')>=0))return true;if(e&&e.target&&$(e.target).hasClass('ignore-zoom'))return true;if(e&&e.target&&$(e.target).parents('.ignore-zoom').length)return true;if(!fsoSliderZoomedIn){that.fsoSliderZoomIn();fireEvent('userInteraction','zoom-in');}else{that.fsoSliderZoomOut();fireEvent('userInteraction','zoom-out');}});}
1285this.domParent.find('.slide-zoomer').on('click',function(e){if(!fsoSliderZoomedIn){that.fsoSliderZoomIn();fireEvent('userInteraction','zoom-in');}else{that.fsoSliderZoomOut();fireEvent('userInteraction','zoom-out');}});this.domParent.find('.fso-slide-upper-bg .closebtn').on('click',function(e){fireEvent('userInteraction','zoom-out');that.fsoSliderZoomOut();});$(window).on('scroll',function(e){if(fsoSliderZoomedIn)that.fsoSliderZoomOut();});$(window).on('resize',function(e){if(fsoSliderZoomedIn){if(fsoSliderResizeTimer>0)clearTimeout(fsoSliderResizeTimer);fsoSliderResizeTimer=setTimeout(function(){$('.fso-slide-lower-bg .slide-selectors').css('left',$(window).width()/2-fsoSlideWidth/2)
1286var zoomRatio=that.fsoSliderCalculateZoomRatio();$slideshowMainElem.css('-moz-transform','-moz-translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)').css('-ms-transform','-ms-translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)').css('-o-transform','-o-translate(0px, '+-zoomRatio.verticalDelta+'px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)').css('transform','translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)').css('-webkit-transform','translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)');$('.additional-zoomer-elem').css('-moz-transform','-moz-translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)').css('-ms-transform','-ms-translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)').css('-o-transform','-o-translate(0px, '+-zoomRatio.verticalDelta+'px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)').css('transform','translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)').css('-webkit-transform','translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+', 1.0)');},300);}});}
1287if((document.location.host.match(/hotline.org/)||document.location.host.match(/firechrome.org/))&&navigator.userAgent.match(/Autoscreencapper/)&&document.location.hash.match(/slide/)){$('#content_container,#wide_footer,#footer').css('display','none');$('#header').css('overflow','hidden');}
1288$(document).on('keydown',function(e){if($('body').hasClass('editing-ip')||$('body').hasClass('editing')||$('body').hasClass('slide-captions-only'))return;var d=e.srcElement||e.target;if((d.tagName.toUpperCase()==='INPUT'&&(d.type.toUpperCase()==='TEXT'||d.type.toUpperCase()==='PASSWORD'||d.type.toUpperCase()==='FILE'))||d.tagName.toUpperCase()==='TEXTAREA'){return;}
1289if((e.which==37&&!isRTL)||(e.which==39&&isRTL)){e.preventDefault();sliderMovePrev();fireEvent('userInteraction','key-prev');}
1290else if((e.which==39&&!isRTL)||(e.which==37&&isRTL)){e.preventDefault();that.sliderMoveNext();fireEvent('userInteraction','key-next');}
1291else if(that.zoomOnClick&&e.which==27){e.preventDefault();if(fsoSliderZoomedIn)that.fsoSliderZoomOut();fireEvent('userInteraction','zoom-out');}
1292else if(that.zoomOnClick&&e.which==32){e.preventDefault();if(fsoSliderZoomedIn){that.fsoSliderZoomOut();fireEvent('userInteraction','zoom-out');}else{that.fsoSliderZoomIn();fireEvent('userInteraction','zoom-in');}}});this.domParent.find('.slide-first-link').on('click',function(e){replaceHash('slide1');fireEvent('userInteraction','click-first');return false;});this.domParent.find('.slide-last-link').on('click',function(e){replaceHash('slide'+totalSlides);fireEvent('userInteraction','click-last');return false;});if($('html').hasClass('device-iphone')){setTimeout(function(){var videoStartTime,videoInitialX;$('.vjs-poster').each(function(){var clone=this.cloneNode(true);this.parentNode.replaceChild(clone,this);});document.addEventListener('touchstart',function(e){if(e&&e.target&&e.target.classList&&e.target.classList.contains('vjs-poster')){videoStartTime=(new Date()).getTime();videoInitialX=e.changedTouches[0].pageX;}},true);document.addEventListener('touchend',function(e){if(e&&e.target&&e.target.classList&&e.target.classList.contains('vjs-poster')){if(((new Date()).getTime()-videoStartTime<200)&&(Math.abs(videoInitialX-e.changedTouches[0].pageX)<20)){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var thisVideo=$(e.target).parents('slide').removeClass('paused').addClass('playing').find('video')[0];if(!thisVideo)return false;thisVideo.play();if(!thisVideo.classList.contains('suspend-wired')){thisVideo.addEventListener('suspend',function(e){setTimeout(function(){$(thisVideo).parents('slide').addClass('paused');},500);});thisVideo.classList.add('suspend-wired');}
1293return false;}}},true);},3000);}
1294if($('html').hasClass('device-ipad')){new function(){document.addEventListener('touchstart',function(e){if(e&&e.target&&(e.target.tagName==='VIDEO'||e.target.classList.contains('vjs-poster'))){e.target.onplay=function(){var all=document.getElementsByClassName('new-age-caption-overlay new-age-caption-overlay-reverse');for(var i=0,max=all.length;i<max;i++){all[i].style.visibility='hidden';}};e.target.onpause=function(){var all=document.getElementsByClassName('new-age-caption-overlay new-age-caption-overlay-reverse');for(var i=0,max=all.length;i<max;i++){all[i].style.visibility='visible';}};}},true);return;var videoStartTime,videoInitialX;document.addEventListener('touchstart',function(e){if(e&&e.target&&(e.target.tagName==='VIDEO'||e.target.classList.contains('vjs-poster'))){videoStartTime=(new Date()).getTime();videoInitialX=e.changedTouches[0].pageX;}},true);document.addEventListener('touchend',function(e){if(e&&e.target&&e.target.tagName==='VIDEO'){if(((new Date()).getTime()-videoStartTime<200)&&(Math.abs(videoInitialX-e.changedTouches[0].pageX)<20)){e.target.controls=true;e.target.play();e.target.parentNode.classList.add('ios-video-playing');e.target.parentNode.parentNode.parentNode.classList.add('ios-video-playing');var thisVideo=e.target;e.target.addEventListener('pause',function(e){thisVideo.controls=false;
1294thisVideo.parentNode.classList.remove('ios-video-playing');thisVideo.parentNode.parentNode.parentNode.classList.remove('ios-video-playing');});}}else{if(e&&e.target&&e.target.classList.contains('vjs-poster')){if(((new Date()).getTime()-videoStartTime<200)&&(Math.abs(videoInitialX-e.changedTouches[0].pageX)<20)){var thisVideo=$(e.target).parent().find('video')[0];$(thisVideo).parent().addClass('ios-video-playing');$(thisVideo).parent().parent().parent().addClass('ios-video-playing');thisVideo.addEventListener('pause',function(e){thisVideo.controls=false;$(thisVideo).parent().removeClass('ios-video-playing');$(thisVideo).parent().parent().parent().removeClass('ios-video-playing');});}}}},true);}();}
1295$mySlides.find('.item,.inactive-dot').each(function(){var $this=$(this);if($this.attr('width')){$this.css('width',$this.attr('width'));$this.removeAttr('width');}
1296if($this.attr('height')){$this.css('height',$this.attr('height'));$this.removeAttr('height');}
1297var myElem=$(this)[0];for(var a in attrs){var myVal=myElem.style[attrs[a]];if(!myVal)continue;myVal=myVal.replace(/px/,'');if(attrs[a]=='width'&&myVal==0)continue;if(attrs[a]=='height'&&myVal==0)continue;if(myVal=='auto'||parseInt(myVal)==NaN)continue;$this.attr('data-'+attrs[a],parseInt(myVal));}});if(globalHas3d)
1298$slideshowMainElem.css(Modernizr.prefixed('transform'),'none');this.resize();if(window.deviceCustomType=='desktop'){$(window).on('resize',function(){that.resize();});}
1299$active=$('.fso-slide-active .video-js:not(.video-js-inited)');if($active.length>0){initVideoJS($active[0]);}
1300setTimeout(function(){$('slide .video-js:not(.video-js-inited)').each(function(){initVideoJS(this);});},3000);$(window).on('orientationchange',function(){setTimeout(function(){that.resize();},500);});if(globalHas3d&&Modernizr.csstransitions)
1301$slideshowMainElem.css(Modernizr.prefixed('transition'),globalTransitionTransformProps[Modernizr.prefixed('transform')]+' 1s cubic-bezier(0.165, 0.840, 0.440, 1.000)');$slideshowMainElem.css('opacity',1);var hammertime;if(Modernizr.touch){if(window.deviceCustomType!='desktop'&&this.touchMode=='photoswipe'){loadJS('/theme/js/hammer-v2.0.4.min.js',function(){hammertime=new Hammer($mySlideshowWrapper[0]);hammertime.on('tap doubletap press swipe',function(e){if(e.target&&e.target.classList){if(e.target.classList.contains('menu-label')&&!e.target.classList.contains('no-mobile-interaction')){var $mySlideParent=$(e.target).parents('slide').addClass('show');openLightbox($mySlideParent,'<div class="mobile-pac-menu"><ul></ul></div>');$('.mobile-caption-lightbox-overlay').addClass('menu-lightbox');$('.menu-bar-wrapper .menu-bar-item').each(function(){$('.mobile-pac-menu ul').append('<li class="mobile-menu-link" data-class="'+
1302$(this).attr('data-class')+'">'+$(this).html()+'</li>');});e.preventDefault();return false;}
1303if(e.target.classList.contains('mobile-menu-link')){switch($(e.target).attr('data-class')){case'menu-show':if(currentActiveSlideIdx!=8){inTouch=false;fsoSliderGotoSlide(7,false);sliderPositionSlides(true);}
1304break;case'lad-show':if(currentActiveSlideIdx!=10){inTouch=false;fsoSliderGotoSlide(9,false);sliderPositionSlides(true);}
1305break;case'hi-show':if(currentActiveSlideIdx!=24){inTouch=false;fsoSliderGotoSlide(23,false);sliderPositionSlides(true);}
1306break;case'aola-show':if(currentActiveSlideIdx!=53){inTouch=false;fsoSliderGotoSlide(52,false);sliderPositionSlides(true);}
1307break;case'asho-show':if(currentActiveSlideIdx!=34){inTouch=false;fsoSliderGotoSlide(33,false);sliderPositionSlides(true);}
1308break;}
1309return;}}
1310if(!window.galleryItems)return console.error('we are too early');if($(e.target).hasClass('cancel-photoswipe-zoom')||$(e.target).parents('.cancel-photoswipe-zoom').length)return;window.gallery=new PhotoSwipe(document.querySelectorAll('.pswp')[0],PhotoSwipeUI_Default,galleryItems,{index:Math.max(0,currentActiveSlideIdx),history:false,});gallery.listen('afterChange',function(){currentActiveSlideIdx=gallery.getCurrentIndex();replaceHash('slide'+(currentActiveSlideIdx+1));var captionLength=$mySlides.eq(currentActiveSlideIdx).find('.text-item').text();if(captionLength&&captionLength.length>500){$('.pswp .pswp__caption__center').addClass('small-captions');}else{$('.pswp .pswp__caption__center').removeClass('small-captions');}
1311if($(document).width()<=768&&currentActiveSlideIdx!=0&&window.location.href!="/churches/bringing-scientology-world/scientology-media-productions.html"){$('.pswp__caption__center').html($mySlides.eq(currentActiveSlideIdx).find('.text-item').html());$('.pswp__caption').removeClass('pswp__caption--empty');$mySlides.eq(currentActiveSlideIdx).find('.text-item').addClass('pswp__caption--empty');}
1312if($(document).width()<=768&&currentActiveSlideIdx==0&&$mySlides.eq(currentActiveSlideIdx).find('.single-video-slide-caption').length>0){$('.pswp__caption__center').html('');}});gallery.listen('close',function(){$('.fso-slide-mobile-numbers').html($('.pswp__counter').text());$slideshowMainElem.addClass('force-show-spinner');$slideshowMainElem.find('.slide-stretcher-outer').removeClass('invisible');currentActiveSlideIdx=gallery.getCurrentIndex();$('slide.fso-slide-active').removeClass('fso-slide-active');$mySlides.eq(currentActiveSlideIdx).addClass('fso-slide-active');$mySlides.eq(currentActiveSlideIdx).find('img[data-src]:not([src])').each(function(){var $this=$(this);var imgSrc=$this.attr('data-src');if($this.attr('data-height')&&window.determineImageSources)imgSrc=determineImageSources(this)[0];$this.attr('src',imgSrc);});setTimeout(function(){$slideshowMainElem.removeClass('force-show-spinner');},500);hammertime.options.enable=true;});$slideshowMainElem.find('.slide-stretcher-outer').addClass('invisible');hammertime.options.enable=false;gallery.init();return false;});});}else{$slideHolderDom.find('slide').each(function(){if($(this).find('.text-item').length){$(this).append('<div class="text-info-mobile glyphicon-info-sign"></div>');}
1313if($(this).hasClass('slide-template-new-c-with-band')&&$(this).find('.floater-texter.editable').length){$(this).append('<div class="text-info-mobile glyphicon-info-sign"></div>');}});slideshowMainElem.addEventListener('touchstart',function(e){onTouchStart(e);fireEvent('userInteraction','touch-start');return false;},true);slideshowMainElem.addEventListener('touchmove',function(e){onTouchMove(e);return false;},true);slideshowMainElem.addEventListener('touchend',function(e){onTouchEnd(e);return false;},true);slideshowMainElem.addEventListener('touchcancel',function(e){onTouchEnd(e);return false;},true);
1313document.addEventListener('touchend',function(e){if(Math.abs(window.scrollY-slideshowScrollTop)<20){window.scrollTo(window.scrollX,slideshowScrollTop);}
1314if(!e||!e.target||!e.target.classList)return;if(isIpad){if(inTouch&&$(e.target).parents('slide').length){onTouchEnd(e);return;}
1315if(e.target.classList.contains('slide-arrow-holder')||$(e.target).parents('.slide-arrow-holder').length){var $me=$(e.target);if($me.hasClass('slide-left-arrow2')||$me.parents('.slide-left-arrow2').length){sliderMovePrev();}else{that.sliderMoveNext();}
1316e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();return false;}
1317if(e.target.classList.contains('menu-label')&&!e.target.classList.contains('no-mobile-interaction')){$slideshowMainElem.addClass('always-show');e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();return;}}
1318if(e.target.classList.contains('menu-label')&&!e.target.classList.contains('no-mobile-interaction')){var $mySlideParent=$(e.target).parents('slide').addClass('show');openLightbox($mySlideParent,'<div class="mobile-pac-menu"><ul></ul></div>');$('.mobile-caption-lightbox-overlay').addClass('menu-lightbox');$('.fso-slide-imagemap.show-overlay-mobile-menu .active-dot.active-dot-slider').each(function(){$('.mobile-pac-menu ul').append('<li class="mobile-menu-link" data-class="'+
1319$(this).attr('data-class')+'">'+$(this).html()+'</li>');});$('.mobile-pac-menu ul').append('<li class="mobile-menu-link" data-class="menu-show">Menu</li>');e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();return false;}
1320if(e.target.classList.contains('mobile-menu-link')){closeLightbox($('slide.show').removeClass('show'));switch($(e.target).attr('data-class')){case'menu-show':if(currentActiveSlideIdx!=8){inTouch=false;fsoSliderGotoSlide(7,false);sliderPositionSlides(true);}
1321break;case'lad-show':if(currentActiveSlideIdx!=10){inTouch=false;fsoSliderGotoSlide(9,false);sliderPositionSlides(true);}
1322break;case'hi-show':if(currentActiveSlideIdx!=24){inTouch=false;fsoSliderGotoSlide(23,false);sliderPositionSlides(true);}
1323break;case'aola-show':if(currentActiveSlideIdx!=53){inTouch=false;fsoSliderGotoSlide(52,false);sliderPositionSlides(true);}
1324break;case'asho-show':if(currentActiveSlideIdx!=34){inTouch=false;fsoSliderGotoSlide(33,false);sliderPositionSlides(true);}
1325break;}
1326return;}
1327if(e.target.classList.contains('text-info-mobile')){var $mySlideParent=$(e.target).parents('slide').addClass('show');if(true||$mySlideParent.find('div.text-item').text().length>200){if($mySlideParent.hasClass('slide-template-new-c-with-band')&&$mySlideParent.find('.floater-texter.editable').length){openLightbox($mySlideParent,$mySlideParent.find('.floater-texter.editable').html());}else{openLightbox($mySlideParent,$mySlideParent.find('div.text-item').html());}}else{$('body').addClass('mobile-text-info-showing');}
1328e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();return false;}
1329if(e.target.classList.contains('text-item')||e.target.classList.contains('mobile-caption-lightbox-overlay')||$(e.target).parents('.mobile-caption-lightbox-overlay').length){closeLightbox($('slide.show').removeClass('show'));$('body').removeClass('mobile-text-info-showing');e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();return false;}},true);}}
1330if(globalIsIOS){$slideHolderDom.find('slide video').css('display','none');$slideHolderDom.find('slide .vjs-poster').css('display','block');}
1331logger.debug('responsive-slider.js end of init()');}
1332me.determineFirstSlide=function(){if(this.startSlide)return this.startSlide;if((globalGetParams.video||globalGetParams['video-play'])&&$slideshowMainElem.find('slide .video-js').length>0){var myVideoParam=globalGetParams.video||globalGetParams['video-play'];var slideMatching=_.reduce($slideshowMainElem.find('slide .video-js'),function(m,v){if(m!=null)return m;var mySlideId=$mySlides.index($(v).parents('slide'));var cloned=$(v).parents('slide')&&$(v).parents('slide')[0].className&&$(v).parents('slide')[0].className.indexOf("clone")!=-1;if(getVideoIdForSlide(mySlideId)==myVideoParam&&!cloned)return mySlideId;},null);if(slideMatching!==void 0){if(this.autoplayVideos)startVideoForSlide(slideMatching);return parseInt(slideMatching)+1;}
1333if(globalGetParams.slide){replaceVideoSource(globalGetParams.slide-1,myVideoParam);if(this.autoplayVideos)startVideoForSlide(globalGetParams.slide-1);return globalGetParams.slide;}
1334replaceVideoSource(0,myVideoParam);return 1;}
1335if(location.hash){var newSlideIdx=parseInt(location.hash.substring(1).replace(/slide/,''))-1;if(!isNaN(newSlideIdx)&&newSlideIdx>=0&&newSlideIdx<=totalSlides-1)
1336return newSlideIdx+1;}
1337return 1;}
1338function getVideoIdForSlide(slideId){var $myElem=$mySlides.eq(slideId).find('.video-js');if(!$myElem)return null;var thisVideo=$myElem.attr('class')&&$myElem.attr('class').match(/vjs-vi
1338deo-id-[^ ]*/);return thisVideo&&thisVideo.length?thisVideo[0].replace(/vjs-video-id-/,''):null;}
1339function startVideoForSlide(slideId){if(globalIsIOS)return;logger.debug('startVideoForSlide, '+slideId);var $myVideoJsElem=$mySlides.eq(slideId).find('.video-js');if($myVideoJsElem.length==0)return;var videosPlayed=(cookieMonster.get('gsc_headers_videos_autoplayed')||'');var videoId=getVideoIdForSlide(slideId);if(!globalGetParams['video-play']&&_.contains(videosPlayed.split(','),videoId))return;if(!(_.contains(videosPlayed.split(','),videoId)))
1340videosPlayed=videosPlayed+(videosPlayed==""?"":",")+videoId;fireEvent('videoAutoplay');playVideoJS($myVideoJsElem);}
1341function stopVideoForSlide(slideId){logger.debug('stopVideoForSlide, '+slideId);var $myVideoJsElem=$mySlides.eq(slideId).find('.video-js');if($myVideoJsElem.length==0)return;var videoInst;if($myVideoJsElem.prop('tagName')!=='VIDEO'){videoInst=videojs($myVideoJsElem.get(0));}
1342if(videoInst)videoInst.pause();}
1343function replaceVideoSource(slideId,videoId){if(!window.globalVideoSrc)return;logger.debug('replaceVideoSource, '+slideId+', '+videoId);var $myVideoJsElem=$mySlides.eq(slideId).find('.video-js');var videoInst;if($myVideoJsElem.prop('tagName')!=='VIDEO'){var videoInst=videojs($mySlides.eq(slideId).find('.video-js').get(0));}
1344var oldVideoId=getVideoIdForSlide(slideId);$mySlides.eq(slideId).find('.video-js').removeClass('vjs-video-id-'+oldVideoId).addClass('vjs-video-id-'+videoId);if(videoInst){if(globalVideoSrc.match(/.*\.mp4.*/)){videoInst.src({type:'video/mp4',src:globalVideoSrc});}else{videoInst.src(globalVideoSrc);}}else{if(globalVideoSrc.match(/.*\.mp4.*/)){$myVideoJsElem.find('source').eq(0).attr('src',globalVideoSrc).attr('type','video/mp4');$myVideoJsElem.find('source:not([src="'+globalVideoSrc+'"])').remove();}else{$myVideoJsElem.find('source').eq(0).attr('src',globalVideoSrc);}}
1345try{if(videoInst){window.globalVideoThumb&&videoInst.poster(globalVideoThumb);}else{window.globalVideoThumb&&$myVideoJsElem.attr('poster',globalVideoThumb);}}catch(swallow){}
1346if(videoInst){$mySlides.eq(slideId).find('.vjs-poster').css('display','block');}
1347return;}
1348function openLightbox($aDomParent,aInnards){$aDomParent.addClass('show-lightbox');$('body').addClass('show-lightbox-caption').append('\
1349            <div class="mobile-caption-lightbox-overlay">\
1350                <table class="mobile-caption-lightbox-inner">\
1351                    <tr class="mobile-caption-lightbox-filler"></tr>\
1352                    <tr class="mobile-caption-lightbox"><td></td></tr>\
1353                    <tr class="mobile-caption-lightbox-filler"></tr>\
1354                </table>\
1355            </div>');$('.mobile-caption-lightbox td').html(aInnards);}
1356function closeLightbox($aDomParent){$aDomParent.removeClass('show-lightbox');$('body').removeClass('show-lightbox-caption');$('.mobile-caption-lightbox-overlay').remove();}
1357var initialX,currentX,startTime,myMinSlideLeft,borkedTouch=false,myTextReset=true,inTouch=false;function canTouchThis(e){return e.target.tagName=='SLIDE'||$(e.target).parents('slide').length;}
1358var start_touchx=null,start_touchy=null,max_touchx=0,max_touchy=0,locked_x=false,locked_y=false;function onTouchStart(e){if(borkedTouch||!canTouchThis(e))return;if(e.touches.length>1){borkedTouch=true;return onTouchEnd(e);}
1359if(inTouch)globalAnimationController.cancelAnimation($('.slide-holder'));currentX=initialX=e.changedTouches[0].pageX;startTime=(new Date()).getTime();borkedTouch=false;inTouch=true;sliderPositionSlides(true);start_touchx=e.touches[0].clientX;start_touchy=e.touches[0].clientY;max_touchx=0;max_touchy=0;locked_x=false;locked_y=false;}
1360function onTouchMove(e){if(!inTouch||borkedTouch)return;if(e.touches.length>1)return onTouchEnd(e);if(locked_y)return true;max_touchx=Math.max(max_touchx,Math.abs(e.changedTouches[0].clientX-start_touchx));max_touchy=Math.max(max_touchy,Math.abs(e.changedTouches[0].clientY-start_touchy));if(!locked_x&&!locked_y&&max_touchx>12){locked_x=true;}
1361if(!locked_x&&!locked_y&&max_touchy>12){locked_y=true;mySlideholderElem.style[myTransform]='translate3d('+
1362((isRTL?1:-1)*(parseInt(-slideholderDelta/2)+currentActiveSlideIdx*fsoSlideWidth2+
1363(isCloned?totalSlides*fsoSlideWidth2:0)))+'px,0px,0px)';return;}
1364var myX=e.changedTouches[0].pageX;currentX=myX;var myLeft=myX-initialX;if(currentActiveSlideIdx==0&&((isRTL&&myLeft<10)||(!isRTL&&myLeft>10))){myLeft-=myLeft*0.7;}
1365if(currentActiveSlideIdx==totalSlides-1&&((isRTL&&myLeft>10)||(!isRTL&&myLeft<10))){myLeft-=myLeft*0.7;}
1366mySlideholderElem.style[myTransform]='translate3d('+
1367(myLeft+(isRTL?1:-1)*(parseInt(-slideholderDelta/2)+currentActiveSlideIdx*fsoSlideWidth2+
1368(isCloned?totalSlides*fsoSlideWidth2:0)))+'px,0px,0px)';if(locked_x)e.preventDefault();}
1369function onTouchEnd(e){if(!inTouch)return;if(e.touches.length==0)borkedTouch=false;if(e&&e.target&&e.target.classList&&e.target.classList.contains&&e.target.classList.contains('skip-touch-handling')){return false;}
1370var myEndTime=(new Date()).getTime();var myTotalTime=myEndTime-startTime;var myXPitch=currentX-initialX;var mySlideNum=currentActiveSlideIdx;if(myXPitch>fsoSlideWidth2/2){mySlideNum+=(isRTL?1:-1);}else if(myXPitch<-fsoSlideWidth2/2){mySlideNum+=(isRTL?-1:1);}
1371var isSwipe=false;if(myTotalTime<400&&Math.abs(myXPitch)>20){isSwipe=true;if(myXPitch>20){mySlideNum=currentActiveSlideIdx+(isRTL?1:-1);}else{mySlideNum=currentActiveSlideIdx+(isRTL?-1:1);}}
1372if(mySlideNum<0){mySlideNum=0;}else if(mySlideNum>=totalSlides){mySlideNum=totalSlides-1;}
1373myNewLeft=(isRTL?1:-1)*(parseInt(-slideholderDelta/2)+mySlideNum*fsoSlideWidth2);if(isCloned)myNewLeft+=(isRTL?1:-1)*totalSlides*fsoSlideWidth2;if(false&&isSwipe){if(currentActiveSlideIdx!=mySlideNum){fsoSliderGotoSlide(mySlideNum,false);}
1374sliderPositionSlides(true);}else{globalAnimationController.animate2d($('.slide-holder'),{x:myNewLeft,y:0},(isSwipe?'.4s cubic-bezier(0.23, 1, 0.32, 1)':'.5s cubic-bezier(0.23, 1, 0.32, 1)'),function(){if(currentActiveSlideIdx!=mySlideNum){fsoSliderGotoSlide(mySlideNum,false);$('.fso-slide-active').removeClass('fso-slide-active');$mySlides.eq(mySlideNum).addClass('fso-slide-active');}
1375sliderPositionSlides(true);inTouch=false;});}}
1376me.resize=function(){if(!this.hasLeftSidebar){fsoSlideWidth=this.slidesMax860?Math.min(860,$slideshowMainElem.width()):$slideshowMainElem.width();xRatio=fsoSlideWidth/860;var fsoSlideWrapperWidth=$slideshowMainElem.width();var windowHeight=$(window).height();if(windowHeight<parseInt(this.fsoSliderZoomHeight*xRatio)){xRatio=windowHeight/this.fsoSliderZoomHeight;fsoSlideWidth=parseInt(xRatio*860);fsoSlideWrapperWidth=$(window).width();}
1377fsoSlideWidth2=$mySlides.eq(0).outerWidth(true);slideholderDelta=fsoSlideWrapperWidth-fsoSlideWidth;if(isIpad)slideholderDelta=0;}else{var currentWidth=$('#banner').width();fsoSlideWidth=fsoSlideWidth2=$mySlides.eq(0).outerWidth(true);xRatio=fsoSlideWidth/860;slideholderDelta=0;}
1378slideshowScrollTop=slideshowMainElem.offsetTop;if(globalIsIE)return;if(!window.getCSSRule||/Trident/.test(navigator.userAgent)){var style=document.createElement('style');style.appendChild(document.createTextNode(''));document.head.appendChild(style);var sheet=style.sheet;sheet.insertRule('.slide-wrapper slide.slide-templated-new .text-item.animation-left-hold { '+'opacity: 0 !important; '+'transform: translate3d('+((isRTL?1:-1)*fsoSlideWidth2)+'px, 30px, 0px) !important; '+'}',0);if(!window.cancelVerticalCaptionCentering&&document.body.className.match(/templated-slider-build-2-1/)){sheet.insertRule('.slide-wrapper slide.slide-templated-new .text-item.animation-left-hold.js-vertical-middle { '+'opacity: 0 !important; '+'transform: translate3d('+((isRTL?1:-1)*fsoSlideWidth2)+'px, -25%, 0px) !important; '+'}',1);}
1379sheet.insertRule('.slide-wrapper slide.slide-templated-new .text-item.animation-right-hold { '+'opacity: 0 !important; '+'transform: translate3d('+((isRTL?-1:1)*fsoSlideWidth2)+'px, 30px, 0px) !important; '+'}',2);if(!window.cancelVerticalCaptionCentering&&document.body.className.match(/templated-slider-build-2-1/)){sheet.insertRule('.slide-wrapper slide.slide-templated-new .text-item.animation-right-hold.js-vertical-middle { '+'opacity: 0 !important; '+'transform: translate3d('+((isRTL?-1:1)*fsoSlideWidth2)+'px, -25%, 0px) !important; '+'}',3);}
1380sheet.insertRule('.slide-wrapper slide.slide-templated-new .text-item.animation-left-hold2 { '+'opacity: 1 !important; '+'transform: translate3d('+((isRTL?1:-1)*fsoSlideWidth2)+'px, 0px, 0px) !important; '+'}',4);if(!window.cancelVerticalCaptionCentering&&document.body.className.match(/templated-slider-build-2-1/)){sheet.insertRule('.slide-wrapper slide.slide-templated-new .text-item.animation-left-hold2.js-vertical-middle { '+'opacity: 1 !important; '+'transform: translate3d('+((isRTL?1:-1)*fsoSlideWidth2)+'px, -50%, 0px) !important; '+'}',5);}
1381sheet.insertRule('.slide-wrapper slide.slide-templated-new .text-item.animation-right-hold2 { '+'opacity: 1 !important; '+'transform: translate3d('+((isRTL?-1:1)*fsoSlideWidth2)+'px, 0px, 0px) !important; '+'}',6);if(!window.cancelVerticalCaptionCentering&&document.body.className.match(/templated-slider-build-2-1/)){sheet.insertRule('.slide-wrapper slide.slide-templated-new .text-item.animation-right-hold2.js-vertical-middle { '+'opacity: 1 !important; '+'transform: translate3d('+((isRTL?-1:1)*fsoSlideWidth2)+'px, -50%, 0px) !important; '+'}',7);}}else{if(!this.useSimpleSliding&&!globalIsMobile&&globalHas3d&&Modernizr.csstransitions){var prefixedTransform=globalTransitionTransformProps[Modernizr.prefixed('transform')];getCSSRule('.slide-wrapper slide .item.text-item.animation-left-hold').style.cssText='opacity: 0 !important; '+prefixedTransform+': translate3d('+((isRTL?1:-1)*fsoSlideWidth2)+'px, 30px, 0px) !important;';if(!window.cancelVerticalCaptionCentering&&document.body.className.match(/templated-slider-build-2-1/)&&getCSSRule('.slide-wrapper slide .item.text-item.animation-left-hold.js-vertical-middle'))getCSSRule('.slide-wrapper slide .item.text-item.animation-left-hold.js-vertical-middle').style.cssText='opacity: 0 !important; '+prefixedTransform+': translate3d('+((isRTL?1:-1)*fsoSlideWidth2)+'px, -25%, 0px) !important;';getCSSRule('.slide-wrapper slide .item.text-item.animation-right-hold').style.cssText='opacity: 0 !important; '+prefixedTransform+': translate3d('+((isRTL?-1:1)*fsoSlideWidth2)+'px, 30px, 0px) !important;';if(!window.cancelVerticalCaptionCentering&&document.body.className.match(/templated-slider-build-2-1/)&&getCSSRule('.slide-wrapper slide .item.text-item.animation-right-hold.js-vertical-middle'))getCSSRule('.slide-wrapper slide .item.text-item.animation-right-hold.js-vertical-middle').style.cssText='opacity: 0 !important; '+prefixedTransform+': translate3d('+((isRTL?-1:1)*fsoSlideWidth2)+'px, -25%, 0px) !important;';getCSSRule('.slide-wrapper slide .item.text-item.animation-left-hold2').style.cssText='opacity: 1 !important; '+prefixedTransform+': translate3d('+((isRTL?1:-1)*fsoSlideWidth2)+'px, 0px, 0px) !important;';if(!window.cancelVerticalCaptionCentering&&document.body.className.match(/templated-slider-build-2-1/)&&getCSSRule('.slide-wrapper slide .item.text-item.animation-left-hold2.js-vertical-middle'))getCSSRule('.slide-wrapper slide .item.text-item.animation-left-hold2.js-vertical-middle').style.cssText='opacity: 1 !important; '+prefixedTransform+': translate3d('+((isRTL?1:-1)*fsoSlideWidth2)+'px, -50%, 0px) !important;';getCSSRule('.slide-wrapper slide .item.text-item.animation-right-hold2').style.cssText='opacity: 1 !important; '+prefixedTransform+': translate3d('+((isRTL?-1:1)*fsoSlideWidth2)+'px, 0px, 0px) !important;';if(!window.cancelVerticalCaptionCentering&&document.body.className.match(/templated-slider-build-2-1/)&&getCSSRule('.slide-wrapper slide .item.text-item.animation-right-hold2.js-vertical-middle'))getCSSRule('.slide-wrapper slide .item.text-item.animation-right-hold2.js-vertical-middle').style.cssText='opacity: 1 !important; '+prefixedTransform+': translate3d('+((isRTL?-1:1)*fsoSlideWidth2)+'px, -50%, 0px) !important;';}}
1382fsoSliderRecalculateAppleDots();fsoSliderFixAppleDots(currentActiveSlideIdx);$allNonImageElems.each(function(){resizeElem($(this));});$allImageElems.each(function(){if($(this).hasClass('loaded')){resizeElem($(this));}else{if(!/Trident/.test(navigator.userAgent)){$(this).load(function(){resizeElem($(this));});}else{setTimeout(function(){resizeElem($(this));},1000);setTimeout(function(){resizeElem($(this));},2000);setTimeout(function(){resizeElem($(this));},5000);}}});$('.slide-arrow-holder .arrow-bg').width(parseInt(slideholderDelta/2)+50);if(slideholderDelta>0){$('.slide-arrow-holder .arrow-bg').addClass('gradiented');}else{$('.slide-arrow-holder .arrow-bg').removeClass('gradiented');}
1383sliderPositionSlides();}
1384function resizeElem($elem){if($elem.hasClass('js-dynamic-size-set'))return;for(var a in attrs){var myAttrsName=attrs[a];var myVal=$elem.attr('data-'+myAttrsName);if(myVal==null||myVal=='NaN')continue;if($elem.hasClass('dynamically-sized')){myVal=Math.floor(myVal/xRatio);$elem.attr('data-'+myAttrsName,myVal);setTimeout(function(){$elem.removeClass('dynamically-sized');},1000);}
1385$elem.css(myAttrsName,Math.floor(myVal*xRatio));}}
1386function loadSurroundingSlides(aSlideNum){if(window.deviceCustomType!='desktop')return;logger.debug('loading surround: '+aSlideNum);var startNum=Math.min(Math.max(aSlideNum-2,0),totalSlides-5);sliderReloadCounter=0;$slideshowMainElem.removeClass('all-loaded');for(var i=startNum;i<startNum+5;i++){var $thisSlide=$mySlides.eq(i);$thisSlide.find('.image-item[data-src]:not(.loaded),.image-holder img[data-src]:not(.loaded)').each(function(){sliderReloadCounter++;var $myThisSlide=$thisSlide;var $this=$(this);$this.css('background','none').css('visibility','hidden');if(!/Trident/.test(navigator.userAgent)){$this.load(function(){$this.css('visibility','visible');var $myMyThisSlide=$myThisSlide;sliderLoaded();});}
1387$(this).load(function(){$(this).removeClass('loading-image-hide');$(this).parents('.image-holder').removeClass('js-preview');});var imgSrc=$this.attr('data-src');if($this.attr('data-height')&&window.determineImageSources)imgSrc=determineImageSources(this)[0];logger.debug('preloading surround: '+imgSrc);$this.addClass('loading-image-hide').attr('src',imgSrc).addClass('loaded');if(/Trident/.test(navigator.userAgent)){setTimeout(function(){$this.css('visibility','visible');var $myMyThisSlide=$myThisSlide;sliderLoaded();},3000);}
1388if($this.parents('.image-holder').length){var $double=$this.parents('.image-holder').find('.zoomer-image');(function(){setTimeout(function(){loadImage($double);}
1388,(fsoSliderZoomedIn?0:500)+i*(fsoSliderZoomedIn?20:100));})();}});}
1389if(sliderReloadCounter==0)$slideshowMainElem.addClass('all-loaded');}
1390function sliderLoaded(){if(--sliderReloadCounter==0)$slideshowMainElem.addClass('all-loaded');}
1391function sliderMovePrev(){if(currentActiveSlideIdx==0&&!isCloned)return;if(currentActiveSlideIdx>0){return replaceHash('slide'+currentActiveSlideIdx);}
1392globalAnimationController.cancelAnimation($slideHolderDom);var deltaX=(isRTL?-2:2)*totalSlides*100;slideHolderDom.style[Modernizr.prefixed('transition')]='none';slideHolderDom.offsetHeight;slideHolderDom.style[Modernizr.prefixed('transform')]='translate3d(-'+deltaX+'%, 0, 0)';slideHolderDom.offsetHeight;replaceHash('slide'+totalSlides);}
1393me.sliderMovePrev=sliderMovePrev;me.sliderMoveNext=function(){if(currentActiveSlideIdx==totalSlides-1&&!isCloned)return;if(currentActiveSlideIdx<totalSlides-1){return replaceHash('slide'+(currentActiveSlideIdx+2));}
1394globalAnimationController.cancelAnimation($slideHolderDom);var deltaX=(isRTL?-1:1)*(totalSlides-1)*100;slideHolderDom.style[Modernizr.prefixed('transition')]='none';slideHolderDom.offsetHeight;slideHolderDom.style[Modernizr.prefixed('transform')]='translate3d(-'+deltaX+'%, 0, 0)';slideHolderDom.offsetHeight;replaceHash('slide1');}
1395function sliderEndAnimation(aForce){if(ipAnimation==0&&!aForce)return;if(ipAnimation!=0)clearTimeout(ipAnimation);if(fsoSliderZoomTimeout>0)clearTimeout(fsoSliderZoomTimeout);$('.sliding .item').removeClass('move-left-fade-out move-right-fade-out move-left-fade-in move-right-fade-in move-left move-right text-left-effect text-right-effect');if(globalHas3d&&Modernizr.csstransitions)
1396$('.sliding .item').css(Modernizr.prefixed('transform'),'none').css(Modernizr.prefixed('transition'),'none');if(globalHas3d)
1397$('.sliding').css(Modernizr.prefixed('transform'),'none');$('.sliding').removeClass('sliding');sliderPositionSlides();ipAnimation=0;}
1398function sliderPositionSlides(mobileOptimize){if(Modernizr.csstransitions&&mySlideholderElem.style[Modernizr.prefixed('transition')]!='none')
1399mySlideholderElem.style[Modernizr.prefixed('transition')]='none';var deltaX=(isRTL?1:-1)*fsoSlideWidth2*currentActiveSlideIdx;if(isCloned){deltaX+=(isRTL?1:-1)*totalSlides*fsoSlideWidth2;}
1400if(globalHas3d&&Modernizr.csstransitions){mySlideholderElem.style[Modernizr.prefixed('transform')]='translate3d('+deltaX+'px,0,0)';}else{if(window.globalGetParams&&globalGetParams.headless){mySlideholderElem.style[Modernizr.prefixed('transform')]='translate3d('+deltaX+'px,0,0)';}else{mySlideholderElem.style.left=deltaX+'px';}}
1401if(!mobileOptimize){$('.slide-holder').removeClass('moving');$slideshowMainElem.removeClass('moving');$('.slide-holder').attr('class',$('.slide-holder').attr('class').replace(/[ ]*moving-off-of-[0-9]+/,''));$slideshowMainElem.attr('class',$slideshowMainElem.attr('class').replace(/[ ]*moving-off-of-[0-9]+/,''));$slideshowMainElem.attr('class',$slideshowMainElem.attr('class').replace(/[ ]*moving-onto-[0-9]+/,''));$slideshowMainElem.attr('class',$slideshowMainElem.attr('class').replace(/[ ]*moving-to-dir-[^ ]+/,''));$('.fso-slide-active').removeClass('fso-slide-active');if($mySlide){$mySlide.addClass('fso-slide-active');}else{$mySlides.eq(currentActiveSlideIdx).addClass('fso-slide-active');}}
1402if(isIpad)$slideshowMainElem.removeClass('always-show');}
1403animationDebugMode=false;function fsoSliderAnimateIn($mySlide,aExtraMotion,aDelay,aMoveinText){if(globalIsIE)return aDelay;if(aExtraMotion!=0){if(globalHas3d&&Modernizr.csstransitions){$mySlide.css(Modernizr.prefixed('transform'),'translate3d('+aExtraMotion+'px, 0px, 0px)');}else{$mySlide.css('left',-aExtraMotion+'px');}}
1404$mySlide.find('.item').each(function(){var $myItem=$(this);var noAnimateDelay=$myItem.hasClass('no-animation-delay');if($myItem.hasClass('text-item')){if(aMoveinText){var customDirection=myDirection;$myItem.css('opacity',1).addClass('animation-'+customDirection+'-hold');(function(){var theDirection=customDirection;textAnimationQueue.push(setTimeout(function(){$myItem.removeClass('animation-'+theDirection+'-hold').addClass('animation-'+theDirection+'-hold2');},500+aDelay));})();}}else{if(aMoveinText||noAnimateDelay){var animateProps={opacity:1};if(globalHas3d&&Modernizr.csstransitions){animateProps[Modernizr.prefixed('transform')]='translate3d('+
1405((myDirection=='left'?minusOne:plusOne)*fsoSlideWidth2)+'px, 0px, 0px)';globalAnimationController.animate($myItem,animateProps,(noAnimateDelay?(animationDebugMode?'10s':'1s')+' cubic-bezier(0.23, 1, 0.32, 1)':(animationDebugMode?'8s':'.8s')+' cubic-bezier(0.165, 0.840, 0.440, 1.000) '+aDelay+'ms'));}else{$myItem.css('left',(myDirection=='left'?-1:1)*fsoSlideWidth2+'px');}}else{$myItem.addClass('move-'+myDirection);}}
1406aDelay+=(animationDebugMode?500:50);});return aDelay;}
1407function fsoSliderFixAppleDots(newSlideIdx){if(!tooManyAppleDots)return;var animateProps={};if(newSlideIdx>totalSlides/2){animateProps[isRTL?'right':'left']=dotHolderWidth+(fsoSliderZoomedIn?($('.slide-dot-over.slide-dot-over-left').eq(1).width()-lastSlideOffset):($('.slide-dot-over.slide-dot-over-left').eq(1).width()-lastSlideOffset));$('.slide-dots-holder-inner').stop(true,true).animate(animateProps,300,function(){$('.
1407slide-link[href="#slide'+(midwaySlideNumLow+5)+'"]').css('opacity',0.8);$('.slide-link[href="#slide'+(midwaySlideNumLow+4)+'"]').css('opacity',0.4);$('.slide-link[href="#slide'+(midwaySlideNumLow+3)+'"]').css('opacity',0.2);$('.slide-link[href="#slide'+(midwaySlideNumLow+2)+'"]').css('opacity',0.1);$('.slide-link[href="#slide'+(midwaySlideNum-1)+'"]').css('opacity',1);$('.slide-link[href="#slide'+midwaySlideNum+'"]').css('opacity',1);$('.slide-link[href="#slide'+(midwaySlideNum+1)+'"]').css('opacity',1);$('.slide-link[href="#slide'+(midwaySlideNum+2)+'"]').css('opacity',1);$('.slide-dots-holder-inner').css('opacity',1);});}else{animateProps[isRTL?'right':'left']=$('.slide-dot-over.slide-dot-over-left').eq(1).width()+2;$('.slide-dots-holder-inner').stop(true,true).animate(animateProps,300,function(){$('.slide-link[href="#slide'+(midwaySlideNumLow+5)+'"]').css('opacity',1);$('.slide-link[href="#slide'+(midwaySlideNumLow+4)+'"]').css('opacity',1);$('.slide-link[href="#slide'+(midwaySlideNumLow+3)+'"]').css('opacity',1);$('.slide-link[href="#slide'+(midwaySlideNumLow+2)+'"]').css('opacity',1);$('.slide-link[href="#slide'+(midwaySlideNum-1)+'"]').css('opacity',0.8);$('.slide-link[href="#slide'+midwaySlideNum+'"]').css('opacity',0.4);$('.slide-link[href="#slide'+(midwaySlideNum+1)+'"]').css('opacity',0.2);$('.slide-link[href="#slide'+(midwaySlideNum+2)+'"]').css('opacity',0.1);$('.slide-dots-holder-inner').css('opacity',1);});}}
1408function fsoSliderRecalculateAppleDots(){if(!tooManyAppleDots)return;var currentDots=(fsoSliderZoomedIn?allZoomedInAppleDots:allNormalAppleDots);if(!fsoSliderZoomedIn&&$('.slide-dots-holder')[1]){$('.slide-dots-holder')[1].offsetTop;dotHolderWidth=$('.slide-dots-holder').eq(1).width()-$('.slide-dot-over.slide-dot-over-left').eq(1).width()-$('.slide-dot-over.slide-dot-over-right').eq(1).width()+30;}else{$('.slide-dots-holder')[0].offsetTop;dotHolderWidth=$('.slide-dots-holder').eq(0).width()-$('.slide-dot-over.slide-dot-over-left').eq(0).width()-$('.slide-dot-over.slide-dot-over-right').eq(0).width()+30;}
1409if(dotHolderWidth>=lastSlideOffset){$('body').addClass('fso-slides-wide-enough-for-apple-dots-no-slide');}else{$('body').removeClass('fso-slides-wide-enough-for-apple-dots-no-slide');}
1410midwaySlideNum=0;midwaySlideNumLow=0;if(!isRTL){for(var i=totalSlides;i>=1;i--){if(midwaySlideNum==0&&currentDots.eq(i-1).position().left<dotHolderWidth){midwaySlideNum=i;}
1411if(lastSlideOffset-currentDots.eq(i-1).position().left<dotHolderWidth){midwaySlideNumLow=Math.max(0,i-3);}};}else{var overallWidth=$('.slide-dots-holder-inner').eq(1).width();for(var i=totalSlides;i>=1;i--){if(midwaySlideNum==0&&overallWidth-currentDots.eq(i-1).position().left<dotHolderWidth){midwaySlideNum=i;}
1412if(lastSlideOffset-(overallWidth-currentDots.eq(i-1).position().left)<dotHolderWidth){midwaySlideNumLow=Math.max(0,i-3);}};}
1413$('.slide-link').css('opacity',1);}
1414function fsoSliderHashChange(){var newSlideIdx=parseInt(location.hash.substring(1).replace(/slide/,''))-1;if(isNaN(newSlideIdx)||newSlideIdx<0||newSlideIdx>totalSlides-1)return;if(currentActiveSlideIdx==newSlideIdx)return;if(!isIpad){fsoSliderGotoSlide(newSlideIdx,true);}else{fsoSliderGotoSlide(newSlideIdx,false);sliderPositionSlides(true);}}
1415function fsoSliderGotoSlide(newSlideIdx,animate){if(!window.slide8Ignore){if(newSlideIdx>6){$('.menu-holder-after-8').fadeIn(300);}else{$('.menu-holder-after-8').hide();}
1416if(newSlideIdx==7){$('.fso-custom-menu').addClass('always-show');$('body').addClass('hide-zoomer');}else{$('.fso-custom-menu').removeClass('always-show');$('body').removeClass('hide-zoomer');}}
1417$('.slide-link').removeClass('selected');$('.slide-link[href="#slide'+(newSlideIdx+1)+'"]').addClass('selected');if(animate)fsoSliderFixAppleDots(newSlideIdx);setTimeout(function(){loadSurroundingSlides(newSlideIdx);},100);if(animate){if(!simpleAnimation){sliderEndAnimation();for(var i=0;i<textAnimationQueue.length;i++){clearTimeout(textAnimationQueue[i]);}
1418$('.text-item').removeClass('animation-left-hold animation-left-hold2 animation-right-hold animation-right-hold2');}
1419myDirection=(currentActiveSlideIdx<newSlideIdx)?'left':'right';var myDelay=0;var $myActiveSlide=$mySlides.eq(currentActiveSlideIdx).addClass('sliding');$mySlide=$mySlides.eq(newSlideIdx).addClass('sliding');var $myNextSlide=null;var $myPrevSlide=null;if(myDirection==='left'){if(newSlideIdx<totalSlides-1)
1420$myNextSlide=$mySlides.eq(newSlideIdx+1).addClass('sliding');if(currentActiveSlideIdx>0)
1421$myPrevSlide=$mySlides.eq(currentActiveSlideIdx-1).addClass('sliding');}else{if(newSlideIdx>0)
1422$myNextSlide=$mySlides.eq(newSlideIdx-1).addClass('sliding');if(currentActiveSlideIdx<totalSlides-1)
1423$myPrevSlide=$mySlides.eq(currentActiveSlideIdx+1).addClass('sliding');}
1424$('.slide-holder').addClass('moving');$slideshowMainElem.addClass('moving');$('.slide-holder').addClass('moving-off-of-'+currentActiveSlideIdx);$slideshowMainElem.addClass('moving-off-of-'+currentActiveSlideIdx);$slideshowMainElem.addClass('moving-onto-'+(newSlideIdx+1));$slideshowMainElem.addClass('moving-to-dir-'+myDirection);if(!simpleAnimation){var extraMotion=0;var nextExtraMotion=0;if(Math.abs(currentActiveSlideIdx-newSlideIdx)>1){extraMotion=(currentActiveSlideIdx-newSlideIdx)*(fsoSlideWidth2);extraMotion+=(fsoSlideWidth2)*((currentActiveSlideIdx<newSlideIdx)?+1:-1);nextExtraMotion=extraMotion+(fsoSlideWidth2)*((currentActiveSlideIdx<newSlideIdx)?+1:-1);}
1425if($myPrevSlide){$myPrevSlide.find('.item').each(function(){var noAnimateDelay=$(this).hasClass('no-animation-delay');if(globalHas3d&&Modernizr.csstransitions){var animateProps={opacity:window.globalSlideshowFadeout!==void 0?globalSlideshowFadeout:0.2,};if($(this).hasClass('text-item'))animateProps.opacity=0;animateProps[Modernizr.prefixed('transform')]='translate3d('+
1426((myDirection=='left'?minusOne:plusOne)*fsoSlideWidth2)+'px, 0px, 0px)';globalAnimationController.animate($(this),animateProps,(noAnimateDelay?(animationDebugMode?'10s':'1s')+' cubic-bezier(0.23, 1, 0.32, 1)':(animationDebugMode?'6s':'.6s')+' cubic-bezier(0.165, 0.840, 0.440, 1.000)'));}else{$(this).css('left',(myDirection=='left'?-1:1)*fsoSlideWidth2+'px');}});}
1427$myActiveSlide.find('.item').each(function(){var $myItem=$(this);var noAnimateDelay=$myItem.hasClass('no-animation-delay');if(globalHas3d&&Modernizr.csstransitions){var animateProps={opacity:window.globalSlideshowFadeout!==void 0?globalSlideshowFadeout:0.2,};if($(this).hasClass('text-item'))animateProps.opacity=0;animateProps[Modernizr.prefixed('transform')]='translate3d('+
1428((myDirection=='left'?minusOne:plusOne)*fsoSlideWidth2)+'px, 0px, 0px)';globalAnimationController.animate($(this),animateProps,(noAnimateDelay?(animationDebugMode?'10s':'1s')+' cubic-bezier(0.23, 1, 0.32, 1)':(animationDebugMode?'6s':'.6s')+' cubic-bezier(0.165, 0.840, 0.440, 1.000) '+myDelay+'ms'));}else{$(this).css('left',(myDirection=='left'?-1:1)*fsoSlideWidth2+'px');}
1429myDelay+=(animationDebugMode?500:50);});myDelay=Math.max(0,myDelay-(animationDebugMode?500:50));if(isCloned){nextExtraMotion+=(isRTL?1:-1)*totalSlides*fsoSlideWidth2;extraMotion+=(isRTL?1:-1)*totalSlides*fsoSlideWidth2;}}
1430if(!simpleAnimation){if($myNextSlide)fsoSliderAnimateIn($myNextSlide,plusOne*nextExtraMotion,0,false);myDelay=fsoSliderAnimateIn($mySlide,plusOne*(isRTL?-1:1)*extraMotion,myDelay,true);ipAnimation=setTimeout(function(){sliderEndAnimation();},myDelay+animationGracePeriod);}else{var deltaX=(isRTL?-1:1)*newSlideIdx*100;if(isCloned){deltaX+=(isRTL?-1:1)*totalSlides*100;}
1431var animateProps={};animateProps[Modernizr.prefixed('transform')]='translate3d('+(-deltaX)+'%, 0, 0)';globalAnimationController.animate($slideHolderDom,animateProps,(animationDebugMode?'8s':'.8s')+' cubic-bezier(0.165, 0.840, 0.440, 1.000)',function(){sliderEndAnimation(true);});$('.fso-slide-active').removeClass('fso-slide-active');$mySlides.eq(newSlideIdx).addClass('fso-slide-active');}}else{$mySlide=$mySlides.eq(newSlideIdx);}
1432me.slideWillChange();currentActiveSlideIdx=newSlideIdx;
1432$slideshowMainElem.attr('data-slide-active',newSlideIdx);$('.fso-slide-mobile-numbers .slide-num').text(currentActiveSlideIdx+1);if((newSlideIdx==totalSlides-1)){$slideshowMainElem.addClass('fso-slide-last');$('.slideshow-holder').addClass('fso-slider-last');}else{$slideshowMainElem.removeClass('fso-slide-last');$('.slideshow-holder').removeClass('fso-slider-last');}
1433if(newSlideIdx==0){$('.slideshow-holder').addClass('slider-first-slide');}else{$('.slideshow-holder').removeClass('slider-first-slide');}
1434me.slideHasChanged();};me.slideWillChange=function(){if(!globalIsIOS){if($mySlides.eq(currentActiveSlideIdx).find('.video-js').length)stopVideoForSlide(currentActiveSlideIdx);}
1435$slideshowMainElem.trigger('slide-will-change',currentActiveSlideIdx);}
1436me.slideHasChanged=function(){if($('.slide-number').length>0){$('.slide-number current').text(currentActiveSlideIdx+1);$('.slide-number total').text(this.totalSlides());}
1437var $customSlide=$('.custom-slide-leftnav[data-slide-id="'+$mySlides.eq(currentActiveSlideIdx).attr('data-slide-id')+'"]');$('.custom-slide-leftnav.show').removeClass('show');if($customSlide.length){$('.slideshow-left-nav').addClass('custom-slide-showing');$customSlide.addClass('show');}else{$('.slideshow-left-nav').removeClass('custom-slide-showing');}
1438var slideArrowRight=$slideshowMainElem.find('.slide-right-arrow2')[0];if(!this.isCircularClone()&&slideArrowLeft!=undefined&&slideArrowRight!=undefined){if(currentActiveSlideIdx+1==this.totalSlides()){$(slideArrowRight).hide();}else{$(slideArrowRight).show();}
1439if(currentActiveSlideIdx==0){$(slideArrowLeft).hide();}else{$(slideArrowLeft).show();}}
1440$slideshowMainElem.trigger('slide-has-changed',currentActiveSlideIdx);}
1441me.fsoSliderZoomIn=function(){if(window.location.pathname=='/scientology-today/events/scientology-network.html'){return;}
1442if(globalIsIE)return;if(screen&&screen.width&&screen.width<=800)return;if(fsoSliderZoomedIn)return;sliderEndAnimation();$('body')[0].scrollTop=0;$('.fso-slide-lower-bg .slide-selectors').css('left',$(window).width()/2-fsoSlideWidth/2);if(fsoSliderZoomTimeout>0)clearTimeout(fsoSliderZoomTimeout);$('.fso-zoomer').addClass('fadeOut').removeClass('fadeIn');$('.fso-custom-slider-fader').css('display','block');var zoomRatio=this.fsoSliderCalculateZoomRatio();$slideshowMainElem.css('-moz-transform','-moz-translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)').css('-ms-transform','-ms-translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)').css('-o-transform','-o-translate(0px, '+-zoomRatio.verticalDelta+'px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)').css('transform','translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)').css('-webkit-transform','translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)');$('.additional-zoomer-elem').css('-moz-transform','-moz-translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)').css('-ms-transform','-ms-translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)').css('-o-transform','-o-translate(0px, '+-zoomRatio.verticalDelta+'px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)').css('transform','translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)').css('-webkit-transform','translate3d(0px, '+-zoomRatio.verticalDelta+'px, 0px) scale3d('+zoomRatio.scaleRatio+','+zoomRatio.scaleRatio+',1.0)');$slideshowMainElem.addClass('zoomedIn');$('body').addClass('slideshow-zoomed-in');setTimeout(function(){fsoSliderZoomedIn=true;},50);$('.slide-dots-holder-inner').css('opacity',0);setTimeout(function(){fsoSliderRecalculateAppleDots();fsoSliderFixAppleDots(currentActiveSlideIdx);},1000);$mySlides.eq(currentActiveSlideIdx).find('.image-holder .zoomer-image:not([src]):not(.loaded)').each(function(){loadImage($(this));});var i=0;$mySlides.find('.image-holder .zoomer-image:not([src]):not(.loaded)').each(function(){var $this=$(this);(function(){setTimeout(function(){loadImage($this);},1000*i++);})();});}
1443function loadImage($this){if(!$this[0])return;if(!$this.hasClass('loaded')&&!$this.attr('src')){logger.debug('(pre)loading double: '+$this.attr('data-double-src'));$this.load(function(){$this.addClass('loaded').parent('.image-holder').addClass('double-loaded');});$this.attr('src',$this.attr('data-double-src'));}}
1444me.fsoSliderZoomOut=function(){if(globalIsIE)return;if(!fsoSliderZoomedIn)return;sliderEndAnimation();$('.fso-zoomer').css('display','block').addClass('fadeIn').removeClass('fadeOut');$('.fso-custom-slider-fader').css('display','none');fsoSliderZoomTimeout=setTimeout(function(){fsoSliderZoomTimeout=0;},1500);$slideshowMainElem.css('transform','none').css('-moz-transform','none').css('-ms-transform','none').css('-o-transform','none').css('-webkit-transform','none');$('.additional-zoomer-elem').css('transform','none').css('-moz-transform','none').css('-ms-transform','none').css('-o-transform','none').css('-webkit-transform','none');$slideshowMainElem.removeClass('zoomedIn');$('body').removeClass('slideshow-zoomed-in');fsoSliderZoomedIn=false;$('.slide-dots-holder-inner').css('opacity',0);setTimeout(function(){fsoSliderRecalculateAppleDots();fsoSliderFixAppleDots(currentActiveSlideIdx);},1000);}
1445me.fsoSliderCalculateZoomRatio=function(){var tempSliderTop=fsoSliderTop||0;tempSliderTop=0;var windowWidth=$(window).width();if(!fsoSliderZoomedIn)windowWidth+=15;var horizRatio=(windowWidth-200)/fsoSlideWidth;var verticalRatio=($(window).height()-120)/this.fsoSliderZoomHeight;var scaleRatio=Math.min(horizRatio,verticalRatio);if(scaleRatio<1)scaleRatio=1;var myNewTop=Math.floor(tempSliderTop-((this.fsoSliderZoomHeight/2)*scaleRatio-(this.fsoSliderZoomHeight/2)));if(scaleRatio==horizRatio){myNewTop-=Math.floor(($(window).height()-this.fsoSliderZoomHeight*scaleRatio)/2);}else{myNewTop-=(this.sliderZoomTopAdjustment?this.sliderZoomTopAdjustment:0)+40;}
1446myNewTop-=$(window).scrollTop();if($('#header_and_content_container').length){myNewTop+=$('#header_and_content_container').position().top;}else if($('#header_and_content').length){myNewTop+=$('#header_and_content').position().top;}
1447if(window.deviceCustomType&&deviceCustomType=='desktop'){scaleRatio=1;console.log(this.fsoSliderZoomHeight);console.log(tempSliderTop);myNewTop=Math.floor(($(window).height()-this.fsoSliderZoomHeight*scaleRatio)/2);myNewTop-=$('#header_and_content').position().top;myNewTop*=-1;console.log(myNewTop);}
1448return{verticalDelta:myNewTop,scaleRatio:scaleRatio};}
1449me.currentSlideIdx=function(){return currentActiveSlideIdx;}
1450me.totalSlides=function(){return totalSlides;}
1451me.isCircularClone=function(){return isCloned;}
1452function fireEvent(eventName,eventData){$mySlideshowWrapper.trigger(eventName,eventData);}
1453function replaceHash(newHash){if(history&&history.replaceState){history.replaceState({},document.title,'#'+newHash);return fsoSliderHashChange();}
1454location.hash=newHash;}
1455me.startVideoForSlide=function(num){$myVideoJsElem=$mySlides.eq(num).addClass('ios-video-playing').find('.video-js');if($myVideoJsElem.length){playVideoJS($myVideoJsElem);}}
1456me.gotoSlide=function(num){if(num!=currentActiveSlideIdx)
1457fsoSliderGotoSlide(num,true);}
1458me.replaceHash=function(num){replaceHash(num);}
1459function initVideoJS(el){if($('html').hasClass('device-ipad')){$('video').each(function(){this.preload='auto';this.controls=true;var thisVideo=this;this.addEventListener('play',function(e){thisVideo.parentNode.classList.add('ios-video-playing');});});return{play:function(){}}}
1460el=$(el);el.addClass('video-js-inited')
1461var vid;if(el&&el.get(0)&&el.get(0).tagName&&el.get(0).tagName.toUpperCase()==='VIDEO'){var opts;try{opts=JSON.parse(el.attr('data-gsc-setup'));}catch(e){}
1462if(navigator.userAgent.toLowerCase().indexOf('firefox')>-1&&navigator.platform.indexOf("Win")>-1&&el.find('source').eq(0).attr('type')!='video/webm'){opts.techOrder=["hls","html5","flash"];}
1463opts.html5={nativeVideoTracks:false,nativeAudioTracks:false,hls:{overrideNative:true,}};opts.techOrder=['hls','html5','flash'];vid=videojs(el.get(0),opts||{controls:true,techOrder:['hls','html5','flash'],html5:{nativeVideoTracks:false,nativeAudioTracks:false,hls:{overrideNative:true,}},});if(opts&&opts.showPosterOnVideoEnnd){vid.on('ended',function(){try{vid.cancelFullScreen()}catch(e){}
1464vid.pause();if(typeof vid.currentTime==='function')vid.currentTime(0);vid.posterImage.show();$(vid.el()).addClass('gsc-ended');});}
1465vid.on('play',function(e){el.siblings('.vjs-loading-spinner').hide();})}else{vid=videojs(el.get(0));}
1466return vid;}
1467function playVideoJS(el){if(window.globalGetParams&&globalGetParams.headless)return;var vid=initVideoJS(el);setTimeout(function(){if(vid.muted()){vid.muted(false);vid.controls(true);vid.pause();$('.video-slide-muted').removeClass('video-slide-muted');vid.currentTime(0);}
1468vid.play();$('body').addClass('slideshow-vid-playing');vid.on('ended',function(){$('body').removeClass('slideshow-vid-playing');});vid.on('timeupdate',function(){if(vid.paused()){$('body').removeClass('slideshow-vid-playing');}else{$('body').addClass('slideshow-vid-playing');}});},1);}
1469GscResponsiveSlider.initVideoJS=initVideoJS;GscResponsiveSlider.playVideoJS=playVideoJS;return me;})();var globalHas3dResult;var globalHas3d=(function(){if(globalHas3dResult!==undefined){return globalHas3dResult;}
1470var el=document.createElement('p'),globalHas3d,transforms={'webkitTransform':'-webkit-transform','OTransform':'-o-transform','msTransform':'-ms-transform','MozTransform':'-moz-transform','transform':'transform'};if(!document.body){return true;}
1471document.body.insertBefore(el,null);var style=window.getComputedStyle(el);for(var t in transforms){if(transforms.hasOwnProperty(t)){if(el.style[t]!==undefined){el.style[t]='translate3d(1px,1px,1px)';globalHas3d=style.getPropertyValue(transforms[t]);}}}
1472document.body.removeChild(el);globalHas3dResult=(globalHas3d!==undefined&&globalHas3d.length>0&&globalHas3d!=="none")
1473return globalHas3dResult;}());function determineDownloadSpeed(callback){var oProgress=document.getElementById("progress");var startTime,endTime;var download=new Image();download.onload=function(){endTime=(new Date()).getTime();callback&&callback();}
1474download.onerror=function(err,msg){oProgress.innerHTML="Invalid image, or error downloading";}
1475startTime=(new Date()).getTime();var cacheBuster="?nnn="+startTime;download.src=imageAddr+cacheBuster;}
1476/* /theme/gsc_headers/GscSliderAutoplay.js */
1477;var GscSliderAutoplay=function(slideshowWrapperDom,slideshowRef,opts){this.slideshowWrapperDom=slideshowWrapperDom;this.slideshowRef=slideshowRef;if(opts)for(var key in opts)this[key]=opts[key];}
1478GscSliderAutoplay.prototype=(function(){var me={};me.autosliding=false;me.interval=9000;me.init=function(){var self=this;if(globalIsIE)return this;if(!this.slideshowWrapperDom){window.console&&console.error('No slideshowWrapperDom supplied - cannot initialize autoslider!');return this;}
1479if(!this.slideshowRef){window.console&&console.error('No slideshowRef supplied - cannot initialize autoslider!');return this;}
1480if(!(this.slideshowWrapperDom instanceof jQuery))this.slideshowWrapperDom=$(this.slideshowWrapperDom);this.slideshowWrapperDom.append('<div class="slide-gutter"><div class="slider-artifact">» Menu</div><div class="slider-play-button paused"></div></div>');this.slideshowWrapperDom.find('.slide-wrapper').append('<div class="slideshow-autoslide-strip-holder"><div class="slideshow-autoslide-strip"></div></div>');this.stripDom=this.slideshowWrapperDom.find('.slideshow-autoslide-strip');this.playbuttonDom=this.slideshowWrapperDom.find('.slider-play-button');
1480this.playbuttonDom.on('click',function(){if(!self.autosliding){self.start();}else{self.stop();}});this.slideshowWrapperDom.bind('userInteraction',function(){self.stop();});this.slideshowWrapperDom.bind('videoAutoplay',function(){_.defer(function(){self.stop();});setTimeout(function(){self.stop();},500);});setTimeout(function(){$(window).resize();},2000);return this;}
1481me.animateToNext=function(){var self=this;this.stripDom.width(0);if(!this.slideshowRef.isCircularClone()&&this.slideshowRef.currentSlideIdx()==this.slideshowRef.totalSlides()-1){this.stop();_.defer(function(){self.stop();});return;}
1482globalAnimationController.cancelAnimation(this.stripDom,true);globalAnimationController.animate(this.stripDom,{width:this.stripDom.parent().outerWidth(true)},this.interval+'ms linear',function(){self.slideshowRef.sliderMoveNext();_.defer(function(){self.animateToNext();});});}
1483me.start=function(){if(globalIsIE)return this;this.animateToNext();this.playbuttonDom.removeClass('paused');this.autosliding=true;return this;}
1484me.stop=function(){globalAnimationController.cancelAnimation(this.stripDom,true);this.stripDom.width(0);this.playbuttonDom.addClass('paused');this.autosliding=false;return this;}
1485return me;})();
1486/* /theme/gsc_headers/GscAnimationController.js */
1487;var AnimationController=function(opts){if(opts)for(var key in opts)this[key]=opts[key];}
1488AnimationController.prototype=(function(){var me={};var transitionTransformProps={'WebkitTransform':'-webkit-transform','MozTransform':'-moz-transform','msTransform':'-ms-transform','OTransform':'-o-transform','transform':'transform',};me.callbacks={};me.maxAnimationId=0;me.animate2d=function(aDomElem,aTransform2d,aTransition,aCallbackFunc){logger.debug('animate2d called for: '+aTransform2d.x+', '+aTransition);var myController=this;if(!(aDomElem instanceof jQuery))aDomElem=$(aDomElem);var myAnimationId=aDomElem.attr('data-animation-id');if(!myAnimationId){myAnimationId=myController.maxAnimationId++;aDomElem.attr('data-animation-id',myAnimationId);}
1489myController.cancelAnimation(aDomElem);var myCaller=arguments.callee.caller.parent;_.defer(function(){if(Modernizr.csstransitions&&Modernizr.csstransforms3d){if(aTransition!='none'){aDomElem.css(Modernizr.prefixed('transition'),transitionTransformProps[Modernizr.prefixed('transform')]+' '+aTransition);}else{aDomElem.css(Modernizr.prefixed('transition'),'');}
1490aDomElem.css(Modernizr.prefixed('transform'),'translate3d('+aTransform2d.x+'px'+','+aTransform2d.y+'px,0)');}else{aDomElem.css('left',aTransform2d.x+'px');if(aTransform2d.y!=0)aDomElem.animate({top:aTransform2d.y+'px'});}
1491myController.callbacks[myAnimationId]=[aCallbackFunc];logger.debug('animation started to: '+aTransform2d.x);if(aTransition!='none'&&Modernizr.csstransitions&&Modernizr.csstransforms3d){aDomElem.on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd MSTransitionEnd gcuiTransitionCancelled',function(e){if(e.target!=aDomElem[0])return true;aDomElem.unbind('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd MSTransitionEnd gcuiTransitionCancelled');logger.debug('transitionEnd called on: '+aTransform2d.x);_cancelAnimation(aDomElem,myCaller);});}else{logger.debug('wrapping up no-transition on: '+aTransform2d.x);if(aTransition=='none'){_cancelAnimation(aDomElem,myCaller);}else{if(aTransition.match(/ms/)){var myTime=parseFloat(aTransition.replace(/ms .*$/,''));}else{var myTime=parseFloat(aTransition.replace(/s .*$/,''))*1000;}
1492setTimeout(function(){_cancelAnimation(aDomElem,myCaller);},myTime);}}});};me.animate=function(aDomElem,aProps,aTransition,aCallbackFunc){var myController=this;if(!(aDomElem instanceof jQuery))aDomElem=$(aDomElem);var myAnimationId=aDomElem.attr('data-animation-id');if(!myAnimationId){myAnimationId=myController.maxAnimationId++;aDomElem.attr('data-animation-id',myAnimationId);}
1493myController.cancelAnimation(aDomElem);var myCaller=arguments.callee.caller.parent;_.defer(function(){if(Modernizr.csstransitions){if(aTransition!='none'){aDomElem.css(Modernizr.prefixed('transition'),'all '+aTransition);}else{aDomElem.css(Modernizr.prefixed('transition'),'');}}
1494_.each(aProps,function(v,k){aDomElem.css(k,v);});myController.callbacks[myAnimationId]=[aCallbackFunc];if(aTransition!='none'&&Modernizr.csstransitions){aDomElem.on('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd MSTransitionEnd gcuiTransitionCancelled',function(e){if(e.target!=aDomElem[0])return true;aDomElem.unbind('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd MSTransitionEnd gcuiTransitionCancelled');_cancelAnimation(aDomElem,myCaller);});}else{if(aTransition=='none'){_cancelAnimation(aDomElem,myCaller);}else{if(aTransition.match(/ms/)){var myTime=parseFloat(aTransition.replace(/ms .*$/,''));}else{var myTime=parseFloat(aTransition.replace(/s .*$/,''))*1000;}
1495setTimeout(function(){_cancelAnimation(aDomElem,myCaller);},myTime);}}});};var _cancelAnimation=function(aDomElem,aCaller){var myAnimationId=aDomElem.attr('data-animation-id');Modernizr.prefixed('transition')&&aDomElem.css(Modernizr.prefixed('transition'),'');for(var a in me.callbacks[myAnimationId]){me.callbacks[myAnimationId][a]&&me.callbacks[myAnimationId][a].apply(aCaller);}
1496me.callbacks[myAnimationId]=[];}
1497me.cancelAnimation=function(aDomElem,aSkipCallbacks){if(!(aDomElem instanceof jQuery))aDomElem=$(aDomElem);if(aSkipCallbacks)this.callbacks[aDomElem.attr('data-animation-id')]=[];aDomElem.trigger('gcuiTransitionCancelled');}
1498return me;})();globalAnimationController=new AnimationController();
1499/* /theme/gsc_headers/responsive-flyouts.js */
1500;var GscResponsiveFlyouts=function(opts){for(var key in opts)this[key]=opts[key];}
1501GscResponsiveFlyouts.prototype=(function(){var me={};me.flyoutDomParent=$('.slideshow-wrapper');me.slideshowHolderDom=$('.slideshow-holder');me.init=function(){var that=this;if(!(this.flyoutDomParent instanceof jQuery))this.flyoutDomParent=$(this.flyoutDomParent);if(!(this.slideshowHolderDom instanceof jQuery))this.slideshowHolderDom=$(this.slideshowHolderDom);this.flyoutDomParent.find('.flyout > .text-flyout .text-flyout.submenu').each(function(){$(this).css('margin-top','-'+Math.floor($(this).height()/2)+'px');});me.resize();$(window).on('resize',function(){that.resize();});if(cookieMonster.get("mobile-menu")!=null&&cookieMonster.get("mobile-menu")=="closed"){$('.slideshow-left-nav-mobile').removeClass('open');}
1502wireupTotalTouchControl('js-mobile-flyout-open',function(e){$('.slideshow-left-nav-mobile').toggleClass('open');if($('.slideshow-left-nav-mobile').hasClass('open')){cookieMonster.set("mobile-menu","opened");}else{cookieMonster.set("mobile-menu","closed");}});};me.resize=function(){var slideshowWidth=this.slideshowHolderDom.width();var slideshowLeft=this.slideshowHolderDom.offset().left;var slideshowTop=this.slideshowHolderDom.offset().top;var slideshowBottom=slideshowTop+this.slideshowHolderDom.height();if($(window).width()<860){return;this.slideshowHolderDom.find('.flyout > .text-flyout > li.parent').each(function(){var mySub=$(this).find('ul.text-flyout.submenu');if(!mySub[0])return;mySub.addClass('force-opened');mySub[0].offsetHeight;var myNewHeight=-(Math.floor(mySub.outerHeight(true)/2)-Math.floor($(this).outerHeight(true)/2)-10);mySub.css('top',myNewHeight+'px');mySub.removeClass('force-opened');});}else{this.slideshowHolderDom.find('.flyout li.parent ul.thumbs-flyout').each(function(){$(this).css('height','auto');var myLeft=$(this).offset().left-slideshowLeft;if(isRTL)myLeft=(slideshowLeft+slideshowWidth)-(myLeft+$(this).width());$(this).css('width',(slideshowWidth-myLeft)+'px').css('top','0px');var myElem=$(this);$(this).find('li.hidden').removeClass('hidden');var myBottom=$(this).offset().top+$(this).height();if(myBottom>slideshowBottom){var myMenuitemBottom=$(this).parents('li.parent').offset().top+$(this).parents('li.parent').height();if(myMenuitemBottom<slideshowBottom){$(this).css('top',(slideshowBottom-myBottom)+'px');}else{$(this).css('top',(myMenuitemBottom-myBottom)+'px');}
1503var infiniteGuard=5000;var myTop=$(this).offset().top;while(myTop<slideshowTop){var myElems=$(this).find('li').not('.hidden');myElems.eq(myElems.length-1).addClass('hidden');myBottom=$(this).offset().top+$(this).height();var myCurrentCSSTop=parseInt($(this).css('top').replace(/px/,''));if(myMenuitemBottom<slideshowBottom){$(this).css('top',myCurrentCSSTop+(slideshowBottom-myBottom)+'px');}else{$(this).css('top',myCurrentCSSTop+(myMenuitemBottom-myBottom)+'px');}
1504myBottom=$(this).offset().top+$(this).height();myTop=$(this).offset().top;if(infiniteGuard--<0){window.console&&console.error&&console.error('ERROR: infinite loop detected');break;}
1505if(Math.floor(myBottom)>slideshowBottom){$(this).css('outline','2px solid red');window.console&&console.error&&console.error('ERROR: resizing error');}}}});}};return me;})();
1506/* /theme/gsc_headers/slide-templates.js */
1507;if(!window.squeezeText){function squeezeText(domElem){return;var initialHeight=domElem.offsetHeight;var infiniteLoopGuard=5000;while(domElem.offsetHeight==initialHeight&&infiniteLoopGuard-->0)
1508domElem.style.width=(domElem.offsetWidth-1)+'px';if(infiniteLoopGuard==0)return window.console&&console.error('ERROR: infinite loop');domElem.style.width=(domElem.offsetWidth+1)+'px';}}
1509if(!window._each){function _each(theArray,callback){for(var i=0,length=theArray.length;i<length;i++)callback(theArray[i]);}}
1510if(window.globalForceSlideHeight==undefined){if(!globalIsIOS){globalForceSlideHeight=575;}else{if(window.innerWidth<=768){globalForceSlideHeight=455;}else{globalForceSlideHeight=575;}}}
1511var maxCaptionImageTopDelta=20;var maxCaptionImageTopDelta2=20;var tempFirstSlide=document.querySelectorAll('slide:first-child')[0];if(tempFirstSlide){var slideHeight=tempFirstSlide.offsetHeight;if(slideHeight==0||window.globalForceSlideHeight)slideHeight=globalForceSlideHeight;var slideWidth=tempFirstSlide.offsetWidth;}else{var slideHeight=575;var slideWidth=860;}
1512_each(document.querySelectorAll('.caption-center-below'),function(myCaption){if(document.body.className.match(/templated-slider-build-2-1/))return;var mySlideImages=myCaption.parentNode.getElementsByTagName('img');waitForAllImagesToLoad(mySlideImages,function(){var lowestBottom=0;_each(mySlideImages,function(mySlideImage){lowestBottom=Math.max(lowestBottom,mySlideImage.offsetTop+mySlideImage.offsetHeight);});squeezeText(myCaption);myCaption.style.left=Math.floor((slideWidth-myCaption.offsetWidth)/2)+'px';myCaption.offsetHeight;myCaption.style.bottom='auto';myCaption.style.top=(lowestBottom+myCaption.offsetHeight+2*maxCaptionImageTopDelta<slideHeight?lowestBottom+maxCaptionImageTopDelta:lowestBottom+Math.floor((slideHeight-myCaption.offsetHeight-lowestBottom)/2))+'px';myCaption.className+=' dynamically-sized';});});_each(document.querySelectorAll('.caption-bottom-left-corner'),function(myCaption){if(document.body.className.match(/templated-slider-build-2-1/))return;waitForAllImagesToLoad(myCaption.parentNode.getElementsByTagName('img'),function(){var smallImage=myCaption.parentNode.querySelector('.image-item-3');if(!smallImage)smallImage=myCaption.parentNode.querySelector('.image-item-2');var smallImageBottom=smallImage.offsetTop+smallImage.offsetHeight;var myLeft=Math.max(smallImage.offsetLeft,20);myCaption.style.left=myLeft+'px';myCaption.style.width=(smallImage.offsetWidth-(myLeft-smallImage.offsetLeft)*2)+'px';myCaption.offsetHeight;myCaption.style.bottom='auto';myCaption.style.top=(smallImageBottom+myCaption.offsetHeight+2*maxCaptionImageTopDelta2<slideHeight?smallImageBottom+maxCaptionImageTopDelta2:smallImageBottom+Math.floor((slideHeight-myCaption.offsetHeight-smallImageBottom)/2))+'px';myCaption.className+=' dynamically-sized';});});_each(document.querySelectorAll('.caption-bottom-right-corner'),function(myCaption){if(document.body.className.match(/templated-slider-build-2-1/))return;waitForAllImagesToLoad(myCaption.parentNode.getElementsByTagName('img'),function(){var smallImage=myCaption.parentNode.querySelector('.image-item-3');if(!smallImage)smallImage=myCaption.parentNode.querySelector('.image-item-2');var smallImageBottom=smallImage.offsetTop+smallImage.offsetHeight;var imageRight=slideWidth-smallImage.offsetLeft-smallImage.offsetWidth;var myRight=Math.max(slideWidth-smallImage.offsetLeft-smallImage.offsetWidth,20);if(!isRTL){myCaption.style.right=imageRight+'px';}else{myCaption.style.left=imageRight+'px';}
1513myCaption.style.width=(smallImage.offsetWidth-(myRight-imageRight))+'px';myCaption.offsetHeight;myCaption.style.bottom='auto';myCaption.style.top=(smallImageBottom+myCaption.offsetHeight+2*maxCaptionImageTopDelta2<slideHeight?smallImageBottom+maxCaptionImageTopDelta2:smallImageBottom+Math.floor((slideHeight-myCaption.offsetHeight-smallImageBottom)/2))+'px';myCaption.className+=' dynamically-sized';});});_each(document.querySelectorAll('.caption-center-left'),function(myCaption){if(document.body.className.match(/templated-slider-build-2-1/))return;waitForAllImagesToLoad(myCaption.parentNode.getElementsByTagName('img'),function(){var image=myCaption.parentNode.querySelector('.image-item-1');var imageLeft=image.offsetLeft;if(isRTL)imageLeft+=image.offsetWidth;if(!isRTL){myCaption.style.left=20+'px';myCaption.style.width=(imageLeft-40)+'px';}else{myCaption.style.right=20+'px';myCaption.style.width=(slideWidth-imageLeft-40)+'px';}
1514myCaption.offsetHeight;myCaption.style.top=Math.floor((slideHeight-myCaption.offsetHeight)/2)+'px';myCaption.className+=' dynamically-sized';});});_each(document.querySelectorAll('.caption-center-right'),function(myCaption){if(document.body.className.match(/templated-slider-build-2-1/))return;waitForAllImagesToLoad(myCaption.parentNode.getElementsByTagName('img'),function(){var image=myCaption.parentNode.querySelector('.image-item-1');var imageRight=image.offsetLeft+image.offsetWidth;if(isRTL)imageRight=image.offsetLeft;if(!isRTL){myCaption.style.width=(slideWidth-imageRight-40)+'px';myCaption.style.right='20px';}else{myCaption.style.width=(imageRight-40)+'px';myCaption.style.left='20px';}
1515myCaption.offsetHeight;myCaption.style.top=Math.floor((slideHeight-myCaption.offsetHeight)/2)+'px';myCaption.className+=' dynamically-sized';});});function waitForAllImagesToLoad(imageArray,callback){var num=imageArray.length;var waiter=_each(imageArray,function(myImage){if(isImageLoaded(myImage)){if(--num==0){setTimeout(function(){callback();},50);}}else{myImage.addEventListener('load',function(){if(--num==0){setTimeout(function(){callback();},50);}});}});}
1516function isImageLoaded(img){return img.complete&&typeof img.naturalWi
1516dth!='undefined'&&img.naturalWidth!=0;}
1517/* /theme/js/www.scientology.org.js */
1518;var tempReposlideHeight;$(document).ready(function(){tempReposlideHeight=$('#header_slideshow_wraper').height();$('.blocked-hover:not(.blocked-hover-ignore-clicks)').on('click',function(e){for(var el=e.target;el.parentElement;el=el.parentElement){if(el.tagName=='A')return;}
1519var firstLink=$(this).find('a').get(0);if(firstLink.click){firstLink.click();}else if(document.createEvent){var eventObj=document.createEvent('MouseEvents');eventObj.initEvent('click',true,true);firstLink.dispatchEvent(eventObj);}});if(document.body.className.match(/templated-slider-build-2-1/)&&(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>767&&((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<1025||!document.body.className.match(/locale-en/)||document.body.className.match(/bio-legacy-page/))&&window.slideshowCaptionsOverflow){$(window).load(function(){tempReposlideHeight=$('#header_slideshow_wraper').height();slideshowCaptionsOverflow();});var slideDebouncer=0;$(window).on('resize',function(){if(slideDebouncer>0)clearTimeout(slideDebouncer);slideDebouncer=setTimeout(function(){tempReposlideHeight=$('#header_slideshow_wraper').height();slideshowCaptionsOverflow();slideDebouncer=0;},200);});}
1520el='.templated-slider-slideset-ireland-national-office-tour-inside slide[data-template="slide_template_c-1-with-band"].slide-id-slide-19';$(el).html('<a class="ignore-zoom" href="https:\/\/www.scientology-europe.be\/national-office\/drug-free-world\/">'+$(el).html()+'</a>');el='.templated-slider-slideset-ireland-national-office-tour-inside slide[data-template="slide_template_c-1-with-band"].slide-id-slide-20';$(el).html('<a class="ignore-zoom" href="https:\/\/www.scientology-europe.be\/national-office\/human-rights\/">'+$(el).html()+'</a>');el='.templated-slider-slideset-ireland-national-office-tour-inside slide[data-template="slide_template_c-1-with-band"].slide-id-slide-21';$(el).html('<a class="ignore-zoom" href="https:\/\/www.scientology-europe.be\/national-office\/way-to-happiness\/">'+$(el).html()+'</a>');el='.templated-slider-slideset-ireland-national-office-tour-inside slide[data-template="slide_template_c-1-with-band"].slide-id-slide-22';$(el).html('<a class="ignore-zoom" href="https:\/\/www.scientology-europe.be\/national-office\/volunteer-ministers\/">'+$(el).html()+'</a>');el='.templated-slider-slideset-ireland-national-office-tour-inside slide[data-template="slide_template_c-1-with-band"].slide-id-slide-23';$(el).html('<a class="ignore-zoom" href="https:\/\/www.scientology-europe.be\/national-office\/narconon\/">'+$(el).html()+'</a>');el='.templated-slider-slideset-ireland-national-office-tour-inside slide[data-template="slide_template_c-1-with-band"].slide-id-slide-24';$(el).html('<a class="ignore-zoom" href="https:\/\/www.scientology-europe.be\/national-office\/national-affairs-office-dc.html">'+$(el).html()+'</a>');});if(document.body.className.match(/templated-slider-build-2-1/)&&(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>767&&((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<1025||!document.body.className.match(/locale-en/))&&window.slideshowCaptionsOverflow){window.addEventListener&&window.addEventListener("orientationchange",function(){tempReposlideHeight=$('#header_slideshow_wraper').height();slideshowCaptionsOverflow();},false);}
1521document.addEventListener&&document.addEventListener('click',function(e){if(e&&e.target&&((e.target.className&&e.target.className.match(/slider-captions-more/))||$(e.target).parents('.slider-captions-more').length||$(e.target).parents('.slider-captions-more-full').length)){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();$(e.target).parents('slide').toggleClass('show-full');if($(e.target).parents('slide').hasClass('show-full')){$(e.target).parents('slide').find('.text-item').hide();}else{$(e.target).parents('slide').find('.text-item').show();}
1522return false;}},true);if(/Window/.test(navigator.userAgent)){$('html').addClass('windows');}
1523function updateTVRelatedBlock(url,source){if($('html').attr('lang')!="en"){return;}
1524if(!url){$('.related-from-scn-network').addClass('hidden');if(window.location.pathname.indexOf('/meet-a-scientologist/')>-1){url='https://www.scientology.tv/series/meet-a-scientologist/';}else if(window.location.pathname.indexOf("/videos/the-way-to-happiness/")>-1||window.location.pathname.indexOf("/videos/applied-scholastics/")>-1||window.location.pathname.indexOf("/videos/criminon-introduction/")>-1||window.location.pathname.indexOf("/videos/narconon/")>-1||window.location.pathname.indexOf("/videos/truth-about-drugs/")>-1||window.location.pathname.indexOf("/videos/anti-drug/")>-1||window.location.pathname.indexOf("/videos/citizens-commission-on-human-rights/")>-1||window.location.pathname.indexOf("/videos/human-rights/")>-1){url='https://www.scientology.tv/series/voices-for-humanity/';}else if(window.location.pathname.indexOf("/videos/churches/new-churches-of-scientology/")>-1){url='https://www.scientology.tv/series/destination-scientology/';}
1525if(!url){return;}}
1526$('.video-next').append($('.scn-network-series-banner--wrapper').clone());$('.video-next .scn-network-series-banner--wrapper').removeClass('hidden');
1526$('.scn-network-series-banner').addClass('hidden');$('#video-details').append($('.related-from-scn-network').clone());$('#video-details .related-from-scn-network').removeClass('hidden');$.ajax({url:url,type:'GET',dataType:'html',}).done(function(data){data='<div>'+data+'</div>';_.each($(data).find('script[type="application/ld+json"]'),function(el){var jsonld=JSON.parse(el.innerText);if(jsonld["@type"]=="TVSeries"||jsonld["@type"]=="TVEpisode"){url+="?utm_source=";if(source){url+=source;}else{url+='scn-video-channel';}
1527var name=jsonld["name"];var description=jsonld["description"];var image=jsonld["image"][0];if(image==""){}
1528image=$(data).find('meta[property="og:image"]').attr('content');if(image.indexOf('@w=1280')>-1){image=image.replace('@w=1280','@w=333');}else{image=image.replace('/imagecache/cropfit','/imagecache/cropfit@w=333');}
1529var season="";var episode="";var series="";if(jsonld["partOfSeason"]&&jsonld["partOfSeason"].seasonNumber){season=jsonld["partOfSeason"].seasonNumber;}
1530if(jsonld["episodeNumber"]){episode=jsonld["episodeNumber"];}
1531if(jsonld["partOfSeries"]&&jsonld["partOfSeries"]["name"]){series=jsonld["partOfSeries"]["name"];}else{$('#video-details .scnnetwork-series-name').remove();}
1532if(description.trim()=='gcui_scntv:films_principles-of-scientology_blurp'){description='Practiced the world over, Scientology is first and foremost a practical religion that helps provide answers and solutions to real life problems. ';}
1533$('.related-from-scn-network .thumbnail').attr('src',image);$('.scnnetwork-episode-title a').attr('href',url);$('.related-from-scn-network .video-thumb').attr('href',url);$('.scnnetwork-episode-title a').html(name);$('.scnnetwork-series-name').html(series);$('.related-from-scn-network .scnnetwork-blurb').html(description);$('.related-from-scn-network .watch-link').attr('href',url);if(episode!=""&&season!=""){$('.related-from-scn-network .scnnetwork-episodeNumber').html(episode);$('.related-from-scn-network .scnnetwork-seasonNumber').html(season);}else{$('.related-from-scn-network .scnnetwork-season-episode').hide();}
1534if(url.indexOf('/meet-a-scientologist/')>-1){$('.scn-network-series-banner[data-series=meet-a-scientologist]').removeClass('hidden');}else if(url.indexOf('/voices-for-humanity/')>-1){$('.scn-network-series-banner[data-series=voices-for-humanity]').removeClass('hidden');}else if(url.indexOf('/inside-scientology/')>-1){$('.scn-network-series-banner[data-series=inside-scientology]').removeClass('hidden');}else if(url.indexOf('/destination-scientology/')>-1||window.location.pathname.indexOf("/videos/churches/new-churches-of-scientology/")>-1){$('.scn-network-series-banner[data-series=destination-scientology]').removeClass('hidden');}else if(url.indexOf('/l-ron-hubbard-in-his-own-voice/')>-1){$('.scn-network-series-banner[data-series=l-ron-hubbard-in-his-own-voice]').removeClass('hidden');}}});}).fail(function(jqXHR,textStatus,ex){console.error("error",jqXHR,textStatus,ex);});}
1535$(document).ready(function($){var $el=$('.related-from-scn-network[data-episode-url]');if($el.length>0){updateTVRelatedBlock($el.attr('data-episode-url'),'scn-churches-section');if($el.attr('data-episode-url').length>0){$('.related-from-scn-network').removeClass('hidden');}}});window.lazySizesConfig=window.lazySizesConfig||{};lazySizesConfig.preloadAfterLoad=false;lazySizesConfig.loadMode=1;function trackEvent(ec,ea,el,options){window._tr&&_tr.push(['_trackEvent',ec,ea,el]);window._paq&&_paq.push(['trackEvent',ec,ea,el]);window._gaq&&_gaq.push(['_trackEvent',ec,ea,el]);window.ga&&ga('send','event',ec,ea,el);var params={'event_category':ec,'event_label':el};if(options){if(options.callback){params['event_callback']=options.callback;}
1536if(options.passive){params['non_interaction']=true;}}
1537window.gtag&&gtag('event',ea,params);window._gaq||window.ga||(window.console&&console.log.apply(console,arguments));}
1538(function(){if(window.location.pathname=="/store/thank-you.action"){trackEvent("Store","Purchased");}})();(function abTestHandler(){var path=window.location.pathname;if(!path.startsWith('/store/item/'))return;var btns=document.querySelectorAll('.fancy-button1');if(!btns.length)return;
vendor: 5,742 bytes, lines 1538-1556
1538var abTestKey='20250615-ab-fancy-button1';var variant=sessionStorage.getItem(abTestKey);if(!variant){variant=Math.random()<0.5?'20250615-button-blue':'20250615-button-gold';sessionStorage.setItem(abTestKey,variant);}
1539if(variant==='20250615-button-gold'){btns.forEach(function(btn){btn.classList.add('fancy-button1__yellow');});}
1540trackEvent('AB Test',abTestKey,variant,{passive:true,});btns.forEach(function(btn){btn.addEventListener('click',function(){trackEvent('AB Test Click',abTestKey,variant,{passive:true,});});});})();
1541/* /theme/js/custom-slides.js */
1542;(function(){$('body.templated-slider-slideset-org-aoshanzoopeningidealorgs .slide-templated-new[class*=" slide-id-slide-ideal-orgs-"] .text-item').append('<div class="read-more">Learn More ▶</div>').on('click','.read-more',function(e){e.preventDefault();if($(this).parents('.slide-templated-new.slide-id-slide-ideal-orgs-58').length>0){document.location='/churches/ideal-orgs/sydney.html';}else if($(this).parents('.slide-templated-new.slide-id-slide-ideal-orgs-59').length>0){document.location='/churches/ideal-orgs/melbourne-australia.html';}else if($(this).parents('.slide-templated-new.slide-id-slide-ideal-orgs-60').length>0){document.location='/churches/ideal-orgs/kaohsiung.html';}else if($(this).parents('.slide-templated-new.slide-id-slide-ideal-orgs-61').length>0){document.location='/churches/ideal-orgs/tokyo.html';}
1543return false;});})();
1544/* /theme/gsap/TweenMax.min.js */
1545;/*!* VERSION: 1.19.1
1546* DATE: 2017-01-17
1547* UPDATES AND DOCS AT: http://greensock.com
1548*
1549* Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
1550*
1551* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
1552* This work is subject to the terms at http://greensock.com/standard-license or for
1553* Club GreenSock members, the software agreement that was issued with your membership.
1554*
1555* @author: Jack Doyle, [email protected]
1556**/var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},e=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},f=function(a,b,d){c.call(this,a,b,d),this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0,this.render=f.prototype.render},g=1e-10,h=c._internals,i=h.isSelector,j=h.isArray,k=f.prototype=c.to({},.1,{}),l=[];f.version="1.19.1",k.constructor=f,k.kill()._gc=!1,f.killTweensOf=f.killDelayedCallsTo=c.killTweensOf,f.getTweensOf=c.getTweensOf,f.lagSmoothing=c.lagSmoothing,f.ticker=c.ticker,f.render=c.render,k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),c.prototype.invalidate.call(this)},k.updateTo=function(a,b){var d,e=this.ratio,f=this.vars.immediateRender||a.immediateRender;b&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(d in a)this.vars[d]=a[d];if(this._initted||f)if(b)this._initted=!1,f&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&c._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var g=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(g,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||f)for(var h,i=1/(1-e),j=this._firstPT;j;)h=j.s+j.c,j.c*=i,j.s=h-j.c,j=j._next;return this},k.render=function(a,b,c){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var d,e,f,i,j,k,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._totalTime,q=this._cycle,r=this._duration,s=this._rawPrevTime;if(a>=n-1e-7&&a>=0?(this._totalTime=n,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=r,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===r&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>s||0>=a&&a>=-1e-7||s===g&&"isPause"!==this.data)&&s!==a&&(c=!0,s>g&&(e="onReverseComplete")),this._rawPrevTime=m=!b||a||s===a?a:g)):1e-7>a?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==p||0===r&&s>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===r&&(this._initted||!this.vars.lazy||c)&&(s>=0&&(c=!0),this._rawPrevTime=m=!b||a||s===a?a:g)),this._initted||(c=!0)):(this._totalTime=this._time=a,0!==this._repeat&&(i=r+this._repeatDelay,this._cycle=this._totalTime/i>>0,0!==this._cycle&&this._cycle===this._totalTime/i&&a>=p&&this._cycle--,this._time=this._totalTime-this._cycle*i,this._yoyo&&0!==(1&this._cycle)&&(this._time=r-this._time),this._time>r?this._time=r:this._time<0&&(this._time=0)),this._easeType?(j=this._time/r,k=this._easeType,l=this._easePower,(1===k||3===k&&j>=.5)&&(j=1-j),3===k&&(j*=2),1===l?j*=j:2===l?j*=j*j:3===l?j*=j*j*j:4===l&&(j*=j*j*j*j),1===k?this.ratio=1-j:2===k?this.ratio=j:this._time/r<.5?this.ratio=j/2:this.ratio=1-j/2):this.ratio=this._ease.getRatio(this._time/r)),o===this._time&&!c&&q===this._cycle)return void(p!==this._totalTime&&this._onUpdate&&(b||this._callback("onUp
1556date")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=o,this._totalTime=p,this._rawPrevTime=s,this._cycle=q,h.lazyTweens.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/r):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&a>=0&&(this._active=!0),0===p&&(2===this._initted&&a>0&&this._init(),this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===r)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&this._startTime&&this._startAt.render(a,b,c),b||(this._totalTime!==p||e)&&this._callback("onUpdate")),this._cycle!==q&&(b||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===r&&this._rawPrevTime===g&&m!==g&&(this._rawPrevTime=0))},f.to=function(a,b,c){return new f(a,b,c)},f.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new f(a,b,c)},f.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new f(a,b,d)},f.staggerTo=f.allTo=function(a,b,g,h,k,m,n){h=h||0;var o,p,q,r,s=0,t=[],u=function(){g.onComplete&&g.onComplete.apply(g.onCompleteScope||this,arguments),k.apply(n||g.callbackScope||this,m||l)},v=g.cycle,w=g.startAt&&g.startAt.cycle;for(j(a)||("string"==typeof a&&(a=c.selector(a)||a),i(a)&&(a=d(a))),a=a||[],0>h&&(a=d(a),a.reverse(),h*=-1),o=a.length-1,q=0;o>=q;q++){p={};for(r in g)p[r]=g[r];if(v&&(e(p,a,q),null!=p.duration&&(b=p.duration,delete p.duration)),w){w=p.startAt={};for(r in g.startAt)w[r]=g.startAt[r];e(p.startAt,a,q)}p.delay=s+(p.delay||0),q===o&&k&&(p.onComplete=u),t[q]=new f(a[q],b,p),s+=h}return t},f.staggerFrom=f.allFrom=function(a,b,c,d,e,g,h){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,f.staggerTo(a,b,c,d,e,g,h)},f.staggerFromTo=f.allFromTo=function(a,b,c,d,e,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,f.staggerTo(a,b,d,e,g,h,i)},f.delayedCall=function(a,b,c,d,e){return new f(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,useFrames:e,overwrite:0})},f.set=function(a,b){return new f(a,0,b)},f.isTweening=function(a){return c.getTweensOf(a,!0).length>0};var m=function(a,b){for(var d=[],e=0,f=a._first;f;)f instanceof c?d[e++]=f:(b&&(d[e++]=f),d=d.concat(m(f,b)),e=d.length),f=f._next;return d},n=f.getAllTweens=function(b){return m(a._rootTimeline,b).concat(m(a._rootFramesTimeline,b))};f.killAll=function(a,c,d,e){null==c&&(c=!0),null==d&&(d=!0);var f,g,h,i=n(0!=e),j=i.length,k=c&&d&&e;for(h=0;j>h;h++)g=i[h],(k||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&(a?g.totalTime(g._reversed?0:g.totalDuration()):g._enabled(!1,!1))},f.killChildTweensOf=function(a,b){if(null!=a){var e,g,k,l,m,n=h.tweenLookup;if("string"==typeof a&&(a=c.selector(a)||a),i(a)&&(a=d(a)),j(a))for(l=a.length;--l>-1;)f.killChildTweensOf(a[l],b);else{e=[];for(k in n)for(g=n[k].target.parentNode;g;)g===a&&(e=e.concat(n[k].tweens)),g=g.parentNode;for(m=e.length,l=0;m>l;l++)b&&e[l].totalTime(e[l].totalDuration()),e[l]._enabled(!1,!1)}}};var o=function(a,c,d,e){c=c!==!1,d=d!==!1,e=e!==!1;for(var f,g,h=n(e),i=c&&d&&e,j=h.length;--j>-1;)g=h[j],(i||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&g.paused(a)};return f.pauseAll=function(a,b,c){o(!0,a,b,c)},f.resumeAll=function(a,b,c){o(!1,a,b,c)},f.globalTimeScale=function(b){var d=a._rootTimeline,e=c.ticker.time;return arguments.length?(b=b||g,d._startTime=e-(e-d._startTime)*d._timeScale/b,d=a._rootFramesTimeline,e=c.ticker.frame,d._startTime=e-(e-d._startTime)*d._timeScale/b,d._timeScale=a._rootTimeline._timeScale=b,b):d._timeScale},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.duration=function(b){return arguments.length?a.prototype.duration.call(this,b):this._duration},k.totalDuration=function(a){return arguments.length?-1===this._repeat?this:this.duration((a-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},f},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUp
vendor: 8,053 bytes, line 1556
1556date;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.19.1",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g=new d(a),h=g._timeline;for(null==b&&(b=!0),h._remove(g,!0),g._startTime=0,g._rawPrevTime=g._time=g._totalTime=h._time,e=h._first;e;)f=e._next,b&&e instanceof c&&e.target===e.vars.onComplete||g.add(e,e._startTime-e._delay),e=f;return h.add(g,0),g},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(f=e.length;--f>-1;)e[f]instanceof a&&e[f].timeline===this&&this.remove(e[f]);if("string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-this.duration():0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=this.duration());else{if(f=b.indexOf("="),-1===f)return null==this._labels[b]?d?this._labels[b]=this.duration()+c:c:this._labels[b]+c;c=parseInt(b.charAt(f-1)+"1",10)*Number(b.substr(f+1)),b=f>1?this._parseTimeOrLabel(b.substr(0,f-1),0,d):this.duration()}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._startTime,q=this._timeScale,r=this._paused;if(a>=n-1e-7&&a>=0)this._totalTime=this._time=n,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=n+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==o||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=o)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==o&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==o&&a>0&&(this._active=!0),0===o&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=o)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}
vendor: 7,870 bytes, line 1556
1556this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||n>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused?this.add(e,e._startTime-e._delay):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},e=1e-10,f=b._internals,g=f.lazyTweens,h=f.lazyRender,i=_gsScope._gsDefine.globals,j=new c(null,null,1,0),k=d.prototype=new a;return k.constructor=d,k.kill()._gc=!1,d.version="1.19.1",k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},k.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},k.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},k.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},k.tweenTo=function(a,c){c=c||{};var d,e,f,g={ease:j,useFrames:this.usesFrames(),immediateRender:!1},h=c.repeat&&i.TweenMax||b;for(e in c)g[e]=c[e];return g.time=this._parseTimeOrLabel(a),d=Math.abs(Number(g.time)-this._time)/this._timeScale||.001,f=new h(this,d,g),g.onStart=function(){f.target.paused(!0),f.vars.time!==f.target.time()&&d===f.duration()&&f.duration(Math.abs(f.vars.time-f.target.time())/f.target._timeScale),c.onStart&&c.onStart.apply(c.onStartScope||c.callbackScope||f,c.onStartParams||[])},f},k.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},k.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,i,j,k,l,m,n,o=this._dirty?this.totalDuration():this._totalDuration,p=this._duration,q=this._time,r=this._totalTime,s=this._startTime,t=this._timeScale,u=this._rawPrevTime,v=this._paused,w=this._cycle;if(a>=o-1e-7&&a>=0)this._locked||(this._totalTime=o,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(f=!0,j="onComplete",k=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||0>u||u===e)&&u!==a&&this._first&&(k=!0,u>e&&(j="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,this._yoyo&&0!==(1&this._cycle)?this._time=a=0:(this._time=p,a=p+1e-4);else if(1e-7>a)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==q||0===p&&u!==e&&(u>0||0>a&&u>=0)&&!this._locked)&&(j="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(k=f=!0,j="onReverseComplete"):u>=0&&this._first&&(k=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=p||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(k=!0)}else if(0===p&&0>u&&(k=!0),this._time=this._rawPrevTime=a,this._locked||(this._totalTime=a,0!==this._repeat&&(l=p+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&a>=r&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!==(1&this._cycle)&&(this._time=p-this._time),this._time>p?(this._time=p,a=p+1e-4):this._time<0?this._time=a=0:a=this._time)),this._hasPause&&!this._forcingPlayhead&&!b&&p>a){if(a=this._time,a>=q||this._repeat&&w!==this._cycle)for(d=this._first;d&&d._startTime<=a&&!m;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(m=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!m;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(m=d),d=d._prev;m&&(this._time=a=m._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==w&&!this._locked){var x=this._yoyo&&0!==(1&w),y=x===(this._yoyo&&0!==(1&this._cycle)),z=this._totalTime,A=this._cycle,B=this._rawPrevTime,C=this._time;if(this._totalTime=w*p,this._cycle<w?x=!x:this._totalTime+=p,this._time=q,this._rawPrevTime=0===p?u-1e-4:u,this._cycle=w,this._locked=!0,q=x?0:p,this.render(q,b,0===p),b||this._gc||this.vars.onRepeat&&(this._cycle=A,this._locked=!1,this._callback("onRepeat")),q!==this._time)return;if(y&&(this._cycle=w,this._locked=!0,q=x?p+1e-4:-1e-4,this.render(q,!0,!1)),this._locked=!1,this._paused&&!v)return;this._time=C,this._totalTime=z,this._cycle=A,this._rawPrevTime=B}if(!(this._time!==q&&this._first||c||k||m))return void(r!==this._totalTime&&this._onUpdate&&(b||this._callback("onUp
1556date")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==r&&a>0&&(this._active=!0),0===r&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||b||this._callback("onStart")),n=this._time,n>=q)for(d=this._first;d&&(i=d._next,n===this._time&&(!this._paused||v));)(d._active||d._startTime<=this._time&&!d._paused&&!d._gc)&&(m===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=i;else for(d=this._last;d&&(i=d._prev,n===this._time&&(!this._paused||v));){if(d._active||d._startTime<=q&&!d._paused&&!d._gc){if(m===d){for(m=d._prev;m&&m.endTime()>this._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,c),m=m._prev;m=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=i}this._onUpdate&&(b||(g.length&&h(),this._callback("onUpdate"))),j&&(this._locked||this._gc||(s===this._startTime||t!==this._timeScale)&&(0===this._time||o>=this.totalDuration())&&(f&&(g.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[j]&&this._callback(j)))},k.getActive=function(a,b,c){null==a&&(a=!0),null==b&&(b=!0),null==c&&(c=!1);var d,e,f=[],g=this.getChildren(a,b,c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},k.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},k.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},k.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},k.invalidate=function(){return this._locked=!1,a.prototype.invalidate.call(this)},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()},k.totalDuration=function(b){return arguments.length?-1!==this._repeat&&b?this.timeScale(this.totalDuration()/b):this:(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},k.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+1e-8)},d},!0),function(){var a=180/Math.PI,b=[],c=[],d=[],e={},f=_gsScope._gsDefine.globals,g=function(a,b,c,d){c===d&&(c=d-(d-b)/1e6),a===b&&(b=a+(c-a)/1e6),this.a=a,this.b=b,this.c=c,this.d=d,this.da=d-a,this.ca=c-a,this.ba=b-a},h=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",i=function(a,b,c,d){var e={a:a},f={},g={},h={c:d},i=(a+b)/2,j=(b+c)/2,k=(c+d)/2,l=(i+j)/2,m=(j+k)/2,n=(m-l)/8;return e.b=i+(a-i)/4,f.b=l+n,e.c=f.a=(e.b+f.b)/2,f.c=g.a=(l+m)/2,g.b=m-n,h.b=k+(d-k)/4,g.c=h.a=(g.b+h.b)/2,[e,f,g,h]},j=function(a,e,f,g,h){var j,k,l,m,n,o,p,q,r,s,t,u,v,w=a.length-1,x=0,y=a[0].a;for(j=0;w>j;j++)n=a[x],k=n.a,l=n.d,m=a[x+1].d,h?(t=b[j],u=c[j],v=(u+t)*e*.25/(g?.5:d[j]||.5),o=l-(l-k)*(g?.5*e:0!==t?v/t:0),p=l+(m-l)*(g?.5*e:0!==u?v/u
vendor: 55,240 bytes, line 1556
1556:0),q=l-(o+((p-o)*(3*t/(t+u)+.5)/4||0))):(o=l-(l-k)*e*.5,p=l+(m-l)*e*.5,q=l-(o+p)/2),o+=q,p+=q,n.c=r=o,0!==j?n.b=y:n.b=y=n.a+.6*(n.c-n.a),n.da=l-k,n.ca=r-k,n.ba=y-k,f?(s=i(k,y,r,l),a.splice(x,1,s[0],s[1],s[2],s[3]),x+=4):x++,y=p;n=a[x],n.b=y,n.c=y+.4*(n.d-y),n.da=n.d-n.a,n.ca=n.c-n.a,n.ba=y-n.a,f&&(s=i(n.a,y,n.c,n.d),a.splice(x,1,s[0],s[1],s[2],s[3]))},k=function(a,d,e,f){var h,i,j,k,l,m,n=[];if(f)for(a=[f].concat(a),i=a.length;--i>-1;)"string"==typeof(m=a[i][d])&&"="===m.charAt(1)&&(a[i][d]=f[d]+Number(m.charAt(0)+m.substr(2)));if(h=a.length-2,0>h)return n[0]=new g(a[0][d],0,0,a[-1>h?0:1][d]),n;for(i=0;h>i;i++)j=a[i][d],k=a[i+1][d],n[i]=new g(j,0,0,k),e&&(l=a[i+2][d],b[i]=(b[i]||0)+(k-j)*(k-j),c[i]=(c[i]||0)+(l-k)*(l-k));return n[i]=new g(a[i][d],0,0,a[i+1][d]),n},l=function(a,f,g,i,l,m){var n,o,p,q,r,s,t,u,v={},w=[],x=m||a[0];l="string"==typeof l?","+l+",":h,null==f&&(f=1);for(o in a[0])w.push(o);if(a.length>1){for(u=a[a.length-1],t=!0,n=w.length;--n>-1;)if(o=w[n],Math.abs(x[o]-u[o])>.05){t=!1;break}t&&(a=a.concat(),m&&a.unshift(m),a.push(a[1]),m=a[a.length-3])}for(b.length=c.length=d.length=0,n=w.length;--n>-1;)o=w[n],e[o]=-1!==l.indexOf(","+o+","),v[o]=k(a,o,e[o],m);for(n=b.length;--n>-1;)b[n]=Math.sqrt(b[n]),c[n]=Math.sqrt(c[n]);if(!i){for(n=w.length;--n>-1;)if(e[o])for(p=v[w[n]],s=p.length-1,q=0;s>q;q++)r=p[q+1].da/c[q]+p[q].da/b[q]||0,d[q]=(d[q]||0)+r*r;for(n=d.length;--n>-1;)d[n]=Math.sqrt(d[n])}for(n=w.length,q=g?4:1;--n>-1;)o=w[n],p=v[o],j(p,f,g,i,e[o]),t&&(p.splice(0,q),p.splice(p.length-q,q));return v},m=function(a,b,c){b=b||"soft";var d,e,f,h,i,j,k,l,m,n,o,p={},q="cubic"===b?3:2,r="soft"===b,s=[];if(r&&c&&(a=[c].concat(a)),null==a||a.length<q+1)throw"invalid Bezier data";for(m in a[0])s.push(m);for(j=s.length;--j>-1;){for(m=s[j],p[m]=i=[],n=0,l=a.length,k=0;l>k;k++)d=null==c?a[k][m]:"string"==typeof(o=a[k][m])&&"="===o.charAt(1)?c[m]+Number(o.charAt(0)+o.substr(2)):Number(o),r&&k>1&&l-1>k&&(i[n++]=(d+i[n-2])/2),i[n++]=d;for(l=n-q+1,n=0,k=0;l>k;k+=q)d=i[k],e=i[k+1],f=i[k+2],h=2===q?0:i[k+3],i[n++]=o=3===q?new g(d,e,f,h):new g(d,(2*e+d)/3,(2*e+f)/3,f);i.length=n}return p},n=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,m,n,o=1/c,p=a.length;--p>-1;)for(m=a[p],f=m.a,g=m.d-f,h=m.c-f,i=m.b-f,d=e=0,k=1;c>=k;k++)j=o*k,l=1-j,d=e-(e=(j*j*g+3*l*(j*h+l*i))*j),n=p*c+k-1,b[n]=(b[n]||0)+d*d},o=function(a,b){b=b>>0||6;var c,d,e,f,g=[],h=[],i=0,j=0,k=b-1,l=[],m=[];for(c in a)n(a[c],g,b);for(e=g.length,d=0;e>d;d++)i+=Math.sqrt(g[d]),f=d%b,m[f]=i,f===k&&(j+=i,f=d/b>>0,l[f]=m,h[f]=j,i=0,m=[]);return{length:j,lengths:h,segments:l}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,global:!0,init:function(a,b,c){this._target=a,b instanceof Array&&(b={values:b}),this._func={},this._mod={},this._props=[],this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var d,e,f,g,h,i=b.values||[],j={},k=i[0],n=b.autoRotate||c.vars.orientToBezier;this._autoRotate=n?n instanceof Array?n:[["x","y","rotation",n===!0?0:Number(n)||0]]:null;for(d in k)this._props.push(d);for(f=this._props.length;--f>-1;)d=this._props[f],this._overwriteProps.push(d),e=this._func[d]="function"==typeof a[d],j[d]=e?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]():parseFloat(a[d]),h||j[d]!==i[0][d]&&(h=j);if(this._beziers="cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type?l(i,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,h):m(i,b.type,j),this._segCount=this._beziers[d].length,this._timeRes){var p=o(this._beziers,this._timeRes);this._length=p.length,this._lengths=p.lengths,this._segments=p.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(n=this._autoRotate)for(this._initialRotations=[],n[0]instanceof Array||(this._autoRotate=n=[n]),f=n.length;--f>-1;){for(g=0;3>g;g++)d=n[f][g],this._func[d]="function"==typeof a[d]?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]:!1;d=n[f][2],this._initialRotations[f]=(this._func[d]?this._func[d].call(this._target):this._target[d])||0,this._overwriteProps.push(d)}return this._startRatio=c.vars.runBackwards?1:0,!0},set:function(b){var c,d,e,f,g,h,i,j,k,l,m=this._segCount,n=this._func,o=this._target,p=b!==this._startRatio;if(this._timeRes){if(k=this._lengths,l=this._curSeg,b*=this._length,e=this._li,b>this._l2&&m-1>e){for(j=m-1;j>e&&(this._l2=k[++e])<=b;);this._l1=k[e-1],this._li=e,this._curSeg=l=this._segments[e],this._s2=l[this._s1=this._si=0]}else if(b<this._l1&&e>0){for(;e>0&&(this._l1=k[--e])>=b;);0===e&&b<this._l1?this._l1=0:e++,this._l2=k[e],this._li=e,this._curSeg=l=this._segments[e],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(c=e,b-=this._l1,e=this._si,b>this._s2&&e<l.length-1){for(j=l.length-1;j>e&&(this._s2=l[++e])<=b;);this._s1=l[e-1],this._si=e}else if(b<this._s1&&e>0){for(;e>0&&(this._s1=l[--e])>=b;);0===e&&b<this._s1?this._s1=0:e++,this._s2=l[e],this._si=e}h=(e+(b-this._s1)/(this._s2-this._s1))*this._prec||0}else c=0>b?0:b>=1?m-1:m*b>>0,h=(b-c*(1/m))*m;for(d=1-h,e=this._props.length;--e>-1;)f=this._props[e],g=this._beziers[f][c],i=(h*h*g.da+3*d*(h*g.ca+d*g.ba))*h+g.a,this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i;if(this._autoRotate){var q,r,s,t,u,v,w,x=this._autoRotate;for(e=x.length;--e>-1;)f=x[e][2],v=x[e][3]||0,w=x[e][4]===!0?1:a,g=this._beziers[x[e][0]],q=this._beziers[x[e][1]],g&&q&&(g=g[c],q=q[c],r=g.a+(g.b-g.a)*h,t=g.b+(g.c-g.b)*h,r+=(t-r)*h,t+=(g.c+(g.d-g.c)*h-t)*h,s=q.a+(q.b-q.a)*h,u=q.b+(q.c-q.b)*h,s+=(u-s)*h,u+=(q.c+(q.d-q.c)*h-u)*h,i=p?Math.atan2(u-s,t-r)*w+v:this._initialRotations[e],this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i)}}}),q=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=i,p._autoCSS=!0,p.quadraticToCubic=function(a,b,c){return new g(a,(2*b+a)/3,(2*b+c)/3,c)},p._cssRegister=function(){var a=f.CSSPlugin;if(a){var b=a._internals,c=b._parseToProxy,d=b._setPluginRatio,e=b.CSSPropTween;b._registerComplexSpecialProp("bezier",{parser:function(a,b,f,g,h,i){b instanceof Array&&(b={values:b}),i=new p;var j,k,l,m=b.values,n=m.length-1,o=[],q={};if(0>n)return h;for(j=0;n>=j;j++)l=c(a,m[j],g,h,i,n!==j),o[j]=l.end;for(k in b)q[k]=b[k];return q.values=o,h=new e(a,"bezier",0,0,l.pt,2),h.data=l,h.plugin=i,h.setRatio=d,0===q.autoRotate&&(q.autoRotate=!0),!q.autoRotate||q.autoRotate instanceof Array||(j=q.autoRotate===!0?0:Number(q.autoRotate),q.autoRotate=null!=l.end.left?[["left","top","rotation",j,!1]]:null!=l.end.x?[["x","y","rotation",j,!1]]:!1),q.autoRotate&&(g._transform||g._enableTransforms(!1),l.autoRotate=g._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,g._overwriteProps.push("rotation")),i._onInitTween(l.proxy,q,g._tween),h}})}},q._mod=function(a){for(var b,c=this._overwriteProps,d=c.length;--d>-1;)b=a[c[d]],b&&"function"==typeof b&&(this._mod[c[d]]=b)},q._kill=function(a){var b,c,d=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],c=d.length;--c>-1;)d[c]===b&&d.splice(c,1);if(d=this._autoRotate)for(c=d.length;--c>-1;)a[d[c][2]]&&d.splice(c,1);return this._super._kill.call(this,a)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.19.1",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=O.defaultView?O.defaultView.getComputedStyle:function(){},_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTM&&Oa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ea[b],f=e.length;for(c=c||$(a,null);--f>-1;)d-=parseFloat(_(a,"padding"+e[f],c,!0))||0,d-=parseFloat(_(a,"border"+e[f]+"Width",c,!0))||0;return d},ha=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c<d.length;c++)a.push(ha(d[c]));return a.join(",")}return null==f?f="center"===e?"50%":"0":"center"===f&&(f="50%"),("center"===e||isNaN(parseFloat(e))&&-1===(e+"").indexOf("="))&&(e="50%"),a=e+" "+f+(d.length>2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ja=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ka=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},la={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ma=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},na=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),la[a])c=la[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(a[3])),c[0]=ma(g+1/3,d,e),c[1]=ma(g,d,e),c[2]=ma(g-1/3,d,e);else c=a.match(s)||la.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=la.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},oa=function(a,b){var c,d,e,f=a.match(pa)||[],g=0,h=f.length?"":a;for(c=0;c<f.length;c++)d=f[c],e=a.substr(g,a.indexOf(d,g)-g),g+=e.length+d.length,d=na(d,b),3===d.length&&d.push(1),h+=e+(b?"hsla("+d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:"rgba("+d.join(","))+")";return h+a.substr(g)},pa="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(j in la)pa+="|"+j+"\\b";pa=new RegExp(pa+")","gi"),g.colorStringFilter=function(a){var b,c=a[0]+a[1];pa.test(c)&&(b=-1!==c.indexOf("hsl(")||-1!==c.indexOf("hsla("),a[0]=oa(a[0],b),a[1]=oa(a[1],b)),pa.lastIndex=0},b.defaultStringFilter||(b.defaultStringFilter=g.colorStringFilter);var qa=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(pa)||[""])[0]:"",g=a.split(f).join("").match(u)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(pa)||[f])[0],m=a.split(b).join("").match(u)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(f=a.replace(I,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(u)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return h+b.join(j)+i}:function(a){return a}},ra=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},sa=(S._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=Math.round(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod(h.rotation,this.t):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c[f]=e}}else c[f]=c.s+c.xs0;i=i._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),ta=(S._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=M;for(c._transform=null,M=b,d=k=c.parse(a,b,d,e),M=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new sa(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new sa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},S.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ta||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ua=function(a,b,c,d,e,f){var g=new ta(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},va=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new ta(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&pa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" "),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,pa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m],x=parseFloat(p),x||0===x)h.appendXtra("",x,ia(u,x),u.replace(t,""),G&&-1!==u.indexOf("px"),!0);else if(e&&pa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&U,p=na(p,C),u=na(u,C),y=p.length+u.length>6,y&&!U&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(U||(y=!1),C?h.appendXtra(y?"hsla(":"hsl(",p[0],ia(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ia(u[1],p[1]),"%,",!1).appendXtra("",p[2],ia(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(y?"rgba(":"rgb(",p[0],u[0]-p[0],",",!0,!0).appendXtra("",p[1],u[1]-p[1],",",!0).appendXtra("",p[2],u[2]-p[2],y?",":B,!0),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),pa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n<v.length;n++)A=v[n],z=p.indexOf(A,o),h.appendXtra(p.substr(o,z-o),Number(A),ia(w[n],A),"",G&&"px"===p.substr(z+A.length,2),0===n),o=z+A.length;h["xs"+h.l]+=p.substr(o)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+u:u;if(-1!==d.indexOf("=")&&h.data){for(B=h.xs0+h.data.s,m=1;m<h.l;m++)B+=h["xs"+m]+h.data["xn"+m];h.e=B+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},wa=9;for(j=ta.prototype,j.l=j.pr=0;--wa>0;)j["xn"+wa]=0,j["xs"+wa]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ta(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var xa=function(a,b){b=b||{},this.p=b.prefix?Z(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||qa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ya=S._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new xa(f[d],b)},za=S._registerPluginProp=function(a){if(!i[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";ya(a,{parser:function(a,c,d,e,f,g,j){var k=h.com.greensock.plugins[b];return k?(k._cssRegister(),i[d].parse(a,c,d,e,f,g,j)):(W("Error: "+b+" js file not loaded."),f)}})}};j=xa.prototype,j.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(I.test(c)||I.test(b)?(h=b.replace(I,"|").split("|"),i=c.replace(I,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return va(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(_(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ya(a,{parser:function(a,d,e,f,g,h,i){var j=new ta(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Aa,Ba="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ca=Z("transform"),Da=X+"transform",Ea=Z("transformOrigin"),Fa=null!==Z("perspective"),Ga=S.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Fa?g.defaultForce3D||"auto":!1},Ha=_gsScope.SVGElement,Ia=function(a,b,c){var d,e=O.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ja=O.documentElement||{},Ka=function(){var a,b,c,d=p||/Android/i.test(T)&&!_gsScope.chrome;return O.createElementNS&&!d&&(a=Ia("svg",Ja),b=Ia("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ea]="50% 50%",b.style[Ca]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Fa),Ja.removeChild(a)),d}(),La=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Qa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ha(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Pa&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ma=function(a){var b,c=P("svg",this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(Ja.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ma}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),Ja.removeChild(c),this.style.cssText=f,b},Na=function(a){try{return a.getBBox()}catch(b){return Ma.call(a,!0)}},Oa=function(a){return!(!(Ha&&a.getCTM&&Na(a))||a.parentNode&&!a.ownerSVGElement)},Pa=[1,0,0,1,0,0],Qa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Ga,j=1e5,k=a.style;if(Ca?d=_(a,Da,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,c&&Ca&&((h="none"===$(a).display)||!a.parentNode)&&(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ja.appendChild(a)),d=_(a,Da,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Va(k,"display"),g&&Ja.removeChild(a)),(i.svg||a.getCTM&&Oa(a))&&(c&&-1!==(k[Ca]+"").indexOf("matrix")&&(d=k[Ca],c=0),e=a.getAttribute("transform"),c&&e&&(-1!==e.indexOf("matrix")?(d=e,c=0):-1!==e.indexOf("translate")&&(d="matrix(1,0,0,1,"+e.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",c=0))),c)return Pa;for(e=(d||"").match(s)||[],wa=e.length;--wa>-1;)f=Number(e[wa]),e[wa]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ra=S.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ga:new Ga,n=m.scaleX<0,o=2e-5,p=1e5,q=Fa?parseFloat(_(a,Ea,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Oa(a)),m.svg&&(La(a,_(a,Ea,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Aa=g.useSVGTransformAttr||Ka),f=Qa(a),f!==Pa){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),x=x*v+B*w,t=y*v+C*w,C=y*-w+C*v,D=z*-w+D*v,y=t),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),m.scaleX=(Math.sqrt(x*x+y*y)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+G*G)*p+.5|0)/p,m.scaleZ=(Math.sqrt(D*D+H*H)*p+.5|0)/p,m.rotationX||m.rotationY?m.skewX=0:(m.skewX=B||C?Math.atan2(B,C)*L+m.rotation:m.skewX||0,Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180))),m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Fa||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,Math.abs(l)>90&&Math.abs(l)<270&&(n?(i*=-1,l+=0>=k?180:-180,k+=0>=k?180:-180):(j*=-1,l+=0>=l?180:-180)),m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Fa&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}m.zOrigin=q;for(h in m)m[h]<o&&m[h]>-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Aa&&a.style[Ca]?b.delayedCall(.001,function(){Va(a.style,Ca)}):!Aa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Sa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),wa=0;4>wa;wa++)z=fa[wa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):aa(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>wa?-d.ieOffsetX:-d.ieOffsetY:2>wa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===wa||2===wa?1:B)))+"px"}}},Ta=S.set3DTransformRatio=S.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Aa&&L||!Fa)return void(B||P||L?(B*=K,x=P*K,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*K),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b)),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Aa&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",L&&Aa?this.t.setAttribute("transform","matrix("+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=K,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*K,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*K),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||L))return void(A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*K,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*K,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||L)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g),C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ca]=u};j=Ga.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ya("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k=i.scale&&"function"==typeof i.scale?i.scale:0;"function"==typeof i[c]&&(j=i[c],i[c]=b),k&&(i.scale=k(r,a));var l,m,n,o,p,s,t,u,v,w=a._gsTransform,x=a.style,y=1e-6,z=Ba.length,A=i,B={},C="transformOrigin",D=Ra(a,e,!0,A.parseTransform),E=A.transform&&("function"==typeof A.transform?A.transform(r,q):A.transform);if(d._transform=D,E&&"string"==typeof E&&Ca)m=Q.style,m[Ca]=E,m.display="block",m.position="absolute",O.body.appendChild(Q),l=Ra(Q,null,!1),D.svg&&(s=D.xOrigin,t=D.yOrigin,l.x-=D.xOffset,l.y-=D.yOffset,(A.transformOrigin||A.svgOrigin)&&(E={},La(a,ha(A.transformOrigin),E,A.svgOrigin,A.smoothOrigin,!0),s=E.xOrigin,t=E.yOrigin,l.x-=E.xOffset-D.xOffset,l.y-=E.yOffset-D.yOffset),(s||t)&&(u=Qa(Q,!0),l.x-=s-(s*u[0]+t*u[2]),l.y-=t-(s*u[1]+t*u[3]))),O.body.removeChild(Q),l.perspective||(l.perspective=D.perspective),null!=A.xPercent&&(l.xPercent=ja(A.xPercent,D.xPercent)),null!=A.yPercent&&(l.yPercent=ja(A.yPercent,D.yPercent));else if("object"==typeof A){if(l={scaleX:ja(null!=A.scaleX?A.scaleX:A.scale,D.scaleX),scaleY:ja(null!=A.scaleY?A.scaleY:A.scale,D.scaleY),scaleZ:ja(A.scaleZ,D.scaleZ),x:ja(A.x,D.x),y:ja(A.y,D.y),z:ja(A.z,D.z),xPercent:ja(A.xPercent,D.xPercent),yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),D.skewType=A.skewType||D.skewType||g.defaultSkewType,n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=Z(y[j])),m=l=_(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b)n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g],h?c=h.parse(a,n,g,this,c,f,b):(m=_(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=na(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=va(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=va(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ga(a,g,e),o="px"):"left"===g||"top"===g?(j=ba(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&""!==p&&(l||0===l)&&j&&(j=aa(a,g,j,o),"%"===p?(j/=aa(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=aa(a,g,1,p):"px"!==p&&(l=aa(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ta(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):W("invalid "+g+" tween value: "+b[g]):(c=new ta(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))),f&&c&&!c.plugin&&(c.plugin=f);return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;){if(2!==e.type)if(e.r&&-1!==e.type)if(b=Math.round(e.s+e.c),e.type){if(1===e.type){for(d=e.l,c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}}else e.t[e.p]=b+e.xs0;else e.t[e.p]=e.e;else e.setRatio(a);e=e._next}},j._enableTransforms=function(a){this._transform=this._transform||Ra(this._target,e,!0),this._transformType=this._transform.svg&&Aa||!a&&3!==this._transformType?2:3};var Ya=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};j._addLazySet=function(a,b,c){var d=this._firstPT=new ta(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=Ya,d.data=this},j._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},j._mod=function(a){for(var b=this._firstPT;b;)"function"==typeof a[b.p]&&a[b.p]===Math.round&&(b.r=1),b=b._next},j._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}for(b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),c=this._firstPT;c;)c.plugin&&c.plugin!==d&&c.plugin._kill&&(c.plugin._kill(b),d=c.plugin),c=c._next;return a.prototype._kill.call(this,f)};var Za=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)Za(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ca(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Za(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Za(a,k,m),i.render(c,!0,!0),Za(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=da(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0),function(){var a=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=function(a){for(;a;)a.f||a.blob||(a.m=Math.round),a=a._next},c=a.prototype;c._onInitAllProps=function(){for(var a,c,d,e=this._tween,f=e.vars.roundProps.join?e.vars.roundProps:e.vars.roundProps.split(","),g=f.length,h={},i=e._propLookup.roundProps;--g>-1;)h[f[g]]=Math.round;for(g=f.length;--g>-1;)for(a=f[g],c=e._firstPT;c;)d=c._next,c.pg?c.t._mod(h):c.n===a&&(2===c.f&&c.t?b(c.t._firstPT):(this._add(c.t,a,c.s,c.c),d&&(d._prev=c._prev),c._prev?c._prev._next=d:e._firstPT===c&&(e._firstPT=d),c._next=c._prev=null,e._propLookup[a]=i)),c=d;return!1},c._add=function(a,b,c,d){this._addTween(a,b,c,c+d,b,Math.round),this._overwriteProps.push(b)}}(),function(){_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.0",init:function(a,b,c,d){var e,f;if("function"!=typeof a.setAttribute)return!1;for(e in b)f=b[e],"function"==typeof f&&(f=f(d,a)),this._addTween(a,"setAttribute",a.getAttribute(e)+"",f+"",e,!1,e),this._overwriteProps.push(e);return!0}})}(),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.0",API:2,init:function(a,b,c,d){"object"!=typeof b&&(b={rotation:b}),this.finals={};var e,f,g,h,i,j,k=b.useRadians===!0?2*Math.PI:360,l=1e-6;for(e in b)"useRadians"!==e&&(h=b[e],"function"==typeof h&&(h=h(d,a)),j=(h+"").split("_"),f=j[0],g=parseFloat("function"!=typeof a[e]?a[e]:a[e.indexOf("set")||"function"!=typeof a["get"+e.substr(3)]?e:"get"+e.substr(3)]()),h=this.finals[e]="string"==typeof f&&"="===f.charAt(1)?g+parseInt(f.charAt(0)+"1",10)*Number(f.substr(2)):Number(f)||0,i=h-g,j.length&&(f=j.join("_"),-1!==f.indexOf("short")&&(i%=k,i!==i%(k/2)&&(i=0>i?i+k:i-k)),-1!==f.indexOf("_cw")&&0>i?i=(i+9999999999*k)%k-(i/k|0)*k:-1!==f.indexOf("ccw")&&i>0&&(i=(i-9999999999*k)%k-(i/k|0)*k)),(i>l||-l>i)&&(this._addTween(a,e,g,g+i,e),this._overwriteProps.push(e)));return!0},set:function(a){var b;if(1!==a)this._super.setRatio.call(this,a);else for(b=this._firstPT;b;)b.f?b.t[b.p](this.finals[b.p]):b.t[b.p]=this.finals[b.p],b=b._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e=_gsScope.GreenSockGlobals||_gsScope,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l("Back",n("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),n("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return a<this._p1?this._calcEnd?1-(a=1-a/this._p1)*a:b-(a=1-a/this._p1)*a*a*a*b:a>this._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i("easing.SteppedEase",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l("Bounce",j("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l("Circ",j("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),j("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),j("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l("Elastic",d("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),d("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),d("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),l("Expo",j("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),j("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),j("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l("Sine",j("SineOut",function(a){return Math.sin(a*h)}),j("SineIn",function(a){return-Math.cos(a*h)+1}),j("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,"SlowMo","ease,"),k(c,"RoughEase","ease,"),k(b,"SteppedEase","ease,"),o},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),
vendor: 27,279 bytes, line 1556
1556function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!e.TweenLite){var f,g,h,i,j,k=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},l=k("com.greensock"),m=1e-10,n=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},o=function(){},p=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),q={},r=function(d,f,g,h){this.sc=q[d]?q[d].sc:[],q[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var l,m,n,o,p,s=f.length,t=s;--s>-1;)(l=q[f[s]]||new r(f[s],[])).gsClass?(i[s]=l.gsClass,t--):j&&l.sc.push(this);if(0===t&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,p="undefined"!=typeof module&&module.exports,!p&&"function"==typeof define&&define.amd)define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});else if(p)if(d===b){module.exports=c[b]=o;for(s in c)o[s]=c[s]}else c[b]&&(c[b][n]=o);for(s=0;s<this.sc.length;s++)this.sc[s].check()}},this.check(!0)},s=a._gsDefine=function(a,b,c,d){return new r(a,b,c,d)},t=l._class=function(a,b,c){return b=b||function(){},s(a,[],function(){return b},c),b};s.globals=e;var u=[0,0,1,1],v=t("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?u.concat(b):u},!0),w=v.map={},x=v.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr<e&&(k=g+1);h.splice(k,0,{c:b,s:c,up:d,pr:e})},h.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){p=a||1/m,q=Math.min(b,p,0)},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==d.visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,W){j||i.wake();var c=this.vars.useFrames?V:W;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&i.wake(),setTimeout(E,2e3)};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},h.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},h.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},h.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},h.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},h.render=function(a,b,c){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a<c+this.totalDuration()/this._timeScale},h._enabled=function(a,b){return j||i.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},h._kill=function(a,b){return this._enabled(!1,!1)},h.kill=function(a,b){return this._kill(a,b),this},h._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},h._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},h._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},h.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=p(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},h.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},h.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},h.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},h.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},h.totalTime=function(a,b,c){if(j||i.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Y(),this.render(a,b,!1),J.length&&Y())}return this},h.progress=h.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},h.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},h.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||m,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},h.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(j||a||i.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=t("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});h=F.prototype=new D,h.constructor=F,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},h._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},h.rawTime=function(){return j||i.wake(),this._totalTime};var G=t("TweenLite",function(b,c,d){if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?U[G.defaultOverwrite]:"number"==typeof i?i>>0:U[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(n(f))):(this._siblings[e]=Z(f,this,!1),1===i&&this._siblings[e].length>1&&_(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=Z(b,this,!1),1===i&&this._siblings.length>1&&_(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)T[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!Q[c]||Q[c]&&Q[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.19.1",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):"undefined"==typeof d?b:d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m(b,this._target||c.t):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},N=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=M,l},O=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=N(m,n?o.s+o.c:d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},P=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:N},Q=G._plugins={},R=P.tweenLookup={},S=0,T=P.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},U={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},V=D._rootFramesTimeline=new F,W=D._rootTimeline=new F,X=30,Y=P.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};W._startTime=i.time,V._startTime=i.frame,W._active=V._active=!0,setTimeout(Y,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Y(),W.render((i.time-W._startTime)*W._timeScale,!1,!1),V.render((i.frame-V._startTime)*V._timeScale,!1,!1),J.length&&Y(),i.frame>=X){X=i.frame+(parseInt(G.autoSleep,10)||120);for(c in R){for(b=R[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete R[c]}if(c=W._first,(!c||c._paused)&&G.autoSleep&&!V._first&&1===i._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||i.sleep()}}},i.addEventListener("tick",D._updateRoot);var Z=function(a,b,c){var d,e,f=a._gsTweenID;if(R[f||(a._gsTweenID=f="t"+S++)]||(R[f]={target:a,tweens:[]}),b&&(d=R[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return R[f].tweens},$=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},_=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+m,l=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||aa(b,0,o),0===aa(h,j,o)&&(l[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(l[n++]=h)));for(f=n;--f>-1;)if(h=l[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!$(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},aa=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*m>f-b?m:(f+=a.totalDuration()/a._timeScale/e)>b+m?0:f-b-m};h._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,this._startAt=G.to(this.target,0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)T[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=G.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof v?k:"function"==typeof k?new v(k,g.easeParams):w[k]||G.defaultEase:G.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&G._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},h._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;K[b._gsTweenID]&&Y(),this.vars.css||b.style&&b!==a&&b.nodeType&&Q.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(g in this.vars)if(l=this.vars[g],T[g])l&&(l instanceof Array||l.push&&p(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(Q[g]&&(j=new Q[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=O.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&_(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),i)},h.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7&&a>=0)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===m&&"isPause"!==this.data)&&j!==a&&(c=!0,j>m&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:m);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==m||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:m)),this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,l=this._easeType,n=this._easePower;(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,b,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===m&&g!==m&&(this._rawPrevTime=0))}},h._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((p(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!$(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},h.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(Math.min(0,-this._delay))),this},h._enabled=function(a,b){if(j||i.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=Z(d[c],this,!0);else this._siblings=Z(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((p(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=Z(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ba=t("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ba.prototype},!0);if(h=ba.prototype,ba.version="1.19.0",ba.API=2,h._firstPT=null,h._addTween=O,h.setRatio=M,h._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},h._mod=h._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ba.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ba.API&&(Q[(new a[b])._propName]=a[b]);return!0},s.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=t("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ba.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ba(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ba.activate([g]),g},f=a._gsQueue){for(g=0;g<f.length;g++)f[g]();for(h in q)q[h].func||a.console.log("GSAP encountered missing dependency: "+h)}j=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"Tween
1556Max");

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.