Close two tabs warning - only one tab open??

Firefox 23.0.1
Win xp

Couple of issues

one: I have / had only one tab open, but got a warning about 'are you sure you want to close all open tabs'. When I latter restored that session, one of the tabs, which was invisible was pointed here: http://s.ytimg.com/yts/jsbin/html5player-vfl79wBKW.js, which looks like a very long javascript, (copy below).

On another occasion, the (invisible) tab was labeled "sandbox".

Whats going on? Should I be concerned?
How do I correct the problem?

Here is the script I found in the restored window (what does this do?)

(function(){var f,aa=aa||{},l=this;function n(a,b){for(var c=a.split("."),d=b||l,e;e=c.shift();)if(null!=d[e])d=d[e];else return null;return d}function ba(){}function ca(a){a.getInstance=function(){return a.gq?a.gq:a.gq=new a}}
function da(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function q(a){return void 0!==a}function ea(a){return null!=a}function t(a){return"array"==da(a)}function fa(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function ga(a){return"number"==typeof a}function ha(a){return"function"==da(a)}function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ja(a){return a[ka]||(a[ka]=++la)}
var ka="closure_uid_"+(1E9*Math.random()>>>0),la=0;function ma(a,b,c){return a.call.apply(a.bind,arguments)}function na(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}
function v(a,b,c){v=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ma:na;return v.apply(null,arguments)}function oa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}function w(a,b){for(var c in b)a[c]=b[c]}var x=Date.now||function(){return+new Date};
function pa(a,b){var c=a.split("."),d=l;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function y(a,b){function c(){}c.prototype=b.prototype;a.C=b.prototype;a.prototype=new c;a.prototype.constructor=a}Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return v.apply(null,c)}return v(this,a)};var qa={},ra=0;function sa(a,b){if(a){var c=new Image,d=""+ra++;qa[d]=c;c.onload=c.onerror=function(){b&&qa[d]&&b();delete qa[d]};c.src=a;c=eval("null")}};function ua(a){Error.captureStackTrace?Error.captureStackTrace(this,ua):this.stack=Error().stack||"";a&&(this.message=String(a))}y(ua,Error);ua.prototype.name="CustomError";var va;function wa(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")}function xa(a){return decodeURIComponent(a.replace(/\+/g," "))}function ya(a){if(!za.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Aa,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ba,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Ca,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Da,"&quot;"));return a}var Aa=/&/g,Ba=/</g,Ca=/>/g,Da=/\"/g,za=/[&<>\"]/;
function Ea(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var k=d[h]||"",m=e[h]||"",p=RegExp("(\\d*)(\\D*)","g"),s=RegExp("(\\d*)(\\D*)","g");do{var r=p.exec(k)||["","",""],D=s.exec(m)||["","",""];if(0==r[0].length&&0==D[0].length)break;c=((0==r[1].length?0:parseInt(r[1],10))<(0==D[1].length?0:parseInt(D[1],10))?-1:(0==r[1].length?0:parseInt(r[1],10))>(0==D[1].length?
0:parseInt(D[1],10))?1:0)||((0==r[2].length)<(0==D[2].length)?-1:(0==r[2].length)>(0==D[2].length)?1:0)||(r[2]<D[2]?-1:r[2]>D[2]?1:0)}while(0==c)}return c}function Fa(a){var b=Number(a);return 0==b&&/^[\s\xa0]*$/.test(a)?NaN:b}function Ga(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}
function Ha(a){var b=u(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return a.replace(RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})};function Ia(){};function Ja(a){return a[a.length-1]}
var Ka=Array.prototype,La=Ka.indexOf?function(a,b,c){return Ka.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(u(a))return u(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},z=Ka.forEach?function(a,b,c){Ka.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},Ma=Ka.filter?function(a,b,c){return Ka.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],g=
0,h=u(a)?a.split(""):a,k=0;k<d;k++)if(k in h){var m=h[k];b.call(c,m,k,a)&&(e[g++]=m)}return e},Na=Ka.map?function(a,b,c){return Ka.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),g=u(a)?a.split(""):a,h=0;h<d;h++)h in g&&(e[h]=b.call(c,g[h],h,a));return e},Oa=Ka.some?function(a,b,c){return Ka.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return!0;return!1},Pa=Ka.every?function(a,b,c){return Ka.every.call(a,b,c)}:function(a,
b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&!b.call(c,e[g],g,a))return!1;return!0};function Qa(a,b){var c=0;z(a,function(a,e,g){b.call(void 0,a,e,g)&&++c},void 0);return c}function Ra(a,b,c){b=Sa(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Sa(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return g;return-1}function Ta(a,b){var c=Ua(a,b,void 0);return 0>c?null:u(a)?a.charAt(c):a[c]}
function Ua(a,b,c){for(var d=u(a)?a.split(""):a,e=a.length-1;0<=e;e--)if(e in d&&b.call(c,d[e],e,a))return e;return-1}function Va(a,b){return 0<=La(a,b)}function Wa(a){return 0==a.length}function Xa(a){if(!t(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function Ya(a,b){Va(a,b)||a.push(b)}function Za(a,b){var c=La(a,b),d;(d=0<=c)&&$a(a,c);return d}function $a(a,b){Ka.splice.call(a,b,1)}function ab(a,b){var c=Sa(a,b,void 0);0<=c&&$a(a,c)}
function bb(a){return Ka.concat.apply(Ka,arguments)}function cb(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}function db(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;if(t(d)||(e=fa(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(e)for(var g=a.length,h=d.length,k=0;k<h;k++)a[g+k]=d[k];else a.push(d)}}function eb(a,b,c,d){Ka.splice.apply(a,fb(arguments,1))}
function fb(a,b,c){return 2>=arguments.length?Ka.slice.call(a,b):Ka.slice.call(a,b,c)}function gb(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],g=ia(e)?"o"+ja(e):(typeof e).charAt(0)+e;Object.prototype.hasOwnProperty.call(b,g)||(b[g]=!0,a[c++]=e)}a.length=c}function hb(a,b,c){for(var d=0,e=a.length,g;d<e;){var h=d+e>>1,k;k=b(c,a[h]);0<k?d=h+1:(e=h,g=!k)}return g?d:~d}function ib(a,b){Ka.sort.call(a,b||jb)}function kb(a,b){var c=jb;ib(a,function(a,e){return c(a[b],e[b])})}
function lb(a,b,c){if(!fa(a)||!fa(b)||a.length!=b.length)return!1;var d=a.length;c=c||mb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function jb(a,b){return a>b?1:a<b?-1:0}function mb(a,b){return a===b}function nb(a,b,c){c=hb(a,c||jb,b);0>c&&eb(a,-(c+1),0,b)}function ob(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];t(d)?b.push.apply(b,ob.apply(null,d)):b.push(d)}return b};function pb(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);}function qb(a){return eval("("+a+")")}function rb(a){return sb(new tb(void 0),a)}function tb(a){this.a=a}
function sb(a,b){var c=[];ub(a,b,c);return c.join("")}
function ub(a,b,c){switch(typeof b){case "string":vb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(t(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],ub(a,a.a?a.a.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),vb(g,c),c.push(":"),
ub(a,a.a?a.a.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var wb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},xb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function vb(a,b){b.push('"',a.replace(xb,function(a){if(a in wb)return wb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return wb[a]=e+b.toString(16)}),'"')};function yb(a,b,c){return Math.min(Math.max(a,b),c)};function A(a,b){this.x=q(a)?a:0;this.y=q(b)?b:0}f=A.prototype;f.clone=function(){return new A(this.x,this.y)};function zb(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function Ab(a,b){return new A(a.x-b.x,a.y-b.y)}f.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};f.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};f.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
f.scale=function(a,b){var c=ga(b)?b:a;this.x*=a;this.y*=c;return this};function Bb(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}f=Bb.prototype;f.clone=function(){return new Bb(this.top,this.right,this.bottom,this.left)};f.contains=function(a){return this&&a?a instanceof Bb?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};
f.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};f.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};f.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
f.scale=function(a,b){var c=ga(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function B(a,b){this.width=a;this.height=b}function Cb(a,b){return a==b?!0:a&&b?a.width==b.width&&a.height==b.height:!1}f=B.prototype;f.clone=function(){return new B(this.width,this.height)};function Db(a){return a.width/a.height}f.isEmpty=function(){return!(this.width*this.height)};f.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
f.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.scale=function(a,b){var c=ga(b)?b:a;this.width*=a;this.height*=c;return this};function Eb(a,b){return a.scale(Db(a)>Db(b)?b.width/a.width:b.height/a.height)};function Fb(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}f=Fb.prototype;f.clone=function(){return new Fb(this.left,this.top,this.width,this.height)};function Gb(a){return new Fb(a.left,a.top,a.right-a.left,a.bottom-a.top)}function Hb(a,b){return a==b?!0:a&&b?a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height:!1}
f.contains=function(a){return a instanceof Fb?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function Ib(a){return new B(a.width,a.height)}f.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
f.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};f.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.scale=function(a,b){var c=ga(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Jb(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Kb(a,b){for(var c in a)if(!b.call(void 0,a[c],c,a))return!1;return!0}function Lb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Mb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Nb(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Ob(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c}function Pb(a){for(var b in a)return!1;return!0}function Qb(a){var b={},c;for(c in a)b[c]=a[c];return b}
function Rb(a){var b=da(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=Rb(a[c]);return b}return a}var Sb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Tb(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var g=0;g<Sb.length;g++)c=Sb[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}
function Ub(a){var b=arguments.length;if(1==b&&t(arguments[0]))return Ub.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};function Vb(a){return function(){throw a;}};var Wb,Xb,Yb,Zb,$b,ac,bc;function cc(){return l.navigator?l.navigator.userAgent:null}function dc(){return l.navigator}$b=Zb=Yb=Xb=Wb=!1;var ec;if(ec=cc()){var fc=dc();Wb=0==ec.lastIndexOf("Opera",0);Xb=!Wb&&(-1!=ec.indexOf("MSIE")||-1!=ec.indexOf("Trident"));Zb=(Yb=!Wb&&-1!=ec.indexOf("WebKit"))&&-1!=ec.indexOf("Mobile");$b=!Wb&&!Yb&&!Xb&&"Gecko"==fc.product}var gc=Wb,C=Xb,hc=$b,ic=Yb,jc=Zb,kc=dc(),lc=kc&&kc.platform||"";ac=-1!=lc.indexOf("Mac");bc=-1!=lc.indexOf("Win");
var mc=!!dc()&&-1!=(dc().appVersion||"").indexOf("X11");function nc(){var a=l.document;return a?a.documentMode:void 0}var oc;t:{var pc="",qc;if(gc&&l.opera)var rc=l.opera.version,pc="function"==typeof rc?rc():rc;else if(hc?qc=/rv\:([^\);]+)(\)|;)/:C?qc=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:ic&&(qc=/WebKit\/(\S+)/),qc)var sc=qc.exec(cc()),pc=sc?sc[1]:"";if(C){var tc=nc();if(tc>parseFloat(pc)){oc=String(tc);break t}}oc=pc}var uc=oc,vc={};function wc(a){return vc[a]||(vc[a]=0<=Ea(uc,a))}
function xc(a){return C&&yc>=a}var zc=l.document,yc=zc&&C?nc()||("CSS1Compat"==zc.compatMode?parseInt(uc,10):5):void 0;var Ac=!C||xc(9),Bc=!hc&&!C||C&&xc(9)||hc&&wc("1.9.1"),Cc=C&&!wc("9"),Dc=C||gc||ic;function Ec(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]}function Fc(a,b){for(var c=Ec(a),d=fb(arguments,1),e=c.length+d.length,g=c,h=0;h<d.length;h++)Va(g,d[h])||g.push(d[h]);g=c.join(" ");a.className=g;return c.length==e}function Gc(a,b){var c=Ec(a),d=fb(arguments,1),c=Hc(c,d).join(" ");a.className=c}function Hc(a,b){return Ma(a,function(a){return!Va(b,a)})}function Ic(a,b){return Va(Ec(a),b)}function Jc(a,b,c){c?Fc(a,b):Gc(a,b)}function Kc(a,b){var c=!Ic(a,b);Jc(a,b,c)};function Lc(a){return a?new Mc(Nc(a)):va||(va=new Mc)}function Oc(a){return u(a)?document.getElementById(a):a}function Pc(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):c.getElementsByClassName?c.getElementsByClassName(a):Qc("*",a,b)}function E(a,b){var c=b||document,d=null;return(d=c.querySelectorAll&&c.querySelector?c.querySelector("."+a):Pc(a,b)[0])||null}
function Qc(a,b,c){var d=document;c=c||d;a=a&&"*"!=a?a.toUpperCase():"";if(c.querySelectorAll&&c.querySelector&&(a||b))return c.querySelectorAll(a+(b?"."+b:""));if(b&&c.getElementsByClassName){c=c.getElementsByClassName(b);if(a){for(var d={},e=0,g=0,h;h=c[g];g++)a==h.nodeName&&(d[e++]=h);d.length=e;return d}return c}c=c.getElementsByTagName(a||"*");if(b){d={};for(g=e=0;h=c[g];g++)a=h.className,"function"==typeof a.split&&Va(a.split(/\s+/),b)&&(d[e++]=h);d.length=e;return d}return c}
function Rc(a,b){Jb(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in Sc?a.setAttribute(Sc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var Sc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
function Tc(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new B(a.clientWidth,a.clientHeight)}function Uc(a){var b=Vc(a);a=a.parentWindow||a.defaultView;return C&&wc("10")&&a.pageYOffset!=b.scrollTop?new A(b.scrollLeft,b.scrollTop):new A(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function Vc(a){return ic||"CSS1Compat"!=a.compatMode?a.body||a.documentElement:a.documentElement}
function Wc(a,b,c){var d=arguments,e=document,g=d[0],h=d[1];if(!Ac&&h&&(h.name||h.type)){g=["<",g];h.name&&g.push(' name="',ya(h.name),'"');if(h.type){g.push(' type="',ya(h.type),'"');var k={};Tb(k,h);delete k.type;h=k}g.push(">");g=g.join("")}g=e.createElement(g);h&&(u(h)?g.className=h:t(h)?Fc.apply(null,[g].concat(h)):Rc(g,h));2<d.length&&Xc(e,g,d,2);return g}
function Xc(a,b,c,d){function e(c){c&&b.appendChild(u(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var g=c[d];!fa(g)||ia(g)&&0<g.nodeType?e(g):z(Yc(g)?cb(g):g,e)}}function Zc(a){return document.createElement(a)}function $c(a){return document.createTextNode(String(a))}function ad(a,b){Xc(Nc(a),a,arguments,1)}function bd(a){for(var b;b=a.firstChild;)a.removeChild(b)}function F(a){a&&a.parentNode&&a.parentNode.removeChild(a)}
function cd(a){if(void 0!=a.firstElementChild)a=a.firstElementChild;else for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}function dd(a){if(Dc&&!(C&&wc("9")&&!wc("10")&&l.SVGElement&&a instanceof l.SVGElement))return a.parentElement;a=a.parentNode;return ia(a)&&1==a.nodeType?a:null}
function ed(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function Nc(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
function fd(a,b){if("textContent"in a)a.textContent=b;else if(a.firstChild&&3==a.firstChild.nodeType){for(;a.lastChild!=a.firstChild;)a.removeChild(a.lastChild);a.firstChild.data=b}else bd(a),a.appendChild(Nc(a).createTextNode(String(b)))}function gd(a,b){var c=[];return hd(a,b,c,!0)?c[0]:void 0}function hd(a,b,c,d){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||hd(a,b,c,d))return!0;a=a.nextSibling}return!1}var id={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},jd={IMG:" ",BR:"\n"};
function kd(a,b,c){if(!(a.nodeName in id))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in jd)b.push(jd[a.nodeName]);else for(a=a.firstChild;a;)kd(a,b,c),a=a.nextSibling}function Yc(a){if(a&&"number"==typeof a.length){if(ia(a))return"function"==typeof a.item||"string"==typeof a.item;if(ha(a))return"function"==typeof a.item}return!1}function ld(a,b){return b?md(a,function(a){return!b||Ic(a,b)},!0):null}
function md(a,b,c,d){c||(a=a.parentNode);c=null==d;for(var e=0;a&&(c||e<=d);){if(b(a))return a;a=a.parentNode;e++}return null}function Mc(a){this.a=a||l.document||document}f=Mc.prototype;f.N=function(a){return u(a)?this.a.getElementById(a):a};f.createElement=function(a){return this.a.createElement(a)};function nd(a){return"CSS1Compat"==a.a.compatMode}function od(a){return Uc(a.a)}f.appendChild=function(a,b){a.appendChild(b)};f.append=ad;
f.getChildren=function(a){return Bc&&void 0!=a.children?a.children:Ma(a.childNodes,function(a){return 1==a.nodeType})};f.contains=ed;function pd(a,b,c){u(b)?qd(a,c,b):Jb(b,oa(qd,a))}function qd(a,b,c){var d;t:if(d=Ga(c),void 0===a.style[d]&&(c=(ic?"Webkit":hc?"Moz":C?"ms":gc?"O":null)+Ha(c),void 0!==a.style[c])){d=c;break t}d&&(a.style[d]=b)}function rd(a,b){var c=Nc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function sd(a,b){return rd(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function td(a,b,c){var d,e=hc&&(ac||mc)&&wc("1.9");b instanceof A?(d=b.x,b=b.y):(d=b,b=c);a.style.left=ud(d,e);a.style.top=ud(b,e)}function vd(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}C&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
function wd(a){if(C&&!xc(8))return a.offsetParent;var b=Nc(a),c=sd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=sd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null}
function xd(a){for(var b=new Bb(0,Infinity,Infinity,0),c=Lc(a),d=c.a.body,e=c.a.documentElement,g=Vc(c.a);a=wd(a);)if(!(C&&0==a.clientWidth||ic&&0==a.clientHeight&&a==d||a==d||a==e||"visible"==sd(a,"overflow"))){var h=yd(a),k;k=a;if(hc&&!wc("1.9")){var m=parseFloat(rd(k,"borderLeftWidth"));if(zd(k))var p=k.offsetWidth-k.clientWidth-m-parseFloat(rd(k,"borderRightWidth")),m=m+p;k=new A(m,parseFloat(rd(k,"borderTopWidth")))}else k=new A(k.clientLeft,k.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,
h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=g.scrollLeft;g=g.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,g);c=Tc(c.a.parentWindow||c.a.defaultView||window);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,g+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}
function yd(a){var b,c=Nc(a),d=sd(a,"position"),e=hc&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),g=new A(0,0),h;b=c?Nc(c):document;h=!C||xc(9)||nd(Lc(b))?b.documentElement:b.body;if(a==h)return g;if(a.getBoundingClientRect)b=vd(a),a=od(Lc(c)),g.x=b.left+a.x,g.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),g.x=b.screenX-a.screenX,g.y=b.screenY-a.screenY;else{b=a;do{g.x+=b.offsetLeft;g.y+=
b.offsetTop;b!=a&&(g.x+=b.clientLeft||0,g.y+=b.clientTop||0);if(ic&&"fixed"==sd(b,"position")){g.x+=c.body.scrollLeft;g.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(gc||ic&&"absolute"==d)g.y-=c.body.offsetTop;for(b=a;(b=wd(b))&&b!=c.body&&b!=h;)g.x-=b.scrollLeft,gc&&"TR"==b.tagName||(g.y-=b.scrollTop)}return g}function Ad(a,b){var c=Bd(a),d=Bd(b);return new A(c.x-d.x,c.y-d.y)}
function Cd(a){var b;if(a.getBoundingClientRect)b=vd(a),b=new A(b.left,b.top);else{b=od(Lc(a));var c=yd(a);b=new A(c.x-b.x,c.y-b.y)}if(hc&&!wc(12)){var d;C?d="-ms-transform":ic?d="-webkit-transform":gc?d="-o-transform":hc&&(d="-moz-transform");var e;d&&(e=sd(a,d));e||(e=sd(a,"transform"));a=e?(a=e.match(Dd))?new A(parseFloat(a[1]),parseFloat(a[2])):new A(0,0):new A(0,0);a=new A(b.x+a.x,b.y+a.y)}else a=b;return a}
function Bd(a){if(1==a.nodeType)return Cd(a);var b=ha(a.Tx),c=a;a.targetTouches?c=a.targetTouches[0]:b&&a.ne.targetTouches&&(c=a.ne.targetTouches[0]);return new A(c.clientX,c.clientY)}function Ed(a,b,c){if(b instanceof B)c=b.height,b=b.width;else if(void 0==c)throw Error("missing height argument");Fd(a,b);a.style.height=ud(c,!0)}function ud(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}function Fd(a,b){a.style.width=ud(b,!0)}
function Gd(a){var b=Hd;if("none"!=sd(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,g=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=g;c.visibility=e;return a}function Hd(a){var b=a.offsetWidth,c=a.offsetHeight,d=ic&&!b&&!c;return q(b)&&!d||!a.getBoundingClientRect?new B(b,c):(a=vd(a),new B(a.right-a.left,a.bottom-a.top))}function Id(a){var b=yd(a);a=Gd(a);return new Fb(b.x,b.y,a.width,a.height)}
function Jd(a,b){var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*b+")")}function zd(a){return"rtl"==sd(a,"direction")}
function Kd(a){var b=Nc(a),c=C&&a.currentStyle;if(c&&nd(Lc(b))&&"auto"!=c.width&&"auto"!=c.height&&!c.boxSizing)return b=Ld(a,c.width,"width","pixelWidth"),a=Ld(a,c.height,"height","pixelHeight"),new B(b,a);c=new B(a.offsetWidth,a.offsetHeight);b=Md(a);a=Nd(a);return new B(c.width-a.left-b.left-b.right-a.right,c.height-a.top-b.top-b.bottom-a.bottom)}
function Ld(a,b,c,d){if(/^\d+px?$/.test(b))return parseInt(b,10);var e=a.style[c],g=a.runtimeStyle[c];a.runtimeStyle[c]=a.currentStyle[c];a.style[c]=b;b=a.style[d];a.style[c]=e;a.runtimeStyle[c]=g;return b}function Od(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Ld(a,c,"left","pixelLeft"):0}
function Md(a){if(C){var b=Od(a,"paddingLeft"),c=Od(a,"paddingRight"),d=Od(a,"paddingTop");a=Od(a,"paddingBottom");return new Bb(d,c,a,b)}b=rd(a,"paddingLeft");c=rd(a,"paddingRight");d=rd(a,"paddingTop");a=rd(a,"paddingBottom");return new Bb(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var Pd={thin:2,medium:4,thick:6};
function Qd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;return c in Pd?Pd[c]:Ld(a,c,"left","pixelLeft")}
function Nd(a){if(C&&!xc(9)){var b=Qd(a,"borderLeft"),c=Qd(a,"borderRight"),d=Qd(a,"borderTop");a=Qd(a,"borderBottom");return new Bb(d,c,a,b)}b=rd(a,"borderLeftWidth");c=rd(a,"borderRightWidth");d=rd(a,"borderTopWidth");a=rd(a,"borderBottomWidth");return new Bb(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var Rd=/[^\d]+$/,Sd={cm:1,"in":1,mm:1,pc:1,pt:1},Td={em:1,ex:1};
function Ud(a){var b=sd(a,"fontSize"),c;c=(c=b.match(Rd))&&c[0]||null;if(b&&"px"==c)return parseInt(b,10);if(C){if(c in Sd)return Ld(a,b,"left","pixelLeft");if(a.parentNode&&1==a.parentNode.nodeType&&c in Td)return a=a.parentNode,c=sd(a,"fontSize"),Ld(a,b==c?"1em":b,"left","pixelLeft")}c=Wc("span",{style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});a.appendChild(c);b=c.offsetHeight;F(c);return b}var Dd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;var Vd="StopIteration"in l?l.StopIteration:Error("StopIteration");function Wd(){}Wd.prototype.next=function(){throw Vd;};Wd.prototype.Id=function(){return this};function Xd(a){if(a instanceof Wd)return a;if("function"==typeof a.Id)return a.Id(!1);if(fa(a)){var b=0,c=new Wd;c.next=function(){for(;;){if(b>=a.length)throw Vd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function Yd(a,b,c){if(fa(a))try{z(a,b,c)}catch(d){if(d!==Vd)throw d;}else{a=Xd(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==Vd)throw e;}}}function Zd(a){if(fa(a))return cb(a);a=Xd(a);var b=[];Yd(a,function(a){b.push(a)});return b};function $d(a,b){this.b={};this.a=[];this.g=this.R=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){a instanceof $d?(c=a.uc(),d=a.ic()):(c=Mb(a),d=Lb(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}f=$d.prototype;f.hb=function(){return this.R};f.ic=function(){ae(this);for(var a=[],b=0;b<this.a.length;b++)a.push(this.b[this.a[b]]);return a};f.uc=function(){ae(this);return this.a.concat()};
f.equals=function(a,b){if(this===a)return!0;if(this.R!=a.hb())return!1;var c=b||be;ae(this);for(var d,e=0;d=this.a[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function be(a,b){return a===b}f.isEmpty=function(){return 0==this.R};f.clear=function(){this.b={};this.g=this.R=this.a.length=0};f.remove=function(a){return ce(this.b,a)?(delete this.b[a],this.R--,this.g++,this.a.length>2*this.R&&ae(this),!0):!1};
function ae(a){if(a.R!=a.a.length){for(var b=0,c=0;b<a.a.length;){var d=a.a[b];ce(a.b,d)&&(a.a[c++]=d);b++}a.a.length=c}if(a.R!=a.a.length){for(var e={},c=b=0;b<a.a.length;)d=a.a[b],ce(e,d)||(a.a[c++]=d,e[d]=1),b++;a.a.length=c}}f.get=function(a,b){return ce(this.b,a)?this.b[a]:b};f.set=function(a,b){ce(this.b,a)||(this.R++,this.a.push(a),this.g++);this.b[a]=b};f.clone=function(){return new $d(this)};
f.Id=function(a){ae(this);var b=0,c=this.a,d=this.b,e=this.g,g=this,h=new Wd;h.next=function(){for(;;){if(e!=g.g)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Vd;var h=c[b++];return a?h:d[h]}};return h};function ce(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function de(a){if("function"==typeof a.ic)return a.ic();if(u(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Lb(a)}function ee(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(fa(a)||u(a))z(a,b,c);else{var d;if("function"==typeof a.uc)d=a.uc();else if("function"!=typeof a.ic)if(fa(a)||u(a)){d=[];for(var e=a.length,g=0;g<e;g++)d.push(g)}else d=Mb(a);else d=void 0;for(var e=de(a),g=e.length,h=0;h<g;h++)b.call(c,e[h],d&&d[h],a)}};function fe(a,b,c,d,e){var g="";a&&(g+=a+":");c&&(g+="//",b&&(g+=b+"@"),g+=c,d&&(g+=":"+d));e&&(g+=e);return g}var ge=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function he(a){if(ie){ie=!1;var b=l.location;if(b){var c=b.href;if(c&&(c=je(c))&&c!=b.hostname)throw ie=!0,Error();}}return a.match(ge)}var ie=ic;function je(a){return(a=he(a)[3]||null)&&decodeURIComponent(a)}
function ke(a){return(a=he(a)[5]||null)&&decodeURIComponent(a)}function le(a){if(a[1]){var b=a[0],c=b.indexOf("#");0<=c&&(a.push(b.substr(c)),a[0]=b=b.substr(0,c));c=b.indexOf("?");0>c?a[1]="?":c==b.length-1&&(a[1]=void 0)}return a.join("")}function me(a,b,c){if(t(b))for(var d=0;d<b.length;d++)me(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function ne(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)me(b[c],b[c+1],a);return a}
function oe(a,b){for(var c in b)me(c,b[c],a);return a}function pe(a,b){return le(2==arguments.length?ne([a],arguments[1],0):ne([a],arguments,1))}function qe(a,b,c){a=[a,"&",b];null!=c&&a.push("=",encodeURIComponent(String(c)));return le(a)}function re(a,b,c,d){for(var e=c.length;0<=(b=a.indexOf(c,b))&&b<d;){var g=a.charCodeAt(b-1);if(38==g||63==g)if(g=a.charCodeAt(b+e),!g||61==g||38==g||35==g)return b;b+=e+1}return-1}var se=/#|$/,te=/[?&]($|#)/;
function ue(a,b){for(var c=a.search(se),d=0,e,g=[];0<=(e=re(a,d,b,c));)g.push(a.substring(d,e)),d=Math.min(a.indexOf("&",e)+1||c,c);g.push(a.substr(d));return g.join("").replace(te,"$1")};function ve(a,b){var c;if(a instanceof ve)this.$e=q(b)?b:a.$e,we(this,a.Qf),this.Oi=a.Oi,xe(this,a.Ne),ye(this,a.nh),this.oh=a.oh,ze(this,a.a.clone()),Ae(this,a.wl);else if(a&&(c=he(String(a)))){this.$e=!!b;we(this,c[1]||"",!0);var d=c[2]||"";this.Oi=d?decodeURIComponent(d):"";xe(this,c[3]||"",!0);ye(this,c[4]);this.oh=(d=c[5]||"")?decodeURIComponent(d):"";ze(this,c[6]||"",!0);Ae(this,c[7]||"",!0)}else this.$e=!!b,this.a=new Be(null,0,this.$e)}f=ve.prototype;f.Qf="";f.Oi="";f.Ne="";f.nh=null;
f.oh="";f.wl="";f.$e=!1;f.toString=function(){var a=[],b=this.Qf;b&&a.push(Ce(b,De),":");if(b=this.Ne){a.push("//");var c=this.Oi;c&&a.push(Ce(c,De),"@");a.push(encodeURIComponent(String(b)));b=this.nh;null!=b&&a.push(":",String(b))}if(b=this.oh)this.Ne&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ce(b,"/"==b.charAt(0)?Ee:Fe));(b=this.a.toString())&&a.push("?",b);(b=this.wl)&&a.push("#",Ce(b,Ge));return a.join("")};f.clone=function(){return new ve(this)};
function we(a,b,c){a.Qf=c?b?decodeURIComponent(b):"":b;a.Qf&&(a.Qf=a.Qf.replace(/:$/,""))}function xe(a,b,c){a.Ne=c?b?decodeURIComponent(b):"":b}function ye(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.nh=b}else a.nh=null}function ze(a,b,c){b instanceof Be?(a.a=b,He(a.a,a.$e)):(c||(b=Ce(b,Ie)),a.a=new Be(b,0,a.$e))}function Je(a,b,c){a.a.set(b,c)}function Ke(a,b,c){t(c)||(c=[String(c)]);Le(a.a,b,c)}function Ae(a,b,c){a.wl=c?b?decodeURIComponent(b):"":b;return a}
function Me(a){Je(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^x()).toString(36));return a}function Ne(a){return a instanceof ve?a.clone():new ve(a,void 0)}function Oe(a,b,c,d){var e=new ve(null,void 0);a&&we(e,a);b&&xe(e,b);c&&ye(e,c);d&&(e.oh=d);return e}function Ce(a,b){return u(a)?encodeURI(a).replace(b,Pe):null}function Pe(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}
var De=/[#\/\?@]/g,Fe=/[\#\?:]/g,Ee=/[\#\?]/g,Ie=/[\#\?@]/g,Ge=/#/g;function Be(a,b,c){this.a=a||null;this.b=!!c}function Qe(a){if(!a.Ka&&(a.Ka=new $d,a.R=0,a.a))for(var b=a.a.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null,g=null;0<=d?(e=b[c].substring(0,d),g=b[c].substring(d+1)):e=b[c];e=xa(e);e=Re(a,e);a.add(e,g?xa(g):"")}}f=Be.prototype;f.Ka=null;f.R=null;f.hb=function(){Qe(this);return this.R};
f.add=function(a,b){Qe(this);this.a=null;a=Re(this,a);var c=this.Ka.get(a);c||this.Ka.set(a,c=[]);c.push(b);this.R++;return this};f.remove=function(a){Qe(this);a=Re(this,a);return ce(this.Ka.b,a)?(this.a=null,this.R-=this.Ka.get(a).length,this.Ka.remove(a)):!1};f.clear=function(){this.Ka=this.a=null;this.R=0};f.isEmpty=function(){Qe(this);return 0==this.R};function Se(a,b){Qe(a);b=Re(a,b);return ce(a.Ka.b,b)}
f.uc=function(){Qe(this);for(var a=this.Ka.ic(),b=this.Ka.uc(),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};f.ic=function(a){Qe(this);var b=[];if(u(a))Se(this,a)&&(b=bb(b,this.Ka.get(Re(this,a))));else{a=this.Ka.ic();for(var c=0;c<a.length;c++)b=bb(b,a[c])}return b};f.set=function(a,b){Qe(this);this.a=null;a=Re(this,a);Se(this,a)&&(this.R-=this.Ka.get(a).length);this.Ka.set(a,[b]);this.R++;return this};
f.get=function(a,b){var c=a?this.ic(a):[];return 0<c.length?String(c[0]):b};function Le(a,b,c){a.remove(b);0<c.length&&(a.a=null,a.Ka.set(Re(a,b),cb(c)),a.R+=c.length)}f.toString=function(){if(this.a)return this.a;if(!this.Ka)return"";for(var a=[],b=this.Ka.uc(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.ic(d),g=0;g<d.length;g++){var h=e;""!==d[g]&&(h+="="+encodeURIComponent(String(d[g])));a.push(h)}return this.a=a.join("&")};
f.clone=function(){var a=new Be;a.a=this.a;this.Ka&&(a.Ka=this.Ka.clone(),a.R=this.R);return a};function Re(a,b){var c=String(b);a.b&&(c=c.toLowerCase());return c}function He(a,b){b&&!a.b&&(Qe(a),a.a=null,ee(a.Ka,function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),Le(this,e,a))},a));a.b=b};function Te(a,b,c){a.dataset?a.dataset[Ue(b)]=c:a.setAttribute("data-"+b,c)}function G(a,b){return a.dataset?a.dataset[Ue(b)]:a.getAttribute("data-"+b)}var Ve={};function Ue(a){return Ve[a]||(Ve[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var We=n("yt.dom.getNextId_");if(!We){We=function(){return++Xe};pa("yt.dom.getNextId_",We);var Xe=0}function Ye(a,b){a=Oc(a);b=Oc(b);return!!md(a,function(a){return a===b},!0,void 0)}function Ze(a,b){var c=Qc(a,null,b);return c.length?c[0]:null}function $e(a,b){if(a in b)return b[a];var c=a.charAt(0).toUpperCase()+a.substr(1);if("moz"+c in b)return b["moz"+c];if("ms"+c in b)return b["ms"+c];if("o"+c in b)return b["o"+c];if("webkit"+c in b)return b["webkit"+c]}
function af(a,b){var c;Oa(a,function(a){c=$e(a,b);return!!c});return c}function bf(a,b){return"on"+a in b?a:"onmoz"+a in b?"moz"+a:"onms"+a in b?"ms"+a:"ono"+a in b?"o"+a:"onwebkit"+a in b?"webkit"+a:null};var cf=window.yt&&window.yt.config_||{};pa("yt.config_",cf);var df=window.yt&&window.yt.tokens_||{};pa("yt.tokens_",df);var ef=window.yt&&window.yt.msgs_||{};pa("yt.msgs_",ef);function ff(a){gf(cf,arguments)}function hf(a,b){return a in cf?cf[a]:b}function jf(a){gf(df,arguments)}function kf(a){return a in df?df[a]:void 0}function H(a,b){ha(a)&&(a=lf(a));return window.setTimeout(a,b)}function mf(a,b){ha(a)&&(a=lf(a));return window.setInterval(a,b)}function I(a){window.clearTimeout(a)}
function nf(a){window.clearInterval(a)}function lf(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw of(b),b;}}:a}function of(a){if(window&&window.yterr){var b=n("yt.www.errors.log");b?b(a):(b=hf("ERRORS")||[],b.push(a),ff("ERRORS",b))}}function pf(a){gf(ef,arguments)}function qf(a,b,c){var d=b||{};if(a=a in ef?ef[a]:c)for(var e in d)a=a.replace(RegExp("\\$"+e,"gi"),function(){return d[e]});return a}function rf(a,b){return sf(a in ef?ef[a]:{},b)}
function sf(a,b){var c=hf("I18N_PLURAL_RULES")||function(a){return 1==a?"one":"other"};return(c=a["case"+b]||a[c(b)])?c.replace("#",b.toString()):b+""}function gf(a,b){if(1<b.length){var c=b[0];a[c]=b[1]}else{var d=b[0];for(c in d)a[c]=d[c]}};function tf(a){if(a=a||window.event){for(var b in a)b in uf||(this[b]=a[b]);this.scale=a.scale;this.rotation=a.rotation;this.fd=a;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName&&b}catch(c){b=null}else"mouseover"==this.type?b=a.fromElement:"mouseout"==this.type&&(b=a.toElement);this.relatedTarget=b;this.clientX=void 0!=a.clientX?a.clientX:a.pageX;this.clientY=void 0!=a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode?a.keyCode:a.which;
this.charCode=a.charCode||("keypress"==this.type?this.keyCode:0);this.altKey=a.altKey;this.ctrlKey=a.ctrlKey;this.shiftKey=a.shiftKey;"MozMousePixelScroll"==this.type?(this.wheelDeltaX=a.axis==a.HORIZONTAL_AXIS?a.detail:0,this.wheelDeltaY=a.axis==a.HORIZONTAL_AXIS?0:a.detail):window.opera?(this.wheelDeltaX=0,this.wheelDeltaY=a.detail):0==a.wheelDelta%120?"WebkitTransform"in document.documentElement.style?window.chrome&&0==navigator.platform.indexOf("Mac")?(this.wheelDeltaX=a.wheelDeltaX/-30,this.wheelDeltaY=
a.wheelDeltaY/-30):(this.wheelDeltaX=a.wheelDeltaX/-1.2,this.wheelDeltaY=a.wheelDeltaY/-1.2):(this.wheelDeltaX=0,this.wheelDeltaY=a.wheelDelta/-1.6):(this.wheelDeltaX=a.wheelDeltaX/-3,this.wheelDeltaY=a.wheelDeltaY/-3);this.a=a.pageX;this.b=a.pageY}}function vf(a){if(document.body&&document.documentElement){var b=document.body.scrollTop+document.documentElement.scrollTop;a.a=a.clientX+(document.body.scrollLeft+document.documentElement.scrollLeft);a.b=a.clientY+b}}
function wf(a){q(a.a)||vf(a);return a.a}function xf(a){q(a.b)||vf(a);return a.b}f=tf.prototype;f.fd=null;f.type="";f.target=null;f.relatedTarget=null;f.currentTarget=null;f.data=null;f.source=null;f.state=null;f.keyCode=0;f.charCode=0;f.altKey=!1;f.ctrlKey=!1;f.shiftKey=!1;f.clientX=0;f.clientY=0;f.wheelDeltaX=0;f.wheelDeltaY=0;f.rotation=0;f.scale=1;f.preventDefault=function(){this.fd.returnValue=!1;this.fd.preventDefault&&this.fd.preventDefault()};
f.stopPropagation=function(){this.fd.cancelBubble=!0;this.fd.stopPropagation&&this.fd.stopPropagation()};f.stopImmediatePropagation=function(){this.fd.cancelBubble=!0;this.fd.stopImmediatePropagation&&this.fd.stopImmediatePropagation()};var uf={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var yf=n("yt.events.listeners_")||{};pa("yt.events.listeners_",yf);var zf=n("yt.events.counter_")||{count:0};pa("yt.events.counter_",zf);function Af(a,b,c,d){return Ob(yf,function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function J(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=Af(a,b,c,d);if(e)return e;var e=++zf.count+"",g=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=g?function(d){d=new tf(d);if(!md(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new tf(b);b.currentTarget=a;return c.call(a,b)};h=lf(h);yf[e]=[a,b,c,h,d];a.addEventListener?"mouseenter"==b&&g?a.addEventListener("mouseover",
h,d):"mouseleave"==b&&g?a.addEventListener("mouseout",h,d):"mousewheel"==b&&"MozBoxSizing"in document.documentElement.style?a.addEventListener("MozMousePixelScroll",h,d):a.addEventListener(b,h,d):a.attachEvent("on"+b,h);return e}function Bf(a,b){var c;return c=J(a,"timeupdate",function(){Cf(c);b.apply(a,arguments)},void 0)}
function Df(a,b,c){b=b.toLowerCase();var d=c,e="mouse"+b;if($e("pointerEnabled",window.navigator))e="MSPointer"+b.charAt(0).toUpperCase()+b.substr(1);else if(bf("touchstart",document)){d=b;switch(b){case "down":d="start";break;case "up":d="end";break;case "over":d="enter";break;case "out":d="leave"}e="touch"+d;d=function(a){z(null,function(b){var d=new tf(a);w(d,b);c(d)})}}return J(a,e,d)}function Ef(a,b,c){Ff(a,"change",b,function(a){return a.nodeName.toLowerCase()===c.toLowerCase()&&!0})}
function Gf(a,b,c){return Ff(a,"click",b,function(a){return Ic(a,c)})}function Ff(a,b,c,d){var e=a||document;return J(e,b,function(a){var b=md(a.target,function(a){return a===e||d(a)},!0);b&&b!==e&&!b.disabled&&(a.currentTarget=b,c.call(b,a))})}function Cf(a){a&&("string"==typeof a&&(a=[a]),z(a,function(a){if(a in yf){var c=yf[a],d=c[0],e=c[1],g=c[3],c=c[4];d.removeEventListener?d.removeEventListener(e,g,c):d.detachEvent&&d.detachEvent("on"+e,g);delete yf[a]}}))}
function Hf(a){for(var b in yf)yf[b][0]==a&&Cf(b)}function If(a,b){if(document.createEvent){var c=document.createEvent("HTMLEvents");c.initEvent(b,!0,!0);a.dispatchEvent(c)}else c=document.createEventObject(),a.fireEvent("on"+b,c)};function Jf(){return!!af(["fullscreenEnabled","fullScreenEnabled"],document)}function Kf(){return af(["fullscreenElement","fullScreenElement"],document)};function Lf(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||Qb(Mf);this.assets=a.assets||{};this.attrs=a.attrs||Qb(Nf);this.params=a.params||Qb(Of);this.minVersion=a.min_version||"8.0.0";this.fallback=a.fallback||null;this.fallbackMessage=a.fallbackMessage||null;this.html5=!!a.html5;this.disable=a.disable||{};this.loaded=!!a.loaded}var Mf={enablejsapi:1},Nf={},Of={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
Lf.prototype.clone=function(){var a=new Lf,b;for(b in this){var c=this[b];"object"==da(c)?a[b]=Qb(c):a[b]=c}return a};function Pf(a){a&&(this.name=ya(a.name),this.mb=a.screenId,this.kc=a.loungeToken,this.Bb=a.dialId||"")}f=Pf.prototype;f.name="";f.mb="";f.kc="";f.Bb="";f.fq=function(){return{key:this.mb,name:this.name}};f.toString=function(){var a=this.kc?this.kc.slice(-6):"null";return"{name:"+this.name+",screenId:"+this.mb+",loungeToken:..."+a+",dialId:"+this.Bb+"}"};function Qf(a){return a?a.toString():"null"}function Rf(a){a=a||[];return"["+Na(a,function(a){return Qf(a)}).join(",")+"]"};function Sf(a){this.a=a}var Tf=/\s*;\s*/;f=Sf.prototype;f.set=function(a,b,c,d,e,g){if(/[;=\s]/.test(a))throw Error('Invalid cookie name "'+a+'"');if(/[;\r\n]/.test(b))throw Error('Invalid cookie value "'+b+'"');q(c)||(c=-1);e=e?";domain="+e:"";d=d?";path="+d:"";g=g?";secure":"";c=0>c?"":0==c?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(x()+1E3*c)).toUTCString();this.a.cookie=a+"="+b+e+d+c+g};
f.get=function(a,b){for(var c=a+"=",d=(this.a.cookie||"").split(Tf),e=0,g;g=d[e];e++){if(0==g.lastIndexOf(c,0))return g.substr(c.length);if(g==a)return""}return b};f.remove=function(a,b,c){var d=q(this.get(a));this.set(a,"",0,b,c);return d};f.uc=function(){return Uf(this).keys};f.ic=function(){return Uf(this).Kv};f.isEmpty=function(){return!this.a.cookie};f.hb=function(){return this.a.cookie?(this.a.cookie||"").split(Tf).length:0};f.clear=function(){for(var a=Uf(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};
function Uf(a){a=(a.a.cookie||"").split(Tf);for(var b=[],c=[],d,e,g=0;e=a[g];g++)d=e.indexOf("="),-1==d?(b.push(""),c.push(e)):(b.push(e.substring(0,d)),c.push(e.substring(d+1)));return{keys:b,Kv:c}}var Vf=new Sf(document);Vf.b=3950;function Wf(){};function Xf(){}y(Xf,Wf);Xf.prototype.hb=function(){var a=0;Yd(this.Id(!0),function(){a++});return a};Xf.prototype.clear=function(){var a=Zd(this.Id(!0)),b=this;z(a,function(a){b.remove(a)})};function Yf(a){this.a=a}y(Yf,Xf);f=Yf.prototype;f.isAvailable=function(){if(!this.a)return!1;try{return this.a.setItem("__sak","1"),this.a.removeItem("__sak"),!0}catch(a){return!1}};f.set=function(a,b){try{this.a.setItem(a,b)}catch(c){if(0==this.a.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};f.get=function(a){a=this.a.getItem(a);if(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};f.remove=function(a){this.a.removeItem(a)};
f.hb=function(){return this.a.length};f.Id=function(a){var b=0,c=this.a,d=new Wd;d.next=function(){if(b>=c.length)throw Vd;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!u(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};f.clear=function(){this.a.clear()};f.key=function(a){return this.a.key(a)};function Zf(){var a=null;try{a=window.localStorage||null}catch(b){}this.a=a}y(Zf,Yf);function $f(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.a=a}y($f,Yf);function ag(a){this.Kf=a;this.$p=new tb}f=ag.prototype;f.Kf=null;f.$p=null;f.set=function(a,b){q(b)?this.Kf.set(a,sb(this.$p,b)):this.Kf.remove(a)};f.get=function(a){var b;try{b=this.Kf.get(a)}catch(c){return}if(null!==b)try{return pb(b)}catch(d){throw"Storage: Invalid value was encountered";}};f.remove=function(a){this.Kf.remove(a)};function bg(a){ag.call(this,a)}y(bg,ag);function cg(a){this.data=a}function dg(a){return!q(a)||a instanceof cg?a:new cg(a)}bg.prototype.set=function(a,b){bg.C.set.call(this,a,dg(b))};bg.prototype.a=function(a){a=bg.C.get.call(this,a);if(!q(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};bg.prototype.get=function(a){if(a=this.a(a)){if(a=a.data,!q(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function eg(a){ag.call(this,a)}y(eg,bg);function fg(a){var b=a.creation;a=a.expiration;return!!a&&a<x()||!!b&&b>x()}eg.prototype.set=function(a,b,c){if(b=dg(b)){if(c){if(c<x()){eg.prototype.remove.call(this,a);return}b.expiration=c}b.creation=x()}eg.C.set.call(this,a,b)};eg.prototype.a=function(a,b){var c=eg.C.a.call(this,a);if(c)if(!b&&fg(c))eg.prototype.remove.call(this,a);else return c};function gg(a){ag.call(this,a)}y(gg,eg);function hg(a,b){var c=[];Yd(b,function(a){var b;try{b=gg.prototype.a.call(this,a,!0)}catch(g){if("Storage: Invalid value was encountered"==g)return;throw g;}q(b)?fg(b)&&c.push(a):c.push(a)},a);return c}function ig(a,b){var c=hg(a,b);z(c,function(a){gg.prototype.remove.call(this,a)},a)};function jg(a,b,c){var d=c&&0<c?c:0;c=d?x()+1E3*d:0;if((d=d?kg:lg)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function mg(a){if(!lg&&!kg||!window.JSON)return null;var b;try{b=lg.get(a),b=u(b)?b:kg.get(a)}catch(c){return null}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(d){}return b}function ng(a){lg&&lg.remove(a);kg&&kg.remove(a)}var kg,og=new Zf;kg=og.isAvailable()?new gg(og):null;var lg,pg=new $f;lg=pg.isAvailable()?new gg(pg):null;function qg(a){a&&(this.id=a.id||"",this.name=ya(a.name||""),this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}f=qg.prototype;f.id="";f.name="";f.activityId="";f.status="UNKNOWN";f.fq=function(){return{key:this.id,name:this.name}};function rg(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}f.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.activityId+",status:"+this.status+"}"};
function sg(a){a=a||[];return"["+Na(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function tg(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})}function ug(a,b){return Ra(a,function(a){return a.key==b})}function vg(a){return Na(a,function(a){return a.fq()})}function wg(a){return Na(a,function(a){return rg(a)})}function xg(a){return Na(a,function(a){return new qg(a)})}function yg(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}
function zg(a,b){return Ra(a,function(a){return a.id==b})}function Ag(a){return Na(a,function(a){return{name:a.name,screenId:a.mb,loungeToken:a.kc,dialId:a.Bb}})}function Bg(a){return Na(a,function(a){return new Pf(a)})}function Cg(a,b){return a||b?a&&b?a.mb==b.mb:!1:!0}function Dg(a,b){return a||b?a&&b?a.mb==b.mb&&a.kc==b.kc&&a.name==b.name&&a.Bb==b.Bb:!1:!0}function Eg(a,b){return Ra(a,function(a){return Cg(a,b)})}function Fg(a,b){return Ra(a,function(a){return b==a.mb||b==a.Bb})};function Gg(){var a=Hg(),b=Ig();Va(a,b);Jg()&&nb(a,b);a=Kg(a);Wa(a)?Vf.remove("remote_sid","/","youtube.com"):(a=a.join(","),Vf.set("remote_sid",a,void 0,"/","youtube.com"))}function Hg(){var a=mg("yt-remote-connected-devices")||[];ib(a);return a}function Kg(a){if(Wa(a))return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return Na(a,function(a,b){return 0==b?a:a.substring(c.length)})}function Lg(a){jg("yt-remote-connected-devices",a,86400)}
function Ig(){if(Mg)return Mg;var a=mg("yt-remote-device-id");a||(a=tg(),jg("yt-remote-device-id",a,31536E3));for(var b=Hg(),c=1,d=a;Va(b,d);)c++,d=a+"#"+c;return Mg=d}function Ng(){return mg("yt-remote-session-browser-channel")}function Jg(){return mg("yt-remote-session-screen-id")}
function Og(a){5<a.length&&(a=a.slice(a.length-5));var b=Na(Pg(),function(a){return a.loungeToken}),c=Na(a,function(a){return a.loungeToken});Pa(c,function(a){return!Va(b,a)})&&jg("yt-remote-lounge-token-expiration",!0,86400);jg("yt-remote-local-screens",a,31536E3)}function Pg(){return mg("yt-remote-local-screens")||[]}function Qg(){return mg("yt-remote-online-screens")||[]}function Rg(a){jg("yt-remote-online-dial-devices",a,30)}function Sg(){return mg("yt-remote-online-dial-devices")||[]}
function Tg(a,b){a?jg("yt-remote-session-video-id",a):ng("yt-remote-session-video-id");b?jg("yt-remote-session-list-id",b):ng("yt-remote-session-list-id")}function Ug(a){a||(ng("yt-remote-session-screen-id"),ng("yt-remote-session-video-id"),ng("yt-remote-session-list-id"));Gg();a=Hg();Za(a,Ig());Lg(a)}var Mg="";function Vg(){var a=Bg(Qg()),b=xg(Sg()),b=Ma(b,function(b){return!Fg(a,b.id)});return vg(bb(a,b))};function K(){}K.prototype.Mc=!1;K.prototype.ha=function(){return this.Mc};K.prototype.dispose=function(){this.Mc||(this.Mc=!0,this.H())};function L(a,b){Wg(a,oa(Xg,b))}function Wg(a,b){a.tb||(a.tb=[]);a.tb.push(v(b,void 0))}K.prototype.H=function(){if(this.tb)for(;this.tb.length;)this.tb.shift()()};function Xg(a){a&&"function"==typeof a.dispose&&a.dispose()}function Yg(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];fa(d)?Yg.apply(null,d):Xg(d)}};function Zg(a,b){this.app=a;this.b=null;this.i={};this.g={};this.o={};this.k={};this.j=null;this.a=b;N(this,"cueVideoById",this.xs);N(this,"loadVideoById",this.Tj);N(this,"cueVideoByUrl",this.ys);N(this,"loadVideoByUrl",this.Us);N(this,"playVideo",this.rg);N(this,"pauseVideo",this.bn);N(this,"stopVideo",this.zj);N(this,"clearVideo",this.vs);N(this,"getVideoBytesLoaded",this.Js);N(this,"getVideoBytesTotal",this.Ks);N(this,"getVideoLoadedFraction",this.Ms);N(this,"getVideoStartBytes",this.Ns);N(this,
"cuePlaylist",this.ws);N(this,"loadPlaylist",this.Ts);N(this,"nextVideo",this.Ws);N(this,"previousVideo",this.Xs);N(this,"playVideoAt",this.nm);N(this,"setShuffle",this.dt);N(this,"setLoop",this.Zs);N(this,"getPlaylist",this.wb);N(this,"getPlaylistIndex",this.Zj);N(this,"getPlaylistId",this.Hs);N(this,"loadModule",this.Ss);N(this,"unloadModule",this.Ym);N(this,"setOption",this.Xm);N(this,"getOption",this.yj);N(this,"getOptions",this.Ds);N(this,"mute",this.Km);N(this,"unMute",this.Mm);N(this,"isMuted",
this.Qs);N(this,"setVolume",this.Lm);N(this,"getVolume",this.Jm);N(this,"seekTo",this.Th);N(this,"getPlayerState",this.Gs);N(this,"getPlaybackRate",this.Fs);N(this,"setPlaybackRate",this.ct);N(this,"getAvailablePlaybackRates",this.As);N(this,"getPlaybackQuality",this.Es);N(this,"setPlaybackQuality",this.$s);N(this,"getAvailableQualityLevels",this.Bs);N(this,"getCurrentTime",this.getCurrentTime);N(this,"getDuration",this.vg);N(this,"addEventListener",this.addEventListener);N(this,"removeEventListener",
this.removeEventListener);N(this,"getVideoUrl",this.Os);N(this,"getDebugText",this.Cs);N(this,"getVideoEmbedCode",this.Ls);N(this,"getVideoData",this.getVideoData);N(this,"addCueRange",this.us);N(this,"removeCueRange",this.Ys);N(this,"setSize",this.ft);N(this,"getApiInterface",this.zs);N(this,"destroy",this.destroy);N(this,"showVideoInfo",this.gt);N(this,"hideVideoInfo",this.Ps);this.g.logFallback=v(this.Vs,this);this.g.isNotServable=v(this.Rs,this);this.g.getUpdatedConfigurationData=v(this.Is,this);
this.g.updateRemoteReceivers=v(this.ht,this)}y(Zg,K);function N(a,b,c){a.i[b]=v(c,a)}f=Zg.prototype;f.zs=function(){return Mb(this.i)};f.N=function(){return this.b};f.addEventListener=function(a,b){var c=b;u(b)&&(c=function(){n(b).apply(window,arguments)},this.o[b]=c);this.app.D(a,c)};f.eu=function(a,b){var c=u(b)?a+b:a+ja(b);if(!this.k[c]){u(b)&&(b=function(){n(b).apply(window,arguments)});var d=v(function(a){b({target:this.j,data:a})},this);this.k[c]=d;this.addEventListener(a,d)}};
f.removeEventListener=function(a,b){var c=b;if(u(b)&&b in this.o){var c=this.o[b],d=this.o;b in d&&delete d[b]}this.app.$(a,c)};f.fu=function(a,b){var c=u(b)?a+b:a+ja(b);this.k[c]&&this.removeEventListener(a,this.k[c])};f.Gs=function(){return this.app.aa};f.Th=function(a,b){$g(this.app,!0,this.a);ah(this.app,a,b,void 0,this.a)};f.getCurrentTime=function(){var a=this.app.Ud;return a&&O(this.app).b!=a?a.getCurrentTime():this.app.getCurrentTime(this.a)};
f.vg=function(){var a=this.app.Ud;return a?a.Rd:0};f.Jm=function(){return this.app.wa.volume};f.Lm=function(a){var b=this.app;b.wa.volume=a;b.u("internalvolumechange",b.wa)};f.Qs=function(){return this.app.wa.muted};f.Km=function(){bh(this.app)};f.Mm=function(){ch(this.app)};f.rg=function(){$g(this.app,!0,this.a);dh(this.app,this.a)};f.bn=function(){eh(this.app,this.a)};f.zj=function(){var a=this.app;fh(a,"play_pause")||gh(a,this.a)};f.vs=function(){};f.Fs=function(){return this.app.Fg};
f.ct=function(a){hh(this.app,a)};f.As=function(){return this.app.a.hg?ih:[1]};f.Es=function(){return jh(this.app,this.a)};f.$s=function(a){var b=O(this.app,this.a);b&&kh(b,"m",a)};f.Bs=function(){return lh(this.app,this.a)};f.Js=function(){var a=mh(this.app.Ud);return Math.floor(1E3*a)};f.Ks=function(){return 1E3};f.Ms=function(){return mh(this.app.Ud)};f.Ns=function(){return 0};f.ft=function(){this.app.S.Fi()};f.Ss=function(a){(a=nh(this.app.k,a))&&a.load()};
f.Ym=function(a){(a=nh(this.app.k,a))&&a.unload()};f.Tj=function(a,b,c){var d=this.app,e=this.a;a=oh(d,ph(a,d.list,b,c),e);$g(d,a,e)};f.xs=function(a,b,c){var d=this.app,e=this.a;qh(d,new rh(ph(a,d.list,b,c)),e)};f.Us=function(a,b,c){var d=this.app,e=this.a;a=sh(a,d.list,b,c);b=oh(d,a,e);$g(d,b,e);th(d,a.mediaContentUrl)};f.ys=function(a,b,c){var d=this.app,e=this.a;a=sh(a,d.list,b,c);qh(d,new rh(a),e);th(d,a.mediaContentUrl)};f.Os=function(){return uh(this.app)};f.Cs=function(){return vh(this.app)};
f.Ls=function(){return""};f.us=function(){return!1};f.Ys=function(){};f.Ts=function(a,b,c,d){var e=this.app;e.Xe=!1;wh(e,a,b,c,d)};f.ws=function(a,b,c,d){var e=this.app;e.Xe=!0;wh(e,a,b,c,d)};f.Ws=function(){xh(this.app)};f.Xs=function(){yh(this.app)};f.nm=function(a){var b=this.app;b.g&&(b.g.Vd?zh(b,Ah(b.g,a)):b.Xe=!1,Bh(b.g,a))};f.dt=function(a){var b=this.app;b.g&&Ch(b.g,a)};f.Zs=function(a){var b=this.app;b.g&&(b.g.loop=a)};
f.wb=function(){var a=this.app.g;if(!a)return null;for(var b=[],c=0;c<a.Mb;c++)b[c]=Ah(a,c).M;return b};f.Zj=function(){var a=this.app.g?this.app.g.ua:null;return null==a?-1:a};f.Hs=function(){return this.app.g&&this.app.g.g?this.app.g.g.toString():null};f.Xm=function(a,b,c){return Dh(this.app.k,a,b,c)};f.yj=function(a,b,c){return Dh(this.app.k,a,b,c)};f.Ds=function(a){return Eh(this.app.k,a)};f.getVideoData=function(){var a=this.app.getVideoData(this.a)||{};return{video_id:a.M,author:a.author,title:a.title}};
f.gt=function(){Fh(this.app.S)};f.Ps=function(){this.app.S.nk()};f.Vs=function(){Gh(this.app.b,204)};f.Rs=function(){var a=Hh(this.app);return!(!a||!P(a,128)||5!=a.a.errorCode)};f.Is=function(){var a=this.app,b=a.J.clone();if(a=a.b.getVideoData()){var c=b.args,d=Qb(a.b);d.start=a.xa;w(c,d)}return b};f.ht=function(a){var b=this.app;Ih(b.a)&&6!=b.o&&(b.a.qg=!Wa(a),b.a.qg?1!=b.o&&3!=b.o&&Jh(b):Kh(b.G))};f.destroy=function(){this.app.dispose()};
f.H=function(){if(this.b){for(var a in this.i)this.b[a]=null;for(a in this.g)this.b[a]=null}this.o=this.k=this.b=null;Zg.C.H.call(this)};function Lh(a,b){Zg.call(this,a,b);N(this,"cueVideoByPlayerVars",this.xx);N(this,"loadVideoByPlayerVars",this.Co);N(this,"preloadVideoByPlayerVars",this.Ax);N(this,"seekBy",this.Np);N(this,"enableLicenseIntercept",this.yx);N(this,"updatePlaylist",this.Ex);N(this,"resumeLicenseSession",this.Bx);N(this,"updateLastActiveTime",this.Cx);N(this,"updateVideoData",this.Fx);N(this,"getStoryboardFormat",this.zx)}y(Lh,Zg);f=Lh.prototype;f.xx=function(a){var b=this.a;qh(this.app,new rh(a),b)};
f.Co=function(a){oh(this.app,a,this.a)};f.Ax=function(){};f.Np=function(a,b,c){$g(this.app,!0,this.a);var d=this.app,e=this.a;ah(d,d.getCurrentTime()+a,b,c,e)};f.yx=function(){var a=this.app;a.Rk||(a.Rk=!0,a.zi={})};f.Ex=function(){var a=this.app;Mh(a);a.Wa("onPlaylistUpdate")};f.Bx=function(a,b){var c=this.app,d=c.zi[a];d&&(Nh(d,b),d.start(),delete c.zi[a])};f.Cx=function(){this.app.a.Sa=x()};f.Fx=function(a){var b=O(this.app,this.a||1);b&&(b=b.a,Oh(b,a),b.u("dataupdated"))};f.zx=function(){return this.app.getVideoData().b.storyboard_spec};
f.getVideoData=function(){var a=Lh.C.getVideoData.call(this),b=this.app.getVideoData(this.a)||{};a.cpn=b.Ea;return a};f.getCurrentTime=function(a){return a?this.app.getCurrentTime(a):Lh.C.getCurrentTime.call(this)};f.vg=function(a){return a?Ph(this.app,a):Lh.C.vg.call(this)};function Qh(a,b){Lh.call(this,a,b)}y(Qh,Lh);f=Qh.prototype;f.Tj=function(a,b,c){oh(this.app,ph(a,this.app.list,b,c),this.a)};f.rg=function(){dh(this.app,this.a)};f.Th=function(a,b){ah(this.app,a,b,void 0,this.a)};function Q(a){return a.app.S.a}f.K=function(){return this.app.K()};f.wb=function(){return this.app.g};f.getVideoData=function(){return this.app.getVideoData(this.a)};function Rh(a){this.j=Math.exp(Math.log(0.5)/a);this.a=this.g=0}Rh.prototype.b=function(a,b){var c=Math.pow(this.j,a);this.a=b*(1-c)+c*this.a;this.g+=a};Rh.prototype.i=function(){return this.a/(1-Math.pow(this.j,this.g))};function Sh(a,b){this.o=0;this.j=a;this.F=b||0.5;this.k="index";this.a=0;this.g=[]}Sh.prototype.b=function(a,b){Th(this,"index");this.g.push({index:this.o++,fh:a,value:b});this.a+=a;for(Th(this,"index");this.a>this.j;){var c=this.a-this.j,d=this.g[0];d.fh<=c?(this.a-=d.fh,this.g.shift()):(this.a-=c,d.fh-=c)}};function Uh(a,b){Th(a,"value");var c=b*a.a,d=0,e=NaN;a.g.some(function(a){d+=a.fh;e=a.value;if(d>=c)return!0});return e}Sh.prototype.i=function(){return Uh(this,this.F)};
function Th(a,b){a.k!=b&&(a.k=b,kb(a.g,b))};function Vh(a){var b=mg(a);if(!b){var c=new Zf;c.isAvailable()&&(b=(new ag(c)).get(a))}return b}function Wh(){var a={volume:100,muted:!1,nonNormalized:100},b=Vh("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:yb(b.volume,0,100);a.nonNormalized=isNaN(b.nonNormalized)?a.volume:b.nonNormalized;a.muted=void 0==b.muted?!1:b.muted;return a};function Xh(a){this.i=this.j=0;a.Nc?this.b=new Rh(16):this.b=new Sh(16,0.6);a.re||"play"==a.Ca?this.g=new Rh(4):this.g=new Sh(16,0.6);a.Ql?this.a=new Sh(8,0.6):a.Ol?this.a=new Sh(16,0.6):a.Pl?this.a=new Sh(24,0.6):"play"==a.Ca?this.a=new Rh(15):this.a=new Sh(15,0.6);var b=Vh("yt-player-bandwidth");a=a.nc?0.1:0.5;b&&!isNaN(b.byterate)?this.a.b(a,b.byterate):this.a.b(a,13E4)}function Yh(a){a=a.b.i();return a=isNaN(a)?0.5:a}function Zh(a){return a.g.i()||0}function $h(a){a=a.a.i();return 0<a?a:1};function ai(){this.a=[];this.Sb={}}y(ai,K);f=ai.prototype;f.dp=1;f.Li=0;f.D=function(a,b,c){var d=this.Sb[a];d||(d=this.Sb[a]=[]);var e=this.dp;this.a[e]=a;this.a[e+1]=b;this.a[e+2]=c;this.dp=e+3;d.push(e);return e};f.$=function(a,b,c){if(a=this.Sb[a]){var d=this.a;if(a=Ra(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.Tc(a)}return!1};
f.Tc=function(a){if(0!=this.Li)return this.b||(this.b=[]),this.b.push(a),!1;var b=this.a[a];if(b){var c=this.Sb[b];c&&Za(c,a);delete this.a[a];delete this.a[a+1];delete this.a[a+2]}return!!b};f.u=function(a,b){var c=this.Sb[a];if(c){this.Li++;for(var d=fb(arguments,1),e=0,g=c.length;e<g;e++){var h=c[e];this.a[h+1].apply(this.a[h+2],d)}this.Li--;if(this.b&&0==this.Li)for(;c=this.b.pop();)this.Tc(c);return 0!=e}return!1};
f.clear=function(a){if(a){var b=this.Sb[a];b&&(z(b,this.Tc,this),delete this.Sb[a])}else this.a.length=0,this.Sb={}};f.hb=function(a){if(a){var b=this.Sb[a];return b?b.length:0}a=0;for(b in this.Sb)a+=this.hb(b);return a};f.H=function(){ai.C.H.call(this);delete this.a;delete this.Sb;delete this.b};function bi(a,b){this.start=a;this.end=b;this.a=ja(this)}function ci(a,b){return a.start!=b.start?a.start-b.start:a.end!=b.end?a.end-b.end:a.a!=b.a?a.a-b.a:0}bi.prototype.contains=function(a,b){return a>=this.start&&(a<this.end||a==this.end&&this.start==this.end)&&(null==b||a<b&&b<=this.end)};bi.prototype.toString=function(){return"Interval["+this.start+", "+this.end+"]"};function di(a,b,c){bi.call(this,a,b);a=c||{};this.Ba=a.id||"";void 0!=a.priority&&(this.ph=a.priority);this.namespace=a.namespace||"";this.Rc=a.visible||!1;this.xb=new ai}y(di,bi);f=di.prototype;f.Ba="";f.ph=7;f.active=!0;f.Rc=!1;f.xb=null;f.namespace="";f.getId=function(){return this.Ba};function ei(a,b){return a.start==b.start?a.ph==b.ph?0:a.ph<b.ph?-1:1:a.start<b.start?-1:1};function fi(a,b){this.type=a;this.currentTarget=this.target=b}f=fi.prototype;f.dispose=function(){};f.oe=!1;f.defaultPrevented=!1;f.ap=!0;f.stopPropagation=function(){this.oe=!0};f.preventDefault=function(){this.defaultPrevented=!0;this.ap=!1};function gi(a){gi[" "](a);return a}gi[" "]=ba;var hi=!C||xc(9),ii=C&&!wc("9");!ic||wc("528");hc&&wc("1.9b")||C&&wc("8")||gc&&wc("9.5")||ic&&wc("528");hc&&!wc("8")||C&&wc("9");function ji(a,b){a&&this.init(a,b)}y(ji,fi);f=ji.prototype;f.target=null;f.relatedTarget=null;f.clientX=0;f.clientY=0;f.keyCode=0;f.charCode=0;f.ctrlKey=!1;f.altKey=!1;f.shiftKey=!1;f.ne=null;
f.init=function(a,b){var c=this.type=a.type;fi.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(hc){var e;t:{try{gi(d.nodeName);e=!0;break t}catch(g){}e=!1}e||(d=null)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;
this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.state=a.state;this.ne=a;a.defaultPrevented&&this.preventDefault();delete this.oe};f.stopPropagation=function(){ji.C.stopPropagation.call(this);this.ne.stopPropagation?this.ne.stopPropagation():this.ne.cancelBubble=!0};f.preventDefault=function(){ji.C.preventDefault.call(this);var a=this.ne;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,ii)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};f.Tx=function(){return this.ne};var ki="closure_listenable_"+(1E6*Math.random()|0);function li(a){try{return!(!a||!a[ki])}catch(b){return!1}}var mi=0;function ni(a,b,c,d,e){this.Ze=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.gb=e;this.key=++mi;this.removed=this.Ki=!1}function oi(a){a.removed=!0;a.Ze=null;a.proxy=null;a.src=null;a.gb=null};function pi(a){this.src=a;this.a={};this.b=0}pi.prototype.add=function(a,b,c,d,e){var g=this.a[a];g||(g=this.a[a]=[],this.b++);var h=qi(g,b,d,e);-1<h?(a=g[h],c||(a.Ki=!1)):(a=new ni(b,this.src,a,!!d,e),a.Ki=c,g.push(a));return a};pi.prototype.remove=function(a,b,c,d){if(!(a in this.a))return!1;var e=this.a[a];b=qi(e,b,c,d);return-1<b?(oi(e[b]),$a(e,b),0==e.length&&(delete this.a[a],this.b--),!0):!1};
function ri(a,b){var c=b.type;if(!(c in a.a))return!1;var d=Za(a.a[c],b);d&&(oi(b),0==a.a[c].length&&(delete a.a[c],a.b--));return d}pi.prototype.removeAll=function(a){var b=0,c;for(c in this.a)if(!a||c==a){for(var d=this.a[c],e=0;e<d.length;e++)++b,oi(d[e]);delete this.a[c];this.b--}return b};function si(a,b,c,d,e){a=a.a[b];b=-1;a&&(b=qi(a,c,d,e));return-1<b?a[b]:null}function qi(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.removed&&g.Ze==b&&g.capture==!!c&&g.gb==d)return e}return-1};var ti="closure_lm_"+(1E6*Math.random()|0),ui={},vi=0;function wi(a,b,c,d,e){if(t(b)){for(var g=0;g<b.length;g++)wi(a,b[g],c,d,e);return null}c=xi(c);if(li(a))a=a.listen(b,c,d,e);else{if(!b)throw Error("Invalid event type");var g=!!d,h=yi(a);h||(a[ti]=h=new pi(a));c=h.add(b,c,!1,d,e);c.proxy||(d=zi(),c.proxy=d,d.src=a,d.Ze=c,a.addEventListener?a.addEventListener(b,d,g):a.attachEvent(b in ui?ui[b]:ui[b]="on"+b,d),vi++);a=c}return a}
function zi(){var a=Ai,b=hi?function(c){return a.call(b.src,b.Ze,c)}:function(c){c=a.call(b.src,b.Ze,c);if(!c)return c};return b}function Bi(a,b,c,d,e){if(t(b))for(var g=0;g<b.length;g++)Bi(a,b[g],c,d,e);else c=xi(c),li(a)?a.cc(b,c,d,e):a&&(a=yi(a))&&(b=si(a,b,c,!!d,e))&&Ci(b)}
function Ci(a){if(ga(a)||!a||a.removed)return!1;var b=a.src;if(li(b))return ri(b.dd,a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(c in ui?ui[c]:ui[c]="on"+c,d);vi--;(c=yi(b))?(ri(c,a),0==c.b&&(c.src=null,b[ti]=null)):oi(a);return!0}function Di(a,b,c,d){var e=1;if(a=yi(a))if(b=a.a[b])for(b=cb(b),a=0;a<b.length;a++){var g=b[a];g&&g.capture==c&&!g.removed&&(e&=!1!==Ei(g,d))}return Boolean(e)}
function Ei(a,b){var c=a.Ze,d=a.gb||a.src;a.Ki&&Ci(a);return c.call(d,b)}
function Ai(a,b){if(a.removed)return!0;if(!hi){var c=b||n("window.event"),d=new ji(c,this),e=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){t:{var g=!1;if(0==c.keyCode)try{c.keyCode=-1;break t}catch(h){g=!0}if(g||void 0==c.returnValue)c.returnValue=!0}c=[];for(g=d.currentTarget;g;g=g.parentNode)c.push(g);for(var g=a.type,k=c.length-1;!d.oe&&0<=k;k--)d.currentTarget=c[k],e&=Di(c[k],g,!0,d);for(k=0;!d.oe&&k<c.length;k++)d.currentTarget=c[k],e&=Di(c[k],g,!1,d)}return e}return Ei(a,new ji(b,this))}
function yi(a){a=a[ti];return a instanceof pi?a:null}var Fi="__closure_events_fn_"+(1E9*Math.random()>>>0);function xi(a){return ha(a)?a:a[Fi]||(a[Fi]=function(b){return a.handleEvent(b)})};function Gi(){this.dd=new pi(this);this.U=this}y(Gi,K);Gi.prototype[ki]=!0;f=Gi.prototype;f.El=null;f.addEventListener=function(a,b,c,d){wi(this,a,b,c,d)};f.removeEventListener=function(a,b,c,d){Bi(this,a,b,c,d)};
function Hi(a,b){var c,d=a.El;if(d){c=[];for(var e=1;d;d=d.El)c.push(d),++e}var d=a.U,e=b,g=e.type||e;if(u(e))e=new fi(e,d);else if(e instanceof fi)e.target=e.target||d;else{var h=e,e=new fi(g,d);Tb(e,h)}var h=!0,k;if(c)for(var m=c.length-1;!e.oe&&0<=m;m--)k=e.currentTarget=c[m],h=Ii(k,g,!0,e)&&h;e.oe||(k=e.currentTarget=d,h=Ii(k,g,!0,e)&&h,e.oe||(h=Ii(k,g,!1,e)&&h));if(c)for(m=0;!e.oe&&m<c.length;m++)k=e.currentTarget=c[m],h=Ii(k,g,!1,e)&&h}
f.H=function(){Gi.C.H.call(this);this.dd&&this.dd.removeAll(void 0);this.El=null};f.listen=function(a,b,c,d){return this.dd.add(a,b,!1,c,d)};f.cc=function(a,b,c,d){return this.dd.remove(a,b,c,d)};function Ii(a,b,c,d){b=a.dd.a[b];if(!b)return!0;b=cb(b);for(var e=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.removed&&h.capture==c){var k=h.Ze,m=h.gb||h.src;h.Ki&&ri(a.dd,h);e=!1!==k.call(m,d)&&e}}return e&&!1!=d.ap};function Ji(a,b){Gi.call(this);this.a=a||1;this.b=b||l;this.g=v(this.bu,this);this.i=x()}y(Ji,Gi);f=Ji.prototype;f.Uc=!1;f.hc=null;function Ki(a,b){a.a=b;a.hc&&a.Uc?(a.stop(),a.start()):a.hc&&a.stop()}f.bu=function(){if(this.Uc){var a=x()-this.i;0<a&&a<0.8*this.a?this.hc=this.b.setTimeout(this.g,this.a-a):(this.hc&&(this.b.clearTimeout(this.hc),this.hc=null),Hi(this,"tick"),this.Uc&&(this.hc=this.b.setTimeout(this.g,this.a),this.i=x()))}};
f.start=function(){this.Uc=!0;this.hc||(this.hc=this.b.setTimeout(this.g,this.a),this.i=x())};f.stop=function(){this.Uc=!1;this.hc&&(this.b.clearTimeout(this.hc),this.hc=null)};f.H=function(){Ji.C.H.call(this);this.stop();delete this.b};function Li(a,b,c){if(ha(a))c&&(a=v(a,c));else if(a&&"function"==typeof a.handleEvent)a=v(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:l.setTimeout(a,b||0)};function Mi(){this.a=[]}function Ni(a,b){for(var c=[],d=0;d<a.a.length;++d){var e=a.a[d];e.contains(b)&&c.push(e);if(e.start>b)break}return c}function Oi(a,b,c){for(var d=[],e=0;e<a.a.length;++e){var g=a.a[e];if(null!=c&&g.start>c)break;g.start>b&&d.push(g)}return d}function Pi(a,b){for(var c=[],d=0;d<a.a.length;++d){var e=a.a[d];e.contains(b)&&c.push(e.end);if(e.start>b){c.push(e.start);break}}c.sort(jb);return c[0]};var Qi,Ri,Si,Ti,Ui;Ui=Ti=Si=Ri=Qi=!1;var Vi=cc();Vi&&(-1!=Vi.indexOf("Firefox")||-1!=Vi.indexOf("Camino")||(-1!=Vi.indexOf("iPhone")||-1!=Vi.indexOf("iPod")?Qi=!0:-1!=Vi.indexOf("iPad")?Ri=!0:-1!=Vi.indexOf("Chrome")?Ti=!0:-1!=Vi.indexOf("Android")?Si=!0:-1!=Vi.indexOf("Safari")&&(Ui=!0)));var Wi=Qi,Xi=Ri,Yi=Si,Zi=Ti,$i=Ui;var aj,bj;var cj=cc(),dj=cj.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!dj||2>dj.length)aj=void 0;else{var ej=cj.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d_\d)[_ ]/);aj=ej&&6==ej.length?Number(ej[5].replace("_",".")):0}(bj=0<=aj)&&0<=cc().search("Safari")&&cc().search("Version");var fj=Wi||Xi;function gj(){return hj("(ps3; leanback shell)")}function hj(a){var b=cc();return b?0<=b.toLowerCase().indexOf(a.toLowerCase()):!1};function ij(){}var jj=bj&&4>aj?0.1:0,kj=new ij;f=ij.prototype;f.xd=null;f.Ik=!1;f.Rd=0;f.Ll=0;function lj(a,b){var c="";b&&(a.xd=b,c=mj(b));a.src&&""==c||(c&&a.src!=c&&(a.src=c),b&&b.a||a.load())}function nj(a,b){0<a.readyState&&(a.currentTime=Math.max(jj,b))}f.getType=function(){return this.type};f.Xa=function(a){this.Rd=a};f.getCurrentTime=function(){return this.Ll||this.currentTime};f.fp=function(){this.Ll=this.currentTime};
function mh(a){var b=a.Rd;if(Infinity==b)return 1;if(b&&a.buffered&&0<a.buffered.length){var c=oj(a);return a.buffered.end(c)/b}return 0}function pj(a){a.ended&&nj(a,0);!a.hasAttribute("src")&&a.xd&&(a.src=mj(a.xd),a.xd.a||a.load());a.play()}function qj(a){a.currentSrc&&(fj&&nj(a,0),bd(a),a.removeAttribute("src"),a.load(),a.xd&&a.xd.a&&(a.xd=null))}function rj(a){qj(a);a.Rd=0;a.Ll=0;a.xd=null}function sj(a,b){a.defaultPlaybackRate=b;a.playbackRate=b}
function oj(a){var b=a.buffered;a=a.getCurrentTime();for(var c=0;c<b.length&&!(b.start(c)>a);c++)if(a<=b.end(c))return c;return 0}f.inUnbufferedArea=function(){var a=this.buffered;if(!a||!a.length)return!0;var b=oj(this);if(0<b)return!1;var c=this.getCurrentTime();return a.start(b)>c||a.end(b)<c};function tj(a,b){b?a.setAttribute("crossorigin","true"):a.removeAttribute("crossorigin")}f.Vv=function(){this.hasAttribute("controls")&&this.setAttribute("controls","true")};
f.Wv=function(){this.Ik&&!this.muted&&(this.muted=!0)};function uj(a){var b="";if(a)for(var c=0;c<a.length;c++)b+=a.start(c).toFixed(3)+"-"+a.end(c).toFixed(3)+",";return b};var vj=[2,5,100,101,150],wj=[202,203];function xj(a,b){a=a||64;a&128&&!b||a&2&&a&16||(this.b=a,this.a=b||null)}xj.prototype.b=64;xj.prototype.a=null;function yj(a,b,c){return b==a.b&&c==a.a||b&128&&!c||b&2&&b&16?a:new xj(b,c)}function zj(a,b){return yj(a,a.b|b)}function P(a,b){return!!(a.b&b)}function Aj(a){return P(a,128)?-1:P(a,2)?0:P(a,1)&&!P(a,32)?3:P(a,64)?-1:P(a,8)?1:P(a,4)?2:-1}function Bj(){var a;return a=14};function R(){this.F=new ai;L(this,this.F)}y(R,K);R.prototype.D=function(a,b,c){return this.ha()?0:this.F.D(a,b,c)};R.prototype.$=function(a,b,c){return this.ha()?!1:this.F.$(a,b,c)};R.prototype.Tc=function(a){return this.ha()?!1:this.F.Tc(a)};R.prototype.u=function(a,b){return this.ha()?!1:this.F.u.apply(this.F,arguments)};function Cj(a,b,c){R.call(this);this.A=a;this.o=b;this.B=c;this.j=new Ji(250);this.j.addEventListener("tick",this.Xb,!1,this);L(this,this.j);this.i=[];this.a=[];this.b=new Mi}y(Cj,R);f=Cj.prototype;f.Ph=!1;f.tg=!1;f.zk=!1;f.yk=!1;f.Jg=null;f.mx=function(a){this.Xb();z(arguments,function(a){this.i.push(a);var c=this.b.a;!c.length||0<ci(a,c[c.length-1])?c.push(a):nb(c,a,ci);this.u("onAdd",a)},this);this.Xb()};f.nx=function(a){z(arguments,function(a){a=this.i.indexOf(a);0<=a&&Dj(this,a)},this);this.Xb()};
function Dj(a,b){var c=a.i.splice(b,1)[0],d=a.b.a,e=hb(d,ci||jb,c);0<=e&&$a(d,e);b=a.a.indexOf(c);0<=b&&a.a.splice(b,1);a.u("onRemove",c)}f.reset=function(){this.tg=this.Ph=!1;Ej(this);for(var a=this.i.length-1;0<=a;a--)Dj(this,a);this.Xb();this.k=null};
function Fj(a,b){if(a.tg&&!a.Ph)if(Ej(a),P(b.state,2)){a.k=null;for(var c=[],d=0;d<a.a.length;d++){var e=a.a[d];e.active&&2147483647>e.end&&(c.push(e),a.a.splice(d--,1))}d=Ni(a.b,2147483646);d=d.concat(Oi(a.b,2147483646));e=[];if(c.length)for(var g=0;g<c.length;g++)e.push(["onExit",c[g]]);c=e.concat(Gj(a,d));for(d=0;d<c.length;d++)g=c[d],e=g[1],e.xb.u.apply(e.xb,g)}else P(b.state,16)?(a.g=Hj(a),a.j.stop(),a.j.start(),a.Xb()):(a.j.stop(),P(b.a,16)?(a.g=Hj(a),null!=Pi(a.b,Math.max(a.g-2E3,0))&&(a.Jg=
Li(v(a.Xb,a)))):a.Xb())}function Gj(a,b){var c=[];if(!b.length)return c;b.sort(ei);for(var d=0;d<b.length;d++){var e=b[d];e.active&&-1==a.a.indexOf(e)&&(a.a.push(e),c.push(["onEnter",e]))}return c}
f.Xb=function(){this.yk=!0;if(!this.zk)for(var a=3;this.yk&&a;){this.yk=!1;this.zk=!0;if(this.tg&&!this.Ph){Ej(this);for(var b=Hj(this),c=[],d=0;d<this.a.length;d++){var e=this.a[d];e.active&&!e.contains(b)&&(c.push(["onExit",e]),this.a.splice(d--,1))}d=Ni(this.b,b);e=this.o();!P(e,48)&&b>this.g&&(d=d.concat(Oi(this.b,this.g,b)));c=c.concat(Gj(this,d));this.g=b;!this.Ph&&this.k&&(c.unshift(["onLockBlockExit",this.k]),this.k=null,P(e,2)&&(this.g=2147483647));this.B()&&(b=Pi(this.b,this.g),null!=b&&
(this.Jg=Li(v(this.Xb,this),b-this.g)));for(d=0;d<c.length;d++)b=c[d],e=b[1],"onLockBlockExit"==b[0]||"onLockBlockEnter"==b[0]?this.u.apply(this,b):e.xb.u.apply(e.xb,b)}this.zk=!1;a--}};function Ej(a){null!=a.Jg&&(l.clearTimeout(a.Jg),a.Jg=null)}function Hj(a){return P(a.o(),2)?2147483647:1E3*a.A()}f.H=function(){this.j.removeEventListener("tick",this.Xb,!1,this);Ej(this);this.k=this.b=this.a=this.i=null;Cj.C.H.call(this)};function Ij(a,b){for(var c=a.split(b),d={},e=0,g=c.length;e<g;e++){var h=c[e].split("=");if(1==h.length&&h[0]||2==h.length){var k=xa(h[0]||""),h=xa(h[1]||"");k in d?t(d[k])?db(d[k],h):d[k]=[d[k],h]:d[k]=h}}return d}function Jj(a,b){var c=[];Jb(a,function(a,b){var g=encodeURIComponent(String(b)),h;h=t(a)?a:[a];z(h,function(a){""==a?c.push(g):c.push(g+"="+encodeURIComponent(String(a)))})});return c.join(b)}function Kj(a){"?"==a.charAt(0)&&(a=a.substr(1));return Ij(a,"&")}
function Lj(a){return-1!=a.indexOf("?")?(a=(a||"").split("#")[0],a=a.split("?",2),Kj(1<a.length?a[1]:a[0])):{}}function Mj(a){a=oe([],a);a[0]="";return a.join("")}function S(a,b){return le(oe([a],b))}var Nj=je;function Oj(){var a=he(document.location.href);return fe(a[1],a[2],a[3],a[4])}function Pj(a,b){var c=a.split("#",2);a=c[0];var c=1<c.length?"#"+c[1]:"",d=a.split("?",2);a=d[0];var d=Kj(d[1]||""),e;for(e in b)d[e]=b[e];return S(a,d)+c};var Qj=null;"undefined"!=typeof XMLHttpRequest?Qj=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(Qj=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function Rj(a){switch(a&&"status"in a?a.status:-1){case 0:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:return!0;default:return!1}};function Sj(a,b,c,d,e,g,h){var k=Qj&&Qj();if("open"in k){k.onreadystatechange=function(){4==(k&&"readyState"in k?k.readyState:0)&&b&&lf(b)(k)};c=(c||"GET").toUpperCase();d=d||"";k.open(c,a,!0);g&&(k.responseType=g);h&&(k.withCredentials=!0);g="POST"==c;if(e=Tj(a,e))for(var m in e)k.setRequestHeader(m,e[m]),"content-type"==m.toLowerCase()&&(g=!1);g&&k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.send(d);return k}}
function Tj(a,b){b=b||{};var c;if(c=hf("PAGE_CL"))if(c=hf("PAGE_BUILD_TIMESTAMP")){var d;d||(d=window.location.href);c=he(a)[1]||null;var e=Nj(a);c&&e?(c=d,d=he(a),c=he(c),d=d[3]==c[3]&&d[1]==c[1]&&d[4]==c[4]):d=e?Nj(d)==e&&(Number(he(d)[4]||null)||null)==(Number(he(a)[4]||null)||null):!0;c=d||Uj(a)}c&&(b["X-YouTube-Page-CL"]=hf("PAGE_CL"),b["X-YouTube-Page-Timestamp"]=hf("PAGE_BUILD_TIMESTAMP"));return b}
function Uj(a){var b=["X-YouTube-Page-CL","X-YouTube-Page-Timestamp"],c=hf("CORS_HEADER_WHITELIST")||{};a=Nj(a);if(!a)return!0;var d=c[a];return d?Pa(b,function(a){return Va(d,a)}):!1}
function Vj(a,b){var c=b.format||"JSON";b.qv&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=b.sf;d&&(a=Pj(a,d));var e=b.Jw||"";(d=b.If)&&u(e)&&(e=Kj(e),Tb(e,d),e=Mj(e));var g=!1,h,k=Sj(a,function(a){if(!g){g=!0;h&&I(h);var d=Rj(a),e=null;if(d||400<=a.status&&500>a.status)e=Wj(c,a);if(d)t:{switch(c){case "XML":d=0==parseInt(e&&e.return_code,10);break t;case "RAW":d=!0;break t}d=!!e}var e=e||{},k=b.Z||l;d?b.Qa&&b.Qa.call(k,
a,e):b.onError&&b.onError.call(k,a,e);b.pd&&b.pd.call(k,a,e)}},b.method,e,b.headers,b.responseType,b.withCredentials);b.Wk&&0<b.timeout&&(h=H(function(){g||(g=!0,k.abort(),I(h),b.Wk.call(b.Z||l,k))},b.timeout));return k}function Wj(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=qb(d));break;case "XML":if(d=(d=b.responseXML)?Xj(d):null)c={},z(d.getElementsByTagName("*"),function(a){c[a.tagName]=Yj(a)})}return c}
function Xj(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function Yj(a){var b="";z(a.childNodes,function(a){b+=a.nodeValue});return b}var Zj={html5_ajax:"action_get_html5_token",watch_actions_ajax:"action_get_watch_actions_token",addto_ajax:"action_get_wl_token"},ak={html5_ajax:"html5_ajax_token",watch_actions_ajax:"watch_actions_ajax_token",addto_ajax:"addto_ajax_token"};
function bk(a,b,c,d,e){if(kf(a))d&&window.setTimeout(d,0);else{var g=Oj()+"/token_ajax",h={};b&&(h.Ay=b);c&&(h.By=c);h[Zj[a]]=1;Vj(g,{format:"RAW",method:"GET",sf:h,pd:function(b){var c=Kj(b.responseText),g=c[ak[a]];g?(jf(a,g),d&&d()):e&&e(b,c)}})}};function ck(a){a=a.split("");a=a.slice(3);a=a.reverse();a=a.slice(1);a=a.reverse();a=a.slice(3);a=a.reverse();a=a.slice(3);var b=a[0];a[0]=a[59%a.length];a[59]=b;a=a.slice(2);return a.join("")};function dk(){this.lang=""};function ek(a,b,c,d,e,g){this.Pa=a;this.j=0<=b.indexOf("/mp4")?1:0<=b.indexOf("/webm")?2:0<=b.indexOf("/x-flv")?3:0;this.lb=b;this.b=g||0;this.i=c||null;this.a=d||null;this.g=e||null}function fk(a){return 2==a.j}function gk(a){return 0<=a.indexOf("opus")||0<=a.indexOf("vorbis")||0<=a.indexOf("mp4a")}function hk(a){return 0<=a.indexOf("vp9")||0<=a.indexOf("vp8")||0<=a.indexOf("avc1")};var ik={fy:"auto",VC:"tiny",YB:"light",SMALL:"small",hC:"medium",LARGE:"large",DB:"hd720",CB:"hd1080",KB:"highres",$C:"unknown"};function jk(a,b,c){this.width=a;this.height=b;t:if(a||b){for(var d=1;d<kk.length;d++){var e=kk[d],g=lk[e];if(a>=g[0]||b>=g[1]){a=e;break t}}a="tiny"}else a="auto";this.i=a;this.a=c||0}var kk="auto highres hd1080 hd720 large medium small tiny".split(" "),lk={auto:[0,0],tiny:[256,144],light:[320,240],small:[320,240],medium:[640,360],large:[854,480],hd720:[1280,720],hd1080:[1920,1080],highres:[2048,1536]};function mk(a,b){this.start=a;this.end=b;this.length=b-a+1}function nk(a){a=a.split("-");return 2==a.length&&(a=new mk(parseInt(a[0],10),parseInt(a[1],10)),!isNaN(a.start)&&!isNaN(a.end)&&!isNaN(a.length)&&0<a.length)?a:null}function ok(a,b){return new mk(a,a+b-1)}mk.prototype.toString=function(){return this.start+"-"+(null==this.end?"":this.end)};var pk="corp.google.com youtube.com youtube-nocookie.com prod.google.com sandbox.google.com docs.google.com drive.google.com mail.google.com play.google.com googlevideo.com".split(" "),qk=["2mdn.net"],rk="www.google.com/aclk www.google.com/pagead/conversion googleadservices.com/aclk googleadservices.com/pagead/conversion googleads.g.doubleclick.net/aclk googleads.g.doubleclick.net/pagead/conversion".split(" ");function sk(){return-1!=document.location.toString().indexOf("/embed/")}
function tk(a,b){return RegExp("^https?://([a-z0-9-]{1,63}\\.)*("+b.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i").test(a)}function uk(a){a=new ve(a);we(a,document.location.protocol);xe(a,document.location.hostname);document.location.port&&ye(a,document.location.port);return a.toString()};function vk(a,b,c,d,e,g,h,k,m){this.a=b;this.T=c;this.type=a;this.j=0<=d?d:-1;this.startTime=e||0;this.duration=g||0;this.nb=h||0;this.Ia=0<=k?k:NaN;this.b=!!m;this.T?(this.T=this.T,this.Ia=0<=this.Ia?this.Ia:this.T.length,this.g=this.nb+this.Ia==this.T.length,this.i=this.startTime+this.duration*this.nb/this.T.length,this.o=this.duration*this.Ia/this.T.length,this.k=this.i+this.o):this.g=!0}function wk(a){return 1==a.type||2==a.type}
function xk(a,b){return a.a==b.a&&a.T.start+a.nb+a.Ia==b.T.start+b.nb}function yk(a){Ia(1==a.length||Pa(a,function(a){return!!a.T}));for(var b=1;b<a.length;b++);b=a[a.length-1];return new mk(a[0].T.start+a[0].nb,b.T.start+b.nb+b.Ia-1)}vk.prototype.ug=function(a){return this.a.ug(this,a)};function zk(a){return"i="+a.a.info.Pa+",r="+(a.T.start+a.nb)+"-"+(a.T.start+a.nb+a.Ia-1)+",t="+a.i.toFixed(1)+"-"+(a.i+a.o).toFixed(1)};function Ak(a,b,c,d){this.info=a;this.buffer=b;this.T=c;this.a=d}function Bk(a){return new DataView(a.buffer,a.T.start,a.T.length)}function Ck(a){if(a.info.Ia!=a.T.length)return!1;if(1==a.info.a.info.j){if(8>a.info.Ia||4==a.info.type)return!0;var b=Bk(a),c=b.getUint32(0,!1),b=b.getUint32(4,!1);if(2==a.info.type)return c==a.info.Ia&&1936286840==b;if(3==a.info.type&&0==a.info.nb)return 1836019558==b}return!0};function Dk(a){this.a=a;this.b=0;this.g=-1}var Ek=0;function Fk(a,b){a.a=Pj(a.a,b)};function Gk(a,b){this.index=null;this.info=b;this.b=null;this.i=!1;this.j=new Dk(a)}f=Gk.prototype;f.Jo=function(){return!1};f.Yb=function(){return!1};f.Jj=function(){return!1};f.jo=function(){return[]};f.ug=function(){return null};f.Oj=function(){return null};f.Io=function(){};function Hk(a){this.b=a[0].a.j;this.a=a};function Ik(){this.R=0;this.a=new Float64Array(128);this.b=new Float32Array(128);this.g=!1}Ik.prototype.hb=function(){return this.R};function Jk(a,b){var c=hb(a.b.subarray(0,a.R),jb,b);return 0<=c?c:Math.max(0,-c-2)}function Kk(a){if(a.a.length<a.R+1){var b=2*a.a.length,b=b+2,c=a.a;a.a=new Float64Array(b+1);var d=a.b;a.b=new Float32Array(b+1);for(b=0;b<a.R+1;b++)a.a[b]=c[b],a.b[b]=d[b]}}function Lk(a,b){this.b=a;this.a=0;this.g=b||0}
function Mk(a){for(var b=Nk(a,!1);236==b;)Ok(a),b=Nk(a,!1);return b}function Pk(a){var b=Nk(a,!0),c=a.b.byteOffset+a.a,d=Math.min(b,a.b.buffer.byteLength-c),c=new DataView(a.b.buffer,c,d),c=new Lk(c,a.g+a.a);a.a+=b;return c}function Qk(a){for(var b=Nk(a,!0),c=Rk(a),d=1;d<b;d++)c=(c<<8)+Rk(a);return c}function Ok(a){var b=Nk(a,!0);a.a+=b}function Nk(a,b){var c=Rk(a);if(1==c){for(var d=c=0;7>d;d++)c=256*c+Rk(a);return c}for(var e=128,d=0;6>d&&e>c;d++)c=256*c+Rk(a),e*=128;return b?c-e:c}
function Rk(a){return a.b.getUint8(a.a++)};function Sk(a,b,c,d){Gk.call(this,a,b);this.o=c;this.k=d;this.g=null;this.index=new Ik;b=parseInt;c=a.search(se);d=re(a,0,"clen",c);if(0>d)a=null;else{var e=a.indexOf("&",d);if(0>e||e>c)e=c;d+=5;a=xa(a.substr(d,e-d))}this.a=b(a,10)}y(Sk,Gk);f=Sk.prototype;f.Yb=function(){return!(!this.b||!this.index.hb())};
f.jo=function(a){var b=new vk(1,this,this.o),c=new vk(2,this,this.k),d=[],e=[b];xk(b,c)?e.push(c):d.push(new Hk([c]));isNaN(this.a)?a=0:a>this.a&&(a=this.a);b=e[e.length-1];c=b.T.end-e[0].T.start+1;a>c&&(a=ok(b.T.end+1,a-c),e.push(new vk(4,this,a)));d.push(new Hk(e));return d};
f.Io=function(a){if(1==a.info.type){if(this.b)return;this.b=new Uint8Array(a.buffer,a.T.start,a.T.length)}else if(2==a.info.type){if(this.g||this.index.hb())return;if(1==this.info.j){var b=this.index,c=Bk(a),d=a.info.T.start;a=0;var e=c.getUint32(0,!1),g=c.getUint8(a+8);a+=12;var h=c.getUint32(a+4,!1);a+=8;var k;0==g?(g=c.getUint32(a,!1),k=c.getUint32(a+4,!1),a+=8):(g=(c.getUint32(a,!1)<<32)+c.getUint32(a+4,!1),k=(c.getUint32(a+8,!1)<<32)+c.getUint32(a+12,!1),a+=16);b.a[0]=k+(e+d);b.b[0]=g;b.g=!0;
d=c.getUint16(a+2,!1);a+=4;for(e=0;e<d;e++){var m=c.getUint32(a,!1);k=c.getUint32(a+4,!1);a+=12;g=b;k=k/h;g.R++;Kk(g);g.a[g.R]=g.a[g.R-1]+m;g.b[g.R]=g.b[g.R-1]+k}}else this.g=Bk(a)}if(fk(this.info)&&this.b&&this.g){c=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);b=this.index;e=this.g;a=new Lk(c);if(440786851==Mk(a)&&(Ok(a),408125543==Mk(a))){h=a;d=h.a;c=Nk(h,!0);h.a=d;a=Pk(a);h=a.g+a.a;for(m=Mk(a);357149030!=m;)Ok(a),m=Mk(a);a=Pk(a);g=1E6;k=1E9;for(d=0;!(a.a>=a.b.byteLength);)if(m=
Mk(a),2807729==m)g=Qk(a);else if(2807730==m)k=Qk(a);else if(17545==m){var d=a,m=Nk(d,!0),p=0;4==m?p=d.b.getFloat32(d.a):8==m&&(p=d.b.getFloat64(d.a));d.a+=m;d=p}else Ok(a);g/=k;d*=g;a=new Lk(e);if(475249515==Mk(a)){for(a=Pk(a);!(a.a>=a.b.byteLength);)if(m=Mk(a),187==m){e=Pk(a);m=g;k=h;if(179!=Mk(e))m=null;else if(m*=Qk(e),183!=Mk(e))m=null;else{e=Pk(e);for(p=k;!(e.a>=e.b.byteLength);)241==Mk(e)?p=Qk(e)+k:Ok(e);m=[p,m]}e=b;k=m[0];m=m[1];Kk(e);e.a[e.R]=k;e.b[e.R]=m;e.R++}else Ok(a);a=d;c=c+h;Kk(b);
b.g=!0;b.b[b.R]=a;b.a[b.R]=c}}this.g=null}};function Tk(a,b,c,d){for(var e=[];b<a.index.hb();b++){var g=ok(a.index.a[b],b+1<a.index.R||a.index.g?a.index.a[b+1]-a.index.a[b]:-1),h=a.index.b[b],k;k=a.index;var m=b;k=m+1<k.R||k.g?k.b[m+1]-k.b[m]:-1;var m=Math.max(0,c-g.start),p=Math.min(g.end+1,c+d)-(g.start+m),s=b==a.index.hb()-1&&m+p==g.length;e.push(new vk(3,a,g,b,h,k,m,p,s));if(g.start+m+p>=c+d)break}return new Hk(e)}
function Uk(a,b){for(var c=0;c+1<a.index.hb()&&b.T.start>=a.index.a[c+1];)c++;return Tk(a,c,b.T.start,b.T.length).a}f.Jj=function(a){return this.Yb()?!0:isNaN(this.a)?!1:a.T.end+1<this.a};f.ug=function(a,b){this.Jj(a);if(!this.Yb()){var c=ok(a.T.end+1,b);c.end+1>this.a&&(c=new mk(c.start,this.a-1));c=[new vk(4,a.a,c)];return new Hk(c)}4==a.type&&(c=Uk(this,a),a=c[c.length-1]);var c=0,d=a.T.start+a.nb+a.Ia;3==a.type&&(c=a.j,d==a.T.end+1&&(c+=1));return Tk(this,c,d,b)};
f.Oj=function(a,b){var c=Jk(this.index,a);return Tk(this,c,this.index.a[c],b)};f.Jo=function(){return this.Yb()&&!isNaN(this.a)&&(this.index.g?this.index.a[this.index.R]:-1)!=this.a};function Vk(){this.duration=0;this.a={}}var Wk=/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/;function Xk(a){var b=new Vk;z(a,function(a){var d=a.type,e=a.itag,g=null;hk(d)&&(g=a.size.split("x"),g=new jk(parseInt(g[0],10),parseInt(g[1],10)));var h=null;gk(d)&&(h=new dk);d=new ek(e,d,h,g,null,parseInt(a.bitrate,10)/8);g=nk(a.init);h=nk(a.index);(a=Yk(a.url,d,a.s))&&(b.a[e]=new Sk(a,d,g,h))});return b}
function Zk(a,b){for(var c=a;c;c=c.parentNode)if(c.attributes){var d=c.attributes[b];if(d)return d.value}return""}function $k(a,b){for(var c=a;c;c=c.parentNode){var d=c.getElementsByTagName(b);if(0<d.length)return d[0]}return null}function Yk(a,b,c){if(!tk(a,pk))return"";b={alr:"yes",mime:b.lb.split(";")[0]};c&&(b.signature=ck(c));return Pj(a,b)};function al(a,b,c,d,e,g,h,k,m){this.i={};this.o=a;this.F=b;this.b=c;this.a=d;this.g=e;this.A=g;this.j=h;this.k=k;this.B=m}function bl(a,b){var c=a.A,c=c.replace("$N",a.j),c=c.replace("$L",a.B.toString()),c=c.replace("$M",b.toString());a.k&&(c=S(c,{sigh:a.k}));return c}function cl(a,b){var c=Math.floor(b/(a.a*a.g)),d=a.a*a.g,e=b%d,g=e%a.a,e=Math.floor(e/a.a),h=a.g,k=a.b-d*c;k<d&&(h=Math.ceil(k/a.a));return{url:bl(a,c),pu:g,ti:a.a,row:e,rows:h,Wn:a.o*a.a,Vn:a.F*h}};function dl(a){var b=[];a=a.split("|");for(var c=a[0],d,e,g,h,k,m,p,s,r=1;r<a.length;r++)d=a[r].split("#"),e=r-1,g=parseInt(d[0],10),h=parseInt(d[1],10),k=parseInt(d[2],10),m=parseInt(d[3],10),p=parseInt(d[4],10),s=d[6],d=d[7],b.push(new al(g,h,k,m,p,c,s,d,e));this.a=b;this.b={};1<this.a.length&&-1!=this.a[0].j.indexOf("default")&&this.a.splice(0,1)}function el(a,b){var c=a.a[0].b-1;return yb(Math.round(c*b),0,c)}
function fl(a,b){var c=a.b[b];if(c)return c;for(var c=a.a.length,d=0;d<c;d++)if(a.a[d].o>=b)return a.b[b]=d;a.b[b]=c-1;return c-1};var gl={0:"MONO",1:"LEFT_RIGHT",2:"RIGHT_LEFT",3:"TOP_BOTTOM",4:"BOTTOM_TOP"};var hl={bC:1,cC:2,dC:3};var il;var jl=cc(),jl=jl.toLowerCase();if(-1!=jl.indexOf("android")){var kl=jl.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(kl)il=Number(kl[1]);else{var ll={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},ml=jl.match("("+Mb(ll).join("|")+")");il=ml?ll[ml[0]]:0}}else il=void 0;var nl,ol;function pl(){var a=n("yt.player.utils.videoElement_");a||(a=document.createElement("video"),pa("yt.player.utils.videoElement_",a));return a}function ql(){if(2.2==il)return!0;var a=pl();try{return!(!a||!a.canPlayType||!a.canPlayType('video/mp4; codecs="avc1.42001E, mp4a.40.2"')&&!a.canPlayType('video/webm; codecs="vp8.0, vorbis"'))}catch(b){return!1}}
function rl(){var a=Wc("div",{"class":"html5-player-css-loaded"});document.body.appendChild(a);var b="none"==rd(a,"display");F(a);return b};function sl(){var a;if(void 0==nl&&(nl=!1,window.crypto&&window.crypto.py))try{a=new Uint8Array(1),window.crypto.py(a),nl=!0}catch(b){}if(nl){a=Array(16);var c=new Uint8Array(16);window.crypto.getRandomValues(c);for(var d=0;d<a.length;d++)a[d]=c[d]}else for(a=Array(16),c=0;16>c;c++){for(var d=x(),e=0;e<d%23;e++)a[c]=Math.random();a[c]=Math.floor(256*Math.random())}return a}
function tl(){for(var a=sl(),b=[],c=0;c<a.length;c++)b.push("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_".charAt(a[c]&63));return b.join("")}function ul(){return Na(sl(),function(a){return(a&15).toString(16)}).join("")};function vl(a,b,c){b={cpn:b};c&&(b.ibw="1369843");return{url:S(a,b),type:"application/x-mpegURL",quality:"auto",itag:"93"}};function T(a,b){return void 0==b?a:"1"==b?!0:!1}function wl(a,b,c){for(var d in c)if(c[d]==b)return c[d];return a}function U(a,b){return void 0==b?a:b}function xl(a,b){var c=U(a,b);c&&(c=uk(c));return c}function yl(a){if(!a)return 0;a=a.split(":");var b=parseFloat(a[0]),c=1;2==a.length&&(c=parseFloat(a[1]));return isNaN(b)||isNaN(c)||0==c?0:b/c};function zl(a,b){this.a=a;this.b=b}zl.prototype.clone=function(){return new zl(this.a,this.b)};function Al(a){this.a=[];if(a)t:{var b,c;if(a instanceof Al){if(b=a.uc(),c=a.ic(),0>=a.hb()){a=this.a;for(var d=0;d<b.length;d++)a.push(new zl(b[d],c[d]));break t}}else b=Mb(a),c=Lb(a);for(d=0;d<b.length;d++)Bl(this,b[d],c[d])}}function Bl(a,b,c){var d=a.a;d.push(new zl(b,c));b=d.length-1;a=a.a;for(c=a[b];0<b;)if(d=b-1>>1,a[d].a>c.a)a[b]=a[d],b=d;else break;a[b]=c}f=Al.prototype;
f.remove=function(){var a=this.a,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Xa(a);else{a[0]=a.pop();for(var a=0,b=this.a,d=b.length,e=b[a];a<d>>1;){var g=2*a+1,h=2*a+2,g=h<d&&b[h].a<b[g].a?h:g;if(b[g].a>e.a)break;b[a]=b[g];a=g}b[a]=e}return c.b}};f.ic=function(){for(var a=this.a,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].b);return b};f.uc=function(){for(var a=this.a,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].a);return b};f.clone=function(){return new Al(this)};f.hb=function(){return this.a.length};
f.isEmpty=function(){return Wa(this.a)};f.clear=function(){Xa(this.a)};function Cl(){Al.call(this)}y(Cl,Al);function Dl(a){R.call(this);this.a=a;this.g=new Cl;this.i={}}y(Dl,R);Dl.prototype.b=!1;function El(a,b,c){var d;for(c=fl(a.a,c);0<=c;){d=a.a.a[c];if(d=d.i[Math.floor(b/(d.a*d.g))]?cl(d,b):null)return d;c--}return cl(a.a.a[0],b)}function Fl(a){if(!a.b)if(a.g.isEmpty())a.b=!1;else{a.b=!0;var b=a.g.remove(),c=new Image;c.src=bl(a.a.a[b.sn],b.tn);c.onload=v(a.j,a,b.sn,b.tn)}}
Dl.prototype.j=function(a,b){this.b=!1;var c=this.a.a[a];c.i[b]=!0;Fl(this);var d,e=c.a*c.g;d=b*e;c=Math.min(d+e-1,c.b-1);d=[d,c];this.u("l",d[0],d[1])};function Gl(a,b,c){this.b=a;this.a=b;this.g=c}var Hl={playready:["com.youtube.playready"],widevine:["com.widevine.alpha"],clearkey:["org.w3.clearkey","webkit-org.w3.clearkey"]},Il=["widevine","playready"];function Jl(a,b,c){if(!a.addKey&&!a.webkitAddKey)return null;for(var d=0;d<Il.length;d++){var e=Il[d];if(c[e])for(var g=Hl[e],h=0;h<g.length;h++){var k=g[h];if(a.canPlayType(b,k))return new Gl(e,k,c[e])}}return null};function Kl(a,b){this.a=a;this.b=b;this.i=0;Object.defineProperty(this,"timestampOffset",{get:this.Mu,set:this.Nu});Object.defineProperty(this,"buffered",{get:this.Lu})}f=Kl.prototype;f.append=function(a){this.a.webkitSourceAppend(this.b,a)};f.abort=function(){this.a.webkitSourceAbort(this.b)};f.Lu=function(){return this.a.webkitSourceState==this.a.SOURCE_CLOSED?new Ll:this.a.webkitSourceBuffered(this.b)};f.Mu=function(){return this.i};
f.Nu=function(a){this.i=a;this.a.webkitSourceTimestampOffset(this.b,a)};function Ll(){this.length=0};function Ml(a){this.activeSourceBuffers=this.sourceBuffers=[];this.a=a;this.b=NaN;this.g=0;Object.defineProperty(this,"duration",{get:this.Gu,set:this.Ju});Object.defineProperty(this,"readyState",{get:this.Hu});this.a.addEventListener("webkitsourceclose",v(this.Iu,this),!0)}function Nl(a){return window.MediaSource?new window.MediaSource:window.WebKitMediaSource?new window.WebKitMediaSource:HTMLMediaElement.prototype.webkitSourceAddId?new Ml(a):null}f=Ml.prototype;
f.addEventListener=function(a,b,c){this.a.addEventListener(a,b,c)};f.en=function(){return this.a.webkitMediaSourceURL};f.addSourceBuffer=function(a){var b=(this.g++).toString();this.a.webkitSourceAddId(b,a);a=new Kl(this.a,b);this.sourceBuffers.push(a);return a};
f.removeSourceBuffer=function(a){for(var b in this.sourceBuffers)if(a===this.sourceBuffers[b]){this.a.webkitSourceRemoveId(a.b);for(a=b+1;a<this.sourceBuffers.length;a++)this.sourceBuffers[a-1]=this.sourceBuffers[a];this.sourceBuffers.pop();break}};f.Hu=function(){switch(this.a.webkitSourceState){case this.a.SOURCE_CLOSED:return"closed";case this.a.SOURCE_OPEN:return"open";case this.a.SOURCE_ENDED:return"ended"}return""};
f.endOfStream=function(a){var b=this.a.EOS_NO_ERROR;"network"==a?b=this.a.EOS_NETWORK_ERR:"decode"==a&&(b=this.a.EOS_DECODE_ERR);this.a.webkitSourceEndOfStream(b)};f.Iu=function(){Xa(this.sourceBuffers)};f.Gu=function(){return this.b};f.Ju=function(a){this.b=a;this.a.webkitSourceSetDuration&&this.a.webkitSourceSetDuration(a)};function Ol(){this.a=[]}Ol.prototype.listen=function(a,b,c){if(t(b))for(var d=0;d<b.length;d++)this.listen(a,b[d],c);else c=v(c,this),a.addEventListener(b,c,!1),this.a.push(a,b,c)};Ol.prototype.removeAll=function(){if(this.a)for(;this.a.length;){var a=this.a.shift(),b=this.a.shift(),c=this.a.shift();a.removeEventListener&&a.removeEventListener(b,c)}};Ol.prototype.ha=function(){return null===this.a};Ol.prototype.dispose=function(){this.removeAll();this.a=null};function Pl(a,b,c,d){this.a=[];this.rd=this.Zb=null;this.i=b;this.g=Nl(a);this.b="";this.j=null;this.listen(this.g,["sourceopen","webkitsourceopen"],oa(this.Ht,d,c));this.listen(this.g,["sourceclose","webkitsourceclose"],this.Gt)}y(Pl,Ol);var Ql={};f=Pl.prototype;f.Xa=function(a){this.isOpen()?this.g.duration=a:this.i=a};f.isOpen=function(){return"open"==this.g.readyState};f.Hb=function(){return"closed"==this.g.readyState};
f.Ht=function(a,b){isNaN(this.i)||(this.g.duration=this.i,this.i=NaN,this.Zb=this.g.addSourceBuffer(a),this.rd=this.g.addSourceBuffer(b),this.j&&(this.j(this),this.j=null))};f.Gt=function(){this.dispose()};f.dispose=function(){Rl(this.b);this.b="";Pl.C.dispose.call(this)};function Rl(a){if(a)try{window.URL.revokeObjectURL(a)}catch(b){}}
function Sl(a){if(window.MediaSource&&window.MediaSource.isTypeSupported)return window.MediaSource.isTypeSupported(a);'audio/mp4; codecs="mp4a.40.2"'==a&&(a='video/mp4; codecs="avc1.4d404f"');return!!pl().canPlayType(a)}
function Tl(a,b){var c={};if(window.MediaSource&&window.MediaSource.isTypeSupported)Na(a,function(a){c[a]=window.MediaSource.isTypeSupported(a)}),H(oa(b,c),0);else{for(var d=!1,e=0;e<a.length;e++){var g=Ql[a[e]];if(void 0!=g)c[a[e]]=g;else{d=!0;break}}if(d){var d=pl(),e=Nl(d),g=e.en?e.a.webkitMediaSourceURL:window.URL.createObjectURL(e),h=oa(Ul,a,b,d,e,g);e.addEventListener("sourceopen",h,!1);e.addEventListener("webkitsourceopen",h,!1);d.src=g}else H(oa(b,c),0)}}
function Ul(a,b,c,d,e){for(var g={},h=0;h<a.length;h++){var k=Ql[a[h]];if(void 0==k){try{var m=d.addSourceBuffer(a[h]);d.removeSourceBuffer(m);k=!0}catch(p){p.code==DOMException.NOT_SUPPORTED_ERR&&(k=!1)}Ql[a[h]]=k}g[a[h]]=k}c.src="";Rl(e);b(g)};function Vl(a,b,c,d){this.a=c;this.b=a;this.j=d||"";this.i=b;this.g={}}function mj(a){if(a.a)a=a.b;else if(a.i){var b;b=(new ve(a.b)).a.get("id");b="http://www.youtube.com/api/manifest/t2b/source/youtube/id/"+encodeURIComponent(b);b+="/itag/"+a.j;b+="/mfmt/amf";a=Ae(new ve(S(a.b,a.g)),b).toString()}else a=S(a.b,a.g);return a};function Wl(a,b){var c=b.Pa in Xl&&gj();this.i=(this.a=!!(a instanceof Array))?null:new Vl(a,c,this.a,b.Pa);this.b=this.a?a[0]:null;this.g=this.a?a[1]:null;this.ue=b}Wl.prototype.getInfo=function(){return this.ue};Wl.prototype.Re=function(){return this.ue.a.i};var Yl={'video/mp4; codecs="avc1.42001E, mp4a.40.2"':"maybe"},Zl={"application/x-mpegURL":"maybe"},$l={"application/x-mpegURL":"maybe"};
function am(a,b){if(!ql())return[];var c=bm(a,b);a=!c.length&&b?bm(a,!1):c;for(var d={},c=pl(),e=0;e<a.length;e++){var g=a[e];if((c.canPlayType(g.getInfo().lb)||cm(g))&&!(g.ue.Pa in dm||gj()&&"5"==g.ue.Pa)){var h=g.Re();if(!d[h]||fk(d[h].getInfo()))d[h]=g}}var k=[];z(kk,function(a){(g=d[a])&&k.push(g)});return k}function cm(a){var b;a=a.getInfo().lb;Xi?b=$l[a]:2.2==il?b=Yl[a]:hj("android")&&hj("chrome")&&(b=Zl[a]);return b||""}
var Xl={5:!0,34:!0,35:!0},dm={52:!0,53:!0,54:!0,55:!0,60:!0,79:!0,87:!0},em={yB:160,uB:133,wB:134,oB:135,kB:136,gB:137,pB:138,eB:140,vB:142,xB:143,rB:144,tB:222,sB:223,lB:145,nB:224,mB:225,hB:146,jB:226,iB:227,qB:147,fB:149,dB:261,zB:161,qD:171,pD:172,xD:194,uD:195,wD:220,vD:221,tD:196,sD:197,rD:198,BD:242,CD:243,AD:244,zD:247,yD:248};function fm(a){var b=[];z(a,function(a){a.url&&b.push(gm(a.url,a.type,"auto","0"))});return b}
function gm(a,b,c,d,e){var g=new dk;(c=lk[c])||(c=lk.small);e=new jk(c[0],c[1],e?-1:0);b=unescape(b.replace(/&quot;/g,'"'));return new Wl(a,new ek(d,b,g,e))}function bm(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d],g;if(g=hc)if(g=0!=e.ue.a.a)g=1==e.getInfo().j;g||0!=e.ue.a.a==b&&c.push(e)}return c}
function hm(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d];if(e.sig||e.s){var g=e.sig||ck(e.s);e.url=Pj(e.url,{signature:g})}e.url&&c.push(gm(e.url,e.type,e.quality,e.itag,e.stereo3d))}return am(c,!!b)}function im(a){a=fm(a);return am(a,!1)}function jm(a,b,c,d,e,g){if(a){var h=[];if(g){g={};for(var k in a.a)h=a.a[k].info.lb,g[h]=Sl(h);km(a,b,c,d,e,g)}else{for(k in a.a)h.push(a.a[k].info.lb);Tl(h,v(km,null,a,b,c,d,e))}}else c([])}
function km(a,b,c,d,e,g){var h=null,k={},m={},p;for(p in em){var s=em[p],r=a.a[s];if(r&&g[r.info.lb]&&!(0<=r.info.lb.indexOf("vp9")&&hj("cros armv7"))){if(r.info.g){h||(h=pl());if(!Jl(h,r.info.lb,r.info.g))continue;if(!e&&r.info.a&&(1280<=r.info.a.width||720<=r.info.a.height))continue;if(261==s)continue}if(s=0<r.info.lb.indexOf("/webm")?r.info.g?3:1:0<r.info.lb.indexOf("/mp4")?r.info.g?4:2:null){Fk(r.j,b);var D=r.info.i?k:m;D[s]=D[s]||[];D[s].push(r)}}}a=[3,4,1,2];d&&(a=[4,3,2,1]);d=null;for(p=0;p<
a.length;p++)if(k[a[p]]&&m[a[p]]){d=a[p];break}a=[];if(null!=d)for(kb(k[d],"itag"),k=k[d].pop(),p=0;p<m[d].length;p++)a.push(new Wl([k,m[d][p]],m[d][p].info));ib(a,function(a,b){var c=a.getInfo(),d=b.getInfo();return d.a.height-c.a.height||d.b-c.b});c(a)};function rh(a){R.call(this);this.k=[];this.X=new B(0,0);this.O=[];this.I=[];this.b={};this.ya={};this.i={};lm(this,a)}y(rh,R);var mm=/\/img\/watermark\/youtube_(hd_)?watermark(-vfl\S{6})?.png$/,nm="author cc_asr cc_load_policy iv_new_window iv_load_policy keywords subscribed rvs title ttsurl ypc_buy_url ypc_full_video_length ypc_item_thumbnail ypc_item_title ypc_item_url ypc_offer_button_text ypc_offer_description ypc_offer_headline ypc_offer_id ypc_price_string ypc_preview ypc_video_rental_bar_text".split(" ");
f=rh.prototype;f.ca=!1;f.uo=!0;f.eb=!1;f.Nk="";f.Mk="";f.Lk="";f.Aj=!1;f.zh=1;f.vn=!1;f.jm=0;f.se=0;f.no=!1;f.uk=!1;f.Fm=3;f.ji="";f.Ea="";f.Kk=!1;f.fg=!1;f.am=!1;f.of=0;f.Ue=!1;f.Nm=!1;f.Yf=0;f.ff=!1;f.bm=!0;f.nj=!1;f.yn=!1;f.Eb=!1;f.wk=!1;f.Ld=!1;f.An=!1;f.xk=!1;f.Wj=0;f.ta=0;f.sh=0;f.fk=!1;f.ul="";f.$l=!1;f.ej=!1;f.lm=0;f.dm=!1;f.Im=!1;f.xa=0;f.cj=null;f.ef=null;f.Bj=!1;f.Ef=!1;f.hf=null;f.ck=1;f.Ae=0;f.yl=null;f.fm=!1;f.Hj=0;f.Em=NaN;
function Oh(a,b){var c=b||{};c.iv_read_url&&(a.Nk=uk(c.iv_read_url));c.iv_invideo_url&&(a.Mk=uk(c.iv_invideo_url));c.iv_cta_url&&(a.Lk=uk(c.iv_cta_url));a.author=U(a.author,c.author);a.uk=T(a.uk,c.cc_asr);a.ji=xl(a.ji,c.ttsurl);a.Ea=U(a.Ea,c.cpn);a.g=U(a.g,c.subscribed);a.title=U(a.title,c.title);a.ga=U(a.ga,c.ypc_preview);a.fk=T(a.fk,c.paygated);c.keywords&&(a.ya=om(c.keywords));c.rvs&&(a.Oc=pm(c.rvs));c.poster&&(a.ul=c.poster);z(nm,function(a){a in c&&(this.b[a]=c[a])},a)}
function lm(a,b){var c=b||{};a.eb="1"!=c.hlsdvr||$i||Xi&&5>aj?!1:!0;a.Aj="1"==c.infringe||"1"==c.muted;a.xn=c.authkey;a.Fa=c.authuser;a.Ea||(a.Ea=c.cpn||tl());a.Hc=c.csi_page_type;a.Na=c.sw;a.Sa=T(a.Sa,c.dto);a.kd=c.t;a.Kk=T(a.Kk,c.cenchd);a.fg="1"==c.enable_cardio;a.am="1"==c.enable_cardio_before_playback;a.of=void 0==(c.end||c.endSeconds)?a.of:Number(c.end||c.endSeconds);a.bm="1"!=c.no_get_video_log;a.nj="1"==c.tmi;a.yn="1"==c.livemonitor;a.Eb="1"==c.live_playback;a.wk=T(a.wk,c.mdx);a.xk=T(a.xk,
c.utpsa);a.vo=c.iurlmaxres;a.G=U(a.G,c.oauth_token);a.U=U(a.U,c.vvt);a.jd=c.osig;a.ib=c.ptchn;a.nc=c.oid;a.A=c.ptk;a.lc=c.pltype;a.fb=c.plid;a.j=c.eventid;a.Oa=U(a.Oa,c.list);a.mc=c.pyv_beacon_url;a.qe=c.purchase_id;a.ja=c.sdetail;a.re=c.sourceid;a.ia=U(a.ia,c.feature);a.Ta=1==(void 0==c.is_fling?a.Ta?1:0:Number(c.is_fling));a.ma=U(a.ma,c.ytr);a.wo=c.iurlsd;a.fm="1"==c.skip_kansas_logging;a.ef=wl(a.ef,c.vq||c.suggestedQuality,ik);a.pe=c.approx_threed_layout||0;a.Bj="1"==c.threed_converted;a.Gi=c.iurl;
a.ej="1"==c.sendtmp;a.dm=!!a.Na||a.ej;a.xa=void 0==(c.start||c.startSeconds)?a.xa:Number(c.start||c.startSeconds);a.M=c.docid||c.video_id||c.videoId;qm(a,c.watermark);a.Kc=U(a.Kc,c.ypc_gid);a.Nc=U(a.Nc,c.ypc_license_session_token);if(c.ad3_module||c.ad_module)"1"==c.allow_html5_ads?(a.ca=!0,"1"==c.ad_preroll&&a.I.push("ad")):"1"==c.supported_without_ads||c.cta&&c.fexp&&(-1!=c.fexp.indexOf("924604")||-1!=c.fexp.indexOf("924610"))||(a.Nm=!0);c.adaptive_fmts&&(a.Ua=rm(a,c.adaptive_fmts));c.allow_embed&&
(a.uo="1"==c.allow_embed);c.autoplay&&(a.ff="1"==c.autoplay);c.iv_load_policy&&(a.fa=sm(c.iv_load_policy,a.fa));c.cc_load_policy&&(a.Fm=sm(c.cc_load_policy,2));q(c.dash)&&void 0===a.aa&&(a.aa="1"==c.dash);if(c.dashmpd){a.L=S(c.dashmpd,{cpn:a.Ea});var d=/\/s\/([0-9A-F.]+)/,e=d.exec(a.L);e&&(e=ck(e[1]),a.L=a.L.replace(d,"/signature/"+e))}c.delay&&(a.J=Fa(c.delay));c.idpj&&(a.Yf=Fa(c.idpj));c.url_encoded_fmt_stream_map&&(a.O=rm(a,c.url_encoded_fmt_stream_map));c.hlsvp&&(d=vl(c.hlsvp,a.Ea,c.fexp&&-1!=
c.fexp.indexOf("934005")&&!c.on3g),a.O.push(d));c.length_seconds&&(a.ta=Fa(c.length_seconds));c.ldpj&&(a.sh=Fa(c.ldpj));c.loudness&&(a.za=c.loudness,a.zh=-15<a.za&&0>a.za?Math.pow(10,(-18-a.za)/20):1);c.partnerid&&(a.md=Fa(c.partnerid));c.pyv_billable_url&&tk(c.pyv_billable_url,rk)&&(a.P=c.pyv_billable_url);c.pyv_conv_url&&tk(c.pyv_conv_url,rk)&&(a.Da=c.pyv_conv_url);c.url_encoded_third_party_media&&(a.hf=pm(c.url_encoded_third_party_media));c.threed_module&&!c.threed_converted&&(a.Q=c.threed_module,
a.Jc=6);if("1"==c.track_embed||c.tk)a.$l=!0;c.watch_ajax_token&&jf("watch_actions_ajax",c.watch_ajax_token);c.fresca_preroll&&a.I.push("fresca");c.ypc_clickwrap_module&&a.I.push("ypc_clickwrap");void 0!=c.start&&(a.Hj=c.start);void 0!=c.end&&(a.Em=c.end);a.Ic=U(a.Ic,c.ucid);z(["baseUrl","uid","oeid","ieid","ppe"],function(a){this.i[a]=c[a]},a);a.i.focEnabled="1"==c.focEnabled;a.i.rmktEnabled="1"==c.rmktEnabled;a.jm=tm(c.rmktPingThreshold,c.length_seconds);a.b=c;Oh(a,c);a.aa&&um(a)}
function um(a){if(hj("android")&&hj("chrome")&&!wc(29)?0:window.MediaSource||window.WebKitMediaSource||HTMLMediaElement.prototype.webkitSourceAddId)if(a.Ua)a.B=Xk(a.Ua);else if(a.L){var b={format:"RAW",method:"GET",Z:a,Qa:a.Yw,onError:a.nl};a.Ue=!0;a=uk(a.L);Vj(a,b)}}
f.Yw=function(a){if(!this.ha()){if(200<=a.status&&400>a.status){var b=new Vk;t:{a=a.responseText;a=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("MPD")[0];var c;if(c=Zk(a,"mediaPresentationDuration")){var d=Wk.exec(c);c=d?3600*parseFloat(d[2]||0)+60*parseFloat(d[4]||0)+parseFloat(d[6]||0):parseFloat(c)}else c=0;b.duration=c;a=a.getElementsByTagName("Representation");for(c=0;c<a.length;c++){var d=a[c],e=Zk(d,"id"),g=Zk(d,"mimeType"),h=Zk(d,"codecs"),g=h?g+'; codecs="'+h+'"':g,
h=parseInt(Zk(d,"bandwidth"),10)/8,k=null;hk(g)&&(k=new jk(parseInt(Zk(d,"width"),10),parseInt(Zk(d,"height"),10)));var m=null;gk(g)&&(m=new dk);var p=null,s=$k(d,"ContentProtection");if(s)if((p=s.attributes.schemeIdUri)&&"http://youtube.com/drm/2012/10/10"==p.textContent)for(p={},s=s.firstChild;null!=s;s=s.nextSibling)"yt:SystemURL"==s.nodeName&&(p[s.attributes.type.textContent]=s.textContent.trim());else p=null;e=new ek(e,g,m,k,p,h);g=Yk($k(d,"BaseURL").textContent,e);h=$k(d,"SegmentBase");d=nk(h.attributes.indexRange.value);
h=nk(h.getElementsByTagName("Initialization")[0].attributes.range.value);d=new Sk(g,e,h,d);if(!d){a=!1;break t}b.a[d.info.Pa]=d}a=!0}if(this.B=a?b:null)this.ta=this.B.duration||this.ta}this.nl()}};f.nl=function(){this.ha()||(this.Ue=!1,this.u("dataloaded",this.b))};function vm(a,b,c,d){jm(a.B,wm(a),v(function(a){this.ha()||(a.length?(this.k=a,this.u("dataupdated"),b()):(this.aa=!1,xm(this,b)))},a),c,a.Kk,d)}
function xm(a,b){a.k=a.hf&&a.An?im(a.hf):hm(a.O,!!a.Q||a.Ef);H(v(function(){this.ha()||(this.u("dataupdated"),b&&b())},a),0)}function ym(a){a=Na(a.k,function(a){return a.Re()});gb(a);return a.concat(["auto"])}function zm(a,b){var c=null;a.k.some(function(a){if(a.Re()==b)return c=a,!0});return c}function Am(a){var b=a.o&&a.o.i;if(!b)return null;w(b.g,wm(a));return b}function wm(a){var b={};a.A&&(b.ptk=a.A,b.oid=a.nc,b.ptchn=a.ib,b.pltype=a.lc);return b}
function Bm(a,b){return u(a.ya[b])?a.ya[b]:null}function Cm(a){!a.yl&&a.b.storyboard_spec&&(a.yl=new dl(a.b.storyboard_spec));return a.yl}function Dm(a){var b=Cm(a);!a.cj&&b&&(a.cj=new Dl(b),L(a,a.cj));return a.cj}function Em(a,b){var c={format:"RAW",method:"GET",Z:a,Qa:a.qx};a.Ue=!0;Vj(b,c)}f.qx=function(a){this.ha()||(this.Ue=!1,a=Kj(a.responseText),"fail"==a.status?this.u("onStatusFail",a):(lm(this,a),this.Ue||this.nl()))};function sm(a,b){var c=parseInt(a,10);return Nb(hl,c)?c:b}
function pm(a){a=a.split(",");return a=a.map(function(a){return Kj(a)})}function rm(a,b){var c=pm(b);z(c,function(a){a.url&&(a.url=S(a.url,{cpn:this.Ea}))},a);return c}function om(a){var b={};z(a.split(","),function(a){var d=a.split("=");2==d.length?b[d[0]]=d[1]:b[a]=!0});return b}function qm(a,b){if(b){var c=b.split(",");2<=c.length&&(a.Ma=c[1],a.Lc=c[0])}}function Fm(a,b){return!!a.b[b]}function tm(a,b){var c=Fa(b),d=Fa(a);return isNaN(d)||isNaN(c)?0:Math.min(d,c)};function Gm(a,b){this.type=a||"";this.id=b||""}Gm.prototype.toString=function(){return this.type+this.id};function Hm(a){R.call(this);this.a=[];this.b=[];this.ua=Math.max(0,a.index||0);this.loop=!!a.loop;this.xa=a.startSeconds||0;this.Hn="1"==a.mob;this.title=a.playlist_title||"";a.video_id&&(this.a[this.ua]=new rh(a));a.api&&("string"==typeof a.api&&16==a.api.length?a.list="PL"+a.api:a.playlist=a.api);if(a.list)switch(a.listType){case "user_uploads":Im(this,a.list);break;case "user_favorites":Jm(this,a.list);break;case "search":Km(this,a.list);break;default:a.playlist_length&&(this.Mb=a.playlist_length),
this.g=new Gm(a.list.substr(0,2),a.list.substr(2)),this.Vg||Lm(this,"/list_ajax?style=json&action_get_list=1",{list:this.g})}else if(a.playlist){var b=a.playlist.toString().split(",");0<this.ua&&(this.a=[]);z(b,function(a){a&&this.a.push(new rh({video_id:a}))},this);this.Mb=this.a.length;this.Vd=!0}else a.videoList&&(0<this.ua&&(this.a=[]),z(a.videoList,function(a){this.a.push(new rh(a))},this),this.Mb=this.a.length,this.Vd=!0);Ch(this,!!a.shuffle);a.suggestedQuality&&(this.i=a.suggestedQuality)}
y(Hm,R);f=Hm.prototype;f.loop=!1;f.xa=0;f.Do=!1;f.ua=0;f.title="";f.Mb=0;f.Hn=!1;f.Vd=!1;f.Vg=!1;f.ye=null;function Mm(a){if(++a.ua>=a.Mb)if(a.loop)a.ua=0;else return null;Bh(a,a.ua);return Ah(a,a.ua)}function Nm(a){if(0>--a.ua)if(a.loop)a.ua=a.Mb-1;else return null;Bh(a,a.ua);return Ah(a,a.ua)}function Ah(a,b){var c=void 0!=b?b:a.ua;if(c=a.a&&c in a.a?a.a[a.b[c]]:null)c.xa=a.xa||c.Hj||0;return c}
function Ch(a,b){a.Do=b;var c=a.b&&null!=a.b[a.ua]?a.b[a.ua]:a.ua;a.b=[];for(var d=0;d<a.a.length;d++)a.b.push(d);a.ua=c;if(a.Do){c=a.b[a.ua];for(d=1;d<a.b.length;d++){var e=Math.floor(Math.random()*(d+1)),g=a.b[d];a.b[d]=a.b[e];a.b[e]=g}for(d=0;d<a.b.length;d++)a.b[d]==c&&(a.ua=d)}a.u("shuffle")}function Bh(a,b){a.ua=yb(b,0,a.Mb-1);a.xa=0}function Om(a){return a.Mb}function Im(a,b){a.Vg||(a.g=new Gm("UU","PLAYER_"+b),Lm(a,"/list_ajax?style=json&action_get_user_uploads_by_user=1",{username:b}))}
function Jm(a,b){a.Vg||(a.g=new Gm("FL","PLAYER_"+b),Lm(a,"/list_ajax?style=json&action_get_favorited_by_user=1",{username:b}))}function Km(a,b){if(!a.Vg){a.g=new Gm("SR",b);var c={search_query:b};a.Hn&&(c.mob="1");Lm(a,"/search_ajax?style=json&embeddable=1",c)}}function Lm(a,b,c){Vj(S(b,c),{format:"JSON",Qa:function(a,b){Pm(this,b)},Z:a})}
function Pm(a,b){if(b.video&&b.video.length){a.title=b.title;a.description=b.description;a.views=b.views;a.author=b.author;var c=Ah(a);a.ua=0;a.a=[];z(b.video,function(a){a&&(a.video_id=a.encrypted_id,c&&a.video_id==c.M&&(this.ua=this.a.length),this.a.push(new rh(a)))},a);a.Mb=a.a.length;Ch(a,!1);a.Vg=!1;a.Vd=!0;a.ye&&a.ye()}}f.H=function(){this.ye=null;Yg(this.a);Hm.C.H.call(this)};var Qm=!!l.DOMTokenList,Rm=Qm?function(a){return a.classList}:function(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]},Sm=Qm?function(a,b){return a.classList.contains(b)}:function(a,b){return Va(Rm(a),b)},V=Qm?function(a,b){a.classList.add(b)}:function(a,b){Sm(a,b)||(a.className+=0<a.className.length?" "+b:b)},Tm=Qm?function(a,b){z(b,function(b){V(a,b)})}:function(a,b){var c={};z(Rm(a),function(a){c[a]=!0});z(b,function(a){c[a]=!0});a.className="";for(var d in c)a.className+=0<a.className.length?
" "+d:d},W=Qm?function(a,b){a.classList.remove(b)}:function(a,b){Sm(a,b)&&(a.className=Ma(Rm(a),function(a){return a!=b}).join(" "))},Um=Qm?function(a,b){z(b,function(b){W(a,b)})}:function(a,b){a.className=Ma(Rm(a),function(a){return!Va(b,a)}).join(" ")};function X(a,b,c){c?V(a,b):W(a,b)}function Vm(a,b){var c=!Sm(a,b);X(a,b,c);return c};function Wm(a,b){this.Vf=a;this.df=b+"::"}y(Wm,Xf);f=Wm.prototype;f.Vf=null;f.df="";f.set=function(a,b){this.Vf.set(this.df+a,b)};f.get=function(a){return this.Vf.get(this.df+a)};f.remove=function(a){this.Vf.remove(this.df+a)};f.Id=function(a){var b=this.Vf.Id(!0),c=this,d=new Wd;d.next=function(){for(var d=b.next();d.substr(0,c.df.length)!=c.df;)d=b.next();return a?d.substr(c.df.length):c.Vf.get(d)};return d};function Xm(a){R.call(this);this.a=a;if(this.rl){a="yt-html5-player-modules::"+this.rl;var b=new Zf;if(a=b.isAvailable()?a?new Wm(b,a):b:null)this.o=new ag(a)}}y(Xm,R);f=Xm.prototype;f.qa="";f.ed="";f.fe=!1;f.ba=!1;f.Ac=null;f.uf=function(a){var b=cb(arguments),c=v(this.yc,this),d=v(this.Xc,this);z(b,function(a){a.namespace=this.qa;a.xb.D("onEnter",c);a.xb.D("onExit",d)},this);this.u("command_add_cuerange",b,this.a.a)};f.pv=function(a){var b=cb(arguments);this.u("command_remove_cuerange",b,this.a.a)};
function Ym(a){a.u("command_remove_cuerange_all",a.qa,a.a.a)}function Zm(a){a.u("command_preroll_ready",a.qa,a.a.a)}function $m(a,b){V(b,a.qa);a.a.app.S.U.appendChild(b)}function an(a){a.u("command_show_dialog_area")}function bn(a){a.u("command_hide_all_dialogs")}f.create=function(){var a=this.qa+"-created";this.$a(this.a);Sm(Q(this.a),a);V(Q(this.a),a);this.fe=!0};f.destroy=function(){this.unload();W(Q(this.a),this.qa+"-created");this.fe=!1};
f.load=function(){V(Q(this.a),this.qa+"-loaded");this.u("loaded",this.qa)};f.unload=function(){W(Q(this.a),this.qa+"-loaded");this.u("unloaded",this.qa)};f.yc=function(){};f.Xc=function(){};f.je=function(){};f.log=function(a){this.u("command_log",this.ed,a)};function cn(a,b,c){var d={},e;for(e in b)d[a.qa+"_"+e]=b[e];b={};for(var g in c)b[a.qa+"_"+g]=c[g];a.u("command_log_timing",d,b)}f.Ni=function(){return null};
function dn(a,b){if(!a.o)return null;var c;try{c=a.o.get(b)}catch(d){a.o&&a.o.remove(b)}return c}function en(a,b,c){if(a.o)try{a.o.set(b,c)}catch(d){}}function fn(a,b){a.u("command_disable_controls",b,a.qa)}function gn(a,b){a.u("command_enable_controls",b,a.qa)}function hn(a){a.u("command_stop_redirect_controls")}function jn(a){a.u("command_play",!1,a.a.a)}function kn(a){a.u("command_pause",!1,a.a.a)}f.kb=function(a){this.u("command_redirected_show_is_playing",a)};f.iq=function(){};f.bp=function(){return[]};
f.$a=function(){return!1};f.Bo=function(a,b){this.Ac&&this.Ac.je&&this.Ac.je.apply(this.Ac,arguments)};f.Vh=function(){};function ln(a,b){this.a=a;this.xb=b;this.Ff=E("html5-endscreen",Q(this.a));V(this.Ff,this.xl);this.Pf=E("html5-endscreen-content",Q(this.a))}f=ln.prototype;f.xl="base-endscreen";f.Ff=null;f.Pf=null;f.xb=null;f.fe=!1;f.create=function(){this.fe=!0};f.destroy=function(){this.fe=!1};f.load=function(){};function mn(a){this.a={};this.g={};this.i={};this.b=nn(this,a)}y(mn,K);function nn(a,b,c){var d=0,e=Zc(b[d++]);if(u(b[d])||t(b[d])||null===b[d]){var g=b[d++];t(g)&&(g=g.join(" "));if(g=on(a,e,"className",g))pn(a,e,"className",g),qn(a,g,e)}for(;d<b.length;d++){var h=b[d];if(t(h))nn(a,h,e);else if(ia(h)){var g=a,k=e,m=void 0;for(m in h)h[m]&&pn(g,k,m,on(g,k,m,h[m]))}else u(h)&&pn(a,e,"child",on(a,e,"child",h))}c&&c.appendChild(e);return e}f=mn.prototype;f.N=function(){return this.b};
function qn(a,b,c){var d=b.split(" ");if(1<d.length)for(b=0;b<d.length;b++)qn(a,d[b],c);else a.a[b]=c}f.V=function(a,b){q(b)?a.insertBefore(this.b,a.childNodes[b]||null):a.appendChild(this.b)};f.Eg=function(){F(this.b)};function on(a,b,c,d){return u(d)&&"{{"==d.substr(0,2)?(a.g[d]=[b,c],null):d}f.update=function(a){for(var b in a)rn(this,b,a[b])};function rn(a,b,c){if(c!=a.i[b]){var d=a.g["{{"+b+"}}"];d&&(a.i[b]=c,pn(a,d[0],d[1],c))}}
function pn(a,b,c,d){if("child"==c){bd(b);if(!t(d)||t(d)&&u(d[0]))d=[d];c=[];for(var e=0;e<d.length;e++){var g=d[e];null===g||(!g.nodeType||1!=g.nodeType&&3!=g.nodeType?t(g)&&u(g[0])?c.push(nn(a,g)):g.N?c.push(g.N()):c.push($c(g.toString())):c.push(g))}for(a=0;a<c.length;a++)b.appendChild(c[a])}else"className"==c?b.className=d:null===d?b.removeAttribute(c):b.setAttribute(c,d.toString())}f.H=function(){this.a={};this.g={};this.i={};this.Eg();this.b=null;mn.C.H.call(this)};function sn(a){a&&(a.style.display="block")}function tn(a){a&&(a.style.display="none")}function un(a,b){var c=$e("requestAnimationFrame",window);return H(function(){c?c.call(window,a):a()},b||0)};function Y(a){this.template=new mn(a);L(this,this.template);this.element=this.template.N();this.A="block";this.J=[];this.j={}}y(Y,K);f=Y.prototype;f.N=function(){return this.element};f.V=function(a,b){this.template.V(a,b)};f.Eg=function(){this.template.Eg()};f.Aa=function(a){rn(this.template,"content",a)};f.show=function(){var a=this.element;a&&(a.style.display=this.A);this.element.removeAttribute("aria-hidden")};f.hide=function(){tn(this.element);this.element.setAttribute("aria-hidden","true")};
f.listen=function(a,b,c,d,e){a=J(a,b,v(c,d||this));this.J.push(a);u(e)&&(this.j[e]?this.j[e].push(a):this.j[e]=[a]);return a};f.cc=function(a){Cf(a)};function vn(a,b){a.cc(a.j[b]);a.j[b]=[]}f.stopPropagation=function(a){this.listen(this,a,function(a){a.stopPropagation()})};f.addEventListener=function(a,b,c){this.element.addEventListener?this.element.addEventListener(a,b,c):this.element.attachEvent&&this.element.attachEvent("on"+a,b)};
f.removeEventListener=function(a,b,c){this.element.removeEventListener?this.element.removeEventListener(a,b,c):this.element.detachEvent&&this.element.detachEvent("on"+a,b)};f.dispatchEvent=function(a){return this.element.dispatchEvent(a)};f.fireEvent=function(a,b){return this.element.fireEvent(a,b)};f.H=function(){this.cc(this.J);this.element=null;Y.C.H.call(this)};function wn(){Y.call(this,["div","",["div","ytp-channel-banner-container",["img","ytp-channel-banner",{src:"{{banner}}"}],["div","ytp-subscribe-curtain"]],["div","ytp-subscribe-card",["img","ytp-author-image",{src:"{{image}}"}],["div","ytp-subscribe-card-right",["div","ytp-author-name","{{author}}"],["div","html5-subscribe-button-container"]]]])}y(wn,Y);function xn(a,b,c,d,e,g,h){a&&(a={video_id:a,html5:1,page_subscribe:b?1:0},g&&(a.authuser=g),h&&(a.pageid=h),Vj("/get_video_metadata",{method:"GET",onError:d,Qa:c,sf:a,Z:e}))};function yn(a,b){ln.call(this,a,b);this.b=new wn;this.b.V(this.Ff);xn(this.a.getVideoData().M,!0,this.g,ba,this,this.a.K().Fa,this.a.K().Va)}y(yn,ln);yn.prototype.xl="subscribecard-endscreen";
yn.prototype.g=function(a,b){var c=b.user_info,d=this.a.getVideoData();d&&(d.va=c.external_id);rn(this.b.template,"banner",c.channel_banner_url);rn(this.b.template,"image",c.channel_logo_url||c.image_url);rn(this.b.template,"author",c.channel_title||c.username);d=b.video_info;d.subscription_ajax_token&&jf("subscription_ajax",d.subscription_ajax_token);c=c.subscription_button_html;this.b.template.a["html5-subscribe-button-container"].innerHTML=c?c:""};function zn(a,b,c){c=c||{};var d=c.Jb;d||(d=document.createElement("style"),document.getElementsByTagName("head")[0].appendChild(d),d=d.sheet||d.styleSheet);c.reset&&An(d);b=b instanceof Array?b.join(";"):b;d.insertRule?d.insertRule(a+"{"+b+"}",d.cssRules.length):d.addRule(a,b,-1);return d}function An(a){for(var b=(a.cssRules||a.rules).length;0<b;b--){var c=a;c.deleteRule?c.deleteRule(0):c.removeRule(0)}};function Bn(a){this.W=a}y(Bn,K);Bn.prototype.b=null;Bn.prototype.g=null;Bn.prototype.a=null;function Cn(a){a.b||(a.b=E("ad-container",Q(a.W)),a.W.K().ub&&V(a.b,"ad-container-single-media-element"));return a.b}function Dn(a){a.a&&(a.W.K().ub?(W(a.a,"ad-video"),En(a.W.app,a.a),a.a=null):(F(a.a),rj(a.a)))}
function Fn(a){if(!a.g){if(a.W.K().Fb){var b=Zc("button");V(b,"video-click-tracking");ad(b,qf("VISIT_ADVERTISERS_SITE"));var c=Zc("div");V(c,"video-click-tracking-container");c.appendChild(b);Cn(a).appendChild(c)}else b=Zc("div"),Tm(b,["video-click-tracking","ad-video"]),Cn(a).appendChild(b);a.g=b}return a.g}Bn.prototype.H=function(){Bn.C.H.call(this);this.a&&(En(this.W.app,this.a),this.a=null);Dn(this);bd(Cn(this));bd(Fn(this));this.g=this.b=null;delete this.W};
function Gn(a){if(!a.a){var b;b=a.W.app;if(b.a.ub){var c=new A(b.i.offsetLeft,b.i.offsetTop),d=Gd(b.i);b.O=new Fb(c.x,c.y,d.width,d.height);Hn(b.j);sj(b.i,1);rj(b.i);b=b.i}else b=In.getTag();a.a=b;Tm(a.a,["video-stream","ad-video"])}return a.a};function Jn(a,b,c,d){Y.call(this,["div",{className:"ytp-button",role:"button","aria-label":"{{label}}","aria-disabled":"{{disabled}}",tabindex:"{{tabindex}}"},"{{content}}"]);this.A="inline-block";this.g=a;this.L=this.a=this.F=null;this.k=!1;this.listen(this.element,"click",this.dv);this.listen(this.element,"keypress",this.ev);a=this.g;var e=v(this.cv,this);a.a&&Kn(a.a,this.element,e);b&&Ln(this,b);c&&this.Ib(c);d&&(this.a=d)}y(Jn,Y);
function Ln(a,b){b&&""!=b&&(a.F&&W(a.element,a.F),a.F=b,V(a.element,b))}f=Jn.prototype;f.Ib=function(a){rn(this.template,"label",a)};function Mn(a,b){a.L=b;rn(a.template,"tabindex",b)}f.cv=function(){return this.k?null:this.a?$c(this.a):null};f.enable=function(){this.k=!1;this.template.update({disabled:null,tabindex:this.L});W(this.element,"ytp-disabled")};f.disable=function(){this.k=!0;this.template.update({disabled:"true",tabindex:null});V(this.element,"ytp-disabled")};
f.dv=function(a){this.k&&(a.stopImmediatePropagation(),a.preventDefault())};f.ev=function(a){if(13==a.keyCode||32==a.keyCode)a.stopPropagation(),a.preventDefault(),If(this.element,"click")};f.H=function(){var a=this.g;if(a.a){var a=a.a,b=ja(this.element);Xg(a.a[b]);a.a[b]=null}this.g=null;Jn.C.H.call(this)};function Nn(a,b){Y.call(this,["canvas"]);this.element.width=a;this.element.height=b;this.width=a;this.height=b;this.Z=this.element.getContext("2d");this.a=0;this.k=null}y(Nn,Y);Nn.prototype.g=function(a,b){I(this.a);this.a=un(v(this.g,this,a,b),b);a.call(this,new Date-this.k)};Nn.prototype.H=function(){I(this.a);this.Z=null;Nn.C.H.call(this)};function On(){Nn.call(this,84,84);this.b=this.width/2;this.F=this.height/2;this.i=Pn}y(On,Nn);var Pn=3*Math.PI/2,Qn=2*Math.PI;function Rn(a,b){var c=b*Qn+Pn;a.Z.beginPath();a.Z.arc(a.b,a.F,40,a.i,c,!1);a.Z.lineWidth=4;a.Z.strokeStyle="#b8b8b8";a.Z.stroke();a.i=c}
On.prototype.show=function(){On.C.show.call(this);this.Z.globalAlpha=0.8;this.Z.beginPath();this.Z.arc(this.b,this.F,42,0,Qn);this.Z.fillStyle="#333";this.Z.fill();var a=35*(Math.sqrt(3)/2);this.Z.save();this.Z.fillStyle="#fff";this.Z.globalAlpha=0.9;this.Z.translate(a,this.b);this.Z.beginPath();this.Z.lineTo(0,a/2);this.Z.lineTo(28,0);this.Z.lineTo(0,-a/2);this.Z.closePath();this.Z.fill();this.Z.restore();Rn(this,0)};function Sn(a){var b=Math.floor(a/86400),c=Math.floor(a%86400/3600),d=Math.floor(a%3600/60);a=Math.floor(a%60);var e="";0<b&&(e+=b+":",10>c&&(e+="0"));0<c&&(e+=c+":",10>d&&(e+="0"));e+=d+":";10>a&&(e+="0");return e+a};var Tn={OC:"html5-stop-propagation",oA:"html5-chromeless",ZB:"html5-live-dvr-disabled",$B:"html5-live-dvr-engaged",aC:"html5-live-playback",iC:"html5-mobile",kC:"modest-branding",mC:"html5-native-controls",TC:"html5-tablet",SC:"html5-tablet-body",fC:"html5-main-video",dD:"html5-video-container",eD:"html5-video-content",fD:"html5-video-controls",gD:"ytp-fallback",hD:"ytp-fallback-content",jD:"html5-video-loader",oD:"html5-watermark",Yz:"html5-branded-watermark",nD:"html5-viewport-sheet",uA:"html5-context-menu",
as:"html5-context-menu-copy-debug-info",bs:"html5-context-menu-copy-embed-html",cs:"html5-context-menu-copy-video-url",ds:"html5-context-menu-copy-video-url-at-current-time",es:"html5-context-menu-link",gs:"html5-context-menu-report-playback-issue",hs:"html5-context-menu-show-video-info",vA:"html5-show-video-info-template",jC:"html5-modal-panel",QB:"html5-info-bar",Sz:"autohide-off",Tz:"autohide-on",Rz:"autohide-fade",Pz:"autohide-auto",Qz:"autohide-embeds",Uz:"autohide-seekbar",Oz:"autohide-aspect",
EB:"hide-controls",FB:"hide-info-bar",GB:"html5-hide-share",HB:"html5-hide-volume",mD:"video-thumbnail",xC:"html5-popup-dialog",Iz:"html5-async-progress",Jz:"html5-async-success",Hz:"html5-async-error",jA:"html5-center-overlay",HC:"ytp-scalable-icon-shrink",GC:"ytp-scalable-icon-grow",LB:"house-brand"};function Un(a,b){(a=Oc(a))&&a.style&&(a.style.display=b?"":"none",Jc(a,"hid",!b))}function Vn(a){return(a=Oc(a))?!("none"==a.style.display||Ic(a,"hid")):!1}function Wn(a){z(arguments,function(a){Un(a,!0)})}function Xn(a){z(arguments,function(a){Un(a,!1)})}function Yn(a){var b=document.body;if(void 0!=b.style[a])return a;a=a.charAt(0).toUpperCase()+a.substr(1);for(var c=["Moz","Webkit","ms","O"],d=0;d<c.length;d++)if(void 0!=b.style[c[d]+a])return c[d]+a}
function Zn(a,b,c){(a=Oc(a))&&a.style&&(b=Yn(b))&&(a.style[b]=c)};var $n=window.location.protocol+"//i.ytimg.com/",ao=4/3;function bo(a,b,c){var d;switch(b.md){case 30:d=co;break;default:d=eo}return d(a,b,c)}function eo(a,b,c){if(!c){c=a.clientHeight;a=a.clientWidth;if((900<a||600<c)&&b.vo)return b.vo;if((430<a||320<c)&&b.wo)return b.wo}return b.Gi?b.Gi:b.M?fo(b.M):""}function co(a,b){return b.Gi?b.Gi:b.M?S("//docs.google.com/vt",{id:b.M,authuser:b.Fa,authkey:b.xn}):"//docs.google.com/images/doclist/cleardot.gif"}
function fo(a,b){return($n+"vi/"+escape(a)+"/"+escape(b||"hqdefault.jpg")).replace("i.","i"+(a.charCodeAt(0)%hf("THUMBNAIL_NUM_SHARDS",1)+1)+".")};function go(a,b,c){this.b=a;(a=b||null)||(a=ho(this.b));a="("+a.join("|")+")";a=wa("__%s__",a);this.g=RegExp(a,"g");this.a=c||{}}var io=/__([a-z]+(?:_[a-z]+)*)__/g;function jo(a,b){var c=Oc(a).innerHTML,c=c.replace(/^\s*(\x3c!--\s*)?/,""),c=c.replace(/(\s*--\x3e)?\s*$/,"");return new go(c,b,void 0)}function ho(a){var b=[],c={};a.replace(io,function(a,e){e in c||(c[e]=!0,b.push(e))});return b}
function ko(a,b,c,d){var e=v(function(a,e){c&&(e=c(e));return d?b[e]||this.a[e]||"":ya(b[e]||this.a[e]||"")},a);return a.b.replace(a.g,e)};function lo(a,b){this.W=a;this.F=b;var c=E("videowall-still-content-template",Q(this.W));this.B=jo(c);c=Zc("a");c.tabIndex=0;V(c,"videowall-still");J(c,"click",v(this.nv,this));J(c,"keypress",v(this.ov,this));this.a=c;this.o=this.W.app.S.B}f=lo.prototype;
f.update=function(a,b){this.g=a.feature_type||"endscreen";this.j=a.id||a.video_id;this.i=a.list;var c=!1,d=!1;a.endscreen_autoplay||("episodic"==this.g?d=!0:this.i&&(c=!0));var e=Qb(a);c||d?(e.index=parseInt(e.index,10)+1,e.title||(e.title=a.playlist_title,e.author=a.playlist_author),e.playlist_length||(e.playlist_length=0)):e.duration=Sn(a.length_seconds);var g=fo(c&&a.thumbnail_ids?a.thumbnail_ids.split(",")[0]:this.j,b?"hqdefault.jpg":"mqdefault.jpg");this.a.style.backgroundImage="url("+g+")";
this.a.innerHTML=ko(this.B,e,void 0,!0);X(this.a,"videowall-still-featured",!!a.featured);X(this.a,"videowall-still-list",c);X(this.a,"videowall-still-episodic",d)};f.N=function(){return this.a};f.select=function(a,b){this.i?mo(this.W.app,this.j,a||this.g,this.i,b):mo(this.W.app,this.j,a||this.g,void 0,b)};f.Bu=function(){var a=new Date-this.A;1E4>a?(Rn(this.b,a/1E4),a=1E4-a,E("videowall-still-listlabel-autoplay-message",this.a).innerHTML=rf("AUTOPLAY_MESSAGE",Math.ceil(a/1E3))):(nf(this.k),this.select("autoplay"))};
f.Cu=function(a){var b=ld(a.target,"videowall-still-listlabel-autoplay"),c=E("autoplay-play-canvas",this.a);V(b,"videowall-still-listlabel-autoplay-hide");V(c,"autoplay-play-canvas-hide");X(this.a,"videowall-still-autoplay",!1);a.stopPropagation();this.F.log({cancelButtonClick:"1"});nf(this.k)};f.nv=function(a){this.select(void 0,a.ctrlKey)};f.ov=function(a){switch(a.keyCode){case 13:case 32:this.select(),a.preventDefault()}};function no(a,b,c){ln.call(this,a,b);this.dl=[];this.xb.D("onResize",this.Rv,this);this.xb.D("videodatachange",this.Sv,this);this.b=c}y(no,ln);f=no.prototype;f.xl="videowall-endscreen";f.lh=null;f.rb=null;f.dl=null;f.Yo=!1;f.mh=0;f.create=function(){no.C.create.call(this);this.rb=this.a.getVideoData().Oc;oo(this)};f.destroy=function(){this.Pf.innerHTML="";delete this.rb;no.C.destroy.call(this)};
f.load=function(){if(this.rb&&this.rb.length&&this.rb[0].endscreen_autoplay){var a=po(this,0);a.b=new On;V(a.b.element,"autoplay-play-canvas");a.b.V(a.a);a.b.show();X(a.a,"videowall-still-autoplay",!0);var b=E("videowall-still-listlabel-autoplay",a.a),c=new Jn(a.o);c.V(b);Ln(c,"videowall-still-listlabel-autoplay-cancel");c.Aa(a.o.getMsg("YTP_BUTTON_CANCEL"));c.show();J(c,"click",v(a.Cu,a));a.F.log({cancelButtonShow:"1"});a.A=new Date;a.k=mf(v(a.Bu,a),50)}};
function oo(a){if(a.rb&&a.rb.length){X(a.Ff,"endscreen-enable-layout",!0);a.Pf.innerHTML="";var b=Gd(a.Ff);Sm(Q(a.a),"ad-showing")&&(b.height-=200);b.height-=30;var c=Math.floor(b.width/158),d=Math.floor(b.height/(158/1.45));if(1>d||1>c)a.mh=0;else{var e=a.rb.length,g=!1,h="episodic"==a.rb[0].feature_type,k=a.rb[0].endscreen_autoplay;(a.rb[0].featured||h||k)&&2<d&&2<c&&(g=!0,e+=3);X(a.Pf,"feature-video",g);for(var k=h=0,m=Db(b),p=!0;0<=e&&(h<c||k<d);){var s=e>=k,r=e>=h;if(p&&r||!s&&r)e-=h,k++;else if(s)e-=
k,h++;else break;p=1.45*(h/k)>m}a.Yo=p;c=new B(h,k);a.Yo?(d=1/c.width,b=b.width*d,d=b/1.45):(d=1/c.height,d*=b.height,b=1.45*d);b=new B(Math.floor(b),Math.floor(d));a.mh=c.width*c.height;g&&(a.mh-=3);a.lh&&An(a.lh);g=qo(b);d={Jb:a.lh};a.lh=zn(".videowall-still",g,d);g=qo(b.clone().scale(2));d.Jb=a.lh;zn(".feature-video .videowall-still:first-child",g,d);Ed(a.Pf,b.width*c.width,b.height*c.height)}g=0;for(b=a.mh;g<b;g++)c=po(a,g),a.Pf.appendChild(c.N());X(a.Ff,"endscreen-enable-layout",!1)}}
function po(a,b){var c=a.dl[b];c||(c=new lo(a.a,a.b),a.dl[b]=c);c.update(a.rb[b],0==b&&a.rb[0].featured);return c}function qo(a){return["width:"+a.width+"px","height:"+a.height+"px"]}f.Rv=function(){oo(this)};f.Sv=function(){var a=this.a.getVideoData().Oc;this.rb!=a&&(this.rb=a,oo(this))};function ro(a){Xm.call(this,a);a.K().ql?this.Of=new yn(this.a,this.F):a.K().xc?this.Of=new no(this.a,this.F,this):this.Of=new ln(this.a,this.F)}y(ro,Xm);f=ro.prototype;f.qa="endscreen";f.ed="end";f.Of=null;function so(a){var b=a.K(),c=a.getVideoData();a=1==O(a.app).B;return to(b)&&!Fm(c,"ypc_module")&&a}f.$a=function(a){return so(a)};
f.create=function(){ro.C.create.call(this);var a=Math.max(1E3*(this.a.getVideoData().ta-10),0),a=new di(a,2147483647,{id:"preload"}),b=new di(2147483647,2147483647,{id:"load",priority:6});this.uf(a,b)};f.destroy=function(){Ym(this);this.Of.destroy();ro.C.destroy.call(this)};f.load=function(){ro.C.load.call(this);this.Of.load();this.ba=!0};f.unload=function(){ro.C.unload.call(this);this.ba=!1};f.yc=function(a){ro.C.yc.call(this,a);"preload"==a.getId()?this.Of.create():uo(this.a.app)||this.load()};
f.Xc=function(a){"load"==a.getId()&&this.unload();ro.C.Xc.call(this,a)};function vo(a){return so(a)?new ro(a):null};var wo={created:1,ready:2,testing:4,"testing-starting":3,live:6,"live-starting":5,complete:8,"complete-starting":7};/*
 Portions of this code are from MochiKit, received by
 The Closure Authors under the MIT license. All other code is Copyright
 2005-2009 The Closure Authors. All Rights Reserved.
*/
function xo(a,b){this.o=[];this.L=a;this.J=b||null;this.k=this.g=!1;this.j=void 0;this.G=this.kv=this.A=!1;this.F=0;this.i=null;this.B=0}xo.prototype.cancel=function(a){if(this.g)this.j instanceof xo&&this.j.cancel();else{if(this.i){var b=this.i;delete this.i;a?b.cancel(a):(b.B--,0>=b.B&&b.cancel())}this.L?this.L.call(this.J,this):this.G=!0;this.g||this.a(new yo)}};xo.prototype.I=function(a,b){this.A=!1;zo(this,a,b)};function zo(a,b,c){a.g=!0;a.j=c;a.k=!b;Ao(a)}
function Bo(a){if(a.g){if(!a.G)throw new Co;a.G=!1}}xo.prototype.b=function(a){Bo(this);zo(this,!0,a)};xo.prototype.a=function(a){Bo(this);zo(this,!1,a)};function Do(a,b,c,d){a.o.push([b,c,d]);a.g&&Ao(a);return a}function Eo(a){var b=new xo;Do(a,b.b,b.a,b);return b}function Fo(a){return Oa(a.o,function(a){return ha(a[1])})}
function Ao(a){a.F&&a.g&&Fo(a)&&(l.clearTimeout(a.F),delete a.F);a.i&&(a.i.B--,delete a.i);for(var b=a.j,c=!1,d=!1;a.o.length&&!a.A;){var e=a.o.shift(),g=e[0],h=e[1],e=e[2];if(g=a.k?h:g)try{var k=g.call(e||a.J,b);q(k)&&(a.k=a.k&&(k==b||k instanceof Error),a.j=b=k);b instanceof xo&&(d=!0,a.A=!0)}catch(m){b=m,a.k=!0,Fo(a)||(c=!0)}}a.j=b;d&&(Do(b,v(a.I,a,!0),v(a.I,a,!1)),b.kv=!0);c&&(a.F=l.setTimeout(Vb(b),0))}function Co(){ua.call(this)}y(Co,ua);Co.prototype.message="Deferred has already fired";
Co.prototype.name="AlreadyCalledError";function yo(){ua.call(this)}y(yo,ua);yo.prototype.message="Deferred was canceled";yo.prototype.name="CanceledError";function Go(a,b){var c=b||{},d=c.document||document,e=Zc("SCRIPT"),g={Oo:e,vc:void 0},h=new xo(Ho,g),k=null,m=null!=c.timeout?c.timeout:5E3;0<m&&(k=window.setTimeout(function(){Io(e,!0);h.a(new Jo(1,"Timeout reached for loading script "+a))},m),g.vc=k);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Io(e,c.hv||!1,k),h.b(null))};e.onerror=function(){Io(e,!0,k);h.a(new Jo(0,"Error while loading script "+a))};Rc(e,{type:"text/javascript",charset:"UTF-8",
src:a});Ko(d).appendChild(e);return h}function Ko(a){var b=a.getElementsByTagName("HEAD");return!b||Wa(b)?a.documentElement:b[0]}function Ho(){if(this&&this.Oo){var a=this.Oo;a&&"SCRIPT"==a.tagName&&Io(a,!0,this.vc)}}function Io(a,b,c){null!=c&&l.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){F(a)},0)}function Jo(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);ua.call(this,c);this.code=a}y(Jo,ua);function Lo(a,b){this.b=new ve(a);this.a=b?b:"callback";this.vc=5E3}var Mo=0;Lo.prototype.send=function(a,b,c,d){a=a||null;d=d||"_"+(Mo++).toString(36)+x().toString(36);l._callbacks_||(l._callbacks_={});var e=this.b.clone();if(a)for(var g in a)a.hasOwnProperty&&!a.hasOwnProperty(g)||Ke(e,g,a[g]);b&&(l._callbacks_[d]=No(d,b),Ke(e,this.a,"_callbacks_."+d));b=Go(e.toString(),{timeout:this.vc,hv:!0});Do(b,null,Oo(d,a,c),void 0);return{Ba:d,jc:b}};
Lo.prototype.cancel=function(a){a&&(a.jc&&a.jc.cancel(),a.Ba&&Po(a.Ba,!1))};function Oo(a,b,c){return function(){Po(a,!1);c&&c(b)}}function No(a,b){return function(c){Po(a,!0);b.apply(void 0,arguments)}}function Po(a,b){l._callbacks_[a]&&(b?delete l._callbacks_[a]:l._callbacks_[a]=ba)};function Qo(a){R.call(this);this.g=ko(new go("//gdata.youtube.com/feeds/api/users/live/broadcasts/__video_id__/states?v=2&alt=json-in-script"),{video_id:a});this.a=new Ji(15E3+Math.floor(3E4*Math.random()));this.a.addEventListener("tick",v(this.b,this));this.b();this.a.start()}y(Qo,R);Qo.prototype.H=function(){this.a.dispose();Qo.C.H.call(this)};Qo.prototype.b=function(){(new Lo(this.g)).send(null,v(this.j,this),v(this.i,this))};
Qo.prototype.j=function(a){this.u("payload",a);Ki(this.a,15E3+Math.floor(3E4*Math.random()))};Qo.prototype.i=function(){this.u("error");var a=this.a.a;192E4>a&&Ki(this.a,2*a)};function Ro(){this.g=new mn(["div","html5-fresca-module",["div","html5-fresca-band-slate",["hgroup","html5-fresca-message",["h2","html5-fresca-heading","{{heading}}"],["h3","html5-fresca-subheading","{{subheading}}"],["h4","html5-fresca-long-test","{{long_text}}"]],["span","html5-fresca-countdown","{{countdown}}"]]]);L(this,this.g);this.b=this.g.a["html5-fresca-module"];V(this.b,"html5-stop-propagation");this.i=0;this.a=null}y(Ro,K);Ro.prototype.N=function(){return this.b};
Ro.prototype.update=function(a){if(!this.k||this.a.state!=a.state||this.a.startTime!=a.startTime||this.a.b!=a.b||this.a.a.join()!=a.a.join()){this.a=a;this.b.style.backgroundImage=this.a.b||"none";a=this.a.a;if(!a.length){t:switch(this.a.state){case 6:a="";break t;case 8:case 7:a=qf("FRESCA_COMPLETE_MESSAGE");break t;default:a=qf("FRESCA_STAND_BY_MESSAGE")}a=[a]}this.g.update({heading:a[0]||"",subheading:a[1]||"",long_text:a[2]||""});this.j()}};
function So(a){var b=Math.floor((new Date).valueOf()/1E3);return b>a?qf("FRESCA_STARTING_SOON_MESSAGE"):Sn(a-b)}Ro.prototype.j=function(){var a;a=this.a;a.startTime?(a=a.state,a=6==a||8==a||7==a?!1:!0):a=!1;X(this.b,"html5-fresca-show-countdown",a);a&&(this.g.update({countdown:So(this.a.startTime)}),I(this.i),this.i=H(v(this.j,this),1E3))};Ro.prototype.H=function(){I(this.i);this.b=null;Ro.C.H.call(this)};function To(a){this.a=[];a&&Uo(this,a)}To.prototype.state=-1;function Uo(a,b){var c=b.feed;if(c){var d=c.yt$lifeCycleState;d&&(a.state=wo[d.$t]||-1);(d=c.yt$when)&&d.start&&(d=new Date(d.start),a.startTime=Math.floor(d.valueOf()/1E3));if(c=c.yt$slate)c.imgUrl&&(a.b="url("+c.imgUrl+")"),(c=c.content)&&c.length&&(c=c.splice(0,3),a.a=Na(c,function(a){return a.$t}))}};function Vo(a){Xm.call(this,a)}y(Vo,Xm);f=Vo.prototype;f.qa="fresca";f.ed="fresca";f.ci=!1;f.Mg=!1;f.$a=function(){return Fm(this.a.getVideoData(),"fresca_module")};f.create=function(a){Vo.C.create.call(this);this.ci=this.Mg=!1;gn(this,["play_pause","seek"]);this.i=new Ro;this.a.app.S.g.appendChild(this.i.N());this.g=a||new Qo(this.a.getVideoData().M);this.g.D("payload",this.Ru,this);this.g.D("error",this.Qu,this);this.D("onStateChange",this.qo,this)};
f.destroy=function(){this.ba&&this.unload();this.$("onStateChange",this.qo,this);Yg(this.g,this.i);Vo.C.destroy.call(this)};f.load=function(){Vo.C.load.call(this);this.ba=!0};f.unload=function(){this.ba=!1;Vo.C.unload.call(this)};f.qo=function(a){this.b&&(this.ci=P(a.state,2),(Wo(a,16)||this.ci)&&Xo(this,this.b))};f.Qu=function(){this.Mg||(this.b=new To,Xo(this,this.b))};f.Ru=function(a){this.b=new To(a);6!=this.b.state||this.a.getVideoData().O.length?Xo(this,this.b):this.a.Tj(this.a.getVideoData().M)};
function Xo(a,b){var c=6>b.state;!c&&a.a.app.b.ga&&(b.b||b.a.length)&&(c=!0);a.ci&&!a.a.K().xc&&(c=!0);if(!a.Mg)switch(b.state){case 6:a.Mg=!0;gn(a,["play_pause","seek"]);Zm(a);break;case 8:case 7:c=a.Mg=!0}c&&a.i.update(b);c&&!a.ba?a.load():!c&&a.ba&&a.unload()}function Yo(a){return Fm(a.getVideoData(),"fresca_module")?new Vo(a):null};function Zo(a){this.Kg=a||window;this.ae=[]}f=Zo.prototype;f.Kg=null;f.ae=null;f.listen=function(a,b,c,d){c=v(c,d||this.Kg);a=J(a,b,c);this.ae.push(a);return a};function $o(a,b,c,d){d=v(d,a.Kg);b=Df(b,c,d);a.ae.push(b);return b}function ap(a,b,c){c=v(c,a.Kg);b=Gf(b,c,"yt-uix-button-menu-item");a.ae.push(b)}f.cc=function(a){Cf(a);Za(this.ae,a)};f.removeAll=function(){Cf(this.ae);this.ae=[]};function bp(a,b,c){this.a=a;this.i=b||0;this.b=c;this.g=v(this.cu,this)}y(bp,K);f=bp.prototype;f.Ba=0;f.H=function(){bp.C.H.call(this);this.stop();delete this.a;delete this.b};f.start=function(a){this.stop();this.Ba=Li(this.g,q(a)?a:this.i)};f.stop=function(){0!=this.Ba&&l.clearTimeout(this.Ba);this.Ba=0};f.cu=function(){this.Ba=0;this.a&&this.a.call(this.b)};var cp={},dp=null;function ep(a){a=ja(a);delete cp[a];Pb(cp)&&dp&&dp.stop()}function fp(){dp||(dp=new bp(function(){gp()},20));var a=dp;0!=a.Ba||a.start()}function gp(){var a=x();Jb(cp,function(b){hp(b,a)});Pb(cp)||fp()};function ip(){Gi.call(this);this.a=0;this.k=this.startTime=null}y(ip,Gi);f=ip.prototype;f.rk=function(){this.Ed("begin")};f.Mi=function(){this.Ed("end")};f.pd=function(){this.Ed("finish")};f.onStop=function(){this.Ed("stop")};f.Ed=function(a){Hi(this,a)};function jp(a,b,c,d){ip.call(this);if(!t(a)||!t(b))throw Error("Start and end parameters must be arrays");if(a.length!=b.length)throw Error("Start and end points must be the same length");this.g=a;this.o=b;this.duration=c;this.j=d;this.b=[]}y(jp,ip);f=jp.prototype;f.$c=0;
function kp(a){if(0==a.a)a.$c=0,a.b=a.g;else if(1==a.a)return;ep(a);var b=x();a.startTime=b;-1==a.a&&(a.startTime-=a.duration*a.$c);a.k=a.startTime+a.duration;a.$c||a.rk();a.Ed("play");-1==a.a&&a.Ed("resume");a.a=1;var c=ja(a);c in cp||(cp[c]=a);fp();hp(a,b)}f.stop=function(a){ep(this);this.a=0;a&&(this.$c=1);lp(this,this.$c);this.onStop();this.Mi()};f.H=function(){0==this.a||this.stop(!1);this.Ed("destroy");jp.C.H.call(this)};f.destroy=function(){this.dispose()};
function hp(a,b){a.$c=(b-a.startTime)/(a.k-a.startTime);1<=a.$c&&(a.$c=1);lp(a,a.$c);1==a.$c?(a.a=0,ep(a),a.pd(),a.Mi()):1==a.a&&a.il()}function lp(a,b){ha(a.j)&&(b=a.j(b));a.b=Array(a.g.length);for(var c=0;c<a.g.length;c++)a.b[c]=(a.o[c]-a.g[c])*b+a.g[c]}f.il=function(){this.Ed("animate")};f.Ed=function(a){Hi(this,new mp(a,this))};function mp(a,b){fi.call(this,a);this.x=b.b[0];this.y=b.b[1];this.duration=b.duration;this.state=b.a}y(mp,fi);var np=/#(.)(.)(.)/;function op(a){if(!pp.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(np,"#$1$1$2$2$3$3"));a=a.toLowerCase();return[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)]}var pp=/^#(?:[0-9a-f]{3}){1,2}$/i;function qp(a,b,c,d,e){jp.call(this,b,c,d,e);this.element=a}y(qp,jp);qp.prototype.i=ba;qp.prototype.il=function(){this.i();qp.C.il.call(this)};qp.prototype.Mi=function(){this.i();qp.C.Mi.call(this)};qp.prototype.rk=function(){this.i();qp.C.rk.call(this)};function rp(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");qp.apply(this,arguments)}y(rp,qp);
rp.prototype.i=function(){this.element.style.left=Math.round(this.b[0])+"px";this.element.style.top=Math.round(this.b[1])+"px"};function sp(a){return a*a*a}function tp(a){return 1-Math.pow(1-a,3)};function up(a,b,c,d,e){this.qb=a;this.element=b;this.i=c;this.g=d;this.Ie=e;this.Hb=this.a=!1;this.al=!0}function vp(a,b){b.D("onHideControls",function(){this.al=!1;this.gh()},a);b.D("onShowControls",function(){this.al=!0;this.gh()},a);b.D("onResize",a.gh,a)}
function wp(a,b){var c=Wc("div","annotation-x-button-container"),d=Wc("div","annotation-x-button");c.appendChild(d);a.i.listen(c,"click",v(function(a){var c=this.Ie,d=this.qb;d&&d.i&&c.log_(xp(c,d,4));b(a);a.stopPropagation();this.Hb=!0},a));return c}f=up.prototype;f.N=function(){return this.element};f.show=function(){};f.hide=function(){};f.destroy=function(){F(this.element)};f.gh=function(){};function yp(a,b,c,d,e){up.call(this,a,b,c,d,e);this.b=Wc("div","invideo-video-text-container");this.j=!1}y(yp,up);function zp(a){var b=new rp(a.element,[a.element.offsetLeft,a.element.offsetTop],[a.element.offsetLeft,a.element.offsetTop-a.element.offsetHeight],300,tp);wi(b,"begin",v(function(){this.a=!0},a));kp(b)}
function Ap(a){var b=new rp(a.element,[a.element.offsetLeft,a.element.offsetTop],[a.element.offsetLeft,a.element.offsetTop+a.element.offsetHeight+4],300,sp);wi(b,"end",v(function(){this.a=!1;Xn(this.element)},a));kp(b)}
function Bp(a){Ed(a.element,444,56);var b=a.qb.data,c={src:b.image_url,"class":"invideo-video-img"},d=Wc("div","invideo-video-img-container"),c=Wc("img",c);Ed(c,100,56);d.appendChild(c);a.element.appendChild(d);Ed(a.b,244,56);d=Wc("span","iv-subtitle-text");fd(d,b.text_line_1);a.b.appendChild(d);d=Wc("span","iv-title-text");fd(d,b.text_line_2);a.b.appendChild(d);a.element.appendChild(a.b);b=wp(a,v(function(){Ap(this)},a));a.element.appendChild(b);a.i.listen(a.element,"click",v(function(){var a=Cp(this.qb);
Dp(this.Ie,this.qb);window.open(a.value)},a))}yp.prototype.show=function(){if(!this.a){this.j||(Bp(this),this.j=!0);this.gh();Wn(this.element);var a=this.Ie,b=this.qb;b&&b.i&&a.log_(xp(a,b,2));zp(this)}};yp.prototype.hide=function(){this.a&&Ap(this)};yp.prototype.gh=function(){var a=this.g.vf,b=this.g.Qc;if(a&&b){var c=Gd(this.element),d=b.height-a.top,b=c.width<b.width&&c.height<b.height,e=this.g.ob?35:5,e=this.al?e:0;td(this.element,-a.left,this.a&&b?d-c.height-e:d)}};function Ep(a,b){return null!=b&&!!b.match(a)}function Fp(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Gp(a,b,c,d){var e=new Hp;e.type=c;e.defaultValue=d;e.b=oa(Ep,/.+/);return Ip(a[b],e)}function Jp(a,b,c){var d=new Hp;d.type="OPTIONAL";d.a=function(a){if(isNaN(parseInt(a,0)))return null;a=parseInt(a,0).toString(16);return"#"+"000000".substring(0,6-a.length)+a};d.b=function(a){return!!a};d.defaultValue=c;return Ip(a[b],d)}
function Kp(a,b,c,d){var e=new Hp;e.type=c;e.defaultValue=d;return Ip(a[b],e)}function Lp(a,b,c,d,e){var g=new Hp;g.type=d;g.defaultValue=e;g.b=oa(Fp,c);return Ip(a[b],g)}function Mp(a,b,c){var d=new Hp;d.type="OPTIONAL";d.defaultValue=c;d.b=function(a){return!0==a||!1==a};d.a=function(a){return"true"==a||"false"==a?"true"==a:a};return Ip(a[b],d)}function Np(a,b,c){var d=new Hp;d.type="OPTIONAL";d.defaultValue=c;d.a=function(a){return parseFloat(a)};return Ip(a[b],d)}
function Op(a){var b=new Hp;b.type="OPTIONAL";b.defaultValue=0;b.a=function(a){return parseInt(a,10)};return Ip(a.d,b)}function Pp(a,b,c,d,e,g,h){var k=new Hp;k.type="OPTIONAL";k.a=function(a){a=10==c?parseFloat(a):parseInt(a,c);return g&&null!=a&&!isNaN(a)?yb(a,d,e):a};k.defaultValue=h;k.b=function(a){return null!=a&&!isNaN(a)&&a>=d&&a<=e};return Ip(a[b],k)}
function Qp(a,b){var c=new Hp;c.type="OPTIONAL";c.defaultValue=0;c.a=function(a){if("never"==a)return-1;a=a.split(":");if(3<a.length)return null;var b=0,c=1;z(a,function(a){a=parseFloat(a);0>a&&(c=-c);b=60*b+Math.abs(a)});return c*b};return Ip(a[b],c)}function Rp(a,b){return null==b?null:a(b)}function Sp(a,b,c,d,e){if(null==a||null==a[b])return null;var g=new Hp;g.type=d;g.defaultValue=e;g.b=function(a){return!!a};g.a=oa(Rp,c);return Ip(a[b],g)}
function Ip(a,b){var c;if("OPTIONAL"==b.type||"REQUIRED"==b.type){if(c=null==a?null:b.a(t(a)&&a.length?a[0]:a),!b.b(c)){if("REQUIRED"==b.type)throw"Required field missing.";c=null==b.defaultValue?null:b.defaultValue}}else c="REPEATED"==b.type?null!=a?Tp(t(a)?a:[a],b):null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]:"IDLIST"==b.type?Up(a,b):null;return c}
function Up(a,b){function c(a){return Ma(a.split(/ +/),function(a){return""!=a})}return null!=a?Tp(c(a),b):null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]}function Tp(a,b){for(var c=[],d=0;d<a.length;++d){var e=b.a(a[d]);b.b(e)&&c.push(e)}return c.length?c:null!=b.defaultValue?t(b.defaultValue)?b.defaultValue:[b.defaultValue]:[]}function Hp(){this.a=Vp;this.b=Wp}Hp.prototype.type="OPTIONAL";Hp.prototype.defaultValue=null;function Vp(a){return null==a?null:a.toString()}
function Wp(a){return null!=a};function Xp(a){this.value=a}function Yp(a){a=Qp(a,"value");return new Xp(a)};function Zp(){}function $p(a){var b=Kp(a,"external_user_id","OPTIONAL");a=Kp(a,"subscription_token","OPTIONAL");return b&&a?new Zp:null};function aq(a,b,c,d){this.value=a;this.target=b;this.a=c;this.b=d}var bq={xA:"current",nC:"new"};function cq(a){var b=Kp(a,"value","OPTIONAL");if(null==b||null==Lj(b))return null;var c=Lp(a,"target",bq,"OPTIONAL","current");if(null==c)return null;Mp(a,"trusted",!1);var d=Kp(a,"link_class","OPTIONAL","");a=Mp(a,"show_link_icon",!0);return new aq(b,c,d,a)}function dq(a){return a.value?a.value:null};function eq(a,b,c,d){this.type=a;this.trigger=b;this.url=c;this.duration=d}var fq={gy:"close",eC:"log",rC:"openUrl",PAUSE:"pause",ky:"subscribe"},gq={CLICK:"click",gy:"close",hy:"hidden",FC:"rollOut",iy:"rollOver",jy:"shown"};function hq(a){var b=Lp(a,"type",fq,"OPTIONAL"),c=Lp(a,"trigger",gq,"OPTIONAL"),d=Sp(a,"url",cq,"OPTIONAL");Sp(a,"subscribeData",$p,"OPTIONAL");a=Sp(a,"duration",Yp,"OPTIONAL");return b?new eq(b,c,d,a):null};function iq(a,b,c,d,e,g,h,k,m,p,s,r,D,M){this.k=a;this.j=b;this.o=c;this.F=d;this.a=e;this.G=g;this.i=h;this.textAlign=k;this.I=m;this.A=p;this.padding=s;this.b=r;this.g=D;this.B=M}
function jq(a){var b=Jp(a,"fgColor","#1A1A1A"),c=Jp(a,"bgColor","#FFF"),d=Jp(a,"borderColor","#000"),e=Pp(a,"borderWidth",10,0,5,!1,0),g=Pp(a,"bgAlpha",10,0,1,!1,0.8);Pp(a,"borderAlpha",10,0,1,!1,0.2);Pp(a,"gloss",16,0,255,!1,0);var h=Jp(a,"highlightFontColor","#F2F2F2"),k=Pp(a,"highlightWidth",10,0,5,!1,3),m=Kp(a,"textAlign","OPTIONAL",""),p=Pp(a,"textSize",10,3.3,30.1,!0,3.6107),s=Kp(a,"fontWeight","OPTIONAL",""),r;r=(r=a?a.padding&&a.padding.length?a.padding[0]:a.padding:null)?new Bb(parseFloat(r.top),
parseFloat(r.right),parseFloat(r.bottom),parseFloat(r.left)):null;r=!r||null==r.top||isNaN(r.top)||null==r.right||isNaN(r.right)||null==r.bottom||isNaN(r.bottom)||null==r.left||isNaN(r.left)?null:r;var D=Kp(a,"effects","IDLIST"),M=Pp(a,"cornerRadius",10,0,10,!0,0);a=Sp(a,"gradient",kq,"OPTIONAL");return new iq(b,c,d,e,g,h,k,m,p,s,r,D,M,a)}function lq(a,b,c,d,e,g,h,k){this.j=a;this.o=b;this.k=c;this.F=d;this.a=e;this.b=g;this.g=h;this.i=k}
function kq(a){var b=Pp(a,"x1",10,0,100,!0,0),c=Pp(a,"y1",10,0,100,!0,0),d=Pp(a,"x2",10,0,100,!0,100),e=Pp(a,"y2",10,0,100,!0,100),g=Jp(a,"color1","#FFF"),h=Jp(a,"color2","#000"),k=Pp(a,"opacity1",10,0,100,!0,100);a=Pp(a,"opacity2",10,0,100,!0,0);return new lq(b,c,d,e,g,h,k,a)};function mq(a,b){this.a=a;this.M=b}function nq(a){var b=Kp(a,"standard_url","OPTIONAL","");Kp(a,"rollover_url","OPTIONAL","");Kp(a,"click_url","OPTIONAL","");a=Kp(a,"video_id","OPTIONAL","");return new mq(b,a)};function oq(a,b,c){var d=a.F,e=a.A,g=a.a?a.a:"xy",h=pq(c,a.j,g);a=qq(c,a.g,g);var g=640*b.width*h/100,k=360*b.height*a/100;return new Fb(0==d?640*b.left*h/100:0<d?d:c.width+d-g,0==e?360*b.top*a/100:0<e?e:c.height+e-k,g,k)}function pq(a,b,c){var d=(c="xx"==c||"xy"==c)?640:360;return(d+((c?a.width:a.height)-d)*b)/d}function qq(a,b,c){var d=(c="xy"==c||"yy"==c)?360:640;return(d+((c?a.height:a.width)-d)*b)/d};function rq(a,b,c,d,e,g,h,k,m,p,s){this.x=a;this.y=b;this.k=c;this.i=d;this.b=e;this.o=g;this.F=h;this.A=k;this.j=m;this.g=p;this.a=s}function sq(a,b){var c=Np(a,"x",0),d=Np(a,"y",0),e=Np(a,"w",0),g=Np(a,"h",0),h=Qp(a,"t"),k=Op(a),m=Np(a,"px",0),p=Np(a,"py",0),s=Np(a,"scaleSlope",1),r=Np(a,"scaleSlopeX",s),s=Np(a,"scaleSlopeY",s),D=Kp(a,"scaleDimension","OPTIONAL","xy");return b(c,d,e,g,h,k,m,p,r,s,D)}
function tq(a,b,c){c=c?tq(c,b):null;a=oq(a,new Fb(a.x,a.y,a.k,a.i),b);c?(a.top+=c.top,a.left+=c.left):(a.top+=b.top,a.left+=b.left);c=a.clone();b&&!b.contains(a)&&(a.width<b.width?c.left=yb(a.left,b.left,b.left+b.width-a.width):(c.left=b.left,c.width=b.width),a.height<b.height?c.top=yb(a.top,b.top,b.top+b.height-a.height):(c.top=b.top,c.height=b.height));return c}function uq(a){return sq(a,function(a,c,d,e,g,h,k,m,p,s,r){return new rq(a,c,d,e,g,h,k,m,p,s,r)})};function vq(a,b,c,d,e,g,h,k,m,p,s,r,D){rq.call(this,a,b,c,d,e,k,m,p,s,r,D);this.B=g;this.G=h}y(vq,rq);function wq(a){var b=Np(a,"sx",0),c=Np(a,"sy",0);return sq(a,function(a,e,g,h,k,m,p,s,r,D,M){return new vq(a,e,g,h,k,b,c,m,p,s,r,D,M)})};function xq(a,b,c){this.type=a;this.b=b;this.a=c}var yq={ey:"anchored",BC:"rect"};function zq(a){var b=Lp(a,"type",yq,"OPTIONAL","rect"),c=Sp(a,"rectRegion",uq,"REPEATED");a=Sp(a,"anchoredRegion",wq,"REPEATED");return new xq(b,c,a)}function Aq(a){return a.b&&a.b.length?a.b[0]:a.a&&a.a.length?a.a[0]:null};function Bq(a,b){this.b=a;this.a=b}function Cq(a){Gp(a,"timeRelative","OPTIONAL");var b=Gp(a,"spaceRelative","OPTIONAL");return(a=Sp(a,"movingRegion",zq,"REPEATED"))?new Bq(b,a):null};function Dq(a,b){this.state=a;this.a=b}var Eq={uC:"playerControlShow",iy:"rollOver",jy:"shown"};function Fq(a){var b=Lp(a,"state",Eq,"OPTIONAL");a=Gp(a,"ref","OPTIONAL","");return b?new Dq(b,a):null};function Gq(a,b,c,d){this.a=a||[];this.g=b||[];this.i=c;this.b=d}function Hq(a){var b=Sp(a,"condition",Fq,"REPEATED"),c=Sp(a,"notCondition",Fq,"REPEATED"),d=Mp(a,"show_delay",!1);a=Mp(a,"hide_delay",!1);return b||c?new Gq(b,c,d,a):null}function Iq(a,b,c){z(a.a,oa(b,!1),c);z(a.g,oa(b,!0),c)};function Jq(a,b,c,d,e,g,h,k,m,p,s,r,D,M,ta,Z){this.id=a;this.author=b;this.type=c;this.style=d;this.o=e;this.a=g;this.g=h||[];this.B=k||[];this.b=m;this.G=p;this.j=s;this.F=r;this.i=D;this.k=M;this.data=ta;this.A=Z}var Kq={ey:"anchored",mA:"channel",JB:"highlightText",WB:"label",wC:"popup",LC:"speech",ky:"subscribe",WC:"title",VIDEO:"video"},Lq={yA:"custom",IB:"highlight",IMAGE:"image",PAUSE:"pause",TEXT:"text",ED:"widget"},Mq={lD:"video_relative",vC:"player_relative"};
function Nq(a){var b=Gp(a,"id","REQUIRED"),c=Gp(a,"author","OPTIONAL"),d=Lp(a,"type",Lq,"REQUIRED"),e=Lp(a,"style",Kq,"OPTIONAL"),g=Kp(a,"TEXT","OPTIONAL"),h=Sp(a,"data",function(a){return 0!=a.length?pb(a):{}},"OPTIONAL",{}),k=Sp(a,"segment",Cq,"OPTIONAL"),m=Sp(a,"action",hq,"REPEATED"),p=Sp(a,"trigger",Hq,"REPEATED"),s=Sp(a,"appearance",jq,"OPTIONAL");s||(s=jq({}));var r=Lp(a,"coordinate_system",Mq,"OPTIONAL","video_relative"),D=Sp(a,"image_source",nq,"OPTIONAL"),M=Mp(a,"closeable",!0),ta=Mp(a,
"logable",!0),Z=Kp(a,"html_blob","OPTIONAL","");a=Kp(a,"log_data","OPTIONAL","");return b&&d?new Jq(b,c,d,e,g,k,m,p,s,r,D,M,ta,Z,h,a):null}function Cp(a){return(a=Ra(a.g,function(a){return null!=a.url},void 0))?a.url:null}function Oq(a){return Oa(a.g,function(a){return null!=a.url&&a.url.b},void 0)}function Pq(a){return Oa(a.g,function(a){return"click"==a.trigger},void 0)}function Qq(a,b,c){z(a.g,b,c)}function Rq(a,b,c){z(a.B,b,c)}function Sq(a,b){Na(a.B,b,void 0)}
function Tq(a){return(a=a.a?a.a.a.length?a.a.a[0]:null:null)?Aq(a):null}function Uq(a,b){var c=Tq(a);return c&&b?pq(b,c.j,c.a?c.a:"xy"):1}function Vq(a,b){var c=Tq(a);return c&&b?qq(b,c.g,c.a?c.a:"xy"):1};function Wq(a,b,c){this.a={};this.b=!1;this.j="ivTrigger:"+a;this.g=c;Iq(b,function(a,b){var c=Xq(b.state,b.a);this.g.D(c,v(this.i,this,c,a));this.a[c]=!1},this)}Wq.prototype.i=function(a,b,c,d){this.a[a]=b?!c:c;a=Kb(this.a,function(a){return a});this.b!=a&&(this.b=a,this.g.u(this.j,a,d))};function Xq(a,b){var c="ivTriggerCondition:"+a;return b?c+":"+b:c};function Yq(a,b,c){this.i=a;this.qb=b;this.b=c;this.a=null;this.Hb=this.isVisible=!1;Zq(b,a)}function Zq(a,b){Sq(a,function(c){return new Wq(a.id,c,b)})}Yq.prototype.hide=function(){this.isVisible=!1;this.i.$("onResize",this.g,this);this.b.hide()};Yq.prototype.show=function(){this.isVisible=!0;this.b.show();this.i.D("onResize",this.g,this)};Yq.prototype.destroy=function(){this.i.$("onResize",this.g,this);var a=this.b;a.i.removeAll();a.na&&F(a.na);a.Ga&&a.Ga.N()&&F(a.Ga.N());$q(this)};
function $q(a){a.a&&(a.a.stop(),a.a=null)}Yq.prototype.g=function(){ar(this.b)};function br(){};function cr(a,b,c,d,e,g,h,k){this.j=a;this.o=b;this.k=c;this.F=d;this.a=e;this.b=g;this.g=q(h)?h:null;this.i=q(k)?k:null}y(cr,br);function dr(){this.cb=[];this.R=[];this.Kd=[]}dr.prototype.Uf=null;dr.prototype.hd=null;dr.prototype.Yi=!0;var er=[2,2,6,6,0];f=dr.prototype;f.clear=function(){this.cb.length=0;this.R.length=0;this.Kd.length=0;delete this.Uf;delete this.hd;delete this.Yi;return this};function fr(a,b,c){0==Ja(a.cb)?a.Kd.length-=2:(a.cb.push(0),a.R.push(1));a.Kd.push(b,c);a.hd=a.Uf=[b,c]}
f.Ha=function(a){var b=Ja(this.cb);if(null==b)throw Error("Path cannot start with lineTo");1!=b&&(this.cb.push(1),this.R.push(0));for(b=0;b<arguments.length;b+=2){var c=arguments[b],d=arguments[b+1];this.Kd.push(c,d)}this.R[this.R.length-1]+=b/2;this.hd=[c,d]};f.close=function(){var a=Ja(this.cb);if(null==a)throw Error("Path cannot start with close");4!=a&&(this.cb.push(4),this.R.push(1),this.hd=this.Uf);return this};
function gr(a,b,c,d,e){var g=a.hd[0]-b*Math.cos(d*Math.PI/180),h=a.hd[1]-c*Math.sin(d*Math.PI/180),g=g+b*Math.cos((d+e)*Math.PI/180),h=h+c*Math.sin((d+e)*Math.PI/180);a.cb.push(3);a.R.push(1);a.Kd.push(b,c,d,e,g,h);a.Yi=!1;a.hd=[g,h]}function hr(a,b){for(var c=a.Kd,d=0,e=0,g=a.cb.length;e<g;e++){var h=a.cb[e],k=er[h]*a.R[e];b(h,c.slice(d,d+k));d+=k}}
f.clone=function(){var a=new this.constructor;a.cb=this.cb.concat();a.R=this.R.concat();a.Kd=this.Kd.concat();a.Uf=this.Uf&&this.Uf.concat();a.hd=this.hd&&this.hd.concat();a.Yi=this.Yi;return a};f.isEmpty=function(){return 0==this.cb.length};function ir(a,b){this.A=a;this.B=null==b?1:b}y(ir,br);function jr(a,b){this.a=a;this.b=b};function kr(a){this.b=a;this.a={}}y(kr,K);var lr=[];f=kr.prototype;f.listen=function(a,b,c,d,e){t(b)||(lr[0]=b,b=lr);for(var g=0;g<b.length;g++){var h=wi(a,b[g],c||this,d||!1,e||this.b||this);if(!h)break;this.a[h.key]=h}return this};f.cc=function(a,b,c,d,e){if(t(b))for(var g=0;g<b.length;g++)this.cc(a,b[g],c,d,e);else e=e||this.b||this,c=xi(c||this),d=!!d,b=li(a)?si(a.dd,b,c,d,e):a?(a=yi(a))?si(a,b,c,d,e):null:null,b&&(Ci(b),delete this.a[b.key]);return this};
f.removeAll=function(){Jb(this.a,Ci);this.a={}};f.H=function(){kr.C.H.call(this);this.removeAll()};f.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function mr(){}ca(mr);mr.prototype.a=0;mr.getInstance();function nr(a){Gi.call(this);this.o=a||Lc()}y(nr,Gi);f=nr.prototype;f.Cv=mr.getInstance();f.Ba=null;f.Ye=!1;f.Jf=null;f.Cl=null;f.getId=function(){return this.Ba||(this.Ba=":"+(this.Cv.a++).toString(36))};f.N=function(){return this.Jf};f.Ap=function(){this.Jf=this.o.createElement("div")};f.Ri=function(){or(this,function(a){a.Ye&&a.Ri()});this.j&&this.j.removeAll();this.Ye=!1};
f.H=function(){this.Ye&&this.Ri();this.j&&(this.j.dispose(),delete this.j);or(this,function(a){a.dispose()});this.Jf&&F(this.Jf);this.Jf=this.Cl=null;nr.C.H.call(this)};function or(a,b){a.Cl&&z(a.Cl,b,void 0)};function pr(a,b,c,d,e){nr.call(this,e);this.width=a;this.height=b;this.g=c||null;this.k=d||null}y(pr,nr);pr.prototype.b=null;pr.prototype.ih=function(){return this.Ye?Gd(this.N()):ga(this.width)&&ga(this.height)?new B(this.width,this.height):null};function qr(a){var b=a.ih();return b?b.width/(a.g?new B(a.g,a.k):a.ih()).width:0};function rr(a,b){Gi.call(this);this.jh=a;this.Kj=b;this[ki]=!1}y(rr,Gi);f=rr.prototype;f.Kj=null;f.jh=null;f.N=function(){return this.jh};f.addEventListener=function(a,b,c,d){wi(this.jh,a,b,c,d)};f.removeEventListener=function(a,b,c,d){Bi(this.jh,a,b,c,d)};f.H=function(){rr.C.H.call(this);var a=this.jh;if(a)if(li(a))a.dd&&a.dd.removeAll(void 0);else if(a=yi(a)){var b=0,c;for(c in a.a)for(var d=cb(a.a[c]),e=0;e<d.length;++e)Ci(d[e])&&++b}};function sr(a,b,c,d){rr.call(this,a,b);a=this.Kj;b=this.N();c?(b.setAttribute("stroke",c.b),c=c.a,u(c)&&-1!=c.indexOf("px")?b.setAttribute("stroke-width",parseFloat(c)/qr(a)):b.setAttribute("stroke-width",c)):b.setAttribute("stroke","none");c=this.Kj;a=this.N();if(d instanceof ir)a.setAttribute("fill",d.A),a.setAttribute("fill-opacity",d.B);else if(d instanceof cr){b="lg-"+d.j+"-"+d.o+"-"+d.k+"-"+d.F+"-"+d.a+"-"+d.b;var e=b in c.a?c.a[b]:null;if(!e){var e=tr(c,"linearGradient",{x1:d.j,y1:d.o,x2:d.k,
y2:d.F,gradientUnits:"userSpaceOnUse"}),g="stop-color:"+d.a;ga(d.g)&&(g+=";stop-opacity:"+d.g);g=tr(c,"stop",{offset:"0%",style:g});e.appendChild(g);g="stop-color:"+d.b;ga(d.i)&&(g+=";stop-opacity:"+d.i);d=tr(c,"stop",{offset:"100%",style:g});e.appendChild(d);e=ur(c,b,e)}a.setAttribute("fill","url(#"+e+")")}else a.setAttribute("fill","none")}y(sr,rr);function vr(a,b){rr.call(this,a,b)}y(vr,rr);function wr(a,b){rr.call(this,a,b)}y(wr,rr);function xr(a,b,c,d){sr.call(this,a,b,c,d)}y(xr,sr);function yr(a,b){rr.call(this,a,b)}y(yr,vr);yr.prototype.clear=function(){bd(this.N())};function zr(a,b,c,d){sr.call(this,a,b,c,d)}y(zr,xr);function Ar(a,b){rr.call(this,a,b)}y(Ar,wr);function Br(a,b,c,d,e){pr.call(this,a,b,c,d,e);this.a={};this.F=ic&&!wc(526);this.A=new kr(this)}var Cr;y(Br,pr);var Dr=0;function tr(a,b,c){a=a.o.a.createElementNS("http://www.w3.org/2000/svg",b);if(c)for(var d in c)a.setAttribute(d,c[d]);return a}f=Br.prototype;
f.Ap=function(){var a=tr(this,"svg",{width:this.width,height:this.height,overflow:"hidden"}),b=tr(this,"g");this.i=tr(this,"defs");this.b=new yr(b,this);a.appendChild(this.i);a.appendChild(b);this.Jf=a;this.g&&(this.N().setAttribute("preserveAspectRatio","none"),this.F?this.Ko():this.N().setAttribute("viewBox","0 0 "+(this.g?this.g+" "+this.k:"")))};
f.Ko=function(){if(this.Ye){var a=this.ih();0==a.width?this.N().style.visibility="hidden":(this.N().style.visibility="",this.b.N().setAttribute("transform","scale("+a.width/this.g+" "+a.height/this.k+") translate(0 0)"))}};
f.ih=function(){if(!hc)return this.Ye?Gd(this.N()):Br.C.ih.call(this);var a=this.width,b=this.height,c=u(a)&&-1!=a.indexOf("%"),d=u(b)&&-1!=b.indexOf("%");if(!this.Ye&&(c||d))return null;var e,g;c&&(e=this.N().parentNode,g=Gd(e),a=parseFloat(a)*g.width/100);d&&(e=e||this.N().parentNode,g=g||Gd(e),b=parseFloat(b)*g.height/100);return new B(a,b)};f.clear=function(){this.b.clear();bd(this.i);this.a={}};function Er(a,b,c,d){b=tr(a,"path",{d:Fr(b)});c=new zr(b,a,c,d);a.b.N().appendChild(c.N())}
function Fr(a){var b=[];hr(a,function(a,d){switch(a){case 0:b.push("M");Array.prototype.push.apply(b,d);break;case 1:b.push("L");Array.prototype.push.apply(b,d);break;case 2:b.push("C");Array.prototype.push.apply(b,d);break;case 3:var e=d[3];b.push("A",d[0],d[1],0,180<Math.abs(e)?1:0,0<e?1:0,d[4],d[5]);break;case 4:b.push("Z")}});return b.join(" ")}function ur(a,b,c){if(b in a.a)return a.a[b];var d="_svgdef_"+Dr++;c.setAttribute("id",d);a.a[b]=d;a.i.appendChild(c);return d}
f.Ri=function(){Br.C.Ri.call(this);this.F&&this.A.cc(Gr(),"tick",this.Ko)};f.H=function(){delete this.a;delete this.i;delete this.b;Br.C.H.call(this)};function Gr(){Cr||(Cr=new Ji(400),Cr.start());return Cr};function Hr(a,b,c){this.a=a;this.b=0;this.i=b;c&&(this.mn=c)}f=Hr.prototype;f.mn=70;f.ik=!1;f.start=function(a){this.k=x();this.b=a;this.j=this.k+this.b;this.ik=!0;Wn(this.a);nf(this.g);this.g=mf(v(this.Mt,this),this.mn)};f.stop=function(){this.ik=!1;Xn(this.a);this.g&&nf(this.g)};
f.Mt=function(){if(this.ik){var a=x(),b;b=0==this.b||a>=this.j?0:1-(a-this.k)/this.b;var c=E("countdowntimer-diminishing-pieslice",this.a),d=Ze("svg",this.a);!d&&this.a.querySelectorAll&&(d=this.a.querySelectorAll("svg"),d=d.length?d[0]:null);var d=parseInt(d.getAttribute("width"),10),e=new dr,g=d/2-5;fr(e,d/2,d/2);e.Ha(d/2,5);gr(e,g,g,-90,360*-b);e.Ha(d/2,d/2);e.close();c.setAttribute("d",Fr(e));a>=this.j&&(this.stop(),this.i&&this.i())}};var Ir=n("yt.prefs.UserPrefs.prefs_")||{};pa("yt.prefs.UserPrefs.prefs_",Ir);function Jr(a){var b=null;"transition"in a.style?b="transition-duration":"webkitTransition"in a.style?b="-webkit-transition-duration":"MozTransition"in a.style?b="-moz-transition-duration":"OTransition"in a.style?b="-o-transition-duration":"msTransition"in a.style&&(b="-ms-transition-duration");a=b?(document.defaultView?document.defaultView.getComputedStyle(a,null):document.parentWindow.getComputedStyle(a,null)).getPropertyValue(b):"0";return 1E3*parseFloat(a)};var Kr=n("yt.pubsub.instance_")||new ai;ai.prototype.subscribe=ai.prototype.D;ai.prototype.unsubscribeByKey=ai.prototype.Tc;ai.prototype.publish=ai.prototype.u;ai.prototype.clear=ai.prototype.clear;pa("yt.pubsub.instance_",Kr);function Lr(a,b,c){var d=Mr();return d?d.subscribe(a,function(){var d=arguments;try{Nr&&Or[a]?b.apply(c||l,d):H(function(){b.apply(c||l,d)},0)}catch(g){of(g)}},c):0}
function Pr(){var a=hf("LOGGED_IN_PUBSUB_KEY"),b=Mr();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),z(a,function(a){b.unsubscribeByKey(a)}))}function Qr(a,b){var c=Mr();return c?c.publish.apply(c,arguments):!1}function Mr(){return n("yt.pubsub.instance_")}var Nr=!!hf("SYNCHRONOUS_PUBSUB"),Or={};function Rr(a,b,c,d,e,g){var h,k;if(h=c.offsetParent){var m="HTML"==h.tagName||"BODY"==h.tagName;m&&"static"==sd(h,"position")||(k=yd(h),m||(m=(m=zd(h))&&hc?-h.scrollLeft:!m||C&&wc("8")||"visible"==sd(h,"overflowX")?h.scrollLeft:h.scrollWidth-h.clientWidth-h.scrollLeft,k=Ab(k,new A(m,h.scrollTop))))}h=k||new A;k=Id(a);if(m=xd(a)){var p=Gb(m),m=Math.max(k.left,p.left),s=Math.min(k.left+k.width,p.left+p.width);if(m<=s){var r=Math.max(k.top,p.top),p=Math.min(k.top+k.height,p.top+p.height);r<=p&&(k.left=
m,k.top=r,k.width=s-m,k.height=p-r)}}m=Lc(a);r=Lc(c);if(m.a!=r.a){var s=m.a.body,r=r.a.parentWindow||r.a.defaultView,p=new A(0,0),D=Nc(s)?Nc(s).parentWindow||Nc(s).defaultView:window,M=s;do{var ta=D==r?yd(M):Cd(M);p.x+=ta.x;p.y+=ta.y}while(D&&D!=r&&(M=D.frameElement)&&(D=D.parent));s=Ab(p,yd(s));C&&!nd(m)&&(s=Ab(s,od(m)));k.left+=s.x;k.top+=s.y}a=(b&4&&zd(a)?b^2:b)&-5;b=new A(a&2?k.left+k.width:k.left,a&1?k.top+k.height:k.top);b=Ab(b,h);e&&(b.x+=(a&2?-1:1)*e.x,b.y+=(a&1?-1:1)*e.y);if(e=xd(c))e.top-=
h.y,e.right-=h.x,e.bottom-=h.y,e.left-=h.x;Sr(b,c,d,g,e,65,void 0)}
function Sr(a,b,c,d,e,g,h){a=a.clone();var k=(c&4&&zd(b)?c^2:c)&-5;c=Gd(b);h=h?h.clone():c.clone();if(d||0!=k)k&2?a.x-=h.width+(d?d.right:0):d&&(a.x+=d.left),k&1?a.y-=h.height+(d?d.bottom:0):d&&(a.y+=d.top);if(g&&(e?(d=a,k=0,65==(g&65)&&(d.x<e.left||d.x>=e.right)&&(g&=-2),132==(g&132)&&(d.y<e.top||d.y>=e.bottom)&&(g&=-5),d.x<e.left&&g&1&&(d.x=e.left,k|=1),d.x<e.left&&d.x+h.width>e.right&&g&16&&(h.width=Math.max(h.width-(d.x+h.width-e.right),0),k|=4),d.x+h.width>e.right&&g&1&&(d.x=Math.max(e.right-
h.width,e.left),k|=1),g&2&&(k=k|(d.x<e.left?16:0)|(d.x+h.width>e.right?32:0)),d.y<e.top&&g&4&&(d.y=e.top,k|=2),d.y<=e.top&&d.y+h.height<e.bottom&&g&32&&(h.height=Math.max(h.height-(e.top-d.y),0),d.y=e.top,k|=8),d.y>=e.top&&d.y+h.height>e.bottom&&g&32&&(h.height=Math.max(h.height-(d.y+h.height-e.bottom),0),k|=8),d.y+h.height>e.bottom&&g&4&&(d.y=Math.max(e.bottom-h.height,e.top),k|=2),g&8&&(k=k|(d.y<e.top?64:0)|(d.y+h.height>e.bottom?128:0)),e=k):e=256,e&496))return;td(b,a);Cb(c,h)||(e=nd(Lc(Nc(b))),
!C||e&&wc("8")?(b=b.style,hc?b.MozBoxSizing="border-box":ic?b.WebkitBoxSizing="border-box":b.boxSizing="border-box",b.width=Math.max(h.width,0)+"px",b.height=Math.max(h.height,0)+"px"):(a=b.style,e?(e=Md(b),b=Nd(b),a.pixelWidth=h.width-b.left-e.left-e.right-b.right,a.pixelHeight=h.height-b.top-e.top-e.bottom-b.bottom):(a.pixelWidth=h.width,a.pixelHeight=h.height)))};var Tr={},Ur="ontouchstart"in document;function Vr(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return md(c,function(a){return Ic(a,b)},!0,d)}
function Wr(a){var b="mouseover"==a.type&&"mouseenter"in Tr||"mouseout"==a.type&&"mouseleave"in Tr,c=a.type in Tr||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=Tr[b],d;for(d in c.Sb){var e=Vr(b,d,a.target);e&&!md(a.relatedTarget,function(a){return a==e},!0)&&c.u(d,e,b,a)}}if(b=Tr[a.type])for(d in b.Sb)(e=Vr(a.type,d,a.target))&&b.u(d,e,a.type,a)}}J(document,"blur",Wr,!0);J(document,"change",Wr,!0);J(document,"click",Wr);J(document,"focus",Wr,!0);
J(document,"mouseover",Wr);J(document,"mouseout",Wr);J(document,"mousedown",Wr);J(document,"keydown",Wr);J(document,"keyup",Wr);J(document,"keypress",Wr);J(document,"cut",Wr);J(document,"paste",Wr);Ur&&(J(document,"touchstart",Wr),J(document,"touchend",Wr),J(document,"touchcancel",Wr));var Xr=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};pa("yt.uix.widgets_",Xr);function Yr(a){a=a.getInstance();var b=$(a);b in Xr||!a.hq()||(a.register(),Xr[b]=a)};function Zr(){this.a={}}Zr.prototype.g=!!eval("/*@cc_on!@*/false");Zr.prototype.hq=function(){return!0};function $r(a,b,c){var d=$(a,void 0),e=v(c,a);b in Tr||(Tr[b]=new ai);Tr[b].D(d,e);a.a[c]=e}Zr.prototype.b=function(a,b,c){var d=G(a,b);if(d&&(d=n(d))){var e=fb(arguments,2);eb(e,0,0,a);d.apply(null,e)}};function as(a,b){Te(a,"tooltip-text",b)}Zr.prototype.removeData=function(a,b){a.dataset?delete a.dataset[Ue(b)]:a.removeAttribute("data-"+b)};
function $(a,b){return"yt-uix"+(a.bj?"-"+a.bj:"")+(b?"-"+b:"")};function bs(){this.a={}}y(bs,Zr);ca(bs);f=bs.prototype;f.bj="button";f.Af=null;f.register=function(){$r(this,"click",this.Zx);$r(this,"keydown",this.Xx);$r(this,"keypress",this.Yx)};f.Zx=function(a){a&&!a.disabled&&(cs(this,a),this.click(a))};
f.Xx=function(a,b,c){if(!(c.altKey||c.ctrlKey||c.shiftKey)&&(b=ds(this,a))){var d=function(a){var b="";a.tagName&&(b=a.tagName.toLowerCase());return"ul"==b||"table"==b};if(d=d(b)?b:gd(b,d)){var d=d.tagName.toLowerCase(),e;"ul"==d?e=this.cy:"table"==d&&(e=this.by);e&&es(this,a,b,c,v(e,this))}}};
function es(a,b,c,d,e){var g=Vn(c),h=9==d.keyCode;h||32==d.keyCode||13==d.keyCode?(d=fs(a,c))?(b=cd(d),"a"==b.tagName.toLowerCase()?window.location=b.href:If(b,"click")):h&&gs(a,b):g?27==d.keyCode?(fs(a,c),gs(a,b)):e(b,c,d):(a=Ic(b,$(a,"reverse"))?38:40,d.keyCode==a&&(If(b,"click"),d.preventDefault()))}f.Yx=function(a,b,c){c.altKey||c.ctrlKey||c.shiftKey||(a=ds(this,a),Vn(a)&&c.preventDefault())};function fs(a,b){var c=$(a,"menu-item-highlight"),d=E(c,b);d&&Gc(d,c);return d}
function hs(a,b,c){Fc(c,$(a,"menu-item-highlight"));b.setAttribute("aria-activedescendant",c.getAttribute("id"))}f.by=function(a,b,c){var d=fs(this,b);b=Ze("table",b);var e=Ze("tr",b),e=Qc("td",null,e).length;b=Qc("td",null,b);d=is(d,b,e,c);-1!=d&&(hs(this,a,b[d]),c.preventDefault())};f.cy=function(a,b,c){if(40==c.keyCode||38==c.keyCode){var d=fs(this,b);b=Qc("li",null,b);d=is(d,b,1,c);hs(this,a,b[d]);c.preventDefault()}};
function is(a,b,c,d){var e=b.length;a=La(b,a);if(-1==a)if(38==d.keyCode)a=e-c;else{if(37==d.keyCode||38==d.keyCode||40==d.keyCode)a=0}else 39==d.keyCode?(a%c==c-1&&(a-=c),a+=1):37==d.keyCode?(0==a%c&&(a+=c),a-=1):38==d.keyCode?(a<c&&(a+=e),a-=c):40==d.keyCode&&(a>=e-c&&(a-=e),a+=c);return a}function js(a,b){var c=b.iframeMask;c||(c=document.createElement("iframe"),c.src='javascript:""',c.className=$(a,"menu-mask"),b.iframeMask=c);return c}
function ks(a,b,c,d){var e=ld(b,$(a,"group")),g=!!G(b,"button-menu-ignore-group"),e=e&&!g?e:b,g=5,h=4,k=Id(b);if(Ic(b,$(a,"reverse"))){g=4;h=5;k=k.top+"px";try{c.style.maxHeight=k}catch(m){}}Ic(b,"flip")&&(Ic(b,$(a,"reverse"))?(g=6,h=7):(g=7,h=6));var p;G(b,"button-has-sibling-menu")?p=wd(e):G(b,"button-menu-root-container")&&(p=ls(b));C&&!wc("8")&&(p=null);var s;p&&(s=Id(p),s=new Bb(-s.top,s.left,s.top,-s.left));p=new A(0,1);Ic(b,$(a,"center-menu"))&&(p.x-=Math.round((Gd(c).width-Gd(b).width)/2));
d&&(p.y+=Uc(document).y);if(a=js(a,b))b=Gd(c),a.style.width=b.width+"px",a.style.height=b.height+"px",Rr(e,g,a,h,p,s),d&&Zn(a,"position","fixed");Rr(e,g,c,h,p,s)}function ls(a){if(G(a,"button-menu-root-container")){var b=G(a,"button-menu-root-container");return ld(a,b)}return document.body}
f.jp=function(a){if(a){var b=ds(this,a);if(b){a.setAttribute("aria-pressed","true");a.setAttribute("aria-expanded","true");b.originalParentNode=b.parentNode;b.activeButtonNode=a;b.parentNode.removeChild(b);var c;c=G(a,"button-has-sibling-menu")?a.parentNode:ls(a);c.appendChild(b);b.style.minWidth=a.offsetWidth-2+"px";var d=js(this,a);d&&c.appendChild(d);c=!!G(a,"button-menu-fixed");ks(this,a,b,c);Wn(b);this.b(a,"button-menu-action",!0);Fc(a,$(this,"active"));b=v(this.ip,this,a,!1);c=v(this.ip,this,
a,!0);c=J(document,"click",c);b=J(document,"contextmenu",b);Te(a,"button-listener",c);Te(a,"button-context-menu-listener",b);this.Af=a}}};
function gs(a,b){if(b){var c=ds(a,b);if(c){a.Af=null;b.setAttribute("aria-pressed","false");b.setAttribute("aria-expanded","false");b.removeAttribute("aria-activedescendant");Xn(c);a.b(b,"button-menu-action",!1);var d=js(a,b);H(function(){d&&d.parentNode&&d.parentNode.removeChild(d);c.originalParentNode&&(c.parentNode.removeChild(c),c.originalParentNode.appendChild(c),c.originalParentNode=null,c.activeButtonNode=null)},1)}var e=ld(b,$(a,"group"));Gc(b,$(a,"active"));e&&Gc(e,$(a,"group-active"));if(e=
G(b,"button-listener"))Cf(e),a.removeData(b,"button-listener");if(e=G(b,"button-context-menu-listener"))Cf(e),a.removeData(b,"button-context-menu-listener")}}function ms(a,b){var c=ds(a,b);c&&ks(a,b,c)}function ns(a,b){return ds(a,b)}
f.ip=function(a,b,c){c=c||window.event;c=c.target||c.srcElement;3==c.nodeType&&(c=c.parentNode);var d=ld(c,$(this));if(d){var d=ds(this,d),e=ds(this,a);if(d==e)return}if(!ld(c,$(this,"menu"))||Ic(c,$(this,"menu-item"))||Ic(c,$(this,"menu-close")))if(gs(this,a),(d=ld(c,$(this,"menu")))&&b&&G(a,"button-menu-indicate-selected")){if(a=E($(this,"content"),a))Cc&&"innerText"in c?b=c.innerText.replace(/(\r\n|\r|\n)/g,"\n"):(b=[],kd(c,b,!0),b=b.join("")),b=b.replace(/ \xAD /g," ").replace(/\xAD/g,""),b=b.replace(/\u200B/g,
""),Cc||(b=b.replace(/ +/g," "))," "!=b&&(b=b.replace(/^\s*/,"")),fd(a,b);a=$(this,"menu-item-selected");(b=E(a,d))&&Gc(b,a);Fc(c.parentNode,a)}};function ds(a,b){if(!b.widgetMenu){var c=G(b,"button-menu-id"),c=c&&Oc(c),d=$(a,"menu");c?(Fc(c,d),Fc(c,$(a,"menu-external"))):c=E(d,b);b.widgetMenu=c}return b.widgetMenu}
function cs(a,b){if(G(b,"button-toggle")){var c=ld(b,$(a,"group"));if(c&&G(c,"button-toggle-group")){var d=G(c,"button-toggle-group"),c=Pc($(a),c),e=$(a,"toggled"),g=Ic(b,e);z(c,function(a){a!=b||"optional"==d&&g?Gc(a,e):Fc(b,e)})}else Kc(b,$(a,"toggled"))}}f.click=function(a){if(ds(this,a)){var b=ds(this,a),c=ld(b.activeButtonNode||b.parentNode,$(this));c&&c!=a?(gs(this,c),H(v(this.jp,this,a),1)):Vn(b)?gs(this,a):this.jp(a);a.focus()}this.b(a,"button-action")};function os(a,b,c){this.i=a;this.g=b;this.b=c;this.a=v(this.du,this)}y(os,K);f=os.prototype;f.$i=!1;f.Df=null;function ps(a){a.Df?a.$i=!0:qs(a)}f.stop=function(){this.Df&&(l.clearTimeout(this.Df),this.Df=null,this.$i=!1)};f.H=function(){os.C.H.call(this);this.stop()};f.du=function(){this.Df=null;this.$i&&(this.$i=!1,qs(this))};function qs(a){a.Df=Li(a.a,a.g);a.i.call(a.b)};function rs(a,b,c){b||(b={});var d=c||window;c="undefined"!=typeof a.href?a.href:String(a);a=b.target||a.target;var e=[],g;for(g in b)switch(g){case "width":case "height":case "top":case "left":e.push(g+"="+b[g]);break;case "target":case "noreferrer":break;default:e.push(g+"="+(b[g]?1:0))}g=e.join(",");if(b.noreferrer){if(b=d.open("",a,g))C&&-1!=c.indexOf(";")&&(c="'"+c.replace(/'/g,"%27")+"'"),b.opener=null,c=ya(c),b.document.write('<META HTTP-EQUIV="refresh" content="0; url='+c+'">'),b.document.close()}else b=
d.open(c,a,g);return b}function ss(a,b){var c;c=b||{};c.target=c.target||a.target||"YouTube";c.width=c.width||600;c.height=c.height||600;(c=rs(a,c))?(c.opener||(c.opener=window),c.focus()):c=null;return!c};function ts(a,b){us().tick[a]=b||x()}function vs(a){var b=us().tick;return a in b}function ws(a){var b="https:"==window.location.protocol?"https://gg.google.com/csi":"http://csi.gstatic.com/csi",c="",d;for(d in a)c+="&"+d+"="+a[d];sa(b+"?"+c.substring(1))}function xs(){return us().info}function us(){return n("ytcsi.data_")||ys()}function ys(){var a={tick:{},span:{},info:{}};pa("ytcsi.data_",a);return a};function zs(a){if(!a)return!1;a=a.replace(/https?:\/\//g,"");var b=a.split("/",1);if(!b||1>b.length||!b[0])return!1;b=b[0].toLowerCase().split(".").reverse();return 2>b.length?!1:("com"==b[0]&&"youtube"==b[1]||"be"==b[0]&&"youtu"==b[1])&&-1==a.indexOf("/redirect?")}
function As(a,b){if("new"==a.target)return-1;var c=dq(a);if(!c)return-1;var c=c.replace(/https?:\/\//g,""),d;(d=!zs(c))||(d=ke(c)||"",d=d.split("/"),d="/"+(1<d.length?d[1]:""),d="/watch"!=d);if(d)return-1;d=Lj(c);if(!d||d.v!=b.M||d.list||d.p)return-1;c=c.split("#",2);if(!c||2>c.length)return-1;(c=Kj(c[1]))&&c.t?(d=c.t,c=0,-1!=d.indexOf("h")&&(d=d.split("h"),c=3600*d[0],d=d[1]),-1!=d.indexOf("m")&&(d=d.split("m"),c=60*d[0]+c,d=d[1]),-1!=d.indexOf("s")?(d=d.split("s"),c=1*d[0]+c):c=1*d+c):c=-1;return c}
;function Bs(a,b){this.b=a;this.a=b}function Dp(a,b,c){b&&b.i&&Cp(b)&&a.log_(xp(a,b,3),c)}function xp(a,b,c){var d={};d["iv-event"]=c;d["a-id"]=b.id;d["a-type"]=Cs(b);if(c=Cp(b))d.link=escape(dq(c)),c.a&&(d["l-class"]=c.a);d.ps=a.a.Ca;if(b.A){var e=new Be(b.A);z(e.uc(),function(a){d[a]=e.get(a)})}return d}
function Cs(a){switch(a.type){case "text":switch(a.style){case "popup":return 1;case "speech":return 2;case "anchored":return 8;case "label":return 9;case "title":return 4;default:return 0}case "highlight":return 3;case "image":switch(a.style){case "video":return 11;case "channel":return 10;default:return 0}default:return 0}}Bs.prototype.log_=function(a,b){this.b.u("command_log","iv",a,b)};function Ds(){this.element=this.label=null;this.priority=0}y(Ds,K);Ds.prototype.listen=function(a,b,c){return this.element.listen(this.element,a,b,c||this)};Ds.prototype.cc=function(a){this.element.cc(a)};function Es(a,b,c){Y.call(this,["div","ytp-segmented-control"]);this.g=a;this.b=-1;this.a=[];q(b)&&Fs(this,b,c)}y(Es,Y);function Fs(a,b,c){Yg(a.a);a.a=[];for(var d=0;d<b.length;d++){var e=new Jn(a.g);a.a[d]=e;c?e.Aa(["div",b[d]]):e.Aa(b[d]);0!=d&&V(e.N(),"ytp-segmented-control-other");Gs(e,d==a.b);J(e,"click",v(a.Du,a));e.V(a.element)}}f=Es.prototype;
f.V=function(a,b){Es.C.V.call(this,a,b);for(var c=0,d=0;d<this.a.length;d++)c=Math.max(c,Gd(this.a[d].N()).width);if(c)for(d=0;d<this.a.length;d++)Fd(this.a[d].N(),c)};f.Za=function(a){this.b=a;for(var b=0;b<this.a.length;b++)Gs(this.a[b],b==a)};f.getSelected=function(){return this.b};function Gs(a,b){if(b){var c=a.N();W(c,"ytp-segmented-control-deselected");V(c,"ytp-segmented-control-selected")}else c=a.N(),W(c,"ytp-segmented-control-selected"),V(c,"ytp-segmented-control-deselected")}
f.Du=function(a){for(var b=0;b<this.a.length;b++)if(this.a[b]==a.currentTarget){b==this.b&&2==this.a.length?this.Za(0==b?1:0):this.Za(b);If(this.element,"change");break}};f.H=function(){Fs(this,[]);this.g=null;Es.C.H.call(this)};function Hs(a){Ds.call(this);this.label=a.getMsg("YTP_ANNOTATIONS_TITLE");this.element=new Es(a,[a.getMsg("YTP_ON"),a.getMsg("YTP_OFF")]);L(this,this.element);this.priority=2}y(Hs,Ds);Hs.prototype.getSelected=function(){return this.element.getSelected()};Hs.prototype.Za=function(a){this.element.Za(a)};function Is(a,b){this.start=a<b?a:b;this.end=a<b?b:a}Is.prototype.clone=function(){return new Is(this.start,this.end)};function Js(){}f=Js.prototype;f.Sc=!1;f.cf=null;f.Hl=null;function Ks(a,b,c){a.cf?(Ed(a.cf.N(),b,c),a.cf.clear()):(b=new Br(b,c,void 0,void 0,void 0),a.cf=b,a.cf.Ap(),a.Hl=Wc("div"),a.Hl.appendChild(a.cf.N()));return a.cf}f.N=function(){return this.Hl};f.Zd=function(){};function Ls(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg",a);b&&Jb(b,function(a,b){d.setAttribute(b,a)});for(var e=2;e<arguments.length;e++)d.appendChild(arguments[e]);return d}function Ms(a,b){var c;c=":"+(mr.getInstance().a++).toString(36);b.setAttribute("result",c);a.appendChild(b);return c};function Ns(a,b){var c=Ms(a,Ls("feGaussianBlur",{"in":b,stdDeviation:"1.8"})),c=Ms(a,Ls("feDiffuseLighting",{"in":c,surfaceScale:"4",diffuseConstant:"1"},Ls("feDistantLight",{azimuth:"270",elevation:"15","lighting-color":"white"}))),c=Ms(a,Ls("feComposite",{"in":c,in2:b,operator:"in"}));return Ms(a,Ls("feComposite",{in2:c,"in":b,operator:"arithmetic",k2:1,k3:0.5,k4:0}))}
function Os(a,b){var c=Ms(a,Ls("feOffset",{"in":b,dx:"-7",dy:"-7"})),c=Ms(a,Ls("feGaussianBlur",{"in":c,stdDeviation:"3"})),c=Ms(a,Ls("feColorMatrix",{"in":c,type:"matrix",values:"0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0"})),d=Ms(a,Ls("feColorMatrix",{"in":b,type:"matrix",values:"0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 100 0"})),d=Ms(a,Ls("feGaussianBlur",{"in":d,stdDeviation:"1"})),c=Ms(a,Ls("feComposite",{operator:"out","in":c,in2:d}));return Ms(a,Ls("feComposite",{operator:"over","in":b,in2:c}))}
function Ps(a,b){return b}function Qs(a){var b=Ls("filter",{filterUnits:"userSpaceOnUse"}),c="SourceGraphic";z(a,function(a){t:{switch(a){case "bevel":a=Ns;break t;case "dropshadow":a=Os;break t}a=Ps}c=a(b,c)});return b}function Rs(a){a=Ma(a,function(a){return a in Ss});ib(a,function(a,c){return Ss[a]-Ss[c]});return a}function Ts(a,b){if(!b)return null;var c="effects:"+(b?b.join("|"):""),d=c in a.a?a.a[c]:null;if(d)return d;d=Qs(b);return 0<d.childNodes.length?ur(a,c,d):null}
function Us(a){return Ra(a,function(a){return"dropshadow"==a})?new Bb(0,7,7,0):new Bb(0,0,0,0)}var Ss={bevel:1,dropshadow:2};function Vs(a,b,c,d,e){b=Ws(b,c,d?d.a/2+1:0);Er(a,b,d,e)}function Ws(a,b,c){var d=new dr;fr(d,a.left+b+c,a.top+c);d.Ha(a.left+a.width-b-c,a.top+c);gr(d,b,b,-90,90);d.Ha(a.left+a.width-c,a.top+a.height-b-c);gr(d,b,b,0,90);d.Ha(a.left+b+c,a.top+a.height-c);gr(d,b,b,90,90);d.Ha(a.left+c,a.top+b+c);gr(d,b,b,180,90);d.close();return d}function Xs(a,b,c){b&&c&&a.setAttribute(b,"url(#"+c+")")}
function Ys(a,b,c,d){var e=a.B;e?a=new cr(e.j*b/100,e.o*c/100,e.k*b/100,e.F*c/100,e.a,e.b,e.g,e.i):(b=d?Math.max(a.a,0.9):a.a,a=new ir(a.j,b));return a}function Zs(a,b){var c=new Bb(a.top,a.left+a.width,a.top+a.height,a.left),d=Us(b);ia(d)?(c.top-=d.top,c.right+=d.right,c.bottom+=d.bottom,c.left-=d.left):(c.top-=d,c.right+=void 0,c.bottom+=void 0,c.left-=NaN);return Gb(c)}function $s(a,b,c){c.length&&(b=Ra(b.childNodes,function(a){return"g"==a.tagName}))&&(a=Ts(a,Rs(c)),Xs(b,"filter",a))};function at(){}y(at,Js);at.prototype.a=0;
at.prototype.Zd=function(a,b,c){var d=a.b,e=d.F,g=this.Sc&&Pq(a),e=(e+=g?1:0)?new jr(e,g?d.k:d.o):null;if(g=Tq(a)){var h=tq(g,b,c);if(!(0>=h.width||0>=h.height)){var k;if(k=(a=(a=a.a?a.a.a.length?a.a.a[0]:null:null)&&a.a?a.a:null)&&a.length?a[0]:null){var m;c=c?tq(c,b):null;a=oq(k,new Fb(k.B,k.G,k.k,k.i),b);c?(a.top+=c.top,a.left+=c.left):(a.top+=b.top,a.left+=b.left);m=new A(a.left,a.top);c=h.clone();a=new Fb(m.x,m.y,1,1);var g=Math.max(c.left+c.width,a.left+a.width),p=Math.max(c.top+c.height,a.top+
a.height);c.left=Math.min(c.left,a.left);c.top=Math.min(c.top,a.top);c.width=g-c.left;c.height=p-c.top;c=Zs(c,d.b);a=Ks(this,c.width,c.height);var g=Ys(d,c.width,c.height,this.Sc),h=new Fb(h.left-c.left,h.top-c.top,h.width,h.height),s=new A(m.x-c.left,m.y-c.top);this.a=17*qq(b,k.g,k.a?k.a:"xy");b=d.g;k=e?e.a/2:0;m=bt(h,s);var p=this.b(h,b,s,m),r=s.x,s=s.y,D=h.width,M=h.height,ta=h.left,h=h.top,Z=new dr;fr(Z,ta+b+k,h+k);"t"==m&&(Z.Ha(p.start,h+k),Z.Ha(r,s),Z.Ha(p.end,h+k));Z.Ha(ta+D-b-k,h+k);gr(Z,
b,b,-90,90);"r"==m&&(Z.Ha(ta+D-k,p.start),Z.Ha(r,s),Z.Ha(ta+D-k,p.end));Z.Ha(ta+D-k,h+M-b-k);gr(Z,b,b,0,90);"b"==m&&(Z.Ha(p.end,h+M-k),Z.Ha(r,s),Z.Ha(p.start,h+M-k));Z.Ha(ta+b+k,h+M-k);gr(Z,b,b,90,90);"l"==m&&(Z.Ha(ta+k,p.end),Z.Ha(r,s),Z.Ha(ta+k,p.start));Z.Ha(ta+k,h+b+k);gr(Z,b,b,180,90);Z.close();Er(a,Z,e,g);if(e=this.N())V(e,"annotation-shape"),V(e,"annotation-speech-shape"),td(e,c.left,c.top),Ed(e,c.width,c.height),$s(a,e,d.b)}}}};
function bt(a,b){var c=a.top-b.y,d=b.x-a.left-a.width,e=b.y-a.top-a.height,g=a.left-b.x,h=Math.max(c,d,e,g);if(0>h)return"i";switch(h){case c:return"t";case d:return"r";case e:return"b";case g:return"l"}return"i"}at.prototype.b=function(a,b,c,d){function e(a,c,d){h=Math.min(Math.max(d-2*b,0),g);k=yb(a-h/2,c+b,c+d-h-b)}var g=this.a,h=0,k=0;"t"==d||"b"==d?e(c.x,a.left,a.width):"l"!=d&&"r"!=d||e(c.y,a.top,a.height);return new Is(k,k+h)};function ct(){}y(ct,Js);ct.prototype.Zd=function(a,b,c){var d=Tq(a);d&&(b=tq(d,b,c),0>=b.width||0>=b.height||(a=a.b,c=Zs(b,a.b),d=Ks(this,c.width,c.height),Vs(d,new Fb(0,0,b.width,b.height),a.g,new jr(!a.i&&this.Sc?1:a.i,a.j),new ir("#000",0)),b=this.N(),V(b,"annotation-shape"),Jd(b,this.Sc?Math.max(a.a,0.9):a.a),td(b,c.left,c.top),Ed(b,c.width,c.height)))};function dt(a,b,c){this.a=a||0;this.g=b||0;this.b=c||!1}y(dt,Js);function et(a,b){var c=a.width,d=a.height,e=0,g=0;0<b&&(a.width/a.height>b?(d=a.width/b,g=(a.height-d)/2):(c=a.height*b,e=(a.width-c)/2));return new Fb(e,g,c,d)}
dt.prototype.Zd=function(a,b,c){var d=tq(Tq(a),b,c);if(!(0>=d.width||0>=d.height)){var e=et(d,this.g);e.left+=d.left;e.top+=d.top;b=a.b;c=Zs(e,b.b);var g=Ks(this,c.width,c.height),h=new ir("#000",0),e=et(e,this.a);a=a.j?a.j.a?a.j.a:a.j.M?fo(a.j.M,"hqdefault.jpg"):"":"";e=tr(g,"image",{x:e.left,y:e.top,width:e.width,height:e.height,"image-rendering":"optimizeQuality",preserveAspectRatio:"none"});e.setAttributeNS("http://www.w3.org/1999/xlink","href",a);a=new Ar(e,g);g.b.N().appendChild(a.N());if(e=
this.N()){var k=this.Sc?Math.max(b.a,0.9):b.a;Jd(e,k);if(this.b&&0<b.i){var k=new jr(b.i,b.j),d=new Fb(0,0,d.width,d.height),m;m=Ws(d,b.g,k.a/2+1);var p="mask"in g.a?g.a.mask:null;if(p)m=p;else{var p=document.createElementNS("http://www.w3.org/2000/svg","mask"),s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",Fr(m));s.setAttribute("fill","#FFF");p.appendChild(s);m=ur(g,"mask",p)}Xs(a.N(),"mask",m);Vs(g,d,b.g,k,h)}V(e,"annotation-shape");V(e,"annotation-image-shape");
td(e,c.left,c.top);Ed(e,c.width,c.height);$s(g,e,b.b)}}};function ft(){}y(ft,Js);ft.prototype.Zd=function(a,b,c){var d=Tq(a);if(d){var e=tq(d,b,c);if(!(0>=e.width||0>=e.height)){b=a.b;c=Zs(e,b.b);var d=Ks(this,c.width,c.height),g=b.F;a=this.Sc&&Pq(a);a=(g+=a?1:0)?new jr(g,a?b.k:b.o):null;g=new Fb(0,0,e.width,e.height);e=Ys(b,e.width,e.height,this.Sc);Vs(d,g,b.g,a,e);if(a=this.N())V(a,"annotation-shape"),V(a,"annotation-popup-shape"),td(a,c.left,c.top),Ed(a,c.width,c.height),$s(d,a,b.b)}}};function gt(){}y(gt,at);gt.prototype.b=function(a,b,c,d){function e(a,c,d){h=Math.min(Math.max(d-2*b,0),g);k=a<=c+d/2?Math.max(c+d/4-h/2,c+b):Math.min(c+3*d/4-h/2,c+d-h-b)}var g=this.a,h=0,k=0;"t"==d||"b"==d?e(c.x,a.left,a.width):"l"!=d&&"r"!=d||e(c.y,a.top,a.height);return new Is(k,k+h)};function ht(a,b){this.b=Oc(a);this.a=jo(this.b,b)}
function it(a,b){var c=ko(a.a,b,void 0),c=c.replace(/^[\s\xa0]+/,""),d;d=String(c.substr(0,3)).toLowerCase();(d=0==("<tr"<d?-1:"<tr"==d?0:1))&&(c="<table><tbody>"+c+"</tbody></table>");var e=c,g=document,c=g.createElement("div");C?(c.innerHTML="<br>"+e,c.removeChild(c.firstChild)):c.innerHTML=e;if(1==c.childNodes.length)c=c.removeChild(c.firstChild);else{for(e=g.createDocumentFragment();c.firstChild;)e.appendChild(c.firstChild);c=e}d&&(c=cd(cd(c)));return c};function jt(a,b,c,d,e){this.a=a;this.j=b;this.g=c;this.o=d;this.k=e;this.i=new Zo(this)}f=jt.prototype;f.na=null;f.Vc=null;f.dc=null;f.Ga=null;f.Vk=null;function kt(a,b){var c=v(function(a,c,g){c=g?lt(this,c,v(g,this)):lt(this,c);this.i.listen(b,a,c)},a);c("mouseover","e",a.Sw);c("mouseout","d",a.Rw);c("click","b");c("mousedown","a");c("touchend","b")}
function mt(a){if(a.a.F){var b;if(Oa(a.a.g,function(a){return"close"==a.type},void 0))b=a.na;else{b=it(new ht("annotation-close-button-template",[]),{});if(!(b instanceof Element))return;a.dc=b;Te(a.dc,"annotation_id",a.a.id);a.na.appendChild(a.dc);b=a.dc}var c=function(a){a.stopPropagation()};a.i.listen(b,"click",lt(a,"c",c));a.i.listen(b,"touchend",lt(a,"c",c))}}
function lt(a,b,c){return v(function(a){if(this.k)c&&c(a);else if(a.target instanceof Element){Xn(a.target);var e=document.elementFromPoint(a.clientX,a.clientY);Wn(a.target);Sm(e,"annotation")&&If(e,a.type)}this.o.u(b,this.a)},a)}f.Sw=function(){this.dc&&Wn(this.dc);this.Vc&&Jd(this.Vc,1);var a=nt(this);this.Ga&&(this.Ga.Sc=!0,Jd(this.na,ot(this)?1:0),a&&this.Ga.Zd(this.a,a,pt(this)))};
f.Rw=function(){this.dc&&Xn(this.dc);this.Vc&&Jd(this.Vc,0);var a=nt(this);this.Ga&&(this.Ga.Sc=!1,Jd(this.na,ot(this)?1:0),a&&this.Ga.Zd(this.a,a,pt(this)))};function pt(a){return a.Vk?Tq(a.Vk):null}
function ar(a){if(a.na||a.Ga){var b=Tq(a.a);if(b){var c=nt(a),d=pt(a);if(a.na&&c){b=tq(b,c,d);Ed(a.na,b.width,b.height);td(a.na,b.left,b.top);var e=a.g.vf;e&&(e=new Bb(360*qt(a).top*Vq(a.a,e)/100,640*qt(a).right*Uq(a.a,e)/100,360*qt(a).bottom*Vq(a.a,e)/100,640*qt(a).left*Uq(a.a,e)/100),a.Vc&&(e.right+=1.5*c.height/100),a.na.style.padding=e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px");"label"==a.a.style&&a.b&&(a.b.style.padding=a.na.style.padding);if(a.Vc){e=4.2*c.height/100;e=new B(e,e);Ed(a.Vc,
e);if("highlight"==a.a.type||"label"==a.a.style)var g=1.5*c.height/100,e=new A(b.width-e.width-g,b.height-e.height-g);else e=new A(b.width-e.width-3*c.height/100,(b.height-e.height)/2);td(a.Vc,e)}if(a.dc){Ed(a.dc,new B(18,18));var e=a.dc,g=Gd(a.dc),h=9<=c.left+c.width-(b.left+b.width),k=9<=b.top-c.top;td(e,h&&k?new A(b.width-9,-9):h?new A(b.width-9,b.height>27+g.height?9:b.height-9):k?new A(b.width>27+g.width?b.width-9-g.width:-9,-9):b.width/c.width>b.height/c.height?new A(b.width>27+g.width?b.width-
9-g.width:-9,b.height-9):new A(-9,b.height>27+g.height?9:b.height-9))}}a.Ga&&c&&a.Ga.Zd(a.a,c,d);if(a.na){c=a.na;d=a.a.b;c.style.color="highlightText"==a.a.style?d.G:d.k;c.style.fontSize=360*d.I*Vq(a.a,a.g.vf)/100+"px";c.style.textAlign=d.textAlign?d.textAlign:"title"==a.a.style||"highlightText"==a.a.style?"center":"left";d.A&&(c.style.fontWeight=d.A);a=a.na;c=a.style.overflow;(d=E("annotation-link-icon",a))&&Xn(d);a.style.overflow="scroll";for(b=100;0<b&&!(a.scrollHeight<=a.offsetHeight&&a.scrollWidth<=
a.offsetWidth);b--){e=Ud(a);if(5>e)break;e--;a.style.fontSize=e+"px"}a.style.overflow=c;d&&Wn(d)}}}}function qt(a){var b=a.a.b;return b.padding?b.padding:new Bb("speech"==a.a.style?1.6:0.8,"speech"==a.a.style?1.6:0.8,"speech"==a.a.style?1.6:0.8,"speech"==a.a.style?1.6:0.8)}
f.show=function(){var a=this.a.b,a=(a&&0==a.a||"title"==this.a.style||"highlightText"==this.a.style||"pause"==this.a.type?!1:!0)&&!this.Ga,b=!this.na,c="widget"==this.a.type;if(a){var d=nt(this);if(d){var e=null;"highlight"==this.a.type||"label"==this.a.style?e=new ct:"popup"==this.a.style?e=new ft:"anchored"==this.a.style?e=new at:"speech"==this.a.style?e=new gt:"image"==this.a.type&&("video"==this.a.style?e=new dt(4/3,16/9,!0):"channel"==this.a.style&&(e=new dt));e&&(e.Zd(this.a,d,pt(this)),this.Ga=
e,d=e.N())&&(Xn(d),V(d,"annotation-type-"+this.a.type.toLowerCase()),this.j(d))}}if(b){d=["annotation","hid"];"highlightText"!=this.a.style||d.push("annotation-no-mouse");d.push("annotation-type-"+this.a.type.toLowerCase());this.na=Wc("div",d);this.a.o&&("label"==this.a.style?(this.b=Wc("div",["label-text"]),this.b.style.backgroundColor=this.a.b.j,fd(this.b,this.a.o),this.na.appendChild(this.b)):fd(this.na,this.a.o));Te(this.na,"annotation_id",this.a.id);this.j(this.na);kt(this,this.na);if(Pq(this.a)&&
"image"!=this.a.type&&Oq(this.a)){if(d=Cp(this.a))this.na.title=dq(d);this.Vc=Wc("span","annotation-link-icon");this.na.appendChild(this.Vc)}mt(this);Pq(this.a)||(this.na.style.cursor="default")}c&&("subscribe"==this.a.style?E("yt-uix-subscription-button",this.na)||(this.na.innerHTML=this.a.k):this.a.k&&(this.na.innerHTML=this.a.k));if(a||b){t:{a=this.a.a.a;if(a.length&&(a=Aq(a[0]))){a=a.o;break t}a=0}this.na&&(this.na.style.zIndex=a);this.Ga&&this.Ga.N()&&(this.Ga.N().style.zIndex=a)}Wn(this.na);
Jd(this.na,ot(this)?1:0);ar(this);this.Ga&&Wn(this.Ga.N())};f.hide=function(){Xn(this.na);this.Ga&&Xn(this.Ga.N())};function ot(a){return"label"!=a.a.style||a.Ga.Sc}function nt(a){var b=a.g.vf;return b?"player_relative"==a.a.G?(a=a.g.Qc)?new Fb(-b.left,-b.top,a.width,a.height):null:new Fb(0,0,b.width,b.height):null};function rt(a){Xm.call(this,a);this.b={};this.i={};this.j=new Bs(this.F,this.a.K());var b=Q(a),c=E("html5-annotations-button",b);this.g=null;a.K().Ma?(F(c),this.g=new Hs(this.a.app.S.B),this.g.listen("change",this.Dq,this)):J(c,"click",v(this.Iq,this));this.D("onHideControls",this.Hq,this);this.D("onShowControls",this.Kq,this);this.D("onStateChange",this.Jq,this);this.D("e",this.Mq,this);this.D("d",this.Lq,this);this.D("a",this.Fq,this);this.D("b",this.Eq,this);this.D("c",this.Gq,this);a=E("video-annotations",
b);a=E("countdowntimer",a);this.k=Wc("DIV",["video-annotations","html5-stop-propagation"]);$m(this,this.k);$m(this,a);this.A=new Hr(a,v(this.sj,this))}y(rt,Xm);f=rt.prototype;f.qa="iv-module";f.zl=!1;f.kp=!0;f.ba=!1;f.zd=0;function st(a){return E("video-annotations",Q(a))&&tt(a)?new rt(a):null}function tt(a){return"leanback"==a.K().Y?!1:Fm(a.getVideoData(),"iv3_module")}f.$a=function(){return tt(this.a)};
f.create=function(){rt.C.create.call(this);this.g&&this.u("module_menu_item_add",this.g);1==(this.a.K().fa||this.a.getVideoData().fa)?this.load():ut(this,"tooltip-default")};f.destroy=function(){this.unload();this.g&&this.u("module_menu_item_remove",this.g);rt.C.destroy.call(this)};f.Iq=function(){this.ba||this.zd?this.unload():this.load()};f.Dq=function(){var a=this.ba||this.zd,b=0==this.g.getSelected();a&&!b?this.unload():!a&&b&&this.load()};f.Jq=function(a){this.kp=P(a.state,8);0>Wo(a,4)&&this.A.stop()};
f.load=function(){rt.C.load.call(this);ut(this,"tooltip-alt");var a={format:"XML",method:"GET",pd:v(this.Po,this,null)},b=this.a.getVideoData();b.Nk&&(this.zd++,Vj(b.Nk,a));b.Mk&&(this.zd++,Vj(b.Mk,a));b.Lk&&(this.a.K().Oc||this.a.K().Ic)&&(a={format:"XML",method:"GET",pd:v(this.Po,this,v(this.jv,this,b.Da))},this.zd++,Vj(b.Lk,a));this.g&&this.g.Za(0)};
f.unload=function(){this.g&&this.g.Za(1);this.j.log_({"iv-event":1});this.sj();Ym(this);Jb(this.b,function(a){a.destroy()});Jb(this.i,function(a){a.destroy()});this.zd=0;this.ba=!1;this.b={};this.i={};ut(this,"tooltip-default");rt.C.unload.call(this)};function ut(a,b){var c=E("html5-annotations-button",Q(a.a));if(c){var d=G(c,b)||"";Te(c,"tooltip",d);c.setAttribute("aria-label",d)}}
function vt(a,b){for(var c={},d=0;d<b.attributes.length;d++){var e=b.attributes[d];c[e.name]=e.nodeValue}for(d=0;d<b.childNodes.length;d++)if(e=b.childNodes[d],e.tagName){var g;if(c[e.tagName])g=c[e.tagName];else if("html_blob"==e.tagName||"data"==e.tagName){c[e.tagName]=e.childNodes[0].nodeValue.trim();continue}else g=[],c[e.tagName]=g;e&&"TEXT"==e.tagName?1==e.childNodes.length&&3==e.childNodes[0].nodeType?g.push(e.childNodes[0].nodeValue):g.push(""):e&&g.push(vt(a,e))}return c}
f.Po=function(a,b){if(this.zd&&!this.ba){this.zd--;var c=b.responseXML?b.responseXML.getElementsByTagName("annotations"):null;if(Rj(b)&&c){c=c[0];a&&a(c);wt(this,c);V(Q(this.a),this.qa+"-loaded");0==this.zd&&(this.ba=!0);var c=[],d;for(d in this.b){var e=this.b[d].qb;if(e.a)if(e=e.a,e.a.length)if(e=e.a[0].b||e.a[0].a,!e||2>e.length)e=null;else var g=e.length-1,e=0>=e[0].b&&0>=e[g].b?null:{start:e[0].b,end:e[g].b};else e=null;else e=null;if(g=e)e=1E3*g.start,g=1E3*g.end,0==e&&(e++,g++),e==g&&g++,g<
e||(e=new di(e,g,{id:d}),c.push(e))}for(d in this.i)e=this.i[d].qb,e=new di(e.data.start_ms,e.data.end_ms,{id:d}),c.push(e);this.uf.apply(this,c)}}};function xt(a,b){var c=zt(a,b);if(!c)return null;Rq(b,function(a){a=v(this.kx,this,b.id,a);this.D("ivTrigger:"+b.id,a)},a);return new Yq(a.F,b,c)}function At(a,b){var c=Wc("div",["annotation","annotation-type-custom","hid"]);a.k.appendChild(c);var d=null;switch(b.style){case "video":d=new yp(b,c,new Zo(a),a.a.K(),a.j)}d&&vp(d,a.F);return d}
function wt(a,b){for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=vt(a,c[d]),g=null;try{g=Nq(e)}catch(h){}g&&("custom"==g.type?(e=At(a,g))&&(a.i[g.id]=e):(e=xt(a,g))&&(a.b[g.id]=e))}Jb(a.b,function(a){var b=a.qb;b.a&&b.a.b&&(b=this.b[b.a.b])&&(a.b.Vk=b.qb)},a)}f.yc=function(a){rt.C.yc.call(this,a);a=a.getId();var b=this.b[a],c=this.i[a];c&&!c.Hb?c.show():b&&!b.Hb&&(b=b.qb,"pause"==b.type?Bt(this,b):(Ct(this,a),a=this.j,b&&b.i&&a.log_(xp(a,b,2))))};
f.Xc=function(a){rt.C.Xc.call(this,a);Dt(this,a.getId())};function Bt(a,b){if(a.kp){var c=Ra(b.g,function(a){return"pause"==a.type&&!!a.duration&&!!a.duration.value},void 0);c&&(a.zl=!0,a.u("command_pause"),a.A.start(1E3*c.duration.value))}}function Dt(a,b,c,d){var e=a.i[b];if(e&&!e.Hb)e.hide();else if(b=a.b[b])$q(b),d=d&&a.b[d]&&a.b[d].isVisible,c&&c.b&&d?(a=v(a.ro,a,b),b.a=new bp(a,2E3),b.a.start()):a.ro(b)}f.ro=function(a){if(a){a.hide();var b=a.qb.id;this.u(Xq("shown",b),!1,b);Et(this,a.qb,"hidden")}};
function Ct(a,b,c,d){if(b=a.b[b])$q(b),d=d&&a.b[d]&&a.b[d].isVisible,c&&c.i&&d?(a=v(a.to,a,b),b.a=new bp(a,2E3),b.a.start()):a.to(b)}f.to=function(a){if(a){a.show();var b=a.qb.id;this.u(Xq("shown",b),!0,b);Et(this,a.qb,"shown")}};f.kx=function(a,b,c,d){c?Ct(this,a,b,d):Dt(this,a,b,d)};f.Fq=function(a){if(a&&a.id){var b=this.j;a&&a.i&&Cp(a)&&b.log_(xp(b,a,8))}};
f.Eq=function(a){if(a&&a.id){var b=Cp(a),c=v(function(){b&&Et(this,a,"click")},this);zs(dq(b))&&"new"!=b.target||(c(),c=null);Dp(this.j,a,c)}};
function Et(a,b,c){Qq(b,function(a){if(a.trigger==c)switch(a.type){case "log":a.url&&sa(a.url.value);break;case "openUrl":var e=this.a.getVideoData(),g=As(a.url,e);if(-1!=g){this.u("command_seek",g);this.sj();break}if(e=(g=dq(a.url))?zs(g)?Pj(g,{src_vid:e.M,feature:"iv",annotation_id:b.id}):g:null)kn(this),window.open(e,a.url.target?"new"==a.url.target?"_blank":"_top":zs(dq(a.url))?"_top":"_blank")}},a)}f.Hq=function(){this.u(Xq("playerControlShow",void 0),!1,void 0)};
f.Kq=function(){this.u(Xq("playerControlShow",void 0),!0,void 0)};f.Mq=function(a){a=a.id;this.u(Xq("rollOver",a),!0,a)};f.Lq=function(a){a=a.id;this.u(Xq("rollOver",a),!1,a)};f.Gq=function(a){if(a||a.id)if(this.b[a.id].Hb=!0,Dt(this,a.id),a){var b=this.j;a&&a.i&&b.log_(xp(b,a,4));Et(this,a,"close")}};f.sj=function(){this.A.stop();this.zl&&(this.zl=!1,this.u("command_play"))};
function zt(a,b){if(Ft(b)){var c=b.F||Oa(b.g,function(a){return"click"==a||"rollOut"==a||"rollOut"==a},void 0);return new jt(b,v(a.k.appendChild,a.k),a.a.K(),a.F,c)}return null}function Ft(a){if("highlight"==a.type||"image"==a.type||"widget"==a.type)return!0;if("text"==a.type)for(var b in Kq)if(a.style==Kq[b])return!0;return!1}
function Gt(a,b,c,d,e){var g=a.ownerDocument.createElement("action");g.setAttribute("type","log");g.setAttribute("trigger",d);a=a.ownerDocument.createElement("url");d={};d.value="a_id="+c;d.label="cta_annotation_"+e;b=Pj(b,d);a.setAttribute("value",b);g.appendChild(a);return g}
f.jv=function(a,b){if(a)for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=c[d],g=vt(this,e);if(Mp(g,"logable",!0)){var g=Gp(g,"id","REQUIRED"),h=e.getElementsByTagName("action"),h=h.length?h[0]:null;e.insertBefore(Gt(e,a,g,"shown","shown"),h);e.insertBefore(Gt(e,a,g,"click","clicked"),h);e.insertBefore(Gt(e,a,g,"close","closed"),h)}}};var Ht;function It(a,b){fa(b)&&(b=b.join(" "));if(""===b||void 0==b){var c;Ht||(Ht={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"});c=Ht;"pressed"in c?a.setAttribute("aria-pressed",c.pressed):a.removeAttribute("aria-pressed")}else a.setAttribute("aria-pressed",b)};function Jt(a,b,c,d,e){Jn.call(this,a,b,c,c);this.O=b;this.Q=this.P=c;this.B=d||null;this.G=e||null;this.I=e||null;this.b=!1}y(Jt,Jn);function Kt(a){Ln(a,a.b&&a.B?a.B:a.O);a.Ib(a.b&&a.G?a.G:a.P);a.a=a.b&&a.I?a.I:a.Q;X(a.element,"ytp-button-pressed",a.b)}function Lt(a){a.b=!0;It(a.element,!0);Kt(a)}function Mt(a){a.b=!1;It(a.element,!1);Kt(a)}Jt.prototype.H=function(){this.I=this.G=this.B=null;Cf(this.U);this.U=null;Jt.C.H.call(this)};function Nt(a){Y.call(this,["div","ytp-action-buttons"]);this.g=new Jt(a,"ytp-button-info",a.getMsg("YTP_BUTTON_INFO"));L(this,this.g);this.g.V(this.element);this.i=new Jt(a,"ytp-button-share",a.getMsg("YTP_BUTTON_SHARE"));L(this,this.i);this.i.V(this.element);this.a=new Jt(a,"ytp-button-dislike",a.getMsg("YTP_BUTTON_DISLIKE"));L(this,this.a);this.listen(this.a,"click",this.k);this.a.V(this.element);this.b=new Jt(a,"ytp-button-like",a.getMsg("YTP_BUTTON_LIKE"));L(this,this.b);this.listen(this.b,"click",
this.F);this.b.V(this.element);this.b.hide();this.a.hide()}y(Nt,Y);Nt.prototype.F=function(){Lt(this.b);Mt(this.a)};Nt.prototype.k=function(){Lt(this.a);Mt(this.b)};function Ot(a){var b=pe("/signin?context=popup","next",document.location.protocol+"//"+document.domain+"/post_login"),b=pe(b,"feature","sub_button");if(b=window.open(b,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0)){var c=Lr("LOGGED_IN",function(b){Pr();a(b)});ff("LOGGED_IN_PUBSUB_KEY",c);b.moveTo((screen.width-375)/2,(screen.height-440)/2)}}pa("yt.pubsub.publish",Qr);function Pt(){this.a={}}y(Pt,Zr);ca(Pt);f=Pt.prototype;f.bj="tooltip";f.aj=0;f.register=function(){$r(this,"mouseover",this.Sp);$r(this,"mouseout",this.Ml);$r(this,"click",this.Ml);$r(this,"touchstart",this.Rx);$r(this,"touchend",this.Yp);$r(this,"touchcancel",this.Yp)};f.hq=function(){return!(this.g&&0==uc.indexOf("6"))};
f.Sp=function(a){if(!(this.aj&&1E3>x()-this.aj)){var b=parseInt(G(a,"tooltip-hide-timer"),10);b&&(this.removeData(a,"tooltip-hide-timer"),I(b));var b=v(function(){Qt(this,a);this.removeData(a,"tooltip-show-timer")},this),c=parseInt(G(a,"tooltip-show-delay"),10)||0,b=H(b,c);Te(a,"tooltip-show-timer",b.toString());a.title&&(as(a,Rt(a)),a.title="")}};
f.Ml=function(a){var b=parseInt(G(a,"tooltip-show-timer"),10);b&&(I(b),this.removeData(a,"tooltip-show-timer"));b=v(function(){St(this,a);this.removeData(a,"tooltip-hide-timer")},this);b=H(b,50);Te(a,"tooltip-hide-timer",b.toString());if(b=G(a,"tooltip-text"))a.title=b};f.Rx=function(a,b){this.aj=0;var c=Vr(b,$(this),null[0].target);this.Sp(c)};f.Yp=function(a,b){this.aj=x();var c=Vr(b,$(this),null[0].target);this.Ml(c)};function Tt(a,b){as(a,b);var c=G(a,"content-id");if(c=Oc(c))c.innerHTML=b}
function Rt(a){return G(a,"tooltip-text")||a.title}
function Qt(a,b){if(b){var c=Rt(b);if(c){var d=Oc(Ut(a,b));if(!d){d=document.createElement("div");d.id=Ut(a,b);d.className=$(a,"tip");var e=document.createElement("div");e.className=$(a,"tip-body");var g=document.createElement("div");g.className=$(a,"tip-arrow");var h=document.createElement("div");h.className=$(a,"tip-content");var k=Vt(a,b),m=Ut(a,b,"content");h.id=m;Te(b,"content-id",m);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(g);(Kf()||document.body).appendChild(d);Tt(b,
c);(c=parseInt(G(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",Fc(h,$(a,"normal-wrap")));h=Ic(b,$(a,"reverse"));Wt(a,b,d,e,k,h)||Wt(a,b,d,e,k,!h);var p=$(a,"tip-visible");H(function(){Fc(d,p)},0)}}}}
function Wt(a,b,c,d,e,g){Jc(c,$(a,"tip-reverse"),g);var h=0;g&&(h=1);a=Gd(b);g=new A((a.width-10)/2,g?a.height:0);var k=yd(b);Sr(new A(k.x+g.x,k.y+g.y),c,h);h=Tc(window);k=Bd(c);c=Gd(d);var m=Math.floor(c.width/2);e&&(e.style.left="3px",e.style.height=c.height+"px",e.style.width=c.width+"px");e=!!(h.height<k.y+a.height);a=!!(k.y<a.height);g=!!(k.x<m);h=!!(h.width<k.x+m);k=(c.width+3)/-2- -5;b=G(b,"force-tooltip-direction");if("left"==b||g)k=-5;else if("right"==b||h)k=20-c.width-3;d.style.left=Math.floor(k)+
"px";return!(e||a)}function St(a,b){if(b){var c=Oc(Ut(a,b));c&&(Xt(c),F(c),a.removeData(b,"content-id"))}}function Ut(a,b,c){a=$(a);var d=b.__yt_uid_key;d||(d=We(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}function Vt(a,b){var c=null;bc&&Ic(b,$(a,"masked"))&&((c=Oc("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),Wn(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=$(a,"tip-mask")));return c}
function Xt(a){var b=Oc("yt-uix-tooltip-shared-mask"),c=b&&md(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),Xn(b),document.body.appendChild(b))};function Yt(){this.a={};this.i=[]}y(Yt,Zr);ca(Yt);Yt.prototype.bj="subscription-button";
Yt.prototype.register=function(){$r(this,"click",this.xp);this.i.push(Lr("subscription-subscribe-loading",this.wp,this),Lr("subscription-subscribe-loaded",this.vp,this),Lr("subscription-unsubscirbe-loading",this.wp,this),Lr("subscription-unsubscribe-loaded",this.vp,this),Lr("subscription-subscribe-success",this.Pw,this),Lr("subscription-unsubscribe-success",this.Qw,this),Lr("subscription-enable-ypc",this.Ow,this),Lr("subscription-disable-ypc",this.Nw,this))};
var Zt={Rp:"hover-enabled",Lx:"yt-uix-button-subscribe",Mx:"yt-uix-button-subscribed",$z:"ypc-enabled",$x:"yt-uix-button-subscription-container",ay:"yt-subscription-button-disabled-mask-container"},$t={nA:"channel-external-id",Nx:"subscriber-count-show-when-subscribed",Ox:"subscriber-count-tooltip",Px:"subscriber-count-title",MB:"href",cq:"is-subscribed",tC:"parent-url",KC:"sessionlink",Qx:"style-type",dq:"subscription-id",UC:"target",Sx:"ypc-enabled",Wp:"ypc-item-type",Vp:"ypc-item-id",Xp:"ypc-offers-url"};
f=Yt.prototype;f.xp=function(a){var b=G(a,"href"),c=!!kf("subscription_ajax");if(b)a=G(a,"target")||"_self",window.open(b,a);else if(c){var b=G(a,"channel-external-id"),c=G(a,"sessionlink"),d;if(G(a,"ypc-enabled")){d=G(a,$t.Wp);var e=G(a,$t.Vp),g=G(a,$t.Xp);d={itemType:d,itemId:e,offersUrl:g,subscriptionElement:a}}else d=null;e=G(a,"parent-url");G(a,"is-subscribed")?(g=G(a,"subscription-id"),Qr("subscription-unsubscribe",b,g,d,a,c,e)):Qr("subscription-subscribe",b,d,a,c,e)}else au(this,a)};
f.wp=function(a){this.Wf(a,this.aq,!0)};f.vp=function(a){this.Wf(a,this.aq,!1)};f.Pw=function(a,b){this.Wf(a,this.bq,!0,b)};f.Qw=function(a){this.Wf(a,this.bq,!1)};f.Ow=function(a){this.Wf(a,this.Vx)};f.Nw=function(a){this.Wf(a,this.Ux)};f.bq=function(a,b,c){b?(Te(a,$t.cq,"true"),c&&Te(a,$t.dq,c)):(this.removeData(a,$t.cq),this.removeData(a,$t.dq));bu(a)};f.aq=function(a,b){var c=ld(a,Zt.$x);Jc(c,Zt.ay,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
function bu(a){var b=G(a,$t.Qx),c=!!G(a,"is-subscribed"),b="-"+b,d=Zt.Mx+b;Jc(a,Zt.Lx+b,!c);Jc(a,d,c);G(a,$t.Ox)&&!G(a,$t.Nx)&&(b=$(Pt.getInstance()),Jc(a,b,!c),a.title=c?"":G(a,$t.Px));c?H(function(){Fc(a,Zt.Rp)},1E3):Gc(a,Zt.Rp)}f.Vx=function(a){var b=!!G(a,$t.Wp),c=!!G(a,$t.Vp),d=!!G(a,$t.Xp);!G(a,"ypc-enabled")&&b&&c&&d&&(Fc(a,"ypc-enabled"),Te(a,$t.Sx,"true"))};f.Ux=function(a){G(a,"ypc-enabled")&&(Gc(a,"ypc-enabled"),this.removeData(a,"ypc-enabled"))};
function cu(a,b){var c=Pc($(a));return Ma(c,function(a){return b==G(a,"channel-external-id")},a)}f.ly=function(a,b,c){var d=fb(arguments,2);z(a,function(a){b.apply(this,bb(a,d))},this)};f.Wf=function(a,b,c){var d=cu(this,a),d=bb([d],fb(arguments,1));this.ly.apply(this,d)};function au(a,b){var c=v(function(a){a.subscription_ajax&&jf("subscription_ajax",a.subscription_ajax);this.xp(b)},a);Ot(c)};function du(a){this.b=a||1;Nn.call(this,30*this.b,30*this.b);this.F=this.width/2;this.i=this.height/2;this.B=0;this.Z.translate(this.F,this.i)}y(du,Nn);du.prototype.show=function(){du.C.show.call(this);var a=this.G;this.k=new Date;this.g(a,125)};
du.prototype.G=function(){this.Z.clearRect(-this.F,-this.i,this.width,this.height);for(var a=this.B++%8,b=0;8>b;b++){var c=2*Math.PI/8*(a+b),d=11*this.b*Math.cos(c),c=11*this.b*Math.sin(c),e=(b+1)/9;this.Z.beginPath();this.Z.arc(d,c,4*this.b,0,2*Math.PI,!1);this.Z.fillStyle="rgba(189, 189, 189, "+e+")";this.Z.fill()}};du.prototype.hide=function(){I(this.a);du.C.hide.call(this)};function eu(){Y.call(this,["div","ytp-sentiment-display",["div","ytp-sentiment-bar",["div","ytp-sentiment-bar-likes"],["div","ytp-sentiment-bar-dislikes"]],["div","ytp-sentiment-text","{{sentiment}}"]]);this.b=this.template.a["ytp-sentiment-bar-likes"];this.a=this.template.a["ytp-sentiment-bar-dislikes"]}y(eu,Y);eu.prototype.H=function(){this.a=this.b=null;eu.C.H.call(this)};function fu(a){a=["button","ytp-button-share-more",["div","ytp-button-share-more-icon yt-uix-button-icon-new-window"],["span","ytp-button-share-more-content",a.getMsg("YTP_BUTTON_MORE_SHARE")]];Y.call(this,a)}y(fu,Y);function gu(a,b,c,d){Jn.call(this,a,"share-service-icon-"+d+"-sharebar",b,c);V(this.element,"share-service-icon-sharebar")}y(gu,Jn);function hu(){Y.call(this,["div","ytp-share-url-container",["input","ytp-share-url"]]);this.a=this.template.a["ytp-share-url"]}y(hu,Y);hu.prototype.H=function(){this.a=null;hu.C.H.call(this)};function iu(a,b,c){R.call(this);this.a=a;this.g=b;this.i=c;this.gb=new Zo(this);this.j=this.b=this.k=this.ka=null;this.A=this.o=!1}y(iu,R);f=iu.prototype;f.Sj=function(){var a=E("html5-title",this.a);this.k=E("html5-title-text",a);this.gb.listen(this.k,"click",this.wn);this.b=new Nt(this.i);this.b.V(a,1);this.gb.listen(this.b.g,"click",this.gk);this.g.jf&&this.b.g.hide();this.gb.listen(this.b.i,"click",this.$h)};f.reset=function(){};
f.update=function(a){this.ka=a;this.reset();fd(this.k,a.title||"");Wn(this.a)};f.wn=function(){this.Ii(this.ka.Lc||ju(this.g,this.ka))};f.gk=function(){if(!this.o){this.o=!0;xn(this.ka?this.ka.M:void 0,!1,this.nt,ba,this,this.g.Fa,this.g.Va);if(!this.j){var a=E("html5-info-panel-loading-icon",this.a);this.j=new du;V(this.j.element,"html5-info-panel-loader");this.j.V(a);L(this,this.j)}this.j.show()}Mt(this.b.i);W(this.a,"show-share");a=this.b.g;a.b?Mt(a):Lt(a);return Vm(this.a,"show-more-info")};
f.$h=function(a){Mt(this.b.g);W(this.a,"show-more-info");if("detailpage"!=this.g.Y){if(!this.A){this.A=!0;var b={action_get_share_info:1,feature:"player_embedded",video_id:this.ka?this.ka.M:void 0};this.g.Fa&&(b.authuser=this.g.Fa);this.g.Va&&(b.pageid=this.g.Va);Vj("/share_ajax",{Z:this,method:"GET",onError:this.It,Qa:this.Jt,sf:b})}a&&a.stopPropagation();a=this.b.i;a.b?Mt(a):Lt(a);Vm(this.a,"show-share")}};
f.nt=function(a,b){if(!this.ha()){var c=E("html5-info-panel",this.a),d=b.user_info;this.ka&&(this.ka.va=d.external_id);var e=E("html5-author-img",c).getElementsByTagName("img")[0];e.src=d.image_url;this.gb.listen(e,"click",this.Sn);e=E("html5-author-name",c);fd(e,d.username);this.gb.listen(e,"click",this.Sn);e=b.video_info;e.subscription_ajax_token&&jf("subscription_ajax",e.subscription_ajax_token);var g=E("html5-subscribe-button-container",c);g.innerHTML=d.subscription_button_html?d.subscription_button_html:
"";d=Yt.getInstance();(d=E($(d),g))&&ku(this.i,d);E("html5-view-count",c).innerHTML=e.view_count_string;var h=parseInt(e.likes_count_unformatted,10),g=parseInt(e.dislikes_count_unformatted,10),d=new eu,k=0,m=0;0<h+g&&(k=100*h/(h+g),m=100*g/(h+g));d.b.style.width=k+"%";d.a.style.width=m+"%";h=rf("YTP_SENTIMENT_LIKE",h);g=rf("YTP_SENTIMENT_DISLIKE",g);rn(d.template,"sentiment",h+", "+g);d.V(E("html5-video-info",c),2);d=E("html5-description-text",c);fd(d,e.description);this.j.hide();c=E("html5-info-panel-content",
c);Wn(c)}};
f.Jt=function(a,b){if(!this.ha()){var c=E("share-bar"),d=new hu;Rc(d.a,{value:b.url_short});d.V(c);Sm(this.a,"show-share")&&(d.a.focus(),d.a.select());for(var d=b.links,e=0;e<Math.min(3,d.length);e++){var g=new gu(this.i,d[e].name,d[e].sname,d[e].img);g.V(c);this.gb.listen(g,"click",oa(ss,d[e].url,{}))}d=new fu(this.i);this.gb.listen(d,"click",v(this.Ii,this,b.more));d.V(c);d=new Jn(this.i,"yt-uix-button-icon-share-bar-close",this.i.getMsg("YTP_BUTTON_CLOSE"),this.i.getMsg("YTP_BUTTON_CLOSE"));d.V(c);
this.gb.listen(d,"click",this.$h)}};f.It=function(){};f.Sn=function(){var a=this.g,b=this.ka,c="",c=b.va?a.jb+"channel/UC"+b.va:a.jb+"user/"+b.author;this.Ii(c)};f.Ii=function(a){rs(a)};f.H=function(){this.gb.removeAll();this.ka=this.k=this.g=this.a=null;iu.C.H.call(this)};function lu(){Y.call(this,["div","ytp-playlist-tray-index-length",["span","ytp-playlist-tray-index","{{index}}"],["span",""," / "],["span","ytp-playlist-tray-length","{{length}}"]])}y(lu,Y);lu.prototype.Lg=function(a){rn(this.template,"index",a+1)};function mu(a){Jt.call(this,a,"ytp-button-expand",a.getMsg("YTP_BUTTON_EXPAND"),"ytp-button-collapse",a.getMsg("YTP_BUTTON_COLLAPSE"));this.Aa([["div","ytp-button-playlist-icon"],["div","ytp-button-playlist-text",a.getMsg("YTP_BUTTON_PLAYLIST")]])}y(mu,Jt);function nu(a){Y.call(this,["div","ytp-playlist-tray-controller"]);this.b=new mu(a);this.b.V(this.template.N());L(this,this.b);this.a=new lu;this.a.V(this.template.N());L(this,this.a)}y(nu,Y);function ou(a,b,c,d){a=["div","ytp-playlist-tray-action-info",["div","ytp-playlist-tray-playlist-title",b],["div","ytp-playlist-tray-author-name",a.getMsg("YTP_AUTHOR_ATTRIBUTION",{author:c})],["div","ytp-playlist-tray-description-text",d]];Y.call(this,a)}y(ou,Y);function pu(a){var b=["div","ytp-playlist-tray-action-share",["div","ytp-playlist-tray-action-share-heading",a.getMsg("YTP_SHARE_PLAYLIST")],["div","share-bar-services"]];Y.call(this,b);this.i=a;this.g=new Zo(this);this.b=this.a=null}y(pu,Y);pu.prototype.H=function(){this.g.removeAll();this.g=null;pu.C.H.call(this)};function qu(a,b){Y.call(this,["div","ytp-playlist-tray-item",["span","ytp-playlist-tray-item-index","{{index}}"],["span","ytp-playlist-tray-item-now-playing","\u25b6"],["img","ytp-playlist-tray-item-thumbnail",{src:"{{image}}"}],["span","ytp-playlist-tray-item-title","{{title}}"],["span","ytp-playlist-tray-item-author","{{author}}"]]);this.a=b;this.template.update({index:b+1,title:a.title,author:a.author,image:fo(a.M)})}y(qu,Y);
qu.prototype.Lg=function(a){X(this.element,"ytp-playlist-tray-item-current",this.a==a)};function ru(){Y.call(this,["div","ytp-playlist-tray-tray"]);this.a=null;this.i=new Zo(this);this.b=[]}y(ru,Y);function su(a,b){b!=a.a&&(a.a&&a.a.$("shuffle",a.g,a),a.a=b,a.a.D("shuffle",a.g,a),a.g())}ru.prototype.g=function(){this.i.removeAll();this.b=[];bd(this.element);for(var a=0;a<=this.a.Mb-1;++a){var b=new qu(Ah(this.a,a),a);b.Lg(this.a.ua);this.b.push(b);this.i.listen(b,"click",oa(this.k,a));b.V(this.element)}};
ru.prototype.k=function(a){a={index:a};var b=document.createEvent("CustomEvent");b.initCustomEvent("playvideoat",!0,!0,a||null);this.dispatchEvent(b)};ru.prototype.H=function(){this.i.removeAll();ru.C.H.call(this)};function tu(a){Xm.call(this,a);var b=Q(a);this.j=new Zo(this);this.k=a.app.S.B;this.i=new mn(["div",["ytp-playlist-tray-container","html5-stop-propagation"],["div",["ytp-playlist-tray-info","show-more-info"]]]);L(this,this.i);this.a.app.S.g.appendChild(this.i.N());this.g=new ru;this.j.listen(this.g,"playvideoat",v(function(b){a.nm(b.detail.index)},a));L(this,this.g);this.g.V(this.i.N(),0);this.G=E("html5-playlist-button",b);J(this.G,"click",v(this.Dm,this));this.B=this.A=null;this.I=!1;this.b=new nu(this.k);
this.b.V(E("html5-title",void 0),0);this.j.listen(this.b.b,"click",this.Dm);this.D("fullscreentoggled",this.xq,this);this.D("videodatachange",this.yq,this);this.D("onResize",this.om,this);this.D("clearvideooverlays",this.unload,this)}y(tu,Xm);f=tu.prototype;f.qa="playlist";f.create=function(){var a=this.a.wb();su(this.g,a);for(var b=this.g,c=0;c<b.b.length;c++)b.b[c].Lg(b.a.ua);a.D("shuffle",this.qu,this);tu.C.create.call(this)};
f.qu=function(){this.b.a.Lg(this.a.Zj());var a=Om(this.a.wb());rn(this.b.a.template,"length",a)};f.destroy=function(){this.a.wb()||(su(this.g,null),tu.C.destroy.call(this))};f.load=function(){this.ba=!0;tu.C.load.call(this);Lt(this.b.b)};f.unload=function(){this.ba=!1;tu.C.unload.call(this);Mt(this.b.b)};
f.Dm=function(){if(this.ba)this.unload();else if(this.u("command_clear_video_overlays"),this.load(),this.om(),!this.A){var a=E("ytp-playlist-tray-info"),b=new Nt(this.k);b.V(a,0);this.j.listen(b.g,"click",this.gu);this.j.listen(b.i,"click",this.hu);b=this.a.wb();this.A=new ou(this.k,b.title,b.author,b.description);this.A.V(a)}};f.gu=function(){var a=E("ytp-playlist-tray-info");Fc(a,"show-more-info");Gc(a,"show-share")};
f.hu=function(){var a=E("ytp-playlist-tray-info");Gc(a,"show-more-info");Fc(a,"show-share");this.I||(this.B=new pu(this.k),this.B.V(a),this.I=!0,Vj("/share_ajax",{Z:this,method:"GET",onError:this.$u,Qa:this.av,sf:{action_get_share_info:1,feature:"player_embedded",video_id:this.a.getVideoData().M,list:this.a.wb().g}}))};f.hide=function(){var a=E("ytp-playlist-tray-info");Gc(a,"show-more-info");Gc(a,"show-share")};
f.av=function(a,b){var c=this.B;c.g.removeAll();var d=b.links,e=c.template.a["share-bar-services"];bd(e);for(var g=0;g<Math.min(3,d.length);g++){var h=new gu(c.i,d[g].name,d[g].sname,d[g].img);h.V(e);c.g.listen(h,"click",oa(ss,d[g].url))}c.a&&F(c.a.element);c.a=new fu(c.i);c.g.listen(c.a,"click",oa(rs,b.more));c.a.V(c.element);c.b&&F(c.b.element);c.b=new hu;Rc(c.b.a,{value:b.url_short});c.b.V(c.element)};f.$u=function(){};f.xq=function(a){var b=this.a.K().Y;this.ba&&!a&&"detailpage"==b&&this.unload()};
f.yq=function(){this.b.a.Lg(this.a.Zj());var a=Om(this.a.wb());rn(this.b.a.template,"length",a)};f.om=function(){var a=Gd(this.i.N());X(this.i.N(),"show-tray-panel",560<a.width)};f.$a=function(a){return!!a.wb()};function uu(a){return a.wb()?new tu(a):null}f.H=function(){Hf(this.G);this.G=null;tu.C.H.call(this)};var vu=RegExp("^(ar|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)","i");function wu(a,b){Um(a,["html5-async-progress","html5-async-success","html5-async-error"]);b&&V(a,b);St(Pt.getInstance(),a)};function xu(a,b,c,d){if(this.g=!!c)this.Zk=Math.max(800,this.Zk);this.element=a;this.G=b;this.k=d;yu?a.ontouchstart=v(this.aw,this):a.onmousedown=v(this.$v,this);a.onclick=v(this.Mn,this)}var yu="ontouchstart"in document,zu=[],Au=!1;function Bu(){yu&&!Au&&(Au=!0,document.addEventListener("click",function(a){for(var b=new A(a.clientX,a.clientY),c=0,d;d=zu[c];c++)if(25>zb(d,b)){a.stopPropagation();a.preventDefault();zu.splice(c,1);break}},!0))}
function Cu(a){zu.push(a);window.setTimeout(function(){var b=zu.indexOf(a);-1!=b&&zu.splice(b,1)},2500)}f=xu.prototype;f.Zk=1E3;
f.aw=function(a){if(!(1<a.touches.length||a._stop)){this.a=a._stop=!0;this.g||(this.element.ontouchend=v(this.Mn,this),document.body.addEventListener("touchend",Du(this),!1));document.body.addEventListener("touchmove",Eu(this),!1);document.body.addEventListener("touchcancel",Du(this),!1);Fu(this,a);this.F=window.setTimeout(v(this.li,this,!0),100);var b=a.touches[0];this.b=new A(b.clientX,b.clientY);this.g||this.k&&!this.k(a)||Cu(this.b)}};
f.$v=function(a){a.stopPropagation();this.a=!0;Fu(this,a);this.li(!0)};f.Mn=function(a){"touchend"==a.type&&!this.a||a._stop||(a._stop=!0,this.li(!0),window.setTimeout(v(function(){this.Ei();this.G(a)},this),0))};f.Tw=function(a){1<a.touches.length?this.Ei():(a=a.touches[0],a=new A(a.clientX,a.clientY),this.b&&12<zb(this.b,a)&&this.Ei())};function Eu(a){a.i||(a.i=v(a.Tw,a));return a.i}
f.Ei=function(){window.clearTimeout(this.F);window.clearTimeout(this.A);this.li(!1);this.a=!1;document.body.removeEventListener("touchmove",Eu(this),!1);document.body.removeEventListener("touchend",Du(this),!1);document.body.removeEventListener("touchcancel",Du(this),!1)};function Du(a){a.j||(a.j=v(a.Ei,a));return a.j}f.li=function(a){this.B&&Jc(this.element,this.B,a)};function Fu(a,b){a.o&&(a.A=window.setTimeout(v(function(){this.a=!1;this.o(b)},a),a.Zk))};function Gu(a){Jn.call(this,a);Mn(this,15);Hu(this)}y(Gu,Jn);function Hu(a){Ln(a,"ytp-button-fullscreen-enter");var b=a.g.getMsg("YTP_BUTTON_FULLSCREEN_ENTER");a.Ib(b);a.a=b};function Iu(){Y.call(this,["div",["ytp-menu","html5-stop-propagation"],"{{content}}"]);this.a=[];this.stopPropagation("click")}y(Iu,Y);Iu.prototype.add=function(a){for(var b=this.a.length,c=0;c<this.a.length;c++){if(this.a[c]==a)return;if(c<b&&this.a[c].priority<a.priority){b=c;break}}eb(this.a,b,0,a);Ju(this)};Iu.prototype.remove=function(a){Za(this.a,a);Ju(this)};
function Ju(a){var b;if(1==a.a.length)b=new Y(["div","ytp-menu-content",["div","ytp-menu-row",["div","ytp-menu-cell",a.a[0].label]],["div","ytp-menu-row",["div","ytp-menu-cell","{{content}}"]]]),b.Aa(a.a[0].element);else{b=new Y(["div","ytp-menu-content"]);for(var c=0;c<a.a.length;c++){var d=new Y(["div","ytp-menu-row",["div",["ytp-menu-cell","ytp-menu-title"],a.a[c].label],["div","ytp-menu-cell","{{content}}"]]);d.Aa(a.a[c].element);d.V(b.N())}}a.Aa(b)}Iu.prototype.H=function(){this.a=null;Iu.C.H.call(this)};function Ku(a){Jn.call(this,a);Mn(this,3);Lu(this)}y(Ku,Jn);function Lu(a){Ln(a,"ytp-button-play");var b=a.g.getMsg("YTP_BUTTON_PLAY");a.Ib(b);a.a=b};function Mu(a){Y.call(this,["div","ytp-playlist-controls","{{content}}"]);this.b=new Jn(a,"ytp-button-prev",a.getMsg("YTP_BUTTON_PREV"),a.getMsg("YTP_BUTTON_PREV"));L(this,this.b);this.a=new Jn(a,"ytp-button-next",a.getMsg("YTP_BUTTON_NEXT"),a.getMsg("YTP_BUTTON_NEXT"));L(this,this.a);this.Aa([this.b,this.a])}y(Mu,Y);function Nu(a,b,c,d){var e=Math.min(c/(b.Wn/b.ti),d/(b.Vn/b.rows)),g=b.Wn*e,e=b.Vn*e,g=Math.floor(g/b.ti)*b.ti,e=Math.floor(e/b.rows)*b.rows,h=g/b.ti,k=e/b.rows,m=Math.floor((c-h)/2);c=Math.ceil((c-h)/2);d=Math.floor((d-k)/2);pd(a,{width:h+"px",height:k+"px","margin-top":d+"px","margin-bottom":d+"px","margin-left":m+"px","margin-right":c+"px","background-image":"url("+b.url+")","background-position":-1*b.pu*h+"px "+-1*b.row*k+"px","background-size":g+"px "+e+"px"})};function Ou(){this.b=!1;this.a=new os(this.iv,250,this);L(this,this.a)}y(Ou,K);f=Ou.prototype;f.zo=!1;f.ud=null;f.ac=null;f.Uh=null;f.Xj=null;f.Yj=null;f.xg=null;f.$d=0;f.Dk=0;f.$k=0;f.Lo=10;f.Nb=0;f.Hi=0;f.fl=0;f.Wc=null;f.Le=null;f.Oe=0;f.disable=function(){this.zo=!0};f.Xa=function(a){this.Oe=a};f.xo=function(a,b){this.ac.style.display="none";for(var c,d,e=a;e<=b;e++)if(d=this.ac.children[e])c=El(this.Le,e,this.Nb),Nu(d,c,this.Nb,this.Hi);this.ac.style.display=""};
function Pu(a,b){if(b!=a.fl){var c=El(a.Le,b,2*a.Nb),d=Math.round(2*a.Nb),e=Math.round(2*a.Hi);Nu(a.Xj,c,d,e);a.fl=b}}f.iv=function(){for(var a=this.Dk,b=Math.max(Math.floor(a/this.Nb),0),a=Math.min(Math.ceil((a+this.$d)/this.Nb),this.Wc.a[0].b-1);b<=a;b++){for(var c=this.Le,d=b,e=fl(c.a,2*this.Nb),g=void 0,h=void 0;0<=e;e--)if(g=c.a.a[e],h=Math.floor(d/(g.a*g.g)),!g.i[h]){var g=c,k=e,m=k+"-"+h;g.i[m]||(g.i[m]=!0,Bl(g.g,k,{sn:k,tn:h}))}Fl(c)}};
function Qu(a,b){a.Lo=Math.min(10,Math.ceil(a.$d/72));a.Nb=Math.floor(a.$d/a.Lo);a.Hi=0.555*a.Nb;a.$k=a.Nb*a.Wc.a[0].b;Fd(a.ac,a.$k);var c=Math.round(2*a.Nb),d=0.555*c+12;Ed(a.Uh,c,d);td(a.Uh,(a.$d-c)/2);a.ud.style.height=ud(d+20,!0);b&&(a.xo(0,a.Wc.a[0].b-1),Pu(a,a.fl),a.b=!0)}f.H=function(){this.xg=this.Yj=this.Xj=this.Uh=this.ac=this.ud=this.Le=this.Wc=null;Ou.C.H.call(this)};function Ru(a,b,c,d){this.width=b;this.a=c;this.i=d;this.b=b-c-d;this.g=yb(a-c,0,this.b);this.position=this.g+c;this.td=this.g/this.b};function Su(){Y.call(this,["div",["ytp-progress-magnifier","html5-draggable"],["div","ytp-progress-magnifier-play-progress"],["div","ytp-progress-magnifier-load-progress"],["div","ytp-progress-magnifier-scrubber-button"]]);this.i=this.template.a["ytp-progress-magnifier-load-progress"];this.F=0;this.k=this.template.a["ytp-progress-magnifier-play-progress"];this.B=0;this.b=[];this.g=this.template.a["ytp-progress-magnifier-scrubber-button"]}y(Su,Y);
function Tu(a,b){var c=a.a,d=c.width-4,e=d-2*a.Oe;if(ga(b))var d=Uu(a).position,g=a.N().offsetWidth/2,d=yb(b,d-g,d+g);else d=2+c.td*d;return new Ru(d,c.width,2+c.td*e,2+(1-c.td)*e)}function Uu(a){var b=a.a;a=a.N().offsetWidth/2+2;return new Ru(b.position,b.width,a,a)}Su.prototype.disable=function(){this.a=null};
function Vu(a,b){if(a.a){var c=a.N(),d=Uu(a),e=Tu(a),g=c.offsetWidth/2,h=d.position-g,d=d.position+g;c.style.left=h+"px";var k=a.F*e.b+e.a,m=a.B*e.b+e.a,p=a.g.offsetWidth,s=m-h-p/2;s>-p&&s<2*g+p?(a.g.style.left=s+"px",sn(a.g)):tn(a.g);m-=h;0<=m?(Fd(a.k,Math.min(m,2*g)),sn(a.k)):tn(a.k);k-=h;0<=k?(Fd(a.i,Math.min(k,2*g)),sn(a.i)):tn(a.i);if(b){g=(h-e.a)/2/60;e=(d-e.a)/2/60;h=0;for(d=Math.ceil(g);d<=e;d++)h<a.b.length?k=a.b[h]:(k=document.createElement("div"),a.b[h]=k,c.appendChild(k)),k.className=
0==d%60?"ytp-progress-magnifier-60m":0==d%30?"ytp-progress-magnifier-30m":0==d%15?"ytp-progress-magnifier-15m":"ytp-progress-magnifier-1m",k.style.left=120*(d-g)+"px",h++;for(;h<a.b.length;)F(a.b.pop())}}}Su.prototype.Xa=function(a){this.Oe=a;Vu(this,!0)};Su.prototype.H=function(){this.g=this.b=this.k=this.i=null;Su.C.H.call(this)};function Wu(){}y(Wu,K);f=Wu.prototype;f.gi=!1;f.Oe=0;f.Gb=null;f.Ih=null;f.ak=null;f.rj=null;f.Ig=null;f.eh=null;f.disable=function(){this.gi=!0};f.show=function(){this.gi||Wn(this.Gb)};f.hide=function(){Xn(this.Gb)};f.Xa=function(a){this.Oe=a};f.reset=function(){W(this.Gb,"with-thumbnail");this.eh=this.Ig=null};f.Tu=function(a,b){(a<=this.a||this.a<=b)&&Xu(this)};function Xu(a){var b=El(a.eh,a.a,108);Nu(a.ak,b,108,60)}f.H=function(){this.rj=this.ak=this.Ih=this.Gb=this.eh=this.Ig=null;Wu.C.H.call(this)};function Yu(a){R.call(this);this.Ta=a;this.va=null;this.J={};this.aa=Infinity;this.X=this.U=this.L=null;this.ia=0;this.o=this.g=this.G=null;this.k=new Zo(this);this.Ua="";this.Na=null;this.ja=0;this.ib=null;this.ya=0;this.a=this.b=this.Sa=this.i=this.Q=this.ga=null;this.za=new Zo(this);this.pa=null;this.Da=new Zo(this);this.A=this.I=!1;this.O=this.P=this.fa=null;this.j=this.Ma=this.ma=this.B=0}y(Yu,R);
function Zu(a,b){a.g=b;a.i=E("html5-progress-bar",a.g);a.k.listen(a.i,"click",a.Qh);$o(a.k,a.i,"down",a.Av);a.Ua=$o(a.k,a.i,"over",a.jn);a.Q=E("html5-progress-list",a.i);a.ib=E("html5-play-progress",a.Q);a.Na=E("html5-load-progress",a.Q);a.ga=E("html5-highlight",a.Q);a.va=E("html5-ad-progress-list",a.i);a.pa=E("html5-scrubber-button",a.i);a.U=E("html5-clip-exclusion",a.i);a.X=a.U.cloneNode(!1);a.U.parentNode.appendChild(a.X);a.G=E("html5-clip-start",a.i);$o(a.k,a.G,"over",a.$o);$o(a.k,a.G,"out",a.Zo);
a.k.listen(a.G,"click",a.kl);a.L=E("html5-clip-end",a.i);$o(a.k,a.L,"over",a.$o);$o(a.k,a.L,"out",a.Zo);a.k.listen(a.L,"click",a.kl);a.Sa=E("html5-progress-screenreader",a.i)}f=Yu.prototype;
f.jn=function(a){if(!this.I){this.k.cc(this.Ua);this.A=!1;this.P=this.fa=a=new A(wf(a),xf(a));if(this.a&&5400<=this.B){I(this.ma);this.a.show();Wn(this.ga);a=this.a;var b=$u(this);a.a=b;Vu(a,!0);a=oa(V,this.g,"html5-progress-magnifier-hover");this.ma=H(a,0)}this.b&&this.b.show();$o(this.za,this.g,"move",this.qn);$o(this.za,this.g,"out",this.Kt)}};function av(a){a.A=!1;I(a.ma);W(a.g,"html5-progress-magnifier-hover");var b=Jr(a.a.N());a.ma=H(v(function(){this.a.hide();Xn(this.ga)},a),b)}
f.Kt=function(a){this.I||a.relatedTarget&&!(this.b&&ed(this.b.Gb,a.relatedTarget)||!ed(this.g,a.relatedTarget))||bv(this)};
f.qn=function(a){var b=new A(wf(a),xf(a));if(this.a&&this.a.a)if(this.I)this.A?this.O=b:this.P=b;else{var c=Id(this.a.N());if(c.contains(b))this.O=b,this.A=!0;else{var d=Id(this.Q),e=this.fa.y-xf(a);if(wf(a)>=c.left&&xf(a)>=c.top&&wf(a)<c.left+c.width||d.contains(b)){c=6*e-6;if(wf(a)>=this.fa.x-c&&wf(a)<=this.fa.x+c)return;this.A=!1;this.fa=this.P=b}else{bv(this);return}}}else this.P=b;cv(this)};
function cv(a){if(a.a&&a.a.a){var b=Id(a.a.N());if(a.I&&a.A){var c=b.left,b=c+b.width;a.j=c>a.O.x?a.O.x-c:b<a.O.x?a.O.x-b:0}c=a.a;b=$u(a);c.a=b;Vu(c,!0);var d=a.a,c=Tu(d),b=Uu(d),d=d.N().offsetWidth,e=b.position-d/2,c=new Ru(c.position,d,c.a-e,c.i-(b.width-e-d)),b=Math.max(c.width/c.b,0.015);a.ga.style.left=Math.round(1E3*((c.width/2-c.a)/c.b-b/2))/10+"%";a.ga.style.width=Math.round(1E3*b)/10+"%"}a.b&&(c=a.b,a=dv(a),c.gi||(b=c.Gb.offsetWidth/2,d=new Ru(a.position,a.width,b,b),c.Gb.style.left=d.position-
b+"px",b=c.Ih.offsetWidth/2,d=new Ru(a.position,a.width,b,b),c.Ih.style.left=d.position-c.Gb.offsetLeft-b+"px",fd(c.rj,Sn(a.td*c.Oe)),c.Ig&&(a=el(c.Ig,a.td),a!=c.a&&(c.a=a,Xu(c)))))}f.Vw=function(){var a;if(0>this.j)a=0.15*this.j-0.1,this.j-=a,0<this.j&&(this.j=0);else if(0<this.j)a=0.15*this.j+0.1,this.j-=a,0>this.j&&(this.j=0);else return;var b=yd(this.g).x;this.P.x=yb(this.P.x+a,b,b+$u(this).width);cv(this);a=dv(this);ev(this,a.td,this.ja);this.u("seekto",a.td*this.B,!1)};
function bv(a){a.za.removeAll();a.b&&a.b.hide();a.a&&a.a.a&&(a.a.disable(),av(a));a.Ua=$o(a.k,a.i,"over",a.jn)}f.Av=function(a){a.stopPropagation();a.preventDefault();this.b&&this.b.hide();this.a&&this.a.a&&av(this);fv(this);this.Qh(a)};f.lt=function(a){a.stopPropagation();a.preventDefault();this.A=!0;fv(this);this.Qh(a)};function fv(a){a.I=!0;a.u("beginseeking");$o(a.Da,document,"move",a.Qh);$o(a.Da,document,"up",a.Ww);a.A&&(a.Ma=mf(v(a.Vw,a),20))}
f.Ww=function(a){a.stopPropagation();this.I=!1;this.Da.removeAll();nf(this.Ma);bv(this);this.u("endseeking")};f.Qh=function(a){a.stopPropagation();a.preventDefault();this.qn(a);a=this.A?dv(this):$u(this);var b=a.td*this.B;ev(this,a.td,this.ja);(b<this.ia||b>this.aa)&&this.kl();this.u("seekto",b,!this.I)};function dv(a){return a.a&&a.a.a?a.A?Tu(a.a,a.O.x-yd(a.g).x):Tu(a.a):$u(a)}function $u(a){return new Ru(a.P.x-yd(a.g).x,a.Q.clientWidth,a.pa.clientWidth/2,a.pa.clientWidth/2)}
function gv(a,b,c){ev(a,q(b)&&!a.I?b:a.ya,q(c)?c:a.ja)}function ev(a,b,c){a.ya=b;var d=Math.round(1E3*b)/10;pd(a.ib,"transform","scalex("+b+")");a.pa.style.left=d+"%";a.ja=Math.max(a.ya,c);pd(a.Na,"transform","scalex("+a.ja+")");a.a&&(a=a.a,a.B=b,a.F=c,Vu(a,!1))}f.Xa=function(a){this.B=a;hv(this);this.a&&this.a.Xa(a)};
function hv(a){var b=0<a.ia,c=0<a.B&&a.aa<a.B;X(a.G,"html5-clip-enabled",b);X(a.U,"html5-clip-enabled",b);X(a.L,"html5-clip-enabled",c);X(a.X,"html5-clip-enabled",c);b&&(a.G.style.left=100*a.ia/a.B+"%",a.U.style.width=a.G.style.left);c&&(b=Math.min(100,100*a.aa/a.B),a.L.style.left=b+"%",a.X.style.left=b+"%",a.X.style.width=100-b+"%")}f.$o=function(){V(this.g,"html5-clip-marker-hover")};f.Zo=function(){W(this.g,"html5-clip-marker-hover")};
f.kl=function(a){a&&a.stopPropagation();this.ia=0;hv(this);this.aa=Infinity;hv(this)};function iv(a,b){b=yb(Math.round(100*b),0,100);if(!a.J[b]){var c=document.createElement("div");c.style.left=b+"%";Tm(c,["html5-ad-progress","html5-progress-section"]);a.va.appendChild(c);a.J[b]=c}}function jv(a,b){b=yb(Math.round(100*b),0,100);a.J[b]&&(F(a.J[b]),a.J[b]=null)}
f.H=function(){I(this.ma);nf(this.Ma);this.k.removeAll();this.za.removeAll();this.Da.removeAll();this.va=null;this.J={};this.pa=this.Sa=this.Q=this.i=this.ib=this.Na=this.g=this.G=this.X=this.U=this.L=null;Yu.C.H.call(this)};function kv(a,b,c){Y.call(this,["div","ytp-drop-down","{{content}}"]);this.F=a;this.g=!1;this.k=0;this.a=new Y(["div","ytp-drop-down-menu","{{content}}"]);L(this,this.a);this.b=new Jn(this.F,"ytp-drop-down-label");L(this,this.b);this.listen(this.b,"click",this.B);this.i=new Y(["div","ytp-drop-down-label-content","{{content}}"]);L(this,this.i);this.b.Aa([this.i,["div","ytp-drop-down-arrow"]]);this.Aa([this.a,this.b]);this.stopPropagation("click");q(b)&&this.Ib(b);q(c)&&(this.a.Aa(c),lv(this));lv(this)}
y(kv,Y);kv.prototype.Ib=function(a){this.i.Aa(a);lv(this)};kv.prototype.o=function(){this.g=!1;lv(this)};kv.prototype.B=function(){this.g=!this.g;lv(this)};function mv(a,b){b>a.k&&(a.k=b,a.element.style.minWidth=a.k+"px")}function lv(a){a.g?(a.a.show(),a.listen(window,"blur",a.o,a,"menu"),a.listen(document,"click",a.o,a,"menu")):(a.a.hide(),vn(a,"menu"));var b=Gd(a.b.N());a.a.N().style.bottom=b.height-1+"px";mv(a,b.width)}kv.prototype.H=function(){this.F=null;kv.C.H.call(this)};function nv(a){Jn.call(this,a,"ytp-drop-down-menu-button");this.i=new Y(["div","ytp-drop-down-menu-button-check"]);L(this,this.i)}y(nv,Jn);nv.prototype.Aa=function(a){nv.C.Aa.call(this,[this.i,a])};nv.prototype.Za=function(a){X(this.element,"ytp-drop-down-menu-button-selected",a)};function ov(a){Y.call(this,["span"]);this.element.innerHTML=a}y(ov,Y);function pv(a){Ds.call(this);this.g=a;this.b={};this.j=new Y(["div","ytp-menu-drop-down-content"]);L(this,this.j);this.a="auto";this.i=!0;this.label=this.g.getMsg("YTP_QUALITY_TITLE");this.element=new kv(a,void 0,this.j);L(this,this.element);mv(this.element,100);qv(this,this.a,this.a);this.priority=-1}y(pv,Ds);function rv(a,b){sv(a);z(b,function(a){var b=new nv(this.g);b.Aa(new ov(tv(this,a)));b.V(this.j.N());this.b[a]=b;J(b,"click",v(this.k,this,a))},a);a.b[a.a]&&a.b[a.a].Za(!0)}
pv.prototype.Re=function(){return this.a};function qv(a,b,c){a.a&&a.b[a.a]&&a.b[a.a].Za(!1);a.a=b;a.b[a.a]&&a.b[a.a].Za(!0);a.i="auto"==c;a.i&&c!=b?a.element.Ib(uv(a,b)):a.element.Ib(new ov(tv(a,c)))}function tv(a,b){return a.g.getMsg("YTP_QUALITY_"+b.toUpperCase())}function uv(a,b){var c=a.g.getMsg("YTP_QUALITY_AUTO_WITH_QUALITY",{video_quality:tv(a,b)});return new ov(c)}function sv(a){Jb(a.b,function(a){Xg(a)});a.b={}}
pv.prototype.k=function(a){this.element.o();this.i&&"auto"==a||(qv(this,a,a),If(this.element,"change"))};pv.prototype.H=function(){sv(this);this.g=null;pv.C.H.call(this)};function vv(a){Jt.call(this,a,"ytp-settings-button",a.getMsg("YTP_TOOLTIP_SETTINGS"),"ytp-settings-button-active");Mn(this,10);this.i=new Y(["div","ytp-settings-hd-quality-badge"]);L(this,this.i);this.Aa(this.i);this.i.hide()}y(vv,Jt);function wv(a){Ds.call(this);this.label=a.getMsg("YTP_PLAYER_SIZE_TITLE");this.element=new Es(a,["ytp-size-control-small","ytp-size-control-large"],!0);L(this,this.element);this.priority=0}y(wv,Ds);wv.prototype.getSelected=function(){return this.element.getSelected()};wv.prototype.Za=function(a){this.element.Za(a)};function xv(a){Ds.call(this);this.g=a;this.a={};this.b=1;this.i=new Y(["div","ytp-menu-drop-down-content"]);L(this,this.i);this.label=this.g.getMsg("YTP_PLAYER_SPEED_TITLE");this.element=new kv(a,void 0,this.i);L(this,this.element);mv(this.element,100);this.priority=1}y(xv,Ds);function yv(a,b){zv(a);z(b,function(a){var b=new nv(this.g);b.Aa(Av(this,a));b.V(this.i.N());this.a[a]=b;J(b,"click",v(this.j,this,a))},a);a.a[a.b]&&a.a[a.b].Za(!0)}
function Bv(a,b){a.b&&a.a[a.b]&&a.a[a.b].Za(!1);a.b=b;a.a[a.b]&&a.a[a.b].Za(!0);a.element.Ib(Av(a,b))}function Av(a,b){return 1==b?a.g.getMsg("YTP_PLAYER_SPEED_NORMAL"):b.toString()}function zv(a){Jb(a.a,function(a){Xg(a)});a.a={}}xv.prototype.j=function(a){this.element.o();Bv(this,a);If(this.element,"change")};xv.prototype.H=function(){zv(this);this.g=null;xv.C.H.call(this)};function Cv(){Y.call(this,["div",["ytp-time-display","html5-control"],["span","ytp-time-current","{{current}}"],["span","ytp-time-separator"," / "],["span","ytp-time-duration","{{duration}}"],["span","ytp-time-live-badge","Live"]]);this.a=this.template.a["ytp-time-live-badge"]}y(Cv,Y);Cv.prototype.Xa=function(a){rn(this.template,"duration",Sn(a))};Cv.prototype.H=function(){this.a=null;Cv.C.H.call(this)};function Dv(a){R.call(this);this.j=a;this.a=new Zo(this);this.O=new Zo(this);this.B=null;this.A={};this.G={};this.J=this.I=this.i=this.g=this.b=null;this.L=new Zo(this)}y(Dv,R);f=Dv.prototype;f.nf=null;f.wc=null;f.Fe=null;f.uj=null;f.Sd=null;f.tc=null;f.lf=null;f.Wb=null;f.kg=null;f.Pd=null;f.ve=null;f.Eh=null;f.nd=null;f.mf=null;f.we=null;f.Bn=!1;f.jg=null;f.vb=null;
function Ev(a,b){a.nf=b;var c=E("html5-player-chrome",b);a.wc=new Ku(a.j);a.wc.V(c,0);L(a,a.wc);new xu(a.wc.N(),v(a.Ut,a),!1,function(){return!0});a.Fe=new Mu(a.j);a.Fe.V(c,1);L(a,a.Fe);a.a.listen(a.Fe.a,"click",oa(a.u,"nextvideo"));a.a.listen(a.Fe.b,"click",oa(a.u,"previousvideo"));var d=E("html5-progress-bar-container",b);a.uj=new Yu(a.j);Zu(a.uj,d);a.k=new Cv;a.k.V(c,4);L(a,a.k);a.a.listen(a.k.a,"click",oa(a.u,"seekto",Infinity));a.Sd=E("html5-volume-control",b);a.a.listen(a.Sd,"keydown",a.Vt);
a.tc=E("html5-volume-button",a.Sd);a.a.listen(a.tc,"click",a.En);a.lf=E("html5-volume-panel",a.Sd);a.Wb=E("html5-volume-slider",a.Sd);$o(a.a,a.Wb,"down",a.Rt);a.kg=E("html5-volume-slider-foreground",a.Sd);a.Eh=E("html5-threed-popup-menu",b);a.ve=E("html5-small-player-button",b);a.a.listen(a.ve,"click",a.Dn);a.Pd=E("html5-large-player-button",b);a.a.listen(a.Pd,"click",a.Dn);a.o=new Gu(a.j);a.o.V(c,7);L(a,a.o);a.a.listen(a.o,"click",a.Qt);a.nd=E("html5-quality-button",b);a.we=E("html5-quality-popup-menu",
a.nd);ap(a.a,a.we,a.Ot);a.mf=E("html5-speed-popup-menu",a.nd);ap(a.a,a.mf,a.Pt);a.vb=E("html5-watch-later-button",b);a.a.listen(a.vb,"click",a.St);a.vb&&ku(a.j,a.vb,a.j.getMsg("YTP_TOOLTIP_WATCH_LATER"),!0);a.jg=E("html5-watch-on-youtube-button",b);a.a.listen(a.jg,"click",a.Tt)}f.disable=function(a){Fv(this,a,!0)};f.enable=function(a){Fv(this,a,!1)};
function Fv(a,b,c){for(var d=0;d<b.length;d++)switch(b[d]){case "audio":X(a.nf,"disabled-control-audio",c);break;case "play_pause":var e=a.wc;c?e.disable():e.enable();break;case "seek":X(a.nf,"disabled-control-seek",c)}}function Gv(a,b){if(a.b)rv(a.b,b),b.length?Hv(a,a.b):Iv(a,a.b);else{var c=Pc("yt-uix-button-menu-item",a.we);z(c,function(a){a.style.display="none";for(var c=0,g=b.length;c<g;c++)G(a,"value")==b[c]&&(a.style.display="list-item")},a);c=!!b.length;Un(a.we,c);Un(a.nd,c)}}
f.Vt=function(a){var b=a.keyCode;if(32==b||13==b)this.En(),a.preventDefault()};f.Xa=function(a){this.k.Xa(a)};function Jv(a,b,c){a.b?(qv(a.b,b,c),c=a.B,0==b.indexOf("hd")||"highres"==b?c.i.show():c.i.hide()):a.we&&(a=a.we,Kv(a,"active",b),Kv(a,"selected",c||b))}function Kv(a,b,c){var d=E("yt-uix-button-menu-item."+b,a);d&&W(d,b);a=a.querySelector(".yt-uix-button-menu-item"+('[data-value="'+c+'"]'));V(a,b)}f.En=function(){this.u("mutetoggled")};
function Lv(a,b){if(b){if(a.Bn){var c=a.wc;Ln(c,"ytp-button-stop");var d=c.g.getMsg("YTP_BUTTON_STOP")}else c=a.wc,Ln(c,"ytp-button-pause"),d=c.g.getMsg("YTP_BUTTON_PAUSE");c.Ib(d);c.a=d}else Lu(a.wc)}f.Ut=function(){this.u("playpausetoggled")};f.Rt=function(a){this.u("beginvolume");V(this.tc,"changing");var b=this.Wb.clientWidth;a=100*(Ad(a,this.Wb).x/b);Mv(this,a);$o(this.O,document,"move",this.ix);$o(this.O,document,"up",this.jx)};
f.ix=function(a){var b=this.Wb.clientWidth,b=100*(Ad(a,this.Wb).x/b);Mv(this,b);a.preventDefault()};function Mv(a,b){var c={volume:yb(b,0,100),muted:!1};a.u("volumechanged",c)}f.jx=function(){W(this.tc,"changing");this.O.removeAll();this.u("endvolume")};f.Dn=function(a){this.u("sizechangerequested",a.currentTarget==this.Pd)};f.Ot=function(a){a=G(a.currentTarget,"value");this.u("qualitychanged",a)};f.Qt=function(){this.u("fullscreentoggled")};
function Nv(a,b){if(a.i)Bv(a.i,parseFloat(b));else if(a.mf){var c=a.mf;Kv(c,"active",b);Kv(c,"selected",b)}}function Hv(a,b){var c=a.G.__default__;c&&c.add(b)}function Iv(a,b){var c=a.G.__default__;c&&c.remove(b)}function Ov(a,b,c,d){a.A[b]||(a.A[b]=c,d=d||a.B.N(),d.parentNode&&d.parentNode.insertBefore(c.N(),d.nextSibling),c.listen(c,"click",oa(a.Uw,b),a,"menuButtonClick"),c=new Iu,L(a,c),c.hide(),c.V(a.nf),a.G[b]=c)}
f.Pt=function(a){a=G(a.currentTarget,"value");this.u("speedchanged",parseFloat(a));Nv(this,a)};f.St=function(){Sm(this.vb,"html5-async-progress")||(wu(this.vb,"html5-async-progress"),this.u("watchlater"))};f.Tt=function(){this.u("watchonyoutube")};f.zg=function(){this.L.removeAll();this.I&&(this.I.hide(),this.I=null);this.J&&(Mt(this.J),this.J=null)};
f.Uw=function(a,b){b.stopPropagation();var c=this.A[a];if(c)if(c.b)this.zg();else{var d=this.G[a];this.zg();this.I=d;this.I.show();c&&(this.J=c,Lt(this.J));this.L.listen(window,"blur",this.zg);this.L.listen(document,"click",this.zg)}};f.nr=function(){this.u("qualitychanged",this.b.Re())};f.or=function(){this.u("sizechangerequested",1==this.g.getSelected())};f.pr=function(){this.u("speedchanged",this.i.b)};
f.mr=function(a){var b=a.target,c="unknown",c=b==this.wc.N()?"playpause":b==this.tc||b==this.lf||b==this.Wb||b==this.Sd||b==this.kg?"volume":b==this.k?"time":b==this.nd?"settings":b==this.B?"settings-redesign":b==this.vb?"watchlater":b==this.jg?"youtube":b==this.o.N()?"fullscreen":b==this.ve||b==this.Pd?"size":a.target;this.u("controlclick",c)};
f.H=function(){this.a.removeAll();this.O.removeAll();this.L.removeAll();this.zg();this.vb=this.jg=this.nd=this.Eh=this.we=this.mf=this.ve=this.Pd=this.kg=this.Wb=this.lf=this.tc=this.Sd=this.nf=null;for(var a in this.A){var b=this.A[a];b.Eg();vn(b,"menuButtonClick")}this.A={};this.G={};this.B=this.i=this.g=this.b=null;Dv.C.H.call(this)};var Pv=["left","right","center"],Qv={id:0,priority:0,hi:7,ii:50,uy:80,de:95,Bd:15,qk:100,isVisible:!0,textAlign:Pv[2],Ke:0,backgroundColor:"#080808",fi:"#fff",my:1,Fl:1},Rv={id:99,priority:1,hi:0,ii:5,de:7,Bd:2,qk:32,textAlign:Pv[0]},Sv=["CA","MX","US"];function Tv(a){a=a||Qv;w(this,a)}f=Tv.prototype;f.hi=7;f.ii=50;f.de=95;f.uy=80;f.Ke=0;f.textAlign="center";f.backgroundColor="#080808";f.fi="#fff";f.my=1;f.Fl=1;f.Bd=15;f.qk=32;f.isVisible=!0;f.fontFamily='"Arial Unicode Ms", Arial';f.px="100%";function Uv(a,b){this.id=a;this.ra=new Tv(b);var c="caption-window";0==this.id&&(c="standard-caption-window");this.oa=Wc("div",{id:"caption-window-"+this.id,"class":c});this.Db=Wc("span",{"class":"captions-text",style:"visibility: hidden"});this.Db.innerHTML="C";this.la=Wc("span",{"class":"captions-text",tabindex:"4","aria-live":"assertive"});this.Xi=Wc("div",{"class":"caption-window-transform"});this.Xi.appendChild(this.la);this.oa.appendChild(this.Xi)}f=Uv.prototype;f.id=0;f.ra=null;f.bh="";
f.Gc=null;f.oa=null;f.Xi=null;f.la=null;f.Db=null;f.type=1;f.getType=function(){return this.type};f.Si=function(){var a;this.Db.style.fontFamily=this.la.style.fontFamily;this.oa.appendChild(this.Db);a=this.Db.offsetHeight;this.oa.removeChild(this.Db);return a};f.Sf=function(){this.la&&(0!=this.id&&(Fd(this.oa,"100%"),Fd(this.oa,this.la.offsetWidth)),Vv(this),Un(this.oa,this.ra.isVisible))};
function Vv(a){td(a.oa,a.ra.ii+"%",a.ra.de+"%");for(var b=0;8>=b;b++)W(a.oa,"anchor-point-"+b);V(a.oa,"anchor-point-"+a.ra.hi)}f.Ro=function(a){var b=[];z(a,function(a){a.Wi?b[b.length-1]+=a.ce:b.push(a.ce)});this.Te(b.join("\n"));this.Gc=a};f.Te=function(a){this.bh=a=Wv(a);this.la.innerHTML=this.bh;this.Gl();this.Sf()};
f.Gl=function(){this.oa.style.textAlign=this.ra.textAlign;this.la.style.backgroundColor=this.ra.backgroundColor;this.la.style.color=this.ra.fi;this.la.style.opacity=this.ra.Fl;this.la.style.fontFamily=this.ra.fontFamily;this.la.style.fontSize=this.ra.px;1==this.ra.Ke?this.la.setAttribute("dir","rtl"):this.la.removeAttribute("dir")};f.toString=function(){var a="Caption window ("+this.id+"): "+this.bh,b;for(b in this.ra)a+=b+" "+this.ra[b]+" | ";return a};
function Wv(a){a=a.split("\n");for(var b=0,c=a.length;b<c;b++)a[b]=a[b]?"&nbsp;"+a[b]+"&nbsp;":"";return a.join("<br>")}f.Zi=function(){this.Gc=[];this.Te("")};function Xv(a,b){Uv.call(this,a,b);this.la.style.display="block";this.la.style.padding="0";this.Qb=[];var c=this.la;W(c,"captions-text");V(c,"caption-painton-text-rows")}y(Xv,Uv);f=Xv.prototype;f.type=0;f.$n="";f.ah=!1;f.Ab=null;f.Qb=null;f.Si=function(){return this.Qb[0]?this.Qb[0].offsetHeight:0};function Yv(a){return a.Qb.reduce(function(a,c){return Math.max(a,c.offsetWidth)},0)}
f.Sf=function(){0!=this.id&&(Fd(this.oa,"100%"),Fd(this.oa,this.ah?Yv(this):this.Ab.width));var a=Math.round(this.ra.Bd*this.Si());pd(this.oa,"max-height",a+"px");Vv(this);Un(this.oa,this.ra.isVisible)};
f.Te=function(a){this.Zi();a=Wv(a);this.ah||(this.bh=a);a=a.split("<br>");for(var b=0,c=a.length;b<c;b++)if(a[b]){var d=Wc("div",{"class":"caption-row-holder"}),e=Wc("span",{"class":"caption-row captions-text"});d.appendChild(e);e.innerHTML=a[b];this.ah||(this.la.style.height=this.Ab.height+"px",this.la.style.width=this.Ab.width+"px",d.style.position="absolute",d.style.top=this.Ab.Zn[b]+"px",d.style.left=this.Ab.Yn[b]+"px");this.la.appendChild(d);this.Qb.push(e)}this.Gl();this.Sf()};
f.Zi=function(){for(var a=0,b=this.Qb.length;a<b;a++){var c=ld(this.Qb[a],"caption-row-holder");F(c)}this.Qb=[]};f.Gl=function(){this.oa.style.textAlign=this.ra.textAlign;for(var a=0,b=this.Qb.length;a<b;a++)this.Qb[a].style.backgroundColor=this.ra.backgroundColor;this.la.style.color=this.ra.fi;this.la.style.opacity=this.ra.Fl;this.la.style.fontFamily=this.ra.fontFamily;1==this.ra.Ke?this.la.setAttribute("dir","rtl"):this.la.removeAttribute("dir")};function Zv(a,b){Uv.call(this,a,b);this.Gc=[];this.ke=[];this.Cb=[];this.Tf=new Ji(433);this.Tf.stop();J(this.Tf,"tick",v(this.ux,this))}y(Zv,Uv);f=Zv.prototype;f.type=2;f.rx=32;f.Cb=null;f.le=0;f.ke=null;f.Tf=null;f.Sf=function(){Fd(this.oa,"100%");var a=this.oa.offsetWidth,a=Math.min($v(this),a);Fd(this.oa,a+"px");Fd(this.Xi,"100%");this.la.style.whiteSpace="nowrap";Vv(this);Un(this.oa,this.ra.isVisible)};
f.Ro=function(a){var b=a.length;if(0>=b)this.Zi();else{for(var c=0;c<b&&0<=this.Gc.indexOf(a[c]);)c++;this.Gc=this.Gc.concat(a.slice(c));aw(this)}};f.Zi=function(){this.Gc=[];this.Cb=[];this.le=0;this.Cb=[];this.ke=[];bw(this)};
function aw(a){if(!cw(a))if(a.le>=a.Gc.length)bw(a);else{var b=a.Cb.length-1;0>b&&(a.ke.push(0),a.le=0,a.Cb.push(""),b=0);for(var c=a.Gc.length,d=a.le;d<c;d++){var e=a.Gc[d];if("\n"==e.ce){a.le++;a.ke[b]++;break}if(e.Wi||0==a.Cb[b].length)a.Cb[b]+=e.ce,a.le++,a.ke[b]++;else break}bw(a);d<c&&!cw(a)&&(b=a.Si(),V(a.la,"caption-rollup"),a.oa.style.overflow="hidden",a.la.style.top=-b+"px",a.Tf.start())}}function cw(a){return a.Tf.Uc||Sm(a.la,"caption-rollup")}
f.ux=function(){this.oa.style.overflow="visible";this.la.style.top=0;this.Tf.stop();W(this.la,"caption-rollup");this.Cb.push("");this.ke.push(0);aw(this)};function bw(a){if(!cw(a)){for(;a.Cb.length<a.ra.Bd;)a.Cb.unshift(""),a.ke.unshift(0);for(;a.Cb.length>a.ra.Bd;){a.Cb.shift();var b=a.ke.shift();0<b&&(a.le-=b,a.Gc.splice(0,b))}a.Te(a.Cb.join("\n"))}}
function $v(a){a.Db.style.fontFamily=a.la.style.fontFamily;a.Db.style.fontSize=a.la.style.fontSize;a.la.appendChild(a.Db);a.Db.innerHTML="\u2014";var b=a.Db.offsetWidth;a.Db.innerHTML="&nbsp;";b=2*a.Db.offsetWidth+b*a.rx;a.la.removeChild(a.Db);return b};function dw(a){this.a=a.pk;this.i=a.priority;this.Dc=a.Dc||this.Dc}dw.prototype.a=0;dw.prototype.i=0;dw.prototype.Dc=0;dw.prototype.toString=function(){return this.a+", "+this.Dc};function ew(a){dw.call(this,a);this.ce=a.text||this.ce;this.Zh=a.windowId||this.Zh;this.Wi=a.params.append||this.Wi;this.Mp=a.params.row||this.Mp;this.Lp=a.params.tx||this.Lp}y(ew,dw);f=ew.prototype;f.ce="";f.Wi=!1;f.Mp=0;f.Lp=0;f.Zh=0;f.toString=function(){return this.a+", "+this.Dc+": "+this.ce};
function fw(a){var b=a.firstChild&&a.firstChild.nodeValue||"",c=1E3*parseFloat(a.getAttribute("start")||0);a.getAttribute("t")&&(c=parseInt(a.getAttribute("t"),10));var d=1E3*parseFloat(a.getAttribute("dur")||0);a.getAttribute("d")&&(d=parseFloat(a.getAttribute("d")));var e=parseInt(a.getAttribute("w"),10)||0,b={pk:c,Dc:d,text:b,windowId:e,priority:5,params:{}};a.getAttribute("r")&&(b.params.row=parseInt(a.getAttribute("r"),10));a.getAttribute("c")&&(b.params.tx=parseInt(a.getAttribute("c"),10));
a.getAttribute("append")&&(b.priority=6,b.params.append=!0);return new ew(b)}function gw(a){dw.call(this,a);this.id=a.windowId||this.id;this.params=a.params}y(gw,dw);gw.prototype.id=0;gw.prototype.params=null;gw.prototype.g="";gw.prototype.b=!1;function hw(){return new gw({pk:-2147483648,Dc:4294967295,params:Qv})};function iw(a){if("undefined"!=typeof DOMParser)return(new DOMParser).parseFromString(a,"application/xml");if("undefined"!=typeof ActiveXObject){var b=new ActiveXObject("MSXML2.DOMDocument");if(b){b.resolveExternals=!1;b.validateOnParse=!1;try{b.setProperty("ProhibitDTD",!0),b.setProperty("MaxXMLSize",2048),b.setProperty("MaxElementDepth",256)}catch(c){}}b.loadXML(a);return b}throw Error("Your browser does not support loading xml documents");};function jw(a){this.b=[];this.g=[];this.a={};if(a&&(a=iw(a))&&a.firstChild)switch(this.i=a,this.i.firstChild.tagName){case "timedtext":a=this.i.firstChild.childNodes;for(var b=0,c=a.length;b<c;b++)switch(a[b].tagName){case "window":var d=a[b],e=parseInt(d.getAttribute("id"),10),g=void 0;t:{var h=this.a[e];if(d.getAttribute("t")||d.getAttribute("start")){g=parseInt(d.getAttribute("t"),10);d.getAttribute("start")&&(g=1E3*parseFloat(d.getAttribute("start")));h&&(h.a+h.Dc>=g?h.Dc=g:h=null);switch(d.getAttribute("op")){case "kill":g=
null;break t;case "define":h=null}h?h.j=!0:h=hw();var k={};w(k,h?h.params:Qv);d.getAttribute("id")&&(k.id=d.getAttribute("id"));d.getAttribute("op")&&(k.wy=d.getAttribute("op"));d.getAttribute("rc")&&(k.Bd=parseInt(d.getAttribute("rc"),10));d.getAttribute("cc")&&(k.qk=parseInt(d.getAttribute("cc"),10));d.getAttribute("ap")&&(h=parseInt(d.getAttribute("ap"),10),k.hi=0>h||8<h?7:h);d.getAttribute("ah")&&(k.ii=parseInt(d.getAttribute("ah"),10));d.getAttribute("av")&&(k.de=parseInt(d.getAttribute("av"),
10));d.getAttribute("id")&&(k.id=parseInt(d.getAttribute("id"),10)||0);d.getAttribute("vs")&&(k.isVisible=Boolean(d.getAttribute("vs")));d.getAttribute("ju")&&(k.textAlign=Pv[parseInt(d.getAttribute("ju"),10)]);d.getAttribute("pd")&&(k.Ke=1,0==parseInt(d.getAttribute("pd"),10)&&(k.Ke=0));d.getAttribute("bc")&&(k.backgroundColor=parseInt(d.getAttribute("bc"),16));d.getAttribute("bo")&&(k.opacity=parseInt(d.getAttribute("bo"),10)/100);d.getAttribute("fc")&&(k.fi=parseInt(d.getAttribute("fc"),16));d.getAttribute("sd")&&
(k.kk=parseInt(d.getAttribute("sd"),10));h=parseInt(d.getAttribute("d"),10)||1E3*parseFloat(d.getAttribute("dur"))||2147483647;d={pk:g,Dc:h,params:k,windowId:parseInt(d.getAttribute("id"),10)};g=new gw(d)}else g=null}this.a[e]=g;this.g.push(g);break;case "text":e=fw(a[b]),this.b.push(e),d=e.Zh,this.a[d]&&(d=this.a[d],e=e.ce,""!=d.g&&(d.b=!0),d.g+=e)}break;default:for(this.g.push(hw()),a=this.i.firstChild.childNodes,b=0,c=a.length;b<c;b++)e=fw(a[b]),this.b.push(e)}}jw.prototype.b=null;
jw.prototype.g=null;jw.prototype.a=null;function kw(a){this.a=a.languageCode;this.b=a.languageName||null;this.g=a.languageOriginal||null;this.id=a.id||null;this.i=a.is_default||!1};function lw(a){a=a||{};this.Hk=a.format;this.b=a.languageCode||"";this.Yg=a.languageName;this.Lb=a.kind||"";this.gc=a.name;this.Ba=a.id;this.Bk=a.is_servable;this.mi=a.is_default;this.ni=a.is_translateable;a.translationLanguage&&(this.a=new kw(a.translationLanguage))}
function mw(a){var b={format:a.Hk,languageCode:a.b,languageName:a.Yg,displayName:nw(a),kind:a.Lb,name:a.gc,id:a.Ba,is_servable:a.Bk,is_default:a.mi,is_translateable:a.ni};a.a&&(b.translationLanguage={languageCode:a.a.a,languageName:a.a.b,languageOriginal:a.a.g,id:a.a.id,is_default:a.a.i});return b}f=lw.prototype;f.Yg=null;f.Lb=null;f.gc=null;f.Ba=null;f.Bk=!1;f.mi=!1;f.ni=!1;f.Hk=1;
function nw(a){var b=[a.Yg];if("asr"==a.Lb){var c=qf("HTML5_SUBS_ASR");b.push(" (",c,")")}a.gc&&b.push(" - ",a.gc);a.a&&b.push(" >> ",a.a.b);return b.join("")}f.toString=function(){var a=[this.b,": ",this.gc," (",this.Lb,")"];this.a&&a.push(" >> ",this.a.a);return a.join("")};f.equals=function(a){if(!a)return!1;var b=this.a,c=a.a;if(b&&c){if(b.a!=c.a)return!1}else if(b||c)return!1;return this.b==a.b&&this.gc==a.gc&&this.Lb==a.Lb};function ow(){this.g=[];this.a=[]}ow.prototype.g=null;ow.prototype.a=null;ow.prototype.b=-1;function pw(a,b){return b?a.a.concat(a.g):a.a}function qw(a,b){switch(b.Lb){case "asr":return rw(b,a.g);default:if(b.mi||0>a.b)a.b=a.a.length;return rw(b,a.a)}}function rw(a,b){return Ra(b,v(a.equals,a))?!1:(b.push(a),!0)};function sw(a,b,c,d){this.Jd=a;c?this.Jd=Pj(this.Jd,{hl:c}):(a=Lj(this.Jd).hl||"",a=a.split("_").join("-"),this.Jd=Pj(this.Jd,{hl:a}));this.Ji=b;this.Ip=!!d;this.Hd=new ow;this.yi=[];this.Jp={}}f=sw.prototype;f.Jd="";f.Ji=null;f.Ip=!1;f.Hd=null;f.yi=null;f.Jp=null;function tw(a,b){return Ra(pw(a.Hd,!0),function(a){return a.toString()==b})}function uw(a,b){var c=a.Jd,d={v:a.Ji,type:"track",lang:b.b,name:b.gc,kind:b.Lb,fmt:b.Hk};b.a&&(d.tlang=b.a.a);return c=Pj(c,d)}
function vw(a,b,c){var d=uw(a,b);a=v(function(a){a=new jw(a.responseText);c(a,b)},a);Sj(d,a)}function ww(a){var b=a.Hd.b;a=pw(a.Hd,!0);return 0>b?null:a[b]}
function xw(a,b){var c=a.Jd,d={type:"list",tlangs:1,v:a.Ji,fmts:Number(!0)};a.Ip&&(d.asrs=1);c=Pj(c,d);d=v(function(a){if((a=a.responseXML)&&a.firstChild){for(var c=this.Hd,d=a.getElementsByTagName("track"),k=d.length,m=0;m<k;m++){var p=parseInt(d[m].getAttribute("formats"),10)||1,s=d[m].getAttribute("lang_code"),r=d[m].getAttribute("lang_translated"),D=d[m].getAttribute("name"),M=d[m].getAttribute("kind")||"",ta=d[m].getAttribute("id"),Z="true"==d[m].getAttribute("lang_default"),ZC="true"==d[m].getAttribute("cantran");
qw(c,new lw({format:p,languageCode:s,languageName:r,name:D,kind:M,id:ta,is_servable:!0,is_default:Z,is_translateable:ZC}))}a=a.getElementsByTagName("target");c=a.length;for(d=0;d<c;d++)k=a[d].getAttribute("lang_code"),m=a[d].getAttribute("lang_translated"),p=a[d].getAttribute("lang_original"),s=a[d].getAttribute("id"),r="true"==a[d].getAttribute("lang_default"),k={languageCode:k,languageName:m,languageOriginal:p,id:s,is_default:r},this.Jp[k.languageCode]=k.languageName,this.yi.push(new kw(k))}b()},
a);Sj(c,d)};function yw(a){Xm.call(this,a);var b=Q(a);this.Dd=a.K();this.Tn=a.app.S;this.ie=[];this.Ja={};this.be={};this.Me=[];this.i=E("captions-translation-select",b);this.Bl=E("captions-translation-dialog",b);this.Al=E("captions-settings-dialog",b);this.Zc=E("html5-captions-button",b);J(this.Zc,"click",v(this.ew,this));J(E("captions-translation-confirm",b),"click",v(this.mw,this));J(E("captions-translation-cancel",b),"click",v(this.Un,this));Ef(E("captions-settings-background-opacity",b),v(this.cw,this),
"INPUT");Ef(E("captions-settings-text-opacity",b),v(this.lw,this),"INPUT");Ef(E("captions-settings-window-opacity",b),v(this.ow,this),"INPUT");Ef(E("captions-settings-char-edge-style",b),v(this.fw,this),"SELECT");J(E("captions-settings-font-family",b),"change",v(this.jw,this));J(E("captions-settings-font-inc",b),"click",v(this.pp,this));J(E("captions-settings-font-dec",b),"click",v(this.np,this));J(E("captions-settings-confirm",b),"click",v(this.bw,this));J(E("captions-settings-cancel",b),"click",
v(this.kw,this));a=E("captions-settings-dialog",b);Gf(a,v(this.gw,this),"html5-color-picker-button");this.Zc&&(this.gd=E("html5-captions-tracks",this.Zc),this.zf=ns(bs.getInstance(),this.Zc),a=E("html5-captions-track-template",this.zf),this.mp=new ht(a,["track_id","track_display_name"]),Gf(this.zf,v(this.dw,this),"yt-uix-button-menu-item"));this.Nf=new Ji;this.Nf.stop();J(this.Nf,"tick",v(this.bl,this));this.D("onResize",v(this.Kn,this));this.D("onBackgroundChange",v(this.rw,this));this.D("onTextOpacityChange",
v(this.tw,this));this.D("onWindowOpacityChange",v(this.uw,this));this.D("onFontSizeIncrease",v(this.pp,this));this.D("onFontSizeDecrease",v(this.np,this));this.D("onShowControls",v(this.iw,this));this.D("onHideControls",v(this.hw,this));"detailpage"==this.Dd.Y&&(b=E("captions-account-settings-link",b))&&Wn(b);this.pi=new Uv(99,Rv);this.Zg=new Ji(2E3);this.Zg.stop();J(this.Zg,"tick",v(this.qw,this))}y(yw,Xm);f=yw.prototype;f.qa="captions";f.ed="cc";f.rl="subtitlesModuleData";f.Ai=!1;f.Ok=!1;f.ad=null;
f.Dd=null;f.Tn=null;f.Zc=null;f.zf=null;f.mp=null;f.Bl=null;f.Al=null;f.gd=null;f.Me=null;f.ie=null;f.Ja=null;f.be=null;f.Nf=null;f.pi=null;f.Zg=null;f.Ob=null;f.wi=!1;f.So=1;var zw={background:"#080808",backgroundOpacity:1,charEdgeStyle:"uniform",color:"#fff",fontFamily:'"Arial Unicode Ms", Arial',fontFamilyOption:"propSans",fontSizeIncrement:0,textOpacity:1,windowColor:"#080808",windowOpacity:0};f=yw.prototype;f.fc=null;f.Nn=!1;
f.create=function(){yw.C.create.call(this);this.ad=this.a.getVideoData();var a=this.a.K().U;-1==Sv.indexOf(a)&&V(Q(this.a),"cc-international");this.b=Qb(zw);w(this.b,dn(this,"display-settings"));1==this.Dd.a.cc_load_policy||1==this.ad.Fm||"alwayson"==Bm(this.ad,"yt:cc")?a=!0:(a=dn(this,"module-enabled"),a=null!=a?!!a:"on"==Bm(this.ad,"yt:cc")||this.Dd.a.cc_prefer_on);a&&this.load()};f.destroy=function(){this.unload();yw.C.destroy.call(this)};
f.load=function(){if(this.Ai)this.ba&&(yw.C.load.call(this),this.wi="alwayson"==Bm(this.ad,"yt:cc"),this.zf&&X(this.zf,"captions-always-on",this.wi),en(this,"module-enabled",!0),this.Ai=!1,Aw(this),this.Kn());else{this.Ai=!0;this.ba=!1;var a=this.ad.b.cc_lang_pref||this.Dd.a.cc_lang_pref||Bm(this.ad,"yt:cc_default_lang")||this.Dd.i,a=a&&a.split("_").join("-");this.Ob=new sw(this.ad.ji,this.ad.M,a,this.ad.uk);a=v(this.fo,this);xw(this.Ob,a)}};
f.unload=function(){this.Ac&&(Bw(this,!1),this.Bo("control_subtitles_set_track"));Cw(this);bn(this);en(this,"module-enabled",!1);this.Ai=!1;this.ba&&(this.ba=!1,yw.C.unload.call(this))};f.log_=function(){};function Dw(a,b){a.i&&(bd(a.i),z(b,function(a){var b=Zc("option");b.setAttribute("value",a.a);b.appendChild($c(a.b+" -- "+a.g));this.i.appendChild(b)},a))}
f.fo=function(){this.gd&&bd(this.gd);Dw(this,this.Ob.yi);var a=pw(this.Ob.Hd,!0);if(0<a.length){this.log_("Caption track list loaded, found "+a.length+" tracks.");z(a,function(a){if(a.Bk){var b=a.toString();a=nw(a);Ew(this,b,a)}},this);var b=this.Ob.Hd.b;(a=a[b]&&a[b].toString())&&Fw(this,a);this.Zc&&ms(bs.getInstance(),this.Zc);(a=ww(this.Ob))?(this.Ok=!0,Gw(this,a)):(this.ba||(this.ba=!0,this.load()),this.u("publish_external_event","onCaptionsTrackListChanged"))}else this.log_("No captions found."),
this.unload(),Xn(this.zf),Xn(this.Zc)};f.fv=function(a,b){var c=a.g.concat(a.b);this.log_("Caption track loaded with "+c.length+" events.");Cw(this);this.Me=cb(c);this.fc=b;this.Nn=vu.test(b.b);this.ba||(this.ba=!0,this.load());this.Ok&&(this.Ok=!1,this.u("publish_external_event","onCaptionsTrackListChanged"));c=Na(c,function(a,b){return new di(a.a,a.a+a.Dc,{id:"caption"+b})});this.uf.apply(this,c);this.Xn(b)};
f.Xn=function(a){var b={trackName:a.gc,trackKind:a.Lb};a.a?(b.trackLangCode=a.a.a,b.fromLangCode=a.b):b.trackLangCode=a.b;this.log(b);var b=this.pi,c=nw(a);c&&(c=c.replace(/<[^>]*>?/g,""),b.Te(c));$m(this,this.pi.oa);this.Zg.start();this.u("publish_external_event","captionschanged",mw(a))};f.yc=function(a){0==a.getId().indexOf("caption")&&(a=parseInt(a.getId().split("caption")[1],10),!isNaN(a)&&this.Me[a]&&(this.ie.push(this.Me[a]),this.Nf.start()))};
f.Xc=function(a){0==a.getId().indexOf("caption")&&(a=parseInt(a.getId().split("caption")[1],10),!isNaN(a)&&this.Me[a]&&(a=this.ie.indexOf(this.Me[a]),0<=a&&this.ie.splice(a,1),this.Nf.start()))};
function Hw(a,b){if(b instanceof gw){var c=a.Ja[b.id];w(b.params,a.b);c&&c.getType()!=(b.params.kk?2:b.b?0:1)&&(F(c.oa),delete a.Ja[b.id]);if(!a.Ja[b.id]){var c=a.Ja,d=b.id,e;t:{e=b.id;var g=b.params;switch(b.params.kk?2:b.b?0:1){case 0:e=new Xv(e,g);break t;case 2:e=new Zv(e,g);break t;default:e=new Uv(e,g)}}c[d]=e;c=a.Ja[b.id].oa;X(c,"captions-asr","asr"==a.fc.Lb);null!=b.params.Ke&&(b.params.Ke=a.Nn?1:0);0==a.Ja[b.id].id?(V(c,a.qa),Iw(a.a.app.S,c)):$m(a,c)}w(a.Ja[b.id].ra,b.params);if(0==(b.params.kk?
2:b.b?0:1)){c=a.Ja[b.id];c.$n=b.g;c.Ab={};c.ah=!0;c.Te(c.$n);c.Ab.Bd=c.Qb.length;c.Ab.width=c.oa.offsetWidth;c.Ab.height=c.oa.offsetHeight;c.Ab.Yn=[];c.Ab.Zn=[];for(d=0;d<c.Ab.Bd;d++)c.Ab.Zn.push(c.Qb[d].offsetTop),c.Ab.Yn.push(c.Qb[d].offsetLeft);c.ah=!1;c.Te(c.bh)}}else c=b.Zh,a.be[c]||(a.be[c]=[]),a.be[c].push(b)}f.Kn=function(){if(this.ba){bn(this);this.So=Jw(this.Dd).height/360;Aw(this);for(var a in this.Ja)this.Ja[a].Sf()}};
function Kw(a){var b=[],c;for(c in a.Ja){var d=a.Ja[c];d instanceof Xv&&b.push(a.Ja[c])}if(0!=b.length){b.sort(function(a,b){return b.ra.de-a.ra.de});c=Jw(a.Dd).height;var e=a.Ja[b[0].id].ra.de,g;for(g in b){d=a.Ja[b[g].id];d.ra.de=e;var h=Math.round(d.ra.Bd*d.Si()),e=e-Math.round(100*(h/c));d.Sf()}}}f.qw=function(){this.Zg.stop();F(this.pi.oa)};
f.bl=function(){this.Nf.stop();var a=this.ie.length,b;for(b in this.be)delete this.be[b];this.ie.sort(function(a,b){return a.a==b.a?a.i-b.i:a.a-b.a});for(var c=0;c<a;c++)Hw(this,this.ie[c]);for(b in this.Ja)this.be[b]?this.Ja[b].Ro(this.be[b]):(F(this.Ja[b].oa),delete this.Ja[b]);Kw(this);this.log_("Refreshing caption display...")};function Lw(a,b){var c=E(a).querySelectorAll("."+b+" input[type=radio]"),d=Ua(c,function(a){return a.checked}),d=(-1==d?1:d+1)%c.length;c[d].click()}
f.rw=function(){Lw("captions-settings-background-opacity","captions-settings-background-opacity-radio")};f.tw=function(){Lw("captions-settings-text-opacity","captions-settings-text-opacity-radio")};f.uw=function(){Lw("captions-settings-window-opacity","captions-settings-window-opacity-radio")};f.cw=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.backgroundOpacity=a,Aw(this))};f.lw=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.textOpacity=a,Aw(this))};
f.ow=function(a){a=parseFloat(a.target.getAttribute("value"));isNaN(a)||(this.b.windowOpacity=a,Aw(this))};f.fw=function(a){a.target&&(this.b.charEdgeStyle=a.target.value,Aw(this))};f.jw=function(a){a.target&&(this.b.fontFamilyOption=a.target.value,Aw(this))};f.iw=function(){var a=this.Ja[0];a&&a.oa&&(a=a.oa,W(a,"controls-hidden"),V(a,"controls-visible"))};f.hw=function(){var a=this.Ja[0];a&&a.oa&&(a=a.oa,Sm(a,"controls-visible")&&(W(a,"controls-visible"),V(a,"controls-hidden")))};
f.np=function(){Mw(this,-1)};f.pp=function(){Mw(this,1)};function Mw(a,b){a.b.fontSizeIncrement+=b;Aw(a)}function Nw(a,b){var c=E(b);c&&(c.querySelector('input[value="'+a.toFixed(1)+'"]').checked=!0)}function Ow(a,b,c){var d=E(b);d&&(b=d.querySelector("span.yt-uix-form-input-select-value"),d=d.querySelector("select"),d.value=a.b[c],fd(b,d.options[d.selectedIndex].text))}function Cw(a){Ym(a);a.ie=[];a.Me=[];a.fc=null;a.bl()}
function Gw(a,b){if(b)if(a.Ac)a.fc=b,Bw(a,!0),a.Bo("control_subtitles_set_track",mw(b));else if(a.Dd.bg){var c=a.Ob,d=a.Tn.b,e=v(a.Xn,a),g=c.Jd,c={v:c.Ji,type:"track",lang:b.b,name:b.gc,kind:b.Lb,fmt:"vtt"};b.a&&(c.tlang=b.a.a);var h=document.createElement("track");h.src=Pj(g,c);h.mode="showing";h.setAttribute("kind","captions");h.setAttribute("default","");d.appendChild(h);e(b)}else vw(a.Ob,b,v(a.fv,a))}f.ew=function(){this.ba?H(v(this.Gp,this),1):this.load()};
f.dw=function(a){a=a.currentTarget;var b=G(a,"action");if(b)switch(b){case "translate":this.wi||(bn(this),an(this),Wn(this.Bl));break;case "settings":bn(this);an(this);Pw(this);Wn(this.Al);break;case "captions-off":this.unload()}else(a=G(a,"trackid"))?(Fw(this,a),b=tw(this.Ob,a),Gw(this,b),this.log_("Caption change failed for "+a)):this.log_("onCaptionTrackClicked_ empty, ignoring")};
function Fw(a,b){if(a.gd){var c=E("yt-uix-button-menu-item.active",a.gd);c&&W(c,"active");if(c=a.gd.querySelector(".yt-uix-button-menu-item"+('[data-trackid="'+b+'"]')))V(c,"active"),a.Gp()}}f.Gp=function(){var a=E("yt-uix-button-menu-item.active",this.gd);if(a){var b=this.gd,c=C&&!wc(8)?0:b.offsetTop,d=a.offsetTop+a.offsetHeight-c-(b.clientHeight+b.scrollTop)+1;b.scrollTop+=Math.max(d,0);d=b.scrollTop-(a.offsetTop-c)+1;b.scrollTop-=Math.max(d,0)}};f.Un=function(){Xn(this.Bl)};
f.mw=function(){if(!this.wi){this.Un();var a;t:{var b=this.Ob.yi;for(a=0;a<b.length;a++){var c=b[a];if(c.a==this.i.value){a=c;break t}}a=null}a&&(c=this.fc,b=new lw,b.b=c.b,b.Yg=c.Yg,b.gc=c.gc,b.Lb=c.Lb,b.mi=!1,b.ni=c.ni,b.a=a,qw(this.Ob.Hd,b)&&(a=b.toString(),Ew(this,a,nw(b)),Fw(this,a),this.Zc&&ms(bs.getInstance(),this.Zc)),Gw(this,b))}};f.bw=function(){Xn(this.Al)};f.kw=function(){delete this.b;this.b=Qb(zw);en(this,"display-settings",this.b);Aw(this)};
function Aw(a){Qw(a);var b=op(a.b.background),c=a.b.backgroundOpacity;en(a,"display-settings",a.b);a.k=zn(".captions-text, .caption-row","background-color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Jb:a.k,reset:!0});Nw(c,"captions-settings-background-opacity");b=op(a.b.color);c=a.b.textOpacity;en(a,"display-settings",a.b);a.G=zn(".captions-text","color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Jb:a.G,reset:!0});Nw(c,"captions-settings-text-opacity");b=op(a.b.windowColor);c=
a.b.windowOpacity;en(a,"display-settings",a.b);a.J=zn(".caption-window-transform","background-color: rgba("+b[0]+","+b[1]+","+b[2]+","+c+") !important;",{Jb:a.J,reset:!0});Nw(c,"captions-settings-window-opacity");en(a,"display-settings",a.b);var b=a.b.charEdgeStyle,d=a.b.textOpacity;if("none"==b)An(a.j);else{var c="",e="rgba(34, 34, 34, "+d+")",d="rgba(204, 204, 204, "+d+")";switch(b){case "dropShadow":c="text-shadow: 2px 2px 3px "+e+", 2px 2px 4px "+e+", 2px 2px 5px "+e+";";break;case "raised":c=
"text-shadow: 1px 1px "+e+", 2px 2px "+e+", 3px 3px "+e+";";break;case "depressed":c="text-shadow: 1px 1px "+d+", 0 1px "+d+", -1px -1px "+e+", 0 -1px "+e+";";break;case "uniform":c="text-shadow: 0 0 4px "+e+", 0 0 4px "+e+", 0 0 4px "+e+", 0 0 4px "+e+";"}a.j=zn(".captions-text",c,{Jb:a.j,reset:!0})}Ow(a,"captions-settings-char-edge-style","charEdgeStyle");c=b="";switch(a.b.fontFamilyOption){case "monoSerif":b='"Courier New", Courier, "Nimbus Mono L", monospace';break;case "propSerif":b='"Times New Roman", Times, Georgia, Cambria, serif';
break;case "monoSans":b='"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, monospace';break;case "propSans":b='"Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif';break;case "casual":b='"Comic Sans MS", Impact, fantasy';break;case "cursive":b='"Monotype Corsiva", "URW Chancery L", "Apple Chancery", cursive';break;case "smallCaps":b='"Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif',c="font-variant: small-caps;"}a.A=zn(".captions-text",c+"font-family: "+b+" !important;",{Jb:a.A,
reset:!0});a.b.fontFamily=b;en(a,"display-settings",a.b);Ow(a,"captions-settings-font-family","fontFamilyOption");en(a,"display-settings",a.b);b="font-size: "+Math.round(((a.b.fontSizeIncrement||0)+16)*a.So)+"px;";a.B=zn(".caption-window-transform",b,{Jb:a.B,reset:!0});a.bl()}f.gw=function(a){var b=v(function(b){var d=G(a.currentTarget,b.toLowerCase());d&&(this.b[b]=d)},this);b("color");b("background");b("windowColor");Aw(this);en(this,"display-settings",this.b)};
function Pw(a){var b={Jb:a.g},c=a.b.color,d=a.b.background,e=a.b.windowColor;c&&(a.g=zn('.html5-popup-dialog button[data-color="'+c+'"]',"border: 3px solid #992121;",b));d&&(a.g=zn('.html5-popup-dialog button[data-background="'+d+'"]',"border: 3px solid #992121;",b));e&&(a.g=zn('.html5-popup-dialog button[data-windowcolor="'+e+'"]',"border: 3px solid #992121;",b))}
function Qw(a){var b=[],c=v(function(a){var c=this.b[a];c&&b.push(a+": "+c+" !important")},a);c("color");c("background");c={Jb:a.g,reset:!0};a.g=zn(".captions-text",b,c);var d=op(a.b.windowColor),c={Jb:a.I,reset:!0};a.I=zn(".caption-window-transform","background-color: rgba("+d[0]+","+d[1]+","+d[2]+", 1)",c);Pw(a)}function Ew(a,b,c){a.gd&&(b=it(a.mp,{track_id:b,track_display_name:c}),a.gd.appendChild(b))}function Rw(a){return yw.prototype.$a(a)?new yw(a):null}
f.iq=function(a,b){switch(a){case "fontSize":return isNaN(b)||(this.b.fontSizeIncrement=b,Aw(this)),this.b.fontSizeIncrement;case "reload":b&&xw(this.Ob,v(this.fo,this));break;case "track":if(b){if(!ia(b))break;var c=new lw(b);c.equals(this.fc)||(Gw(this,c),Fw(this,c.toString()))}else return this.fc?mw(this.fc):{};return"";case "tracklist":return this.ba?Na(pw(this.Ob.Hd,b&&b.includeAsr),function(a){return mw(a)}):[]}};f.bp=function(){return["reload","fontSize","track","tracklist"]};f.$a=function(a){return!!a.getVideoData().ji};
f.Vh=function(a){a?(a=this.fc,Cw(this),this.fc=a):(Bw(this,this.ba),this.fc&&Gw(this,this.fc))};function Bw(a,b){X(Q(a.a),a.qa+"-loaded",b)};function Sw(){var a=cc(),b;if(b=ql()){t:{if(navigator.plugins&&0<navigator.plugins.length)for(b=0;b<navigator.plugins.length;b++)if(0<=navigator.plugins[b].name.indexOf("NVIDIA 3D Vision")){b=!0;break t}b=!1}if(b)t:{var c=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);if(c&&1<c.length&&4<=c[1]){c=document.createElement("embed");c.setAttribute("id","NvImageDetectionFFID");c.setAttribute("style","visibility: hidden");c.setAttribute("width",25);c.setAttribute("height",25);c.setAttribute("type",
"image/jps");ad(document.documentElement,c);c=Oc("NvImageDetectionFFID");try{if(null!=c){b=27527<=c.NvGetDriverVersion();break t}}catch(d){}}b=!1}}return b||!(!a||-1==a.indexOf("Sony"))};function Tw(a){Xm.call(this,a);var b=a.getVideoData();b.Q&&Uw(this);Vw(this,"html5-threed-conversion-on",v(this.yv,this));Vw(this,"html5-threed-conversion-off",v(this.xv,this));var c=Q(this.a);a=E("html5-threed-popup-menu-change-mode-link",c);c=E("html5-threed-dialog-change-mode-button",c);b="/select_3d_mode?video_id="+b.M;a.setAttribute("href",b);c.setAttribute("href",b)}y(Tw,Xm);f=Tw.prototype;f.rl="threeDModuleData";f.af=null;function Vw(a,b,c){a=E(b,Q(a.a));J(a,"click",c)}f.qa="threed";f.ed="threed";
f.create=function(){Ww(this.a.app,void 0);Tw.C.create.call(this)};f.destroy=function(){Ww(this.a.app,!0);this.unload();Tw.C.destroy.call(this)};function Xw(a){return Tw.prototype.$a(a)?new Tw(a):null}f.$a=function(a){a=a.getVideoData();return!!a.Q||!!a.Bj};f.yv=function(){Yw(this,!0)};f.xv=function(){Yw(this,!1)};function Yw(a,b){var c=a.a.getVideoData();if(c.Bj&&c.Ef!=b){var c=a.a.app,d=O(c),e=d.a;e.Ef=!e.Ef;e.k=[];e.u("dataupdated");kh(d,"m");Ww(c);b?Uw(a):bn(a)}}
function Uw(a){dn(a,"warning-shown")||Sw()||(a.af=E("threed-html5-warning-dialog",Q(a.a)),Wn(a.af),H(v(function(){Zw(this)},a),0),J(a.af,"mouseover",v(function(){W(this.af,"hide-dialog")},a)),J(a.af,"mouseout",v(function(){Zw(this)},a)),Vw(a,"threed-html5-warning-close",v(a.Gv,a)))}function Zw(a){V(a.af,"hide-dialog");H(v(function(){Sm(this.af,"hide-dialog")&&bn(this)},a),9E3)}f.Gv=function(){en(this,"warning-shown",!0);bn(this)};function $w(a){Xm.call(this,a);this.b=new mn(["div","ytp-ypc-clickwrap-overlay",["h2","header",qf("YPC_CLICKWRAP_HEADER")],["div","description",qf("YPC_CLICKWRAP_DESCRIPTION")],["button","confirm-button",qf("YPC_CLICKWRAP_BUTTON")]]);tn(this.b.N());this.a.app.S.g.appendChild(this.b.N());L(this,this.b);this.g=this.b.a["confirm-button"]}y($w,Xm);f=$w.prototype;f.qa="ypc_clickwrap";f.ed="ypc-clickwrap";f.$a=function(){return Fm(this.a.getVideoData(),"ypc_clickwrap_module")};
function ax(a){return Fm(a.getVideoData(),"ypc_clickwrap_module")?new $w(a):null}f.create=function(){$w.C.create.call(this);this.load()};f.destroy=function(){this.ba&&this.unload()};f.load=function(){$w.C.load.call(this);E("html5-video-container",Q(this.a));sn(this.b.N());J(this.g,"click",v(this.su,this));this.ba=!0};f.unload=function(){tn(this.b.N());Hf(this.g);this.ba=!1;$w.C.unload.call(this)};f.su=function(){Zm(this);this.destroy()};function bx(a){a=a.b;this.j=a.ypc_offer_button_text;this.description=a.ypc_offer_description;this.heading=a.ypc_offer_headline;this.k=a.ypc_full_video_message;this.b=a.ypc_offer_id;this.a=a.ypc_buy_url;this.g=a.ypc_item_thumbnail;this.title=a.ypc_item_title;this.i=a.ypc_item_url;this.M=a.ypc_vid};function cx(){Y.call(this,["div",["ytp-drawer","html5-stop-propagation"],["div","ytp-drawer-content","{{content}}"],["a","ytp-drawer-close-button"],["a","ytp-drawer-open-button"]]);this.b=this.template.a["ytp-drawer-close-button"];J(this.b,"click",v(this.hide,this));this.a=this.template.a["ytp-drawer-open-button"];J(this.a,"click",v(this.show,this));this.Aa(null);this.hide()}y(cx,Y);cx.prototype.hide=function(){V(this.element,"ytp-drawer-closed")};
cx.prototype.Aa=function(a){a?(cx.C.Aa.call(this,a),sn(this.element)):tn(this.element)};cx.prototype.show=function(){H(oa(W,this.element,"ytp-drawer-closed"),0)};cx.prototype.H=function(){Hf(this.b);Hf(this.a);this.a=this.b=null;cx.C.H.call(this)};function dx(a,b){R.call(this);this.a=new cx;L(this,this.a);this.b=document.createElement("div");Tm(this.b,["html5-stop-propagation","html5-ypc-endscreen"]);this.i=document.createElement("div");V(this.i,"html5-ypc-overlay");this.g=new mn(["div","html5-ypc-module",["div","html5-ypc-action-heading","{{heading}}"],["div","html5-ypc-thumbnail","{{thumbnail_element}}"],["div","html5-ypc-title","{{title}}"],["div","html5-ypc-description","{{description}}"],["button","html5-ypc-purchase","{{button_label}}"]]);
L(this,this.g);this.j=this.g.a["html5-ypc-purchase"];J(this.j,"click",v(this.k,this));fd(this.i,b.k);var c=b.title;b.i&&(c=["a",{href:b.i,target:"blank_"},b.title]);var d="";b.g&&(d=["img",{src:b.g}]);this.g.update({heading:b.heading,title:c,thumbnail_element:d,description:b.description,button_label:b.j});this.a.V(a);this.a.Aa(this.g.N());a.appendChild(this.b)}y(dx,R);dx.prototype.H=function(){dx.C.H.call(this);this.j&&Hf(this.j);F(this.b);F(this.i);this.i=this.b=this.a=null};dx.prototype.k=function(){this.u("ypcContentRequest")};function ex(a){Xm.call(this,a);this.g=this.b=null;this.i=NaN}y(ex,Xm);f=ex.prototype;f.qa="ypc";f.ed="ypc";function fx(a){var b=a.getVideoData();return a.K().ld&&Fm(b,"ypc_module")}f.$a=function(){return fx(this.a)};function gx(a){return fx(a)?new ex(a):null}f.create=function(){ex.C.create.call(this);var a=this.a.getVideoData();this.b=new bx(a);a.ga?this.load():this.a.Co({video_id:this.b.M,ypc_preview:1})};f.destroy=function(){this.ba&&this.unload();this.b=null};
f.load=function(){ex.C.load.call(this);var a=E("html5-video-container",Q(this.a));this.g=new dx(a,this.b);this.g.D("ypcContentRequest",this.Ft,this);Iw(this.a.app.S,this.g.i);to(this.a.K())&&(a=new di(2147483647,2147483647,{priority:2}),this.uf(a));this.g.a.show();I(this.i);this.i=H(v(function(){this.g.a.hide()},this),1E4);this.ba=!0};f.unload=function(){Ym(this);Yg(this.g);this.g=null;this.ba=!1;ex.C.unload.call(this)};
f.yc=function(a){ex.C.yc.call(this,a);a=this.g;a.b.appendChild(a.g.N());a.a.Aa(null);sn(a.b)};f.Xc=function(a){ex.C.Xc.call(this,a);a=this.g;tn(a.b);a.a.Aa(a.g.N())};f.Ft=function(){if(this.b.a)"embedded"==this.a.K().Y?rs(this.b.a):window.location=S(this.b.a,{})+"";else if(this.b.b){var a=n("yt.www.watch.player.handleEndPreview");a&&a(this.b.b)}};var hx={Gz:"ERROR_ALREADY_PINNED_ON_A_DEVICE",Lz:"ERROR_AUTHENTICATION_EXPIRED",Mz:"ERROR_AUTHENTICATION_MALFORMED",Nz:"ERROR_AUTHENTICATION_MISSING",Xz:"ERROR_BAD_REQUEST",cA:"ERROR_CANNOT_ACTIVATE_RENTAL",kA:"ERROR_CGI_PARAMS_MALFORMED",lA:"ERROR_CGI_PARAMS_MISSING",XA:"DEVICE_FALLBACK",$A:"ERROR_LICENSE",cB:"FLASH_FALLBACK",BB:"ERROR_GEO_FAILURE",NB:"HTML5_DEFAULT_FALLBACK",OB:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",TB:"ERROR_INVALID_DRM_MESSAGE",XB:"LEARN_MORE",oC:"ERROR_NOT_SIGNED_IN",zC:"ERROR_PURCHASE_NOT_FOUND",
AC:"ERROR_PURCHASE_REFUNDED",DC:"ERROR_RENTAL_EXPIRED",dA:"ERROR_CAST_SESSION_DEVICE_MISMATCHED",eA:"ERROR_CAST_SESSION_VIDEO_MISMATCHED",gA:"ERROR_CAST_TOKEN_FAILED",fA:"ERROR_CAST_TOKEN_EXPIRED",hA:"ERROR_CAST_TOKEN_MALFORMED",JC:"ERROR_SERVER_ERROR",NC:"ERROR_STOPPED_BY_ANOTHER_PLAYBACK",PC:"ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",QC:"ERROR_STREAMING_NOT_ALLOWED",RC:"ERROR_STREAMING_UNAVAILABLE",EC:"ERROR_RETRYABLE_ERROR",YC:"ERROR_TOO_MANY_STREAMS_PER_USER",XC:"ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",
aD:"ERROR_UNSUPPORTED_DEVICE",bD:"ERROR_UNUSUAL_ACTIVITY",iD:"ERROR_VIDEO_FORBIDDEN",kD:"ERROR_VIDEO_NOT_FOUND"},ix={300:"ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",301:"ERROR_ALREADY_PINNED_ON_A_DEVICE",303:"ERROR_STOPPED_BY_ANOTHER_PLAYBACK",304:"ERROR_TOO_MANY_STREAMS_PER_USER",305:"ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",400:"ERROR_VIDEO_NOT_FOUND",401:"ERROR_GEO_FAILURE",402:"ERROR_STREAMING_NOT_ALLOWED",403:"ERROR_UNSUPPORTED_DEVICE",405:"ERROR_VIDEO_FORBIDDEN",500:"ERROR_PURCHASE_NOT_FOUND",
501:"ERROR_RENTAL_EXPIRED",502:"ERROR_PURCHASE_REFUNDED",5E3:"ERROR_BAD_REQUEST",5001:"ERROR_CGI_PARAMS_MISSING",5002:"ERROR_CGI_PARAMS_MALFORMED",5100:"ERROR_AUTHENTICATION_MISSING",5101:"ERROR_AUTHENTICATION_MALFORMED",5102:"ERROR_AUTHENTICATION_EXPIRED",5200:"ERROR_CAST_TOKEN_MALFORMED",5201:"ERROR_CAST_TOKEN_EXPIRED",5202:"ERROR_CAST_TOKEN_FAILED",5203:"ERROR_CAST_SESSION_VIDEO_MISMATCHED",5204:"ERROR_CAST_SESSION_DEVICE_MISMATCHED",6E3:"ERROR_INVALID_DRM_MESSAGE",7E3:"ERROR_SERVER_ERROR",8E3:"ERROR_RETRYABLE_ERROR"};function jx(a){Xm.call(this,a);this.qa="ypc_license_checker";this.ed="ypc_license";this.j=!1;this.i=0;this.g=!1;this.b=null;this.B=ul();this.A=a.K().jb+"ypc_license_server"}y(jx,Xm);
var kx={LICENSE_DENIED_CANNOT_ACTIVATE_RENTAL:"ERROR_CANNOT_ACTIVATE_RENTAL",LICENSE_DENIED_NOT_SIGNED_IN:"ERROR_NOT_SIGNED_IN",LICENSE_DENIED_NO_ACTIVE_PURCHASE_AGREEMENT:"ERROR_RENTAL_EXPIRED",LICENSE_DENIED_CONCURRENT_PLAYBACK:"ERROR_STOPPED_BY_ANOTHER_PLAYBACK",LICENSE_DENIED_UNUSUAL_ACTIVITY:"ERROR_UNUSUAL_ACTIVITY",LICENSE_DENIED_STREAMING_UNAVAILABLE:"ERROR_STREAMING_UNAVAILABLE",LICENSE_DENIED_PLAYBACK_CAP:"ERROR_LICENSE"};
function lx(a){return Fm(a.getVideoData(),"ypc_license_checker_module")}f=jx.prototype;f.$a=function(){return lx(this.a)};f.create=function(){jx.C.create.call(this);var a=new di(1E3,2147483646,{priority:0});this.uf(a);this.D("onStateChange",this.hx,this)};function mx(a){return lx(a)?new jx(a):null}f.yc=function(){this.j=!0;nx(this,6E4)};f.hx=function(a){P(a.state,2)?(this.i=0,this.b=null,this.g=!1):(P(a.state,1)||P(a.state,8))&&nx(this,6E4)};
function nx(a,b){if(!a.b&&a.j){var c=b;void 0==c&&(c=a.g?6E4:1E3);var d=a.a.getVideoData();d.a&&d.a.g||(a.b={video_id:d.M,player_id:a.B,request_id:ul(),purchase_id:d.qe,version:"4",player_time_seconds:a.a.getCurrentTime().toString(),gid:d.Kc,session_token:d.Nc},a.k=d.Ea,0==c?a.un():H(v(a.un,a),c))}}f.un=function(){if(this.b){var a=S(this.A,{cpn:this.k});Vj(a,{format:"RAW",method:"POST",If:this.b,timeout:3E4,Qa:v(this.Pv,this),onError:v(this.Ov,this),Wk:v(this.Qv,this)})}};
f.Pv=function(a){if(this.b){a=a.responseText;var b=a in kx?1:64<=a.length&&a.match(/[0-9a-fA-f]+/)?0:-1;-1==b?ox(this,"decode"):(this.i=0,this.b=null,1==b?(this.g=!1,a=a in kx?qf(kx[a]):qf("ERROR_LICENSE"),px(this.a.app.b,150,a,void 0)):(this.g=!0,nx(this)))}};f.Ov=function(a){ox(this,"net-"+a.status)};f.Qv=function(){ox(this,"timeout")};function ox(a,b){if(a.b)if(a.log({errorType:b}),a.b=null,5<++a.i){var c=qf("ERROR_LICENSE");px(a.a.app.b,150,c,void 0)}else nx(a)};function qx(){this.a=[];this.i={};this.o={};this.F={};this.b=this.j=null;this.g=[];this.k=null}y(qx,K);qx.prototype.B=function(a){if(this.b){var b;var c=ja(a);b=this.i[c];if(!b)if(this.b){if(b=a(this.b)){a=this.i[c]=b;for(var d in this.j)a.D(d,this.j[d]);a.D("command_log_timing",this.A,this);L(this,b)}}else b=null;b&&b.$a(this.b)&&!Va(this.a,b)&&(b.create(),this.a.push(b),Va(this.g,b.qa)&&(b.Ac=this.k,b.Vh(!!b.Ac)))}};function rx(a){z(a.a,function(a){a.destroy()});a.a=[]}
function sx(a,b,c){tx(a);a.k=b;a.g=cb(c);z(a.a,function(a){0<=La(c,a.qa)&&(a.Ac=b,a.Vh(!!a.Ac))})}function tx(a){z(a.g,function(a){if(a=nh(this,a))a.Ac=null,a.Vh(!1)},a);a.k=null;a.g=[]}function Dh(a,b,c,d){return b&&c?(a=nh(a,b))?a.iq(c,d):null:null}function Eh(a,b){if(!b)return Na(a.a,function(a){return a.qa});var c=nh(a,b);return c?c.bp():[]}function nh(a,b){return Ra(a.a,function(a){return a.qa==b})}qx.prototype.G=function(a,b){z(this.a,function(c){c.u(a,b)})};
function ux(a){var b=[];z(a.a,function(a){(a=a.Ni())&&b.push(a)});return b}qx.prototype.A=function(a,b){w(this.F,a||null);w(this.o,b||null)};function vx(a){this.a={};for(var b=0;b<a.length;b++){var c=a[b];this.a[c.a]=c}}function wx(a){a=Lb(a.a);ib(a,function(a,c){return a.a-c.a});return a};function xx(a,b,c){this.b=a;this.a=b;this.i=!!c.Cf;this.g=c.ea};function yx(){this.ge={};this.a=this.bb().a;this.Yc=null}f=yx.prototype;f.bb=function(){var a=this.constructor,b;if(!(b=a.Pp)){var c;b=a.Jx;var d=[];for(c in b)b.hasOwnProperty(c)&&(0==c||d.push(new xx(a,c,b[c])));c=new vx(d);b=a.Pp=c}return b};f.has=function(a){a.b.bb();this.bb();return null!=this.ge[a.a]};f.get=function(a,b){a.b.bb();this.bb();var c;c=this.a[a.a];var d=zx(this,c);c.i?(t(d),c=d[b||0]):(t(d),c=d);return c};
f.set=function(a,b){a.b.bb();this.bb();var c=a.a;this.ge[c]=b;this.Yc&&(this.Yc[c]=b)};f.add=function(a,b){a.b.bb();this.bb();var c=a.a;this.ge[c]||(this.ge[c]=[]);this.ge[c].push(b);this.Yc&&delete this.Yc[c]};f.clear=function(a){a.b.bb();this.bb();a=a.a;delete this.ge[a];this.Yc&&delete this.Yc[a]};
f.equals=function(a){if(!a||this.constructor!=a.constructor)return!1;for(var b=wx(this.bb()),c=0;c<b.length;c++){var d=b[c];if(this.has(d)!=a.has(d))return!1;if(this.has(d)){var e=11==d.g||10==d.g,g=zx(this,d),h=zx(a,d);if(d.i){if(g.length!=h.length)return!1;for(d=0;d<g.length;d++)if(e?!g[d].equals(h[d]):g[d]!=h[d])return!1}else if(e?!g.equals(h):g!=h)return!1}}return!0};
function Ax(a,b){for(var c=wx(a.bb()),d=0;d<c.length;d++){var e=c[d];if(b.has(e)){a.Yc&&delete a.Yc[e.a];var g=11==e.g||10==e.g;if(e.i){var h,k=b;h=e;h.b.bb();k.bb();h=zx(k,k.a[h.a]);null==h||t(h);h=h||[];for(k=0;k<h.length;k++)a.add(e,g?h[k].clone():h[k])}else h=zx(b,e),g?(g=zx(a,e))?Ax(g,h):a.set(e,h.clone()):a.set(e,h)}}}f.clone=function(){var a=new this.constructor;a!=this&&(a.ge={},a.Yc&&(a.Yc={}),Ax(a,this));return a};function zx(a,b){var c=a.ge[b.a];return null==c?null:c}
function Bx(a,b){a.Jx=b;a.bb=function(){return a.Pp||(new a).bb()}};var Cx={Ry:0,BA:1,MA:2,Qy:3,Zy:4,zA:5,KA:6,HA:7,IA:8,JA:9,FA:10,GA:11,az:12,$y:13,Py:14,Jy:15,AA:20,OA:21,Iy:22,CA:23,NA:24,LA:25,Wy:30,PA:31,Vy:32,Xy:33,EA:40,DA:41,bz:42,cz:43,Ky:50,Ny:51,Sy:52,Ty:53,Uy:54,Fy:55,Gy:56,Yy:57,Oy:58,My:60,Ly:61,Hy:70,Ey:80,dz:90};function Dx(){yx.apply(this)}y(Dx,yx);function Ex(){yx.apply(this)}y(Ex,yx);function Fx(){yx.apply(this)}y(Fx,yx);function Gx(){yx.apply(this)}y(Gx,yx);function Hx(){yx.apply(this)}y(Hx,yx);function Ix(){yx.apply(this)}y(Ix,yx);
Bx(Dx,{0:{name:"YtAdType",rh:"video.YtAdType"},1:{name:"ad_namespace",required:!0,ea:14,defaultValue:0,type:{Ez:0,YA:1,Fz:2,iA:3,AB:4,WA:5,VA:6,Zz:7,TA:8,aA:9,SA:10,UA:11,Kz:12,FD:13}},2:{name:"ad_format",required:!0,ea:14,defaultValue:0,type:{Bz:0,UB:1,SB:2,lC:3,cD:4,VB:5,PB:6,RB:7,GD:8,ZA:9}},3:{name:"ad_invideo",ea:14,defaultValue:0,type:{Dz:0,qA:1,rA:2,sA:3,tA:4,pA:5,bA:6}},4:{name:"invideo_autoplay",ea:14,defaultValue:0,type:{Vz:0,yC:1}},5:{name:"ad_instream",ea:14,defaultValue:0,type:{Cz:0,
ZC:1}},6:{name:"ad_instream_long",ea:8,type:Boolean}});Bx(Ex,{0:{name:"AdId",rh:"video.AdId"},1:{name:"ad_network",ea:14,defaultValue:1,type:{sC:1,Cy:2}},2:{name:"ad_network_name",ea:9,type:String},3:{name:"ad_id",required:!0,ea:9,type:String}});
Bx(Fx,{0:{name:"YtAdEvent",rh:"video.YtAdEvent"},1:{name:"ad_event_type",required:!0,ea:14,defaultValue:0,type:{mz:0,uz:1,nz:2,xz:3,oz:4,pz:5,jz:6,hz:7,QA:8,ez:9,vz:10,wz:11,fz:12,RA:13,yz:14,kz:15,gz:16,lz:17,iz:18,zz:100,Az:101,rz:130,qz:131,tz:132}},2:{name:"wall_time",required:!0,ea:2,type:Number},3:{name:"media_time",required:!0,ea:2,type:Number},4:{name:"logentry_time_usec",required:!0,ea:3,type:String},5:{name:"ad_error_type",ea:14,defaultValue:0,type:Cx}});
Bx(Gx,{0:{name:"YtAdSlot",rh:"video.YtAdSlot"},1:{name:"slot_time",required:!0,ea:2,type:Number},2:{name:"ad_type",required:!0,ea:11,type:Dx},3:{name:"ad_events",Cf:!0,ea:11,type:Fx},4:{name:"ad_video_duration",ea:2,type:Number},5:{name:"ad_id",ea:9,type:String},6:{name:"slot_index",ea:5,type:Number}});
Bx(Hx,{0:{name:"YtVideoMetadata",rh:"video.YtVideoMetadata"},1:{name:"content_owner_ids",Cf:!0,ea:9,type:String},2:{name:"video_duration_seconds",ea:2,type:Number},3:{name:"all_content_owner_ids",ea:9,type:String}});
Bx(Ix,{0:{name:"YtWatchAdInfo",rh:"video.YtWatchAdInfo"},1:{name:"video_id",required:!0,ea:9,type:String},2:{name:"allowed_ads",Cf:!0,ea:11,type:Dx},3:{name:"ad_slots",Cf:!0,ea:11,type:Gx},4:{name:"ps",ea:9,type:String},5:{name:"el",ea:9,type:String},6:{name:"country",ea:9,type:String},7:{name:"feature",ea:9,type:String},8:{name:"blocked",ea:8,type:Boolean},9:{name:"plid",ea:9,type:String},10:{name:"video_metadata",ea:11,type:Hx},11:{name:"experiment_id",Cf:!0,ea:3,type:String},12:{name:"ad_flags",
ea:4,type:String},13:{name:"all_experiment_ids",ea:9,type:String},14:{name:"no_ads_returned",ea:8,type:Boolean},15:{name:"ad_errors",Cf:!0,ea:14,defaultValue:0,type:Cx},16:{name:"ad_slot_with_event",ea:11,type:Gx}});function Jx(a,b){Lh.call(this,a,b)}y(Jx,Lh);f=Jx.prototype;f.rg=function(){$g(this.app,!0,this.a);this.app.Qd(!1,this.a)};f.bn=function(){this.app.Od(!1,this.a)};f.Np=function(a,b,c){$g(this.app,!0,this.a);var d=this.app,e=this.a;d.pf(d.getCurrentTime()+a,b,c,e)};f.Th=function(a,b){$g(this.app,!0,this.a);this.app.pf(a,b,void 0,this.a)};f.zj=function(){gh(this.app,this.a)};function Kx(a){this.app=a;Xm.call(this,a.I)}y(Kx,Xm);var Lx={pC:"0",qC:"1",aB:"2",fy:"3",Wz:"4",IC:"5"};var Mx={CC:"red",DD:"white"};var Nx={hy:"0",MC:"1",wA:"2"};var Ox={"ad-trueview-indisplay-pv":6,"ad-trueview-insearch":7},Px={"ad-trueview-indisplay-pv":2,"ad-trueview-insearch":2},Qx={adunit:{Vb:!1,zc:!1},detailpage:{qc:!0}};Qx.embedded={yh:Jf(),Ch:"4",zc:!0};Qx.profilepage={ql:!0};
var Rx="blogger books docs google-live play picasaweb".split(" "),Sx={blazer:{ij:"youtube_mobile",Tb:!1,ny:!1,Gg:!1,Hg:!1,oc:!0,Ub:!1,ub:!1,Fb:!0},blogger:{ze:!1,Xf:!1,Pc:!1,Vb:!1,xc:!1,qc:!1,zc:!1,sc:"bl"},books:{ze:!1,Xf:!1,Pc:!1,Vb:!1,xc:!1,qc:!0,zc:!1,sc:"gb"},docs:{ze:!1,Xf:!1,Pc:!1,Vb:!1,xc:!1,qc:!1,zc:!1,sc:"gd"},"google-live":{ze:!1,Xf:!1,Pc:!1,Vb:!1,xc:!1,qc:!1,zc:!1,sc:"gl"},play:{Vb:!1,xc:!1,qc:!1,zc:!1,sc:"gp"},"native":{Gg:!1,Hg:!1,Ub:!0},olympics:{Gg:!1,Hg:!1,Mh:!0,Fb:!0},picasaweb:{ze:!1,
Xf:!1,Pc:!1,Vb:!1,xc:!1,qc:!1,zc:!1,sc:"pw"},touch:{Gg:!1,Hg:!1,Fb:!0}};
function Tx(a){this.o=[];this.a={};Ux(this,a.fexp);this.Q=U(this.Q,a.origin);this.Y=a.el||this.Y;var b=Qx[this.Y];b&&w(this,b);b=a.ps||this.Ca;0<navigator.msMaxTouchPoints&&(b="touch");this.Ca=b;(b=Sx[this.Ca])&&w(this,b);this.jf=Vx(this)&&Va(Rx,this.Ca);this.hg=!(!pl().defaultPlaybackRate||gc||Xi||Wi||Yi);if(a.use_media_volume)b=!1;else{var b=pl(),c=b.muted;b.muted=!c;b=b.muted!=c}this.gm=b;this.km=Yi;if(Xi||Wi)this.im=this.Lc||"blazer"!=this.Ca;this.rm="0"!=a.add_player_event_listeners;b=T(this.yh,
a.fs);this.yh="detailpage"==this.Y||"olympics"==this.Ca?b:b&&Jf();this.Fa=U(this.Fa,a.authuser);this.Ch=wl(this.Ch,a.autohide,Lx);this.Tb=T(this.Tb,a.autoplay);this.Lj=T(this.Lj,a.autoplayoverride);this.color=wl(this.color,a.color,Mx);this.k=U(this.k,a.content_v);this.Mj=wl(this.Mj,a.controls,Nx);this.F=U(this.F,a.cbrand);this.A=U(this.A,a.cbr);this.B=U(this.B,a.cbrver);this.$f=U(this.$f,a.c);this.gf=U(this.gf,a.cver);this.G=U(this.G,a.cmodel);this.I=U(this.I,a.cnetwork);this.J=U(this.J,a.cos);this.L=
U(this.L,a.cosver);this.O=U(this.O,a.cplatform);this.Lh=T(this.Lh,a.edu_mode);this.b=U(this.b,a.eurl);this.P=U(this.P,a.framer);this.fa=wl(this.fa,a.iv_load_policy,hl);this.i=U(this.i,a.hl);this.Gm=T(this.Gm,a.bwlogging);this.oc=T(this.oc,a.is_html5_mobile_device);this.Nd=T(this.Nd,a.player_wide);this.Hm=T(this.Hm,a.is_playground);this.loop=T(this.loop,a.loop);this.kf=T(this.kf,a.modestbranding);"red"!=this.color&&(this.kf=!1);this.th=T(this.th,a.noadapt);this.ag=T(this.ag,a.on3g);this.Va=U(this.Va,
a.pageid);this.Hh=wl(this.Hh,a.vq,ik);this.kj=U(this.kj,a.playerapiid);this.Ah=T(this.Ah,a.playsinline);this.lj=T(this.lj,a.playonclick);this.U=U(this.U,a.cr);this.ja=U(this.ja,a.q);this.Pc=T(this.Pc,a.logwatch);this.Cj=T(this.Cj,a.canplaylive);this.Dj=T(this.Dj,a.canplaypaid);this.Vb=T(this.Vb,a.showinfo);this.xc=T(this.xc,a.rel);this.qc=T(this.qc,a.enablesizebutton);this.oj=T(this.oj,a.ss);this.X=U(this.X,a.theme);this.Ub=T(this.Ub,a.use_native_controls);this.ub=!Wi&&T(this.ub,a.svt);Vx(this)&&
(this.Kh=T(this.Kh,a.altf),this.ng=T(this.ng,a.retryneterr),this.Mh=T(this.Mh,a.nologo));this.ng=this.ng||this.qe;this.Ub&&(this.kf=!0,this.fa=3);this.Nj=T(this.Nj,a.ssl);if(this.Fb=T(this.Fb,a.use_tablet_controls))this.X="dark";b=this.Gh;if(c=a.video_container_override){var d=c.split("x");2==d.length&&(c=parseInt(d[0],10),d=parseInt(d[1],10),b=isNaN(c)||isNaN(d)||0>=c*d?b:new B(c,d))}this.Gh=b;this.Ta=U(this.Ta,a.attrib);this.aa=U(this.aa,a.sk);this.protocol=this.Nj?"https":"http";this.te="0"!=this.Mj;
this.jj=T(this.te,a.store_user_volume);this.Md=T(this.Md,a.use_media_volume);(b=a.BASE_YT_URL)&&tk(b,pk)&&(this.jb=b);Wx(this,a);Xx(this,a);"detailpage"==this.Y&&delete this.b;this.dj=Yx(this)+"s";this.zc=this.kf&&!this.Ub?!this.Vb:this.Vb||this.te?!1:this.zc;b=this.Tb||"detailpage"==this.Y;c=!0;this.oc&&(c=!1);hj("nintendo wiiu")&&(c=!1);this.Lj&&(c=!0);this.Zl=b&&c;this.a=a}y(Tx,K);f=Tx.prototype;f.rm=!0;f.yh=!0;f.Fa="";f.Ch="2";f.Tb=!1;f.Lj=!1;f.jb="/";f.ny=!0;f.color="red";f.Mj="1";f.$f="web";
f.gf="html5";f.Lh=!1;f.Gg=!0;f.Hg=!0;f.hg=!1;f.gm=!1;f.Y="detailpage";f.Gm=!1;f.jk=!1;f.jf=!1;f.oc=!1;f.ob=!1;f.Nd=!1;f.ze=!0;f.Hm=!1;f.Xf=!0;f.qg=!1;f.loop=!1;f.kf=!1;f.th=!1;f.Hh=null;f.kj="";f.ag=!1;f.Va="";f.Ca=null;f.Ah=!1;f.Kh=!1;f.km=!1;f.ng=!1;f.Zl=!1;f.Pc=!1;f.Cj=!0;f.Dj=!0;f.te=!0;f.jj=!0;f.Md=!1;f.Vb=!0;f.xc=!0;f.ql=!1;f.qc=!1;f.zc=!1;f.oj=!1;f.Mh=!1;f.im=!1;f.Ub=!1;f.ub=!0;f.Nj=!1;f.Fb=!1;f.Qc=null;f.Gh=null;f.Qo=null;f.vf=null;f.Ya=null;f.Ij=null;f.sc="yt";f.lj=!1;
function Wx(a,b){a.Pc=T(a.Pc,b.logwatch);a.ma=void 0==b.user_age?a.ma:Number(b.user_age);a.Bp=U(a.Bp,b.user_display_image);a.Il=U(a.Il,b.user_display_name);a.pa=U(a.pa,b.user_gender)}
function Xx(a,b){var c;t:{if(b&&((c=b.adformat)||(c=(c=b.attrib)&&c in Ox&&c in Px?Px[c]+"_"+Ox[c]:void 0),c)){var d=c.match(/^(\d*)_((\d*)_?(\d*))$/);if(d&&5==d.length&&(d=d[3],d=6==d||7==d||8==d||9==d||10==d||11==d,tk(a.Q,qk)||d))break t}c=void 0}c&&(a.g=c,a.a.adformat=b.adformat);c=b.agcid;a.ib=c;a.a.agcid=c;c=b.feature;a.j=c;a.a.feature=c;if(c=b.referrer)a.referrer=c,a.a.referrer=c;"1"==b.enablecsi&&(a.jk=!1)}
function Zx(a){var b={};b.c=a.$f;a.gf&&(b.cver=a.gf);a.O&&(b.cplatform=a.O);a.F&&(b.cbrand=a.F);a.G&&(b.cmodel=a.G);a.I&&(b.cnetwork=a.I);a.A&&(b.cbr=a.A);a.B&&(b.cbrver=a.B);a.J&&(b.cos=a.J);a.L&&(b.cosver=a.L);return b}
function Ux(a,b){if(b){a.o=b.split(",");var c={};z(a.o,function(a){c[a]=!0});a.Lc=!!c["918108"];a.ld=!!c["912711"];a.bg=!!c["925900"];a.gg=!!c["913559"];a.hj=!c["904831"];a.Ua=!!c["913424"];a.ya=!!c["932206"];a.kd=!!c["932217"];a.re=!!c["932225"];a.Nc=!!c["932246"];a.Kc=!!c["932245"];a.jd=!!c["932240"];a.pe=!!c["932236"];a.Hc=!!c["932237"];a.lc=!!c["932242"];a.mc=!!c["932243"];a.nc=!!c["932247"];a.Zf=!!c["932248"];a.za=!!c["932239"];a.Na=!!c["932249"];a.Da=!!c["932250"];a.Jc=!!c["932251"];a.Oc=!!c["924604"];
a.Ic=!!c["924610"];a.qe=!!c["918117"];a.Ma=!!c["907231"]&&"leanback"!=a.Y;a.ia=!!c["938600"]}}
function $x(a,b){switch(b.md){case 38:var c=b.M.indexOf(":"),d=b.M.slice(0,c),c=b.M.slice(c+1);return S("//play.google.com/books/volumes/"+d+"/content/media",{aid:c,sig:b.jd});case 30:return d="//docs.google.com/",a.jb!=Tx.prototype.jb&&(d=a.jb),S(d+"get_video_info",{docid:b.M,authuser:b.Fa,authkey:b.xn,eurl:a.b});case 33:return S("//google-liveplayer.appspot.com/get_video_info",{key:b.M});default:return d={html5:"1",video_id:b.M,cpn:b.Ea,eurl:a.b,ps:a.Ca,el:a.Y,hl:a.i,list:b.Oa,agcid:a.ib,sts:15966},
b.U?d.vvt=b.U:b.G&&(d.access_token=b.G),a.g&&(d.adformat=a.g),b.fa&&(d.iv_load_policy=b.fa),b.ff&&(d.autoplay="1"),b.wk&&(d.mdx="1"),b.xk&&(d.utpsa="1"),b.Ta&&(d.is_fling="1"),c=ay(a),c.width&&(d.width=c.width),c.height&&(d.height=c.height),b.ga&&(d.ypc_preview="1"),b.Ld&&(d.splay="1"),a.k&&(d.content_v=a.k),b.yn&&(d.livemonitor=1),a.Fa&&(d.authuser=a.Fa),a.Va&&(d.pageid=a.Va),w(d,Zx(a)),S(a.jb+"get_video_info",d)}}
function Yx(a){return a.Lh?"//s.youtubeeducation.com/":a.Xf?"//s.youtube.com/":"//video.google.com/"}function by(a){return a.referrer?a.referrer.slice(0,128):""}
function ju(a,b,c,d){b={v:b.M,list:b.Oa};a.Y&&(b.feature="player_"+a.Y);c&&w(b,c);a=S(a.protocol+"://"+("www.youtube-nocookie.com"==window.location.host||a.Lh?"www.youtube.com":window.location.host)+"/watch",b);if(d){c="";c="!"=="#".charAt(1)?"#".substr(0,2):"#";b="#";"#"==b.charAt(0)&&(b="!"==b.charAt(1)?b.substr(2):b.substr(1));b=Kj(b);for(var e in d)b[e]=d[e];d=c+Mj(b);a=a+d}return a}
function cy(a){var b={contact_type:"playbackissue",html5:1,plid:a.fb,ei:a.j,v:a.M};a.a&&(b.fmt=a.a.Pa);return S("//www.google.com/support/youtube/bin/request.py",b)}function ay(a){return(a=a.Ij)?new B(a.clientWidth,a.clientHeight):new B(Number.NaN,Number.NaN)}function Jw(a){return a.Ya?new B(a.Ya.clientWidth,a.Ya.clientHeight):new B(Number.NaN,Number.NaN)}
function dy(a){var b={};if(!a.Ya)return b;a.Ya.webkitDecodedFrameCount&&(b.hmewdfc=a.Ya.webkitDecodedFrameCount,b.hmewdrop=a.Ya.webkitDroppedFrameCount,b.hmewvdbc=a.Ya.webkitVideoDecodedByteCount,b.hmewadbc=a.Ya.webkitAudioDecodedByteCount);a.Ya.mozParsedFrames&&(b.hmempf=a.Ya.mozParsedFrames,b.hmemdf=a.Ya.mozDecodedFrames,b.hmempresented=a.Ya.mozPresentedFrames,b.hmempainted=a.Ya.mozPaintedFrames,b.hmempaintdelay=a.Ya.mozPaintDelay);return b}
function ey(a){var b=n("yt.www.watch.activity.getTimeSinceActive",window);if("detailpage"==a.Y&&b)return b();var c;a.Sa&&(c=x()-a.Sa);return c}function to(a){return"leanback"==a.Y||a.jf||!a.xc&&!a.ql?!1:!0}function Ih(a){return"detailpage"!=a.Y?!1:!0}function Vx(a){a=sk()&&(tk(a.Q,pk)||tk(a.Q,qk));var b=tk(document.location.toString(),pk)&&!sk();return a||b}f.H=function(){this.Ij=this.Ya=null;Tx.C.H.call(this)};function fy(){this.b=0;this.a=this.j=this.g=this.i=NaN}function gy(a,b){for(var c=0;c<a.length;c++)if(a.start(c)<=b&&a.end(c)>=b)return a.end(c)-b;return 0};function hy(a){this.b=a;this.pendingRequests_=[];this.a=[];this.g=this.i=null;this.j=0}function iy(a,b){a.pendingRequests_.push(b);a.i=b.g[b.g.length-1];a.j+=b.T.length}function jy(a){for(;a.pendingRequests_.length&&5==a.pendingRequests_[0].state;){var b=a.pendingRequests_.shift();z(b.o,a.F,a)}}
hy.prototype.F=function(a){if(4==a.info.type){for(var b=Uk(a.info.a,a.info),c=[],d=a.a,e=0;e<b.length;e++){var g=ok(b[e].T.start+b[e].nb-a.info.T.start+a.T.start,b[e].Ia);c.push(new Ak(b[e],a.buffer,g,d));d=!1}db(this.a,c)}else 3==a.info.type&&this.a.push(a)};
function ky(a,b){if(a.k)return a.a[0].T;var c=a.b.info.i;if(a.a[0].info.i>=b)return null;var d;for(d=1;d<a.a.length;d++){var e=a.a[d].buffer!=a.a[d-1].buffer;if(a.a[d].info.i>b||e)break}d--;var e=a.a[d].T.end,g=a.a[d].info.k-b;if(c&&1<g){c=Math.floor(a.a[d].info.Ia*((b-a.a[d].info.i)/a.a[d].info.o));if(0==c)return null;e=a.a[d].T.start+c-1}return new mk(a.a[0].a?0:a.a[0].T.start,e)}
function ly(a){a.pendingRequests_.length?a.i=Ja(a.pendingRequests_[a.pendingRequests_.length-1].g):a.a.length?a.i=Ja(a.a).info:a.i=a.g}function my(a){return a.b.Yb()?a.b.index.g?a.b.index.b[a.b.index.R]:-1:NaN}function ny(a,b){a.b.Yb();a.i=a.b.Oj(b,0).a[0];a.g&&a.g.b&&(a.g=null);return a.i.startTime}
function oy(a){py(a);if(a.b.info.a&&a.g&&!a.g.g){var b=Sa(a.a,function(a){return a.info.g});a.a=fb(a.a,0,b+1);a.k=!0}else a.a=[];if(a.a.length)for(a.j=a.a[0].buffer.byteLength,b=1;b<a.a.length;b++)a.a[b].buffer!=a.a[b-1].buffer&&(a.j+=a.a[b].buffer.byteLength);else a.j=0}function qy(a){var b=!1,c;for(c=0;c<a.pendingRequests_.length;c++)if(7==a.pendingRequests_[c].state){b=!0;break}if(b){for(;c<a.pendingRequests_.length;)a.o(a.pendingRequests_.pop());ly(a)}}
function ry(a){var b=a.g;a.a.length&&(b=Ja(a.a).info);b=a.i||b;return b.ug(b.T.length-(b.Ia+b.nb))}function sy(a){return Oa(a.a,function(a){return a.info.g})}function ty(a){return Qa(a.pendingRequests_,function(a){return!(!a.b||1!=a.b.priority)&&!(4<=a.state)})}hy.prototype.o=function(a){wk(a.g[0])||a.dispose();this.j-=a.T.length};function py(a){z(a.pendingRequests_,a.o,a);a.pendingRequests_=[];a.i=null};function uy(a,b){this.state=1;this.g=b.a;this.k=a;this.o=null;this.T=yk(b.a);this.F=b.b;this.G=NaN;this.A=this.j=0;this.i=NaN;this.b=this.B=null;this.I=""}f=uy.prototype;
f.start=function(){var a=1==this.state,b=6==this.state;1==this.state||3==this.state||b&&vy(this);wy(this,2);if(b){if(this.j<this.k.o){this.j++;a=0.5+Math.random();H(v(this.lk,this),1E4*a);return}b=this.F;if(!(this.G<=b.g)){b.b++;b.g=Ek-1;var c;c=Ne(b.a).Ne;var d=uk(b.a);b.a=Pj(d,{cmo:"pf="+b.b,shost:c})}this.j=0}a?this.lk():H(v(this.lk,this),0)};
f.lk=function(){if(!this.ha()){this.G=Ek++;var a={};this.T&&(a.range=this.T.toString());a.keepalive="yes";4==this.g[this.g.length-1].type&&(a.fr="yes");a=S(this.F.a,a);this.j&&(a=qe(ue(a,"playerretry"),"playerretry",this.j.toString()));this.I=a;var b={format:"RAW",method:"GET",responseType:"arraybuffer",withCredentials:!0,pd:v(this.uq,this)};this.a=Vj(a,b);this.A=0;this.b&&(a=this.b,a.a=x(),a.j=a.a,a.b=0,a.o=0,a.i=!1,a.k={pm:Yh(a.g),tq:Zh(a.g),sq:$h(a.g)},xy(a),this.a.addEventListener("progress",
v(this.wq,this),!1),0<this.k.a&&!wk(this.g[0])&&(this.i=H(v(this.Cm,this),this.k.a)))}};f.wq=function(a){if(!this.ha()){var b=this.b,c=a.timeStamp,d=a.loaded;c<b.a&&(c=x());if(!(20>c-b.j)){if(32768<d){yy(b,c);var e=(c-b.j)/1E3,g=d-b.b;if(0<g)if(0.2<e||1024>g)b.o+=e;else{var h=b.g,e=Math.max(e,0.05);h.a.b(e,g/e)}}b.j=c;b.b=d}this.b.b>this.b.A&&4>this.state&&wy(this,4);4==a.target.readyState&&zy(this.b,a.timeStamp)}};
f.uq=function(a){if(!this.ha()&&a==this.a){this.i&&(I(this.i),this.i=NaN);var b=null==a.response||400<=a.status;if(!b){a=a.response;var c;t:{if(2048>a.byteLength&&(c=String.fromCharCode.apply(String,new Uint8Array(a)),tk(c,pk)))break t;c=""}if(c)a=this.F,c=ue(c,"keepalive"),c=ue(c,"playerretry"),c=ue(c,"range"),c=ue(c,"shost"),a.a=c,wy(this,3);else if(a.byteLength!=this.T.length)b=!0;else{c=this.g;if(1==c.length&&!c[0].T){var d;d=c[0];var e=ok(0,a.byteLength);d=new vk(d.type,d.a,e,d.j,d.startTime,
d.duration,d.nb,e.length,d.b);c[0]=d}d=[];for(var e=0,g=!1,h=!1,k=0;k<c.length;k++){var m=c[k],p=a,s=ok(e,m.Ia),r=!1;if(1==m.type)a.slice?p=a.slice(e,e+m.Ia):(g=new Uint8Array(a,e,e+m.Ia),p=(new Uint8Array(g)).buffer),s=ok(0,m.Ia),g=!0;else if(3==m.type||4==m.type)r=g&&!h,h=!0;d.push(new Ak(m,p,s,r));e+=m.Ia}this.o=d;wy(this,5)}}b&&(vy(this),wy(this,6))}};function vy(a){return a.j<a.k.o?!0:!(a.G>a.F.g&&1<=a.F.b)}function wy(a,b){a.state=b;3<=a.state&&a.B&&a.B(a)}
f.Cm=function(){this.i=NaN;if(!this.ha()&&this.b){var a=!1;if(this.b.i){var b=this.b.F;xy(this.b);this.b.F-b>=0.8*(this.k.a/1E3)?(this.A++,a=5<=this.A):this.A=0}else a=5<x()/1E3-(this.b.a/1E3+this.b.k.pm);a?(wy(this,7),Ay(this),zy(this.b,Date.now())):this.i=H(v(this.Cm,this),this.k.a)}};f.ha=function(){return-1==this.state};f.dispose=function(){wy(this,-1);this.B=this.o=null;Ay(this);I(this.i);this.i=NaN};function Ay(a){if(a.a){var b=a.a;a.a=null;b.abort()}};function By(a,b,c,d){this.priority=b;this.g=a;this.A=d;this.b=this.j=this.a=NaN;this.o=0;this.B=c;this.F=NaN;this.i=!1}function zy(a,b){b<a.a&&(b=x());yy(a,b);var c=a.g,d=a.b,e=a.o,d=Math.max(d,32768);c.g.b(1,e/d);c=a.g;d=b-a.a;e=a.b;isNaN(e)||(c.i+=e);isNaN(d)||(c.j+=d/1E3)}function xy(a){var b=a.B-a.b,b=b*a.k.tq+b/a.k.sq,c=x()/1E3,b=a.i?b+c:b+Math.max(c,a.a/1E3+a.k.pm);a.F=b}function yy(a,b){a.i||(a.g.b.b(1,(b-a.a)/1E3),a.i=!0)};function Cy(a,b,c,d){R.call(this);this.j=a;this.b=b;this.i=new hy(c);this.a=new hy(d);this.k=this.G=this.I=NaN;this.o=this.L=this.B=!1;this.A=NaN;this.O=!1}y(Cy,R);var Dy=2/24;f=Cy.prototype;f.kt=function(a){this.g=a;a.Zb.appendBuffer&&(a.Zb.addEventListener("updateend",v(this.Rf,this),!1),a.rd.addEventListener("updateend",v(this.Rf,this),!1));Ey(this);Fy("msa")};
function Gy(a){a.g&&a.g.Zb&&a.g.Zb.removeEventListener&&(a.g.Zb.removeEventListener("updateend",v(a.Rf,a)),a.g.rd.removeEventListener("updateend",v(a.Rf,a)));a.g=null}function Hy(a){if(0<a.b.j){var b=(a.i.b.info.b+a.a.b.info.b+12500)*a.b.j;if(0<a.b.i){if(b>a.b.i)return;b=a.b.i}b={cwndbw:(8*b/1024).toFixed(0)};Fk(a.i.b.j,b);Fk(a.a.b.j,b)}}function Iy(a,b,c){c-=2;c-=c*b*Zh(a.j);c=Math.max(a.b.J,Math.min(a.b.O,c));a=Math.max(a.b.L,Math.ceil(a.b.J*b));return Math.min(a,Math.ceil(c*b))}
function Jy(a,b){var c=Math.min(2.5,Yh(a.j));return Math.ceil(b*c+32768)}function Ky(a){var b=$h(a.j);a=Yh(a.j)+1048576*Zh(a.j);return b*Math.min(1,1048576/(b*a))}
function Ly(a,b){if(!b.i){if(!b.b.Yb())return;ny(b,a.k)}if(!(b.j>a.b.A)){var c=b.i;4==c.type&&c.a.Yb()&&(b.i=Ja(Uk(c.a,c)),c=b.i);if(!(c.b||!c.a.Jj(c)||c.a.info.i&&(4==c.type||a.a.i&&!a.a.i.b&&a.a.i.k<c.i))){var d=a.b.B;a.o&&0<a.b.b&&(d=Math.max(d,a.b.b/c.a.info.b));d=a.k+d;if(!(3==c.type&&c.k>d||2<=ty(b)+1)){var d=c.k-a.k,e=c.a.info.b,g=c.a.Yb()?Iy(a,e,d):a.b.I,h=Jy(a,c.a.info.b),k=!1,e=!1;if(c&&3==c.type&&b.b.Yb()&&c.a!=b.b){var d=Iy(a,b.b.info.b,d+(c.startTime+c.duration-c.k)),m=Jy(a,b.b.info.b),
e=c.a.info.b<b.b.info.b;if(!e||d>=m)k=!0,g=d,h=m}d=h;0<g&&(d=Math.max(a.b.I,g,Math.min(2*g,h)));if(k){c=b.i?b.i.startTime+b.i.duration+Dy:0;if(a.b.g&&e)t:{e=Yh(a.j)+d*Zh(a.j)+d/$h(a.j)+a.k+2,e=Math.min(e,c),e=Jk(b.b.index,e),e+1<b.b.index.hb()&&(c=b.b.index.b[e+1]),e=c;if(b.pendingRequests_.length){if(b.pendingRequests_[0].g[0].startTime<=e)break t;py(b)}for(g=b.a.length-1;0<=g;g--)h=b.a[g],h.info.startTime>e&&(b.a.pop(),b.a.length&&b.a[g-1].buffer==h.buffer||(b.j-=h.buffer.byteLength));ly(b)}b.i&&
!b.i.g&&(e=new uy(a.b,ry(b)),My(a,e,!0),iy(b,e));b.i&&(c=b.i?b.i.startTime+b.i.duration+Dy:0);d=new uy(a.b,b.b.Oj(c,d))}else d=new uy(a.b,c.ug(d));My(a,d,!1);iy(b,d)}}}}function My(a,b,c){c=c?2:1;a.b.P&&(c=0);var d=Math.min(2.5,Yh(a.j)),e=$h(a.j);b.b=new By(a.j,c,b.T.length,0.95*b.T.length-d*e);a=v(a.Nv,a);b.B=a;b.start()}
f.Nv=function(a){if(!this.ha()){var b=6==a.state&&vy(a);3==a.state||b?(b&&this.u("softerror",209),a.start()):5==a.state?(!this.J&&a.g[0].a.info.a&&(this.J=a.I),Ny(this),z(a.o,function(a){wk(a.info)&&a.info.a.Io(a)}),Pa(a.o,function(a){return Ck(a)})&&!a.g[0].a.Jo()?Ey(this):Oy(this,126)):7==a.state||4==a.state?(7==a.state&&this.u("softerror",210),Ey(this)):Oy(this,121)}};
function Ny(a){if(!a.O&&a.J&&window.performance&&window.performance.getEntriesByName){var b=window.performance.getEntriesByName(a.J);b.length&&(b=b[0],Fy("vrst",b.fetchStart),Fy("vdns",b.domainLookupEnd),Fy("vreq",b.requestStart),Fy("fvb",b.responseStart),Fy("vrc",b.responseEnd),a.O=!0)}}function Ey(a){isNaN(a.I)&&(a.I=H(v(a.Rf,a),0))}function Py(a){isNaN(a.G)&&(a.G=H(v(function(){this.Rf();this.G=NaN},a),1E3))}
f.Rf=function(){this.I=NaN;if(!this.L&&this.g){var a=Math.floor(Math.max(my(this.i),my(this.a)));isNaN(a)||(this.g.Xa(a),this.L=!0)}if(!this.ha())if("prerender"==window.document.webkitVisibilityState)Py(this);else{this.g&&this.g.Hb()&&Gy(this);jy(this.a);jy(this.i);qy(this.a);qy(this.i);a=!1;if(this.g){var a=Qy(this,this.a,this.g.rd),b=Ry(this.g.rd,this.k);if(!isNaN(b)||this.a.g&&this.a.g.b)this.a.g&&this.a.g.b&&(b=NaN),a|=Qy(this,this.i,this.g.Zb,b);if(this.a.g&&this.a.g.b&&this.i.g&&this.i.g.b&&
!this.g.Zb.updating&&!this.g.rd.updating&&this.g.isOpen()){a=this.g;a.isOpen()&&a.g.endOfStream();return}}this.hm();Ly(this,this.a);Ly(this,this.i);a&&(this.g.Zb.appendBuffer||Ey(this))}};f.hm=function(){if(!this.ha()&&!isNaN(this.b.F)){var a=Ky(this);!isNaN(this.A)&&Math.abs(this.A-a)/a<this.b.F||(Math.round(a/1024),Math.round(this.A/1024),this.u("bandwidthchange",a),jg("yt-player-bandwidth",{byterate:a},2592E3),this.A=a)}};
function Qy(a,b,c,d){if(c.updating)return!0;var e=b.a.length?b.a[0]:null;if(!e)return!1;!b.g||b.g.g||xk(b.g,e.info)||(b.g=null,a.g.isOpen()&&c.abort(),c.g=null);var g;e.info.a.Yb();e.a?g=!1:(g=e.info.a.b,c.g==g?g=!1:(Sy(a,c,g),c.g=g,g=!0));if(g&&c.updating)return!0;g=a.b.G;a.o&&0<a.b.b&&(g=Math.max(g,a.b.b/b.b.info.b));g=a.k+g;0<=d&&(g=Math.min(g,d));d=ky(b,g);if(!d)return!1;g=new Uint8Array(e.buffer,d.start,d.length);if(!Sy(a,c,g))return!1;for(var h;b.a.length;){if(b.a[0].T.end>d.end){h=b.a[0];var k=
d.end-b.a[0].T.start+1,k=Math.min(k,h.info.Ia);g=new vk(h.info.type,h.info.a,h.info.T,h.info.j,h.info.startTime,h.info.duration,h.info.nb,k,!1);a=ok(h.T.start,k);g=new Ak(g,h.buffer,a,h.a);k=new vk(h.info.type,h.info.a,h.info.T,h.info.j,h.info.startTime,h.info.duration,h.info.nb+k,h.info.Ia-k,h.info.b);a=new mk(a.end+1,h.T.end);a=[g,new Ak(k,h.buffer,a,!1)];h=a[0];b.a[0]=a[1]}else h=b.a.shift();a=b;a.g=h.info;a.k&&a.g.g&&(a.k=!1);if(h.T.end==d.end)break}b.a.length&&h.buffer==b.a[0].buffer||(b.j-=
h.buffer.byteLength);e.a&&(c.g=e.info.a.b);return!c.appendBuffer||c.updating}function Sy(a,b,c){if(b.appendBuffer)try{b.appendBuffer(c)}catch(d){return!1}else b.append(c);return!a.g.Hb()}function Ry(a,b){for(var c=0;c<a.buffered.length;c++)if(a.buffered.start(c)<=b&&a.buffered.end(c)>=b)return a.buffered.end(c);return NaN}function Ty(a,b){if(!a.ha()){var c=Uy(a,a.a,b,a.g&&a.g.rd),d=Uy(a,a.i,c,a.g&&a.g.Zb);a.k=Math.max(b,c,d);a.B=!0;Ey(a)}}
function Uy(a,b,c,d){if(b.b.Yb())if(d){if(a.o&&a.b.g)return oy(b),ny(b,c);var e=Ry(d,c),g=NaN,h=b.g;h&&(g=Ry(d,h.a.index.b[h.j]));if(e==g)return c;oy(b);b.b.info.a&&b.g&&!b.g.g&&!sy(b)&&(d=new uy(a.b,ry(b)),My(a,d,!0),iy(b,d));if(isNaN(e))return ny(b,c);ny(b,e+Dy)}else ny(b,c);else b.b.i?0!=c&&py(b):Vy(a,b,!1);return c}
function Vy(a,b,c){var d=c?65536:0;c&&!isNaN(a.b.k)&&(d=Math.floor(Math.max(d,a.b.k*b.b.info.b)));c=b.b.jo(d);z(c,function(a){var c=new uy(this.b,a);My(this,c,!0);!wk(a.a[a.a.length-1])&&iy(b,c)},a);b.b.i=!0}f.H=function(){Gy(this);py(this.i);py(this.a);this.a=this.i=null;Cy.C.H.call(this)};function Oy(a,b){a.u("fatalerror",b);if(a.g&&a.g.isOpen()){var c=a.g;c.isOpen()&&c.g.endOfStream("network")}a.dispose()}function Fy(a,b){var c;b&&(c=window.performance.timing.navigationStart+b);ts(a,c)};function Wy(){this.G=30;this.B=40;this.b=NaN;this.A=20971520;this.J=this.k=2;this.I=131072;this.O=15;this.L=2097152;this.F=0.1;this.o=2;this.g=!0;this.a=1800;this.i=this.j=NaN};function Xy(a,b,c){this.a=a;this.headers=b;this.message=c};function Yy(a,b,c,d,e,g,h){this.a=[];this.g=a;this.k=b.g;this.j=b;this.i=c;this.G=d;this.I=e;this.b=[];this.J=h||null;this.B=this.L=!1;this.A=null;this.o=!0;this.F={};this.listen(this.g,["keymessage","webkitkeymessage"],this.vj);this.listen(this.g,["keyadded","webkitkeyadded"],this.oq);this.listen(this.g,["keyerror","webkitkeyerror"],this.pq);g&&this.b.push(g)}y(Yy,Ol);function Nh(a,b){if(tk(b,pk)){for(var c in a.F)b=qe(ue(b,c),c,a.F[c]);a.k=b}else Zy(a,"u")}f=Yy.prototype;
f.start=function(){this.ha()||(this.L=!0,this.b.length&&this.vj(this.b.shift()))};f.dispose=function(){Yy.C.dispose.call(this);this.I=this.g=null};f.vj=function(a){this.ha()||a.sessionId!=this.i||(this.B&&a.defaultURL&&Nh(this,a.defaultURL),this.L?(this.A=a,$y(this,a)):this.b.push(a))};f.oq=function(a){this.ha()||a.sessionId!=this.i||(this.B=!0,this.b.length&&this.vj(this.b.shift()))};
function $y(a,b){var c={format:"RAW",method:"POST",Jw:b.message,responseType:"arraybuffer",withCredentials:!0,Qa:a.Kw,onError:a.Ln,Z:a};a.J&&(c.headers={Authorization:"Bearer "+a.J});var d=a.k;a.o||(d=qe(ue(d,"exclude_customdata"),"exclude_customdata","1"));Vj(d,c)}
f.Kw=function(a){if(!this.ha())if(0!=a.status&&a.response){t:{a=new Uint8Array(a.response);var b=0,c=String.fromCharCode.apply(String,a.subarray(0,16384)).split("\r\n"),d=c[0];$a(c,0);c.pop();var b=b+(d.length+2),e=d.match(/^GLS\/1.\d ([0-9]{1,3}) (\w+)$/);if(null!=e){d=e[1];isFinite(d)&&(d=String(d));for(var d=u(d)?/^\s*-?0x/i.test(d)?parseInt(d,16):parseInt(d,10):NaN,g={},h=0;h<c.length;h++){e=c[h];b+=e.length+2;if(0==e.length){a=new Xy(d,g,a.subarray(b));break t}e=e.match(/([^:]+):\s+([^]+)/);
if(null==e)break;g[e[1]]=e[2]}}a=null}0!=a.a?(b=ix[a.a.toString()],Zy(this,"f"+a.a,b?b:"ERROR_LICENSE")):(a=a.message,this.g.addKey?this.g.addKey(this.j.a,a,this.G,this.i):this.g.webkitAddKey(this.j.a,a,this.G,this.i))}else this.Ln(a)};f.pq=function(a){this.ha()||a.sessionId!=this.i||("playready"==this.j.b&&a.errorCode==a.MEDIA_KEYERR_UNKNOWN&&2==a.systemCode&&this.o?(this.o=!1,$y(this,this.A)):Zy(this,"s"+a.errorCode.code+"."+a.systemCode))};f.Ln=function(a){Zy(this,"r"+a.status)};
function Zy(a,b,c){a.ha()||a.I(b,c);a.dispose()};function az(a,b,c,d){this.a=[];this.b=a;this.g=b;this.B=c;this.o=d;this.A=null;this.j={};this.F={};this.i=null;this.k=[];this.listen(this.b,["needkey","webkitneedkey"],this.G);this.listen(this.b,["keymessage","webkitkeymessage"],this.J);this.listen(this.b,["keyerror","webkitkeyerror"],this.I)}y(az,Ol);az.prototype.dispose=function(){az.C.dispose.call(this);this.b=null;Jb(this.j,function(a){a.dispose()})};
az.prototype.G=function(a){a=a.initData;if(!this.i&&Pb(this.j)||"widevine"!=this.g.b){var b=String.fromCharCode.apply(String,a);if(!this.F[b]){this.F[b]=!0;b="clearkey"==this.g.b;if(112==a[4]&&115==a[5]&&115==a[6]&&104==a[7]&&b){t:{for(var c=new DataView(a.buffer),b=0;b<c.byteLength;){var d=c.getUint32(b,!1);if(1886614376!=c.getUint32(b+4,!1))break;if(1477738184==c.getUint32(b+12,!1)&&69420633==c.getUint32(b+16,!1)&&2464609580==c.getUint32(b+20,!1)&&1558758348==c.getUint32(b+24,!1)){c=c.getUint32(b+
28,!1);if(16!=c)break;a=a.subarray(b+32,b+32+c);break t}b+=d}a=null}if(!a)return}this.i?this.k.push(a):bz(this,a)}}};function bz(a,b){if(!a.ha()){try{a.b.generateKeyRequest?a.b.generateKeyRequest(a.g.a,b):a.b.webkitGenerateKeyRequest(a.g.a,b)}catch(c){var d="g";c instanceof DOMException&&(d+=c.code);a.o(d,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",!0);return}a.i=b}}
az.prototype.J=function(a){if(!this.ha()&&this.b&&!this.j[a.sessionId]){var b=new Yy(this.b,this.g,a.sessionId,this.i,this.o,a,this.A);this.j[a.sessionId]=b;this.i=null;this.B(b);this.k.length&&bz(this,this.k.shift())}};az.prototype.I=function(a){!this.ha()&&this.b&&(this.j[a.sessionId]||this.o("s"+a.errorCode.code+"."+a.systemCode))};function cz(a,b,c,d){this.ka=a;this.a=b;this.g=c;this.b=d};function dz(a){this.a=a}function ez(a,b){var c=b.ef;return c&&c&&"unknown"!=c?c:(c=a.a.Hh)&&c&&"unknown"!=c?c:"auto"}
function fz(a,b,c){var d,e=ez(a,b);if(e&&"auto"!=e&&(d=null,e=kk.indexOf(e),0<=e))for(;e<kk.length&&!(d=zm(b,kk[e]));e++);if(!d){d=b.k;var g;a.a.Qc?(e=a.a.Qc.clone(),Wi&&!a.a.Ah&&(e=(window.screen&&window.screen.width?new B(window.screen.width,window.screen.height):null)||e),e.scale(Wi||ac?window.devicePixelRatio||1:1),g=a.a.Gh||e):g=a.a.Gh;t:{e=a=0;null!==g&&(a=g.width,e=g.height);g=16/9;a>Math.round(g*e)&&(a=Math.round(g*e));a*=e;g=null;for(e=0;e<d.length;e++){g=d[e];var h=g.getInfo(),h=h.a.width*
h.a.height*("medium"==g.Re()?0.26:0.85)>a,k=!0;g.a&&c&&(k=g.b.info.b+g.g.info.b<c);if(!h&&k){c=g;break t}}c=g}c||(c=b.k[0]);d=c}return d};function gz(){this.b=this.a=NaN}function hz(a,b,c){if(a.a==b)return 500<c-a.b;a.a=b;a.b=c;return!1};var iz=[102,107,108];var ih=[0.25,0.5,1,1.5,2];function jz(a,b){this.state=a;this.a=b}function Wo(a,b){return P(a.state,b)&&!P(a.a,b)?1:!P(a.state,b)&&P(a.a,b)?-1:0};function kz(a,b){R.call(this);this.ja=new gz;this.A=new Cj(v(this.getCurrentTime,this),v(this.nq,this),v(this.eg,this));L(this,this.A);this.O=NaN;this.P=this.I=null;this.o=a;this.va=new dz(a);this.ia=NaN;this.ga=!1;this.g=this.k=null;this.Q=[];this.U=!1;this.fa=NaN;this.i=new xj;this.B=b;this.J=this.X=null;this.G=NaN;this.L=new Zo(this);this.b=this.a=null;this.aa=NaN;this.j=null}y(kz,R);f=kz.prototype;
f.H=function(){I(this.aa);I(this.ya);nf(this.fa);lz(this);Hn(this);Yg(this.k,this.J,this.L,this.a);this.a=this.L=this.i=this.k=this.P=this.ja=null};
function mz(a,b){a.U=!1;a.O=NaN;a.b&&rj(a.b);nz(a);lz(a);Yg(a.k,a.a);a.k=null;a.A.reset();if(2==a.B||tk(a.o.Q,qk))b.aa=!1,b.An=!0;a.a=b;a.a.D("dataupdated",a.au,a);a.a.D("dataloaded",a.Zt,a);a.a.D("onStatusFail",a.Yt,a);if(b.of&&b.of>b.xa){var c=b.of;a.P&&(a.Wh(a.pa),a.pa=null);a.P=new di(1E3*c,2147483646);a.P.xb.D("onEnter",a.lg,a);a.Ek(a.P)}oz(a,"newdata")}function lz(a){nf(a.ia);a.j&&(Xg(a.j),a.j=null)}f.getVideoData=function(){return this.a};f.K=function(){return this.o};
function pz(a){return!(!a.a||!a.a.k.length)}function qz(a){if(a.a&&(a.a.M||a.a.hf))return!0;px(a,2);return!1}function rz(a){a.U||(sz(a,zj(new xj,8)),a.j&&tz(a.j),a.U=!0,!qz(a)||a.a&&a.a.Ue||uz(a,v(function(){if(pz(this))vz(this);else if(!this.a.Ue)if(wz(this))vz(this);else{var a=$x(this.o,this.a);Em(this.a,a)}},a)))}function xz(a){if(!a.Q.length){if(!a.A.tg){var b=a.A;b.g=Hj(b);b.tg=!0;b.Xb()}a.Q.length||0<Ni(a.A.b,-2147483648).length||a.u("playbackready",a)}}
f.xr=function(){var a=this.j,b=this.a.Wj;a.U!=b&&(yz(a,{metric:"heartbeat",tpmt:this.a.Ae}),a.U=b)};function vz(a){a.Q=cb(a.a.I);a.a.eb&&(zz(a,a.a.ta),Az(a,!0));kh(a,"i");a.u("playbackdataloaded")}f.lg=function(a){Bz(this);sz(this,!1==a?new xj:new xj(Bj()))};function Gh(a,b,c){b={event:"streamingerror",ec:b,v:a.a.M};c&&(b.em=c);w(b,Zx(a.o));a.j&&Cz(a.j,b,void 0)}function px(a,b,c,d){if(Nb(hx,c))var e=c;else var g=c;sz(a,yj(a.i,128,{errorCode:b,errorDetail:d,message:g,messageKey:e}))}
function Dz(a,b){a.Q=a.Q.filter(function(a){return b!=a});xz(a)}f.eg=function(){return P(this.i,8)&&!P(this.i,64)&&!P(this.i,2)};function wz(a){return!(!a.a||!a.a.M&&!a.a.hf||a.a.M)}f.nq=function(){return this.i};function Ez(a,b){a.b&&Hn(a);a.b=b;Fz(a)}function Hn(a){a.g=null;a.b&&(nz(a),a.L.removeAll(),rj(a.b),a.b=null)}
function Gz(a){if(a.b){var b=Am(a.a);if(a.a.o&&a.a.o.a){var c=a.a.o,b=c.g,c=c.b;a.g||(a.g=new Pl(a.b,a.a.ta,b.info.lb,c.info.lb),b=a.g,b.b||(b.b=b.g.en?b.g.a.webkitMediaSourceURL:window.URL.createObjectURL(b.g)),a.za=new Vl(b.b,!1,!0),b=v(a.k.kt,a.k),a.g.j=b);b=a.za}a.b.xd!=b?Hz(a,b):(P(a.i,64)&&sz(a,zj(a.i,8)),pj(a.b),a.a.Eb&&!a.a.eb&&Iz(a,Infinity))}}
function kh(a,b,c){if(!a.ha()&&pz(a)&&!P(a.i,128)){var d="m"==b,e="m"==a.a.ld;if(d||!e){d&&"auto"==c&&(b="a",d=!1);c&&(a.a.ef=c);var g=NaN;!a.X||a.o.ya||a.o.th||(g=a.k?Ky(a.k):$h(a.X),"i"==b&&(g=a.o.Kc?0.4*g:0.6*g));var h=fz(a.va,a.a,g),g=h.getInfo(),k=h.a?h.b.info:g;if(a.a.a!=g||a.a.pa!=k||d!=e){a.a.o=h;a.a.a=g;a.a.pa=k;a.a.ld=b;c&&(a.a.ef=c);if(h.a)if(a.k){var m=a.k,h=h.g;c=d;m.ha()||(m.o=c,m.a.b!=h&&(m.a.b=h,Hy(m),c&&oy(m.a),h.i||Vy(m,m.a,!1),Ey(m)))}else{c=a.o;e=new Wy;if(c.ya||c.th)e.F=NaN;c.kd&&
(e.o=0);c.jd&&(e.k=3);c.Nl&&(e.J=1,e.I=49152);c.Hc&&(e.O=30);c.pe&&(e.a=700);c.lc&&(e.j=3);c.mc&&(e.j=1.5,e.i=1048576);c.Jc&&(e.b=62914560);"play"==c.Ca&&(e=Qb(e),e.G=10,e.B=20,e.b=NaN,e.A=10485760,e.L=1048576,e.g=!1,c.Zf&&(e.g=!0));Zi&&hj("crkey")&&(c=Qb(e),c.k=3.5,c.G=20,c.B=40,c.A=20971520,c.g=!0,c.a=700,c.o=2,e=c);c=e;a.a.Sa&&(c.a=NaN);a.k=new Cy(a.X,c,h.b,h.g);a.k.D("bandwidthchange",a.kq,a);a.k.D("fatalerror",a.lq,a);a.k.D("softerror",a.mq,a);h=a.k;c=(c=a.a.xa)||0;Hy(h);0==c&&(h.a.b.i||Vy(h,
h.a,!0),h.i.b.i||Vy(h,h.i,!0));Ty(h,c);Fy("gv");H(v(h.hm,h),0);t:{for(m in Ql)if(!!Sl(m)!=Ql[m]){m=!1;break t}m=!0}m||Gh(a,211)}else a.eg()&&Gz(a);m=b;a.j&&(h=fz(a.va,a.a),b=a.j.i,g=new cz(a.a,g,m,h.ue.Pa),Jz(b,"vfs",[g.a.Pa,g.b,b.A,g.g]),b.A=g.a.Pa,g=Jw(b.a),0<g.width&&0<g.height&&Jz(b,"view",[Math.round(g.width),Math.round(g.height)]),Jz(b,"vps",[b.g]),b.ig());a.u("internalvideoformatchange",a.a,d)}}}}f.kq=function(){kh(this,"a")};f.lq=function(a){px(this,a)};f.mq=function(a){Gh(this,a);if(this.j)this.j.onError(a)};
function Bz(a){P(a.i,64)&&sz(a,yj(a.i,a.i.b&-9));a.b&&a.b.pause()}function Iz(a,b,c,d){if(a.b){if(a.b){b=b||0;var e=1>a.b.seekable.length?NaN:a.b.seekable.end(a.b.seekable.length-1);a.k&&!isNaN(Math.floor(Math.min(my(a.k.i),my(a.k.a))))&&(e=Math.floor(Math.min(my(a.k.i),my(a.k.a))));b>e&&(b=e,Az(a,!0));0>b&&(b=0)}else b=0;a.a.xa=b;a.G=b;c?a.oi():(Kz(a),d&&(a.J||(a.J=new bp(a.oi,d,a)),a.J.start()),Lz(a,!0));a.P&&b>a.a.of&&(a.Wh(a.pa),a.pa=null);a.u("seekto",a,b)}else a.a.xa=b||0}
function Kz(a){P(a.i,32)||(sz(a,zj(a.i,32)),P(a.i,8)&&Bz(a),a.u("beginseeking",a))}f.oi=function(){if(!isNaN(this.G)&&this.b){var a=this.od();!this.a.Eb&&this.G>=Math.floor(a)?(this.G=a,this.u("endseeking",this),Bz(this),this.lg()):(this.k&&Ty(this.k,this.G),nj(this.b,this.G))}this.J&&(this.J.dispose(),this.J=null);P(this.i,32)&&(sz(this,yj(this.i,this.i.b&-33)),this.u("endseeking",this))};
f.getCurrentTime=function(){if(!isNaN(this.G))return this.G;var a=0;this.b?a=this.b.getCurrentTime():this.a&&(a=this.a.se);return a};f.od=function(){var a=0;this.b&&(a=this.b.Rd);0==a&&this.a&&(a=this.a.ta);return a};f.zq=function(){var a=new fy;if(this.X){var b=this.X;a.g=b.i;a.j=b.j;a.a=$h(b)}this.k?(b=this.k,b.g&&(a.b=gy(b.g.rd.buffered,b.k),a.i=gy(b.g.Zb.buffered,b.k)),a.a=Ky(b),$h(b.j),Yh(b.j),Zh(b.j)):this.b&&(a.b=gy(this.b.buffered,this.getCurrentTime()));return a};
function Mz(a,b){var c=isNaN(b)?a.getCurrentTime():b,d=a.od();return Infinity==d?1:d?c/d:0}f.Bq=function(){var a;if(this.a){a=this.a;var b={};a.a&&(b.fmt=a.a.Pa,a.pa&&(b.afmt=a.pa.Pa));a.Q&&(b.threed=a.Jc);b.plid=a.fb;b.ei=a.j;b.list=a.Oa;b.cpn=a.Ea;a.M&&(b.v=a.M);a.Aj&&(b.infringe=1);a.Ld&&(b.splay=1);a.Eb&&(b.live=a.eb?"dvr":"live");a.ff&&(b.autoplay=1);a.ja&&(b.sdetail=a.ja);a.md&&(b.partnerid=a.md);a=b}else a={};return a};
function Nz(a,b){var c={};if(b){if(a.j){var d=Oz(a.j);d&&w(c,d.Rh())}a.b&&w(c,{vct:a.b.currentTime.toFixed(3),vd:a.b.duration.toFixed(3),vpl:uj(a.b.played),vbu:uj(a.b.buffered),vpa:a.b.paused,vsk:a.b.seeking,vpr:a.b.playbackRate,vrs:a.b.readyState,vns:a.b.networkState,vec:a.b.error?a.b.error.errorCode:null});if(a.k){var d=a.k,e={lct:d.k.toFixed(3),lsk:d.B,lmf:d.o,lbw:$h(d.j).toFixed(3),lhd:Yh(d.j).toFixed(3),ltd:Zh(d.j).toFixed(3),laa:d.i.g?zk(d.i.g):"",lva:d.a.g?zk(d.a.g):"",lar:d.i.i?zk(d.i.i):
"",lvr:d.a.i?zk(d.a.i):""};d.g&&!d.g.Hb()&&(e.lab=uj(d.g.Zb.buffered),e.lvb=uj(d.g.rd.buffered));w(c,e)}P(a.i,384)&&(c.debug_error=a.i.a)}c.debug_videoId=a.a.M;return c}f.Ek=function(a){this.A.mx(a)};f.Wh=function(a){this.A.nx(a)};f.Zt=function(a){this.u("commoninfoloaded",a);oz(this,"dataloaded");uz(this,v(function(){this.U&&vz(this)},this))};f.au=function(){oz(this)};f.Yt=function(a){px(this,parseInt(a.errorcode,10),unescape(a.reason),a.errordetail)};
function oz(a,b){a.u("internalvideodatachange",b||"dataupdated",a,a.a)}function uz(a,b){if(pz(a))a.o.Na?b():H(b,0);else{var c=a.a;c.B?vm(c,b,!!a.o.Kh,!("play"==a.o.Ca&&!a.o.Na)):xm(c,b)}}function Fz(a){z("loadstart loadeddata loadedmetadata play playing pause ended suspend progress seeking seeked timeupdate durationchange error waiting abort".split(" "),function(a){this.L.listen(this.b,a,this.Tv)},a)}
f.Tv=function(a){var b=a.target;if(b==this.b&&b.currentSrc){switch(a.type){case "durationchange":this.a.eb||(b.Xa(b.duration||0),b=b.Rd,(!this.g||isFinite(b)&&0<b)&&zz(this,b));break;case "ended":sz(this,yj(this.i,4));break;case "loadedmetadata":this.a.xa&&(this.b.currentTime=this.a.xa),this.o.im&&this.a.xa&&(this.O=this.a.xa,this.b.pause());case "loadeddata":this.aa&&I(this.aa);break;case "loadstart":nf(this.fa);this.fa=mf(v(this.ln,this),100);var b=this.L,c=this.b,d=v(this.ln,b.Kg),c=Bf(c,d);b.ae.push(c);
break;case "progress":this.O&&this.b.seekable.length&&this.b.seekable.end(0)>this.O&&(this.b.currentTime=this.O,this.O=NaN,this.ma=this.L.listen(this.b,"canplay",this.ut));case "suspend":Lz(this);this.u("onLoadProgress",this,this.b?mh(this.b):0);break;case "seeking":Pz(this);break;case "timeupdate":Pz(this),Lz(this),this.u("onVideoProgress",this,b.getCurrentTime())}this.u("videoelementevent",a);t:if(b=this.i,d=this.ja,P(b,128))a=b;else{var c=b.b,e=b.a,g=a.target;switch(a.type){case "ended":if(0>=
g.networkState)break;c=Bj();e=null;break;case "pause":P(b,32)||P(b,2)||(c=4,P(b,1)&&P(b,8)&&(c|=1),e=null);break;case "playing":c=8;e=null;break;case "abort":if(64==c)break;case "error":c|=256;a=g.error;d=107;if(a&&a.code)switch(a.code){case a.MEDIA_ERR_ABORTED:d=200;break;case a.MEDIA_ERR_NETWORK:d=201;break;case a.MEDIA_ERR_DECODE:d=202;break;case a.MEDIA_ERR_SRC_NOT_SUPPORTED:d=203}e={errorCode:d};Va(wj,e.errorCode)&&(c|=128);break;case "canplay":c&=-2;break;case "progress":P(b,8)&&(g=a.target.getCurrentTime(),
d&&hz(d,g,a.timeStamp)&&(c|=1));break;case "seeked":c&=-18;break;case "seeking":c|=16;g.inUnbufferedArea()&&(c|=1);c&=-3;break;case "waiting":P(b,2)||(c|=1);break;case "timeupdate":P(b,16)||(c&=-2);c&=-65;break;default:a=b;break t}a=yj(b,c,e)}sz(this,a)}};
f.ln=function(){if(this.b&&0<this.b.getCurrentTime()&&0<this.b.Rd&&!this.a.Im){nf(this.fa);this.a.Im=!0;if(this.j){var a=this.j;if(!a.g){var b=Oz(a,"playback");a.a.dm&&(a.L=[10+a.a.Yf,10,10,40+a.a.sh-a.a.Yf,40],nf(a.I),a.I=NaN,a.I=mf(v(a.ja,a),100),b.cg=Qz(a,!0));b.dg=!0;b.A=a.j();b.send();if(a.b.Pc&&!a.g){var b=a.b,c=a.a,b={noflv:"1",html5:"1",video_id:c.M,cpn:c.Ea,plid:c.fb,ei:c.j,referrer:by(b),eurl:b.b,framer:b.P,feature:b.j,fmt:c.a?c.a.Pa:0,ptk:c.A,skl:c.fm,access_token:c.G,ucid:c.Ic};w(b,Rz(a));
b=S(a.b.jb+"user_watch",b);sa(b)}a.a.A&&sa(S(a.b.jb+"ptracking",{html5:"1",video_id:a.a.M,cpn:a.a.Ea,plid:a.a.fb,ei:a.a.j,ptk:a.a.A,oid:a.a.nc,ptchn:a.a.ib,pltype:a.a.lc,content_v:a.b.k}));if(a.a.bm&&a.b.ze&&!a.g){var b=a.b,c=a.a,d={noflv:1,video_id:c.M,cpn:c.Ea,el:b.Y,ps:b.Ca,referrer:by(b),eurl:b.b,framer:b.P,fmt:c.a?c.a.Pa:0,ptk:c.A,subscribed:c.g,t:c.kd};b.Tb&&(d.autoplay="1");c.Ld&&(d.splay="1");0<c.xa&&(d.start=1E3*c.xa);c.nj&&(d.tmi="1");b=S(a.Q,d);sa(b)}a.a.fg&&yz(a,{metric:"playback"});a.g=
!0}}nf(this.ia);this.a.fg&&(this.j.g||this.a.am)&&(this.ia=mf(v(this.xr,this),3E4));this.u("playbackstarted")}};f.ut=function(){this.ma&&(this.L.cc(this.ma),this.ma=void 0,pj(this.b))};
function Lz(a,b){if(a.b){var c=a.getCurrentTime();if(a.k){var d=a.k;if(!d.B||d.k<=c&&c<d.k+10)d.k=c,d.B=!1;Py(d)}a.a.eb&&c>a.od()&&(d=a.od(),0==d&&(d=c),zz(a,1.2*d));var d=Mz(a),e=0;a.b.buffered&&0<a.b.buffered.length&&(a.a.eb?a.ga||(e=(1>a.b.seekable.length?NaN:a.b.seekable.end(a.b.seekable.length-1))/a.od()):e=a.b?mh(a.b):0);5<c&&(a.a.xa=c);a.ya&&I(a.ya);a.b.paused||a.b.ended||(a.ya=a.b.played&&0==a.b.played.length?H(v(a.cn,a),100):H(v(a.cn,a),1E3));a.a.se=c;if(!b&&a.eg()){var g=a.a.Wj,h=a.a.se;
0<g&&h>g&&(a.a.Ae+=h-g);a.a.ta&&a.a.J&&a.a.Ae>=a.a.J&&(g=a.j,g.g&&g.a.J&&(h=Oz(g,"delayplay"),h.fj=!0,h.A=g.j(),h.send()),a.a.J=NaN)}if(a.a.$l&&(g=a.a.ck,h=a.a.se,1==g&&0<h||2==g&&20<=h||3==g&&30<=h)){g=a.j;if(g.g){var h=g.b,k=g.a,g={ns:"yt",html5:"1",docid:k.M,plid:k.fb,ei:k.j,cpn:k.Ea,fmt:k.a?k.a.Pa:0,el:h.Y,ps:h.Ca,subscribed:k.g,yttk:"1",st:g.j(),et:g.j(),ctp:k.ck,vid:h.aa},g=S("//s2.youtube.com/s",g);sa(g)}a.a.ck++}a.u("progresssync",a,c,d,e,b);a.a.Wj=c}}
f.cn=function(){this.b&&(this.b.fp(),P(this.i,8)&&hz(this.ja,this.getCurrentTime(),Date.now())&&sz(this,zj(this.i,1)),Lz(this))};
function sz(a,b){if(b.b!=a.i.b||b.a!=a.i.a){var c=new jz(b,a.i);a.i=b;a.o.ng&&P(b,8)&&0<Wo(c,256)&&201==b.a.errorCode&&setTimeout(v(function(){this.b&&(this.a.o&&!this.a.o.a&&this.b.load(),Gz(this))},a),500);0>Wo(c,8)&&Az(a,!1);0<Wo(c,32)&&Az(a,!1);a.a&&a.a.Eb&&a.a.eb&&P(c.state,2)&&(zz(a,a.getCurrentTime()),Lz(a,!0));P(b,256)&&Sz(a,b);a.j&&Tz(a.j,c);Fj(a.A,c);a.u("statechange",c)}}
function Sz(a,b){var c=b.a;nf(a.ia);if(a.a&&a.a.fg&&Va(iz,c.errorCode)){var d=a.j,c=c.errorCode;d.X||(d.X=new go("error-__ec__"));c={metric:ko(d.X,{ec:c})};yz(d,c)}}function Pz(a){P(a.i,2)||P(a.i,32)||(a.G=NaN)}function Az(a,b){a.a&&a.a.eb&&a.ga!=b&&(a.ga=b,a.u("liveviewshift",b))}function Hz(a,b){a.o.za&&tj(a.b,b.a||tk(b.b,pk));lj(a.b,b);a.g&&!b.a&&(a.g=null);a.a.a&&a.a.a.g&&Uz(a);I(a.aa);a.aa=H(v(a.ru,a),15E3);a.o.km?H(v(function(){pj(this.b)},a),0):pj(a.b)}
function Uz(a){var b=a.a.a&&a.a.a.g||null;b&&!a.I&&a.b&&((b=Jl(a.b,a.a.a.lb,b))?(a.I=new az(a.b,b,v(a.ou,a),v(a.nu,a)),a.I.A=a.a.G,L(a,a.I)):px(a,203,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK"))}function nz(a){a.I&&(a.I.dispose(),a.I=null)}f.ou=function(a){var b=Zx(this.o);b.cpn=this.a.Ea;this.a.U&&(b.vvt=this.a.U);Tb(a.F,b);Nh(a,a.k);this.u("newlicensesession",a)};f.nu=function(a,b,c){px(this,c?5:206,q(b)?b:"ERROR_LICENSE",a)};f.ru=function(){Gh(this,102);if(this.j)this.j.onError(102);this.u("loadsofttimeout")};
function zz(a,b){a.b&&a.b.Xa(b);a.a.ta!=b&&(a.a.ta=b,oz(a))};function Vz(){}ca(Vz);f=Vz.prototype;f.jc=null;f.Pi=null;f.load=function(a){if(this.jc)return Eo(this.jc);this.jc=new xo;this.Pi=a?a:"3";Do(Go("3.1"==this.Pi?"//s0.2mdn.net/instream/html5/ima3.js":"//s0.2mdn.net/instream/html5/ima.js",{timeout:1E4}),this.Kx,this.Qp,this);return this.jc};f.getVersion=function(){return this.Pi};f.Kx=function(){"3.1"==this.Pi&&this.jc?this.jc.b():(google.ima.SdkLoader.setCallbacks(v(this.jc.b,this.jc),v(this.Uv,this)),google.ima.SdkLoader.load("3",void 0))};
f.Uv=function(a){this.Qp(Error("Google Ads SDK Failed to load: "+a))};f.Qp=function(a){this.jc.a(a)};function Wz(a){return a?-1!=a.toString().search(/(?:true|1)/i):!1}function Xz(a,b){if(a){var c="getErrorCode"in a?a.getErrorCode():null;c?b.error_code=c:(c=a.message,50<c.length&&(c=c.substring(0,47)+"..."),b.error_message=c)}}function Yz(a,b){if(a&&"3.1"==Vz.getInstance().getVersion()){var c=a.getAdId();if(c){var d=a.getWrapperAdIds()||[];b.ad_id=bb(d,c).join(",");if(c=a.getAdSystem())d=a.getWrapperAdSystems()||[],b.ad_sys=bb(d,c).join(",");a.isSkippable()&&(b.skip=1)}}}
function Zz(a,b){if(a[b])return Wz(a[b]);var c=b.toLowerCase(),d;for(d in a)if(d&&d.toLowerCase()==c)return Wz(a[d]);return!1}function $z(a){var b="";a&2&&a&1?b="video":a&2?b="skippablevideo":a&1&&(b="standardvideo");a&4&&(b&&(b+="_"),b+="text_image_flash");return b};function aA(){var a=n("yt.www.watch.ads.handleSetAfvCompanionVars");a&&a()}function bA(a){var b=n("yt.www.watch.ads.handleMoveGutCompanion");b&&b(1==a?!0:!1)}function cA(a){var b=n("yt.www.watch.ads.handleShowAfvCompanionAdDiv");b&&b(0<(a&3))}function dA(){var a=n("yt.www.watch.ads.handleHideCompanion");a&&a()};function eA(a,b){return Va(a.o,b)};function fA(a,b){this.a=a;this.g=b}fA.prototype.j=null;fA.prototype.b=NaN;function gA(a,b,c){a.a.u("AD_LOGGING_EVENT",b,c)}function hA(a){iA(a);var b=jA(a);if(a.i){var c=kA(a.g),d=a.i.y-c.top,d=Math.round(a.i.x-c.left)+"x"+Math.round(d);b.ck_xy=d;b.ck_wh=c.width+"x"+c.height}gA(a,15,b)}function lA(a){iA(a);var b=jA(a);if(isNaN(a.b))iA(a);else{var c=x()-a.b;b.ad_stl=c}gA(a,4,b)}function mA(a){iA(a);var b=jA(a),c=a.a.ep();c?b.ad_fmt=c:iA(a);gA(a,5,b)}
function jA(a){var b={},c=a.a.ka,d=a.a.xf(),e=a.a.Mo();Yz(a.a.Pg(),b);d&&0<d&&(b.ad_len=d);c&&c.M?b.ad_v=c.M:e&&(c=Nj(e),b.ad_dom=c,a.g.da.k||eA(a.g.K(),"921806")||eA(a.g.K(),"921805"))&&(b.ad_v_url=e);b.at=a.a.getType();return b}function iA(a){a.j||(a.j="InstreamAdDisplay ("+a.a.getType()+")")};function nA(a,b,c,d){R.call(this);this.a=b;this.a.D("onVolumeChange",this.qt,this);this.a.D("control_toggle_play_pause",this.dn,this);this.a.D("control_play",this.Oh,this);this.a.D("control_pause",this.bk,this);this.b=c;this.j=d;this.i=new fA(this,this.a);this.o=a+"_2";this.g=new Zo(this)}y(nA,R);f=nA.prototype;f.ab=null;f.ka=null;f.Mf=!1;f.Tg=null;f.Sg=null;f.Wg=null;
f.show=function(){this.i.b=x();var a="";if("3.1"==oA())a=this.j;else{var b=null;try{b=this.b.getSelectedCreative(),a=b.getMediaUrl("video/x-flv")||b.getMediaUrl("video/mp4")||b.getMediaUrl("video/webm")}catch(c){pA(this,c);return}}if(a){b=Lj(a);b=b.v||b.video_id;if(!b){var d=ke(a).match(/^\/watch\/([^\/]*)$/i);d&&(b=d[1])}b||(a=a.match(/yt_vid\/([a-zA-Z0-9_-]{11})/),null!=a&&1<a.length&&(b=a[1]));a=b?new rh({video_id:b,dash:"0"}):null}else a=null;this.ka=a;var e;this.ka?(this.ka.Ld=!0,e={video_id:this.ka.M},
this.ka.D("onStatusFail",this.Gn,this),this.ka.D("dataloaded",this.Fn,this),a=this.a.K(),a=new Tx(a.a),a.Y="adunit",a.Tb=!0,a=$x(a,this.ka),Em(this.ka,a)):qA(this);rA(this.a,-1,e);this.gn()};function sA(a){a.ka&&(a.ka.$("onStatusFail",a.Gn,a),a.ka.$("dataloaded",a.Fn,a))}f.Fn=function(){sA(this);var a=this.a.K(),b=this.ka,c=v(this.wv,this);b.B?vm(b,c,!!a.Kh,!1):xm(b,c)};
f.wv=function(){var a=fz(new dz(this.a.K()),this.ka);a?(a=a.i)?(a=new ve(mj(a)),a.a.set("autoplay","1"),a=a.toString(),"3.1"==oA()?this.b.setMediaUrl(a):this.b.getSelectedCreative().setMediaUrl(a),qA(this)):pA(this,Error("Failed to determine ad media resource.")):pA(this,Error("Failed to determine ad media format."))};
function qA(a){bA(1);cA(1);a.a.K();var b=a.a.b,c=Gn(b);b.W.K().ub||dd(c)||Cn(b).appendChild(c);a.ab=c;a.Wg=Q(a.a.a);a.a.da.L?F(E("video-ad-status-bar")):(b=Q(a.a.a),a.Tg=E("video-ad-time-left",b),b=E("html5-ad-progress-list",b),c=Zc("div"),Tm(c,["html5-ad-progress","html5-progress-section"]),b.appendChild(c),a.Sg=c,a.g.listen(a.ab,"timeupdate",a.iu));Tm(a.Wg,["ad-showing","ad-interrupting"]);a.g.listen(Fn(a.a.b),"mouseup",a.mu);a.g.listen(a.ab,"waiting",a.gn);a.a.D("onResize",a.Fk,a);try{a.g.listen(a.b,
google.ima.AdErrorEvent.Type.AD_ERROR,a.ku);a.g.listen(a.b,google.ima.AdEvent.Type.CLICK,a.ju);a.g.listen(a.b,google.ima.AdEvent.Type.COMPLETE,a.lu);a.g.listen(a.b,google.ima.AdEvent.Type.PAUSED,a.Pn);a.g.listen(a.b,google.ima.AdEvent.Type.STARTED,a.Qn);a.Fk();var d=a.a,e=d.b,g=tA(d);e.W.K().ub&&(Ed(e.a,g),td(e.a,0,0));a.b.start()}catch(h){pA(a,h)}}
f.Qn=function(){this.Mf=!0;this.k||(this.k=!0,lA(this.i),uA(this.a,1));if(0==this.xf()){var a=this.ab;a.Xa(a.duration||0)}this.a.kb(!0);rA(this.a,1);this.u("adPlay",this)};f.Pn=function(){this.Mf=!1;this.a.kb(!1);rA(this.a,2)};f.lu=function(){mA(this.i);this.Mf=!1;rA(this.a,0);uA(this.a,2);this.u("adEnd",this)};f.ku=function(a){pA(this,a.getError())};function pA(a,b){a.Mf=!1;rA(a.a,0);a.u("adError",b)}f.Gn=function(){sA(this);pA(this,Error("Request to get video data failed."))};
f.ju=function(){hA(this.i);"3.1"==oA()||this.a.da.Q||H(v(this.Oh,this),0);this.u("select")};f.mu=function(a){a=new A(wf(a),xf(a));this.i.i=a};f.iu=function(){var a=Sn(this.b.getRemainingTime());this.Tg.innerHTML=a;0==this.xf()&&(a=this.ab,a.Xa(a.duration||0));a=this.xf()?this.ab.getCurrentTime()/this.xf():0;a=Math.round(1E3*a)/10;this.Sg.style.width=a+"%"};f.gn=function(){!this.Mf&&this.k||rA(this.a,3)};
f.H=function(){this.a.$("control_toggle_play_pause",this.dn,this);this.a.$("control_play",this.Oh,this);this.a.$("control_pause",this.bk,this);this.a.$("onResize",this.Fk,this);this.g.removeAll();sA(this);this.b.destroy();this.ab&&(Dn(this.a.b),this.ab=null);this.Tg&&(this.Tg.innerHTML="",this.Tg=null);this.Sg&&(F(this.Sg),this.Sg=null);this.Wg&&(Um(this.Wg,["ad-showing","ad-interrupting"]),this.Wg=null);nA.C.H.call(this)};f.getType=function(){return this.o};f.Pg=function(){return this.b.getCurrentAd()};
f.xf=function(){return this.ab?this.ab.Rd:null};f.ep=function(){return this.ab?this.ab.getType():null};f.Mo=function(){return this.ab&&this.ab.currentSrc?this.ab.currentSrc:null};f.qt=function(a){a=a.muted?0:a.volume;isNaN(a)||(a=yb(a/100,0,1),this.b.setVolume(a))};f.dn=function(){this.Mf?this.bk():this.Oh()};f.Oh=function(){this.ab&&(this.b.resume(),this.Qn())};f.bk=function(){this.ab&&(this.b.pause(),this.Pn())};f.Fk=function(){var a=tA(this.a);this.b.resize(a.width,a.height,google.ima.ViewMode.NORMAL)};function vA(a,b,c){R.call(this);this.a=b;this.a.D("control_toggle_play_pause",this.an,this);this.a.D("control_play",this.Nh,this);this.a.D("control_pause",this.$j,this);this.b=c;this.j=new fA(this,this.a);this.o=a+"_2";this.i=new Zo(this);this.g=wA(b);this.g.D("statechange",this.Zm,this);this.g.D("internalvideodatachange",this.$m,this);this.ka=null}y(vA,R);f=vA.prototype;f.jl=!1;f.Cg=null;f.Bg=null;f.Dg=null;
f.show=function(){var a=this.a;xA(a.app,wA(a));this.j.b=x();bA(1);cA(1);this.Dg=Q(this.a.a);if(this.a.da.L)F(E("video-ad-status-bar"));else{a=Q(this.a.a);this.Cg=E("video-ad-time-left",a);var a=E("html5-ad-progress-list",a),b=Zc("div");Tm(b,["html5-ad-progress","html5-progress-section"]);a.appendChild(b);this.Bg=b;this.g.D("progresssync",this.hn,this)}Tm(this.Dg,["ad-showing","ad-interrupting"]);this.i.listen(Fn(this.a.b),"mouseup",this.Et);this.a.D("onResize",this.ek,this);try{this.i.listen(this.b,
google.ima.AdErrorEvent.Type.AD_ERROR,this.Ct),this.i.listen(this.b,google.ima.AdEvent.Type.CLICK,this.Bt),this.i.listen(this.b,google.ima.AdEvent.Type.COMPLETE,this.Dt),this.i.listen(this.b,google.ima.AdEvent.Type.PAUSED,this.on),this.i.listen(this.b,google.ima.AdEvent.Type.STARTED,this.pn),this.ek(),this.b.start()}catch(c){yA(this,c)}};f.$m=function(a,b,c){"newdata"==a&&this.ka!=c&&rA(this.a,-1,{video_id:c.M});this.ka=c};f.Zm=function(a){a=a.state;P(a,128)&&yA(this,Error(a.a.message||"Video player error."))};
f.pn=function(){this.jl=!0;this.k||(this.k=!0,lA(this.j),uA(this.a,1));rA(this.a,1);this.u("adPlay",this)};f.on=function(){this.jl=!1;rA(this.a,2)};f.Dt=function(){mA(this.j);rA(this.a,0);uA(this.a,2);this.u("adEnd",this)};f.Ct=function(a){yA(this,a.getError())};function yA(a,b){a.g.lg();rA(a.a,0);a.u("adError",b)}f.Bt=function(){hA(this.j);"3.1"==oA()||this.a.da.Q||H(v(this.Nh,this),0);this.u("select")};f.Et=function(a){this.j.i=new A(a.pageX,a.pageY)};
f.hn=function(a,b,c){this.Cg.innerHTML=Sn(a.od()-b);a=Math.round(1E3*c)/10;this.Bg.style.width=a+"%"};
f.H=function(){this.a.$("control_toggle_play_pause",this.an,this);this.a.$("control_play",this.Nh,this);this.a.$("control_pause",this.$j,this);this.a.$("onResize",this.ek,this);this.i.removeAll();this.g.D("statechange",this.Zm,this);this.g.$("internalvideodatachange",this.$m,this);this.g.$("progresssync",this.hn,this);var a=this.a;a.g&&zA(a.app,a.g);this.b.destroy();this.Cg&&(this.Cg.innerHTML="",this.Cg=null);this.Bg&&(F(this.Bg),this.Bg=null);this.Dg&&(Um(this.Dg,["ad-showing","ad-interrupting"]),
this.Dg=null);vA.C.H.call(this)};f.getType=function(){return this.o};f.Pg=function(){return this.b.getCurrentAd()};f.xf=function(){return this.g.od()};f.ep=function(){return this.ka&&this.ka.a?this.ka.a.lb:null};f.Mo=function(){if(!this.ka)return null;var a=Am(this.ka);return a?mj(a):null};f.an=function(){this.jl?this.$j():this.Nh()};f.Nh=function(){this.b.resume();this.pn()};f.$j=function(){this.b.pause();this.on()};f.ek=function(){var a=tA(this.a);this.b.resize(a.width,a.height,google.ima.ViewMode.NORMAL)};function AA(a,b){this.b=a;this.a=b;this.b.getType()}function BA(a,b,c){a.b.u("AD_LOGGING_EVENT",b,c)}function CA(a){var b={};Yz(a.b.Pg(),b);a.j&&a.g&&(b.ot=a.g-a.j);var c;c=a.a.a.app.K().ob||a.a.da.k?2:a.a.K().Nd?1:0;b.ad_ps=c;b.at=a.b.getType();return b};function DA(a,b,c){R.call(this);this.b=b;this.a=c;this.i=new AA(this,b);this.k=a+"_1";this.g=new Zo(this)}y(DA,R);f=DA.prototype;f.Xd=null;f.nn=!1;
f.show=function(){V(Q(this.b.a),"ad-showing");this.Xd=Cn(this.b.b);V(this.Xd,"ad-overlay");this.g.listen(this.Xd,"mouseup",this.zt);try{Kd(this.Xd);this.g.listen(this.a,google.ima.AdEvent.Type.USER_CLOSE,this.vt);this.g.listen(this.a,google.ima.AdEvent.Type.CLICK,this.xt);this.g.listen(this.a,google.ima.AdErrorEvent.Type.AD_ERROR,this.wt);EA(this,google.ima.ViewMode.NORMAL);this.Ag();this.a.start();var a=this.i;a.j=x();var b=CA(a);BA(a,3,b);this.nn=!0;this.b.D("onResize",this.Ag,this);this.b.D("onStateChange",
this.fn,this);this.u("adEnd",this)}catch(c){this.u("adError",c)}};f.Pg=function(){return this.a.getCurrentAd()};f.getType=function(){return this.k};f.H=function(){this.g.removeAll();this.b.$("onResize",this.Ag,this);this.b.$("onStateChange",this.fn,this);W(Q(this.b.a),"ad-showing");this.a&&(this.a.destroy(),this.a=null);this.Xd&&W(this.Xd,"ad-overlay");this.Xd=null;DA.C.H.call(this)};f.vt=function(){var a=this.i;a.g=x();var b=CA(a);BA(a,6,b)};
f.xt=function(){kn(this.b);var a=this.i;a.g=x();var b=CA(a);if(a.i){var c=kA(a.a),d=a.i.y-c.top,d=Math.round(a.i.x-c.left)+"x"+Math.round(d);b.ck_xy=d;b.ck_wh=c.width+"x"+c.height}BA(a,100,b)};f.zt=function(a){this.i.i=a.target==a.currentTarget?null:new A(a.pageX,a.pageY)};f.wt=function(a){a=a.getError();this.u("adError",a)};f.fn=function(a){P(a.state,16)&&EA(this,google.ima.ViewMode.NORMAL)};function EA(a,b){a.j!=b&&(a.j=b,a.nn&&a.Ag())}
f.Ag=function(){var a=Kd(this.Xd);this.a.resize(a.width,a.height,this.j)};function FA(a,b){R.call(this);this.ca=a;this.a=b}y(FA,R);FA.prototype.show=function(){var a=n("afcAdCall");a&&a();a={};a.ad_id=this.a;a.at=this.getType();this.u("AD_LOGGING_EVENT",3,a);this.u("adEnd",this)};function GA(a,b){DA.call(this,1,a,b)}y(GA,DA);GA.prototype.Ag=function(){};GA.prototype.getType=function(){return"1_3"};function HA(a,b,c,d){R.call(this);this.Ba=b;this.b=a;this.start=c;this.g=d;this.a=null}y(HA,R);f=HA.prototype;f.mk=!0;f.qd=!1;f.isVisible=!0;f.Qe="unloaded";f.Sk=!1;function IA(a){return 0==a.start?JA(a)&&KA(a)?-2147483648:0:-1==a.start||-2==a.start?2147483647:1E3*a.start}function JA(a){return"loaded"==a.Qe||"error"==a.Qe}function KA(a){if(!JA(a))throw Error("Preroll status is undefined before ad load.");return 0==a.start&&a.qd}
function LA(a){a.Qe="loading";var b=a.g.shift();b?(0==a.start&&MA(a.b,"nl"),b=b.create(a.start,a.Ba,a.b),L(a,b),Do(b.load(),a.Mv,a.Lv,a)):(NA(a.b,2,OA(a,{})),a.Qe="error",PA(a))}f.getId=function(){return this.Ba};function QA(a){a.a.$("adEnd",a.Eo,a);a.a.$("adError",a.Ho,a);a.a.$("AD_LOGGING_EVENT",a.Fo,a);a.a.$("select",a.Go,a)}f.Lv=function(a){a instanceof yo||LA(this)};
f.Mv=function(a){this.start=a.startTime;this.a=a.Xt;L(this,this.a);0==this.Ba&&(a=this.a.getType(),this.b.i.at=a);this.a instanceof nA||this.a instanceof vA?this.qd=!0:this.a instanceof FA?this.isVisible=!1:this.a instanceof GA&&(this.isVisible=!1);this.Qe="loaded";PA(this)};function PA(a){a.u("adBreakComplete",a)}
f.show=function(){this.Sk?this.a instanceof DA&&EA(this.a,google.ima.ViewMode.NORMAL):(this.Sk=!0,this.a instanceof nA&&MA(this.b,"bs"),this.a.D("adEnd",this.Eo,this),this.a.D("adError",this.Ho,this),this.a.D("AD_LOGGING_EVENT",this.Fo,this),this.a.D("select",this.Go,this),this.a.show())};f.Eo=function(){if(this.qd){QA(this);var a=this.b;a.da.jd&&!a.wj&&(sa(a.K().jb+"mac_204?action_fcts=1"),a.wj=!0)}PA(this)};f.Ho=function(a){if(a){var b={};Xz(a,b);OA(this,b);RA(this.b,32,b)}QA(this);PA(this)};
f.Fo=function(a,b){OA(this,b);NA(this.b,a,b)};f.Go=function(){this.mk=!1};function OA(a,b){b.sst=a.start;b.sidx=0};function SA(a){this.qq=a}function TA(a){try{var b=iw(a).getElementsByTagName("AdBreak"),c=Na(b,function(a){a=a.getAttribute("time");return Fa(a)});return new SA(c)}catch(d){return new SA([0])}};function UA(a,b,c,d){this.i=a;this.j=b;this.b=c;this.k=d}UA.prototype.g="";UA.prototype.a="";function VA(a){var b={};b.l_ns=a.j;b.l_state=a.k;b.sst=a.i;b.sidx=0;a.g&&(b.at=a.g);a.a&&(b.ad_id=a.a);return b};function WA(a,b,c,d,e){this.j=a;this.g=b;this.B=c;this.ca=d;this.b=e;this.a=new UA(b,this.j,d,e);this.F=new Zo(this);this.i=new Zo(this)}y(WA,K);f=WA.prototype;f.oo=null;f.yd=null;
f.load=function(){if(this.yd)return this.yd;this.yd=new xo;var a=this.ca.da.k?this.ca.K().Qc||XA:Gd(Q(this.ca.a)),b;this.ca.da.a?b=!1:(b=0<(this.b&3)?190:200,b=200>a.width||a.height<b);if(b){b=this.a;var c=VA(b);c.ck_wh=a.width+"x"+a.height;RA(b.b,14,c);this.Se(Error("The player size is too small."))}else Do(this.ca.pg,this.Su,this.Fd,this);return this.yd};
f.Qk=function(){var a=new google.ima.AdsRenderingSettings;a.baseYouTubeUrl=this.ca.K().jb;a.contentId=this.ca.getVideoData().M;a.useStyledNonLinearAds=!0;a.disableVideoAdUi=!this.ca.da.L;a.useVideoAdUi=this.ca.da.L;a.youTubeAdNamespace=this.j;return a};function YA(a,b){a.oo=b;var c=b.getType();a.a.g=c}function ZA(a){a=a.g;return 0==a||-1==a?a:1E3*a}
f.Su=function(a){var b=this.a;NA(b.b,9,VA(b));b=new google.ima.AdsRequest;b.adTagUrl=this.k();var c=this.ca.K().Qc||XA;b.linearAdSlotWidth=c.width;b.linearAdSlotHeight=c.height;b.nonLinearAdSlotWidth=c.width;b.nonLinearAdSlotHeight=100;"3.1"==oA()&&(b.isYouTube=!0);var c=this.b,d=n("yt.www.watch.ads.setGutSlotSizes");d&&d(0<(c&3),0<(c&12));this.F.listen(a,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Pu);this.F.listen(a,google.ima.AdErrorEvent.Type.AD_ERROR,this.Ou);this.vi(a,b)};
f.Pu=function(a){if(a.getUserRequestContext()===this){try{var b;if("3.1"==oA()){var c=this.Qk();b=a.getAdsManager({},c)}else b=a.getAdsManager({})}catch(d){this.Fd(d);return}this.i.listen(b,google.ima.AdEvent.Type.LOADED,v(this.Mw,this,b));this.i.listen(b,google.ima.AdErrorEvent.Type.AD_ERROR,v(this.Lw,this,b));z([google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED],function(a){this.i.listen(b,a,ba)},this);a=tA(this.ca);
try{b.init(a.width,a.height,google.ima.ViewMode.NORMAL)}catch(e){b.destroy(),this.Fd(e)}}};f.Mw=function(a,b){this.i.removeAll();var c=b.getAd(),d=c.isLinear(),e=this.a,g=VA(e);g.ad_man=d?"instream":"overlay";NA(e.b,12,g);e="";"3.1"==oA()&&(e=b.getAdData().mediaUrl);switch(d?this.Xg(a,c,e):this.Pe(a,c)){case 0:$A(this);break;case 1:a.destroy();this.Se(Error("Unable to create a display state."));break;case 2:c=this.a;RA(c.b,21,VA(c));a.destroy();this.Se(Error("Fallback to next ad."));break;default:a.destroy()}};
f.Lw=function(a,b){this.i.removeAll();a.destroy();this.Fd(b.getError())};f.Ou=function(a){var b=a.getError();b.getType()==google.ima.AdError.Type.AD_LOAD&&a.getUserRequestContext()===this&&this.Fd(b)};f.Xg=function(a,b,c){b=b.getAdId();this.a.a=b;a=this.ca.da.P?new vA(this.j,this.ca,a):new nA(this.j,this.ca,a,c);YA(this,a);return 0};f.Pe=function(a,b){var c=b.getAdId();this.a.a=c;YA(this,new DA(this.j,this.ca,a));return 0};
f.Fd=function(a){if(a instanceof yo)this.yd.cancel();else{var b=this.a,c=VA(b);a&&Xz(a,c);RA(b.b,32,c);this.Se(a)}};function $A(a){a.yd.b({Xt:a.oo,startTime:a.g})}f.Se=function(a){this.yd.a(a)};f.H=function(){this.F.removeAll();this.i.removeAll();this.yd&&this.yd.cancel();WA.C.H.call(this)};f.vi=function(a,b){try{a.requestAds(b,this)}catch(c){this.Fd(c)}};function aB(a,b){this.a=a;this.b=b};function bB(a){FA.call(this,a,"")}y(bB,FA);bB.prototype.getType=function(){return"2_3"};bB.prototype.Pg=function(){return null};function cB(a,b,c,d){WA.call(this,2,a,b,c,d);this.o=new aB(this.ca.da,this.ca.K());aA()}y(cB,WA);cB.prototype.Qk=function(){var a=cB.C.Qk.call(this);a.a=0==this.B;a.b=!0;return a};
cB.prototype.k=function(){var a=this.o,b=this.b,c=ZA(this),d={};d.eid=a.a.ja;d.videoad_start_delay=c;d.scs=a.a.qe;d.client=a.a.gg;d.description_url=a.a.pa;d.loeid=a.a.re;d.cust_gender=a.a.Ic;d.host=a.a.host;d.hl=a.b.i;d.max_ad_duration=a.a.pe;d.url="embedded"==a.b.Y&&a.b.b?a.b.b:a.a.pa;a.a.Kc&&(d.adtest="on");isNaN(a.a.fa)||(d.cust_age=a.a.fa);isNaN(a.a.za)||(d.hostTierId=a.a.za);a.a.ib&&(d.yt_pt=a.a.ib);a.a.lc&&(d.video_cpm=a.a.lc);a.a.G&&(d.as_dbp=a.a.G);d.ytdevice=a.a.Zf;d.ad_type=$z(b);0<(b&3)?
a.a.Da&&(d.channel=a.a.Da.join("+")):b&4&&a.a.Ta&&(d.channel=a.a.Ta.join("+"));a.a.Ua&&(d.lsv=1);var a=d,b={},e;for(e in a)ea.call(void 0,a[e])&&(b[e]=a[e]);return"//googleads.g.doubleclick.net/pagead/ads?"+Jj(b,"&")};cB.prototype.Pe=function(a,b){if(this.ca.da.a)return 1;0==this.g&&(this.g=10,this.a.i=10,NA(this.ca,1));cA(this.b);return cB.C.Pe.call(this,a,b)};
cB.prototype.Se=function(a){var b=this.ca.da;b.a?cB.C.Se.call(this,a):b.Ma||this.b&4?(YA(this,new bB(this.ca)),$A(this)):cB.C.Se.call(this,a)};function dB(a,b){if(a){this.Op=a;this.Dp=b;var c,d=this.Op,e=d.indexOf(";sz=");c=Ij(d.substring(e),";");d=d.substring(0,e).split("pfadx");if(c=2!=d.length?null:{Gx:d[0],Hx:d[1],Ix:c})this.Cp=c.Gx,this.Ep=c.Hx,this.Fp=c.Ix}}f=dB.prototype;f.Op="";f.Cp="";f.Dp=!1;f.Kl="";f.Ep="";f.Fp=null;
function eB(a,b){var c=[];b&1&&c.push("480x360");b&2&&c.push("480x361");b&12&&c.push("480x70");var d=[],e,g;b&12&&(d.push("300x250"),e="watch-channel-brand-div",g=1);0<(b&3)&&(d.push("300x60"),e="watch-longform-ad",g=1);c={Hp:e,qh:c,Kp:g,wx:!0,Jl:d};d=Rb(a.Fp);c.vx&&(d.pos=c.vx);c.Kp&&(d.tile=c.Kp.toString());c.Hp&&(d.kmyd=c.Hp);c.wx&&(t(d["!c"])?d["!c"].push("html5"):d["!c"]=d["!c"]?[d["!c"],"html5"]:"html5");c.Jl&&0<c.Jl.length&&a.Dp&&(d.ciu_szs=c.Jl.join(","));d.dcmt="text/xml";gj()&&(d.kmob="ps3");
a.Kl||(a.Kl=Math.floor(999999999*Math.random()).toString());d.ord=a.Kl;c.qh&&c.qh.length&&"sz"in d&&delete d.sz;d=Jj(d,";");c.qh&&c.qh.length&&(d="sz="+c.qh.join(",")+";"+d);return[a.Cp,"pfadx",a.Ep,";",d,"?"].join("")};function fB(a,b,c,d){WA.call(this,1,a,b,c,d)}y(fB,WA);fB.prototype.k=function(){return eB(new dB(this.ca.da.Lc,this.ca.da.ya),this.b)};fB.prototype.Pe=function(a,b){var c=b.getAdId();this.a.a=c;c=b.getTraffickingParameters();return Zz(c,"rm")?(1!=this.b&&dA(),gB(a),2):Zz(c,"blockAllAds")?(gB(a),YA(this,new GA(this.ca,a)),0):Zz(c,"hideMaster")?(YA(this,new GA(this.ca,a)),0):this.ca.da.a?1:"3.1"==oA()?(YA(this,new DA(this.j,this.ca,a)),0):1};
function gB(a){a.sendImpressionUrls&&a.sendImpressionUrls()};function hB(a,b,c,d,e){WA.call(this,1,a,b,c,d|e);this.A=d;this.o=e;aA()}y(hB,fB);var iB={GDFP:1,DART:1,DART_DFP:1,DART_DFA:1,ADSENSE:2,"ADSENSE/ADX":2};hB.prototype.k=function(){return eB(new dB(this.ca.da.I,this.ca.da.ya),this.A)};hB.prototype.vi=function(a,b){if(this.o){b.youTubeAdType=$z(this.o);var c=this.ca.da.ja;c&&(b.youTubeExperimentIds=c);b.youTubeVideoAdStartDelay=ZA(this)}hB.C.vi.call(this,a,b)};hB.prototype.Xg=function(a,b,c){var d=jB(a);return 1!=d&&2!=d?1:hB.C.Xg.call(this,a,b,c)};
hB.prototype.Pe=function(a,b){switch(jB(a)){case 1:return hB.C.Pe.call(this,a,b);case 2:var c;1!=this.A&&dA();this.ca.da.a?c=1:(0==this.g&&(this.g=10,this.a.i=10,NA(this.ca,1)),cA(this.b),c=b.getAdId(),this.a.a=c,YA(this,new DA(2,this.ca,a)),c=0);return c;default:return 1}};function jB(a){var b=a.getCurrentAd().getWrapperAdSystems();a=Wa(b)?a.getCurrentAd().getAdSystem():b[0];return(a=iB[a.toUpperCase()])?a:0};function kB(a,b,c){var d=c.da;this.o=d.Jc;var e=0,d=d.Hc.toUpperCase();"INVIDEO"==d?e=4:"INSTREAM"==d?e=1:"MPU"==d&&(e=8);WA.call(this,2,a,b,c,e)}y(kB,WA);function lB(a){var b=new xo;Vj(a,{format:"RAW",method:"GET",timeout:5E3,Wk:function(){b.a(Error(a+" timed out"))},onError:function(c){b.a(Error("Problem loading "+a+" with status code "+c.status))},Qa:function(a){b.b(a)}});return b}kB.prototype.k=function(){return""};
kB.prototype.vi=function(a,b){var c=this.b;c&1||c&4?this.o?("goo.gl"==Nj(this.o)?(c=lB("https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBbSB-E7SYd1iggX6r2b5C7ljvO6fVqaj0&shortUrl="+this.o),Do(c,function(a){a=pb(a.responseText);if(!a||!a.longUrl)throw Error("Invalid expanded forced ad URL");a=Pj(a.longUrl,{video_format:"43"});return lB(a)},null,this)):c=lB(this.o),Do(c,function(c){b.adsResponse=c.responseText;a.requestAds(b,this)},null,this),Do(c,null,this.Fd,this)):this.Fd(Error("Invalid empty URL")):
this.Fd(Error("Invalid request type: "+c))};function mB(a,b,c){this.a=a;this.g=b;this.b=Wi||Xi?"html5_ios":Yi?"html5_android":gj()?"html5_ps3":"leanback"==c?"html5_tv_leanback":"html5"};function nB(a,b,c,d){WA.call(this,4,a,b,c,d);this.o=new mB(this.ca.da,this.ca.getVideoData().ta,this.ca.K().Y)}y(nB,WA);
nB.prototype.k=function(){var a;a=this.o;if(a.a.aa&&a.a.nc){var b="10613:10613_youtube_"+a.b,c="youtube_watch_"+a.b,d="10613:10613_youtube_"+a.b.split("_")[0],e={nw:"10613"};e.asnw=a.a.aa;e.ssnw=a.a.aa;e.caid=a.a.nc;e.prof=b;e.vdur=a.g;e.csid=c;e.resp="vast2";e.crtp="vast2s";e.flag="+emcr";b={};isNaN(a.a.ma)||(b._fw_d_001=a.a.ma);a.a.mc&&(b._fw_d_002=a.a.mc);a.a.Sa&&(b["_fwu:10613:lang"]=a.a.Sa);a.a.G&&(b._fw_dbp=a.a.G);b._fw_yt_type=a.a.B?"short":"long";var c={ptgt:"a",slid:"preroll"},g="";a.a.g&&
!a.a.b?g=";linear-skippable":!a.a.g&&a.a.b&&(g=";video");c.slau="preroll"+g;c.w="480";c.h="360";c.tpos="0";c.tpcl="preroll";c.envp=d;c.cd="1440,900";a="//2975c.v.fwmrm.net/ad/g/1?"+Jj(e,"&")+";"+Jj(b,"&")+";"+Jj(c,"&")}else a="";return a};nB.prototype.Xg=function(a,b){return 0!=this.g?1:nB.C.Xg.call(this,a,b,null)};nB.prototype.Pe=function(){return 1};function oB(a,b,c){this.g=a;this.a=b;this.b=c||0}oB.prototype.create=function(a,b,c){switch(this.g){case 1:return new cB(a,b,c,this.a);case 2:return new fB(a,b,c,this.a);case 3:return new hB(a,b,c,this.a,this.b);case 5:return new nB(a,b,c,this.a);case 4:return new kB(a,b,c);default:return null}};function pB(a){this.a=a};function qB(a,b){this.O=a;this.Q=this.O.oc;this.k="leanback"==this.O.Y;this.a=this.Q||this.k;var c="3.1"==Vz.getInstance().getVersion();this.L=!this.a&&c;this.P=a.ub&&c&&!this.a;this.apply(b)}var rB={gC:"m",bB:"f"};
qB.prototype.apply=function(a){var b=eA(this.O,"908301"),c="3.1"==Vz.getInstance().getVersion(),d=Wz(a.instream),e=(!this.a||b)&&c&&Wz(a.trueview),g=Wz(a.aftv)&&(!this.a||b);this.ia=a.ad_slots;this.ga=a.ad_breaks;this.Oc=a.ad_flags||0;this.fa=parseInt(a.cust_age,10);this.ja=a.cafe_experiment_id;var h=parseInt(a.cust_gender,10);isNaN(h)||(this.Ic=h);this.Lc=a.ad_tag;this.Kc=!!a.adtest;this.ma=parseInt(a.ad_age,10);this.Nc=a.cid;this.pa=a.ad_eurl;this.I=a.dynamic_allocation_ad_tag;this.va=a.excluded_ads;
this.Hc=a.force_ad_type;this.Jc=a.force_ad_url;this.mc=Ob(rB,function(b){return b==a.ad_gender});this.G=a.dbp;this.ya=!!a.mpu;this.host=a.ad_host;this.za=parseInt(a.ad_host_tier,10);this.ld=1==a.ad_logging_flag;this.F=Wz(a.afv)&&!this.a;this.i=g&&e;this.j=g&&d&&!Wz(a.no_afv_instream);this.A=Wz(a.dclk);this.Ua=1==a.livestream;this.Na=Wz(a.forced_ad)&&b&&c;this.J=1==parseInt(a.tpas_ad_type_id,10);this.bg=!!a.fqsf;this.b=d;this.U=Wz(a.invideo)&&!this.a;this.X=Wz(a.mpu)&&!this.a;this.jd=Wz(a.shortform);
this.B=Wz(a.sffb);this.qe="1"==a.as_launched_in_country;this.tb=!this.a&&!this.J;this.g=e;b=a.ad_channel_code_instream;this.Da=u(b)?b.split(","):[];this.Sa=a.ad_language_iso639_2;this.re=a.loeid;b=parseInt(a.afv_instream_max,10);isNaN(b)&&(b=15E3);this.pe=b;this.o=parseInt(a.midroll_freqcap,10);isNaN(this.o)&&(this.o=-1);b=a.ad_channel_code_overlay;this.Ta=u(b)?b.split(","):[];this.ib=a.yt_pt;this.gg=a.ad_video_pub_id;this.lc=parseInt(a.afv_video_min_cpm,10);this.Ma=g&&this.B&&!this.F;this.kd=this.F||
this.Ma;this.Zf=parseInt(a.ad_device,10);this.nc=a.tpas_video_id;this.aa=a.tpas_partner_id;this.Mc=sB(this)};function sB(a){if(/^[\s\xa0]*$/.test(null==a.I?"":String(a.I))||!eA(a.O,"932604")||!a.P)return!1;var b=(a.b||a.g)&&a.A;a.B&&a.A&&(b=b||a.U||a.X);if(!b)return!1;b=a.i||a.j;if(!(b||a.B&&a.F))return!1;a=a.I.length+330+102;var c=window.document.referrer;a+=encodeURIComponent(String("ref"+(c?"="+c:""))).length;b||(a+=41);return 2048>=a}qB.prototype.tb=!0;function tB(a,b,c){this.a=a;this.k=b;this.g=c;this.j=this.b=-1;this.g&&0<this.a.da.o&&this.a.D("endseeking",this.i,this)}y(tB,K);function uB(a,b){vB(a);0<b&&(a.j=H(v(a.i,a),1E3*b))}function vB(a){-1!=a.j&&(I(a.j),a.j=-1)}
tB.prototype.i=function(){var a=this.a.da.o;if(this.g&&!(0>=a)){var b=this.a.a.getCurrentTime(),c=[],d=null,e=Number.MAX_VALUE;Jb(this.k.i,function(a){if(a.qd&&a.isVisible&&!(0>=wB(this,a))){var g;g=a.getId();g=this.k.j[g];if(wB(this,a)>b){var m=!xB(this,a);m!=g.Rc&&(g.Rc=m,c.push(g));m||(g=wB(this,a)-b,g<e&&(e=g,d=a))}else g.Rc||(g.Rc=!0,c.push(g))}},this);0<c.length&&yB(this.a,c);if(d){var g=0;0<this.b&&(g=x()/1E3-this.b);uB(this,a-g-e+2)}else vB(this)}};
function xB(a,b){if(!a.g||!b.qd||!(0<b.start)&&-1!=b.start)return!1;var c=a.a.da.o;if(0>=c||0>=a.b)return!1;var d=x()/1E3,e=wB(a,b)-a.a.a.getCurrentTime();0<e&&(d+=e);return d-a.b<=c}function wB(a,b){return-1==b.start?a.a.a.vg():b.start}tB.prototype.H=function(){vB(this)};function zB(a,b){this.b=b;this.g=[];this.i={};this.j={};this.a=a;var c=!a.da.Ua&&Oa(this.b,function(a){return 0<a.start||-1==a.start});this.k=new tB(this.a,this,c)}y(zB,K);f=zB.prototype;f.Cd=null;function AB(a){a.g.length||(ib(a.b,function(a,c){return a.getId()-c.getId()}),a.g=Ma(a.b,function(a){return"unloaded"==a.Qe}),0==a.g.length?Zm(a.a):(null===Ra(a.g,function(a){return 0==a.start})&&Zm(a.a),BB(a)))}function BB(a){if(a.g.length){var b=a.g.shift();b.D("adBreakComplete",a.ll,a);LA(b)}}
f.ll=function(a){a.$("adBreakComplete",this.ll,this);H(v(this.sx,this,a),0)};f.sx=function(a){var b=La(this.b,a),c=this.b[b+1],b=this.b[b-1],d=2147483646;-2==a.start||-1==a.start?d=2147483647:c&&2147483647!=c.start&&(d=IA(c)-1);0==a.Ba&&(MA(this.a,"bl"),KA(a)||MA(this.a,"fb"));if(c="loaded"!=a.Qe){if(b&&JA(b)){var e=IA(b);e>d&&(d=e);CB(this,b);DB(this,b,d)}}else this.i[a.getId()]=a,DB(this,a,d);Zm(this.a);c&&this.sg(a);a=this.i;var b=0,g;for(g in a)b++;b==this.b.length&&this.k.i();BB(this)};
function DB(a,b,c){var d=IA(b);if(!isNaN(d)){var e={};e.priority=-2!=b.start?2:3;e.id=String(b.getId());e.visible=b.isVisible;c=new di(d,c,e);a.j[b.getId()]=c;a.a.uf(c)}}function CB(a,b){a.j[b.getId()]&&(a.a.pv(a.j[b.getId()]),delete a.j[b.getId()])}f.sg=function(a){a.$("adBreakComplete",this.ll,this);this.Cd&&a==this.Cd&&(this.Cd=null);CB(this,a);Za(this.b,a);delete this.i[a.getId()];Xg(a)};
f.Ku=function(a){if(a.qd){if(-1!=a.start&&a.mk){var b=this.a;EB(b);jn(b)}else KA(a)&&!a.mk?(b=this.a,EB(b),jn(b)):(EB(this.a),this.a.kb(!1));this.sg(a);a=this.k;a.g&&0<a.a.da.o&&(a.b=x()/1E3,a.i())}else a.isVisible||this.sg(a)};f.H=function(){Xg(this.k);z(this.b,this.sg,this);zB.C.H.call(this)};function FB(){return[]};function GB(a,b){this.g=a;b&&(this.b=b)}function HB(a){var b={};b.allowed=a.g;a.b&&(b.ex_ads=a.b);a.a&&(b.at=a.a);return b};function IB(a,b){this.g=a;this.W=b;this.o=x();this.a=a.da;this.b={};var c=[];this.a.J&&this.a.b&&c.push("4_2");this.a.A&&(this.a.b&&c.push("1_2"),this.a.g&&c.push("1_2_1"),this.a.U&&c.push("1_1"),this.a.X&&c.push("1_3"));this.a.i&&c.push("2_2_1");this.a.j&&c.push("2_2");this.a.F&&c.push("2_1");this.a.kd&&c.push("2_3");this.i=c.join(",");this.k=new GB(this.i,this.a.va);this.b.allowed=this.i;(c=this.a.va)&&(this.b.ex_ads=c)}var JB=[9,10,11,12],KB=[21,30],LB=[1009];IB.prototype.j=0;
function MB(a,b){if(!a.a.ld)return!1;var c=a.g.K();if(eA(c,"906335"))return!0;c=b.ad_event;return Va(JB,c)||7==c&&(c=b.ad_error,Va(KB,c)||32==c&&Va(LB,b.error_code))?!1:!0};function NB(a){Kx.call(this,a);this.j={};this.i={at:"0"};this.b=new Bn(this.a);this.g=null;a=this.getVideoData().b.html5_sdk_version;this.k=Vz.getInstance().load(a)}y(NB,Kx);var XA=new B(0,0);f=NB.prototype;f.qa="ad";f.ed="ad";f.xe=null;f.Td=null;f.da=null;f.wj=!1;f.Rj=!1;f.pg=null;f.qi=null;f.$a=function(){return!!this.app.I.getVideoData().ca};
f.create=function(){NB.C.create.call(this);this.ba=!0;MA(this,"i");this.da=new qB(this.K(),this.a.getVideoData().b||{});this.xe=new IB(this,this.a);bA();this.wj=!1;var a=Eo(this.k);this.pg=Do(a,this.rq,null,this);t:{var a=new pB(this),b=[];try{var c=a.a.da,d;if(c.tb){var e;if(c.ga)e=TA(c.ga);else{var g;if(c.ia){var h=Na(c.ia.split(","),Fa);g=new SA(h)}else g=new SA([0]);e=g}d=e}else d=new SA([0]);for(var k=d.qq,c=0;c<k.length;c++){var m=a.a;d=c;var p=k[c],s;if(a.a.da.B){e=[];var r=a.a.da;if(r.Na)e.push(new oB(4,
0));else{r.J&&(r.b||r.g)&&e.push(new oB(5,1));g=0;r.A&&(r.b&&(g|=1),r.g&&(g|=2),r.U&&(g|=4),r.X&&(g|=8));h=0;if(r.j||r.i)r.j&&(h|=1),r.i&&(h|=2);var D=0;r.F&&(D=4);h||(h=D,D=0);r.Mc&&g&&(h||D)?e.push(new oB(3,g,h)):(g&&e.push(new oB(2,g)),h&&e.push(new oB(1,h)));D&&e.push(new oB(1,D))}}else{e=[];var M=a.a.da;if(M.Na)e.push(new oB(4,0));else{M.J&&M.b&&e.push(new oB(5,1));g=0;M.A&&(M.b&&(g|=1),M.g&&(g|=2));h=0;if(M.j||M.i)M.j&&(h|=1),M.i&&(h|=2);M.Mc&&g&&h?e.push(new oB(3,g,h)):(g&&e.push(new oB(2,
g)),h&&e.push(new oB(1,h)))}}s=e;var ta=new HA(m,d,p,s);b.push(ta)}}catch(Z){}finally{break t}}k=b;MA(this,"bd");this.Td=new zB(this,k);AB(this.Td);k={};k.allowed=this.xe.i;cn(this,{},k)};f.destroy=function(){this.Rj&&EB(this);this.ba=!1;this.g&&zA(this.app,this.g);Yg(this.Td,this.g);this.g=this.Td=null;this.pg&&(this.pg.cancel(),this.pg=null);this.xe=null;Dn(this.b);NB.C.destroy.call(this)};f.getVideoData=function(){return this.app.getVideoData(1)};f.K=function(){return this.app.K()};
function NA(a,b,c){a=a.xe;c=c||{};var d=(x()-a.o)/1E3;c.art=d;d=a.g.K();d.j&&(c.feature=d.ga);c.ad_flags=a.a.Oc;var e=a.a.Nc;e&&(c.cid=e);c.mt=a.W.getCurrentTime();(d=ey(d))&&(c.lact=d);(d=a.W.vg())&&(c.len=d);a.a.bg&&(c.fqsf=1);(d=Vz.getInstance().getVersion())&&(c.sdkv=d);c.ad_event=b;if(3==b||4==b)a.k.a=c.at;b=c;if(MB(a,b)){var g;t:{c=a.b;d=Qb(b);for(g in c){if(g in d){g=null;break t}d[g]=c[g]}g=d}null===g?a.g.log(a.b):b=g;a.g.log(b);a.b={}}}function RA(a,b,c){c=c||{};c.ad_error=b;NA(a,7,c)}
f.Ni=function(){return this.xe?this.xe.k:NB.C.Ni.call(this)};function oA(){return Vz.getInstance().getVersion()}function wA(a){if(!a.g){var b=new Tx(a.K().a);b.Y="adunit";b.Tb=!0;a.g=new kz(b,2)}return a.g}function tA(a){var b=a.da.k?a.K().Qc||XA:Kd(Q(a.a));a.da.a||(b.height-=27);return b}function kA(a){return a.da.k?(a=a.K().Qc||XA,new Fb(0,0,a.width,a.height)):Id(Q(a.a))}function EB(a){Dn(a.b);a.Rj=!1;hn(a);gn(a,["seek"]);a.K().Md&&gn(a,["audio"])}
function uA(a,b){switch(b){case 1:a.u("publish_external_event","onAdStart");break;case 2:a.u("publish_external_event","onAdEnd")}}function rA(a,b,c){a.u("publish_external_event","onAdStateChange",b,a.b.W.K().ub?a.b.W.app.S.b:Gn(a.b),c)}
f.yc=function(a){NB.C.yc.call(this,a);var b=parseInt(a.getId(),10);this.Td&&!isNaN(b)&&(a=this.Td,q(b)&&(b=a.i[b]))&&(a.Cd==b&&!b.qd&&b.isVisible?b.show():(a.Cd&&a.sg(a.Cd),xB(a.k,b)?(a.Cd=null,b=a.j[b.getId()],b.Rc||(b.Rc=!0,yB(a.a,[b]))):(a.Cd=b,b.D("adBreakComplete",a.Ku,a),b.qd&&(a=a.a,a.Rj=!0,a.u("command_redirect_controls",a,["play_pause"],void 0),fn(a,["seek"]),a.K().Md&&fn(a,["audio"]),kn(a)),b.show())))};
f.Xc=function(a){NB.C.Xc.call(this,a);var b=parseInt(a.getId(),10),c=1E3*this.a.getCurrentTime();this.Td&&!isNaN(b)&&c>a.start&&(2147483647==a.end||2147483646==a.end)&&(a=this.Td,(b=a.i[b])&&a.Cd==b&&!b.qd&&b.isVisible&&b.Sk&&b.a instanceof DA&&EA(b.a,google.ima.ViewMode.FULLSCREEN))};
f.rq=function(){MA(this,"sdk");if(this.qi)return this.qi;var a;if(this.da.P){a=new Jx(this.app,2);var b=google.ima.AdDisplayContainer,c=Cn(this.b),d=Fn(this.b);a.j||(a.j=Qb(a.i),a.j.addEventListener=v(a.eu,a),a.j.removeEventListener=v(a.fu,a));a=new b(c,void 0,d,a.j)}else{a=this.b.W.K().ub?this.b.W.app.S.b:Gn(this.b);if(!a)return a=Error("AdModule.getVideoElement returned an invalid element."),b=new xo,b.a(a),b;a=new google.ima.AdDisplayContainer(Cn(this.b),a,Fn(this.b))}return this.qi=new google.ima.AdsLoader(a)};
function MA(a,b){var c=b;"nl"==b&&(c=a.xe,c.j++,c=c.j.toString());a.j[c]=x();"bs"!=c&&"fb"!=c||cn(a,a.j,a.i)}function yB(a,b){a.u("command_update_cuerange_markers",b,a.a.a)}f.je=function(a){this.u(a)};function OB(a){return PB(a||arguments.callee.caller,[])}
function PB(a,b){var c=[];if(Va(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(QB(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){0<e&&c.push(", ");var g;g=d[e];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=QB(g))?g:"[fn]";break;default:g=typeof g}40<g.length&&(g=g.substr(0,40)+"...");c.push(g)}b.push(a);c.push(")\n");try{c.push(PB(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else a?
c.push("[...long stack...]"):c.push("[end]");return c.join("")}function QB(a){if(RB[a])return RB[a];a=String(a);if(!RB[a]){var b=/function ([^\(]+)/.exec(a);RB[a]=b?b[1]:"[Anonymous]"}return RB[a]}var RB={};function SB(a,b,c,d,e){this.reset(a,b,c,d,e)}SB.prototype.b=null;SB.prototype.a=null;var TB=0;SB.prototype.reset=function(a,b,c,d,e){"number"==typeof e||TB++;this.i=d||x();this.j=a;this.k=b;this.g=c;delete this.b;delete this.a};SB.prototype.getMessage=function(){return this.k};function UB(a){this.b=a}UB.prototype.a=null;function VB(a,b){this.name=a;this.value=b}VB.prototype.toString=function(){return this.name};var WB=new VB("SHOUT",1200),XB=new VB("SEVERE",1E3),YB=new VB("WARNING",900),ZB=new VB("INFO",800);f=UB.prototype;f.Hv=function(){};f.Jv=function(){return!1};f.getChildren=function(){this.a||(this.a={});return this.a};f.log=function(){};
f.Iv=function(a,b,c){var d=new SB(a,String(b),this.b);if(c){d.b=c;var e;var g=arguments.callee.caller;try{var h;var k=n("window.location.href");if(u(c))h={message:c,name:"Unknown error",lineNumber:"Not available",fileName:k,stack:"Not available"};else{var m,p,s=!1;try{m=c.lineNumber||c.yy||"Not available"}catch(r){m="Not available",s=!0}try{p=c.fileName||c.filename||c.sourceURL||l.$googDebugFname||k}catch(D){p="Not available",s=!0}h=!s&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||
"Not available",name:c.name||"UnknownError",lineNumber:m,fileName:p,stack:c.stack||"Not available"}}e="Message: "+ya(h.message)+'\nUrl: <a href="view-source:'+h.fileName+'" target="_new">'+h.fileName+"</a>\nLine: "+h.lineNumber+"\n\nBrowser stack:\n"+ya(h.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+ya(OB(g)+"-> ")}catch(M){e="Exception trying to expose exception! You win, we lose. "+M}d.a=e}return d};f.info=function(){};var $B={},aC=null;function bC(){aC||(aC=new UB(""),$B[""]=aC)}
function cC(a){bC();var b;if(!(b=$B[a])){b=new UB(a);var c=a.lastIndexOf("."),d=a.substr(c+1);cC(a.substr(0,c)).getChildren()[d]=b;$B[a]=b}return b};function dC(){this.a=x()}var eC=new dC;dC.prototype.set=function(a){this.a=a};dC.prototype.reset=function(){this.set(x())};dC.prototype.get=function(){return this.a};function fC(a){this.g=a||"";this.i=eC}fC.prototype.b=!0;fC.prototype.a=!1;function gC(a){return 10>a?"0"+a:String(a)}function hC(a,b){var c=(a.i-b)/1E3,d=c.toFixed(3),e=0;if(1>c)e=2;else for(;100>c;)e++,c*=10;for(;0<e--;)d=" "+d;return d}function iC(a){fC.call(this,a)}y(iC,fC);
function jC(a,b){var c=[];c.push(a.g," ");if(a.b){var d=new Date(b.i);c.push("[",gC(d.getFullYear()-2E3)+gC(d.getMonth()+1)+gC(d.getDate())+" "+gC(d.getHours())+":"+gC(d.getMinutes())+":"+gC(d.getSeconds())+"."+gC(Math.floor(d.getMilliseconds()/10)),"] ")}c.push("[",hC(b,a.i.get()),"s] ");c.push("[",b.g,"] ");c.push(b.getMessage());a.a&&b.b&&c.push("\n",b.a);c.push("\n");return c.join("")};function kC(a,b){this.b=new tb(a);this.a=b?qb:pb}kC.prototype.stringify=function(a){return sb(this.b,a)};kC.prototype.parse=function(a){return this.a(a)};function lC(){};function mC(){}mC.prototype.a=null;var nC;function oC(){}y(oC,mC);function pC(a){return(a=qC(a))?new ActiveXObject(a):new XMLHttpRequest}function rC(a){var b={};qC(a)&&(b[0]=!0,b[1]=!0);return b}
function qC(a){if(!a.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.b=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.b}nC=new oC;function sC(a,b,c,d,e){this.b=a;this.a=b;this.j=c;this.g=d;this.i=e||1;this.vc=45E3;this.o=new kr(this);this.k=new Ji;Ki(this.k,250)}f=sC.prototype;f.Ce=null;f.Cc=!1;f.Lf=null;f.gl=null;f.yg=null;f.Hf=null;f.Wd=null;f.Kb=null;f.Yd=null;f.Ra=null;f.Qg=0;f.Ec=null;f.wf=null;f.He=null;f.wg=-1;f.rn=!0;f.Je=!1;f.hk=0;f.ai=null;
function tC(a,b){switch(a){case 0:return"Non-200 return code ("+b+")";case 1:return"XMLHTTP failure (no data)";case 2:return"HttpConnection timeout";default:return"Unknown error"}}var uC={},vC={};f=sC.prototype;f.setTimeout=function(a){this.vc=a};function wC(a,b,c){a.Hf=1;a.Wd=Me(b.clone());a.Yd=c;a.F=!0;xC(a,null)}function yC(a,b,c,d,e){a.Hf=1;a.Wd=Me(b.clone());a.Yd=null;a.F=c;e&&(a.rn=!1);xC(a,d)}
function xC(a,b){a.yg=x();zC(a);a.Kb=a.Wd.clone();Ke(a.Kb,"t",a.i);a.Qg=0;a.Ra=a.b.Ak(a.b.ki()?b:null);0<a.hk&&(a.ai=new os(v(a.zn,a,a.Ra),a.hk));a.o.listen(a.Ra,"readystatechange",a.Lt);var c=a.Ce?Qb(a.Ce):{};a.Yd?(a.wf="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.Ra.send(a.Kb,a.wf,a.Yd,c)):(a.wf="GET",a.rn&&!ic&&(c.Connection="close"),a.Ra.send(a.Kb,a.wf,null,c));a.b.Bc(1);var d=a.Yd;if(d)for(var c="",d=d.split("&"),e=0;e<d.length;e++){var g=d[e].split("=");if(1<g.length)var h=
g[0],g=g[1],k=h.split("_"),c=2<=k.length&&"type"==k[1]?c+(h+"="+g+"&"):c+(h+"=redacted&")}else c=null;a.a.info("XMLHTTP REQ ("+a.g+") [attempt "+a.i+"]: "+a.wf+"\n"+a.Kb+"\n"+c)}f.Lt=function(a){a=a.target;var b=this.ai;b&&3==AC(a)?(this.a.debug("Throttling readystatechange."),ps(b)):this.zn(a)};
f.zn=function(a){try{if(a==this.Ra)t:{var b=AC(this.Ra),c=this.Ra.i,d=BC(this.Ra);if(C&&!xc(10)||ic&&!wc("420+")){if(4>b)break t}else if(3>b||3==b&&!gc&&!CC(this.Ra))break t;this.Je||4!=b||7==c||(8==c||0>=d?this.b.Bc(3):this.b.Bc(2));DC(this);var e=BC(this.Ra);this.wg=e;var g=CC(this.Ra);g||this.a.debug("No response text for uri "+this.Kb+" status "+e);this.Cc=200==e;this.a.info("XMLHTTP RESP ("+this.g+") [ attempt "+this.i+"]: "+this.wf+"\n"+this.Kb+"\n"+b+" "+e);this.Cc?(4==b&&EC(this),this.F?(FC(this,
b,g),gc&&this.Cc&&3==b&&(this.o.listen(this.k,"tick",this.tt),this.k.start())):(GC(this.a,this.g,g,null),HC(this,g)),this.Cc&&!this.Je&&(4==b?this.b.Yh(this):(this.Cc=!1,zC(this)))):(this.He=400==e&&0<g.indexOf("Unknown SID")?3:0,IC(),EC(this),JC(this))}}catch(h){this.a.debug("Failed call to OnXmlHttpReadyStateChanged_"),this.Ra&&CC(this.Ra)&&CC(this.Ra)}finally{}};
function FC(a,b,c){for(var d=!0;!a.Je&&a.Qg<c.length;){var e=KC(a,c);if(e==vC){4==b&&(a.He=4,IC(),d=!1);GC(a.a,a.g,null,"[Incomplete Response]");break}else if(e==uC){a.He=4;IC();GC(a.a,a.g,c,"[Invalid Chunk]");d=!1;break}else GC(a.a,a.g,e,null),HC(a,e)}4==b&&0==c.length&&(a.He=1,IC(),d=!1);a.Cc=a.Cc&&d;d||(GC(a.a,a.g,c,"[Invalid Chunked Response]"),EC(a),JC(a))}f.tt=function(){var a=AC(this.Ra),b=CC(this.Ra);this.Qg<b.length&&(DC(this),FC(this,a,b),this.Cc&&4!=a&&zC(this))};
function KC(a,b){var c=a.Qg,d=b.indexOf("\n",c);if(-1==d)return vC;c=Number(b.substring(c,d));if(isNaN(c))return uC;d+=1;if(d+c>b.length)return vC;var e=b.substr(d,c);a.Qg=d+c;return e}
function LC(a,b){a.yg=x();zC(a);var c=b?window.location.hostname:"";a.Kb=a.Wd.clone();Je(a.Kb,"DOMAIN",c);Je(a.Kb,"t",a.i);try{a.Ec=new ActiveXObject("htmlfile")}catch(d){EC(a);a.He=7;IC();JC(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.Ec.open();a.Ec.write(e);a.Ec.close();a.Ec.parentWindow.m=v(a.Wt,a);a.Ec.parentWindow.d=v(a.In,a,!0);a.Ec.parentWindow.rpcClose=v(a.In,a,!1);c=a.Ec.createElement("div");a.Ec.parentWindow.document.body.appendChild(c);
c.innerHTML='<iframe src="'+a.Kb+'"></iframe>';a.a.info("TRIDENT REQ ("+a.g+") [ attempt "+a.i+"]: GET\n"+a.Kb);a.b.Bc(1)}f.Wt=function(a){MC(v(this.sy,this,a),0)};f.sy=function(a){if(!this.Je){var b=this.a;b.info("TRIDENT TEXT ("+this.g+"): "+NC(b,a));DC(this);HC(this,a);zC(this)}};f.In=function(a){MC(v(this.ry,this,a),0)};f.ry=function(a){this.Je||(this.a.info("TRIDENT TEXT ("+this.g+"): "+a?"success":"failure"),EC(this),this.Cc=a,this.b.Yh(this),this.b.Bc(4))};f.cancel=function(){this.Je=!0;EC(this)};
function zC(a){a.gl=x()+a.vc;OC(a,a.vc)}function OC(a,b){if(null!=a.Lf)throw Error("WatchDog timer not null");a.Lf=MC(v(a.Wx,a),b)}function DC(a){a.Lf&&(l.clearTimeout(a.Lf),a.Lf=null)}f.Wx=function(){this.Lf=null;var a=x();0<=a-this.gl?(this.a.info("TIMEOUT: "+this.Kb),2!=this.Hf&&this.b.Bc(3),EC(this),this.He=2,IC(),JC(this)):OC(this,this.gl-a)};function JC(a){a.b.Hb()||a.Je||a.b.Yh(a)}
function EC(a){DC(a);Xg(a.ai);a.ai=null;a.k.stop();a.o.removeAll();if(a.Ra){var b=a.Ra;a.Ra=null;b.abort();b.dispose()}a.Ec&&(a.Ec=null)}function HC(a,b){try{a.b.hp(a,b),a.b.Bc(4)}catch(c){}};function PC(){}function GC(a,b,c,d){a.info("XMLHTTP TEXT ("+b+"): "+NC(a,c)+(d?" "+d:""))}PC.prototype.debug=function(a){this.info(a)};PC.prototype.info=function(){};
function NC(a,b){if(!b||"y2f%"==b)return b;try{var c=qb(b);if(c)for(var d=0;d<c.length;d++)if(t(c[d])){var e=c[d];if(!(2>e.length)){var g=e[1];if(t(g)&&!(1>g.length)){var h=g[0];if("noop"!=h&&"stop"!=h)for(var k=1;k<g.length;k++)g[k]=""}}}return rb(c)}catch(m){return a.debug("Exception parsing expected JS array - probably was not JS"),b}};function QC(a,b,c,d,e){(new PC).debug("TestLoadImageWithRetries: "+e);if(0==d)c(!1);else{var g=e||0;d--;RC(a,b,function(e){e?c(!0):l.setTimeout(function(){QC(a,b,c,d,g)},g)})}}
function RC(a,b,c){var d=new PC;d.debug("TestLoadImage: loading "+a);var e=new Image;e.onload=function(){try{d.debug("TestLoadImage: loaded"),SC(e),c(!0)}catch(a){}};e.onerror=function(){try{d.debug("TestLoadImage: error"),SC(e),c(!1)}catch(a){}};e.onabort=function(){try{d.debug("TestLoadImage: abort"),SC(e),c(!1)}catch(a){}};e.ontimeout=function(){try{d.debug("TestLoadImage: timeout"),SC(e),c(!1)}catch(a){}};l.setTimeout(function(){if(e.ontimeout)e.ontimeout()},b);e.src=a}
function SC(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function TC(a,b){this.a=a;this.b=b;this.g=new kC(null,!0)}f=TC.prototype;f.Gk=null;f.Pb=null;f.Ci=!1;f.ao=null;f.Bi=null;f.Tk=null;f.Xk=null;f.Rb=null;f.Ve=-1;f.$g=null;f.dh=null;f.connect=function(a){this.Xk=a;a=UC(this.a,this.Xk);IC();this.ao=x();var b=this.a.A;null!=b?(this.$g=b[0],(this.dh=b[1])?(this.Rb=1,VC(this)):(this.Rb=2,WC(this))):(Ke(a,"MODE","init"),this.Pb=new sC(this,this.b,void 0,void 0,void 0),this.Pb.Ce=this.Gk,yC(this.Pb,a,!1,null,!0),this.Rb=0)};
function VC(a){var b=XC(a.a,a.dh,"/mail/images/cleardot.gif");Me(b);QC(b.toString(),5E3,v(a.Dv,a),3,2E3);a.Bc(1)}f.Dv=function(a){if(a)this.Rb=2,WC(this);else{IC();var b=this.a;b.a.debug("Test Connection Blocked");b.wd=b.he.Ve;YC(b,9)}a&&this.Bc(2)};
function WC(a){a.b.debug("TestConnection: starting stage 2");var b=a.a.B;if(null!=b)a.b.debug("TestConnection: skipping stage 2, precomputed result is "+b?"Buffered":"Unbuffered"),IC(),b?(IC(),$C(a.a,a,!1)):(IC(),$C(a.a,a,!0));else if(a.Pb=new sC(a,a.b,void 0,void 0,void 0),a.Pb.Ce=a.Gk,b=aD(a.a,a.$g,a.Xk),IC(),!C||xc(10))Ke(b,"TYPE","xmlhttp"),yC(a.Pb,b,!1,a.$g,!1);else{Ke(b,"TYPE","html");var c=a.Pb;a=Boolean(a.$g);c.Hf=3;c.Wd=Me(b.clone());LC(c,a)}}f.Ak=function(a){return this.a.Ak(a)};
f.abort=function(){this.Pb&&(this.Pb.cancel(),this.Pb=null);this.Ve=-1};f.Hb=function(){return!1};
f.hp=function(a,b){this.Ve=a.wg;if(0==this.Rb)if(this.b.debug("TestConnection: Got data for stage 1"),b){try{var c=this.g.parse(b)}catch(d){bD(this.a,this);return}this.$g=c[0];this.dh=c[1]}else this.b.debug("TestConnection: Null responseText"),bD(this.a,this);else if(2==this.Rb)if(this.Ci)IC(),this.Tk=x();else if("11111"==b){if(IC(),this.Ci=!0,this.Bi=x(),c=this.Bi-this.ao,!C||xc(10)||500>c)this.Ve=200,this.Pb.cancel(),this.b.debug("Test connection succeeded; using streaming connection"),IC(),$C(this.a,
this,!0)}else IC(),this.Bi=this.Tk=x(),this.Ci=!1};
f.Yh=function(){this.Ve=this.Pb.wg;if(!this.Pb.Cc)this.b.debug("TestConnection: request failed, in state "+this.Rb),0==this.Rb?IC():2==this.Rb&&IC(),bD(this.a,this);else if(0==this.Rb)this.b.debug("TestConnection: request complete for initial check"),this.dh?(this.Rb=1,VC(this)):(this.Rb=2,WC(this));else if(2==this.Rb){this.b.debug("TestConnection: request complete for stage 2");var a=!1;(a=!C||xc(10)?this.Ci:200>this.Tk-this.Bi?!1:!0)?(this.b.debug("Test connection succeeded; using streaming connection"),IC(),
$C(this.a,this,!0)):(this.b.debug("Test connection failed; not using streaming"),IC(),$C(this.a,this,!1))}};f.ki=function(){return this.a.ki()};f.Bc=function(a){this.a.Bc(a)};function cD(a){Gi.call(this);this.headers=new $d;this.j=a||null;this.b=!1;this.I=this.a=null;this.O=this.A="";this.i=0;this.k="";this.g=this.L=this.F=this.J=!1;this.o=0;this.B=null;this.P="";this.G=this.Q=!1}y(cD,Gi);var dD=/^https?$/i,eD=["POST","PUT"];f=cD.prototype;
f.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.A+"; newUri="+a);b=b?b.toUpperCase():"GET";this.A=a;this.k="";this.i=0;this.O=b;this.J=!1;this.b=!0;this.a=this.j?pC(this.j):pC(nC);this.I=this.j?this.j.a||(this.j.a=rC(this.j)):nC.a||(nC.a=rC(nC));this.a.onreadystatechange=v(this.Qm,this);try{lC(fD(this,"Opening Xhr")),this.L=!0,this.a.open(b,a,!0),this.L=!1}catch(e){lC(fD(this,"Error opening Xhr: "+e.message));gD(this,e);return}a=c||"";
var g=this.headers.clone();d&&ee(d,function(a,b){g.set(b,a)});d=Ra(g.uc(),hD);c=l.FormData&&a instanceof l.FormData;!Va(eD,b)||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");ee(g,function(a,b){this.a.setRequestHeader(b,a)},this);this.P&&(this.a.responseType=this.P);"withCredentials"in this.a&&(this.a.withCredentials=this.Q);try{iD(this),0<this.o&&(this.G=C&&wc(9)&&ga(this.a.timeout)&&q(this.a.ontimeout),lC(fD(this,"Will abort after "+this.o+"ms if incomplete, xhr2 "+
this.G)),this.G?(this.a.timeout=this.o,this.a.ontimeout=v(this.vc,this)):this.B=Li(this.vc,this.o,this)),lC(fD(this,"Sending request")),this.F=!0,this.a.send(a),this.F=!1}catch(h){lC(fD(this,"Send error: "+h.message)),gD(this,h)}};function hD(a){return"content-type"==a.toLowerCase()}f.vc=function(){"undefined"!=typeof aa&&this.a&&(this.k="Timed out after "+this.o+"ms, aborting",this.i=8,fD(this,this.k),Hi(this,"timeout"),this.abort(8))};
function gD(a,b){a.b=!1;a.a&&(a.g=!0,a.a.abort(),a.g=!1);a.k=b;a.i=5;jD(a);kD(a)}function jD(a){a.J||(a.J=!0,Hi(a,"complete"),Hi(a,"error"))}f.abort=function(a){this.a&&this.b&&(fD(this,"Aborting"),this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.i=a||7,Hi(this,"complete"),Hi(this,"abort"),kD(this))};f.H=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),kD(this,!0));cD.C.H.call(this)};f.Qm=function(){this.ha()||(this.L||this.F||this.g?lD(this):this.ww())};f.ww=function(){lD(this)};
function lD(a){if(a.b&&"undefined"!=typeof aa)if(a.I[1]&&4==AC(a)&&2==BC(a))fD(a,"Local request error detected and ignored");else if(a.F&&4==AC(a))Li(a.Qm,0,a);else if(Hi(a,"readystatechange"),4==AC(a)){fD(a,"Request complete");a.b=!1;try{var b=BC(a),c,d;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break t;default:d=!1}if(!(c=d)){var e;if(e=0===b){var g=he(String(a.A))[1]||null;if(!g&&self.location)var h=self.location.protocol,g=h.substr(0,h.length-1);e=!dD.test(g?
g.toLowerCase():"")}c=e}if(c)Hi(a,"complete"),Hi(a,"success");else{a.i=6;var k;try{k=2<AC(a)?a.a.statusText:""}catch(m){k=""}a.k=k+" ["+BC(a)+"]";jD(a)}}finally{kD(a)}}}function kD(a,b){if(a.a){iD(a);var c=a.a,d=a.I[0]?ba:null;a.a=null;a.I=null;b||Hi(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function iD(a){a.a&&a.G&&(a.a.ontimeout=null);ga(a.B)&&(l.clearTimeout(a.B),a.B=null)}function AC(a){return a.a?a.a.readyState:0}function BC(a){try{return 2<AC(a)?a.a.status:-1}catch(b){return-1}}
function CC(a){try{return a.a?a.a.responseText:""}catch(b){return""}}function fD(a,b){return b+" ["+a.O+" "+a.A+" "+BC(a)+"]"};function mD(a,b,c){this.F=a||null;this.b=1;this.g=[];this.i=[];this.a=new PC;this.k=new kC(null,!0);this.A=b||null;this.B=null!=c?c:null}function nD(a,b){this.a=a;this.map=b;this.Z=null}f=mD.prototype;f.hh=null;f.zb=null;f.La=null;f.Ck=null;f.bi=null;f.Rn=null;f.ri=null;f.Ng=0;f.Fu=0;f.pb=null;f.ee=null;f.Gd=null;f.We=null;f.he=null;f.di=null;f.tf=-1;f.mo=-1;f.wd=-1;f.Og=0;f.Gf=0;f.Ge=8;var oD=new Gi;function pD(a){fi.call(this,"statevent",a)}y(pD,fi);
function qD(a,b){fi.call(this,"timingevent",a);this.size=b}y(qD,fi);function rD(a){fi.call(this,"serverreachability",a)}y(rD,fi);f=mD.prototype;f.connect=function(a,b,c,d,e){this.a.debug("connect()");IC();this.Ck=b;this.hh=c||{};d&&q(e)&&(this.hh.OSID=d,this.hh.OAID=e);this.a.debug("connectTest_()");this.he=new TC(this,this.a);this.he.Gk=null;this.he.g=this.k;this.he.connect(a)};
f.disconnect=function(){this.a.debug("disconnect()");sD(this);if(3==this.b){var a=this.Ng++,b=this.bi.clone();Je(b,"SID",this.j);Je(b,"RID",a);Je(b,"TYPE","terminate");tD(this,b);a=new sC(this,this.a,this.j,a,void 0);a.Hf=2;a.Wd=Me(b.clone());(new Image).src=a.Wd;a.yg=x();zC(a)}uD(this)};function sD(a){a.he&&(a.he.abort(),a.he=null);a.La&&(a.La.cancel(),a.La=null);a.Gd&&(l.clearTimeout(a.Gd),a.Gd=null);vD(a);a.zb&&(a.zb.cancel(),a.zb=null);a.ee&&(l.clearTimeout(a.ee),a.ee=null)}
f.Hb=function(){return 0==this.b};function wD(a){var b=0;a.La&&b++;a.zb&&b++;return b}function xD(a){a.zb||a.ee||(a.ee=MC(v(a.po,a),0),a.Og=0)}
f.po=function(a){this.ee=null;this.a.debug("startForwardChannel_");if(1==this.b){if(!a){this.a.debug("open_()");this.Ng=Math.floor(1E5*Math.random());a=this.Ng++;var b=new sC(this,this.a,"",a,void 0);b.Ce=null;var c=yD(this),d=this.bi.clone();Je(d,"RID",a);this.F&&Je(d,"CVER",this.F);tD(this,d);wC(b,d,c);this.zb=b;this.b=2}}else 3==this.b&&(a?zD(this,a):0==this.g.length?this.a.debug("startForwardChannel_ returned: nothing to send"):this.zb||(zD(this),this.a.debug("startForwardChannel_ finished, sent request")))};
function zD(a,b){var c,d;b?6<a.Ge?(a.g=a.i.concat(a.g),a.i.length=0,c=a.Ng-1,d=yD(a)):(c=b.g,d=b.Yd):(c=a.Ng++,d=yD(a));var e=a.bi.clone();Je(e,"SID",a.j);Je(e,"RID",c);Je(e,"AID",a.tf);tD(a,e);c=new sC(a,a.a,a.j,c,a.Og+1);c.Ce=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.zb=c;wC(c,e,d)}function tD(a,b){if(a.pb){var c=a.pb.Tp(a);c&&ee(c,function(a,c){Je(b,c,a)})}}
function yD(a){var b=Math.min(a.g.length,1E3),c=["count="+b],d;6<a.Ge&&0<b?(d=a.g[0].a,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var g=a.g[e].a,h=a.g[e].map,g=6>=a.Ge?e:g-d;try{ee(h,function(a,b){c.push("req"+g+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+g+"_type="+encodeURIComponent("_badmap"))}}a.i=a.i.concat(a.g.splice(0,b));return c.join("&")}function AD(a){a.La||a.Gd||(a.o=1,a.Gd=MC(v(a.Uo,a),0),a.Gf=0)}
function BD(a){if(a.La||a.Gd||3<=a.Gf)return!1;a.a.debug("Going to retry GET");a.o++;a.Gd=MC(v(a.Uo,a),CD(a,a.Gf));a.Gf++;return!0}
f.Uo=function(){this.Gd=null;this.a.debug("Creating new HttpRequest");this.La=new sC(this,this.a,this.j,"rpc",this.o);this.La.Ce=null;this.La.hk=0;var a=this.Rn.clone();Je(a,"RID","rpc");Je(a,"SID",this.j);Je(a,"CI",this.di?"0":"1");Je(a,"AID",this.tf);tD(this,a);if(!C||xc(10))Je(a,"TYPE","xmlhttp"),yC(this.La,a,!0,this.ri,!1);else{Je(a,"TYPE","html");var b=this.La,c=Boolean(this.ri);b.Hf=3;b.Wd=Me(a.clone());LC(b,c)}this.a.debug("New Request created")};
function $C(a,b,c){a.a.debug("Test Connection Finished");a.di=c;a.wd=b.Ve;a.a.debug("connectChannel_()");a.Bv(1,0);a.bi=UC(a,a.Ck);xD(a)}function bD(a,b){a.a.debug("Test Connection Failed");a.wd=b.Ve;YC(a,2)}
f.hp=function(a,b){if(0!=this.b&&(this.La==a||this.zb==a))if(this.wd=a.wg,this.zb==a&&3==this.b)if(7<this.Ge){var c;try{c=this.k.parse(b)}catch(d){c=null}if(t(c)&&3==c.length){var e=c;if(0==e[0])t:if(this.a.debug("Server claims our backchannel is missing."),this.Gd)this.a.debug("But we are currently starting the request.");else{if(this.La)if(this.La.yg+3E3<this.zb.yg)vD(this),this.La.cancel(),this.La=null;else break t;BD(this);IC()}else this.mo=e[1],c=this.mo-this.tf,0<c&&(e=e[2],this.a.debug(e+" bytes (in "+
c+" arrays) are outstanding on the BackChannel"),37500>e&&this.di&&0==this.Gf&&!this.We&&(this.We=MC(v(this.Eu,this),6E3)))}else this.a.debug("Bad POST response data returned"),YC(this,11)}else"y2f%"!=b&&(this.a.debug("Bad data returned - missing/invald magic cookie"),YC(this,11));else if(this.La==a&&vD(this),!/^[\s\xa0]*$/.test(b))for(c=this.k.parse(b),t(c),e=0;e<c.length;e++){var g=c[e];this.tf=g[0];g=g[1];2==this.b?"c"==g[0]?(this.j=g[1],this.ri=g[2],g=g[3],null!=g?this.Ge=g:this.Ge=6,this.b=3,
this.pb&&this.pb.lo(this),this.Rn=aD(this,this.ri,this.Ck),AD(this)):"stop"==g[0]&&YC(this,7):3==this.b&&("stop"==g[0]?YC(this,7):"noop"!=g[0]&&this.pb&&this.pb.ko(this,g),this.Gf=0)}};f.Eu=function(){null!=this.We&&(this.We=null,this.La.cancel(),this.La=null,BD(this),IC())};function vD(a){null!=a.We&&(l.clearTimeout(a.We),a.We=null)}
f.Yh=function(a){this.a.debug("Request complete");var b;if(this.La==a)vD(this),this.La=null,b=2;else if(this.zb==a)this.zb=null,b=1;else return;this.wd=a.wg;if(0!=this.b)if(a.Cc)1==b?(x(),Hi(oD,new qD(oD,a.Yd?a.Yd.length:0)),xD(this),this.i.length=0):AD(this);else{var c=a.He;if(3==c||7==c||0==c&&0<this.wd)this.a.debug("Not retrying due to error type");else{this.a.debug("Maybe retrying, last error: "+tC(c,this.wd));var d;if(d=1==b)this.zb||this.ee?d=!1:1==this.b||2<=this.Og?d=!1:(this.a.debug("Going to retry POST"),
this.ee=MC(v(this.po,this,a),CD(this,this.Og)),this.Og++,d=!0);if(d||2==b&&BD(this))return;this.a.debug("Exceeded max number of retries")}this.a.debug("Error: HTTP request failed");switch(c){case 1:YC(this,5);break;case 4:YC(this,10);break;case 3:YC(this,6);break;case 7:YC(this,12);break;default:YC(this,2)}}};function CD(a,b){var c=5E3+Math.floor(1E4*Math.random());a.pb||(a.a.debug("Inactive channel"),c*=2);return c*b}
f.Bv=function(a){if(!Va(arguments,this.b))throw Error("Unexpected channel state: "+this.b);};function YC(a,b){a.a.info("Error code "+b);if(2==b||9==b){var c=null;a.pb&&(c=null);var d=v(a.Ev,a);c||(c=new ve("//www.google.com/images/cleardot.gif"),Me(c));RC(c.toString(),1E4,d)}else IC();DD(a,b)}f.Ev=function(a){a?(this.a.info("Successfully pinged google.com"),IC()):(this.a.info("Failed to ping google.com"),IC(),DD(this,8))};
function DD(a,b){a.a.debug("HttpChannel: error - "+b);a.b=0;a.pb&&a.pb.No(a,b);uD(a);sD(a)}function uD(a){a.b=0;a.wd=-1;if(a.pb)if(0==a.i.length&&0==a.g.length)a.pb.Jk(a);else{a.a.debug("Number of undelivered maps, pending: "+a.i.length+", outgoing: "+a.g.length);var b=cb(a.i),c=cb(a.g);a.i.length=0;a.g.length=0;a.pb.Jk(a,b,c)}}function UC(a,b){var c=XC(a,null,b);a.a.debug("GetForwardChannelUri: "+c);return c}function aD(a,b,c){b=XC(a,a.ki()?b:null,c);a.a.debug("GetBackChannelUri: "+b);return b}
function XC(a,b,c){var d=Ne(c);if(""!=d.Ne)b&&xe(d,b+"."+d.Ne),ye(d,d.nh);else var e=window.location,d=Oe(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.hh&&ee(a.hh,function(a,b){Je(d,b,a)});Je(d,"VER",a.Ge);tD(a,d);return d}f.Ak=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new cD;a.Q=!1;return a};function MC(a,b){if(!ha(a))throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a()},b)}f.Bc=function(){Hi(oD,new rD(oD))};
function IC(){Hi(oD,new pD(oD))}f.ki=function(){return!(!C||xc(10))};function ED(){}f=ED.prototype;f.lo=function(){};f.ko=function(){};f.No=function(){};f.Jk=function(){};f.Tp=function(){return{}};function FD(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.lp=a.user||"")}f=FD.prototype;f.id="";f.name="";f.app="";f.type="REMOTE_CONTROL";f.lp="";f.equals=function(a){return a?this.id==a.id:!1};function GD(a,b){this.action=a;this.params=b||null};function HD(){v(this.i,this);this.a=new iC;this.a.b=!1;this.b=this.a.a=!1;this.g="";this.j={}}function ID(){var a=JD;!0!=a.b&&(bC(),a.b=!0)}HD.prototype.i=function(a){if(!this.j[a.g]){var b=jC(this.a,a),c=KD;if(c)switch(a.j){case WB:LD(c,"info",b);break;case XB:LD(c,"error",b);break;case YB:LD(c,"warn",b);break;default:LD(c,"debug",b)}else window.opera?window.opera.postError(b):this.g+=b}};var JD=null,KD=window.console;function LD(a,b,c){if(a[b])a[b](c);else a.log(c)};var MD=null,ND=null,OD=Array(50),PD=-1,QD=!1;function RD(a){var b=(PD+1)%50;PD=b;OD[b]=a;QD||(QD=49==b)}function SD(a){var b=OD;if(b[0]){var c=PD,d=QD?c:-1;do{var d=(d+1)%50,e=b[d];z(a,function(a){a(e)})}while(d!=c);OD=Array(50);PD=-1;QD=!1}}
function TD(){var a=UD,b=n("yt.mdx.remote.debug.logger_"),c=n("yt.mdx.remote.debug.handlers_");b&&c||(JD||(JD=new HD),-1!=window.location.href.indexOf("Debug=true")&&ID(),ID(),JD.a.a=!0,(b=n("yt.mdx.remote.debug.logger_"))||(b=cC("yt.mdx.remote")),MD=b,UB.prototype.log=UB.prototype.log,UB.prototype.getLogRecord=UB.prototype.Iv,UB.prototype.addHandler=UB.prototype.Hv,UB.prototype.removeHandler=UB.prototype.Jv,pa("yt.mdx.remote.debug.logger_",MD),ND=n("yt.mdx.remote.debug.handlers_")||[],pa("yt.mdx.remote.debug.handlers_",
ND),n("yt.mdx.remote.debug.logger_"),c=n("yt.mdx.remote.debug.handlers_"));c&&(c.push(a),SD(c))}function VD(a,b){var c=n("yt.mdx.remote.debug.logger_"),d=n("yt.mdx.remote.debug.handlers_");if(c){if(c.log(ZB,a+": "+b,void 0),d&&!Wa(d)){SD(d);var e=c.getLogRecord(ZB,a+": "+b,void 0);z(d,function(a){a(e)})}}else d&&!Wa(d)||RD(new SB(ZB,String(b),"yt.mdx.remote"))};function WD(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function XD(a){VD("CAST",a)}function UD(a){var b=YD();b&&b.logMessage&&(a=jC(ZD,a),b.logMessage(a))}
function $D(){if(!aE&&(Wa(bE)&&db(bE,Sg()),WD())){var a=YD();a?(a.removeReceiverListener("YouTube",cE),a.addReceiverListener("YouTube",cE),XD("API initialized in the other binary")):(a=new cast.Api,pa("yt.mdx.remote.castapi.api_",a),a.addReceiverListener("YouTube",cE),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){window.location.reload()}),ZD=new iC,ZD.b=!1,ZD.a=!1,TD(),XD("API initialized"));aE=!0}}
function dE(a){var b=Sa(bE,function(b){return b.id==a.id});0<=b&&(bE[b]=rg(a))}function cE(a){XD("Updating receivers: "+rb(a));eE(a);Qr("yt-remote-cast-device-list-update",fE());z(fE(),function(a){gE(a.id)});z(a,function(a){a.isTabProjected&&(a=hE(a.id),XD("Detected device: "+a.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event."),Qr("yt-remote-cast-device-tab-projected",a))})}
function iE(a,b){XD("Updating "+a+" activity status: "+rb(b));var c=hE(a);c?(b.activityId&&(c.activityId=b.activityId),c.status="running"==b.status?"RUNNING":"stopped"==b.status?"STOPPED":"error"==b.status?"ERROR":"UNKNOWN","RUNNING"!=c.status&&(c.activityId=""),dE(c),Qr("yt-remote-cast-device-status-update",c)):XD("Device not found")}function fE(){$D();return xg(bE)}
function eE(a){a=Na(a,function(a){var c={id:a.id,name:a.name};if(a=hE(a.id))c.activityId=a.activityId,c.status=a.status;return c});Xa(bE);db(bE,a)}function hE(a){var b=fE();return Ra(b,function(b){return b.id==a})||null}function gE(a){var b=hE(a),c=YD();c&&b&&b.activityId&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");iE(a,b)})}
function jE(a){$D();var b=hE(a),c=YD();c&&b&&b.activityId?(XD("Stopping cast activity"),c.stopActivity(b.activityId,oa(iE,a))):XD("Dropping cast activity stop")}function YD(){return n("yt.mdx.remote.castapi.api_")}var ZD=null,aE=!1,bE=n("yt.mdx.remote.castapi.devices_")||[];pa("yt.mdx.remote.castapi.devices_",bE);function kE(a,b){Ji.call(this);if(ha(a))b&&(a=v(a,b));else if(a&&ha(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.o=a;wi(this,"tick",v(this.k,this));this.stop();Ki(this,5E3+2E4*Math.random())}y(kE,Ji);kE.prototype.j=0;kE.prototype.k=function(){if(500<this.a){var a=this.a;24E4>2*a&&(a*=2);Ki(this,a)}this.o()};kE.prototype.start=function(){kE.C.start.call(this);this.j=x()+this.a};kE.prototype.stop=function(){this.j=0;kE.C.stop.call(this)};function lE(a,b){this.k=a;this.j=b;this.g=new ai;this.b=new kE(this.Nt,this);this.a=null}y(lE,ED);f=lE.prototype;f.Xh="";f.Rg=0;f.Di=0;f.Ie=function(){};f.D=function(a,b,c){return this.g.D(a,b,c)};f.$=function(a,b,c){return this.g.$(a,b,c)};f.Tc=function(a){return this.g.Tc(a)};f.u=function(a,b){return this.g.u.apply(this.g,arguments)};
f.connect=function(a,b,c){if(!this.a||2!=this.a.b){this.Xh="";this.b.stop();this.i=a||null;this.Rg=b||0;a=this.k+"/test";b=this.k+"/bind";var d=new mD("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.a;e&&(e.pb=null);d.pb=this;this.a=d;e?(3!=e.b&&0==wD(e)||this.Ie("Unexpected state on old channel when reconnecting: "+e.b),this.a.connect(a,b,this.j,e.j,e.tf)):c?this.a.connect(a,b,this.j,c.sessionId,c.arrayId):this.a.connect(a,b,this.j)}};
f.disconnect=function(a){this.Di=a||0;this.b.stop();this.a&&0!=this.a.b&&this.a.disconnect();this.Di=0};f.sendMessage=function(a,b){if(!this.a||0==this.a.b||2!=this.a.b&&3!=this.a.b&&!this.b.Uc)this.Ie("Ignoring message: "+a);else{var c={_sc:a};b&&Tb(c,b);var d=this.a;if(0==d.b)throw Error("Invalid operation: sending map when state is closed");1E3==d.g.length&&rb(c);d.g.push(new nD(d.Fu++,c));2!=d.b&&3!=d.b||xD(d)}};
f.lo=function(){var a=this.b;a.stop();Ki(a,5E3+2E4*Math.random());this.i=null;this.Rg=0;this.u("handlerOpened")};f.No=function(a,b){var c=2==b&&401==this.a.wd;4==b||c||(6==b&&(c=this.b,c.stop(),Ki(c,500)),this.b.start());this.u("handlerError",b)};f.Jk=function(){this.b.Uc||this.u("handlerClosed")};f.Tp=function(){var a={v:2};this.Xh&&(a.gsessionid=this.Xh);0!=this.Rg&&(a.ui=""+this.Rg);0!=this.Di&&(a.ui=""+this.Di);this.i&&Tb(a,this.i);return a};
f.ko=function(a,b){"S"==b[0]?this.Xh=b[1]:this.g.u("handlerMessage",new GD(b[0],b[1]))};function mE(a,b){(a.j.loungeIdToken=b)||a.b.stop()}function nE(a){return a.b.Uc?a.b.j-x():NaN}f.Nt=function(){this.b.stop();0!=wD(this.a)?this.b.start():this.connect(this.i,this.Rg)};function oE(a,b){lE.call(this,a,b)}y(oE,lE);oE.prototype.Ie=function(){};function pE(){this.yb=[];this.index=-1;qE(this)}function qE(a){a.volume=-1;a.muted=!1;a.b=null;a.a=-1;a.g=null;a.i=0;a.j=x()}function rE(a){return a.yb[a.index]}function sE(a,b){a.i=b;a.j=x()}function tE(a){switch(a.a){case 1:return(x()-a.j)/1E3+a.i;case -1E3:return 0}return a.i}function uE(a,b){var c=a.index;a.index=La(a.yb,b);c!=a.index&&qE(a)}function vE(a,b,c){c=c||rE(a);if(lb(a.yb,b)&&c==rE(a))return!1;a.yb=cb(b);uE(a,c);return!0}
pE.prototype.add=function(a,b){return a&&!Va(this.yb,a)?(!b||-1<this.index&&this.index>=this.yb.length-1?this.yb.push(a):this.yb.splice(this.index+1,0,a),!0):!1};pE.prototype.remove=function(a){var b=rE(this);return Za(this.yb,a)?(this.index=La(this.yb,b),!0):!1};function wE(){R.call(this);this.Fc=Bg(Pg());this.log_("Initializing local screens: "+Rf(this.Fc));this.g=[];this.vk=null;this.b=[];this.a=[];this.xi(fE());this.log_("Initializing DIAL devices: "+sg(this.a));var a=Bg(Qg());xE(this,a);this.log_("Initializing online screens: "+Rf(this.b));yE(this)}y(wE,R);var zE=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];f=wE.prototype;f.kh=NaN;f.log_=function(a){VD("RM",a)};
function AE(a){var b=navigator.userAgent;if(0<=b.search("MSIE")&&(b=b.match(/MSIE ([\d.]+)/)[1],0>Ea(b,"10.0")))return a;b=he(document.location.href);return fe("https",null,b[3],null,a)}function yE(a){Lr("yt-remote-cast-device-list-update",a.xi,a);Lr("yt-remote-cast-device-status-update",a.lx,a);Lr("yt-remote-cast-device-tab-projected",function(a){this.u("connectToReceiver",a.id)},a);a.zp();mf(v(a.zp,a),1E4)}
f.u=function(a,b){if(this.ha())return!1;this.log_("Firing "+a);return this.F.u.apply(this.F,arguments)};f.zp=function(){var a=fE();Wa(a)||this.xi(a);a=BE(this);Wa(a)||(mg("yt-remote-lounge-token-expiration")?CE(this,a):DE(this))};f.Yk=function(){var a=BE(this),b=Ma(a,function(a){return!!Eg(this.b,a)},this);xE(this,b);this.xi(fE());this.u("managedScreenChange",a)};function EE(a,b){return Ma(b,function(a){return a.Bb?(a=zg(this.a,a.Bb),!!a&&"RUNNING"==a.status):!0},a)}
f.xi=function(a){var b=!1;z(a,function(a){var c=Fg(this.Fc,a.id);c&&c.name!=a.name&&(this.log_("Renaming screen id "+c.id+" from "+c.name+" to "+a.name),c.name=a.name,b=!0)},this);b&&(this.log_("Renaming due to DIAL."),FE(this));Rg(wg(a));var c=!lb(this.a,a,yg);c&&this.log_("Updating DIAL devices: "+sg(this.a)+" to "+sg(a));this.a=a;xE(this,this.b);c&&this.u("onlineReceiverChange")};
f.lx=function(a){var b=zg(this.a,a.id);b&&(this.log_("Updating DIAL device: "+b.id+"("+b.name+") from status: "+b.status+" to status: "+a.status+" and from activityId: "+b.activityId+" to activityId: "+a.activityId),b.activityId=a.activityId,b.status=a.status,Rg(wg(this.a)));xE(this,this.b)};function xE(a,b,c){b=EE(a,b);var d=!lb(a.b,b,Dg);!d&&!c||Wa(b)||(c=Ag(b),jg("yt-remote-online-screens",c,60));d&&(a.log_("Updating online screens: "+Rf(a.b)+" -> "+Rf(b)),a.b=b,a.u("onlineReceiverChange"))}
function CE(a,b){var c=[],d={};z(b,function(a){a.kc&&(d[a.kc]=a,c.push(a.kc))});var e={method:"POST",If:{lounge_token:c.join(",")},Z:a,Qa:function(a,b){var c=[];z(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.vk?GE(this,this.vk):null;e&&!Eg(c,e)&&c.push(e);xE(this,c,!0)}};Vj(AE("/api/lounge/pairing/get_screen_availability"),e)}
function DE(a){var b=BE(a),c=Na(b,function(a){return a.mb});Wa(c)||(a.log_("Updating lounge tokens for: "+rb(c)),Vj(AE("/api/lounge/pairing/get_lounge_token_batch"),{If:{screen_ids:c.join(",")},method:"POST",Z:a,Qa:function(a,c){HE(this,c.screens||[]);this.Fc=Ma(this.Fc,function(a){return!!a.kc});FE(this);CE(this,b)}}))}function HE(a,b){z(bb(a.Fc,a.g),function(a){var d=Ra(b,function(b){return a.mb==b.screenId});d&&(a.kc=d.loungeToken)})}
function FE(a){var b=Bg(Pg());lb(a.Fc,b,Dg)||(a.log_("Saving local screens: "+Rf(b)+" to "+Rf(a.Fc)),Og(Ag(a.Fc)),a.Yk())}function IE(a,b,c){var d=Sa(b,function(a){return Cg(c,a)}),e=0>d?!0:!1;0>d?b.push(c):b[d]=c;Eg(a.b,c)||a.b.push(c);return e}
f.Wo=function(a,b,c){var d=!1;b>=zE.length&&(this.log_("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=zg(this.a,a);if(!e)this.log_("Pairing DIAL device "+a+" with "+c+" failed: no device for "+a),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.log_("Pairing DIAL device "+a+" with "+c+" failed: launch error on "+a),d=!0;d?(JE(this),this.u("screenPair",null)):Vj(AE("/api/lounge/pairing/get_screen"),{method:"POST",If:{pairing_code:c},Z:this,Qa:function(a,b){JE(this);var d=new Pf(b.screen);
d.name=e.name;d.Bb=e.id;var m=IE(this,this.Fc,d);this.log_("Paired with "+(m?"a new":"an old")+" local screen:"+Qf(d));FE(this);this.u("screenPair",d);this.log_("Pairing "+c+" succeeded.");this.u("screenPair",d)},onError:function(){this.log_("Polling pairing code: "+c);I(this.kh);this.kh=H(v(this.Wo,this,a,b+1,c),zE[b])}})};
function KE(a,b,c,d,e){JE(a);if(zg(a.a,b)){if(!c){var g=c=tg();$D();var h=hE(b),k=YD();if(k&&h){var m=new cast.Receiver(h.id,h.name),m=new cast.LaunchRequest("YouTube",m);m.parameters="pairingCode="+g;m.description=new cast.LaunchDescription;m.description.text=document.title;d&&(m.parameters+="&v="+d,e&&(m.parameters+="&t="+Math.round(e)),m.description.url="http://i.ytimg.com/vi/"+d+"/default.jpg");"UNKNOWN"!=h.status&&(h.status="UNKNOWN",dE(h),Qr("yt-remote-cast-device-status-update",h));XD("Sending a cast launch request with params: "+
m.parameters);k.launch(m,oa(iE,b))}else XD("No cast API or no cast device. Dropping cast launch.")}a.kh=H(v(a.Wo,a,b,0,c),zE[0])}else a.log_("No DIAL device with id: "+b)}function JE(a){I(a.kh);a.kh=NaN}function GE(a,b){var c=Fg(BE(a),b);a.log_("Found screen: "+Qf(c)+" with key: "+b);return c}function LE(a,b){var c=Fg(a.b,b);a.log_("Found online screen: "+Qf(c)+" with key: "+b);return c}
function ME(a,b){var c=zg(a.a,b);if(!c){var d=Fg(a.Fc,b);d&&(c=zg(a.a,d.Bb))}a.log_("Found DIAL: "+(c?c.toString():"null")+" with key: "+b);return c}function BE(a){return bb(a.g,Ma(a.Fc,function(a){return!Eg(this.g,a)},a))};function NE(a,b){R.call(this);if(kg){var c=kg;ig(c,c.Kf.Id(!0))}Gg();cC("goog.net.BrowserChannel");this.i=new wE;c=Ig();this.g=new oE("/api/lounge/bc",{device:"REMOTE_CONTROL",id:c,name:a,app:b});this.a=null;this.A=[];this.g.D("handlerOpened",this.Xu,this);this.g.D("handlerClosed",this.Uu,this);this.g.D("handlerError",this.Vu,this);this.g.D("handlerMessage",this.Wu,this);this.i.D("managedScreenChange",this.Yk,this);this.log_("Initializing with device id = "+c+", name = "+a+", app = "+b)}y(NE,R);
f=NE.prototype;f.Ug=NaN;f.Uk=NaN;f.Ui=NaN;f.Vi=NaN;f.log_=function(a){VD("RC",a)};function OE(a){var b=Jg();return b?GE(a.i,b):null}function PE(a,b,c){a.$("connectionOpened",b,c);a.$("connectionClosed",b,c);a.$("connectionError",b,c)}function QE(a,b){"connectionError"==b&&ng("yt-remote-session-screen-id");a.log_("Firing "+b);a.u(b,"connectionOpened"==b);a.o=null}
function RE(a,b){"playerChange"==b?(I(a.Ui),a.Ui=H(v(function(){this.u("playerChange");this.Ui=NaN},a),2E3)):"playlistChange"==b&&(I(a.Vi),a.Vi=H(v(function(){this.u("playlistChange");this.Vi=NaN},a),2E3))}function SE(a,b){"playerChange"==b&&isNaN(a.Ui)&&a.u("playerChange");"playlistChange"==b&&isNaN(a.Vi)&&a.u("playlistChange")}function TE(a,b){b?(a.log_("Changing current screen id from: "+a.j+" to "+b.mb),a.j=b.mb,mE(a.g,b.kc)):(a.log_("Removing current screen id: "+a.j),a.j="",mE(a.g,""))}
function UE(a){return a.j?GE(a.i,a.j):null}f.connect=function(a){this.log_("Connecting to the receiver: "+rb(a));var b=LE(this.i,a.key);b?VE(this,b):(a=ME(this.i,a.key))?WE(this,a):H(v(function(){QE(this,"connectionError")},this),0)};function XE(a){a=a||0;5>=a&&(a=0);return a}
function VE(a,b){a.log_("Connecting to screen: "+Qf(b));var c=OE(a);c&&!Cg(b,c)?a.disconnect():YE(a);a.a=null;TE(a,b);c={};if(a.b){c.videoIds=ZE(a.b).join(",");c.videoId=a.b.a.getVideoData().M;c.videoSources=$E(a.b).join(",");var d=a.o?a.o.currentTime:a.b.a.getCurrentTime();c.currentTime=XE(d)}Pb(c)?a.log_("Connecting with empty params"):a.log_("Connecting with setPlaylist and params: "+rb(c));a.b?Tg(a.b.a.getVideoData().M,aF(a.b)):Tg("","");a.g.connect(Pb(c)?{}:{method:"setPlaylist",params:rb(c)},
1,Ng());a.a=new pE;Pb(c)||(a.a.yb=c.videoIds.split(","),uE(a.a,c.videoId));bF(a)}function WE(a,b){a.log_("Connecting to DIAL device: "+(b?b.toString():"null"));cF(a);dF(a);var c=a.o?a.o.pairingCode:"";c?KE(a.i,b.id,c):a.b?KE(a.i,b.id,"",a.b.a.getVideoData().M,a.b.a.getCurrentTime()):KE(a.i,b.id,"");a.k=b.id;a.i.D("screenPair",a.Jn,a)}f.Jn=function(a){this.log_("Paired with a DIAL screen: "+Qf(a));cF(this);a?VE(this,a):(this.k="",QE(this,"connectionError"))};
f.disconnect=function(){this.log_("Disconnecting with user intent.");dF(this);Ug();this.g.disconnect(1)};function dF(a){JE(a.i);var b=Ra(a.A,function(a){return"REMOTE_CONTROL"==a.type});b?(a.log_("Did not stop DIAL device, because another remote is connected: "+rb(b?{id:b.id,name:b.name,app:b.app,type:b.type,user:b.lp}:null)),a.k=""):(b=UE(a),a.k?(a.log_("Stopping DIAL device: "+a.k),jE(a.k),a.k=""):b&&b.Bb&&(a.log_("Stopping DIAL device: "+b.Bb),jE(b.Bb)))}
function YE(a){a.log_("Disconnecting from screen.");a.g.disconnect(2)}function eF(a,b){var c=UE(a),d=Ra(b,function(a){return c&&(a.key==c.mb||a.key==c.Bb)||this.k&&(a=ME(this.i,a.key))&&a.id==this.k?!0:!1},a);a.log_("Found current receiver: "+rb(d)+" in "+rb(b));return d}function fF(a){return gF(a)?a.a:null}function hF(a,b,c){c?a.log_("Sending: action="+b+", params="+rb(c)):a.log_("Sending: action="+b);iF(a)?a.log_("Action = "+b+" was ignored due to reconnecting."):a.g.sendMessage(b,c)}
function jF(a,b,c,d){d=XE(d);a.a.add(b,!0)&&hF(a,"insertVideo",{videoId:b,videoSource:c});sE(a.a,d);uE(a.a,b);RE(a,"playlistChange");hF(a,"setVideo",{currentTime:d,videoId:b})}function kF(a,b,c,d,e){e=XE(e);hF(a,"setPlaylist",{videoIds:c.join(","),videoId:b,videoSources:Na(c,function(){return d}),currentTime:e});sE(a.a,e);vE(a.a,c,b);RE(a,"playlistChange")}
function lF(a){var b=mg("yt-remote-session-video-id"),c=mg("yt-remote-session-list-id"),d=a.b.a.getVideoData().M,e=aF(a.b);Tg(d,e);a.log_("Watch context changed: videoId from "+b+" to "+d+" listId from "+c+" to "+e);var g=!1,h=!1;d&&d!=b&&(g=!0);e&&e!=c&&(h=!0);g?(b=$E(a.b),c=a.b.a.wb(),b=b[c?c.ua:0],c=a.b.a.getCurrentTime(),h?kF(a,d,ZE(a.b),b,c):jF(a,d,b,c)):h&&(d=ZE(a.b),h=$E(a.b),hF(a,"updatePlaylist",{videoIds:d.join(","),videoSources:h.join(",")}),vE(a.a,d),RE(a,"playlistChange"))}
function mF(a){hF(a,"play");sE(a.a,tE(a.a));-1E3!=a.a.a&&(a.a.a=1);RE(a,"playerChange")}f.ho=function(){hF(this,"getNowPlaying")};function gF(a){var b=a.g.a;return!!b&&3==b.b&&!!a.j&&isNaN(a.Ug)}function bF(a){nF(a);a.Ug=H(v(function(){nF(this);TE(this,null);this.k="";this.a=null;this.log_("Connecting timeout");QE(this,"connectionError");Ug();this.g.disconnect(1)},a),1E4)}function nF(a){I(a.Ug);a.Ug=NaN}function oF(a){I(a.Uk);a.Uk=NaN}function cF(a){a.i.$("screenPair",a.Jn,a)}
f.Xu=function(){this.log_("Channel opened");var a=this.j;jg("yt-remote-session-browser-channel",{firstTestResults:[""],secondTestResults:!this.g.a.di,sessionId:this.g.a.j,arrayId:this.g.a.tf});jg("yt-remote-session-screen-id",a);var a=Hg(),b=Ig();Va(a,b)||a.push(b);Lg(a);Gg();this.b&&(this.b.a.getVideoData().Oa&&!aF(this.b)?this.log_("Wait for playlist data to be loaded."):lF(this))};function pF(a){Ug(!0);oF(a);a.i.vk=null;TE(a,null);a.k=""}
f.Uu=function(){this.log_("Channel closed");var a=!!this.j&&isNaN(this.Ug);pF(this);a&&QE(this,"connectionClosed")};f.Vu=function(a){iF(this)?this.log_("Channel error: "+a+" with reconnection in "+nE(this.g)+" ms"):this.log_("Channel error: "+a+" without reconnection");iF(this)||pF(this);nF(this);QE(this,"connectionError")};
function qF(a,b){switch(b.action){case "loungeStatus":var c=pb(b.params.devices);a.A=Na(c,function(a){return new FD(a)});break;case "loungeScreenDisconnected":ab(a.A,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new FD(pb(b.params.device));Ra(a.A,function(a){return a.equals(d)})||Ya(a.A,d);break;case "remoteDisconnected":d=new FD(pb(b.params.device)),ab(a.A,function(a){return a.equals(d)})}}
function rF(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Ra(a.A,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;c!=gF(a)&&(c?(nF(a),QE(a,"connectionOpened"),a.ho()):a.disconnect())}function iF(a){return!isNaN(nE(a.g))}
f.Wu=function(a){a.params?this.log_("Received: action="+a.action+", params="+rb(a.params)):this.log_("Received: action="+a.action);qF(this,a);rF(this,a);if(gF(this)){var b=!1,c=!1,d,e,g,h,k,m,p;a.params&&(d=a.params.videoId||a.params.video_id,e=a.params.videoIds||a.params.video_ids,g=a.params.state,h=a.params.currentTime||a.params.current_time,k=a.params.volume,m=a.params.muted,q(a.params.currentError)&&(p=pb(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==rE(this.a)&&(delete a.params.videoId,
Pb(a.params)?this.a.b=null:this.a.b=a.params,SE(this,"playerChange"));else if(rE(this.a)||'"onStateChange"'!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d?d!=rE(this.a)&&(b=!0):d=rE(this.a):(uE(this.a,""),b=!0),e&&(e=e.split(","),vE(this.a,e,d)&&(b=!0))):(vE(this.a,[]),b=!0),this.a.add(d)&&hF(this,"getPlaylist"),d&&uE(this.a,d),b&&SE(this,"playlistChange"),q(g)&&(b=parseInt(g,10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.a.a&&
(b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.a.a,this.a.a=b,d=null,-1E3==b&&(d=this.a.g||"unknown",p&&(d=p.reason||d)),c=c||this.a.g!=d,this.a.g=d,1==this.a.a?(oF(this),this.Uk=H(v(this.ho,this),2E4)):oF(this)),"onError"!=a.action||-1!=this.a.a&&-1E3!=this.a.a||(a=pb(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==rE(this.a)&&(this.a.a=-1E3,this.a.g=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),sE(this.a,isNaN(b)?0:b),c=!0),q(k)&&(b=parseInt(k,10),isNaN(b)||(c=c||this.a.volume!=
b,this.a.volume=b),q(m)&&(m="true"==m,c=c||this.a.muted!=m,this.a.muted=m)),c&&SE(this,"playerChange")}};f.Yk=function(){this.j&&!UE(this)?(this.log_("Dropping current screen with id: "+this.j),this.disconnect(),this.a=null):OE(this)||Ug()};function sF(){NE.call(this,"Desktop","youtube-desktop");J(window,"unload",v(this.B,this));J(window,"beforeunload",v(this.B,this))}y(sF,NE);ca(sF);sF.prototype.B=function(){YE(this)};function tF(a,b){this.a=a;this.a.D("onVolumeChange",this.Sh,this);this.a.D("onPlaylistUpdate",this.Um,this);this.i=NaN;this.b=b;this.b.D("playerChange",this.Vm,this);this.b.D("playlistChange",this.Wm,this);this.k=0;this.g={};this.j=new os(this.jt,1E3,this);L(this,this.j);this.o=0}y(tF,K);f=tF.prototype;
f.H=function(){uF(this);this.a.$("onVolumeChange",this.Sh,this);this.a.$("onPlaylistUpdate",this.Um,this);this.a=null;this.b.$("playerChange",this.Vm,this);this.b.$("playlistChange",this.Wm,this);this.b=null};f.Xw=function(a,b){fF(this.b)&&(vF(this)?this.Yv.apply(this,arguments):this.Zv.apply(this,arguments))};
f.Zv=function(a,b){var c=Array.prototype.slice.call(arguments,1);switch(a){case "control_toggle_play_pause":case "control_play":case "control_pause":wF(this,this.a.a.getCurrentTime());break;case "control_seek":wF(this,c[0])}};
f.Yv=function(a,b){var c=fF(this.b),d=Array.prototype.slice.call(arguments,1);switch(a){case "control_toggle_play_pause":1==c.a?xF(this):(mF(this.b),this.a.kb(!0));break;case "control_play":mF(this.b);this.a.kb(!0);break;case "control_pause":xF(this);break;case "control_seek":this.o=d[0];ps(this.j);break;case "control_subtitles_set_track":yF(this,d[0])}};function xF(a){var b=a.b;hF(b,"pause");sE(b.a,tE(b.a));-1E3!=b.a.a&&(b.a.a=2);RE(b,"playerChange");zF(a,tE(fF(a.b)));uF(a);a.a.kb(!1)}
f.jt=function(){var a=this.o,b=fF(this.b);uF(this);zF(this,a);-1==b.a?wF(this,a):(b=this.b,a=Math.floor(a),hF(b,"seekTo",{newTime:a}),sE(b.a,a),-1E3!=b.a.a&&(b.a.a=3),RE(b,"playerChange"))};
function yF(a,b){if(vF(a)){var c=a.b,d=a.a.a.getVideoData().M;b?(c.a.b={trackName:b.name,languageCode:b.languageCode,sourceLanguageCode:b.translationLanguage?b.translationLanguage.languageCode:"",languageName:b.languageName,format:b.format,kind:b.kind},d={videoId:d},Tb(d,c.a.b),hF(c,"setSubtitlesTrack",d)):hF(c,"setSubtitlesTrack");RE(c,"playerChange");a.g=fF(a.b).b}}function wF(a,b){jF(a.b,a.a.a.getVideoData().M,"VI",b);var c=a.a;AF(c);BF(c.g)}
f.Sh=function(a){if(vF(this)){var b=Math.round(a.volume),c=this.b;a=!!a.muted;var d={volume:b,muted:a};-1!=c.a.volume&&(d.delta=b-c.a.volume);c.a.muted=a;c.a.volume=b;hF(c,"setVolume",d);RE(c,"playerChange")}};f.Um=function(){lF(this.b)};
f.Vm=function(){if(vF(this)){var a=fF(this.b);uF(this);switch(a.a){case 1:CF(this);this.a.kb(!0);break;case 3:var b=this.a;AF(b);BF(b.g);break;case 0:this.a.kb(!1);this.j.stop();b=this.a.a;(b=O(b.app,b.a||1))&&b.lg(!0);zF(this,this.a.a.getVideoData().ta);break;case 2:this.a.kb(!1);zF(this,tE(a));break;case -1:this.a.kb(!1);break;case -1E3:var b=this.a,c=qf("REMOTE_PLAYER_ERROR");AF(b);DF(b.g,c)}0==this.k&&(b=this.a.a,(b=O(b.app,b.a||1))&&b.lg(!1));this.k=a.a;EF(this);b=Math.round(this.a.a.Jm());-1!=
a.volume&&b!=a.volume&&(this.a.$("onVolumeChange",this.Sh,this),this.a.a.Lm(a.volume),a.muted?this.a.a.Km():this.a.a.Mm(),this.a.D("onVolumeChange",this.Sh,this))}else this.a.kb(!1)};
function EF(a){var b=fF(a.b).b;if(!(b||a.g?b&&a.g&&b.trackName==a.g.trackName&&b.languageCode==a.g.languageCode&&b.languageName==a.g.languageName&&b.format==a.g.format&&b.kind==a.g.kind:1))if(a.g=b){var c=a.a.a.yj("captions","tracklist",{xy:1}),c=Ra(c,function(a){return a.languageCode==b.languageCode&&a.name==b.trackName});a.a.a.Xm("captions","track",c)}else a.a.a.Ym("captions")}f.Wm=function(){vF(this)||(zF(this,0),uF(this),this.a.kb(!1))};
function vF(a){var b=fF(a.b);return!!b&&rE(b)==a.a.a.getVideoData().M}function CF(a){uF(a);iF(a.b)||(zF(a,tE(fF(a.b))),a.i=H(v(function(){CF(this)},a),500))}function uF(a){I(a.i);a.i=NaN}function zF(a,b){var c=a.a.a.getVideoData().ta;a.a.u("command_progress",b,b/c,void 0)};function FF(){Y.call(this,["div",["html5-bezel","html5-center-overlay"],["div","{{icon}}"]]);this.a=NaN;this.hide()}y(FF,Y);FF.prototype.hide=function(){FF.C.hide.call(this);GF(this)};FF.prototype.setIcon=function(a){rn(this.template,"icon",a)};FF.prototype.show=function(a){GF(this);a&&this.setIcon(a);FF.C.show.call(this)};function GF(a){I(a.a);W(a.element,"html5-bezel-fade")};function HF(a){Y.call(this,["div","ytp-thumbnail"]);this.a=a}y(HF,Y);
HF.prototype.show=function(a){if(a||this.element.childNodes.length){if(a){bd(this.element);var b=this.element,c=this.a;if(void 0!=Yn("backgroundSize"))d=document.createElement("div"),d.style.backgroundImage="url("+bo(b,a,c)+")";else{var d=document.createElement("img");d.src=bo(b,a,c);a=d;b.clientWidth/b.clientHeight<ao?(a.style.height="100%",a.style.width="auto"):(a.style.height="auto",a.style.width="100%")}V(d,"video-thumbnail");this.element.appendChild(d)}HF.C.show.call(this)}};function IF(a,b,c,d){R.call(this);this.P=d;this.b=this.a=null;this.I=c;this.O=new go(qf("REMOTE_PLAYER_RECONNECT_TIME"),["formatted_time"]);this.B=new go(qf("REMOTE_CONNECTED_STATUS"),["receiver_name"]);this.G=new go(qf("REMOTE_CONNECTING_STATUS"),["receiver_name"]);this.L=new go(qf("REMOTE_ERROR_STATUS"),["receiver_name"]);this.j=this.G;this.g=this.A=this.k=this.i=null;this.J="";this.o=null;this.k=E("ytp-remote-display-container",b);this.i=E("html5-remote-display-status-bar",b);JF(this);b=E("html5-remote-display-error",
b);c=Zc("div");b.appendChild(c);V(c,"html5-remote-display-error-icon");this.A=Zc("div");b.appendChild(this.A);this.g=new Jn(this.P,"ytp-button-remote-reconnect");this.g.Aa(qf("REMOTE_PLAYER_RECONNECT_BUTTON"));this.g.V(b);this.J=J(this.g,"click",v(this.u,this,"reconnectclicked"));this.o=new HF(a.a.K().oc);this.o.V(this.k);this.o.show(a.a.getVideoData());L(this,this.o);this.a=new FF;this.a.V(this.k);this.a.hide();L(this,this.a);this.b=new du;V(this.b.element,"html5-center-overlay");V(this.b.element,
"html5-center-transform");this.b.V(this.k);this.b.show();L(this,this.b)}y(IF,R);IF.prototype.H=function(){Cf(this.J);this.i.innerHTML="";IF.C.H.call(this);this.o=this.i=this.a=null};function KF(a){a.j=a.G;JF(a);LF(a,!1);a.a.hide();a.b.show()}function BF(a){a.j=a.B;JF(a);LF(a,!1);a.a.hide();a.b.show()}function DF(a,b){a.j=a.L;JF(a);a.a.hide();a.b.hide();a.g.hide();a.A.innerHTML=b;LF(a,!0)}function LF(a,b){X(a.k,"ytp-remote-error",b)}
function MF(a,b){DF(a,ko(a.O,{formatted_time:Sn(b/1E3)}));a.g.show()}function JF(a){a.i&&(a.i.innerHTML=ko(a.j,{receiver_name:'<span class="mdx-receiver">'+a.I+"</span>"},void 0,!0))};function NF(a){R.call(this);this.k=this.g="";this.j=null;this.i=a;this.a=this.b=null;OF(this,a)}y(NF,R);NF.prototype.H=function(){Cf(this.g);Cf(this.k)};function PF(a,b){var c="";z(b,function(a){c+=ko(this.j,{receiver_key:a.key,receiver_name:a.name})},a);a.a.innerHTML=c;ms(bs.getInstance(),a.i)}function QF(a,b){var c=E("active",a.a);if(c){if(G(c,"value")==b)return;Um(c,["active","selected"])}(c=a.a.querySelector('[data-value="'+b+'"]'))&&Tm(c,["active","selected"])}
function OF(a,b){a.b=ns(bs.getInstance(),b);var c=E("html5-remote-receiver-template",a.b);a.j=jo(c,["receiver_key","receiver_name"]);a.a=E("html5-remote-receivers",a.b);a.a.innerHTML="";a.g=Gf(a.b,v(a.o,a),"yt-uix-button-menu-item");a.k=J(b,"click",v(function(){this.u("menushown")},a))}NF.prototype.o=function(a){(a=a.currentTarget)&&"remote-select-receiver"==G(a,"action")&&(a=G(a,"value"),QF(this,a),this.u("selectreceiver",a))};function RF(a){Kx.call(this,a);var b=Q(this.a);this.G=a.S.B;this.k={key:tg(),name:qf("REMOTE_LOCAL_SCREEN")};this.g=this.j=null;this.b=SF(this);this.B=NaN;a=this.b;a.o=mg("yt-remote-delayed-connect-key");if(a.o)a.log_("Connecting with the delayed connect data: "+rb(a.o)),a.connect({key:a.o.key}),ng("yt-remote-delayed-connect-key");else{var c=OE(a);c?c.mb==a.j?a.log_("Skipping connecting because current connection exists."):(a.log_("Resuming MDx session: "+Qf(c)),TE(a,c),a.g.connect({},0,Ng()),a.a=
new pE,bF(a)):(Ug(),a.log_("Skipping connecting because no session screen found."))}this.A=new NF(E("html5-remote-button",b));this.A.D("selectreceiver",this.xj,this);L(this,this.A);this.i=this.k;this.og()}y(RF,Kx);var TF=["play_pause","seek"],UF=["captions"];f=RF.prototype;f.qa="remote";f.ed="remote";f.$a=function(){return this.app.I.K().qg};
f.create=function(){RF.C.create.call(this);var a=this.b=SF(this),b=this.Cn;PE(a,b,this);a.D("connectionOpened",b,this);a.D("connectionClosed",b,this);a.D("connectionError",b,this);this.b.i.D("onlineReceiverChange",this.og,this);this.b.i.D("connectToReceiver",this.xj,this);this.og();this.i!=this.k&&3<this.a.app.o&&this.load()};function VF(a){a.b&&(PE(a.b,a.Cn,a),a.b.i.$("onlineReceiverChange",a.og,a),a.b.i.$("connectToReceiver",a.xj,a),a.b.b=null,a.b=null)}
f.destroy=function(){var a=this.A;gs(bs.getInstance(),a.i);VF(this);RF.C.destroy.call(this)};
f.load=function(){if(!this.ba){RF.C.load.call(this);this.og();var a=E("html5-remote-module",Q(this.a));this.g=new IF(this,a,this.i.name,this.G);this.g.D("reconnectclicked",this.sm,this);this.j=new tF(this,this.b);yF(this.j,this.a.yj("captions","track"));this.a.zj();this.u("command_redirect_controls",this,TF,UF);var b=this.b.o?this.b.o.currentTime:0;0!=b&&H(v(function(){zF(this.j,b)},this),0);fF(this.b)&&!Wa(fF(this.b).yb)&&this.a.rg();this.ba=!0}};
f.unload=function(){this.ba&&(this.ba=!1,WF(this,this.k),this.kb(!1),hn(this),this.g.$("reconnectclicked",this.sm,this),AF(this),Yg(this.j,this.g),this.g=this.j=null,RF.C.unload.call(this))};f.H=function(){VF(this);AF(this);Yg(this.j,this.g);this.g=this.j=null;RF.C.H.call(this)};function aF(a){return a.a.wb()?a.a.getVideoData().Oa:""}function ZE(a){var b=a.a.wb();if(b){a=[];for(var c=0;c<b.Mb;c++)a[c]=Ah(b,c).M;return a}return[a.a.getVideoData().M]}
function $E(a){var b=aF(a);if(b){b=b.substr(0,2);a=Om(a.a.wb());for(var c=[],d=0;d<a;d++)c[d]=b;b=c}else b=["VI"];return b}function SF(a){var b=sF.getInstance();b.b=a;return b}f.Cn=function(){AF(this);this.ba&&iF(this.b)?XF(this):fF(this.b)?this.load():this.unload()};f.sm=function(){var a=this.b;iF(a)&&(a=a.g.b,a.Uc&&(a.stop(),a.start(),a.k()));KF(this.g)};f.je=function(a,b){this.j.Xw.apply(this.j,arguments)};
f.xj=function(a){if(this.i.key!=a)if(this.k.key==a){var b=fF(this.b);a=!!b&&1==b.a&&rE(b)==this.a.getVideoData().M;b=b?tE(b):0;this.i=this.k;this.b.disconnect();this.unload();a&&(this.a.Th(b),this.a.rg())}else if(a=ug(Vg(),a))WF(this,a),this.b.connect(a),this.load()};function WF(a,b){(a.i||b?a.i&&b&&a.i.key==b.key:1)||(a.i=b,QF(a.A,b.key))}f.og=function(){var a=Vg();this.b&&(this.i=eF(this.b,a)||this.k);a.unshift(this.k);PF(this.A,a);QF(this.A,this.i.key);this.g&&(a=this.g,a.I=this.i.name,JF(a))};
function XF(a){AF(a);iF(a.b)?(MF(a.g,nE(a.b.g)),a.B=H(v(function(){XF(this)},a),1E3)):KF(a.g)}function AF(a){I(a.B);a.B=NaN}f.kb=function(a){AF(this);var b=this.g;b.j=b.B;JF(b);LF(b,!1);b.b.hide();b.a.show();b.a.setIcon(a?"html5-bezel-pause":"html5-bezel-play");RF.C.kb.call(this,a)};function YF(){Y.call(this,["div","html5-video-info-panel",["span","html5-video-info-panel-close",{role:"button",title:"close"},"[x]"],["div","html5-video-info-panel-content",["table","html5-video-info-table",["tr","",["th","","Video ID:"],["td","","{{video_id}}"]],["tr","",["th","","Dimensions:"],["td","","{{dimensions}}"]],["tr","",["th","","Resolution:"],["td","","{{resolution}}"]],["tr","",["th","","Volume:"],["td","","{{volume}}"]],["tr","",["th","","Stream Type:"],["td","","{{stream_type}}"]],
["tr","",["th","","Mime Type:"],["td","","{{mime}}"]],["tr","",["th","","DASH:"],["td","","{{dash}}"]],["tr","",["th","","DRM:"],["td","","{{drm}}"]]],["table",["html5-video-info-table","html5-video-element-info-table"],["tr","",["th","","Decoded Frames"],["th","","Dropped Frames"],["th","","Parsed Frames"],["th","","Presented Frames"]],["tr","",["td","","{{decoded_frames}}"],["td","","{{dropped_frames}}"],["td","","{{parsed_frames}}"],["td","","{{presented_frames}}"]],["tr","",["th","","Video Bytes Decoded"],
["th","","Audio Bytes Decoded"],["th","","Painted Frames"],["th","","Paint Delay"]],["tr","",["td","","{{video_bytes_decoded}}"],["td","","{{audio_bytes_decoded}}"],["td","","{{painted_frames}}"],["td","","{{paint_delay}}"]]]]]);this.a=this.template.a["html5-video-info-panel-close"]}y(YF,Y);YF.prototype.update=function(a){a.dimensions=a.video_element_width+" x "+a.video_element_height;a.resolution=a.video_width+" x "+a.video_height;a.volume+="%";a.drm=a.drm_flavor+" / "+a.drm_key_system;this.template.update(a)};
YF.prototype.H=function(){this.a=null;YF.C.H.call(this)};function ZF(a){R.call(this);this.app=a;this.g=this.a=this.ja=null;this.J=new Fb(0,0,0,0);this.b=null;this.za=new Fb(0,0,0,0);this.aa=this.U=null;this.Ua=this.Ta=0;this.pa=this.Q=null;a=a.K();this.Sa=sk()||"blazer"==a.Ca;this.Da=0;this.j=null;this.ok()}y(ZF,R);var $F=null;f=ZF.prototype;f.ok=function(){this.app.D("videodatachange",this.Dl,this)};
f.Qj=function(){var a=Oc(this.ja);(a=Sm(a,"html5-video-player")?a:E("html5-video-player",a))||(a=$F||E("html5-video-player"));if(!a)return!1;aG(this,a);this.u("templateready");return!0};function aG(a,b){$F=b.cloneNode(!0);a.a=b;a.a.setAttribute("id",a.app.J.attrs.id);var c=Oc(a.ja);c!=a.a&&c.appendChild(a.a);(c=Oc("html5-player-messages"))&&z(c.children,function(a){try{var b=JSON.parse(a.innerHTML);pf(a.id,b)}catch(c){pf(a.id,a.innerHTML)}})}f.addClass=function(a){Tm(this.a,arguments)};
f.removeClass=function(a){Um(this.a,arguments)};
f.mj=function(){var a=this.app.K(),b=this.a;this.addClass("el-"+a.Y);this.addClass("ps-"+a.Ca);X(b,"html5-native-controls",a.Ub);X(b,"html5-mobile",a.oc);a.te||this.addClass("html5-chromeless");a.ub||this.addClass("tag-pool-enabled");b.style.display="";this.g=E("html5-video-container",b);this.U=E("html5-video-content",b);this.aa=E("html5-video-controls",b);this.j=new YF;this.j.V(b);J(this.j.a,"click",v(this.nk,this));L(this,this.j);this.Sa?this.Q=J(window,"resize",v(this.Fi,this)):this.Q=mf(v(this.Fi,
this),250)};f.Fi=function(){Cb(bG(this),Ib(this.J))||this.rf()};
f.rf=function(){if(this.b){var a=bG(this);if(!a.isEmpty()){var b,c=cG(this),d=bG(this);b=1;var e=dG(this),g,h=!1;e?(g=eG(this,d,c,e,!1),b=g.width/g.height/Db(c),g=new Fb(g.left+g.width/2*(1-1/b),g.top,g.width/b,g.height)):g=new Fb(0,0,d.width,d.height);Hb(this.za,g)||(this.za=g,Ed(this.b,Ib(g)),td(this.b,new A(g.left,g.top)),h=!0);c=eG(this,d,c,e,!0);Hb(this.J,c)||(this.J=c,Ed(this.U,c.width,c.height),td(this.U,c.left,c.top),h=!0);Zn(this.b,"transform",1==b?"none":"scaleX("+b+")");b=h;if(h=!Cb(a,
Ib(this.J)))this.J.width=a.width,this.J.height=a.height,this.tl(a);(b||h)&&this.u("resize")}}};f.tl=function(){};f.Pj=function(){};f.Dl=function(a,b){this.b.setAttribute("data-youtube-id",b.M);fj&&(b.title?this.b.setAttribute("title",b.title):this.b.removeAttribute("title"));b.ul&&(this.b.poster=b.ul);var c=Bm(b,"yt:bgcolor");this.g.style.backgroundColor=c?c:"";this.Ta=yl(Bm(b,"yt:stretch"));this.Ua=yl(Bm(b,"yt:crop"))};f.Fj=function(){};f.rp=function(){};f.Ao=function(){};
function bG(a){return a.g?new B(a.g.clientWidth,a.g.clientHeight):new B(0,0)}function cG(a){return a.b?new B(a.b.videoWidth,a.b.videoHeight):new B(0,0)}function eG(a,b,c,d,e){c.isEmpty()?e=b:d?(c=new B(a.Ta||Db(c),1),a=new B(a.Ua||Db(c),1),Eb(a,c),d=Db(a)>Db(b)?b.width/a.width:b.height/a.height,e=e?a.scale(d):c.scale(d)):e=Eb(c.clone(),b);return new Fb((b.width-e.width)/2,(b.height-e.height)/2,e.width,e.height)}function dG(a){return!a.app.K().Ub&&!cG(a).isEmpty()}
function Iw(a,b){var c=a.aa;c.insertBefore(b,c.childNodes[0]||null)}f.Gj=function(){};function Fh(a){a.j&&(a.j.show(),a.yp(),nf(a.Da),a.Da=mf(v(a.yp,a),500))}
f.yp=function(){var a=O(this.app),b=this.app.getVideoData(),c=this.app.pj(),d=this.b,c={video_id:b.M,video_width:d.videoWidth,video_height:d.videoHeight,video_element_width:d.clientWidth,video_element_height:d.clientHeight,dash:"no",mime:"",drm_flavor:"",drm_key_system:"",volume:Math.round(this.app.wa.volume),stream_type:this.app.K().protocol,decoded_frames:c.hmewdfc||c.hmemdf||"-",dropped_frames:c.hmewdrop||"-",parsed_frames:c.hmempf||"-",presented_frames:c.hmempresented||"-",video_bytes_decoded:c.hmewvdbc||
"-",audio_bytes_decoded:c.hmewadbc||"-",painted_frames:c.hmempainted||"-",paint_delay:c.hmempaintdelay||"-"};b.a&&(c.dash=b.a.i&&b.a.a?"no":"yes",c.mime=b.a.lb);if(a=a.I?a.I.g:null)c.drm_flavor=a.b,c.drm_key_system=a.a;this.j.update(c)};f.nk=function(a){a&&a.stopPropagation();this.j&&(nf(this.Da),this.j.hide())};f.H=function(){this.Q&&(this.Sa?Cf(this.Q):nf(this.Q));this.pa&&Cf(this.pa);this.nk();this.j&&Hf(this.j.a);F(this.a);this.aa=this.U=this.b=this.g=this.a=this.ja=null;ZF.C.H.call(this)};function fG(){this.a=[];this.b=[]}ca(fG);var In=n("yt.player.utils.VideoTagPool.instance_")||fG.getInstance();pa("yt.player.utils.VideoTagPool.instance_",In);f=fG.prototype;f.oy=function(a){if(!(this.a.length>=a)){a-=this.a.length;for(var b=0;b<a;b++){var c=gG(this);this.a.push(c)}}};
function gG(a){var b=document.createElement("video");w(b,kj);J(b,"loadeddata",v(b.Vv,b));J(b,"volumechange",v(b.Wv,b));J(b,"timeupdate",v(b.fp,b));Wi&&6<=aj&&J(b,"webkitbeginfullscreen",v(b.play,b));lj(b);if(a.b.length){var c=a.b[0],d=c.muted;b.volume=100*c.volume/100;b.muted=d}a.b.push(b);J(b,"volumechange",v(a.Xv,a));return b}f.Xv=function(a){a=a.target;var b=a.volume,c=a.muted;z(this.a,function(a){a.volume=b;a.muted=c})};f.vy=function(){return this.a.length?this.a.pop():gG(this)};
f.ty=function(a){a&&Va(this.b,a)&&(rj(a),Hf(a),Za(this.b,a))};f.qy=function(a){return this.a.length>=(a||1)};fG.prototype.fillPool=fG.prototype.oy;fG.prototype.getTag=fG.prototype.vy;fG.prototype.releaseTag=fG.prototype.ty;fG.prototype.hasTags=fG.prototype.qy;function hG(a,b){var c,d;d||(d=0);c||(c=xd(document.body));var e=new A(wf(b),xf(b));Sr(e,a,d,null,c,5)};function iG(){this.a=new Zo(this)}y(iG,K);f=iG.prototype;f.Uj=null;f.De=null;f.Vj=null;f.Qi=null;f.Ee=null;f.is=function(){this.hide()};f.js=function(a){a.stopPropagation()};f.hide=function(){Xn(this.Ee);Qr("panelhidden")};f.ks=function(a){27==a.keyCode&&this.hide()};f.Sm=function(){this.De.select()};f.show=function(){Wn(this.Ee)};f.H=function(){this.a.removeAll();this.De=this.Uj=this.Vj=this.Ee=null;iG.C.H.call(this)};function jG(a){this.W=a;this.W.D("internalvideodatachange",this.On,this);this.g=new Zo(this);this.a=new Zo(this);this.b=new iG;L(this,this.b)}y(jG,K);f=jG.prototype;f.$b=null;function kG(a,b,c){for(var d=Pc(Tn[b],a.$b),e=0;e<d.length;e++)$o(a.g,d[e],"down",function(a){c.call(this,a);this.hide(a);a=b.replace("CONTEXT_MENU_","").toLowerCase();lG(this.W,"contextmenu."+a)})}f.On=function(a,b){var c=E("html5-context-menu-copy-embed-html",this.$b);Un(c,b.uo)};f.Tm=function(a){a=uh(this.W,a);mG(this,a,"URL")};
f.ms=function(){var a=hf("EMBED_HTML_TEMPLATE"),b=hf("EMBED_HTML_URL"),c=ay(this.W.K()),d=this.W.getVideoData().M,b=b.replace(/__videoid__/g,d),a=a.replace(/__url__/g,ya(b)),a=a.replace(/__width__/g,c.width),a=a.replace(/__height__/g,c.height);mG(this,a,"Text")};function mG(a,b,c){window.clipboardData&&window.clipboardData.setData(c,b)||(a=a.b,Vn(a.Ee)&&a.hide(),a.Qi&&W(a.Ee,a.Qi),a.Qi="html5-modal-panel-clipboard-substitute",V(a.Ee,a.Qi),a.show(),a.De.value=b,a.De.focus(),H(v(a.Sm,a),100))}
f.os=function(a){nG(this.W,a.target.getAttribute("href"))};
f.rs=function(){var a=this.W.getVideoData(),b=this.W.K(),c=ay(b),d=Jw(b),e=Am(a),e=e?mj(e):"",c={cr:b.U,csipt:a.Hc,ec:108,feature:b.j,h:d.height,hl:b.i,playerh:c.height,playerw:c.width,ptk:a.A,referrer:b.referrer,screenh:window.screen.height,screenw:window.screen.width,sdetail:a.ja,shost:Nj(e),sourceid:a.re,vid:b.aa,vq:b.Hh,w:d.width};w(c,this.W.pj());(d=O(this.W))&&w(c,Nz(d,!0));c.videoId&&(c.v=c.videoId,delete c.videoId);b.oc&&(c.mobile="1");this.W.qf("streamingerror",c);window.open(cy(a))};
f.ls=function(){mG(this,vh(this.W,!0),"Text")};f.ts=function(){Fh(this.W.S)};f.tu=function(a){a.preventDefault();Vn(this.$b)?a.stopPropagation():(hG(this.$b,a),Wn(this.$b),this.a.listen(this.$b,"contextmenu",function(a){a.preventDefault()}),a=v(function(){this.a.listen(window,"blur",this.hide);$o(this.a,document,"down",this.hide)},this),H(a,0),this.a.listen(document,"keydown",this.Fv))};f.Fv=function(a){27==a.keyCode&&this.hide(a)};f.hide=function(a){Xn(this.$b);this.a.removeAll();a&&a.stopPropagation()};
f.H=function(){this.g.removeAll();this.a.removeAll();this.W.$("internalvideodatachange",this.On,this);this.W=null;F(this.$b);this.$b=null;jG.C.H.call(this)};function oG(a,b){Nn.call(this,a,b);this.F=null;this.B=this.G=this.i=this.b=0;V(this.element,"ytp-tv-static");pG(this,a,b)}y(oG,Nn);function qG(a){for(var b=Math.floor(0.6*a),c=b;c<a;++c){for(var d=!1,e=2;e<Math.sqrt(c);e++){if(!(c%e)){d=!1;break}d=!0}if(d)return c}return b}
function pG(a,b,c){if(b&&c){a.width=a.element.width=b;a.height=a.element.height=c;var d=document.createElement("canvas");d.width=b;d.height=c;for(var e=d.getContext("2d"),g=e.getImageData(0,0,b,c),h=b*c,k=0;k<h;k++){var m=4*k;g.data[m]=g.data[m+1]=g.data[m+2]=Math.floor(35*Math.random());g.data[m+3]=255}e.putImageData(g,0,0);a.F=d;a.G=qG(b);a.B=qG(c/10);a.Z.scale(1.5,1.5)}}oG.prototype.show=function(){oG.C.show.call(this);var a=this.I;this.k=new Date;this.g(a,75)};
oG.prototype.I=function(){var a=1-1/1.5;this.b=(this.b+this.G)%(this.width*a);this.i=(this.i+this.B)%(this.height*a);this.Z.drawImage(this.F,-1*this.b,-1*this.i)};oG.prototype.hide=function(){I(this.a);oG.C.hide.call(this)};function rG(){Y.call(this,["div",["ytp-error","html5-stop-propagation"],["div","ytp-error-content",["div","ytp-error-content-wrap","{{content}}"]]]);this.A="table";this.b=[];if(void 0==ol){var a=document.createElement("canvas");ol=!(!a.getContext||!a.getContext("2d"))}ol&&(this.a=new oG(1,1),this.a.V(this.element,0),L(this,this.a))}y(rG,Y);rG.prototype.show=function(){rG.C.show.call(this);sG(this);this.a&&this.a.show()};rG.prototype.hide=function(){rG.C.hide.call(this);this.a&&this.a.hide()};
function sG(a){a.a&&pG(a.a,a.element.clientWidth,a.element.clientHeight)}rG.prototype.H=function(){Cf(this.b);this.b=[];rG.C.H.call(this)};function tG(){this.b=this.a=null}tG.prototype.getMsg=function(a,b,c){return qf(a,b,c)};function ku(a,b,c,d){a.a&&uG(a.a,b,c,d)};function vG(a,b){var c;var d="followon_"+a;if(b.baseUrl&&b.uid){var e=b.rmktEnabled;c=b.focEnabled&&!b.isAd;if(e||c){d={label:c?d:"default"};if(e){e={utuid:b.uid,type:a};b.vid&&(e.utvid=b.vid);b.eventLabel&&(e.el=b.eventLabel);b.playerStyle&&(e.ps=b.playerStyle);b.feature&&(e.feature=b.feature);b.ppe&&(e.ppe=b.ppe);var g,h=[];for(g in e)h.push(encodeURIComponent(g)+"="+encodeURIComponent(e[g]));g=h.join(";");d.data=g}c&&"view"==a&&b.vid&&b.uid&&(b.oeid||b.ieid)&&(b.oeid&&(d.oeid=b.oeid),b.ieid&&(d.ieid=
b.ieid),d.evid=b.vid);c&&(d.foc_id=b.uid);c=S(b.baseUrl,d)}else c=null}else c=null;c&&sa(c)}function wG(a){var b=hf("CONVERSION_CONFIG_DICT");if(b){if(u(void 0)){var c=24==(void 0).length&&"UC"==(void 0).slice(0,2)?(void 0).substr(2):22==(void 0).length?void 0:null;if(b.uid!=c)return}vG(a,b)}};function xG(a,b,c){c=c||{};bk("watch_actions_ajax",c.Fa,c.Va,v(yG,l,a,b,c),c.onError)}
function yG(a,b,c){var d={};0===b?d.action_like_video=1:1===b?d.action_dislike_video=1:d.action_indifferent_video=1;d.video_id=a;d.plid=c.fb;c.Oa&&(d.list=c.Oa);c.Fa&&(d.authuser=c.Fa);c.Va&&(d.pageid=c.Va);a={screen:Mj({h:screen.height,w:screen.width,d:screen.colorDepth}),session_token:kf("watch_actions_ajax")};c.ox&&(a.station_id=c.ox);Vj("/watch_actions_ajax",{format:"XML",method:"POST",sf:d,If:a,Qa:c.Qa,onError:c.onError,pd:c.pd});0===b?wG("like"):1===b&&wG("dislike")};function zG(a,b,c,d,e){if(Sm(c,"html5-async-progress"))return null;X(c,"sentiment-like",b);X(c,"sentiment-dislike",!b);if(!a)return null;wu(c,"html5-async-progress");c={fb:a.fb,Qa:function(a){return function(){wu(a,"html5-async-success")}}(c),onError:function(a){return function(){wu(a)}}(c)};d&&(c.authUser=d);e&&(c.pageId=e);xG(a.M,b?0:1,c);hf("CONVERSION_CONFIG_DICT")||vG(b?"like":"dislike",a.i);return b?0:1};function AG(a,b,c){iu.call(this,a,c.K(),b);this.W=c}y(AG,iu);f=AG.prototype;f.Sj=function(){AG.C.Sj.call(this);this.gb.listen(this.b.b,"click",this.Zu);this.gb.listen(this.b.a,"click",this.Yu);this.W.D("presentingplayerstatechange",this.yo,this)};f.update=function(a){AG.C.update.call(this,a);"watch_actions_ajax"in df&&!this.W.g?(a=this.b,a.b.show(),a.a.show()):(a=this.b,a.b.hide(),a.a.hide())};f.$h=function(a){var b=Ic(this.a,"show-share");this.u("share-click");b||AG.C.$h.call(this,a)};
f.wn=function(a){this.u("title-click",a)};f.gk=function(){var a=Ic(this.a,"show-more-info");this.u("info-click");if(a)this.B&&this.W.Qd();else{AG.C.gk.call(this);var b=Hh(this.W);this.B=P(b,8)&&!P(b,2);this.W.Od()}return!a};f.Zu=function(){BG(this,!0)};f.Yu=function(){BG(this,!1)};f.yo=function(a){P(a.state,8)&&W(this.a,"show-more-info")};function BG(a,b){var c=zG(a.ka,b,a.a,a.g.Fa,a.g.Va);null!=c&&(0==c?a.b.F():a.b.k(),a.W.u("RATE_SENTIMENT",c))}f.Ii=function(a){nG(this.W,a)};
f.H=function(){this.W.$("presentingplayerstatechange",this.yo,this);this.W=null;AG.C.H.call(this)};function CG(a,b,c,d,e,g,h,k){this.j=[];z(ob(b),function(b){this.j.push(J(a,b,v(this.wr,this)))},this);z(ob(d),function(b){this.j.push(J(a,b,v(this.ur,this)))},this);this.k=g||null;this.B=c;this.A=h||0;this.g=0;this.i=!1;this.F=e;this.o=k||0;this.a=0;this.b=!1}f=CG.prototype;f.wr=function(a){I(this.a);this.a=0;this.g=H(v(this.mv,this,a),this.A)};f.ur=function(a){I(this.g);this.g=0;this.a=H(v(this.lv,this,a),this.o)};f.mv=function(a){this.b||this.i||(this.i=!0,this.B.call(this.k||l,a))};
f.lv=function(a){!this.b&&this.i&&(this.i=!1,this.F.call(this.k||l,a))};f.dispose=function(){this.b=!0;I(this.g);I(this.a);Cf(this.j)};f.ha=function(){return this.b};var DG=null,EG=null;function FG(){Y.call(this,["div","ytp-tooltip",["div","ytp-tooltip-body",["div","ytp-tooltip-content","{{content}}"]],["div","ytp-tooltip-arrow"]]);this.a=this.template.a["ytp-tooltip-body"];this.b=this.template.a["ytp-tooltip-content"]}y(FG,Y);FG.prototype.hide=function(){FG.C.hide.call(this);td(this.a,0)};function GG(a,b){X(a.b,"ytp-tooltip-content-text",!b.tagName);rn(a.template,"content",b)}FG.prototype.H=function(){bd(this.b);this.b=this.a=null;FG.C.H.call(this)};function HG(a,b){this.a={};this.pl=a;this.Xo=b}y(HG,K);
function Kn(a,b,c){var d,e=new CG(b,"mouseover",function(){if(this.pl){var a=new FG;a.V(this.pl);d=a}else d=null;if(d&&(a=c&&c(b),!c||a)){a?GG(d,a):(a=G(b,"tooltip")||"",GG(d,$c(a)));var e=!!G(b,"tooltip-below"),a=d,k=Gd(b),k=new A(k.width/2,e?k.height:0),m=yd(b),k=new A(m.x+k.x,m.y+k.y),e=!!e;X(a.element,"ytp-tooltip-below",e);if(m=wd(a.element))var p=yd(m),s=Nd(m),k=Ab(k,new A(p.x+s.left,p.y+s.top));Sr(k,a.element,e?1:0);a.show();var s=Gd(a.a),e=-1*(s.width/2),r=Tc(window),D=Uc(document),k=D.x,
r=r.width+D.x,D=k,M=r;m&&(m=Gd(m),D=p.x,M=m.width+p.x);m=yd(a.a);p=m.x+e;m=m.x+s.width+e;p<Math.max(k,D)?e-=p-Math.max(k,D):m>Math.min(r,M)&&(e-=m-Math.min(r,M));td(a.a,e)}},["mouseout","mousedown"],function(){d&&(d.hide(),Xg(d),d=null)},a,10,50);a.a[ja(b)]=e}
function uG(a,b,c,d){Kn(a,b,function(){var a=this.Xo,b;if(a&&a.Il){b=a.Il;var h=a.Bp;DG||(DG=new go(qf("YTP_TOOLTIP_IDENTITY")),EG=new go(qf("YTP_TOOLTIP_IDENTITY_WATCH_LATER")));a=Zc("div");V(a,"ytp-identity-tooltip");var k=Zc("img");k.src=h;var h=Zc("span"),m=null;d?(V(h,"ytp-idt-watch-later"),m=[$c(ko(EG,{user_name:""})),Zc("br"),$c(b)]):m=$c(ko(DG,{user_name:b}));ad(h,m);ad(a,k,h);b=a}else b=c;return b})}
HG.prototype.H=function(){this.Xo=this.pl=null;for(var a in this.a)Xg(this.a[a]);this.a={};HG.C.H.call(this)};function IG(a,b){this.k=a;this.i=[];this.o=b;this.j=[]}y(IG,K);function JG(a,b,c){a.i.push(a.k.D(b,c,a))}function KG(a,b,c){a.j.push(a.o.D(b,c,a))}function LG(a){for(var b=0;b<a.i.length;b++)a.k.Tc(a.i[b]);for(b=0;b<a.j.length;b++)a.o.Tc(a.j[b])}IG.prototype.H=function(){LG(this);IG.C.H.call(this)};function MG(a,b){IG.call(this,a,b);this.g=!1;this.b=a;this.a=b;var c=a.K();c.color&&V(this.a.i,c.color);if(c.Gg){var d=this.a,e=E("html5-progress-tooltip",d.g);d.b=new Wu;var g=d.b;g.Gb=e;g.Ih=E("html5-progress-tooltip-arrow",g.Gb);g.ak=E("html5-progress-tooltip-thumbnail",g.Gb);g.rj=E("html5-progress-tooltip-timestamp",g.Gb);L(d,d.b);d=this.a;d.a=new Su;d.a.V(d.g);$o(d.k,d.a.N(),"down",d.lt);d.a.hide();L(d,d.a)}c.Hg&&(c=this.a,d=E("html5-storyboard",c.g),c.o=new Ou,e=c.o,g=c.Ta.b.a?new B(c.Ta.b.a.clientWidth,
c.Ta.b.a.clientHeight):new B(0,0),e.ud=d,e.$d=g.width,e.ac=E("html5-storyboard-filmstrip",e.ud),e.Uh=E("html5-storyboard-lens",e.ud),e.Xj=E("html5-storyboard-lens-thumbnail",e.ud),e.Yj=E("html5-storyboard-lens-timestamp",e.ud),e.xg=E("html5-storyboard-thumbnail",e.ac),F(e.xg),L(c,c.o));NG(this)}y(MG,IG);
function NG(a){LG(a);a.g=!0;JG(a,"cuerangesadded",a.Aw);JG(a,"cuerangesremoved",a.Bw);JG(a,"cuerangemarkersupdated",a.zw);JG(a,"presentingplayerstatechange",a.Gw);JG(a,"progresssync",a.Hw);JG(a,"resize",a.Dw);JG(a,"seekto",a.Ew);JG(a,"videodatachange",a.Iw);JG(a,"videoplayerchange",a.qp);JG(a,"videoready",a.Fw);KG(a,"beginseeking",a.yw);KG(a,"endseeking",a.Cw);KG(a,"seekto",a.xw)}f=MG.prototype;f.Aw=function(a){var b=O(this.b).getVideoData();!b||0>=b.ta||OG(this,a,b)};
function OG(a,b,c){var d=c.ta;z(b,function(a){a.Rc&&iv(this.a,a.start/(1E3*d))},a)}f.Bw=function(a){var b=O(this.b).getVideoData();if(b&&!(0>=b.ta)){var c=b.ta;z(a,function(a){a.Rc&&jv(this.a,a.start/(1E3*c))},this)}};f.zw=function(a){var b=O(this.b).getVideoData();!b||0>=b.ta||z(a,function(a){var d=a.start/(1E3*b.ta);a.Rc?iv(this.a,d):jv(this.a,d)},this)};f.Dw=function(a){if(this.a.o){var b=this.a.o;!b.Wc||b.$d==a.width&&b.b||(b.$d=a.width,Qu(b,!0))}};
f.Ew=function(a){gv(this.a,a);if(this.a.o){var b=this.a.o;if(b.Wc){b.Dk=b.$k*a-b.$d/2;td(b.ac,-1*b.Dk);var c=el(b.Wc,a);Pu(b,c);fd(b.Yj,Sn(b.Oe*a));ps(b.a)}}};f.Gw=function(a){if(0>Wo(a,16)){a=this.a;var b=this.b.getCurrentTime();a.Sa.innerHTML=Math.floor(100*a.ya)+"% at "+Math.floor(b)+" of "+Math.floor(a.B)+" seconds"}};f.qp=function(a){1!=a.B?this.g&&(LG(this),this.g=!1,JG(this,"videoplayerchange",this.qp)):this.g||NG(this)};
f.Iw=function(a,b,c){"newdata"==a&&(gv(this.a,(b.xa||0)/b.ta,0),a=this.a,bd(a.va),a.J={},(c=O(this.b,c))&&OG(this,c.A.i||[],b),this.a.b&&this.a.b.reset());this.a.Xa(b.ta);this.a.b&&this.a.b.Xa(b.ta);this.a.o&&this.a.o.Xa(b.ta);c=this.a;c.ia=b.Hj;hv(c);c=this.a;c.aa=b.Em;hv(c)};
f.Fw=function(a){if(this.a.b){var b=this.a.b;if(!b.gi)if(Cm(a)){V(b.Gb,"with-thumbnail");b.Ig=Cm(a);b.eh=Dm(a);var c=v(b.Tu,b);b.eh.D("l",c)}else b.reset()}if(this.a.o&&(b=this.a.o,b.xg&&bd(b.ac),W(b.ud,"enabled"),b.Wc=Cm(a),b.Le=Dm(a),b.Wc&&!b.zo)){V(b.ud,"enabled");a=v(b.xo,b);b.Le.D("l",a);Qu(b);a=b.ac.cloneNode(!0);for(var c=b.Wc.a[0].b,d,e,g=0;g<c;g++)e=b.xg.cloneNode(!1),d=El(b.Le,g,b.Nb),Nu(e,d,b.Nb,b.Hi),a.appendChild(e);c=b.ac;(d=c.parentNode)&&d.replaceChild(a,c);b.ac=a}};
f.Hw=function(a,b,c){gv(this.a,b,c)};f.yw=function(){Kz(this.b.b)};f.Cw=function(){this.b.b.oi()};f.xw=function(a,b){ah(this.b,a,b)};function PG(a,b){IG.call(this,a,b);JG(this,"applicationplayerstatechange",this.Nq);JG(this,"controlsdisabled",this.Pq);JG(this,"controlsenabled",this.Qq);JG(this,"liveviewshift",this.Tq);JG(this,"fullscreentoggled",this.Sq);JG(this,"presentingplayerstatechange",this.rr);JG(this,"progresssync",this.sr);JG(this,"threedenabled",this.ir);JG(this,"videodatachange",this.tr);JG(this,"onPlaybackQualityChange",this.dr);JG(this,"onVolumeChange",this.jr);JG(this,"menu_button_add",this.Uq);JG(this,"menu_button_remove",
this.Vq);JG(this,"menu_item_add",this.Wq);JG(this,"menu_item_remove",this.Xq);KG(this,"fullscreentoggled",this.Rq);KG(this,"mutetoggled",this.Yq);KG(this,"nextvideo",this.Zq);KG(this,"playpausetoggled",this.ar);KG(this,"previousvideo",this.br);KG(this,"qualitychanged",this.er);KG(this,"sizechangerequested",this.gr);KG(this,"speedchanged",this.hr);KG(this,"volumechanged",this.kr);KG(this,"watchlater",this.qr);KG(this,"watchonyoutube",this.lr);KG(this,"controlclick",this.Oq);this.a=a;this.b=b;this.g=
new MG(a,b.uj);L(this,this.g);var c=a.K();if(c.Ma){var d=this.b;d.B=new vv(d.j);L(d,d.B);Ov(d,"__default__",d.B,d.nd);F(d.ve);F(d.Pd);F(d.nd);dd(d.vb).appendChild(d.vb);d.b=new pv(d.j);L(d,d.b);d.b.listen("change",d.nr,d);d.g=new wv(d.j);L(d,d.g);d.g.listen("change",d.or,d);d.i=new xv(d.j);L(d,d.i);d.i.listen("change",d.pr,d)}if(c.qc){var d=this.b,e=this.a.K().Nd;d.g?(d.g.Za(e?1:0),Hv(d,d.g)):(Wn(d.ve),Wn(d.Pd))}c.yh&&this.b.o.show();c.hg&&(d=this.b,e=this.a.a.hg?ih:[1],d.i?(yv(d.i,e),Hv(d,d.i)):
Wn(d.mf));if(c.Ua)for(c=this.b,d=[c.wc,c.tc,c.lf,c.k,c.nd,c.vb,c.jg,c.o,c.ve,c.Pd,c.B],e=0;e<d.length;e++)c.a.listen(d[e],"click",c.mr)}y(PG,IG);f=PG.prototype;f.Pq=function(a){this.b.disable(a)};f.Qq=function(a){this.b.enable(a)};f.Tq=function(a){X(this.b.k.element,"ytp-time-live-dvr",!a)};f.Sq=function(a){var b=this.b,c=this.a.K().Nd;if(a){var d=b.o;Ln(d,"ytp-button-fullscreen-exit");var e=d.g.getMsg("YTP_BUTTON_FULLSCREEN_EXIT");d.Ib(e);d.a=e}else Hu(b.o);b.g&&b.g.Za(a?-1:c?1:0)};
f.rr=function(a){P(a.state,2)||(0<Wo(a,8)?Lv(this.b,!0):0>Wo(a,8)?Lv(this.b,!1):0>Wo(a,2)&&Lv(this.b,P(a.state,8)));0>Wo(a,16)&&QG(this,this.a.getCurrentTime())};f.Nq=function(a){if(P(a.state,2)){a=this.b.wc;Ln(a,"ytp-button-replay");var b=a.g.getMsg("YTP_BUTTON_REPLAY");a.Ib(b);a.a=b}};f.ir=function(){var a=this.b,b=this.a.getVideoData().Ef,c=E("html5-threed-conversion-on",a.Eh),a=E("html5-threed-conversion-off",a.Eh);Un(c,!b);Un(a,b)};
f.tr=function(a,b){if(1==O(this.a).B){"newdata"==a&&(QG(this,b.xa||0),wu(this.b.vb),Nv(this.b,"1.0"));this.b.Xa(b.ta);Gv(this.b,ym(b));var c=this.b,d=b.Eb,e=b.eb;c.Bn=d&&!e;c=c.k;X(c.element,"ytp-time-liveonly",d&&!e);X(c.element,"ytp-time-live",d&&e);this.a.g&&"detailpage"!=this.a.K().Y?this.b.Fe.show():this.b.Fe.hide()}};f.dr=function(a){1==O(this.a).B&&Jv(this.b,a,RG(this.a))};
f.jr=function(a){var b=this.b,c=a.volume;a=a.muted;Te(b.tc,"value",a||0==c?"off":20>c?"min":40>c?"quiet":60>c?"normal":80>c?"loud":"max");Te(b.tc,"volume",c);var d=b.Wb.clientWidth-6,e=b.Wb.style.backgroundPosition.split(" "),e=1<e.length?e[1]:"0px";if(a)b.Wb.style.backgroundPosition="-"+d+"px "+e,b.kg.style.left="0px";else{var g;0>=c?g=0:100<=c?g=d:(g=(d-0)*c/100,g=0>=g?0:g>=d?d:0+Math.round(g));b.kg.style.left=g+"px";b.Wb.style.backgroundPosition="-"+(d-g)+"px "+e}c=Math.round(c);d=c+"% "+qf("HTML5_VOLUME_SETTING")+
(a?" "+qf("HTML5_VOLUME_MUTED"):"");b.lf.setAttribute("aria-valuenow",c);b.lf.setAttribute("aria-valuetext",d);c=b.tc;d=G(c,a?"tooltip-alt":"tooltip-default")||"";Te(c,"tooltip",d);c.setAttribute("aria-label",d);b.tc.setAttribute("aria-label",(a?qf("HTML5_VOLUME_UNMUTE"):qf("HTML5_VOLUME_MUTE"))+" "+qf("HTML5_CONTROL_TOGGLE"))};f.Wq=function(a){Hv(this.b,a)};f.Xq=function(a){Iv(this.b,a)};f.Uq=function(a,b){Ov(this.b,a,b)};
f.Vq=function(a){var b=this.b,c=b.A[a];c&&(c.Eg(),vn(c,"menuButtonClick"),b.A[a]=null,b.G[a].dispose(),b.G[a]=null)};f.sr=function(a){QG(this,a)};f.Rq=function(){SG(this.a,!this.a.K().ob)};f.Yq=function(){this.a.wa.muted?ch(this.a):bh(this.a)};f.Zq=function(){xh(this.a)};f.ar=function(){TG(this.a)};f.br=function(){yh(this.a)};f.er=function(a){"auto"==a&&Jv(this.b,jh(this.a),a);"auto"==RG(this.a)&&Jv(this.b,a,a);var b=O(this.a,1);b&&kh(b,"m",a)};
f.gr=function(a){var b=this.a;SG(b,!1);a!=b.a.Nd&&(b.a.Nd=a,b.u("SIZE_CLICKED",a),b.S.Fi())};f.hr=function(a){hh(this.a,a)};f.kr=function(a){UG(this.a,a)};f.lr=function(){nG(this.a,uh(this.a,!0))};f.Oq=function(a){lG(this.a,a)};f.qr=function(){bk("addto_ajax",this.a.K().Fa,this.a.K().Va,v(this.zv,this),v(this.To,this))};
f.zv=function(){var a={sv:"WL",yb:this.a.getVideoData(1).M,Fa:this.a.K().Fa,Va:this.a.K().Va,Qa:this.uv,onError:this.To,Z:this},b={video_ids:a.yb,playlist_id:a.Oa||"",full_list_id:a.zy||"",new_playlist_name:a.vv||"",session_token:kf("addto_ajax")},c=hf("PLAYBACK_ID");c&&(b.plid=c);c={};a.privacy&&(c.privacy=a.privacy);a.rv&&(c.feature=a.rv);a.Fa&&(c.authuser=a.Fa);a.Va&&(c.pageid=a.Va);var d="";switch(a.sv){case "PL":d=a.vv?"action_add_to_new_playlist":"action_add_to_playlist";break;case "FL":d="action_add_to_favorites";
break;case "WL":d="action_add_to_watch_later_list"}c[d]=1;Vj("/addto_ajax",{qv:!0,format:"XML",method:"POST",sf:c,If:b,Z:a.Z,onError:a.onError,Qa:a.Qa})};f.uv=function(){wu(this.b.vb,"html5-async-success");this.a.u("WATCH_LATER")};f.To=function(a,b){var c=this.b.vb,d=b&&b.error_message;wu(c,"html5-async-error");if(d){var e=Pt.getInstance(),g=Rt(c);Tt(c,d);Qt(e,c);as(c,g)}};function QG(a,b){1==O(a.a).B&&rn(a.b.k.template,"current",Sn(b))};var VG={0:"autohide-off",1:"autohide-on",2:"autohide-fade",3:"autohide-auto",4:"autohide-embeds",5:"autohide-seekbar"};function WG(a){ZF.call(this,a);this.P=this.o=this.O=this.Na=this.A=this.ga=this.fa=this.X=this.I=this.G=this.k=this.i=null;this.va=!1;this.ma=this.B=null;this.Ma=!0;this.ya=this.L=!1;a=this.app.K().Fb?4E3:3E3;this.ia=new bp(this.dk,a,this);L(this,this.ia);this.ia.start()}y(WG,ZF);f=WG.prototype;
f.ok=function(){WG.C.ok.call(this);this.app.D("appstatechange",this.Zw,this);this.app.D("applicationplayerstatechange",this.$w,this);this.app.D("clearvideooverlays",this.fx,this);this.app.D("initializingmode",this.bx,this);this.app.D("presentingplayerstatechange",this.ax,this);this.app.D("onDetailedError",this.cx,this)};
f.Qj=function(){var a=this.app.J.assets;if(a.css&&!rl()){var b={rel:"stylesheet",type:"text/css",href:a.css},c=document.getElementById("www-player-css");b.id="www-player-css";var d=c||document.createElement("link");Rc(d,b);c||document.getElementsByTagName("head")[0].appendChild(d);this.Vo(200)}else this.va=!0;WG.C.Qj.call(this)||Vj(a.html,{format:"RAW",method:"GET",Qa:v(this.gx,this)});return!0};
f.gx=function(a){if(a.responseText){var b=Zc("div");b.innerHTML=a.responseText;aG(this,E("html5-video-player",b));this.u("templateready")}else this.u("templateerror")};f.Vo=function(a){0>=a||rl()?(this.va=!0,this.a&&sn(this.a)):H(v(this.Vo,this,a-1),50)};
f.mj=function(){WG.C.mj.call(this);this.va||tn(this.a);XG(this);var a=this.app.K();a.X&&this.addClass(a.X+"-theme");a.jf&&this.addClass("house-brand");!a.kf&&a.te||this.addClass("modest-branding");a.oj&&this.addClass("html5-hide-share");a.gm||this.addClass("html5-hide-volume");a.Fb&&(this.addClass("html5-tablet"),V(document.body,"html5-tablet-body"));a.Vb||this.addClass("hide-info-bar");a.Fb||a.Ub||this.addClass(VG[a.Ch]);var b=Db(new B(this.a.clientWidth,this.a.clientHeight)).toFixed(1);"1.3"!=b&&
"1.8"!=b||this.addClass("autohide-aspect");a.qc&&this.rf();this.G=E("html5-watermark",this.a);YG(this.app)&&Wn(this.G);a.te&&!a.Ub&&(this.A=new Dv(this.B),Ev(this.A,this.aa),L(this,this.A),this.Na=new PG(this.app,this.A),L(this,this.Na));var b=E("html5-context-menu",this.a),c=E("html5-modal-panel",this.a),d=this.O=new jG(this.app);d.$b=b;F(d.$b);document.body.appendChild(d.$b);var e=d.b;e.Ee=c;e.Vj=E("html5-modal-panel-close-button",c);e.Uj=E("html5-modal-panel-clipboard-substitute-content",c);e.De=
Ze("input",e.Uj);jc&&e.De.removeAttribute("readonly");e.a.listen(document,"keydown",e.ks);e.a.listen(c,"contextmenu",e.js);$o(e.a,e.Vj,"down",e.is);$o(e.a,e.De,"down",e.Sm);var c={as:d.ls,bs:d.ms,cs:v(d.Tm,d,!1),ds:v(d.Tm,d,!0),gs:d.rs,hs:d.ts,es:d.os},g;for(g in c)kG(d,g,c[g]);L(this,this.O);a.jf&&V(b,"house-brand");this.k=new du(2);V(this.k.element,"html5-video-loader");V(this.k.element,"html5-center-overlay");V(this.k.element,"ytp-scalable-icon-grow");this.k.V(this.g);L(this,this.k);g=E("html5-info-bar",
this.a);this.o=new AG(g,this.B,this.app);this.o.Sj();L(this,this.o);this.I=new HF(a.oc);this.I.V(this.g);L(this,this.I);this.X=new FF;this.X.V(this.g);L(this,this.X);ZG(this)};f.tl=function(a){WG.C.tl.call(this,a);$G(this,a);this.i&&sG(this.i)};f.Pj=function(){WG.C.Pj.call(this);$G(this,bG(this))};f.Dl=function(a,b){WG.C.Dl.call(this,a,b);"newdata"==a&&this.o.reset();this.o&&this.o.update(b);if(YG(this.app)){var c=b.Ma;c&&(this.G.src=c);Wn(this.G)}};
f.Zw=function(a){2==a?aH(this):(this.I.hide(),this.removeClass("cued-mode"));3==a?this.k.show():P(Hh(this.app),1)||this.k.hide()};
f.ax=function(a){var b;b=a.state;if(P(b,2))b=["ended-mode"];else{var c=[];P(b,8)?c.push("playing-mode"):P(b,4)&&c.push("paused-mode");P(b,1)&&!P(b,32)&&c.push("buffering-mode");P(b,32)&&c.push("seeking-mode");P(b,64)&&c.push("unstarted-mode");b=c}this.ma&&Um(this.a,this.ma);Tm(this.a,b);this.ma=b;P(a.state,1)?this.k.show():0>Wo(a,1)&&this.k.hide();this.Ma=P(a.state,8)&&!P(a.state,4);0>Wo(a,64)&&bH(this.app)};f.$w=function(a){P(a.state,2)?aH(this):0>Wo(a,2)&&(this.I.hide(),this.removeClass("cued-mode"))};
function ZG(a){var b=a.app.K();if(b.rm){if(b.Fb){var c=v(function(a){return cH(a)||Sm(a.target,"html5-draggable")},a);a.P=new xu(a.a,v(function(a){Sm(this.a,"cued-mode")?In.hasTags(void 0)&&this.bo(a):cH(a)&&(this.L?this.Pk():this.dk(),this.A&&(a=bs.getInstance(),a.Af&&gs(a,a.Af)))},a),!1,c);J(a.a,"gesturechange",v(a.wu,a));J(a.a,"gestureend",v(a.xu,a))}else J(a.a,"click",v(a.bo,a)),J(a.a,"dblclick",v(a.vu,a)),J(a.a,"click",v(a.Pk,a)),J(a.a,"mousemove",v(a.Pk,a)),J(a.a,"mouseout",v(a.dk,a));var d=
v(function(){var a=this.b;a&&(lj(a),In.fillPool(4),b.Fb&&Bu(),(a=Af(this.a,"click",d,!0))&&Cf(a))},a);J(a.a,"click",d,!0);J(a.a,"keypress",v(a.zu,a));J(a.a,"keydown",v(a.uu,a));c=v(a.O.tu,a.O);fj&&a.P?a.P.o=c:J(a.a,"contextmenu",c);J(a.G,"click",v(a.co,a));a.o.D("title-click",v(a.co,a));a.o.D("share-click",v(a.Au,a));a.o.D("info-click",v(a.yu,a))}}f.bo=function(a){var b=this.app.K();cH(a)&&(this.a.focus(),!Sm(this.a,"cued-mode")&&b.Ub||TG(this.app,!0));lG(this.app,"screenclick")};
f.vu=function(a){6!=this.app.o&&(cH(a)&&(a=this.app,SG(a,!a.a.ob)),lG(this.app,"screendoubleclick"))};f.wu=function(a){var b=a.scale,c=this.app.K().ob;b*(c?-1:1)>(c?-0.7:1.3)&&(b=this.app,SG(b,!b.a.ob));a.preventDefault()};f.xu=function(a){a=a.scale;var b=this.app.K().ob;a*(b?-1:1)>(b?-0.9:1.1)&&(a=this.app,SG(a,!a.a.ob))};function cH(a){return!ld(a.target,"html5-stop-propagation")}
f.zu=function(a){var b=a.keyCode;if(179==b||178==b)179==b&&(this.u("playpausetoggled",!0),a.preventDefault()),178==b&&(eh(this.app),a.preventDefault());98==b&&this.app.bf("onBackgroundChange");111==b&&this.app.bf("onTextOpacityChange");119==b&&this.app.bf("onWindowOpacityChange");61!=b&&43!=b||this.app.bf("onFontSizeIncrease");45!=b&&95!=b||this.app.bf("onFontSizeDecrease");32==b&&cH(a)&&(TG(this.app,!0),a.preventDefault());48<=b&&57>=b&&(ah(this.app,(b-48)/10*Ph(this.app)),a.preventDefault())};
f.uu=function(a){var b=a.keyCode;if(38==b||40==b||37==b||39==b){var c=5;a.ctrlKey&&(c*=2);if(38==b)c=this.app,UG(c,{volume:c.wa.volume+5,muted:!1});else if(40==b)c=this.app,UG(c,{volume:c.wa.volume-5,muted:!1});else if(37==b){var d=this.app,c=-1*c;ah(d,d.getCurrentTime()+c,!1,250,void 0)}else 39==b&&(d=this.app,ah(d,d.getCurrentTime()+c,!1,250,void 0));a.preventDefault()}36==b&&(ah(this.app,0),a.preventDefault());35==b&&(ah(this.app,Infinity),a.preventDefault());27==b&&(SG(this.app,!1),a.preventDefault())};
f.co=function(a){a.preventDefault();a=this.app;var b;b=a.getVideoData();b=b.Lc||ju(a.a,b);nG(a,b)};f.Au=function(){this.app.Jh();SG(this.app,!1);var a=this.app,b=a.getVideoData();a.u("SHARE_CLICKED",{videoId:b.M,listId:b.Oa,feature:"player_"+a.a.Y})};f.yu=function(){this.app.Jh()};f.fx=function(){var a=this.o;W(a.a,"show-share");W(a.a,"show-more-info")};f.Pk=function(){this.ya=!0;this.ia.start();this.L&&(this.L=!1,this.removeClass("hide-controls"),this.app.Wa("onShowControls"))};
f.dk=function(){this.ya=!0;this.ia.stop();if(!this.L){var a;if(a=this.A){a=this.A;var b=bs.getInstance();a=!!b.Af&&Ye(b.Af,a.nf)||null!=a.I}b=(b=nh(this.app.k,"playlist"))&&b.ba;this.Ma&&this.ya&&!a&&!b&&(this.L=!0,this.addClass("hide-controls"),this.app.Wa("onHideControls"))}};function aH(a){a.I.show(a.app.getVideoData());a.addClass("cued-mode")}f.Fj=function(){var a=Pc("html5-popup-dialog",this.a);z(a,function(a){Xn(a)},this)};
f.cx=function(a){this.i||(this.i=new rG,this.i.V(this.a),L(this,this.i));var b=this.app.K(),c=a.message;a=a.messageKey;if(!b.jf&&"HTML5_DEFAULT_FALLBACK"==a){c+=qf("LEARN_MORE");a=this.i;for(var d=v(this.app.qf,this.app,"",{errorHelpClick:1}),e=a.element.getElementsByTagName("a"),g=0;g<e.length;g++)a.b.push(J(e[g],"click",d));this.app.qf("",{errorHelpShown:1})}a=this.i;b="embedded"==b.Y;Cf(a.b);a.b=[];rn(a.template,"content",new ov(c));if(b)for(b=a.element.getElementsByTagName("a"),c=0;c<b.length;c++)b[c].setAttribute("target",
"_blank");this.i.show()};f.bx=function(){this.i&&this.i.hide()};f.rp=function(a){var b=this.X;b.show(a);H(oa(V,b.element,"html5-bezel-fade"),0);b.a=H(v(b.hide,b),300)};f.Ao=function(a){E("html5-viewport-sheet").disabled=!a};f.rf=function(){var a=this.app.K();Te(document.body,"player-size",a.ob?"fullscreen":a.Nd?"large":"small");WG.C.rf.call(this)};
function dH(a,b){var c="scale("+a+") !important;";b&&(c="translate(-50%, -50%) "+c);return["transform: "+c,"-webkit-transform: "+c,"-moz-transform: "+c,"-o-transform: "+c,"-ms-transform: "+c]}function $G(a,b){if(!b.isEmpty()){var c=b.width,d=b.height,e=0,g=0;c/d>480/360?(e=d,g=360):(e=c,g=480);c=yb(e/g,0.5,1);d={Jb:a.fa,reset:!0};a.fa=zn(".ytp-scalable-icon-shrink",dH(c,!1),d);c=yb(0.33*(e/g),0.5,1);d={Jb:a.ga,reset:!0};a.ga=zn(".ytp-scalable-icon-grow",dH(c,!0),d)}}
f.Gj=function(a){this.A&&Lv(this.A,a)};function XG(a){a.B=new tG;a.B.b=a;var b=new HG(a.a,a.app.K());L(a,b);a.B.a=b;a=Pc("ytp-tooltip-anchor",a.a);z(a,function(a){Kn(b,a)})}f.H=function(){this.k.hide();An(this.fa);An(this.ga);Hf(this.a);Hf(this.G);Xg(this.P);WG.C.H.call(this);this.G=this.I=this.ga=this.fa=this.P=this.X=null};function sh(a,b,c,d){"string"==typeof a&&(a={mediaContentUrl:a});var e=a,g=/\/([ve]|embed)\/([^#?]+)/.exec(a.mediaContentUrl);e.video_id=g&&g[2]?g[2]:null;return ph(a,b,c,d)}function ph(a,b,c,d){b={endSeconds:void 0,list:b,mediaContentUrl:void 0,startSeconds:c,suggestedQuality:d,video_id:a};if(ia(a)){for(var e in b)b[e]=b[e]||a[e];b.video_id=a.video_id||a.videoId}return b};function eH(a,b,c){this.b=a;this.a=b;this.I=c||null;this.i={};this.F=NaN;this.j=new bp(this.Cq,3E4,this);L(this,this.j);this.k=new bp(this.tj,1E3,this);L(this,this.k);this.G=0;this.g="N";this.o=NaN;this.A=""}y(eH,K);var fH={5:"N","-1":"N",3:"B",0:"EN",2:"PA",1:"PL"};function Jz(a,b,c){var d=a.i[b];d||(d=[],a.i[b]=d);d.push(((x()-a.G)/1E3).toFixed(3)+":"+c.join(":"))}f=eH.prototype;
f.tj=function(){if(this.I){var a=this.I();if(!isNaN(this.B)&&!isNaN(a.g)){var b=a.g-this.B;0<b&&Jz(this,"bwm",[b,(a.j-this.L).toFixed(3)])}this.B=a.g;this.L=a.j;isNaN(a.a)||Jz(this,"bwe",[a.a.toFixed(3)]);isNaN(a.b)||(b=a.b,a.i<b&&(b=a.i),this.J!=b&&(Jz(this,"bh",[b.toFixed(3)]),this.J=b),this.a.Da&&3>b&&("PL"==this.g||"B"==this.g)&&this.k.start())}};
f.ig=function(){if(!this.ha()&&!Pb(this.i)){0!=this.k.Ba||this.tj();var a=dy(this.a).hmewdrop;0<=a&&a!=this.o&&Jz(this,"df",[a-(this.o||0)]);this.o=a;a={event:"streamingstats"};this.b.a&&(a.fmt=this.b.a.Pa);a.cpn=this.b.Ea;a.ei=this.b.j;a.el=this.a.Y;a.docid=this.b.M;a.ns=this.a.sc;this.a.g&&(a.adformat=this.a.g);this.b.Eb&&(a.live=this.b.eb?"dvr":"live");Tb(a,Zx(this.a));a.html5="1";var a=S(Yx(this.a)+"stream_204",a),b;for(b in this.i)a+="&"+b+"="+this.i[b].join(",");sa(a);this.i={};this.j.start()}};
f.onError=function(a){Jz(this,"error",[a,this.b.se.toFixed(3)])};f.Cq=function(){"PL"==this.g&&(Jz(this,"vps",[this.g]),this.ig())};f.H=function(){eH.C.H.call(this);nf(this.F)};function gH(a,b,c,d){c=c||"";this.i=[];this.j=[];this.B=[];this.F="watchtime"==c;this.kd=Yx(b)+"api/stats/"+c;d&&(this.Wl=d.fs,this.O=d.nbe,this.P=d.bc,this.Q=d.bd,this.mc=d.bt,d.rtn&&(this.cg=d.rtn),this.F?(this.ja=d.state,0<d.rti&&(this.wh=d.rti)):(this.ga=d.mos,this.ma=d.volume,d.at&&(this.I=d.at),d.allowed&&(this.L=d.allowed),d.ex_ads&&(this.aa=d.ex_ads)));this.G=b.g;this.xh=b.Tb;this.U=b.k;this.Da=b.F;this.Ma=b.A;this.Mc=b.B;this.Na=b.$f;this.Ua=b.gf;this.Sa=b.G;this.Ta=b.I;this.ib=b.J;this.nc=
b.L;this.lc=b.O;this.b=b.b;this.Ic=b.Y;this.B=b.o;this.ia=b.ia;this.Kc=b.i;this.Yl=b.sc;this.Hc=b.Ca;this.referrer=b.referrer;this.Jc=b.U;this.o=b.j;this.ld=b.ja;this.pa=b.ma;this.va=b.pa;this.jd=ey(b);!a.a||a.X.isEmpty();this.xh=a.ff||this.xh;this.ya=a.Ea;this.A=a.se;this.X=a.J;this.za=a.Na;this.a=a.a;this.Xl=a.Ld;this.Lc=a.Yf;a.Eb&&(this.fa=a.eb?"dvr":"live");this.Nc=a.sh;this.md=a.md;this.fb=a.fb;this.Oc=a.j;this.Oa=a.Oa;this.o=a.ia||this.o;this.tb=a.ma;this.g=a.g;this.M=a.M}f=gH.prototype;
f.xh=!1;f.fj=!1;f.Wl=!1;f.dg=!1;f.Xl=!1;f.Yl="yt";f.wh=null;f.cg=null;f.Up=!1;f.send=function(){if(!this.Up){var a=this.Rh(),a=S(this.kd,a);sa(a);this.Up=!0}};
f.Rh=function(){var a={ns:this.Yl,el:this.Ic,hl:this.Kc,cr:this.Jc,cpn:this.ya,docid:this.M,ver:2,referrer:this.referrer,cmt:this.Be(this.A),plid:this.fb,ei:this.Oc,fmt:this.a?this.a.Pa:0,fs:this.Wl?"1":"0",rt:this.Be(this.J),c:this.Na,cver:this.Ua,subscribed:this.g,lact:this.jd,cplatform:this.lc,cbrand:this.Da,cmodel:this.Sa,cnetwork:this.Ta,cbr:this.Ma,cbrver:this.Mc,cos:this.ib,cosver:this.nc,q:this.ld};this.xh&&(a.autoplay="1");this.Xl&&(a.splay="1");this.gj&&(a.ssrt="1");this.X&&(a.delay=this.X);
this.G&&(a.adformat=this.G);this.U&&(a.content_v=this.U);void 0!=this.pa&&this.va&&(a.uga=this.va+this.pa);void 0!=this.k&&(a.len=this.Be(this.k));!this.F&&0<this.B.length&&(a.fexp=this.B.toString());void 0!=this.ga&&(a.mos=this.ga);void 0!=this.ma&&(a.volume=this.ma);void 0!=this.ja&&(a.state=this.ja);null===this.cg||(a.rtn=this.Be(this.cg));this.o&&(a.feature=this.o);this.Oa&&(a.list=this.Oa);this.tb&&(a.ytr=this.tb);this.F?(a.idpj=this.Lc,a.ldpj=this.Nc,null===this.wh||(a.rti=this.Be(this.wh))):
(void 0!=this.I&&(a.at=this.I),void 0!=this.L&&(a.allowed=this.L),void 0!=this.aa&&(a.ex_ads=this.aa));void 0!=this.fa&&(a.live=this.fa);this.ia||(a.ps=this.Hc,a.sw=this.za,this.P&&(a.bc=this.P),this.Q&&(a.bd=this.Q,a.bt=this.mc),0<this.O&&(a.nbe=this.O));!this.dg&&0<this.i.length&&(a.st=Na(this.i,this.Be).join(","),a.et=Na(this.j,this.Be).join(","));return a};f.Be=function(a){return(1*a.toFixed(3)).toString()};function hH(a,b,c,d){this.i=[];this.j=[];this.o=[];this.dj=b.dj;c&&(this.O=c.nbe,this.P=c.bc,this.Q=c.bd,this.Ic=c.bt,this.Rl=c.fs,this.Sl=c.mos,this.gj=c.ssrt,this.source=c.sourceid,this.ya=c.sd,this.Ql=c.hmewadbc,this.va=c.hmewdfc,this.Nl=c.hmewdrop,this.jq=c.hmewvdbc,this.Jc=c.hmemdf,this.ld=c.hmempaintdelay,this.kd=c.hmempainted,this.fa=c.hmempf,this.jd=c.hmempresented,this.re=c.volume);this.ij=b.ij;this.uh=b.Tb;this.U=b.k;this.Mc=b.F;this.Na=b.A;this.Ua=b.B;this.Sa=b.$f;this.Ta=b.gf;this.ib=
b.G;this.nc=b.I;this.lc=b.J;this.mc=b.L;this.Oc=b.O;this.b=b.b;this.Kc=b.Y;this.o=b.o;this.Nc=b.P;this.Hc=b.i;this.Ul=b.sc;this.ag=b.ag?"1":void 0;this.G=ay(b);this.qe=b.Ca;this.referrer=by(b);this.Zf=b.U;this.F=b.j;this.I=new B(window.screen.width,window.screen.height);this.gg=b.ja;this.ja=b.ma;this.ma=b.pa;this.Ol=ey(b);this.L=Jw(b);this.pa=b.Ta;this.Pl=b.aa;!a.a||a.X.isEmpty();this.uh=a.ff||this.uh;this.za=a.Ea;this.Da=a.Hc;this.X=a.J;this.Ma=a.Na;this.a=a.a;this.Tl=a.Ld;this.aa=a.Yf;a.Eb&&(this.ia=
a.eb?"dvr":"live");this.ga=a.sh;this.md=a.md;this.fb=a.fb;this.Lc=a.j;this.Oa=a.Oa;this.pe=a.ja;this.F=a.ia||this.F;this.bg=a.ma;this.Vl=a.ej;this.g=a.g;this.hj=a.Jc;this.M=a.M;this.tb=a.X;this.B=d||[]}f=hH.prototype;f.uh=!1;f.fj=!1;f.Rl=!1;f.dg=!1;f.Sl=!1;f.Tl=!1;f.gj=!1;f.Ul="yt";f.Vl=!1;f.Zp=!1;f.send=function(){if(!this.Zp){var a=this.Rh(),a=S(this.dj,a);sa(a);this.Zp=!0}};
f.Rh=function(){var a={html5:"1",ns:this.Ul,ps:this.qe,el:this.Kc,hl:this.Hc,cr:this.Zf,c:this.Sa,cpn:this.za,docid:this.M,sd:this.ya,sourceid:this.source,referrer:this.referrer,q:this.gg,plid:this.fb,ei:this.Lc,fmt:this.a?this.a.Pa:0,fs:this.Rl?"1":"0",screenw:this.I.width,screenh:this.I.height,w:this.L.width,h:this.L.height,vw:this.tb.width,vh:this.tb.height,playerw:this.G.width,playerh:this.G.height,vid:this.Pl,rt:this.Bh(this.J),mos:this.Sl,volume:this.re,app:this.ij,csipt:this.Da,on3g:this.ag,
partnerid:this.md,sdetail:this.pe,subscribed:this.g,sw:this.Ma,list:this.Oa,eurl:this.b,framer:this.Nc,feature:this.F,ytr:this.bg,threed:this.hj,lact:this.Ol,cver:this.Ta,cplatform:this.Oc,cbrand:this.Mc,cmodel:this.ib,cnetwork:this.nc,cbr:this.Na,cbrver:this.Ua,cos:this.lc,cosver:this.mc};this.dg&&(a.playback="1");this.uh&&(a.autoplay="1");this.Tl&&(a.splay="1");this.gj&&(a.ssrt="1");this.X&&(a.delay=this.X);this.Vl&&!this.dg&&(a.vtmp="1");this.fj&&(a.tv="1");this.U&&(a.content_v=this.U);void 0!=
this.ja&&this.ma&&(a.uga=this.ma+this.ja);void 0!=this.k&&(a.len=this.Bh(this.k));0<this.o.length&&(a.fexp=this.o.toString());0<this.aa&&(a.idpj=this.aa);0<this.ga&&(a.ldpj=this.ga);void 0!=this.pa&&(a.attrib=this.pa);void 0!=this.ia&&(a.live=this.ia);this.P&&(a.bc=this.P);this.Q&&(a.bd=this.Q,a.bt=this.Ic);0<this.O&&(a.nbe=this.O);void 0!=this.va&&(a.hmewdfc=this.va,a.hmewdrop=this.Nl,a.hmewvdbc=this.jq,a.hmewadbc=this.Ql);void 0!=this.fa&&(a.hmempf=this.fa,a.hmemdf=this.Jc,a.hmempresented=this.jd,
a.hmempainted=this.kd,a.hmempaintdelay=this.ld);0<this.i.length&&(a.st=this.i.map(this.Bh).join(","),a.et=this.j.map(this.Bh).join(","));for(var b=0;b<this.B.length;b++)Jb(HB(this.B[b]),function(b,d){d in a||(a[d]=b)});return a};f.Bh=function(a){return(1*a.toFixed(3)).toString()};function iH(){this.cb=[];this.L=[10,10,10,40];this.i=null;this.B="paused";this.fa=!1;this.k=NaN;this.P=this.J=0;this.aa=this.O=null;this.ia=FB;this.j=null;this.Q="";this.U=this.F=0;this.G=NaN;this.o=this.A=0}y(iH,K);function jH(a){var b=a.aa();a.O&&w(b,a.O());return b}function Qz(a,b,c){var d=(x()-a.A)/1E3;c=isNaN(c)?d:c;c=Math.ceil(c);var e=a.L[a.J];a.J+1<a.L.length&&a.J++;c=c+e;d=1E3*(c-d);a.k=H(v(a.ma,a,c,b),d);return c}
iH.prototype.ma=function(a,b){if(!this.ha()){this.k=NaN;var c=kH(this),d=lH(this,c);b&&(d.wh=a);var e=400<this.P;c.length&&!e&&(d.cg=Qz(this,!0,a));d.send();this.P++}};iH.prototype.ja=function(){var a=this.j(),b=(x()-this.A)/1E3,c=a-this.F;0!=c&&(0.5<(isNaN(this.G)?c:Math.abs(c-(b-this.G)))?(mH(this),this.o=a,this.G=NaN):(this.G=b,this.g&&isNaN(this.k)&&Qz(this,!1)));this.F=a};function mH(a){0.5<a.F-a.o&&(a.cb.push([a.o,a.F]),a.o=a.F)}function kH(a){mH(a);var b=a.cb;a.cb=[];return b}
function Oz(a,b){var c=jH(a),d=a.ia();a.b.hj?(w(c,{state:a.B}),z(d,function(a){w(c,HB(a))}),d=new gH(a.a,a.b,b,c)):d=new hH(a.a,a.b,c,d);d.J=(x()-a.A)/1E3;d.k=a.ga();return d}function lH(a,b){b.length||(b=[[a.o,a.o]]);for(var c=Oz(a,"watchtime"),d=0;d<b.length;d++)c.i.push(b[d][0]),c.j.push(b[d][1]);return c}
function Rz(a){var b=a.b;a=a.a;var c=a.ia||b.j,c={ns:b.sc,html5:"1",el:b.Y,ps:b.Ca,fexp:b.o.join(",")||void 0,feature:c||void 0,ytr:a.ma||void 0,list:a.Oa,d:b.va,f:b.ga};b.Tb&&(c.autoplay="1");a.g&&(c.subscribed=a.g);return c}function tz(a){a.A=x();a=a.i;a.i.vps=["0.000:N"];a.G=x();a.F=mf(v(a.ig,a),1E4);a.j.start()}iH.prototype.onError=function(a){this.i.onError(a)};
function Tz(a,b){if(!a.ha()){P(b.state,2)?(a.B="paused",lH(a,kH(a)).send()):P(b.state,8)?(a.B="playing",a.g&&isNaN(a.k)&&Qz(a,!1)):a.B="paused";var c=a.i,d=b.state,e;e=b.state;if(P(e,128))e="ER";else if(P(e,16)||P(e,32))e="S";else{var g=fH[Aj(e)];"B"==g&&P(e,4)&&(g="PB");e=g}e!=c.g&&"N"!=e&&(!c.a.Da||"B"!=e&&"PB"!=e||c.tj(),Jz(c,"vps",[e]),c.g=e);if(0<Wo(b,256)||P(d,128))c.onError(d.a.errorCode);(P(d,2)||P(d,128))&&c.ig()}}
function Cz(a,b,c){b.rt=(x()-a.A)/1E3;w(b,jH(a));a=S("streamingerror"==b.event?"//s.youtube.com/stream_204":a.b.jb+"player_204",Rz(a));a=S(a,b);sa(a,c)}function yz(a,b){var c=a.b,d=a.a,e={ns:c.sc,el:c.Y,eurl:c.b,fmt:d.a?d.a.Pa:0,html5:1,list:d.Oa,plid:d.fb,ei:d.j,ps:c.Ca,noflv:1,st:a.j(),video_id:d.M};c.Tb&&(b.autoplay="1");d.nj&&(b.tmi="1");w(e,b);w(e,Zx(c));sa(S("//www.youtube.com/live_204",e))}iH.prototype.H=function(){iH.C.H.call(this);I(this.k);this.k=NaN;nf(this.I);this.I=NaN};function nH(a,b,c){R.call(this);this.o=1;this.X={};this.D("openingpage",v(this.Nr,this));this.D("initializingmode",v(this.Kr,this));this.D("internalenvironmentdatachange",v(this.Jr,this));this.D("internalvolumechange",v(this.Pm,this));this.J=null;b instanceof Lf||(b=new Lf(b));this.J=b;b=this.J.args;Xg(this.a);this.a=new Tx(b||{});this.u("internalenvironmentdatachange","newdata");this.ia=Vx(this.a)?new Lh(this,1):new Zg(this,1);L(this,this.ia);this.U=new Qh(this);L(this,this.U);this.I=new Qh(this,
1);L(this,this.I);this.P={};this.ga=Ub(["internalvideodatachange",this.Dr,"liveviewshift",this.Lr,"commoninfoloaded",this.Ir,"playbackready",this.Er,"playbackstarted",this.Fr,"statechange",this.Gr,"videoelementevent",this.$r]);this.ja=new Xh(this.a);this.k=new qx;L(this,this.k);this.b=null;b=new kz(this.a,1);if(this.b!=b){if(this.b){var d=this.b,e=this.ga,g;for(g in e)d.$(g,e[g],this)}b.X=this.ja;g=this.ga;for(var h in g)b.D(h,g[h],this);this.b=b}this.fa=Ub(["beginseeking",this.Hr,"endseeking",this.Xr,
"internalvideodatachange",this.Rm,"internalvideoformatchange",this.Vr,"progresssync",this.Rr,"seekto",this.Sr,"onLoadProgress",this.Mr,"onVideoProgress",this.Wr,"newlicensesession",this.Yr,"playbackdataloaded",this.Pr,"playbackready",this.Or,"statechange",this.Qr]);this.j=null;xA(this,this.b);this.aa=-1;this.G=this.A=null;this.B={};this.O=null;this.L={};this.Q=null;c?this.S=c(this):this.S=new WG(this);L(this,this.S);this.S.D("templateerror",this.Tr,this);this.S.D("templateready",this.Ur,this);this.S.D("resize",
this.Zr,this);ts("fs");c=this.S;c.ja=a;c.Qj()||c.u("templateerror")}y(nH,R);f=nH.prototype;f.Ud=null;f.list=null;f.Xe=!0;f.wa=null;f.Bf=null;f.Fg=1;f.S=null;f.Ej=null;f.yf=null;f.Rk=!1;f.zi=null;f.eo=0;var oH={};
function pH(a){var b=In.getTag();a.i=b;a.Ud=a.i;a.j&&Ez(a.j,b);sj(a.i,a.Fg);if(a.a.Md)a.yf&&Cf(a.yf),a.yf=J(a.i,"volumechange",v(a.At,a),!1);else{var b=a.i,c=a.wa.muted;b.volume=a.wa.volume/100;b.muted=c}b=a.S;b.b=a.i;b.za=new Fb(0,0,0,0);b.b.parentNode||b.g.appendChild(b.b);V(b.b,"video-stream");V(b.b,"html5-main-video");c=b.app.K();c.Ub&&c.te&&b.b.setAttribute("controls",!0);c.Ah&&b.b.setAttribute("webkit-playsinline",!0);b.b.setAttribute("x-webkit-airplay","allow");c.lj&&(b.pa=J(b.b,"click",v(b.b.play,
b.b)));a.a.Ya=a.i}function qH(a){if(a.i){a.yf&&(Cf(a.yf),a.yf=null);a.j&&Hn(a.j);var b=a.S;b.b&&(F(b.b),b.b=null);a.a.Ya=null;In.releaseTag(a.i);a.i=null}}function En(a,b){a.a.ub?(a.O&&(td(a.i,a.O.left,a.O.top),Ed(a.i,Ib(a.O)),a.O=null),rj(a.i),Hn(a.j),Ez(a.j,a.i),sj(a.i,a.Fg)):In.releaseTag(b)}function xA(a,b){if(a.j!=b){a.j&&(rx(a.k),zA(a,a.j));a.P[b.B]=b;a.j=b;a.i&&Ez(b,a.i);var c=a.fa,d;for(d in c)b.D(d,c[d],a);a.u("videoplayerchange",b);pz(b)&&rH(a)}}
function zA(a,b){Hn(b);var c=a.fa,d;for(d in c)b.$(d,c[d],a);b!=a.b&&(c=b.B,a.P[c]==b&&delete a.P[c]);b==a.j&&(a.j=null,b!=a.b&&xA(a,a.b))}function O(a,b){return b?a.P[b]||null:a.j}function rH(a){var b=a.j.getVideoData();a.Rm("newdata",a.j,b);var c=a.k;z([Yo,Rw,vo,mx,uu,Xw,ax,gx,st],c.B,c);a.u("videoready",b);6!=a.o&&xz(a.j)}f=nH.prototype;f.Er=function(){sH(this,5)};f.Or=function(a){a=a.i;P(a,8)&&!P(a,2)&&this.Qd()};
function Jh(a){!a.G&&a.I.K().qg&&(a.G=new RF(a),a.G&&tH(a,a.G));var b=a.G;b&&!b.fe&&b.$a(a.I)&&b.create()}
function tH(a,b){L(a,b);b.D("loaded",a.um,a);b.D("unloaded",a.vm,a);b.D("command_pause",uH(a.Od,a));b.D("command_play",uH(a.Qd,a));b.D("command_seek",uH(a.pf,a));b.D("command_disable_controls",a.mg,a);b.D("command_enable_controls",a.Fh,a);b.D("command_redirect_controls",a.zm,a);b.D("command_stop_redirect_controls",a.Dh,a);b.D("command_redirected_show_is_playing",a.S.Gj,a.S);b.D("command_progress",a.qj,a);b.D("command_add_cuerange",a.tm,a);b.D("command_remove_cuerange",a.xm,a);b.D("command_remove_cuerange_all",
a.ym,a);b.D("command_update_cuerange_markers",a.Bm,a);b.D("command_preroll_ready",a.Am,a);b.D("command_hide_all_dialogs",a.S.Fj,a.S);b.D("command_clear_video_overlays",a.Jh,a);b.D("command_log",a.qf,a);b.D("publish_external_event",a.wm,a);b.D("command_log_timing",a.k.A,a.k)}function Kh(a){a&&a.fe&&a.destroy()}f.Wa=function(a,b){this.u.apply(this,arguments);this.bf.apply(this,arguments)};f.Ti=function(a,b){var c=cb(arguments);Vx(this.a)&&c.push(this.j.B);this.u.apply(this,c)};f.K=function(){return this.a};
f.getVideoData=function(a){return(a=O(this,a))?a.getVideoData():null};f.log_=function(){};f.Kr=function(){nf(0);this.a.Md||this.Pm(this.wa)};f.pj=function(){var a=dy(this.a);a.fs=this.a.ob;a.volume=Math.round(this.wa.volume);a.mos=this.wa.muted?1:0;this.a.gg&&this.g&&this.g.g&&"WL"==this.g.g.type&&(a.ssrt=1);return a};f.Aq=function(){var a=ux(this.k);if(this.A){var b=this.A.Ni();b&&a.push(b)}return a};f.Tr=function(){px(this.b,5,void 0,void 0)};
f.Ur=function(){this.a.Ij=this.S.a;var a=this.k,b={};b.loaded=v(this.um,this);b.unloaded=v(this.vm,this);b.command_pause=uH(this.Od,this);b.command_play=uH(this.Qd,this);b.command_seek=uH(this.pf,this);b.command_disable_controls=v(this.mg,this);b.command_enable_controls=v(this.Fh,this);b.command_redirect_controls=v(this.zm,this);b.command_stop_redirect_controls=v(this.Dh,this);b.command_redirected_show_is_playing=v(this.S.Gj,this.S);b.command_progress=v(this.qj,this);b.command_add_cuerange=v(this.tm,
this);b.command_remove_cuerange=v(this.xm,this);b.command_remove_cuerange_all=v(this.ym,this);b.command_preroll_ready=v(this.Am,this);b.command_update_cuerange_markers=v(this.Bm,this);b.command_hide_all_dialogs=v(this.S.Fj,this.S);b.command_clear_video_overlays=v(this.Jh,this);b.command_log=v(this.qf,this);b.publish_external_event=v(this.wm,this);b.module_menu_button_add=v(this.yr,this);b.module_menu_button_remove=v(this.zr,this);b.module_menu_item_add=v(this.Ar,this);b.module_menu_item_remove=v(this.Br,
this);a.j=b;b=this.U;a.b!=b&&(rx(a),a.i={},a.b=b);this.S.mj();a=this.ia;a.b=this.S.a;for(var c in a.i)a.b[c]=a.i[c];for(c in a.g)a.b[c]=a.g[c];c=v(this.Cr,this);a=document;b=bf("fullscreenchange",a);"msfullscreenchange"==b&&(b="MSFullscreenChange");this.Ej=b?J(a,b,c):null;c=this.J.args;this.a.jj?this.wa=Wh():this.wa||(this.wa={volume:100,muted:!1,nonNormalized:100});pH(this);a=new rh(c);mz(this.b,a);b=this.getVideoData();if("detailpage"==this.a.Y){var d;d=b.M;var e=Vh("yt-player-restore-playhead");
d=e?e[d]:void 0;d&&(b.xa=d)}ng("yt-player-restore-playhead");this.a.Qc=bG(this.S);"detailpage"!=this.a.Y&&c&&(c.playlist||c.list||c.api)&&(vH(this,c),a.M||a.hf||(c=this.g,a=v(this.Om,this),c.ye=a,c.Vd&&H(c.ye,0)));if(c=this.J.args.jsapicallback)ha(c)||(c=n(c)),c&&uH(v(c,l,this.a.kj),l);this.a.qg=Ih(this.a)&&(!Wa(Qg())||!Wa(Sg()));ql()?this.a.Zl?wH(this):"leanback"!=this.a.Y&&xH(this):px(this.b,5,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0);this.S.Pj()};
function xH(a){a.u("initializingmode");sH(a,2)}function wH(a){a.u("initializingmode");xA(a,a.b);sH(a,3);a.a.ub||(qH(a),pH(a),Ez(a.b,a.i));rz(a.b);yH(a,3)}function uH(a,b){return function(){var c=Array.prototype.slice.call(arguments);H(function(){a.apply(b||this,c)},0)}}f.qf=function(a,b,c){var d=O(this);b.event=a;d.j&&Cz(d.j,b,c)};
function hh(a,b){if(!isNaN(b)&&a.i){var c=1,c=a.a.hg?ih:[1],c=1>b?Ra(c,function(a){return a>=b}):Ta(c,function(a){return a<=b});a.Fg!=c&&(a.Fg=c,a.b==a.j&&sj(a.i,c),a.u("onPlaybackRateChange",c))}}function jh(a,b){var c=a.getVideoData(b);return c&&c.a?c.a.a.i:"unknown"}function RG(a){return(a=O(a,void 0))?ez(a.va,a.a):"unknown"}f.getCurrentTime=function(a){return(a=O(this,a))?a.getCurrentTime():0};function Ph(a,b){var c=O(a,b);return c?c.od():0}
function lh(a,b){var c=a.getVideoData(b);if(!c)return[];c=Na(c.k,function(a){return a.Re()});gb(c);return c}function vh(a,b){var c=Nz(a.b,b);c.debug_playbackQuality=jh(a);c.debug_date=(new Date).toString();return rb(c)}
function Ww(a,b){var c=a.getVideoData(),d=!!c.Q||!!c.Ef||!b;a.u("threedenabled",d);d&&a.i.setAttribute("mozStereoMode","1");Sw()&&(a.i.setAttribute("mozStereoMode",d?"1":"0"),c=gl[d?c.pe:0],d=document.createElement("NvStereoExtDataElement"),d.setAttribute("stereoMode",c),ad(document.documentElement,d),If(d,"3DModeEvent"))}function Hh(a){return(a=O(a,1))&&a.i}
f.$r=function(a){var b=a.target;switch(a.type){case "loadedmetadata":vs("fvb")||ts("fvb");this.S.rf();break;case "loadstart":vs("gv")||ts("gv");break;case "progress":case "timeupdate":vs("l2s")||(a=oj(b),a<b.buffered.length&&2<b.buffered.end(a)&&ts("l2s"))}};f.Yr=function(a){if(this.Rk){var b=this.eo.toString();this.eo++;this.zi[b]=a;a={request:cb(a.b[0]?a.b[0].message:null),sessionId:b,system:a.j.a,url:a.k};this.u("onNewLicenseSession",a)}else a.start()};
f.Mr=function(a,b){this.Ti("onLoadProgress",b)};f.Wr=function(a,b){this.Ti("onVideoProgress",b)};
f.Rr=function(a,b,c,d,e){if(!e&&a.eg()&&!wz(a)){e=a.getVideoData();if(this.a.ze&&e.ta&&!e.vn&&e.Ae>=e.lm){var g;g=a.K();var h=yb(e.se/e.ta,0,1),h={html5:"1",video_id:e.M,eurl:g.b,framer:g.P,feature:g.j,ps:g.Ca,el:g.Y,list:e.Oa,w:h,l:e.ta,plid:e.fb,ei:e.j,access_token:e.G,tpmt:e.Ae,cpn:e.Ea};g.g&&(h.adformat=g.g);g.referrer&&(h.referrer=by(g));g.Tb&&(h.autoplay="1");g.Fa&&(h.authuser=g.Fa);g.Va&&(h.pageid=g.Va);e.Ld&&(h.splay="1");e.g&&(h.subscribed=e.g);w(h,Zx(g));g=S(g.jb+"set_awesome",h);sa(g);
e.vn=!0}e.ta&&e.Ae>=e.jm&&zH(this)}this.qj(b,c,d,a)};f.qj=function(a,b,c,d){this.u("progresssync",a,b,c||0,(d||O(this)).B)};
f.Gr=function(a){if(!P(a.state,2)||!AH(this)){P(a.state,2)&&(this.Od(),P(a.a,32)&&this.b.oi(),this.a.oc&&SG(this,!1));if(0<Wo(a,256)){var b=a.state.a;Gh(this.b,b.errorCode,b.errorDetail)}if(P(a.state,128)&&(b=a.state,nf(0),gh(this),b=b.a,206==b.errorCode&&Gh(this.b,b.errorCode,b.errorDetail),!AH(this))){b.message||(b.messageKey||(b.messageKey="HTML5_DEFAULT_FALLBACK"),b.message=qf(b.messageKey));5==b.errorCode&&Gh(this.b,208,b.errorDetail);var c=5;206==b.errorCode&&(c=150);Va(vj,b.errorCode)&&(c=
b.errorCode);this.u("onError",c);this.u("onDetailedError",b)}this.u("applicationplayerstatechange",a);P(a.state,2)&&(a=this.getVideoData(),a.Eb&&!a.eb&&this.mg(["play_pause"]))}};f.Qr=function(a){!P(a.state,32)&&0>Wo(a,16)&&(!P(a.state,8)||this.i.ended&&!P(a.state,2)||this.Qd());this.u("presentingplayerstatechange",a);this.bf("onStateChange",a);yH(this,Aj(a.state))};
f.Dr=function(a,b,c){if("newdata"==a){Kh(this.A);Kh(this.G);a=[];for(var d in this.B)fh(this,d)&&a.push(d);this.B={};0<a.length&&this.u("controlsenabled",a);this.Dh();this.X={}}this.getVideoData().Aj?(this.Bf=Qb(this.wa),this.mg(["audio"]),d=this.i,d.Ik=!0,d.muted=!0):(fh(this,"audio")&&this.Fh(["audio"]),this.i.Ik=!1,this.Bf&&(UG(this,this.Bf),this.Bf=null));d=this.getVideoData();d.Eb&&!this.a.Cj?px(this.b,205,"DEVICE_FALLBACK",void 0):d.Eb&&!d.eb?this.mg(["seek"]):this.Fh(["seek"]);this.getVideoData().fk&&
!this.a.Dj&&px(this.b,207,"DEVICE_FALLBACK",void 0);if(c.P||c.i.focEnabled||c.i.rmktEnabled)c=1E3*this.getVideoData().ta,BH(this,"part2viewed",0,c),BH(this,"videoplaytime25",0.25*c,c),BH(this,"videoplaytime50",0.5*c,c),BH(this,"videoplaytime75",0.75*c,c),BH(this,"videoplaytime100",c,2147483647),BH(this,"conversionview",c,2147483647)};
f.Rm=function(a,b,c){if("newdata"==a&&(rx(this.k),hh(this,1),!b.j&&!wz(b))){var d=new iH,e=v(this.pj,this);d.O=e;e=v(this.Aq,this);d.ia=e;lz(b);b.a&&!wz(b)&&(b.j=d,e=v(b.od,b),d.ga=e,e=v(b.getCurrentTime,b),d.j=e,e=v(b.zq,b),d.pa=e,e=v(b.Bq,b),d.aa=e,e=b.o,d.a=b.a,d.b=e,d.Q=d.b.jb+"get_video",d.g=!1,d.i=new eH(d.a,d.b,d.pa),L(d,d.i),d.fa=!0,b.a.fg&&yz(b.j,{metric:"connected"}))}this.wa.volume=(this.wa.nonNormalized||this.wa.volume)*this.getVideoData().zh;c.lm=Math.min(0.8*c.ta,180);this.Wa("videodatachange",
a,c,b.B)};f.Vr=function(a,b){var c=this.j.getVideoData();a==c&&this.u("onPlaybackQualityChange",a.a.a.i,b)};f.Jr=function(){"detailpage"==this.a.Y&&Mh(this)};function Mh(a){var b=CH();if(b&&0<=b.index){var c=[];z(b.videoIds,function(a){if(a=b.videoData?b.videoData[a]:void 0)a.video_id=a.id,c.push(a)});vH(a,{videoList:c,loop:b.autoPlay,index:b.index})}}function vH(a,b){Xg(a.g);a.g=new Hm(b)}
function BH(a,b,c,d){b in a.X||(c=new di(c,d,{id:b,priority:1}),c.xb.D("onEnter",a.gp,a),c.xb.D("onExit",a.gp,a),a.b.Ek(c),a.X[b]=c)}f.gp=function(a){var b=a.getId(),c=this.b.getVideoData();"part2viewed"==b?(c.P&&sa(c.P),c.mc&&sa(c.mc)):"conversionview"==b&&zH(this);c.Da&&(b=a.getId(),c=Pj(c.Da,{label:b}),sa(c));this.b.Wh(a)};
function zH(a){var b=a.b.getVideoData();b.no||(b.i.eventLabel=a.a.Y,b.i.playerStyle=a.a.Ca,b.P&&(b.i.feature="pyv"),b.i.vid=b.M,b.i.isAd=!("adunit"!=a.a.Y&&!b.P),vG("view",b.i),b.no=!0)}function sH(a,b){b!=a.o&&(2==b&&yH(a,5),a.o=b,a.u("appstatechange",b))}function yH(a,b){a.aa!=b&&(a.aa=b,a.Ti("onStateChange",b))}function lG(a,b){if(a.a.Ua){var c={controlClicked:b};a.a.ob&&(c.fs=1);a.qf("",c)}}f.pf=function(a,b,c,d){(d=O(this,d))&&Iz(d,a,!1!=b,c)};
f.Sr=function(a,b){var c=a.getVideoData();if(1==this.o||2==this.o)c.xa=b;2==this.o?wH(this):(c=Mz(a,b),this.Wa("seekto",c))};f.Hr=function(){this.Wa("beginseeking")};f.Xr=function(){this.Wa("endseeking")};function UG(a,b){a.wa=b;a.u("internalvolumechange",a.wa)}function bh(a){a.wa.muted=!0;a.u("internalvolumechange",a.wa)}function ch(a){a.wa.muted=!1;a.u("internalvolumechange",a.wa)}function th(a,b){var c;if(c=(new ve(b)).a){var d=a.a;d.va=c.get("d",d.va);d.ga=c.get("f",d.ga)}}
function oh(a,b,c){b=new rh(b);return DH(a,b,void 0,c)}function DH(a,b,c,d){var e=O(a,d);if(!e)return!1;void 0!=c&&(b.ef=c);gh(a,d);mz(e,b);if(!qz(e))return!1;Xx(e.K(),b.b);e==a.b?(sH(a,1),wH(a)):rz(e);return!0}function zh(a,b){var c=DH(a,b);$g(a,c,void 0)}function $g(a,b,c){c=O(a,c);b&&c==a.b&&(c.getVideoData().Ld=!0)}function qh(a,b,c){var d=O(a,c);d&&(gh(a,c),mz(d,b),qz(d)&&(Xx(d.K(),b.b),d==a.b&&(sH(a,1),xH(a))))}
function mo(a,b,c,d,e){if(!b&&!d)throw Error("Playback source is invalid");b=ph(b||null,d||null);a.a.ob||"detailpage"!=a.a.Y?d?(a.Xe=!1,wh(a,b,void 0,void 0,void 0)):oh(a,b,1):(d={},c&&(d.feature=c),b=new rh(b),d=ju(a.a,b,d),c&&a.u("onNavigate",{url:d,feature:c}),e?nG(a,d):(window.ytspf||{}).enabled?spf.navigate(d):window.location=S(d,{})+"")}
function wh(a,b,c,d,e){"string"==typeof b||b instanceof Array?vH(a,{api:b,index:c,startSeconds:d,suggestedQuality:e}):vH(a,b);b=a.g;a=v(a.Om,a);b.ye=a;b.Vd&&H(b.ye,0)}f.Om=function(){var a=Ah(this.g);this.getVideoData().ff||!this.Xe?zh(this,a):qh(this,a)};function uo(a){var b=CH();return!(!a.g||!(a.g.loop||a.g.ua+1<a.g.Mb)||b&&!b.autoPlay)}function AH(a){return a.g&&("embedded"==a.a.Y||a.a.ob)&&uo(a)?(xh(a),!0):!1}
function xh(a){a.g&&(a.g.Vd?(a.g.loop||a.g.ua+1<a.g.Mb)&&zh(a,Mm(a.g)):(Mm(a.g),a.Xe=!1))}function yh(a){a.g&&(a.g.Vd?(a.g.loop||0<=a.g.ua-1)&&zh(a,Nm(a.g)):(Nm(a.g),a.Xe=!1))}function CH(){var a=n("yt.www.watch.lists.getState");return a?a():null}function uh(a,b){var c=null;b&&(c={t:Math.floor(a.getCurrentTime(1))});return ju(a.a,a.getVideoData(1),null,c)}f.tm=function(a,b){var c=O(this,b);c&&(z(a,c.Ek,c),this.u("cuerangesadded",a))};
f.xm=function(a,b){var c=O(this,b);c&&(z(a,c.Wh,c),this.u("cuerangesremoved",a))};f.ym=function(a,b){var c=O(this,b);if(c){for(var c=c.A,d=c.i.length-1;0<=d;d--)c.i[d].namespace==a&&Dj(c,d);c.Xb()}};f.Bm=function(a){this.u("cuerangemarkersupdated",a)};f.Am=function(a,b){var c=O(this,b);c&&Dz(c,a)};f.Fr=function(){EH(this)};
function EH(a){if(!a.a.jk){var b=a.b.getVideoData();if(b.M){var c=b.M;xs().docid=c}b.j&&(c=b.j,xs().ei=c);b.Ea&&(c=b.Ea,xs().cpn=c);0<b.xa&&(c=b.xa.toString(),xs().start=c);b=b.a.Pa.toString();xs().fmt=b;b=Math.round((a.b.b?mh(a.b.b):0)*Ph(a)).toString();xs().tds=b;ts("aft");if("detailpage"==a.a.Y){var b=a.k.F,d;for(d in b)ts(d,b[d]);d=a.k.o;for(var e in d)b=e,c=d[e],xs()[b]=c;b=us().tick;e=us().span;c=xs();if(d=n("yt.timing.reportbuilder_")){if(d=d.apply(null,[b,e,c,void 0]))ws(d),ys()}else{d={v:2,
s:"youtube",action:hf("TIMING_ACTION")};var g=hf("TIMING_INFO")||{},h;for(h in g)c[h]=g[h];h=c.srt;delete c.srt;if(!h&&0!==h)try{var k=(window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance).timing;h=k.responseStart-k.navigationStart}catch(m){c.pt&&(h=c.pt)}if(h||0===h)c.srt=h;b.aft||(b.aft=b.vr&&b.cl&&b.cl>b.vr?b.cl:b.vr?b.vr:b.ol);b.aft&&b.plev&&(b.aft=Math.min(b.aft,b.plev));b.vr&&b.gv&&(e.vl=Math.round(b.vr-b.gv));for(var p in c)"_"!=p.charAt(0)&&(d[p]=c[p]);
k={};p=[];h=b._start;for(var s in b)"_"!=s.charAt(0)&&(c=Math.max(Math.round(b[s]-h),0),k[s]=c,p.push(s+"."+c));d.rt=p.join(",");s={};p=[];for(var r in e)"_"!=r.charAt(0)&&(s[r]=e[r],p.push(r+"."+e[r]));d.it=p.join(",");ws(d);(r=n("ytdebug.logTiming"))&&r(d,k,s);ys()}}a.a.jk=!0}}f.um=function(a){"remote"==a?(sH(this,6),Kh(this.A)):this.Ti("onApiChange")};f.vm=function(a){"remote"==a&&xH(this)};
f.At=function(){if(!fh(this,"audio")){var a=100*this.i.volume,a={volume:a,nonNormalized:a/this.getVideoData().zh,muted:this.i.muted};this.wa=Qb(a);this.Wa("onVolumeChange",a)}};
f.Pm=function(a){a.volume=yb(a.volume,0,100);a.nonNormalized=a.volume/this.getVideoData().zh;if(this.a.jj&&!this.a.Md){var b={};b.volume=isNaN(a.volume)?Wh().volume:yb(a.volume,0,100);b.nonNormalized=a.nonNormalized;b.muted=void 0==a.muted?Wh().muted:a.muted;jg("yt-player-volume",b,2592E3)}if(fh(this,"audio"))this.Bf&&(this.Bf=Qb(a),this.Wa("onVolumeChange",a));else{var b=this.i,c=a.muted;b.volume=a.volume/100;b.muted=c;this.a.Md||this.Wa("onVolumeChange",a)}};f.Cr=function(){FH(this,!!Kf())};
function FH(a,b){a.S.Ao(b);if("detailpage"==a.a.Y&&!b){var c=a.b.getVideoData(),d=n("checkCurrentVideo");if(d&&hf("VIDEO_ID")!=c.M){var e=a.getCurrentTime(),g={};g[c.M]=e;jg("yt-player-restore-playhead",g,172800);d(c.M);a.u("openingpage")}}a.a.ob=b;a.S.rf();a.Wa("fullscreentoggled",b)}f.Zr=function(){bH(this)};f.Jh=function(){this.Wa("clearvideooverlays")};f.yr=function(a,b){this.Wa("menu_button_add",a,b)};f.zr=function(a){this.Wa("menu_button_remove",a)};
f.Ar=function(a){this.Wa("menu_item_add",a)};f.Br=function(a){this.Wa("menu_item_remove",a)};f.Lr=function(a){this.Wa("liveviewshift",a)};f.wm=function(a,b){if("onAdStateChange"==a){var c=arguments[1],d=arguments[2],e=arguments[3]||{};1==c&&EH(this);"leanback"==this.a.Y&&Vx(this.a)&&(0==c?this.Ud=this.i:this.Ud=d,this.u("onAdStateChange",c,e.video_id))}else this.u.apply(this,arguments)};
f.bf=function(a,b){this.k.G.apply(this.k,arguments);this.A&&this.A.u.apply(this.A,arguments);this.G&&this.G.u.apply(this.G,arguments)};f.Qd=function(a,b){var c=O(this,b);c&&(2==this.o?wH(this):c.U?(a&&GH(this,c),P(c.i,2)?this.pf(0):Gz(c)):rz(c))};f.Od=function(a,b){var c=O(this,b);c&&(a&&GH(this,c),Bz(c))};
function gh(a,b){var c=O(a,b);if(c&&1!=a.o&&2!=a.o){Bz(c);if(c.j){var d=c.j;lH(d,kH(d)).send();d.i.ig()}c.U=!1;c.b&&(nz(c),c.g&&(Yg(c.k,c.g),c.k=null,c.g=null),c.a&&(c.a.xa=c.getCurrentTime()),c.G=NaN,qj(c.b),c.o.za&&tj(c.b,!1),P(c.i,128)||sz(c,yj(c.i)))}}function dh(a,b){if(!fh(a,"play_pause")){var c=a.L.play_pause?a.Q:null;c?c.je("control_play"):a.Qd(!1,b)}}function eh(a,b){if(!fh(a,"play_pause")){var c=a.L.play_pause?a.Q:null;c?c.je("control_pause"):a.Od(!1,b)}}
function TG(a,b){if(!fh(a,"play_pause")&&(!a.a.Fb||2!=a.o||In.hasTags(void 0))){var c=a.L.play_pause?a.Q:null;c?c.je("control_toggle_play_pause"):(c=O(a,void 0))&&(c.eg()?a.Od(b,void 0):a.Qd(b,void 0))}}function ah(a,b,c,d,e){if(!fh(a,"seek")){var g=a.L.seek?a.Q:null;g?g.je("control_seek",b):a.pf(b,c,d,e)}}
function SG(a,b){if(a.a.ob!=b)if(Jf())if(b){var c=a.S.a,d=af(["requestFullscreen","requestFullScreen"],c);d&&d.apply(c)}else(c=af(["exitFullscreen","cancelFullscreen","cancelFullScreen"],document))&&c.call(document);else a.u("onFullScreenToggleRequest"),FH(a,b)}function nG(a,b){SG(a,!1);a.u("openingpage");rs(b)}f.Ir=function(a){Wx(this.a,a)};
f.Pr=function(){if(this.j==this.b){var a;if(a=Ih(this.a))if(mg("yt-remote-delayed-connect-key"))a=!0;else{a=Jg();var b=Bg(Qg());a=!!Fg(b,a)}if(a||!this.getVideoData(1).Nm||this.a.oc)if((b=pz(this.b))||(b=((b=this.getVideoData())&&b.I.length&&!b.O.length?0<=La(b.I,"fresca"):!1)||a),b){if(this.b.Q.length||0<Ni(this.b.A.b,-2147483648).length)sH(this,4),Kh(this.A);a&&sH(this,6);!this.A&&this.I.getVideoData().ca&&(this.A=new NB(this))&&tH(this,this.A);(a=this.A)&&!a.fe&&a.$a(this.I)&&a.create();Jh(this);
rH(this)}else a=!1,this.getVideoData().ga||this.U&&(a=fx(this.U)),a?(a=this.getVideoData(),oh(this,{video_id:a.b.ypc_vid||a.M,ypc_preview:1},1)):(this.log_("No available formats"),px(this.b,5,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0));else a="DEVICE_FALLBACK",jc||hj("iemobile")||hj("xbox")&&hj("trident")||hj("nintendo wiiu")||(a="FLASH_FALLBACK"),px(this.b,5,a,void 0)}else rH(this)};f.Nr=function(){this.Od()};
function GH(a,b){var c=b.getVideoData(),d="html5-bezel-pause";P(b.i,8)?c.Eb&&!c.eb&&(d="html5-bezel-stop"):d="html5-bezel-play";a.S.rp(d)}function bH(a){a.a.Qc=bG(a.S);if(a.i){var b=!1,c=a.getVideoData();if(0!=a.i.readyState){var d=new B(a.i.videoWidth,a.i.videoHeight);Cb(c.X,d)||(c.X=d,b=!0)}c=eG(a.S,bG(a.S),cG(a.S),dG(a.S),void 0);Hb(a.a.Qo,c)||(a.a.Qo=c,b=!0);c=eG(a.S,bG(a.S),cG(a.S),dG(a.S),!0);Hb(a.a.vf,c)||(a.a.vf=c,b=!0);b&&(kh(O(a),"r"),a.u("resize",ay(a.a)),a.Wa("onResize"))}}
function fh(a,b){return!(!a.B[b]||!a.B[b].length)}f.mg=function(a,b){b=b||"defaultcontext";var c=[];z(a,function(a){this.B[a]?0>this.B[a].indexOf(b)&&this.B[a].push(b):(this.B[a]=[b],c.push(a))},this);0<c.length&&this.u("controlsdisabled",c)};f.Fh=function(a,b){b=b||"defaultcontext";var c=[];z(a,function(a){if(fh(this,a)){var e=this.B[a].indexOf(b);0<=e&&this.B[a].splice(e,1);0==this.B[a].length&&c.push(a)}},this);0<c.length&&this.u("controlsenabled",c)};
f.zm=function(a,b,c){this.Dh();this.Q=a;b&&z(b,function(a){this.L[a]=!0},this);c&&sx(this.k,a,c)};f.Dh=function(){this.Q=null;this.L={};tx(this.k)};function YG(a){var b=a.getVideoData();return b&&b.Ma&&!mm.test(b.Ma)?!a.a.Mh:a.a.zc}f.H=function(){qH(this);this.Ej&&Cf(this.Ej);nf(0);Yg(Lb(this.P));this.P={};this.j=this.b=null;Yg(this.a,this.g);this.J=this.I=this.ia=this.U=this.Ud=null;nH.C.H.call(this)};pa("yt.player.Application",nH);function HH(a,b,c,d,e,g){var h={};b&&(h.v=b);c&&(h.list=c);d&&(h.url=d);a={name:a,locale:e,feature:g};for(var k in h)a[k]=h[k];h=S("/sharing_services",a);sa(h)};Yr(bs);Yr(Pt);n("yt.tracking.share")||pa("yt.tracking.share",HH);n("yt.net.ping")||pa("yt.net.ping.send",sa);n("yt.window.popup")||(pa("yt.window.popup",ss),pa("yt.window.open",rs));pa("yt.player.Application.create",function(a,b){oH[a]&&(oH[a].dispose(),oH[a]=null);var c=new nH(a,b);Wg(c,function(){oH[a]=null});oH[a]=c});})();

Open in new window

LVL 4
Analog_KidAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

epichero22Commented:
I would try reinstalling or a full uninstall/reinstall.  You may have came across a random bug that Mozilla hasn't uncovered.

Edit: Firefox 24.0 is released, why not update to that and see if the problem persists?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dmitry_nCommented:
Virus?
0
Gerwin Jansen, EE MVETopic Advisor Commented:
I think this is the HTML5 Youtube player.
0
Analog_KidAuthor Commented:
Updated FF. I'll let you know if the problem re-surfaces.

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.