/* Minification failed. Returning unminified contents.
(1269,18-19): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: i
(1269,59-60): run-time error JS1294: Strict-mode does not allow ++ or -- on certain objects: i
(1283,18-19): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: i
(1283,54-55): run-time error JS1294: Strict-mode does not allow ++ or -- on certain objects: i
(1291,18-19): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: i
(1291,56-57): run-time error JS1294: Strict-mode does not allow ++ or -- on certain objects: i
 */
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=Array.isArray(d)))?(e?(e=!1,f=c&&Array.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,N,e),g(f,c,O,e)):(f++,j.call(a,g(f,c,N,e),g(f,c,O,e),g(f,c,N,c.notifyWith))):(d!==N&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S),
a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},U=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function V(){this.expando=r.expando+V.uid++}V.uid=1,V.prototype={cache:function(a){var b=a[this.expando];return b||(b={},U(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){Array.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(L)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var W=new V,X=new V,Y=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function $(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Y.test(a)?JSON.parse(a):a)}function _(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Z,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=$(c)}catch(e){}X.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return X.hasData(a)||W.hasData(a)},data:function(a,b,c){return X.access(a,b,c)},removeData:function(a,b){X.remove(a,b)},_data:function(a,b,c){return W.access(a,b,c)},_removeData:function(a,b){W.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=X.get(f),1===f.nodeType&&!W.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),_(f,d,e[d])));W.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){X.set(this,a)}):T(this,function(b){var c;if(f&&void 0===b){if(c=X.get(f,a),void 0!==c)return c;if(c=_(f,a),void 0!==c)return c}else this.each(function(){X.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=W.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var aa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ba=new RegExp("^(?:([+-])=|)("+aa+")([a-z%]*)$","i"),ca=["Top","Right","Bottom","Left"],da=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ea=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function fa(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&ba.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ga={};function ha(a){var b,c=a.ownerDocument,d=a.nodeName,e=ga[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ga[d]=e,e)}function ia(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=W.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&da(d)&&(e[f]=ha(d))):"none"!==c&&(e[f]="none",W.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ia(this,!0)},hide:function(){return ia(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){da(this)?r(this).show():r(this).hide()})}});var ja=/^(?:checkbox|radio)$/i,ka=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c<d;c++)W.set(a[c],"globalEval",!b||W.get(b[c],"globalEval"))}var pa=/<|&#?\w+;/;function qa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(pa.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ka.exec(f)||["",""])[1].toLowerCase(),i=ma[h]||ma._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g,h=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&!("click"===a.type&&a.button>=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c<i;c++)d=b[c],e=d.selector+" ",void 0===g[e]&&(g[e]=d.needsContext?r(e,this).index(j)>-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i<b.length&&h.push({elem:j,handlers:b.slice(i)}),h},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==xa()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===xa()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&B(this,"input"))return this.click(),!1},_default:function(a){return B(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?va:wa,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:wa,isPropagationStopped:wa,isImmediatePropagationStopped:wa,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=va,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=va,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=va,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&sa.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ta.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return ya(this,a,b,c,d)},one:function(a,b,c,d){return ya(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=wa),this.each(function(){r.event.remove(this,a,c,b)})}});var za=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/<script|<style|<link/i,Ba=/checked\s*(?:[^=]|=\s*.checked.)/i,Ca=/^true\/(.*)/,Da=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}X.hasData(a)&&(h=X.access(a),i=r.extend({},h),X.set(b,i))}}function Ia(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ja.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ja(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,na(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ga),l=0;l<i;l++)j=h[l],la.test(j.type||"")&&!W.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Da,""),k))}return a}function Ka(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(na(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&oa(na(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(za,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d<e;d++)Ia(f[d],g[d]);if(b)if(c)for(f=f||na(a),g=g||na(h),d=0,e=f.length;d<e;d++)Ha(f[d],g[d]);else Ha(a,h);return g=na(h,"script"),g.length>0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(na(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ja(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(na(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var La=/^margin/,Ma=new RegExp("^("+aa+")(?!px)[a-z%]+$","i"),Na=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",ra.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,ra.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Oa(a,b,c){var d,e,f,g,h=a.style;return c=c||Na(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ma.test(g)&&La.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Pa(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Qa=/^(none|table(?!-c[ea]).+)/,Ra=/^--/,Sa={position:"absolute",visibility:"hidden",display:"block"},Ta={letterSpacing:"0",fontWeight:"400"},Ua=["Webkit","Moz","ms"],Va=d.createElement("div").style;function Wa(a){if(a in Va)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ua.length;while(c--)if(a=Ua[c]+b,a in Va)return a}function Xa(a){var b=r.cssProps[a];return b||(b=r.cssProps[a]=Wa(a)||a),b}function Ya(a,b,c){var d=ba.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Za(a,b,c,d,e){var f,g=0;for(f=c===(d?"border":"content")?4:"width"===b?1:0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+ca[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+ca[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+ca[f]+"Width",!0,e))):(g+=r.css(a,"padding"+ca[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+ca[f]+"Width",!0,e)));return g}function $a(a,b,c){var d,e=Na(a),f=Oa(a,b,e),g="border-box"===r.css(a,"boxSizing",!1,e);return Ma.test(f)?f:(d=g&&(o.boxSizingReliable()||f===a.style[b]),"auto"===f&&(f=a["offset"+b[0].toUpperCase()+b.slice(1)]),f=parseFloat(f)||0,f+Za(a,b,c||(g?"border":"content"),d,e)+"px")}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Oa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=Ra.test(b),j=a.style;return i||(b=Xa(h)),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:j[b]:(f=typeof c,"string"===f&&(e=ba.exec(c))&&e[1]&&(c=fa(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(j[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i?j.setProperty(b,c):j[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b),i=Ra.test(b);return i||(b=Xa(h)),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Oa(a,b,d)),"normal"===e&&b in Ta&&(e=Ta[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Qa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?$a(a,b,d):ea(a,Sa,function(){return $a(a,b,d)})},set:function(a,c,d){var e,f=d&&Na(a),g=d&&Za(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=ba.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ya(a,c,g)}}}),r.cssHooks.marginLeft=Pa(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Oa(a,"marginLeft"))||a.getBoundingClientRect().left-ea(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+ca[d]+b]=f[d]||f[d-2]||f[0];return e}},La.test(a)||(r.cssHooks[a+b].set=Ya)}),r.fn.extend({css:function(a,b){return T(this,function(a,b,c){var d,e,f={},g=0;if(Array.isArray(b)){for(d=Na(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&da(a),q=W.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],cb.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=W.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ia([a],!0),j=a.style.display||j,k=r.css(a,"display"),ia([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=W.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ia([a],!0),m.done(function(){p||ia([a]),W.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=hb(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],Array.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=kb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=ab||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(i||h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:ab||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);f<g;f++)if(d=kb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,hb,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j}r.Animation=r.extend(kb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return fa(c.elem,a,ba.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(L);for(var c,d=0,e=a.length;d<e;d++)c=a[d],kb.tweeners[c]=kb.tweeners[c]||[],kb.tweeners[c].unshift(b)},prefilters:[ib],prefilter:function(a,b){b?kb.prefilters.unshift(a):kb.prefilters.push(a)}}),r.speed=function(a,b,c){var d=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off?d.duration=0:"number"!=typeof d.duration&&(d.duration in r.fx.speeds?d.duration=r.fx.speeds[d.duration]:d.duration=r.fx.speeds._default),null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){r.isFunction(d.old)&&d.old.call(this),d.queue&&r.dequeue(this,d.queue)},d},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(da).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=kb(this,r.extend({},a),f);(e||W.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=W.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&db.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=W.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),r.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(ab=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),ab=void 0},r.fx.timer=function(a){r.timers.push(a),r.fx.start()},r.fx.interval=13,r.fx.start=function(){bb||(bb=!0,eb())},r.fx.stop=function(){bb=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var lb,mb=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return T(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),
null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!B(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Tb=[],Ub=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Tb.pop()||r.expando+"_"+ub++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Ub.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ub.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Ub,"$1"+e):b.jsonp!==!1&&(b.url+=(vb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Tb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=C.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=qa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=pb(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length},r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),b=f.ownerDocument,c=b.documentElement,e=b.defaultView,{top:d.top+e.pageYOffset-c.clientTop,left:d.left+e.pageXOffset-c.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),B(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||ra})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return T(this,function(a,d,e){var f;return r.isWindow(a)?f=a:9===a.nodeType&&(f=a.defaultView),void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Pa(o.pixelPosition,function(a,c){if(c)return c=Oa(a,b),Ma.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return T(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.holdReady=function(a){a?r.readyWait++:r.ready(!0)},r.isArray=Array.isArray,r.parseJSON=JSON.parse,r.nodeName=B,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Vb=a.jQuery,Wb=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Wb),b&&a.jQuery===r&&(a.jQuery=Vb),r},b||(a.jQuery=a.$=r),r});
;
/**
 * @license
 * Video.js 5.16.0 <http://videojs.com/>
 * Copyright Brightcove, Inc. <https://www.brightcove.com/>
 * Available under Apache License Version 2.0
 * <https://github.com/videojs/video.js/blob/master/LICENSE>
 *
 * Includes vtt.js <https://github.com/mozilla/vtt.js>
 * Available under Apache License Version 2.0
 * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
 */
!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?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(){return e(this,b),f(this,a.apply(this,arguments))}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-big-play-button"},b.prototype.handleClick=function(a){this.player_.play()},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&&void 0!==arguments[0]?arguments[0]:"button",b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?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&&void 0!==arguments[1]?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&&void 0!==arguments[0]?arguments[0]:"div",c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=arguments.length>2&&void 0!==arguments[2]?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&&void 0!==arguments[1]?arguments[1]:this.el();if(!a)return this.controlText_||"Need Text";var c=this.localize(a);return this.controlText_=a,this.controlTextEl_.innerHTML=c,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.on("tap",this.handleClick),this.on("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",this.handleClick),this.off("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:c.createEl!==!1&&(this.el_=this.createEl()),this.children_=[],this.childIndex_={},this.childNameIndex_={},c.initChildren!==!1&&this.initChildren(),this.ready(d),c.reportTouchActivity!==!1&&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];if(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&&void 0!==arguments[1]?arguments[1]:{},d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,e=void 0,f=void 0;if("string"==typeof b){f=(0,t["default"])(b),c||(c={}),c===!0&&(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&&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;c&&!function(){var d=b.options_,e=function(a){var c=a.name,e=a.opts;if(void 0!==d[c]&&(e=d[c]),e!==!1){e===!0&&(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(b.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;return"string"==typeof a||Array.isArray(a)?p.on(this.el_,a,l.bind(this,b)):!function(){var e=a,f=b,g=l.bind(d,c),h=function(){return d.off(e,f,g)};h.guid=g.guid,d.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))}(),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;return"string"==typeof a||Array.isArray(a)?p.one(this.el_,a,l.bind(this,b)):!function(){var f=a,g=b,h=l.bind(d,c),i=function j(){d.off(f,g,j),h.apply(null,e)};i.guid=h.guid,d.on(f,g,i)}(),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&&void 0!==arguments[1]&&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(void 0!==b)return null!==b&&b===b||(b=0),(""+b).indexOf("%")!==-1||(""+b).indexOf("px")!==-1?this.el_.style[a]=b:"auto"===b?this.el_.style[a]="":this.el_.style[a]=b+"px",c||this.trigger("resize"),this;if(!this.el_)return 0;var d=this.el_.style[a],e=d.indexOf("px");return e!==-1?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(b=parseFloat(b),0===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")},a.prototype.emitTapEvents=function(){var a=0,b=null,c=10,d=200,e=void 0;this.on("touchstart",function(c){1===c.touches.length&&(b={pageX:c.touches[0].pageX,pageY:c.touches[0].pageY},a=(new Date).getTime(),e=!0)}),this.on("touchmove",function(a){if(a.touches.length>1)e=!1;else if(b){var d=a.touches[0].pageX-b.pageX,f=a.touches[0].pageY-b.pageY,g=Math.sqrt(d*d+f*f);g>c&&(e=!1)}});var f=function(){e=!1};this.on("touchleave",f),this.on("touchcancel",f),this.on("touchend",function(c){if(b=null,e===!0){var f=(new Date).getTime()-a;f<d&&(c.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)return b=(0,t["default"])(b),a.components_||(a.components_={}),"Player"===b&&a.components_[b]&&!function(){var c=a.components_[b];if(c.players&&Object.keys(c.players).length>0&&Object.keys(c.players).map(function(a){return c.players[a]}).every(Boolean))throw new Error("Can not register Player component after player has been created")}(),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&&void 0!==arguments[1]?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&&void 0!==arguments[0]?arguments[0]:[],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){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(48),j=e(i),k=a(5),l=e(k),m=a(83),n=d(m),o=function(a){function b(c,d){f(this,b);var e=d.track,h=c.audioTracks();d.label=e.label||e.language||"Unknown",d.selected=e.enabled;var i=g(this,a.call(this,c,d));return i.track=e,h&&!function(){var a=n.bind(i,i.handleTracksChange);h.addEventListener("change",a),i.on("dispose",function(){h.removeEventListener("change",a)})}(),i}return h(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}(j["default"]);l["default"].registerComponent("AudioTrackMenuItem",o),c["default"]=o},{48:48,5:5,83:83}],8:[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);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 j=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},b}(i["default"]);j.prototype.options_={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},i["default"].registerComponent("ControlBar",j),c["default"]=j},{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){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=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e}return h(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=l.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()===1/0?this.show():this.hide()},b}(j["default"]);j["default"].registerComponent("LiveDisplay",m),c["default"]=m},{5:5,81:81}],11:[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(2),j=e(i),k=a(5),l=e(k),m=a(81),n=d(m),o=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.on(c,"volumechange",e.update),c.tech_&&c.tech_.featuresVolumeControl===!1&&e.addClass("vjs-hidden"),e.on(c,"loadstart",function(){this.update(),c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),e}return h(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;0===b||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++)n.removeElClass(this.el_,"vjs-vol-"+e);n.addElClass(this.el_,"vjs-vol-"+c)},b}(j["default"]);o.prototype.controlText_="Mute",l["default"].registerComponent("MuteToggle",o),c["default"]=o},{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){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(47),j=e(i),k=a(49),l=e(k),m=a(14),n=e(m),o=a(5),p=e(o),q=a(81),r=d(q),s=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.updateVisibility(),e.updateLabel(),e.on(c,"loadstart",e.updateVisibility),e.on(c,"ratechange",e.updateLabel),e}return h(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this);return this.labelEl_=r.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 l["default"](this.player()),b=this.playbackRates();if(b)for(var c=b.length-1;c>=0;c--)a.addChild(new n["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}(j["default"]);s.prototype.controlText_="Playback Rate",p["default"].registerComponent("PlaybackRateMenuButton",s),c["default"]=s},{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;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){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=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.partEls_=[],e.on(c,"progress",e.update),e}return h(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),j=e[g];j||(j=this.el_.appendChild(l.createEl()),e[g]=j),j.style.left=f(h,d),j.style.width=f(i-h,d)}for(var k=e.length;k>b.length;k--)this.el_.removeChild(e[k-1]);e.length=b.length},b}(j["default"]);j["default"].registerComponent("LoadProgressBar",m),c["default"]=m},{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){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(83),l=d(k),m=a(84),n=e(m),o=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.updateDataAttr(),e.on(c,"timeupdate",e.updateDataAttr),c.ready(l.bind(e,e.updateDataAttr)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}return h(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,n["default"])(b,this.player_.duration()))},b}(j["default"]);j["default"].registerComponent("PlayProgressBar",o),c["default"]=o},{5:5,83:83,84:84}],18:[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);a(19),a(16);var j=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},b}(i["default"]);j.prototype.options_={children:["seekBar"]},i["default"].registerComponent("ProgressControl",j),c["default"]=j},{16:16,19:19,5:5}],19:[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(57),j=e(i),k=a(5),l=e(k),m=a(83),n=d(m),o=a(84),p=e(o),q=a(80),r=e(q);a(15),a(17),a(20);var s=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.on(c,"timeupdate",e.updateProgress),e.on(c,"ended",e.updateProgress),c.ready(n.bind(e,e.updateProgress)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}return h(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,r["default"])(this.player().el(),"width")),c=parseFloat((0,r["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,p["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}(j["default"]);s.prototype.options_={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},s.prototype.playerEvent="timeupdate",l["default"].registerComponent("SeekBar",s),c["default"]=s},{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){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(83),l=d(k),m=a(84),n=e(m),o=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.updateDataAttr(),e.on(c,"timeupdate",e.updateDataAttr),c.ready(l.bind(e,e.updateDataAttr)),e}return h(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,n["default"])(b,this.player_.duration());this.el_.setAttribute("data-current-time",c),this.tooltip.innerHTML=c},b}(j["default"]);j["default"].registerComponent("TooltipProgressBar",o),c["default"]=o},{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){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=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(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}(i["default"]);i["default"].registerComponent("Spacer",j),c["default"]=j},{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.update=function(b){var c=2;a.prototype.update.call(this),this.player().tech_&&this.player().tech_.featuresNativeTextTracks&&(c=1),this.items&&this.items.length>c?this.show():this.hide()},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||b.push(new m["default"](this.player_,{kind:this.kind_})),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.findChaptersTrack()),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){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(48),j=e(i),k=a(5),l=e(k),m=a(83),n=d(m),o=function(a){function b(c,d){f(this,b);var e=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=g(this,a.call(this,c,d));return j.track=e,j.cue=h,e.addEventListener("cuechange",n.bind(j,j.update)),j}return h(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}(j["default"]);l["default"].registerComponent("ChaptersTrackMenuItem",o),c["default"]=o},{48:48,5:5,83:83}],27:[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(30),j=e(i),k=a(5),l=e(k),m=a(83),n=d(m),o=function(a){function b(c,d,e){f(this,b);var h=g(this,a.call(this,c,d,e));h.el_.setAttribute("aria-label","Descriptions Menu");var i=c.textTracks();return i&&!function(){var a=n.bind(h,h.handleTracksChange);i.addEventListener("change",a),h.on("dispose",function(){i.removeEventListener("change",a)})}(),h}return h(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}(j["default"]);o.prototype.kind_="descriptions",o.prototype.controlText_="Descriptions",l["default"].registerComponent("DescriptionsButton",o),c["default"]=o},{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&&void 0!==arguments[1]?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&&void 0!==arguments[0]?arguments[0]:[];a.push(new o["default"](this.player_,{kind:this.kind_}));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){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"==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},j=a(48),k=e(j),l=a(5),m=e(l),n=a(83),o=d(n),p=a(95),q=e(p),r=a(94),s=e(r),t=function(a){function b(c,d){f(this,b);var e=d.track,h=c.textTracks();d.label=e.label||e.language||"Unknown",d.selected=e["default"]||"showing"===e.mode;var j=g(this,a.call(this,c,d));return j.track=e,h&&!function(){var a=o.bind(j,j.handleTracksChange);h.addEventListener("change",a),j.on("dispose",function(){h.removeEventListener("change",a)})}(),h&&void 0===h.onchange&&!function(){var a=void 0;j.on(["tap","click"],function(){if("object"!==i(q["default"].Event))try{a=new q["default"].Event("change")}catch(b){}a||(a=s["default"].createEvent("Event"),a.initEvent("change",!0,!0)),h.dispatchEvent(a)})}(),j}return h(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?f.mode="showing":f.mode="disabled")}},b.prototype.handleTracksChange=function(a){this.selected("showing"===this.track.mode)},b}(k["default"]);m["default"].registerComponent("TextTrackMenuItem",t),c["default"]=t},{48:48,5:5,83:83,94:94,95:95}],32:[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(84),n=e(m),o=function(a){function b(c,d){f(this,b);
var e=g(this,a.call(this,c,d));return e.on(c,"timeupdate",e.updateContent),e}return h(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_=l.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,n["default"])(b,this.player_.duration());d!==this.formattedTime_&&(this.formattedTime_=d,this.contentEl_.innerHTML='<span class="vjs-control-text">'+c+"</span> "+d)},b}(j["default"]);j["default"].registerComponent("CurrentTimeDisplay",o),c["default"]=o},{5:5,81:81,84:84}],33:[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(84),n=e(m),o=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.on(c,"durationchange",e.updateContent),e.on(c,"timeupdate",e.updateContent),e.on(c,"loadedmetadata",e.updateContent),e}return h(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_=l.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,n["default"])(b);this.contentEl_.innerHTML='<span class="vjs-control-text">'+c+"</span> "+d}},b}(j["default"]);j["default"].registerComponent("DurationDisplay",o),c["default"]=o},{5:5,81:81,84:84}],34:[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(84),n=e(m),o=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.on(c,"timeupdate",e.updateContent),e.on(c,"durationchange",e.updateContent),e}return h(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_=l.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,n["default"])(this.player_.remainingTime());c!==this.formattedTime_&&(this.formattedTime_=c,this.contentEl_.innerHTML='<span class="vjs-control-text">'+b+"</span> -"+c)}},b}(j["default"]);j["default"].registerComponent("RemainingTimeDisplay",o),c["default"]=o},{5:5,81:81,84:84}],35:[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=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(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}(i["default"]);i["default"].registerComponent("TimeDivider",j),c["default"]=j},{5:5}],36:[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(47),j=e(i),k=a(5),l=e(k),m=a(83),n=d(m),o=function(a){function b(c,d){f(this,b);var e=d.tracks,h=g(this,a.call(this,c,d));if(h.items.length<=1&&h.hide(),!e)return g(h);var i=n.bind(h,h.update);return e.addEventListener("removetrack",i),e.addEventListener("addtrack",i),h.player_.on("dispose",function(){e.removeEventListener("removetrack",i),e.removeEventListener("addtrack",i)}),h}return h(b,a),b}(j["default"]);l["default"].registerComponent("TrackButton",o),c["default"]=o},{47:47,5:5,83:83}],37:[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(57),j=e(i),k=a(5),l=e(k),m=a(83),n=d(m);a(39);var o=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.on(c,"volumechange",e.updateARIAAttributes),c.ready(n.bind(e,e.updateARIAAttributes)),e}return h(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}(j["default"]);o.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},o.prototype.playerEvent="volumechange",l["default"].registerComponent("VolumeBar",o),c["default"]=o},{39:39,5:5,57:57,83:83}],38:[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);a(37);var j=function(a){function b(c,d){e(this,b);var g=f(this,a.call(this,c,d));return c.tech_&&c.tech_.featuresVolumeControl===!1&&g.addClass("vjs-hidden"),g.on(c,"loadstart",function(){c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),g}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},b}(i["default"]);j.prototype.options_={children:["volumeBar"]},i["default"].registerComponent("VolumeControl",j),c["default"]=j},{37:37,5:5}],39:[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=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(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}(i["default"]);i["default"].registerComponent("VolumeLevel",j),c["default"]=j},{5:5}],40:[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(83),j=e(i),k=a(5),l=d(k),m=a(54),n=d(m),o=a(53),p=d(o),q=a(11),r=d(q),s=a(37),t=d(s),u=function(a){function b(c){function d(){c.tech_&&c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,b),void 0===e.inline&&(e.inline=!0),void 0===e.vertical&&(e.inline?e.vertical=!1:e.vertical=!0),e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=!!e.vertical;var h=g(this,a.call(this,c,e));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 h(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 n["default"](this.player_,{contentElType:"div"}),b=new t["default"](this.player_,this.options_.volumeBar);return a.addChild(b),this.menuContent=a,this.volumeBar=b,this.attachVolumeBarEvents(),a},b.prototype.handleClick=function(b){r["default"].prototype.handleClick.call(this),a.prototype.handleClick.call(this)},b.prototype.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],j.bind(this,this.handleMouseDown))},b.prototype.handleMouseDown=function(a){this.on(["mousemove","touchmove"],j.bind(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.el_.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},b.prototype.handleMouseUp=function(a){this.off(["mousemove","touchmove"],j.bind(this.volumeBar,this.volumeBar.handleMouseMove))},b}(p["default"]);u.prototype.volumeUpdate=r["default"].prototype.update,u.prototype.controlText_="Mute",l["default"].registerComponent("VolumeMenuButton",u),c["default"]=u},{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_,{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";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}c.__esModule=!0;var e=a(82),f=d(e),g=function(){};g.prototype.allowedEvents_={},g.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},f.on(this,a,b),this.addEventListener=c},g.prototype.addEventListener=g.prototype.on,g.prototype.off=function(a,b){f.off(this,a,b)},g.prototype.removeEventListener=g.prototype.off,g.prototype.one=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},f.one(this,a,b),this.addEventListener=c},g.prototype.trigger=function(a){var b=a.type||a;"string"==typeof a&&(a={type:b}),a=f.fixEvent(a),this.allowedEvents_[b]&&this["on"+b]&&this["on"+b](a),f.trigger(this,a)},g.prototype.dispatchEvent=g.prototype.trigger,c["default"]=g},{82:82}],43:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e="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},f=a(86),g=d(f),h=a(88),i=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof b?"undefined":e(b)));a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.super_=b)},j=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=function(){a.apply(this,arguments)},d={};(0,h.isObject)(b)?("function"==typeof b.init&&(g["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),i(c,a);for(var e in d)d.hasOwnProperty(e)&&(c.prototype[e]=d[e]);return c};c["default"]=j},{86:86,88:88}],44:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;for(var e=a(94),f=d(e),g={},h=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=h[0],j=void 0,k=0;k<h.length;k++)if(h[k][1]in f["default"]){j=h[k];break}if(j)for(var l=0;l<j.length;l++)g[i[l]]=j[l];c["default"]=g},{94:94}],45:[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=function(a){function b(){return e(this,b),f(this,a.apply(this,arguments))}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},b}(i["default"]);i["default"].registerComponent("LoadingSpinner",j),c["default"]=j},{5:5}],46:[function(a,b,c){"use strict";function d(a){return a instanceof d?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)),void(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&&void 0!==arguments[1]?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","false"),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},b.prototype.createMenu=function(){var a=new n["default"](this.player_);if(this.options_.title){var b=p.createEl("li",{className:"vjs-menu-title",innerHTML:(0,t["default"])(this.options_.title),tabIndex:-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 b+=this.options_.inline===!0?"-inline":"-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 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){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(82),p=d(o),q=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.focusedChild_=-1,e.on("keydown",e.handleKeyPress),e}return h(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",n.bind(this,function(a){this.unlockShowing()}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=l.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_),p.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;void 0!==this.focusedChild_&&(a=this.focusedChild_+1),this.focus(a)},b.prototype.stepBack=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_-1),this.focus(a)},b.prototype.focus=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,b=this.children().slice(),c=b.length&&b[0].className&&/vjs-menu-title/.test(b[0].className);c&&b.shift(),b.length>0&&(a<0?a=0:a>=b.length&&(a=b.length-1),this.focusedChild_=a,b[a].el_.focus())},b}(j["default"]);j["default"].registerComponent("Menu",q),c["default"]=q},{5:5,81:81,82:82,83:83}],50:[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(81),j=e(i),k=a(83),l=e(k),m=a(5),n=d(m),o="vjs-modal-dialog",p=27,q=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.opened_=e.hasBeenOpened_=e.hasBeenFilled_=!1,e.closeable(!e.options_.uncloseable),e.content(e.options_.content),e.contentEl_=j.createEl("div",{className:o+"-content"},{role:"document"}),e.descEl_=j.createEl("p",{className:o+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),j.textContent(e.descEl_,e.description()),e.el_.appendChild(e.descEl_),e.el_.appendChild(e.contentEl_),e}return h(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 o+" vjs-hidden "+a.prototype.buildCSSClass.call(this)},b.prototype.handleKeyPress=function(a){a.which===p&&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.wasPlaying_&&a.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",l.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_&&a.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",l.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 c(a){if("boolean"==typeof a){var c=this.closeable_=!!a,b=this.getChild("closeButton");if(c&&!b){var d=this.contentEl_;this.contentEl_=this.el_,b=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=d,this.on(b,"close",this.close)}!c&&b&&(this.off(b,"close",this.close),this.removeChild(b),b.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(),j.insertContent(b,a),this.trigger("modalfill"),d?c.insertBefore(b,d):c.appendChild(b),this},b.prototype.empty=function(){return this.trigger("beforemodalempty"),j.emptyEl(this.contentEl()),this.trigger("modalempty"),
this},b.prototype.content=function(a){return"undefined"!=typeof a&&(this.content_=a),this.content_},b}(n["default"]);q.prototype.options_={temporary:!0},n["default"].registerComponent("ModalDialog",q),c["default"]=q},{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?");j.tag=c,j.tagAttributes=c&&r.getElAttributes(c),j.language(j.options_.language),d.languages?!function(){var a={};Object.getOwnPropertyNames(d.languages).forEach(function(b){a[b.toLowerCase()]=d.languages[b]}),j.languages_=a}():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 k=(0,O["default"])(j.options_);return d.plugins&&!function(){var a=d.plugins;Object.getOwnPropertyNames(a).forEach(function(b){"function"==typeof this[b]?this[b](a[b]):z["default"].error("Unable to find plugin:",b)},j)}(),j.options_.playerOptions=k,j.initChildren(),j.isAudio("audio"===c.nodeName.toLowerCase()),j.controls()?j.addClass("vjs-controls-enabled"):j.addClass("vjs-controls-disabled"),j.el_.setAttribute("role","region"),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,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=d?this.el_=b.parentNode:this.el_=a.prototype.createEl.call(this,"div"),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"),n["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0){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(void 0===b)return this[c]||0;if(""===b)this[c]=void 0;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){return void 0===a?!!this.fluid_:(this.fluid_=!!a,a?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),void this.updateStyleEl_())},b.prototype.aspectRatio=function(a){if(void 0===a)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(n["default"].VIDEOJS_NO_DYNAMIC_STYLE===!0){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=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var h=f.split(":"),i=h[1]/h[0];d=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,e=void 0!==this.height_?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,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_,"waiting",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 void 0!==a?(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 in 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 void 0===this.tech_[a]?(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 this.techGet_("paused")!==!1},b.prototype.scrubbing=function(a){return void 0!==a?(this.scrubbing_=!!a,a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_},b.prototype.currentTime=function(a){return void 0!==a?(this.techCall_("setCurrentTime",a),this):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},b.prototype.duration=function(a){return void 0===a?this.cache_.duration||0:(a=parseFloat(a)||0,a<0&&(a=1/0),a!==this.cache_.duration&&(this.cache_.duration=a,a===1/0?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 c(){var c=this.techGet_("buffered");return c&&c.length||(c=(0,C.createTimeRange)(0,0)),c},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 void 0!==a?(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 void 0!==a?(this.techCall_("setMuted",a),this):this.techGet_("muted")||!1},b.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},b.prototype.isFullscreen=function(a){return void 0!==a?(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]),this.isFullscreen()===!1&&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&&(this.isFullscreen()===!0?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=void 0,f=function(a){return function(b,c){return a(c,b)}},g=function(a,c){var d=a[0],e=a[1];if(e.canPlaySource(c,b.options_[d.toLowerCase()]))return{source:c,tech:d}};return e=this.options_.sourceOrder?d(a,c,f(g)):d(c,a,g),e||!1},b.prototype.src=function(a){if(void 0===a)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 void 0!==a?(this.techCall_("setPreload",a),this.options_.preload=a,this):this.techGet_("preload")},b.prototype.autoplay=function(a){return void 0!==a?(this.techCall_("setAutoplay",a),this.options_.autoplay=a,this):this.techGet_("autoplay",a)},b.prototype.loop=function(a){return void 0!==a?(this.techCall_("setLoop",a),this.options_.loop=a,this):this.techGet_("loop")},b.prototype.poster=function(a){return void 0===a?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 void 0!==a?(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 void 0!==a?(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 void 0===a?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 void 0!==a?(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 void 0!==a?(this.techCall_("setPlaybackRate",a),this):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},b.prototype.isAudio=function(a){return void 0!==a?(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&&void 0!==arguments[0]?arguments[0]:{},b=a.track,c=void 0===b?arguments[0]:b;if(this.tech_)return this.tech_.removeRemoteTextTrack(c)},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 void 0===a?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=void 0,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:["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";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a(51),f=d(e),g=function(a,b){f["default"].prototype[a]=b};c["default"]=g},{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&&void 0!==arguments[1]?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 b+=this.options_.inline===!0?"-inline":"-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){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(82),p=d(o),q=function(a){function b(){return f(this,b),g(this,a.apply(this,arguments))}return h(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",n.bind(this,function(){this.unlockShowing()}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=l.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_),p.on(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b}(j["default"]);j["default"].registerComponent("Popup",q),c["default"]=q},{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=void 0;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(void 0===m.player){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){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(88),n=function(a){function b(c,d){f(this,b);var e=g(this,a.call(this,c,d));return e.bar=e.getChild(e.options_.barName),e.vertical(!!e.options_.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(c,"controlsvisible",e.update),e.on(c,e.playerEvent,e.update),e}return h(b,a),b.prototype.createEl=function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return c.className=c.className+" vjs-slider",c=(0,m.assign)({tabIndex:0},c),d=(0,m.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(),l.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;l.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===1/0)&&(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=l.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 void 0===a?this.vertical_||!1:(this.vertical_=!!a,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},b}(j["default"]);j["default"].registerComponent("Slider",n),c["default"]=n},{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 c!==-1?d=c+1:(c=d=a.lastIndexOf("/")+1,0===c&&(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?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){var b=a.charAt(0).toUpperCase()+a.slice(1);A["set"+b]=function(b){return this.el_.vjs_setProperty(a,b)}}function j(a){A[a]=function(){return this.el_.vjs_getProperty(a)}}c.__esModule=!0;for(var k=a(62),l=e(k),m=a(81),n=d(m),o=a(92),p=d(o),q=a(90),r=a(58),s=e(r),t=a(5),u=e(t),v=a(95),w=e(v),x=a(88),y=w["default"].navigator,z=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),w["default"].videojs=w["default"].videojs||{},w["default"].videojs.Flash=w["default"].videojs.Flash||{},w["default"].videojs.Flash.onReady=b.onReady,w["default"].videojs.Flash.onEvent=b.onEvent,w["default"].videojs.Flash.onError=b.onError,e.on("seeked",function(){this.lastSeekTarget_=void 0}),e}return h(b,a),b.prototype.createEl=function(){var a=this.options_;if(!a.swf){var c="5.1.0";a.swf="//vjs.zencdn.net/swf/"+c+"/video-js.swf"}var d=a.techId,e=(0,x.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),f=(0,x.assign)({wmode:"opaque",bgcolor:"#000000"},a.params),g=(0,x.assign)({id:d,name:d,"class":"vjs-tech"},a.attributes);return this.el_=b.embed(a.swf,e,f,g),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 void 0===a?this.currentSrc():this.setSrc(a)},b.prototype.setSrc=function(a){var b=this;a=p.getAbsoluteURL(a),this.el_.vjs_src(a),this.autoplay()&&this.setTimeout(function(){return b.play()},0)},b.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},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 c(){if(0===this.readyState())return NaN;var c=this.el_.vjs_getProperty("duration");return c>=0?c:1/0},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,q.createTimeRange)():(0,q.createTimeRange)(0,a)},b.prototype.buffered=function(){var a=this.el_.vjs_getProperty("buffered");return 0===a.length?(0,q.createTimeRange)():(0,q.createTimeRange)(a[0][0],a[0][1])},b.prototype.supportsFullScreen=function(){return!1},b.prototype.enterFullScreen=function(){return!1},b}(l["default"]),A=z.prototype,B="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),C="networkState,readyState,initialTime,startOffsetTime,paused,ended,videoWidth,videoHeight".split(","),D=0;D<B.length;D++)j(B[D]),i(B[D]);for(var E=0;E<C.length;E++)j(C[E]);z.isSupported=function(){return z.version()[0]>=10},l["default"].withSourceHandlers(z),z.nativeSourceHandler={},z.nativeSourceHandler.canPlayType=function(a){return a in z.formats?"maybe":""},z.nativeSourceHandler.canHandleSource=function(a,b){function c(a){var b=p.getFileExtension(a);return b?"video/"+b:""}var d=void 0;return d=a.type?a.type.replace(/;.*/,"").toLowerCase():c(a.src),z.nativeSourceHandler.canPlayType(d)},z.nativeSourceHandler.handleSource=function(a,b,c){b.setSrc(a.src)},z.nativeSourceHandler.dispose=function(){},z.registerSourceHandler(z.nativeSourceHandler),z.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},z.onReady=function(a){var b=n.getEl(a),c=b&&b.tech;c&&c.el()&&z.checkReady(c)},z.checkReady=function(a){a.el()&&(a.el().vjs_getProperty?a.triggerReady():this.setTimeout(function(){z.checkReady(a)},50))},z.onEvent=function(a,b){var c=n.getEl(a).tech,d=Array.prototype.slice.call(arguments,2);c.setTimeout(function(){c.trigger(b,d)},1)},z.onError=function(a,b){var c=n.getEl(a).tech;return"srcnotfound"===b?c.error(4):void c.error("FLASH: "+b)},z.version=function(){var a="0,0,0";try{a=new w["default"].ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{y.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(y.plugins["Shockwave Flash 2.0"]||y.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(c){}}return a.split(",")},z.embed=function(a,b,c,d){var e=z.getEmbedCode(a,b,c,d),f=n.createEl("div",{innerHTML:e}).childNodes[0];return f},z.getEmbedCode=function(a,b,c,d){var e='<object type="application/x-shockwave-flash" ',f="",g="",h="";return b&&Object.getOwnPropertyNames(b).forEach(function(a){f+=a+"="+b[a]+"&amp;"}),c=(0,x.assign)({movie:a,flashvars:f,allowScriptAccess:"always",allowNetworking:"all"},c),Object.getOwnPropertyNames(c).forEach(function(a){g+='<param name="'+a+'" value="'+c[a]+'" />'}),d=(0,x.assign)({data:a,width:"100%",height:"100%"},d),Object.getOwnPropertyNames(d).forEach(function(a){h+=a+'="'+d[a]+'" '}),""+e+h+">"+g+"</object>"},(0,s["default"])(z),u["default"].registerComponent("Flash",z),l["default"].registerTech("Flash",z),c["default"]=z},{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){return a.raw=b,a}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(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 i(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 j="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},k=f(["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."]),l=a(62),m=e(l),n=a(5),o=e(n),p=a(81),q=d(p),r=a(92),s=d(r),t=a(83),u=d(t),v=a(86),w=e(v),x=a(98),y=e(x),z=a(78),A=d(z),B=a(94),C=e(B),D=a(95),E=e(D),F=a(88),G=a(87),H=e(G),I=a(91),J=e(I),K=function(a){function b(c,d){g(this,b);var e=h(this,a.call(this,c,d)),f=c.source,i=!1;if(f&&(e.el_.currentSrc!==f.src||c.tag&&3===c.tag.initNetworkState_)?e.setSource(f):e.handleLateInit_(e.el_),e.el_.hasChildNodes()){for(var j=e.el_.childNodes,l=j.length,m=[];l--;){var n=j[l],o=n.nodeName.toLowerCase();"track"===o&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().addTrackElement_(n),e.remoteTextTracks().addTrack_(n.track),i||e.el_.hasAttribute("crossorigin")||!s.isCrossOrigin(n.src)||(i=!0)):m.push(n))}for(var p=0;p<m.length;p++)e.el_.removeChild(m[p])}var q=["audio","video"];return q.forEach(function(a){var b=e.el()[a+"Tracks"],c=e[a+"Tracks"](),d=(0,J["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&&(i&&w["default"].warn((0,y["default"])(k)),e.handleTextTrackChange_=u.bind(e,e.handleTextTrackChange),e.handleTextTrackAdd_=u.bind(e,e.handleTextTrackAdd),e.handleTextTrackRemove_=u.bind(e,e.handleTextTrackRemove),e.proxyNativeTextTracks_()),(A.TOUCH_ENABLED||A.IS_IPHONE||A.IS_NATIVE_ANDROID)&&c.nativeControlsForTouch===!0&&e.setControls(!0),e.proxyWebkitFullscreen_(),e.triggerReady(),e}return i(b,a),b.prototype.dispose=function(){var c=this;["audio","video","text"].forEach(function(a){var b=(0,J["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=C["default"].createElement("video");var d=this.options_.tag&&q.getElAttributes(this.options_.tag),e=(0,H["default"])({},d);A.TOUCH_ENABLED&&this.options_.nativeControlsForTouch===!0||delete e.controls,q.setElAttributes(a,(0,F.assign)(e,{id:this.options_.techId,"class":"vjs-tech"}))}a.playerId=this.options_.playerId}for(var f=["autoplay","preload","loop","muted"],g=f.length-1;g>=0;g--){var h=f[g],i={};"undefined"!=typeof this.options_[h]&&(i[h]=this.options_[h]),q.setElAttributes(a,i)}return a},b.prototype.handleLateInit_=function(a){var b=this;if(0!==a.networkState&&3!==a.networkState){if(0===a.readyState){var c=function(){var a=!1,c=function(){a=!0};b.on("loadstart",c);var d=function(){a||this.trigger("loadstart")};return b.on("loadedmetadata",d),b.ready(function(){this.off("loadstart",c),this.off("loadedmetadata",d),a||this.trigger("loadstart")}),{v:void 0}}();if("object"===("undefined"==typeof c?"undefined":j(c)))return c.v}var d=["loadstart"];d.push("loadedmetadata"),a.readyState>=2&&d.push("loadeddata"),a.readyState>=3&&d.push("canplay"),a.readyState>=4&&d.push("canplaythrough"),this.ready(function(){d.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();void 0!==a&&"function"==typeof a.then&&a.then(null,function(a){})},b.prototype.setCurrentTime=function(a){try{this.el_.currentTime=a}catch(b){(0,w["default"])(b,"Video is not ready. (Video.js)")}},b.prototype.duration=function(){var a=this;if(this.el_.duration===1/0&&A.IS_ANDROID&&A.IS_CHROME&&0===this.el_.currentTime){var b=function(){var b=function c(){a.el_.currentTime>0&&(a.el_.duration===1/0&&a.trigger("durationchange"),a.off("timeupdate",c))};return a.on("timeupdate",b),{v:NaN}}();if("object"===("undefined"==typeof b?"undefined":j(b)))return b.v}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(){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=E["default"].navigator&&E["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){return void 0===a?this.el_.src:void 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=C["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}(m["default"]);if(q.isReal()){K.TEST_VID=C["default"].createElement("video");var L=C["default"].createElement("track");L.kind="captions",L.srclang="en",L.label="English",K.TEST_VID.appendChild(L)}K.isSupported=function(){try{K.TEST_VID.volume=.5}catch(a){return!1}return!(!K.TEST_VID||!K.TEST_VID.canPlayType)},K.canControlVolume=function(){try{var a=K.TEST_VID.volume;return K.TEST_VID.volume=a/2+.1,a!==K.TEST_VID.volume}catch(b){return!1}},K.canControlPlaybackRate=function(){if(A.IS_ANDROID&&A.IS_CHROME)return!1;try{var a=K.TEST_VID.playbackRate;return K.TEST_VID.playbackRate=a/2+.1,a!==K.TEST_VID.playbackRate}catch(b){return!1}},K.supportsNativeTextTracks=function(){return A.IS_ANY_SAFARI},K.supportsNativeVideoTracks=function(){return!(!K.TEST_VID||!K.TEST_VID.videoTracks)},K.supportsNativeAudioTracks=function(){return!(!K.TEST_VID||!K.TEST_VID.audioTracks)},K.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],K.prototype.featuresVolumeControl=K.canControlVolume(),K.prototype.featuresPlaybackRate=K.canControlPlaybackRate(),K.prototype.movingMediaElementInDOM=!A.IS_IOS,K.prototype.featuresFullscreenResize=!0,K.prototype.featuresProgressEvents=!0,K.prototype.featuresTimeupdateEvents=!0,K.prototype.featuresNativeTextTracks=K.supportsNativeTextTracks(),K.prototype.featuresNativeVideoTracks=K.supportsNativeVideoTracks(),K.prototype.featuresNativeAudioTracks=K.supportsNativeAudioTracks();var M=K.TEST_VID&&K.TEST_VID.constructor.prototype.canPlayType,N=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,O=/^video\/mp4/i;K.patchCanPlayType=function(){A.ANDROID_VERSION>=4&&!A.IS_FIREFOX?K.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&N.test(a)?"maybe":M.call(this,a)}:A.IS_OLD_ANDROID&&(K.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&O.test(a)?"maybe":M.call(this,a)})},K.unpatchCanPlayType=function(){var a=K.TEST_VID.constructor.prototype.canPlayType;return K.TEST_VID.constructor.prototype.canPlayType=M,a},K.patchCanPlayType(),K.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){}}()}},K.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){K.prototype[a]=function(){return this.el_[a]}}),["volume","muted","src","poster","preload","autoplay","loop","playbackRate"].forEach(function(a){K.prototype["set"+(0,J["default"])(a)]=function(b){this.el_[a]=b}}),["pause","load"].forEach(function(a){K.prototype[a]=function(){return this.el_[a]()}}),m["default"].withSourceHandlers(K),K.nativeSourceHandler={},K.nativeSourceHandler.canPlayType=function(a){try{return K.TEST_VID.canPlayType(a)}catch(b){return""}},K.nativeSourceHandler.canHandleSource=function(a,b){if(a.type)return K.nativeSourceHandler.canPlayType(a.type);if(a.src){var c=s.getFileExtension(a.src);return K.nativeSourceHandler.canPlayType("video/"+c)}return""},K.nativeSourceHandler.handleSource=function(a,b,c){b.setSrc(a.src)},K.nativeSourceHandler.dispose=function(){},K.registerSourceHandler(K.nativeSourceHandler),o["default"].registerComponent("Html5",K),m["default"].registerTech("Html5",K),c["default"]=K},{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){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,c,d){var e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},f=a.textTracks();e.kind=b,c&&(e.label=c),d&&(e.language=d),e.tech=a;var g=new t["default"](e);return f.addTrack_(g),g}c.__esModule=!0;var j="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},k=a(5),l=e(k),m=a(66),n=e(m),o=a(65),p=e(o),q=a(87),r=e(q),s=a(72),t=e(s),u=a(70),v=e(u),w=a(76),x=e(w),y=a(63),z=e(y),A=a(83),B=d(A),C=a(86),D=e(C),E=a(90),F=a(79),G=a(46),H=e(G),I=a(95),J=e(I),K=a(94),L=e(K),M=a(88),N=function(b){function c(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};f(this,c),a.reportTouchActivity=!1;var e=g(this,b.call(this,null,a,d));return e.hasStarted_=!1,e.on("playing",function(){this.hasStarted_=!0}),e.on("loadstart",function(){this.hasStarted_=!1}),e.textTracks_=a.textTracks,e.videoTracks_=a.videoTracks,e.audioTracks_=a.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(b){a["native"+b+"Tracks"]===!1&&(e["featuresNative"+b+"Tracks"]=!1)}),a.nativeCaptions===!1&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.autoRemoteTextTracks_=new v["default"],e.initTextTrackListeners(),e.initTrackListeners(),a.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.name_=e.constructor.name||"Unknown Tech"),e}return h(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(B.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,E.createTimeRange)(0,0)},c.prototype.bufferedPercent=function(){return(0,F.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 void 0!==a&&(this.error_=new H["default"](a),this.trigger("error")),this.error_},c.prototype.played=function(){return this.hasStarted_?(0,E.createTimeRange)(0,0):(0,E.createTimeRange)()},c.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},c.prototype.initTextTrackListeners=function(){var a=B.bind(this,function(){this.trigger("texttrackchange")}),b=this.textTracks();b&&(b.addEventListener("removetrack",a),b.addEventListener("addtrack",a),this.on("dispose",B.bind(this,function(){b.removeEventListener("removetrack",a),
b.removeEventListener("addtrack",a)})))},c.prototype.initTrackListeners=function(){var a=this,b=["video","audio"];b.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(!J["default"].WebVTT&&null!==this.el().parentNode&&void 0!==this.el().parentNode){var c=function(){var c=a(99);if(!b.options_["vtt.js"]&&(0,M.isPlain)(c)&&Object.keys(c).length>0)return Object.keys(c).forEach(function(a){J["default"][a]=c[a]}),b.trigger("vttjsloaded"),{v:void 0};var d=L["default"].createElement("script");d.src=b.options_["vtt.js"]||"https://cdn.rawgit.com/gkatsev/vtt.js/vjs-v0.12.1/dist/vtt.min.js",d.onload=function(){b.trigger("vttjsloaded")},d.onerror=function(){b.trigger("vttjserror")},b.on("dispose",function(){d.onload=null,d.onerror=null}),J["default"].WebVTT=!0,b.el().parentNode.appendChild(d)}();if("object"===("undefined"==typeof c?"undefined":j(c)))return c.v}},c.prototype.emulateTextTracks=function(){var a=this,b=this.textTracks();if(b){this.remoteTextTracks().on("addtrack",function(b){a.textTracks().addTrack_(b.track)}),this.remoteTextTracks().on("removetrack",function(b){a.textTracks().removeTrack_(b.track)}),this.on("ready",this.addWebVttScript_);var c=function(){return a.trigger("texttrackchange")},d=function(){c();for(var a=0;a<b.length;a++){var d=b[a];d.removeEventListener("cuechange",c),"showing"===d.mode&&d.addEventListener("cuechange",c)}};d(),b.addEventListener("change",d),this.on("dispose",function(){b.removeEventListener("change",d)})}},c.prototype.videoTracks=function(){return this.videoTracks_=this.videoTracks_||new x["default"],this.videoTracks_},c.prototype.audioTracks=function(){return this.audioTracks_=this.audioTracks_||new z["default"],this.audioTracks_},c.prototype.textTracks=function(){return this.textTracks_=this.textTracks_||new v["default"],this.textTracks_},c.prototype.remoteTextTracks=function(){return this.remoteTextTracks_=this.remoteTextTracks_||new v["default"],this.remoteTextTracks_},c.prototype.remoteTextTrackEls=function(){return this.remoteTextTrackEls_=this.remoteTextTrackEls_||new p["default"],this.remoteTextTrackEls_},c.prototype.addTextTrack=function(a,b,c){if(!a)throw new Error("TextTrack kind is required but was not provided");return i(this,a,b,c)},c.prototype.createRemoteTextTrack=function(a){var b=(0,r["default"])(a,{tech:this});return new n["default"](b)},c.prototype.addRemoteTextTrack=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments[1],c=this.createRemoteTextTrack(a);return b!==!0&&b!==!1&&(D["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),b!==!0&&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.setPoster=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]:J["default"]&&J["default"].videojs&&J["default"].videojs[a]?(D["default"].warn("The "+a+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),J["default"].videojs[a]):void 0},c}(l["default"]);N.prototype.textTracks_,N.prototype.audioTracks_,N.prototype.videoTracks_,N.prototype.featuresVolumeControl=!0,N.prototype.featuresFullscreenResize=!1,N.prototype.featuresPlaybackRate=!1,N.prototype.featuresProgressEvents=!1,N.prototype.featuresTimeupdateEvents=!1,N.prototype.featuresNativeTextTracks=!1,N.withSourceHandlers=function(a){a.registerSourceHandler=function(b,c){var d=a.sourceHandlers;d||(d=a.sourceHandlers=[]),void 0===c&&(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=void 0,f=0;f<d.length;f++)if(e=d[f].canHandleSource(b,c))return d[f];return null},a.canPlaySource=function(b,c){var d=a.selectSourceHandler(b,c);return d?d.canHandleSource(b,c):""};var b=["seekable","duration"];b.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:D["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)}},l["default"].registerComponent("Tech",N),l["default"].registerComponent("MediaTechController",N),N.registerTech("Tech",N),c["default"]=N},{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){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(78),l=d(k),m=a(94),n=e(m),o=function(a,b){for(var c=0;c<a.length;c++)b.id!==a[c].id&&(a[c].enabled=!1)},p=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];f(this,b);for(var h=void 0,i=e.length-1;i>=0;i--)if(e[i].enabled){o(e,e[i]);break}if(l.IS_IE8){h=n["default"].createElement("custom");for(var k in j["default"].prototype)"constructor"!==k&&(h[k]=j["default"].prototype[k]);for(var m in b.prototype)"constructor"!==m&&(h[m]=b.prototype[m])}return h=c=g(this,a.call(this,e,h)),h.changing_=!1,d=h,g(c,d)}return h(b,a),b.prototype.addTrack_=function(b){var c=this;b.enabled&&o(this,b),a.prototype.addTrack_.call(this,b),b.addEventListener&&b.addEventListener("enabledchange",function(){c.changing_||(c.changing_=!0,o(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}(j["default"]);c["default"]=p},{74:74,78:78,94:94}],64:[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(73),j=a(75),k=e(j),l=a(87),m=e(l),n=a(78),o=d(n),p=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,b);var h=(0,m["default"])(e,{kind:i.AudioTrackKind[e.kind]||""}),j=c=g(this,a.call(this,h)),k=!1;if(o.IS_IE8)for(var l in b.prototype)"constructor"!==l&&(j[l]=b.prototype[l]);return Object.defineProperty(j,"enabled",{get:function(){return k},set:function(a){"boolean"==typeof a&&a!==k&&(k=a,this.trigger("enabledchange"))}}),h.enabled&&(j.enabled=h.enabled),j.loaded_=!0,d=j,g(c,d)}return h(b,a),b}(k["default"]);c["default"]=p},{73:73,75:75,78:78,87:87}],65:[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")}c.__esModule=!0;var g=a(78),h=e(g),i=a(94),j=d(i),k=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];f(this,a);var c=this;if(h.IS_IE8){c=j["default"].createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}c.trackElements_=[],Object.defineProperty(c,"length",{get:function(){return this.trackElements_.length}});for(var e=0,g=b.length;e<g;e++)c.addTrackElement_(b[e]);if(h.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]}}),this.trackElements_.indexOf(a)===-1&&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"]=k},{78:78,94:94}],66:[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(42),n=d(m),o=a(72),p=d(o),q=0,r=1,s=2,t=3,u=function(a){function b(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,b);var d=g(this,a.call(this)),e=void 0,h=d;if(j.IS_IE8){h=l["default"].createElement("custom");for(var i in b.prototype)"constructor"!==i&&(h[i]=b.prototype[i])}var k=new p["default"](c);if(h.kind=k.kind,h.src=k.src,h.srclang=k.language,h.label=k.label,h["default"]=k["default"],Object.defineProperty(h,"readyState",{get:function(){return e}}),Object.defineProperty(h,"track",{get:function(){return k}}),e=q,k.addEventListener("loadeddata",function(){e=s,h.trigger({type:"load",target:h})}),j.IS_IE8){var m;return m=h,g(d,m)}return d}return h(b,a),b}(n["default"]);u.prototype.allowedEvents_={load:"load"},u.NONE=q,u.LOADING=r,u.LOADED=s,u.ERROR=t,c["default"]=u},{42:42,72:72,78:78,94:94}],67:[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")}c.__esModule=!0;var g=a(78),h=e(g),i=a(94),j=d(i),k=function(){function a(b){f(this,a);var c=this;if(h.IS_IE8){c=j["default"].createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}if(a.prototype.setCues_.call(c,b),Object.defineProperty(c,"length",{get:function(){return this.length_}}),h.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"]=k},{78:78,94:94}],68:[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){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+b+")"}function j(a,b,c){try{a.style[b]=c}catch(d){return}}c.__esModule=!0;var k=a(5),l=e(k),m=a(83),n=d(m),o=a(95),p=e(o),q="#222",r="#ccc",s={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'},t=function(a){function b(c,d,e){f(this,b);var h=g(this,a.call(this,c,d,e));return c.on("loadstart",n.bind(h,h.toggleDisplay)),c.on("texttrackchange",n.bind(h,h.updateDisplay)),c.ready(n.bind(h,function(){if(c.tech_&&c.tech_.featuresNativeTextTracks)return void this.hide();c.on("fullscreenchange",n.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 h(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 p["default"].WebVTT&&p["default"].WebVTT.processCues(p["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 p["default"].WebVTT&&a.activeCues){for(var b=this.player_.textTrackSettings.getValues(),c=[],d=0;d<a.activeCues.length;d++)c.push(a.activeCues[d]);p["default"].WebVTT.processCues(p["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&&j(g.firstChild,"color",i(b.color||"#fff",b.textOpacity)),b.backgroundColor&&(g.firstChild.style.backgroundColor=b.backgroundColor),b.backgroundOpacity&&j(g.firstChild,"backgroundColor",i(b.backgroundColor||"#000",b.backgroundOpacity)),b.windowColor&&(b.windowOpacity?j(g,"backgroundColor",i(b.windowColor,b.windowOpacity)):g.style.backgroundColor=b.windowColor),b.edgeStyle&&("dropshadow"===b.edgeStyle?g.firstChild.style.textShadow="2px 2px 3px "+q+", 2px 2px 4px "+q+", 2px 2px 5px "+q:"raised"===b.edgeStyle?g.firstChild.style.textShadow="1px 1px "+q+", 2px 2px "+q+", 3px 3px "+q:"depressed"===b.edgeStyle?g.firstChild.style.textShadow="1px 1px "+r+", 0 1px "+r+", -1px -1px "+q+", 0 -1px "+q:"uniform"===b.edgeStyle&&(g.firstChild.style.textShadow="0 0 4px "+q+", 0 0 4px "+q+", 0 0 4px "+q+", 0 0 4px "+q)),b.fontPercent&&1!==b.fontPercent){var h=p["default"].parseFloat(g.style.fontSize);g.style.fontSize=h*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=s[b.fontFamily])}}}},b}(l["default"]);l["default"].registerComponent("TextTrackDisplay",t),c["default"]=t},{5:5,83:83,95:95}],69:[function(a,b,c){"use strict";c.__esModule=!0;var d=function(a){var b=["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}})});return b},e=function(a){var b=a.$$("track"),c=Array.prototype.map.call(b,function(a){return a.track}),e=Array.prototype.map.call(b,function(a){var b=d(a.track);return a.src&&(b.src=a.src),b});return e.concat(Array.prototype.filter.call(a.textTracks(),function(a){return c.indexOf(a)===-1}).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&&void 0!==arguments[0]?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){var c=a.options[a.options.selectedIndex].value;return i(c,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="vjs-text-track-settings",x=["#000","Black"],y=["#00F","Blue"],z=["#0FF","Cyan"],A=["#0F0","Green"],B=["#F0F","Magenta"],C=["#F00","Red"],D=["#FFF","White"],E=["#FF0","Yellow"],F=["1","Opaque"],G=["0.5","Semi-Transparent"],H=["0","Transparent"],I={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[x,D,C,A,y,E,B,z]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[F,G,H]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[D,x,C,A,y,E,B,z]},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 > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[F,G]},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:[H,G,F]}};I.windowColor.options=I.backgroundColor.options;var J=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),void 0===d.persistTextTrackSettings&&(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(I,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=I[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},void 0,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"},void 0,this.createElSelect_("textOpacity"));return(0,p.createEl)("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[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"},void 0,this.createElSelect_("backgroundOpacity"));return(0,p.createEl)("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[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"},void 0,this.createElSelect_("windowOpacity"));return(0,p.createEl)("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[a].concat(b,c))},b.prototype.createElColors_=function(){return(0,p.createEl)("div",{className:"vjs-tracksettings-colors"},void 0,[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()])},b.prototype.createElFont_=function(){var a=(0,p.createEl)("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.createElSelect_("fontPercent")),b=(0,p.createEl)("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.createElSelect_("edgeStyle")),c=(0,p.createEl)("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.createElSelect_("fontFamily"));return(0,p.createEl)("div",{className:"vjs-tracksettings-font"},void 0,[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"},void 0,[a,b])},b.prototype.createEl=function(){var a=(0,p.createEl)("div",{className:"vjs-tracksettings"},void 0,[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",void 0,{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(I,function(b,c,d){var e=j(a.$(c.selector),c.parser);return void 0!==e&&(b[d]=e),b},{})},b.prototype.setValues=function(a){var b=this;t.each(I,function(c,d){k(b.$(c.selector),a[d],c.parser)})},b.prototype.setDefaults=function(){var a=this;t.each(I,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(w))}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(w,JSON.stringify(a)):m["default"].localStorage.removeItem(w)}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",J),c["default"]=J},{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(105),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){return a?o["default"].error(a,c):(b.loaded_=!0,void("function"!=typeof q["default"].WebVTT?b.tech_&&!function(){var a=function(){return A(d,b)};b.tech_.on("vttjsloaded",a),b.tech_.on("vttjserror",function(){o["default"].error("vttjs failed to load, stopping trying to process "+b.src),b.tech_.off("vttjsloaded",a)})}():A(d,b)))}))},C=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(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_.on("timeupdate",s),Object.defineProperty(n,"default",{get:function(){return k},set:function(){}}),Object.defineProperty(n,"mode",{get:function(){return i},set:function(a){m.TextTrackMode[a]&&(i=a,"showing"===i&&this.tech_.on("timeupdate",s),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++)this.activeCues_.indexOf(b[f])===-1&&(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=this.tech_.textTracks();if(b)for(var c=0;c<b.length;c++)b[c]!==this&&b[c].removeCue(a);this.cues_.push(a),this.cues.setCues_(this.cues_)},b.prototype.removeCue=function(a){for(var b=!1,c=0,d=this.cues_.length;c<d;c++){var e=this.cues_[c];e===a&&(this.cues_.splice(c,1),b=!0)}b&&this.cues.setCues_(this.cues_)},b}(s["default"]);C.prototype.allowedEvents_={cuechange:"cuechange"},c["default"]=C},{105:105,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){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(42),j=e(i),k=a(78),l=d(k),m=a(94),n=e(m),o=function(a){function b(){var c,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;f(this,b);var h=g(this,a.call(this));if(!e&&(e=h,l.IS_IE8)){e=n["default"].createElement("custom");for(var i in b.prototype)"constructor"!==i&&(e[i]=b.prototype[i])}e.tracks_=[],Object.defineProperty(e,"length",{get:function(){return this.tracks_.length}});for(var j=0;j<d.length;j++)e.addTrack_(d[j]);return c=e,g(h,c)}return h(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]}}),this.tracks_.indexOf(a)===-1&&(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}(j["default"]);o.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var p in o.prototype.allowedEvents_)o.prototype["on"+p]=null;c["default"]=o},{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&&void 0!==arguments[0]?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||""},m=function(a){Object.defineProperty(h,a,{get:function(){return k[a]},set:function(){}})};for(var o in k)m(o);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){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(78),l=d(k),m=a(94),n=e(m),o=function(a,b){for(var c=0;c<a.length;c++)b.id!==a[c].id&&(a[c].selected=!1)},p=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];f(this,b);for(var h=void 0,i=e.length-1;i>=0;i--)if(e[i].selected){o(e,e[i]);break}if(l.IS_IE8){h=n["default"].createElement("custom");for(var k in j["default"].prototype)"constructor"!==k&&(h[k]=j["default"].prototype[k]);for(var m in b.prototype)"constructor"!==m&&(h[m]=b.prototype[m])}return h=c=g(this,a.call(this,e,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,g(c,d)}return h(b,a),b.prototype.addTrack_=function(b){var c=this;b.selected&&o(this,b),a.prototype.addTrack_.call(this,b),b.addEventListener&&b.addEventListener("selectedchange",function(){c.changing_||(c.changing_=!0,o(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}(j["default"]);c["default"]=p},{74:74,78:78,94:94}],77:[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(73),j=a(75),k=e(j),l=a(87),m=e(l),n=a(78),o=d(n),p=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,b);var h=(0,m["default"])(e,{kind:i.VideoTrackKind[e.kind]||""}),j=c=g(this,a.call(this,h)),k=!1;if(o.IS_IE8)for(var l in b.prototype)"constructor"!==l&&(j[l]=b.prototype[l]);return Object.defineProperty(j,"selected",{get:function(){return k},set:function(a){"boolean"==typeof a&&a!==k&&(k=a,this.trigger("selectedchange"))}}),h.selected&&(j.selected=h.selected),d=j,g(c,d)}return h(b,a),b}(k["default"]);c["default"]=p},{73:73,75:75,78:78,87:87}],78:[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}c.__esModule=!0,c.BACKGROUND_SIZE_SUPPORTED=c.TOUCH_ENABLED=c.IS_ANY_SAFARI=c.IS_SAFARI=c.IE_VERSION=c.IS_IE8=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=void 0;var f=a(81),g=e(f),h=a(95),i=d(h),j=i["default"].navigator&&i["default"].navigator.userAgent||"",k=/AppleWebKit\/([\d.]+)/i.exec(j),l=k?parseFloat(k.pop()):null,m=c.IS_IPAD=/iPad/i.test(j),n=c.IS_IPHONE=/iPhone/i.test(j)&&!m,o=c.IS_IPOD=/iPod/i.test(j),p=c.IS_IOS=n||m||o,q=(c.IOS_VERSION=function(){var a=j.match(/OS (\d+)_/i);return a&&a[1]?a[1]:null}(),c.IS_ANDROID=/Android/i.test(j)),r=c.ANDROID_VERSION=function(){var a=j.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?b:null}(),s=(c.IS_OLD_ANDROID=q&&/webkit/i.test(j)&&r<2.3,c.IS_NATIVE_ANDROID=q&&r<5&&l<537,c.IS_FIREFOX=/Firefox/i.test(j),c.IS_EDGE=/Edge/i.test(j)),t=c.IS_CHROME=!s&&/Chrome/i.test(j),u=(c.IS_IE8=/MSIE\s8\.0/.test(j),c.IE_VERSION=function(a){return a&&parseFloat(a[1])}(/MSIE\s(\d+)\.\d/.exec(j)),c.IS_SAFARI=/Safari/i.test(j)&&!t&&!q&&!s);c.IS_ANY_SAFARI=u||p,c.TOUCH_ENABLED=g.isReal()&&("ontouchstart"in i["default"]||i["default"].DocumentTouch&&i["default"].document instanceof i["default"].DocumentTouch),c.BACKGROUND_SIZE_SUPPORTED=g.isReal()&&"backgroundSize"in i["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){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!a||!b)return"";if("function"==typeof g["default"].getComputedStyle){var c=g["default"].getComputedStyle(a);return c?c[b]:""}return a.currentStyle[b]||""}c.__esModule=!0,c["default"]=e;var f=a(95),g=d(f)},{95:95}],81:[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){return a.raw=b,a}function g(a){return"string"==typeof a&&/\S/.test(a)}function h(a){if(/\s/.test(a))throw new Error("class has illegal whitespace characters")}function i(a){return new RegExp("(^|\\s)"+a+"($|\\s)")}function j(){return N["default"]===P["default"].document&&"undefined"!=typeof N["default"].createElement}function k(a){return(0,W.isObject)(a)&&1===a.nodeType}function l(a){return function(b,c){if(!g(b))return N["default"][a](null);g(c)&&(c=N["default"].querySelector(c));var d=k(c)?c:N["default"];return d[a]&&d[a](b)}}function m(a){return 0===a.indexOf("#")&&(a=a.slice(1)),N["default"].getElementById(a)}function n(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=arguments[3],e=N["default"].createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];a.indexOf("aria-")!==-1||"role"===a||"type"===a?(T["default"].warn((0,V["default"])(L,a,c)),e.setAttribute(a,c)):"textContent"===a?o(e,c):e[a]=c}),Object.getOwnPropertyNames(c).forEach(function(a){e.setAttribute(a,c[a])}),d&&J(e,d),e}function o(a,b){return"undefined"==typeof a.textContent?a.innerText=b:a.textContent=b,a}function p(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)}function q(a){var b=a[Y];return b||(b=a[Y]=R.newGUID()),X[b]||(X[b]={}),X[b]}function r(a){var b=a[Y];return!!b&&!!Object.getOwnPropertyNames(X[b]).length}function s(a){var b=a[Y];if(b){delete X[b];try{delete a[Y]}catch(c){a.removeAttribute?a.removeAttribute(Y):a[Y]=null}}}function t(a,b){return h(b),a.classList?a.classList.contains(b):i(b).test(a.className)}function u(a,b){return a.classList?a.classList.add(b):t(a,b)||(a.className=(a.className+" "+b).trim()),a}function v(a,b){return a.classList?a.classList.remove(b):(h(b),a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(" ")),a}function w(a,b,c){var d=t(a,b);if("function"==typeof c&&(c=c(a,b)),"boolean"!=typeof c&&(c=!d),c!==d)return c?u(a,b):v(a,b),a}function x(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||"undefined"==typeof d||d===!1?a.removeAttribute(c):a.setAttribute(c,d===!0?"":d)})}function y(a){var b={},c=",autoplay,controls,loop,muted,default,";if(a&&a.attributes&&a.attributes.length>0)for(var d=a.attributes,e=d.length-1;e>=0;e--){var f=d[e].name,g=d[e].value;"boolean"!=typeof a[f]&&c.indexOf(","+f+",")===-1||(g=null!==g),b[f]=g}return b}function z(a,b){return a.getAttribute(b)}function A(a,b,c){a.setAttribute(b,c)}function B(a,b){a.removeAttribute(b)}function C(){N["default"].body.focus(),N["default"].onselectstart=function(){return!1}}function D(){N["default"].onselectstart=function(){return!0}}function E(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=N["default"].documentElement,d=N["default"].body,e=c.clientLeft||d.clientLeft||0,f=P["default"].pageXOffset||d.scrollLeft,g=b.left+f-e,h=c.clientTop||d.clientTop||0,i=P["default"].pageYOffset||d.scrollTop,j=b.top+i-h;return{left:Math.round(g),top:Math.round(j)}}function F(a,b){var c={},d=E(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 G(a){return(0,W.isObject)(a)&&3===a.nodeType}function H(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function I(a){return"function"==typeof a&&(a=a()),(Array.isArray(a)?a:[a]).map(function(a){return"function"==typeof a&&(a=a()),k(a)||G(a)?a:"string"==typeof a&&/\S/.test(a)?N["default"].createTextNode(a):void 0}).filter(function(a){return a})}function J(a,b){return I(b).forEach(function(b){return a.appendChild(b)}),a}function K(a,b){return J(H(a),b)}c.__esModule=!0,c.$$=c.$=void 0;var L=f(["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=j,c.isEl=k,c.getEl=m,c.createEl=n,c.textContent=o,c.insertElFirst=p,c.getElData=q,c.hasElData=r,c.removeElData=s,c.hasElClass=t,c.addElClass=u,c.removeElClass=v,c.toggleElClass=w,c.setElAttributes=x,c.getElAttributes=y,c.getAttribute=z,c.setAttribute=A,c.removeAttribute=B,c.blockTextSelection=C,c.unblockTextSelection=D,c.findElPosition=E,c.getPointerPosition=F,c.isTextNode=G,c.emptyEl=H,c.normalizeContent=I,c.appendContent=J,c.insertContent=K;var M=a(94),N=e(M),O=a(95),P=e(O),Q=a(85),R=d(Q),S=a(86),T=e(S),U=a(98),V=e(U),W=a(88),X={},Y="vdata"+(new Date).getTime();c.$=l("querySelector"),c.$$=l("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}return a&&a.isPropagationStopped||!function(){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&&void 0!==a.clientX){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)}a.which=a.charCode||a.keyCode,null!==a.button&&void 0!==a.button&&(a.button=1&a.button?0:4&a.button?1:2&a.button?2:0)}(),a}function i(a,b,c){if(Array.isArray(b))return g(i,a,b,c);var d=n.getElData(a);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&&(a.addEventListener?a.addEventListener(b,d.dispatcher,!1):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()&&b.bubbles===!0)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)},{81:81,85:85,86:86,94:94,95:95}],83:[function(a,b,c){"use strict";c.__esModule=!0,c.throttle=c.bind=void 0;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(),d=function(){var d=Date.now();d-c>=b&&(a.apply(void 0,arguments),c=d)};return d}},{85:85}],84:[function(a,b,c){"use strict";function d(a){var b=arguments.length>1&&void 0!==arguments[1]?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===1/0)&&(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";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0,c.logByType=void 0;var e=a(95),f=d(e),g=a(78),h=a(88),i=void 0,j=c.logByType=function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!!g.IE_VERSION&&g.IE_VERSION<11;"log"!==a&&b.unshift(a.toUpperCase()+":"),i.history.push(b),b.unshift("VIDEOJS:");var d=f["default"].console&&f["default"].console[a];d&&(c&&(b=b.map(function(a){if((0,h.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"](f["default"].console,b):d(b))};i=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];j("log",b)},i.history=[],i.error=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return j("error",b)},i.warn=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return j("warn",b)},c["default"]=i},{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){return(0,e.isPlain)(b)?((0,e.isPlain)(a[c])||(a[c]={}),void(a[c]=d(a[c],b))):void(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){Object.keys(a).forEach(function(c){return b(a[c],c)})}function e(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object.keys(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"===("undefined"==typeof 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},{}],89:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0,c.setTextContent=c.createStyleElement=void 0;var e=a(94),f=d(e);c.createStyleElement=function(a){var b=f["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){return a&&a.__esModule?a:{"default":a}}function e(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 f(a,b,c,d){return void 0===d&&(j["default"].warn("DEPRECATED: Function '"+a+"' on 'TimeRanges' called without an index argument."),d=0),e(a,d,c.length-1),c[d][b]}function g(a){return void 0===a||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:f.bind(null,"start",0,a),end:f.bind(null,"end",1,a)}}function h(a,b){return Array.isArray(a)?g(a):void 0===a||void 0===b?g():g([[a,b]])}c.__esModule=!0,c.createTimeRange=void 0,c.createTimeRanges=h;var i=a(86),j=d(i);c.createTimeRange=h},{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=void 0;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),d=":"===c.protocol?b.protocol:c.protocol,e=d+c.host!==b.protocol+b.host;return e}},{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&&O["default"].warn('Player "'+a+'" is already initialised. Options will not be applied.'),c&&g.getPlayers()[a].ready(c),g.getPlayers()[a];d=Q.getEl(a)}else d=a;if(!d||!d.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");if(d.player||x["default"].players[d.playerId])return d.player||x["default"].players[d.playerId];b=b||{},g.hooks("beforesetup").forEach(function(a){var c=a(d,(0,B["default"])(b));return!(0,V.isObject)(c)||Array.isArray(c)?void O["default"].error("please return an object in beforesetup hooks"):void(b=(0,B["default"])(b,c))});var e=r["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(56),n=e(m),o=b(89),p=e(o),q=b(5),r=f(q),s=b(42),t=f(s),u=b(82),v=e(u),w=b(51),x=f(w),y=b(52),z=f(y),A=b(87),B=f(A),C=b(83),D=e(C),E=b(72),F=f(E),G=b(64),H=f(G),I=b(77),J=f(I),K=b(90),L=b(84),M=f(L),N=b(86),O=f(N),P=b(81),Q=e(P),R=b(78),S=e(R),T=b(92),U=e(T),V=b(88),W=b(80),X=f(W),Y=b(43),Z=f(Y),$=b(105),_=f($),aa=b(62),ba=f(aa);if("undefined"==typeof HTMLVideoElement&&Q.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)},j["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0&&Q.isReal()){var ca=Q.$(".vjs-styles-defaults");if(!ca){ca=p.createStyleElement("vjs-styles-defaults");var da=Q.$("head");da&&da.insertBefore(ca,da.firstChild),p.setTextContent(ca,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}n.autoSetupTimeout(1,g),g.VERSION="5.16.0",g.options=x["default"].prototype.options_,g.getPlayers=function(){return x["default"].players},g.players=x["default"].players,g.getComponent=r["default"].getComponent,g.registerComponent=function(a,b){ba["default"].isTech(b)&&O["default"].warn("The "+a+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),r["default"].registerComponent.call(r["default"],a,b)},g.getTech=ba["default"].getTech,g.registerTech=ba["default"].registerTech,g.browser=S,g.TOUCH_ENABLED=S.TOUCH_ENABLED,g.extend=Z["default"],g.mergeOptions=B["default"],g.bind=D.bind,g.plugin=z["default"],g.addLanguage=function(a,b){var c;return a=(""+a).toLowerCase(),g.options.languages=(0,B["default"])(g.options.languages,(c={},c[a]=b,c)),g.options.languages[a]},g.log=O["default"],g.createTimeRange=g.createTimeRanges=K.createTimeRanges,g.formatTime=M["default"],g.parseUrl=U.parseUrl,g.isCrossOrigin=U.isCrossOrigin,g.EventTarget=t["default"],g.on=v.on,g.one=v.one,g.off=v.off,g.trigger=v.trigger,g.xhr=_["default"],g.TextTrack=F["default"],g.AudioTrack=H["default"],g.VideoTrack=J["default"],g.isEl=Q.isEl,g.isTextNode=Q.isTextNode,g.createEl=Q.createEl,g.hasClass=Q.hasElClass,g.addClass=Q.addElClass,g.removeClass=Q.removeElClass,g.toggleClass=Q.toggleElClass,g.setAttributes=Q.setElAttributes,g.getAttributes=Q.getElAttributes,g.emptyEl=Q.emptyEl,g.appendContent=Q.appendContent,g.insertContent=Q.insertContent,g.computedStyle=X["default"],"function"==typeof a&&a.amd?a("videojs",[],function(){return g}):"object"===("undefined"==typeof d?"undefined":h(d))&&"object"===("undefined"==typeof c?"undefined":h(c))&&(c.exports=g),d["default"]=g},{105:105,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="undefined"!=typeof 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:"undefined"!=typeof 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){b.exports={WebVTT:a(100).WebVTT,VTTCue:a(101).VTTCue,VTTRegion:a(103).VTTRegion}},{100:100,101:101,103:103}],100:[function(a,b,c){!function(a){function b(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function c(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 d(){this.values=o(null)}function e(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 f(a,f,g){function h(){var d=c(a);if(null===d)throw new b(b.Errors.BadTimeStamp,"Malformed timestamp: "+k);return a=a.replace(/^[^\sa-zA-Z-]+/,""),d}function i(a,b){var c=new d;e(a,function(a,b){switch(a){case"region":for(var d=g.length-1;d>=0;d--)if(g[d].id===b){c.set(a,g[d].region);break}break;case"vertical":c.alt(a,b,["rl","lr"]);break;case"line":var e=b.split(","),f=e[0];c.integer(a,f),c.percent(a,f)?c.set("snapToLines",!1):null,
c.alt(a,f,["auto"]),2===e.length&&c.alt("lineAlign",e[1],["start","middle","end"]);break;case"position":e=b.split(","),c.percent(a,e[0]),2===e.length&&c.alt("positionAlign",e[1],["start","middle","end"]);break;case"size":c.percent(a,b);break;case"align":c.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=c.get("region",null),b.vertical=c.get("vertical",""),b.line=c.get("line","auto"),b.lineAlign=c.get("lineAlign","start"),b.snapToLines=c.get("snapToLines",!0),b.size=c.get("size",100),b.align=c.get("align","middle"),b.position=c.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=c.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function j(){a=a.replace(/^\s+/,"")}var k=a;if(j(),f.startTime=h(),j(),"-->"!==a.substr(0,3))throw new b(b.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+k);a=a.substr(3),j(),f.endTime=h(),j(),i(a,f)}function g(a,b){function d(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function e(a){return p[a]}function f(a){for(;o=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(o[0],e);return a}function g(a,b){return!s[b.localName]||s[b.localName]===a.localName}function h(b,c){var d=q[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=r[b];return f&&c&&(e[f]=c.trim()),e}for(var i,j=a.document.createElement("div"),k=j,l=[];null!==(i=d());)if("<"!==i[0])k.appendChild(a.document.createTextNode(f(i)));else{if("/"===i[1]){l.length&&l[l.length-1]===i.substr(2).replace(">","")&&(l.pop(),k=k.parentNode);continue}var m,n=c(i.substr(1,i.length-2));if(n){m=a.document.createProcessingInstruction("timestamp",n),k.appendChild(m);continue}var o=i.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!o)continue;if(m=h(o[1],o[3]),!m)continue;if(!g(k,m))continue;o[2]&&(m.className=o[2].substr(1).replace("."," ")),l.push(o[1]),k.appendChild(m),k=m}return j}function h(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++){d=f.charCodeAt(g);for(var h=0;h<t.length;h++)if(t[h]===d)return"rtl"}return"ltr"}function i(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++d*-1}function j(){}function k(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)"),j.call(this),this.cue=b,this.cueDiv=g(a,b.text);var i={color:e,backgroundColor:f,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};d||(i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl",i.unicodeBidi="plaintext"),this.applyStyles(i,this.cueDiv),this.div=a.document.createElement("div"),i={textAlign:"middle"===b.align?"center":b.align,font:c.font,whiteSpace:"pre-line",position:"absolute"},d||(i.direction=h(this.cueDiv),i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(i),this.div.appendChild(this.cueDiv);var k=0;switch(b.positionAlign){case"start":k=b.position;break;case"middle":k=b.position-b.size/2;break;case"end":k=b.position-b.size}""===b.vertical?this.applyStyles({left:this.formatStyle(k,"%"),width:this.formatStyle(b.size,"%")}):this.applyStyles({top:this.formatStyle(k,"%"),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 l(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=void 0!==b?b:a.lineHeight,f&&!this.lineHeight&&(this.lineHeight=13)}function m(a,b,c,d){function e(a,b){for(var e,f=new l(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 l(a),g=i),a=new l(f)}return e||f}var f=new l(b),g=b.cue,h=i(g),j=[];if(g.snapToLines){var k;switch(g.vertical){case"":j=["+y","-y"],k="height";break;case"rl":j=["+x","-x"],k="width";break;case"lr":j=["-x","+x"],k="width"}var m=f.lineHeight,n=m*Math.round(h),o=c[k]+m,p=j[0];Math.abs(n)>o&&(n=n<0?-1:1,n*=Math.ceil(o/m)*m),h<0&&(n+=""===g.vertical?c.height:c.width,j=j.reverse()),f.move(p,n)}else{var q=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=q/2;break;case"end":h-=q}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}j=["+y","-x","+x","-y"],f=new l(b)}var r=e(f,j);b.move(r.toCSSCompatValues(c))}function n(){}var o=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}}();b.prototype=o(Error.prototype),b.prototype.constructor=b,b.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.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){var c;return!!((c=b.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(b=parseFloat(b),b>=0&&b<=100))&&(this.set(a,b),!0)}};var p={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},r={v:"title",lang:"lang"},s={rt:"ruby"},t=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];j.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},j.prototype.formatStyle=function(a,b){return 0===a?0:a+b},k.prototype=o(j.prototype),k.prototype.constructor=k,l.prototype.move=function(a,b){switch(b=void 0!==b?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}},l.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top},l.prototype.overlapsAny=function(a){for(var b=0;b<a.length;b++)if(this.overlaps(a[b]))return!0;return!1},l.prototype.within=function(a){return this.top>=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},l.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}},l.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},l.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}},l.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;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={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};return e},n.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},n.convertCueToDOMTree=function(a,b){return a&&b?g(a,b):null};var u=.05,v="sans-serif",w="1.5%";n.processCues=function(a,b,c){function d(a){for(var b=0;b<a.length;b++)if(a[b].hasBeenReset||!a[b].displayState)return!0;return!1}if(!a||!b||!c)return null;for(;c.firstChild;)c.removeChild(c.firstChild);var e=a.document.createElement("div");if(e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.margin=w,c.appendChild(e),d(b)){var f=[],g=l.getSimpleBoxPosition(e),h=Math.round(g.height*u*100)/100,i={font:h+"px "+v};!function(){for(var c,d,h=0;h<b.length;h++)d=b[h],c=new k(a,d,i),e.appendChild(c.div),m(a,c,g,f),d.displayState=c.div,f.push(l.getSimpleBoxPosition(c))}()}else for(var j=0;j<b.length;j++)e.appendChild(b[j].displayState)},n.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=[]},n.Parser.prototype={reportOrThrowError:function(a){if(!(a instanceof b))throw a;this.onparsingerror&&this.onparsingerror(a)},parse:function(a){function c(){for(var a=i.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,i.buffer=a.substr(b),c}function g(a){var b=new d;if(e(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 e=c.split(",");if(2!==e.length)break;var f=new d;if(f.percent("x",e[0]),f.percent("y",e[1]),!f.has("x")||!f.has("y"))break;b.set(a+"X",f.get("x")),b.set(a+"Y",f.get("y"));break;case"scroll":b.alt(a,c,["up"])}},/=/,/\s/),b.has("id")){var c=new(i.vttjs.VTTRegion||i.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",""),i.onregion&&i.onregion(c),i.regionList.push({id:b.get("id"),region:c})}}function h(a){e(a,function(a,b){switch(a){case"Region":g(b)}},/:/)}var i=this;a&&(i.buffer+=i.decoder.decode(a,{stream:!0}));try{var j;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;j=c();var k=j.match(/^WEBVTT([ \t].*)?$/);if(!k||!k[0])throw new b(b.Errors.BadSignature);i.state="HEADER"}for(var l=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(l?l=!1:j=c(),i.state){case"HEADER":/:/.test(j)?h(j):j||(i.state="ID");continue;case"NOTE":j||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(j)){i.state="NOTE";break}if(!j)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",j.indexOf("-->")===-1){i.cue.id=j;continue}case"CUE":try{f(j,i.cue,i.regionList)}catch(m){i.reportOrThrowError(m),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var n=j.indexOf("-->")!==-1;if(!j||n&&(l=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=j;continue;case"BADCUE":j||(i.state="ID");continue}}}catch(m){i.reportOrThrowError(m),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var 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 b(b.Errors.BadSignature)}catch(c){a.reportOrThrowError(c)}return a.onflush&&a.onflush(),this}},a.WebVTT=n}(this,this.vttjs||{})},{}],101:[function(a,b,c){"undefined"!=typeof b&&b.exports&&(this.VTTCue=this.VTTCue||a(102).VTTCue),function(a){a.VTTCue.prototype.toJSON=function(){var a={},b=this;return Object.keys(this).forEach(function(c){"getCueAsHTML"!==c&&"hasBeenReset"!==c&&"displayState"!==c&&(a[c]=b[c])}),a},a.VTTCue.create=function(b){if(!b.hasOwnProperty("startTime")||!b.hasOwnProperty("endTime")||!b.hasOwnProperty("text"))throw new Error("You must at least have start time, end time, and text.");var c=new a.VTTCue(b.startTime,b.endTime,b.text);for(var d in b)c.hasOwnProperty(d)&&(c[d]=b[d]);return c},a.VTTCue.fromJSON=function(a){return this.create(JSON.parse(a))}}(this)},{102:102}],102:[function(a,b,c){!function(a,b){function c(a){if("string"!=typeof a)return!1;var b=h[a.toLowerCase()];return!!b&&a.toLowerCase()}function d(a){if("string"!=typeof a)return!1;var b=i[a.toLowerCase()];return!!b&&a.toLowerCase()}function e(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 f(a,b,f){var h=this,i=/MSIE\s8\.0/.test(navigator.userAgent),j={};i?h=document.createElement("custom"):j.enumerable=!0,h.hasBeenReset=!1;var k="",l=!1,m=a,n=b,o=f,p=null,q="",r=!0,s="auto",t="start",u=50,v="middle",w=50,x="middle";if(Object.defineProperty(h,"id",e({},j,{get:function(){return k},set:function(a){k=""+a}})),Object.defineProperty(h,"pauseOnExit",e({},j,{get:function(){return l},set:function(a){l=!!a}})),Object.defineProperty(h,"startTime",e({},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(h,"endTime",e({},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(h,"text",e({},j,{get:function(){return o},set:function(a){o=""+a,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",e({},j,{get:function(){return p},set:function(a){p=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",e({},j,{get:function(){return q},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");q=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",e({},j,{get:function(){return r},set:function(a){r=!!a,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",e({},j,{get:function(){return s},set:function(a){if("number"!=typeof a&&a!==g)throw new SyntaxError("An invalid number or illegal string was specified.");s=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",e({},j,{get:function(){return t},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",e({},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(h,"positionAlign",e({},j,{get:function(){return v},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",e({},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(h,"align",e({},j,{get:function(){return x},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),h.displayState=void 0,i)return h}var g="auto",h={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};f.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},a.VTTCue=a.VTTCue||f,b.VTTCue=f}(this,this.vttjs||{})},{}],103:[function(a,b,c){"undefined"!=typeof b&&b.exports&&(this.VTTRegion=a(104).VTTRegion),function(a){a.VTTRegion.create=function(b){var c=new a.VTTRegion;for(var d in b)c.hasOwnProperty(d)&&(c[d]=b[d]);return c},a.VTTRegion.fromJSON=function(a){return this.create(JSON.parse(a))}}(this)},{104:104}],104:[function(a,b,c){!function(a,b){function c(a){if("string"!=typeof a)return!1;var b=f[a.toLowerCase()];return!!b&&a.toLowerCase()}function d(a){return"number"==typeof a&&a>=0&&a<=100}function e(){var a=100,b=3,e=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!d(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(!d(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!d(a))throw new Error("RegionAnchorY must be between 0 and 100.");e=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!d(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!d(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=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var f={"":!0,up:!0};a.VTTRegion=a.VTTRegion||e,b.VTTRegion=e}(this,this.vttjs||{})},{}],105:[function(a,b,c){"use strict";function d(a,b){for(var c=0;c<a.length;c++)b(a[c])}function e(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function f(a,b,c){var d=a;return l(b)?(c=b,"string"==typeof a&&(d={uri:a})):d=n(b,{uri:a}),d.callback=c,d}function g(a,b,c){return b=f(a,b,c),h(b)}function h(a){function b(){4===l.readyState&&f()}function c(){var a=void 0;if(a=l.response?l.response:l.responseText||i(l),v)try{a=JSON.parse(a)}catch(b){}return a}function d(a){return clearTimeout(p),a instanceof Error||(a=new Error(""+(a||"Unknown XMLHttpRequest Error"))),a.statusCode=0,j(a,k)}function f(){if(!o){var b;clearTimeout(p),b=a.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var d=k,e=null;return 0!==b?(d={body:c(),statusCode:b,method:r,headers:{},url:q,rawRequest:l},l.getAllResponseHeaders&&(d.headers=m(l.getAllResponseHeaders()))):e=new Error("Internal XMLHttpRequest Error"),j(e,d,d.body)}}if("undefined"==typeof a.callback)throw new Error("callback argument missing");var h=!1,j=function(b,c,d){h||(h=!0,a.callback(b,c,d))},k={body:void 0,headers:{},statusCode:0,method:r,url:q,rawRequest:l},l=a.xhr||null;l||(l=a.cors||a.useXDR?new g.XDomainRequest:new g.XMLHttpRequest);var n,o,p,q=l.url=a.uri||a.url,r=l.method=a.method||"GET",s=a.body||a.data||null,t=l.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))),l.onreadystatechange=b,l.onload=f,l.onerror=d,l.onprogress=function(){},l.ontimeout=d,l.open(r,q,!u,a.username,a.password),u||(l.withCredentials=!!a.withCredentials),!u&&a.timeout>0&&(p=setTimeout(function(){o=!0,l.abort("timeout");var a=new Error("XMLHttpRequest timeout");a.code="ETIMEDOUT",d(a)},a.timeout)),l.setRequestHeader)for(n in t)t.hasOwnProperty(n)&&l.setRequestHeader(n,t[n]);else if(a.headers&&!e(a.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(l.responseType=a.responseType),"beforeSend"in a&&"function"==typeof a.beforeSend&&a.beforeSend(l),l.send(s),l}function i(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 j(){}var k=a(95),l=a(106),m=a(109),n=a(110);b.exports=g,g.XMLHttpRequest=k.XMLHttpRequest||j,g.XDomainRequest="withCredentials"in new g.XMLHttpRequest?g.XMLHttpRequest:k.XDomainRequest,d(["get","put","post","patch","head","delete"],function(a){g["delete"===a?"del":a]=function(b,c,d){return c=f(b,c,d),c.method=a.toUpperCase(),h(c)}})},{106:106,109:109,110:110,95:95}],106:[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},{}],107:[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(106);b.exports=d;var i=Object.prototype.toString,j=Object.prototype.hasOwnProperty},{106:106}],108:[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*$/,"")}},{}],109:[function(a,b,c){var d=a(108),e=a(107),f=function(a){return"[object Array]"===Object.prototype.toString.call(a)};b.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}},{107:107,108:108}],110:[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)});;
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */;
/*!
 * @fileOverview TouchSwipe - jQuery Plugin
 * @version 1.6.18
 *
 * @author Matt Bryson http://www.github.com/mattbryson
 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
 * @see http://labs.rampinteractive.co.uk/touchSwipe/
 * @see http://plugins.jquery.com/project/touchSwipe
 * @license
 * Copyright (c) 2010-2015 Matt Bryson
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 */
!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.cancelable!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&&currentPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null===options.pinchThreshold||pinchDistance>=options.pinchThreshold}function validateSwipeTime(){var result;return result=!options.maxTimeThreshold||!(duration>=options.maxTimeThreshold)}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&distance<DOUBLE_TAP_THRESHOLD}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){if(maximumsMap[direction])return maximumsMap[direction].distance}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return pinchZoom<1?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return angle<0&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return angle<=45&&angle>=0?LEFT:angle<=360&&angle>=315?LEFT:angle>=135&&angle<=225?RIGHT:angle>45&&angle<135?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mouseup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.18",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}});;
// Generated by CoffeeScript 1.10.0

/**
@license Sticky-kit v1.1.3 | MIT | Leaf Corcoran 2015 | http://leafo.net
 */

(function() {
  var $, win;

  $ = window.jQuery;

  win = $(window);

  $.fn.stick_in_parent = function(opts) {
    var doc, elm, enable_bottoming, fn, i, inner_scrolling, len, manual_spacer, offset_top, outer_width, parent_selector, recalc_every, sticky_class;
    if (opts == null) {
      opts = {};
    }
    sticky_class = opts.sticky_class, inner_scrolling = opts.inner_scrolling, recalc_every = opts.recalc_every, parent_selector = opts.parent, offset_top = opts.offset_top, manual_spacer = opts.spacer, enable_bottoming = opts.bottoming;
    if (offset_top == null) {
      offset_top = 0;
    }
    if (parent_selector == null) {
      parent_selector = void 0;
    }
    if (inner_scrolling == null) {
      inner_scrolling = true;
    }
    if (sticky_class == null) {
      sticky_class = "is_stuck";
    }
    doc = $(document);
    if (enable_bottoming == null) {
      enable_bottoming = true;
    }
    outer_width = function(el) {
      var _el, computed, w;
      if (window.getComputedStyle) {
        _el = el[0];
        computed = window.getComputedStyle(el[0]);
        w = parseFloat(computed.getPropertyValue("width")) + parseFloat(computed.getPropertyValue("margin-left")) + parseFloat(computed.getPropertyValue("margin-right"));
        if (computed.getPropertyValue("box-sizing") !== "border-box") {
          w += parseFloat(computed.getPropertyValue("border-left-width")) + parseFloat(computed.getPropertyValue("border-right-width")) + parseFloat(computed.getPropertyValue("padding-left")) + parseFloat(computed.getPropertyValue("padding-right"));
        }
        return w;
      } else {
        return el.outerWidth(true);
      }
    };
    fn = function(elm, padding_bottom, parent_top, parent_height, top, height, el_float, detached) {
      var bottomed, detach, fixed, last_pos, last_scroll_height, offset, parent, recalc, recalc_and_tick, recalc_counter, spacer, tick;
      if (elm.data("sticky_kit")) {
        return;
      }
      elm.data("sticky_kit", true);
      last_scroll_height = doc.height();
      parent = elm.parent();
      if (parent_selector != null) {
        parent = parent.closest(parent_selector);
      }
      if (!parent.length) {
        throw "failed to find stick parent";
      }
      fixed = false;
      bottomed = false;
      spacer = manual_spacer != null ? manual_spacer && elm.closest(manual_spacer) : $("<div />");
      if (spacer) {
        spacer.css('position', elm.css('position'));
      }
      recalc = function() {
        var border_top, padding_top, restore;
        if (detached) {
          return;
        }
        last_scroll_height = doc.height();
        border_top = parseInt(parent.css("border-top-width"), 10);
        padding_top = parseInt(parent.css("padding-top"), 10);
        padding_bottom = parseInt(parent.css("padding-bottom"), 10);
        parent_top = parent.offset().top + border_top + padding_top;
        parent_height = parent.height();
        if (fixed) {
          fixed = false;
          bottomed = false;
          if (manual_spacer == null) {
            elm.insertAfter(spacer);
            spacer.detach();
          }
          elm.css({
            position: "",
            top: "",
            width: "",
            bottom: ""
          }).removeClass(sticky_class);
          restore = true;
        }
        top = elm.offset().top - (parseInt(elm.css("margin-top"), 10) || 0) - offset_top;
        height = elm.outerHeight(true);
        el_float = elm.css("float");
        if (spacer) {
          spacer.css({
            width: outer_width(elm),
            height: height,
            display: elm.css("display"),
            "vertical-align": elm.css("vertical-align"),
            "float": el_float
          });
        }
        if (restore) {
          return tick();
        }
      };
      recalc();
      if (height === parent_height) {
        return;
      }
      last_pos = void 0;
      offset = offset_top;
      recalc_counter = recalc_every;
      tick = function() {
        var css, delta, recalced, scroll, will_bottom, win_height;
        if (detached) {
          return;
        }
        recalced = false;
        if (recalc_counter != null) {
          recalc_counter -= 1;
          if (recalc_counter <= 0) {
            recalc_counter = recalc_every;
            recalc();
            recalced = true;
          }
        }
        if (!recalced && doc.height() !== last_scroll_height) {
          recalc();
          recalced = true;
        }
        scroll = win.scrollTop();
        if (last_pos != null) {
          delta = scroll - last_pos;
        }
        last_pos = scroll;
        if (fixed) {
          if (enable_bottoming) {
            will_bottom = scroll + height + offset > parent_height + parent_top;
            if (bottomed && !will_bottom) {
              bottomed = false;
              elm.css({
                position: "fixed",
                bottom: "",
                top: offset
              }).trigger("sticky_kit:unbottom");
            }
          }
          if (scroll < top) {
            fixed = false;
            offset = offset_top;
            if (manual_spacer == null) {
              if (el_float === "left" || el_float === "right") {
                elm.insertAfter(spacer);
              }
              spacer.detach();
            }
            css = {
              position: "",
              width: "",
              top: ""
            };
            elm.css(css).removeClass(sticky_class).trigger("sticky_kit:unstick");
          }
          if (inner_scrolling) {
            win_height = win.height();
            if (height + offset_top > win_height) {
              if (!bottomed) {
                offset -= delta;
                offset = Math.max(win_height - height, offset);
                offset = Math.min(offset_top, offset);
                if (fixed) {
                  elm.css({
                    top: offset + "px"
                  });
                }
              }
            }
          }
        } else {
          if (scroll > top) {
            fixed = true;
            css = {
              position: "fixed",
              top: offset
            };
            css.width = elm.css("box-sizing") === "border-box" ? elm.outerWidth() + "px" : elm.width() + "px";
            elm.css(css).addClass(sticky_class);
            if (manual_spacer == null) {
              elm.after(spacer);
              if (el_float === "left" || el_float === "right") {
                spacer.append(elm);
              }
            }
            elm.trigger("sticky_kit:stick");
          }
        }
        if (fixed && enable_bottoming) {
          if (will_bottom == null) {
            will_bottom = scroll + height + offset > parent_height + parent_top;
          }
          if (!bottomed && will_bottom) {
            bottomed = true;
            if (parent.css("position") === "static") {
              parent.css({
                position: "relative"
              });
            }
            return elm.css({
              position: "absolute",
              bottom: padding_bottom,
              top: "auto"
            }).trigger("sticky_kit:bottom");
          }
        }
      };
      recalc_and_tick = function() {
        recalc();
        return tick();
      };
      detach = function() {
        detached = true;
        win.off("touchmove", tick);
        win.off("scroll", tick);
        win.off("resize", recalc_and_tick);
        $(document.body).off("sticky_kit:recalc", recalc_and_tick);
        elm.off("sticky_kit:detach", detach);
        elm.removeData("sticky_kit");
        elm.css({
          position: "",
          bottom: "",
          top: "",
          width: ""
        });
        parent.position("position", "");
        if (fixed) {
          if (manual_spacer == null) {
            if (el_float === "left" || el_float === "right") {
              elm.insertAfter(spacer);
            }
            spacer.remove();
          }
          return elm.removeClass(sticky_class);
        }
      };
      win.on("touchmove", tick);
      win.on("scroll", tick);
      win.on("resize", recalc_and_tick);
      $(document.body).on("sticky_kit:recalc", recalc_and_tick);
      elm.on("sticky_kit:detach", detach);
      return setTimeout(tick, 0);
    };
    for (i = 0, len = this.length; i < len; i++) {
      elm = this[i];
      fn($(elm));
    }
    return this;
  };

}).call(this);
;
/*!
 * JavaScript Cookie v2.2.0
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
; (function (factory) {
    var registeredInModuleLoader;
    if (typeof define === 'function' && define.amd) {
        define(factory);
        registeredInModuleLoader = true;
    }
    if (typeof exports === 'object') {
        module.exports = factory();
        registeredInModuleLoader = true;
    }
    if (!registeredInModuleLoader) {
        var OldCookies = window.Cookies;
        var api = window.Cookies = factory();
        api.noConflict = function () {
            window.Cookies = OldCookies;
            return api;
        };
    }
}(function () {
    function extend() {
        var i = 0;
        var result = {};
        for (; i < arguments.length; i++) {
            var attributes = arguments[i];
            for (var key in attributes) {
                result[key] = attributes[key];
            }
        }
        return result;
    }

    function init(converter) {
        function api(key, value, attributes) {
            if (typeof document === 'undefined') {
                return;
            }

            // Write

            if (arguments.length > 1) {
                attributes = extend({
                    path: '/'
                }, api.defaults, attributes);

                if (typeof attributes.expires === 'number') {
                    attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
                }

                // We're using "expires" because "max-age" is not supported by IE
                attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';

                try {
                    var result = JSON.stringify(value);
                    if (/^[\{\[]/.test(result)) {
                        value = result;
                    }
                } catch (e) { }

                value = converter.write ?
					converter.write(value, key) :
					encodeURIComponent(String(value))
						.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);

                key = encodeURIComponent(String(key))
					.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
					.replace(/[\(\)]/g, escape);

                var stringifiedAttributes = '';
                for (var attributeName in attributes) {
                    if (!attributes[attributeName]) {
                        continue;
                    }
                    stringifiedAttributes += '; ' + attributeName;
                    if (attributes[attributeName] === true) {
                        continue;
                    }

                    // Considers RFC 6265 section 5.2:
                    // ...
                    // 3.  If the remaining unparsed-attributes contains a %x3B (";")
                    //     character:
                    // Consume the characters of the unparsed-attributes up to,
                    // not including, the first %x3B (";") character.
                    // ...
                    stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
                }

                return (document.cookie = key + '=' + value + stringifiedAttributes);
            }

            // Read

            var jar = {};
            var decode = function (s) {
                return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
            };
            // To prevent the for loop in the first place assign an empty array
            // in case there are no cookies at all.
            var cookies = document.cookie ? document.cookie.split('; ') : [];
            var i = 0;

            for (; i < cookies.length; i++) {
                var parts = cookies[i].split('=');
                var cookie = parts.slice(1).join('=');

                if (!this.json && cookie.charAt(0) === '"') {
                    cookie = cookie.slice(1, -1);
                }

                try {
                    var name = decode(parts[0]);
                    cookie = (converter.read || converter)(cookie, name) ||
						decode(cookie);

                    if (this.json) {
                        try {
                            cookie = JSON.parse(cookie);
                        } catch (e) { }
                    }

                    jar[name] = cookie;

                    if (key === name) {
                        break;
                    }
                } catch (e) { }
            }

            return key ? jar[key] : jar;
        }

        api.set = api;
        api.get = function (key) {
            return api.call(api, key);
        };
        api.getJSON = function (key) {
            return api.call({
                json: true
            }, key);
        };
        api.remove = function (key, attributes) {
            api(key, '', extend(attributes, {
                expires: -1
            }));
        };

        api.defaults = {};

        api.withConverter = init;

        return api;
    }

    return init(function () { });
}));
;
; (function ($, window, document, undefined) {

    'use strict';

    $.fn.addOuterWidths = function(maxCount) {
        var accumWidth = 0;
        this.each(function(index) {
            if (typeof maxCount === 'undefined' || index < maxCount)
                accumWidth += $(this).outerWidth(true); // TODO(BUE) umbau auf settings-objekt mit extend von defaults und options
        });
        return accumWidth;
    }

})(jQuery, window, document);
;
/*! videojs-resolution-switcher - 2015-7-26
 * Copyright (c) 2016 Kasper Moskwiak
 * Modified by Pierre Kraft
 * Licensed under the Apache-2.0 license. */

(function () {
    /* jshint eqnull: true*/
    /* global require */
    'use strict';
    var videojs = null;
    if (typeof window.videojs === 'undefined' && typeof require === 'function') {
        videojs = require('video.js');
    } else {
        videojs = window.videojs;
    }

    (function (window, videojs) {


        var defaults = {},
            videoJsResolutionSwitcher,
            currentResolution = {}, // stores current resolution
            menuItemsHolder = {}; // stores menuItems

        function setSourcesSanitized(player, sources, label, customSourcePicker) {
            currentResolution = {
                label: label,
                sources: sources
            };
            if (typeof customSourcePicker === 'function') {
                return customSourcePicker(player, sources, label);
            }
            return player.src(sources.map(function (src) {
                return { src: src.src, type: src.type, res: src.res };
            }));
        }

        /*
         * Resolution menu item
         */
        var MenuItem = videojs.getComponent('MenuItem');
        var ResolutionMenuItem = videojs.extend(MenuItem, {
            constructor: function (player, options, onClickListener, label) {
                this.onClickListener = onClickListener;
                this.label = label;
                // Sets this.player_, this.options_ and initializes the component
                MenuItem.call(this, player, options);
                this.src = options.src;

                this.on('click', this.onClick);
                this.on('touchstart', this.onClick);

                if (options.initialySelected) {
                    this.showAsLabel();
                    this.selected(true);

                    this.addClass('vjs-selected');
                }
            },
            showAsLabel: function () {
                // Change menu button label to the label of this item if the menu button label is provided
                if (this.label) {
                    this.label.innerHTML = this.options_.label;
                }
            },
            onClick: function (customSourcePicker) {
                this.onClickListener(this);
                // Remember player state
                var currentTime = this.player_.currentTime();
                var isPaused = this.player_.paused();
                this.showAsLabel();

                // add .current class
                this.addClass('vjs-selected');

                // Hide bigPlayButton
                if (!isPaused) {
                    this.player_.bigPlayButton.hide();
                }
                if (typeof customSourcePicker !== 'function' &&
                  typeof this.options_.customSourcePicker === 'function') {
                    customSourcePicker = this.options_.customSourcePicker;
                }
                // Change player source and wait for loadeddata event, then play video
                // loadedmetadata doesn't work right now for flash.
                // Probably because of https://github.com/videojs/video-js-swf/issues/124
                // If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle (timeupdate doesn't work properly with flash)
                var handleSeekEvent = 'loadeddata';
                if (this.player_.preload() === 'none' && this.player_.techName_ !== 'Flash') {
                    handleSeekEvent = 'timeupdate';
                }
                setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one(handleSeekEvent, function () {
                    this.player_.currentTime(currentTime);
                    this.player_.handleTechSeeked_();
                    if (!isPaused) {
                        // Start playing and hide loadingSpinner (flash issue ?)
                        this.player_.play().handleTechSeeked_();
                    }
                    this.player_.trigger('resolutionchange');
                });
            }
        });


        /*
         * Resolution menu button
         */
        var MenuButton = videojs.getComponent('MenuButton');
        var ResolutionMenuButton = videojs.extend(MenuButton, {
            constructor: function (player, options, settings, label) {
                this.sources = options.sources;
                this.label = label;
                this.label.innerHTML = options.initialySelectedLabel;
                // Sets this.player_, this.options_ and initializes the component
                MenuButton.call(this, player, options, settings);
                this.controlText('Quality');

                if (settings.dynamicLabel) {
                    this.el().appendChild(label);
                } else {
                    var staticLabel = document.createElement('span');
                    staticLabel.classList.add('vjs-resolution-button-staticlabel');
                    this.el().appendChild(staticLabel);
                }
            },
            createItems: function () {
                var menuItems = [];
                var labels = (this.sources && this.sources.label) || {};
                var onClickUnselectOthers = function (clickedItem) {
                    menuItems.map(function (item) {
                        item.selected(item === clickedItem);
                        item.removeClass('vjs-selected');
                    });
                };

                for (var key in labels) {
                    if (labels.hasOwnProperty(key)) {
                        menuItems.push(new ResolutionMenuItem(
                          this.player_,
                          {
                              label: key,
                              src: labels[key],
                              initialySelected: key === this.options_.initialySelectedLabel,
                              customSourcePicker: this.options_.customSourcePicker
                          },
                          onClickUnselectOthers,
                          this.label));
                        // Store menu item for API calls
                        menuItemsHolder[key] = menuItems[menuItems.length - 1];
                    }
                }
                return menuItems;
            }
        });

        /**
         * Initialize the plugin.
         * @param {object} [options] configuration for the plugin
         */
        videoJsResolutionSwitcher = function (options) {
            var settings = videojs.mergeOptions(defaults, options),
                player = this,
                label = document.createElement('span'),
                groupedSrc = {};

            label.classList.add('vjs-resolution-button-label');

            /**
             * Updates player sources or returns current source URL
             * @param   {Array}  [src] array of sources [{src: '', type: '', label: '', res: ''}]
             * @returns {Object|String|Array} videojs player object if used as setter or current source URL, object, or array of sources
             */
            player.updateSrc = function (src) {
                //Return current src if src is not given
                if (!src) { return player.src(); }
                // Dispose old resolution menu button before adding new sources
                if (player.controlBar.resolutionSwitcher) {
                    player.controlBar.resolutionSwitcher.dispose();
                    delete player.controlBar.resolutionSwitcher;
                }
                //Sort sources
                src = src.sort(compareResolutions);
                groupedSrc = bucketSources(src);
                var choosen = chooseSrc(groupedSrc, src);
                var menuButton = new ResolutionMenuButton(player, { sources: groupedSrc, initialySelectedLabel: choosen.label, initialySelectedRes: choosen.res, customSourcePicker: settings.customSourcePicker }, settings, label);
                menuButton.el().classList.add('vjs-resolution-button');
                player.controlBar.resolutionSwitcher = player.controlBar.el_.insertBefore(menuButton.el_, player.controlBar.getChild('fullscreenToggle').el_);
                return setSourcesSanitized(player, choosen.sources, choosen.label);
            };

            /**
             * Returns current resolution or sets one when label is specified
             * @param {String}   [label]         label name
             * @param {Function} [customSourcePicker] custom function to choose source. Takes 3 arguments: player, sources, label. Must return player object.
             * @returns {Object}   current resolution object {label: '', sources: []} if used as getter or player object if used as setter
             */
            player.currentResolution = function (label, customSourcePicker) {
                if (label == null) { return currentResolution; }
                if (menuItemsHolder[label] != null) {
                    menuItemsHolder[label].onClick(customSourcePicker);
                }
                return player;
            };

            /**
             * Returns grouped sources by label, resolution and type
             * @returns {Object} grouped sources: { label: { key: [] }, res: { key: [] }, type: { key: [] } }
             */
            player.getGroupedSrc = function () {
                return groupedSrc;
            };

            /**
             * Method used for sorting list of sources
             * @param   {Object} a - source object with res property
             * @param   {Object} b - source object with res property
             * @returns {Number} result of comparation
             */
            function compareResolutions(a, b) {
                if (!a.res || !b.res) { return 0; }
                return (+b.res) - (+a.res);
            }

            /**
             * Group sources by label, resolution and type
             * @param   {Array}  src Array of sources
             * @returns {Object} grouped sources: { label: { key: [] }, res: { key: [] }, type: { key: [] } }
             */
            function bucketSources(src) {
                var resolutions = {
                    label: {},
                    res: {},
                    type: {}
                };
                src.map(function (source) {
                    initResolutionKey(resolutions, 'label', source);
                    initResolutionKey(resolutions, 'res', source);
                    initResolutionKey(resolutions, 'type', source);

                    appendSourceToKey(resolutions, 'label', source);
                    appendSourceToKey(resolutions, 'res', source);
                    appendSourceToKey(resolutions, 'type', source);
                });
                return resolutions;
            }

            function initResolutionKey(resolutions, key, source) {
                if (resolutions[key][source[key]] == null) {
                    resolutions[key][source[key]] = [];
                }
            }

            function appendSourceToKey(resolutions, key, source) {
                resolutions[key][source[key]].push(source);
            }

            /**
             * Choose src if option.default is specified
             * @param   {Object} groupedSrc {res: { key: [] }}
             * @param   {Array}  src Array of sources sorted by resolution used to find high and low res
             * @returns {Object} {res: string, sources: []}
             */
            function chooseSrc(groupedSrc, src) {
                var selectedRes = settings['default']; // use array access as default is a reserved keyword
                var selectedLabel = '';
                if (selectedRes === 'high') {
                    selectedRes = src[0].res;
                    selectedLabel = src[0].label;
                } else if (selectedRes === 'low' || selectedRes == null) {
                    // Select low-res if default is low or not set
                    selectedRes = src[src.length - 1].res;
                    selectedLabel = src[src.length - 1].label;
                } else if (groupedSrc.res[selectedRes]) {
                    selectedLabel = groupedSrc.res[selectedRes][0].label;
                }

                if (selectedRes === undefined) {
                    return { res: selectedRes, label: selectedLabel, sources: groupedSrc.label[selectedLabel] };
                }
                return { res: selectedRes, label: selectedLabel, sources: groupedSrc.res[selectedRes] };
            }

            // Create resolution switcher for videos form <source> tag inside <video>
            if (player.options_.sources.length > 1) {
                // Wait for player ready event
                player.ready(function () {
                    player.updateSrc(player.options_.sources);
                });
            }

        };

        // register the plugin
        videojs.plugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher);
    })(window, videojs);
})();
;
/* template for components js

$(document).ready(function() {
    accordion.init();
});

var component = new function() {

    var _config = {
    }

    var init = function() {
    }

    return {
        init: init
    };
};

*/


// https://jqueryboilerplate.com/ // TODO(BUE) JS



/* const
----------------------------------------------- */
// TOlaterDO Umbau globale Variablen auf globales Objekt?
var isMobile = document.documentElement.clientWidth <= 899; // TODO(BUE) automatisiert an breakpoint anpassen
var isStaticDevelopment = document.location.href.indexOf('FrontendStatic') !== -1;



/* init
----------------------------------------------- */
$(document).ready(function () {

//    console.log('document ready');
//    window.setTimeout(function () {
//        console.log('event called');
//        spiritecApi.events.publish('documentReady');
//    }, 2000);
//    console.log('settimeout set');

    initNavigation();

    initFooter();

});



function initNavigation() {
    $('.header__menutoggle').click(function (e) {
        e.preventDefault();
        if ($('body').hasClass('body--showmenu')) {
            // close
            $('body').removeClass('body--showmenu body--preventscrollingforfullsize');
            restoreNavigationDefaults();
            $(this).attr('aria-expanded', false);
            $(this).attr('aria-label','Hauptmen\u00fc anzeigen');
        } else {
            // open
            storeNavigationDefaults();
            $('body').addClass('body--showmenu body--preventscrollingforfullsize');
            $(this).attr('aria-expanded', true);
            $(this).attr('aria-label', 'Hauptmen\u00fc schlie\u00dfen');
        }
    });

    $('nav.navigation-main > ul > li > a').click(function (e) {
        if (($(this).closest('li').find('ul').length <= 0) || ($(this).closest('li').hasClass('--selected')))
            return;

        e.preventDefault();
        var $navmain = $('nav.navigation-main');
        $navmain.find('.--selected, .--path-selected').removeClass('--selected --path-selected');
        $(this).closest('li').addClass('--selected --path-selected');

    });
}


var activeSelectedItems = [];
var activePathSelectedItems = [];

function storeNavigationDefaults() {
    activeSelectedItems = [];
    activePathSelectedItems = [];
    var $navi = $('nav.navigation-main');

    $navi.find('.--selected').each(function () {
        activeSelectedItems.push($(this));
    });

    $navi.find('.--path-selected').each(function () {
        activePathSelectedItems.push($(this));
    });
}

function restoreNavigationDefaults() {
    var $navi = $('nav.navigation-main');

    $navi.find('.--selected, .--path-selected').removeClass('--selected --path-selected');

    $(activeSelectedItems).map(function() { return this.toArray(); }).each(function() {
        $(this).addClass('--selected');
    });

    $(activePathSelectedItems).map(function() { return this.toArray(); }).each(function() {
        $(this).addClass('--path-selected');
    });
}


function initFooter() {
    $('.footer-info__control-open').click(function(e) {
        e.preventDefault();
        var activeClass = 'footer-info__control-open--active';
        var headline = $(this).data('headline');

        $wrapper = $(this).closest('.footer-info__details-col');
        var _this = $(this);

        if ($(this).hasClass(activeClass)) {
            $wrapper.find('.footer-info__text').slideUp(400, function() {
                _this.removeClass(activeClass);
                _this.attr('aria-expanded', false);
                _this.attr('aria-label', headline + ': Weitere Infos anzeigen');
            });
        } else {
            $wrapper.find('.footer-info__text').slideDown(400, function () {
                _this.addClass(activeClass);
                _this.attr('aria-expanded', true);
                _this.attr('aria-label', headline + ': Weniger Infos anzeigen');
            });
        }

    });
}
;
$(document).ready(function () {    $('.accordion').spiritecAccordion();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecAccordion',        defaults = {        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._initParams();            this._bindEvents();        },        _cacheDom: function () {            this._$head = this._$element.find('.accordion__head');            this._$body = this._$element.find('.accordion__body');        },        _initParams: function () {            this._duration = 400;            if (this._$element.hasClass('accordion--is-closed')) {                this._$head.attr('aria-expanded', false);            } else {                this._$head.find('.accordion__head').attr('aria-expanded', true);            }        },        _bindEvents: function () {            var _this = this;            this._$head.click(function (e) {                e.preventDefault();                var $head = $(this);                if (_this._$element.hasClass('accordion--is-open')) {                    _this._$body.slideUp(_this._duration, function () {                        _this._$element.removeClass('accordion--is-open').addClass('accordion--is-closed');                        $head.attr('aria-expanded', false);                    });                } else {                    _this._$element.addClass('accordion--is-opening');                    _this._$body.slideDown(_this._duration, function () {                        _this._$element.removeClass('accordion--is-closed').addClass('accordion--is-open');                        _this._$element.removeClass('accordion--is-opening');                        $head.attr('aria-expanded', true);                        _this._$body.focus();                    });                }            });            this._$head.keydown(function (e) {                if (e.keyCode == 13) {                    this.click();                }            });        }    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);$(document).ready(function () {    if (typeof isMobile != 'undefined' && !isMobile) {        $('.anchornavigation').spiritecanchornavigation();    }});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecanchornavigation',        defaults = {        };
    function Plugin(element, options) {        this._element = element;
        this._$element = $(element);
        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;
        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._initParams();            this._render();            this._bindEvents();        },        _cacheDom: function () {            this._$anchorElements = $('main').find('[data-anchornavigation]');            this._anchorArea = new Array();        },        _initParams: function () {            this._menuHTML = "";            this._currentIndex;            this._korrekturwert = this._calcKorrekturwert();        },        _render: function () {            var _this = this;            this._$anchorElements.each(function () {                _this._menuHTML += '<a href="#" class="anchornavigation__item">' + $(this).attr('data-anchornavigation') + '</a>';                var yStart = $(this).offset().top;                var yEnd = $(this).offset().top + $(this).outerHeight();                _this._anchorArea.push(new Array(yStart, yEnd));            });            this._$element.append(this._menuHTML);            this._$anchorLinks = this._$element.find('.anchornavigation__item');        },        _bindEvents: function () {            var _this = this;            var anchorNaviStickyBreakpoint = _this._$element.offset().top - 60;            this._$anchorLinks.click(function (e) {                e.preventDefault();                _this._scrollToAnchor($(this).index());            });            // TODO debouncer            $(window).scroll(function () {                _this._checkCurrrentScrollpos();                var currScrollPos = $(window).scrollTop();                if (currScrollPos < anchorNaviStickyBreakpoint) {                    _this._$element.removeClass('anchornavigation--is-sticky');                }                else {                    _this._$element.addClass('anchornavigation--is-sticky');                }            });        },        _calcKorrekturwert: function () {            var korrekturwert = $('.page-header').outerHeight();    //header-height            var scrollingCalcElements = $('.js-marker-include-in-scrolling-calculation');   //--> every sticky element above            //console.log(scrollingCalcElements);            korrekturwert += 50;    //additional space above the element            for (i = 0; i < scrollingCalcElements.length; i++) {                korrekturwert += $(scrollingCalcElements[i]).outerHeight();            }            return korrekturwert;        },        _scrollToAnchor: function (index) {            var _this = this;            $('html, body').animate({                scrollTop: (this._anchorArea[index][0] - this._korrekturwert)            }, 400);        },        _checkCurrrentScrollpos: function () {            var ergebnis = -1;            var schwellenwert = $(window).scrollTop() + this._korrekturwert + 5;            for (i = 0; i < this._anchorArea.length; i++) {                if (this._anchorArea[i][0] < schwellenwert && this._anchorArea[i][1] > schwellenwert) {                    ergebnis = i;                }            }            this._updateSelection(ergebnis);        },        _updateSelection: function (index) {            for (i = 0; i < this._$anchorLinks.length; i++) {                $(this._$anchorLinks[i]).removeClass('anchornavigation__item--selected');            }            if (index > -1) {                this._$element.addClass('anchornavigation--an-item-is-selected');                $(this._$anchorLinks[index]).addClass('anchornavigation__item--selected');            } else {                this._$element.removeClass('anchornavigation--an-item-is-selected');            }        }    });
    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);
$(document).ready(function () {    // do not show on digitale schaukaesten screens    if ($('.monthview').length > 0 || $('.dayview').length > 0)        return;    checkDatenschutzbanner();});var __dataPrivacyConfirmationCookieName = 'SSDD.Website.PrivacyPolicyConsent';var __dataPrivacyConfirmationCookieDuration = 7;function checkDatenschutzbanner() {    var $banner = $('.dataprotection');    var $close = $('.dataprotection__close');    var $consentAllButton = $('.dataprotection__action--consent-all');    var $consentSelectionButton = $('.dataprotection__action--consent-selection');    var $declinebutton = $('.dataprotection__action--decline'); // not used yet    var $trackingCheckbox = $('#dataprotection--tracking');    // =========    // page load    // =========    if (!hasUserAlreadyReactedToBanner()) {        // cookie not set yet        showDatenschutzbanner();    } else {        if (hasUserConfirmedDataPrivacy()) {            // cookie already there            hideDatenschutzbanner();            callDataSecurityEvent();        }    }    // ================    // user interaction    // ================    $close.click(function (e) {        e.preventDefault();        hideDatenschutzbanner();    });    $consentAllButton.click(function (e) {        e.preventDefault();        setCookie(1);        hideDatenschutzbanner();        callDataSecurityEvent();    });    $consentSelectionButton.click(function (e) {        e.preventDefault();        if ($trackingCheckbox.is(':checked')) {            setCookie(1);            hideDatenschutzbanner();            callDataSecurityEvent();        } else {            setCookie(0);            hideDatenschutzbanner();        }    });    $declinebutton.click(function (e) {        e.preventDefault();        setCookie(0);        hideDatenschutzbanner();    });    // =========    // functions    // =========    function setCookie(value) {        Cookies.set(__dataPrivacyConfirmationCookieName, value, { expires: __dataPrivacyConfirmationCookieDuration, path: '/' });    }    function hasUserConfirmedDataPrivacy() {        var cookieValue = Cookies.get(__dataPrivacyConfirmationCookieName);        return typeof cookieValue != 'undefined' && cookieValue === '1';    }    function hasUserAlreadyReactedToBanner() {        var cookieValue = Cookies.get(__dataPrivacyConfirmationCookieName);        return typeof cookieValue != 'undefined';    }    function callDataSecurityEvent() {        if (typeof onDataProtectionPolicyConfirmed == 'function')            onDataProtectionPolicyConfirmed();    }    function showDatenschutzbanner() {        $banner.css('display', 'block');        if (typeof isMobile != 'undefined' && isMobile) {            $('.page-footer').css('padding-bottom', $banner.outerHeight());        }    }    function hideDatenschutzbanner() {        $banner.css('display', 'none');        if (typeof isMobile != 'undefined' && isMobile) {            $('.page-footer').css('padding-bottom', '');        }    }}$(document).ready(function () {    $('.dayview').spiritecDayview();    if ($('.dayview').length > 0) {        $('body').addClass('screen-dayview');    }    // hide all links and prevent all clicks on links    $('.dayview a').click(function (e) {        e.preventDefault();        e.stopPropagation();    });});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecDayview',        defaults = {        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._initParams();            this._render();        },        _cacheDom: function () {            this._$view = this._$element.find('.dayview__view');            this._$overview = this._$element.find('.dayview__view--overview');        },        _initParams: function () {            this._$time = this._$element.data('dayviewtime') * 1000;            this._$currentIndex = 0;        },        _render: function () {            var _this = this;            this._$overview.addClass('dayview__view--on-top');            //return;            setInterval(function () {                var $currentView = _this._$view.eq(_this._$currentIndex);                _this._$currentIndex += 1;                if (_this._$currentIndex >= _this._$view.length) {                    _this._$currentIndex = 0;                }                var $newView = _this._$view.eq(_this._$currentIndex);                $newView.css('opacity', 0).addClass('dayview__view--on-top');                $newView.fadeTo(400, 1, function () {                    $currentView.css('opacity', 0).removeClass('dayview__view--current dayview__view--on-top');                    $newView.addClass('dayview__view--current').removeClass('dayview__view--on-top');                });            }, this._$time);        },    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);
$(document).ready(function () {    var initembed3rdparty = function () {        $('.js-3rdparty-embed').spiritec3rdPartyEmbed();    };    if (typeof (asyncLoader) != 'undefined')        asyncLoader.registerInit(initembed3rdparty);    initembed3rdparty();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritec3rdPartyEmbed',        defaults = {            pluginConfig: {                youtube: {                    cookieName: 'Website.Embed3rdPartyConsent.YouTube',                    jsHookClassname: 'js-mediaplayer-youtube',                    interfaceHtml: '' +                        '<div class="embed3rdparty">' +                            '<div class="embed3rdparty__defaultbackground"></div>' +                            '<div class="embed3rdparty__overlay"></div>' +                            '<div class="embed3rdparty__contentwrapper">' +                                '<div class="embed3rdparty__content">' +                                    '<div class="embed3rdparty__title">YouTube aktivieren</div>' +                                    '<div class="embed3rdparty__text">Ja, die Inhalte von YouTube jetzt anzeigen. Weitere Informationen dazu in unserer <a href="$$dataprotectionpage$$" target="_blank">Datenschutzerklärung</a>.</div>' +                                    '<div class="embed3rdparty__actions">' +                                        '<a href="$$dataprotectionpage$$" target="_blank" class="embed3rdparty__info">i</a>' +                                        '<div class="embed3rdparty__buttoncontainer"><a href="#" class="embed3rdparty__play"></a></div>' +                                        '<div class="embed3rdparty__alwaysembedwrapper"><label class="embed3rdparty__alwaysembed"><input type="checkbox" class="embed3rdparty__alwaysembedcheckbox">YouTube immer aktivieren</label></div>' +                                    '</div>' +                                '</div>' +                            '</div>' +                        '</div>'                },                vimeo: {                    cookieName: 'Website.Embed3rdPartyConsent.Vimeo',                    jsHookClassname: 'js-mediaplayer-vimeo',                    interfaceHtml: '' +                        '<div class="embed3rdparty">' +                            '<div class="embed3rdparty__defaultbackground"></div>' +                            '<div class="embed3rdparty__overlay"></div>' +                              '<div class="embed3rdparty__contentwrapper">' +                                '<div class="embed3rdparty__content">' +                                    '<div class="embed3rdparty__title">Vimeo aktivieren</div>' +                                    '<div class="embed3rdparty__text">Ja, die Inhalte von Vimeo jetzt anzeigen. Weitere Informationen dazu in unserer <a href="$$dataprotectionpage$$" target="_blank">Datenschutzerklärung</a>.</div>' +                                    '<div class="embed3rdparty__actions">' +                                        '<a href="$$dataprotectionpage$$" target="_blank" class="embed3rdparty__info">i</a>' +                                        '<div class="embed3rdparty__buttoncontainer"><a href="#" class="embed3rdparty__play"></a></div>' +                                        '<div class="embed3rdparty__alwaysembedwrapper"><label class="embed3rdparty__alwaysembed"><input type="checkbox" class="embed3rdparty__alwaysembedcheckbox">Vimeo immer aktivieren</label></div>' +                                    '</div>' +                                '</div>' +                            '</div>' +                        '</div>'                },                soundcloud: {                    cookieName: 'Website.Embed3rdPartyConsent.SoundCloud',                    jsHookClassname: 'js-mediaplayer-soundcloud',                    interfaceHtml: '' +                        '<div class="embed3rdparty">' +                            '<div class="embed3rdparty__defaultbackground"></div>' +                            '<div class="embed3rdparty__overlay"></div>' +                            '<div class="embed3rdparty__contentwrapper">' +                                '<div class="embed3rdparty__content">' +                                    '<div class="embed3rdparty__title">SoundCloud aktivieren</div>' +                                    '<div class="embed3rdparty__text">Ja, die Inhalte von SoundCloud jetzt anzeigen. Weitere Informationen dazu in unserer <a href="c">Datenschutzerklärung</a>.</div>' +                                    '<div class="embed3rdparty__actions">' +                                        '<a href="$$dataprotectionpage$$" target="_blank" class="embed3rdparty__info">i</a>' +                                        '<div class="embed3rdparty__buttoncontainer"><a href="#" class="embed3rdparty__play"></a></div>' +                                        '<div class="embed3rdparty__alwaysembedwrapper"><label class="embed3rdparty__alwaysembed"><input type="checkbox" class="embed3rdparty__alwaysembedcheckbox">SoundCloud immer aktivieren</label></div>' +                                    '</div>' +                                '</div>' +                            '</div>' +                        '</div>'                },                issuu: {                    cookieName: 'Website.Embed3rdPartyConsent.Issuu',                    jsHookClassname: 'js-mediaplugin-issuu',                    interfaceHtml: '' +                        '<div class="embed3rdparty">' +                            '<div class="embed3rdparty__defaultbackground"></div>' +                            '<div class="embed3rdparty__overlay"></div>' +                            '<div class="embed3rdparty__contentwrapper">' +                                '<div class="embed3rdparty__content">' +                                    '<div class="embed3rdparty__title">Issuu aktivieren</div>' +                                    '<div class="embed3rdparty__text">Ja, die Inhalte von Issuu jetzt anzeigen. Weitere Informationen dazu in unserer <a href="$$dataprotectionpage$$" target="_blank">Datenschutzerklärung</a>.</div>' +                                    '<div class="embed3rdparty__actions">' +                                        '<a href="$$dataprotectionpage$$" target="_blank" class="embed3rdparty__info">i</a>' +                                        '<div class="embed3rdparty__alwaysembedwrapper"><label class="embed3rdparty__alwaysembed"><input type="checkbox" class="embed3rdparty__alwaysembedcheckbox">Issuu immer aktivieren</label></div>' +                                        '<div class="embed3rdparty__buttoncontainer"><a href="#" class="embed3rdparty__textbutton">Jetzt aktivieren</a></div>' +                                    '</div>' +                                '</div>' +                            '</div>' +                        '</div>'                },                googlemaps: {                    cookieName: 'Website.Embed3rdPartyConsent.GoogleMaps',                    jsHookClassname: 'js-plugin-googlemaps',                    interfaceHtml: '' +                        '<div class="embed3rdparty">' +                            '<div class="embed3rdparty__defaultbackground"></div>' +                            '<div class="embed3rdparty__overlay"></div>' +                            '<div class="embed3rdparty__contentwrapper">' +                                '<div class="embed3rdparty__content">' +                                    '<div class="embed3rdparty__title">Google Maps einbetten</div>' +                                    '<div class="embed3rdparty__text">Ja, die Inhalte von Google Maps jetzt anzeigen. Weitere Informationen dazu in unserer <a href="$$dataprotectionpage$$" target="_blank">Datenschutzerklärung</a>.</div>' +                                    '<div class="embed3rdparty__actions">' +                                        '<a href="$$dataprotectionpage$$" target="_blank" class="embed3rdparty__info">i</a>' +                                        '<div class="embed3rdparty__alwaysembedwrapper"><label class="embed3rdparty__alwaysembed"><input type="checkbox" class="embed3rdparty__alwaysembedcheckbox">Google Maps immer aktivieren</label></div>' +                                        '<div class="embed3rdparty__buttoncontainer"><a href="#" class="embed3rdparty__textbutton">Jetzt aktivieren</a></div>' +                                    '</div>' +                                '</div>' +                            '</div>' +                        '</div>'                },                htmlsnippetextended: {                    cookieName: 'Website.Embed3rdPartyConsent.HtmlSnippetExtended',                    jsHookClassname: 'js-plugin-htmlsnippetextended',                    interfaceHtml: '' +                        '<div class="embed3rdparty">' +                            '<div class="embed3rdparty__defaultbackground"></div>' +                            '<div class="embed3rdparty__overlay"></div>' +                            '<div class="embed3rdparty__contentwrapper">' +                                '<div class="embed3rdparty__content">' +                                    '<div class="embed3rdparty__title">Inhalte aktivieren</div>' +                                    '<div class="embed3rdparty__text">Ja, diese Inhalte jetzt anzeigen. Weitere Informationen dazu in unserer <a href="$$dataprotectionpage$$" target="_blank">Datenschutzerklärung</a>.</div>' +                                    '<div class="embed3rdparty__actions">' +                                        '<a href="$$dataprotectionpage$$" target="_blank" class="embed3rdparty__info">i</a>' +                                        '<div class="embed3rdparty__buttoncontainer"><a href="#" class="embed3rdparty__textbutton">Jetzt aktivieren</a></div>' +                                    '</div>' +                                '</div>' +                            '</div>' +                        '</div>'                },            },            paramNames: {                imagePlaceholder: 'placeholder-image',                embedType: 'embed-type',                embedLayout: 'embed-layout',                context: 'context'            },            link: {                dataProtectionPage: 'https://www.staatsschauspiel-dresden.de/datenschutz/'            }        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._initParams();            this._initCustomContent();            this._addEmbedInterface();            this._cacheDom();            this._addCustomContent();            this._tryAutoEmbed();            this._bindEvents();        },        _initParams: function () {            this._embedType = this._$element.data(this._settings.paramNames.embedType);            this._embedLayout = this._$element.data(this._settings.paramNames.embedLayout);            this._placeholderImage = this._$element.data(this._settings.paramNames.imagePlaceholder);            this._context = this._$element.data(this._settings.paramNames.context);        },        _initCustomContent: function () {            // customtitle            var $customtitle = this._$element.find('.embed3rdparty__customcontent--title');            this._customTitle = $customtitle.length > 0 ? $customtitle.html() : '';            $customtitle.remove();            // customtext            var $customtext = this._$element.find('.embed3rdparty__customcontent--text');            $customtext.find('a').attr('data-prevent-target-correction', '1').attr('target', '_blank');            this._customText = $customtext.length > 0 ? $customtext.html() : '';            $customtext.remove();            // custombuttontext            var $custombuttontext = this._$element.find('.embed3rdparty__customcontent--buttontext');            this._customButtontext = $custombuttontext.length > 0 ? $custombuttontext.html() : '';            $custombuttontext.remove();        },        _addEmbedInterface: function () {            var htmlToEmbed = this._settings.pluginConfig[this._embedType].interfaceHtml;            // replace variables in html code            htmlToEmbed = htmlToEmbed.replace(/\$\$dataprotectionpage\$\$/g, this._settings.link.dataProtectionPage);            // embed html code            this._$element.append(htmlToEmbed);            // add embed layout classes            if (typeof this._embedLayout == 'string' && this._embedLayout !== '') {                var layoutCssClass = 'embed3rdparty--layout-';                layoutCssClass += this._makeSafeForCss(this._embedLayout);                this._$element.addClass(layoutCssClass);            }            // assign placeholder image            var image = this._placeholderImage;            if (typeof image == 'string' && image !== '') {                var $e = this._$element.find('.embed3rdparty');                $e.data('image-url', image);                $e.addClass('js-medialoader-set-as-background');                $e.addClass('js-medialoader');                $e.addClass('embed3rdparty--hasimage');                if (typeof medialoader != 'undefined')                    medialoader.triggerLoadContentImages();            }        },        _cacheDom: function () {            this._$embedWrapper = this._$element.find('.embed3rdparty');            this._$embedControl = this._$element.find('.embed3rdparty__play, .embed3rdparty__textbutton');            this._$alwaysEmbedControl = this._$element.find('.embed3rdparty__alwaysembedcheckbox');            this._$title = this._$element.find('.embed3rdparty__title');            this._$text = this._$element.find('.embed3rdparty__text');            this._$textbutton = this._$element.find('.embed3rdparty__textbutton');        },        _addCustomContent: function () {            if (this._customTitle !== '')                this._$title.html(this._customTitle);            if (this._customText !== '')                this._$text.html(this._customText);            if (this._customButtontext !== '')                this._$textbutton.html(this._customButtontext);        },        _tryAutoEmbed: function () {            if (this._cookieIsAlreadySet()) {                this._embedPlugin();            } else {                this._showEmbedInterface();            }        },        _bindEvents: function () {            var _this = this;            this._$embedControl.click(function (e) {                e.preventDefault();                e.stopPropagation();                _this._$element.data('autoplay', true);                if (_this._$alwaysEmbedControl.is(':checked')) {                    _this._setCookie();                    _this._triggerAllPlugins();                } else {                    _this._embedPlugin();                }            });        },        _showEmbedInterface: function () {            this._$embedWrapper.addClass('embed3rdparty--visible');        },        _embedPlugin: function () {            this._$element.addClass(this._settings.pluginConfig[this._embedType].jsHookClassname);            if (typeof this._context != 'undefined' && this._context !== '')                this._$element.data('context', this._context);            // mediaplayer            if (this._embedType === 'youtube' || this._embedType === 'vimeo' || this._embedType === 'soundcloud') {                if (typeof mediaplayerApi != 'undefined' && typeof mediaplayerApi.triggerInitMediaplayer == 'function')                    mediaplayerApi.triggerInitMediaplayer();            }            // issuu            if (this._embedType === 'issuu') {                if (typeof $().spiritecIssuuEmbed == 'function')                    $('.js-mediaplugin-issuu').spiritecIssuuEmbed();            }            // google maps            if (this._embedType === 'googlemaps') {                if (typeof $().spiritecGooglemaps == 'function') {                    $('.js-plugin-googlemaps').spiritecGooglemaps();                }            }            // htmlsnippetextended            if (this._embedType === 'htmlsnippetextended') {                if (typeof $().spiritecHtmlsnippetextended == 'function')                    $('.js-plugin-htmlsnippetextended').spiritecHtmlsnippetextended();            }            this._$element.removeClass('js-3rdparty-embed');        },        _triggerAllPlugins: function () {            $('.js-3rdparty-embed').each(function() {                $(this).spiritec3rdPartyEmbed().data('plugin_spiritec3rdPartyEmbed').triggerEmbed();            });        },        _setCookie: function () {            Cookies.set(this._settings.pluginConfig[this._embedType].cookieName, 1, { expires: 365, path: '/' });        },        _cookieIsAlreadySet: function () {            var erg = false;            var cookieValue = Cookies.get(this._settings.pluginConfig[this._embedType].cookieName);            if (typeof cookieValue != 'undefined')                erg = true;            return erg;        },        triggerEmbed: function () {            this._tryAutoEmbed();        },        _makeSafeForCss: function (className) {            // inspíred by https://stackoverflow.com/questions/7627000/javascript-convert-string-to-safe-class-name-for-css            return className.replace(/[^a-z0-9]/g, function (s) {                var c = s.charCodeAt(0);                if (c === 32) return '-'; // space                if (c === 45) return '-'; // -                if (c >= 65 && c <= 90) return s.toLowerCase(); // uppercase chars A-Z                return '';            });        },    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);$('.ensemble-switcher__control--show-tiles').click(function (e) {    e.preventDefault();    $(this).closest('.ensemble-switcher')        .removeClass('ensemble-switcher--show-list')        .addClass('ensemble-switcher--show-tiles');});$('.ensemble-switcher__control--show-list').click(function (e) {    e.preventDefault();    $(this).closest('.ensemble-switcher')        .removeClass('ensemble-switcher--show-tiles')        .addClass('ensemble-switcher--show-list');});$(document).ready(function() {    if (typeof isStaticDevelopment != 'undefined' && isStaticDevelopment) {        $('.js-form-toggle-mandatory').click(function(e) {            e.preventDefault();            var $formItems = $(this).closest('.form').find('.form__item');            $formItems.toggleClass('form__item--mandatory');        });        $('.js-form-toggle-error').click(function(e) {            e.preventDefault();            var $formItems = $(this).closest('.form').find('.form__item');            $formItems.toggleClass('form__item--error');        });    }    $(':checkbox').keydown(function (e) {        if (e.keyCode == 13) {            this.checked = !this.checked;        }    });});$(document).ready(function () {    $('.furtherperformances').spiritecFurtherperformances();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecFurtherperformances',        defaults = {        };
    function Plugin(element, options) {        this._element = element;
        this._$element = $(element);
        this._settings = $.extend({}, defaults, options);        this._defaults = defaults;
        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._currIndex = 0;            this._maxHeight = 0;            this._itemCount = this._$strip.find('.mediagallery__item').length;            this._viewportWidth = this._$viewport.outerWidth();            this._prepareItems();            this._itemWidth = this._$items.eq(0).outerWidth(true);            this._stripWidth = this._$items.addOuterWidths();            this._renderInit();            // do not do anything if everything is visible            if (this._stripWidth <= this._viewportWidth)                return;            this._autoSlideStart();            this.jumpTo(this._currIndex);            this._addControls();            this._bindEvents();        },        _cacheDom: function () {            this._$viewport = this._$element.find('.furtherperformances__viewport');            this._$strip = this._$element.find('.furtherperformances__strip');            this._$items = this._$element.find('.furtherperformances__performancewrapper');        },        _addControls: function() {            var controlsHTML = '' +                '<a href="#" class="furtherperformances__control furtherperformances__control--prev" role="button" aria-label="Termine: Vorherige Termine anzeigen"></a>' +                '<a href="#" class="furtherperformances__control furtherperformances__control--next" role="button" aria-label="Termine: Weitere Termine anzeigen"></a>';            this._$element.prepend(controlsHTML);            this._$controlPrev = this._$element.find('.furtherperformances__control--prev');            this._$controlNext = this._$element.find('.furtherperformances__control--next');        },        _bindEvents: function () {            var _this = this;            this._$controlPrev.click(function (e) {                e.preventDefault();                _this._autoSlideStop();                _this.slideTo(_this._currIndex - 1);            });            this._$controlNext.click(function (e) {                e.preventDefault();                _this._autoSlideStop();                _this.slideTo(_this._currIndex + 1);            });            this._$viewport.swipe({                swipeRight: function () {                    _this._autoSlideStop();                    _this.slideTo(_this._currIndex - 1);                },                swipeLeft: function () {                    _this._autoSlideStop();                    _this.slideTo(_this._currIndex + 1);                }            });            $(window).resize(debouncer(function (e) {                _this._renderInit();            }));        },        _prepareItems: function () {            var _this = this;            this._$items.each(function () {                if (typeof isMobile != 'undefined' && isMobile) {                    $(this).width(_this._viewportWidth);                }                var $top = $(this).find('.performance__top');                var $bottom = $(this).find('.performance__bottom');                $top.css('padding-bottom', $bottom.outerHeight() + 22); // height of production bottom incl. paddings + margin between top and bottom section                _this._maxHeight = Math.max(_this._maxHeight, $(this).outerHeight());            });        },        _renderInit: function () {            this._$strip.css('width', this._stripWidth);            this._$items.find('.performance').height(this._maxHeight);        },        _autoSlideStart: function () {            var _this = this;            this._autoslideInterval = setInterval(function () {                _this.slideTo(_this._currIndex + 1);            }, 3000);        },        _autoSlideStop: function () {            clearInterval(this._autoslideInterval);        },        slideTo: function (newIndex, duration) {            var _this = this;            var duration = typeof duration !== 'undefined' ? duration : 400;            var newLeft = -1 * newIndex * this._itemWidth;            var result = this._ensureWithinBoundaries(newLeft, this._viewportWidth - this._stripWidth, 0);            // use actual position of strip to see if we should stop autoslide            if (result < 0 && result === parseInt(this._$strip.css('margin-left')))                this._autoSlideStop();            if (newIndex < 0 || result === parseInt(this._$strip.css('margin-left')))                return;            this._$strip.animate({ marginLeft: result }, duration, function () {                _this._currIndex = newIndex;            });        },        jumpTo: function (newIndex) {            this.slideTo(newIndex, 1);        },        _ensureWithinBoundaries: function (value, min, max) {            if (value > max) { // linken rand nicht verlassen                value = max;            }            else { // falls linker rand ok, rechten rand nicht verlassen                if (value < min) {                    value = min;                }            }            return value;        },    });
    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);
$(document).ready(function () {    $('.heroslider').spiritecHeroslider();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecHeroslider',        defaults = {        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._initParams();            if (this._itemCount > 1) {                this._addControls();                this._initItems();                this._addDirectnavi();                this._bindEvents();                this._startAutoplay();            }            this._render();            this._updateNavi(this._$items.eq(this._currIndex));        },        _cacheDom: function () {            this._$viewport = this._$element.find('.heroslider__viewport');            this._$items = this._$element.find('.heroslider__item');            this._$index = this._$element.find('.heroslider__index');            this._$directnavi = this._$index.find('.heroslider__directnavi');        },        _initParams: function () {            this._autoplay = true;            this._currIndex = 0;            this._itemCount = this._$items.length;            this._mediaplayerContext = this._$element.data('mediaplayer-context');        },        _addControls: function() {            var controlsHtml = '' +                '<a href="#" class="heroslider__navigationcontrol heroslider__navigationcontrol--prev">Zurück</a>' +                '<a href="#" class="heroslider__navigationcontrol heroslider__navigationcontrol--next">Weiter</a>' +                 '<button class="heroslider__pause" aria-label="Automatisches Abspielen starten"></button>';            this._$viewport.before(controlsHtml);            this._$controlPrev = this._$element.find('.heroslider__navigationcontrol--prev');            this._$controlNext = this._$element.find('.heroslider__navigationcontrol--next');            this._$playPause = this._$element.find('.heroslider__pause');        },        _addDirectnavi: function () {            var _this = this;            var directnaviHtml = '';            for (var i = 0; i < _this._itemCount ; i++) {                var ziffer = i + 1;                directnaviHtml += '<a href="#" aria-label="Springen zu Eintrag Nummer ' + ziffer + '">' + ziffer + '</a>';            }            this._$directnavi.append(directnaviHtml);            this._$directnavi.find('a').eq(this._currIndex).addClass('--selected').attr('aria-label', 'Derzeit ausgewählt');            this._$directnavilink = _this._$directnavi.find('a');        },        _initItems: function() {            this._$items.attr('tabindex', '-1');        },        _bindEvents: function () {            var _this = this;            this._$controlPrev.click(function (e) {                e.preventDefault();                _this._updateForPause();                _this._goto(_this._currIndex - 1);            });            this._$controlNext.click(function (e) {                e.preventDefault();                _this._updateForPause();                _this._goto(_this._currIndex + 1);            });            this._$playPause.click(function (e) {                e.preventDefault();                _this._toggleAutoplay();            });            this._$directnavilink.click(function (e) {                e.preventDefault();                _this._updateForPause();                if ($(this).index() == _this._currIndex)                    return;                _this._goto($(this).index());            });            this._$viewport.swipe({                swipeRight: function () {                    _this._updateForPause();                    _this._goto(_this._currIndex - 1);                },                swipeLeft: function () {                    _this._updateForPause();                    _this._goto(_this._currIndex + 1);                }            });        },        _startAutoplay: function () {            var _this = this;            this._$element.removeClass('heroslider--paused');            this._$playPause.attr('aria-label', 'Slider pausieren');            this._herosliderInterval = window.setInterval(function () {                if (_this._autoplay) {                    if (_this._$element.find('.mediaplayer--is-playing').length === 0)                    _this._goto(_this._currIndex + 1);                } else {                    window.clearInterval(_this._herosliderInterval);                }            },            4000);        },        _toggleAutoplay: function() {            if (this._autoplay) {                this._updateForPause();            } else {                this._autoplay = true;                this._startAutoplay();            }        },        _updateForPause: function() {            this._autoplay = false;            this._$element.addClass('heroslider--paused');            this._$playPause.attr('aria-label', 'Automatisches Abspielen starten');        },        _updateForFocus: function() {            var $currFocus = $(':focus');            var $currItem = this._$items.eq(this._currIndex);            // focus is not the current slide and not inside the current slide but on or inside any slide            if ($currFocus !== $currItem && !$currItem.find($currFocus).length > 0 && ($currFocus.hasClass('heroslider__item') || this._$items.find($currFocus).length > 0)) {                $currItem.focus();            }        },        _render: function () {            this._$items.eq(0).addClass('heroslider__item--current').css({ 'opacity': 1, 'display': 'block'});            this._$element.removeClass('heroslider--activate-first-as-default');        },        _goto: function (newIndex) {            var _this = this;            if (newIndex > this._itemCount - 1) newIndex = 0;            if (newIndex < 0) newIndex = this._itemCount - 1;            mediaplayerApi.stopAllMediaplayer(this._mediaplayerContext);            var $newItem = this._$items.eq(newIndex);            var $currentItem = this._$items.eq(this._currIndex);            $newItem.css({ 'opacity': 0, 'display': 'block' }).addClass('heroslider__item--on-top');            $newItem.fadeTo(400, 1, function () {                $currentItem.css({ 'opacity': 0, 'display': 'none' }).removeClass('heroslider__item--current heroslider__item--on-top');                $newItem.addClass('heroslider__item--current').removeClass('heroslider__item--on-top');                _this._updateForFocus();            });            this._currIndex = newIndex;            this._updateNavi($newItem);        },        _updateNavi: function ($newItem) {            this._$directnavi.find('a').each(function (index, item) {                $(item).removeClass('--selected');                $(item).attr('aria-label', 'Springen zu Slide ' + (index + 1));            });            this._$directnavi.find('a').eq(this._currIndex).addClass('--selected').attr('aria-label', 'Slide ' + (this._currIndex + 1) + ': Derzeit ausgewählt');            if ($newItem.hasClass('js-marker-heroslider-show-navi')) {                this._$index.css('display', 'block');            } else {                this._$index.css('display', 'none');            }        },    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);
$(document).ready(function () {    $('.js-plugin-htmlsnippetextended').spiritecHtmlsnippetextended();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecHtmlsnippetextended',        defaults = {        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._initParams();            this._embedUserHtml();            this._embedUserCss();            this._embedUserJs();        },        _cacheDom: function () {            this._$content = this._$element.find('.htmlsnippetextended__content');        },        _initParams: function () {            this._embedCss = this._settings.embedCss;            this._embedJs = this._settings.embedJs;            this._variableNameHtml = this._settings.variableNameHtml;            this._variableNameCss = this._settings.variableNameCss;            this._functionNameJs = this._settings.functionNameJs;            this._userHtml = window[this._variableNameHtml];            this._userCss = window[this._variableNameCss];            this._userJs = window[this._functionNameJs];        },        _embedUserHtml: function () {            this._$content.html(this._userHtml);            this._$element.find('.embed3rdparty').remove();        },        _embedUserCss: function () {            if (this._embedCss) {                var styleTag = $('<style>');                styleTag.html(this._userCss);                $('head').append(styleTag);            }        },        _embedUserJs: function () {            if (this._embedJs) {                this._userJs();            }        },    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);$(document).ready(function() {    var $productionhead = $('.production--productionhead');    var $nextSection = $productionhead.next();    if ($nextSection.find('.image:first-child').length === 1) {        $nextSection.addClass('image--has-yellow-top');    }});$(document).ready(function () {    var initImagePopup = function () {        $('.js-image-popup').spiritecImagePopup();    };    if (typeof asyncLoader != "undefined")        asyncLoader.registerInit(initImagePopup);    initImagePopup();});/*Funktionsweise:- Markierung mit "js-image-popup"- Angabe des Bildes in "data-popup-image"- liegt die Funktion direkt auf einem Link so wird das Popup direkt auf diesen gesetzt.   Existiert innerhalb ein Element mit "js-image-popup-link" so wird auf dieses das Event zum öffnen des Popups gelegt.  Sonst wird in dem aktuellen Container ein Icon eingefügt. Sofern nicht überschrieben ist dies <i class="imagepopup__zoom"></i>.- Optionale Parameter:  + "data-suppress-image-popup-link": true/false, default false; das Skript fügt keinen Link zum öffnen ein, es wird alternativ ein onClick element eingefügt  + "data-on-open-popup": Die angegebene Funktion wird beim öffnen des Popups aufgerufen. Als Parameter wird eine Referenz auf das aktuelle Element und das Popup übergeben übergeben.- Beschriftung: über einen Tag "js-image-popup-caption" kann eine Beschriftung eingefügt werdenExterne Resourcen:- Das Skript lädt aus einem externen Objekt "RESOURCES" seine Resourcen. Ist dieses nicht vorhanden bzw. einzelne Parameter nicht gesetzt, so wird kein Text eingefügt.- "IMAGEPOPUP_ZOOMLINK": Label des vergrößern Links- "IMAGEPOPUP_CLOSELINK": Label des schließen LinksHook:- "js-popup-hook": Unterhalb dieser Markierung (id) wird das Popup eingehängtDebugging:- "data-stop-before-image-loading": Das Popup öffnet sich, daber das Bild wird nicht geladen*/; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecImagePopup',        defaults = {            debug: false,            interfaceMarkerClassnames: {                popupHook: 'js-popup-hook',                openPopupLink: 'js-image-popup-link',                caption: 'js-image-popup-caption'            },            interfaceAttributeNames: {                image: 'popup-image',                suppressAddingLink: 'suppress-image-popup-link',                stopBeforeLoading: 'stop-before-image-loading',                onOpenPopup: 'on-open-popup'            },            resourceNames: {                zoomLink: 'IMAGEPOPUP_ZOOMLINK',                closeLink: 'IMAGEPOPUP_CLOSELINK'            },            uiConfiguration: {                zoomLinkTagName: 'i',                zoomLinkCssClass: 'imagepopup__zoom'            }        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype,    {        init: function () {            this._log('Initializeing plugin.');            this._$popupLink = undefined;            this._$popup = undefined;            this._onOpenPopupEvent = undefined;            this._cacheDom();            this._addZoomLinks();            this._initParams();            this._bindEvents();        },        _log: function (content, force) {            if (this._settings.debug || force === true) {                if (typeof content != "string") {                    console.log('ImagePopup:');                    console.log(content);                } else {                    console.log('ImagePopup: ' + content);                }            }        },        _cacheDom: function () {            this._$hook = $('#' + this._settings.interfaceMarkerClassnames.popupHook);            var funcName = this._$element.data(this._settings.interfaceAttributeNames.onOpenPopup);            if (typeof funcName == "string" && funcName.trim() !== '' && typeof window[funcName.trim()] == "function")                this._onOpenPopupEvent = window[funcName.trim()];        },        _addZoomLinks: function () {            var suppressAddingLink = this._$element.data(this._settings.interfaceAttributeNames.suppressAddingLink) ===                false;            var tagName = this._$element.prop("tagName").toUpperCase();            if (tagName === 'A') {                this._$popupLink = this._$element;                return;            }            var $link = this._$element.find('.' + this._settings.interfaceMarkerClassnames.openPopupLink);            if ($link.length > 0) {                this._$popupLink = $link;                return;            }            if (suppressAddingLink)                return;            var resourceText = '';            if (typeof window.RESOURCES == "object" &&                typeof window.RESOURCES[this._settings.resourceNames.zoomLink] == "string")                resourceText = window.RESOURCES[this._settings.resourceNames.zoomLink];            var html = '<' +                this._settings.uiConfiguration.zoomLinkTagName +                ' class="' +                this._settings.uiConfiguration.zoomLinkCssClass +                '">' +                resourceText +                '</' +                this._settings.uiConfiguration.zoomLinkTagName +                '>';            this._$popupLink = $(html);            this._$element.append(this._$popupLink);        },        _initParams: function () {            this._stopBeforeLoading = this._$element.data(this._settings.interfaceAttributeNames.stopBeforeLoading) === true;            this._imageUrl = this._$element.data(this._settings.interfaceAttributeNames.image);            this._imageLoaded = false;            this._popupIsVisible = false;            this._caption = '';            var $caption = this._$element.find('.' + this._settings.interfaceMarkerClassnames.caption);            if ($caption.length > 0) {                this._caption = $caption.html();            }        },        _bindEvents: function () {            if (typeof this._$popupLink == "undefined") {                this._log('Cannot find any link to bind the click event!');                return;            }            var _this = this;            this._$popupLink.click(function (e) {                e.preventDefault();                e.stopPropagation();                _this._addAndOpenPopup();            });        },        _getUrlBase: function () {            var urlbase = '/';            if (typeof window.SYSTEMURLBASE == "string")                urlbase = window.SYSTEMURLBASE;            return urlbase;        },        _addAndOpenPopup: function () {            if (typeof this._$popup != "undefined") {                this._openPopup();                return;            }            var _this = this;            if (typeof this._imageUrl != "string" || typeof this._imageUrl.trim() === '') {                this._log('Image is missing: ' + this._imageUrl, true);                return;            }            if (this._$hook.length <= 0) {                this._log('Cannot find the hook to add the popup.', true);                return;            }            var resourceText = '';            if (typeof window.RESOURCES == "object" &&                typeof window.RESOURCES[this._settings.resourceNames.closeLink] == "string")                resourceText = window.RESOURCES[this._settings.resourceNames.closeLink];            var html = '' +                '<div class="imagepopup">' +                    '<div class="imagepopup__overlay"><div class="imagepopup__overlay-loading"></div></div>' +                    '<div class="imagepopup__popup">' +                        '<a href="#" class="imagepopup__close">' + resourceText + '</a>' +                        '<div class="imagepopup__media"><img src="' + this._getUrlBase() + 'resources/img/blank.png" alt="" class="imagepopup__image" /></div>' +                        '<div class="imagepopup__bottom"><div class="imagepopup__caption">' + this._caption + '</div></div>' +                    '</div>' +                '</div>';            this._$popup = $(html);            this._$hook.after(this._$popup);            this._$popup.find('.imagepopup__close').click(function (e) {                e.preventDefault();                _this.closePopup();            });            this._log('Popup added to DOM.');            this._openPopup();        },        _loadImage: function () {            var _this = this;            if (this._imageLoaded)                return;            var screenHeight = parseInt($(window).height());            var screenWidth = parseInt($(window).width());            var scaledImagePath = _this._getUrlBase() + 'content-images/';            if (screenHeight <= 480)                scaledImagePath = scaledImagePath + 'image360';            else if (screenHeight <= 1024 && screenWidth <= 1280)                scaledImagePath = scaledImagePath + 'image720';            else                scaledImagePath = scaledImagePath + 'image1080';            var ip = '';            var slashCounter = 0;            for (var i = this._imageUrl.length - 1; i >= 0; i--) {                ip = this._imageUrl[i] + ip;                if (this._imageUrl[i] === '/') {                    slashCounter++;                    if (slashCounter === 2) break;                }            }            scaledImagePath = scaledImagePath + ip;            //scaledImagePath = '/FrontendStatic/dummy/dummy-1600-900.png';            $('<img />').attr({ 'src': scaledImagePath }).on('load', function () {                _this._log('Image successfully loaded: ' + scaledImagePath);                _this._$popup.find('.imagepopup__image').css('background-image', 'url(' + scaledImagePath + ')');                _this._imageLoaded = false;                _this._showImage();            }).on('error', function () {                _this._$popup.find('.imagepopup__image').css('background-image', 'url(' + _this._imageUrl + ')');                _this._imageLoaded = false;                _this._showImage();            });        },        _openPopup: function () {            var _this = this;            if (!this._imageLoaded) {                this._$popup.find('.imagepopup__popup').hide();            }            if (typeof _this._onOpenPopupEvent == "function") {                try {                    _this._onOpenPopupEvent(_this._$element, _this._$popup);                } catch (ex) {                    _this._log("Executing the OnOpenPopup function threw an exception! - Message: " + ex, true);                }            }            var onFadedIn = function () {                _this._popupIsVisible = true;            };            this._$popup.fadeIn(200, onFadedIn);            if (!this._stopBeforeLoading) {                this._loadImage();            }        },        _showImage: function () {            var _this = this;            this._$popup.find('.imagepopup__popup').fadeIn(200, function () {                _this._$popup.addClass('medialoader--loaded');            });        },        closePopup: function () {            var _this = this;            var onFadedOut = function () {                _this._popupIsVisible = false;            };            this._$popup.fadeOut(200, onFadedOut);        }    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);$(document).ready(function () {    if ($('.magazine').length > 0) {        magazine.init();    }});var magazine = new function () {    var _config = {        'duration': 400,        'classnames': {            'control-prev': 'TBD',            'control-next': 'TBD',            'selected-slide': 'TBD',        }    }    // only for mobile    // currently displayed page (1, 2)    var currentPage = 1;    var blankPages = 0;    var blankPagesIndex = [];    var init = function () {        // always start on first page (only relevant for mobile)        currentPage = 1;        $('.magazine').each(function () {            //_addControls($(this));            if ($(this).find('.magazine__slide').length <= 1) {                $(this).addClass('magazine--only-one-slide');            }            _countBlankPages($(this));            $(this).find('.magazine__slide').eq(0).addClass('magazine__slide--selected');            _magazineUpdateIndex($(this));            _magazineSetCount($(this));            _magazineSetCountMobile($(this));            if (typeof isMobile != 'undefined' && isMobile) {                $(this).find('.magazine__page').eq(0).addClass('magazine__page--selected');            }        });        $('.magazine__navigationcontrol--prev').click(function (e) {            e.preventDefault();            _magazineGoToPrev($(this).closest('.magazine'));        });        $('.magazine__navigationcontrol--next').click(function (e) {            e.preventDefault();            _magazineGoToNext($(this).closest('.magazine'));        });        $('.magazine').swipe({            swipeRight: function () {                _magazineGoToPrev($(this));            },            swipeLeft: function () {                _magazineGoToNext($(this));            }        });    }    function _addControls($magazine) {        var controlsHTML = '' +            '<div class="magazine__navigation">' +                '<a href="#" class="magazine__navigationcontrol magazine__navigationcontrol--prev"></a>' +                '<a href="#" class="magazine__navigationcontrol magazine__navigationcontrol--next"></a>' +            '</div>';        $magazine.append(controlsHTML);    }    function _magazineGoToNext($magazine) {        // next slide        if (typeof isMobile != 'undefined' && !isMobile || currentPage === 2) {            var currentIndex = $magazine.find('.magazine__slide--selected').eq(0).index();            var slideCount = $magazine.find('.magazine__slide').length;            var newIndex = currentIndex + 1;            if (newIndex > slideCount - 1) newIndex = 0;            $magazine.find('.magazine__slide--selected').removeClass('magazine__slide--selected');            $magazine.find('.magazine__slide').eq(newIndex).addClass('magazine__slide--selected');            currentPage = 1;            _magazineUpdateIndex($magazine);            if (typeof isMobile != 'undefined' && isMobile) {                _magazineGoToFirstPage($magazine, 'next');                _magazineUpdateIndexMobile($magazine);            }        } else if (typeof isMobile != 'undefined' && isMobile && currentPage === 1) {            _magazineGoToSecondPage($magazine, 'next');            _magazineUpdateIndexMobile($magazine);        }    }    // previous slide    function _magazineGoToPrev($magazine) {        if (typeof isMobile != 'undefined' && !isMobile || currentPage === 1) {            var currentIndex = $magazine.find('.magazine__slide--selected').eq(0).index();            var slideCount = $magazine.find('.magazine__slide').length;            var newIndex = currentIndex - 1;            if (newIndex < 0) newIndex = slideCount - 1;            $magazine.find('.magazine__slide--selected').removeClass('magazine__slide--selected');            $magazine.find('.magazine__slide').eq(newIndex).addClass('magazine__slide--selected');            currentPage = 2;            _magazineUpdateIndex($magazine);            if (typeof isMobile != 'undefined' && isMobile) {                _magazineGoToSecondPage($magazine, 'prev');                _magazineUpdateIndexMobile($magazine);            }        } else if (typeof isMobile != 'undefined' && isMobile && currentPage === 2) {            _magazineGoToFirstPage($magazine, 'prev');            _magazineUpdateIndexMobile($magazine);        }    }    function _magazineGoToSecondPage($magazine, direction) {        // always go to 2. page (only executed if currentpage = 1)        $magazine.find('.magazine__page').removeClass('magazine__page--selected');        var $nextPage = $magazine.find('.magazine__slide--selected .magazine__page').eq(1);        if ($nextPage.children().length > 0) {            $nextPage.addClass('magazine__page--selected');            currentPage = 2;        } else {            // skip this page            currentPage = 2;            if (direction === 'prev') {                _magazineGoToPrev($magazine);            } else {                _magazineGoToNext($magazine);            }        }    }    function _magazineGoToFirstPage($magazine, direction) {        // always go to 1. page (only executed if currentpage = 2)        $magazine.find('.magazine__page').removeClass('magazine__page--selected');        var $nextPage = $magazine.find('.magazine__slide--selected .magazine__page').eq(0);        if ($nextPage.children().length > 0) {            $nextPage.addClass('magazine__page--selected');            currentPage = 1;        } else {            //skip this page            currentPage = 1;            if (direction === 'prev') {                _magazineGoToPrev($magazine);            } else {                _magazineGoToNext($magazine);            }        }    }    function _magazineUpdateIndex($magazine) {        var currentIndex = $magazine.find('.magazine__slide--selected').eq(0).index();        $magazine.find('.magazine__currentindex').text(currentIndex + 1);    }    function _magazineSetCount($magazine) {        var slideCount = $magazine.find('.magazine__slide').length;        $magazine.find('.magazine__slidecount').text(slideCount);    }    function _magazineUpdateIndexMobile($magazine) {        var currentIndexMobile = ($magazine.find('.magazine__slide--selected').eq(0).index()) * 2 + $magazine.find('.magazine__page--selected').eq(0).index();        var currentIndexMobileFinal = currentIndexMobile;        for (var i = 0; i < blankPagesIndex.length; i++) {            // minus die Anzahl der vorherigen leeren Seiten            if (currentIndexMobile >= blankPagesIndex[i]) {                currentIndexMobileFinal -= 1;            }        }        $magazine.find('.magazine__currentindex--mobile').text(currentIndexMobileFinal + 1);    }    function _magazineSetCountMobile($magazine) {        var pageCount = ($magazine.find('.magazine__slide').length) * 2;        pageCount -= blankPages;        $magazine.find('.magazine__slidecount--mobile').text(pageCount);    }    function _countBlankPages($magazine) {        $magazine.find('.magazine__page').each(function(index, element) {            if ($(element).children().length <= 0) {                blankPagesIndex.push(index);                blankPages += 1;            }        });    }    return {        init: init    };};$(document).ready(function () {    $('.mediagallery').spiritecMediagallery();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecMediagallery',        defaults = {            classnames: {                thumbnailActive: 'mediagallery__thumbnailitem--selected',            }        };
    function Plugin(element, options) {        this._element = element;
        this._$element = $(element);
        this._settings = $.extend({}, defaults, options);        this._defaults = defaults;
        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class'));            this._cacheDom();            this._currItem = 0;            this._itemCount = this._$strip.find('.mediagallery__item').length;            this._bindEvents();            this._renderInit();            this._setAriaLabels();            this._setAriaCurrent();        },        _cacheDom: function() {            this._$viewport = this._$element.find('.mediagallery__viewport');            this._$strip = this._$element.find('.mediagallery__strip');            this._$items = this._$element.find('.mediagallery__item');            this._$thumbnailViewport = this._$element.find('.mediagallery__preview');            this._$thumbnailStrip = this._$element.find('.mediagallery__thumbnailstrip');            this._$thumbnails = this._$thumbnailStrip.find('.mediagallery__thumbnailitem');            this._$caption = this._$element.find('.mediagallery__caption');            this._$index = this._$element.find('.mediagallery__index');            this._$currentIndex = this._$element.find('.mediagallery__currentindex');            this._$count = this._$element.find('.mediagallery__count');            this._$controlPrev = this._$element.find('.mediagallery__control--prev');            this._$controlNext = this._$element.find('.mediagallery__control--next');        },        _bindEvents: function () {            var _this = this;            this._$controlPrev.click(function (e) {                e.preventDefault();                _this.slideTo(_this._currItem - 1);            });            this._$controlNext.click(function (e) {                e.preventDefault();                _this.slideTo(_this._currItem + 1);            });            this._$viewport.swipe({                swipeRight: function () {                    _this.slideTo(_this._currItem - 1);                },                swipeLeft: function () {                    _this.slideTo(_this._currItem + 1);                }            });            this._$thumbnails.click(function (e) {                e.preventDefault();                if ($(this).index() != _this._currItem) {                    _this.slideTo($(this).index());                }            });            $(window).resize(debouncer(function (e) {                _this._renderInit();            }));        },        _renderInit: function () {            var _this = this;            this._viewportWidth = this._$viewport.outerWidth();            this._viewportHeight = this._$viewport.outerHeight();            this._$items.css('width', this._viewportWidth).css('height', this._viewportHeight);            this._$strip.css('width', this._$items.addOuterWidths());            window.setTimeout(function() {                _this._$thumbnailStrip.css('width', _this._$thumbnails.addOuterWidths());            }, 10);            if (this._itemCount > 1) {                this._$index.css('display', 'block');                this._$count.text(this._itemCount);            } else {                this._$index.css('display', 'none');            }            this.jumpTo(this._currItem);            this._render();        },        _render: function () {            this._activateThumbnail();            this._renderCaption();            this._renderIndex();        },        _activateThumbnail: function () {            this._$thumbnails.eq(this._currItem).addClass(this._settings.classnames.thumbnailActive);        },        _deactivateThumbnail: function() {            this._$thumbnails.removeClass(this._settings.classnames.thumbnailActive);        },        _renderCaption: function () {            this._$caption.html(this._$items.eq(this._currItem).find('.mediagallery__itemcaption').html());        },        _renderIndex: function() {            if (this._itemCount > 1) {                this._$currentIndex.text(this._currItem + 1);            }        },        slideTo: function (newItemIndex, duration) {            var duration = typeof duration !== 'undefined' ? duration : 400;            // TODO(BUE): sollte nicht flackern beim aufruf des gleichen bildes, muss beim resize aber trotzdem funktionieren            //newItemIndex == this._currItem ||             if (newItemIndex < 0 || newItemIndex + 1 > this._itemCount)                return;            this._slideItem(newItemIndex, duration);            this._slideThumbnail(newItemIndex, duration);        },        _slideItem: function (newItemIndex, duration) {            var _this = this;            var newLeft = -1 * newItemIndex * this._viewportWidth;            if (typeof mediaplayerApi != "undefined")                mediaplayerApi.stopAllMediaplayer();            this._deactivateThumbnail();            this._$strip.animate({ marginLeft: newLeft }, duration, function () {                _this._currItem = newItemIndex;                _this._render();                _this._setAriaCurrent();            });        },        _slideThumbnail: function (newItemIndex, duration) {            // TODO(BUE): move constants to initialisation            var desiredLeftOffset = this._$thumbnails.addOuterWidths(newItemIndex);            var newItemHalfWidth = this._$thumbnails.eq(newItemIndex).outerWidth() / 2;            var desiredOffset = desiredLeftOffset + newItemHalfWidth;            var viewportcenter = this._$thumbnailViewport.outerWidth() / 2;            var thumbnailStripWidth = this._$thumbnailStrip.outerWidth();            var thumbnailViewportWidth = this._$thumbnailViewport.outerWidth();            var offset = viewportcenter - desiredOffset;            if (thumbnailStripWidth <= thumbnailViewportWidth) {                this._$thumbnailStrip.css('margin-left', 0);            } else {                var result = this._ensureWithinBoundaries(offset, thumbnailViewportWidth - thumbnailStripWidth, 0);                this._$thumbnailStrip.animate({ marginLeft: result }, duration);            }        },        jumpTo: function (newItemIndex) {            this.slideTo(newItemIndex, 1);        },        _ensureWithinBoundaries: function (value, min, max) {            if (value > max) { // linken rand nicht verlassen                value = max;            }            else { // falls linker rand ok, rechten rand nicht verlassen                if (value < min) {                    value = min;                }            }            return value;        },        _setAriaLabels: function () {            this._$thumbnails.each(function (index, item) {                $(item).attr('aria-label', 'Zu Bild Nummer ' + (index + 1) + ' der Galerie springen.');            });        },        _setAriaCurrent: function () {            this._$thumbnails.attr('aria-current', false);            this._$thumbnails.eq(this._currItem).attr('aria-current', true);        }    });
    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);
// TODO(BUE) rewrite as jQuery plugin// TODO(BUE) medialoader sollte html-konstrukt mit ausnahme des noscript-blocks selbst einfuegenif (typeof isStaticDevelopment != 'undefined' && isStaticDevelopment) {    var breakBeforeLoading = false;    $('.js-image-preloading-container').each(function (index) {        if (breakBeforeLoading)            return;        var _$this = $(this);        window.setTimeout(function () {            var imageUrl = _$this.data('image-url');            var imageLoaded = function () {                _$this.find('.js-medialoader-image').css('background-image', 'url(' + imageUrl + ')');                _$this.removeClass('medialoader--is-loading').toggleClass('medialoader--not-loaded-yet medialoader--loaded');            };            $('<img />').attr({ 'src': imageUrl }).on('load', imageLoaded);        }, (index + 1) * 1400);    });}$(document).ready(function () {    if ($('.monthview').length > 0) {        $('body').addClass('screen-monthview');    }    // hide all links and prevent all clicks on links    $('.monthview a').click(function (e) {        e.preventDefault();        e.stopPropagation();    });});$(document).ready(function () {    initNewsletterSubscribe();    asyncLoader.registerInit(initNewsletterSubscribe);    initNewsletterChange();    asyncLoader.registerInit(initNewsletterChange);    initNewsletterUnsubscribe();    asyncLoader.registerInit(initNewsletterUnsubscribe);});function initNewsletterSubscribe() {    $('.js-marker-newsletter-subscribe-form').each(function() {        if (!$(this).data('isInitialized')) {            $('.js-marker-newsletter-subscribe-form-send').click(function (e) {                e.preventDefault();                var form = $(this).closest('.js-marker-newsletter-subscribe-form');                var identifier = $(form).attr('id');                var account = $(form).data('account');                var distributionListToken = $(form).data('distribution-lists');                var academicTitle = $(form).find('input[name="academicTitle"]').val();                var firstname = $(form).find('input[name="firstname"]').val();                var lastname = $(form).find('input[name="lastname"]').val();                var eMail = $(form).find('input[name="eMail"]').val();                var formOfAddress = $(form).find('select[name="formOfAddress"]').val();                var selectedDistributionLists = '';                $(form).find('.js-marker-newsletter-subscribe-form-distributionlists input:checkbox').each(function () {                    if ($(this).is(':checked')) {                        if (selectedDistributionLists != '')                            selectedDistributionLists = selectedDistributionLists + ',';                        selectedDistributionLists = selectedDistributionLists + $(this).attr('name');                    }                });                var dataPrivacyConsent = '';                // TODO: refine if text includes html tags                dataPrivacyConsent = $(form).find('.js-marker-newsletter-subscribe-form-dataprivacyconsent').text();                var privacyPolicyChecked = false;                if ($(form).find('.js-marker-newsletter-subscribe-form-privacy input:checkbox').eq(0).is(':checked')) {                    privacyPolicyChecked = true;                };                var params = {                    "identifier": identifier,                    "account": account,                    "distributionlisttoken": distributionListToken,                    "academictitle": academicTitle,                    "firstname": firstname,                    "lastname": lastname,                    "email": eMail,                    "formofaddress": formOfAddress,                    "selecteddistributionlists": selectedDistributionLists,                    'dataPrivacyConsent': dataPrivacyConsent,                    'privacyPolicyChecked': privacyPolicyChecked                };                var url = CALLBACKURLBASE + "newsletter-subscribe.json";                $.getJSON(url, params, function (data) {                    if (data.ResultCode === "Ok") {                        $(form).find('.js-marker-newsletter-subscribe-form-fields').hide();                        $(form).find('.js-marker-newsletter-subscribe-form-error').hide();                        $(form).find('.js-marker-newsletter-subscribe-form-errortext').hide();                        $(form).find('.js-marker-newsletter-subscribe-form-feedbacktext').html(data.FeedbackMessage);                        $(form).find('.js-marker-newsletter-subscribe-form-feedback').show();                        $(form).find('.js-marker-newsletter-subscribe-form-feedback').focus();                    } else {                        $(form).find('.js-marker-newsletter-subscribe-form-errortext').html(data.HtmlEncodedErrors);                        $(form).find('.js-marker-newsletter-subscribe-form-error').show();                        $(form).find('.js-marker-newsletter-subscribe-form-error').focus();                        $(form).find('.js-marker-newsletter-subscribe-form-send').show();                        if ($.isArray(data.ErrorFields)) {                            for (var i = 0; i < data.ErrorFields.length; i++) {                                $(form).find('[name=' + data.ErrorFields[i] + ']').closest('.form__item').addClass('form__item--error');                            }                        }                    }                }).fail(function (error) {                    if (typeof error.responseJSON != 'object' || typeof error.responseJSON.HtmlEncodedErrors != 'string')                        return;                    $(form).find('.js-marker-newsletter-subscribe-form-errortext').html(error.responseJSON.HtmlEncodedErrors);                    $(form).find('.js-marker-newsletter-subscribe-form-error').show();                    $(form).find('.js-marker-newsletter-subscribe-form-error').focus();                    $(form).find('.js-marker-newsletter-subscribe-form-send').show();                });            });            $(this).data('isInitialized', true);        }    });}function initNewsletterChange() {    $('.js-marker-newsletter-change-form').each(function () {        if (!$(this).data('isInitialized')) {            $('.js-marker-newsletter-change-form-send').click(function (e) {                e.preventDefault();                var form = $(this).closest('.js-marker-newsletter-change-form');                var identifier = $(form).attr('id');                var account = $(form).data('account');                var distributionListToken = $(form).data('distribution-lists');                var academicTitle = $(form).find('input[name="academicTitle"]').val();                var firstname = $(form).find('input[name="firstname"]').val();                var lastname = $(form).find('input[name="lastname"]').val();                var eMail = $(form).find('input[name="eMail"]').val();                var formOfAddress = $(form).find('select[name="formOfAddress"]').val();                var selectedDistributionLists = '';                $(form).find('.js-marker-newsletter-change-form-distributionlists input:checkbox').each(function () {                    if ($(this).is(':checked')) {                        if (selectedDistributionLists != '')                            selectedDistributionLists = selectedDistributionLists + ',';                        selectedDistributionLists = selectedDistributionLists + $(this).attr('name');                    }                });                var params = {                    "identifier": identifier,                    "account": account,                    "distributionlisttoken": distributionListToken,                    "academictitle": academicTitle,                    "firstname": firstname,                    "lastname": lastname,                    "email": eMail,                    "formofaddress": formOfAddress,                    "selecteddistributionlists": selectedDistributionLists,                };                var url = CALLBACKURLBASE + "newsletter-change.json";                $.getJSON(url, params, function (data) {                    if (data.ResultCode === "Ok") {                        $(form).find('.js-marker-newsletter-change-form-fields').hide();                        $(form).find('.js-marker-newsletter-change-form-error').hide();                        $(form).find('.js-marker-newsletter-change-form-errortext').hide();                        $(form).find('.js-marker-newsletter-change-form-feedbacktext').html(data.FeedbackMessage);                        $(form).find('.js-marker-newsletter-change-form-feedback').show();                        $(form).find('.js-marker-newsletter-change-form-feedback').focus();                    } else {                        $(form).find('.js-marker-newsletter-change-form-errortext').html(data.HtmlEncodedErrors);                        $(form).find('.js-marker-newsletter-change-form-error').show();                        $(form).find('.js-marker-newsletter-change-form-error').focus();                        $(form).find('.js-marker-newsletter-change-form-send').show();                        if ($.isArray(data.ErrorFields)) {                            for (var i = 0; i < data.ErrorFields.length; i++) {                                $(form).find('[name=' + data.ErrorFields[i] + ']').closest('.form__item').addClass('form__item--error');                            }                        }                    }                }).fail(function (error) {                    if (typeof error.responseJSON != 'object' || typeof error.responseJSON.HtmlEncodedErrors != 'string')                        return;                    $(form).find('.js-marker-newsletter-change-form-errortext').html(error.responseJSON.HtmlEncodedErrors);                    $(form).find('.js-marker-newsletter-change-form-error').show();                    $(form).find('.js-marker-newsletter-change-form-error').focus();                    $(form).find('.js-marker-newsletter-change-form-send').show();                });            });            $(this).data('isInitialized', true);        }    });}function initNewsletterUnsubscribe() {    $('.js-marker-newsletter-unsubscribe-form').each(function () {        if (!$(this).data('isInitialized')) {            $('.js-marker-newsletter-unsubscribe-form-send').click(function (e) {                e.preventDefault();                var form = $(this).closest('.js-marker-newsletter-unsubscribe-form');                var account = $(form).data('account');                var params = {                    "account": account                };                var url = CALLBACKURLBASE + "newsletter-unsubscribe.json";                $.getJSON(url, params, function (data) {                    if (data.ResultCode === "Ok") {                        $(form).find('.js-marker-newsletter-unsubscribe-form-data').hide();                        $(form).find('.js-marker-newsletter-unsubscribe-form-error').hide();                        $(form).find('.js-marker-newsletter-unsubscribe-form-errortext').hide();                        $(form).find('.js-marker-newsletter-unsubscribe-form-feedbacktext').html(data.FeedbackMessage);                        $(form).find('.js-marker-newsletter-unsubscribe-form-feedback').show();                        $(form).find('.js-marker-newsletter-unsubscribe-form-feedback').focus();                    } else {                        $(form).find('.js-marker-newsletter-unsubscribe-form-errortext').html(data.HtmlEncodedErrors);                        $(form).find('.js-marker-newsletter-unsubscribe-form-error').show();                        $(form).find('.js-marker-newsletter-unsubscribe-form-error').focus();                        $(form).find('.js-marker-newsletter-unsubscribe-form-send').show();                    }                }).fail(function (error) {                    if (typeof error.responseJSON != 'object' || typeof error.responseJSON.HtmlEncodedErrors != 'string')                        return;                    $(form).find('.js-marker-newsletter-unsubscribe-form-errortext').html(error.responseJSON.HtmlEncodedErrors);                    $(form).find('.js-marker-newsletter-unsubscribe-form-error').show();                    $(form).find('.js-marker-newsletter-unsubscribe-form-error').focus();                    $(form).find('.js-marker-newsletter-unsubscribe-form-send').show();                });            });            $(this).data('isInitialized', true);        }    });}
var SHOW_POPUP_CLASS = 'performance__presalepopupwrapper--show-popup';$('.performance__infoicon').click(function (e) {    e.preventDefault();    var $container = $(this).closest('.performance__presalepopupwrapper');    if (!$container.hasClass(SHOW_POPUP_CLASS)) {        hideAllPresalePopups();        $container.addClass(SHOW_POPUP_CLASS);    } else {        hideAllPresalePopups();    }});function hideAllPresalePopups() {    $('.' + SHOW_POPUP_CLASS).removeClass(SHOW_POPUP_CLASS);}$(document).ready(function () {    $('.pressarchive').spiritecPressarchive();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecPressarchive',        defaults = {            classnames: {                switchnaviActive: 'pressarchive__switchnavi-link--is-active',                switchpageVisible: 'pressarchive__switchpage--is-visible',            }        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            console.log('Plugin wird initialisiert für ' + this._$element.attr('class'));            this._cacheDom();            this._initParams();            this._bindEvents();            this._render();        },        _cacheDom: function () {            this._$naviitems = this._$element.find('.pressarchive__switchnavi-link');            this._$pages = this._$element.find('.pressarchive__switchpage');        },        _initParams: function () {            this.setCurrentPage(this._$pages.eq(0).data('page'));            if (typeof this._settings.initpage !== 'undefined') {                this.setCurrentPage(this._settings.initpage);            }        },        _bindEvents: function () {            var _this = this            this._$naviitems.find('a').click(function(e) {                e.preventDefault();                _this.setCurrentPage($(this).data('page'));            });        },        _render: function () {            this._$pages.removeClass(this._settings.classnames.switchpageVisible);            this._$naviitems.removeClass(this._settings.classnames.switchnaviActive);            this._$naviitems.filter('.pressarchive__switchnavi-link--' + this._currentPage).addClass(this._settings.classnames.switchnaviActive);            this._$pages.filter('.pressarchive__switchpage--' + this._currentPage).addClass(this._settings.classnames.switchpageVisible);        },        setCurrentPage: function (newPage) {            this._currentPage = newPage;            this._render();        }    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);$(document).ready(function() {    $('.js-open-presscart').click(function (e) {        openPresscart();    });    $('.js-close-presscart').click(function (e) {        closePresscart();    });    //openPresscart();});var presscartSettings = {    classnames: {        presscartVisible: 'presscart--visible',        preventScrolling: 'body--preventscrollingforfullsize',    }}function openPresscart() {    $('body').addClass(presscartSettings.classnames.preventScrolling);    $('.presscart').addClass(presscartSettings.classnames.presscartVisible);}function closePresscart() {    $('body').removeClass(presscartSettings.classnames.preventScrolling);    $('.presscart').removeClass(presscartSettings.classnames.presscartVisible);}$(document).ready(function () {    $('.presscomment__popup').closest('.presscomment').spiritecPresscomment();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecPresscomment',        defaults = {            open: false,            classnames: {                open: 'presscomment__popup--visible',                preventScrolling: 'body--preventscrollingforfullsize',            }        };
    function Plugin(element, options) {        this._element = element;
        this._$element = $(element);
        this._settings = $.extend({}, defaults, options);        this._defaults = defaults;
        this._name = pluginName;        this._$body = null;        this._$popup = null;
        this._$buttonOpenPopup = null;
        this._$buttonClosePopup = null;        this.init();    }    $.extend(Plugin.prototype, {        init: function() {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._bindToDom();            this._bindEvents();            this._render();        },        _render: function () {            if (this._settings.open) {                this._$popup.addClass(this._settings.classnames.open);                this._body.addClass(this._settings.classnames.preventScrolling);            }            else {                this._$popup.removeClass(this._settings.classnames.open);                this._body.removeClass(this._settings.classnames.preventScrolling);            }        },        _bindToDom: function () {            this._body = $('body');            this._$popup = this._$element.find('.presscomment__popup');
            this._$buttonOpenPopup = this._$element.find('.presscomment__action a');
            this._$buttonClosePopup = this._$element.find('.presscomment__popupclose');        },        _bindEvents: function() {            var _this = this;            this._$buttonOpenPopup.click(function (e) {                e.preventDefault();                _this.openPopup();            });            this._$buttonClosePopup.click(function (e) {                e.preventDefault();                _this.closePopup();            });        },        openPopup: function() {            this._settings.open = true;            this._render();        },        closePopup: function() {            this._settings.open = false;            this._render();        },    });
    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);
$(document).ready(function () {    $('.presscomments').spiritecPresscomments();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecPresscomments',        defaults = {        };
    function Plugin(element, options) {        this._element = element;
        this._$element = $(element);
        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;
        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._initParamsOne();            this._prepareItems();            this._initParamsTwo();            if (this._stripWidth <= this._viewportWidth)                return;            this.jumpTo(this._currIndex);            this._addControls();            this._bindEvents();        },        _cacheDom: function () {            this._$content = this._$element.find('.presscomments__content');            this._$viewport = this._$element.find('.presscomments__viewport');            this._$strip = this._$element.find('.presscomments__strip');            this._$items = this._$element.find('.presscomments__presscommentwrapper');            this._$presscomments = this._$element.find('.presscomment');        },        _initParamsOne: function () {            this._currIndex = 0;            this._maxHeight = 0;            this._viewportWidth = this._$viewport.outerWidth();            this._itemCount = this._$items.length;        },        _prepareItems: function () {            var _this = this;            this._$presscomments.each(function () {                if (typeof isMobile != 'undefined' && isMobile) {                    $(this).width(_this._viewportWidth);                }                var $top = $(this).find('.presscomment__top');                var $bottom = $(this).find('.presscomment__bottom');                $top.css('padding-bottom', $bottom.outerHeight() + 20); // height of production bottom incl. paddings + margin between top and bottom section                _this._maxHeight = Math.max(_this._maxHeight, $(this).outerHeight());            });            this._$presscomments.height(this._maxHeight);            //console.log(this._maxHeight);        },        _initParamsTwo: function () {            this._itemWidth = this._$items.eq(0).outerWidth(true);            this._stripWidth = this._$items.addOuterWidths();            this._$strip.css('width', this._stripWidth);        },        _addControls: function () {            var controlsHTML = '' +                '<a href="#" class="presscomments__control presscomments__control--prev" role="button" aria-label="Pressestimmen: Weitere Pressestimmen anzeigen"></a>' +                '<a href="#" class="presscomments__control presscomments__control--next" role="button" aria-label="Pressestimmen: Weitere Pressestimmen anzeigen"></a>';            this._$content.prepend(controlsHTML);            this._$controlPrev = this._$element.find('.presscomments__control--prev');            this._$controlNext = this._$element.find('.presscomments__control--next');        },        _bindEvents: function () {            var _this = this;            this._$controlPrev.click(function (e) {                e.preventDefault();                _this.slideTo(_this._currIndex - 1);            });            this._$controlNext.click(function (e) {                e.preventDefault();                _this.slideTo(_this._currIndex + 1);            });            this._$viewport.swipe({                swipeRight: function () {                    _this.slideTo(_this._currIndex - 1);                },                swipeLeft: function () {                    _this.slideTo(_this._currIndex + 1);                }            });            $(window).resize(debouncer(function (e) {                _this._initParams();                _this._prepareItems();            }));        },        slideTo: function (newIndex, duration) {            var _this = this;            var duration = typeof duration !== 'undefined' ? duration : 400;            var newLeft = -1 * newIndex * this._itemWidth;            var result = this._ensureWithinBoundaries(newLeft, this._viewportWidth - this._stripWidth, 0);            if (newIndex < 0 || result === parseInt(this._$strip.css('margin-left')))                return;            this._$strip.animate({ marginLeft: result }, duration, function () {                _this._currIndex = newIndex;            });        },        jumpTo: function (newIndex) {            this.slideTo(newIndex, 1);        },        _ensureWithinBoundaries: function (value, min, max) {            if (value > max) { // linken rand nicht verlassen                value = max;            }            else { // falls linker rand ok, rechten rand nicht verlassen                if (value < min) {                    value = min;                }            }            return value;        },    });
    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);
// TODO(BUE) vermischung zwischen medialoader und pressimage aufheben// beim legen in den presscart sollte die animation vom pressimage kommenif (typeof isStaticDevelopment != 'undefined' && isStaticDevelopment) {    $('.pressimage').click(function(e) {        $(this).toggleClass('pressimage--is-loading');    });}function onPressimagePopupOpening($element, $popup) {    var imageIsInCart = $element.hasClass('pressimage--is-in-cart');    var cartIdentifier = $element.data('cartIdentifier');    if (imageIsInCart) {        $popup.find('.imagepopup__action--add').hide();        $popup.find('.imagepopup__action--remove').css('display', 'inline-block');    } else {        $popup.find('.imagepopup__action--add').css('display', 'inline-block');        $popup.find('.imagepopup__action--remove').hide();    }    if (typeof cartIdentifier != "undefined")        $popup.find('.imagepopup__action--remove').attr('onclick', "RemoveFromPressCart('" + $element.attr('id') + "', '" + cartIdentifier + "'); closePressimagePopup(this); return false;");    //console.log('onPressimagePopupOpening: ' + cartIdentifier);}function closePressimagePopup(ref) {    $(ref).closest('.imagepopup').find('.imagepopup__close').click();}$(document).ready(function () {    if (typeof isMobile != 'undefined' && !isMobile) {        initPressproductionsoverview();    }});function initPressproductionsoverview() {    if ($('.pressproductionsoverview').length <= 0)        return;    $('.pressproductionsoverview').each(function () {        if ($(this).find('.pressproductionsoverview__production').length <= 0)            return;        var maxHeight = 0;        $(this).find('.pressproductionsnippet').each(function () {            var currHeight = $(this).outerHeight();            if (currHeight > maxHeight)                maxHeight = currHeight;        });        $(this).find('.pressproductionsnippet').each(function () {            $(this).height(maxHeight);        });    });    $(window).resize(debouncer(function () {        initPressproductionsoverview();    }));}
$(document).ready(function () {    $('.productionteaser').spiritecProductionteaser();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecProductionteaser',        defaults = {        };
    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options);        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class'));            this._cacheDom();            this._bindEvents();            this._renderInit();        },        _cacheDom: function () {            this._$items = this._$element.find('.productionteaser__item');        },        _bindEvents: function () {            var _this = this;            $(window).resize(throttle(function (e) {                _this._render();            }));        },        _renderInit: function () {            if (typeof isMobile != 'undefined' && !isMobile) {                this._formRowsToGetHighestItem();            }        },        _render: function () {            this._resetHeight();            if (typeof isMobile != 'undefined' && !isMobile) {                this._formRowsToGetHighestItem();            }        },        _formRowsToGetHighestItem: function () {            var _this = this;            // items-group with max 4 items            var tempItems = [];            for (var i = 0; i < this._$items.length; i++) {                if ((i+1) % 4 == 0) {                    tempItems.push(_this._$items.eq(i));                    _this._getHighestItem(tempItems);                    tempItems = [];                } else {                    tempItems.push(_this._$items.eq(i));                }            }            if (tempItems.length > 0) {                _this._getHighestItem(tempItems);            }        },        _getHighestItem: function (array) {            var height = 0;            // get height            for (var i = 0; i < array.length; i++) {                if ($(array[i]).height() > height) {                    height = $(array[i]).height();                }            }            this._setHeight(array, height);        },        _setHeight: function (array, height) {            //set height            for (var i = 0; i < array.length; i++) {                $(array[i]).css('height', height);            }        },        _resetHeight: function () {            this._$items.css('height', '');        },    });
    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);
$(document).ready(function () {    $('.richtext').spiritecRichtext();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecRichtext',        defaults = {        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._initParams();            this._bindEvents();        },        _cacheDom: function () {            this._$buttonShow = this._$element.find('.richtext__foldaction--show');            this._$buttonHide = this._$element.find('.richtext__foldaction--hide');            this._$foldingArea = this._$element.find('.richtext__foldingarea');        },        _initParams: function () {            this._duration = 400;        },        _bindEvents: function () {            var _this = this;            this._$buttonShow.click(function (e) {                e.preventDefault();                _this._$foldingArea.slideDown(_this._duration, function () {                    _this._$element.addClass('richtext--foldingarea-is-visible');                });            });            this._$buttonHide.click(function (e) {                e.preventDefault();                _this._$foldingArea.slideUp(_this._duration, function () {                    _this._$element.removeClass('richtext--foldingarea-is-visible');                });            });        }    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);$(document).ready(function () {    $('.richtextparagraphreadmorecontainer').spiritecRichtextParagraphReadMoreContainer();});; (function ($, window, document, undefined) {    'use strict';    var pluginName = 'spiritecRichtextParagraphReadMoreContainer',        defaults = {        };    function Plugin(element, options) {        this._element = element;        this._$element = $(element);        this._settings = $.extend({}, defaults, options, this._$element.data());        this._defaults = defaults;        this._name = pluginName;        this.init();    }    $.extend(Plugin.prototype, {        init: function () {            //console.log('Plugin wird initialisiert für ' + this._$element.attr('class') + ' (' + this._$element.index() + ')');            this._cacheDom();            this._initParams();            this._bindEvents();        },        _cacheDom: function () {            this._$buttonShow = this._$element.find('.richtextparagraphreadmorecontainer__foldaction--show');            this._$buttonHide = this._$element.find('.richtextparagraphreadmorecontainer__foldaction--hide');            this._$foldingArea = this._$element.find('.richtextparagraphreadmorecontainer__foldingarea');        },        _initParams: function () {            this._duration = 400;        },        _bindEvents: function () {            var _this = this;            this._$buttonShow.click(function (e) {                e.preventDefault();                _this._$foldingArea.slideDown(_this._duration, function () {                    _this._$element.addClass('richtextparagraphreadmorecontainer--foldingarea-is-visible');                });            });            this._$buttonHide.click(function (e) {                e.preventDefault();                _this._$foldingArea.slideUp(_this._duration, function () {                    _this._$element.removeClass('richtextparagraphreadmorecontainer--foldingarea-is-visible');                });            });        }    });    $.fn[pluginName] = function (options) {        return this.each(function () {            if (!$.data(this, 'plugin_' + pluginName)) {                $.data(this, 'plugin_' +                    pluginName, new Plugin(this, options));            }        });    };})(jQuery, window, document);$(document).ready(function () {    initScheduleCalendar();    if (typeof window.asyncLoader != 'undefined')        window.asyncLoader.registerInit(initScheduleCalendar);    setScheduleNaviFixed();    if (typeof isMobile != 'undefined' && !isMobile) {        initSchedule();        if (typeof window.asyncLoader != 'undefined')            window.asyncLoader.registerInit(initSchedule);    }    if (typeof isMobile != 'undefined' && isMobile) {        var $today = $('.schedule__calendar-day--today');        if ($today.length > 0) {            var todayWidth = $today.outerWidth();            var todayOffset = $today.offset().left;            var todayCenter = todayOffset + todayWidth / 2;            var screenCenter = $('.schedule__calendar').outerWidth() / 2;            $('.schedule__calendar').scrollLeft(todayCenter - screenCenter);        }    }});function setScheduleNaviFixed() {    var availableHeight = $(window).height() - $('.page-header').height() - $('.schedule-smartheadline').height();    if (typeof isMobile != 'undefined' && !isMobile && availableHeight > 500 || typeof isMobile != 'undefined' && isMobile && availableHeight > 300) {        var headerHeight = $('.page-header').height();        $('.schedule-smartheadline').stick_in_parent({            offset_top: headerHeight,            sticky_class: 'smartheadline--is-stuck'        });    }}function initSchedule() {    if ($('.schedule__performance-wrapper').length <= 0)        return;    $('.schedule__performances').each(function () {        if ($(this).find('.performance').length <= 0)            return;        var counter = 0;        $(this).find('.schedule__performance-wrapper, .schedule__teaser').each(function () {            $(this).removeClass('schedule__performance-wrapper--col-0')                .removeClass('schedule__performance-wrapper--col-1')                .removeClass('schedule__performance-wrapper--col-2')                .removeClass('schedule__performance-wrapper--col-3');            if ($(this).hasClass('schedule__teaser')) {                counter = 0;                return;            }            $(this).addClass('schedule__performance-wrapper--col-' + (counter++ % 4));        });        var maxHeight = 0;        $(this).find('.performance').each(function () {            var $top = $(this).find('.performance__top');            var $bottom = $(this).find('.performance__bottom');            $top.css('padding-bottom', $bottom.outerHeight() + 22); // height of production bottom incl. paddings + margin between top and bottom section            var currHeight = $(this).outerHeight();            if (currHeight > maxHeight)                maxHeight = currHeight;        });        $(this).find('.performance').each(function () {            $(this).height(maxHeight);        });    });    $(window).resize(debouncer(function () {        initSchedule();    }));}function initScheduleCalendar() {    var switchNavigation = function() {        var index = $('.schedule__month-navigation h2.selected').index();        var count = $('.schedule__month-navigation h2').length;        if (index === 0)            $('.schedule__month-navigation-control.schedule__month-navigation-control--prev').hide();        else            $('.schedule__month-navigation-control.schedule__month-navigation-control--prev').show();        if (index >= count - 1)            $('.schedule__month-navigation-control.schedule__month-navigation-control--next').hide();        else            $('.schedule__month-navigation-control.schedule__month-navigation-control--next').show();        $('.schedule__calendar ul').each(function(innerIndex) {            if (index === innerIndex)                $(this).addClass('selected');            else                $(this).removeClass('selected');        });    };    var doSwitchNavigation = function(increment) {        var index = $('.schedule__month-navigation h2.selected').index();        var count = $('.schedule__month-navigation h2').length;        var newIndex = index + increment;        if (newIndex < 0)            newIndex = 0;        if (newIndex > count - 1)            newIndex = count - 1;        $('.schedule__month-navigation h2').each(function (innerIndex) {            if (newIndex === innerIndex)                $(this).addClass('selected');            else                $(this).removeClass('selected');        });        switchNavigation();    };    switchNavigation();    $('.schedule__month-navigation-control.schedule__month-navigation-control--next').each(function () {        if ($(this).data('isInitialized'))            return;        $(this).click(function (e) {            e.preventDefault();            doSwitchNavigation(1);        });        $(this).data('isInitialized', true);    });    $('.schedule__month-navigation-control.schedule__month-navigation-control--prev').each(function () {        if ($(this).data('isInitialized'))            return;        $(this).click(function (e) {            e.preventDefault();            doSwitchNavigation(-1);        });        $(this).data('isInitialized', true);    });}$(document).ready(function () {    if (typeof isMobile != 'undefined' && !isMobile) {        initSeason();    }});function initSeason() {    if ($('.season__production').length <= 0)        return;    $('.season__category').each(function () {        if ($(this).find('.productionsnippet').length <= 0)            return;        var maxHeight = 0;        $(this).find('.productionsnippet').each(function () {            $top = $(this).find('.productionsnippet__top');            $bottom = $(this).find('.productionsnippet__bottom');            $top.css('padding-bottom', $bottom.outerHeight() + 22); // height of production bottom incl. paddings + margin between top and bottom section            var currHeight = $(this).outerHeight();            if (currHeight > maxHeight)                maxHeight = currHeight;        });        $(this).find('.productionsnippet').each(function () {            $(this).height(maxHeight);        });    });    $(window).resize(debouncer(function () {        initSeason();    }));}
$(document).ready(function () {    var headerHeight = $('.page-header').height();    $(window).resize(debouncer(function(e) {        headerHeight = $('.page-header').height();    }));    $('.smartheadline__stickycontainer').stick_in_parent({        offset_top: headerHeight,        parent: $('.page-content'),        sticky_class: 'smartheadline__stickycontainer--is-stuck'    });});
;
$(document).ready(function () {
    initFloatingCols();
});


function initFloatingCols() {
    $('.js-marker-floating-cols').each(function () {
        if ($(this).data('.itemsDistributed'))
            return;

        var colCount = $(this).children('.floating-col').length;
        if (colCount < 2)
            return;

        var cols = new Array();
        var i;

        for (i = 0; i < colCount; i++) {
            cols.push({ "height": 0, "items": new Array() });
        }

        $(this).children('.floating-col').each(function () {
            $(this).children().each(function () {
                cols[0].items.push({ "item": $(this), "height": $(this).outerHeight(true) });
            });
        });

        var updateHeights = function () {
            for (var i = 0; i < cols.length; i++) {
                var height = 0;
                for (var j = 0; j < cols[i].items.length; j++) {
                    height = height + cols[i].items[j].height;
                }
                cols[i].height = height;
            }
        };

        var anythingChanged;

        do {
            anythingChanged = false;
            updateHeights();

            for (i = cols.length - 1; i > 0; i--) {
                // if there is nothing in the previous col move to previous
                if (cols[i - 1].items.length === 0)
                    continue;

                // move if this col is lower than the previous
                if (cols[i - 1].items.length > 1 &&
                    cols[i - 1].height - cols[i - 1].items[cols[i - 1].items.length - 1].height > cols[i].height) {
                    cols[i].items.unshift(cols[i - 1].items[cols[i - 1].items.length - 1]);
                    cols[i - 1].items.pop();
                    anythingChanged = true;
                    break;
                }
            }

        } while (anythingChanged);

        //console.log(cols);

        for (i = 1; i < cols.length; i++) {
            for (var j = 0; j < cols[i].items.length; j++) {
                //console.log(i + ': ' + $(cols[i].items[j].item).find('h2').html());
                $(cols[i].items[j].item).detach().appendTo($(this).children('.floating-col').eq(i));
            }
        }

        $(this).css('visibility', 'visible');

        $(this).data('.itemsDistributed', true);
    });
}
;
/* --- Share --- */

$(document).ready(function () {
    initSocialShare();
});

function initSocialShare() {
    doInitSocialShare('js-marker-share-facebook', shareOnFacebook);
    doInitSocialShare('js-marker-share-twitter', shareOnTwitter);
}

function doInitSocialShare(markerCss, clickCallback) {
    $('.' + markerCss).each(function () {
        if ($(this).data('isInitialized')) return;

        $(this).click(function (e) {
            e.preventDefault();

            var urlToSare = window.location.href;

            if (typeof $(this).attr('data-shared-image') == "string" && $(this).attr('data-shared-image') !== "") {
                if (urlToSare.indexOf('?') < 0)
                    urlToSare = urlToSare + '?';

                urlToSare = urlToSare + "shared-image=" + encodeURIComponent($(this).attr('data-shared-image'));
            }

            clickCallback(urlToSare);
        });

        $(this).data('isInitialized', true);
    });
}

function shareOnFacebook(urlToSare) {
    var link = 'https://www.facebook.com/sharer.php?u=' + encodeURIComponent(urlToSare);
    var windowRef = window.open(link, '', "width=500,height=400,left=100,top=200");
    windowRef.focus();
}

function shareOnTwitter(urlToSare) {
    var link = 'https://twitter.com/intent/tweet?url=' + encodeURIComponent(urlToSare) + 'text=' + encodeURIComponent(document.title);
    var windowRef = window.open(link, '', "width=500,height=400,left=100,top=200");
    windowRef.focus();
}


/* --- Scrolling --- */

$(document).ready(function () {
    var idxQuery = location.href.indexOf('?');
    var idxScrollPos = location.href.indexOf('scrollTo=');

    if (idxQuery > 0 && idxScrollPos > idxQuery) {
        var pos = location.href.substring(idxScrollPos + 9);
        var idx = pos.indexOf('&');
        if (idx > 0) pos = pos.substring(0, idx);

        scrollToElement(pos);
    }
});

function scrollToElement(elementId) {
    if ($('#' + elementId).length > 0) {
        var scheduleHeaderHeight = $('.page-header').height() + $('.schedule-smartheadline').height();
        var scrollTo = $('#' + elementId).offset().top - scheduleHeaderHeight;
        if (scrollTo < 0) scrollTo = 0;

        $('.js-marker-include-in-scrolling-calculation').each(function () {
            scrollTo = scrollTo - $(this).outerHeight();
        });

        scrollToPosition(scrollTo);
        return true;
    }
    return false;
}

function scrollToPosition(scrollTo) {
    setTimeout(function () { $('html, body').animate({ scrollTop: scrollTo }, 800); }, 100);
}
;
$(document).ready(function () {
    initScheduleDataSettings();
    initScheduleFilter();
    initScheduleScrolling();
    checkForAsyncLoading();
});

var __asyncScheduleLoadingInProgress = false;
var __scheduleFilterInitialized = false;
var __scheduleAnchorPositions = new Array();
var __scheduleAsyncLoaderPoints = { top: -1, bottom: -1 };
var __scheduleFilterBaseUrl = '';
var __scheduleFilterdUrlWithoutDate = '';
var __scheduleCurrentHash = '';
var __scheduleDataSettings = { datesFrom: null, datesTo: null, loadBackwardUntil: null, loadForwardUntil: null, loadBackward: false, loadForward: false, allowLoadBackwards: false };

function initScheduleFilter() {
    $('.js-marker-schedule-filter').each(function () {
        if ($(this).data('isInitialized')) return;

        var ref = $(this);
        __scheduleFilterBaseUrl = $(ref).attr('data-schedule-url');

        var getFilter = function (filterContainer) {
            var value = $(filterContainer).find('.js-marker-schedule-filter-option-date .schedule__month-navigation h2.selected').data('filter-token');

            var filter = value + '/';
            var filterWithoutDate = '';

            value = $(filterContainer).find('.js-marker-schedule-filter-option-attribute input').filter(function () { return $(this).is(':checked'); }).data('filter-token');
            if (typeof value != "string" || value === '') {
                value = $(filterContainer).find('.js-marker-schedule-filter-option-attribute input').first().data('filter-token');
            }

            if (value !== '') {
                filter = filter + value + '/';
                filterWithoutDate = filterWithoutDate + value + '/';
            }

            return {
                filter: filter,
                filterWithoutDate: filterWithoutDate
            };
        }

        $(this).find('.js-marker-schedule-filter-option-attribute input').change(function () {
            $(this).closest('.js-marker-schedule-filter-option-attribute').find('input').not(this).prop('checked', false);

            var checkbox = this;

            var func = function () {
                if ($(checkbox).closest('.js-marker-schedule-filter-option-attribute').find('input:checked').length === 0)
                    $(checkbox).closest('.js-marker-schedule-filter-option-attribute').find('input').eq(0).prop('checked', true);

                var filterSettings = getFilter(ref);
                if ($('.js-marker-schedule-content').length > 0) {
                    getSchedule(filterSettings.filter, filterSettings.filterWithoutDate);
                }
            };

            setTimeout(func, 0);
        });

        $(this).find('.js-marker-schedule-filter-option-date .schedule__calendar a').click(function (e) {
            e.preventDefault();

            var anchor = $(this).data('anchor');

            if ($('#' + anchor).length > 0)
                return;

            var filterSettings = getFilter(ref);
            if ($('.js-marker-schedule-content').length > 0) {
                getSchedule(filterSettings.filter, filterSettings.filterWithoutDate, anchor);
            }
        });

        var currentFilter = getFilter(ref);
        __scheduleFilterdUrlWithoutDate = currentFilter.filterWithoutDate;
        __scheduleFilterInitialized = true;

        $(this).data('isInitialized', true);
    });
}

function getSchedule(filter, filterWithoutDate, elementToScrollTo) {
    var setDataCallback = function (data) {
        $('.js-marker-schedule-content').data('date-from', data.DatesFrom);
        $('.js-marker-schedule-content').data('date-to', data.DatesTo);
        initScheduleDataSettings();
        $('.js-marker-schedule-calendar').html(data.Calendar);
        $('.js-marker-schedule-content').html(data.Schedule);
        getScheduleAnchorPositions();
        __scheduleFilterdUrlWithoutDate = filterWithoutDate;
        __scheduleCurrentHash = '';
        setScheduleHistoryUrl();
        if (typeof elementToScrollTo == "string" && $('#' + elementToScrollTo).length > 0)
            scrollToElement(elementToScrollTo);
        else
            scrollToPosition(0);
    };

    var combinedFilter = filter;
    doGetSchedule({ "filter": combinedFilter }, setDataCallback);
}

function getBackwardSchedule() {
    if (__asyncScheduleLoadingInProgress || __scheduleDataSettings.datesFrom.number <= __scheduleDataSettings.loadBackwardUntil.number)
        return;

    var setDataCallback = function (data) {
        var ref = $('.js-marker-schedule-content').children('.schedule__performance-wrapper').eq(0);
        var box = $(ref)[0].getBoundingClientRect();
        var originalPos = box.top;

        $('.js-marker-schedule-content').prepend(data.Schedule);

        getScheduleAnchorPositions();

        var datesFrom = extractDateFromText(data.DatesFrom);
        if (datesFrom != null)
            __scheduleDataSettings.datesFrom = datesFrom;
        else
            __scheduleDataSettings.loadBackward = false; // don't bother to try again

        if (datesFrom == null || __scheduleDataSettings.datesFrom.number <= __scheduleDataSettings.loadBackwardUntil.number) {
            // we are at the top
        }

        box = $(ref)[0].getBoundingClientRect();
        var newPos = box.top + $(window).scrollTop();

        //console.log(originalPos + ' | ' + newPos + ' | ' + (newPos - originalPos));
        $(window).scrollTop(newPos - originalPos);
    };

    doGetSchedule({ "filter": __scheduleFilterdUrlWithoutDate, "loadBackwardFrom": __scheduleDataSettings.datesFrom.text }, setDataCallback);
}

function getForwardSchedule() {
    if (__asyncScheduleLoadingInProgress || __scheduleDataSettings.datesTo.number >= __scheduleDataSettings.loadForwardUntil.number)
        return;

    var setDataCallback = function (data) {
        $('.js-marker-schedule-content').append(data.Schedule);

        getScheduleAnchorPositions();

        var datesTo = extractDateFromText(data.DatesTo);
        if (datesTo != null)
            __scheduleDataSettings.datesTo = datesTo;
        else
            __scheduleDataSettings.loadForward = false; // don't bother to try again

        if (datesTo == null || __scheduleDataSettings.datesTo.number >= __scheduleDataSettings.loadForwardUntil.number) {
            $('.js-marker-schedule-loader').hide();
        }
    };

    doGetSchedule({ "filter": __scheduleFilterdUrlWithoutDate, "loadForwardFrom": __scheduleDataSettings.datesTo.text }, setDataCallback);
}

function doGetSchedule(filter, setDataCallback) {
    __asyncScheduleLoadingInProgress = true;

    $.ajax({
        url: CALLBACKURLBASE + "getschedule.json",
        dataType: 'json',
        data: filter,
        success: function (data) {
            if (data.ResultCode === "Ok") {

                setDataCallback(data);

                if (typeof asyncLoader.triggerAsyncInit == "function")
                    asyncLoader.triggerAsyncInit();

                var historyUrl = __scheduleFilterBaseUrl + filter.filter;
                history.replaceState(null, null, historyUrl);
            }
            __asyncScheduleLoadingInProgress = false;
        },
        error: function () { __asyncScheduleLoadingInProgress = false; }
    });
}

function extractDateFromText(value) {
    if (typeof value != "string")
        return null;

    var ma = value.match(/^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})$/);
    if (ma == null)
        return null;

    return {
        year: parseInt(ma[1]),
        month: parseInt(ma[2]),
        day: parseInt(ma[3]),
        number: parseInt(ma[1]) * 10000 + parseInt(ma[2]) * 100 + parseInt(ma[3]),
        text: parseInt(ma[3]) + '.' + parseInt(ma[2]) + '.' + parseInt(ma[1])
    };
}

function initScheduleDataSettings() {
    if ($('.js-marker-async-loading-schedule').length <= 0)
        return;

    __scheduleDataSettings.datesFrom = extractDateFromText($('.js-marker-schedule-content').data('date-from'));
    __scheduleDataSettings.datesTo = extractDateFromText($('.js-marker-schedule-content').data('date-to'));
    __scheduleDataSettings.loadBackwardUntil = extractDateFromText($('.js-marker-schedule-content').data('scroll-back-until'));
    __scheduleDataSettings.loadForwardUntil = extractDateFromText($('.js-marker-schedule-content').data('scroll-forward-until'));

    __scheduleDataSettings.loadBackward = false && typeof __scheduleDataSettings.datesFrom == "object" &&
        typeof __scheduleDataSettings.loadBackwardUntil == "object" &&
        __scheduleDataSettings.loadBackwardUntil.number < __scheduleDataSettings.datesFrom.number;

    __scheduleDataSettings.loadForward = typeof __scheduleDataSettings.datesTo == "object" &&
        typeof __scheduleDataSettings.loadForwardUntil == "object" &&
        __scheduleDataSettings.loadForwardUntil.number > __scheduleDataSettings.datesTo.number;

    if (__scheduleDataSettings.datesTo.number >= __scheduleDataSettings.loadForwardUntil.number) {
        $('.js-marker-schedule-loader').hide();
    }
}

function getScheduleAnchorPositions() {
    var scrollTop = $(window).scrollTop();

    var contentBox = $('.js-marker-schedule-content')[0].getBoundingClientRect();
    __scheduleAsyncLoaderPoints.top = contentBox.top + scrollTop;
    __scheduleAsyncLoaderPoints.bottom = contentBox.bottom + scrollTop;

    var positions = new Array();

    $('.js-marker-schedule-anchor').each(function () {
        var box = $(this)[0].getBoundingClientRect();
        positions.push({
            top: box.top + scrollTop,
            id: $(this).attr('id'),
            monthToken: $(this).data('month-token')
        });
    });

    positions.sort(function (a, b) {
        if (a.top > b.top)
            return 1;
        if (a.top < b.top)
            return -1;
        return 0;
    });

    __scheduleAnchorPositions = positions;
}

function setScheduleHistoryUrl() {
    if (typeof history.replaceState != "function" || !__scheduleFilterInitialized)
        return;

    var scrollTop = $(window).scrollTop();

    for (var i = 0; i < __scheduleAnchorPositions.length; i++) {
        if (__scheduleAnchorPositions[i].top - scrollTop >= 0) {
            if (i > 0) i = i - 1;
            var id = "?scrollTo=" + __scheduleAnchorPositions[i].id;
            if (__scheduleCurrentHash !== id) {
                var historyUrl = __scheduleFilterBaseUrl + __scheduleAnchorPositions[i].monthToken + '/' + __scheduleFilterdUrlWithoutDate + id;
                history.replaceState(null, null, historyUrl);
                __scheduleCurrentHash = id;
            }
            break;
        }
    }
}

function checkForAsyncLoading() {
    var scrollTop = $(window).scrollTop();
    var viewportHeight = $(window).height();

    if (__scheduleDataSettings.loadBackward && !__scheduleDataSettings.allowLoadBackwards && scrollTop > 100) {
        // we've scrolled a bit, allow backward loading
        $('body').addClass('-pageheader-force-small');
        __scheduleDataSettings.allowLoadBackwards = true;
    }

    if (__scheduleDataSettings.loadForward && __scheduleAsyncLoaderPoints.bottom > 0 &&
        scrollTop + viewportHeight >= __scheduleAsyncLoaderPoints.bottom) {
        getForwardSchedule();
    }

    if (__scheduleDataSettings.loadBackward && __scheduleDataSettings.allowLoadBackwards &&
        __scheduleAsyncLoaderPoints.top > 0 && scrollTop === 0 /* <= __scheduleAsyncLoaderPoints.top */) {
        getBackwardSchedule();
    }
}

function initScheduleScrolling() {
    if ($('.js-marker-async-loading-schedule').length <= 0)
        return;

    getScheduleAnchorPositions();

    $(window).scroll(function () {
        setScheduleHistoryUrl();
        checkForAsyncLoading();
    });
};

$(document).ready(function () {
    $('.js-marker-press-cart-send').click(function (event) {
        event.preventDefault();

        var eMail = $('input:text[name=press-cart-email]').val();
        var editorialDepartment = $('input:text[name=press-cart-editorial-department]').val();
        var sizeInfo = $('input:radio[name=press-cart-send-option]').val();

        //console.log(editorialDepartment);

        var hasErrors = false;
        var errorMessages = '';

        if (!ValidateIsMail(eMail)) {
            hasErrors = true;
            errorMessages = errorMessages + RESOURCES.PRESSCART_ERROR_EMAIL + ' ';
        }

        if (editorialDepartment.length < 3) {
            hasErrors = true;
            errorMessages = errorMessages + RESOURCES.PRESSCART_ERROR_EDITORIALDEPARTMENT + ' ';
        }

        if (!hasErrors) {
            $('.js-marker-press-cart-error-container').hide();
            $('.js-marker-press-cart-error-message').html('');
            $('.js-marker-press-cart-error-marker').removeClass('error');
            $('.js-marker-press-cart-send').hide();

            var url = CALLBACKURLBASE + "sendpresscart.json";
            $.getJSON(url,
                { "email": eMail, "editorialdepartment": editorialDepartment, "sizeinfo": sizeInfo },
                function(data) {
                    $('.js-marker-press-cart-send').show();
                    if (data.ResultCode === "Ok") {
                        $('.js-marker-press-cart-items-container').empty();
                        $('.js-marker-press-cart-item-count').html(data.CartItemCount);
                        $('.item-in-press-cart').removeClass('item-in-press-cart');
                        $('.js-marker-press-cart-send-success-feedback').slideDown(200);
                    }
                    CheckCartVisibility(false, true);
                }).fail(function(error) {
                if (typeof error.responseJSON != 'object' || typeof error.responseJSON.HtmlEncodedErrors != 'string')
                    return;

                $('.js-marker-press-cart-error-container').show();
                $('.js-marker-press-cart-error-message').html(error.responseJSON.HtmlEncodedErrors);
                $('.js-marker-press-cart-error-marker').addClass('error');
            });
        }
        else {
            $('.js-marker-press-cart-error-container').show();
            $('.js-marker-press-cart-error-message').html(errorMessages);
            $('.js-marker-press-cart-error-marker').addClass('error');
        }
    });

    $('.js-marker-press-cart-display-status-switch').click(function (event) {
        event.preventDefault();

        var newStatus = 'expanded';
        var oldStatus = 'collapsed';

        if ($('.js-marker-press-cart-container').hasClass(newStatus)) {
            newStatus = 'collapsed';
            oldStatus = 'expanded';
        }

        var url = CALLBACKURLBASE + "set-presscart-display-status.json";
        $.getJSON(url, { "status": newStatus }, function (data) { });

        var setCotainerMarker = function () {
            $('.js-marker-press-cart-container').removeClass(oldStatus);
            $('.js-marker-press-cart-container').addClass(newStatus);
        };

        if (newStatus === 'expanded')
            $('.js-marker-press-cart-items-container').slideDown(400, setCotainerMarker);
        else
            $('.js-marker-press-cart-items-container').slideUp(400, setCotainerMarker);
    });

    if ($('.js-marker-press-cart-container').length > 0) {

        var itemCount = parseInt($('.js-marker-press-cart-container').data('presscart-itemcount'));

        if (!isNaN(itemCount) && itemCount > 0) {
            SetPressCartItemCount(itemCount);
        } else {
            SetPressCartItemCount(0);
        }
    }
});

function ValidateIsMail(value) {
    var reg = value.match(/^([a-zA-Z0-9_\-\.]+)@((\[[0-2]{1}[0-5]{1}[0-5]{1}\.[0-2]{1}[0-5]{1}[0-5]{1}\.[0-2]{1}[0-5]{1}[0-5]{1}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,}|[0-2]{1}[0-5]{1}[0-5]{1})(\]?)$/i);
    if (reg) return true;
    else return false;
}

function ItemInCart(localIdentifier, cartIdentifier) {
    $('#' + localIdentifier).addClass('pressimage--is-in-cart');
    $('#' + localIdentifier).data('cartIdentifier', cartIdentifier);
    $('#' + localIdentifier + ' .js-marker-press-cart-remove-from-cart').attr('onclick', "RemoveFromPressCart('" + localIdentifier + "', '" + cartIdentifier + "'); return false;");
}

function SetPressCartItemCount(itemCount) {
    $('.js-marker-press-cart-item-count').html(itemCount);
    if (parseInt(itemCount) > 0)
        $('.js-marker-press-cart-item-count-wrapper').show();
    else
        $('.js-marker-press-cart-item-count-wrapper').hide();
}

function CheckCartVisibility(forceShowCart, hasJustBeenSent) {
    if (typeof hasJustBeenSent === 'undefined') hasJustBeenSent = false;

    var itemCount = parseInt($('.js-marker-press-cart-item-count').html());
    if (itemCount > 0 || forceShowCart) {
        $('.js-marker-press-cart-has-items-container').slideDown(1000);
        $('.js-marker-press-cart-has-no-items-container').slideUp(1000);
        $('.js-marker-press-cart-container').removeClass('no-items');
        $('.js-marker-press-cart-send-success-feedback').slideUp(200);
    } else {
        $('.js-marker-press-cart-has-items-container').slideUp(1000);
        if (!hasJustBeenSent) {
            $('.js-marker-press-cart-has-no-items-container').slideDown(1000);
            $('.js-marker-press-cart-container').addClass('no-items');
        }
    }
}

function GetPressCartLoaderAnimation(localIdentifier) {
    var result = '<div class="presscart__pressimagewrapper" id="NewCartItem' + localIdentifier + '"><div class="pressimage pressimage--is-in-cart medialoader--not-loaded-yet">';
    result = result + '<div class="pressimage__media js-marker-press-cart-item-wrapper">';
    result = result + '<div class="medialoader__loading"><span class="medialoader__animation"></span></div>';
    result = result + '<div class="pressimage__loading"><span class="pressimage__animation"></span></div>';
    result = result + '<img alt="" src="' + SYSTEMURLBASE + 'blank-image/blank_280_186.png" class="pressimage__image" />';
    result = result + '</div>';
    result = result + '<div class="pressimage__actions"><a href="#" class="pressimage__action pressimage__action--remove js-marker-press-cart-remove-from-cart" style="display: none;"></a></div>';
    result = result + '</div></div>';
    return result;
}

function AddToPressCart(localIdentifier, itemType, identifier) {
    CheckCartVisibility(true);
    $('#' + localIdentifier).addClass('pressimage--is-loading');

    $('.js-marker-press-cart-items-container').append(GetPressCartLoaderAnimation(localIdentifier));

    var url = CALLBACKURLBASE + "addtopresscart.json";
    $.getJSON(url, { "cssidentifier": localIdentifier, "itemtype": itemType, "identifier": identifier }, function (data) {
        if (typeof data.CssIdentifier != "undefined")
            $('#' + data.CssIdentifier).removeClass('pressimage--is-loading');
        if (data.ResultCode === "Ok") {
            SetPressCartItemCount(data.CartItemCount);
            $('#' + data.CssIdentifier).data('cartIdentifier', data.CartIdentifier);
            $('#' + data.CssIdentifier).addClass('pressimage--is-in-cart');
            $('#' + data.CssIdentifier + ' .js-marker-press-cart-remove-from-cart')
                .attr('onclick', "RemoveFromPressCart('" + data.CssIdentifier + "', '" + data.CartIdentifier + "'); return false;");

            var imageLoaded = function () {
                $('#NewCartItem' + localIdentifier + ' img').css('background-image', 'url(' + data.ImageLink + ')');
                $('#NewCartItem' + localIdentifier).removeClass('pressimage--is-loading');
                $('#NewCartItem' + localIdentifier + ' .js-marker-press-cart-remove-from-cart')
                    .attr('onclick', "RemoveFromPressCart('" + data.CssIdentifier + "', '" + data.CartIdentifier + "'); return false;")
                    .show();
                $('#NewCartItem' + localIdentifier).attr('id', 'CartItem' + data.CartIdentifier);
            };
            $('<img />').attr({ 'src': data.ImageLink }).on('load', imageLoaded);
        }
        else {
            $('#NewCartItem' + localIdentifier).remove();
            CheckCartVisibility(false);
        }
    });
}

function RemoveFromPressCart(itemItentifier, cartIdentifier) {
    $('#' + itemItentifier).addClass('pressimage--is-loading');
    $('#CartItem' + cartIdentifier).addClass('pressimage--is-loading');
    $('#CartItem' + cartIdentifier + ' .js-marker-press-cart-remove-from-cart').hide();

    var url = CALLBACKURLBASE + "removefrompresscart.json";
    $.getJSON(url, { "cssidentifier": itemItentifier, "identifier": cartIdentifier }, function (data) {
        var excecuteAfter = function () {
            if (typeof data.CssIdentifier != "undefined")
                $('#' + data.CssIdentifier).removeClass('pressimage--is-loading');
            if (typeof data.CartIdentifier != "undefined") {
                $('#CartItem' + data.CartIdentifier).removeClass('pressimage--is-loading');
                $('#CartItem' + data.CartIdentifier + ' .js-marker-press-cart-remove-from-cart').show();
            }
        };
        if (data.ResultCode === "Ok") {
            $('#CartItem' + data.CartIdentifier).animate({ 'width': '0px' }, 200, function () {
                SetPressCartItemCount(data.CartItemCount);
                $('#CartItem' + data.CartIdentifier).remove();
                if (data.RemovedItem !== '')
                    $('#' + data.RemovedItem).removeClass('pressimage--is-in-cart');
                CheckCartVisibility(false);
                excecuteAfter();
            });
        } else {
            excecuteAfter();
        }
    });
}

;
$(document).ready(function () {
    initFormDefaultButtonFunctionality();
    asyncLoader.registerInit(initFormDefaultButtonFunctionality);
});

function initFormDefaultButtonFunctionality() {
    $('.js-marker-form a.default-button').each(function (index, element) {
        var form = $(element).closest('.js-marker-form');
        $(form).find('input:text,input:radio,input:password').keypress(function (event) {
            if (event.which === 13) {
                event.preventDefault();
                var script = $(form).find('a.default-button').attr('onclick');
                if (script != null && script !== '')
                    eval(script);
                else
                    $(form).find('a.default-button').click();
            }
        });
    });
    $('.js-marker-form input.default-button, .js-marker-form button.default-button').each(function (index, element) {
        var form = $(element).closest('.js-marker-form');
        $(form).find('input:text,input:radio,input:password').keypress(function (event) {
            if (event.which === 13) {
                event.preventDefault();
                $(form).find('input.default-button, button.default-button').click();
            }
        });
    });
}
;
/* --- Search --- */

$(document).ready(function () {
    initSearch();
});

function initSearch() {
    $('.header__searchterm').keypress(function (event) {
        if (event.which === 13) {
            var searchtext = $(this).val();
            if (searchtext.length > 0) {
                var url = $(this).data('target');
                url = url + encodeURIComponent(searchtext);
                window.location.href = url;
            }
        }
    });

    $('header .search-form button').click(function (e) {
        e.preventDefault();
        var searchtext = $(this).closest('.search-form').find('input[name="searchterm"]').val();
        if (searchtext.length > 0) {
            var url = $(this).closest('.search-form').attr('data-target');
            url = url + encodeURIComponent(searchtext);
            window.location.href = url;
        }
    });
    if ($('.js-marker-search-form').length > 0) {
        var params = tryExtractSearchtermFromUrl(window.location.href);

        if (params != null) {
            $('.js-marker-search-form input[name=searchterm]').val(params.searchterm);
            startSearch(params);
        }
    }
    $('.js-marker-search-form .js-marker-search-form-send').click(function (e) {
        e.preventDefault();
        startSearch(
            { searchterm: $(this).closest('.js-marker-search-form').find('input[name=searchterm]').val() },
            $(this).closest('.js-marker-search-form')
            );
    });
}

function tryExtractSearchtermFromUrl(url) {
    var regex = new RegExp('\\?.*' + PARAMETERNAMES.SEARCHTERM + '=([^&]*)', 'i');
    var ma = url.match(regex);

    if (ma != null) {
        var result = {
            searchterm: decodeURIComponent(ma[1].replace(/\+/g, '%20')).trim()
        };

        if (result.searchterm === '')
            return null;

        // now we try to get the page

        regex = new RegExp('\\?.*' + PARAMETERNAMES.SEARCHPAGE + '=([^&]*)', 'i');
        ma = url.match(regex);

        if (ma != null) {
            result.page = decodeURIComponent(ma[1].replace(/\+/g, '%20'));
        }

        return result;
    }

    return null;
}

function tryExtractSearchItemFromUrl(url) {
    var regex = new RegExp('\\?.*Item=([^&]*)', 'i');
    var ma = url.match(regex);

    if (ma != null) {
        return { item: decodeURIComponent(ma[1].replace(/\+/g, '%20')) };
    }

    return null;
}

function startSearch(params, formReference) {

    if (typeof formReference != "object") {
        formReference = $('body'); // we'll select all
    }

    prepareSearchResultContainer(formReference);

    var url = CALLBACKURLBASE + "search-website.json";

    $.getJSON(url, params, function (data) {
        if (data.ResultCode === "Ok") {
            setSearchResultData(formReference, data.Html);
        } else {
            setSearchResultData(formReference, "");
        }
    });
}

function redirectToSearchResultItem(params, referenceItem) {
    var url = CALLBACKURLBASE + "get-search-result-target.json";

    $.getJSON(url, params, function (data) {
        if (data.ResultCode === "Ok") {
            window.location.href = data.Target;
        } else {
            // if we want to block the link release it here
        }
    });
}

function prepareSearchResultContainer(formReference) {
    $(formReference)
        .find('.js-marker-search-result-container')
        .addClass('show-loader');
}

function setSearchResultData(formReference, html) {

    $(formReference).find('.js-marker-search-result-container').each(function () {
        var height = $(this).find('.js-marker-search-result-content').outerHeight();
        $(this).css('height', height + 'px');
        $(this).find('.js-marker-search-result-content').html(html);

        $(this).find('a').click(function (e) {
            e.preventDefault();

            var target = $(this).attr('href');
            var params = tryExtractSearchtermFromUrl(target);

            if (params != null) {
                startSearch(params, $(this).closest('.js-marker-search-form'));
                return;
            }

            params = tryExtractSearchItemFromUrl(target);

            if (params != null) {
                redirectToSearchResultItem(params, $(this));
                return;
            }
        });

        height = $(this).find('.js-marker-search-result-content').outerHeight();
        $(this).animate({ height: height }, 400, function () {
            $(this).removeClass('show-loader');
        });
        $(this).css('height', 'auto');
    });
};
$(document).ready(function () {
    initTicketReservationForm();
});

function initTicketReservationForm() {
    $('.js-marker-ticket-reservation').each(function () {
        if (!$(this).data('isInitialized')) {
            var form = $(this);

            $(this).find('select[name=production]').change(function () {
                if ($(this).val() != '') {
                    ticketReservationFormShowStep2(form, $(this).val());
                } else
                    ticketReservationFormHideFromStep(form, 2);
            });

            var dates = new Array();

            $(this).find('select[name=date] option').each(function () {
                dates.push(new DropdownOption($(this).html(), $(this).attr('value')));
            });

            $(this).find('select[name=date]').data('dates', dates);

            $(this).find('select[name=date]').change(function () {
                if ($(this).val() != '') {
                    ticketReservationFormShowStep3(form, $(this).val());
                } else
                    ticketReservationFormHideFromStep(form, 3);
            });

            $(this).find('input[name=reducedTickets]').change(function () {
                if (!$(this).is(':checked')) {
                    $(form).find('.js-marker-ticket-reservation-reduced-ticket-count').slideUp(200);
                    $(form).find('.js-marker-ticket-reservation-reduced-ticket-reduction').slideUp(200);
                } else {
                    $(form).find('.js-marker-ticket-reservation-reduced-ticket-count').slideDown(200);
                    $(form).find('.js-marker-ticket-reservation-reduced-ticket-reduction').slideDown(200);
                }
            });

            $(this).find('.js-marker-ticket-reservation-send').click(function (e) {
                e.preventDefault();

                var params = {
                    "academictitle": $(form).find('input[name=academicTitle]').val(),
                    "firstname": $(form).find('input[name=firstname]').val(),
                    "lastname": $(form).find('input[name=lastname]').val(),
                    "address": $(form).find('textarea[name=address]').val(),
                    "phone": $(form).find('input[name=phone]').val(),
                    "fax": $(form).find('input[name=fax]').val(),
                    "email": $(form).find('input[name=eMail]').val(),
                    "remarks": $(form).find('textarea[name=remarks]').val(),
                    "formofaddress": $(form).find('select[name=formOfAddress] option').filter(function () { return $(this).is(':selected'); }).html(),
                    "date": $(form).find('select[name=date] option').filter(function () { return $(this).is(':selected'); }).html(),
                    "category": $(form).find('select[name=category] option').filter(function () { return $(this).is(':selected'); }).val(),
                    "ticketcount": $(form).find('input[name=ticketCount]').val(),
                    "reducedtickets": $(form).find('input[name=reducedTickets]').filter(function () { return $(this).is(':checked'); }).val(),
                    "reducedticketcount": $(form).find('input[name=reducedTicketCount]').val(),
                    "reduction": $(form).find('select[name=reduction] option').filter(function () { return $(this).is(':selected'); }).html(),
                    "production": $(form).find('select[name=production] option').filter(function () { return $(this).is(':selected'); }).html(),
                    "productionId": $(form).find('select[name=production] option').filter(function () { return $(this).is(':selected'); }).val()
                };

                var selectedDate = $(form).find('select[name=date] option').filter(function () { return $(this).is(':selected'); }).val();

                var idx = selectedDate.indexOf('-');
                if (idx > 0 && idx < selectedDate.length - 1) {
                    params["performanceId"] = selectedDate.substring(idx + 1);
                }

                $(form).find('.form__item').removeClass('--error');

                $(form).find('.js-marker-ticket-reservation-error').hide();
                $(form).find('.js-marker-ticket-reservation-send').hide();

                var url = CALLBACKURLBASE + "reserve-tickets.json";
                $.getJSON(url, params, function (data) {
                    if (data.ResultCode == "Ok") {
                        $(form).find('.js-marker-ticket-reservation-feedbacktext').html(data.FeedbackMessage);
                        $(form).find('.js-marker-ticket-reservation-feedback').show();
                        $(form).find('.js-marker-ticket-reservation-feedback').focus();
                    } else {
                        $(form).find('.js-marker-ticket-reservation-errortext').html(data.HtmlEncodedErrors);
                        $(form).find('.js-marker-ticket-reservation-error').show();
                        $(form).find('.js-marker-ticket-reservation-error').focus();
                        $(form).find('.js-marker-ticket-reservation-send').show();
                        if ($.isArray(data.ErrorFields)) {
                            for (var i = 0; i < data.ErrorFields.length; i++) {
                                $(form).find("[name='" + data.ErrorFields[i] + "']").closest('.form__item').addClass('--error');

                            }
                        }
                    }
                }).fail(function (error) {
                    if (typeof error.responseJSON != 'object' || typeof error.responseJSON.HtmlEncodedErrors != 'string')
                        return;

                    $(form).find('.js-marker-ticket-reservation-errortext').html(error.responseJSON.HtmlEncodedErrors);
                    $(form).find('.js-marker-ticket-reservation-error').show();
                    $(form).find('.js-marker-ticket-reservation-error').focus();
                    $(form).find('.js-marker-ticket-reservation-send').show();
                });

            });

            $(this).data('isInitialized', true);
        }
    });
}

function DropdownOption(name, value) {
    this.Name = name;
    this.Value = value;
}

function ticketReservationFormHideFromStep(form, step) {
    if (step <= 2) $(form).find('.step-2').slideUp(200);
    if (step <= 3) $(form).find('.step-3').slideUp(200);
    if (step <= 4) $(form).find('.step-4').slideUp(200);
}

function ticketReservationFormShowStep2(form, selectedProduction) {
    var identifier = selectedProduction + '-';
    var field = $(form).find('select[name=date]');
    var dates = $(field).data('dates');
    var selectedValue = '';

    if ($(form).find('select[name=date] option:selected').length > 0)
        selectedValue = $(form).find('select[name=date] option:selected').attr('value');

    var anyIsSelected = false;

    $(form).find('select[name=date] option').remove();

    var optionsHtml = '';
    for (var i = 0; i < dates.length; i++) {
        if (dates[i].Value == '' || dates[i].Value.substring(0, identifier.length) === identifier) {
            optionsHtml = optionsHtml + '<option value="' + dates[i].Value;
            if (selectedValue == dates[i].Value) {
                optionsHtml = optionsHtml + '" selected="selected';
                anyIsSelected = true;
            }
            optionsHtml = optionsHtml + '">' + dates[i].Name + '</option>';
        }
    }
    $(field).html(optionsHtml);

    if (!anyIsSelected) {
        $(form).find('select[name=date] option').eq(0).prop('selected', true);
    }

    var selectedDate = $(form).find('select[name=date]').val();

    $(form).find('.step-2').slideDown(200);

    if (selectedDate != '') {
        ticketReservationFormShowStep3(form, selectedDate);
    } else {
        ticketReservationFormHideFromStep(form, 3);
    }
}

function ticketReservationFormShowStep3(form, selectedDate) {
    var categorySelection = $(form).find('select[name=category]');

    if ($(categorySelection).data('selectedDate') != selectedDate) {
        $(categorySelection).closest('.form__inputgroup').slideUp(200);
        $(categorySelection).find('option').filter(function () { return $(this).val() != ''; }).remove();

        var idx = selectedDate.indexOf('-');
        if (idx > 0 && idx < selectedDate.length - 1) {
            var params = {
                "productionId": selectedDate.substring(0, idx),
                "performanceId": selectedDate.substring(idx + 1)
            };
            var url = CALLBACKURLBASE + "get-price-categories.json";
            $.getJSON(url, params, function (data) {
                if (data.ResultCode == "Ok" && typeof data.PriceCategories == "object" && data.PriceCategories.length > 0) {
                    var optionsHtml = $(categorySelection).html();
                    for (var i = 0; i < data.PriceCategories.length; i++) {
                        optionsHtml = optionsHtml + '<option value="' + data.PriceCategories[i] + '">' + data.PriceCategories[i] + '</option>';
                    }
                    $(categorySelection).html(optionsHtml);
                    $(categorySelection).data('selectedDate', selectedDate);
                    $(categorySelection).closest('.form__inputgroup').slideDown(200);
                }
            });
        }
    }

    $(form).find('.step-3').slideDown(200);
    $(form).find('.step-4').slideDown(200);
}
;
$(document).ready(function () {
    initNewsletterRegistration();
    asyncLoader.registerInit(initNewsletterRegistration);
});

function initNewsletterRegistration() {
    $('.js-marker-newsletter-registration-form').each(function () {
        if (!$(this).data('isInitialized')) {

            $(this).find('.js-marker-newsletter-registration-form-send').click(function (e) {
                e.preventDefault();
                var form = $(this).closest('.js-marker-newsletter-registration-form');

                var identifier = $(form).attr('id');
                var account = $(form).data('account');
                var distributionListToken = $(form).data('distribution-lists');
                var academicTitle = $(form).find('input[name="academicTitle"]').val();
                var firstname = $(form).find('input[name="firstname"]').val();
                var lastname = $(form).find('input[name="lastname"]').val();
                var eMail = $(form).find('input[name="eMail"]').val();
                var formOfAddress = $(form).find('select[name="formOfAddress"]').val();

                $(form).find('input:radio.formOfAddress').each(function () {
                    if ($(this).is(':checked')) {
                        formOfAddress = $(this).val();
                    }
                });

                var selectedDistributionLists = '';
                $(form).find('.js-marker-newsletter-registration-form-distributionlists input:checkbox').each(function () {
                    if ($(this).is(':checked')) {
                        if (selectedDistributionLists != '')
                            selectedDistributionLists = selectedDistributionLists + ',';
                        selectedDistributionLists = selectedDistributionLists + $(this).attr('name');
                    }
                });

                var dataPrivacyConsent = '';
                $(form).find('.js-marker-newsletter-registration-form-privacy input:checkbox').each(function () {
                    if ($(this).is(':checked')) {
                        dataPrivacyConsent = $(this).val();
                    }
                });

                var params = {
                    "identifier": identifier,
                    "account": account,
                    "distributionlisttoken": distributionListToken,
                    "academictitle": academicTitle,
                    "firstname": firstname,
                    "lastname": lastname,
                    "email": eMail,
                    "formofaddress": formOfAddress,
                    "selecteddistributionlists": selectedDistributionLists,
                    "dataPrivacyConsent": dataPrivacyConsent
                };

                $(form).find('.js-marker-newsletter-registration-form-error').hide();
                $(form).find('.js-marker-newsletter-registration-form-send').hide();
                $(form).find('.form__item').removeClass('form__item--error');

                var url = CALLBACKURLBASE + "newsletter-registration.json";
                $.getJSON(url, params, function (data) {
                    if (data.ResultCode === "Ok") {
                        $(form).find('.js-marker-newsletter-registration-form-feedbacktext').html(data.FeedbackMessage);
                        $(form).find('.js-marker-newsletter-registration-form-feedback').show();
                    } else {
                        $(form).find('.js-marker-newsletter-registration-form-errortext').html(data.HtmlEncodedErrors);
                        $(form).find('.js-marker-newsletter-registration-form-error').show();
                        $(form).find('.js-marker-newsletter-registration-form-send').show();

                        if ($.isArray(data.ErrorFields)) {
                            for (var i = 0; i < data.ErrorFields.length; i++) {
                                $(form).find('[name=' + data.ErrorFields[i] + ']').closest('.form__item').addClass('form__item--error');
                            }
                        }
                    }
                }).fail(function (error) {
                    if (typeof error.responseJSON != 'object' || typeof error.responseJSON.HtmlEncodedErrors != 'string')
                        return;

                    $(form).find('.js-marker-newsletter-registration-form-errortext').html(error.responseJSON.HtmlEncodedErrors);
                    $(form).find('.js-marker-newsletter-registration-form-error').show();
                    $(form).find('.js-marker-newsletter-registration-form-send').show();
                });
            });

            $(this).data('isInitialized', true);
        }
    });
};
$(document).ready(function () {
    initAnrechteForm();
});

function initAnrechteForm() {
    $('.js-marker-anrechte-form').each(function () {
        if (!$(this).data('isInitialized')) {

            var form = $(this);



            // =======
            // ANRECHT
            // =======

            $(this).find('select[name=anrecht]').change(function () {
                $('.js-marker-anrechte-info').hide();

                if ($(this).val() != '') {
                    anrechteFormShowStep2(form, $(this).val());
                } else {
                    anrechteFormHideFromStep(form, 2);
                }
            });



            // ===
            // ABO
            // ===

            var abos = new Array();

            $(this).find('select[name=abo] option').each(function () {
                abos.push(new DropdownOption($(this).html(), $(this).attr('value')));
            });

            $(this).find('select[name=abo]').data('abos', abos);

            $(this).find('select[name=abo]').change(function () {
                $('.js-marker-anrechte-info').hide();
                if ($(this).val() != '') {
                    anrechteFormShowStep3(form, $(this).val());
                } else
                    anrechteFormHideFromStep(form, 3);
            });



            // =======
            // CATEGORY
            // =======

            var priceCategories = new Array();

            $(this).find('select[name=category] option').each(function () {
                priceCategories.push(new DropdownOption($(this).html(), $(this).attr('value')));
            });

            $(this).find('select[name=category]').data('priceCategories', priceCategories);

            $(this).find('.js-marker-anrechte-form-send').click(function (e) {
                e.preventDefault();

                var params = {
                    "academictitle": $(form).find('input[name=academicTitle]').val(),
                    "firstname": $(form).find('input[name=firstname]').val(),
                    "lastname": $(form).find('input[name=lastname]').val(),
                    "customernumber": $(form).find('input[name=customerNumber]').val(),
                    "street": $(form).find('input[name=street]').val(),
                    "zip": $(form).find('input[name=zip]').val(),
                    "city": $(form).find('input[name=city]').val(),
                    "phone": $(form).find('input[name=phone]').val(),
                    "fax": $(form).find('input[name=fax]').val(),
                    "email": $(form).find('input[name=eMail]').val(),
                    "remarks": $(form).find('textarea[name=remarks]').val(),
                    "formofaddress": $(form).find('select[name=formOfAddress] option').filter(function () { return $(this).is(':selected'); }).html(),
                    "abo": $(form).find('select[name=abo] option').filter(function () { return $(this).is(':selected'); }).html(),
                    "category": $(form).find('select[name=category] option').filter(function () { return $(this).is(':selected'); }).html(),
                    "ticketcount": $(form).find('input[name=ticketCount]').val(),
                    "anrecht": $(form).find('select[name=anrecht] option').filter(function () { return $(this).is(':selected'); }).html(),
                    "anrechtId": $(form).find('select[name=anrecht] option').filter(function () { return $(this).is(':selected'); }).val()
                };

                //var selectedDate = $(form).find('select[name=date] option').filter(function () { return $(this).is(':selected'); }).val();

                //var idx = selectedDate.indexOf('-');
                //if (idx > 0 && idx < selectedDate.length - 1) {
                //    params["performanceId"] = selectedDate.substring(idx + 1);
                //}

                $(form).find('.form__item').removeClass('form__item--error');

                $(form).find('.js-marker-anrechte-form-error').hide();
                $(form).find('.js-marker-anrechte-form-send').hide();

                var url = CALLBACKURLBASE + "reserve-anrecht.json";
                $.getJSON(url, params, function (data) {
                    if (data.ResultCode == "Ok") {
                        $(form).find('.js-marker-anrechte-form-feedbacktext').html(data.FeedbackMessage);
                        $(form).find('.js-marker-anrechte-form-feedback').show();
                        $(form).find('.js-marker-anrechte-form-feedback').focus();
                    } else {
                        $(form).find('.js-marker-anrechte-form-errortext').html(data.HtmlEncodedErrors);
                        $(form).find('.js-marker-anrechte-form-error').show();
                        $(form).find('.js-marker-anrechte-form-error').focus();
                        $(form).find('.js-marker-anrechte-form-send').show();
                        if ($.isArray(data.ErrorFields)) {
                            for (var i = 0; i < data.ErrorFields.length; i++) {
                                $(form).find("[name='" + data.ErrorFields[i] + "']").closest('.form__item').addClass('form__item--error');

                            }
                        }
                    }
                }).fail(function (error) {
                    if (typeof error.responseJSON != 'object' || typeof error.responseJSON.HtmlEncodedErrors != 'string')
                        return;

                    $(form).find('.js-marker-anrechte-form-errortext').html(error.responseJSON.HtmlEncodedErrors);
                    $(form).find('.js-marker-anrechte-form-error').show();
                    $(form).find('.js-marker-anrechte-form-error').focus();
                    $(form).find('.js-marker-anrechte-form-send').show();
                });

            });

            $(this).data('isInitialized', true);
        }
    });
}

function DropdownOption(name, value) {
    this.Name = name;
    this.Value = value;
}

function anrechteFormHideFromStep(form, step) {
    if (step <= 2) $(form).find('.step-2').slideUp(200);
    if (step <= 3) $(form).find('.step-3').slideUp(200);
    if (step <= 4) $(form).find('.step-4').slideUp(200);
}

function anrechteFormShowStep2(form, selectedAnrecht) {
    var identifier = selectedAnrecht + '-';
    var $fieldAbo = $(form).find('select[name=abo]');
    var abos = $fieldAbo.data('abos');
    var selectedValue = '';

    if ($fieldAbo.find('option:selected').length > 0)
        selectedValue = $fieldAbo.find('option:selected').attr('value');

    var anyIsSelected = false;

    $fieldAbo.find('option').remove();

    var optionsHtml = '';
    for (var i = 0; i < abos.length; i++) {
        if (abos[i].Value == '' || abos[i].Value.substring(0, identifier.length) === identifier) {
            optionsHtml = optionsHtml + '<option value="' + abos[i].Value;
            if (selectedValue == abos[i].Value) {
                optionsHtml = optionsHtml + '" selected="selected';
                anyIsSelected = true;
            }
            optionsHtml = optionsHtml + '">' + abos[i].Name + '</option>';
        }
    }
    $fieldAbo.html(optionsHtml);

    if (!anyIsSelected) {
        $fieldAbo.find('option').eq(0).prop('selected', true);
    }

    var selectedAbo = $fieldAbo.val();

    $(form).find('.step-2').slideDown(200);

    if (selectedAbo != '') {
        anrechteFormShowStep3(form, selectedAbo);
    } else {
        anrechteFormHideFromStep(form, 3);
    }
}

function anrechteFormShowStep3(form, selectedAbo) {
    var identifier = selectedAbo + '-';
    var $categorySelection = $(form).find('select[name=category]');
    var priceCategoriesData = $categorySelection.data('priceCategories');

    $('.js-marker-anrechte-info.anrecht-' + selectedAbo).show();

    var priceCategoriesHTML = '';
    var selectedCategoriesCount = 0;

    // sorry fuer die Doppelung, BUE mit Brechstange am Werk, keine Zeit fuer schoenen Kram.
    // autoselect if only 1
    var i;
    for (i = 0; i < priceCategoriesData.length; i++) {
        if (priceCategoriesData[i].Value == '' || priceCategoriesData[i].Value.substring(0, identifier.length) === identifier) {
            priceCategoriesHTML += '<option value="' + priceCategoriesData[i].Value + '">' + priceCategoriesData[i].Name + '</option>';
            selectedCategoriesCount++;
        }
    }

    if (selectedCategoriesCount <= 2) { // nur 'bitte waehlen' und ein natürlicher Eintrag
        for (i = 0; i < priceCategoriesData.length; i++) {
            if (priceCategoriesData[i].Value.substring(0, identifier.length) === identifier) {
                priceCategoriesHTML = '<option value="' + priceCategoriesData[i].Value + '">' + priceCategoriesData[i].Name + '</option>';
            }
        }
    }

    $categorySelection.html(priceCategoriesHTML);

    $(form).find('.step-3').slideDown(200);
}
;
$(document).ready(function () {

    $('.js-marker-user-login-form .js-marker-user-login-form-send').click(function (e) {
        e.preventDefault();

        var form = $(this).closest('.js-marker-user-login-form');
        var url = CALLBACKURLBASE + "login.json";
        var username = $(form).find('input[name=username]').val();
        var password = $(form).find('input[name=password]').val();
        var formIdentifier = $(form).data('identifier');

        $(form).find('.js-marker-user-login-form-error').hide();

        $.getJSON(url, { "username": username, "password": password }, function (data) {
            if (data.ResultCode === "Ok") {
                var targetUrl = location.href;
                if (targetUrl.indexOf('?') > 0)
                    targetUrl = targetUrl + '&scrollTo=' + formIdentifier;
                else
                    targetUrl = targetUrl + '?scrollTo=' + formIdentifier;
                location.href = targetUrl;
            } else {
                $(form).find('.js-marker-user-login-form-errortext').html(data.HtmlEncodedErrors);
                $(form).find('.js-marker-user-login-form-error').show();
                $(form).find('.js-marker-user-login-form-error').focus();
            }
        });

    });

    $('.js-marker-user-logout-button').click(function (e) {
        e.preventDefault();
        var url = CALLBACKURLBASE + "logout.json";

        $.getJSON(url, {}, function (data) {
            if (data.ResultCode === "Ok") {
                location.reload();
            }
        });
    });

});;
$(document).ready(function () {
    initSchoolReservationForm();
});

var __schoolReservationFormIdentifier = 0;

function initSchoolReservationForm() {

    $('.js-marker-school-reservation').each(function () {
        if ($(this).data('isInitialized'))
            return;

        var $form = $(this);
        var id = $form.attr('id');

        $form.find('.js-marker-school-reservation-dropdown').change(function () {
            var $select = $(this);
            var selectedValue = $select.val();
            if (selectedValue === '')
                return;

            __schoolReservationFormIdentifier++;
            var myId = id + '-production-' + __schoolReservationFormIdentifier;
            var $template = $form.find('.js-marker-school-reservation-production-template');
            var $html = $('<div class="js-marker-school-reservation-selected-production" id="' + myId + '">' + $template.html() + '</div>');
            $html.insertBefore($template);
            $html.find('select').val(selectedValue);
            $html.find('select').attr('id', 'form-' + myId);
            $html.find('label').attr('for', 'form-' + myId);
            updateSchoolReservationFormSelectedProductions($form);
            $select.val('');
        });

        $form.on('click', '.js-marker-school-reservation-remove-production-button', function (e) {
            e.preventDefault();
            $(this).closest('.js-marker-school-reservation-selected-production').remove();
            updateSchoolReservationFormSelectedProductions($form);
        });

        $form.find('.js-marker-form-send').click(function (e) {
            e.preventDefault();

            var form = {
                "schoolName": $form.find('input[name=schoolName]').val(),
                "schoolYear": $form.find('input[name=schoolYear]').val(),
                "contactName": $form.find('input[name=contactName]').val(),
                "email": $form.find('input[name=email]').val(),
                "phone": $form.find('input[name=phone]').val(),
                "remarks": $form.find('textarea[name=remarks]').val()
            };

            if ($form.find('input[name=newsletter]').is(':checked')) {
                var text = $form.find('input[name=newsletter]').closest('.form__inputwrapper').find('label').text();
                form.newsletter = text;
            }

            form.options = new Array();

            $form.find('input[name=option]:checked').each(function () {
                var text = $(this).closest('.form__inputwrapper').find('label').text();
                form.options.push(text);
            });

            form.productions = new Array();

            $form.find('.js-marker-school-reservation-selected-production').each(function () {
                var production = {
                    "identifier": $(this).attr('id'),
                    "name": $(this).find('select[name=production]').val(),
                    "count": $(this).find('input[name=participantCount]').val(),
                    "date": $(this).find('input[name=dateInfo]').val(),
                };
                form.productions.push(production);
            });

            $form.find('.form__item').removeClass('form__item--error');

            $form.find('.js-marker-form-error').hide();
            $form.find('.js-marker-form-send').hide();

            var params = {
                "recipients": $form.data('recipients'),
                "form": JSON.stringify(form)
            };

            var url = CALLBACKURLBASE + "save-school-reservation-form.json";
            $.post(url, params, function (data) {
                if (data.ResultCode === "Ok") {
                    $form.find('.js-marker-form-feedbacktext').html(data.FeedbackMessage);
                    $form.find('.js-marker-form-feedback').show();
                    $form.find('.js-marker-form-feedback').focus();
                } else {
                    $form.find('.js-marker-form-errortext').html(data.HtmlEncodedErrors);
                    $form.find('.js-marker-form-error').show();
                    $form.find('.js-marker-form-error').focus();
                    $form.find('.js-marker-form-send').show();
                    if ($.isArray(data.ErrorFields)) {
                        for (var i = 0; i < data.ErrorFields.length; i++) {
                            var selector = "[name='" + data.ErrorFields[i] + "']";
                            var idx = data.ErrorFields[i].indexOf(':');

                            if (idx > 0) {
                                selector = '#' + data.ErrorFields[i].substring(0, idx) + " [name='" + data.ErrorFields[i].substring(idx + 1) + "']";
                            }

                            $form.find(selector).closest('.form__item').addClass('form__item--error');
                        }
                    }
                }
            }).fail(function (error) {
                if (typeof error.responseJSON != 'object' || typeof error.responseJSON.HtmlEncodedErrors != 'string')
                    return;

                $form.find('.js-marker-form-errortext').html(error.responseJSON.HtmlEncodedErrors);
                $form.find('.js-marker-form-error').show();
                $form.find('.js-marker-form-error').focus();
                $form.find('.js-marker-form-send').show();
            });
        });

        $(this).data('isInitialized', true);
    });
}

function updateSchoolReservationFormSelectedProductions($form) {
    var counter = 1;
    $form.find('.js-marker-school-reservation-selected-production').each(function() {
        $(this).find('label[data-label-template]').each(function() {
            var text = counter + $(this).data('label-template');
            $(this).html(text);
        });
        counter ++;
    });
}
;
$(document).ready(function () {
    medialoader.init();
});

/* Optionen:

- Markierung mit "js-medialoader", Bild aus "data-image-url"
- Optionale Parameter:
  + "data-js-code": funktion oder js code der nach dem Laden ausgeführt wird. Im Fall einer Funktion wird eine jQuery Referenz auf das aktuelle Element übergeben.
  + "data-disable-image-correction": true/false; Default: false; Wird eine Bild erkannt, dass in unterschiedlichen Größen verfügbar ist, so wird dieses je nach Ort adaptiv ausgeliefert
  + "data-force-image-correction": true/false; Default: false; Die Ausspielung des Bilders in unterschiedlicher Qualität erfolgt auch wenn keine Qualitätsstufe erkannt wird.
  + "data-medialoader-trigger": alle Items warten bis der Tigger aufgerufen wird
  + "data-size-calculation-func": Referenz einer Funktion zum Abruf der Größe des Elements sofern eine Berechnung im DOM nicht möglich ist (z.B. bei display:none). Die Funktion wird mit der Referenz auf das aktuelle Objekt aufgerufen und erwartet ein Objekt mit den Parametern w und h. z.B. function myCalcFunc(element) { return {"w": 100, "h": 100 }; }
- Verhalten
  + Die Markierung kann auf einen Container oder auf das Element selbst gesetzt werden.
  + Ist die Markierung auf einem Container so wird:
    o Jedes Bild ersetzt
    o Oder wenn mind. ein Elment mit "js-medialoader-image" markiert ist nur diese(s) Elemente
  + Das Bild kann auf zwei Varianten gesetzt werden:
    o bei IMG Tags auf das src Attribut
    o bei IMG und allen weiteren Elementen mit markierung "js-medialoader-set-as-background" als Hintergund-Bild
  + Während des Ladens gilt:
    o das markierte Element erhält "medialoader--loading"
    o sobald das Bild gesetzt wurde erhält das markierte Element erhält "medialoader--loaded"
    o ist ein Bild einaml geladen und muss dies ggf. wegen Qualitätsänderung neu geladen werden, so wird die Animation nicht erneut angezeigt
- Debugging:
  + Generell:
    o disable: Das Laden wird unterdrückt
    o debug: Debug und Logging Nachrichten werden ausgegeben
  + je Element:
    o "data-disable-medialoader": true/false; Default: false; für dieses Element wird nicht nachgeladen
- Aufruf:
  + init: Allgemeine Initialisierung; hier können noch einmal Settings übegeben werden.
  + triggerLoadContentImages: Abruf aller Bilder je nach Position

*/

(function () {
    if (typeof window.medialoader == "undefined") {
        window.medialoader = new function () {
            var _instance = this;

            _instance._defaultSettings = {
                debug: false,
                disable: false,
                debounceInterval: 50,
                interfaceMarkerClassnames: {
                    main: 'js-medialoader',
                    asBackground: 'js-medialoader-set-as-background',
                    image: 'js-medialoader-image'
                },
                interfaceAttributeNames: {
                    imageUrl: 'image-url',
                    jsCode: 'js-code',
                    triggerName: 'medialoader-trigger',
                    disableImageCorrection: 'disable-image-correction',
                    forceImageCorrection: 'force-image-correction',
                    disableMedialoader: 'disable-medialoader',
                    sizeCalculationFunc: 'size-calculation-func'
                },
                uiMarkerClassnames: {
                    loading: 'medialoader--loading',
                    loaded: 'medialoader--loaded'
                }
            };
            _instance._settings = $.extend({}, _instance._defaultSettings);

            _instance._isInititalized = false;
            _instance._elements = new Array();

            // public functions

            _instance.init = function (userSettings) {
                if (typeof userSettings == "object")
                    _instance._settings = $.extend({}, _instance._defaultSettings, userSettings);

                _instance._log('fully initialized');
                _instance._isInititalized = true;

                _instance.triggerLoadContentImages();
                $(window).resize(_instance._debounce(_instance._onResize));
                $(window).scroll(_instance._debounce(_instance._onScroll));

                if (typeof asyncLoader != "undefined")
                    asyncLoader.registerInit(_instance.triggerLoadContentImages);
            };

            _instance.triggerLoadContentImages = function (trigger) {
                var handler = function () {
                    _instance._updateElementDocumentInfos(); // do that first, so existing elemnts won't be updated twice
                    _instance._searchForElementsInDOM();
                    _instance._checkVisibilityAndLoad();
                    if (typeof trigger == "string" && trigger.trim() !== '')
                        _instance._loadByTrigger(trigger.trim());
                };
                _instance._executeAsyncIfInitialized(handler);
            };

            // private functions

            _instance._log = function (content, force) {
                if (_instance._settings.debug || force === true) {
                    if (typeof content != "string") {
                        console.log('Medialoader:');
                        console.log(content);
                    } else {
                        console.log('Medialoader: ' + content);
                    }
                }
            };

            _instance._debounce = function debouncer(func, timeout) {
                var timeoutId, timeout = timeout || _instance._settings.debounceInterval;
                return function () {
                    var scope = this, args = arguments;
                    clearTimeout(timeoutId);
                    timeoutId = setTimeout(function () { func.apply(scope, Array.prototype.slice.call(args)); }, timeout);
                }
            };

            _instance._onResize = function () {
                _instance._updateElementDocumentInfos();
                _instance._checkVisibilityAndLoad();
            };

            _instance._onScroll = function () {
                _instance._updateElementDocumentInfos();
                _instance._checkVisibilityAndLoad();
            };

            _instance._executeAsyncIfInitialized = function (handler) {
                if (!_instance._isInititalized) {
                    _instance._log('Medialoader has not been initialized! Initialize prior to access!');
                    return;
                }
                setTimeout(handler, 0);
            };

            _instance._searchForElementsInDOM = function () {
                var counter = 0;

                $('.' + _instance._settings.interfaceMarkerClassnames.main).each(function () {
                    if ($(this).data('mediaLoaderIsInitialized'))
                        return;

                    $(this).addClass(_instance._settings.uiMarkerClassnames.loading);

                    var trigger = $(this).data(_instance._settings.interfaceAttributeNames.triggerName);
                    if (typeof trigger != "string" || trigger.trim() === '') trigger = undefined;
                    if (typeof trigger == "string") trigger = trigger.trim();

                    var sizeCalculationFunc = undefined;
                    var sizeCalculationFuncName = $(this).data(_instance._settings.interfaceAttributeNames.sizeCalculationFunc);
                    if (typeof sizeCalculationFuncName == "string" && sizeCalculationFuncName.trim() !== '' && typeof window[sizeCalculationFuncName.trim()] == "function")
                        sizeCalculationFunc = window[sizeCalculationFuncName.trim()];

                    var element = {
                        instance: this,
                        loadingInProgress: false,
                        loaded: false,
                        loadedQuality: 0,
                        recommendedQuality: 0,
                        waitForTrigger: trigger,
                        documentInfos: _instance._getElementDocumentInfos(this),
                        targetElements: _instance._getTargetElements(this),
                        sizeCalculationFunc: sizeCalculationFunc
                    };

                    _instance._calculateRecommendedQuality(element);

                    //console.log(element);

                    _instance._elements.push(element);
                    counter++;
                    $(this).data('mediaLoaderIsInitialized', true);
                });

                _instance._log(counter + ' elements added');
            };

            _instance._updateElementDocumentInfos = function () {
                //console.log(' ---- ');
                for (var i = 0; i < _instance._elements.length; i++) {
                    var element = _instance._elements[i];
                    element.documentInfos = _instance._getElementDocumentInfos(element.instance);
                    _instance._calculateRecommendedQuality(element);
                }
            }

            _instance._getElementDocumentInfos = function (element) {
                if (typeof jQuery === "function" && element instanceof jQuery) {
                    element = element[0];
                }

                var viewportHeight = $(window).height();
                var viewportWidth = $(window).width();

                var rect = element.getBoundingClientRect();
                //console.log(rect);
                var inViewport = ((rect.top >= 0 && rect.top <= viewportHeight) || (rect.bottom >= 0 && rect.bottom <= viewportHeight)) &&
                        ((rect.left >= 0 && rect.left <= viewportWidth) || (rect.right >= 0 && rect.right <= viewportWidth));

                var distance = {
                    vertical: 0,
                    horizontal: 0
                }

                if (!inViewport) {
                    if (rect.bottom < 0) distance.vertical = (-rect.bottom) / viewportHeight;
                    if (rect.top > viewportHeight) distance.vertical = (rect.top - viewportHeight) / viewportHeight;
                    if (rect.right < 0) distance.horizontal = (-rect.right) / viewportWidth;
                    if (rect.left > viewportWidth) distance.horizontal = (rect.left - viewportWidth) / viewportWidth;
                }

                var result = {
                    inViewport: inViewport,
                    distance: distance,
                    visible: $(element).is(':visible')
                };
                //console.log(result);
                return result;
            };

            _instance._getTargetElements = function (container) {
                var elements = new Array();

                var getElement = function (ref) {
                    return {
                        instance: $(ref),
                        asBackground: $(ref).hasClass(_instance._settings.interfaceMarkerClassnames.asBackground)
                    };
                };

                if ($(container).prop("tagName").toUpperCase() === 'IMG') {
                    elements.push(getElement(container));
                } else if ($(container).find('.' + _instance._settings.interfaceMarkerClassnames.image).length > 0) {
                    $(container).find('.' + _instance._settings.interfaceMarkerClassnames.image).each(function () {
                        elements.push(getElement(this));
                    });
                } else if ($(container).find('img').length > 0) {
                    $(container).find('img').each(function () {
                        elements.push(getElement(this));
                    });
                }

                $(container).find('.' + _instance._settings.interfaceMarkerClassnames.asBackground).each(function () {
                    elements.push(getElement(this));
                });

                if ($(container).hasClass(_instance._settings.interfaceMarkerClassnames.asBackground)) {
                    elements.push(getElement(container));
                }

                return elements;
            }

            /* Quality:
               - 1: 640x360
               - 2: 1280x720
               - 3: 1920x1080
               - 4: 2880x1620
            */

            _instance._calculateRecommendedQuality = function (element) {
                var width = 0;
                var height = 0;
                var anyBackgroundCover = false;

                for (var i = 0; i < element.targetElements.length; i++) {
                    var item = element.targetElements[i];

                    var w = $(item.instance).outerWidth();
                    var h = $(item.instance).outerHeight();

                    if (typeof element.sizeCalculationFunc == "function") {
                        try {
                            var size = element.sizeCalculationFunc(item.instance);
                            if (typeof size == "object" && size != null && typeof size.w == "number" && typeof size.h == "number") {
                                if (size.w > 0) w = size.w;
                                if (size.h > 0) h = size.h;
                            } else {
                                _instance._log("The size calculation function did not return an objeckt of type { w: 100, h:100 } as expected.", true);
                            }
                        } catch (ex) {
                            _instance._log("Executing the size calculation function threw an exception! - Message: " + ex, true);
                        }
                    }

                    if (w > width) width = w;
                    if (h > height) height = h;

                    var s = $(item.instance).css('background-size');
                    if (typeof s == "string" && s !== '' && s.toLowerCase() === 'cover')
                        anyBackgroundCover = true;
                }

                var quality = 1;

                if (width <= 640 && (height === 0 || height <= 360)) quality = 1;
                else if (width <= 1280 && (height === 0 || height <= 720)) quality = 2;
                else if (width <= 1920 && (height === 0 || height <= 1080)) quality = 3;
                else if (width >= 1920 && (height === 0 || height >= 1080)) quality = 4;

                if (anyBackgroundCover && quality < 4)
                    quality++;

                if (quality > element.recommendedQuality)
                    element.recommendedQuality = quality;
            };

            _instance._tryAddQualityToUri = function (quality, uri, forceImageCorrection) {
                if (typeof uri != "string" || uri === '')
                    return undefined;

                var urlBase = "";
                var splittedUrl = uri.split('/');
                var parts = new Array();

                for (var i = 0; i < splittedUrl.length; i++) {
                    if (splittedUrl[i] != null && splittedUrl[i] !== '')
                        parts.push(splittedUrl[i]);
                }

                if (parts.length > 1 && (parts[0].toLowerCase() === 'http:' || parts[0].toLowerCase() === 'https:')) {
                    urlBase = parts[0] + '//' + parts[1];
                    parts.shift();
                    parts.shift();
                }

                while (parts.length > 0) {
                    if (parts[0] === 'content-images' || parts[0] === 'images')
                        break;

                    urlBase = urlBase + '/' + parts[0];
                    parts.shift();
                }

                var targetSize;

                switch (quality) {
                    case 1:
                        targetSize = '360';
                        break;
                    case 3:
                        targetSize = '1080';
                        break;
                    case 4:
                        targetSize = '1620';
                        break;
                    default:
                        targetSize = '720';
                }

                if (parts.length >= 4 && parts[0] === 'content-images') {
                    // we have a specific format
                    var formatIdx = 1;
                    var format = parts[formatIdx];
                    parts[0] = 'content-images';
                    parts[formatIdx] = 'size' + targetSize + '/' + format;
                } else if (parts.length >= 3 && parts[0] === 'images') {
                    // we are in the regular cms content
                    parts[0] = 'content-images';
                    var copiedParts = parts;
                    parts = new Array();
                    for (var j = 0; j < copiedParts.length; j++) {
                        if (j === 1)
                            parts.push('image' + targetSize);
                        parts.push(copiedParts[j]);
                    }
                } else {
                    return undefined;
                }

                var result = urlBase;
                for (var k = 0; k < parts.length; k++) {
                    result = result + '/' + parts[k];
                }

                _instance._log('Uri changed - ' + uri + ' => ' + result);
                return result;
            };

            _instance._checkVisibilityAndLoad = function () {
                // 1) load everything we see

                var loadElement = function (element) {
                    return element.documentInfos.inViewport && element.documentInfos.visible && typeof element.waitForTrigger == "undefined";
                }

                var count = _instance._doCheckAndLoad(loadElement);

                if (count > 0) {
                    setTimeout(_instance._checkVisibilityAndLoad, 200);
                    return;
                }

                // 2) everything that is a bit up or down and visible

                loadElement = function (element) {
                    return element.documentInfos.visible && element.documentInfos.distance.vertical <= 1 && typeof element.waitForTrigger == "undefined";
                }

                count = _instance._doCheckAndLoad(loadElement);

                if (count > 0) {
                    setTimeout(_instance._checkVisibilityAndLoad, 200);
                    return;
                }

                // 3) everything that we don't see, is a bit up or down or a bit left & right

                loadElement = function (element) {
                    return element.documentInfos.distance.vertical <= 1 && element.documentInfos.distance.horizontal <= 1 && typeof element.waitForTrigger == "undefined";
                }

                count = _instance._doCheckAndLoad(loadElement);

                if (count > 0) {
                    setTimeout(_instance._checkVisibilityAndLoad, 200);
                    return;
                }
            };

            _instance._loadByTrigger = function (trigger) {
                var loadElement = function (element) {
                    return element.waitForTrigger === trigger;
                }

                var count = _instance._doCheckAndLoad(loadElement);
                _instance._log('Trigger called: ' + trigger + ' - ' + count + ' elements loaded.');
            };

            _instance._doCheckAndLoad = function (loadElement) {
                var counter = 0;

                for (var i = 0; i < _instance._elements.length; i++) {
                    var element = _instance._elements[i];

                    if (loadElement(element) && _instance._doLoadElement(element)) {
                        counter++;
                    }
                }

                return counter;
            };

            _instance._doLoadElement = function (element) {
                if (element.loadingInProgress)
                    return true;

                if (element.loaded && (element.loadedQuality >= element.recommendedQuality || element.loadedQuality < 0))
                    return false;

                var disableLoading = _instance._settings.disable || $(element.instance).data(_instance._settings.interfaceAttributeNames.disableMedialoader);

                if (disableLoading)
                    return false; // as we would have loaded

                var disableImageCorrection = $(element.instance).data(_instance._settings.interfaceAttributeNames.disableImageCorrection);
                var forceImageCorrection = $(element.instance).data(_instance._settings.interfaceAttributeNames.forceImageCorrection);
                var targetQuality = element.recommendedQuality;
                var imageUri = $(element.instance).data(_instance._settings.interfaceAttributeNames.imageUrl);

                if (typeof imageUri != "string" || imageUri.trim() === '') {
                    _instance._log('Cannot get the image uri: ' + imageUri);
                    element.loaded = true;
                    element.loadedQuality = -1;
                    return false;
                }

                imageUri = imageUri.trim();

                //console.log('we are here');

                var correctedUri;
                if (!disableImageCorrection) {
                    correctedUri = _instance._tryAddQualityToUri(targetQuality, imageUri, forceImageCorrection);
                    if (typeof correctedUri != "undefined") {
                        imageUri = correctedUri;
                    } else {
                        targetQuality = -1;
                    }
                }

                element.loadingInProgress = true;
                element.currentUri = imageUri;

                var imageLoaded = function () {
                    for (var i = 0; i < element.targetElements.length; i++) {
                        var el = element.targetElements[i];
                        if (el.asBackground) {
                            $(el.instance).css('background-image', 'url(' + element.currentUri + ')');
                        } else if ($(el.instance).prop("tagName").toUpperCase() === 'IMG') {
                            $(el.instance).attr('src', element.currentUri);
                        } else {
                            _instance._log('Element is not an image and image should not been set as background, so we are skipping that element.');
                        }
                    }

                    element.loaded = true;
                    element.loadingInProgress = false;
                    element.loadedQuality = targetQuality;
                    element.waitForTrigger = undefined;
                    _instance._log('Loading finshed: ' + element.currentUri);
                    $(element.instance)
                        .addClass(_instance._settings.uiMarkerClassnames.loaded)
                        .removeClass(_instance._settings.uiMarkerClassnames.loading);

                    var callback = $(element.instance).data(_instance._settings.interfaceAttributeNames.jsCode);
                    if (typeof callback == "string" && callback.trim() !== '' && typeof window[callback.trim()] == "function")
                        callback = window[callback.trim()];

                    if (typeof callback == "function") {
                        try {
                            callback(element.instance);
                        } catch (ex) {
                            _instance._log("Executing the callback threw an exception! - Message: " + ex, true);
                        }
                    } else if (typeof callback == "string") {
                        try {
                            eval(callback);
                        } catch (ex) {
                            _instance._log("Trying to exceute the callback as javascript code threw an exception! - Message: " + ex + " | Code: " + callback, true);
                        }
                    }
                };

                _instance._log('Start loading: ' + imageUri);
                $('<img />').attr({ 'src': imageUri }).on('load', imageLoaded);
                return true;
            };
        };
    }
})();
;
$(document).ready(function () {
    mediaplayerApi.init();
});

/*

1) interner Videoplayer
- Markierung mit "js-mediaplayer"
- Parameter Video:
  + "data-video-medium": Standard Video
  + "data-video-large": Optional, HD Qualität
  + "data-video-small": Optional, kleine Qualität
  + "data-startimage": Optional, Startbild
- Parameter Audio:
  + "data-audio": Audio
  + "data-startimage": Optional, Startbild
- Optionale Parameter:
  + "data-js-code": funktion oder js code der nach dem Laden ausgeführt wird. Im Fall einer Funktion wird eine jQuery Referenz auf das aktuelle Element übergeben.
  + "data-mediaplayer-trigger": alle Items warten bis der Tigger aufgerufen wird
  + "data-context": Zugriff auf alle Mediaplayer eines Kontextes, bspw. zum Stoppen der Mediaplayer nur in einem Hero; falls beginnend mit ".": data-mediaplayer-context aus closest() mit dieser Klasse wird verwendet.
- Optional: Titel
  + Markierung mit "js-mediaplayer-title"
- Audioplayer:
  Mit "mediaplayer--no-image" wird eine medaiplayer markiert, der kein Bild hat.

2) YouTube Videoplayer
- Markierung mit "js-mediaplayer-youtube", Video aus "data-media-id"
- Optionale Parameter:
  + "data-js-code": funktion oder js code der nach dem Laden ausgeführt wird. Im Fall einer Funktion wird eine jQuery Referenz auf das aktuelle Element übergeben.
  + "data-mediaplayer-trigger": alle Items warten bis der Tigger aufgerufen wird
  + "data-autoplay": spielt das Video automatisch ab

3) Vimeo Videoplayer
- Markierung mit "js-mediaplayer-vimeo", Video aus "data-media-id"
- Optionale Parameter:
  + "data-js-code": funktion oder js code der nach dem Laden ausgeführt wird. Im Fall einer Funktion wird eine jQuery Referenz auf das aktuelle Element übergeben.
  + "data-mediaplayer-trigger": alle Items warten bis der Tigger aufgerufen wird
  + "data-autoplay": spielt das Video automatisch ab

4) Soundcloud Audioplayer
- Markierung mit "js-mediaplayer-soundcloud", Audio aus "data-media-id"
- Optionale Parameter:
  + "data-js-code": funktion oder js code der nach dem Laden ausgeführt wird. Im Fall einer Funktion wird eine jQuery Referenz auf das aktuelle Element übergeben.
  + "data-mediaplayer-trigger": alle Items warten bis der Tigger aufgerufen wird
  + "data-autoplay": spielt das Audio automatisch ab

*/

(function () {
    if (typeof window.mediaplayerApi == "undefined") {
        window.mediaplayerApi = new function () {
            var _instance = this;

            _instance._defaultSettings = {
                debug: false,
                interfaceMarkerClassnames: {
                    mediaplayer: 'js-mediaplayer',
                    mediaplayerTitel: 'js-mediaplayer-title',
                    youTubePlayer: 'js-mediaplayer-youtube',
                    vimeoPlayer: 'js-mediaplayer-vimeo',
                    soundCloudPlayer: 'js-mediaplayer-soundcloud',
                    noImage: 'mediaplayer--no-image'
                },
                interfaceAttributeNames: {
                    videoMedium: 'video-medium',
                    videoLarge: 'video-large',
                    videoSmall: 'video-small',
                    startImage: 'startimage',
                    audio: 'audio',
                    mediaId: 'media-id',
                    jsCode: 'js-code',
                    triggerName: 'mediaplayer-trigger',
                    autoplay: 'autoplay',
                    context: 'context',
                },
                uiMarkerClassnames: {
                    isPlaying: 'mediaplayer--is-playing',
                    initialized: 'mediaplayer--is-initialized'
                }
            };
            _instance._settings = $.extend({}, _instance._defaultSettings);

            _instance._isInititalized = false;
            _instance._idCounter = 0;
            _instance._registeredMediaplayer = new Array();
            _instance._registeredYouTubeVideoplayer = new Array();
            _instance._registeredVimeoVideoplayer = new Array();
            _instance._registeredSoundCloudAudioplayer = new Array();
            _instance._soundCloudApiInitialized = false;
            _instance._soundCloudApiReady = false;
            _instance._soundCloudMissedTrigger = new Array();
            _instance._youTubeApiInitialized = false;
            _instance._youTubeApiReady = false;
            _instance._youTubeMissedTrigger = new Array();
            _instance._vimeoApiInitialized = false;
            _instance._vimeoPlayerOrigin = new Array();


            // public functions

            _instance.init = function (userSettings) {
                if (typeof userSettings == "object")
                    _instance._settings = $.extend({}, _instance._defaultSettings, userSettings);

                _instance._log('fully initialized');
                _instance._isInititalized = true;

                _instance.triggerInitMediaplayer();

                if (typeof asyncLoader != "undefined")
                    asyncLoader.registerInit(_instance.triggerInitMediaplayer);
            };

            _instance.triggerInitMediaplayer = function (trigger) {
                trigger = _instance._correctTrigger(trigger);

                var handler = function () {
                    _instance._ensureVideoApiEmbedAndInitialisation(trigger);
                    _instance._doInitMediaplayer(trigger);
                    // e.g. if anything is blocked by double optin
                    _instance._removeOrphanedTrigger(trigger);
                };
                _instance._executeAsyncIfInitialized(handler);
            };

            _instance.stopAllMediaplayer = function (context) {
                _instance._log('Stopping all mediaplayer.');

                var player;
                for (var i = 0; i < _instance._registeredMediaplayer.length; i++) {
                    player = _instance._registeredMediaplayer[i];

                    if (typeof context != 'undefined' && context !== '' &&
                        (typeof player.context == 'undefined' || player.context === '' || player.context !== context)) {
                        continue;
                    }

                    if (typeof player.videoJs.pause == "function")
                        player.videoJs.pause();
                }

                for (var l = 0; l < _instance._registeredYouTubeVideoplayer.length; l++) {
                    player = _instance._registeredYouTubeVideoplayer[l];

                    if (typeof context != 'undefined' && context !== '' &&
                        (typeof player.context == 'undefined' || player.context === '' || player.context !== context)) {
                        continue;
                    }

                    if (typeof player.youTubePlayer.pauseVideo == "function")
                        player.youTubePlayer.pauseVideo();
                }

                for (var j = 0; j < _instance._registeredVimeoVideoplayer.length; j++) {
                    player = _instance._registeredVimeoVideoplayer[j];

                    if (typeof context != 'undefined' && context !== '' &&
                        (typeof player.context == 'undefined' || player.context === '' || player.context !== context)) {
                        continue;
                    }

                    _instance._postDataForVimeoPlayer(player.id, 'pause');
                }

                for (var k = 0; k < _instance._registeredSoundCloudAudioplayer.length; k++) {
                    player = _instance._registeredSoundCloudAudioplayer[k];

                    if (typeof context != 'undefined' && context !== '' &&
                        (typeof player.context == 'undefined' || player.context === '' || player.context !== context)) {
                        continue;
                    }

                    if (typeof player.widget.pause == "function")
                        player.widget.pause();
                }
            }

            // private functions

            _instance._log = function (content, force) {
                if (_instance._settings.debug || force === true) {
                    if (typeof content != "string") {
                        console.log('Mediaplayer API:');
                        console.log(content);
                    } else {
                        console.log('Mediaplayer API: ' + content);
                    }
                }
            };

            _instance._executeAsyncIfInitialized = function (handler) {
                if (!_instance._isInititalized) {
                    _instance._log('Mediaplayer API has not been initialized! Initialize prior to access!');
                    return;
                }
                setTimeout(handler, 0);
            };

            _instance._getNewClientId = function () {
                return 'mediaplayer-api-id-' + (++this._idCounter);
            };

            _instance._correctTrigger = function (trigger) {
                if (typeof trigger != "string" || trigger.trim() === '')
                    return undefined;

                return trigger.trim();
            };

            _instance._removeOrphanedTrigger = function (trigger) {
                if (typeof trigger != "string" || trigger.trim() === '')
                    return;

                $('[data-' + _instance._settings.interfaceAttributeNames.triggerName + '=' + trigger + ']').each(function() {
                    $(this).data(_instance._settings.interfaceAttributeNames.triggerName, '');
                });
            };

            _instance._skipDueToTriggerSettings = function ($element, trigger) {
                var elementTrigger = _instance._correctTrigger($element.data(_instance._settings.interfaceAttributeNames.triggerName));

                return (typeof trigger != typeof elementTrigger) || (typeof trigger != "undefined" && trigger !== elementTrigger);
            };

            _instance._executeOnLoadJsCode = function ($element) {
                var callback = $element.data(_instance._settings.interfaceAttributeNames.jsCode);
                if (typeof callback == "function") {
                    try {
                        callback(element.instance);
                    } catch (ex) {
                        _instance._log("Executing the callback threw an exception! - Message: " + ex, true);
                    }
                } else if (typeof callback == "string") {
                    try {
                        eval(callback);
                    } catch (ex) {
                        _instance._log("Trying to exceute the callback as javascript code threw an exception! - Message: " + ex + " | Code: " + callback, true);
                    }
                }
            };

            _instance._initVideoJs = function (media) {

                var options = {
                    "controls": true,
                    "autoplay": false,
                    "preload": "none",
                    "fluid": true
                };

                if (media.mediaType === 'audio') {
                    options.inactivityTimeout = 0;
                }

                if (typeof media.startImage == "string" && media.startImage !== '')
                    options.poster = media.startImage;

                var video = videojs(media.id, options);

                if (media.mediaType === 'video' && media.videoSoucefileCount > 1)
                    video.videoJsResolutionSwitcher({ default: 360 });

                video.on('play', function () {
                    $('#' + this.id()).closest('.' + _instance._settings.interfaceMarkerClassnames.mediaplayer).find('.' + _instance._settings.interfaceMarkerClassnames.mediaplayerTitel).fadeOut(200);
                    $('#' + this.id()).closest('.' + _instance._settings.interfaceMarkerClassnames.mediaplayer).addClass(_instance._settings.uiMarkerClassnames.isPlaying);
                });

                video.on('pause', function () {
                    $('#' + this.id()).closest('.' + _instance._settings.interfaceMarkerClassnames.mediaplayer).find('.' + _instance._settings.interfaceMarkerClassnames.mediaplayerTitel).fadeIn(200);
                    $('#' + this.id()).closest('.' + _instance._settings.interfaceMarkerClassnames.mediaplayer).removeClass(_instance._settings.uiMarkerClassnames.isPlaying);
                });

                video.on('ended', function () {
                    this.currentTime(0);
                    this.posterImage.show();
                    this.bigPlayButton.show();
                    $('#' + this.id()).closest('.' + _instance._settings.interfaceMarkerClassnames.mediaplayer).find('.' + _instance._settings.interfaceMarkerClassnames.mediaplayerTitel).fadeIn(200);
                    $('#' + this.id()).closest('.' + _instance._settings.interfaceMarkerClassnames.mediaplayer).removeClass(_instance._settings.uiMarkerClassnames.isPlaying);
                });

                video.on('loadstart', function () {
                    if (media.mediaType === 'audio' && $('#' + this.id()).closest('.' + _instance._settings.interfaceMarkerClassnames.mediaplayer).hasClass(_instance._settings.interfaceMarkerClassnames.noImage)) {
                        // show the controlbar
                        $('#' + this.id()).addClass('vjs-has-started');
                    }
                });

                return video;
            };

            _instance._doInitMediaplayer = function (trigger) {
                var counter = 0;

                $('.' + _instance._settings.interfaceMarkerClassnames.mediaplayer).each(function () {
                    var $element = $(this);

                    if ($element.data('mediaplayerApiIsInitialized') || _instance._skipDueToTriggerSettings($element, trigger))
                        return;

                    var audio = $element.data(_instance._settings.interfaceAttributeNames.audio);
                    var videoMedium = $element.data(_instance._settings.interfaceAttributeNames.videoMedium);
                    var videoLarge = $element.data(_instance._settings.interfaceAttributeNames.videoLarge);
                    var videoSmall = $element.data(_instance._settings.interfaceAttributeNames.videoSmall);
                    var startImage = $element.data(_instance._settings.interfaceAttributeNames.startImage);
                    var context = $element.data(_instance._settings.interfaceAttributeNames.context);

                    var media = {
                        id: _instance._getNewClientId(),
                        mediaType: undefined
                    };

                    if (typeof context != 'undefined' && context.length > 0) {
                        if (context[0] == '.') {
                            var contextClassName = context;
                            context = $element.closest(contextClassName).data('mediaplayer-context');
                        }

                        media.context = context;
                    }

                    if ((typeof videoMedium == "string" && videoMedium !== "") || (typeof audio == "string" && audio !== "")) {
                        var html = '<video id="' + media.id + '" class="video-js vjs-default-skin vjs-big-play-centered"';

                        if (typeof startImage == "string" && startImage !== "") {
                            html = html + ' poster="' + startImage + '"';
                            media.startImage = startImage;
                        }

                        html = html + '>';

                        if (typeof audio == "string" && audio !== "") {

                            html = html + '<source src="' + audio + '" type="video/mp4" label="360p" res="360">';
                            media.audio = audio;
                            media.mediaType = 'audio';

                        } else {
                            media.videoSoucefileCount = 0;

                            if (typeof videoLarge == "string" && videoLarge !== "") {
                                html = html + '<source src="' + videoLarge + '" type="video/mp4" label="720p (HD)" res="720">';
                                media.videoSoucefileCount++;
                                media.mediaType = 'video';
                                media.videoLarge = videoLarge;
                            }

                            if (typeof videoMedium == "string" && videoMedium !== "") {
                                html = html + '<source src="' + videoMedium + '" type="video/mp4" label="360p" res="360">';
                                media.videoSoucefileCount++;
                                media.mediaType = 'video';
                                media.videoMedium = videoMedium;
                            }

                            if (typeof videoSmall == "string" && videoSmall !== "") {
                                html = html + '<source src="' + videoSmall + '" type="video/mp4" label="180p" res="180">';
                                media.videoSoucefileCount++;
                                media.mediaType = 'video';
                                media.videoSmall = videoSmall;
                            }
                        }

                        html = html + '</video>';

                        if (typeof media.mediaType != "undefined") {
                            $element.prepend(html);
                            media.videoJs = _instance._initVideoJs(media);
                            $element.addClass(_instance._settings.uiMarkerClassnames.initialized);
                            _instance._registeredMediaplayer.push(media);
                            _instance._executeOnLoadJsCode($element);
                        }
                    }

                    counter++;
                    $element.data('mediaplayerApiIsInitialized', true);
                });

                _instance._log(counter + ' mediaplayer initialized');
            }

            _instance._ensureVideoApiEmbedAndInitialisation = function (trigger) {
                if ($('.' + _instance._settings.interfaceMarkerClassnames.youTubePlayer).length > 0) {
                    _instance._initYouTubeEmbedd();
                    if (_instance._youTubeApiReady) {
                        _instance._doInitYouTubePlayer(trigger); // we're already initialized
                    } else if (typeof trigger == "string" && trigger.trim() !== '') {
                        _instance._youTubeMissedTrigger.push(trigger);
                    }
                }

                if ($('.' + _instance._settings.interfaceMarkerClassnames.vimeoPlayer).length > 0)
                    _instance._initVimeoEmbedd(trigger);

                if ($('.' + _instance._settings.interfaceMarkerClassnames.soundCloudPlayer).length > 0) {
                    _instance._initSoundCloudEmbedd();
                    if (_instance._soundCloudApiReady) {
                        _instance._doInitSoundCloudPlayer(trigger); // we're already initialized
                    } else if (typeof trigger == "string" && trigger.trim() !== '') {
                        _instance._soundCloudMissedTrigger.push(trigger);
                    }
                }
            }

            _instance._initYouTubeEmbedd = function () {
                if (_instance._youTubeApiInitialized)
                    return;

                _instance._youTubeApiInitialized = true;
                var tag = document.createElement('script');
                tag.src = "https://www.youtube.com/iframe_api";
                var firstScriptTag = document.getElementsByTagName('script')[0];
                firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

                _instance._log('YouTube API initialized.');
            }

            _instance._initVimeoEmbedd = function (trigger) {
                if (!_instance._vimeoApiInitialized) {
                    _instance._vimeoApiInitialized = true;

                    $.getScript(SYSTEMURLBASE + "resources/js/vendor/froogaloop.js", function () {
                        _instance._log('Froogaloop script added.');
                    });

                    if (window.addEventListener) {
                        window.addEventListener('message', _instance._onMessageReceivedForVimeo, false);
                    } else {
                        window.attachEvent('onmessage', _instance._onMessageReceivedForVimeo, false);
                    }

                    _instance._log('Vimeo API initialized.');
                }

                var counter = 0;

                $('.' + _instance._settings.interfaceMarkerClassnames.vimeoPlayer).each(function () {

                    var $element = $(this);

                    if ($element.data('mediaplayerApiIsInitialized') || _instance._skipDueToTriggerSettings($element, trigger))
                        return;

                    var mediaId = $element.data(_instance._settings.interfaceAttributeNames.mediaId);
                    if (typeof mediaId != "number")
                        return;

                    var autoplay = 0;
                    if ($element.data(_instance._settings.interfaceAttributeNames.autoplay))
                        autoplay = 1;

                    var media = {
                        id: _instance._getNewClientId(),
                        mediaId: mediaId
                    };

                    var context = $element.data(_instance._settings.interfaceAttributeNames.context);
                    if (typeof context != 'undefined' && context.length > 0) {
                        if (context[0] == '.') {
                            var contextClassName = context;
                            context = $element.closest(contextClassName).data('mediaplayer-context');
                        }

                        media.context = context;
                    }

                    var html = '<iframe id="' + media.id + '" src="//player.vimeo.com/video/' + media.mediaId + '?api=1&autoplay=' + autoplay + '&player_id=' + media.id + '&title=0&byline=0&portrait=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
                    $element.html(html);

                    _instance._registeredVimeoVideoplayer.push(media);

                    counter++;
                    $element.data('mediaplayerApiIsInitialized', true);
                });

                _instance._log(counter + ' Vimeo player initialized');
            }

            _instance._initSoundCloudEmbedd = function () {
                if (_instance._soundCloudApiInitialized)
                    return;

                _instance._soundCloudApiInitialized = true;
                var tag = document.createElement('script');
                tag.src = "https://w.soundcloud.com/player/api.js";
                var firstScriptTag = document.getElementsByTagName('script')[0];
                firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

                _instance._log('SoundCloud API initialized.');

                setTimeout(_instance._checkForSoundCloudApi, 50);
            }

            _instance._onYouTubeIframeAPIReady = function () {
                _instance._log('YouTube iframe API ready.');
                _instance._youTubeApiReady = true;

                _instance._doInitYouTubePlayer();

                for (var i = 0; i < _instance._youTubeMissedTrigger.length; i++) {
                    _instance._doInitYouTubePlayer(_instance._youTubeMissedTrigger[i]);
                }

                _instance._youTubeMissedTrigger = new Array();
            };

            _instance._doInitYouTubePlayer = function (trigger) {
                var counter = 0;

                $('.' + _instance._settings.interfaceMarkerClassnames.youTubePlayer).each(function () {

                    var $element = $(this);

                    if ($element.data('mediaplayerApiIsInitialized') || _instance._skipDueToTriggerSettings($element, trigger))
                        return;

                    var mediaId = $element.data(_instance._settings.interfaceAttributeNames.mediaId);
                    if (typeof mediaId != "string" || mediaId.trim() === '')
                        return;

                    mediaId = mediaId.trim();

                    var payerVars = {};

                    if ($element.data(_instance._settings.interfaceAttributeNames.autoplay))
                        payerVars.autoplay = 1;

                    var media = {
                        id: _instance._getNewClientId(),
                        mediaId: mediaId
                    };

                    var context = $element.data(_instance._settings.interfaceAttributeNames.context);
                    if (typeof context != 'undefined' && context.length > 0) {
                        if (context[0] == '.') {
                            var contextClassName = context;
                            context = $element.closest(contextClassName).data('mediaplayer-context');
                        }

                        media.context = context;
                    }

                    var html = '<div id="' + media.id + '"></div>';
                    $element.html(html);

                    media.youTubePlayer = new YT.Player(media.id, {
                        videoId: mediaId,
                        events: {
                            'onStateChange': function (event) {
                                _instance._onYouTubePlayerStateChange(event, media.id);
                            }
                        },
                        playerVars: payerVars
                    });

                    _instance._registeredYouTubeVideoplayer.push(media);

                    counter++;
                    $element.data('mediaplayerApiIsInitialized', true);
                });

                _instance._log(counter + ' YouTube player initialized');
            }

            _instance._onYouTubePlayerStateChange = function (event, containerId) {
                if (event.data === YT.PlayerState.PLAYING) {
                    $('#' + containerId).closest('.' + _instance._settings.interfaceMarkerClassnames.youTubePlayer).addClass(_instance._settings.uiMarkerClassnames.isPlaying);
                }
                if (event.data === YT.PlayerState.PAUSED) {
                    $('#' + containerId).closest('.' + _instance._settings.interfaceMarkerClassnames.youTubePlayer).removeClass(_instance._settings.uiMarkerClassnames.isPlaying);
                }
                if (event.data === YT.PlayerState.ENDED) {
                    $('#' + containerId).closest('.' + _instance._settings.interfaceMarkerClassnames.youTubePlayer).removeClass(_instance._settings.uiMarkerClassnames.isPlaying);
                }
            }

            _instance._checkForSoundCloudApi = function () {
                if (typeof SC != "undefined") {
                    _instance._onSoundCloudApiReady();
                    return;
                }

                _instance._log('Still waiting for SoundCloud API ...');

                setTimeout(_instance._checkForSoundCloudApi, 50);
            };

            _instance._onSoundCloudApiReady = function() {
                _instance._log('SoundCloud API ready.');
                _instance._soundCloudApiReady = true;

                _instance._doInitSoundCloudPlayer();

                for (var i = 0; i < _instance._soundCloudMissedTrigger.length; i++) {
                    _instance._doInitSoundCloudPlayer(_instance._soundCloudMissedTrigger[i]);
                }

                _instance._soundCloudMissedTrigger = new Array();
            };

            _instance._doInitSoundCloudPlayer = function(trigger) {
                var counter = 0;

                $('.' + _instance._settings.interfaceMarkerClassnames.soundCloudPlayer).each(function() {
                    var $element = $(this);

                    if ($element.data('mediaplayerApiIsInitialized') || _instance._skipDueToTriggerSettings($element, trigger))
                        return;

                    var mediaId = $element.data(_instance._settings.interfaceAttributeNames.mediaId);
                    if ((typeof mediaId != "string" && typeof mediaId != "number") || mediaId.toString().trim() === '')
                        return;

                    mediaId = mediaId.toString().trim();

                    var autoplay = false;
                    if ($element.data(_instance._settings.interfaceAttributeNames.autoplay))
                        autoplay = true;

                    var media = {
                        id: _instance._getNewClientId(),
                        mediaId: mediaId
                    };

                    var context = $element.data(_instance._settings.interfaceAttributeNames.context);
                    if (typeof context != 'undefined' && context.length > 0) {
                        if (context[0] == '.') {
                            var contextClassName = context;
                            context = $element.closest(contextClassName).data('mediaplayer-context');
                        }

                        media.context = context;
                    }

                    var html = '<iframe id="' + media.id + '" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' + media.mediaId + '&auto_play=' + autoplay + '"></iframe>';
                    $element.html(html);

                    var onPlay = function (eventData) {
                        _instance._onSoundCloudPlay(media, eventData);
                    };

                    var onStop = function (eventData) {
                        _instance._onSoundCloudStop(media, eventData);
                    };

                    media.widget = SC.Widget(media.id);
                    media.widget.bind(SC.Widget.Events.PLAY, onPlay);
                    media.widget.bind(SC.Widget.Events.PAUSE, onStop);
                    media.widget.bind(SC.Widget.Events.FINISH, onStop);

                    _instance._registeredSoundCloudAudioplayer.push(media);

                    counter++;
                    $element.data('mediaplayerApiIsInitialized', true);
                });

                _instance._log(counter + ' SoundCloud player initialized');
            };

            _instance._onSoundCloudPlay = function (media, eventData) {
                // eventData: original SoundCloud event data
                $('#' + media.id).closest('.' + _instance._settings.interfaceMarkerClassnames.soundCloudPlayer).addClass(_instance._settings.uiMarkerClassnames.isPlaying);
            };

            _instance._onSoundCloudStop = function (media, eventData) {
                // eventData: original SoundCloud event data
                $('#' + media.id).closest('.' + _instance._settings.interfaceMarkerClassnames.soundCloudPlayer).removeClass(_instance._settings.uiMarkerClassnames.isPlaying);
            };

            _instance._postDataForVimeoPlayer = function (playerId, action, value) {
                var data = {
                    method: action
                };

                if (value) {
                    data.value = value;
                }

                //_instance._log('Send data to Vimeo player (' + playerId + '): ' + action + ' - ' + value);

                var message = JSON.stringify(data);
                var player = $('#' + playerId);
                var playerOrigin = _instance._getVimeoPlayerOrigin(playerId);
                player[0].contentWindow.postMessage(message, playerOrigin.value);
            }

            _instance._onVimeoPayerReady = function (playerId) {
                _instance._postDataForVimeoPlayer(playerId, 'addEventListener', 'pause');
                _instance._postDataForVimeoPlayer(playerId, 'addEventListener', 'finish');
                _instance._postDataForVimeoPlayer(playerId, 'addEventListener', 'playProgress');
                _instance._postDataForVimeoPlayer(playerId, 'addEventListener', 'play');
            }

            _instance._getVimeoPlayerOrigin = function (name) {
                for (var i = 0; i < _instance._vimeoPlayerOrigin.length; i++) {
                    if (_instance._vimeoPlayerOrigin[i].name === name)
                        return _instance._vimeoPlayerOrigin[i];
                }

                var result = {
                    name: name,
                    value: '*'
                };
                _instance._vimeoPlayerOrigin.push(result);
                return result;
            };

            _instance._onMessageReceivedForVimeo = function (event) {
                // Handle messages from the vimeo player only
                if (!(/^https?:\/\/player.vimeo.com/).test(event.origin)) {
                    return;
                }

                var data = JSON.parse(event.data);
                //_instance._log('Messege recieved from vimeo: ' + data.player_id + ' => ' + data.event);

                if (typeof data.player_id != "undefined") {
                    var playerOrigin = _instance._getVimeoPlayerOrigin(data.player_id);
                    if (playerOrigin.value === '*') {
                        playerOrigin.value = event.origin;
                    }
                }

                switch (data.event) {
                    case 'ready':
                        if (typeof data.player_id != "undefined")
                            _instance._onVimeoPayerReady(data.player_id);
                        break;

                    case 'playProgress':
                        break;

                    case 'play':
                        $('#' + data.player_id).closest('.' + _instance._settings.interfaceMarkerClassnames.vimeoPlayer).addClass(_instance._settings.uiMarkerClassnames.isPlaying);
                        break;

                    case 'pause':
                        $('#' + data.player_id).closest('.' + _instance._settings.interfaceMarkerClassnames.vimeoPlayer).removeClass(_instance._settings.uiMarkerClassnames.isPlaying);
                        break;

                    case 'finish':
                        $('#' + data.player_id).closest('.' + _instance._settings.interfaceMarkerClassnames.vimeoPlayer).removeClass(_instance._settings.uiMarkerClassnames.isPlaying);
                        break;
                }
            }

        };
    }
})();

function onYouTubeIframeAPIReady() {
    mediaplayerApi._onYouTubeIframeAPIReady();
}

;
$(document).ready(function () {

    $('.js-mediaplugin-issuu').spiritecIssuuEmbed();

});

; (function ($, window, document, undefined) {

    'use strict';

    var pluginName = 'spiritecIssuuEmbed',
        defaults = { };

    function Plugin(element, options) {
        this._element = element;
        this._$element = $(element);

        this._settings = $.extend({}, defaults, options, this._$element.data());
        this._defaults = defaults;
        this._name = pluginName;

        this.init();
    }

    $.extend(Plugin.prototype, {

        init: function () {
            this._initParams();
            this._replaceEmbedCode();
            this._ensureIssuuApi();
        },

        _initParams: function () {
            this._mediaId = this._$element.data('media-id');
        },

        _replaceEmbedCode: function () {
            this._$element.html('<div data-configid="' + this._mediaId + '" class="issuuembed"></div>');

            if (typeof window.IssuuReaders != 'undefined')
                window.IssuuReaders.add();
        },

        _ensureIssuuApi: function () {
            if ($('body').data('issuuApiEmbedded'))
                return;

            var tag = document.createElement('script');
            tag.src = '//e.issuu.com/embed.js';
            var firstScriptTag = document.getElementsByTagName('script')[0];
            firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

            $('body').data('issuuApiEmbedded', true);
        }
    });

    $.fn[pluginName] = function (options) {
        return this.each(function () {
            if (!$.data(this, 'plugin_' + pluginName)) {
                $.data(this, 'plugin_' +
                    pluginName, new Plugin(this, options));
            }
        });
    };

})(jQuery, window, document);
;
