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