(function(){var g,aa=aa||{},m=this;function n(a){return void 0!==a}function p(a,b,c){a=a.split(".");c=c||m;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&n(b)?c[d]=b:c[d]?c=c[d]:c=c[d]={}}function r(a,b){for(var c=a.split("."),d=b||m,e;e=c.shift();)if(null!=d[e])d=d[e];else return null;return d}function t(){}function ba(a){a.getInstance=function(){return a.V?a.V:a.V=new a}}
function ca(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 da(a){return"array"==ca(a)}function ea(a){var b=ca(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"==ca(a)}function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ka(a){return a[la]||(a[la]=++ma)}var la="closure_uid_"+(1E9*Math.random()>>>0),ma=0;
function na(a,b,c){return a.call.apply(a.bind,arguments)}function oa(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")?na:oa;return v.apply(null,arguments)}
function pa(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)}}var w=Date.now||function(){return+new Date};function x(a,b){function c(){}c.prototype=b.prototype;a.I=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(a,c,f){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[c].apply(a,h)}};var qa;var sa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function ta(a){return decodeURIComponent(a.replace(/\+/g," "))}var ua=/&/g,va=/</g,wa=/>/g,xa=/"/g,ya=/'/g,za=/\x00/g,Aa=/[\x00&<>"']/;function Ba(a){return-1!=a.indexOf("&")?"document"in m?Ca(a):Da(a):a}
function Ca(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},c;c=m.document.createElement("div");return a.replace(Ea,function(a,e){var f=b[a];if(f)return f;if("#"==e.charAt(0)){var h=Number("0"+e.substr(1));isNaN(h)||(f=String.fromCharCode(h))}f||(c.innerHTML=a+" ",f=c.firstChild.nodeValue.slice(0,-1));return b[a]=f})}
function Da(a){return a.replace(/&([^;]+);/g,function(a,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if("#"==c.charAt(0)){var d=Number("0"+c.substr(1));if(!isNaN(d))return String.fromCharCode(d)}return a}})}var Ea=/&([^;\s<&]+);?/g,Fa={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"},Ga={"'":"\\'"};
function Ha(a,b){for(var c=0,d=sa(String(a)).split("."),e=sa(String(b)).split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",l=e[h]||"",q=RegExp("(\\d*)(\\D*)","g"),E=RegExp("(\\d*)(\\D*)","g");do{var fa=q.exec(k)||["","",""],ra=E.exec(l)||["","",""];if(0==fa[0].length&&0==ra[0].length)break;c=Ia(0==fa[1].length?0:parseInt(fa[1],10),0==ra[1].length?0:parseInt(ra[1],10))||Ia(0==fa[2].length,0==ra[2].length)||Ia(fa[2],ra[2])}while(0==c)}return c}
function Ia(a,b){return a<b?-1:a>b?1:0}function Ja(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c)>>>0;return b};function Ka(){};var La=Array.prototype.indexOf?function(a,b,c){return Array.prototype.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},y=Array.prototype.forEach?function(a,b,c){Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Ma=Array.prototype.filter?function(a,b,c){return Array.prototype.filter.call(a,
b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=u(a)?a.split(""):a,k=0;k<d;k++)if(k in h){var l=h[k];b.call(c,l,k,a)&&(e[f++]=l)}return e},z=Array.prototype.map?function(a,b,c){return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=u(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=b.call(c,f[h],h,a));return e},Na=Array.prototype.some?function(a,b,c){return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&
b.call(c,e[f],f,a))return!0;return!1},Oa=Array.prototype.every?function(a,b,c){return Array.prototype.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0};function Pa(a,b,c){b=Qa(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Qa(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return f;return-1}function A(a,b){return 0<=La(a,b)}
function Ra(){var a=Sa;if(!da(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function Ta(a,b){A(a,b)||a.push(b)}function Ua(a,b){var c=La(a,b),d;(d=0<=c)&&Array.prototype.splice.call(a,c,1);return d}function Va(a,b){var c=Qa(a,b,void 0);0<=c&&Array.prototype.splice.call(a,c,1)}function Wa(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function Xa(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 Ya(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(ea(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var h=0;h<f;h++)a[e+h]=d[h]}else a.push(d)}}function Za(a,b,c,d){return Array.prototype.splice.apply(a,$a(arguments,1))}function $a(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)}
function ab(a,b,c){if(!ea(a)||!ea(b)||a.length!=b.length)return!1;var d=a.length;c=c||bb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function cb(a,b){return a>b?1:a<b?-1:0}function bb(a,b){return a===b};function db(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function eb(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d}function fb(a){var b=0,c;for(c in a)b++;return b}function gb(a,b){return ib(a,b)}function jb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function kb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function lb(a){return null!==a&&"withCredentials"in a}function ib(a,b){for(var c in a)if(a[c]==b)return!0;return!1}
function nb(a){var b=ob,c;for(c in b)if(a.call(void 0,b[c],c,b))return c}function pb(a){for(var b in a)return!1;return!0}function qb(a,b){if(null!==a&&b in a)throw Error('The object already contains the key "'+b+'"');a[b]=!0}function rb(a){var b={},c;for(c in a)b[c]=a[c];return b}function sb(a){var b=ca(a);if("object"==b||"array"==b){if(ha(a.clone))return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=sb(a[c]);return b}return a}var tb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
function ub(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 f=0;f<tb.length;f++)c=tb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function vb(){this.f=""}vb.prototype.Sb=!0;vb.prototype.Nb=function(){return this.f};vb.prototype.toString=function(){return"Const{"+this.f+"}"};function wb(a){var b=new vb;b.f=a;return b};function xb(){this.f="";this.h=yb}xb.prototype.Sb=!0;xb.prototype.Nb=function(){return this.f};function zb(a){return a instanceof xb&&a.constructor===xb&&a.h===yb?a.f:"type_error:SafeUrl"}var Ab=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i;function Bb(a){if(a instanceof xb)return a;a=a.Sb?a.Nb():String(a);Ab.test(a)||(a="about:invalid#zClosurez");var b=new xb;b.f=a;return b}var yb={};function Cb(){this.f="";this.h=Db;this.j=null}Cb.prototype.Sb=!0;Cb.prototype.Nb=function(){return this.f};function Eb(a){return a instanceof Cb&&a.constructor===Cb&&a.h===Db?a.f:"type_error:SafeHtml"}var Db={};function Fb(a,b){var c=new Cb;c.f=a;c.j=b;return c}Fb("<!DOCTYPE html>",0);Fb("",0);function Gb(a,b){var c;c=b instanceof xb?b:Bb(b);a.href=zb(c)};function Hb(a,b,c){a&&(a.dataset?a.dataset[Ib(b)]=c:a.setAttribute("data-"+b,c))}function B(a,b){return a?a.dataset?a.dataset[Ib(b)]:a.getAttribute("data-"+b):null}function Jb(a,b){a&&(a.dataset?delete a.dataset[Ib(b)]:a.removeAttribute("data-"+b))}var Kb={};function Ib(a){return Kb[a]||(Kb[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var Lb;a:{var Mb=m.navigator;if(Mb){var Nb=Mb.userAgent;if(Nb){Lb=Nb;break a}}Lb=""}function C(a){return-1!=Lb.indexOf(a)};function Ob(){return C("Opera")||C("OPR")}function Pb(){return(C("Chrome")||C("CriOS"))&&!Ob()&&!C("Edge")};function Qb(a){m.setTimeout(function(){throw a;},0)}var Rb;
function Sb(){var a=m.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!C("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=v(function(a){if(("*"==d||a.origin==d)&&a.data==
c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!C("Trident")&&!C("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(n(c.next)){c=c.next;var a=c.kc;c.kc=null;a()}};return function(a){d.next={kc:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(a){var b=document.createElement("SCRIPT");
b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){m.setTimeout(a,0)}};function Tb(a,b,c){this.o=c;this.j=a;this.l=b;this.h=0;this.f=null}Tb.prototype.get=function(){var a;0<this.h?(this.h--,a=this.f,this.f=a.next,a.next=null):a=this.j();return a};Tb.prototype.put=function(a){this.l(a);this.h<this.o&&(this.h++,a.next=this.f,this.f=a)};function Ub(){this.h=this.f=null}var Wb=new Tb(function(){return new Vb},function(a){a.reset()},100);Ub.prototype.remove=function(){var a=null;this.f&&(a=this.f,this.f=this.f.next,this.f||(this.h=null),a.next=null);return a};function Vb(){this.next=this.scope=this.f=null}Vb.prototype.reset=function(){this.next=this.scope=this.f=null};function Xb(a){Yb||Zb();$b||(Yb(),$b=!0);var b=ac,c=Wb.get();c.f=a;c.scope=void 0;c.next=null;b.h?b.h.next=c:b.f=c;b.h=c}var Yb;function Zb(){if(m.Promise&&m.Promise.resolve){var a=m.Promise.resolve(void 0);Yb=function(){a.then(bc)}}else Yb=function(){var a=bc;!ha(m.setImmediate)||m.Window&&m.Window.prototype&&!C("Edge")&&m.Window.prototype.setImmediate==m.setImmediate?(Rb||(Rb=Sb()),Rb(a)):m.setImmediate(a)}}var $b=!1,ac=new Ub;
function bc(){for(var a=null;a=ac.remove();){try{a.f.call(a.scope)}catch(b){Qb(b)}Wb.put(a)}$b=!1};function D(){this.La=this.La;this.W=this.W}D.prototype.La=!1;D.prototype.isDisposed=function(){return this.La};D.prototype.dispose=function(){this.La||(this.La=!0,this.G())};function cc(a,b){a.La?b.call(void 0):(a.W||(a.W=[]),a.W.push(n(void 0)?v(b,void 0):b))}D.prototype.G=function(){if(this.W)for(;this.W.length;)this.W.shift()()};function dc(a){a&&"function"==typeof a.dispose&&a.dispose()}function ec(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];ea(d)?ec.apply(null,d):dc(d)}};function F(a){D.call(this);this.o=1;this.h=[];this.j=0;this.f=[];this.ga={};this.l=Boolean(a)}x(F,D);g=F.prototype;g.subscribe=function(a,b,c){var d=this.ga[a];d||(d=this.ga[a]=[]);var e=this.o;this.f[e]=a;this.f[e+1]=b;this.f[e+2]=c;this.o=e+3;d.push(e);return e};g.unsubscribe=function(a,b,c){if(a=this.ga[a]){var d=this.f;if(a=Pa(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.oa(a)}return!1};
g.oa=function(a){var b=this.f[a];if(b){var c=this.ga[b];0!=this.j?(this.h.push(a),this.f[a+1]=t):(c&&Ua(c,a),delete this.f[a],delete this.f[a+1],delete this.f[a+2])}return!!b};
g.D=function(a,b){var c=this.ga[a];if(c){for(var d=Array(arguments.length-1),e=1,f=arguments.length;e<f;e++)d[e-1]=arguments[e];if(this.l)for(e=0;e<c.length;e++){var h=c[e];fc(this.f[h+1],this.f[h+2],d)}else{this.j++;try{for(e=0,f=c.length;e<f;e++)h=c[e],this.f[h+1].apply(this.f[h+2],d)}finally{if(this.j--,0<this.h.length&&0==this.j)for(;c=this.h.pop();)this.oa(c)}}return 0!=e}return!1};function fc(a,b,c){Xb(function(){a.apply(b,c)})}
g.clear=function(a){if(a){var b=this.ga[a];b&&(y(b,this.oa,this),delete this.ga[a])}else this.f.length=0,this.ga={}};g.Y=function(a){if(a){var b=this.ga[a];return b?b.length:0}a=0;for(b in this.ga)a+=this.Y(b);return a};g.G=function(){F.I.G.call(this);this.clear();this.h.length=0};var gc=window.yt&&window.yt.config_||window.ytcfg&&window.ytcfg.data_||{};p("yt.config_",gc,void 0);p("yt.tokens_",window.yt&&window.yt.tokens_||{},void 0);var hc=window.yt&&window.yt.msgs_||r("window.ytcfg.msgs")||{};p("yt.msgs_",hc,void 0);function ic(a){jc(gc,arguments)}function G(a,b){return a in gc?gc[a]:b}function H(a,b){ha(a)&&(a=kc(a));return window.setTimeout(a,b)}function lc(a,b){ha(a)&&(a=kc(a));window.setInterval(a,b)}function I(a){window.clearTimeout(a)}
function kc(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw mc(b),b;}}:a}function mc(a,b){var c=r("yt.logging.errors.log");c?c(a,b):(c=G("ERRORS")||[],c.push([a,b]),ic("ERRORS",c))}
function nc(){var a={},b="FLASH_UPGRADE"in hc?hc.FLASH_UPGRADE:'You need to upgrade your Adobe Flash Player to watchthis video. <br> <a href="http://get.adobe.com/flashplayer/">Download it from Adobe.</a>';if(b)for(var c in a)b=b.replace(new RegExp("\\$"+c,"gi"),function(){return a[c]});return b}function jc(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]}}var oc="Microsoft Internet Explorer"==navigator.appName;var pc=r("yt.pubsub.instance_")||new F;F.prototype.subscribe=F.prototype.subscribe;F.prototype.unsubscribeByKey=F.prototype.oa;F.prototype.publish=F.prototype.D;F.prototype.clear=F.prototype.clear;p("yt.pubsub.instance_",pc,void 0);var qc=r("yt.pubsub.subscribedKeys_")||{};p("yt.pubsub.subscribedKeys_",qc,void 0);var rc=r("yt.pubsub.topicToKeys_")||{};p("yt.pubsub.topicToKeys_",rc,void 0);var sc=r("yt.pubsub.isSynchronous_")||{};p("yt.pubsub.isSynchronous_",sc,void 0);
var tc=r("yt.pubsub.skipSubId_")||null;p("yt.pubsub.skipSubId_",tc,void 0);function uc(a,b,c){var d=vc();if(d){var e=d.subscribe(a,function(){if(!tc||tc!=e){var d=arguments,h=function(){qc[e]&&b.apply(c||window,d)};try{sc[a]?h():H(h,0)}catch(k){mc(k)}}},c);qc[e]=!0;rc[a]||(rc[a]=[]);rc[a].push(e);return e}return 0}function wc(a){var b=vc();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),y(a,function(a){b.unsubscribeByKey(a);delete qc[a]}))}
function J(a,b){var c=vc();return c?c.publish.apply(c,arguments):!1}function xc(a,b){sc[a]=!0;var c=vc();c&&c.publish.apply(c,arguments);sc[a]=!1}function yc(a){rc[a]&&(a=rc[a],y(a,function(a){qc[a]&&delete qc[a]}),a.length=0)}function zc(a){var b=vc();if(b)if(b.clear(a),a)yc(a);else for(var c in rc)yc(c)}function vc(){return r("yt.pubsub.instance_")};function Ac(a,b){if(window.spf){var c="";if(a){var d=a.indexOf("jsbin/"),e=a.lastIndexOf(".js"),f=d+6;-1<d&&-1<e&&e>f&&(c=a.substring(f,e),c=c.replace(Bc,""),c=c.replace(Cc,""),c=c.replace("debug-",""),c=c.replace("tracing-",""))}spf.script.load(a,c,b)}else Dc(a,b)}function Dc(a,b){var c=Ec(a),d=document.getElementById(c),e=d&&B(d,"loaded"),f=d&&!e;if(e)b&&b();else{if(b){var e=uc(c,b),h=""+ka(b);Fc[h]=e}f||(d=Gc(a,c,function(){B(d,"loaded")||(Hb(d,"loaded","true"),J(c),H(pa(zc,c),0))}))}}
function Gc(a,b,c){var d=document.createElement("script");d.id=b;d.onload=function(){c&&setTimeout(c,0)};d.onreadystatechange=function(){switch(d.readyState){case "loaded":case "complete":d.onload()}};d.src=a;a=document.getElementsByTagName("head")[0]||document.body;a.insertBefore(d,a.firstChild);return d}function Hc(a,b){if(a&&b){var c=""+ka(b);(c=Fc[c])&&wc(c)}}function Ec(a){var b=document.createElement("a");Gb(b,a);a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"js-"+Ja(a)}
var Bc=/\.vflset|-vfl[a-zA-Z0-9_+=-]+/,Cc=/-[a-zA-Z]{2,3}_[a-zA-Z]{2,3}(?=(\/|$))/,Fc={};var Ic=null;function Jc(){var a=G("BG_I",null),b=G("BG_IU",null),c=G("BG_P");b?Ac(b,function(){Ic=new botguard.bg(c)}):a&&(eval(a),Ic=new botguard.bg(c))}function Kc(){return null!=Ic}function Lc(){return Ic?Ic.invoke():null};function Mc(a){if(a.classList)return a.classList;a=a.className;return u(a)&&a.match(/\S+/g)||[]}function Nc(a,b){return a.classList?a.classList.contains(b):A(Mc(a),b)}function Oc(a,b){a.classList?a.classList.add(b):Nc(a,b)||(a.className+=0<a.className.length?" "+b:b)}function Pc(a,b){a.classList?a.classList.remove(b):Nc(a,b)&&(a.className=Ma(Mc(a),function(a){return a!=b}).join(" "))}function Qc(a,b,c){c?Oc(a,b):Pc(a,b)};function Rc(a,b){this.x=n(a)?a:0;this.y=n(b)?b:0}Rc.prototype.clone=function(){return new Rc(this.x,this.y)};Rc.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};Rc.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function Sc(a,b){this.width=a;this.height=b}Sc.prototype.clone=function(){return new Sc(this.width,this.height)};Sc.prototype.isEmpty=function(){return!(this.width*this.height)};Sc.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Sc.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Tc(){return C("iPhone")&&!C("iPod")&&!C("iPad")};var Uc=Ob(),K=C("Trident")||C("MSIE"),Vc=C("Edge"),Wc=C("Gecko")&&!(-1!=Lb.toLowerCase().indexOf("webkit")&&!C("Edge"))&&!(C("Trident")||C("MSIE"))&&!C("Edge"),Xc=-1!=Lb.toLowerCase().indexOf("webkit")&&!C("Edge"),Yc=C("Macintosh"),Zc=C("Windows");function $c(){var a=Lb;if(Wc)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Vc)return/Edge\/([\d\.]+)/.exec(a);if(K)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Xc)return/WebKit\/(\S+)/.exec(a)}
function ad(){var a=m.document;return a?a.documentMode:void 0}var bd=function(){if(Uc&&m.opera){var a;var b=m.opera.version;try{a=b()}catch(c){a=b}return a}a="";(b=$c())&&(a=b?b[1]:"");return K&&(b=ad(),b>parseFloat(a))?String(b):a}(),cd={};function dd(a){return cd[a]||(cd[a]=0<=Ha(bd,a))}var ed=m.document,fd=ed&&K?ad()||("CSS1Compat"==ed.compatMode?parseInt(bd,10):5):void 0;!Wc&&!K||K&&9<=fd||Wc&&dd("1.9.1");var gd=K&&!dd("9");function hd(a){return a?new id(jd(a)):qa||(qa=new id)}function kd(a){return u(a)?document.getElementById(a):a}function ld(a){var b=document;return u(a)?b.getElementById(a):a}function md(a){var b=document;return b.querySelectorAll&&b.querySelector?b.querySelectorAll("."+a):nd(a,void 0)}
function nd(a,b){var c,d,e,f;c=document;c=b||c;if(c.querySelectorAll&&c.querySelector&&a)return c.querySelectorAll(""+(a?"."+a:""));if(a&&c.getElementsByClassName){var h=c.getElementsByClassName(a);return h}h=c.getElementsByTagName("*");if(a){f={};for(d=e=0;c=h[d];d++){var k=c.className;"function"==typeof k.split&&A(k.split(/\s+/),a)&&(f[e++]=c)}f.length=e;return f}return h}
function od(a){var b=a.scrollingElement?a.scrollingElement:!Xc&&pd(a)?a.documentElement:a.body||a.documentElement;a=a.parentWindow||a.defaultView;return K&&dd("10")&&a.pageYOffset!=b.scrollTop?new Rc(b.scrollLeft,b.scrollTop):new Rc(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function pd(a){return"CSS1Compat"==a.compatMode}function qd(a){for(var b;b=a.firstChild;)a.removeChild(b)}
function rd(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function sd(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a}function jd(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
function td(a,b){if("textContent"in a)a.textContent=b;else if(3==a.nodeType)a.data=b;else if(a.firstChild&&3==a.firstChild.nodeType){for(;a.lastChild!=a.firstChild;)a.removeChild(a.lastChild);a.firstChild.data=b}else{qd(a);var c=jd(a);a.appendChild(c.createTextNode(String(b)))}}var ud={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vd={IMG:" ",BR:"\n"};
function wd(a){if(gd&&"innerText"in a)a=a.innerText.replace(/(\r\n|\r|\n)/g,"\n");else{var b=[];xd(a,b,!0);a=b.join("")}a=a.replace(/ \xAD /g," ").replace(/\xAD/g,"");a=a.replace(/\u200B/g,"");gd||(a=a.replace(/ +/g," "));" "!=a&&(a=a.replace(/^\s*/,""));return a}
function xd(a,b,c){if(!(a.nodeName in ud))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 vd)b.push(vd[a.nodeName]);else for(a=a.firstChild;a;)xd(a,b,c),a=a.nextSibling}function yd(a){var b=zd.ad;return b?Ad(a,function(a){return!b||u(a.className)&&A(a.className.split(/\s+/),b)},!0,void 0):null}function Ad(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 id(a){this.f=a||m.document||document}id.prototype.createElement=function(a){return this.f.createElement(a)};id.prototype.appendChild=function(a,b){a.appendChild(b)};id.prototype.contains=function(a,b){if(!a||!b)return!1;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};var Bd=Xc?"webkit":Wc?"moz":K?"ms":Uc?"o":"",Cd=r("yt.dom.getNextId_");if(!Cd){Cd=function(){return++Dd};p("yt.dom.getNextId_",Cd,void 0);var Dd=0}function Ed(){var a=document,b;Na(["fullscreenElement","fullScreenElement"],function(c){c in a?b=a[c]:(c=Bd+c.charAt(0).toUpperCase()+c.substr(1),b=c in a?a[c]:void 0);return!!b});return b};function Fd(a){this.type="";this.state=this.source=this.data=this.currentTarget=this.relatedTarget=this.target=null;this.charCode=this.keyCode=0;this.shiftKey=this.ctrlKey=this.altKey=!1;this.clientY=this.clientX=0;this.changedTouches=null;if(a=a||window.event){this.event=a;for(var b in a)b in Gd||(this[b]=a[b]);(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName?b:null}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}}Fd.prototype.preventDefault=function(){this.event&&(this.event.returnValue=!1,this.event.preventDefault&&this.event.preventDefault())};
var Gd={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1,webkitMovementX:1,webkitMovementY:1};var ob=r("yt.events.listeners_")||{};p("yt.events.listeners_",ob,void 0);var Hd=r("yt.events.counter_")||{count:0};p("yt.events.counter_",Hd,void 0);function Id(a,b,c,d){return nb(function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function L(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=Id(a,b,c,d);if(e)return e;var e=++Hd.count+"",f=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=f?function(d){d=new Fd(d);if(!Ad(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new Fd(b);b.currentTarget=a;return c.call(a,b)};h=kc(h);ob[e]=[a,b,c,h,d];a.addEventListener?"mouseenter"==b&&f?a.addEventListener("mouseover",
h,d):"mouseleave"==b&&f?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 Jd(a){a&&("string"==typeof a&&(a=[a]),y(a,function(a){if(a in ob){var c=ob[a],d=c[0],e=c[1],f=c[3],c=c[4];d.removeEventListener?d.removeEventListener(e,f,c):d.detachEvent&&d.detachEvent("on"+e,f);delete ob[a]}}))};function Kd(a,b){return Fb(b,null)};var Ld="StopIteration"in m?m.StopIteration:{message:"StopIteration",stack:""};function Md(){}Md.prototype.next=function(){throw Ld;};Md.prototype.ua=function(){return this};function Nd(a){if(a instanceof Md)return a;if("function"==typeof a.ua)return a.ua(!1);if(ea(a)){var b=0,c=new Md;c.next=function(){for(;;){if(b>=a.length)throw Ld;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function Od(a,b,c){if(ea(a))try{y(a,b,c)}catch(d){if(d!==Ld)throw d;}else{a=Nd(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(d){if(d!==Ld)throw d;}}}function Pd(a){if(ea(a))return Xa(a);a=Nd(a);var b=[];Od(a,function(a){b.push(a)});return b};function Qd(a,b){this.h={};this.f=[];this.Ea=this.j=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)Rd(this,arguments[d],arguments[d+1])}else if(a){a instanceof Qd?(c=a.qa(),d=a.U()):(c=kb(a),d=jb(a));for(var e=0;e<c.length;e++)Rd(this,c[e],d[e])}}g=Qd.prototype;g.Y=function(){return this.j};g.U=function(){Sd(this);for(var a=[],b=0;b<this.f.length;b++)a.push(this.h[this.f[b]]);return a};g.qa=function(){Sd(this);return this.f.concat()};
g.Za=function(a){for(var b=0;b<this.f.length;b++){var c=this.f[b];if(Td(this.h,c)&&this.h[c]==a)return!0}return!1};g.equals=function(a,b){if(this===a)return!0;if(this.j!=a.Y())return!1;var c=b||Ud;Sd(this);for(var d,e=0;d=this.f[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Ud(a,b){return a===b}g.isEmpty=function(){return 0==this.j};g.clear=function(){this.h={};this.Ea=this.j=this.f.length=0};
g.remove=function(a){return Td(this.h,a)?(delete this.h[a],this.j--,this.Ea++,this.f.length>2*this.j&&Sd(this),!0):!1};function Sd(a){if(a.j!=a.f.length){for(var b=0,c=0;b<a.f.length;){var d=a.f[b];Td(a.h,d)&&(a.f[c++]=d);b++}a.f.length=c}if(a.j!=a.f.length){for(var e={},c=b=0;b<a.f.length;)d=a.f[b],Td(e,d)||(a.f[c++]=d,e[d]=1),b++;a.f.length=c}}g.get=function(a,b){return Td(this.h,a)?this.h[a]:b};function Rd(a,b,c){Td(a.h,b)||(a.j++,a.f.push(b),a.Ea++);a.h[b]=c}
g.forEach=function(a,b){for(var c=this.qa(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};g.clone=function(){return new Qd(this)};g.ua=function(a){Sd(this);var b=0,c=this.Ea,d=this,e=new Md;e.next=function(){if(c!=d.Ea)throw Error("The map has changed since the iterator was created");if(b>=d.f.length)throw Ld;var e=d.f[b++];return a?e:d.h[e]};return e};function Td(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Vd(a){return a.Y&&"function"==typeof a.Y?a.Y():ea(a)||u(a)?a.length:fb(a)}function Wd(a){if(a.U&&"function"==typeof a.U)return a.U();if(u(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return jb(a)}function Xd(a){if(a.qa&&"function"==typeof a.qa)return a.qa();if(!a.U||"function"!=typeof a.U){if(ea(a)||u(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return kb(a)}}
function Yd(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(ea(a)||u(a))y(a,b,void 0);else for(var c=Xd(a),d=Wd(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}function Zd(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(ea(a)||u(a))return Oa(a,b,void 0);for(var c=Xd(a),d=Wd(a),e=d.length,f=0;f<e;f++)if(!b.call(void 0,d[f],c&&c[f],a))return!1;return!0};function $d(a){this.f=new Qd;if(a){a=Wd(a);for(var b=a.length,c=0;c<b;c++){var d=a[c];Rd(this.f,ae(d),d)}}}function ae(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+ka(a):b.substr(0,1)+a}g=$d.prototype;g.Y=function(){return this.f.Y()};g.removeAll=function(a){a=Wd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};g.remove=function(a){return this.f.remove(ae(a))};g.clear=function(){this.f.clear()};g.isEmpty=function(){return this.f.isEmpty()};
g.contains=function(a){a=ae(a);return Td(this.f.h,a)};g.U=function(){return this.f.U()};g.clone=function(){return new $d(this)};g.equals=function(a){return this.Y()==Vd(a)&&be(this,a)};function be(a,b){var c=Vd(b);if(a.Y()>c)return!1;!(b instanceof $d)&&5<c&&(b=new $d(b));return Zd(a,function(a){var c=b;return c.contains&&"function"==typeof c.contains?c.contains(a):c.Za&&"function"==typeof c.Za?c.Za(a):ea(c)||u(c)?A(c,a):ib(c,a)})}g.ua=function(){return this.f.ua(!1)};function ce(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+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);}function de(a){return eval("("+a+")")}function M(a){return ee(new fe(void 0),a)}function fe(a){this.f=a}
function ee(a,b){var c=[];ge(a,b,c);return c.join("")}
function ge(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(da(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],ge(a,a.f?a.f.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),he(d,c),c.push(":"),ge(a,a.f?a.f.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":he(b,
c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}}var ie={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},je=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function he(a,b){b.push('"',a.replace(je,function(a){var b=ie[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),ie[a]=b);return b}),'"')};var ke=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function le(a){return(a=a.match(ke)[3]||null)?decodeURI(a):a}function me(a,b){if(a)for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,h=null;0<=e?(f=c[d].substring(0,e),h=c[d].substring(e+1)):f=c[d];b(f,h?ta(h):"")}}
function ne(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 oe(a,b,c){if(da(b))for(var d=0;d<b.length;d++)oe(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function pe(a,b,c){for(c=c||0;c<b.length;c+=2)oe(b[c],b[c+1],a);return a}function qe(a,b){for(var c in b)oe(c,b[c],a);return a}
function re(a){a=qe([],a);a[0]="";return a.join("")}function se(a,b){return ne(2==arguments.length?pe([a],arguments[1],0):pe([a],arguments,1))}function te(a,b){return ne(qe([a],b))};function ue(a){"?"==a.charAt(0)&&(a=a.substr(1));a=a.split("&");for(var b={},c=0,d=a.length;c<d;c++){var e=a[c].split("=");if(1==e.length&&e[0]||2==e.length){var f=ta(e[0]||""),e=ta(e[1]||"");f in b?da(b[f])?Ya(b[f],e):b[f]=[b[f],e]:b[f]=e}}return b}function ve(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=ue(d[1]||""),e;for(e in b)d[e]=b[e];return te(a,d)+c}
function we(a){a=le(a);a=null===a?null:a.split(".").reverse();return(null===a?!1:"com"==a[0]&&a[1].match(/^youtube(?:-nocookie)?$/)?!0:!1)||(null===a?!1:"google"==a[1]?!0:"google"==a[2]?"au"==a[0]&&"com"==a[1]?!0:"uk"==a[0]&&"co"==a[1]?!0:!1:!1)};var xe=null;"undefined"!=typeof XMLHttpRequest?xe=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(xe=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function ye(a,b,c,d,e,f,h){function k(){4==(l&&"readyState"in l?l.readyState:0)&&b&&kc(b)(l)}var l=xe&&xe();if(!("open"in l))return null;"onloadend"in l?l.addEventListener("loadend",k,!1):l.onreadystatechange=k;c=(c||"GET").toUpperCase();d=d||"";l.open(c,a,!0);f&&(l.responseType=f);h&&(l.withCredentials=!0);f="POST"==c;if(e=ze(a,e))for(var q in e)l.setRequestHeader(q,e[q]),"content-type"==q.toLowerCase()&&(f=!1);f&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.send(d);return l}
function ze(a,b){b=b||{};for(var c in Ae){var d=G(Ae[c]),e;if(e=d){e=a;var f=void 0;f=window.location.href;var h=e.match(ke)[1]||null,k=le(e);h&&k?(e=e.match(ke),f=f.match(ke),e=e[3]==f[3]&&e[1]==f[1]&&e[4]==f[4]):e=k?le(f)==k&&(Number(f.match(ke)[4]||null)||null)==(Number(e.match(ke)[4]||null)||null):!0;e||(e=c,f=G("CORS_HEADER_WHITELIST")||{},e=(h=le(a))?(f=f[h])?A(f,e):!1:!0)}e&&(b[c]=d)}return b}
function Be(a,b){var c=G("XSRF_FIELD_NAME"),d;b.headers&&(d=b.headers["Content-Type"]);return!b.df&&(!le(a)||b.withCredentials||le(a)==document.location.hostname)&&"POST"==b.method&&(!d||"application/x-www-form-urlencoded"==d)&&!(b.R&&b.R[c])}
function Ce(a,b){var c=b.format||"JSON";b.ef&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=G("XSRF_FIELD_NAME"),e=G("XSRF_TOKEN"),f=b.ac;f&&(f[d]&&delete f[d],a=ve(a,f||{}));var h=b.postBody||"",f=b.R;Be(a,b)&&(f||(f={}),f[d]=e);f&&u(h)&&(d=ue(h),ub(d,f),h=re(d));var k=!1,l,q=ye(a,function(a){if(!k){k=!0;l&&I(l);var d;a:switch(a&&"status"in a?a.status:-1){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:d=
!0;break a;default:d=!1}var e=null;if(d||400<=a.status&&500>a.status)e=De(c,a,b.cf);if(d)a:{switch(c){case "XML":d=0==parseInt(e&&e.return_code,10);break a;case "RAW":d=!0;break a}d=!!e}var e=e||{},f=b.context||m;d?b.ca&&b.ca.call(f,a,e):b.onError&&b.onError.call(f,a,e);b.Wb&&b.Wb.call(f,a,e)}},b.method,h,b.headers,b.responseType,b.withCredentials);b.wb&&0<b.timeout&&(l=H(function(){k||(k=!0,q.abort(),I(l),b.wb.call(b.context||m,q))},b.timeout));return q}
function De(a,b,c){var d=null;switch(a){case "JSON":a=b.responseText;b=b.getResponseHeader("Content-Type")||"";a&&0<=b.indexOf("json")&&(d=de(a));break;case "XML":if(b=(b=b.responseXML)?Ee(b):null)d={},y(b.getElementsByTagName("*"),function(a){d[a.tagName]=Fe(a)})}c&&Ge(d);return d}
function Ge(a){if(ia(a))for(var b in a){var c;(c="html_content"==b)||(c=b.length-5,c=0<=c&&b.indexOf("_html",c)==c);c?a[b]=Kd(wb("HTML that is escaped and sanitized server-side and passed through yt.net.ajax"),a[b]):Ge(a[b])}}function Ee(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function Fe(a){var b="";y(a.childNodes,function(a){b+=a.nodeValue});return b}
var Ae={"X-YouTube-Client-Name":"INNERTUBE_CONTEXT_CLIENT_NAME","X-YouTube-Client-Version":"INNERTUBE_CONTEXT_CLIENT_VERSION","X-YouTube-Page-CL":"PAGE_CL","X-YouTube-Page-Label":"PAGE_BUILD_LABEL","X-YouTube-Variants-Checksum":"VARIANTS_CHECKSUM"};var He={},Ie=0;function Je(a,b){isNaN(b)&&(b=void 0);var c=r("yt.scheduler.instance.addJob");return c?c(a,0,b):void 0===b?(a(),NaN):H(a,b||0)}function Ke(a){return Je(a,5E3)};var Le=[],Me=!1;function Ne(){function a(){Me=!0;"google_ad_status"in window?ic("DCLKSTAT",1):ic("DCLKSTAT",2)}Ac("//static.doubleclick.net/instream/ad_status.js",a);Le.push(Ke(function(){Me||"google_ad_status"in window||(Hc("//static.doubleclick.net/instream/ad_status.js",a),ic("DCLKSTAT",3))}))}function Oe(){return parseInt(G("DCLKSTAT",0),10)};function Pe(){if(null==r("_lact",window)){var a=parseInt(G("LACT"),10),a=isFinite(a)?w()-Math.max(a,0):-1;p("_lact",a,window);-1==a&&Qe();L(document,"keydown",Qe);L(document,"keyup",Qe);L(document,"mousedown",Qe);L(document,"mouseup",Qe);uc("page-mouse",Qe);uc("page-scroll",Qe);uc("page-resize",Qe)}}function Qe(){null==r("_lact",window)&&(Pe(),r("_lact",window));var a=w();p("_lact",a,window);J("USER_ACTIVE")}function Re(){var a=r("_lact",window);return null==a?-1:Math.max(w()-a,0)};function Se(a){this.f=a}var Te=/\s*;\s*/;g=Se.prototype;g.isEnabled=function(){return navigator.cookieEnabled};function Ue(a,b,c,d,e,f){if(/[;=\s]/.test(b))throw Error('Invalid cookie name "'+b+'"');if(/[;\r\n]/.test(c))throw Error('Invalid cookie value "'+c+'"');n(d)||(d=-1);f=f?";domain="+f:"";e=e?";path="+e:"";d=0>d?"":0==d?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(w()+1E3*d)).toUTCString();a.f.cookie=b+"="+c+f+e+d+""}
g.get=function(a,b){for(var c=a+"=",d=(this.f.cookie||"").split(Te),e=0,f;f=d[e];e++){if(0==f.lastIndexOf(c,0))return f.substr(c.length);if(f==a)return""}return b};g.remove=function(a,b,c){var d=n(this.get(a));Ue(this,a,"",0,b,c);return d};g.qa=function(){return Ve(this).keys};g.U=function(){return Ve(this).values};g.isEmpty=function(){return!this.f.cookie};g.Y=function(){return this.f.cookie?(this.f.cookie||"").split(Te).length:0};
g.Za=function(a){for(var b=Ve(this).values,c=0;c<b.length;c++)if(b[c]==a)return!0;return!1};g.clear=function(){for(var a=Ve(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};function Ve(a){a=(a.f.cookie||"").split(Te);for(var b=[],c=[],d,e,f=0;e=a[f];f++)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,values:c}}var We=new Se(document);We.h=3950;function Xe(a,b,c){Ue(We,""+a,b,c,"/","youtube.com")};function Ye(a,b,c){var d=G("EVENT_ID");d&&(b||(b={}),b.ei||(b.ei=d));if(b){var d=G("VALID_SESSION_TEMPDATA_DOMAINS",[]),e=le(window.location.href);e&&d.push(e);e=le(a);if(A(d,e)||!e&&0==a.lastIndexOf("/",0)){var f=a.match(ke),d=f[5],e=f[6],f=f[7],h="";d&&(h+=d);e&&(h+="?"+e);f&&(h+="#"+f);d=h;e=d.indexOf("#");if(d=0>e?d:d.substr(0,e))d=G("SMALLER_SESSION_TEMPDATA_NAME")?"ST-"+Ja(d).toString(36):"s_tempdata-"+Ja(d),b=b?re(b):"",Xe(d,b,5)}}if(c)return!1;(window.ytspf||{}).enabled?spf.navigate(a):(c=
window.location,a=te(a,{})+"",a=a instanceof xb?a:Bb(a),c.href=zb(a));return!0};function Ze(a){a=a||{};this.url=a.url||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||rb($e);this.assets=a.assets||{};this.attrs=a.attrs||rb(af);this.params=a.params||rb(bf);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;this.messages=a.messages||{}}var $e={enablejsapi:1},af={},bf={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
function cf(a){a instanceof Ze||(a=new Ze(a));return a}Ze.prototype.clone=function(){var a=new Ze,b;for(b in this)if(this.hasOwnProperty(b)){var c=this[b];"object"==ca(c)?a[b]=rb(c):a[b]=c}return a};function df(a){df[" "](a);return a}df[" "]=t;var ef=!K||9<=fd,ff=K&&!dd("9");!Xc||dd("528");Wc&&dd("1.9b")||K&&dd("8")||Uc&&dd("9.5")||Xc&&dd("528");Wc&&!dd("8")||K&&dd("9");function gf(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=!1;this.Mc=!0}gf.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Mc=!1};function hf(a,b){gf.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.f=this.state=null;a&&this.init(a,b)}x(hf,gf);
hf.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(Wc){var f;a:{try{df(e.nodeName);f=!0;break a}catch(h){}f=!1}f||(e=null)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;null===d?(this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||
0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;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.metaKey=a.metaKey;this.state=a.state;this.f=a;a.defaultPrevented&&this.preventDefault()};
hf.prototype.preventDefault=function(){hf.I.preventDefault.call(this);var a=this.f;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,ff)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var jf="closure_listenable_"+(1E6*Math.random()|0),kf=0;function lf(a,b,c,d,e){this.listener=a;this.f=null;this.src=b;this.type=c;this.ob=!!d;this.sb=e;this.key=++kf;this.Va=this.nb=!1}function mf(a){a.Va=!0;a.listener=null;a.f=null;a.src=null;a.sb=null};function nf(a){this.src=a;this.f={};this.h=0}function of(a,b,c,d,e){var f=b.toString();b=a.f[f];b||(b=a.f[f]=[],a.h++);var h=pf(b,c,d,e);-1<h?(a=b[h],a.nb=!1):(a=new lf(c,a.src,f,!!d,e),a.nb=!1,b.push(a));return a}nf.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.f))return!1;var e=this.f[a];b=pf(e,b,c,d);return-1<b?(mf(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.f[a],this.h--),!0):!1};
function qf(a,b){var c=b.type;c in a.f&&Ua(a.f[c],b)&&(mf(b),0==a.f[c].length&&(delete a.f[c],a.h--))}nf.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.f)if(!a||c==a){for(var d=this.f[c],e=0;e<d.length;e++)++b,mf(d[e]);delete this.f[c];this.h--}return b};function rf(a,b,c,d,e){a=a.f[b.toString()];b=-1;a&&(b=pf(a,c,d,e));return-1<b?a[b]:null}function pf(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.Va&&f.listener==b&&f.ob==!!c&&f.sb==d)return e}return-1};var sf="closure_lm_"+(1E6*Math.random()|0),tf={},uf=0;
function vf(a,b,c,d,e){if(da(b)){for(var f=0;f<b.length;f++)vf(a,b[f],c,d,e);return null}c=wf(c);if(a&&a[jf])a=a.tb(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,h=xf(a);h||(a[sf]=h=new nf(a));c=of(h,b,c,d,e);if(!c.f){d=yf();c.f=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,f);else if(a.attachEvent)a.attachEvent(zf(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");uf++}a=c}return a}
function yf(){var a=Af,b=ef?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b}function Bf(a,b,c,d,e){if(da(b))for(var f=0;f<b.length;f++)Bf(a,b[f],c,d,e);else c=wf(c),a&&a[jf]?a.$b(b,c,d,e):a&&(a=xf(a))&&(b=rf(a,b,c,!!d,e))&&Cf(b)}
function Cf(a){if(!ga(a)&&a&&!a.Va){var b=a.src;if(b&&b[jf])qf(b.Ba,a);else{var c=a.type,d=a.f;b.removeEventListener?b.removeEventListener(c,d,a.ob):b.detachEvent&&b.detachEvent(zf(c),d);uf--;(c=xf(b))?(qf(c,a),0==c.h&&(c.src=null,b[sf]=null)):mf(a)}}}function zf(a){return a in tf?tf[a]:tf[a]="on"+a}function Df(a,b,c,d){var e=!0;if(a=xf(a))if(b=a.f[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.ob==c&&!f.Va&&(f=Ef(f,d),e=e&&!1!==f)}return e}
function Ef(a,b){var c=a.listener,d=a.sb||a.src;a.nb&&Cf(a);return c.call(d,b)}
function Af(a,b){if(a.Va)return!0;if(!ef){var c=b||r("window.event"),d=new hf(c,this),e=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){a:{var f=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(l){f=!0}if(f||void 0==c.returnValue)c.returnValue=!0}c=[];for(f=d.currentTarget;f;f=f.parentNode)c.push(f);for(var f=a.type,h=c.length-1;0<=h;h--){d.currentTarget=c[h];var k=Df(c[h],f,!0,d),e=e&&k}for(h=0;h<c.length;h++)d.currentTarget=c[h],k=Df(c[h],f,!1,d),e=e&&k}return e}return Ef(a,new hf(b,this))}
function xf(a){a=a[sf];return a instanceof nf?a:null}var Ff="__closure_events_fn_"+(1E9*Math.random()>>>0);function wf(a){if(ha(a))return a;a[Ff]||(a[Ff]=function(b){return a.handleEvent(b)});return a[Ff]};function Gf(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}Gf.prototype.clone=function(){return new Gf(this.top,this.right,this.bottom,this.left)};Gf.prototype.contains=function(a){return this&&a?a instanceof Gf?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};
Gf.prototype.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};Gf.prototype.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};function Hf(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}Hf.prototype.clone=function(){return new Hf(this.left,this.top,this.width,this.height)};Hf.prototype.contains=function(a){return a instanceof Hf?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};
Hf.prototype.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};Hf.prototype.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};function If(a,b){var c=jd(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function Jf(a,b){return If(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function Kf(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}K&&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 Lf(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
function Mf(a){var b=Nf;if("none"!=Jf(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=f;c.visibility=e;return a}function Nf(a){var b=a.offsetWidth,c=a.offsetHeight,d=Xc&&!b&&!c;return n(b)&&!d||!a.getBoundingClientRect?new Sc(b,c):(a=Kf(a),new Sc(a.right-a.left,a.bottom-a.top))}
function Of(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var e=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return e}function Pf(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Of(a,c):0}var Qf={thin:2,medium:4,thick:6};
function Rf(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 Qf?Qf[c]:Of(a,c)};var Sf=C("Firefox"),Tf=Tc()||C("iPod"),Uf=C("iPad"),Vf=C("Android")&&!(Pb()||C("Firefox")||Ob()||C("Silk")),Wf=Pb(),Xf=C("Safari")&&!(Pb()||C("Coast")||Ob()||C("Edge")||C("Silk")||C("Android"))&&!(Tc()||C("iPad")||C("iPod"));function Yf(){var a;if(a=We.get("PREF",void 0)){a=unescape(a).split("&");for(var b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(Zf[d]=c.toString())}}}ba(Yf);var Zf=r("yt.prefs.UserPrefs.prefs_")||{};p("yt.prefs.UserPrefs.prefs_",Zf,void 0);function $f(a){if(/^f([1-9][0-9]*)$/.test(a))throw"ExpectedRegexMatch: "+a;}function ag(a){if(!/^\w+$/.test(a))throw"ExpectedRegexMismatch: "+a;}
function bg(a){a=void 0!==Zf[a]?Zf[a].toString():null;return null!=a&&/^[A-Fa-f0-9]+$/.test(a)?parseInt(a,16):null}Yf.prototype.get=function(a,b){ag(a);$f(a);var c=void 0!==Zf[a]?Zf[a].toString():null;return null!=c?c:b?b:""};function cg(a,b){return!!((bg("f"+(Math.floor(b/31)+1))||0)&1<<b%31)}Yf.prototype.remove=function(a){ag(a);$f(a);delete Zf[a]};Yf.prototype.clear=function(){Zf={}};function dg(a,b){(a=kd(a))&&a.style&&(a.style.display=b?"":"none",Qc(a,"hid",!b))}function eg(a){y(arguments,function(a){!ea(a)||a instanceof Element?dg(a,!0):y(a,function(a){eg(a)})})}function fg(a){y(arguments,function(a){!ea(a)||a instanceof Element?dg(a,!1):y(a,function(a){fg(a)})})};function gg(){this.j=this.h=this.f=0;this.o="";var a=r("window.navigator.plugins"),b=r("window.navigator.mimeTypes"),a=a&&a["Shockwave Flash"],b=b&&b["application/x-shockwave-flash"],b=a&&b&&b.enabledPlugin&&a.description||"";if(a=b){var c=a.indexOf("Shockwave Flash");0<=c&&(a=a.substr(c+15));for(var c=a.split(" "),d="",a="",e=0,f=c.length;e<f;e++)if(d)if(a)break;else a=c[e];else d=c[e];d=d.split(".");c=parseInt(d[0],10)||0;d=parseInt(d[1],10)||0;e=0;if("r"==a.charAt(0)||"d"==a.charAt(0))e=parseInt(a.substr(1),
10)||0;a=[c,d,e]}else a=[0,0,0];this.o=b;b=a;this.f=b[0];this.h=b[1];this.j=b[2];if(0>=this.f){var h,k,l,q;if(oc)try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(E){h=null}else l=document.body,q=document.createElement("object"),q.setAttribute("type","application/x-shockwave-flash"),h=l.appendChild(q);if(h&&"GetVariable"in h)try{k=h.GetVariable("$version")}catch(E){k=""}l&&q&&l.removeChild(q);(h=k||"")?(h=h.split(" ")[1].split(","),h=[parseInt(h[0],10)||0,parseInt(h[1],10)||0,parseInt(h[2],
10)||0]):h=[0,0,0];this.f=h[0];this.h=h[1];this.j=h[2]}}ba(gg);function hg(a,b,c,d){b="string"==typeof b?b.split("."):[b,c,d];b[0]=parseInt(b[0],10)||0;b[1]=parseInt(b[1],10)||0;b[2]=parseInt(b[2],10)||0;return a.f>b[0]||a.f==b[0]&&a.h>b[1]||a.f==b[0]&&a.h==b[1]&&a.j>=b[2]}function ig(a){return-1<a.o.indexOf("Gnash")&&-1==a.o.indexOf("AVM2")||9==a.f&&1==a.h||9==a.f&&0==a.h&&1==a.j?!1:9<=a.f}function jg(a){return Zc?!hg(a,11,2):Yc?!hg(a,11,3):!ig(a)};function kg(a,b,c){if(b){a=u(a)?ld(a):a;var d=rb(c.attrs);d.tabindex=0;var e=rb(c.params);e.flashvars=re(c.args);if(oc){d.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";e.movie=b;b=document.createElement("object");for(var f in d)b.setAttribute(f,d[f]);for(f in e)d=document.createElement("param"),d.setAttribute("name",f),d.setAttribute("value",e[f]),b.appendChild(d)}else{d.type="application/x-shockwave-flash";d.src=b;b=document.createElement("embed");b.setAttribute("name",d.id);for(f in d)b.setAttribute(f,
d[f]);for(f in e)b.setAttribute(f,e[f])}e=document.createElement("div");e.appendChild(b);a.innerHTML=e.innerHTML}}
function lg(a,b,c){if(a&&a.attrs&&a.attrs.id){a=cf(a);var d=!!b,e=kd(a.attrs.id),f=e?e.parentNode:null;if(e&&f){if(window!=window.top){var h=null;if(document.referrer){var k=document.referrer.substring(0,128);we(k)||(h=k)}else h="unknown";h&&(d=!0,a.args.framer=h)}h=gg.getInstance();if(hg(h,a.minVersion)){var k=mg(a,h),l="";-1<navigator.userAgent.indexOf("Sony/COM2")||(l=e.getAttribute("src")||e.movie);(l!=k||d)&&kg(f,k,a);jg(h)&&ng()}else og(f,a,h);c&&c()}else H(function(){lg(a,b,c)},50)}}
function og(a,b,c){0==c.f&&b.fallback?b.fallback():0==c.f&&b.fallbackMessage?b.fallbackMessage():a.innerHTML='<div id="flash-upgrade">'+nc()+"</div>"}function mg(a,b){return ig(b)&&a.url||(-1<navigator.userAgent.indexOf("Sony/COM2")&&!hg(b,9,1,58)?!1:!0)&&a.urlV9As2||a.url}function ng(){var a=kd("flash10-promo-div"),b=cg(Yf.getInstance(),107);a&&!b&&eg(a)};function pg(a){if(window.spf){var b=a.match(qg);spf.style.load(a,b?b[1]:"",void 0)}else rg(a)}function rg(a){var b=sg(a),c=document.getElementById(b),d=c&&B(c,"loaded");d||c&&!d||(c=tg(a,b,function(){B(c,"loaded")||(Hb(c,"loaded","true"),J(b),H(pa(zc,b),0))}))}function tg(a,b,c){var d=document.createElement("link");d.id=b;d.rel="stylesheet";d.onload=function(){c&&setTimeout(c,0)};Gb(d,a);(document.getElementsByTagName("head")[0]||document.body).appendChild(d);return d}
function sg(a){var b=document.createElement("a");Gb(b,a);a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"css-"+Ja(a)}var qg=/cssbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-2x|-web|-rtl|-vfl|.css)/;var ug;var vg=Lb,vg=vg.toLowerCase();if(-1!=vg.indexOf("android")){var wg=vg.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(wg)ug=Number(wg[1]);else{var xg={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},yg=vg.match("("+kb(xg).join("|")+")");ug=yg?xg[yg[0]]:0}}else ug=void 0;var zg=Tf||Uf;var Ag=['video/mp4; codecs="avc1.42001E, mp4a.40.2"','video/webm; codecs="vp8.0, vorbis"'],Bg=['audio/mp4; codecs="mp4a.40.2"'];function Cg(a,b){this.h=this.F=this.o="";this.B=null;this.l=this.f="";this.A=!1;var c;a instanceof Cg?(this.A=n(b)?b:a.A,Dg(this,a.o),this.F=a.F,Eg(this,a.h),Fg(this,a.B),this.f=a.f,Gg(this,a.j.clone()),this.l=a.l):a&&(c=String(a).match(ke))?(this.A=!!b,Dg(this,c[1]||"",!0),this.F=Hg(c[2]||""),Eg(this,c[3]||"",!0),Fg(this,c[4]),this.f=Hg(c[5]||"",!0),Gg(this,c[6]||"",!0),this.l=Hg(c[7]||"")):(this.A=!!b,this.j=new Ig(null,0,this.A))}
Cg.prototype.toString=function(){var a=[],b=this.o;b&&a.push(Jg(b,Kg,!0),":");var c=this.h;if(c||"file"==b)a.push("//"),(b=this.F)&&a.push(Jg(b,Kg,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.B,null!=c&&a.push(":",String(c));if(c=this.f)this.h&&"/"!=c.charAt(0)&&a.push("/"),a.push(Jg(c,"/"==c.charAt(0)?Lg:Mg,!0));(c=this.j.toString())&&a.push("?",c);(c=this.l)&&a.push("#",Jg(c,Ng));return a.join("")};
Cg.prototype.resolve=function(a){var b=this.clone(),c=!!a.o;c?Dg(b,a.o):c=!!a.F;c?b.F=a.F:c=!!a.h;c?Eg(b,a.h):c=null!=a.B;var d=a.f;if(c)Fg(b,a.B);else if(c=!!a.f){if("/"!=d.charAt(0))if(this.h&&!this.f)d="/"+d;else{var e=b.f.lastIndexOf("/");-1!=e&&(d=b.f.substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],h=0;h<e.length;){var k=e[h++];"."==k?d&&h==e.length&&f.push(""):".."==k?((1<f.length||1==f.length&&
""!=f[0])&&f.pop(),d&&h==e.length&&f.push("")):(f.push(k),d=!0)}d=f.join("/")}else d=e}c?b.f=d:c=""!==a.j.toString();c?Gg(b,Hg(a.j.toString())):c=!!a.l;c&&(b.l=a.l);return b};Cg.prototype.clone=function(){return new Cg(this)};function Dg(a,b,c){a.o=c?Hg(b,!0):b;a.o&&(a.o=a.o.replace(/:$/,""))}function Eg(a,b,c){a.h=c?Hg(b,!0):b}function Fg(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.B=b}else a.B=null}
function Gg(a,b,c){b instanceof Ig?(a.j=b,Og(a.j,a.A)):(c||(b=Jg(b,Pg)),a.j=new Ig(b,0,a.A))}function N(a,b,c){a=a.j;Qg(a);a.j=null;b=Rg(a,b);Sg(a,b)&&(a.h-=a.f.get(b).length);Rd(a.f,b,[c]);a.h++}function Tg(a,b,c){da(c)||(c=[String(c)]);Ug(a.j,b,c)}function Vg(a){N(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^w()).toString(36));return a}function Wg(a){return a instanceof Cg?a.clone():new Cg(a,void 0)}
function Xg(a,b,c,d){var e=new Cg(null,void 0);a&&Dg(e,a);b&&Eg(e,b);c&&Fg(e,c);d&&(e.f=d);return e}function Hg(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function Jg(a,b,c){return u(a)?(a=encodeURI(a).replace(b,Yg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Yg(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Kg=/[#\/\?@]/g,Mg=/[\#\?:]/g,Lg=/[\#\?]/g,Pg=/[\#\?@]/g,Ng=/#/g;
function Ig(a,b,c){this.h=this.f=null;this.j=a||null;this.o=!!c}function Qg(a){a.f||(a.f=new Qd,a.h=0,a.j&&me(a.j,function(b,c){var d=ta(b);Qg(a);a.j=null;var d=Rg(a,d),e=a.f.get(d);e||Rd(a.f,d,e=[]);e.push(c);a.h++}))}g=Ig.prototype;g.Y=function(){Qg(this);return this.h};g.remove=function(a){Qg(this);a=Rg(this,a);return Td(this.f.h,a)?(this.j=null,this.h-=this.f.get(a).length,this.f.remove(a)):!1};g.clear=function(){this.f=this.j=null;this.h=0};g.isEmpty=function(){Qg(this);return 0==this.h};
function Sg(a,b){Qg(a);b=Rg(a,b);return Td(a.f.h,b)}g.Za=function(a){var b=this.U();return A(b,a)};g.qa=function(){Qg(this);for(var a=this.f.U(),b=this.f.qa(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};g.U=function(a){Qg(this);var b=[];if(u(a))Sg(this,a)&&(b=Wa(b,this.f.get(Rg(this,a))));else{a=this.f.U();for(var c=0;c<a.length;c++)b=Wa(b,a[c])}return b};g.get=function(a,b){var c=a?this.U(a):[];return 0<c.length?String(c[0]):b};
function Ug(a,b,c){a.remove(b);0<c.length&&(a.j=null,Rd(a.f,Rg(a,b),Xa(c)),a.h+=c.length)}g.toString=function(){if(this.j)return this.j;if(!this.f)return"";for(var a=[],b=this.f.qa(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.U(d),f=0;f<d.length;f++){var h=e;""!==d[f]&&(h+="="+encodeURIComponent(String(d[f])));a.push(h)}return this.j=a.join("&")};g.clone=function(){var a=new Ig;a.j=this.j;this.f&&(a.f=this.f.clone(),a.h=this.h);return a};
function Rg(a,b){var c=String(b);a.o&&(c=c.toLowerCase());return c}function Og(a,b){b&&!a.o&&(Qg(a),a.j=null,a.f.forEach(function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),Ug(this,e,a))},a));a.o=b};var Zg="corp.google.com googleplex.com youtube.com youtube-nocookie.com youtubeeducation.com borg.google.com prod.google.com sandbox.google.com books.googleusercontent.com docs.google.com drive.google.com mail.google.com photos.google.com plus.google.com lh2.google.com picasaweb.google.com play.google.com googlevideo.com talkgadget.google.com survey.g.doubleclick.net youtube.googleapis.com vevo.com".split(" "),$g="";
function ah(a){return a&&a==$g?!0:(new RegExp("^(https?:)?//([a-z0-9-]{1,63}\\.)*("+Zg.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i")).test(a)?($g=a,!0):!1};var bh={},ch=0,dh=r("yt.net.ping.workerUrl_")||null;p("yt.net.ping.workerUrl_",dh,void 0);function eh(a){try{window.navigator&&window.navigator.sendBeacon&&window.navigator.sendBeacon(a,"")||a&&fh(a)}catch(b){a&&fh(a)}}function fh(a){var b=new Image,c=""+ch++;bh[c]=b;b.onload=b.onerror=function(){delete bh[c]};b.src=a};function O(a,b){this.version=a;this.args=b}function gh(a){if(!a.Ea){var b={};a.call(b);a.Ea=b.version}return a.Ea}
function hh(a,b){function c(){a.apply(this,b.args)}if(!b.args||!b.version)throw Error("yt.pubsub2.Data.deserialize(): serializedData is incomplete.");var d;try{d=gh(a)}catch(e){}if(!d||b.version!=d)throw Error("yt.pubsub2.Data.deserialize(): serializedData version is incompatible.");c.prototype=a.prototype;try{return new c}catch(e){throw e.message="yt.pubsub2.Data.deserialize(): "+e.message,e;}}function P(a,b){this.topic=a;this.f=b}P.prototype.toString=function(){return this.topic};var ih=r("yt.pubsub2.instance_")||new F;F.prototype.subscribe=F.prototype.subscribe;F.prototype.unsubscribeByKey=F.prototype.oa;F.prototype.publish=F.prototype.D;F.prototype.clear=F.prototype.clear;p("yt.pubsub2.instance_",ih,void 0);var jh=r("yt.pubsub2.subscribedKeys_")||{};p("yt.pubsub2.subscribedKeys_",jh,void 0);var kh=r("yt.pubsub2.topicToKeys_")||{};p("yt.pubsub2.topicToKeys_",kh,void 0);var lh=r("yt.pubsub2.isAsync_")||{};p("yt.pubsub2.isAsync_",lh,void 0);
p("yt.pubsub2.skipSubKey_",null,void 0);function Q(a,b){var c=mh();c&&c.publish.call(c,a.toString(),a,b)}
function nh(a,b,c){var d=mh();if(!d)return 0;var e=d.subscribe(a.toString(),function(d,h){if(!window.yt.pubsub2.skipSubKey_||window.yt.pubsub2.skipSubKey_!=e){var k=function(){if(jh[e])try{if(h&&a instanceof P&&a!=d)try{h=hh(a.f,h)}catch(k){throw k.message="yt.pubsub2 cross-binary conversion error for "+a.toString()+": "+k.message,k;}b.call(c||window,h)}catch(k){mc(k)}};lh[a.toString()]?r("yt.scheduler.instance")?Je(k,void 0):H(k,0):k()}});jh[e]=!0;kh[a.toString()]||(kh[a.toString()]=[]);kh[a.toString()].push(e);
return e}function oh(a){var b=mh();b&&(ga(a)&&(a=[a]),y(a,function(a){b.unsubscribeByKey(a);delete jh[a]}))}function mh(){return r("yt.pubsub2.instance_")};function ph(a){O.call(this,1,arguments)}x(ph,O);var qh=new P("timing-sent",ph);var R=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{},rh=v(R.clearResourceTimings||R.webkitClearResourceTimings||R.mozClearResourceTimings||R.msClearResourceTimings||R.oClearResourceTimings||t,R),sh=R.mark?function(a){R.mark(a)}:t;
function th(a){uh().tick[a]=w();sh(a);var b=G("TIMING_ACTION");a=uh().tick;if(r("yt.timing.ready_")&&b&&a._start&&vh()){var b=!0,c=G("TIMING_WAIT",[]);if(c.length)for(var d=0,e=c.length;d<e;++d)if(!(c[d]in a)){b=!1;break}if(b)if(c=uh().tick,a=uh().span,d=uh().info,b=r("yt.timing.reportbuilder_")){if(b=b(c,a,d,void 0))wh(b),xh()}else{b={v:2,s:G("CSI_SERVICE_NAME","youtube"),action:G("TIMING_ACTION")};R.now&&R.timing&&(e=R.timing.navigationStart+R.now(),e=Math.round(w()-e),d.yt_hrd=e);var e=G("TIMING_INFO")||
{},f;for(f in e)d[f]=e[f];f=d.srt;delete d.srt;var h;f||0===f||(h=R.timing||{},f=Math.max(0,h.responseStart-h.navigationStart),isNaN(f)&&d.pt&&(f=d.pt));if(f||0===f)d.srt=f;d.h5jse&&(e=window.location.protocol+r("ytplayer.config.assets.js"),(e=R.getEntriesByName?R.getEntriesByName(e)[0]:null)?d.h5jse=Math.round(d.h5jse-e.responseEnd):delete d.h5jse);c.aft=vh();e=c._start;if("cold"==d.yt_lt){h||(h=R.timing||{});var k;a:if(k=h,k.msFirstPaint)k=Math.max(0,k.msFirstPaint);else{var l=window.chrome;if(l&&
(l=l.loadTimes,ha(l))){var l=l(),q=1E3*Math.min(l.requestTime||Infinity,l.startLoadTime||Infinity),q=Infinity===q?0:k.navigationStart-q;k=Math.max(0,Math.round(1E3*l.firstPaintTime+q)||0);break a}k=0}0<k&&k>e&&(c.fpt=k);k=a||uh().span;l=h.redirectEnd-h.redirectStart;0<l&&(k.rtime_=l);l=h.domainLookupEnd-h.domainLookupStart;0<l&&(k.dns_=l);l=h.connectEnd-h.connectStart;0<l&&(k.tcp_=l);l=h.connectEnd-h.secureConnectionStart;h.secureConnectionStart>=h.navigationStart&&0<l&&(k.stcp_=l);l=h.responseStart-
h.requestStart;0<l&&(k.req_=l);l=h.responseEnd-h.responseStart;0<l&&(k.rcv_=l);R.getEntriesByType&&yh(c)}(h=G("PREVIOUS_ACTION"))&&(d.pa=h);d.p=G("CLIENT_PROTOCOL")||"unknown";d.t=G("CLIENT_TRANSPORT")||"unknown";window.navigator&&window.navigator.sendBeacon&&(d.ba=1);for(var E in d)"_"!=E.charAt(0)&&(b[E]=d[E]);c.ps=w();E={};h=[];for(var fa in c)"_"!=fa.charAt(0)&&(k=Math.max(Math.round(c[fa]-e),0),E[fa]=k,h.push(fa+"."+k));b.rt=h.join(",");fa=b;h=[];for(var ra in a)"_"!=ra.charAt(0)&&h.push(ra+
"."+a[ra]);fa.it=h.join(",");(ra=r("ytdebug.logTiming"))&&ra(b,E,a);xh();G("EXP_DEFER_CSI_PING")?(zh(),p("yt.timing.deferredPingArgs_",b,void 0),ra=H(zh,0),p("yt.timing.deferredPingTimer_",ra,void 0)):wh(b);Q(qh,new ph(E.aft+(f||0)))}}}function xh(){Ah();rh();p("yt.timing.pingSent_",!1,void 0)}function vh(){var a=uh().tick;if(a.aft)return a.aft;for(var b=G("TIMING_AFT_KEYS",["ol"]),c=b.length,d=0;d<c;d++){var e=a[b[d]];if(e)return e}return NaN}
function Bh(a){return Math.round(R.timing.navigationStart+a)}
function yh(a){var b=window.location.protocol,c=R.getEntriesByType("resource"),d=c.filter(function(a){return 0==a.name.indexOf(b+"//fonts.googleapis.com/css?family=")})[0],c=c.filter(function(a){return 0==a.name.indexOf(b+"//fonts.gstatic.com/s/")}).reduce(function(a,b){return b.duration>a.duration?b:a},{duration:0});d&&0<d.startTime&&0<d.responseEnd&&(a.wfcs=Bh(d.startTime),a.wfce=Bh(d.responseEnd));c&&0<c.startTime&&0<c.responseEnd&&(a.wffs=Bh(c.startTime),a.wffe=Bh(c.responseEnd))}
function wh(a){if(G("DEBUG_CSI_DATA")){var b=r("yt.timing.csiData");b||(b=[],p("yt.timing.csiData",b,void 0));b.push({page:location.href,time:new Date,args:a})}G("EXP_DEFER_CSI_PING")&&(I(r("yt.timing.deferredPingTimer_")),p("yt.timing.deferredPingArgs_",null,void 0));var c="https:"==window.location.protocol?"https://gg.google.com/csi":"http://csi.gstatic.com/csi",b="",d;for(d in a)b+="&"+d+"="+a[d];a=c+"?"+b.substring(1);b=G("CSI_LOG_WITH_YT")?"/csi_204?"+b.substring(1):null;window.navigator&&window.navigator.sendBeacon?
(eh(a),b&&eh(b)):(a&&fh(a),b&&b&&fh(b));p("yt.timing.pingSent_",!0,void 0)}function zh(a){if(G("EXP_DEFER_CSI_PING")){var b=r("yt.timing.deferredPingArgs_");b&&(a&&(b.yt_fss=a),wh(b))}}function uh(){return r("ytcsi.data_")||Ah()}function Ah(){var a={tick:{},span:{},info:{}};p("ytcsi.data_",a,void 0);return a};var Ch={"api.invalidparam":2,auth:150,"drm.auth":150,heartbeat:150,"html5.unsupportedads":5,"fmt.noneavailable":5,"fmt.decode":5,"fmt.unplayable":5,"html5.missingapi":5,"drm.unavailable":5};function Dh(a,b){D.call(this);this.l=this.J=a;this.S=b;this.F=!1;this.h={};this.Na=this.P=null;this.ha=new F;cc(this,pa(dc,this.ha));this.o={};this.A=this.Oa=this.j=this.Gb=this.f=null;this.ra=!1;this.K=this.B=this.Fb=this.O=null;this.lb={};this.jd=["onReady"];this.ya=[];this.Hb=null;this.hc=0;this.sa={};Eh(this);this.va("onDetailedError",v(this.Ud,this));this.va("onTabOrderChange",v(this.md,this));this.va("onTabAnnounce",v(this.ic,this));this.va("WATCH_LATER_VIDEO_ADDED",v(this.Vd,this));this.va("WATCH_LATER_VIDEO_REMOVED",
v(this.Wd,this));this.va("onMouseWheelCapture",v(this.Rd,this));this.va("onMouseWheelRelease",v(this.Sd,this));this.va("onAdAnnounce",v(this.ic,this));this.Ma=!1;this.dc=Wf||Sf;this.ta=this.Z=null;vf(this.J,"mousewheel",this.zc,!1,this);vf(this.J,"wheel",this.zc,!1,this)}x(Dh,D);var Fh=["drm.unavailable","fmt.noneavailable","html5.missingapi","html5.unsupportedads","html5.unsupportedlive"];g=Dh.prototype;g.cc=function(a,b){this.isDisposed()||(Gh(this,a),b||Hh(this),Ih(this,b),this.F&&Jh(this))};
function Gh(a,b){a.Gb=b;a.f=b.clone();a.j=a.f.attrs.id||a.j;"video-player"==a.j&&(a.j=a.S,a.f.attrs.id=a.S);a.l.id==a.j&&(a.j+="-player",a.f.attrs.id=a.j);a.f.args.enablejsapi="1";a.f.args.playerapiid=a.S;a.Oa||(a.Oa=Kh(a,a.f.args.jsapicallback||"onYouTubePlayerReady"));a.f.args.jsapicallback=null;var c=a.f.attrs.width;c&&(a.l.style.width=Lf(Number(c)||c,!0));if(c=a.f.attrs.height)a.l.style.height=Lf(Number(c)||c,!0)}g.wd=function(){return this.Gb};
function Jh(a){a.f.loaded||(a.f.loaded=!0,"0"!=a.f.args.autoplay?a.h.loadVideoByPlayerVars(a.f.args):a.h.cueVideoByPlayerVars(a.f.args))}function Lh(a){if(!n(a.f.disable.flash)){var b=a.f.disable,c;c=hg(gg.getInstance(),a.f.minVersion);b.flash=!c}return!a.f.disable.flash}
function Hh(a){var b;if(!(b=!a.f.html5&&Lh(a))){if(!n(a.f.disable.html5)){var c;b=!0;void 0!=a.f.args.deviceHasDisplay&&(b=a.f.args.deviceHasDisplay);if(2.2==ug)c=!0;else{a:{var d=b;b=r("yt.player.utils.videoElement_");b||(b=document.createElement("video"),p("yt.player.utils.videoElement_",b,void 0));try{if(b.canPlayType)for(var d=d?Ag:Bg,e=0;e<d.length;e++)if(b.canPlayType(d[e])){c=null;break a}c="fmt.noneavailable"}catch(f){c="html5.missingapi"}}c=!c}c&&(c=Mh(a)||a.f.assets.js);a.f.disable.html5=
!c;c||(a.f.args.html5_unavailable="1")}b=!!a.f.disable.html5}return b?Lh(a)?"flash":"unsupported":"html5"}function Nh(a,b){if(!b||(5!=(Ch[b.errorCode]||5)?0:-1!=Fh.indexOf(b.errorCode))){var c=Oh(a);c&&c.stopVideo&&c.stopVideo();if(Lh(a)){var d=a.f;c&&c.getUpdatedConfigurationData&&(c=c.getUpdatedConfigurationData(),d=cf(c));d.args.autoplay=1;d.args.html5_unavailable="1";Gh(a,d);Ih(a,"flash")}}}function Ih(a,b){a.isDisposed()||(b||(b=Hh(a)),("flash"==b?a.Ee:"html5"==b?a.Fe:a.Ge).call(a))}
function Mh(a){var b=!0,c=Oh(a);c&&a.f&&(a=a.f,b=B(c,"version")==a.assets.js);return b&&!!r("yt.player.Application.create")}g.Fe=function(){if(!this.ra){var a=Mh(this);a&&"html5"==Ph(this)?(this.A="html5",this.F||this.Ua()):(Qh(this),this.A="html5",a&&this.Fb?(this.J.appendChild(this.Fb),this.Ua()):(this.f.loaded=!0,this.O=v(function(){var a=this.J,c=this.f.clone();r("yt.player.Application.create")(a,c);this.Ua()},this),this.ra=!0,a?this.O():(Ac(this.f.assets.js,this.O),pg(this.f.assets.css))))}};
g.Ee=function(){var a=this.f.clone();if(!this.B){var b=Oh(this);b&&(this.B=document.createElement("span"),this.B.tabIndex=0,this.ya.push(L(this.B,"focus",v(this.wc,this))),this.K=document.createElement("span"),this.K.tabIndex=0,this.ya.push(L(this.K,"focus",v(this.wc,this))),b.parentNode&&b.parentNode.insertBefore(this.B,b),b.parentNode&&b.parentNode.insertBefore(this.K,b.nextSibling))}a.attrs.width=a.attrs.width||"100%";a.attrs.height=a.attrs.height||"100%";if("flash"==Ph(this))this.A="flash",this.F||
lg(a,!1,v(this.Ua,this));else{Qh(this);this.A="flash";this.f.loaded=!0;b=this.J;b=u(b)?ld(b):b;a=cf(a);if(window!=window.top){var c=null;document.referrer&&(c=document.referrer.substring(0,128));a.args.framer=c}c=gg.getInstance();hg(c,a.minVersion)?(c=mg(a,c),kg(b,c,a)):og(b,a,c);this.Ua()}};g.wc=function(){Oh(this).focus()};function Oh(a){var b=kd(a.j);!b&&a.l&&a.l.querySelector&&(b=a.l.querySelector("#"+a.j));return b}
g.Ua=function(){if(!this.isDisposed()){var a=Oh(this),b=!1;try{a&&a.getApiInterface&&a.getApiInterface()&&(b=!0)}catch(f){}if(b)if(this.ra=!1,a.isNotServable&&a.isNotServable(this.f.args.video_id))Nh(this);else{Eh(this);this.F=!0;a=Oh(this);a.addEventListener&&(this.P=Rh(this,a,"addEventListener"));a.removeEventListener&&(this.Na=Rh(this,a,"removeEventListener"));for(var b=a.getApiInterface(),b=b.concat(a.getInternalApiInterface()),c=0;c<b.length;c++){var d=b[c];this.h[d]||(this.h[d]=Rh(this,a,d))}for(var e in this.o)this.P(e,
this.o[e]);Jh(this);this.Oa&&this.Oa(this.h);this.ha.D("onReady",this.h)}else this.hc=H(v(this.Ua,this),50)}};function Rh(a,b,c){var d=b[c];return function(){try{return a.Hb=null,d.apply(b,arguments)}catch(e){"Bad NPObject as private data!"!=e.message&&"sendAbandonmentPing"!=c&&(e.message+=" ("+c+")",a.Hb=e,mc(e,"WARNING"))}}}
function Eh(a){a.F=!1;if(a.Na)for(var b in a.o)a.Na(b,a.o[b]);for(var c in a.sa)I(parseInt(c,10));a.sa={};a.P=null;a.Na=null;for(var d in a.h)a.h[d]=null;a.h.addEventListener=v(a.va,a);a.h.removeEventListener=v(a.pe,a);a.h.destroy=v(a.dispose,a);a.h.getLastError=v(a.xd,a);a.h.getPlayerType=v(a.yd,a);a.h.getCurrentVideoConfig=v(a.wd,a);a.h.loadNewVideoConfig=v(a.cc,a);a.h.isReady=v(a.Re,a)}g.Re=function(){return this.F};
g.va=function(a,b){if(!this.isDisposed()){var c=Kh(this,b);if(c){if(!A(this.jd,a)&&!this.o[a]){var d=Sh(this,a);this.P&&this.P(a,d)}this.ha.subscribe(a,c);"onReady"==a&&this.F&&H(pa(c,this.h),0)}}};g.pe=function(a,b){if(!this.isDisposed()){var c=Kh(this,b);c&&this.ha.unsubscribe(a,c)}};function Kh(a,b){var c=b;if("string"==typeof b){if(a.lb[b])return a.lb[b];c=function(){var a=r(b);a&&a.apply(m,arguments)};a.lb[b]=c}return c?c:null}
function Sh(a,b){var c="ytPlayer"+b+a.S;a.o[b]=c;m[c]=function(c){var e=H(function(){if(!a.isDisposed()){a.ha.D(b,c);var f=a.sa,h=String(e);h in f&&delete f[h]}},0);qb(a.sa,String(e))};return c}g.md=function(a){a=a?sd:rd;for(var b=a(document.activeElement);b&&(1!=b.nodeType||b==this.B||b==this.K||(b.focus(),b!=document.activeElement));)b=a(b)};g.ic=function(a){J("a11y-announce",a)};g.Ud=function(a){Nh(this,a)};g.Vd=function(a){J("WATCH_LATER_VIDEO_ADDED",a)};
g.Wd=function(a){J("WATCH_LATER_VIDEO_REMOVED",a)};g.Rd=function(){this.dc&&(this.Ma||(this.ta=od(document)),this.Z||(this.Z=vf(window,"scroll",this.ke,!1,this)));this.Ma=!0};g.Sd=function(){this.Z&&(Cf(this.Z),this.Z=null);this.Ma=!1};g.zc=function(a){this.Ma&&!this.dc&&a.preventDefault()};g.ke=function(){this.ta&&window.scrollTo(this.ta.x,this.ta.y)};
g.Ge=function(){Qh(this);this.A="unsupported";var a='Adobe Flash Player or an HTML5 supported browser is required for video playback. <br> <a href="http://get.adobe.com/flashplayer/">Get the latest Flash Player</a> <br> <a href="/html5">Learn more about upgrading to an HTML5 browser</a>',b=navigator.userAgent.match(/Version\/(\d).*Safari/);b&&5<=parseInt(b[1],10)&&(a='Adobe Flash Player or QuickTime is required for video playback. <br> <a href="http://get.adobe.com/flashplayer/"> Get the latest Flash Player</a> <br> <a href="http://www.apple.com/quicktime/download/">Get the latest version of QuickTime</a>');
b=this.f.messages.player_fallback||a;a=kd("player-unavailable");if(kd("unavailable-submessage")&&a){kd("unavailable-submessage").innerHTML=b;var b=a||document,c=null;b.getElementsByClassName?c=b.getElementsByClassName("icon")[0]:b.querySelectorAll&&b.querySelector?c=b.querySelector(".icon"):c=nd("icon",a)[0];if(c=b=c||null)c=b?b.dataset?Ib("icon")in b.dataset:b.hasAttribute?!!b.hasAttribute("data-icon"):!!b.getAttribute("data-icon"):!1;c&&(b.src=B(b,"icon"));a.style.display="";Oc(kd("player"),"off-screen-trigger")}};
g.yd=function(){return this.A||Ph(this)};g.xd=function(){return this.Hb};function Ph(a){return(a=Oh(a))?"div"==a.tagName.toLowerCase()?"html5":"flash":null}function Qh(a){th("dcp");a.cancel();Eh(a);a.A=null;a.f&&(a.f.loaded=!1);var b=Oh(a);"html5"==Ph(a)?a.Fb=b:b&&b.destroy&&b.destroy();qd(a.J);Jd(a.ya);a.ya.length=0;a.B=null;a.K=null}g.cancel=function(){this.O&&Hc(this.f.assets.js,this.O);I(this.hc);this.ra=!1};
g.G=function(){Qh(this);this.lb=null;for(var a in this.o)m[this.o[a]]=null;this.h=null;delete this.J;delete this.l;this.f&&(this.Gb=this.f=this.f.fallback=null);Dh.I.G.call(this)};var Th={},Uh="player_uid_"+(1E9*Math.random()>>>0);function Vh(a,b){a=u(a)?ld(a):a;b=cf(b);var c=Uh+"_"+ka(a),d=Th[c];if(d)return d.cc(b),d.h;d=new Dh(a,c);Th[c]=d;J("player-added",d.h);cc(d,pa(Wh,d));H(function(){d.cc(b)},0);return d.h}function Wh(a){Th[a.S]=null}function Xh(a){a=kd(a);if(!a)return null;var b=Uh+"_"+ka(a),c=Th[b];c||(c=new Dh(a,b),Th[b]=c);return c.h};var Yh=r("yt.abuse.botguardInitialized")||Kc;p("yt.abuse.botguardInitialized",Yh,void 0);var Zh=r("yt.abuse.invokeBotguard")||Lc;p("yt.abuse.invokeBotguard",Zh,void 0);var $h=r("yt.abuse.dclkstatus.checkDclkStatus")||Oe;p("yt.abuse.dclkstatus.checkDclkStatus",$h,void 0);var ai=r("yt.player.exports.navigate")||Ye;p("yt.player.exports.navigate",ai,void 0);var bi=r("yt.player.embed")||Vh;p("yt.player.embed",bi,void 0);var ci=r("yt.player.getPlayerByElement")||Xh;p("yt.player.getPlayerByElement",ci,void 0);
var di=r("yt.util.activity.init")||Pe;p("yt.util.activity.init",di,void 0);var ei=r("yt.util.activity.getTimeSinceActive")||Re;p("yt.util.activity.getTimeSinceActive",ei,void 0);var fi=r("yt.util.activity.setTimestamp")||Qe;p("yt.util.activity.setTimestamp",fi,void 0);function gi(a){O.call(this,1,arguments);this.f=a}x(gi,O);function hi(a){O.call(this,1,arguments);this.f=a}x(hi,O);function ii(a,b){O.call(this,1,arguments);this.f=a;this.isEnabled=b}x(ii,O);function ji(a,b,c,d,e){O.call(this,2,arguments);this.h=a;this.f=b;this.o=c||null;this.j=d||null;this.source=e||null}x(ji,O);function ki(a,b,c){O.call(this,1,arguments);this.f=a;this.subscriptionId=b}x(ki,O);
function li(a,b,c,d,e,f,h){O.call(this,1,arguments);this.h=a;this.subscriptionId=b;this.f=c;this.l=d||null;this.o=e||null;this.j=f||null;this.source=h||null}x(li,O);
var mi=new P("subscription-batch-subscribe",gi),ni=new P("subscription-batch-unsubscribe",gi),oi=new P("subscription-pref-email",ii),pi=new P("subscription-subscribe",ji),qi=new P("subscription-subscribe-loading",hi),ri=new P("subscription-subscribe-loaded",hi),si=new P("subscription-subscribe-success",ki),ti=new P("subscription-subscribe-external",ji),ui=new P("subscription-unsubscribe",li),vi=new P("subscription-unsubscirbe-loading",hi),wi=new P("subscription-unsubscribe-loaded",hi),xi=new P("subscription-unsubscribe-success",
hi),yi=new P("subscription-external-unsubscribe",li),zi=new P("subscription-enable-ypc",hi),Ai=new P("subscription-disable-ypc",hi);function Bi(a,b){var c=document.location.protocol+"//"+document.domain+"/post_login";b&&(c=se(c,"mode",b));c=se("/signin?context=popup","next",c);c=se(c,"feature","sub_button");if(c=window.open(c,"loginPopup","width=375,height=440,resizable=yes,scrollbars=yes",!0)){var d=uc("LOGGED_IN",function(b){wc(G("LOGGED_IN_PUBSUB_KEY"));ic("LOGGED_IN",!0);a(b)});ic("LOGGED_IN_PUBSUB_KEY",d);c.moveTo((screen.width-375)/2,(screen.height-440)/2)}}p("yt.pubsub.publish",J,void 0);function Ci(){var a=G("PLAYER_CONFIG");return a&&a.args&&void 0!==a.args.authuser?!0:!(!G("SESSION_INDEX")&&!G("LOGGED_IN"))};var Di={},Ei="ontouchstart"in document;function Fi(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Ad(c,function(a){return Nc(a,b)},!0,d)}
function Gi(a){var b="mouseover"==a.type&&"mouseenter"in Di||"mouseout"==a.type&&"mouseleave"in Di,c=a.type in Di||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=Di[b],d;for(d in c.ga){var e=Fi(b,d,a.target);e&&!Ad(a.relatedTarget,function(a){return a==e},!0)&&c.D(d,e,b,a)}}if(b=Di[a.type])for(d in b.ga)(e=Fi(a.type,d,a.target))&&b.D(d,e,a.type,a)}}L(document,"blur",Gi,!0);L(document,"change",Gi,!0);L(document,"click",Gi);L(document,"focus",Gi,!0);
L(document,"mouseover",Gi);L(document,"mouseout",Gi);L(document,"mousedown",Gi);L(document,"keydown",Gi);L(document,"keyup",Gi);L(document,"keypress",Gi);L(document,"cut",Gi);L(document,"paste",Gi);Ei&&(L(document,"touchstart",Gi),L(document,"touchend",Gi),L(document,"touchcancel",Gi));function Hi(a){this.j=a;this.o={};this.Jc=[];this.l=[]}function S(a,b){return"yt-uix"+(a.j?"-"+a.j:"")+(b?"-"+b:"")}Hi.prototype.init=t;Hi.prototype.dispose=t;function Ii(a,b,c){a.l.push(nh(b,c,a))}function Ji(a,b,c){var d=S(a,void 0),e=v(c,a);b in Di||(Di[b]=new F);Di[b].subscribe(d,e);a.o[c]=e}function Ki(a,b){Hb(a,"tooltip-text",b)};function Li(){Hi.call(this,"tooltip");this.f=0;this.h={}}x(Li,Hi);ba(Li);g=Li.prototype;g.register=function(){Ji(this,"mouseover",this.Vb);Ji(this,"mouseout",this.fb);Ji(this,"focus",this.vd);Ji(this,"blur",this.ld);Ji(this,"click",this.fb);Ji(this,"touchstart",this.Ce);Ji(this,"touchend",this.Rc);Ji(this,"touchcancel",this.Rc)};g.dispose=function(){for(var a in this.h)this.fb(this.h[a]);this.h={}};
g.Vb=function(a){if(!(this.f&&1E3>w()-this.f)){var b=parseInt(B(a,"tooltip-hide-timer"),10);b&&(Jb(a,"tooltip-hide-timer"),I(b));var b=v(function(){Mi(this,a);Jb(a,"tooltip-show-timer")},this),c=parseInt(B(a,"tooltip-show-delay"),10)||0,b=H(b,c);Hb(a,"tooltip-show-timer",b.toString());a.title&&(Ki(a,Ni(a)),a.title="");b=ka(a).toString();this.h[b]=a}};
g.fb=function(a){var b=parseInt(B(a,"tooltip-show-timer"),10);b&&(I(b),Jb(a,"tooltip-show-timer"));b=v(function(){if(a){var b=kd(Oi(this,a));b&&(Pi(b),b&&b.parentNode&&b.parentNode.removeChild(b),Jb(a,"content-id"));(b=kd(Oi(this,a,"arialabel")))&&b.parentNode&&b.parentNode.removeChild(b)}Jb(a,"tooltip-hide-timer")},this);b=H(b,50);Hb(a,"tooltip-hide-timer",b.toString());if(b=B(a,"tooltip-text"))a.title=b;b=ka(a).toString();delete this.h[b]};g.vd=function(a){this.f=0;this.Vb(a)};
g.ld=function(a){this.f=0;this.fb(a)};g.Ce=function(a,b,c){c.changedTouches&&(this.f=0,a=Fi(b,S(this),c.changedTouches[0].target),this.Vb(a))};g.Rc=function(a,b,c){c.changedTouches&&(this.f=w(),a=Fi(b,S(this),c.changedTouches[0].target),this.fb(a))};function Qi(a,b){Ki(a,b);var c=B(a,"content-id");(c=kd(c))&&td(c,b)}function Ni(a){return B(a,"tooltip-text")||a.title}
function Mi(a,b){if(b){var c=Ni(b);if(c){var d=kd(Oi(a,b));if(!d){d=document.createElement("div");d.id=Oi(a,b);d.className=S(a,"tip");var e=document.createElement("div");e.className=S(a,"tip-body");var f=document.createElement("div");f.className=S(a,"tip-arrow");var h=document.createElement("div");h.setAttribute("aria-hidden","true");h.className=S(a,"tip-content");var k=Ri(a,b),l=Oi(a,b,"content");h.id=l;Hb(b,"content-id",l);e.appendChild(h);k&&d.appendChild(k);d.appendChild(e);d.appendChild(f);var l=
wd(b),q=Oi(a,b,"arialabel"),f=document.createElement("div");Oc(f,S(a,"arialabel"));f.id=q;"rtl"==document.body.getAttribute("dir")?td(f,c+" "+l):td(f,l+" "+c);b.setAttribute("aria-labelledby",q);l=Ed()||document.body;l.appendChild(f);l.appendChild(d);Qi(b,c);(c=parseInt(B(b,"tooltip-max-width"),10))&&e.offsetWidth>c&&(e.style.width=c+"px",Oc(h,S(a,"normal-wrap")));h=Nc(b,S(a,"reverse"));Si(a,b,d,e,k,h)||Si(a,b,d,e,k,!h);var E=S(a,"tip-visible");H(function(){Oc(d,E)},0)}}}}
function Si(a,b,c,d,e,f){Qc(c,S(a,"tip-reverse"),f);var h=0;f&&(h=1);a=Mf(b);f=new Rc((a.width-10)/2,f?a.height:0);var k=jd(b),l=new Rc(0,0),q;q=k?jd(k):document;var E;(E=!K||9<=fd)||(E=hd(q),E=pd(E.f));b!=(E?q.documentElement:q.body)&&(q=Kf(b),k=hd(k),k=od(k.f),l.x=q.left+k.x,l.y=q.top+k.y);f=new Rc(l.x+f.x,l.y+f.y);f=f.clone();l=(h&4&&"rtl"==Jf(c,"direction")?h^2:h)&-5;h=Mf(c);k=h.clone();q=f.clone();k=k.clone();0!=l&&(l&2&&(q.x-=k.width+0),l&1&&(q.y-=k.height+0));f=new Hf(0,0,0,0);f.left=q.x;f.top=
q.y;f.width=k.width;f.height=k.height;k=new Rc(f.left,f.top);k instanceof Rc?(l=k.x,k=k.y):(l=k,k=void 0);c.style.left=Lf(l,!1);c.style.top=Lf(k,!1);k=new Sc(f.width,f.height);if(!(h==k||h&&k&&h.width==k.width&&h.height==k.height))if(h=k,f=jd(c),f=hd(f),l=pd(f.f),!K||dd("10")||l&&dd("8"))f=c.style,Wc?f.MozBoxSizing="border-box":Xc?f.WebkitBoxSizing="border-box":f.boxSizing="border-box",f.width=Math.max(h.width,0)+"px",f.height=Math.max(h.height,0)+"px";else if(f=c.style,l){K?(l=Pf(c,"paddingLeft"),
k=Pf(c,"paddingRight"),q=Pf(c,"paddingTop"),E=Pf(c,"paddingBottom"),l=new Gf(q,k,E,l)):(l=If(c,"paddingLeft"),k=If(c,"paddingRight"),q=If(c,"paddingTop"),E=If(c,"paddingBottom"),l=new Gf(parseFloat(q),parseFloat(k),parseFloat(E),parseFloat(l)));if(!K||9<=fd)k=If(c,"borderLeftWidth"),q=If(c,"borderRightWidth"),E=If(c,"borderTopWidth"),fa=If(c,"borderBottomWidth"),k=new Gf(parseFloat(E),parseFloat(q),parseFloat(fa),parseFloat(k));else{k=Rf(c,"borderLeft");q=Rf(c,"borderRight");E=Rf(c,"borderTop");var fa=
Rf(c,"borderBottom"),k=new Gf(E,q,fa,k)}f.pixelWidth=h.width-k.left-l.left-l.right-k.right;f.pixelHeight=h.height-k.top-l.top-l.bottom-k.bottom}else f.pixelWidth=h.width,f.pixelHeight=h.height;h=window.document;h=pd(h)?h.documentElement:h.body;f=new Sc(h.clientWidth,h.clientHeight);1==c.nodeType?(c=Kf(c),k=new Rc(c.left,c.top)):(c=c.changedTouches?c.changedTouches[0]:c,k=new Rc(c.clientX,c.clientY));c=Mf(d);q=Math.floor(c.width/2);h=!!(f.height<k.y+a.height);a=!!(k.y<a.height);l=!!(k.x<q);f=!!(f.width<
k.x+q);k=(c.width+3)/-2- -5;b=B(b,"force-tooltip-direction");if("left"==b||l)k=-5;else if("right"==b||f)k=20-c.width-3;b=Math.floor(k)+"px";d.style.left=b;e&&(e.style.left=b,e.style.height=c.height+"px",e.style.width=c.width+"px");return!(h||a)}function Oi(a,b,c){a=S(a);var d=b.__yt_uid_key;d||(d=Cd(),b.__yt_uid_key=d);b=a+d;c&&(b+="-"+c);return b}
function Ri(a,b){var c=null;Zc&&Nc(b,S(a,"masked"))&&((c=kd("yt-uix-tooltip-shared-mask"))?(c.parentNode.removeChild(c),eg(c)):(c=document.createElement("iframe"),c.src='javascript:""',c.id="yt-uix-tooltip-shared-mask",c.className=S(a,"tip-mask")));return c}function Pi(a){var b=kd("yt-uix-tooltip-shared-mask"),c=b&&Ad(b,function(b){return b==a},!1,2);b&&c&&(b.parentNode.removeChild(b),fg(b),document.body.appendChild(b))};function Ti(){Hi.call(this,"subscription-button")}x(Ti,Hi);ba(Ti);Ti.prototype.register=function(){Ji(this,"click",this.oc);Ii(this,qi,this.yc);Ii(this,ri,this.xc);Ii(this,si,this.de);Ii(this,vi,this.yc);Ii(this,wi,this.xc);Ii(this,xi,this.ie);Ii(this,zi,this.Qd);Ii(this,Ai,this.Pd)};
var zd={ec:"hover-enabled",Zc:"yt-uix-button-subscribe",$c:"yt-uix-button-subscribed",Te:"ypc-enabled",ad:"yt-uix-button-subscription-container",bd:"yt-subscription-button-disabled-mask-container"},Ui={Ue:"channel-external-id",cd:"subscriber-count-show-when-subscribed",ed:"subscriber-count-tooltip",fd:"subscriber-count-title",Ve:"href",fc:"is-subscribed",Xe:"parent-url",Ze:"clicktracking",gd:"style-type",gc:"subscription-id",bf:"target",hd:"ypc-enabled"};g=Ti.prototype;
g.oc=function(a){var b=B(a,"href"),c=Ci();if(b)a=B(a,"target")||"_self",window.open(b,a);else if(c){var b=B(a,"channel-external-id"),c=B(a,"clicktracking"),d;if(B(a,"ypc-enabled")){d=B(a,"ypc-item-type");var e=B(a,"ypc-item-id");d={itemType:d,itemId:e,subscriptionElement:a}}else d=null;e=B(a,"parent-url");if(B(a,"is-subscribed")){var f=B(a,"subscription-id");Q(ui,new li(b,f,d,a,c,e))}else Q(pi,new ji(b,d,c,e))}else Vi(this,a)};g.yc=function(a){this.Pa(a.f,this.Oc,!0)};
g.xc=function(a){this.Pa(a.f,this.Oc,!1)};g.de=function(a){this.Pa(a.f,this.Pc,!0,a.subscriptionId)};g.ie=function(a){this.Pa(a.f,this.Pc,!1)};g.Qd=function(a){this.Pa(a.f,this.pd)};g.Pd=function(a){this.Pa(a.f,this.od)};g.Pc=function(a,b,c){b?(Hb(a,Ui.fc,"true"),c&&Hb(a,Ui.gc,c)):(Jb(a,Ui.fc),Jb(a,Ui.gc));Wi(a)};g.Oc=function(a,b){var c;c=yd(a);Qc(c,zd.bd,b);a.setAttribute("aria-busy",b?"true":"false");a.disabled=b};
function Wi(a){var b=B(a,Ui.gd),c=!!B(a,"is-subscribed"),b="-"+b,d=zd.$c+b;Qc(a,zd.Zc+b,!c);Qc(a,d,c);B(a,Ui.ed)&&!B(a,Ui.cd)&&(b=S(Li.getInstance()),Qc(a,b,!c),a.title=c?"":B(a,Ui.fd));c?H(function(){Oc(a,zd.ec)},1E3):Pc(a,zd.ec)}g.pd=function(a){var b=!!B(a,"ypc-item-type"),c=!!B(a,"ypc-item-id");!B(a,"ypc-enabled")&&b&&c&&(Oc(a,"ypc-enabled"),Hb(a,Ui.hd,"true"))};g.od=function(a){B(a,"ypc-enabled")&&(Pc(a,"ypc-enabled"),Jb(a,"ypc-enabled"))};
function Xi(a,b){var c=md(S(a));return Ma(c,function(a){return b==B(a,"channel-external-id")},a)}g.kd=function(a,b,c){var d=$a(arguments,2);y(a,function(a){b.apply(this,Wa(a,d))},this)};g.Pa=function(a,b,c){var d=Xi(this,a),d=Wa([d],$a(arguments,1));this.kd.apply(this,d)};function Vi(a,b){var c=v(function(a){a.discoverable_subscriptions&&ic("SUBSCRIBE_EMBED_DISCOVERABLE_SUBSCRIPTIONS",a.discoverable_subscriptions);this.oc(b)},a);Bi(c,"subscribe")};var Yi=window.yt&&window.yt.uix&&window.yt.uix.widgets_||{};p("yt.uix.widgets_",Yi,void 0);function Zi(a,b){this.source=null;this.o=a||null;this.origin="*";this.B=window.document.location.protocol+"//"+window.document.location.hostname;this.l=b;this.j=this.f=this.h=this.sourceId=null;L(window,"message",v(this.A,this))}
Zi.prototype.A=function(a){var b=this.l||G("POST_MESSAGE_ORIGIN")||this.B;if("*"!=b&&a.origin!=b)window.console&&window.console.warn("Untrusted origin: "+a.origin);else if(!this.o||a.source==this.o)if(this.source=a.source,this.origin="null"==a.origin?this.origin:a.origin,a=a.data,u(a)){try{a=ce(a)}catch(c){return}this.sourceId=a.id;switch(a.event){case "listening":this.f&&(this.f(),this.f=null);break;case "command":this.h&&(this.j&&!A(this.j,a.func)||this.h(a.func,a.args))}}};
Zi.prototype.sendMessage=function(a){this.source&&(a.id=this.sourceId,a=M(a),this.source.postMessage(a,this.origin))};function $i(){};function aj(){}x(aj,$i);aj.prototype.Y=function(){var a=0;Od(this.ua(!0),function(){a++});return a};aj.prototype.clear=function(){var a=Pd(this.ua(!0)),b=this;y(a,function(a){b.remove(a)})};function bj(a){this.f=a}x(bj,aj);g=bj.prototype;g.isAvailable=function(){if(!this.f)return!1;try{return this.f.setItem("__sak","1"),this.f.removeItem("__sak"),!0}catch(a){return!1}};g.zd=function(a,b){try{this.f.setItem(a,b)}catch(c){if(0==this.f.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};g.get=function(a){a=this.f.getItem(a);if(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.f.removeItem(a)};
g.Y=function(){return this.f.length};g.ua=function(a){var b=0,c=this.f,d=new Md;d.next=function(){if(b>=c.length)throw Ld;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};g.clear=function(){this.f.clear()};g.key=function(a){return this.f.key(a)};function cj(){var a=null;try{a=window.localStorage||null}catch(b){}this.f=a}x(cj,bj);function dj(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.f=a}x(dj,bj);function ej(a){this.f=a}ej.prototype.h=function(a,b){n(b)?this.f.zd(a,M(b)):this.f.remove(a)};ej.prototype.get=function(a){var b;try{b=this.f.get(a)}catch(c){return}if(null!==b)try{return ce(b)}catch(c){throw"Storage: Invalid value was encountered";}};ej.prototype.remove=function(a){this.f.remove(a)};function fj(a){this.f=a}x(fj,ej);function gj(a){this.data=a}function hj(a){return!n(a)||a instanceof gj?a:new gj(a)}fj.prototype.h=function(a,b){fj.I.h.call(this,a,hj(b))};fj.prototype.j=function(a){a=fj.I.get.call(this,a);if(!n(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};fj.prototype.get=function(a){if(a=this.j(a)){if(a=a.data,!n(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function ij(a){this.f=a}x(ij,fj);function jj(a){var b=a.creation;a=a.expiration;return!!a&&a<w()||!!b&&b>w()}ij.prototype.h=function(a,b,c){if(b=hj(b)){if(c){if(c<w()){ij.prototype.remove.call(this,a);return}b.expiration=c}b.creation=w()}ij.I.h.call(this,a,b)};ij.prototype.j=function(a,b){var c=ij.I.j.call(this,a);if(c)if(!b&&jj(c))ij.prototype.remove.call(this,a);else return c};function kj(a){this.f=a}x(kj,ij);function lj(a,b){var c=[];Od(b,function(a){var b;try{b=kj.prototype.j.call(this,a,!0)}catch(f){if("Storage: Invalid value was encountered"==f)return;throw f;}n(b)?jj(b)&&c.push(a):c.push(a)},a);return c}function mj(a,b){var c=lj(a,b);y(c,function(a){kj.prototype.remove.call(this,a)},a)}function nj(){var a=oj;mj(a,a.f.ua(!0))};function T(a,b,c){var d=c&&0<c?c:0;c=d?w()+1E3*d:0;if((d=d?oj:pj)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.h(a,b,c)}catch(e){d.remove(a)}}}function U(a){if(!pj&&!oj||!window.JSON)return null;var b;try{b=pj.get(a)}catch(c){}if(!u(b))try{b=oj.get(a)}catch(c){}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(c){}return b}function qj(a){pj&&pj.remove(a);oj&&oj.remove(a)}var oj,rj=new cj;oj=rj.isAvailable()?new kj(rj):null;var pj,sj=new dj;pj=sj.isAvailable()?new kj(sj):null;function tj(a){return(0==a.search("cue")||0==a.search("load"))&&"loadModule"!=a}function uj(a,b,c){u(a)&&(a={mediaContentUrl:a,startSeconds:b,suggestedQuality:c});b=a;c=/\/([ve]|embed)\/([^#?]+)/.exec(a.mediaContentUrl);b.videoId=c&&c[2]?c[2]:null;return vj(a)}
function vj(a,b,c){if(ia(a)){b="endSeconds startSeconds mediaContentUrl suggestedQuality videoId two_stage_token".split(" ");c={};for(var d=0;d<b.length;d++){var e=b[d];a[e]&&(c[e]=a[e])}return c}return{videoId:a,startSeconds:b,suggestedQuality:c}}
function wj(a,b,c,d){if(ia(a)&&!da(a)){b="playlist list listType index startSeconds suggestedQuality".split(" ");c={};for(d=0;d<b.length;d++){var e=b[d];a[e]&&(c[e]=a[e])}return c}c={index:b,startSeconds:c,suggestedQuality:d};u(a)&&16==a.length?c.list="PL"+a:c.playlist=a;return c}
function xj(a){var b=a.video_id||a.videoId;if(u(b)){var c=U("yt-player-two-stage-token")||{},d=U("yt-player-two-stage-token")||{};n(void 0)?d[b]=void 0:delete d[b];T("yt-player-two-stage-token",d,300);(b=c[b])&&(a.two_stage_token=b)}};var yj=document.currentScript&&-1!=document.currentScript.src.indexOf("?loadGamesSDK")?"/cast_game_sender.js":"/cast_sender.js",zj=0<window.location.hash.indexOf("__CastInternalExtensionIds__"),Aj=["boadgeojelhgndaghljhdicfkmllpafd","dliochdbjfkdbacpmhlcpmleaejidimm"],Bj=["hfaagokkkhdbgiakmmlclaapfelnkoah","fmfcbgogabcbclcofgocippekhfcmgfj","enhhojjnijigcajfphajepfemndkmdlo","eojlgccfgnjlphjnlopmadngcgmmdgpk"],Cj=["fjhoaacokmgbjemoflkofnenfaiekifl"],Dj=["ekpaaapppgpmolpcldedioblbkmijaca","lhkfccafpkdlaodkicmokbmfapjadkij",
"ibiljbkambkbohapfhoonkcpcikdglop","enhhojjnijigcajfphajepfemndkmdlo"],Ej=zj?Aj.concat(Bj):Aj,Fj=zj?Dj.concat(Cj):Cj,Gj=window.navigator.presentation?Ej.concat(Fj):Ej;function Hj(a){window.chrome?Ij(0,a):a(null)}function Ij(a,b){a==Gj.length?b(null):Jj(Gj[a],function(c){c?b(Gj[a]):Ij(a+1,b)})}
function Jj(a,b){var c=new XMLHttpRequest;c.onreadystatechange=function(){4==c.readyState&&200==c.status&&b(!0)};c.onerror=function(){b(!1)};try{c.open("GET","chrome-extension://"+a+yj,!0),c.send()}catch(d){b(!1)}}function Kj(a){var b=document.createElement("script");b.src=a;(document.head||document.documentElement).appendChild(b)}function Lj(){var a=window.navigator.userAgent;return 0<=a.indexOf("Android")&&0<=a.indexOf("Chrome/")}
function Mj(){if(window.navigator.presentation&&Lj())Kj("//www.gstatic.com/eureka/clank"+yj);else{if(0<=window.navigator.userAgent.indexOf("CriOS")){var a=window.__gCrWeb&&window.__gCrWeb.message&&window.__gCrWeb.message.invokeOnHost;if(a){a({command:"cast.sender.init"});return}}Hj(function(a){a?(window.chrome=window.chrome||{},window.chrome.cast=window.chrome.cast||{},window.chrome.cast.extensionId=a,Kj("chrome-extension://"+a+yj)):(a=window.__onGCastApiAvailable)&&"function"==typeof a&&a(!1,"No cast extension found")})}}
;var Nj=w(),Oj=null,Pj=Array(50),Qj=-1,Rj=!1;function Sj(a){Tj();Oj.push(a);Uj(Oj)}function Vj(a){var b=r("yt.mdx.remote.debug.handlers_");Ua(b||[],a)}function Wj(a,b){Tj();var c=Oj,d=Xj(a,String(b));0==c.length?Yj(d):(Uj(c),y(c,function(a){a(d)}))}function Tj(){Oj||(Oj=r("yt.mdx.remote.debug.handlers_")||[],p("yt.mdx.remote.debug.handlers_",Oj,void 0))}function Yj(a){var b=(Qj+1)%50;Qj=b;Pj[b]=a;Rj||(Rj=49==b)}
function Uj(a){var b=Pj;if(b[0]){var c=Qj,d=Rj?c:-1;do{var d=(d+1)%50,e=b[d];y(a,function(a){a(e)})}while(d!=c);Pj=Array(50);Qj=-1;Rj=!1}}function Xj(a,b){var c=(w()-Nj)/1E3;c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")};function Zj(a){a=a||{};this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.f=a.uuid||a.dialId||""}function ak(a,b){return!!b&&(a.id==b||a.f==b)}function bk(a,b){return a||b?!a!=!b?!1:a.id==b.id:!0}function ck(a,b){return a||b?!a!=!b?!1:a.id==b.id&&a.token==b.token&&a.name==b.name&&a.f==b.f:!0}function dk(a){return{name:a.name,screenId:a.id,loungeToken:a.token,dialId:a.f}}function ek(a){return new Zj(a)}function fk(a){return da(a)?z(a,ek):[]}
function gk(a){return a?'{name:"'+a.name+'",id:'+a.id.substr(0,6)+"..,token:"+(a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.f?".."+a.f.slice(-6):"-")+"}":"null"}function hk(a){return da(a)?"["+z(a,gk).join(",")+"]":"null"};var ik={Se:"atp",af:"ska",Ye:"que",We:"mus",$e:"sus"};function jk(a){this.o=this.j="";this.f="/api/lounge";this.h=!0;a=a||document.location.href;var b=Number(a.match(ke)[4]||null)||null||"";b&&(this.o=":"+b);this.j=le(a)||"";a=Lb;0<=a.search("MSIE")&&(a=a.match(/MSIE ([\d.]+)/)[1],0>Ha(a,"10.0")&&(this.h=!1))}function kk(a,b,c,d){var e=a.f;if(n(d)?d:a.h)e="https://"+a.j+a.o+a.f;return te(e+b,c||{})}
function lk(a,b,c,d,e){a={format:"JSON",method:"POST",context:a,timeout:5E3,withCredentials:!1,ca:pa(a.A,d,!0),onError:pa(a.l,e),wb:pa(a.B,e)};c&&(a.R=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return Ce(b,a)}jk.prototype.A=function(a,b,c,d){b?a(d):a({text:c.responseText})};jk.prototype.l=function(a,b){a(Error("Request error: "+b.status))};jk.prototype.B=function(a){a(Error("request timed out"))};function mk(a){this.f=this.name=this.id="";this.status="UNKNOWN";a&&(this.id=a.id||"",this.name=a.name||"",this.f=a.activityId||"",this.status=a.status||"UNKNOWN")}function nk(a){return{id:a.id,name:a.name,activityId:a.f,status:a.status}}mk.prototype.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.f+",status:"+this.status+"}"};function ok(a){a=a||[];return"["+z(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function pk(){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 qk(a,b){return Pa(a,function(a){return a.key==b})}function rk(a){return z(a,function(a){return{key:a.id,name:a.name}})}function sk(a){return z(a,function(a){return nk(a)})}function tk(a){return z(a,function(a){return new mk(a)})}function uk(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}
function vk(a,b){return Pa(a,function(a){return a.id==b})}function wk(a,b){return Pa(a,function(a){return bk(a,b)})}function xk(a,b){return Pa(a,function(a){return ak(a,b)})};function V(){D.call(this);this.o=new F;cc(this,pa(dc,this.o))}x(V,D);V.prototype.subscribe=function(a,b,c){return this.isDisposed()?0:this.o.subscribe(a,b,c)};V.prototype.unsubscribe=function(a,b,c){return this.isDisposed()?!1:this.o.unsubscribe(a,b,c)};V.prototype.oa=function(a){return this.isDisposed()?!1:this.o.oa(a)};V.prototype.D=function(a,b){return this.isDisposed()?!1:this.o.D.apply(this.o,arguments)};function yk(a){V.call(this);this.B=a;this.screens=[]}x(yk,V);yk.prototype.$=function(){return this.screens};yk.prototype.contains=function(a){return!!wk(this.screens,a)};yk.prototype.get=function(a){return a?xk(this.screens,a):null};function zk(a,b){var c=a.get(b.f)||a.get(b.id);if(c){var d=c.name;c.id=b.id||c.id;c.name=b.name;c.token=b.token;c.f=b.f||c.f;return c.name!=d}a.screens.push(b);return!0}
function Ak(a,b){var c=a.screens.length!=b.length;a.screens=Ma(a.screens,function(a){return!!wk(b,a)});for(var d=0,e=b.length;d<e;d++)c=zk(a,b[d])||c;return c}function Bk(a,b){var c=a.screens.length;a.screens=Ma(a.screens,function(a){return!bk(a,b)});return a.screens.length<c}yk.prototype.info=function(a){Wj(this.B,a)};function Ck(a,b,c,d){V.call(this);this.F=a;this.B=b;this.l=c;this.A=d;this.j=0;this.f=null;this.h=NaN}x(Ck,V);var Dk=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=Ck.prototype;g.start=function(){!this.f&&isNaN(this.h)&&this.Ic()};g.stop=function(){this.f&&(this.f.abort(),this.f=null);isNaN(this.h)||(I(this.h),this.h=NaN)};g.G=function(){this.stop();Ck.I.G.call(this)};
g.Ic=function(){this.h=NaN;this.f=Ce(kk(this.F,"/pairing/get_screen"),{method:"POST",R:{pairing_code:this.B},timeout:5E3,ca:v(this.Je,this),onError:v(this.Ie,this),wb:v(this.Ke,this)})};g.Je=function(a,b){this.f=null;var c=b.screen||{};c.dialId=this.l;c.name=this.A;this.D("pairingComplete",new Zj(c))};
g.Ie=function(a){this.f=null;a.status&&404==a.status?this.j>=Dk.length?this.D("pairingFailed",Error("DIAL polling timed out")):(a=Dk[this.j],this.h=H(v(this.Ic,this),a),this.j++):this.D("pairingFailed",Error("Server error "+a.status))};g.Ke=function(){this.f=null;this.D("pairingFailed",Error("Server not responding"))};function Ek(a){this.app=this.name=this.id="";this.type="REMOTE_CONTROL";this.avatar=this.username="";this.capabilities=new $d;this.theme="u";a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.username=a.user||"",this.avatar=a.userAvatarUri||"",this.theme=a.theme||"u",this.capabilities=new $d(Ma((a.capabilities||"").split(","),pa(gb,ik))))}Ek.prototype.equals=function(a){return a?this.id==a.id:!1};var Fk;function Gk(){var a=Hk(),b=Ik();A(a,b);if(Jk()){var c=a,d;d=0;for(var e=c.length,f;d<e;){var h=d+e>>1,k;k=cb(b,c[h]);0<k?d=h+1:(e=h,f=!k)}d=f?d:~d;0>d&&Za(c,-(d+1),0,b)}a=Kk(a);if(0==a.length)try{a="remote_sid",We.remove(""+a,"/","youtube.com")}catch(l){}else try{Xe("remote_sid",a.join(","),-1)}catch(l){}}function Hk(){var a=U("yt-remote-connected-devices")||[];a.sort(cb);return a}
function Kk(a){if(0==a.length)return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return z(a,function(a,b){return 0==b?a:a.substring(c.length)})}function Lk(a){T("yt-remote-connected-devices",a,86400)}function Ik(){if(Mk)return Mk;var a=U("yt-remote-device-id");a||(a=pk(),T("yt-remote-device-id",a,31536E3));for(var b=Hk(),c=1,d=a;A(b,d);)c++,d=a+"#"+c;return Mk=d}function Nk(){return U("yt-remote-session-browser-channel")}function Jk(){return U("yt-remote-session-screen-id")}
function Ok(a){5<a.length&&(a=a.slice(a.length-5));var b=z(Pk(),function(a){return a.loungeToken}),c=z(a,function(a){return a.loungeToken});Oa(c,function(a){return!A(b,a)})&&Qk();T("yt-remote-local-screens",a,31536E3)}function Pk(){return U("yt-remote-local-screens")||[]}function Qk(){T("yt-remote-lounge-token-expiration",!0,86400)}function Rk(){return!U("yt-remote-lounge-token-expiration")}function Sk(a){T("yt-remote-online-screens",a,60)}function Tk(){return U("yt-remote-online-screens")||[]}
function Uk(a){T("yt-remote-online-dial-devices",a,30)}function Vk(){return U("yt-remote-online-dial-devices")||[]}function Wk(a,b){T("yt-remote-session-browser-channel",a);T("yt-remote-session-screen-id",b);var c=Hk(),d=Ik();A(c,d)||c.push(d);Lk(c);Gk()}function Xk(a){a||(qj("yt-remote-session-screen-id"),qj("yt-remote-session-video-id"));Gk();a=Hk();Ua(a,Ik());Lk(a)}
function Yk(){if(!Fk){var a;a=new cj;(a=a.isAvailable()?a:null)&&(Fk=new ej(a))}return Fk?!!Fk.get("yt-remote-use-staging-server"):!1}var Mk="";function Zk(a){yk.call(this,"LocalScreenService");this.h=a;this.f=NaN;$k(this);this.info("Initializing with "+hk(this.screens))}x(Zk,yk);g=Zk.prototype;g.start=function(){$k(this)&&this.D("screenChange");Rk()&&al(this);I(this.f);this.f=H(v(this.start,this),1E4)};g.Eb=function(a,b){$k(this);zk(this,a);bl(this,!1);this.D("screenChange");b(a);a.token||al(this)};g.remove=function(a,b){var c=$k(this);Bk(this,a)&&(bl(this,!1),c=!0);b(a);c&&this.D("screenChange")};
g.Bb=function(a,b,c,d){var e=$k(this),f=this.get(a.id);f?(f.name!=b&&(f.name=b,bl(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.D("screenChange")};g.G=function(){I(this.f);Zk.I.G.call(this)};function al(a){if(a.screens.length){var b=z(a.screens,function(a){return a.id}),c=kk(a.h,"/pairing/get_lounge_token_batch");lk(a.h,c,{screen_ids:b.join(",")},v(a.Dd,a),v(a.Cd,a))}}
g.Dd=function(a){$k(this);var b=this.screens.length;a=a&&a.screens||[];for(var c=0,d=a.length;c<d;++c){var e=a[c],f=this.get(e.screenId);f&&(f.token=e.loungeToken,--b)}bl(this,!b);b&&Wj(this.B,"Missed "+b+" lounge tokens.")};g.Cd=function(a){Wj(this.B,"Requesting lounge tokens failed: "+a)};function $k(a){var b=fk(Pk()),b=Ma(b,function(a){return!a.f});return Ak(a,b)}function bl(a,b){Ok(z(a.screens,dk));b&&Qk()};function cl(a,b){V.call(this);this.A=b;for(var c=U("yt-remote-online-screen-ids")||"",c=c?c.split(","):[],d={},e=this.A(),f=0,h=e.length;f<h;++f){var k=e[f].id;d[k]=A(c,k)}this.f=d;this.B=a;this.j=this.l=NaN;this.h=null;dl("Initialized with "+M(this.f))}x(cl,V);g=cl.prototype;g.start=function(){var a=parseInt(U("yt-remote-fast-check-period")||"0",10);(this.l=w()-144E5<a?0:a)?el(this):(this.l=w()+3E5,T("yt-remote-fast-check-period",this.l),this.Xb())};g.isEmpty=function(){return pb(this.f)};
g.update=function(){dl("Updating availability on schedule.");var a=this.A(),b=eb(this.f,function(b,d){return b&&!!xk(a,d)},this);fl(this,b)};function gl(a,b,c){var d=kk(a.B,"/pairing/get_screen_availability");lk(a.B,d,{lounge_token:b.token},v(function(a){a=a.screens||[];for(var d=0,h=a.length;d<h;++d)if(a[d].loungeToken==b.token){c("online"==a[d].status);return}c(!1)},a),v(function(){c(!1)},a))}g.G=function(){I(this.j);this.j=NaN;this.h&&(this.h.abort(),this.h=null);cl.I.G.call(this)};
function fl(a,b){var c;a:if(fb(b)!=fb(a.f))c=!1;else{c=kb(b);for(var d=0,e=c.length;d<e;++d)if(!a.f[c[d]]){c=!1;break a}c=!0}c||(dl("Updated online screens: "+M(a.f)),a.f=b,a.D("screenChange"));hl(a)}function el(a){isNaN(a.j)||I(a.j);a.j=H(v(a.Xb,a),0<a.l&&a.l<w()?2E4:1E4)}
g.Xb=function(){I(this.j);this.j=NaN;this.h&&this.h.abort();var a=il(this);if(fb(a)){var b=kk(this.B,"/pairing/get_screen_availability"),c={lounge_token:kb(a).join(",")};this.h=lk(this.B,b,c,v(this.be,this,a),v(this.ae,this))}else fl(this,{}),el(this)};g.be=function(a,b){this.h=null;var c=kb(il(this));if(ab(c,kb(a))){for(var c=b.screens||[],d={},e=0,f=c.length;e<f;++e)d[a[c[e].loungeToken]]="online"==c[e].status;fl(this,d);el(this)}else this.M("Changing Screen set during request."),this.Xb()};
g.ae=function(a){this.M("Screen availability failed: "+a);this.h=null;el(this)};function dl(a){Wj("OnlineScreenService",a)}g.M=function(a){Wj("OnlineScreenService",a)};function il(a){var b={};y(a.A(),function(a){a.token?b[a.token]=a.id:this.M("Requesting availability of screen w/o lounge token.")});return b}
function hl(a){var b=kb(eb(a.f,function(a){return a}));b.sort(cb);b.length?T("yt-remote-online-screen-ids",b.join(","),60):qj("yt-remote-online-screen-ids");a=Ma(a.A(),function(a){return!!this.f[a.id]},a);Sk(z(a,dk))};function W(a){yk.call(this,"ScreenService");this.A=a;this.f=this.h=null;this.j=[];this.l={};jl(this)}x(W,yk);g=W.prototype;g.start=function(){this.h.start();this.f.start();this.screens.length&&(this.D("screenChange"),this.f.isEmpty()||this.D("onlineScreenChange"))};g.Eb=function(a,b,c){this.h.Eb(a,b,c)};g.remove=function(a,b,c){this.h.remove(a,b,c);this.f.update()};g.Bb=function(a,b,c,d){this.h.contains(a)?this.h.Bb(a,b,c,d):(a="Updating name of unknown screen: "+a.name,Wj(this.B,a),d(Error(a)))};
g.$=function(a){return a?this.screens:Wa(this.screens,Ma(this.j,function(a){return!this.contains(a)},this))};g.Tc=function(){return Ma(this.$(!0),function(a){return!!this.f.f[a.id]},this)};
function kl(a,b,c,d,e,f){a.info("getAutomaticScreenByIds "+c+" / "+b);c||(c=a.l[b]);var h=a.$();if(h=(c?xk(h,c):null)||xk(h,b)){h.f=b;var k=ll(a,h);gl(a.f,k,function(a){e(a?k:null)})}else c?ml(a,c,v(function(a){var f=ll(this,new Zj({name:d,screenId:c,loungeToken:a,dialId:b||""}));gl(this.f,f,function(a){e(a?f:null)})},a),f):e(null)}
g.Uc=function(a,b,c,d,e){this.info("getDialScreenByPairingCode "+a+" / "+b);var f=new Ck(this.A,a,b,c);f.subscribe("pairingComplete",v(function(a){dc(f);d(ll(this,a))},this));f.subscribe("pairingFailed",function(a){dc(f);e(a)});f.start();return v(f.stop,f)};function nl(a,b){for(var c=0,d=a.screens.length;c<d;++c)if(a.screens[c].name==b)return a.screens[c];return null}g.sc=function(a,b){for(var c=2,d=b(a,c);nl(this,d);){c++;if(20<c)return a;d=b(a,c)}return d};
g.Me=function(a,b,c,d){Ce(kk(this.A,"/pairing/get_screen"),{method:"POST",R:{pairing_code:a},timeout:5E3,ca:v(function(a,d){var h=new Zj(d.screen||{});if(!h.name||nl(this,h.name))h.name=this.sc(h.name,b);c(ll(this,h))},this),onError:v(function(a){d(Error("pairing request failed: "+a.status))},this),wb:v(function(){d(Error("pairing request timed out."))},this)})};g.G=function(){dc(this.h);dc(this.f);W.I.G.call(this)};
function ml(a,b,c,d){a.info("requestLoungeToken_ for "+b);var e={R:{screen_ids:b},method:"POST",context:a,ca:function(a,e){var k=e&&e.screens||[];k[0]&&k[0].screenId==b?c(k[0].loungeToken):d(Error("Missing lounge token in token response"))},onError:function(){d(Error("Request screen lounge token failed"))}};Ce(kk(a.A,"/pairing/get_lounge_token_batch"),e)}
function ol(a){a.screens=a.h.$();var b=a.l,c={},d;for(d in b)c[b[d]]=d;b=0;for(d=a.screens.length;b<d;++b){var e=a.screens[b];e.f=c[e.id]||""}a.info("Updated manual screens: "+hk(a.screens))}g.Ed=function(){ol(this);this.D("screenChange");this.f.update()};
function jl(a){pl(a);a.h=new Zk(a.A);a.h.subscribe("screenChange",v(a.Ed,a));ol(a);a.j=fk(U("yt-remote-automatic-screen-cache")||[]);pl(a);a.info("Initializing automatic screens: "+hk(a.j));a.f=new cl(a.A,v(a.$,a,!0));a.f.subscribe("screenChange",v(function(){this.D("onlineScreenChange")},a))}
function ll(a,b){var c=a.get(b.id);c?(c.f=b.f,b=c):((c=xk(a.j,b.f))?(c.id=b.id,c.token=b.token,b=c):a.j.push(b),T("yt-remote-automatic-screen-cache",z(a.j,dk)));pl(a);a.l[b.f]=b.id;T("yt-remote-device-id-map",a.l,31536E3);return b}function pl(a){a.l=U("yt-remote-device-id-map")||{}}W.prototype.dispose=W.prototype.dispose;function ql(a,b,c){V.call(this);this.S=c;this.K=a;this.h=b;this.j=null}x(ql,V);g=ql.prototype;g.vb=function(a){this.j=a;this.D("sessionScreen",this.j)};g.aa=function(a){this.isDisposed()||(a&&rl(this,""+a),this.j=null,this.D("sessionScreen",null))};g.info=function(a){Wj(this.S,a)};function rl(a,b){Wj(a.S,b)}g.Wc=function(){return null};
g.Zb=function(a){var b=this.h;a?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,v(function(){this.info("Updated receiver status for "+b.friendlyName+": "+a)},this),v(function(){rl(this,"Failed to update receiver status for: "+b.friendlyName)},this))};g.G=function(){this.Zb("");ql.I.G.call(this)};function sl(a,b){ql.call(this,a,b,"CastSession");this.f=null;this.A=0;this.l=null;this.F=v(this.Ne,this);this.B=v(this.le,this);this.A=H(v(function(){tl(this,null)},this),12E4)}x(sl,ql);g=sl.prototype;
g.Yb=function(a){if(this.f){if(this.f==a)return;rl(this,"Overriding cast sesison with new session object");this.f.removeUpdateListener(this.F);this.f.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.B)}this.f=a;this.f.addUpdateListener(this.F);this.f.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.B);this.l&&ul(this);vl(this,"getMdxSessionStatus")};g.Ta=function(a){this.info("launchWithParams: "+M(a));this.l=a;this.f&&ul(this)};
g.stop=function(){this.f?this.f.stop(v(function(){this.aa()},this),v(function(){this.aa(Error("Failed to stop receiver app."))},this)):this.aa(Error("Stopping cast device witout session."))};g.Zb=t;g.G=function(){this.info("disposeInternal");I(this.A);this.A=0;this.f&&(this.f.removeUpdateListener(this.F),this.f.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.B));this.f=null;sl.I.G.call(this)};
function ul(a){var b=a.l.videoId||a.l.videoIds[a.l.index];b&&vl(a,"flingVideo",{videoId:b,currentTime:a.l.currentTime||0});a.l=null}function vl(a,b,c){a.info("sendYoutubeMessage_: "+b+" "+M(c));var d={};d.type=b;c&&(d.data=c);a.f?a.f.sendMessage("urn:x-cast:com.google.youtube.mdx",d,t,v(function(){rl(this,"Failed to send message: "+b+".")},a)):rl(a,"Sending yt message without session: "+M(d))}
g.le=function(a,b){if(!this.isDisposed())if(b){var c=de(b);if(c){var d=""+c.type,c=c.data||{};this.info("onYoutubeMessage_: "+d+" "+M(c));switch(d){case "mdxSessionStatus":tl(this,c.screenId);break;default:rl(this,"Unknown youtube message: "+d)}}else rl(this,"Unable to parse message.")}else rl(this,"No data in message.")};
function tl(a,b){I(a.A);if(b){if(a.info("onConnectedScreenId_: Received screenId: "+b),!a.j||a.j.id!=b){var c=v(a.vb,a),d=v(a.aa,a);a.qc(b,c,d,5)}}else a.aa(Error("Waiting for session status timed out."))}g.qc=function(a,b,c,d){kl(this.K,this.h.label,a,this.h.friendlyName,v(function(e){e?b(e):0<=d?(rl(this,"Screen "+a+" appears to be offline. "+d+" retries left."),H(v(this.qc,this,a,b,c,d-1),300)):c(Error("Unable to fetch screen."))},this),c)};g.Wc=function(){return this.f};
g.Ne=function(a){this.isDisposed()||a||(rl(this,"Cast session died."),this.aa())};function wl(a,b){ql.call(this,a,b,"DialSession");this.A=this.J=null;this.O="";this.l=null;this.F=t;this.B=NaN;this.P=v(this.Qe,this);this.f=t}x(wl,ql);g=wl.prototype;g.Yb=function(a){this.A=a;this.A.addUpdateListener(this.P)};g.Ta=function(a){this.l=a;this.F()};g.stop=function(){this.f();this.f=t;I(this.B);this.A?this.A.stop(v(this.aa,this,null),v(this.aa,this,"Failed to stop DIAL device.")):this.aa()};
g.G=function(){this.f();this.f=t;I(this.B);this.A&&this.A.removeUpdateListener(this.P);this.A=null;wl.I.G.call(this)};function xl(a){a.f=a.K.Uc(a.O,a.h.label,a.h.friendlyName,v(function(a){this.f=t;this.vb(a)},a),v(function(a){this.f=t;this.aa(a)},a))}g.Qe=function(a){this.isDisposed()||a||(rl(this,"DIAL session died."),this.f(),this.f=t,this.aa())};
function yl(a){var b={};b.pairingCode=a.O;if(a.l){var c=a.l.index||0,d=a.l.currentTime||0;b.v=a.l.videoId||a.l.videoIds[c];b.t=d}Yk()&&(b.env_useStageMdx=1);return re(b)}g.Tb=function(a){this.O=pk();if(this.l){var b=new chrome.cast.DialLaunchResponse(!0,yl(this));a(b);xl(this)}else this.F=v(function(){I(this.B);this.F=t;this.B=NaN;var b=new chrome.cast.DialLaunchResponse(!0,yl(this));a(b);xl(this)},this),this.B=H(v(function(){this.F()},this),100)};
g.Fd=function(a,b){kl(this.K,this.J.receiver.label,a,this.h.friendlyName,v(function(a){a&&a.token?(this.vb(a),b(new chrome.cast.DialLaunchResponse(!1))):this.Tb(b)},this),v(function(a){rl(this,"Failed to get DIAL screen: "+a);this.Tb(b)},this))};function zl(a,b){ql.call(this,a,b,"ManualSession");this.f=H(v(this.Ta,this,null),150)}x(zl,ql);zl.prototype.stop=function(){this.aa()};zl.prototype.Yb=t;zl.prototype.Ta=function(){I(this.f);this.f=NaN;var a=xk(this.K.$(),this.h.label);a?this.vb(a):this.aa(Error("No such screen"))};zl.prototype.G=function(){I(this.f);this.f=NaN;zl.I.G.call(this)};function Al(a){V.call(this);this.h=a;this.f=null;this.A=!1;this.j=[];this.l=v(this.Zd,this)}x(Al,V);g=Al.prototype;
g.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest("233637DE");c.dialRequest=new chrome.cast.DialRequest("YouTube");var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED,e=a?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION,c=new chrome.cast.ApiConfig(c,v(this.Cc,this),v(this.$d,this),d,e);c.customDialLaunchCallback=v(this.Od,this);chrome.cast.initialize(c,v(function(){this.isDisposed()||(chrome.cast.addReceiverActionListener(this.l),
Sj(Bl),this.h.subscribe("onlineScreenChange",v(this.Vc,this)),this.j=Cl(this),chrome.cast.setCustomReceivers(this.j,t,v(function(a){this.M("Failed to set initial custom receivers: "+M(a))},this)),this.D("yt-remote-cast2-availability-change",Dl(this)),b(!0))},this),v(function(a){this.M("Failed to initialize API: "+M(a));b(!1)},this))};
g.ye=function(a,b){El("Setting connected screen ID: "+a+" -> "+b);if(this.f){var c=this.f.j;if(!a||c&&c.id!=a)El("Unsetting old screen status: "+this.f.h.friendlyName),dc(this.f),this.f=null}if(a&&b){if(!this.f){c=xk(this.h.$(),a);if(!c){El("setConnectedScreenStatus: Unknown screen.");return}var d=Fl(this,c);d||(El("setConnectedScreenStatus: Connected receiver not custom..."),d=new chrome.cast.Receiver(c.f?c.f:c.id,c.name),d.receiverType=chrome.cast.ReceiverType.CUSTOM,this.j.push(d),chrome.cast.setCustomReceivers(this.j,
t,v(function(a){this.M("Failed to set initial custom receivers: "+M(a))},this)));El("setConnectedScreenStatus: new active receiver: "+d.friendlyName);Gl(this,new zl(this.h,d),!0)}this.f.Zb(b)}else El("setConnectedScreenStatus: no screen.")};function Fl(a,b){return b?Pa(a.j,function(a){return ak(b,a.label)},a):null}g.ze=function(a){this.isDisposed()?this.M("Setting connection data on disposed cast v2"):this.f?this.f.Ta(a):this.M("Setting connection data without a session")};
g.Pe=function(){this.isDisposed()?this.M("Stopping session on disposed cast v2"):this.f?(this.f.stop(),dc(this.f),this.f=null):El("Stopping non-existing session")};g.requestSession=function(){chrome.cast.requestSession(v(this.Cc,this),v(this.ce,this))};g.G=function(){this.h.unsubscribe("onlineScreenChange",v(this.Vc,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.l);Vj(Bl);dc(this.f);Al.I.G.call(this)};function El(a){Wj("Controller",a)}
g.M=function(a){Wj("Controller",a)};function Bl(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)}function Dl(a){return a.A||!!a.j.length||!!a.f}function Gl(a,b,c){dc(a.f);(a.f=b)?(c?a.D("yt-remote-cast2-receiver-resumed",b.h):a.D("yt-remote-cast2-receiver-selected",b.h),b.subscribe("sessionScreen",v(a.Dc,a,b)),b.j?a.D("yt-remote-cast2-session-change",b.j):c&&a.f.Ta(null)):a.D("yt-remote-cast2-session-change",null)}
g.Dc=function(a,b){this.f==a&&(b||Gl(this,null),this.D("yt-remote-cast2-session-change",b))};
g.Zd=function(a,b){if(!this.isDisposed())if(a)switch(El("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.f)if(this.f.h.label!=a.label)El("onReceiverAction_: Stopping active receiver: "+this.f.h.friendlyName),this.f.stop();else{El("onReceiverAction_: Casting to active receiver.");this.f.j&&this.D("yt-remote-cast2-session-change",this.f.j);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:Gl(this,new zl(this.h,a));break;case chrome.cast.ReceiverType.DIAL:Gl(this,
new wl(this.h,a));break;case chrome.cast.ReceiverType.CAST:Gl(this,new sl(this.h,a));break;default:this.M("Unknown receiver type: "+a.receiverType);return}break;case chrome.cast.ReceiverAction.STOP:this.f&&this.f.h.label==a.label?this.f.stop():this.M("Stopping receiver w/o session: "+a.friendlyName)}else this.M("onReceiverAction_ called without receiver.")};
g.Od=function(a){if(this.isDisposed())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.M("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.f?this.f.h:null;if(!c||c.label!=b.label)return this.M("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.f.j)return El("Reselecting dial screen."),
this.D("yt-remote-cast2-session-change",this.f.j),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.M('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+b.friendlyName);Gl(this,new wl(this.h,b))}b=this.f;b.J=a;return b.J.appState==chrome.cast.DialAppState.RUNNING?new Promise(v(b.Fd,b,(b.J.extraData||{}).screenId||null)):new Promise(v(b.Tb,b))};
g.Cc=function(a){if(!this.isDisposed()){El("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.f)if(b.receiverType==chrome.cast.ReceiverType.CAST)El("Got resumed cast session before resumed mdx connection."),Gl(this,new sl(this.h,b),!0);else{this.M("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var c=this.f.h,d=xk(this.h.$(),c.label);d&&ak(d,b.label)&&c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==
chrome.cast.ReceiverType.CAST&&(El("onSessionEstablished_: manual to cast session change "+b.friendlyName),dc(this.f),this.f=new sl(this.h,b),this.f.subscribe("sessionScreen",v(this.Dc,this,this.f)),this.f.Ta(null));this.f.Yb(a)}}};g.Oe=function(){return this.f?this.f.Wc():null};g.ce=function(a){this.isDisposed()||(this.M("Failed to estabilish a session: "+M(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&Gl(this,null))};
g.$d=function(a){El("Receiver availability updated: "+a);if(!this.isDisposed()){var b=Dl(this);this.A=a==chrome.cast.ReceiverAvailability.AVAILABLE;Dl(this)!=b&&this.D("yt-remote-cast2-availability-change",Dl(this))}};
function Cl(a){var b=a.h.Tc(),c=a.f&&a.f.h;a=z(b,function(a){c&&ak(a,c.label)&&(c=null);var b=a.f?a.f:a.id,f=Fl(this,a);f?(f.label=b,f.friendlyName=a.name):(f=new chrome.cast.Receiver(b,a.name),f.receiverType=chrome.cast.ReceiverType.CUSTOM);return f},a);c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a}
g.Vc=function(){if(!this.isDisposed()){var a=Dl(this);this.j=Cl(this);El("Updating custom receivers: "+M(this.j));chrome.cast.setCustomReceivers(this.j,t,v(function(){this.M("Failed to set custom receivers.")},this));var b=Dl(this);b!=a&&this.D("yt-remote-cast2-availability-change",b)}};Al.prototype.setLaunchParams=Al.prototype.ze;Al.prototype.setConnectedScreenStatus=Al.prototype.ye;Al.prototype.stopSession=Al.prototype.Pe;Al.prototype.getCastSession=Al.prototype.Oe;Al.prototype.requestSession=Al.prototype.requestSession;
Al.prototype.init=Al.prototype.init;Al.prototype.dispose=Al.prototype.dispose;function Hl(a,b,c){Il()?Kl(a)&&(Ll(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?Ml(b):(window.__onGCastApiAvailable=function(a,c){a?Ml(b):(Nl("Failed to load cast API: "+c),Ol(!1),Ll(!1),qj("yt-remote-cast-available"),qj("yt-remote-cast-receiver"),Pl(),b(!1))},c?Ac("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"):Mj())):Jl("Cannot initialize because not running Chrome")}
function Pl(){Jl("dispose");var a=Ql();a&&a.dispose();Rl=null;p("yt.mdx.remote.cloudview.instance_",null,void 0);Sl(!1);wc(Tl);Tl.length=0}function Ul(){return!!U("yt-remote-cast-installed")}function Vl(){var a=U("yt-remote-cast-receiver");return a?Ba(a.friendlyName):null}function Wl(){Jl("clearCurrentReciever");qj("yt-remote-cast-receiver")}
function Xl(){Ul()?Ql()?Yl()?(Jl("Requesting cast selector."),Rl.requestSession()):(Jl("Wait for cast API to be ready to request the session."),Tl.push(uc("yt-remote-cast2-api-ready",Xl))):Nl("requestCastSelector: Cast is not initialized."):Nl("requestCastSelector: Cast API is not installed!")}function Zl(a){Yl()?Ql().setLaunchParams(a):Nl("setLaunchParams called before ready.")}function $l(a,b){Yl()?Ql().setConnectedScreenStatus(a,b):Nl("setConnectedScreenStatus called before ready.")}var Rl=null;
function Il(){var a;a=0<=Lb.search(/\ (CrMo|Chrome|CriOS)\//);return Wf||a}function am(a){Rl.init(!0,a)}
function Kl(a){var b=!1;if(!Rl){var c=r("yt.mdx.remote.cloudview.instance_");c||(c=new Al(a),c.subscribe("yt-remote-cast2-availability-change",function(a){T("yt-remote-cast-available",a);J("yt-remote-cast2-availability-change",a)}),c.subscribe("yt-remote-cast2-receiver-selected",function(a){Jl("onReceiverSelected: "+a.friendlyName);T("yt-remote-cast-receiver",a);J("yt-remote-cast2-receiver-selected",a)}),c.subscribe("yt-remote-cast2-receiver-resumed",function(a){Jl("onReceiverResumed: "+a.friendlyName);
T("yt-remote-cast-receiver",a)}),c.subscribe("yt-remote-cast2-session-change",function(a){Jl("onSessionChange: "+gk(a));a||qj("yt-remote-cast-receiver");J("yt-remote-cast2-session-change",a)}),p("yt.mdx.remote.cloudview.instance_",c,void 0),b=!0);Rl=c}Jl("cloudview.createSingleton_: "+b);return b}function Ql(){Rl||(Rl=r("yt.mdx.remote.cloudview.instance_"));return Rl}
function Ml(a){Ol(!0);Ll(!1);am(function(b){b?(Sl(!0),J("yt-remote-cast2-api-ready")):(Nl("Failed to initialize cast API."),Ol(!1),qj("yt-remote-cast-available"),qj("yt-remote-cast-receiver"),Pl());a(b)})}function Jl(a){Wj("cloudview",a)}function Nl(a){Wj("cloudview",a)}function Ol(a){Jl("setCastInstalled_ "+a);T("yt-remote-cast-installed",a)}function Yl(){return!!r("yt.mdx.remote.cloudview.apiReady_")}function Sl(a){Jl("setApiReady_ "+a);p("yt.mdx.remote.cloudview.apiReady_",a,void 0)}
function Ll(a){p("yt.mdx.remote.cloudview.initializing_",a,void 0)}var Tl=[];function bm(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function cm(a){Wj("CAST",a)}function dm(a){var b=em();b&&b.logMessage&&b.logMessage(a)}function fm(a){if(a.event.source==window&&a.event.data&&"CastApi"==a.event.data.source&&"Hello"==a.event.data.event)for(;gm.length;)gm.shift()()}
function hm(){if(!r("yt.mdx.remote.castv2_")&&!im&&(0==Sa.length&&Ya(Sa,Vk()),bm())){var a=em();a?(a.removeReceiverListener("YouTube",jm),a.addReceiverListener("YouTube",jm),cm("API initialized in the other binary")):(a=new cast.Api,km(a),a.addReceiverListener("YouTube",jm),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){H(function(){window.location.reload(!0)},1E3)}),Sj(dm),cm("API initialized"));im=!0}}
function lm(){var a=em();a&&(cm("API disposed"),Vj(dm),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(t),a.removeReceiverListener("YouTube",jm),km(null));im=!1;gm=null;(a=Id(window,"message",fm,!1))&&Jd(a)}function mm(a){var b=Qa(Sa,function(b){return b.id==a.id});0<=b&&(Sa[b]=nk(a))}
function jm(a){a.length&&cm("Updating receivers: "+M(a));nm(a);J("yt-remote-cast-device-list-update");y(om(),function(a){pm(a.id)});y(a,function(a){if(a.isTabProjected){var c=qm(a.id);cm("Detected device: "+c.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event.");H(function(){J("yt-remote-cast-device-tab-projected",c.id)},1E3)}})}
function rm(a,b){cm("Updating "+a+" activity status: "+M(b));var c=qm(a);c?(b.activityId&&(c.f=b.activityId),c.status="running"==b.status?"RUNNING":"stopped"==b.status?"STOPPED":"error"==b.status?"ERROR":"UNKNOWN","RUNNING"!=c.status&&(c.f=""),mm(c),J("yt-remote-cast-device-status-update",c)):cm("Device not found")}function om(){hm();return tk(Sa)}function nm(a){a=z(a,function(a){var c={id:a.id,name:Ba(a.name)};if(a=qm(a.id))c.activityId=a.f,c.status=a.status;return c});Ra();Ya(Sa,a)}
function qm(a){var b=om();return Pa(b,function(b){return b.id==a})||null}function pm(a){var b=qm(a),c=em();c&&b&&b.f&&c.getActivityStatus(b.f,function(b){"error"==b.status&&(b.status="stopped");rm(a,b)})}function sm(a){hm();var b=qm(a),c=em();c&&b&&b.f?(cm("Stopping cast activity"),c.stopActivity(b.f,pa(rm,a))):cm("Dropping cast activity stop")}function em(){return r("yt.mdx.remote.castapi.api_")}function km(a){p("yt.mdx.remote.castapi.api_",a,void 0)}
var im=!1,gm=null,Sa=r("yt.mdx.remote.castapi.devices_")||[];p("yt.mdx.remote.castapi.devices_",Sa,void 0);function tm(a,b){this.action=a;this.params=b||null};function um(){};function vm(){this.f=w()}new vm;vm.prototype.reset=function(){this.f=w()};vm.prototype.get=function(){return this.f};function wm(){D.call(this);this.Ba=new nf(this);this.ya=this;this.ha=null}x(wm,D);wm.prototype[jf]=!0;g=wm.prototype;g.addEventListener=function(a,b,c,d){vf(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){Bf(this,a,b,c,d)};
function xm(a,b){var c,d=a.ha;if(d){c=[];for(var e=1;d;d=d.ha)c.push(d),++e}var d=a.ya,e=b,f=e.type||e;if(u(e))e=new gf(e,d);else if(e instanceof gf)e.target=e.target||d;else{var h=e,e=new gf(f,d);ub(e,h)}var h=!0,k;if(c)for(var l=c.length-1;0<=l;l--)k=e.currentTarget=c[l],h=ym(k,f,!0,e)&&h;k=e.currentTarget=d;h=ym(k,f,!0,e)&&h;h=ym(k,f,!1,e)&&h;if(c)for(l=0;l<c.length;l++)k=e.currentTarget=c[l],h=ym(k,f,!1,e)&&h}g.G=function(){wm.I.G.call(this);this.removeAllListeners();this.ha=null};
g.tb=function(a,b,c,d){return of(this.Ba,String(a),b,c,d)};g.$b=function(a,b,c,d){return this.Ba.remove(String(a),b,c,d)};g.removeAllListeners=function(a){return this.Ba?this.Ba.removeAll(a):0};function ym(a,b,c,d){b=a.Ba.f[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var h=b[f];if(h&&!h.Va&&h.ob==c){var k=h.listener,l=h.sb||h.src;h.nb&&qf(a.Ba,h);e=!1!==k.call(l,d)&&e}}return e&&0!=d.Mc};function zm(a,b){this.h=new fe(a);this.f=b?de:ce}zm.prototype.stringify=function(a){return ee(this.h,a)};zm.prototype.parse=function(a){return this.f(a)};function Am(a,b){wm.call(this);this.f=a||1;this.h=b||m;this.j=v(this.Be,this);this.o=w()}x(Am,wm);g=Am.prototype;g.enabled=!1;g.ea=null;function Bm(a,b){a.f=b;a.ea&&a.enabled?(a.stop(),a.start()):a.ea&&a.stop()}g.Be=function(){if(this.enabled){var a=w()-this.o;0<a&&a<.8*this.f?this.ea=this.h.setTimeout(this.j,this.f-a):(this.ea&&(this.h.clearTimeout(this.ea),this.ea=null),xm(this,"tick"),this.enabled&&(this.ea=this.h.setTimeout(this.j,this.f),this.o=w()))}};
g.start=function(){this.enabled=!0;this.ea||(this.ea=this.h.setTimeout(this.j,this.f),this.o=w())};g.stop=function(){this.enabled=!1;this.ea&&(this.h.clearTimeout(this.ea),this.ea=null)};g.G=function(){Am.I.G.call(this);this.stop();delete this.h};function Cm(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:m.setTimeout(a,b||0)};function Dm(a,b,c){D.call(this);this.o=null!=c?v(a,c):a;this.j=b;this.h=v(this.ee,this);this.f=[]}x(Dm,D);g=Dm.prototype;g.Ab=!1;g.Ra=null;g.sd=function(a){this.f=arguments;this.Ra?this.Ab=!0:Em(this)};g.stop=function(){this.Ra&&(m.clearTimeout(this.Ra),this.Ra=null,this.Ab=!1,this.f=[])};g.G=function(){Dm.I.G.call(this);this.stop()};g.ee=function(){this.Ra=null;this.Ab&&(this.Ab=!1,Em(this))};function Em(a){a.Ra=Cm(a.h,a.j);a.o.apply(null,a.f)};function Fm(a){D.call(this);this.h=a;this.f={}}x(Fm,D);var Gm=[];g=Fm.prototype;g.tb=function(a,b,c,d){da(b)||(b&&(Gm[0]=b.toString()),b=Gm);for(var e=0;e<b.length;e++){var f=vf(a,b[e],c||this.handleEvent,d||!1,this.h||this);if(!f)break;this.f[f.key]=f}return this};
g.$b=function(a,b,c,d,e){if(da(b))for(var f=0;f<b.length;f++)this.$b(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.h||this,c=wf(c),d=!!d,b=a&&a[jf]?rf(a.Ba,String(b),c,d,e):a?(a=xf(a))?rf(a,b,c,d,e):null:null,b&&(Cf(b),delete this.f[b.key]);return this};g.removeAll=function(){db(this.f,function(a,b){this.f.hasOwnProperty(b)&&Cf(a)},this);this.f={}};g.G=function(){Fm.I.G.call(this);this.removeAll()};g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Hm(){}Hm.prototype.f=null;function Im(a){var b;(b=a.f)||(b={},Jm(a)&&(b[0]=!0,b[1]=!0),b=a.f=b);return b};var Km;function Lm(){}x(Lm,Hm);function Mm(a){return(a=Jm(a))?new ActiveXObject(a):new XMLHttpRequest}function Jm(a){if(!a.h&&"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.h=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.h}Km=new Lm;function Nm(a,b,c,d,e){this.f=a;this.j=c;this.F=d;this.B=e||1;this.l=45E3;this.o=new Fm(this);this.h=new Am;Bm(this.h,250)}g=Nm.prototype;g.Ia=null;g.ma=!1;g.Xa=null;g.bc=null;g.ib=null;g.Wa=null;g.za=null;g.Da=null;g.Ka=null;g.N=null;g.kb=0;g.na=null;g.Db=null;g.Ja=null;g.eb=-1;g.Nc=!0;g.Fa=!1;g.Rb=0;g.yb=null;var Om={},Pm={};g=Nm.prototype;g.setTimeout=function(a){this.l=a};function Qm(a,b,c){a.Wa=1;a.za=Vg(b.clone());a.Ka=c;a.A=!0;Rm(a,null)}
function Sm(a,b,c,d,e){a.Wa=1;a.za=Vg(b.clone());a.Ka=null;a.A=c;e&&(a.Nc=!1);Rm(a,d)}function Rm(a,b){a.ib=w();Tm(a);a.Da=a.za.clone();Tg(a.Da,"t",a.B);a.kb=0;a.N=a.f.Kb(a.f.jb()?b:null);0<a.Rb&&(a.yb=new Dm(v(a.Sc,a,a.N),a.Rb));a.o.tb(a.N,"readystatechange",a.ne);var c=a.Ia?rb(a.Ia):{};a.Ka?(a.Db="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.N.send(a.Da,a.Db,a.Ka,c)):(a.Db="GET",a.Nc&&!Xc&&(c.Connection="close"),a.N.send(a.Da,a.Db,null,c));a.f.la(1)}
g.ne=function(a){a=a.target;var b=this.yb;b&&3==Um(a)?b.sd():this.Sc(a)};
g.Sc=function(a){try{if(a==this.N)a:{var b=Um(this.N),c=this.N.o,d=this.N.getStatus();if(K&&!(10<=fd)||Xc&&!dd("420+")){if(4>b)break a}else if(3>b||3==b&&!Uc&&!Vm(this.N))break a;this.Fa||4!=b||7==c||(8==c||0>=d?this.f.la(3):this.f.la(2));Wm(this);var e=this.N.getStatus();this.eb=e;var f=Vm(this.N);(this.ma=200==e)?(4==b&&Xm(this),this.A?(Ym(this,b,f),Uc&&this.ma&&3==b&&(this.o.tb(this.h,"tick",this.me),this.h.start())):Zm(this,f),this.ma&&!this.Fa&&(4==b?this.f.ub(this):(this.ma=!1,Tm(this)))):(this.Ja=
400==e&&0<f.indexOf("Unknown SID")?3:0,X(),Xm(this),$m(this))}}catch(h){this.N&&Vm(this.N)}finally{}};function Ym(a,b,c){for(var d=!0;!a.Fa&&a.kb<c.length;){var e=an(a,c);if(e==Pm){4==b&&(a.Ja=4,X(),d=!1);break}else if(e==Om){a.Ja=4;X();d=!1;break}else Zm(a,e)}4==b&&0==c.length&&(a.Ja=1,X(),d=!1);a.ma=a.ma&&d;d||(Xm(a),$m(a))}g.me=function(){var a=Um(this.N),b=Vm(this.N);this.kb<b.length&&(Wm(this),Ym(this,a,b),this.ma&&4!=a&&Tm(this))};
function an(a,b){var c=a.kb,d=b.indexOf("\n",c);if(-1==d)return Pm;c=Number(b.substring(c,d));if(isNaN(c))return Om;d+=1;if(d+c>b.length)return Pm;var e=b.substr(d,c);a.kb=d+c;return e}
function bn(a,b){a.ib=w();Tm(a);var c=b?window.location.hostname:"";a.Da=a.za.clone();N(a.Da,"DOMAIN",c);N(a.Da,"t",a.B);try{a.na=new ActiveXObject("htmlfile")}catch(q){Xm(a);a.Ja=7;X();$m(a);return}var d="<html><body>";if(b){for(var e="",f=0;f<c.length;f++){var h=c.charAt(f);if("<"==h)e=e+"\\x3c";else if(">"==h)e=e+"\\x3e";else{if(h in Ga)h=Ga[h];else if(h in Fa)h=Ga[h]=Fa[h];else{var k=h,l=h.charCodeAt(0);if(31<l&&127>l)k=h;else{if(256>l){if(k="\\x",16>l||256<l)k+="0"}else k="\\u",4096>l&&(k+="0");
k+=l.toString(16).toUpperCase()}h=Ga[h]=k}e+=h}}d+='<script>document.domain="'+e+'"\x3c/script>'}d+="</body></html>";c=Kd(wb("b/12014412"),d);a.na.open();a.na.write(Eb(c));a.na.close();a.na.parentWindow.m=v(a.he,a);a.na.parentWindow.d=v(a.Gc,a,!0);a.na.parentWindow.rpcClose=v(a.Gc,a,!1);c=a.na.createElement("DIV");a.na.parentWindow.document.body.appendChild(c);d=Bb(a.Da.toString());d=zb(d);Aa.test(d)&&(-1!=d.indexOf("&")&&(d=d.replace(ua,"&amp;")),-1!=d.indexOf("<")&&(d=d.replace(va,"&lt;")),-1!=
d.indexOf(">")&&(d=d.replace(wa,"&gt;")),-1!=d.indexOf('"')&&(d=d.replace(xa,"&quot;")),-1!=d.indexOf("'")&&(d=d.replace(ya,"&#39;")),-1!=d.indexOf("\x00")&&(d=d.replace(za,"&#0;")));d=Kd(wb("b/12014412"),'<iframe src="'+d+'"></iframe>');c.innerHTML=Eb(d);a.f.la(1)}g.he=function(a){cn(v(this.ge,this,a),0)};g.ge=function(a){this.Fa||(Wm(this),Zm(this,a),Tm(this))};g.Gc=function(a){cn(v(this.fe,this,a),0)};g.fe=function(a){this.Fa||(Xm(this),this.ma=a,this.f.ub(this),this.f.la(4))};
g.cancel=function(){this.Fa=!0;Xm(this)};function Tm(a){a.bc=w()+a.l;dn(a,a.l)}function dn(a,b){if(null!=a.Xa)throw Error("WatchDog timer not null");a.Xa=cn(v(a.je,a),b)}function Wm(a){a.Xa&&(m.clearTimeout(a.Xa),a.Xa=null)}g.je=function(){this.Xa=null;var a=w();0<=a-this.bc?(2!=this.Wa&&this.f.la(3),Xm(this),this.Ja=2,X(),$m(this)):dn(this,this.bc-a)};function $m(a){a.f.uc()||a.Fa||a.f.ub(a)}
function Xm(a){Wm(a);dc(a.yb);a.yb=null;a.h.stop();a.o.removeAll();if(a.N){var b=a.N;a.N=null;en(b);b.dispose()}a.na&&(a.na=null)}function Zm(a,b){try{a.f.Bc(a,b),a.f.la(4)}catch(c){}};function fn(a,b,c,d,e){if(0==d)c(!1);else{var f=e||0;d--;gn(a,b,function(e){e?c(!0):m.setTimeout(function(){fn(a,b,c,d,f)},f)})}}function gn(a,b,c){var d=new Image;d.onload=function(){try{hn(d),c(!0)}catch(a){}};d.onerror=function(){try{hn(d),c(!1)}catch(a){}};d.onabort=function(){try{hn(d),c(!1)}catch(a){}};d.ontimeout=function(){try{hn(d),c(!1)}catch(a){}};m.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b);d.src=a}
function hn(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function jn(a){this.f=a;this.h=new zm(null,!0)}g=jn.prototype;g.Pb=null;g.da=null;g.zb=!1;g.Qc=null;g.pb=null;g.Ub=null;g.Qb=null;g.fa=null;g.xa=-1;g.cb=null;g.Ya=null;g.connect=function(a){this.Qb=a;a=kn(this.f,null,this.Qb);X();this.Qc=w();var b=this.f.F;null!=b?(this.cb=b[0],(this.Ya=b[1])?(this.fa=1,ln(this)):(this.fa=2,mn(this))):(Tg(a,"MODE","init"),this.da=new Nm(this,0,void 0,void 0,void 0),this.da.Ia=this.Pb,Sm(this.da,a,!1,null,!0),this.fa=0)};
function ln(a){var b=kn(a.f,a.Ya,"/mail/images/cleardot.gif");Vg(b);fn(b.toString(),5E3,v(a.nd,a),3,2E3);a.la(1)}g.nd=function(a){if(a)this.fa=2,mn(this);else{X();var b=this.f;b.ia=b.Aa.xa;nn(b,9)}a&&this.la(2)};
function mn(a){var b=a.f.W;if(null!=b)X(),b?(X(),on(a.f,a,!1)):(X(),on(a.f,a,!0));else if(a.da=new Nm(a,0,void 0,void 0,void 0),a.da.Ia=a.Pb,b=a.f,b=kn(b,b.jb()?a.cb:null,a.Qb),X(),!K||10<=fd)Tg(b,"TYPE","xmlhttp"),Sm(a.da,b,!1,a.cb,!1);else{Tg(b,"TYPE","html");var c=a.da;a=Boolean(a.cb);c.Wa=3;c.za=Vg(b.clone());bn(c,a)}}g.Kb=function(a){return this.f.Kb(a)};g.uc=function(){return!1};
g.Bc=function(a,b){this.xa=a.eb;if(0==this.fa)if(b){try{var c=this.h.parse(b)}catch(d){c=this.f;c.ia=this.xa;nn(c,2);return}this.cb=c[0];this.Ya=c[1]}else c=this.f,c.ia=this.xa,nn(c,2);else if(2==this.fa)if(this.zb)X(),this.Ub=w();else if("11111"==b){if(X(),this.zb=!0,this.pb=w(),c=this.pb-this.Qc,!K||10<=fd||500>c)this.xa=200,this.da.cancel(),X(),on(this.f,this,!0)}else X(),this.pb=this.Ub=w(),this.zb=!1};
g.ub=function(){this.xa=this.da.eb;if(this.da.ma)0==this.fa?this.Ya?(this.fa=1,ln(this)):(this.fa=2,mn(this)):2==this.fa&&(a=!1,(a=!K||10<=fd?this.zb:200>this.Ub-this.pb?!1:!0)?(X(),on(this.f,this,!0)):(X(),on(this.f,this,!1)));else{0==this.fa?X():2==this.fa&&X();var a=this.f;a.ia=this.xa;nn(a,2)}};g.jb=function(){return this.f.jb()};g.isActive=function(){return this.f.isActive()};g.la=function(a){this.f.la(a)};function pn(a){wm.call(this);this.headers=new Qd;this.P=a||null;this.h=!1;this.O=this.f=null;this.ra=this.F="";this.o=0;this.l="";this.j=this.Z=this.B=this.S=!1;this.A=0;this.J=null;this.sa="";this.K=this.ta=!1}x(pn,wm);var qn=/^https?$/i,rn=["POST","PUT"];g=pn.prototype;
g.send=function(a,b,c,d){if(this.f)throw Error("[goog.net.XhrIo] Object is active with another request="+this.F+"; newUri="+a);b=b?b.toUpperCase():"GET";this.F=a;this.l="";this.o=0;this.ra=b;this.S=!1;this.h=!0;this.f=this.P?Mm(this.P):Mm(Km);this.O=this.P?Im(this.P):Im(Km);this.f.onreadystatechange=v(this.Ac,this);try{um(sn(this,"Opening Xhr")),this.Z=!0,this.f.open(b,String(a),!0),this.Z=!1}catch(f){um(sn(this,"Error opening Xhr: "+f.message));tn(this,f);return}a=c||"";var e=this.headers.clone();
d&&Yd(d,function(a,b){Rd(e,b,a)});d=Pa(e.qa(),un);c=m.FormData&&a instanceof m.FormData;!A(rn,b)||d||c||Rd(e,"Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(a,b){this.f.setRequestHeader(b,a)},this);this.sa&&(this.f.responseType=this.sa);lb(this.f)&&(this.f.withCredentials=this.ta);try{vn(this),0<this.A&&(this.K=wn(this.f),um(sn(this,"Will abort after "+this.A+"ms if incomplete, xhr2 "+this.K)),this.K?(this.f.timeout=this.A,this.f.ontimeout=v(this.tc,this)):this.J=
Cm(this.tc,this.A,this)),um(sn(this,"Sending request")),this.B=!0,this.f.send(a),this.B=!1}catch(f){um(sn(this,"Send error: "+f.message)),tn(this,f)}};function wn(a){return K&&dd(9)&&ga(a.timeout)&&n(a.ontimeout)}function un(a){return"content-type"==a.toLowerCase()}g.tc=function(){"undefined"!=typeof aa&&this.f&&(this.l="Timed out after "+this.A+"ms, aborting",this.o=8,sn(this,this.l),xm(this,"timeout"),en(this,8))};
function tn(a,b){a.h=!1;a.f&&(a.j=!0,a.f.abort(),a.j=!1);a.l=b;a.o=5;xn(a);yn(a)}function xn(a){a.S||(a.S=!0,xm(a,"complete"),xm(a,"error"))}function en(a,b){a.f&&a.h&&(sn(a,"Aborting"),a.h=!1,a.j=!0,a.f.abort(),a.j=!1,a.o=b||7,xm(a,"complete"),xm(a,"abort"),yn(a))}g.G=function(){this.f&&(this.h&&(this.h=!1,this.j=!0,this.f.abort(),this.j=!1),yn(this,!0));pn.I.G.call(this)};g.Ac=function(){this.isDisposed()||(this.Z||this.B||this.j?zn(this):this.Xd())};g.Xd=function(){zn(this)};
function zn(a){if(a.h&&"undefined"!=typeof aa)if(a.O[1]&&4==Um(a)&&2==a.getStatus())sn(a,"Local request error detected and ignored");else if(a.B&&4==Um(a))Cm(a.Ac,0,a);else if(xm(a,"readystatechange"),4==Um(a)){sn(a,"Request complete");a.h=!1;try{var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=String(a.F).match(ke)[1]||null;if(!f&&m.self&&m.self.location)var h=m.self.location.protocol,
f=h.substr(0,h.length-1);e=!qn.test(f?f.toLowerCase():"")}d=e}if(d)xm(a,"complete"),xm(a,"success");else{a.o=6;var k;try{k=2<Um(a)?a.f.statusText:""}catch(l){k=""}a.l=k+" ["+a.getStatus()+"]";xn(a)}}finally{yn(a)}}}function yn(a,b){if(a.f){vn(a);var c=a.f,d=a.O[0]?t:null;a.f=null;a.O=null;b||xm(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function vn(a){a.f&&a.K&&(a.f.ontimeout=null);ga(a.J)&&(m.clearTimeout(a.J),a.J=null)}g.isActive=function(){return!!this.f};
function Um(a){return a.f?a.f.readyState:0}g.getStatus=function(){try{return 2<Um(this)?this.f.status:-1}catch(a){return-1}};function Vm(a){try{return a.f?a.f.responseText:""}catch(b){return""}}function sn(a,b){return b+" ["+a.ra+" "+a.F+" "+a.getStatus()+"]"};function An(a,b,c){this.B=a||null;this.f=1;this.h=[];this.o=[];this.l=new zm(null,!0);this.F=b||null;this.W=null!=c?c:null}function Bn(a,b){this.f=a;this.map=b;this.context=null}g=An.prototype;g.ab=null;g.X=null;g.L=null;g.Ob=null;g.qb=null;g.jc=null;g.rb=null;g.gb=0;g.Hd=0;g.T=null;g.Ca=null;g.wa=null;g.Ha=null;g.Aa=null;g.Cb=null;g.Sa=-1;g.vc=-1;g.ia=-1;g.bb=0;g.Qa=0;g.Ga=8;var Cn=new wm;function Dn(a){gf.call(this,"statevent",a)}x(Dn,gf);
function En(a,b){gf.call(this,"timingevent",a);this.size=b}x(En,gf);function Fn(a){gf.call(this,"serverreachability",a)}x(Fn,gf);g=An.prototype;g.connect=function(a,b,c,d,e){X();this.Ob=b;this.ab=c||{};d&&n(e)&&(this.ab.OSID=d,this.ab.OAID=e);this.Aa=new jn(this);this.Aa.Pb=null;this.Aa.h=this.l;this.Aa.connect(a)};
function Gn(a){Hn(a);if(3==a.f){var b=a.gb++,c=a.qb.clone();N(c,"SID",a.j);N(c,"RID",b);N(c,"TYPE","terminate");In(a,c);b=new Nm(a,0,a.j,b,void 0);b.Wa=2;b.za=Vg(c.clone());(new Image).src=b.za;b.ib=w();Tm(b)}Jn(a)}function Hn(a){if(a.Aa){var b=a.Aa;b.da&&(b.da.cancel(),b.da=null);b.xa=-1;a.Aa=null}a.L&&(a.L.cancel(),a.L=null);a.wa&&(m.clearTimeout(a.wa),a.wa=null);Kn(a);a.X&&(a.X.cancel(),a.X=null);a.Ca&&(m.clearTimeout(a.Ca),a.Ca=null)}
function Ln(a,b){if(0==a.f)throw Error("Invalid operation: sending map when state is closed");a.h.push(new Bn(a.Hd++,b));2!=a.f&&3!=a.f||Mn(a)}g.uc=function(){return 0==this.f};function Mn(a){a.X||a.Ca||(a.Ca=cn(v(a.Fc,a),0),a.bb=0)}g.Fc=function(a){this.Ca=null;Nn(this,a)};
function Nn(a,b){if(1==a.f){if(!b){a.gb=Math.floor(1E5*Math.random());var c=a.gb++,d=new Nm(a,0,"",c,void 0);d.Ia=null;var e=On(a),f=a.qb.clone();N(f,"RID",c);a.B&&N(f,"CVER",a.B);In(a,f);Qm(d,f,e);a.X=d;a.f=2}}else 3==a.f&&(b?Pn(a,b):0!=a.h.length&&(a.X||Pn(a)))}
function Pn(a,b){var c,d;b?6<a.Ga?(a.h=a.o.concat(a.h),a.o.length=0,c=a.gb-1,d=On(a)):(c=b.F,d=b.Ka):(c=a.gb++,d=On(a));var e=a.qb.clone();N(e,"SID",a.j);N(e,"RID",c);N(e,"AID",a.Sa);In(a,e);c=new Nm(a,0,a.j,c,a.bb+1);c.Ia=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.X=c;Qm(c,e,d)}function In(a,b){if(a.T){var c=a.T.pc(a);c&&db(c,function(a,c){N(b,c,a)})}}
function On(a){var b=Math.min(a.h.length,1E3),c=["count="+b],d;6<a.Ga&&0<b?(d=a.h[0].f,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var f=a.h[e].f,h=a.h[e].map,f=6>=a.Ga?e:f-d;try{Yd(h,function(a,b){c.push("req"+f+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.o=a.o.concat(a.h.splice(0,b));return c.join("&")}function Qn(a){a.L||a.wa||(a.A=1,a.wa=cn(v(a.Ec,a),0),a.Qa=0)}
function Rn(a){if(a.L||a.wa||3<=a.Qa)return!1;a.A++;a.wa=cn(v(a.Ec,a),Sn(a,a.Qa));a.Qa++;return!0}g.Ec=function(){this.wa=null;this.L=new Nm(this,0,this.j,"rpc",this.A);this.L.Ia=null;this.L.Rb=0;var a=this.jc.clone();N(a,"RID","rpc");N(a,"SID",this.j);N(a,"CI",this.Cb?"0":"1");N(a,"AID",this.Sa);In(this,a);if(!K||10<=fd)N(a,"TYPE","xmlhttp"),Sm(this.L,a,!0,this.rb,!1);else{N(a,"TYPE","html");var b=this.L,c=Boolean(this.rb);b.Wa=3;b.za=Vg(a.clone());bn(b,c)}};
function on(a,b,c){a.Cb=c;a.ia=b.xa;a.qd(1,0);a.qb=kn(a,null,a.Ob);Mn(a)}
g.Bc=function(a,b){if(0!=this.f&&(this.L==a||this.X==a))if(this.ia=a.eb,this.X==a&&3==this.f)if(7<this.Ga){var c;try{c=this.l.parse(b)}catch(f){c=null}if(da(c)&&3==c.length)if(0==c[0])a:{if(!this.wa){if(this.L)if(this.L.ib+3E3<this.X.ib)Kn(this),this.L.cancel(),this.L=null;else break a;Rn(this);X()}}else this.vc=c[1],0<this.vc-this.Sa&&37500>c[2]&&this.Cb&&0==this.Qa&&!this.Ha&&(this.Ha=cn(v(this.Id,this),6E3));else nn(this,11)}else"y2f%"!=b&&nn(this,11);else if(this.L==a&&Kn(this),!/^[\s\xa0]*$/.test(b)){c=
this.l.parse(b);da(c);for(var d=0;d<c.length;d++){var e=c[d];this.Sa=e[0];e=e[1];2==this.f?"c"==e[0]?(this.j=e[1],this.rb=e[2],e=e[3],null!=e?this.Ga=e:this.Ga=6,this.f=3,this.T&&this.T.nc(this),this.jc=kn(this,this.jb()?this.rb:null,this.Ob),Qn(this)):"stop"==e[0]&&nn(this,7):3==this.f&&("stop"==e[0]?nn(this,7):"noop"!=e[0]&&this.T&&this.T.mc(this,e),this.Qa=0)}}};g.Id=function(){null!=this.Ha&&(this.Ha=null,this.L.cancel(),this.L=null,Rn(this),X())};
function Kn(a){null!=a.Ha&&(m.clearTimeout(a.Ha),a.Ha=null)}
g.ub=function(a){var b;if(this.L==a)Kn(this),this.L=null,b=2;else if(this.X==a)this.X=null,b=1;else return;this.ia=a.eb;if(0!=this.f)if(a.ma)1==b?(w(),xm(Cn,new En(Cn,a.Ka?a.Ka.length:0)),Mn(this),this.o.length=0):Qn(this);else{var c=a.Ja,d;if(!(d=3==c||7==c||0==c&&0<this.ia)){if(d=1==b)this.X||this.Ca||1==this.f||2<=this.bb?d=!1:(this.Ca=cn(v(this.Fc,this,a),Sn(this,this.bb)),this.bb++,d=!0);d=!(d||2==b&&Rn(this))}if(d)switch(c){case 1:nn(this,5);break;case 4:nn(this,10);break;case 3:nn(this,6);
break;case 7:nn(this,12);break;default:nn(this,2)}}};function Sn(a,b){var c=5E3+Math.floor(1E4*Math.random());a.isActive()||(c*=2);return c*b}g.qd=function(a){if(!A(arguments,this.f))throw Error("Unexpected channel state: "+this.f);};function nn(a,b){if(2==b||9==b){var c=null;a.T&&(c=null);var d=v(a.Ae,a);c||(c=new Cg("//www.google.com/images/cleardot.gif"),Vg(c));gn(c.toString(),1E4,d)}else X();Tn(a,b)}g.Ae=function(a){a?X():(X(),Tn(this,8))};function Tn(a,b){a.f=0;a.T&&a.T.lc(a,b);Jn(a);Hn(a)}
function Jn(a){a.f=0;a.ia=-1;if(a.T)if(0==a.o.length&&0==a.h.length)a.T.Ib(a);else{var b=Xa(a.o),c=Xa(a.h);a.o.length=0;a.h.length=0;a.T.Ib(a,b,c)}}function kn(a,b,c){var d=Wg(c);if(""!=d.h)b&&Eg(d,b+"."+d.h),Fg(d,d.B);else var e=window.location,d=Xg(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.ab&&db(a.ab,function(a,b){N(d,b,a)});N(d,"VER",a.Ga);In(a,d);return d}g.Kb=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new pn;a.ta=!1;return a};
g.isActive=function(){return!!this.T&&this.T.isActive(this)};function cn(a,b){if(!ha(a))throw Error("Fn must not be null and must be a function");return m.setTimeout(function(){a()},b)}g.la=function(){xm(Cn,new Fn(Cn))};function X(){xm(Cn,new Dn(Cn))}g.jb=function(){return!(!K||10<=fd)};function Un(){}g=Un.prototype;g.nc=function(){};g.mc=function(){};g.lc=function(){};g.Ib=function(){};g.pc=function(){return{}};g.isActive=function(){return!0};function Vn(a,b){Am.call(this);this.l=0;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.B=a;vf(this,"tick",v(this.A,this));this.stop();Bm(this,5E3+2E4*Math.random())}x(Vn,Am);Vn.prototype.A=function(){if(500<this.f){var a=this.f;24E4>2*a&&(a*=2);Bm(this,a)}this.B()};Vn.prototype.start=function(){Vn.I.start.call(this);this.l=w()+this.f};Vn.prototype.stop=function(){this.l=0;Vn.I.stop.call(this)};function Wn(a,b){this.K=a;this.o=b;this.j=new F;this.h=new Vn(this.He,this);this.f=null;this.J=!1;this.A=null;this.W="";this.F=this.l=0;this.B=[]}x(Wn,Un);g=Wn.prototype;g.subscribe=function(a,b,c){return this.j.subscribe(a,b,c)};g.unsubscribe=function(a,b,c){return this.j.unsubscribe(a,b,c)};g.oa=function(a){return this.j.oa(a)};g.D=function(a,b){return this.j.D.apply(this.j,arguments)};g.dispose=function(){this.J||(this.J=!0,this.j.clear(),Xn(this),dc(this.j))};g.isDisposed=function(){return this.J};
function Yn(a){return{firstTestResults:[""],secondTestResults:!a.f.Cb,sessionId:a.f.j,arrayId:a.f.Sa}}g.connect=function(a,b,c){if(!this.f||2!=this.f.f){this.W="";this.h.stop();this.A=a||null;this.l=b||0;a=this.K+"/test";b=this.K+"/bind";var d=new An("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.f;e&&(e.T=null);d.T=this;this.f=d;e?this.f.connect(a,b,this.o,e.j,e.Sa):c?this.f.connect(a,b,this.o,c.sessionId,c.arrayId):this.f.connect(a,b,this.o)}};
function Xn(a,b){a.F=b||0;a.h.stop();a.f&&(3==a.f.f&&Nn(a.f),Gn(a.f));a.F=0}g.sendMessage=function(a,b){var c={_sc:a};b&&ub(c,b);this.h.enabled||2==(this.f?this.f.f:0)?this.B.push(c):this.f&&3==this.f.f&&Ln(this.f,c)};g.nc=function(){var a=this.h;a.stop();Bm(a,5E3+2E4*Math.random());this.A=null;this.l=0;if(this.B.length){a=this.B;this.B=[];for(var b=0,c=a.length;b<c;++b)Ln(this.f,a[b])}this.D("handlerOpened")};
g.lc=function(a,b){var c=2==b&&401==this.f.ia;if(4!=b&&!c){if(6==b||410==this.f.ia)c=this.h,c.stop(),Bm(c,500);this.h.start()}this.D("handlerError",b)};g.Ib=function(a,b,c){if(!this.h.enabled)this.D("handlerClosed");else if(c)for(a=0,b=c.length;a<b;++a)this.B.push(c[a].map)};g.pc=function(){var a={v:2};this.W&&(a.gsessionid=this.W);0!=this.l&&(a.ui=""+this.l);0!=this.F&&(a.ui=""+this.F);this.A&&ub(a,this.A);return a};
g.mc=function(a,b){if("S"==b[0])this.W=b[1];else if("gracefulReconnect"==b[0]){var c=this.h;c.stop();Bm(c,500);this.h.start();Gn(this.f)}else this.D("handlerMessage",new tm(b[0],b[1]))};function Zn(a,b){(a.o.loungeIdToken=b)||a.h.stop()}g.He=function(){this.h.stop();var a=this.f,b=0;a.L&&b++;a.X&&b++;0!=b?this.h.start():this.connect(this.A,this.l)};function $n(a){this.videoIds=null;this.index=-1;this.videoId=this.f="";this.volume=this.h=-1;this.l=!1;this.audioTrackId=null;this.A=this.o=0;this.j=null;this.reset(a)}function ao(a,b){if(a.f)throw Error(b+" is not allowed in V3.");}function bo(a){a.volume=-1;a.l=!1;a.audioTrackId=null;a.j=null;a.h=-1;a.o=0;a.A=w()}
$n.prototype.reset=function(a){this.videoIds=[];this.f="";this.index=-1;this.videoId="";bo(this);a&&(this.videoIds=a.videoIds,this.index=a.index,this.f=a.listId,this.videoId=a.videoId,this.h=a.playerState,this.volume=a.volume,this.l=a.muted,this.audioTrackId=a.audioTrackId,this.j=a.trackData,this.o=a.playerTime,this.A=a.playerTimeAt)};function co(a){return a.f?a.videoId:a.videoIds[a.index]}function eo(a){switch(a.h){case 1:return(w()-a.A)/1E3+a.o;case -1E3:return 0}return a.o}
$n.prototype.setVideoId=function(a){ao(this,"setVideoId");var b=this.index;this.index=La(this.videoIds,a);b!=this.index&&bo(this);return-1!=b};function fo(a,b,c){ao(a,"setPlaylist");c=c||co(a);ab(a.videoIds,b)&&c==co(a)||(a.videoIds=Xa(b),a.setVideoId(c))}$n.prototype.remove=function(a){ao(this,"remove");var b=co(this);return Ua(this.videoIds,a)?(this.index=La(this.videoIds,b),!0):!1};
function go(a){var b={};b.videoIds=Xa(a.videoIds);b.index=a.index;b.listId=a.f;b.videoId=a.videoId;b.playerState=a.h;b.volume=a.volume;b.muted=a.l;b.audioTrackId=a.audioTrackId;b.trackData=sb(a.j);b.playerTime=a.o;b.playerTimeAt=a.A;return b}$n.prototype.clone=function(){return new $n(go(this))};function Y(a,b,c){V.call(this);this.A=NaN;this.S=!1;this.J=this.F=this.P=this.K=NaN;this.Z=[];this.j=this.C=this.f=null;this.Na=a;this.Z.push(L(window,"beforeunload",v(this.Bd,this)));this.h=[];this.C=new $n;3==c["mdx-version"]&&(this.C.f="RQ"+b.token);this.ha=b.id;this.f=ho(this,c);this.f.subscribe("handlerOpened",this.Nd,this);this.f.subscribe("handlerClosed",this.Jd,this);this.f.subscribe("handlerError",this.Kd,this);this.C.f?this.f.subscribe("handlerMessage",this.Ld,this):this.f.subscribe("handlerMessage",
this.Md,this);Zn(this.f,b.token);this.subscribe("remoteQueueChange",function(){var a=this.C.videoId;Jk()&&T("yt-remote-session-video-id",a)},this)}x(Y,V);g=Y.prototype;
g.connect=function(a,b){if(b){if(this.C.f){var c=b.listId,d=b.videoId,e=b.index,f=b.currentTime||0;5>=f&&(f=0);h={videoId:d,currentTime:f};c&&(h.listId=c);n(e)&&(h.currentIndex=e);c&&(this.C.f=c);this.C.videoId=d;this.C.index=e||0}else{var d=b.videoIds[b.index],f=b.currentTime||0;5>=f&&(f=0);var h={videoIds:d,videoId:d,currentTime:f};this.C.videoIds=[d];this.C.index=0}this.C.state=3;c=this.C;c.o=f;c.A=w();this.H("Connecting with setPlaylist and params: "+M(h));this.f.connect({method:"setPlaylist",
params:M(h)},a,Nk())}else this.H("Connecting without params"),this.f.connect({},a,Nk());io(this)};g.dispose=function(){this.isDisposed()||(this.D("beforeDispose"),jo(this,3));Y.I.dispose.call(this)};g.G=function(){ko(this);lo(this);mo(this);I(this.F);this.F=NaN;I(this.J);this.J=NaN;this.j=null;Jd(this.Z);this.Z.length=0;this.f.dispose();Y.I.G.call(this);this.h=this.C=this.f=null};g.H=function(a){Wj("conn",a)};g.Bd=function(){this.l(2)};function ho(a,b){return new Wn(kk(a.Na,"/bc",void 0,!1),b)}
function jo(a,b){a.D("proxyStateChange",b)}function io(a){a.A=H(v(function(){this.H("Connecting timeout");this.l(1)},a),2E4)}function ko(a){I(a.A);a.A=NaN}function mo(a){I(a.K);a.K=NaN}function no(a){lo(a);a.P=H(v(function(){oo(this,"getNowPlaying")},a),2E4)}function lo(a){I(a.P);a.P=NaN}function po(a){var b=a.f;return!!b.f&&3==b.f.f&&isNaN(a.A)}
g.Nd=function(){this.H("Channel opened");this.S&&(this.S=!1,mo(this),this.K=H(v(function(){this.H("Timing out waiting for a screen.");this.l(1)},this),15E3));Wk(Yn(this.f),this.ha)};g.Jd=function(){this.H("Channel closed");isNaN(this.A)?Xk(!0):Xk();this.dispose()};g.Kd=function(a){Xk();isNaN(this.B())?(this.H("Channel error: "+a+" without reconnection"),this.dispose()):(this.S=!0,this.H("Channel error: "+a+" with reconnection in "+this.B()+" ms"),jo(this,2))};
function qo(a,b){b&&(ko(a),mo(a));b==po(a)?b&&(jo(a,1),oo(a,"getSubtitlesTrack")):b?(a.O()&&a.C.reset(),jo(a,1),oo(a,"getNowPlaying"),ro(a)):a.l(1)}function so(a,b){var c=b.params.videoId;delete b.params.videoId;c==a.C.videoId&&(pb(b.params)?a.C.j=null:a.C.j=b.params,a.D("remotePlayerChange"))}
function to(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10);a.C.f=b.params.listId||a.C.f;var e=a.C,f=e.videoId;e.videoId=c;e.index=d;c!=f&&bo(e);a.D("remoteQueueChange")}function uo(a,b){b.params=b.params||{};to(a,b);vo(a,b)}
function vo(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10),d=a.C;d.o=isNaN(c)?0:c;d.A=w();c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;-1==c&&-1E3==a.C.h&&(c=-1E3);a.C.h=c;1==a.C.h?no(a):lo(a);a.D("remotePlayerChange")}function wo(a,b){var c="true"==b.params.muted;a.C.volume=parseInt(b.params.volume,10);a.C.l=c;a.D("remotePlayerChange")}
g.Ld=function(a){a.params?this.H("Received: action="+a.action+", params="+M(a.params)):this.H("Received: action="+a.action+" {}");switch(a.action){case "loungeStatus":a=ce(a.params.devices);this.h=z(a,function(a){return new Ek(a)});a=!!Pa(this.h,function(a){return"LOUNGE_SCREEN"==a.type});qo(this,a);break;case "loungeScreenConnected":qo(this,!0);break;case "loungeScreenDisconnected":Va(this.h,function(a){return"LOUNGE_SCREEN"==a.type});qo(this,!1);break;case "remoteConnected":var b=new Ek(ce(a.params.device));
Pa(this.h,function(a){return a.equals(b)})||Ta(this.h,b);break;case "remoteDisconnected":b=new Ek(ce(a.params.device));Va(this.h,function(a){return a.equals(b)});break;case "gracefulDisconnect":break;case "playlistModified":to(this,a);break;case "nowPlaying":uo(this,a);break;case "onStateChange":vo(this,a);break;case "onVolumeChanged":wo(this,a);break;case "onSubtitlesTrackChanged":so(this,a);break;default:this.H("Unrecognized action: "+a.action)}};
g.Md=function(a){a.params?this.H("Received: action="+a.action+", params="+M(a.params)):this.H("Received: action="+a.action);xo(this,a);yo(this,a);if(po(this)){var b=this.C.clone(),c=!1,d,e,f,h,k,l;a.params&&(d=a.params.videoId||a.params.video_id,e=a.params.videoIds||a.params.video_ids,f=a.params.state,h=a.params.currentTime||a.params.current_time,k=a.params.volume,l=a.params.muted,n(a.params.currentError)&&ce(a.params.currentError));if("onSubtitlesTrackChanged"==a.action)d==co(this.C)&&(delete a.params.videoId,
pb(a.params)?this.C.j=null:this.C.j=a.params,this.D("remotePlayerChange"));else if(co(this.C)||"onStateChange"!=a.action){"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d||(d=co(this.C)):this.C.setVideoId(""),e&&(e=e.split(","),fo(this.C,e,d))):fo(this.C,[]);e=this.C;var q=d;ao(e,"add");q&&!A(e.videoIds,q)?(e.videoIds.push(q),e=!0):e=!1;e&&oo(this,"getPlaylist");d&&this.C.setVideoId(d);b.index==this.C.index&&ab(b.videoIds,
this.C.videoIds)?"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||this.D("remoteQueueChange"):this.D("remoteQueueChange");n(f)&&(a=parseInt(f,10),a=isNaN(a)?-1:a,-1==a&&-1E3==this.C.h&&(a=-1E3),0==a&&"0"==h&&(a=-1),c=c||a!=this.C.h,this.C.h=a,1==this.C.h?no(this):lo(this));h&&(a=parseInt(h,10),c=this.C,c.o=isNaN(a)?0:a,c.A=w(),c=!0);n(k)&&(a=parseInt(k,10),isNaN(a)||(c=c||this.C.volume!=a,this.C.volume=a),n(l)&&(l="true"==l,c=c||this.C.l!=l,this.C.l=l));c&&this.D("remotePlayerChange")}}};
function xo(a,b){switch(b.action){case "loungeStatus":var c=ce(b.params.devices);a.h=z(c,function(a){return new Ek(a)});break;case "loungeScreenDisconnected":Va(a.h,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new Ek(ce(b.params.device));Pa(a.h,function(a){return a.equals(d)})||Ta(a.h,d);break;case "remoteDisconnected":d=new Ek(ce(b.params.device)),Va(a.h,function(a){return a.equals(d)})}}
function yo(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Pa(a.h,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;if(!isNaN(a.K))if(c)mo(a);else return;c==po(a)?c&&jo(a,1):c?(ko(a),a.O()&&a.C.reset(),jo(a,1),oo(a,"getNowPlaying"),ro(a)):a.l(1)}g.qe=function(){if(this.j){var a=this.j;this.j=null;this.C.videoId!=a&&oo(this,"getNowPlaying")}};Y.prototype.subscribe=Y.prototype.subscribe;
Y.prototype.unsubscribeByKey=Y.prototype.oa;Y.prototype.ta=function(){var a=3;this.isDisposed()||(a=0,isNaN(this.B())?po(this)&&(a=1):a=2);return a};Y.prototype.getProxyState=Y.prototype.ta;Y.prototype.l=function(a){this.H("Disconnecting with "+a);ko(this);this.D("beforeDisconnect",a);1==a&&Xk();Xn(this.f,a);this.dispose()};Y.prototype.disconnect=Y.prototype.l;Y.prototype.sa=function(){var a=this.C;if(this.j){var b=a=this.C.clone(),c=this.j,d=a.index,e=b.videoId;b.videoId=c;b.index=d;c!=e&&bo(b)}return go(a)};
Y.prototype.getPlayerContextData=Y.prototype.sa;Y.prototype.Ma=function(a){var b=new $n(a);b.videoId&&b.videoId!=this.C.videoId&&(this.j=b.videoId,I(this.F),this.F=H(v(this.qe,this),5E3));var c=[];this.C.f==b.f&&this.C.videoId==b.videoId&&this.C.index==b.index&&ab(this.C.videoIds,b.videoIds)||c.push("remoteQueueChange");this.C.h==b.h&&this.C.volume==b.volume&&this.C.l==b.l&&eo(this.C)==eo(b)&&M(this.C.j)==M(b.j)||c.push("remotePlayerChange");this.C.reset(a);y(c,function(a){this.D(a)},this)};
Y.prototype.setPlayerContextData=Y.prototype.Ma;Y.prototype.ra=function(){return this.f.o.loungeIdToken};Y.prototype.getLoungeToken=Y.prototype.ra;Y.prototype.O=function(){var a=this.f.o.id,b=Pa(this.h,function(b){return"REMOTE_CONTROL"==b.type&&b.id!=a});return b?b.id:""};Y.prototype.getOtherConnectedRemoteId=Y.prototype.O;Y.prototype.B=function(){var a=this.f;return a.h.enabled?a.h.l-w():NaN};Y.prototype.getReconnectTimeout=Y.prototype.B;
Y.prototype.Oa=function(){if(!isNaN(this.B())){var a=this.f.h;a.enabled&&(a.stop(),a.start(),a.A())}};Y.prototype.reconnect=Y.prototype.Oa;function ro(a){I(a.J);a.J=H(v(a.l,a,1),864E5)}function oo(a,b,c){c?a.H("Sending: action="+b+", params="+M(c)):a.H("Sending: action="+b);a.f.sendMessage(b,c)}Y.prototype.ya=function(a,b){oo(this,a,b);ro(this)};Y.prototype.sendMessage=Y.prototype.ya;function zo(a){V.call(this);this.l=0;this.ka=Ao();this.$a=NaN;this.xb="";this.A=a;this.H("Initializing local screens: "+hk(this.ka));this.j=Bo();this.H("Initializing account screens: "+hk(this.j));this.Jb=null;this.f=[];this.h=[];Co(this,om()||[]);this.H("Initializing DIAL devices: "+ok(this.h));a=fk(Tk());Do(this,a);this.H("Initializing online screens: "+hk(this.f));this.l=w()+3E5;Eo(this)}x(zo,V);var Fo=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=zo.prototype;g.H=function(a){Wj("RM",a)};
g.M=function(a){Wj("RM",a)};function Bo(){var a=Ao(),b=fk(Tk());return Ma(b,function(b){return!wk(a,b)})}function Ao(){var a=fk(Pk());return Ma(a,function(a){return!a.f})}function Eo(a){uc("yt-remote-cast-device-list-update",function(){var a=om();Co(this,a||[])},a);uc("yt-remote-cast-device-status-update",a.De,a);a.Lc();var b=w()>a.l?2E4:1E4;lc(v(a.Lc,a),b)}g.D=function(a,b){if(this.isDisposed())return!1;this.H("Firing "+a);return this.o.D.apply(this.o,arguments)};
g.Lc=function(){var a=om()||[];0==a.length||Co(this,a);a=Go(this);0==a.length||(Na(a,function(a){return!wk(this.j,a)},this)&&Rk()?Ho(this):Io(this,a))};function Jo(a,b){var c=Go(a);return Ma(b,function(a){return a.f?(a=vk(this.h,a.f),!!a&&"RUNNING"==a.status):!!wk(c,a)},a)}
function Co(a,b){var c=!1;y(b,function(a){var b=xk(this.ka,a.id);b&&b.name!=a.name&&(this.H("Renaming screen id "+b.id+" from "+b.name+" to "+a.name),b.name=a.name,c=!0)},a);c&&(a.H("Renaming due to DIAL."),Ko(a));Uk(sk(b));var d=!ab(a.h,b,uk);d&&a.H("Updating DIAL devices: "+ok(a.h)+" to "+ok(b));a.h=b;Do(a,a.f);d&&a.D("onlineReceiverChange")}
g.De=function(a){var b=vk(this.h,a.id);b&&(this.H("Updating DIAL device: "+b.id+"("+b.name+") from status: "+b.status+" to status: "+a.status+" and from activityId: "+b.f+" to activityId: "+a.f),b.f=a.f,b.status=a.status,Uk(sk(this.h)));Do(this,this.f)};function Do(a,b,c){var d=Jo(a,b),e=!ab(a.f,d,ck);if(e||c)0==b.length||Sk(z(d,dk));e&&(a.H("Updating online screens: "+hk(a.f)+" -> "+hk(d)),a.f=d,a.D("onlineReceiverChange"))}
function Io(a,b){var c=[],d={};y(b,function(a){a.token&&(d[a.token]=a,c.push(a.token))});var e={method:"POST",R:{lounge_token:c.join(",")},context:a,ca:function(a,b){var c=[];y(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.Jb?Lo(this,this.Jb):null;e&&!wk(c,e)&&c.push(e);Do(this,c,!0)}};Ce(kk(a.A,"/pairing/get_screen_availability"),e)}
function Ho(a){var b=Go(a),c=z(b,function(a){return a.id});0!=c.length&&(a.H("Updating lounge tokens for: "+M(c)),Ce(kk(a.A,"/pairing/get_lounge_token_batch"),{R:{screen_ids:c.join(",")},method:"POST",context:a,ca:function(a,c){Mo(this,c.screens||[]);this.ka=Ma(this.ka,function(a){return!!a.token});Ko(this);Io(this,b)}}))}function Mo(a,b){y(Wa(a.ka,a.j),function(a){var d=Pa(b,function(b){return a.id==b.screenId});d&&(a.token=d.loungeToken)})}
function Ko(a){var b=Ao();ab(a.ka,b,ck)||(a.H("Saving local screens: "+hk(b)+" to "+hk(a.ka)),Ok(z(a.ka,dk)),Do(a,a.f,!0),Co(a,om()||[]),a.D("managedScreenChange",Go(a)))}function No(a,b,c){var d=Qa(b,function(a){return bk(c,a)}),e=0>d;0>d?b.push(c):b[d]=c;wk(a.f,c)||a.f.push(c);return e}g.sc=function(a,b){for(var c=Go(this),c=z(c,function(a){return a.name}),d=a,e=2;A(c,d);)d=b.call(m,e),e++;return d};
g.Hc=function(a,b,c){var d=!1;b>=Fo.length&&(this.H("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=vk(this.h,a);if(!e)this.H("Pairing DIAL device "+a+" with "+c+" failed: no device for "+a),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.H("Pairing DIAL device "+a+" with "+c+" failed: launch error on "+a),d=!0;d?(Oo(this),this.D("screenPair",null)):Ce(kk(this.A,"/pairing/get_screen"),{method:"POST",R:{pairing_code:c},context:this,ca:function(a,b){if(c==this.xb){Oo(this);var d=
new Zj(b.screen);d.name=e.name;d.f=e.id;this.H("Pairing "+c+" succeeded.");var l=No(this,this.ka,d);this.H("Paired with "+(l?"a new":"an old")+" local screen:"+gk(d));Ko(this);this.D("screenPair",d)}},onError:function(){c==this.xb&&(this.H("Polling pairing code: "+c),I(this.$a),this.$a=H(v(this.Hc,this,a,b+1,c),Fo[b]))}})};
function Po(a,b,c){var d=Z,e="";Oo(d);if(vk(d.h,a)){if(!e){var f=e=pk();hm();var h=qm(a),k=em();if(k&&h){var l=new cast.Receiver(h.id,h.name),l=new cast.LaunchRequest("YouTube",l);l.parameters="pairingCode="+f;l.description=new cast.LaunchDescription;l.description.text=document.title;b&&(l.parameters+="&v="+b,c&&(l.parameters+="&t="+Math.round(c)),l.description.url="http://i.ytimg.com/vi/"+b+"/default.jpg");"UNKNOWN"!=h.status&&(h.status="UNKNOWN",mm(h),J("yt-remote-cast-device-status-update",h));
cm("Sending a cast launch request with params: "+l.parameters);k.launch(l,pa(rm,a))}else cm("No cast API or no cast device. Dropping cast launch.")}d.xb=e;d.$a=H(v(d.Hc,d,a,0,e),Fo[0])}else d.H("No DIAL device with id: "+a)}function Oo(a){I(a.$a);a.$a=NaN;a.xb=""}function Lo(a,b){var c=xk(Go(a),b);a.H("Found screen: "+gk(c)+" with key: "+b);return c}function Qo(a){var b=Z,c=xk(b.f,a);b.H("Found online screen: "+gk(c)+" with key: "+a);return c}
function Ro(a){var b=Z,c=vk(b.h,a);if(!c){var d=xk(b.ka,a);d&&(c=vk(b.h,d.f))}b.H("Found DIAL: "+(c?c.toString():"null")+" with key: "+a);return c}function Go(a){return Wa(a.j,Ma(a.ka,function(a){return!wk(this.j,a)},a))};function So(a){yk.call(this,"ScreenServiceProxy");this.V=a;this.f=[];this.f.push(this.V.$_s("screenChange",v(this.Le,this)));this.f.push(this.V.$_s("onlineScreenChange",v(this.Td,this)))}x(So,yk);g=So.prototype;g.$=function(a){return this.V.$_gs(a)};g.contains=function(a){return!!this.V.$_c(a)};g.get=function(a){return this.V.$_g(a)};g.start=function(){this.V.$_st()};g.Eb=function(a,b,c){this.V.$_a(a,b,c)};g.remove=function(a,b,c){this.V.$_r(a,b,c)};g.Bb=function(a,b,c,d){this.V.$_un(a,b,c,d)};
g.G=function(){for(var a=0,b=this.f.length;a<b;++a)this.V.$_ubk(this.f[a]);this.f.length=0;this.V=null;So.I.G.call(this)};g.Le=function(){this.D("screenChange")};g.Td=function(){this.D("onlineScreenChange")};W.prototype.$_st=W.prototype.start;W.prototype.$_gspc=W.prototype.Me;W.prototype.$_gsppc=W.prototype.Uc;W.prototype.$_c=W.prototype.contains;W.prototype.$_g=W.prototype.get;W.prototype.$_a=W.prototype.Eb;W.prototype.$_un=W.prototype.Bb;W.prototype.$_r=W.prototype.remove;W.prototype.$_gs=W.prototype.$;
W.prototype.$_gos=W.prototype.Tc;W.prototype.$_s=W.prototype.subscribe;W.prototype.$_ubk=W.prototype.oa;function To(){var a=!!G("MDX_ENABLE_CASTV2"),b=!!G("MDX_ENABLE_QUEUE"),c={device:"Desktop",app:"youtube-desktop"};a?p("yt.mdx.remote.castv2_",!0,void 0):hm();oj&&nj();Gk();Uo||(Uo=new jk,Yk()&&(Uo.f="/api/loungedev"));Z||a||(Z=new zo(Uo),Z.subscribe("screenPair",Vo),Z.subscribe("managedScreenChange",Wo),Z.subscribe("onlineReceiverChange",function(){J("yt-remote-receiver-availability-change")}));Xo||(Xo=r("yt.mdx.remote.deferredProxies_")||[],p("yt.mdx.remote.deferredProxies_",Xo,void 0));Yo(b);b=
Zo();if(a&&!b){var d=new W(Uo);p("yt.mdx.remote.screenService_",d,void 0);b=Zo();Hl(d,function(a){a?$o()&&$l($o(),"YouTube TV"):d.subscribe("onlineScreenChange",function(){J("yt-remote-receiver-availability-change")})},!(!c||!c.loadCastApiSetupScript))}if(c&&!r("yt.mdx.remote.initialized_")){p("yt.mdx.remote.initialized_",!0,void 0);ap("Initializing: "+M(c));bp.push(uc("yt-remote-cast2-availability-change",function(){J("yt-remote-receiver-availability-change")}));bp.push(uc("yt-remote-cast2-receiver-selected",
function(){cp(null);J("yt-remote-auto-connect","cast-selector-receiver")}));bp.push(uc("yt-remote-cast2-session-change",dp));bp.push(uc("yt-remote-connection-change",function(a){a?$l($o(),"YouTube TV"):ep()||($l(null,null),Wl())}));var e=fp();c.isAuto&&(e.id+="#dial");e.name=c.device;e.app=c.app;ap(" -- with channel params: "+M(e));gp(e);a&&b.start();$o()||hp()}}
function ip(){wc(bp);bp.length=0;dc(kp);kp=null;Xo&&(y(Xo,function(a){a(null)}),Xo.length=0,Xo=null,p("yt.mdx.remote.deferredProxies_",null,void 0));Z&&(dc(Z),Z=null);Uo=null;lm()}function lp(){if(mp()&&Ul()){var a=[];if(U("yt-remote-cast-available")||r("yt.mdx.remote.cloudview.castButtonShown_")||np())a.push({key:"cast-selector-receiver",name:op()}),p("yt.mdx.remote.cloudview.castButtonShown_",!0,void 0);return a}return r("yt.mdx.remote.cloudview.initializing_")?[]:pp()}
function pp(){var a=[],a=qp()?Zo().V.$_gos():fk(Tk()),b=rp();b&&np()&&(wk(a,b)||a.push(b));qp()||(b=tk(Vk()),b=Ma(b,function(b){return!xk(a,b.id)}),a=Wa(a,b));return rk(a)}function sp(){if(mp()&&Ul()){var a=Vl();return a?{key:"cast-selector-receiver",name:a}:null}return tp()}function tp(){var a=pp(),b=up(),c=rp();c||(c=ep());return Pa(a,function(a){return c&&ak(c,a.key)||b&&(a=Ro(a.key))&&a.id==b?!0:!1})}function op(){if(mp()&&Ul())return Vl();var a=rp();return a?a.name:null}
function rp(){var a=$o();if(!a)return null;if(!Z){var b=Zo().$();return xk(b,a)}return Lo(Z,a)}function dp(a){ap("remote.onCastSessionChange_: "+gk(a));if(a){var b=rp();b&&b.id==a.id?$l(b.id,"YouTube TV"):(b&&vp(),wp(a,1))}else vp()}function xp(a,b){ap("Connecting to: "+M(a));if("cast-selector-receiver"==a.key)cp(b||null),Zl(b||null);else{vp();cp(b||null);var c=null;Z?c=Qo(a.key):(c=Zo().$(),c=xk(c,a.key));if(c)wp(c,1);else{if(Z&&(c=Ro(a.key))){yp(c);return}H(function(){zp(null)},0)}}}
function vp(){Z&&Oo(Z);a:{var a=np();if(a&&(a=a.getOtherConnectedRemoteId())){ap("Do not stop DIAL due to "+a);Ap("");break a}(a=up())?(ap("Stopping DIAL: "+a),sm(a),Ap("")):(a=rp())&&a.f&&(ap("Stopping DIAL: "+a.f),sm(a.f))}Yl()?Ql().stopSession():Nl("stopSession called before API ready.");(a=np())?a.disconnect(1):(xc("yt-remote-before-disconnect",1),xc("yt-remote-connection-change",!1));zp(null)}function ap(a){Wj("remote",a)}function mp(){return!!r("yt.mdx.remote.castv2_")}
function qp(){return r("yt.mdx.remote.screenService_")}function Zo(){if(!kp){var a=qp();kp=a?new So(a):null}return kp}function $o(){return r("yt.mdx.remote.currentScreenId_")}function Bp(a){p("yt.mdx.remote.currentScreenId_",a,void 0);if(Z){var b=Z;b.l=w()+3E5;if((b.Jb=a)&&(a=Lo(b,a))&&!wk(b.f,a)){var c=Xa(b.f);c.push(a);Do(b,c,!0)}}}function up(){return r("yt.mdx.remote.currentDialId_")}function Ap(a){p("yt.mdx.remote.currentDialId_",a,void 0)}
function Cp(){return r("yt.mdx.remote.connectData_")}function cp(a){p("yt.mdx.remote.connectData_",a,void 0)}function np(){return r("yt.mdx.remote.connection_")}function zp(a){var b=np();cp(null);a?Ka(!np()):(Bp(""),Ap(""));p("yt.mdx.remote.connection_",a,void 0);Xo&&(y(Xo,function(b){b(a)}),Xo.length=0);b&&!a?xc("yt-remote-connection-change",!1):!b&&a&&J("yt-remote-connection-change",!0)}function ep(){var a=Jk();if(!a)return null;if(qp()){var b=Zo().$();return xk(b,a)}return Z?Lo(Z,a):null}
function wp(a,b){Ka(!$o());Bp(a.id);var c=new Y(Uo,a,fp());c.connect(b,Cp());c.subscribe("beforeDisconnect",function(a){xc("yt-remote-before-disconnect",a)});c.subscribe("beforeDispose",function(){np()&&(np(),zp(null))});zp(c)}function yp(a){up();ap("Connecting to: "+(a?a.toString():"null"));Ap(a.id);var b=Cp();b?Po(a.id,b.videoIds[b.index],b.currentTime):Po(a.id)}
function hp(){var a=ep();a?(ap("Resume connection to: "+gk(a)),wp(a,0)):(Xk(),Wl(),ap("Skipping connecting because no session screen found."))}function Vo(a){ap("Paired with: "+gk(a));a?wp(a,1):zp(null)}function Wo(){var a=$o();a&&!rp()&&(ap("Dropping current screen with id: "+a),vp());ep()||Xk()}var Uo=null,Xo=null,kp=null,Z=null;
function Yo(a){var b=fp();if(pb(b)){var b=Ik(),c=U("yt-remote-session-name")||"",d=U("yt-remote-session-app")||"",b={device:"REMOTE_CONTROL",id:b,name:c,app:d};a&&(b["mdx-version"]=3);p("yt.mdx.remote.channelParams_",b,void 0)}}function fp(){return r("yt.mdx.remote.channelParams_")||{}}function gp(a){a?(T("yt-remote-session-app",a.app),T("yt-remote-session-name",a.name)):(qj("yt-remote-session-app"),qj("yt-remote-session-name"));p("yt.mdx.remote.channelParams_",a,void 0)}var bp=[];var Dp=null,Ep=[];function Fp(){Gp();if(sp()){var a=Dp;"html5"!=a.getPlayerType()&&a.loadNewVideoConfig(a.getCurrentVideoConfig(),"html5")}}function Hp(a){"cast-selector-receiver"==a?Xl():Ip(a)}
function Ip(a){var b=lp();if(a=qk(b,a)){var c=Dp,d=c.getVideoData().video_id,e=c.getVideoData().list,f=c.getCurrentTime();xp(a,{videoIds:[d],listId:e,videoId:d,index:0,currentTime:f});"html5"!=c.getPlayerType()?c.loadNewVideoConfig(c.getCurrentVideoConfig(),"html5"):c.updateRemoteReceivers&&c.updateRemoteReceivers(b,a)}}function Gp(){var a=Dp;a&&a.updateRemoteReceivers&&a.updateRemoteReceivers(lp(),sp())};var Jp=null,Kp=[];function Lp(a){return{externalChannelId:a.externalChannelId,Gd:!!a.isChannelPaid,source:a.source,subscriptionId:a.subscriptionId}}function Mp(a){Np(Lp(a))}function Np(a){Ci()?(Q(pi,new ji(a.externalChannelId,a.Gd?{itemType:"U",itemId:a.externalChannelId}:null)),(a="/gen_204?"+re({event:"subscribe",source:a.source}))&&fh(a)):Op(a)}function Op(a){Bi(function(b){b.subscription_ajax&&Np(a)},null)}
function Pp(a){a=Lp(a);Q(ui,new li(a.externalChannelId,a.subscriptionId,null));(a="/gen_204?"+re({event:"unsubscribe",source:a.source}))&&fh(a)}function Qp(a){Jp&&Jp.channelSubscribed(a.f,a.subscriptionId)}function Rp(a){Jp&&Jp.channelUnsubscribed(a.f)};function Sp(a){D.call(this);this.h=a;this.h.subscribe("command",this.Kc,this);this.j={};this.o=!1}x(Sp,D);g=Sp.prototype;g.start=function(){this.o||this.isDisposed()||(this.o=!0,Tp(this.h,"RECEIVING"))};
g.Kc=function(a,b){if(this.o&&!this.isDisposed()){var c=b||{};switch(a){case "addEventListener":if(u(c.event)&&(c=c.event,!(c in this.j))){var d=v(this.se,this,c);this.j[c]=d;this.addEventListener(c,d)}break;case "removeEventListener":u(c.event)&&Up(this,c.event);break;default:this.f.isReady()&&this.f[a]&&(c=Vp(a,b||{}),c=this.f[a].apply(this.f,c),(c=Wp(a,c))&&this.o&&!this.isDisposed()&&Tp(this.h,a,c))}}};g.se=function(a,b){this.o&&!this.isDisposed()&&Tp(this.h,a,this.Lb(a,b))};
g.Lb=function(a,b){if(null!=b)return{value:b}};function Up(a,b){b in a.j&&(a.removeEventListener(b,a.j[b]),delete a.j[b])}g.G=function(){this.h.unsubscribe("command",this.Kc,this);this.h=null;for(var a in this.j)Up(this,a);Sp.I.G.call(this)};function Xp(a,b){Sp.call(this,b);this.f=a;this.start()}x(Xp,Sp);Xp.prototype.addEventListener=function(a,b){this.f.addEventListener(a,b)};Xp.prototype.removeEventListener=function(a,b){this.f.removeEventListener(a,b)};
function Vp(a,b){switch(a){case "loadVideoById":return b=vj(b),xj(b),[b];case "cueVideoById":return b=vj(b),xj(b),[b];case "loadVideoByPlayerVars":return xj(b),[b];case "cueVideoByPlayerVars":return xj(b),[b];case "loadPlaylist":return b=wj(b),xj(b),[b];case "cuePlaylist":return b=wj(b),xj(b),[b];case "seekTo":return[b.seconds,b.allowSeekAhead];case "playVideoAt":return[b.index];case "setVolume":return[b.volume];case "setPlaybackQuality":return[b.suggestedQuality];case "setPlaybackRate":return[b.suggestedRate];
case "setLoop":return[b.loopPlaylists];case "setShuffle":return[b.shufflePlaylist];case "getOptions":return[b.module];case "getOption":return[b.module,b.option];case "setOption":return[b.module,b.option,b.value];case "handleGlobalKeyDown":return[b.keyCode,b.shiftKey]}return[]}
function Wp(a,b){switch(a){case "isMuted":return{muted:b};case "getVolume":return{volume:b};case "getPlaybackRate":return{playbackRate:b};case "getAvailablePlaybackRates":return{availablePlaybackRates:b};case "getVideoLoadedFraction":return{videoLoadedFraction:b};case "getPlayerState":return{playerState:b};case "getCurrentTime":return{currentTime:b};case "getPlaybackQuality":return{playbackQuality:b};case "getAvailableQualityLevels":return{availableQualityLevels:b};case "getDuration":return{duration:b};
case "getVideoUrl":return{videoUrl:b};case "getVideoEmbedCode":return{videoEmbedCode:b};case "getPlaylist":return{playlist:b};case "getPlaylistIndex":return{playlistIndex:b};case "getOptions":return{options:b};case "getOption":return{option:b}}}
Xp.prototype.Lb=function(a,b){switch(a){case "onReady":return;case "onStateChange":return{playerState:b};case "onPlaybackQualityChange":return{playbackQuality:b};case "onPlaybackRateChange":return{playbackRate:b};case "onError":return{errorCode:b}}return Xp.I.Lb.call(this,a,b)};Xp.prototype.G=function(){Xp.I.G.call(this);delete this.f};function Yp(){var a=this.h=new Zi,b=v(this.oe,this);a.h=b;a.j=null;this.o=[];this.B=!1;this.l=(a=G("POST_MESSAGE_ORIGIN"))&&ah(a)?a:null;this.A={}}g=Yp.prototype;g.oe=function(a,b){if(this.l&&this.l!=this.h.origin)this.dispose();else if("addEventListener"==a&&b){var c=b[0];this.A[c]||"onReady"==c||(this.addEventListener(c,Zp(this,c)),this.A[c]=!0)}else this.Xc(a,b)};g.Xc=function(){};function Zp(a,b){return v(function(a){this.sendMessage(b,a)},a)}g.addEventListener=function(){};
g.ud=function(){this.B=!0;this.sendMessage("initialDelivery",this.Mb());this.sendMessage("onReady");y(this.o,this.Yc,this);this.o=[]};g.Mb=function(){return null};function $p(a,b){a.sendMessage("infoDelivery",b)}g.Yc=function(a){this.B?this.h.sendMessage(a):this.o.push(a)};g.sendMessage=function(a,b){this.Yc({event:a,info:void 0==b?null:b})};g.dispose=function(){this.h=null};function aq(a){Yp.call(this);this.f=a;this.j=[];this.addEventListener("onReady",v(this.Yd,this));this.addEventListener("onVideoProgress",v(this.we,this));this.addEventListener("onVolumeChange",v(this.xe,this));this.addEventListener("onApiChange",v(this.re,this));this.addEventListener("onPlaybackQualityChange",v(this.te,this));this.addEventListener("onPlaybackRateChange",v(this.ue,this));this.addEventListener("onStateChange",v(this.ve,this))}x(aq,Yp);g=aq.prototype;
g.Xc=function(a,b){if(this.f[a]){b=b||[];if(0<b.length&&tj(a)){var c;c=b;if(ia(c[0])&&!da(c[0]))c=c[0];else{var d={};switch(a){case "loadVideoById":case "cueVideoById":d=vj.apply(window,c);break;case "loadVideoByUrl":case "cueVideoByUrl":d=uj.apply(window,c);break;case "loadPlaylist":case "cuePlaylist":d=wj.apply(window,c)}c=d}xj(c);b.length=1;b[0]=c}this.f[a].apply(this.f,b);tj(a)&&$p(this,this.Mb())}};g.Yd=function(){var a=v(this.ud,this);this.h.f=a};
g.addEventListener=function(a,b){this.j.push({rd:a,listener:b});this.f.addEventListener(a,b)};g.Mb=function(){if(!this.f)return null;var a=this.f.getApiInterface();Ua(a,"getVideoData");for(var b={apiInterface:a},c=0,d=a.length;c<d;c++){var e=a[c],f=e;if(0==f.search("get")||0==f.search("is")){var f=e,h=0;0==f.search("get")?h=3:0==f.search("is")&&(h=2);f=f.charAt(h).toLowerCase()+f.substr(h+1);try{var k=this.f[e]();b[f]=k}catch(l){}}}b.videoData=this.f.getVideoData();return b};
g.ve=function(a){a={playerState:a,currentTime:this.f.getCurrentTime(),duration:this.f.getDuration(),videoData:this.f.getVideoData(),videoStartBytes:0,videoBytesTotal:this.f.getVideoBytesTotal(),videoLoadedFraction:this.f.getVideoLoadedFraction(),playbackQuality:this.f.getPlaybackQuality(),availableQualityLevels:this.f.getAvailableQualityLevels(),videoUrl:this.f.getVideoUrl(),playlist:this.f.getPlaylist(),playlistIndex:this.f.getPlaylistIndex()};this.f.getProgressState&&(a.progressState=this.f.getProgressState());
this.f.getStoryboardFormat&&(a.storyboardFormat=this.f.getStoryboardFormat());$p(this,a)};g.te=function(a){$p(this,{playbackQuality:a})};g.ue=function(a){$p(this,{playbackRate:a})};g.re=function(){for(var a=this.f.getOptions(),b={namespaces:a},c=0,d=a.length;c<d;c++){var e=a[c],f=this.f.getOptions(e);b[e]={options:f};for(var h=0,k=f.length;h<k;h++){var l=f[h],q=this.f.getOption(e,l);b[e][l]=q}}this.sendMessage("apiInfoDelivery",b)};g.xe=function(){$p(this,{muted:this.f.isMuted(),volume:this.f.getVolume()})};
g.we=function(a){a={currentTime:a,videoBytesLoaded:this.f.getVideoBytesLoaded(),videoLoadedFraction:this.f.getVideoLoadedFraction()};this.f.getProgressState&&(a.progressState=this.f.getProgressState());$p(this,a)};g.dispose=function(){aq.I.dispose.call(this);for(var a=0;a<this.j.length;a++){var b=this.j[a];this.f.removeEventListener(b.rd,b.listener)}this.j=[]};function bq(a,b,c){V.call(this);this.f=a;this.h=b;this.j=c}x(bq,V);function Tp(a,b,c){if(!a.isDisposed()){var d=a.f,e=a.h;a=a.j;d.isDisposed()||e!=d.f||(b={id:a,command:b},c&&(b.data=c),d.f.postMessage(M(b),d.j))}}bq.prototype.G=function(){this.h=this.f=null;bq.I.G.call(this)};function cq(a,b,c){D.call(this);this.f=a;this.j=c;this.o=L(window,"message",v(this.l,this));this.h=new bq(this,a,b);cc(this,pa(dc,this.h))}x(cq,D);
cq.prototype.l=function(a){var b;if(b=!this.isDisposed())if(b=a.origin==this.j)a:{b=this.f;do{var c;b:{c=a.source;do{if(c==b){c=!0;break b}if(c==c.parent)break;c=c.parent}while(null!=c);c=!1}if(c){b=!0;break a}b=b.opener}while(null!=b);b=!1}if(b&&(c=a.data,u(c))){try{c=ce(c)}catch(d){return}c.command&&(a=this.h,b=c.command,c=c.data,a.isDisposed()||a.D("command",b,c))}};cq.prototype.G=function(){Jd(this.o);this.f=null;cq.I.G.call(this)};var dq=!1;function eq(a){if(a=a.match(/[\d]+/g))a.length=3,a.join(".")}
(function(){if(navigator.plugins&&navigator.plugins.length){var a=navigator.plugins["Shockwave Flash"];if(a&&(dq=!0,a.description)){eq(a.description);return}if(navigator.plugins["Shockwave Flash 2.0"]){dq=!0;return}}if(navigator.mimeTypes&&navigator.mimeTypes.length&&(dq=(a=navigator.mimeTypes["application/x-shockwave-flash"])&&a.enabledPlugin)){eq(a.enabledPlugin.description);return}try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");dq=!0;eq(b.GetVariable("$version"));return}catch(c){}try{b=
new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");dq=!0;return}catch(c){}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),dq=!0,eq(b.GetVariable("$version"))}catch(c){}})();function fq(a){return(a=a.exec(Lb))?a[1]:""}(function(){if(Sf)return fq(/Firefox\/([0-9.]+)/);if(K||Vc||Uc)return bd;if(Wf)return fq(/Chrome\/([0-9.]+)/);if(Xf&&!(Tc()||C("iPad")||C("iPod")))return fq(/Version\/([0-9.]+)/);if(Tf||Uf){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Lb))return a[1]+"."+a[2]}else if(Vf)return(a=fq(/Android\s+([0-9.]+)/))?a:fq(/Version\/([0-9.]+)/);return""})();function gq(a){if(a=a.responseText)hq=(a=a.match(/{"id": "(.*)"}/))&&a[1]?a[1]:"",p("yt.www.ads.data.encryptedBiscottiId",hq,void 0)}var hq="";function iq(a){for(var b=0;b<a.length;b++){var c=a[b];"send_follow_on_ping_action"==c.name&&c.data&&c.data.follow_on_url&&(c=c.data.follow_on_url)&&fh(c)}};function jq(a){O.call(this,1,arguments)}x(jq,O);function kq(a,b){O.call(this,2,arguments);this.h=a;this.f=b}x(kq,O);function lq(a,b,c,d){O.call(this,1,arguments);this.f=b;this.j=c||null;this.h=d||null}x(lq,O);function mq(a,b){O.call(this,1,arguments);this.h=a;this.f=b||null}x(mq,O);function nq(a){O.call(this,1,arguments)}x(nq,O);
var oq=new P("ypc-core-load",jq),pq=new P("ypc-guide-sync-success",kq),qq=new P("ypc-purchase-success",lq),rq=new P("ypc-subscription-cancel",nq),sq=new P("ypc-subscription-cancel-success",mq),tq=new P("ypc-init-subscription",nq);var uq=!1,vq=[],wq=[];function xq(a){a.f?uq?Q(ti,a):Q(oq,new jq(function(){Q(tq,new nq(a.f))})):yq(a.h,a.o,a.j,a.source)}function zq(a){a.f?uq?Q(yi,a):Q(oq,new jq(function(){Q(rq,new nq(a.f))})):Aq(a.h,a.subscriptionId,a.o,a.j,a.source)}function Bq(a){Cq(Xa(a.f))}function Dq(a){Eq(Xa(a.f))}function Fq(a){Gq(a.f,a.isEnabled,null)}function Hq(a,b,c,d){Gq(a,b,c,d)}function Iq(a){var b=a.h,c=a.f.subscriptionId;b&&c&&Q(si,new ki(b,c,a.f.channelInfo))}
function Jq(a){var b=a.f;db(a.h,function(a,d){Q(si,new ki(d,a,b[d]))})}function Kq(a){Q(xi,new hi(a.h.itemId));a.f&&a.f.length&&(Lq(a.f,xi),Lq(a.f,zi))}
function yq(a,b,c,d){var e=new hi(a);Q(qi,e);var f={};f.c=a;c&&(f.eurl=c);d&&(f.source=d);c={};(d=G("PLAYBACK_ID"))&&(c.plid=d);(d=G("EVENT_ID"))&&(c.ei=d);b&&Mq(b,c);Ce("/subscription_ajax?action_create_subscription_to_channel=1",{method:"POST",ac:f,R:c,ca:function(b,c){var d=c.response;Q(si,new ki(a,d.id,d.channel_info));d.show_feed_privacy_dialog&&J("SHOW-FEED-PRIVACY-SUBSCRIBE-DIALOG",a);d.actions&&iq(d.actions)},Wb:function(){Q(ri,e)}})}
function Aq(a,b,c,d,e){var f=new hi(a);Q(vi,f);var h={};d&&(h.eurl=d);e&&(h.source=e);d={};d.c=a;d.s=b;(a=G("PLAYBACK_ID"))&&(d.plid=a);(a=G("EVENT_ID"))&&(d.ei=a);c&&Mq(c,d);Ce("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",ac:h,R:d,ca:function(a,b){var c=b.response;Q(xi,f);c.actions&&iq(c.actions)},Wb:function(){Q(wi,f)}})}
function Gq(a,b,c,d){if(null!==b||null!==c){var e={};a&&(e.channel_id=a);null===b||(e.email_on_upload=b);null===c||(e.receive_no_updates=c);Ce("/subscription_ajax?action_update_subscription_preferences=1",{method:"POST",R:e,onError:function(){d&&d()}})}}
function Cq(a){if(a.length){var b=Za(a,0,40);Q("subscription-batch-subscribe-loading");Lq(b,qi);var c={};c.a=b.join(",");var d=function(){Q("subscription-batch-subscribe-loaded");Lq(b,ri)};Ce("/subscription_ajax?action_create_subscription_to_all=1",{method:"POST",R:c,ca:function(c,f){d();var h=f.response,k=h.id;if(da(k)&&k.length==b.length){var l=h.channel_info_map;y(k,function(a,c){var d=b[c];Q(si,new ki(d,a,l[d]))});a.length?Cq(a):Q("subscription-batch-subscribe-finished")}},onError:function(){d();
Q("subscription-batch-subscribe-failure")}})}}function Eq(a){if(a.length){var b=Za(a,0,40);Q("subscription-batch-unsubscribe-loading");Lq(b,vi);var c={};c.c=b.join(",");var d=function(){Q("subscription-batch-unsubscribe-loaded");Lq(b,wi)};Ce("/subscription_ajax?action_remove_subscriptions=1",{method:"POST",R:c,ca:function(){d();Lq(b,xi);a.length&&Eq(a)},onError:function(){d()}})}}function Lq(a,b){y(a,function(a){Q(b,new hi(a))})}function Mq(a,b){var c=ue(a),d;for(d in c)b[d]=c[d]};var Nq,Oq=null,Pq=null,Qq=null,Rq=!1;
function Sq(){var a=G("PLAYER_CONFIG"),b=G("REVERSE_MOBIUS_PERCENT");if(zg&&100*Math.random()<b)try{Ce("//googleads.g.doubleclick.net/pagead/id",{format:"RAW",method:"GET",ca:gq,withCredentials:!0})}catch(e){}if(G("REQUEST_POST_MESSAGE_ORIGIN")){if(!Nq){Nq=new Zi;Nq.f=Sq;return}Nq.origin&&"*"!=Nq.origin&&(a.args.post_message_origin=Nq.origin)}var c=document.referrer,b=G("POST_MESSAGE_ORIGIN"),d=!1;u(c)&&u(b)&&-1<c.indexOf(b)&&ah(b)&&ah(c)&&(d=!0);window!=window.top&&c&&c!=document.URL&&(a.args.loaderUrl=
c);G("LIGHTWEIGHT_AUTOPLAY")&&(a.args.autoplay="1");a.args.autoplay&&xj(a.args);Oq=Vh("player",a);c=G("POST_MESSAGE_ID","player");G("ENABLE_JS_API")?Qq=new aq(Oq):G("ENABLE_POST_API")&&u(c)&&u(b)&&(Pq=new cq(window.parent,c,b),Qq=new Xp(Oq,Pq.h));(Rq=d&&!G("ENABLE_CAST_API"))?a.args.disableCast="1":(a=Oq,To(),Dp=a,Dp.addEventListener("onReady",Fp),Dp.addEventListener("onRemoteReceiverSelected",Hp),Ep.push(uc("yt-remote-receiver-availability-change",Gp)),Ep.push(uc("yt-remote-auto-connect",Ip)));G("BG_P")&&
(G("BG_I")||G("BG_IU"))&&Jc();Ne();Jp=Oq;Jp.addEventListener("SUBSCRIBE",Mp);Jp.addEventListener("UNSUBSCRIBE",Pp);Kp.push(nh(si,Qp),nh(xi,Rp))};p("yt.setConfig",ic,void 0);p("yt.setMsg",function(a){jc(hc,arguments)},void 0);
p("yt.logging.errors.log",function(a,b,c,d){if(a&&window&&window.yterr&&!(5<=Ie)){var e=a.stacktrace,f=a.columnNumber;var h=r("window.location.href");if(u(a))a={message:a,name:"Unknown error",lineNumber:"Not available",fileName:h,stack:"Not available"};else{var k,l,q=!1;try{k=a.lineNumber||a.line||"Not available"}catch(E){k="Not available",q=!0}try{l=a.fileName||a.filename||a.sourceURL||m.$googDebugFname||h}catch(E){l="Not available",q=!0}a=!q&&a.lineNumber&&a.fileName&&a.stack&&a.message&&a.name?
a:{message:a.message||"Not available",name:a.name||"UnknownError",lineNumber:k,fileName:l,stack:a.stack||"Not available"}}e=e||a.stack;d=d||G("INNERTUBE_CONTEXT_CLIENT_VERSION");k=a.lineNumber.toString();isNaN(k)||isNaN(f)||(k=k+":"+f);He[a.message]||0<=e.indexOf("/YouTubeCenter.js")||0<=e.indexOf("/mytube.js")||(b={ac:{a:"logerror",t:"jserror",type:a.name,msg:a.message.substr(0,1E3),line:k,level:b||"ERROR"},R:{url:G("PAGE_NAME",window.location.href),file:a.fileName,"client.name":c||"WEB"},method:"POST"},
e&&(b.R.stack=e),d&&(b.R["client.version"]=d),Ce("/error_204",b),He[a.message]=!0,Ie++)}},void 0);p("writeEmbed",Sq,void 0);p("yt.www.watch.ads.restrictioncookie.spr",function(a){(a=a+"mac_204?action_fcts=1")&&fh(a);return!0},void 0);
L(window,"load",function(){th("ol");uq=!0;wq.push(nh(pi,xq),nh(ui,zq));uq||(wq.push(nh(ti,xq),nh(yi,zq),nh(mi,Bq),nh(ni,Dq),nh(oi,Fq)),vq.push(uc("subscription-prefs",Hq)),wq.push(nh(qq,Iq),nh(sq,Kq),nh(pq,Jq)));Yf.getInstance();var a=1<window.devicePixelRatio;if(cg(0,119)!=a){var b="f"+(Math.floor(119/31)+1),c=bg(b)||0,c=a?c|67108864:c&-67108865;0==c?delete Zf[b]:(a=c.toString(16),Zf[b]=a.toString());var d,b=[];for(d in Zf)b.push(d+"="+escape(Zf[d]));d=b.join("&");Xe("PREF",d,63072E3)}});
L(window,"unload",function(){var a=Oq;a&&a.sendAbandonmentPing&&a.sendAbandonmentPing();G("PL_ATT")&&(Ic=null);for(var a=0,b=Le.length;a<b;a++){var c=Le[a],d=r("yt.scheduler.instance.cancelJob");d?d(c):I(c)}Le.length=0;a=Ec("//static.doubleclick.net/instream/ad_status.js");if(b=document.getElementById(a))zc(a),b.parentNode.removeChild(b);Me=!1;ic("DCLKSTAT",0);wc(vq);vq.length=0;oh(wq);wq.length=0;uq=!1;Jp&&(Jp.removeEventListener("SUBSCRIBE",Np),Jp.removeEventListener("UNSUBSCRIBE",Pp));Jp=null;
oh(Kp);Kp.length=0;Rq||(wc(Ep),Ep.length=0,Dp&&(Dp.removeEventListener("onRemoteReceiverSelected",Hp),Dp.removeEventListener("onReady",Fp),Dp=null),ip());ec(Qq,Pq);Oq&&Oq.destroy()});var Tq=Ti.getInstance(),Uq=S(Tq);Uq in Yi||(Tq.register(),Tq.Jc.push(uc("yt-uix-init-"+Uq,Tq.init,Tq)),Tq.Jc.push(uc("yt-uix-dispose-"+Uq,Tq.dispose,Tq)),Yi[Uq]=Tq);})();
