Advertisement
moisespilco

youtube

Mar 8th, 2015
1,187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 226.52 KB | None | 0 0
  1. (function(){var g,aa=aa||{},m=this;function p(a){return void 0!==a}function q(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&&p(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.aa?a.aa:a.aa=new a}}
  2. 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";
  3. else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){return"array"==ca(a)}function ea(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a){return a[ia]||(a[ia]=++ja)}var ia="closure_uid_"+(1E9*Math.random()>>>0),ja=0;function ka(a,b,c){return a.call.apply(a.bind,arguments)}
  4. function la(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")?ka:la;return v.apply(null,arguments)}
  5. function w(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 y=Date.now||function(){return+new Date};function z(a,b){function c(){}c.prototype=b.prototype;a.G=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)}}
  6. Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return v.apply(null,c)}return v(this,a)};function ma(a){if(Error.captureStackTrace)Error.captureStackTrace(this,ma);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}z(ma,Error);ma.prototype.name="CustomError";var na;function oa(a){var b=a.length-5;return 0<=b&&a.indexOf("_html",b)==b}function pa(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")}var qa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function sa(a){return decodeURIComponent(a.replace(/\+/g," "))}
  7. function ta(a){if(!ua.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(va,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(wa,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(xa,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(ya,"&quot;"));-1!=a.indexOf("'")&&(a=a.replace(za,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(Aa,"&#0;"));return a}var va=/&/g,wa=/</g,xa=/>/g,ya=/"/g,za=/'/g,Aa=/\x00/g,ua=/[\x00&<>"']/;
  8. function Ba(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},c;c=m.document.createElement("div");return a.replace(Ca,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})}
  9. 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 Ca=/&([^;\s<&]+);?/g;
  10. function Ea(a,b){for(var c=0,d=qa(String(a)).split("."),e=qa(String(b)).split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",l=e[h]||"",n=RegExp("(\\d*)(\\D*)","g"),x=RegExp("(\\d*)(\\D*)","g");do{var J=n.exec(k)||["","",""],D=x.exec(l)||["","",""];if(0==J[0].length&&0==D[0].length)break;c=Fa(0==J[1].length?0:parseInt(J[1],10),0==D[1].length?0:parseInt(D[1],10))||Fa(0==J[2].length,0==D[2].length)||Fa(J[2],D[2])}while(0==c)}return c}function Fa(a,b){return a<b?-1:a>b?1:0}
  11. function Ga(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b}function Ha(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}function Ia(a){var b=u(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return a.replace(new RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})};function Ja(){};var Ka=Array.prototype,La=Ka.indexOf?function(a,b,c){return Ka.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(u(a))return u(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ma=Ka.lastIndexOf?function(a,b,c){return Ka.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(u(a))return u(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;
  12. return-1},A=Ka.forEach?function(a,b,c){Ka.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Na=Ka.filter?function(a,b,c){return Ka.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},Oa=Ka.map?function(a,b,c){return Ka.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=u(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=
  13. b.call(c,f[h],h,a));return e},Pa=Ka.reduce?function(a,b,c,d){d&&(b=v(b,d));return Ka.reduce.call(a,b,c)}:function(a,b,c,d){var e=c;A(a,function(c,h){e=b.call(d,e,c,h,a)});return e},Qa=Ka.some?function(a,b,c){return Ka.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},Ra=Ka.every?function(a,b,c){return Ka.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],
  14. f,a))return!1;return!0};function Sa(a,b,c){b=Ta(a,b,c);return 0>b?null:u(a)?a.charAt(b):a[b]}function Ta(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 Ua(a,b){return 0<=La(a,b)}function Va(a){return 0==a.length}function Wa(){var a=Xa;if(!da(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function Ya(a,b){Ua(a,b)||a.push(b)}function Za(a,b){var c=La(a,b),d;(d=0<=c)&&$a(a,c);return d}
  15. function $a(a,b){Ka.splice.call(a,b,1)}function ab(a,b){var c=Ta(a,b,void 0);0<=c&&$a(a,c)}function bb(a){return Ka.concat.apply(Ka,arguments)}function cb(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}function db(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(ea(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var h=0;h<f;h++)a[e+h]=d[h]}else a.push(d)}}function eb(a,b,c,d){return Ka.splice.apply(a,fb(arguments,1))}
  16. function fb(a,b,c){return 2>=arguments.length?Ka.slice.call(a,b):Ka.slice.call(a,b,c)}function gb(a,b,c){if(!ea(a)||!ea(b)||a.length!=b.length)return!1;var d=a.length;c=c||hb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function ib(a,b){return a>b?1:a<b?-1:0}function hb(a,b){return a===b};function kb(a){if(a.classList)return a.classList;a=a.className;return u(a)&&a.match(/\S+/g)||[]}function C(a,b){return a.classList?a.classList.contains(b):Ua(kb(a),b)}function E(a,b){a.classList?a.classList.add(b):C(a,b)||(a.className+=0<a.className.length?" "+b:b)}function lb(a,b){if(a.classList)A(b,function(b){E(a,b)});else{var c={};A(kb(a),function(a){c[a]=!0});A(b,function(a){c[a]=!0});a.className="";for(var d in c)a.className+=0<a.className.length?" "+d:d}}
  17. function F(a,b){a.classList?a.classList.remove(b):C(a,b)&&(a.className=Na(kb(a),function(a){return a!=b}).join(" "))}function mb(a,b){a.classList?A(b,function(b){F(a,b)}):a.className=Na(kb(a),function(a){return!Ua(b,a)}).join(" ")}function nb(a,b,c){c?E(a,b):F(a,b)}function ob(a,b){var c=!C(a,b);nb(a,b,c)}function pb(a,b,c){F(a,b);E(a,c)};function qb(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function rb(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d}function sb(a){var b=0,c;for(c in a)b++;return b}function tb(a,b){return ub(a,b)}function vb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function wb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function ub(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function xb(a){var b=yb,c;for(c in b)if(a.call(void 0,b[c],c,b))return c}
  18. function zb(a){for(var b in a)return!1;return!0}function Ab(a,b){if(b in a)throw Error('The object already contains the key "'+b+'"');a[b]=!0}function Bb(a){var b={},c;for(c in a)b[c]=a[c];return b}function Cb(a){var b=ca(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=Cb(a[c]);return b}return a}var Db="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
  19. function Eb(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<Db.length;f++)c=Db[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}function Fb(a){var b=arguments.length;if(1==b&&da(arguments[0]))return Fb.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};Fb("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function Gb(){this.c=""}Gb.prototype.ec=!0;Gb.prototype.$b=function(){return this.c};Gb.prototype.toString=function(){return"Const{"+this.c+"}"};function Hb(){var a=new Gb;a.c="HTML that is escaped and sanitized server-side and passed through yt.net.ajax";return a};function Ib(){this.c="";this.e=Jb}Ib.prototype.ec=!0;Ib.prototype.$b=function(){return this.c};function Kb(a){return a instanceof Ib&&a.constructor===Ib&&a.e===Jb?a.c:"type_error:SafeUrl"}var Lb=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i;function Mb(a){if(a instanceof Ib)return a;a=a.ec?a.$b():String(a);a=Lb.test(a)?Nb(a):"about:invalid#zClosurez";var b=new Ib;b.c=a;return b}
  20. function Nb(a){try{var b=encodeURI(a)}catch(c){return"about:invalid#zClosurez"}return b.replace(Ob,function(a){return Pb[a]})}var Ob=/[()']|%5B|%5D|%25/g,Pb={"'":"%27","(":"%28",")":"%29","%5B":"[","%5D":"]","%25":"%"},Jb={};function Qb(){this.c="";this.e=Rb;this.f=null}Qb.prototype.ec=!0;Qb.prototype.$b=function(){return this.c};Fb("action","cite","data","formaction","href","manifest","poster","src");Fb("embed","iframe","link","object","script","style","template");var Rb={};function Sb(a,b){var c=new Qb;c.c=a;c.f=b;return c}Sb("",0);function Tb(a,b){var c;c=b instanceof Ib?b:Mb(b);a.href=Kb(c)};function Ub(a,b,c){a&&(a.dataset?a.dataset[Vb(b)]=c:a.setAttribute("data-"+b,c))}function G(a,b){return a?a.dataset?a.dataset[Vb(b)]:a.getAttribute("data-"+b):null}function Wb(a,b){a&&(a.dataset?delete a.dataset[Vb(b)]:a.removeAttribute("data-"+b))}var Xb={};function Vb(a){return Xb[a]||(Xb[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};function Yb(){this.cb=this.cb;this.fa=this.fa}Yb.prototype.cb=!1;Yb.prototype.K=function(){return this.cb};Yb.prototype.dispose=function(){this.cb||(this.cb=!0,this.F())};function Zb(a,b){a.cb?b.call(void 0):(a.fa||(a.fa=[]),a.fa.push(p(void 0)?v(b,void 0):b))}Yb.prototype.F=function(){if(this.fa)for(;this.fa.length;)this.fa.shift()()};function $b(a){a&&"function"==typeof a.dispose&&a.dispose()};function H(){Yb.call(this);this.c=[];this.ea={}}z(H,Yb);g=H.prototype;g.Nc=1;g.Mb=0;g.subscribe=function(a,b,c){var d=this.ea[a];d||(d=this.ea[a]=[]);var e=this.Nc;this.c[e]=a;this.c[e+1]=b;this.c[e+2]=c;this.Nc=e+3;d.push(e);return e};g.lb=function(a,b,c){if(a=this.ea[a]){var d=this.c;if(a=Sa(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.qa(a)}return!1};
  21. g.qa=function(a){if(0!=this.Mb)return this.e||(this.e=[]),this.e.push(a),!1;var b=this.c[a];if(b){var c=this.ea[b];c&&Za(c,a);delete this.c[a];delete this.c[a+1];delete this.c[a+2]}return!!b};g.B=function(a,b){var c=this.ea[a];if(c){this.Mb++;for(var d=Array(arguments.length-1),e=1,f=arguments.length;e<f;e++)d[e-1]=arguments[e];e=0;for(f=c.length;e<f;e++){var h=c[e];this.c[h+1].apply(this.c[h+2],d)}this.Mb--;if(this.e&&0==this.Mb)for(;c=this.e.pop();)this.qa(c);return 0!=e}return!1};
  22. g.clear=function(a){if(a){var b=this.ea[a];b&&(A(b,this.qa,this),delete this.ea[a])}else this.c.length=0,this.ea={}};g.W=function(a){if(a){var b=this.ea[a];return b?b.length:0}a=0;for(b in this.ea)a+=this.W(b);return a};g.F=function(){H.G.F.call(this);delete this.c;delete this.ea;delete this.e};var ac=window.yt&&window.yt.config_||window.ytcfg&&window.ytcfg.data_||{};q("yt.config_",ac,void 0);q("yt.tokens_",window.yt&&window.yt.tokens_||{},void 0);var bc=window.yt&&window.yt.msgs_||{};q("yt.msgs_",bc,void 0);function cc(a){var b=arguments;if(1<b.length){var c=b[0];ac[c]=b[1]}else for(c in b=b[0],b)ac[c]=b[c]}function I(a,b){return a in ac?ac[a]:b}function K(a,b){fa(a)&&(a=dc(a));return window.setTimeout(a,b)}function ec(a,b){fa(a)&&(a=dc(a));window.setInterval(a,b)}
  23. function M(a){window.clearTimeout(a)}function dc(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw fc(b),b;}}:a}function fc(a,b){var c=r("yt.www.errors.log");c?c(a,b):(c=I("ERRORS")||[],c.push([a,b]),cc("ERRORS",c))}
  24. function gc(){var a={},b="FLASH_UPGRADE"in bc?bc.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}
  25. function hc(a){var b="MASTHEAD_NOTIFICATIONS_LABEL"in bc?bc.MASTHEAD_NOTIFICATIONS_LABEL:{},c=I("I18N_PLURAL_RULES")||function(a){return 1==a?"one":"other"};return(b=b["case"+a]||b[c(a)])?b.replace("#",a.toString()):a+""}var ic="Microsoft Internet Explorer"==navigator.appName;var jc=r("yt.pubsub.instance_")||new H;H.prototype.subscribe=H.prototype.subscribe;H.prototype.unsubscribeByKey=H.prototype.qa;H.prototype.publish=H.prototype.B;H.prototype.clear=H.prototype.clear;q("yt.pubsub.instance_",jc,void 0);var kc=r("yt.pubsub.subscribedKeys_")||{};q("yt.pubsub.subscribedKeys_",kc,void 0);var lc=r("yt.pubsub.topicToKeys_")||{};q("yt.pubsub.topicToKeys_",lc,void 0);var mc=r("yt.pubsub.isSynchronous_")||{};q("yt.pubsub.isSynchronous_",mc,void 0);
  26. var nc=r("yt.pubsub.skipSubId_")||null;q("yt.pubsub.skipSubId_",nc,void 0);function N(a,b,c){var d=oc();if(d){var e=d.subscribe(a,function(){if(!nc||nc!=e){var d=arguments,h=function(){kc[e]&&b.apply(c||window,d)};try{mc[a]?h():K(h,0)}catch(k){fc(k)}}},c);kc[e]=!0;lc[a]||(lc[a]=[]);lc[a].push(e);return e}return 0}function pc(a){var b=oc();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),A(a,function(a){b.unsubscribeByKey(a);delete kc[a]}))}
  27. function O(a,b){var c=oc();c&&c.publish.apply(c,arguments)}function qc(a,b){mc[a]=!0;var c=oc();c&&c.publish.apply(c,arguments);mc[a]=!1}function rc(a){lc[a]&&(a=lc[a],A(a,function(a){kc[a]&&delete kc[a]}),a.length=0)}function sc(a){var b=oc();if(b)if(b.clear(a),a)rc(a);else for(var c in lc)rc(c)}function oc(){return r("yt.pubsub.instance_")};function tc(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(uc,""),c=c.replace(vc,""),c=c.replace("debug-",""),c=c.replace("tracing-",""))}spf.script.load(a,c,b)}else wc(a,b)}function wc(a,b){var c=xc(a),d=document.getElementById(c),e=d&&G(d,"loaded"),f=d&&!e;if(e)b&&b();else{if(b){var e=N(c,b),h=""+ha(b);yc[h]=e}f||(d=zc(a,c,function(){G(d,"loaded")||(Ub(d,"loaded","true"),O(c),K(w(sc,c),0))}))}}
  28. function zc(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 Ac(a,b){if(a&&b){var c=""+ha(b);(c=yc[c])&&pc(c)}}function xc(a){var b=document.createElement("a");Tb(b,a);a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"js-"+Ga(a)}
  29. var uc=/\.vflset|-vfl[a-zA-Z0-9_+=-]+/,vc=/-[a-zA-Z]{2,3}_[a-zA-Z]{2,3}(?=(\/|$))/,yc={};function Bc(a,b){if(window.spf){var c=a.match(Cc);spf.style.load(a,c?c[1]:"",b);return null}return Dc(a,b)}function Ec(a,b,c){if(a=I(a)){var d=w(Bc,a,b);if(c)var e=N(c,function(){pc(e);d()});else d()}}function Dc(a,b){var c=Fc(a),d=document.getElementById(c),e=d&&G(d,"loaded"),f=d&&!e;if(e)return b&&b(),d;b&&(N(c,b),ha(b));return f?d:d=Gc(a,c,function(){G(d,"loaded")||(Ub(d,"loaded","true"),O(c),K(w(sc,c),0))})}
  30. function Gc(a,b,c){var d=document.createElement("link");d.id=b;d.rel="stylesheet";d.onload=function(){c&&setTimeout(c,0)};Tb(d,a);(document.getElementsByTagName("head")[0]||document.body).appendChild(d);return d}function Fc(a){var b=document.createElement("a");Tb(b,a);a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"css-"+Ga(a)}var Cc=/cssbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-2x|-web|-rtl|-vfl|.css)/;function Hc(a,b){this.x=p(a)?a:0;this.y=p(b)?b:0}Hc.prototype.clone=function(){return new Hc(this.x,this.y)};function Ic(a,b){return new Hc(a.x-b.x,a.y-b.y)}Hc.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};Hc.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};Hc.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function Jc(a,b){this.width=a;this.height=b}g=Jc.prototype;g.clone=function(){return new Jc(this.width,this.height)};g.isEmpty=function(){return!(this.width*this.height)};g.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};g.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};g.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var Kc;t:{var Lc=m.navigator;if(Lc){var Mc=Lc.userAgent;if(Mc){Kc=Mc;break t}}Kc=""}function P(a){return-1!=Kc.indexOf(a)};function Nc(){return P("Opera")||P("OPR")}function Oc(){return P("Edge")||P("Trident")||P("MSIE")}function Pc(){return(P("Chrome")||P("CriOS"))&&!Nc()&&!Oc()};function Qc(){return P("Edge")};function Rc(){return P("iPhone")&&!P("iPod")&&!P("iPad")};var Sc=Nc(),Q=Oc(),Tc=P("Gecko")&&!(-1!=Kc.toLowerCase().indexOf("webkit")&&!Qc())&&!(P("Trident")||P("MSIE"))&&!Qc(),Uc=-1!=Kc.toLowerCase().indexOf("webkit")&&!Qc(),Vc=P("Macintosh"),Wc=P("Windows");function Xc(){var a=Kc;if(Tc)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Q&&Qc())return/Edge\/([\d\.]+)/.exec(a);if(Q)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Uc)return/WebKit\/(\S+)/.exec(a)}function Yc(){var a=m.document;return a?a.documentMode:void 0}
  31. var Zc=function(){if(Sc&&m.opera){var a=m.opera.version;return fa(a)?a():a}var a="",b=Xc();b&&(a=b?b[1]:"");return Q&&!Qc()&&(b=Yc(),b>parseFloat(a))?String(b):a}(),$c={};function ad(a){return $c[a]||($c[a]=0<=Ea(Zc,a))}function bd(a){return Q&&(Qc()||cd>=a)}var dd=m.document,ed=Yc(),cd=!dd||!Q||!ed&&Qc()?void 0:ed||("CSS1Compat"==dd.compatMode?parseInt(Zc,10):5);var fd=!Q||bd(9),gd=!Tc&&!Q||Q&&bd(9)||Tc&&ad("1.9.1"),hd=Q&&!ad("9"),id=Q||Sc||Uc;function jd(a){return a?new kd(ld(a)):na||(na=new kd)}function R(a){return u(a)?document.getElementById(a):a}function md(a){var b=document;return u(a)?b.getElementById(a):a}function nd(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):od("*",a,b)}function S(a,b){var c=b||document,d=null;c.getElementsByClassName?d=c.getElementsByClassName(a)[0]:c.querySelectorAll&&c.querySelector?d=c.querySelector("."+a):d=od("*",a,b)[0];return d||null}
  32. function od(a,b,c){var d=document;c=c||d;a=a&&"*"!=a?a.toUpperCase():"";if(c.querySelectorAll&&c.querySelector&&(a||b))return c.querySelectorAll(a+(b?"."+b:""));if(b&&c.getElementsByClassName){c=c.getElementsByClassName(b);if(a){for(var d={},e=0,f=0,h;h=c[f];f++)a==h.nodeName&&(d[e++]=h);d.length=e;return d}return c}c=c.getElementsByTagName(a||"*");if(b){d={};for(f=e=0;h=c[f];f++)a=h.className,"function"==typeof a.split&&Ua(a.split(/\s+/),b)&&(d[e++]=h);d.length=e;return d}return c}
  33. function pd(a,b){qb(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in qd?a.setAttribute(qd[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var qd={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
  34. function rd(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new Jc(a.clientWidth,a.clientHeight)}function sd(a){var b=td(a);a=ud(a);return Q&&ad("10")&&a.pageYOffset!=b.scrollTop?new Hc(b.scrollLeft,b.scrollTop):new Hc(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function td(a){return Uc||"CSS1Compat"!=a.compatMode?a.body||a.documentElement:a.documentElement}function ud(a){return a.parentWindow||a.defaultView}
  35. function vd(a,b,c){var d=arguments,e=document,f=d[0],h=d[1];if(!fd&&h&&(h.name||h.type)){f=["<",f];h.name&&f.push(' name="',ta(h.name),'"');if(h.type){f.push(' type="',ta(h.type),'"');var k={};Eb(k,h);delete k.type;h=k}f.push(">");f=f.join("")}f=e.createElement(f);h&&(u(h)?f.className=h:da(h)?f.className=h.join(" "):pd(f,h));2<d.length&&wd(e,f,d,2);return f}
  36. function wd(a,b,c,d){function e(c){c&&b.appendChild(u(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var f=c[d];!ea(f)||ga(f)&&0<f.nodeType?e(f):A(xd(f)?cb(f):f,e)}}function yd(a){var b=document,c=b.createElement("div");Q?(c.innerHTML="<br>"+a,c.removeChild(c.firstChild)):c.innerHTML=a;if(1==c.childNodes.length)c=c.removeChild(c.firstChild);else{for(a=b.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);c=a}return c}function zd(a,b){wd(ld(a),a,arguments,1)}
  37. function Ad(a){for(var b;b=a.firstChild;)a.removeChild(b)}function Bd(a,b,c){a.insertBefore(b,a.childNodes[c]||null)}function Cd(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function Dd(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)}function Ed(a){return gd&&void 0!=a.children?a.children:Na(a.childNodes,function(a){return 1==a.nodeType})}function Fd(a){return void 0!=a.firstElementChild?a.firstElementChild:Gd(a.firstChild,!0)}
  38. function Gd(a,b){for(;a&&1!=a.nodeType;)a=b?a.nextSibling:a.previousSibling;return a}function Hd(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function Id(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a}
  39. function Jd(a){var b;if(id&&!(Q&&ad("9")&&!ad("10")&&m.SVGElement&&a instanceof m.SVGElement)&&(b=a.parentElement))return b;b=a.parentNode;return ga(b)&&1==b.nodeType?b:null}function Kd(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function ld(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
  40. function Ld(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{Ad(a);var c=ld(a);a.appendChild(c.createTextNode(String(b)))}}var Md={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Nd={IMG:" ",BR:"\n"};
  41. function Od(a,b,c){if(!(a.nodeName in Md))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 Nd)b.push(Nd[a.nodeName]);else for(a=a.firstChild;a;)Od(a,b,c),a=a.nextSibling}function xd(a){if(a&&"number"==typeof a.length){if(ga(a))return"function"==typeof a.item||"string"==typeof a.item;if(fa(a))return"function"==typeof a.item}return!1}
  42. function Pd(a,b,c){return b?Qd(a,function(a){return!b||u(a.className)&&Ua(a.className.split(/\s+/),b)},c):null}function Rd(a,b){return Pd(a,b,void 0)}function Qd(a,b,c){for(var d=null==c,e=0;a&&(d||e<=c);){if(b(a))return a;a=a.parentNode;e++}return null}function kd(a){this.c=a||m.document||document}kd.prototype.ka=function(a){return u(a)?this.c.getElementById(a):a};kd.prototype.createElement=function(a){return this.c.createElement(a)};function Sd(a){return"CSS1Compat"==a.c.compatMode}
  43. kd.prototype.appendChild=function(a,b){a.appendChild(b)};kd.prototype.contains=Kd;var Td;var Ud=Uc?"webkitTransitionEnd":Sc?"otransitionend":"transitionend";function Vd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}g=Vd.prototype;g.clone=function(){return new Vd(this.top,this.right,this.bottom,this.left)};g.contains=function(a){return this&&a?a instanceof Vd?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};
  44. g.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};g.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};g.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 Wd(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}g=Wd.prototype;g.clone=function(){return new Wd(this.left,this.top,this.width,this.height)};g.contains=function(a){return a instanceof Wd?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};
  45. g.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};g.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};g.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 Xd(a,b,c){if(u(b))(b=Yd(a,b))&&(a.style[b]=c);else for(var d in b){c=a;var e=b[d],f=Yd(c,d);f&&(c.style[f]=e)}}var Zd={};function Yd(a,b){var c=Zd[b];if(!c){var d=Ha(b),c=d;void 0===a.style[d]&&(d=(Uc?"Webkit":Tc?"Moz":Q?"ms":Sc?"O":null)+Ia(d),void 0!==a.style[d]&&(c=d));Zd[b]=c}return c}function $d(a,b){var c=ld(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}
  46. function ae(a,b){return $d(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}function be(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}Q&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
  47. function ce(a){if(Q&&!bd(8))return a.offsetParent;var b=ld(a),c=ae(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(11==a.nodeType&&a.host&&(a=a.host),c=ae(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null}
  48. function de(a){for(var b=new Vd(0,Infinity,Infinity,0),c=jd(a),d=c.c.body,e=c.c.documentElement,f=td(c.c);a=ce(a);)if(!(Q&&0==a.clientWidth||Uc&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&"visible"!=ae(a,"overflow")){var h=ee(a),k=new Hc(a.clientLeft,a.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=f.scrollLeft;f=f.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,f);
  49. c=rd(ud(c.c)||window);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,f+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}function ee(a){var b=ld(a),c=new Hc(0,0),d;d=b?ld(b):document;d=!Q||bd(9)||Sd(jd(d))?d.documentElement:d.body;if(a==d)return c;a=be(a);b=jd(b);b=sd(b.c);c.x=a.left+b.x;c.y=a.top+b.y;return c}function fe(a){a=be(a);return new Hc(a.left,a.top)}
  50. function ge(a){if(1==a.nodeType)return fe(a);var b=fa(a.f),c=a;a.targetTouches&&a.targetTouches.length?c=a.targetTouches[0]:b&&a.c.targetTouches&&a.c.targetTouches.length&&(c=a.c.targetTouches[0]);return new Hc(c.clientX,c.clientY)}function he(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
  51. function ie(a){var b=je;if("none"!=ae(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 je(a){var b=a.offsetWidth,c=a.offsetHeight,d=Uc&&!b&&!c;return p(b)&&!d||!a.getBoundingClientRect?new Jc(b,c):(a=be(a),new Jc(a.right-a.left,a.bottom-a.top))}function ke(a){var b=ee(a);a=ie(a);return new Wd(b.x,b.y,a.width,a.height)}
  52. function le(a){return"rtl"==ae(a,"direction")}function me(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 ne(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?me(a,c):0}
  53. function oe(a){if(Q){var b=ne(a,"paddingLeft"),c=ne(a,"paddingRight"),d=ne(a,"paddingTop");a=ne(a,"paddingBottom");return new Vd(d,c,a,b)}b=$d(a,"paddingLeft");c=$d(a,"paddingRight");d=$d(a,"paddingTop");a=$d(a,"paddingBottom");return new Vd(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var pe={thin:2,medium:4,thick:6};function qe(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 pe?pe[c]:me(a,c)}
  54. function re(a){if(Q&&!bd(9)){var b=qe(a,"borderLeft"),c=qe(a,"borderRight"),d=qe(a,"borderTop");a=qe(a,"borderBottom");return new Vd(d,c,a,b)}b=$d(a,"borderLeftWidth");c=$d(a,"borderRightWidth");d=$d(a,"borderTopWidth");a=$d(a,"borderBottomWidth");return new Vd(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))};function se(a){var b=a.__yt_uid_key;b||(b=te(),a.__yt_uid_key=b);return b}var te=r("yt.dom.getNextId_");if(!te){te=function(){return++ue};q("yt.dom.getNextId_",te,void 0);var ue=0}function ve(a,b,c){a=od(a,b,c);return a.length?a[0]:null}function we(a,b){"disabled"in a&&(a.disabled=!b);1==a.nodeType&&nb(a,"disabled",!b);if(a.hasChildNodes())for(var c=0,d;d=a.childNodes[c];++c)we(d,b)}
  55. function xe(a){a=a.replace(/^[\s\xa0]+/,"");var b=String(a.substr(0,3)).toLowerCase();if(0==("<tr"<b?-1:"<tr"==b?0:1))return a=yd("<table><tbody>"+a+"</tbody></table>"),ve("tr",null,a);b=document.createElement("div");b.innerHTML=a;return Fd(b)}function ye(){nb(document.body,"hide-players",!1);var a=nd("preserve-players");A(a,function(a){F(a,"preserve-players")})};function ze(a){if(a=a||window.event){for(var b in a)b in Ae||(this[b]=a[b]);this.ab=a;(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"==
  56. this.type?this.keyCode:0);this.altKey=a.altKey;this.ctrlKey=a.ctrlKey;this.shiftKey=a.shiftKey;"MozMousePixelScroll"==this.type?(this.wheelDeltaX=a.axis==a.HORIZONTAL_AXIS?a.detail:0,this.wheelDeltaY=a.axis==a.HORIZONTAL_AXIS?0:a.detail):window.opera?(this.wheelDeltaX=0,this.wheelDeltaY=a.detail):0==a.wheelDelta%120?"WebkitTransform"in document.documentElement.style?window.chrome&&0==navigator.platform.indexOf("Mac")?(this.wheelDeltaX=a.wheelDeltaX/-30,this.wheelDeltaY=a.wheelDeltaY/-30):(this.wheelDeltaX=
  57. a.wheelDeltaX/-1.2,this.wheelDeltaY=a.wheelDeltaY/-1.2):(this.wheelDeltaX=0,this.wheelDeltaY=a.wheelDelta/-1.6):(this.wheelDeltaX=a.wheelDeltaX/-3,this.wheelDeltaY=a.wheelDeltaY/-3)}}g=ze.prototype;g.ab=null;g.type="";g.target=null;g.relatedTarget=null;g.currentTarget=null;g.data=null;g.state=null;g.keyCode=0;g.charCode=0;g.altKey=!1;g.ctrlKey=!1;g.shiftKey=!1;g.clientX=0;g.clientY=0;g.wheelDeltaX=0;g.wheelDeltaY=0;g.preventDefault=function(){this.ab.returnValue=!1;this.ab.preventDefault&&this.ab.preventDefault()};
  58. g.stopPropagation=function(){this.ab.cancelBubble=!0;this.ab.stopPropagation&&this.ab.stopPropagation()};var Ae={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var yb=r("yt.events.listeners_")||{};q("yt.events.listeners_",yb,void 0);var Be=r("yt.events.counter_")||{count:0};q("yt.events.counter_",Be,void 0);function Ce(a,b,c,d){return xb(function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
  59. function T(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=Ce(a,b,c,d);if(e)return e;var e=++Be.count+"",f=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=f?function(d){d=new ze(d);if(!Qd(d.relatedTarget,function(b){return b==a}))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new ze(b);b.currentTarget=a;return c.call(a,b)};h=dc(h);yb[e]=[a,b,c,h,d];a.addEventListener?"mouseenter"==b&&f?a.addEventListener("mouseover",h,
  60. 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 De(a,b,c){var d;return d=T(a,b,function(){Ee(d);c.apply(a,arguments)},void 0)}function Fe(a,b,c,d){return Ge(a,b,c,function(a){return C(a,d)})}
  61. function Ge(a,b,c,d){var e=a||document;return T(e,b,function(a){var b=Qd(a.target,function(a){return a===e||d(a)});b&&b!==e&&!b.disabled&&(a.currentTarget=b,c.call(b,a))})}function Ee(a){a&&("string"==typeof a&&(a=[a]),A(a,function(a){if(a in yb){var c=yb[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 yb[a]}}))}function He(a){a=a||window.event;a=a.target||a.srcElement;3==a.nodeType&&(a=a.parentNode);return a};function Ie(){Ub(Je,"target-id","content")}function Ke(){var a=R(G(Je,"target-id"));a.setAttribute("tabindex","0");a.focus();a=ee(R("page-container")).y;window.scrollBy(0,-a)}var Je=null;function Le(a){Ad(Td);Td.setAttribute("role","alert");Td.appendChild(document.createTextNode(a));Td.style.visibility="hidden";Td.style.visibility="visible"};function Me(a){var b;b=b||0;return function(){return a.apply(this,Array.prototype.slice.call(arguments,0,b))}};var Ne="StopIteration"in m?m.StopIteration:Error("StopIteration");function Oe(){}Oe.prototype.next=function(){throw Ne;};Oe.prototype.va=function(){return this};function Pe(a){if(a instanceof Oe)return a;if("function"==typeof a.va)return a.va(!1);if(ea(a)){var b=0,c=new Oe;c.next=function(){for(;;){if(b>=a.length)throw Ne;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
  62. function Qe(a,b,c){if(ea(a))try{A(a,b,c)}catch(d){if(d!==Ne)throw d;}else{a=Pe(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==Ne)throw e;}}}function Re(a){if(ea(a))return cb(a);a=Pe(a);var b=[];Qe(a,function(a){b.push(a)});return b};function Se(a,b){this.e={};this.c=[];this.Ma=this.f=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)Te(this,arguments[d],arguments[d+1])}else if(a){a instanceof Se?(c=a.Aa(),d=a.Z()):(c=wb(a),d=vb(a));for(var e=0;e<c.length;e++)Te(this,c[e],d[e])}}g=Se.prototype;g.W=function(){return this.f};g.Z=function(){Ue(this);for(var a=[],b=0;b<this.c.length;b++)a.push(this.e[this.c[b]]);return a};g.Aa=function(){Ue(this);return this.c.concat()};
  63. g.Db=function(a){for(var b=0;b<this.c.length;b++){var c=this.c[b];if(Ve(this.e,c)&&this.e[c]==a)return!0}return!1};g.equals=function(a,b){if(this===a)return!0;if(this.f!=a.W())return!1;var c=b||We;Ue(this);for(var d,e=0;d=this.c[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function We(a,b){return a===b}g.isEmpty=function(){return 0==this.f};g.clear=function(){this.e={};this.Ma=this.f=this.c.length=0};
  64. g.remove=function(a){return Ve(this.e,a)?(delete this.e[a],this.f--,this.Ma++,this.c.length>2*this.f&&Ue(this),!0):!1};function Ue(a){if(a.f!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Ve(a.e,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.f!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Ve(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}g.get=function(a,b){return Ve(this.e,a)?this.e[a]:b};function Te(a,b,c){Ve(a.e,b)||(a.f++,a.c.push(b),a.Ma++);a.e[b]=c}
  65. g.forEach=function(a,b){for(var c=this.Aa(),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 Se(this)};g.va=function(a){Ue(this);var b=0,c=this.c,d=this.e,e=this.Ma,f=this,h=new Oe;h.next=function(){for(;;){if(e!=f.Ma)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Ne;var h=c[b++];return a?h:d[h]}};return h};function Ve(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Xe(a,b,c){for(var d=a.elements,e,f=0;e=d[f];f++)if(e.form==a&&!e.disabled&&"fieldset"!=e.tagName.toLowerCase()){var h=e.name;switch(e.type.toLowerCase()){case "file":case "submit":case "reset":case "button":break;case "select-multiple":e=Ye(e);if(null!=e)for(var k,l=0;k=e[l];l++)c(b,h,k);break;default:k=Ye(e),null!=k&&c(b,h,k)}}d=a.getElementsByTagName("input");for(f=0;e=d[f];f++)e.form==a&&"image"==e.type.toLowerCase()&&(h=e.name,c(b,h,e.value),c(b,h+".x","0"),c(b,h+".y","0"))}
  66. function Ze(a,b,c){var d=a.get(b);d||(d=[],Te(a,b,d));d.push(c)}function $e(a,b,c){a.push(encodeURIComponent(b)+"="+encodeURIComponent(c))}function Ye(a){var b=a.type;if(!p(b))return null;switch(b.toLowerCase()){case "checkbox":case "radio":return a.checked?a.value:null;case "select-one":return b=a.selectedIndex,0<=b?a.options[b].value:null;case "select-multiple":for(var b=[],c,d=0;c=a.options[d];d++)c.selected&&b.push(c.value);return b.length?b:null;default:return p(a.value)?a.value:null}};function af(a,b){return Sb(b,null)};function bf(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 cf(a){return eval("("+a+")")}function df(a){return ef(new ff(void 0),a)}function ff(a){this.c=a}
  67. function ef(a,b){var c=[];gf(a,b,c);return c.join("")}
  68. function gf(a,b,c){switch(typeof b){case "string":hf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(da(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],gf(a,a.c?a.c.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),hf(f,c),
  69. c.push(":"),gf(a,a.c?a.c.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var jf={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},kf=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
  70. function hf(a,b){b.push('"',a.replace(kf,function(a){if(a in jf)return jf[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return jf[a]=e+b.toString(16)}),'"')};var lf=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function mf(a){if(nf){nf=!1;var b=m.location;if(b){var c=b.href;if(c&&(c=of(c))&&c!=b.hostname)throw nf=!0,Error();}}return a.match(lf)}var nf=Uc;function of(a){return(a=mf(a)[3]||null)?decodeURI(a):a}function pf(){var a=window.location.href,b=a.indexOf("#");return 0>b?null:a.substr(b+1)}
  71. function qf(a){var b=mf(a);a=b[5];var c=b[6],b=b[7],d="";a&&(d+=a);c&&(d+="?"+c);b&&(d+="#"+b);return d}function rf(a){var b=a.indexOf("#");return 0>b?a:a.substr(0,b)}function sf(a,b){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?sa(h):"")}}function tf(a,b,c){if(da(b))for(var d=0;d<b.length;d++)tf(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}
  72. function uf(a,b){for(var c in b)tf(c,b[c],a);return a}function vf(a){a=uf([],a);a[0]="";return a.join("")}function wf(a,b){var c=uf([a],b);if(c[1]){var d=c[0],e=d.indexOf("#");0<=e&&(c.push(d.substr(e)),c[0]=d=d.substr(0,e));e=d.indexOf("?");0>e?c[1]="?":e==d.length-1&&(c[1]=void 0)}return c.join("")};function xf(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=sa(e[0]||""),e=sa(e[1]||"");f in b?da(b[f])?db(b[f],e):b[f]=[b[f],e]:b[f]=e}}return b}function yf(a){return-1!=a.indexOf("?")?(a=(a||"").split("#")[0],a=a.split("?",2),xf(1<a.length?a[1]:a[0])):{}}var zf=of;
  73. function Af(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=xf(d[1]||""),e;for(e in b)d[e]=b[e];return wf(a,d)+c}function Bf(a){a=zf(a);a=null===a?null:a.split(".").reverse();return(null===a?!1:"com"==a[0]&&a[1].match(/^youtube(?:-nocookie)?$/)?!0:!1)||(null===a?!1:"google"==a[1]?!0:"google"==a[2]?"au"==a[0]&&"com"==a[1]?!0:"uk"==a[0]&&"co"==a[1]?!0:!1:!1)};var Cf=null;"undefined"!=typeof XMLHttpRequest?Cf=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&(Cf=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function Df(a,b,c,d,e,f,h){function k(){4==(l&&"readyState"in l?l.readyState:0)&&b&&dc(b)(l)}var l=Cf&&Cf();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=Ef(a,e))for(var n in e)l.setRequestHeader(n,e[n]),"content-type"==n.toLowerCase()&&(f=!1);f&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.send(d);return l}
  74. function Ef(a,b){b=b||{};for(var c in Ff){var d=I(Ff[c]),e;if(e=d){e=a;var f=void 0;f=window.location.href;var h=mf(e)[1]||null,k=zf(e);h&&k?(e=mf(e),f=mf(f),e=e[3]==f[3]&&e[1]==f[1]&&e[4]==f[4]):e=k?zf(f)==k&&(Number(mf(f)[4]||null)||null)==(Number(mf(e)[4]||null)||null):!0;e||(e=c,f=I("CORS_HEADER_WHITELIST")||{},e=(h=zf(a))?(f=f[h])?Ua(f,e):!1:!0)}e&&(b[c]=d)}return b}
  75. function Gf(a,b){var c=I("XSRF_FIELD_NAME"),d;b.headers&&(d=b.headers["Content-Type"]);return!b.qf&&(!zf(a)||zf(a)==document.location.hostname)&&"POST"==b.method&&(!d||"application/x-www-form-urlencoded"==d)&&!(b.X&&b.X[c])}
  76. function Hf(a,b){var c=b.format||"JSON";b.tf&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=I("XSRF_FIELD_NAME"),e=I("XSRF_TOKEN"),f=b.La;f&&(f[d]&&delete f[d],a=Af(a,f));var h=b.ze||"",f=b.X;Gf(a,b)&&(f||(f={}),f[d]=e);f&&u(h)&&(d=xf(h),Eb(d,f),h=vf(d));var k=!1,l,n=Df(a,function(a){if(!k){k=!0;l&&M(l);var d;t: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=
  77. !0;break t;default:d=!1}var e=null;if(d||400<=a.status&&500>a.status)e=If(c,a,b.of);if(d)t:{switch(c){case "XML":d=0==parseInt(e&&e.return_code,10);break t;case "RAW":d=!0;break t}d=!!e}var e=e||{},f=b.context||m;d?b.P&&b.P.call(f,a,e):b.onError&&b.onError.call(f,a,e);b.hc&&b.hc.call(f,a,e)}},b.method,h,b.headers,b.responseType,b.withCredentials);b.wb&&0<b.timeout&&(l=K(function(){k||(k=!0,n.abort(),M(l),b.wb.call(b.context||m,n))},b.timeout));return n}
  78. function If(a,b,c){var d=null;switch(a){case "JSON":a=b.responseText;b=b.getResponseHeader("Content-Type")||"";a&&0<=b.indexOf("json")&&(d=cf(a));break;case "XML":if(b=(b=b.responseXML)?Jf(b):null)d={},A(b.getElementsByTagName("*"),function(a){d[a.tagName]=Kf(a)})}if(c)for(var e in d)if("html_content"==e||oa(e))d[e]=af(Hb(),d[e]);return d}function Jf(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}
  79. function Kf(a){var b="";A(a.childNodes,function(a){b+=a.nodeValue});return b}var Ff={"X-YouTube-Page-CL":"PAGE_CL","X-YouTube-Page-Timestamp":"PAGE_BUILD_TIMESTAMP","X-YouTube-Variants-Checksum":"VARIANTS_CHECKSUM"};function Lf(a,b){(a=R(a))&&a.style&&(a.style.display=b?"":"none",nb(a,"hid",!b))}function Mf(a){return(a=R(a))?!("none"==a.style.display||C(a,"hid")):!1}function Nf(a){if(a=R(a))Mf(a)?(a.style.display="none",E(a,"hid")):(a.style.display="",F(a,"hid"))}function Of(a,b){if(a=R(a))a.style.visibility=b?"visible":"hidden"}function Pf(a){A(arguments,function(a){Lf(a,!0)})}function Qf(a){A(arguments,function(a){Lf(a,!1)})}function Rf(a){A(arguments,Nf)};function Sf(a){Sf[" "](a);return a}Sf[" "]=t;var Tf=!Q||bd(9),Uf=Q&&!ad("9");!Uc||ad("528");Tc&&ad("1.9b")||Q&&ad("8")||Sc&&ad("9.5")||Uc&&ad("528");Tc&&!ad("8")||Q&&ad("9");function Vf(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.e=!1;this.gd=!0}Vf.prototype.stopPropagation=function(){this.e=!0};Vf.prototype.preventDefault=function(){this.defaultPrevented=!0;this.gd=!1};function Wf(a,b){Vf.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.clientY=this.clientX=0;this.shiftKey=this.altKey=this.ctrlKey=!1;this.c=this.state=null;a&&this.init(a,b)}z(Wf,Vf);
  80. Wf.prototype.init=function(a,b){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(Tc){var e;t:{try{Sf(d.nodeName);e=!0;break t}catch(f){}e=!1}e||(d=null)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);
  81. this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.state=a.state;this.c=a;a.defaultPrevented&&this.preventDefault()};Wf.prototype.stopPropagation=function(){Wf.G.stopPropagation.call(this);this.c.stopPropagation?this.c.stopPropagation():this.c.cancelBubble=!0};Wf.prototype.preventDefault=function(){Wf.G.preventDefault.call(this);var a=this.c;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Uf)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};
  82. Wf.prototype.f=function(){return this.c};var Xf="closure_listenable_"+(1E6*Math.random()|0),Yf=0;function Zf(a,b,c,d,e){this.Xa=a;this.c=null;this.src=b;this.type=c;this.Bb=!!d;this.Hb=e;this.key=++Yf;this.jb=this.Ab=!1}function $f(a){a.jb=!0;a.Xa=null;a.c=null;a.src=null;a.Hb=null};function ag(a){this.src=a;this.c={};this.e=0}ag.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.c[f];a||(a=this.c[f]=[],this.e++);var h=bg(a,b,d,e);-1<h?(b=a[h],c||(b.Ab=!1)):(b=new Zf(b,this.src,f,!!d,e),b.Ab=c,a.push(b));return b};ag.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.c))return!1;var e=this.c[a];b=bg(e,b,c,d);return-1<b?($f(e[b]),$a(e,b),0==e.length&&(delete this.c[a],this.e--),!0):!1};
  83. function cg(a,b){var c=b.type;if(!(c in a.c))return!1;var d=Za(a.c[c],b);d&&($f(b),0==a.c[c].length&&(delete a.c[c],a.e--));return d}ag.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.c)if(!a||c==a){for(var d=this.c[c],e=0;e<d.length;e++)++b,$f(d[e]);delete this.c[c];this.e--}return b};function dg(a,b,c,d,e){a=a.c[b.toString()];b=-1;a&&(b=bg(a,c,d,e));return-1<b?a[b]:null}
  84. function bg(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.jb&&f.Xa==b&&f.Bb==!!c&&f.Hb==d)return e}return-1};var eg="closure_lm_"+(1E6*Math.random()|0),fg={},gg=0;function hg(a,b,c,d,e){if(da(b)){for(var f=0;f<b.length;f++)hg(a,b[f],c,d,e);return null}c=ig(c);if(a&&a[Xf])a=a.Ca(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,h=jg(a);h||(a[eg]=h=new ag(a));c=h.add(b,c,!1,d,e);c.c||(d=kg(),c.c=d,d.src=a,d.Xa=c,a.addEventListener?a.addEventListener(b.toString(),d,f):a.attachEvent(lg(b.toString()),d),gg++);a=c}return a}
  85. function kg(){var a=mg,b=Tf?function(c){return a.call(b.src,b.Xa,c)}:function(c){c=a.call(b.src,b.Xa,c);if(!c)return c};return b}function ng(a,b,c,d,e){if(da(b))for(var f=0;f<b.length;f++)ng(a,b[f],c,d,e);else c=ig(c),a&&a[Xf]?a.qc(b,c,d,e):a&&(a=jg(a))&&(b=dg(a,b,c,!!d,e))&&og(b)}
  86. function og(a){if("number"==typeof a||!a||a.jb)return!1;var b=a.src;if(b&&b[Xf])return cg(b.Ga,a);var c=a.type,d=a.c;b.removeEventListener?b.removeEventListener(c,d,a.Bb):b.detachEvent&&b.detachEvent(lg(c),d);gg--;(c=jg(b))?(cg(c,a),0==c.e&&(c.src=null,b[eg]=null)):$f(a);return!0}function lg(a){return a in fg?fg[a]:fg[a]="on"+a}function pg(a,b,c,d){var e=!0;if(a=jg(a))if(b=a.c[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.Bb==c&&!f.jb&&(f=qg(f,d),e=e&&!1!==f)}return e}
  87. function qg(a,b){var c=a.Xa,d=a.Hb||a.src;a.Ab&&og(a);return c.call(d,b)}
  88. function mg(a,b){if(a.jb)return!0;if(!Tf){var c=b||r("window.event"),d=new Wf(c,this),e=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){t:{var f=!1;if(0==c.keyCode)try{c.keyCode=-1;break t}catch(h){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,k=c.length-1;!d.e&&0<=k;k--){d.currentTarget=c[k];var l=pg(c[k],f,!0,d),e=e&&l}for(k=0;!d.e&&k<c.length;k++)d.currentTarget=c[k],l=pg(c[k],f,!1,d),e=e&&l}return e}return qg(a,new Wf(b,this))}
  89. function jg(a){a=a[eg];return a instanceof ag?a:null}var rg="__closure_events_fn_"+(1E9*Math.random()>>>0);function ig(a){if(fa(a))return a;a[rg]||(a[rg]=function(b){return a.handleEvent(b)});return a[rg]};function sg(a){Yb.call(this);this.e=a;this.c={}}z(sg,Yb);var tg=[];g=sg.prototype;g.Ca=function(a,b,c,d){da(b)||(b&&(tg[0]=b.toString()),b=tg);for(var e=0;e<b.length;e++){var f=hg(a,b[e],c||this.handleEvent,d||!1,this.e||this);if(!f)break;this.c[f.key]=f}return this};
  90. g.qc=function(a,b,c,d,e){if(da(b))for(var f=0;f<b.length;f++)this.qc(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.e||this,c=ig(c),d=!!d,b=a&&a[Xf]?dg(a.Ga,String(b),c,d,e):a?(a=jg(a))?dg(a,b,c,d,e):null:null,b&&(og(b),delete this.c[b.key]);return this};g.removeAll=function(){qb(this.c,og);this.c={}};g.F=function(){sg.G.F.call(this);this.removeAll()};g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function ug(){Yb.call(this);this.Ga=new ag(this);this.nb=this;this.ga=null}z(ug,Yb);ug.prototype[Xf]=!0;g=ug.prototype;g.oc=function(a){this.ga=a};g.addEventListener=function(a,b,c,d){hg(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){ng(this,a,b,c,d)};
  91. function vg(a,b){var c,d=a.ga;if(d){c=[];for(var e=1;d;d=d.ga)c.push(d),++e}var d=a.nb,e=b,f=e.type||e;if(u(e))e=new Vf(e,d);else if(e instanceof Vf)e.target=e.target||d;else{var h=e,e=new Vf(f,d);Eb(e,h)}var h=!0,k;if(c)for(var l=c.length-1;!e.e&&0<=l;l--)k=e.currentTarget=c[l],h=wg(k,f,!0,e)&&h;e.e||(k=e.currentTarget=d,h=wg(k,f,!0,e)&&h,e.e||(h=wg(k,f,!1,e)&&h));if(c)for(l=0;!e.e&&l<c.length;l++)k=e.currentTarget=c[l],h=wg(k,f,!1,e)&&h}
  92. g.F=function(){ug.G.F.call(this);this.removeAllListeners();this.ga=null};g.Ca=function(a,b,c,d){return this.Ga.add(String(a),b,!1,c,d)};g.qc=function(a,b,c,d){return this.Ga.remove(String(a),b,c,d)};g.removeAllListeners=function(a){return this.Ga?this.Ga.removeAll(a):0};function wg(a,b,c,d){b=a.Ga.c[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.jb&&h.Bb==c){var k=h.Xa,l=h.Hb||h.src;h.Ab&&cg(a.Ga,h);e=!1!==k.call(l,d)&&e}}return e&&0!=d.gd};function xg(){}ba(xg);xg.prototype.c=0;function yg(a){ug.call(this);this.j=a||jd();this.sa=null;this.Ia=!1;this.c=null;this.e=void 0;this.L=this.R=this.l=null;this.Na=!1}z(yg,ug);g=yg.prototype;g.Kd=xg.getInstance();g.getId=function(){return this.sa||(this.sa=":"+(this.Kd.c++).toString(36))};g.ka=function(){return this.c};function zg(a,b){return a.c?S(b,a.c||a.j.c):null}function Ag(a){a.e||(a.e=new sg(a));return a.e}g.oc=function(a){if(this.l&&this.l!=a)throw Error("Method not supported");yg.G.oc.call(this,a)};
  93. g.render=function(a){if(this.Ia)throw Error("Component already rendered");this.c||(this.c=this.j.createElement("div"));a?a.insertBefore(this.c,null):this.j.c.body.appendChild(this.c);this.l&&!this.l.Ia||this.ya()};function Bg(a,b){if(a.Ia)throw Error("Component already rendered");if(b){a.Na=!0;var c=ld(b);a.j&&a.j.c==c||(a.j=jd(b));a.c=b;a.ya()}else throw Error("Invalid element to decorate");}g.ya=function(){this.Ia=!0;Cg(this,function(a){!a.Ia&&a.ka()&&a.ya()})};
  94. g.za=function(){Cg(this,function(a){a.Ia&&a.za()});this.e&&this.e.removeAll();this.Ia=!1};g.F=function(){this.Ia&&this.za();this.e&&(this.e.dispose(),delete this.e);Cg(this,function(a){a.dispose()});!this.Na&&this.c&&Cd(this.c);this.l=this.c=this.L=this.R=null;yg.G.F.call(this)};function Cg(a,b){a.R&&A(a.R,b,void 0)}
  95. g.removeChild=function(a,b){if(a){var c=u(a)?a:a.getId(),d;this.L&&c?(d=this.L,d=(c in d?d[c]:void 0)||null):d=null;a=d;if(c&&a){d=this.L;c in d&&delete d[c];Za(this.R,a);b&&(a.za(),a.c&&Cd(a.c));c=a;if(null==c)throw Error("Unable to set parent component");c.l=null;yg.G.oc.call(c,null)}}if(!a)throw Error("Child is not in parent component");return a};function Dg(a){yg.call(this,a);this.ra=[];this.Oa=[]}z(Dg,yg);Dg.prototype.za=function(){A(this.ra,Ee);pc(this.Oa);Dg.G.za.call(this)};function Eg(){Dg.call(this)}z(Eg,Dg);Eg.prototype.ya=function(){Eg.G.ya.call(this);this.D=G(this.ka(),"overflowable-list-orientation")||"horizontal";this.k=zg(this,"parent-list");this.C=zg(this,"overflow-container");this.f=zg(this,"overflow-list");zg(this,"overflowable-list-item");this.n=zg(this,"overflowable-list-more-button")};function Fg(){var a=nd("overflowable-list-root",Gg),b=[];A(a,function(a){var d=new Eg;Bg(d,a);b.push(d)});return b}
  96. function Hg(a,b){var c=Ig(a),d=Ig(b);return c<d?-1:c==d?0:1}function Jg(a,b){var c=cb(nd("overflowable-list-item",b));return Pa(c,function(a,b){return a+Kg(this,b)},0,a)}function Kg(a,b){return"vertical"==a.D?ie(b).height:ie(b).width}function Lg(a){var b=S("overflowable-list-item",a.ka());return b?Kg(a,b):0}function Ig(a){return Jg(a,a.k)+Jg(a,a.f)};function Mg(a,b,c,d,e,f,h){var k,l;if(k=c.offsetParent){var n="HTML"==k.tagName||"BODY"==k.tagName;n&&"static"==ae(k,"position")||(l=ee(k),n||(n=(n=le(k))&&Tc?-k.scrollLeft:!n||Q&&ad("8")||"visible"==ae(k,"overflowX")?k.scrollLeft:k.scrollWidth-k.clientWidth-k.scrollLeft,l=Ic(l,new Hc(n,k.scrollTop))))}k=l||new Hc;l=ke(a);if(n=de(a)){var x=new Wd(n.left,n.top,n.right-n.left,n.bottom-n.top),n=Math.max(l.left,x.left),J=Math.min(l.left+l.width,x.left+x.width);if(n<=J){var D=Math.max(l.top,x.top),x=Math.min(l.top+
  97. l.height,x.top+x.height);D<=x&&(l.left=n,l.top=D,l.width=J-n,l.height=x-D)}}n=jd(a);D=jd(c);if(n.c!=D.c){var J=n.c.body,D=ud(D.c),x=new Hc(0,0),B;B=(B=ld(J))?ud(B):window;var ra=J;do{var jb=B==D?ee(ra):fe(ra);x.x+=jb.x;x.y+=jb.y}while(B&&B!=D&&B!=B.parent&&(ra=B.frameElement)&&(B=B.parent));J=Ic(x,ee(J));!Q||bd(9)||Sd(n)||(J=Ic(J,sd(n.c)));l.left+=J.x;l.top+=J.y}a=Ng(a,b);b=new Hc(a&2?l.left+l.width:l.left,a&1?l.top+l.height:l.top);b=Ic(b,k);e&&(b.x+=(a&2?-1:1)*e.x,b.y+=(a&1?-1:1)*e.y);var L;h&&(L=
  98. de(c))&&(L.top-=k.y,L.right-=k.x,L.bottom-=k.y,L.left-=k.x);e=L;L=b.clone();b=Ng(c,d);d=ie(c);a=d.clone();L=L.clone();a=a.clone();k=0;if(f||0!=b)b&2?L.x-=a.width+(f?f.right:0):f&&(L.x+=f.left),b&1?L.y-=a.height+(f?f.bottom:0):f&&(L.y+=f.top);h&&(e?(f=L,b=a,k=0,65==(h&65)&&(f.x<e.left||f.x>=e.right)&&(h&=-2),132==(h&132)&&(f.y<e.top||f.y>=e.bottom)&&(h&=-5),f.x<e.left&&h&1&&(f.x=e.left,k|=1),h&16&&(l=f.x,f.x<e.left&&(f.x=e.left,k|=4),f.x+b.width>e.right&&(b.width=Math.min(e.right-f.x,l+b.width-e.left),
  99. b.width=Math.max(b.width,0),k|=4)),f.x+b.width>e.right&&h&1&&(f.x=Math.max(e.right-b.width,e.left),k|=1),h&2&&(k=k|(f.x<e.left?16:0)|(f.x+b.width>e.right?32:0)),f.y<e.top&&h&4&&(f.y=e.top,k|=2),h&32&&(l=f.y,f.y<e.top&&(f.y=e.top,k|=8),f.y+b.height>e.bottom&&(b.height=Math.min(e.bottom-f.y,l+b.height-e.top),b.height=Math.max(b.height,0),k|=8)),f.y+b.height>e.bottom&&h&4&&(f.y=Math.max(e.bottom-b.height,e.top),k|=2),h&8&&(k=k|(f.y<e.top?64:0)|(f.y+b.height>e.bottom?128:0)),h=k):h=256,k=h);f=new Wd(0,
  100. 0,0,0);f.left=L.x;f.top=L.y;f.width=a.width;f.height=a.height;h=k;h&496||(L=new Hc(f.left,f.top),L instanceof Hc?(e=L.x,L=L.y):(e=L,L=void 0),c.style.left=he(e,!1),c.style.top=he(L,!1),a=new Jc(f.width,f.height),d==a||d&&a&&d.width==a.width&&d.height==a.height||(f=a,d=ld(c),e=Sd(jd(d)),!Q||ad("10")||e&&ad("8")?(c=c.style,Tc?c.MozBoxSizing="border-box":Uc?c.WebkitBoxSizing="border-box":c.boxSizing="border-box",c.width=Math.max(f.width,0)+"px",c.height=Math.max(f.height,0)+"px"):(d=c.style,e?(e=oe(c),
  101. c=re(c),d.pixelWidth=f.width-c.left-e.left-e.right-c.right,d.pixelHeight=f.height-c.top-e.top-e.bottom-c.bottom):(d.pixelWidth=f.width,d.pixelHeight=f.height))));return h}function Ng(a,b){return(b&4&&le(a)?b^2:b)&-5};function Og(a){this.c=a}var Pg=/\s*;\s*/;function Qg(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+'"');p(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(y()+1E3*d)).toUTCString();a.c.cookie=b+"="+c+f+e+d+""}g=Og.prototype;
  102. g.get=function(a,b){for(var c=a+"=",d=(this.c.cookie||"").split(Pg),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=p(this.get(a));Qg(this,a,"",0,b,c);return d};g.Aa=function(){return Rg(this).keys};g.Z=function(){return Rg(this).values};g.isEmpty=function(){return!this.c.cookie};g.W=function(){return this.c.cookie?(this.c.cookie||"").split(Pg).length:0};
  103. g.Db=function(a){for(var b=Rg(this).values,c=0;c<b.length;c++)if(b[c]==a)return!0;return!1};g.clear=function(){for(var a=Rg(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};function Rg(a){a=(a.c.cookie||"").split(Pg);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 Sg=new Og(document);Sg.e=3950;function Tg(a,b,c,d,e){Qg(Sg,""+a,b,c,d,e||"youtube.com")}function Ug(a,b){return Sg.get(""+a,b)}function Vg(a,b,c){return Sg.remove(""+a,b||"/",c||"youtube.com")};function Wg(a){var b=window.location;a=wf(a,{})+"";a=a instanceof Ib?a:Mb(a);b.href=Kb(a)}function Xg(a){(window.ytspf||{}).enabled?spf.navigate(a):Wg(a)}function Yg(a,b,c){var d=I("EVENT_ID");d&&(b||(b={}),b.ei||(b.ei=d));b&&(d=of(a),d==of(window.location.href)||!d&&0==a.lastIndexOf("/",0))&&(d=qf(a),d=rf(d))&&(d=I("SMALLER_SESSION_TEMPDATA_NAME")?"ST-"+Ga(d).toString(36):"s_tempdata-"+Ga(d),b=b?vf(b):"",Tg(d,b,5,"/"));if(c)return!1;Xg(a);return!0};var Zg;function $g(a){var b=void 0;void 0===b&&(b=NaN);var c=r("yt.scheduler.instance.addJob");c?(isNaN(b)&&(b=0),c(a,0,b)):isNaN(b)?a():K(a,b||0)};function ah(a,b){this.version=a;this.args=b}function bh(a){if(!a.Ma){var b={};a.call(b);a.Ma=b.version}return a.Ma}
  104. function ch(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=bh(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(f){throw f.message="yt.pubsub2.Data.deserialize(): "+f.message,f;}}function dh(a,b){this.e=a;this.c=b}dh.prototype.toString=function(){return this.e};var eh=r("yt.pubsub2.instance_")||new H;H.prototype.subscribe=H.prototype.subscribe;H.prototype.unsubscribeByKey=H.prototype.qa;H.prototype.publish=H.prototype.B;H.prototype.clear=H.prototype.clear;q("yt.pubsub2.instance_",eh,void 0);var fh=r("yt.pubsub2.subscribedKeys_")||{};q("yt.pubsub2.subscribedKeys_",fh,void 0);var gh=r("yt.pubsub2.topicToKeys_")||{};q("yt.pubsub2.topicToKeys_",gh,void 0);var hh=r("yt.pubsub2.isAsync_")||{};q("yt.pubsub2.isAsync_",hh,void 0);
  105. q("yt.pubsub2.skipSubKey_",null,void 0);
  106. function ih(a,b){var c=r("yt.pubsub2.instance_");if(c){var d=c.subscribe(a.toString(),function(c,f){if(!window.yt.pubsub2.skipSubKey_||window.yt.pubsub2.skipSubKey_!=d){var h=function(){if(fh[d])try{if(f&&a instanceof dh&&a!=c)try{f=ch(a.c,f)}catch(h){throw h.message="yt.pubsub2 cross-binary conversion error for "+a.toString()+": "+h.message,h;}b.call(window,f)}catch(l){fc(l)}};hh[a.toString()]?r("yt.scheduler.instance")?$g(h):K(h,0):h()}});fh[d]=!0;gh[a.toString()]||(gh[a.toString()]=[]);gh[a.toString()].push(d)}}
  107. ;var jh={},kh="ontouchstart"in document;function lh(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Qd(c,function(a){return C(a,b)},d)}
  108. function mh(a){var b="mouseover"==a.type&&"mouseenter"in jh||"mouseout"==a.type&&"mouseleave"in jh,c=a.type in jh||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=jh[b],d;for(d in c.ea){var e=lh(b,d,a.target);e&&!Qd(a.relatedTarget,function(a){return a==e})&&c.B(d,e,b,a)}}if(b=jh[a.type])for(d in b.ea)(e=lh(a.type,d,a.target))&&b.B(d,e,a.type,a)}}T(document,"blur",mh,!0);T(document,"change",mh,!0);T(document,"click",mh);T(document,"focus",mh,!0);
  109. T(document,"mouseover",mh);T(document,"mouseout",mh);T(document,"mousedown",mh);T(document,"keydown",mh);T(document,"keyup",mh);T(document,"keypress",mh);T(document,"cut",mh);T(document,"paste",mh);kh&&(T(document,"touchstart",mh),T(document,"touchend",mh),T(document,"touchcancel",mh));function nh(){}g=nh.prototype;g.Ta=function(a){return Rd(a,U(this))};function U(a,b){return"yt-uix"+(a.c?"-"+a.c:"")+(b?"-"+b:"")}g.init=t;g.dispose=t;g.Ac=function(a,b,c){var d=this.T(a,b);if(d&&(d=r(d))){var e=fb(arguments,2);eb(e,0,0,a);d.apply(null,e)}};g.T=function(a,b){return G(a,b)};function oh(){this.e=[];this.f={}}z(oh,nh);ba(oh);oh.prototype.c="button";function ph(a,b){var c=b.iframeMask;c||(c=document.createElement("iframe"),c.src='javascript:""',c.className=U(a,"menu-mask"),b.iframeMask=c);return c}
  110. function qh(){var a=oh.getInstance(),b=rh;if(b){var c=sh(a,b);if(c){b.setAttribute("aria-pressed","false");b.setAttribute("aria-expanded","false");b.removeAttribute("aria-activedescendant");Qf(c);a.Ac(b,"button-menu-action",!1);var d=ph(a,b),e=se(c).toString();delete a.f[e];K(function(){d&&d.parentNode&&d.parentNode.removeChild(d);c.originalParentNode&&(c.parentNode.removeChild(c),c.originalParentNode.appendChild(c),c.originalParentNode=null,c.activeButtonNode=null)},1)}var e=Rd(b,U(a,"group")),f=
  111. [U(a,"active")];e&&f.push(U(a,"group-active"));mb(b,f);O("yt-uix-button-menu-hide",b);Ee(a.e);a.e.length=0}}function sh(a,b){if(!b.widgetMenu){var c=a.T(b,"button-menu-id"),c=c&&R(c),d=U(a,"menu");c?lb(c,[d,U(a,"menu-external")]):c=S(d,b);b.widgetMenu=c}return b.widgetMenu}
  112. function th(a,b){if(a.T(b,"button-toggle")){var c=Rd(b,U(a,"group")),d=U(a,"toggled"),e=C(b,d);if(c&&a.T(c,"button-toggle-group")){var f=a.T(c,"button-toggle-group"),c=nd(U(a),c);A(c,function(a){a!=b||"optional"==f&&e?(F(a,d),a.removeAttribute("aria-pressed")):(E(b,d),a.setAttribute("aria-pressed","true"))})}else e?b.removeAttribute("aria-pressed"):b.setAttribute("aria-pressed","true"),ob(b,d)}};function uh(){var a=Ug("PREF");if(a)for(var a=unescape(a).split("&"),b=0;b<a.length;b++){var c=a[b].split("="),d=c[0];(c=c[1])&&(vh[d]=c.toString())}}ba(uh);var vh=r("yt.prefs.UserPrefs.prefs_")||{};q("yt.prefs.UserPrefs.prefs_",vh,void 0);function wh(a){if(/^f([1-9][0-9]*)$/.test(a))throw"ExpectedRegexMatch: "+a;}function xh(a){if(!/^\w+$/.test(a))throw"ExpectedRegexMismatch: "+a;}function yh(a){a=void 0!==vh[a]?vh[a].toString():null;return null!=a&&/^[A-Fa-f0-9]+$/.test(a)?parseInt(a,16):null}
  113. uh.prototype.get=function(a,b){xh(a);wh(a);var c=void 0!==vh[a]?vh[a].toString():null;return null!=c?c:b?b:""};function zh(a,b){return!!((yh("f"+(Math.floor(b/31)+1))||0)&1<<b%31)}function Ah(a,b){var c="f"+(Math.floor(a/31)+1),d=1<<a%31,e=yh(c)||0,e=b?e|d:e&~d;0==e?delete vh[c]:(d=e.toString(16),vh[c]=d.toString())}uh.prototype.remove=function(a){xh(a);wh(a);delete vh[a]};uh.prototype.clear=function(){vh={}};function Bh(){var a=[],b;for(b in vh)a.push(b+"="+escape(vh[b]));return a.join("&")};function Ch(a){if(!Zg||a)Zg=rd(window);return Zg};function Dh(){}z(Dh,nh);g=Dh.prototype;g.Ta=function(a){var b=nh.prototype.Ta.call(this,a);return b?b:a};g.T=function(a,b){var c=Dh.G.T.call(this,a,b);return c?c:(c=Dh.G.T.call(this,a,"card-config"))&&(c=r(c))&&c[b]?c[b]:null};
  114. g.vc=function(a){var b=this.Ta(a);if(b){E(b,U(this,"active"));var c=Eh(this,a,b);if(c){c.cardTargetNode=a;c.cardRootNode=b;Fh(this,a,c);var d=U(this,"card-visible"),e=this.T(a,"card-delegate-show")&&this.T(b,"card-action");this.Ac(b,"card-action",a);this.e=a;Qf(c);K(v(function(){e||(Pf(c),O("yt-uix-card-show",b,a,c));Gh(c);E(c,d);O("yt-uix-kbd-nav-move-in-to",c)},this),10)}}};
  115. function Eh(a,b,c){var d=c||b,e=U(a,"card");c=Hh(a,d);var f=R(U(a,"card")+se(d));if(f)return a=S(U(a,"card-body"),f),Kd(a,c)||(Cd(c),a.appendChild(c)),f;f=document.createElement("div");f.id=U(a,"card")+se(d);f.className=e;(d=a.T(d,"card-class"))&&lb(f,d.split(/\s+/));d=document.createElement("div");d.className=U(a,"card-border");b=a.T(b,"orientation")||"horizontal";e=document.createElement("div");e.className="yt-uix-card-border-arrow yt-uix-card-border-arrow-"+b;var h=document.createElement("div");
  116. h.className=U(a,"card-body");a=document.createElement("div");a.className="yt-uix-card-body-arrow yt-uix-card-body-arrow-"+b;Cd(c);h.appendChild(c);d.appendChild(a);d.appendChild(h);f.appendChild(e);f.appendChild(d);document.body.appendChild(f);return f}
  117. function Fh(a,b,c){var d=a.T(b,"orientation")||"horizontal",e=a.T(b,"position"),f=!!a.T(b,"force-position"),h=a.T(b,"position-fixed"),d="horizontal"==d,k="bottomright"==e||"bottomleft"==e,l="topright"==e||"bottomright"==e,n,x;l&&k?(x=7,n=4):l&&!k?(x=6,n=5):!l&&k?(x=5,n=6):(x=4,n=7);var J=le(document.body),e=le(b);J!=e&&(x^=2);var D;d?(e=b.offsetHeight/2-12,D=new Hc(-12,b.offsetHeight+6)):(e=b.offsetWidth/2-6,D=new Hc(b.offsetWidth+6,-12));var B=ie(c),e=Math.min(e,(d?B.height:B.width)-24-6);6>e&&(e=
  118. 6,d?D.y+=12-b.offsetHeight/2:D.x+=12-b.offsetWidth/2);var ra=null;f||(ra=10);B=U(a,"card-flip");a=U(a,"card-reverse");nb(c,B,l);nb(c,a,k);ra=Mg(b,x,c,n,D,null,ra);!f&&ra&&(ra&48&&(l=!l,x^=2,n^=2),ra&192&&(k=!k,x^=1,n^=1),nb(c,B,l),nb(c,a,k),Mg(b,x,c,n,D));h&&(b=parseInt(c.style.top,10),f=sd(document).y,Xd(c,"position","fixed"),Xd(c,"top",b-f+"px"));J&&(c.style.right="",b=ke(c),b.left=b.left||parseInt(c.style.left,10),f=rd(window),c.style.left="",c.style.right=f.width-b.left-b.width+"px");b=S("yt-uix-card-body-arrow",
  119. c);f=S("yt-uix-card-border-arrow",c);d=d?k?"top":"bottom":!J&&l||J&&!l?"left":"right";b.setAttribute("style","");f.setAttribute("style","");b.style[d]=e+"px";f.style[d]=e+"px";k=S("yt-uix-card-arrow",c);l=S("yt-uix-card-arrow-background",c);k&&l&&(c="right"==d?ie(c).width-e-13:e+11,e=c/Math.sqrt(2),k.style.left=c+"px",k.style.marginLeft="1px",l.style.marginLeft=-e+"px",l.style.marginTop=e+"px")}
  120. g.bb=function(a){if(a=this.Ta(a)){var b=R(U(this,"card")+se(a));b&&(F(a,U(this,"active")),F(b,U(this,"card-visible")),Qf(b),this.e=null,b.cardTargetNode=null,b.cardRootNode=null,b.cardMask&&(Cd(b.cardMask),b.cardMask=null))}};g.Ke=function(a,b){var c=this.Ta(a);if(c){if(b){var d=Hh(this,c);if(!d)return;b instanceof Qb?d.innerHTML=b instanceof Qb&&b.constructor===Qb&&b.e===Rb?b.c:"type_error:SafeHtml":Ld(d,b)}C(c,U(this,"active"))&&(c=Eh(this,a,c),Fh(this,a,c),Pf(c),Gh(c))}};
  121. g.isActive=function(a){return(a=this.Ta(a))?C(a,U(this,"active")):!1};function Hh(a,b){var c=b.cardContentNode;if(!c){var d=U(a,"content"),e=U(a,"card-content");(c=(c=a.T(b,"card-id"))?R(c):S(d,b))||(c=document.createElement("div"));pb(c,d,e);b.cardContentNode=c}return c}
  122. function Gh(a){var b=a.cardMask;b||(b=document.createElement("iframe"),b.src='javascript:""',lb(b,["yt-uix-card-iframe-mask"]),a.cardMask=b);b.style.position=a.style.position;b.style.top=a.style.top;b.style.left=a.offsetLeft+"px";b.style.height=a.clientHeight+"px";b.style.width=a.clientWidth+"px";document.body.appendChild(b)};function Ih(){this.f={};this.k={}}z(Ih,Dh);ba(Ih);Ih.prototype.c="clickcard";Ih.prototype.vc=function(a){Ih.G.vc.call(this,a);var b=this.Ta(a);if(!G(b,"click-outside-persists")){var c=ha(a);if(this.f[c])return;var b=T(document,"click",v(this.j,this,a)),d=T(window,"blur",v(this.j,this,a));this.f[c]=[b,d]}a=T(window,"resize",v(this.Ke,this,a,void 0));this.k[c]=a};Ih.prototype.bb=function(a){Ih.G.bb.call(this,a);a=ha(a);var b=this.f[a];b&&(Ee(b),this.f[a]=null);if(b=this.k[a])Ee(b),this.k[a]=null};
  123. Ih.prototype.j=function(a,b){Rd(b.target,"yt-uix"+(this.c?"-"+this.c:"")+"-card")||this.bb(a)};function Jh(){}z(Jh,Dh);ba(Jh);Jh.prototype.c="hovercard";function Kh(a){this.c=a;this.e=S("yt-dialog-fg",this.c)||this.c;if(a=S("yt-dialog-title",this.e)){var b="yt-dialog-title-"+ha(this.e);a.setAttribute("id",b);this.e.setAttribute("aria-labelledby",b)}this.e.setAttribute("tabindex","-1");this.n=S("yt-dialog-focus-trap",this.c);this.D=!1;this.f=new H;this.k=[];this.k.push(Fe(this.c,"click",v(this.fa,this),"yt-dialog-dismiss"));this.k.push(T(this.n,"focus",v(this.H,this),!0));Lh(this);this.l=this.j=null}var Mh={LOADING:"loading",af:"content",kf:"working"};
  124. function Lh(a){a=S("yt-dialog-fg-content",a.c);var b=[];qb(Mh,function(a){b.push("yt-dialog-show-"+a)});mb(a,b);E(a,"yt-dialog-show-content")}function Nh(){var a=nd("yt-dialog");return Qa(a,function(a){return Mf(a)})}function Oh(){var a=nd("iframe-hid");A(a,function(a){F(a,"iframe-hid")})}Kh.prototype.fa=function(a){a=a.currentTarget;a.disabled||(a=G(a,"action")||"",Ph(this,a))};
  125. function Ph(a,b){if(!a.K()){a.f.B("pre-all");a.f.B("pre-"+b);Qf(a.c);var c=Ih.getInstance();c.e&&c.bb(c.e);c=Jh.getInstance();c.e&&c.bb(c.e);Nh()||(Qf(a.L),F(document.body,"yt-dialog-active"),ye(),Oh());a.j&&(Ee(a.j),a.j=null);a.l&&(Ee(a.l),a.l=null);if(c=a.c){var d=G(c,"player-ready-pubsub-key");d&&(pc(d),Wb(c,"player-ready-pubsub-key"))}a.f.B("post-all");O("yt-ui-dialog-hide-complete",a);"cancel"==b&&O("yt-ui-dialog-cancelled",a);a.f&&a.f.B("post-"+b);a.C&&a.C.focus()}}Kh.prototype.K=function(){return this.D};
  126. Kh.prototype.dispose=function(){Mf(this.c)&&Ph(this,"dispose");Ee(this.k);this.k.length=0;K(v(function(){this.C=null},this),0);this.n=this.e=null;this.f.dispose();this.f=null;this.D=!0};Kh.prototype.H=function(a){a.stopPropagation();Qh(this)};function Qh(a){K(v(function(){this.e&&this.e.focus()},a),0)}q("yt.ui.Dialog",Kh,void 0);function Rh(){}z(Rh,nh);ba(Rh);Rh.prototype.c="overlay";function Sh(){Rh.getInstance();var a;t:{if(a=nd("yt-dialog-fg-content"))for(var b=0;b<a.length;b++){var c=Rd(a[b],"yt-dialog");if(Mf(c)){a=a[b];break t}}a=null}return a}function Th(){Rh.getInstance();O("yt-uix-overlay-hide")};var Gg,Uh,Vh,Wh,Xh=[];
  127. function Yh(){var a=Zh(),b=G(a,"collection-id"),c=S("subscription-picker-list-container",a),d=nd("subscription-list-item",c),c=Oa(Na(d,function(a){return C(a,"selected")&&!C(a,"saved")}),function(a){return G(a,"channel-id")}),d=Oa(Na(d,function(a){return!C(a,"selected")&&C(a,"saved")}),function(a){return G(a,"channel-id")});$h(a);var e=S("collection-name-input",a),f=e.attributes.value;(e=e.value)?(ai(a,!0),b?c.length||d.length||f!=e?bi(b,e,c,d):($h(a),Th()):ci(e,c)):di(a,!0)}
  128. function ei(a,b){$h(a);Th();b.response&&b.response.collection_url&&Wg(b.response.collection_url)}function bi(a,b,c,d){var e=Zh(),f=eb(c,0,40),h=eb(d,0,40),f={name:b,collection_id:a,added_ids:f.join(","),removed_ids:h.join(",")};Hf("/subscription_ajax?action_update_collection=1",{method:"POST",X:f,P:function(f,h){c.length||d.length?bi(a,b,c,d):ei(e,h)},onError:fi(e)})}
  129. function ci(a,b){var c=Zh();if(b.length){var d=eb(b,0,40),d={name:a,external_channel_ids:d.join(",")};Hf("/subscription_ajax?action_add_collection=1",{method:"POST",X:d,P:function(d,f){if(b.length){var h=f.response.collection_id;h&&bi(h,a,b,[])}else ei(c,f)},onError:fi(c)})}else $h(c),Th()}function gi(){var a=Zh(),b=G(a,"collection-id");$h(a);ai(a,!0);Hf("/subscription_ajax?action_remove_collection=1",{method:"POST",X:{collection_id:b},P:function(){$h(a);Th();Wg("/")},onError:fi(a)})}
  130. function hi(){var a=Zh(),b=S("subscription-picker-list-container",a),b=S("subscription-picker-list",b).cloneNode(!0),c=nd("subscription-list-item",b);A(c,function(a){C(a,"selected")||Cd(a)});c=S("selected-channel-list-container",a);Ad(c);c.appendChild(b);a=S("selected-channels-button",a);Lf(a,!!b)}
  131. function ii(a){var b=a.currentTarget;if(Rd(b,"selected-channel-list-container")){var c=G(b,"channel-id");a=Zh();a=S("subscription-picker-list-container",a);a=nd("subscription-list-item",a);A(a,function(a){G(a,"channel-id")==c&&(b=a)})}ob(b,"selected");hi()}function ji(){var a=Zh(),b=S("subscription-search-input",a);ki(a,b&&b.value)}function li(){var a=Zh();S("subscription-search-input",a).value="";ki(a,"")}
  132. function ki(a,b){var c=nd("subscription-list-item",a),d=new RegExp(b,"i");A(c,function(a){var c=G(a,"channel-name");Lf(a,!b||d.test(c))});c=S("subscription-search-clear",a);Of(c,!!b)}function mi(a){var b=G(a,"panel-class");b&&(a=Sh(),a=S("subscription-picker",a),a=S(b,a),a=Jd(a),A(Ed(a),function(a){Lf(a,C(a,b))}))}function ni(a){mi(a.currentTarget)}function Zh(){var a=Sh();return S("subscription-picker",a)}function $h(a){oi(a,"");pi(a,!1);ai(a,!1);di(a,!1)}
  133. function pi(a,b){var c=S("subscription-picker-loading",a);Lf(c,b)}function ai(a,b){var c=S("subscription-picker-saving",a);Lf(c,b)}function di(a,b){var c=S("collection-name-empty-error",a);Lf(c,b)}function oi(a,b){var c=S("subscription-picker-errors",a);Lf(c,""!=b);b&&(c=S("yt-alert-content",c),Ld(c,b))}function fi(a){return function(b,c){$h(a);var d=c.errors;d&&0<d.length&&oi(a,d[0])}};function qi(a,b,c){this.e=a;(a=b||null)||(a=ri(this.e));a="("+a.join("|")+")";a=pa("__%s__",a);this.f=new RegExp(a,"g");this.c=c||{}}var si=/__([a-z]+(?:_[a-z]+)*)__/g;function ti(a,b){var c=ui(R(a));return new qi(c,b,void 0)}function ui(a){a=a.innerHTML;a=a.replace(/^\s*(\x3c!--\s*)?/,"");return a=a.replace(/(\s*--\x3e)?\s*$/,"")}function ri(a){var b=[],c={};a.replace(si,function(a,e){e in c||(c[e]=!0,b.push(e))});return b}
  134. qi.prototype.render=function(a,b,c){var d=v(function(d,f){b&&(f=b(f));return c?a[f]||this.c[f]||"":ta(a[f]||this.c[f]||"")},this);return this.e.replace(this.f,d)};var vi=P("Firefox"),wi=Rc()||P("iPod"),xi=P("iPad"),yi=P("Android")&&!(Pc()||P("Firefox")||Nc()||P("Silk")),zi=Pc(),Ai=P("Safari")&&!(Pc()||P("Coast")||Nc()||Oc()||P("Silk")||P("Android"))&&!(Rc()||P("iPad")||P("iPod"));function Bi(a){Dg.call(this);this.C=a;this.ca=0;this.H=this.k=this.D=this.n=this.f=this.V=null}z(Bi,Dg);g=Bi.prototype;
  135. g.ya=function(){Bi.G.ya.call(this);this.Q=this.ka();this.ca=parseInt(G(this.Q,"max-title-length"),10)||0;this.D=zg(this,"create-button");this.k=zg(this,"cancel-button");this.n=zg(this,"privacy-button");var a=Ag(this);this.f=zg(this,"title-input");a.Ca(this.f,"keyup",this.Yc);a.Ca(this.f,"paste",this.Yc);a.Ca(this.Q,"reset",this.Yd);a.Ca(this.Q,"submit",this.Zd);this.V=zg(this,"create-playlist-widget-privacy-menu");this.H=zg(this,"yt-uix-button-menu-item-selected");a=Fe(this.ka(),"click",v(this.je,
  136. this),"privacy-option");this.ra.push(a)};g.za=function(){Ci(this);this.H=this.k=this.D=this.V=this.n=this.f=null;Bi.G.za.call(this)};g.Yc=function(){var a=we,b=this.D,c=qa(this.f.value).length;a(b,0<c&&(!this.ca||c<=this.ca))};g.je=function(a){(a=a.currentTarget)&&Di(this,a);a=G(a,"value");zg(this,"privacy-value-input").value=a};
  137. function Di(a,b){var c;c=oh.getInstance();c=S(U(c,"content"),a.n);var d;hd&&"innerText"in b?d=b.innerText.replace(/(\r\n|\r|\n)/g,"\n"):(d=[],Od(b,d,!0),d=d.join(""));d=d.replace(/ \xAD /g," ").replace(/\xAD/g,"");d=d.replace(/\u200B/g,"");hd||(d=d.replace(/ +/g," "));" "!=d&&(d=d.replace(/^\s*/,""));Ld(c,qa(d));c=S("yt-uix-button-menu-item-selected",a.V);F(c,"yt-uix-button-menu-item-selected");E(b,"yt-uix-button-menu-item-selected");c=G(b,"privacy-state-of-menu");Ub(a.n,"privacy-state",c)}
  138. function Ei(a,b){we(a.D,b);a.k&&we(a.k,b);we(a.f,b);we(a.n,b)}function Ci(a){a.f.value="";var b=zg(a,"title-input-container");F(b,"yt-uix-form-error");b=S("yt-uix-form-error-message",b);Cd(b);we(a.n,!0);(b=S("yt-uix-button-menu-item-selected",a.V))&&a.H&&b!=a.H&&Di(a,a.H);we(a.D,!1);a.k&&we(a.k,!0);we(a.f,!0)}
  139. g.Zd=function(a){a.preventDefault();a=this.Q;var b={context:this,P:this.Wd,onError:this.Vd};b.method=a.method.toUpperCase();if("POST"==b.method){var c;c=[];Xe(a,c,$e);c=c.join("&");b.ze=c}else{var d=new Se;Xe(a,d,Ze);Ue(d);c={};for(var e=0;e<d.c.length;e++){var f=d.c[e];c[f]=d.e[f]}d=b.La||{};Eb(d,c);b.La=d}Hf(a.action,b);Ei(this,!1)};g.Wd=function(a,b){Ci(this);this.C&&fa(this.C.Kb)&&this.C.Kb({playlistId:b.result.playlistId,playlistName:b.result.playlistName,xe:b.result.playlistUrl});O("yt-uix-videoactionmenu-hide")};
  140. g.Vd=function(a,b){if(b&&b.errors&&b.errors.length){var c=zg(this,"title-input-container"),d=b.errors[0];E(c,"yt-uix-form-error");var e=S("yt-uix-form-error-message",c);e?e.innerHTML=d:(d=vd("span","yt-uix-form-error-message",document.createTextNode(String(d))),c.appendChild(d));Ei(this,!0)}};g.Yd=function(){Ci(this);this.C&&fa(this.C.Jb)&&this.C.Jb()};var Fi={};function Gi(a,b){if(I("EVENTS_TRACKER_INSTALLED")){var c=Fi[a];if(!c){var d=window._gaq._getAsyncTracker("eventsPageTracker");if(!d)return;window._gaq.push(function(){c=d._createEventTracker(a);Fi[a]=c})}window._gaq.push(function(){c._trackEvent(b,void 0,void 0)})}};function Hi(a){return"function"==typeof a.W?a.W():ea(a)||u(a)?a.length:sb(a)}function Ii(a){if("function"==typeof a.Z)return a.Z();if(u(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return vb(a)}function Ji(a){if("function"==typeof a.Aa)return a.Aa();if("function"!=typeof a.Z){if(ea(a)||u(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return wb(a)}}
  141. function Ki(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(ea(a)||u(a))A(a,b,void 0);else for(var c=Ji(a),d=Ii(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}function Li(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(ea(a)||u(a))return Ra(a,b,void 0);for(var c=Ji(a),d=Ii(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 Mi(a,b){var c;a instanceof Mi?(this.Ua=p(b)?b:a.Ua,Ni(this,a.Ka),this.$a=a.$a,Oi(this,a.xa),Pi(this,a.Ya),this.la=a.la,Qi(this,a.c.clone()),this.Sa=a.Sa):a&&(c=mf(String(a)))?(this.Ua=!!b,Ni(this,c[1]||"",!0),this.$a=Ri(c[2]||""),Oi(this,c[3]||"",!0),Pi(this,c[4]),this.la=Ri(c[5]||"",!0),Qi(this,c[6]||"",!0),this.Sa=Ri(c[7]||"")):(this.Ua=!!b,this.c=new Si(null,0,this.Ua))}g=Mi.prototype;g.Ka="";g.$a="";g.xa="";g.Ya=null;g.la="";g.Sa="";g.Ua=!1;
  142. g.toString=function(){var a=[],b=this.Ka;b&&a.push(Ti(b,Ui,!0),":");if(b=this.xa){a.push("//");var c=this.$a;c&&a.push(Ti(c,Ui,!0),"@");a.push(encodeURIComponent(String(b)).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ya;null!=b&&a.push(":",String(b))}if(b=this.la)this.xa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ti(b,"/"==b.charAt(0)?Vi:Wi,!0));(b=this.c.toString())&&a.push("?",b);(b=this.Sa)&&a.push("#",Ti(b,Xi));return a.join("")};
  143. g.resolve=function(a){var b=this.clone(),c=!!a.Ka;c?Ni(b,a.Ka):c=!!a.$a;c?b.$a=a.$a:c=!!a.xa;c?Oi(b,a.xa):c=null!=a.Ya;var d=a.la;if(c)Pi(b,a.Ya);else if(c=!!a.la){if("/"!=d.charAt(0))if(this.xa&&!this.la)d="/"+d;else{var e=b.la.lastIndexOf("/");-1!=e&&(d=b.la.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&&
  144. ""!=f[0])&&f.pop(),d&&h==e.length&&f.push("")):(f.push(k),d=!0)}d=f.join("/")}else d=e}c?b.la=d:c=""!==a.c.toString();c?Qi(b,Ri(a.c.toString())):c=!!a.Sa;c&&(b.Sa=a.Sa);return b};g.clone=function(){return new Mi(this)};function Ni(a,b,c){a.Ka=c?Ri(b,!0):b;a.Ka&&(a.Ka=a.Ka.replace(/:$/,""))}function Oi(a,b,c){a.xa=c?Ri(b,!0):b}function Pi(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ya=b}else a.Ya=null}
  145. function Qi(a,b,c){b instanceof Si?(a.c=b,Yi(a.c,a.Ua)):(c||(b=Ti(b,Zi)),a.c=new Si(b,0,a.Ua))}function $i(a,b,c){a=a.c;aj(a);a.c=null;b=bj(a,b);cj(a,b)&&(a.$-=a.N.get(b).length);Te(a.N,b,[c]);a.$++}function dj(a,b,c){da(c)||(c=[String(c)]);ej(a.c,b,c)}function fj(a){$i(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^y()).toString(36));return a}function gj(a){return a instanceof Mi?a.clone():new Mi(a,void 0)}
  146. function hj(a,b,c,d){var e=new Mi(null,void 0);a&&Ni(e,a);b&&Oi(e,b);c&&Pi(e,c);d&&(e.la=d);return e}function Ri(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ti(a,b,c){return u(a)?(a=encodeURI(a).replace(b,ij),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ij(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ui=/[#\/\?@]/g,Wi=/[\#\?:]/g,Vi=/[\#\?]/g,Zi=/[\#\?@]/g,Xi=/#/g;function Si(a,b,c){this.c=a||null;this.e=!!c}
  147. function aj(a){a.N||(a.N=new Se,a.$=0,a.c&&sf(a.c,function(b,c){a.add(sa(b),c)}))}g=Si.prototype;g.N=null;g.$=null;g.W=function(){aj(this);return this.$};g.add=function(a,b){aj(this);this.c=null;a=bj(this,a);var c=this.N.get(a);c||Te(this.N,a,c=[]);c.push(b);this.$++;return this};g.remove=function(a){aj(this);a=bj(this,a);return Ve(this.N.e,a)?(this.c=null,this.$-=this.N.get(a).length,this.N.remove(a)):!1};g.clear=function(){this.N=this.c=null;this.$=0};g.isEmpty=function(){aj(this);return 0==this.$};
  148. function cj(a,b){aj(a);b=bj(a,b);return Ve(a.N.e,b)}g.Db=function(a){var b=this.Z();return Ua(b,a)};g.Aa=function(){aj(this);for(var a=this.N.Z(),b=this.N.Aa(),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.Z=function(a){aj(this);var b=[];if(u(a))cj(this,a)&&(b=bb(b,this.N.get(bj(this,a))));else{a=this.N.Z();for(var c=0;c<a.length;c++)b=bb(b,a[c])}return b};g.get=function(a,b){var c=a?this.Z(a):[];return 0<c.length?String(c[0]):b};
  149. function ej(a,b,c){a.remove(b);0<c.length&&(a.c=null,Te(a.N,bj(a,b),cb(c)),a.$+=c.length)}g.toString=function(){if(this.c)return this.c;if(!this.N)return"";for(var a=[],b=this.N.Aa(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.Z(d),f=0;f<d.length;f++){var h=e;""!==d[f]&&(h+="="+encodeURIComponent(String(d[f])));a.push(h)}return this.c=a.join("&")};g.clone=function(){var a=new Si;a.c=this.c;this.N&&(a.N=this.N.clone(),a.$=this.$);return a};
  150. function bj(a,b){var c=String(b);a.e&&(c=c.toLowerCase());return c}function Yi(a,b){b&&!a.e&&(aj(a),a.c=null,a.N.forEach(function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),ej(this,e,a))},a));a.e=b};var jj={},kj=0,lj=r("yt.net.ping.workerUrl_")||null;q("yt.net.ping.workerUrl_",lj,void 0);function mj(a){var b=new Image,c=""+kj++;jj[c]=b;b.onload=b.onerror=function(){delete jj[c]};b.src=a;b=eval("null")};function nj(a,b){Gi(a,b||"null");var c="/gen_204?"+("a="+a+(b?"&"+b:"").replace(/\//g,"&"));c&&mj(c)};function oj(a){ah.call(this,1,arguments);this.c=a}z(oj,ah);function pj(a,b,c){ah.call(this,1,arguments);this.c=c}z(pj,ah);var qj=new dh("subscription-subscribe-success",pj),rj=new dh("subscription-unsubscribe-success",oj);var sj,tj,uj={gf:"content-snap-width-1",hf:"content-snap-width-2",jf:"content-snap-width-3",bf:"content-snap-width-skinny-mode"};function vj(){var a=[],b;for(b in uj)a.push(uj[b]);return a};function wj(){xj=od("html",void 0,void 0)[0];yj=R("appbar-guide-button")}
  151. function zj(a){var b=C(xj,"show-guide");nb(xj,"show-guide",a);yj&&yj.setAttribute("aria-expanded",a);if(a){var c=S("guide-item",R("guide-container"));c&&c.focus()}else O("guide-hidden");if(a&&!b||!a&&b){a="";if(b=R("page"))a=b.className;a=vf({"module-id":"guide-main",expanded:!0,auto:!1,"page-class":a,notification:!1});nj("guide-toggled",a)}(a=R("page"))&&Ai&&(b=a.style.width,a.style.width="99.99%",Sf(a.offsetWidth),a.style.width=b)}function Aj(){return C(xj,"show-guide")}
  152. function Bj(){return C(document.body,"guide-pinning-enabled")}function Cj(){return Bj()&&C(xj,"guide-pinned")}var xj=null,yj=null;var Dj;function Ej(){this.c=Fj}
  153. function Gj(){function a(){var a=S("guide-likes-playlist-icon");if(a)return Rd(a,"guide-notification-item")}Dj=R("appbar-main-guide-notification-container");Hj(function(){return S("guide-item-container",R("behavior-id-guide-playlists-section"))});Ij("yt-uix-playlistlike-unliked","appbar-guide-notification-playlist-unlike");Jj("addto-menu-video-added","appbar-guide-notification-playlist-video-added",Kj,null,new Ej);Ij("addto-menu-video-removed","appbar-guide-notification-playlist-video-removed");var b=
  154. w(R,"VLWL-guide-item");Jj("WATCH_LATER_VIDEO_ADDED","appbar-guide-notification-watch-later-video-added",b,1);Jj("WATCH_LATER_VIDEO_REMOVED","appbar-guide-notification-watch-later-video-removed",b,-1);Jj("yt-uix-videolike-liked","appbar-guide-notification-video-like",a,1);Jj("yt-uix-videolike-unliked","appbar-guide-notification-video-unlike",a,-1);ih(rj,Lj);ih(qj,Mj)}
  155. function Fj(a){if(!a||R(a.id))return null;var b=["ID","URL","TITLE","NOTIFICATION_OVERLAY_MESSAGE"];a=("RD"==a.playlistType?ti("appbar-guide-item-template-mix",b):ti("appbar-guide-item-template-playlist",b)).render({ID:a.id,URL:a.url,TITLE:a.title,NOTIFICATION_OVERLAY_MESSAGE:a.title});return xe(a)}function Kj(a){return R(a.id+"-guide-item")}
  156. function Nj(a,b){var c=ui(R(a)),c=xe(c);if(b){var d=S("appbar-guide-notification-text-content",c);if(d){var e=document.createTextNode(String(" "+b));d&&e&&d.appendChild(e)}}return c}
  157. function Jj(a,b,c,d,e){N(a,function(a){var h=c.apply(null,arguments);if(d){var k=S("guide-count-value",h);if(k){var l=k.innerHTML;""===l.trim()||isNaN(l)||(k.innerHTML=parseInt(l,10)+d)}}!h&&e&&(k=e.c(a),(l=S("guide-item-container",R("behavior-id-guide-playlists-section")))&&k&&Bd(l,k,0));Oj(b,!!h,a?a.title:null)||((k=S("guide-item-update-notification",h))&&Cd(k),k=Nj(b),E(k,"guide-item-update-notification"),h.appendChild(k),K(w(E,h,"showing-update-notification"),0),K(w(F,h,"showing-update-notification"),
  158. 2E3))})}function Hj(a){var b=Fj;N("yt-uix-playlistlike-liked",function(){var c=a(),d=b.apply(null,arguments);Oj("appbar-guide-notification-playlist-like",!!c)||(Bd(c,d,0),O("guide-playlist-section-updated"))})}function Ij(a,b){var c=Kj;N(a,function(){var a=c.apply(null,arguments);Pj(a,b,"guide-playlist-section-updated")})}function Pj(a,b,c){Oj(b,!!a)||(b=Nj(b),E(b,"guide-item-removal-notification"),a.appendChild(b),K(w(E,a,"removing-guide-item"),0),K(function(){Cd(a);O(c)},2E3))}
  159. function Oj(a,b,c){if(b&&Aj())return!1;Ad(Dj);Dj.appendChild(Nj(a,c));E(document.body,"show-guide-button-notification");K(w(F,document.body,"show-guide-button-notification"),2E3);return!0}
  160. function Mj(a){var b;R("guide-subscriptions-promo")?(O("force-reload-subscriptions"),b=!0):b=!1;b||(b=R("guide-channels"),a=a.c,a=ti("appbar-guide-item-template-channel",["ID","URL","TITLE","THUMBNAIL_URL","NOTIFICATION_OVERLAY_MESSAGE"]).render({ID:a.external_id,URL:a.url,TITLE:a.title,THUMBNAIL_URL:a.thumbnail,NOTIFICATION_OVERLAY_MESSAGE:a.title}),a=xe(a),Oj("appbar-guide-notification-subscription",!!b)||(Bd(b,a,0),O("guide-channel-section-updated")))}
  161. function Lj(a){a=a.c;Pj(a?R(a+"-guide-item"):null,"appbar-guide-notification-unsubscription","guide-channel-section-updated")};var Qj=[],Rj=[],Sj=[];
  162. function Tj(){Gg=R("guide");Uh=R("guide-channels");Vh=R("appbar-guide-menu");Wh=R("appbar-guide-iframe-mask");Gj();Gg&&(wj(),C(document.body,"exp-scrollable-guide")||Uj(),Xh.push(Fe(null,"click",Yh,"collection-save-button")),Xh.push(Fe(null,"click",gi,"collection-delete-button")),Xh.push(Fe(null,"click",ii,"subscription-list-item")),Xh.push(Fe(null,"keyup",ji,"subscription-search-input")),Xh.push(Fe(null,"click",li,"subscription-search-clear")),Xh.push(Fe(null,"click",ni,"tab-panel-trigger")),Qj.push(Fe(Gg,
  163. "click",Vj,"guide-sort-choice")),C(document.body,"exp-scrollable-guide")?(Wj(Ch(!0)),Rj.push(N("page-resize",Wj))):Rj.push(N("page-resize",Xj)),Rj.push(N("guide-channel-section-updated",Yj)),Rj.push(N("guide-playlist-section-updated",w(Xj,w(Ch,!0)))),Rj.push(N("force-reload-subscriptions",Zj)),Rj.push(N("update-guide-subscriptions",ak)),Rj.push(N("guide-hidden",bk)))}function ck(a,b){A(nd("guide-flyout-container",Gg),function(c){Qj.push(T(c,a,b))})}function dk(a){ek(a.currentTarget)}
  164. function bk(){var a=nd("guide-flyout-container",Gg);A(a,function(a){ek(a)})}function ek(a){var b=S("guide-flyout",a),c=S("guide-flyout-trigger",a);a=S("guide-flyout-iframe-mask",a);F(b,"flyout-shown");a&&F(a,"flyout-shown");F(c,"on-hover")}
  165. function fk(a){a=a.currentTarget;var b=S("guide-flyout",a),c=S("guide-flyout-trigger",a),d=S("guide-flyout-iframe-mask",a),e=S("guide-flyout",a),f=oe(e),h=S("guide-channels-list",a),k=Ch(!0),l=S("guide-flyout-trigger",a),n=S("guide-flyout-iframe-mask",a),x=k.height-(Vh?Vh.offsetTop:0);h.style.maxHeight=x-f.top-f.bottom+"px";f=ie(e).height;h=ie(l);l=ge(l);x=Math.min(x-f,Math.max(0,k.height-l.y-h.height/2-f/2));h=l.x+h.width;k=k.width-l.x;e.style.bottom=x+"px";n&&(n.style.height=f+"px",n.style.bottom=
  166. x+"px");"rtl"==document.body.getAttribute("dir")?(e.style.right=k+"px",e.style.left="",n&&(n.style.right=k+"px",n.style.left="")):(e.style.left=h+"px",e.style.right="",n&&(n.style.left=h+"px",n.style.right=""));E(b,"flyout-shown");d&&E(d,"flyout-shown");E(c,"on-hover");O("yt-dom-content-change",a)}function gk(){Wh&&Vh&&(Wh.style.height=ie(Vh).height+"px",Wh.style.marginTop=Vh.style.marginTop,Wh.style.top=Vh.style.top)}
  167. function Uj(){Uh=R("guide-channels");Sj=Fg();Xj(Ch(!0));ck("mouseenter",fk);ck("mouseleave",dk)}
  168. function Vj(a){var b=S("guide-sort-button"),c=G(b,"guide-sort")||"",d=G(a.currentTarget,"guide-sort")||"";c!=d&&(Ub(b,"guide-sort",d),Hf("/guide_channels_ajax?action_set_guide_sort=1",{method:"POST",La:{sort:d},format:"JSON",P:function(a,b){ak(b);var c=nd("guide-sort-choice");A(c,function(a){var b=G(a,"guide-sort");oh.getInstance();a=a.parentNode;var b=d==b,c=ve("span","yt-uix-button-icon-wrapper",a);if(!c&&b){var e=vd("span",{"class":"yt-uix-button-icon-wrapper yt-uix-button-icon-checkbox"}),f=vd("div",
  169. {"class":"yt-uix-button-icon-dropdown-checked"});e.appendChild(f);Bd(a,e,0)}Lf(c,b)})}}))}function ak(a){var b=a.channels;b&&(a=R("guide-subscriptions-section"),b=yd(b),Dd(b,a),Sj=Fg(),hk(),a=nd("yt-uix-tooltip-tip-visible"),A(a,function(a){F(a,"yt-uix-tooltip-tip-visible")}))}function hk(){Uj();O("yt-dom-content-change",Gg)}function Yj(){Uh&&(Uh.firstElementChild?hk():Zj())}function ik(a){var b=nd("guide-item",Gg);return Sa(b,function(b){return G(b,"serialized-endpoint")==a})}
  170. function Wj(a){Xd(Vh,"max-height",a.height-50+"px")}
  171. function Xj(a){if(Sj&&!C(document.body,"exp-scrollable-guide")){var b=jk(a),c=Sj.length,d=0;Sj.sort(Hg||ib);A(Sj,function(a,f){var h=Ig(a)-d,h=Math.min(h,b/(c-f));b-=(c-f)*h;var h=d+=h,h=h-(h>=Ig(a)?0:a.n?Kg(a,a.n):0),h=Math.max(Lg(a),h),k=Jg(a,a.k);if(k>h)for(;k>h;){var l;l=a.k;if(l=void 0!=l.lastElementChild?l.lastElementChild:Gd(l.lastChild,!1)){var n=Kg(a,l),k=k-n;Bd(a.f,l,0)}else break}else if(k<h){for(l=document.createDocumentFragment();!Va(Ed(a.f));)if(n=Fd(a.f)){var x=Kg(a,n);if(k+x<=h)k+=
  172. x,l.appendChild(n);else break}else break;a.k.appendChild(l)}nb(a.C,"empty-overflow-list",!!Va(Ed(a.f)))});gk()}}function jk(a){var b=Vh,c=R("guide-container");if(!c||!b)return 0;var d=oe(c),d=d.top+d.bottom,c=Fd(c).clientHeight,e=0;A(Sj,function(a){e+=a.k?Jg(a,a.k):0;e+=Va(Ed(a.f))?0:a.n?Kg(a,a.n):0});c=d+c-e;return(Cj()?b.clientHeight:a.height-50)-c}function Zj(){Hf("/guide_channels_ajax?action_load_subs_and_footer=1",{format:"JSON",P:function(a,b){ak(b)}})};function kk(a,b,c){Yb.call(this);this.k=a;this.f=c;this.c=b||window;this.e=v(this.Dd,this)}z(kk,Yb);g=kk.prototype;g.ua=null;g.sc=!1;g.start=function(){this.stop();this.sc=!1;var a=lk(this),b=mk(this);a&&!b&&this.c.mozRequestAnimationFrame?(this.ua=hg(this.c,"MozBeforePaint",this.e),this.c.mozRequestAnimationFrame(null),this.sc=!0):this.ua=a&&b?a.call(this.c,this.e):this.c.setTimeout(Me(this.e),20)};
  173. g.stop=function(){if(this.isActive()){var a=lk(this),b=mk(this);a&&!b&&this.c.mozRequestAnimationFrame?og(this.ua):a&&b?b.call(this.c,this.ua):this.c.clearTimeout(this.ua)}this.ua=null};g.isActive=function(){return null!=this.ua};g.Dd=function(){this.sc&&this.ua&&og(this.ua);this.ua=null;this.k.call(this.f,y())};g.F=function(){this.stop();kk.G.F.call(this)};
  174. function lk(a){a=a.c;return a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||null}function mk(a){a=a.c;return a.cancelAnimationFrame||a.cancelRequestAnimationFrame||a.webkitCancelRequestAnimationFrame||a.mozCancelRequestAnimationFrame||a.oCancelRequestAnimationFrame||a.msCancelRequestAnimationFrame||null};var nk=window,ok=document,pk=nk.location;function qk(){}var rk=/\[native code\]/;function sk(a,b,c){return a[b]=a[b]||c}function tk(a){for(var b=0;b<this.length;b++)if(this[b]===a)return b;return-1}function uk(a){a=a.sort();for(var b=[],c=void 0,d=0;d<a.length;d++){var e=a[d];e!=c&&b.push(e);c=e}return b}function vk(){var a;if((a=Object.create)&&rk.test(a))a=a(null);else{a={};for(var b in a)a[b]=void 0}return a}var wk=sk(nk,"gapi",{});var xk;xk=sk(nk,"___jsl",vk());sk(xk,"I",0);sk(xk,"hel",10);function yk(){var a=pk.href,b;if(xk.dpo)b=xk.h;else{b=xk.h;var c=RegExp("([#].*&|[#])jsh=([^&#]*)","g"),d=RegExp("([?#].*&|[?#])jsh=([^&#]*)","g");if(a=a&&(c.exec(a)||d.exec(a)))try{b=decodeURIComponent(a[2])}catch(e){}}return b}function zk(a){var b=sk(xk,"PQ",[]);xk.PQ=[];var c=b.length;if(0===c)a();else for(var d=0,e=function(){++d===c&&a()},f=0;f<c;f++)b[f](e)}function Ak(a){return sk(sk(xk,"H",vk()),a,vk())};var Bk=sk(xk,"perf",vk());sk(Bk,"g",vk());var Ck=sk(Bk,"i",vk());sk(Bk,"r",[]);vk();vk();function Dk(a,b,c){b&&0<b.length&&(b=Ek(b),c&&0<c.length&&(b+="___"+Ek(c)),28<b.length&&(b=b.substr(0,28)+(b.length-28)),c=b,b=sk(Ck,"_p",vk()),sk(b,c,vk())[a]=(new Date).getTime(),b=Bk.r,"function"===typeof b?b(a,"_p",c):b.push([a,"_p",c]))}function Ek(a){return a.join("__").replace(/\./g,"_").replace(/\-/g,"_").replace(/\,/g,"_")};var Fk=vk(),Gk=[];function Hk(a){throw Error("Bad hint"+(a?": "+a:""));};Gk.push(["jsl",function(a){for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b)){var c=a[b];"object"==typeof c?xk[b]=sk(xk,b,[]).concat(c):sk(xk,b,c)}if(b=a.u)a=sk(xk,"us",[]),a.push(b),(b=/^https:(.*)$/.exec(b))&&a.push("http:"+b[1])}]);var Ik=/^(\/[a-zA-Z0-9_\-]+)+$/,Jk=/^[a-zA-Z0-9\-_\.,!]+$/,Kk=/^gapi\.loaded_[0-9]+$/,Lk=/^[a-zA-Z0-9,._-]+$/;function Mk(a,b,c,d){var e=a.split(";"),f=e.shift(),h=Fk[f],k=null;h?k=h(e,b,c,d):Hk("no hint processor for: "+f);k||Hk("failed to generate load url");b=k;c=b.match(Nk);(d=b.match(Ok))&&1===d.length&&Pk.test(b)&&c&&1===c.length||Hk("failed sanity: "+a);return k}
  175. function Qk(a,b,c,d){function e(a){return encodeURIComponent(a).replace(/%2C/g,",")}a=Rk(a);Kk.test(c)||Hk("invalid_callback");b=Sk(b);d=d&&d.length?Sk(d):null;return[encodeURIComponent(a.we).replace(/%2C/g,",").replace(/%2F/g,"/"),"/k=",e(a.version),"/m=",e(b),d?"/exm="+e(d):"","/rt=j/sv=1/d=1/ed=1",a.xc?"/am="+e(a.xc):"",a.fd?"/rs="+e(a.fd):"",a.qd?"/t="+e(a.qd):"","/cb=",e(c)].join("")}
  176. function Rk(a){"/"!==a.charAt(0)&&Hk("relative path");for(var b=a.substring(1).split("/"),c=[];b.length;){a=b.shift();if(!a.length||0==a.indexOf("."))Hk("empty/relative directory");else if(0<a.indexOf("=")){b.unshift(a);break}c.push(a)}a={};for(var d=0,e=b.length;d<e;++d){var f=b[d].split("="),h=decodeURIComponent(f[0]),k=decodeURIComponent(f[1]);2==f.length&&h&&k&&(a[h]=a[h]||k)}b="/"+c.join("/");Ik.test(b)||Hk("invalid_prefix");c=Tk(a,"k",!0);d=Tk(a,"am");e=Tk(a,"rs");a=Tk(a,"t");return{we:b,version:c,
  177. xc:d,fd:e,qd:a}}function Sk(a){for(var b=[],c=0,d=a.length;c<d;++c){var e=a[c].replace(/\./g,"_").replace(/-/g,"_");Lk.test(e)&&b.push(e)}return b.join(",")}function Tk(a,b,c){a=a[b];!a&&c&&Hk("missing: "+b);if(a){if(Jk.test(a))return a;Hk("invalid: "+b)}return null}var Pk=/^https?:\/\/[a-z0-9_.-]+\.google\.com(:\d+)?\/[a-zA-Z0-9_.,!=\-\/]+$/,Ok=/\/cb=/g,Nk=/\/\//g;function Uk(){var a=yk();if(!a)throw Error("Bad hint");return a}
  178. Fk.m=function(a,b,c,d){(a=a[0])||Hk("missing_hint");return"https://apis.google.com"+Qk(a,b,c,d)};var Vk=decodeURI("%73cript");function Wk(a,b){for(var c=[],d=0;d<a.length;++d){var e=a[d];e&&0>tk.call(b,e)&&c.push(e)}return c}function Xk(a){"loading"!=ok.readyState?Yk(a):ok.write("<"+Vk+' src="'+encodeURI(a)+'"></'+Vk+">")}function Yk(a){var b=ok.createElement(Vk);b.setAttribute("src",a);b.async="true";(a=ok.getElementsByTagName(Vk)[0])?a.parentNode.insertBefore(b,a):(ok.head||ok.body||ok.documentElement).appendChild(b)}
  179. function Zk(a,b){var c=b&&b._c;if(c)for(var d=0;d<Gk.length;d++){var e=Gk[d][0],f=Gk[d][1];f&&Object.prototype.hasOwnProperty.call(c,e)&&f(c[e],a,b)}}function $k(a,b){al(function(){var c;c=b===yk()?sk(wk,"_",vk()):vk();c=sk(Ak(b),"_",c);a(c)})}
  180. function bl(a,b){var c=b||{};"function"==typeof b&&(c={},c.callback=b);Zk(a,c);var d=a?a.split(":"):[],e=c.h||Uk(),f=sk(xk,"ah",vk());if(f["::"]&&d.length){for(var h=[],k=null;k=d.shift();){var l=k.split("."),l=f[k]||f[l[1]&&"ns:"+l[0]||""]||e,n=h.length&&h[h.length-1]||null,x=n;n&&n.hint==l||(x={hint:l,features:[]},h.push(x));x.features.push(k)}var J=h.length;if(1<J){var D=c.callback;D&&(c.callback=function(){0==--J&&D()})}for(;d=h.shift();)cl(d.features,c,d.hint)}else cl(d||[],c,e)}
  181. function cl(a,b,c){function d(a,b){if(n)return 0;nk.clearTimeout(l);J.push.apply(J,B);var d=((wk||{}).config||{}).update;d?d(f):f&&sk(xk,"cu",[]).push(f);if(b){Dk("me0",a,D);try{$k(b,c)}finally{Dk("me1",a,D)}}return 1}a=uk(a)||[];var e=b.callback,f=b.config,h=b.timeout,k=b.ontimeout,l=null,n=!1;if(h&&!k||!h&&k)throw"Timeout requires both the timeout parameter and ontimeout parameter to be set";var x=sk(Ak(c),"r",[]).sort(),J=sk(Ak(c),"L",[]).sort(),D=[].concat(x);0<h&&(l=nk.setTimeout(function(){n=
  182. !0;k()},h));var B=Wk(a,J);if(B.length){var B=Wk(a,x),ra=sk(xk,"CP",[]),jb=ra.length;ra[jb]=function(a){function b(){var a=ra[jb+1];a&&a()}function c(b){ra[jb]=null;d(B,a)&&zk(function(){e&&e();b()})}if(!a)return 0;Dk("ml1",B,D);0<jb&&ra[jb-1]?ra[jb]=function(){c(b)}:c(b)};if(B.length){var L="loaded_"+xk.I++;wk[L]=function(a){ra[jb](a);wk[L]=null};a=Mk(c,B,"gapi."+L,x);x.push.apply(x,B);Dk("ml0",B,D);b.sync||nk.___gapisync?Xk(a):Yk(a)}else ra[jb](qk)}else d(B)&&e&&e()};function al(a){if(xk.hee&&0<xk.hel)try{return a()}catch(b){xk.hel--,bl("debug_error",function(){try{window.___jsl.hefn(b)}catch(a){throw b;}})}else return a()};wk.load=function(a,b){return al(function(){return bl(a,b)})};function dl(a){a=fa(a)?{callback:a}:a||{};a._c&&a._c.jsl&&a._c.jsl.h||Eb(a,{_c:{jsl:{h:I("GAPI_HINT_PARAMS")}}});if(I("GAPI_HINT_OVERRIDE")){var b=yf(document.location.href).gapi_jsh;b&&Eb(a,{_c:{jsl:{h:b}}})}bl("iframes",a)};function el(){var a={action_get_delegate_accounts:1,owner_picker_redirect_url:I("OWNER_PICKER_REDIRECT_URL")};a.o=I("CREATOR_CONTEXT","U");return a};function fl(a,b){a=!!a;q("_lactCookie",a,window);if(null==r("_lact",window)){if(I("EXP_LACT_TEMPDATA")){var c=parseInt(I("LACT"),10),c=isFinite(c)?y()-Math.max(c,0):-1;q("_lact",c,window);-1==c&&gl()}else a&&b?(c=Ug("ACTIVITY","-1"),q("_lact",parseInt(c,10),window)):(q("_lact",-1,window),gl());T(document,"keydown",gl);T(document,"keyup",gl);T(document,"mousedown",gl);T(document,"mouseup",gl)}}
  183. function gl(){var a=r("_lact",window);null==a&&(fl(),a=r("_lact",window));var b=y();q("_lact",b,window);I("EXP_LACT_TEMPDATA")||r("_lactCookie",window)&&1E3<=b-a&&Tg("ACTIVITY",""+b,-1,"/");O("USER_ACTIVE")}function hl(){var a=r("_lact",window);return null==a?-1:Math.max(y()-a,0)};function il(a,b,c,d,e,f){this.c=null;this.C=c;this.k=a;this.n=b;this.f=d;this.j=I("GOOGLEPLUS_HOST")+(e?"/u/"+e:"")+(f?"/b/"+f:"")+"/_/notifications/frame";this.e=R(a)}function jl(a,b,c,d){return{onOpen:v(function(a){return a.openInto(c)},a),onReady:w(function(a){a&&a()},d?b.showOnepick:void 0),onClose:w(function(a,b){a&&a();b.remove()},d?b.hideOnepick:void 0)}}function kl(a,b,c){a&&a[b]&&a[b].apply(a,Array.prototype.slice.call(arguments,2))}
  184. function ll(a,b){var c={setNotificationWidgetSize:v(function(a,b){this.e.style.width=a;this.e.style.height=b},a),setNotificationWidgetHeight:v(function(a){this.e.style.height=a},a),setNotificationText:v(function(a){this.C(parseInt(a,10))},a),hideNotificationWidget:w(function(a){a&&a()},b.hideNotificationWidget),openSharebox:function(){},onError:function(){}};a.c=iframes.open(a.j,{style:"iframe-style"},{origin:window.location.protocol+"//"+window.location.hostname,source:"yt",sourceid:"36",hl:a.f},
  185. c,function(){})}il.prototype.load=function(a){iframes.setHandler("iframe-style",jl(this,a,this.k,!1));iframes.setHandler("onepick",jl(this,a,this.n,!0));ll(this,a)};il.prototype.close=function(){kl(this.c,"onHide")};il.prototype.l=function(){return rd(window).height-60-20};function ml(a,b){kl(a.c,b?"onIdle":"onActive")};function nl(a,b,c){this.j=!1;this.k=0;this.f=R("sb-container");if(this.c=R("sb-button-notify"))this.n=ve("SPAN","yt-uix-button-content",this.c),this.C=ve("IMG","yt-uix-button-icon-bell",this.c);this.l=R("sb-onepick-target");this.e=new il("sb-target","sb-onepick-target",v(this.Le,this),a,b,c);this.e.load({hideNotificationWidget:v(this.Kc,this),showOnepick:v(this.Fe,this),hideOnepick:v(this.Jd,this)});this.D=ie(this.l);this.ad();T(window,"resize",v(this.ad,this));T(window,"click",v(this.Kc,this));fl();
  186. ec(v(this.vd,this),12E4)}g=nl.prototype;g.Je=function(){this.j?(ol(this),ml(this.e,!0)):(K(v(this.$e,this),0),ml(this.e,!1))};g.$e=function(){this.e.close();pl(this,!0);E(this.c,"sb-notif-clicked");var a=this.e,b={maxWidgetHeight:a.l()};kl(a.c,"onShowNotificationsOnly",b);this.j=!0};function pl(a,b){b?(pb(a.f,"sb-off","sb-on"),E(a.f,"sb-card-notif")):(pb(a.f,"sb-on","sb-off"),F(a.f,"sb-card-notif"))}function ol(a){pl(a,!1);a.j=!1;F(a.c,"sb-notif-clicked")}
  187. g.Kc=function(){this.j&&(this.e.close(),ol(this),ql(this))};g.Le=function(a){this.k=a;ql(this)};function ql(a){a.n&&Ld(a.n,a.k+"");if(a.c){0==a.k?pb(a.c,"sb-notif-on","sb-notif-off"):pb(a.c,"sb-notif-off","sb-notif-on");var b;b=hc(a.k);a.C&&a.C.setAttribute("alt",b)}}g.Fe=function(){pb(this.l,"sb-off","sb-on")};g.Jd=function(){pb(this.l,"sb-on","sb-off")};g.ad=function(){var a=Math.max((rd(window).height-this.D.height)/2,0);this.l.style.top=a+"px"};
  188. g.vd=function(){6E5<hl()?ml(this.e,!1):ml(this.e,!0)};var rl="";function sl(){dl(function(){var a=R("sb-button-notify"),b=new nl(I("SANDBAR_LOCALE"),I("SESSION_INDEX"),I("DELEGATED_SESSION_ID"));T(a,"click",v(b.Je,b));O("sandbar-init")})}
  189. function tl(){if("U"==I("CREATOR_CONTEXT","U")){var a=nd("yt-masthead-account-picker-user-option"),b=qf(window.location.href);A(a,function(a){-1!=a.href.indexOf("action_handle_signin")&&(a.href=qf(Af(a.href,{next:b})))})}else{var a=nd("yt-masthead-account-picker-owner-option"),c=pf();if(c){var d=c.indexOf(";");-1!=d&&(c=c.substring(0,d))}c&&A(a,function(a){var b=yf(a.href).next;b&&(b=rf(b)+(c?"#"+c:""),a.href=qf(Af(a.href,{next:b})))})}}
  190. function ul(){F(document.body,"sitewide-ticker-visible");O("masthead-ticker-close")}function vl(){var a=I("SBOX_JS_URL")||rl;if(a){rl=a;var b=r("yt.www.masthead.searchbox.init");b?b():wl(a,function(){var a;try{a=r("yt.www.masthead.searchbox.init"),a()}catch(b){throw b.message=b.message+' sbox type: "'+ca(a)+'"',b;}})}}function wl(a,b){var c=R("masthead-search-term");if(c){var d,e,f=function(){xl();sj=b;tc(a,b);Ee([d,e])};d=De(c,"mouseover",f);e=De(c,"keypress",f)}}
  191. function xl(){r("yt.www.masthead.searchbox.init")||(Ac(rl,sj),sj=null)};var yl,zl,Al,Bl;var Cl=!1,Dl=!1;function El(){if(yl=R("masthead-appbar")){zl=R("masthead-positioner");Al=R("masthead-positioner-height-offset");wj();Fl();Gl();Hl=new kk(Il);var a=Jl;r("yt.scheduler.instance")&&(a=function(){$g(Jl)});Kl.push(N("init",a));Kl.push(N("dispose",Ll));Ml=vj();uh.getInstance();Nl(zh(0,128)?zh(0,129):!0);Ol=od("html",void 0,void 0)[0];Kl.push(N("masthead-ticker-close",Pl));Kl.push(N("appbar-guide-delay-load",Fl));Kl.push(N("page-resize",Ql));Cl||Jl()}}
  192. function Jl(){S("appbar-content-hidable");Rl=S("appbar-content-trigger");(Dl=C(document.body,"always-autohide-masthead"))?Wb(tj,"position-fixed"):Ub(tj,"position-fixed","true");Dl||Rl?Sl=T(window,"scroll",Tl):Ul();Bl=!!R("appbar-guide-menu")&&Bj();Cl?(Bl||(nb(xj,"guide-pinned",!1),zj(!1)),Ql()):Cl=!0;var a=-1*ge(zl).y,b=document.body.scrollHeight,c=a-(b-document.body.clientHeight);0<c&&(document.body.style.minHeight=b+c+"px");td(document).scrollTop+=a;Vl=sd(document).y;Wl();Xl();gk()}
  193. function Ll(){Rl=null;Ul()}function Wl(){if(!Rl||Yl)Lf(yl,!0);else{var a=ie(Rl).height,b=ie(zl).height,b=ge(zl).y+b,a=Math.floor(ge(Rl).y)+a,c=C(document.body,"appbar-hidden"),d=td(document);c&&a<b+40?(d.scrollTop+=40,Lf(yl,!0),F(document.body,"appbar-hidden"),Zl()):!c&&b<a&&(d.scrollTop-=40,E(document.body,"appbar-hidden"),Zl())}}function Zl(){Yl=!0;K(function(){Yl=!1;C(document.body,"appbar-hidden")&&Lf(yl,!1)},300)}var Yl=!1;
  194. function Ql(){Bl&&(nb(xj,"guide-pinned",1251<=(window.innerWidth||document.documentElement.clientWidth)),zj(Cj()&&$l));am()}
  195. function am(){if(C(document.body,"flex-width-enabled-snap")){var a;a=Aj();var b=window.innerWidth||document.documentElement.clientWidth,c=b-21-50;1251<=(window.innerWidth||document.documentElement.clientWidth)&&a&&(c-=230);a=640>b?"content-snap-width-skinny-mode":1262<=c?"content-snap-width-3":1056<=c?"content-snap-width-2":"content-snap-width-1";C(Ol,a)||(mb(Ol,Ml),E(Ol,a),O("yt-dom-content-change"))}else mb(Ol,Ml)}function bm(){return R("appbar-guide-menu")}
  196. function Gl(){var a=C(document.body,"appbar-hidden"),b=ge(zl).y,c=ie(zl).height;cm=a?b+c:b+c-40}function dm(a){Cj()||Rd(a.target,"appbar-guide-clickable-ancestor")||zj(!1)}function Il(){var a=Math.max(0,sd(document).y),b=Vl;Vl=a;var c=b-a;0<c&&0==em?em=b:0>c&&(em=0);c=Math.min(0,Math.max(c+fm,-cm));var d=Dl;if(d){var e=a<cm,b=a>b&&Math.abs(fm)<cm;Aj()&&b?a=!1:(a=d?!1:100<=em-a,a=e||b||a)}else a=!1;a&&fm!=c&&(zl.style.top=c+"px",gm=fm=c,hm());Wl()}
  197. function hm(){var a=bm();a&&(a.style.top=gm+"px");gk()}function Fl(){if(!im){var a=bm();if(!a||S("guide-module-loading",a)){var b=R("appbar-guide-button");if(!b)return;jm.push(De(b,"click",function(){O("appbar-show-guide")}))}hm();jm.push(Fe(a,"click",Xl,"guide-item"));jm.push(T(a,"mouseleave",km));jm.push(T(document.body,"click",dm));a=S("appbar-guide-toggle");jm.push(T(a,"click",lm));im=!0}}function Xl(){mm=!Cj()}function km(){mm&&(zj(!1),mm=!1)}
  198. function lm(){var a=!Aj();zj(a);a&&O("yt-dom-content-change");Cj()&&Nl(a);am()}function Nl(a){Ah(128,!0);Ah(129,a);Tg("PREF",Bh(),63072E3,"/");$l=a}function Ul(){Ee(Sl);Hl&&Hl.stop();Sl=""}function Tl(){Hl.isActive()||Hl.start()}function Pl(){var a=ge(zl).y,b=ie(zl).height;Al.style.height=a+b+"px";var c=bm();c&&(C(document.body,"appbar-hidden")?c.style.marginTop=a+b+"px":c.style.marginTop=a+b-40+"px",gk());Gl()}
  199. var jm=[],Sl="",Kl=[],Vl=0,cm=0,mm=!1,im=!1,em=0,fm=0,gm=0,Hl=null,Rl=null,Ml=null,$l=!1,Ol=null;function nm(a){this.c=new Se;if(a){a=Ii(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])}}function om(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+ha(a):b.substr(0,1)+a}g=nm.prototype;g.W=function(){return this.c.W()};g.add=function(a){Te(this.c,om(a),a)};g.removeAll=function(a){a=Ii(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};g.remove=function(a){return this.c.remove(om(a))};g.clear=function(){this.c.clear()};g.isEmpty=function(){return this.c.isEmpty()};
  200. g.contains=function(a){a=om(a);return Ve(this.c.e,a)};g.Z=function(){return this.c.Z()};g.clone=function(){return new nm(this)};g.equals=function(a){return this.W()==Hi(a)&&pm(this,a)};function pm(a,b){var c=Hi(b);if(a.W()>c)return!1;!(b instanceof nm)&&5<c&&(b=new nm(b));return Li(a,function(a){var c=b;return"function"==typeof c.contains?c.contains(a):"function"==typeof c.Db?c.Db(a):ea(c)||u(c)?Ua(c,a):ub(c,a)})}g.va=function(){return this.c.va(!1)};function qm(){};var rm={ff:"ska",df:"que",cf:"mus",ef:"sus"};function sm(a){a&&(this.id=a.id||a.name,this.name=a.name,this.sd=a.app,this.type=a.type||"REMOTE_CONTROL",this.avatar=a.userAvatarUri||"",this.theme=a.theme||"u",this.capabilities=new nm(Na((a.capabilities||"").split(","),w(tb,rm))))}sm.prototype.id="";sm.prototype.name="";g=sm.prototype;g.sd="";g.type="REMOTE_CONTROL";g.avatar="";g.theme="u";g.equals=function(a){return a?this.id==a.id:!1};function tm(a,b){this.action=a;this.params=b||null};function um(){this.c=y()}new um;um.prototype.reset=function(){this.c=y()};um.prototype.get=function(){return this.c};function vm(a,b){this.e=new ff(a);this.c=b?cf:bf}vm.prototype.stringify=function(a){return ef(this.e,a)};vm.prototype.parse=function(a){return this.c(a)};function wm(a){m.setTimeout(function(){throw a;},0)}var xm;
  201. function ym(){var a=m.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!P("Presto")&&(a=function(){var a=document.createElement("iframe");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=v(function(a){if(("*"==d||a.origin==d)&&a.data==
  202. c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!Oc()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(p(c.next)){c=c.next;var a=c.Bc;c.Bc=null;a()}};return function(a){d.next={Bc:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("script")?function(a){var b=document.createElement("script");b.onreadystatechange=
  203. function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){m.setTimeout(a,0)}};function zm(a,b,c){this.k=c;this.f=a;this.j=b;this.e=0;this.c=null}zm.prototype.get=function(){var a;0<this.e?(this.e--,a=this.c,this.c=a.next,a.next=null):a=this.f();return a};zm.prototype.put=function(a){this.j(a);this.e<this.k&&(this.e++,a.next=this.c,this.c=a)};function Am(){this.e=this.c=null}var Cm=new zm(function(){return new Bm},function(a){a.reset()},100);Am.prototype.add=function(a,b){var c=Cm.get();c.c=a;c.scope=b;c.next=null;this.e?this.e.next=c:this.c=c;this.e=c};Am.prototype.remove=function(){var a=null;this.c&&(a=this.c,this.c=this.c.next,this.c||(this.e=null),a.next=null);return a};function Bm(){this.next=this.scope=this.c=null}Bm.prototype.reset=function(){this.next=this.scope=this.c=null};function Dm(a,b){Em||Fm();Gm||(Em(),Gm=!0);Hm.add(a,b)}var Em;function Fm(){if(m.Promise&&m.Promise.resolve){var a=m.Promise.resolve();Em=function(){a.then(Im)}}else Em=function(){var a=Im;!fa(m.setImmediate)||m.Window&&m.Window.prototype&&m.Window.prototype.setImmediate==m.setImmediate?(xm||(xm=ym()),xm(a)):m.setImmediate(a)}}var Gm=!1,Hm=new Am;function Im(){for(var a=null;a=Hm.remove();){try{a.c.call(a.scope)}catch(b){wm(b)}Cm.put(a)}Gm=!1};function Jm(a,b){this.c=0;this.n=void 0;this.k=this.e=this.f=null;this.j=this.l=!1;if(a==Km)Lm(this,2,b);else try{var c=this;a.call(b,function(a){Lm(c,2,a)},function(a){Lm(c,3,a)})}catch(d){Lm(this,3,d)}}function Mm(){this.next=this.context=this.e=this.f=this.c=null;this.k=!1}Mm.prototype.reset=function(){this.context=this.e=this.f=this.c=null;this.k=!1};var Nm=new zm(function(){return new Mm},function(a){a.reset()},100);function Om(a,b,c){var d=Nm.get();d.f=a;d.e=b;d.context=c;return d}
  204. function Km(){}Jm.prototype.then=function(a,b,c){return Pm(this,fa(a)?a:null,fa(b)?b:null,c)};Jm.prototype.then=Jm.prototype.then;Jm.prototype.$goog_Thenable=!0;Jm.prototype.cancel=function(a){0==this.c&&Dm(function(){var b=new Qm(a);Rm(this,b)},this)};
  205. function Rm(a,b){if(0==a.c)if(a.f){var c=a.f;if(c.e){for(var d=0,e=null,f=null,h=c.e;h&&(h.k||(d++,h.c==a&&(e=h),!(e&&1<d)));h=h.next)e||(f=h);e&&(0==c.c&&1==d?Rm(c,b):(f?(d=f,d.next==c.k&&(c.k=d),d.next=d.next.next):Sm(c),Tm(c,e,3,b)))}a.f=null}else Lm(a,3,b)}function Um(a,b){a.e||2!=a.c&&3!=a.c||Vm(a);a.k?a.k.next=b:a.e=b;a.k=b}
  206. function Pm(a,b,c,d){var e=Om(null,null,null);e.c=new Jm(function(a,h){e.f=b?function(c){try{var e=b.call(d,c);a(e)}catch(n){h(n)}}:a;e.e=c?function(b){try{var e=c.call(d,b);!p(e)&&b instanceof Qm?h(b):a(e)}catch(n){h(n)}}:h});e.c.f=a;Um(a,e);return e.c}Jm.prototype.C=function(a){this.c=0;Lm(this,2,a)};Jm.prototype.D=function(a){this.c=0;Lm(this,3,a)};
  207. function Lm(a,b,c){if(0==a.c){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{var d;if(c)try{d=!!c.$goog_Thenable}catch(e){d=!1}else d=!1;if(d){a.c=1;b=c;c=a.C;d=a.D;b instanceof Jm?Um(b,Om(c||t,d||null,a)):b.then(c,d,a);return}if(ga(c))try{var f=c.then;if(fa(f)){Wm(a,c,f);return}}catch(h){b=3,c=h}}a.n=c;a.c=b;a.f=null;Vm(a);3!=b||c instanceof Qm||Xm(a,c)}}
  208. function Wm(a,b,c){function d(b){f||(f=!0,a.D(b))}function e(b){f||(f=!0,a.C(b))}a.c=1;var f=!1;try{c.call(b,e,d)}catch(h){d(h)}}function Vm(a){a.l||(a.l=!0,Dm(a.H,a))}function Sm(a){var b=null;a.e&&(b=a.e,a.e=b.next,b.next=null);a.e||(a.k=null);return b}Jm.prototype.H=function(){for(var a=null;a=Sm(this);)Tm(this,a,this.c,this.n);this.l=!1};function Tm(a,b,c,d){b.c&&(b.c.f=null);if(2==c)b.f.call(b.context,d);else if(null!=b.e){if(!b.k)for(;a&&a.j;a=a.f)a.j=!1;b.e.call(b.context,d)}Nm.put(b)}
  209. function Xm(a,b){a.j=!0;Dm(function(){a.j&&Ym.call(null,b)})}var Ym=wm;function Qm(a){ma.call(this,a)}z(Qm,ma);Qm.prototype.name="cancel";function Zm(a,b){ug.call(this);this.c=a||1;this.e=b||m;this.f=v(this.Ie,this);this.k=y()}z(Zm,ug);g=Zm.prototype;g.enabled=!1;g.ia=null;function $m(a,b){a.c=b;a.ia&&a.enabled?(a.stop(),a.start()):a.ia&&a.stop()}g.Ie=function(){if(this.enabled){var a=y()-this.k;0<a&&a<.8*this.c?this.ia=this.e.setTimeout(this.f,this.c-a):(this.ia&&(this.e.clearTimeout(this.ia),this.ia=null),vg(this,"tick"),this.enabled&&(this.ia=this.e.setTimeout(this.f,this.c),this.k=y()))}};
  210. g.start=function(){this.enabled=!0;this.ia||(this.ia=this.e.setTimeout(this.f,this.c),this.k=y())};g.stop=function(){this.enabled=!1;this.ia&&(this.e.clearTimeout(this.ia),this.ia=null)};g.F=function(){Zm.G.F.call(this);this.stop();delete this.e};function an(a,b,c){if(fa(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 bn(a,b,c){Yb.call(this);this.k=a;this.f=b;this.e=c;this.c=v(this.qe,this)}z(bn,Yb);g=bn.prototype;g.Qb=!1;g.ic=0;g.fb=null;g.stop=function(){this.fb&&(m.clearTimeout(this.fb),this.fb=null,this.Qb=!1)};g.pause=function(){this.ic++};g.F=function(){bn.G.F.call(this);this.stop()};g.qe=function(){this.fb=null;this.Qb&&!this.ic&&(this.Qb=!1,cn(this))};function cn(a){a.fb=an(a.c,a.f);a.k.call(a.e)};function dn(){}dn.prototype.c=null;function en(a){var b;(b=a.c)||(b={},fn(a)&&(b[0]=!0,b[1]=!0),b=a.c=b);return b};var gn;function hn(){}z(hn,dn);function jn(a){return(a=fn(a))?new ActiveXObject(a):new XMLHttpRequest}function fn(a){if(!a.e&&"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.e=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.e}gn=new hn;function kn(a,b,c,d,e){this.c=a;this.f=c;this.C=d;this.n=e||1;this.j=45E3;this.k=new sg(this);this.e=new Zm;$m(this.e,250)}g=kn.prototype;g.Va=null;g.oa=!1;g.mb=null;g.tc=null;g.xb=null;g.kb=null;g.Ea=null;g.Ja=null;g.Za=null;g.S=null;g.zb=0;g.pa=null;g.Tb=null;g.Wa=null;g.tb=-1;g.hd=!0;g.Pa=!1;g.dc=0;g.Nb=null;var ln={},mn={};g=kn.prototype;g.setTimeout=function(a){this.j=a};function nn(a,b,c){a.kb=1;a.Ea=fj(b.clone());a.Za=c;a.l=!0;on(a,null)}
  211. function pn(a,b,c,d,e){a.kb=1;a.Ea=fj(b.clone());a.Za=null;a.l=c;e&&(a.hd=!1);on(a,d)}function on(a,b){a.xb=y();qn(a);a.Ja=a.Ea.clone();dj(a.Ja,"t",a.n);a.zb=0;a.S=a.c.Zb(a.c.yb()?b:null);0<a.dc&&(a.Nb=new bn(v(a.kd,a,a.S),a.dc));a.k.Ca(a.S,"readystatechange",a.Ae);var c=a.Va?Bb(a.Va):{};a.Za?(a.Tb="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.S.send(a.Ja,a.Tb,a.Za,c)):(a.Tb="GET",a.hd&&!Uc&&(c.Connection="close"),a.S.send(a.Ja,a.Tb,null,c));a.c.na(1)}
  212. g.Ae=function(a){a=a.target;var b=this.Nb;b&&3==rn(a)?b.fb||b.ic?b.Qb=!0:cn(b):this.kd(a)};
  213. g.kd=function(a){try{if(a==this.S)t:{var b=rn(this.S),c=this.S.k,d=this.S.getStatus();if(Q&&!bd(10)||Uc&&!ad("420+")){if(4>b)break t}else if(3>b||3==b&&!Sc&&!sn(this.S))break t;this.Pa||4!=b||7==c||(8==c||0>=d?this.c.na(3):this.c.na(2));tn(this);var e=this.S.getStatus();this.tb=e;var f=sn(this.S);(this.oa=200==e)?(4==b&&un(this),this.l?(vn(this,b,f),Sc&&this.oa&&3==b&&(this.k.Ca(this.e,"tick",this.ye),this.e.start())):wn(this,f),this.oa&&!this.Pa&&(4==b?this.c.Lb(this):(this.oa=!1,qn(this)))):(this.Wa=
  214. 400==e&&0<f.indexOf("Unknown SID")?3:0,V(),un(this),xn(this))}}catch(h){this.S&&sn(this.S)}finally{}};function vn(a,b,c){for(var d=!0;!a.Pa&&a.zb<c.length;){var e=yn(a,c);if(e==mn){4==b&&(a.Wa=4,V(),d=!1);break}else if(e==ln){a.Wa=4;V();d=!1;break}else wn(a,e)}4==b&&0==c.length&&(a.Wa=1,V(),d=!1);a.oa=a.oa&&d;d||(un(a),xn(a))}g.ye=function(){var a=rn(this.S),b=sn(this.S);this.zb<b.length&&(tn(this),vn(this,a,b),this.oa&&4!=a&&qn(this))};
  215. function yn(a,b){var c=a.zb,d=b.indexOf("\n",c);if(-1==d)return mn;c=Number(b.substring(c,d));if(isNaN(c))return ln;d+=1;if(d+c>b.length)return mn;var e=b.substr(d,c);a.zb=d+c;return e}
  216. function zn(a,b){a.xb=y();qn(a);var c=b?window.location.hostname:"";a.Ja=a.Ea.clone();$i(a.Ja,"DOMAIN",c);$i(a.Ja,"t",a.n);try{a.pa=new ActiveXObject("htmlfile")}catch(d){un(a);a.Wa=7;V();xn(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.pa.open();a.pa.write(e);a.pa.close();a.pa.parentWindow.m=v(a.te,a);a.pa.parentWindow.d=v(a.Zc,a,!0);a.pa.parentWindow.rpcClose=v(a.Zc,a,!1);c=a.pa.createElement("div");a.pa.parentWindow.document.body.appendChild(c);
  217. c.innerHTML='<iframe src="'+a.Ja+'"></iframe>';a.c.na(1)}g.te=function(a){An(v(this.se,this,a),0)};g.se=function(a){this.Pa||(tn(this),wn(this,a),qn(this))};g.Zc=function(a){An(v(this.re,this,a),0)};g.re=function(a){this.Pa||(un(this),this.oa=a,this.c.Lb(this),this.c.na(4))};g.cancel=function(){this.Pa=!0;un(this)};function qn(a){a.tc=y()+a.j;Bn(a,a.j)}function Bn(a,b){if(null!=a.mb)throw Error("WatchDog timer not null");a.mb=An(v(a.ue,a),b)}function tn(a){a.mb&&(m.clearTimeout(a.mb),a.mb=null)}
  218. g.ue=function(){this.mb=null;var a=y();0<=a-this.tc?(2!=this.kb&&this.c.na(3),un(this),this.Wa=2,V(),xn(this)):Bn(this,this.tc-a)};function xn(a){a.c.Mc()||a.Pa||a.c.Lb(a)}function un(a){tn(a);$b(a.Nb);a.Nb=null;a.e.stop();a.k.removeAll();if(a.S){var b=a.S;a.S=null;Cn(b);b.dispose()}a.pa&&(a.pa=null)}function wn(a,b){try{a.c.Tc(a,b),a.c.na(4)}catch(c){}};function Dn(a,b,c,d,e){if(0==d)c(!1);else{var f=e||0;d--;En(a,b,function(e){e?c(!0):m.setTimeout(function(){Dn(a,b,c,d,f)},f)})}}function En(a,b,c){var d=new Image;d.onload=function(){try{Fn(d),c(!0)}catch(a){}};d.onerror=function(){try{Fn(d),c(!1)}catch(a){}};d.onabort=function(){try{Fn(d),c(!1)}catch(a){}};d.ontimeout=function(){try{Fn(d),c(!1)}catch(a){}};m.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b);d.src=a}
  219. function Fn(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function Gn(a){this.c=a;this.e=new vm(null,!0)}g=Gn.prototype;g.bc=null;g.da=null;g.Ob=!1;g.jd=null;g.Eb=null;g.gc=null;g.cc=null;g.ja=null;g.Ba=-1;g.sb=null;g.ob=null;function Hn(a){var b=In(a.c,a.ob,"/mail/images/cleardot.gif");fj(b);Dn(b.toString(),5E3,v(a.wd,a),3,2E3);a.na(1)}g.wd=function(a){if(a)this.ja=2,Jn(this);else{V();var b=this.c;b.ma=b.Fa.Ba;Kn(b,9)}a&&this.na(2)};
  220. function Jn(a){var b=a.c.D;if(null!=b)V(),b?(V(),Ln(a.c,a,!1)):(V(),Ln(a.c,a,!0));else if(a.da=new kn(a,0,void 0,void 0,void 0),a.da.Va=a.bc,b=a.c,b=In(b,b.yb()?a.sb:null,a.cc),V(),!Q||bd(10))dj(b,"TYPE","xmlhttp"),pn(a.da,b,!1,a.sb,!1);else{dj(b,"TYPE","html");var c=a.da;a=Boolean(a.sb);c.kb=3;c.Ea=fj(b.clone());zn(c,a)}}g.Zb=function(a){return this.c.Zb(a)};g.Mc=function(){return!1};
  221. g.Tc=function(a,b){this.Ba=a.tb;if(0==this.ja)if(b){try{var c=this.e.parse(b)}catch(d){c=this.c;c.ma=this.Ba;Kn(c,2);return}this.sb=c[0];this.ob=c[1]}else c=this.c,c.ma=this.Ba,Kn(c,2);else if(2==this.ja)if(this.Ob)V(),this.gc=y();else if("11111"==b){if(V(),this.Ob=!0,this.Eb=y(),c=this.Eb-this.jd,!Q||bd(10)||500>c)this.Ba=200,this.da.cancel(),V(),Ln(this.c,this,!0)}else V(),this.Eb=this.gc=y(),this.Ob=!1};
  222. g.Lb=function(){this.Ba=this.da.tb;if(this.da.oa)0==this.ja?this.ob?(this.ja=1,Hn(this)):(this.ja=2,Jn(this)):2==this.ja&&(a=!1,(a=!Q||bd(10)?this.Ob:200>this.gc-this.Eb?!1:!0)?(V(),Ln(this.c,this,!0)):(V(),Ln(this.c,this,!1)));else{0==this.ja?V():2==this.ja&&V();var a=this.c;a.ma=this.Ba;Kn(a,2)}};g.yb=function(){return this.c.yb()};g.isActive=function(){return this.c.isActive()};g.na=function(a){this.c.na(a)};function Mn(a){ug.call(this);this.headers=new Se;this.Q=a||null;this.e=!1;this.L=this.c=null;this.ca=this.C="";this.k=0;this.j="";this.f=this.V=this.n=this.R=!1;this.l=0;this.D=null;this.ra="";this.H=this.sa=!1}z(Mn,ug);var Nn=/^https?$/i,On=["POST","PUT"];g=Mn.prototype;
  223. g.send=function(a,b,c,d){if(this.c)throw Error("[goog.net.XhrIo] Object is active with another request="+this.C+"; newUri="+a);b=b?b.toUpperCase():"GET";this.C=a;this.j="";this.k=0;this.ca=b;this.R=!1;this.e=!0;this.c=this.Q?jn(this.Q):jn(gn);this.L=this.Q?en(this.Q):en(gn);this.c.onreadystatechange=v(this.Sc,this);try{qm(Pn(this,"Opening Xhr")),this.V=!0,this.c.open(b,String(a),!0),this.V=!1}catch(e){qm(Pn(this,"Error opening Xhr: "+e.message));Qn(this,e);return}a=c||"";var f=this.headers.clone();
  224. d&&Ki(d,function(a,b){Te(f,b,a)});d=Sa(f.Aa(),Rn);c=m.FormData&&a instanceof m.FormData;!Ua(On,b)||d||c||Te(f,"Content-Type","application/x-www-form-urlencoded;charset=utf-8");f.forEach(function(a,b){this.c.setRequestHeader(b,a)},this);this.ra&&(this.c.responseType=this.ra);"withCredentials"in this.c&&(this.c.withCredentials=this.sa);try{Sn(this),0<this.l&&(this.H=Tn(this.c),qm(Pn(this,"Will abort after "+this.l+"ms if incomplete, xhr2 "+this.H)),this.H?(this.c.timeout=this.l,this.c.ontimeout=v(this.Jc,
  225. this)):this.D=an(this.Jc,this.l,this)),qm(Pn(this,"Sending request")),this.n=!0,this.c.send(a),this.n=!1}catch(h){qm(Pn(this,"Send error: "+h.message)),Qn(this,h)}};function Tn(a){return Q&&ad(9)&&"number"==typeof a.timeout&&p(a.ontimeout)}function Rn(a){return"content-type"==a.toLowerCase()}g.Jc=function(){"undefined"!=typeof aa&&this.c&&(this.j="Timed out after "+this.l+"ms, aborting",this.k=8,Pn(this,this.j),vg(this,"timeout"),Cn(this,8))};
  226. function Qn(a,b){a.e=!1;a.c&&(a.f=!0,a.c.abort(),a.f=!1);a.j=b;a.k=5;Un(a);Vn(a)}function Un(a){a.R||(a.R=!0,vg(a,"complete"),vg(a,"error"))}function Cn(a,b){a.c&&a.e&&(Pn(a,"Aborting"),a.e=!1,a.f=!0,a.c.abort(),a.f=!1,a.k=b||7,vg(a,"complete"),vg(a,"abort"),Vn(a))}g.F=function(){this.c&&(this.e&&(this.e=!1,this.f=!0,this.c.abort(),this.f=!1),Vn(this,!0));Mn.G.F.call(this)};g.Sc=function(){this.K()||(this.V||this.n||this.f?Wn(this):this.ke())};g.ke=function(){Wn(this)};
  227. function Wn(a){if(a.e&&"undefined"!=typeof aa)if(a.L[1]&&4==rn(a)&&2==a.getStatus())Pn(a,"Local request error detected and ignored");else if(a.n&&4==rn(a))an(a.Sc,0,a);else if(vg(a,"readystatechange"),4==rn(a)){Pn(a,"Request complete");a.e=!1;try{var b=a.getStatus(),c;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break t;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=mf(String(a.C))[1]||null;if(!f&&self.location)var h=self.location.protocol,f=h.substr(0,h.length-
  228. 1);e=!Nn.test(f?f.toLowerCase():"")}d=e}if(d)vg(a,"complete"),vg(a,"success");else{a.k=6;var k;try{k=2<rn(a)?a.c.statusText:""}catch(l){k=""}a.j=k+" ["+a.getStatus()+"]";Un(a)}}finally{Vn(a)}}}function Vn(a,b){if(a.c){Sn(a);var c=a.c,d=a.L[0]?t:null;a.c=null;a.L=null;b||vg(a,"ready");try{c.onreadystatechange=d}catch(e){}}}function Sn(a){a.c&&a.H&&(a.c.ontimeout=null);"number"==typeof a.D&&(m.clearTimeout(a.D),a.D=null)}g.isActive=function(){return!!this.c};
  229. function rn(a){return a.c?a.c.readyState:0}g.getStatus=function(){try{return 2<rn(this)?this.c.status:-1}catch(a){return-1}};function sn(a){try{return a.c?a.c.responseText:""}catch(b){return""}}function Pn(a,b){return b+" ["+a.ca+" "+a.C+" "+a.getStatus()+"]"};function Xn(a,b,c){this.n=a||null;this.c=1;this.e=[];this.k=[];this.j=new vm(null,!0);this.C=b||null;this.D=null!=c?c:null}function Yn(a,b){this.c=a;this.map=b;this.context=null}g=Xn.prototype;g.qb=null;g.Y=null;g.O=null;g.ac=null;g.Fb=null;g.zc=null;g.Gb=null;g.ub=0;g.Md=0;g.U=null;g.Ha=null;g.wa=null;g.Ra=null;g.Fa=null;g.Sb=null;g.gb=-1;g.Oc=-1;g.ma=-1;g.rb=0;g.eb=0;g.Qa=8;var Zn=new ug;function $n(a){Vf.call(this,"statevent",a)}z($n,Vf);
  230. function ao(a,b){Vf.call(this,"timingevent",a);this.size=b}z(ao,Vf);function bo(a){Vf.call(this,"serverreachability",a)}z(bo,Vf);function co(a,b,c,d,e,f){V();a.ac=c;a.qb=d||{};e&&p(f)&&(a.qb.OSID=e,a.qb.OAID=f);a.Fa=new Gn(a);a.Fa.bc=null;a.Fa.e=a.j;a=a.Fa;a.cc=b;b=In(a.c,null,a.cc);V();a.jd=y();c=a.c.C;null!=c?(a.sb=c[0],a.ob=c[1],a.ob?(a.ja=1,Hn(a)):(a.ja=2,Jn(a))):(dj(b,"MODE","init"),a.da=new kn(a,0,void 0,void 0,void 0),a.da.Va=a.bc,pn(a.da,b,!1,null,!0),a.ja=0)}
  231. function eo(a){fo(a);if(3==a.c){var b=a.ub++,c=a.Fb.clone();$i(c,"SID",a.f);$i(c,"RID",b);$i(c,"TYPE","terminate");go(a,c);b=new kn(a,0,a.f,b,void 0);b.kb=2;b.Ea=fj(c.clone());(new Image).src=b.Ea;b.xb=y();qn(b)}ho(a)}function fo(a){if(a.Fa){var b=a.Fa;b.da&&(b.da.cancel(),b.da=null);b.Ba=-1;a.Fa=null}a.O&&(a.O.cancel(),a.O=null);a.wa&&(m.clearTimeout(a.wa),a.wa=null);io(a);a.Y&&(a.Y.cancel(),a.Y=null);a.Ha&&(m.clearTimeout(a.Ha),a.Ha=null)}
  232. function jo(a,b){if(0==a.c)throw Error("Invalid operation: sending map when state is closed");a.e.push(new Yn(a.Md++,b));2!=a.c&&3!=a.c||ko(a)}g=Xn.prototype;g.Mc=function(){return 0==this.c};function ko(a){a.Y||a.Ha||(a.Ha=An(v(a.Xc,a),0),a.rb=0)}g.Xc=function(a){this.Ha=null;lo(this,a)};
  233. function lo(a,b){if(1==a.c){if(!b){a.ub=Math.floor(1E5*Math.random());var c=a.ub++,d=new kn(a,0,"",c,void 0);d.Va=null;var e=mo(a),f=a.Fb.clone();$i(f,"RID",c);a.n&&$i(f,"CVER",a.n);go(a,f);nn(d,f,e);a.Y=d;a.c=2}}else 3==a.c&&(b?no(a,b):0!=a.e.length&&(a.Y||no(a)))}
  234. function no(a,b){var c,d;b?6<a.Qa?(a.e=a.k.concat(a.e),a.k.length=0,c=a.ub-1,d=mo(a)):(c=b.C,d=b.Za):(c=a.ub++,d=mo(a));var e=a.Fb.clone();$i(e,"SID",a.f);$i(e,"RID",c);$i(e,"AID",a.gb);go(a,e);c=new kn(a,0,a.f,c,a.rb+1);c.Va=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.Y=c;nn(c,e,d)}function go(a,b){if(a.U){var c=a.U.Hc(a);c&&qb(c,function(a,c){$i(b,c,a)})}}
  235. function mo(a){var b=Math.min(a.e.length,1E3),c=["count="+b],d;6<a.Qa&&0<b?(d=a.e[0].c,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var f=a.e[e].c,h=a.e[e].map,f=6>=a.Qa?e:f-d;try{Ki(h,function(a,b){c.push("req"+f+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.k=a.k.concat(a.e.splice(0,b));return c.join("&")}function oo(a){a.O||a.wa||(a.l=1,a.wa=An(v(a.Wc,a),0),a.eb=0)}
  236. function po(a){if(a.O||a.wa||3<=a.eb)return!1;a.l++;a.wa=An(v(a.Wc,a),qo(a,a.eb));a.eb++;return!0}g.Wc=function(){this.wa=null;this.O=new kn(this,0,this.f,"rpc",this.l);this.O.Va=null;this.O.dc=0;var a=this.zc.clone();$i(a,"RID","rpc");$i(a,"SID",this.f);$i(a,"CI",this.Sb?"0":"1");$i(a,"AID",this.gb);go(this,a);if(!Q||bd(10))$i(a,"TYPE","xmlhttp"),pn(this.O,a,!0,this.Gb,!1);else{$i(a,"TYPE","html");var b=this.O,c=Boolean(this.Gb);b.kb=3;b.Ea=fj(a.clone());zn(b,c)}};
  237. function Ln(a,b,c){a.Sb=c;a.ma=b.Ba;a.xd(1,0);a.Fb=In(a,null,a.ac);ko(a)}
  238. g.Tc=function(a,b){if(0!=this.c&&(this.O==a||this.Y==a))if(this.ma=a.tb,this.Y==a&&3==this.c)if(7<this.Qa){var c;try{c=this.j.parse(b)}catch(d){c=null}if(da(c)&&3==c.length)if(0==c[0])t:{if(!this.wa){if(this.O)if(this.O.xb+3E3<this.Y.xb)io(this),this.O.cancel(),this.O=null;else break t;po(this);V()}}else this.Oc=c[1],0<this.Oc-this.gb&&37500>c[2]&&this.Sb&&0==this.eb&&!this.Ra&&(this.Ra=An(v(this.Nd,this),6E3));else Kn(this,11)}else"y2f%"!=b&&Kn(this,11);else if(this.O==a&&io(this),!/^[\s\xa0]*$/.test(b)){c=
  239. this.j.parse(b);da(c);for(var e=0;e<c.length;e++){var f=c[e];this.gb=f[0];f=f[1];2==this.c?"c"==f[0]?(this.f=f[1],this.Gb=f[2],f=f[3],null!=f?this.Qa=f:this.Qa=6,this.c=3,this.U&&this.U.Ec(this),this.zc=In(this,this.yb()?this.Gb:null,this.ac),oo(this)):"stop"==f[0]&&Kn(this,7):3==this.c&&("stop"==f[0]?Kn(this,7):"noop"!=f[0]&&this.U&&this.U.Dc(this,f),this.eb=0)}}};g.Nd=function(){null!=this.Ra&&(this.Ra=null,this.O.cancel(),this.O=null,po(this),V())};
  240. function io(a){null!=a.Ra&&(m.clearTimeout(a.Ra),a.Ra=null)}
  241. g.Lb=function(a){var b;if(this.O==a)io(this),this.O=null,b=2;else if(this.Y==a)this.Y=null,b=1;else return;this.ma=a.tb;if(0!=this.c)if(a.oa)1==b?(y(),vg(Zn,new ao(Zn,a.Za?a.Za.length:0)),ko(this),this.k.length=0):oo(this);else{var c=a.Wa,d;if(!(d=3==c||7==c||0==c&&0<this.ma)){if(d=1==b)this.Y||this.Ha||1==this.c||2<=this.rb?d=!1:(this.Ha=An(v(this.Xc,this,a),qo(this,this.rb)),this.rb++,d=!0);d=!(d||2==b&&po(this))}if(d)switch(c){case 1:Kn(this,5);break;case 4:Kn(this,10);break;case 3:Kn(this,6);
  242. break;case 7:Kn(this,12);break;default:Kn(this,2)}}};function qo(a,b){var c=5E3+Math.floor(1E4*Math.random());a.isActive()||(c*=2);return c*b}g.xd=function(a){if(!Ua(arguments,this.c))throw Error("Unexpected channel state: "+this.c);};function Kn(a,b){if(2==b||9==b){var c=null;a.U&&(c=null);var d=v(a.He,a);c||(c=new Mi("//www.google.com/images/cleardot.gif"),fj(c));En(c.toString(),1E4,d)}else V();ro(a,b)}g.He=function(a){a?V():(V(),ro(this,8))};
  243. function ro(a,b){a.c=0;a.U&&a.U.Cc(a,b);ho(a);fo(a)}function ho(a){a.c=0;a.ma=-1;if(a.U)if(0==a.k.length&&0==a.e.length)a.U.Xb(a);else{var b=cb(a.k),c=cb(a.e);a.k.length=0;a.e.length=0;a.U.Xb(a,b,c)}}function In(a,b,c){var d=gj(c);if(""!=d.xa)b&&Oi(d,b+"."+d.xa),Pi(d,d.Ya);else var e=window.location,d=hj(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.qb&&qb(a.qb,function(a,b){$i(d,b,a)});$i(d,"VER",a.Qa);go(a,d);return d}
  244. g.Zb=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new Mn;a.sa=!1;return a};g.isActive=function(){return!!this.U&&this.U.isActive(this)};function An(a,b){if(!fa(a))throw Error("Fn must not be null and must be a function");return m.setTimeout(function(){a()},b)}g.na=function(){vg(Zn,new bo(Zn))};function V(){vg(Zn,new $n(Zn))}g.yb=function(){return!(!Q||bd(10))};function so(){}g=so.prototype;g.Ec=function(){};g.Dc=function(){};g.Cc=function(){};g.Xb=function(){};
  245. g.Hc=function(){return{}};g.isActive=function(){return!0};function to(a,b){Zm.call(this);if(fa(a))b&&(a=v(a,b));else if(a&&fa(a.handleEvent))a=v(a.handleEvent,a);else throw Error("Invalid listener argument");this.n=a;hg(this,"tick",v(this.l,this));this.stop();$m(this,5E3+2E4*Math.random())}z(to,Zm);to.prototype.j=0;to.prototype.l=function(){if(500<this.c){var a=this.c;24E4>2*a&&(a*=2);$m(this,a)}this.n()};to.prototype.start=function(){to.G.start.call(this);this.j=y()+this.c};to.prototype.stop=function(){this.j=0;to.G.stop.call(this)};function uo(a,b){this.fa=a;this.k=b;this.f=new H;this.e=new to(this.Qe,this);this.c=null;this.H=!1;this.l=null;this.D="";this.C=this.j=0;this.n=[]}z(uo,so);g=uo.prototype;g.subscribe=function(a,b,c){return this.f.subscribe(a,b,c)};g.lb=function(a,b,c){return this.f.lb(a,b,c)};g.qa=function(a){return this.f.qa(a)};g.B=function(a,b){return this.f.B.apply(this.f,arguments)};g.dispose=function(){this.H||(this.H=!0,this.f.clear(),vo(this),$b(this.f))};g.K=function(){return this.H};
  246. function wo(a){return{firstTestResults:[""],secondTestResults:!a.c.Sb,sessionId:a.c.f,arrayId:a.c.gb}}function xo(a,b,c,d){if(!a.c||2!=a.c.c){a.D="";a.e.stop();a.l=b||null;a.j=c||0;b=a.fa+"/test";c=a.fa+"/bind";var e=new Xn("1",d?d.firstTestResults:null,d?d.secondTestResults:null),f=a.c;f&&(f.U=null);e.U=a;a.c=e;f?co(a.c,b,c,a.k,f.f,f.gb):d?co(a.c,b,c,a.k,d.sessionId,d.arrayId):co(a.c,b,c,a.k)}}function vo(a,b){a.C=b||0;a.e.stop();a.c&&(3==a.c.c&&lo(a.c),eo(a.c));a.C=0}
  247. g.Ec=function(){var a=this.e;a.stop();$m(a,5E3+2E4*Math.random());this.l=null;this.j=0;if(this.n.length){a=this.n;this.n=[];for(var b=0,c=a.length;b<c;++b)jo(this.c,a[b])}this.B("handlerOpened")};g.Cc=function(a,b){var c=2==b&&401==this.c.ma;if(4!=b&&!c){if(6==b||410==this.c.ma)c=this.e,c.stop(),$m(c,500);this.e.start()}this.B("handlerError",b)};g.Xb=function(a,b,c){if(!this.e.enabled)this.B("handlerClosed");else if(c)for(a=0,b=c.length;a<b;++a)this.n.push(c[a].map)};
  248. g.Hc=function(){var a={v:2};this.D&&(a.gsessionid=this.D);0!=this.j&&(a.ui=""+this.j);0!=this.C&&(a.ui=""+this.C);this.l&&Eb(a,this.l);return a};g.Dc=function(a,b){if("S"==b[0])this.D=b[1];else if("gracefulReconnect"==b[0]){var c=this.e;c.stop();$m(c,500);this.e.start();eo(this.c)}else this.B("handlerMessage",new tm(b[0],b[1]))};function yo(a,b){(a.k.loungeIdToken=b)||a.e.stop()}g.Qe=function(){this.e.stop();var a=this.c,b=0;a.O&&b++;a.Y&&b++;0!=b?this.e.start():xo(this,this.l,this.j)};function zo(){Yb.call(this);this.k=new H;Zb(this,w($b,this.k))}z(zo,Yb);zo.prototype.subscribe=function(a,b,c){return this.K()?0:this.k.subscribe(a,b,c)};zo.prototype.lb=function(a,b,c){return this.K()?!1:this.k.lb(a,b,c)};zo.prototype.qa=function(a){return this.K()?!1:this.k.qa(a)};zo.prototype.B=function(a,b){return this.K()?!1:this.k.B.apply(this.k,arguments)};function Ao(){this.c=[];this.e=[]}g=Ao.prototype;g.W=function(){return this.c.length+this.e.length};g.isEmpty=function(){return Va(this.c)&&Va(this.e)};g.clear=function(){this.c=[];this.e=[]};g.contains=function(a){return Ua(this.c,a)||Ua(this.e,a)};g.remove=function(a){var b=Ma(this.c,a);if(0>b)return Za(this.e,a);$a(this.c,b);return!0};g.Z=function(){for(var a=[],b=this.c.length-1;0<=b;--b)a.push(this.c[b]);for(var c=this.e.length,b=0;b<c;++b)a.push(this.e[b]);return a};var Bo=y(),Co=null,Do=Array(50),Eo=-1,Fo=!1;function Go(a){Ho();Co.push(a);Io(Co)}function Jo(a,b){Ho();var c=Co,d=Ko(a,String(b));Va(c)?Lo(d):(Io(c),A(c,function(a){a(d)}))}function Ho(){Co||(Co=r("yt.mdx.remote.debug.handlers_")||[],q("yt.mdx.remote.debug.handlers_",Co,void 0))}function Lo(a){var b=(Eo+1)%50;Eo=b;Do[b]=a;Fo||(Fo=49==b)}function Io(a){var b=Do;if(b[0]){var c=Eo,d=Fo?c:-1;do{var d=(d+1)%50,e=b[d];A(a,function(a){a(e)})}while(d!=c);Do=Array(50);Eo=-1;Fo=!1}}
  249. function Ko(a,b){var c=(y()-Bo)/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 Mo(a){a=a||{};this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||""}function No(a,b){return!!b&&(a.id==b||a.uuid==b)}function Oo(a,b){return a||b?!a!=!b?!1:a.id==b.id&&a.token==b.token&&a.name==b.name&&a.uuid==b.uuid:!0}function Po(a){return{name:a.name,screenId:a.id,loungeToken:a.token,dialId:a.uuid}}function Qo(a){return new Mo(a)}function Ro(a){return da(a)?Oa(a,Qo):[]}
  250. function So(a){return a?'{name:"'+a.name+'",id:'+a.id.substr(0,6)+"..,token:"+(a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+"}":"null"}function To(a){return da(a)?"["+Oa(a,So).join(",")+"]":"null"};function Uo(){};function Vo(){}z(Vo,Uo);Vo.prototype.W=function(){var a=0;Qe(this.va(!0),function(){a++});return a};Vo.prototype.clear=function(){var a=Re(this.va(!0)),b=this;A(a,function(a){b.remove(a)})};function Wo(a){this.c=a}z(Wo,Vo);g=Wo.prototype;g.isAvailable=function(){if(!this.c)return!1;try{return this.c.setItem("__sak","1"),this.c.removeItem("__sak"),!0}catch(a){return!1}};g.Ed=function(a,b){try{this.c.setItem(a,b)}catch(c){if(0==this.c.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};g.get=function(a){a=this.c.getItem(a);if(!u(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};g.remove=function(a){this.c.removeItem(a)};
  251. g.W=function(){return this.c.length};g.va=function(a){var b=0,c=this.c,d=new Oe;d.next=function(){if(b>=c.length)throw Ne;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.c.clear()};g.key=function(a){return this.c.key(a)};function Xo(){var a=null;try{a=window.localStorage||null}catch(b){}this.c=a}z(Xo,Wo);function Yo(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.c=a}z(Yo,Wo);function Zo(a){this.c=a}Zo.prototype.e=function(a,b){p(b)?this.c.Ed(a,df(b)):this.c.remove(a)};Zo.prototype.get=function(a){var b;try{b=this.c.get(a)}catch(c){return}if(null!==b)try{return bf(b)}catch(d){throw"Storage: Invalid value was encountered";}};Zo.prototype.remove=function(a){this.c.remove(a)};function $o(a){this.c=a}z($o,Zo);function ap(a){this.data=a}function bp(a){return!p(a)||a instanceof ap?a:new ap(a)}$o.prototype.e=function(a,b){$o.G.e.call(this,a,bp(b))};$o.prototype.f=function(a){a=$o.G.get.call(this,a);if(!p(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};$o.prototype.get=function(a){if(a=this.f(a)){if(a=a.data,!p(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function cp(a){this.c=a}z(cp,$o);function dp(a){var b=a.creation;a=a.expiration;return!!a&&a<y()||!!b&&b>y()}cp.prototype.e=function(a,b,c){if(b=bp(b)){if(c){if(c<y()){cp.prototype.remove.call(this,a);return}b.expiration=c}b.creation=y()}cp.G.e.call(this,a,b)};cp.prototype.f=function(a,b){var c=cp.G.f.call(this,a);if(c)if(!b&&dp(c))cp.prototype.remove.call(this,a);else return c};function ep(a){this.c=a}z(ep,cp);function fp(a,b){var c=[];Qe(b,function(a){var b;try{b=ep.prototype.f.call(this,a,!0)}catch(f){if("Storage: Invalid value was encountered"==f)return;throw f;}p(b)?dp(b)&&c.push(a):c.push(a)},a);return c}function gp(a,b){var c=fp(a,b);A(c,function(a){ep.prototype.remove.call(this,a)},a)}function hp(){var a=ip;gp(a,a.c.va(!0))};function jp(a,b,c){var d=c&&0<c?c:0;c=d?y()+1E3*d:0;if((d=d?ip:kp)&&window.JSON){u(b)||(b=JSON.stringify(b,void 0));try{d.e(a,b,c)}catch(e){d.remove(a)}}}function lp(a){if(!kp&&!ip||!window.JSON)return null;var b;try{b=kp.get(a)}catch(c){}if(!u(b))try{b=ip.get(a)}catch(d){}if(!u(b))return null;try{b=JSON.parse(b,void 0)}catch(e){}return b}function mp(a){kp&&kp.remove(a);ip&&ip.remove(a)}var ip,np=new Xo;ip=np.isAvailable()?new ep(np):null;var kp,op=new Yo;kp=op.isAvailable()?new ep(op):null;var pp=["boadgeojelhgndaghljhdicfkmllpafd","dliochdbjfkdbacpmhlcpmleaejidimm","hfaagokkkhdbgiakmmlclaapfelnkoah","fmfcbgogabcbclcofgocippekhfcmgfj","enhhojjnijigcajfphajepfemndkmdlo"];function qp(a,b){a==pp.length?b(null):rp(pp[a],function(c){c?(c=pp[a],jp("yt-remote-cast-last-extension",c),b(c)):qp(a+1,b)})}function sp(a){return"chrome-extension://"+a+"/cast_sender.js"}
  252. function rp(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",sp(a),!0),c.send()}catch(d){b(!1)}}
  253. function tp(a){window.__onGCastApiAvailable=a;up(function(b){if(b){Jo("bootstrap","Found cast extension: "+b);q("chrome.cast.extensionId",b,void 0);var c=document.createElement("script");c.src=sp(b);c.onerror=function(){vp();mp("yt-remote-cast-last-extension");a(!1,"Extension JS failed to load.")};(document.head||document.documentElement).appendChild(c)}else Jo("bootstrap","No cast extension found"),a(!1,"No cast extension found")})}
  254. function vp(){window.__onGCastApiAvailable&&delete window.__onGCastApiAvailable}function up(a){var b=lp("yt-remote-cast-last-extension");b?a(b):qp(0,a)};function wp(a){this.port=this.f="";this.c="/api/lounge";this.e=!0;a=a||document.location.href;var b=Number(mf(a)[4]||null)||null||"";b&&(this.port=":"+b);this.f=of(a)||"";a=Kc;0<=a.search("MSIE")&&(a=a.match(/MSIE ([\d.]+)/)[1],0>Ea(a,"10.0")&&(this.e=!1))}function xp(a,b,c,d){var e=a.c;if(p(d)?d:a.e)e="https://"+a.f+a.port+a.c;return wf(e+b,c||{})}
  255. function yp(a,b,c,d,e){a={format:"JSON",method:"POST",context:a,timeout:5E3,withCredentials:!1,P:w(a.j,d,!0),onError:w(a.k,e),wb:w(a.l,e)};c&&(a.X=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return Hf(b,a)}wp.prototype.j=function(a,b,c,d){b?a(d):a({text:c.responseText})};wp.prototype.k=function(a,b){a(Error("Request error: "+b.status))};wp.prototype.l=function(a){a(Error("request timed out"))};function zp(a){a&&(this.id=a.id||"",this.name=a.name||"",this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}zp.prototype.id="";zp.prototype.name="";zp.prototype.activityId="";zp.prototype.status="UNKNOWN";function Ap(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}zp.prototype.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.activityId+",status:"+this.status+"}"};
  256. function Bp(a){a=a||[];return"["+Oa(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function Cp(){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 Dp(a){return Oa(a,function(a){return Ap(a)})}function Ep(){return Oa(Xa,function(a){return new zp(a)})}function Fp(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}function Gp(a,b){return Sa(a,function(a){return a.id==b})}function Hp(a,b){return Sa(a,function(a){return a||b?!a!=!b?!1:a.id==b.id:!0})}
  257. function Ip(a,b){return Sa(a,function(a){return No(a,b)})};function Jp(a){zo.call(this);this.n=a;this.screens=[]}z(Jp,zo);g=Jp.prototype;g.ha=function(){return this.screens};g.contains=function(a){return!!Hp(this.screens,a)};g.get=function(a){return a?Ip(this.screens,a):null};function Kp(a,b){var c=a.get(b.uuid)||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.uuid=b.uuid||c.uuid;return c.name!=d}a.screens.push(b);return!0}
  258. function Lp(a,b){var c=a.screens.length!=b.length;a.screens=Na(a.screens,function(a){return!!Hp(b,a)});for(var d=0,e=b.length;d<e;d++)c=Kp(a,b[d])||c;return c}function Mp(a,b){var c=a.screens.length;a.screens=Na(a.screens,function(a){return!(a||b?!a!=!b?0:a.id==b.id:1)});return a.screens.length<c}g.info=function(a){Jo(this.n,a)};g.warn=function(a){Jo(this.n,a)};function Np(a,b,c,d){zo.call(this);this.C=a;this.n=b;this.j=c;this.l=d;this.f=0;this.c=null;this.e=NaN}z(Np,zo);var Op=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g=Np.prototype;g.start=function(){!this.c&&isNaN(this.e)&&this.$c()};g.stop=function(){this.c&&(this.c.abort(),this.c=null);isNaN(this.e)||(M(this.e),this.e=NaN)};g.F=function(){this.stop();Np.G.F.call(this)};
  259. g.$c=function(){this.e=NaN;this.c=Hf(xp(this.C,"/pairing/get_screen"),{method:"POST",X:{pairing_code:this.n},timeout:5E3,P:v(this.Se,this),onError:v(this.Re,this),wb:v(this.Te,this)})};g.Se=function(a,b){this.c=null;var c=b.screen||{};c.dialId=this.j;c.name=this.l;this.B("pairingComplete",new Mo(c))};
  260. g.Re=function(a){this.c=null;a.status&&404==a.status?this.f>=Op.length?this.B("pairingFailed",Error("DIAL polling timed out")):(a=Op[this.f],this.e=K(v(this.$c,this),a),this.f++):this.B("pairingFailed",Error("Server error "+a.status))};g.Te=function(){this.c=null;this.B("pairingFailed",Error("Server not responding"))};var Pp;function Qp(){var a=Rp(),b=Sp();Ua(a,b);if(Tp()){var c=a,d;d=0;for(var e=c.length,f;d<e;){var h=d+e>>1,k;k=ib(b,c[h]);0<k?d=h+1:(e=h,f=!k)}d=f?d:~d;0>d&&eb(c,-(d+1),0,b)}a=Up(a);if(Va(a))try{Vg("remote_sid")}catch(l){}else try{Tg("remote_sid",a.join(","),-1,"/")}catch(n){}}function Rp(){var a=lp("yt-remote-connected-devices")||[];a.sort(ib);return a}
  261. function Up(a){if(Va(a))return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return Oa(a,function(a,b){return 0==b?a:a.substring(c.length)})}function Vp(a){jp("yt-remote-connected-devices",a,86400)}function Sp(){if(Wp)return Wp;var a=lp("yt-remote-device-id");a||(a=Cp(),jp("yt-remote-device-id",a,31536E3));for(var b=Rp(),c=1,d=a;Ua(b,d);)c++,d=a+"#"+c;return Wp=d}function Xp(){return lp("yt-remote-session-browser-channel")}function Tp(){return lp("yt-remote-session-screen-id")}
  262. function Yp(a){5<a.length&&(a=a.slice(a.length-5));var b=Oa(Zp(),function(a){return a.loungeToken}),c=Oa(a,function(a){return a.loungeToken});Ra(c,function(a){return!Ua(b,a)})&&$p();jp("yt-remote-local-screens",a,31536E3)}function Zp(){return lp("yt-remote-local-screens")||[]}function $p(){jp("yt-remote-lounge-token-expiration",!0,86400)}function aq(){return!lp("yt-remote-lounge-token-expiration")}function bq(a){jp("yt-remote-online-screens",a,60)}
  263. function cq(){return lp("yt-remote-online-screens")||[]}function dq(a){jp("yt-remote-online-dial-devices",a,30)}function eq(a,b){jp("yt-remote-session-browser-channel",a);jp("yt-remote-session-screen-id",b);var c=Rp(),d=Sp();Ua(c,d)||c.push(d);Vp(c);Qp()}function fq(a){a||(mp("yt-remote-session-screen-id"),mp("yt-remote-session-video-id"));Qp();a=Rp();Za(a,Sp());Vp(a)}
  264. function gq(){if(!Pp){var a;a=new Xo;(a=a.isAvailable()?a:null)&&(Pp=new Zo(a))}return Pp?!!Pp.get("yt-remote-use-staging-server"):!1}var Wp="";function hq(a){Jp.call(this,"LocalScreenService");this.e=a;this.c=NaN;iq(this);this.info("Initializing with "+To(this.screens))}z(hq,Jp);g=hq.prototype;g.start=function(){iq(this)&&this.B("screenChange");aq()&&jq(this);M(this.c);this.c=K(v(this.start,this),1E4)};g.add=function(a,b){iq(this);Kp(this,a);kq(this,!1);this.B("screenChange");b(a);a.token||jq(this)};g.remove=function(a,b){var c=iq(this);Mp(this,a)&&(kq(this,!1),c=!0);b(a);c&&this.B("screenChange")};
  265. g.Rb=function(a,b,c,d){var e=iq(this),f=this.get(a.id);f?(f.name!=b&&(f.name=b,kq(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.B("screenChange")};g.F=function(){M(this.c);hq.G.F.call(this)};function jq(a){if(a.screens.length){var b=Oa(a.screens,function(a){return a.id}),c=xp(a.e,"/pairing/get_lounge_token_batch");yp(a.e,c,{screen_ids:b.join(",")},v(a.Hd,a),v(a.Gd,a))}}
  266. g.Hd=function(a){iq(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)}kq(this,!b);b&&this.warn("Missed "+b+" lounge tokens.")};g.Gd=function(a){this.warn("Requesting lounge tokens failed: "+a)};function iq(a){var b=Ro(Zp()),b=Na(b,function(a){return!a.uuid});return Lp(a,b)}function kq(a,b){Yp(Oa(a.screens,Po));b&&$p()};function lq(a,b){zo.call(this);this.l=b;for(var c=lp("yt-remote-online-screen-ids")||"",c=c?c.split(","):[],d={},e=this.l(),f=0,h=e.length;f<h;++f){var k=e[f].id;d[k]=Ua(c,k)}this.c=d;this.n=a;this.f=this.j=NaN;this.e=null;mq("Initialized with "+df(this.c))}z(lq,zo);g=lq.prototype;g.start=function(){var a=parseInt(lp("yt-remote-fast-check-period")||"0",10);(this.j=y()-144E5<a?0:a)?nq(this):(this.j=y()+3E5,jp("yt-remote-fast-check-period",this.j),this.lc())};g.isEmpty=function(){return zb(this.c)};
  267. g.update=function(){mq("Updating availability on schedule.");var a=this.l(),b=rb(this.c,function(b,d){return b&&!!Ip(a,d)},this);oq(this,b)};function pq(a,b,c){var d=xp(a.n,"/pairing/get_screen_availability");yp(a.n,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.F=function(){M(this.f);this.f=NaN;this.e&&(this.e.abort(),this.e=null);lq.G.F.call(this)};
  268. function oq(a,b){var c;t:if(sb(b)!=sb(a.c))c=!1;else{c=wb(b);for(var d=0,e=c.length;d<e;++d)if(!a.c[c[d]]){c=!1;break t}c=!0}c||(mq("Updated online screens: "+df(a.c)),a.c=b,a.B("screenChange"));qq(a)}function nq(a){isNaN(a.f)||M(a.f);a.f=K(v(a.lc,a),0<a.j&&a.j<y()?2E4:1E4)}
  269. g.lc=function(){M(this.f);this.f=NaN;this.e&&this.e.abort();var a=rq(this);if(sb(a)){var b=xp(this.n,"/pairing/get_screen_availability"),c={lounge_token:wb(a).join(",")};this.e=yp(this.n,b,c,v(this.oe,this,a),v(this.ne,this))}else oq(this,{}),nq(this)};g.oe=function(a,b){this.e=null;var c=wb(rq(this));if(gb(c,wb(a))){for(var c=b.screens||[],d={},e=0,f=c.length;e<f;++e)d[a[c[e].loungeToken]]="online"==c[e].status;oq(this,d);nq(this)}else this.M("Changing Screen set during request."),this.lc()};
  270. g.ne=function(a){this.M("Screen availability failed: "+a);this.e=null;nq(this)};function mq(a){Jo("OnlineScreenService",a)}g.M=function(a){Jo("OnlineScreenService",a)};function rq(a){var b={};A(a.l(),function(a){a.token?b[a.token]=a.id:this.M("Requesting availability of screen w/o lounge token.")});return b}
  271. function qq(a){var b=wb(rb(a.c,function(a){return a}));b.sort(ib);b.length?jp("yt-remote-online-screen-ids",b.join(","),60):mp("yt-remote-online-screen-ids");a=Na(a.l(),function(a){return!!this.c[a.id]},a);bq(Oa(a,Po))};function W(a){Jp.call(this,"ScreenService");this.l=a;this.c=this.e=null;this.f=[];this.j={};sq(this)}z(W,Jp);g=W.prototype;g.start=function(){this.e.start();this.c.start();this.screens.length&&(this.B("screenChange"),this.c.isEmpty()||this.B("onlineScreenChange"))};g.add=function(a,b,c){this.e.add(a,b,c)};g.remove=function(a,b,c){this.e.remove(a,b,c);this.c.update()};g.Rb=function(a,b,c,d){this.e.contains(a)?this.e.Rb(a,b,c,d):(a="Updating name of unknown screen: "+a.name,this.warn(a),d(Error(a)))};
  272. g.ha=function(a){return a?this.screens:bb(this.screens,Na(this.f,function(a){return!this.contains(a)},this))};g.md=function(){return Na(this.ha(!0),function(a){return!!this.c.c[a.id]},this)};
  273. function tq(a,b,c,d,e,f){a.info("getAutomaticScreenByIds "+c+" / "+b);c||(c=a.j[b]);var h=a.ha();if(h=(c?Ip(h,c):null)||Ip(h,b)){h.uuid=b;var k=uq(a,h);pq(a.c,k,function(a){e(a?k:null)})}else c?vq(a,c,v(function(a){var f=uq(this,new Mo({name:d,screenId:c,loungeToken:a,dialId:b||""}));pq(this.c,f,function(a){e(a?f:null)})},a),f):e(null)}
  274. g.nd=function(a,b,c,d,e){this.info("getDialScreenByPairingCode "+a+" / "+b);var f=new Np(this.l,a,b,c);f.subscribe("pairingComplete",v(function(a){$b(f);d(uq(this,a))},this));f.subscribe("pairingFailed",function(a){$b(f);e(a)});f.start();return v(f.stop,f)};function wq(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.Ic=function(a,b){for(var c=2,d=b(a,c);wq(this,d);){c++;if(20<c)return a;d=b(a,c)}return d};
  275. g.Ve=function(a,b,c,d){Hf(xp(this.l,"/pairing/get_screen"),{method:"POST",X:{pairing_code:a},timeout:5E3,P:v(function(a,d){var h=new Mo(d.screen||{});if(!h.name||wq(this,h.name))h.name=this.Ic(h.name,b);c(uq(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.F=function(){$b(this.e);$b(this.c);W.G.F.call(this)};
  276. function vq(a,b,c,d){a.info("requestLoungeToken_ for "+b);var e={X:{screen_ids:b},method:"POST",context:a,P: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"))}};Hf(xp(a.l,"/pairing/get_lounge_token_batch"),e)}
  277. function xq(a){a.screens=a.e.ha();var b=a.j,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.uuid=c[e.id]||""}a.info("Updated manual screens: "+To(a.screens))}g.Id=function(){xq(this);this.B("screenChange");this.c.update()};
  278. function sq(a){yq(a);a.e=new hq(a.l);a.e.subscribe("screenChange",v(a.Id,a));xq(a);a.f=Ro(lp("yt-remote-automatic-screen-cache")||[]);yq(a);a.info("Initializing automatic screens: "+To(a.f));a.c=new lq(a.l,v(a.ha,a,!0));a.c.subscribe("screenChange",v(function(){this.B("onlineScreenChange")},a))}
  279. function uq(a,b){var c=a.get(b.id);c?(c.uuid=b.uuid,b=c):((c=Ip(a.f,b.uuid))?(c.id=b.id,c.token=b.token,b=c):a.f.push(b),jp("yt-remote-automatic-screen-cache",Oa(a.f,Po)));yq(a);a.j[b.uuid]=b.id;jp("yt-remote-device-id-map",a.j,31536E3);return b}function yq(a){a.j=lp("yt-remote-device-id-map")||{}}W.prototype.dispose=W.prototype.dispose;function zq(a,b,c){zo.call(this);this.R=c;this.H=a;this.e=b;this.f=null}z(zq,zo);function Aq(a,b){a.f=b;a.B("sessionScreen",a.f)}g=zq.prototype;g.ba=function(a){this.K()||(a&&this.warn(""+a),this.f=null,this.B("sessionScreen",null))};g.info=function(a){Jo(this.R,a)};g.warn=function(a){Jo(this.R,a)};g.pd=function(){return null};
  280. g.nc=function(a){var b=this.e;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.F=function(){this.nc("");zq.G.F.call(this)};function Bq(a,b){zq.call(this,a,b,"CastSession");this.c=null;this.l=0;this.j=null;this.C=v(this.We,this);this.n=v(this.ve,this);this.l=K(v(function(){Cq(this,null)},this),12E4)}z(Bq,zq);g=Bq.prototype;
  281. g.mc=function(a){if(this.c){if(this.c==a)return;this.warn("Overriding cast sesison with new session object");this.c.removeUpdateListener(this.C);this.c.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.n)}this.c=a;this.c.addUpdateListener(this.C);this.c.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.n);this.j&&Dq(this);Eq(this,"getMdxSessionStatus")};g.hb=function(a){this.info("launchWithParams: "+df(a));this.j=a;this.c&&Dq(this)};
  282. g.stop=function(){this.c?this.c.stop(v(function(){this.ba()},this),v(function(){this.ba(Error("Failed to stop receiver app."))},this)):this.ba(Error("Stopping cast device witout session."))};g.nc=t;g.F=function(){this.info("disposeInternal");M(this.l);this.l=0;this.c&&(this.c.removeUpdateListener(this.C),this.c.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.n));this.c=null;Bq.G.F.call(this)};
  283. function Dq(a){var b=a.j.videoId||a.j.videoIds[a.j.index];b&&Eq(a,"flingVideo",{videoId:b,currentTime:a.j.currentTime||0});a.j=null}function Eq(a,b,c){a.info("sendYoutubeMessage_: "+b+" "+df(c));var d={};d.type=b;c&&(d.data=c);a.c?a.c.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: "+df(d))}
  284. g.ve=function(a,b){if(!this.K())if(b){var c=cf(b);if(c){var d=""+c.type,c=c.data||{};this.info("onYoutubeMessage_: "+d+" "+df(c));switch(d){case "mdxSessionStatus":Cq(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.")};
  285. function Cq(a,b){M(a.l);b?(a.info("onConnectedScreenId_: Received screenId: "+b),a.f&&a.f.id==b||tq(a.H,a.e.label,b,a.e.friendlyName,v(function(a){a?Aq(this,a):this.ba(Error("Unable to fetch screen."))},a),v(a.ba,a))):a.ba(Error("Waiting for session status timed out."))}g.pd=function(){return this.c};g.We=function(a){this.K()||a||(this.warn("Cast session died."),this.ba())};function Fq(a,b){zq.call(this,a,b,"DialSession");this.l=this.D=null;this.L="";this.j=null;this.C=t;this.n=NaN;this.Q=v(this.Ye,this);this.c=t}z(Fq,zq);g=Fq.prototype;g.mc=function(a){this.l=a;this.l.addUpdateListener(this.Q)};g.hb=function(a){this.j=a;this.C()};g.stop=function(){this.c();this.c=t;M(this.n);this.l?this.l.stop(v(this.ba,this,null),v(this.ba,this,"Failed to stop DIAL device.")):this.ba()};
  286. g.F=function(){this.c();this.c=t;M(this.n);this.l&&this.l.removeUpdateListener(this.Q);this.l=null;Fq.G.F.call(this)};function Gq(a){a.c=a.H.nd(a.L,a.e.label,a.e.friendlyName,v(function(a){this.c=t;Aq(this,a)},a),v(function(a){this.c=t;this.ba(a)},a))}g.Ye=function(a){this.K()||a||(this.warn("DIAL session died."),this.c(),this.c=t,this.ba())};
  287. function Hq(a){var b={};b.pairingCode=a.L;if(a.j){var c=a.j.index||0,d=a.j.currentTime||0;b.v=a.j.videoId||a.j.videoIds[c];b.t=d}gq()&&(b.env_useStageMdx=1);return vf(b)}g.fc=function(a){this.L=Cp();if(this.j){var b=new chrome.cast.DialLaunchResponse(!0,Hq(this));a(b);Gq(this)}else this.C=v(function(){M(this.n);this.C=t;this.n=NaN;var b=new chrome.cast.DialLaunchResponse(!0,Hq(this));a(b);Gq(this)},this),this.n=K(v(function(){this.C()},this),100)};
  288. g.Ld=function(a,b){tq(this.H,this.D.receiver.label,a,this.e.friendlyName,v(function(a){a&&a.token?(Aq(this,a),b(new chrome.cast.DialLaunchResponse(!1))):this.fc(b)},this),v(function(a){this.warn("Failed to get DIAL screen: "+a);this.fc(b)},this))};function Iq(a,b){zq.call(this,a,b,"ManualSession");this.c=K(v(this.hb,this,null),150)}z(Iq,zq);Iq.prototype.stop=function(){this.ba()};Iq.prototype.mc=t;Iq.prototype.hb=function(){M(this.c);this.c=NaN;var a=Ip(this.H.ha(),this.e.label);a?Aq(this,a):this.ba(Error("No such screen"))};Iq.prototype.F=function(){M(this.c);this.c=NaN;Iq.G.F.call(this)};function Jq(a){zo.call(this);this.e=a;this.c=null;this.l=!1;this.f=[];this.j=v(this.le,this)}z(Jq,zo);g=Jq.prototype;
  289. 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.Uc,this),v(this.me,this),d,e);c.customDialLaunchCallback=v(this.Xd,this);chrome.cast.initialize(c,v(function(){this.K()||(chrome.cast.addReceiverActionListener(this.j),
  290. Go(Kq),this.e.subscribe("onlineScreenChange",v(this.od,this)),this.f=Lq(this),chrome.cast.setCustomReceivers(this.f,t,v(function(a){this.M("Failed to set initial custom receivers: "+df(a))},this)),this.B("yt-remote-cast2-availability-change",Mq(this)),b(!0))},this),function(a){this.M("Failed to initialize API: "+df(a));b(!1)})};
  291. g.De=function(a,b){Nq("Setting connected screen ID: "+a+" -> "+b);if(this.c){var c=this.c.f;if(!a||c&&c.id!=a)Nq("Unsetting old screen status: "+this.c.e.friendlyName),$b(this.c),this.c=null}if(a&&b){if(!this.c){c=Ip(this.e.ha(),a);if(!c){Nq("setConnectedScreenStatus: Unknown screen.");return}var d=Oq(this,c);d||(Nq("setConnectedScreenStatus: Connected receiver not custom..."),d=new chrome.cast.Receiver(c.uuid?c.uuid:c.id,c.name),d.receiverType=chrome.cast.ReceiverType.CUSTOM,this.f.push(d),chrome.cast.setCustomReceivers(this.f,
  292. t,v(function(a){this.M("Failed to set initial custom receivers: "+df(a))},this)));Nq("setConnectedScreenStatus: new active receiver: "+d.friendlyName);Pq(this,new Iq(this.e,d),!0)}this.c.nc(b)}else Nq("setConnectedScreenStatus: no screen.")};function Oq(a,b){return b?Sa(a.f,function(a){return No(b,a.label)},a):null}g.Ee=function(a){this.K()?this.M("Setting connection data on disposed cast v2"):this.c?this.c.hb(a):this.M("Setting connection data without a session")};
  293. g.stopSession=function(){this.K()?this.M("Stopping session on disposed cast v2"):this.c?(this.c.stop(),$b(this.c),this.c=null):Nq("Stopping non-existing session")};g.requestSession=function(){chrome.cast.requestSession(v(this.Uc,this),v(this.pe,this))};g.F=function(){this.e.lb("onlineScreenChange",v(this.od,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.j);var a=Kq,b=r("yt.mdx.remote.debug.handlers_");Za(b||[],a);$b(this.c);Jq.G.F.call(this)};
  294. function Nq(a){Jo("Controller",a)}g.M=function(a){Jo("Controller",a)};function Kq(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)}function Mq(a){return a.l||!!a.f.length||!!a.c}function Pq(a,b,c){$b(a.c);(a.c=b)?(c?a.B("yt-remote-cast2-receiver-resumed",b.e):a.B("yt-remote-cast2-receiver-selected",b.e),b.subscribe("sessionScreen",v(a.Vc,a,b)),b.f?a.B("yt-remote-cast2-session-change",b.f):c&&a.c.hb(null)):a.B("yt-remote-cast2-session-change",null)}
  295. g.Vc=function(a,b){this.c==a&&(b||Pq(this,null),this.B("yt-remote-cast2-session-change",b))};
  296. g.le=function(a,b){if(!this.K())if(a)switch(Nq("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.c)if(this.c.e.label!=a.label)Nq("onReceiverAction_: Stopping active receiver: "+this.c.e.friendlyName),this.c.stop();else{Nq("onReceiverAction_: Casting to active receiver.");this.c.f&&this.B("yt-remote-cast2-session-change",this.c.f);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:Pq(this,new Iq(this.e,a));break;case chrome.cast.ReceiverType.DIAL:Pq(this,
  297. new Fq(this.e,a));break;case chrome.cast.ReceiverType.CAST:Pq(this,new Bq(this.e,a));break;default:this.M("Unknown receiver type: "+a.receiverType);return}break;case chrome.cast.ReceiverAction.STOP:this.c&&this.c.e.label==a.label?this.c.stop():this.M("Stopping receiver w/o session: "+a.friendlyName)}else this.M("onReceiverAction_ called without receiver.")};
  298. g.Xd=function(a){if(this.K())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.c?this.c.e: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.c.f)return Nq("Reselecting dial screen."),
  299. this.B("yt-remote-cast2-session-change",this.c.f),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.M('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+b.friendlyName);Pq(this,new Fq(this.e,b))}b=this.c;b.D=a;return b.D.appState==chrome.cast.DialAppState.RUNNING?new Promise(v(b.Ld,b,(b.D.extraData||{}).screenId||null)):new Promise(v(b.fc,b))};
  300. g.Uc=function(a){if(!this.K()){Nq("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.c)if(b.receiverType==chrome.cast.ReceiverType.CAST)Nq("Got resumed cast session before resumed mdx connection."),Pq(this,new Bq(this.e,b),!0);else{this.M("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var c=this.c.e,d=Ip(this.e.ha(),c.label);d&&No(d,b.label)&&c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==
  301. chrome.cast.ReceiverType.CAST&&(Nq("onSessionEstablished_: manual to cast session change "+b.friendlyName),$b(this.c),this.c=new Bq(this.e,b),this.c.subscribe("sessionScreen",v(this.Vc,this,this.c)),this.c.hb(null));this.c.mc(a)}}};g.Xe=function(){return this.c?this.c.pd():null};g.pe=function(a){this.K()||(this.M("Failed to estabilish a session: "+df(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&Pq(this,null))};
  302. g.me=function(a){Nq("Receiver availability updated: "+a);if(!this.K()){var b=Mq(this);this.l=a==chrome.cast.ReceiverAvailability.AVAILABLE;Mq(this)!=b&&this.B("yt-remote-cast2-availability-change",Mq(this))}};
  303. function Lq(a){var b=a.e.md(),c=a.c&&a.c.e;a=Oa(b,function(a){c&&No(a,c.label)&&(c=null);var b=a.uuid?a.uuid:a.id,f=Oq(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}
  304. g.od=function(){if(!this.K()){var a=Mq(this);this.f=Lq(this);Nq("Updating custom receivers: "+df(this.f));chrome.cast.setCustomReceivers(this.f,t,v(function(){this.M("Failed to set custom receivers.")},this));var b=Mq(this);b!=a&&this.B("yt-remote-cast2-availability-change",b)}};Jq.prototype.setLaunchParams=Jq.prototype.Ee;Jq.prototype.setConnectedScreenStatus=Jq.prototype.De;Jq.prototype.stopSession=Jq.prototype.stopSession;Jq.prototype.getCastSession=Jq.prototype.Xe;
  305. Jq.prototype.requestSession=Jq.prototype.requestSession;Jq.prototype.init=Jq.prototype.init;Jq.prototype.dispose=Jq.prototype.dispose;function Qq(a,b,c){Rq()?Tq(a)&&(Uq(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?Vq(b):c?(window.__onGCastApiAvailable=function(a,c){Wq(b,a,c)},tc("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js")):tp(function(a,c){Wq(b,a,c)})):Sq("Cannot initialize because not running Chrome")}function Xq(){Sq("dispose");vp();var a=Yq();a&&a.dispose();Zq=null;q("yt.mdx.remote.cloudview.instance_",null,void 0);$q(!1);pc(ar);ar.length=0}
  306. function br(){Sq("clearCurrentReciever");mp("yt-remote-cast-receiver")}function cr(){return lp("yt-remote-cast-installed")?Yq()?Zq.getCastSession():(dr("getCastSelector: Cast is not initialized."),null):(dr("getCastSelector: Cast API is not installed!"),null)}function er(a,b){fr()?Yq().setConnectedScreenStatus(a,b):dr("setConnectedScreenStatus called before ready.")}var Zq=null;function Rq(){var a;a=0<=Kc.search(/\ (CrMo|Chrome|CriOS)\//);return zi||a}
  307. function Wq(a,b,c){b?Vq(a):(dr("Failed to load cast API: "+c),gr(!1),Uq(!1),mp("yt-remote-cast-available"),mp("yt-remote-cast-receiver"),Xq(),a(!1))}function hr(a){Zq.init(!1,a)}
  308. function Tq(a){var b=!1;if(!Zq){var c=r("yt.mdx.remote.cloudview.instance_");c||(c=new Jq(a),c.subscribe("yt-remote-cast2-availability-change",function(a){jp("yt-remote-cast-available",a);O("yt-remote-cast2-availability-change",a)}),c.subscribe("yt-remote-cast2-receiver-selected",function(a){Sq("onReceiverSelected: "+a.friendlyName);jp("yt-remote-cast-receiver",a);O("yt-remote-cast2-receiver-selected",a)}),c.subscribe("yt-remote-cast2-receiver-resumed",function(a){Sq("onReceiverResumed: "+a.friendlyName);
  309. jp("yt-remote-cast-receiver",a)}),c.subscribe("yt-remote-cast2-session-change",function(a){Sq("onSessionChange: "+So(a));a||mp("yt-remote-cast-receiver");O("yt-remote-cast2-session-change",a)}),q("yt.mdx.remote.cloudview.instance_",c,void 0),b=!0);Zq=c}Sq("cloudview.createSingleton_: "+b);return b}function Yq(){Zq||(Zq=r("yt.mdx.remote.cloudview.instance_"));return Zq}
  310. function Vq(a){gr(!0);Uq(!1);hr(function(b){b?($q(!0),O("yt-remote-cast2-api-ready")):(dr("Failed to initialize cast API."),gr(!1),mp("yt-remote-cast-available"),mp("yt-remote-cast-receiver"),Xq());a(b)})}function Sq(a){Jo("cloudview",a)}function dr(a){Jo("cloudview",a)}function gr(a){Sq("setCastInstalled_ "+a);jp("yt-remote-cast-installed",a)}function fr(){return!!r("yt.mdx.remote.cloudview.apiReady_")}function $q(a){Sq("setApiReady_ "+a);q("yt.mdx.remote.cloudview.apiReady_",a,void 0)}
  311. function Uq(a){q("yt.mdx.remote.cloudview.initializing_",a,void 0)}var ar=[];function ir(a){this.reset(a)}function jr(a,b){if(a.e)throw Error(b+" is not allowed in V3.");}function kr(a){a.volume=-1;a.f=!1;a.j=null;a.c=-1;a.k=null;a.l=0;a.n=y()}g=ir.prototype;g.reset=function(a){this.videoIds=[];this.e="";lr(this);a&&(this.videoIds=a.videoIds,this.index=a.index,this.e=a.listId,this.videoId=a.videoId,this.c=a.playerState,this.k=a.errorReason,this.volume=a.volume,this.f=a.muted,this.j=a.trackData,this.l=a.playerTime,this.n=a.playerTimeAt)};
  312. function lr(a){a.index=-1;a.videoId="";kr(a)}function mr(a){return a.e?a.videoId:a.videoIds[a.index]}function nr(a,b){a.l=b;a.n=y()}function or(a){switch(a.c){case 1:return(y()-a.n)/1E3+a.l;case -1E3:return 0}return a.l}g.setVideoId=function(a){jr(this,"setVideoId");var b=this.index;this.index=La(this.videoIds,a);b!=this.index&&kr(this);return-1!=b};function pr(a,b,c){var d=a.videoId;a.videoId=b;a.index=c;b!=d&&kr(a)}
  313. function qr(a,b,c){jr(a,"setPlaylist");c=c||mr(a);gb(a.videoIds,b)&&c==mr(a)||(a.videoIds=cb(b),a.setVideoId(c))}g.add=function(a){jr(this,"add");return a&&!Ua(this.videoIds,a)?(this.videoIds.push(a),!0):!1};g.remove=function(a){jr(this,"remove");var b=mr(this);return Za(this.videoIds,a)?(this.index=La(this.videoIds,b),!0):!1};
  314. function rr(a){var b={};b.videoIds=cb(a.videoIds);b.index=a.index;b.listId=a.e;b.videoId=a.videoId;b.playerState=a.c;b.errorReason=a.k;b.volume=a.volume;b.muted=a.f;b.trackData=Cb(a.j);b.playerTime=a.l;b.playerTimeAt=a.n;return b}g.clone=function(){return new ir(rr(this))};function sr(a,b){zo.call(this);this.c=0;this.j=a;this.C=[];this.n=new Ao;this.l=NaN;this.f=this.e=null;this.L=v(this.Pd,this);this.D=v(this.vb,this);this.H=v(this.Od,this);var c=0;a?(c=a.getProxyState(),3!=c&&(a.subscribe("proxyStateChange",this.pc,this),tr(this))):c=3;0!=c&&(b?this.pc(c):K(v(function(){this.pc(c)},this),0));ur(this,cr())}z(sr,zo);function vr(a){return new ir(a.j.getPlayerContextData())}g=sr.prototype;
  315. g.play=function(){1==this.c?(this.e?this.e.play(null,t,v(function(){this.M("Failed to play video with cast v2 channel.");wr(this,"play")},this)):wr(this,"play"),xr(this,1,or(vr(this))),yr(this)):zr(this,this.play)};g.pause=function(){1==this.c?(this.e?this.e.pause(null,t,v(function(){this.M("Failed to pause video with cast v2 channel.");wr(this,"pause")},this)):wr(this,"pause"),xr(this,2,or(vr(this))),yr(this)):zr(this,this.pause)};
  316. g.stop=function(){if(1==this.c){this.e?this.e.stop(null,t,v(function(){this.M("Failed to stop video with cast v2 channel.");wr(this,"stopVideo")},this)):wr(this,"stopVideo");var a=vr(this);lr(a);Ar(this,a);yr(this)}else zr(this,this.stop)};g.yc=function(a){1==this.c?wr(this,"addVideos",{listId:a}):zr(this,w(this.yc,a))};g.ed=function(a){if(1==this.c){wr(this,"removeVideo",{videoId:a});var b=vr(this);b.e||(b.remove(a),Ar(this,b))}else zr(this,w(this.ed,a))};
  317. g.Pc=function(a,b,c){1==this.c?wr(this,"moveVideo",{videoId:a,delta:(b>=c?c:c-1)-b}):zr(this,w(this.Pc,a,b,c))};g.Lc=function(a){1==this.c?wr(this,"insertVideo",{videoId:a}):zr(this,w(this.Lc,a))};function Br(a,b,c,d,e){var f=vr(a);d=d||0;var h={videoId:b,currentIndex:d,listId:e||f.e};pr(f,b,d);p(c)&&(nr(f,c),h.currentTime=c);wr(a,"setPlaylist",h);e||Ar(a,f)}g.bd=function(a,b){if(1==this.c){var c=vr(this);pr(c,a,b);wr(this,"previous");Ar(this,c)}else zr(this,w(this.bd,a,b))};
  318. g.ld=function(a,b){if(1==this.c){var c=vr(this);pr(c,a,b);wr(this,"next");Ar(this,c)}else zr(this,w(this.ld,a,b))};g.Fc=function(){if(1==this.c){wr(this,"clearPlaylist");var a=vr(this);a.reset();Ar(this,a);yr(this)}else zr(this,this.Fc)};g.dispose=function(){if(3!=this.c){var a=this.c;this.c=3;this.B("proxyStateChange",a,this.c)}sr.G.dispose.call(this)};g.F=function(){M(this.l);this.l=NaN;Cr(this);this.j=null;this.n.clear();ur(this,null);sr.G.F.call(this)};
  319. function tr(a){A(["remotePlayerChange","remoteQueueChange"],function(a){this.C.push(this.j.subscribe(a,w(this.ee,a),this))},a)}function Cr(a){A(a.C,function(a){this.j.unsubscribeByKey(a)},a);a.C.length=0}function zr(a,b){50>a.n.W()&&a.n.e.push(b)}function xr(a,b,c){var d=vr(a);nr(d,c);-1E3!=d.c&&(d.c=b);Ar(a,d)}function wr(a,b,c){a.j.sendMessage(b,c)}function Ar(a,b){Cr(a);a.j.setPlayerContextData(rr(b));tr(a)}
  320. g.pc=function(a){if((a!=this.c||2==a)&&3!=this.c&&0!=a){var b=this.c;this.c=a;this.B("proxyStateChange",b,a);if(1==a)for(;!this.n.isEmpty();)b=a=this.n,Va(b.c)&&(b.c=b.e,b.c.reverse(),b.e=[]),a.c.pop().apply(this);else 3==a&&this.dispose()}};function yr(a){M(a.l);a.l=K(v(function(){this.B("remotePlayerChange");this.l=NaN},a),2E3)}g.ee=function(a){("remotePlayerChange"!=a||isNaN(this.l))&&this.B(a)};
  321. function ur(a,b){a.f&&(a.f.removeUpdateListener(a.L),a.f.removeMediaListener(a.D),a.vb(null));a.f=b;a.f&&(Jo("CP","Setting cast session: "+a.f.sessionId),a.f.addUpdateListener(a.L),a.f.addMediaListener(a.D),a.f.media.length&&a.vb(a.f.media[0]))}
  322. g.Pd=function(a){if(!a)this.vb(null),ur(this,null);else if(this.f.receiver.volume){a=this.f.receiver.volume;var b=vr(this);if(b.volume!=a.level||b.f!=a.muted)Jo("CP","Cast volume update: "+a.level+(a.muted?" muted":"")),b.volume=Math.round(100*a.level||0),b.f=!!a.muted,Ar(this,b),yr(this)}};g.vb=function(a){Jo("CP","Cast media: "+!!a);this.e&&this.e.removeUpdateListener(this.H);if(this.e=a)this.e.addUpdateListener(this.H),Dr(this),yr(this)};
  323. function Dr(a){var b=a.e.customData;if(a.e.media){var c=a.e.media,d=vr(a);c.contentId!=d.videoId&&Jo("CP","Cast changing video to: "+c.contentId);d.videoId=c.contentId;d.c=b.playerState;nr(d,a.e.getEstimatedTime());Ar(a,d)}else Jo("CP","No cast media video. Ignoring state update.")}g.Od=function(a){a?(Dr(this),yr(this)):this.vb(null)};g.M=function(a){Jo("CP",a)};function X(a,b,c){zo.call(this);this.V=a;this.C=[];this.C.push(T(window,"beforeunload",v(this.Fd,this)));this.e=[];this.A=new ir;3==c["mdx-version"]&&(this.A.e="RQ"+b.token);this.D=b.id;this.c=Er(this,c);this.c.subscribe("handlerOpened",this.Ud,this);this.c.subscribe("handlerClosed",this.Qd,this);this.c.subscribe("handlerError",this.Rd,this);this.A.e?this.c.subscribe("handlerMessage",this.Sd,this):this.c.subscribe("handlerMessage",this.Td,this);yo(this.c,b.token);this.subscribe("remoteQueueChange",
  324. function(){var a=this.A.videoId;Tp()&&jp("yt-remote-session-video-id",a)},this)}z(X,zo);g=X.prototype;g.pb=NaN;g.kc=!1;g.Pb=NaN;g.jc=NaN;g.Cb=NaN;g.Ib=NaN;
  325. function Fr(a,b){var c=r("yt.mdx.remote.connectData_");if(c){if(a.A.e){var d=c.listId,e=c.videoId,f=c.index,c=c.currentTime||0;5>=c&&(c=0);h={videoId:e,currentTime:c};d&&(h.listId=d);p(f)&&(h.currentIndex=f);d&&(a.A.e=d);a.A.videoId=e;a.A.index=f||0}else{var e=c.videoIds[c.index],c=c.currentTime||0;5>=c&&(c=0);var h={videoIds:e,videoId:e,currentTime:c};a.A.videoIds=[e];a.A.index=0}a.A.state=3;nr(a.A,c);a.J("Connecting with setPlaylist and params: "+df(h));xo(a.c,{method:"setPlaylist",params:df(h)},
  326. b,Xp())}else a.J("Connecting without params"),xo(a.c,{},b,Xp());Gr(a)}g.dispose=function(){this.K()||(this.B("beforeDispose"),Hr(this,3));X.G.dispose.call(this)};g.F=function(){Ir(this);Jr(this);Kr(this);M(this.Cb);this.Cb=NaN;M(this.Ib);this.Ib=NaN;this.j=null;Ee(this.C);this.C.length=0;this.c.dispose();X.G.F.call(this);this.e=this.A=this.c=null};g.J=function(a){Jo("conn",a)};g.Fd=function(){this.f(2)};function Er(a,b){return new uo(xp(a.V,"/bc",void 0,!1),b)}
  327. function Hr(a,b){a.B("proxyStateChange",b)}function Gr(a){a.pb=K(v(function(){this.J("Connecting timeout");this.f(1)},a),2E4)}function Ir(a){M(a.pb);a.pb=NaN}function Kr(a){M(a.Pb);a.Pb=NaN}function Lr(a){Jr(a);a.jc=K(v(function(){Mr(this,"getNowPlaying")},a),2E4)}function Jr(a){M(a.jc);a.jc=NaN}function Nr(a){var b=a.c;return!!b.c&&3==b.c.c&&isNaN(a.pb)}
  328. g.Ud=function(){this.J("Channel opened");this.kc&&(this.kc=!1,Kr(this),this.Pb=K(v(function(){this.J("Timing out waiting for a screen.");this.f(1)},this),15E3));eq(wo(this.c),this.D)};g.Qd=function(){this.J("Channel closed");isNaN(this.pb)?fq(!0):fq();this.dispose()};g.Rd=function(a){fq();isNaN(this.l())?(this.J("Channel error: "+a+" without reconnection"),this.dispose()):(this.kc=!0,this.J("Channel error: "+a+" with reconnection in "+this.l()+" ms"),Hr(this,2))};
  329. function Or(a,b){b&&(Ir(a),Kr(a));b==Nr(a)?b&&(Hr(a,1),Mr(a,"getSubtitlesTrack")):b?(a.n()&&a.A.reset(),Hr(a,1),Mr(a,"getNowPlaying"),Pr(a)):a.f(1)}function Qr(a,b){var c=b.params.videoId;delete b.params.videoId;c==a.A.videoId&&(zb(b.params)?a.A.j=null:a.A.j=b.params,a.B("remotePlayerChange"))}function Rr(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10);a.A.e=b.params.listId||a.A.e;pr(a.A,c,d);a.B("remoteQueueChange")}
  330. function Sr(a,b){b.params=b.params||{};Rr(a,b);Tr(a,b)}function Tr(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10);nr(a.A,isNaN(c)?0:c);c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;-1==c&&-1E3==a.A.c&&(c=-1E3);a.A.c=c;var d=null;-1E3==c&&(d=a.A.k||"unknown",p(b.params.currentError)&&(d=bf(b.params.currentError).reason||d));a.A.k=d;1==a.A.c?Lr(a):Jr(a);a.B("remotePlayerChange")}
  331. function Ur(a,b){var c="true"==b.params.muted;a.A.volume=parseInt(b.params.volume,10);a.A.f=c;a.B("remotePlayerChange")}
  332. g.Sd=function(a){a.params?this.J("Received: action="+a.action+", params="+df(a.params)):this.J("Received: action="+a.action+" {}");switch(a.action){case "loungeStatus":a=bf(a.params.devices);this.e=Oa(a,function(a){return new sm(a)});a=!!Sa(this.e,function(a){return"LOUNGE_SCREEN"==a.type});Or(this,a);break;case "loungeScreenConnected":Or(this,!0);break;case "loungeScreenDisconnected":ab(this.e,function(a){return"LOUNGE_SCREEN"==a.type});Or(this,!1);break;case "remoteConnected":var b=new sm(bf(a.params.device));
  333. Sa(this.e,function(a){return a.equals(b)})||Ya(this.e,b);break;case "remoteDisconnected":b=new sm(bf(a.params.device));ab(this.e,function(a){return a.equals(b)});break;case "gracefulDisconnect":break;case "playlistModified":Rr(this,a);break;case "nowPlaying":Sr(this,a);break;case "onStateChange":Tr(this,a);break;case "onVolumeChanged":Ur(this,a);break;case "onSubtitlesTrackChanged":Qr(this,a);break;default:this.J("Unrecognized action: "+a.action)}};
  334. g.Td=function(a){a.params?this.J("Received: action="+a.action+", params="+df(a.params)):this.J("Received: action="+a.action);Vr(this,a);Wr(this,a);if(Nr(this)){var b=this.A.clone(),c=!1,d,e,f,h,k,l,n;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,p(a.params.currentError)&&(n=bf(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==mr(this.A)&&(delete a.params.videoId,
  335. zb(a.params)?this.A.j=null:this.A.j=a.params,this.B("remotePlayerChange"));else if(mr(this.A)||"onStateChange"!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d||(d=mr(this.A)):this.A.setVideoId(""),e&&(e=e.split(","),qr(this.A,e,d))):qr(this.A,[]),this.A.add(d)&&Mr(this,"getPlaylist"),d&&this.A.setVideoId(d),b.index==this.A.index&&gb(b.videoIds,this.A.videoIds)||this.B("remoteQueueChange"),p(f)&&(b=parseInt(f,10),
  336. b=isNaN(b)?-1:b,-1==b&&-1E3==this.A.c&&(b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.A.c,this.A.c=b,d=null,-1E3==b&&(d=this.A.k||"unknown",n&&(d=n.reason||d)),c=c||this.A.k!=d,this.A.k=d,1==this.A.c?Lr(this):Jr(this)),"onError"!=a.action||-1!=this.A.c&&-1E3!=this.A.c||(a=bf(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==mr(this.A)&&(this.A.c=-1E3,this.A.k=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),nr(this.A,isNaN(b)?0:b),c=!0),p(k)&&(b=parseInt(k,10),isNaN(b)||(c=
  337. c||this.A.volume!=b,this.A.volume=b),p(l)&&(l="true"==l,c=c||this.A.f!=l,this.A.f=l)),c&&this.B("remotePlayerChange")}};
  338. function Vr(a,b){switch(b.action){case "loungeStatus":var c=bf(b.params.devices);a.e=Oa(c,function(a){return new sm(a)});break;case "loungeScreenDisconnected":ab(a.e,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new sm(bf(b.params.device));Sa(a.e,function(a){return a.equals(d)})||Ya(a.e,d);break;case "remoteDisconnected":d=new sm(bf(b.params.device)),ab(a.e,function(a){return a.equals(d)})}}
  339. function Wr(a,b){var c=!1;if("loungeStatus"==b.action)c=!!Sa(a.e,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.Pb))if(c)Kr(a);else return;c==Nr(a)?c&&Hr(a,1):c?(Ir(a),a.n()&&a.A.reset(),Hr(a,1),Mr(a,"getNowPlaying"),Pr(a)):a.f(1)}g.Ce=function(){if(this.j){var a=this.j;this.j=null;this.A.videoId!=a&&Mr(this,"getNowPlaying")}};X.prototype.subscribe=X.prototype.subscribe;
  340. X.prototype.unsubscribeByKey=X.prototype.qa;X.prototype.Q=function(){var a=3;this.K()||(a=0,isNaN(this.l())?Nr(this)&&(a=1):a=2);return a};X.prototype.getProxyState=X.prototype.Q;X.prototype.f=function(a){this.J("Disconnecting with "+a);Ir(this);this.B("beforeDisconnect",a);1==a&&fq();vo(this.c,a);this.dispose()};X.prototype.disconnect=X.prototype.f;X.prototype.L=function(){var a=this.A;this.j&&(a=this.A.clone(),pr(a,this.j,a.index));return rr(a)};X.prototype.getPlayerContextData=X.prototype.L;
  341. X.prototype.ga=function(a){var b=new ir(a);b.videoId&&b.videoId!=this.A.videoId&&(this.j=b.videoId,M(this.Cb),this.Cb=K(v(this.Ce,this),5E3));var c=[];this.A.e==b.e&&this.A.videoId==b.videoId&&this.A.index==b.index&&gb(this.A.videoIds,b.videoIds)||c.push("remoteQueueChange");this.A.c==b.c&&this.A.volume==b.volume&&this.A.f==b.f&&or(this.A)==or(b)&&df(this.A.j)==df(b.j)||c.push("remotePlayerChange");this.A.reset(a);A(c,function(a){this.B(a)},this)};X.prototype.setPlayerContextData=X.prototype.ga;
  342. X.prototype.H=function(){return this.c.k.loungeIdToken};X.prototype.getLoungeToken=X.prototype.H;X.prototype.n=function(){var a=this.c.k.id,b=Sa(this.e,function(b){return"REMOTE_CONTROL"==b.type&&b.id!=a});return b?b.id:""};X.prototype.getOtherConnectedRemoteId=X.prototype.n;X.prototype.l=function(){var a=this.c;return a.e.enabled?a.e.j-y():NaN};X.prototype.getReconnectTimeout=X.prototype.l;X.prototype.ca=function(){if(!isNaN(this.l())){var a=this.c.e;a.enabled&&(a.stop(),a.start(),a.l())}};
  343. X.prototype.reconnect=X.prototype.ca;function Pr(a){M(a.Ib);a.Ib=K(v(a.f,a,1),864E5)}function Mr(a,b,c){c?a.J("Sending: action="+b+", params="+df(c)):a.J("Sending: action="+b);a=a.c;b={_sc:b};c&&Eb(b,c);a.e.enabled||2==(a.c?a.c.c:0)?a.n.push(b):a.c&&3==a.c.c&&jo(a.c,b)}X.prototype.R=function(a,b){Mr(this,a,b);Pr(this)};X.prototype.sendMessage=X.prototype.R;function Xr(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function Yr(a){Jo("CAST",a)}function Zr(a){var b=$r();b&&b.logMessage&&b.logMessage(a)}
  344. function as(){if(!r("yt.mdx.remote.castv2_")&&!bs&&(Va(Xa)&&db(Xa,lp("yt-remote-online-dial-devices")||[]),Xr())){var a=$r();a?(a.removeReceiverListener("YouTube",cs),a.addReceiverListener("YouTube",cs),Yr("API initialized in the other binary")):(a=new cast.Api,q("yt.mdx.remote.castapi.api_",a,void 0),a.addReceiverListener("YouTube",cs),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){K(function(){window.location.reload(!0)},1E3)}),Go(Zr),Yr("API initialized"));bs=!0}}
  345. function ds(a){var b=Ta(Xa,function(b){return b.id==a.id});0<=b&&(Xa[b]=Ap(a))}function cs(a){a.length&&Yr("Updating receivers: "+df(a));es(a);O("yt-remote-cast-device-list-update");A(fs(),function(a){gs(a.id)});A(a,function(a){if(a.isTabProjected){var c=hs(a.id);Yr("Detected device: "+c.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event.");K(function(){O("yt-remote-cast-device-tab-projected",c.id)},1E3)}})}
  346. function is(a,b){Yr("Updating "+a+" activity status: "+df(b));var c=hs(a);c?(b.activityId&&(c.activityId=b.activityId),c.status="running"==b.status?"RUNNING":"stopped"==b.status?"STOPPED":"error"==b.status?"ERROR":"UNKNOWN","RUNNING"!=c.status&&(c.activityId=""),ds(c),O("yt-remote-cast-device-status-update",c)):Yr("Device not found")}function fs(){as();return Ep()}
  347. function es(a){a=Oa(a,function(a){var c=a.id,d;d=a.name;d=-1!=d.indexOf("&")?"document"in m?Ba(d):Da(d):d;c={id:c,name:d};if(a=hs(a.id))c.activityId=a.activityId,c.status=a.status;return c});Wa();db(Xa,a)}function hs(a){var b=fs();return Sa(b,function(b){return b.id==a})||null}function gs(a){var b=hs(a),c=$r();c&&b&&b.activityId&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");is(a,b)})}
  348. function js(a){as();var b=hs(a),c=$r();c&&b&&b.activityId?(Yr("Stopping cast activity"),c.stopActivity(b.activityId,w(is,a))):Yr("Dropping cast activity stop")}function $r(){return r("yt.mdx.remote.castapi.api_")}var bs=!1,Xa=r("yt.mdx.remote.castapi.devices_")||[];q("yt.mdx.remote.castapi.devices_",Xa,void 0);function ks(a){zo.call(this);this.l=a;this.Da=ls();this.J("Initializing local screens: "+To(this.Da));this.f=ms();this.J("Initializing account screens: "+To(this.f));this.Yb=null;this.c=[];this.e=[];ns(this,fs()||[]);this.J("Initializing DIAL devices: "+Bp(this.e));a=Ro(cq());os(this,a);this.J("Initializing online screens: "+To(this.c));this.j=y()+3E5;ps(this)}z(ks,zo);g=ks.prototype;g.Gc=NaN;g.J=function(a){Jo("RM",a)};g.M=function(a){Jo("RM",a)};
  349. function ms(){var a=ls(),b=Ro(cq());return Na(b,function(b){return!Hp(a,b)})}function ls(){var a=Ro(Zp());return Na(a,function(a){return!a.uuid})}function ps(a){N("yt-remote-cast-device-list-update",function(){var a=fs();ns(this,a||[])},a);N("yt-remote-cast-device-status-update",a.Me,a);a.cd();var b=y()>a.j?2E4:1E4;ec(v(a.cd,a),b)}g.B=function(a,b){if(this.K())return!1;this.J("Firing "+a);return this.k.B.apply(this.k,arguments)};
  350. g.cd=function(){var a=fs()||[];Va(a)||ns(this,a);a=qs(this);Va(a)||(Qa(a,function(a){return!Hp(this.f,a)},this)&&aq()?rs(this):ss(this,a))};function ts(a,b){var c=qs(a);return Na(b,function(a){return a.uuid?(a=Gp(this.e,a.uuid),!!a&&"RUNNING"==a.status):!!Hp(c,a)},a)}
  351. function ns(a,b){var c=!1;A(b,function(a){var b=Ip(this.Da,a.id);b&&b.name!=a.name&&(this.J("Renaming screen id "+b.id+" from "+b.name+" to "+a.name),b.name=a.name,c=!0)},a);c&&(a.J("Renaming due to DIAL."),us(a));dq(Dp(b));var d=!gb(a.e,b,Fp);d&&a.J("Updating DIAL devices: "+Bp(a.e)+" to "+Bp(b));a.e=b;os(a,a.c);d&&a.B("onlineReceiverChange")}
  352. g.Me=function(a){var b=Gp(this.e,a.id);b&&(this.J("Updating DIAL device: "+b.id+"("+b.name+") from status: "+b.status+" to status: "+a.status+" and from activityId: "+b.activityId+" to activityId: "+a.activityId),b.activityId=a.activityId,b.status=a.status,dq(Dp(this.e)));os(this,this.c)};function os(a,b,c){var d=ts(a,b),e=!gb(a.c,d,Oo);if(e||c)Va(b)||bq(Oa(d,Po));e&&(a.J("Updating online screens: "+To(a.c)+" -> "+To(d)),a.c=d,a.B("onlineReceiverChange"))}
  353. function ss(a,b){var c=[],d={};A(b,function(a){a.token&&(d[a.token]=a,c.push(a.token))});var e={method:"POST",X:{lounge_token:c.join(",")},context:a,P:function(a,b){var c=[];A(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.Yb?vs(this,this.Yb):null;e&&!Hp(c,e)&&c.push(e);os(this,c,!0)}};Hf(xp(a.l,"/pairing/get_screen_availability"),e)}
  354. function rs(a){var b=qs(a),c=Oa(b,function(a){return a.id});Va(c)||(a.J("Updating lounge tokens for: "+df(c)),Hf(xp(a.l,"/pairing/get_lounge_token_batch"),{X:{screen_ids:c.join(",")},method:"POST",context:a,P:function(a,c){ws(this,c.screens||[]);this.Da=Na(this.Da,function(a){return!!a.token});us(this);ss(this,b)}}))}function ws(a,b){A(bb(a.Da,a.f),function(a){var d=Sa(b,function(b){return a.id==b.screenId});d&&(a.token=d.loungeToken)})}
  355. function us(a){var b=ls();gb(a.Da,b,Oo)||(a.J("Saving local screens: "+To(b)+" to "+To(a.Da)),Yp(Oa(a.Da,Po)),os(a,a.c,!0),ns(a,fs()||[]),a.B("managedScreenChange",qs(a)))}g.Ic=function(a,b){for(var c=qs(this),c=Oa(c,function(a){return a.name}),d=a,e=2;Ua(c,d);)d=b.call(m,e),e++;return d};function vs(a,b){var c=Ip(qs(a),b);a.J("Found screen: "+So(c)+" with key: "+b);return c}function qs(a){return bb(a.f,Na(a.Da,function(a){return!Hp(this.f,a)},a))};function xs(a){Jp.call(this,"ScreenServiceProxy");this.aa=a;this.c=[];this.c.push(this.aa.$_s("screenChange",v(this.Ue,this)));this.c.push(this.aa.$_s("onlineScreenChange",v(this.de,this)))}z(xs,Jp);g=xs.prototype;g.ha=function(a){return this.aa.$_gs(a)};g.contains=function(a){return!!this.aa.$_c(a)};g.get=function(a){return this.aa.$_g(a)};g.start=function(){this.aa.$_st()};g.add=function(a,b,c){this.aa.$_a(a,b,c)};g.remove=function(a,b,c){this.aa.$_r(a,b,c)};
  356. g.Rb=function(a,b,c,d){this.aa.$_un(a,b,c,d)};g.F=function(){for(var a=0,b=this.c.length;a<b;++a)this.aa.$_ubk(this.c[a]);this.c.length=0;this.aa=null;xs.G.F.call(this)};g.Ue=function(){this.B("screenChange")};g.de=function(){this.B("onlineScreenChange")};W.prototype.$_st=W.prototype.start;W.prototype.$_gspc=W.prototype.Ve;W.prototype.$_gsppc=W.prototype.nd;W.prototype.$_c=W.prototype.contains;W.prototype.$_g=W.prototype.get;W.prototype.$_a=W.prototype.add;W.prototype.$_un=W.prototype.Rb;
  357. W.prototype.$_r=W.prototype.remove;W.prototype.$_gs=W.prototype.ha;W.prototype.$_gos=W.prototype.md;W.prototype.$_s=W.prototype.subscribe;W.prototype.$_ubk=W.prototype.qa;function ys(a,b,c){a?q("yt.mdx.remote.castv2_",!0,void 0):as();ip&&hp();Qp();zs||(zs=new wp,gq()&&(zs.c="/api/loungedev"));As||a||(As=new ks(zs),As.subscribe("screenPair",Bs),As.subscribe("managedScreenChange",Cs),As.subscribe("onlineReceiverChange",function(){O("yt-remote-receiver-availability-change")}));Ds||(Ds=r("yt.mdx.remote.deferredProxies_")||[],q("yt.mdx.remote.deferredProxies_",Ds,void 0));Es(b);b=Fs();if(a&&!b){var d=new W(zs);q("yt.mdx.remote.screenService_",d,void 0);b=Fs();Qq(d,function(a){a?
  358. Gs()&&er(Gs(),"YouTube TV"):d.subscribe("onlineScreenChange",function(){O("yt-remote-receiver-availability-change")})},!(!c||!c.loadCastApiSetupScript))}if(c&&!r("yt.mdx.remote.initialized_")){q("yt.mdx.remote.initialized_",!0,void 0);Hs("Initializing: "+df(c));Is.push(N("yt-remote-cast2-availability-change",function(){O("yt-remote-receiver-availability-change")}));Is.push(N("yt-remote-cast2-receiver-selected",function(){Js();O("yt-remote-auto-connect","cast-selector-receiver")}));Is.push(N("yt-remote-cast2-session-change",
  359. Ks));Is.push(N("yt-remote-connection-change",function(a){a?er(Gs(),"YouTube TV"):Ls()||(er(null,null),br())}));var e=Ms();c.isAuto&&(e.id+="#dial");e.name=c.device;e.app=c.app;Hs(" -- with channel params: "+df(e));Ns(e);a&&b.start();Gs()||Os()}}function Ps(){var a=Gs();if(!a)return null;if(!As){var b=Fs().ha();return Ip(b,a)}return vs(As,a)}function Ks(a){Hs("remote.onCastSessionChange_: "+So(a));if(a){var b=Ps();b&&b.id==a.id?er(b.id,"YouTube TV"):(b&&Qs(),Rs(a,1))}else Qs()}
  360. function Qs(){if(As){var a=As;M(a.Gc);a.Gc=NaN}t:{if(a=Ss())if(a=a.getOtherConnectedRemoteId()){Hs("Do not stop DIAL due to "+a);Ts();break t}(a=r("yt.mdx.remote.currentDialId_"))?(Hs("Stopping DIAL: "+a),js(a),Ts()):(a=Ps())&&a.uuid&&(Hs("Stopping DIAL: "+a.uuid),js(a.uuid))}fr()?Yq().stopSession():dr("stopSession called before API ready.");(a=Ss())?a.disconnect(1):(qc("yt-remote-before-disconnect",1),qc("yt-remote-connection-change",!1));Us(null)}
  361. function Vs(){var a=Ss();return a&&3!=a.getProxyState()?new sr(a,void 0):null}function Hs(a){Jo("remote",a)}function Ws(){return r("yt.mdx.remote.screenService_")}function Fs(){if(!Xs){var a=Ws();Xs=a?new xs(a):null}return Xs}function Gs(){return r("yt.mdx.remote.currentScreenId_")}function Ys(a){q("yt.mdx.remote.currentScreenId_",a,void 0);if(As){var b=As;b.j=y()+3E5;if((b.Yb=a)&&(a=vs(b,a))&&!Hp(b.c,a)){var c=cb(b.c);c.push(a);os(b,c,!0)}}}
  362. function Ts(){q("yt.mdx.remote.currentDialId_","",void 0)}function Js(){q("yt.mdx.remote.connectData_",null,void 0)}function Ss(){return r("yt.mdx.remote.connection_")}function Us(a){var b=Ss();Js();a?Ja(!Ss()):(Ys(""),Ts());q("yt.mdx.remote.connection_",a,void 0);Ds&&(A(Ds,function(b){b(a)}),Ds.length=0);b&&!a?qc("yt-remote-connection-change",!1):!b&&a&&O("yt-remote-connection-change",!0)}function Ls(){var a=Tp();if(!a)return null;if(Ws()){var b=Fs().ha();return Ip(b,a)}return As?vs(As,a):null}
  363. function Rs(a,b){Ja(!Gs());Ys(a.id);var c=new X(zs,a,Ms());Fr(c,b);c.subscribe("beforeDisconnect",function(a){qc("yt-remote-before-disconnect",a)});c.subscribe("beforeDispose",function(){Ss()&&(Ss(),Us(null))});Us(c)}function Os(){var a=Ls();a?(Hs("Resume connection to: "+So(a)),Rs(a,0)):(fq(),br(),Hs("Skipping connecting because no session screen found."))}function Bs(a){Hs("Paired with: "+So(a));a?Rs(a,1):Us(null)}
  364. function Cs(){var a=Gs();a&&!Ps()&&(Hs("Dropping current screen with id: "+a),Qs());Ls()||fq()}var zs=null,Ds=null,Xs=null,As=null;function Es(a){var b=Ms();if(zb(b)){var b=Sp(),c=lp("yt-remote-session-name")||"",d=lp("yt-remote-session-app")||"",b={device:"REMOTE_CONTROL",id:b,name:c,app:d};a&&(b["mdx-version"]=3);q("yt.mdx.remote.channelParams_",b,void 0)}}function Ms(){return r("yt.mdx.remote.channelParams_")||{}}
  365. function Ns(a){a?(jp("yt-remote-session-app",a.app),jp("yt-remote-session-name",a.name)):(mp("yt-remote-session-app"),mp("yt-remote-session-name"));q("yt.mdx.remote.channelParams_",a,void 0)}var Is=[];function Zs(a){Dg.call(this);this.D={Kb:a.Kb,Jb:v(function(){Ih.getInstance().bb(this.ka());fa(a.Jb)&&a.Jb()},this)};this.k=this.f=null}z(Zs,Dg);Zs.prototype.ya=function(){Zs.G.ya.call(this);this.f=R(G(this.ka(),"dialog-id"));if(!this.f)throw Error("Cannot find create playlist widget dialog.");Ag(this).Ca(document,"click",this.n);var a=N("yt-uix-card-show",v(this.C,this));this.Oa.push(a);a=S("create-playlist-widget-form",this.f);this.k=new Bi(this.D);Bg(this.k,a)};
  366. Zs.prototype.za=function(){this.f=null;this.k.dispose();this.k=null;Zs.G.za.call(this)};Zs.prototype.n=function(a){Kd(this.f,He(a))||Ih.getInstance().bb(this.ka())};Zs.prototype.C=function(a){a==this.ka()&&zg(this.k,"title-input").focus()};function $s(){this.e={}}z($s,nh);ba($s);$s.prototype.c="scroller";$s.prototype.dispose=function(){for(var a in this.e){var b=this.e[a],c=this.T(b,"scroller-mousewheel-listener")||"";Ub(b,"scroller-mousewheel-listener","");var d=this.T(b,"scroller-scroll-listener")||"";Ub(b,"scroller-scroll-listener","");Ee(c);Ee(d);Ub(b,"scroller-scroll-listener","");b&&(b=ha(b).toString(),delete this.e[b])}this.e={}};function at(){nb(R("page-container"),"remote-connected",!!Y)};function bt(a){a=a||{};this.url=a.url||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||Bb(ct);this.assets=a.assets||{};this.attrs=a.attrs||Bb(dt);this.params=a.params||Bb(et);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 ct={enablejsapi:1},dt={},et={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
  367. function ft(a){a instanceof bt||(a=new bt(a));return a}bt.prototype.clone=function(){var a=new bt,b;for(b in this){var c=this[b];"object"==ca(c)?a[b]=Bb(c):a[b]=c}return a};function gt(){return!1}function ht(){return null};function it(a){this.c=a;a.then(v(function(){},this))}function jt(a,b,c,d){for(var e=Array(arguments.length-3),f=3;f<arguments.length;f++)e[f-3]=arguments[f];f=kt(a,b,c).then(function(a){return a.apply(this,e)});return new it(f)}var lt={};
  368. function kt(a,b,c){var d="https://www.gstatic.com/feedback/js/help/"+(a&&"prod"!=a&&"canary"!=a?"nonprod":"prod")+"/"+b;if(a=lt[c])return a;a=(a=r(c))?new Jm(Km,a):(new Jm(function(a,b){var c=document.createElement("script");c.async=!0;c.src=d;c.onload=c.onreadystatechange=function(){c.readyState&&"loaded"!=c.readyState&&"complete"!=c.readyState||a()};c.onerror=b;(document.head||document.getElementsByTagName("head")[0]).appendChild(c)})).then(function(){var a=r(c);if(!a)throw Error("Failed to load "+
  369. c+" from "+d);return a});return lt[c]=a}function mt(a,b,c){a.c.then(function(a){var e=a[b];if(!e)throw Error("Method not found: "+b);return e.apply(a,c)})};function nt(a){this.c=a}function ot(a,b){var c=b||{},c=jt("prod","service/lazy.min.js","help.service.Lazy.create",a,{apiKey:c.mf||c.apiKey,environment:c.pf||c.environment,helpCenterPath:c.sf||c.helpCenterPath,locale:c.locale||c.locale,productData:c.uf||c.productData,receiverUri:c.vf||c.receiverUri,theme:c.theme||c.theme,window:c.window||c.window});return new nt(c)}nt.prototype.e=function(a){mt(this.c,"startFeedback",arguments)};nt.prototype.f=function(a){mt(this.c,"startHelp",arguments)};var pt=!1;function qt(a){if(a=a.match(/[\d]+/g))a.length=3,a.join(".")}
  370. if(navigator.plugins&&navigator.plugins.length){var rt=navigator.plugins["Shockwave Flash"];rt&&(pt=!0,rt.description&&qt(rt.description));navigator.plugins["Shockwave Flash 2.0"]&&(pt=!0)}else if(navigator.mimeTypes&&navigator.mimeTypes.length){var st=navigator.mimeTypes["application/x-shockwave-flash"];(pt=st&&st.enabledPlugin)&&qt(st.enabledPlugin.description)}else try{var tt=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),pt=!0;qt(tt.GetVariable("$version"))}catch(ut){try{tt=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),
  371. pt=!0}catch(vt){try{tt=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),pt=!0,qt(tt.GetVariable("$version"))}catch(wt){}}};function xt(a){return(a=a.exec(Kc))?a[1]:""}(function(){if(vi)return xt(/Firefox\/([0-9.]+)/);if(Q||Sc)return Zc;if(zi)return xt(/Chrome\/([0-9.]+)/);if(Ai&&!(Rc()||P("iPad")||P("iPod")))return xt(/Version\/([0-9.]+)/);if(wi||xi){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Kc))return a[1]+"."+a[2]}else if(yi)return(a=xt(/Android\s+([0-9.]+)/))?a:xt(/Version\/([0-9.]+)/);return""})();function zt(){this.f=this.e=this.c=0;this.k="";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),
  372. 10)||0;a=[c,d,e]}else a=[0,0,0];this.k=b;b=a;this.c=b[0];this.e=b[1];this.f=b[2];if(0>=this.c){var h,k,l,n;if(ic)try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(x){h=null}else l=document.body,n=document.createElement("object"),n.setAttribute("type","application/x-shockwave-flash"),h=l.appendChild(n);if(h&&"GetVariable"in h)try{k=h.GetVariable("$version")}catch(J){k=""}l&&n&&l.removeChild(n);(h=k||"")?(h=h.split(" ")[1].split(","),h=[parseInt(h[0],10)||0,parseInt(h[1],10)||0,parseInt(h[2],
  373. 10)||0]):h=[0,0,0];this.c=h[0];this.e=h[1];this.f=h[2]}}ba(zt);zt.prototype.getVersion=function(){return[this.c,this.e,this.f]};function At(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.c>b[0]||a.c==b[0]&&a.e>b[1]||a.c==b[0]&&a.e==b[1]&&a.f>=b[2]}function Bt(a){return-1<a.k.indexOf("Gnash")&&-1==a.k.indexOf("AVM2")||9==a.c&&1==a.e||9==a.c&&0==a.e&&1==a.f?!1:9<=a.c}
  374. function Ct(a){return Wc?!At(a,11,2):Vc?!At(a,11,3):!Bt(a)};var Dt={};function Et(a,b){var c=I("FEEDBACK_LOCALE_LANGUAGE"),d=I("FEEDBACK_LOCALE_EXTRAS",{});a?Eb(Dt,a):Eb(Dt,d);try{var e,f=r("yt.player.getPlayerByElement");(e=f?f("player-api"):null)&&e.pauseVideo&&e.pauseVideo();var h=zt.getInstance();Dt.flashVersion=h.getVersion().join(".");e&&(Dt.playback_id=e.getVideoData().cpn)}catch(k){}b&&Eb(Dt,{trackingParam:b});return{helpCenterPath:"/youtube",locale:c,productData:Dt}}
  375. function Ft(){var a=I("SESSION_INDEX"),b=I("FEEDBACK_BUCKET_ID"),c={abuseLink:"https://support.google.com/youtube/bin/answer.py?answer=140536",customZIndex:"2000000005"};a&&(c.authuser=a+"");b&&(c.bucket=b);return c}function Gt(a,b){try{var c=(a||"59")+"",d=Et(b),e=Ft();ot(c,d).e(e);return!1}catch(f){return!0}}function Ht(a,b,c,d){var e;d=(d||"59")+"";c=Et(c,void 0);a={context:b,anchor:void 0,enableSendFeedback:!0,defaultHelpArticleId:a};Eb(a,Ft());try{ot(d,c).f(a),e=!1}catch(f){e=!0}return e};function It(a,b,c){if(b){a=u(a)?md(a):a;c=ft(c);var d=Bb(c.attrs);d.tabindex=0;var e=Bb(c.params);e.flashvars=vf(c.args);if(ic){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,
  376. d[f]);for(f in e)b.setAttribute(f,e[f])}e=document.createElement("div");e.appendChild(b);a.innerHTML=e.innerHTML}}
  377. function Jt(a,b,c){if(a&&a.attrs&&a.attrs.id){a=ft(a);var d=!!b,e=R(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);Bf(k)||(h=k)}else h="unknown";h&&(d=!0,a.args.framer=h)}h=zt.getInstance();if(At(h,a.minVersion)){var k=Kt(a,h),l="";-1<navigator.userAgent.indexOf("Sony/COM2")||(l=e.getAttribute("src")||e.movie);(l!=k||d)&&It(f,k,a);Ct(h)&&Lt()}else Mt(f,a,h);c&&c()}else K(function(){Jt(a,b,c)},50)}}
  378. function Mt(a,b,c){0==c.c&&b.fallback?b.fallback():0==c.c&&b.fallbackMessage?b.fallbackMessage():a.innerHTML='<div id="flash-upgrade">'+gc()+"</div>"}function Kt(a,b){return Bt(b)&&a.url||(-1<navigator.userAgent.indexOf("Sony/COM2")&&!At(b,9,1,58)?!1:!0)&&a.urlV9As2||a.url}function Lt(){var a=R("flash10-promo-div"),b=zh(uh.getInstance(),107);a&&!b&&Pf(a)};var Nt;var Ot=Kc,Ot=Ot.toLowerCase();if(-1!=Ot.indexOf("android")){var Pt=Ot.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(Pt)Nt=Number(Pt[1]);else{var Qt={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},Rt=Ot.match("("+wb(Qt).join("|")+")");Nt=Rt?Qt[Rt[0]]:0}}else Nt=void 0;function St(){if(2.2==Nt)return!0;var a;a=r("yt.player.utils.videoElement_");a||(a=document.createElement("video"),q("yt.player.utils.videoElement_",a,void 0));try{return!(!a||!a.canPlayType||!a.canPlayType('video/mp4; codecs="avc1.42001E, mp4a.40.2"')&&!a.canPlayType('video/webm; codecs="vp8.0, vorbis"'))}catch(b){return!1}};function Tt(a){ah.call(this,1,arguments)}z(Tt,ah);var Ut=new dh("timing-sent",Tt);var Vt=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{},Wt=v(Vt.clearResourceTimings||Vt.webkitClearResourceTimings||Vt.mozClearResourceTimings||Vt.msClearResourceTimings||Vt.oClearResourceTimings||t,Vt),Xt=Vt.mark?function(a){Vt.mark(a)}:t;function Yt(){Zt();Wt();q("yt.timing.pingSent_",!1,void 0)}function $t(){var a=au().tick;if(a.aft)return a.aft;for(var b=I("TIMING_AFT_KEYS",["ol"]),c=b.length,d=0;d<c;d++){var e=a[b[d]];if(e)return e}return NaN}
  379. function bu(a){return Math.round(Vt.timing.navigationStart+a)}
  380. function cu(a){var b=window.location.protocol,c=Vt.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=bu(d.startTime),a.wfce=bu(d.responseEnd));c&&0<c.startTime&&0<c.responseEnd&&(a.wffs=bu(c.startTime),a.wffe=bu(c.responseEnd))}
  381. function du(a){I("EXP_DEFER_CSI_PING")&&(M(r("yt.timing.deferredPingTimer_")),q("yt.timing.deferredPingArgs_",null,void 0));var b="https:"==window.location.protocol?"https://gg.google.com/csi":"http://csi.gstatic.com/csi",c="",d;for(d in a)c+="&"+d+"="+a[d];(a=b+"?"+c.substring(1))&&mj(a);q("yt.timing.pingSent_",!0,void 0)}function eu(a){if(I("EXP_DEFER_CSI_PING")){var b=r("yt.timing.deferredPingArgs_");b&&(a&&(b.yt_fss=a),du(b))}}function au(){return r("ytcsi.data_")||Zt()}
  382. function Zt(){var a={tick:{},span:{},info:{}};q("ytcsi.data_",a,void 0);return a};function fu(){var a={volume:100,muted:!1},b=lp("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:Math.min(Math.max(b.volume,0),100);a.muted=void 0==b.muted?!1:b.muted;return a};function gu(a,b){Yb.call(this);this.k=this.l=a;this.R=b;this.H=!1;this.e={};this.ra=this.Q=null;this.ga=new H;Zb(this,w($b,this.ga));this.j={};this.C=this.sa=this.f=this.Vb=this.c=null;this.V=!1;this.L=this.D=this.nb=this.n=null;this.Na={};this.rd=["onReady"];this.Oa=[];this.Wb=null;this.wc=0;this.ca={};hu(this);this.ta("onVolumeChange",v(this.ge,this));this.ta("onError",v(this.fe,this));this.ta("onTabOrderChange",v(this.ud,this));this.ta("onTabAnnounce",v(this.Ge,this));this.ta("WATCH_LATER_VIDEO_ADDED",
  383. v(this.he,this));this.ta("WATCH_LATER_VIDEO_REMOVED",v(this.ie,this));this.ta("onMouseWheelCapture",v(this.be,this));this.ta("onMouseWheelRelease",v(this.ce,this));this.ta("onMouseMoveCapture",v(this.$d,this));this.Ub=!1;hg(this.l,"mousewheel",this.Rc,!1,this);hg(this.l,"wheel",this.Rc,!1,this)}z(gu,Yb);g=gu.prototype;g.getId=function(){return this.R};g.uc=function(a,b){this.K()||(iu(this,a),ju(this,b),this.H&&ku(this))};
  384. function iu(a,b){a.Vb=b;a.c=b.clone();a.f=a.c.attrs.id||a.f;"video-player"==a.f&&(a.f=a.R,a.c.attrs.id=a.R);a.k.id==a.f&&(a.f=a.f+"-player",a.c.attrs.id=a.f);a.c.args.enablejsapi="1";a.c.args.playerapiid=a.R;a.sa||(a.sa=lu(a,a.c.args.jsapicallback||"onYouTubePlayerReady"));a.c.args.jsapicallback=null;var c=a.c.attrs.width;c&&(a.k.style.width=he(Number(c)||c,!0));if(c=a.c.attrs.height)a.k.style.height=he(Number(c)||c,!0);a.k.style.overflow="hidden"}g.zd=function(){return this.Vb};
  385. function ku(a){a.c.loaded||(a.c.loaded=!0,"0"!=a.c.args.autoplay?a.e.loadVideoByPlayerVars(a.c.args):a.e.cueVideoByPlayerVars(a.c.args))}function mu(a){if(!p(a.c.disable.flash)){var b=a.c.disable,c;c=At(zt.getInstance(),a.c.minVersion);b.flash=!c}return!a.c.disable.flash}function nu(a){var b=ou(a);b&&b.stopVideo&&b.stopVideo();if(mu(a)){var c=a.c;b&&b.getUpdatedConfigurationData&&(c=ft(b.getUpdatedConfigurationData()));c.args.autoplay=1;c.args.html5_unavailable="1";iu(a,c);ju(a,"flash")}}
  386. function ju(a,b){if(!a.K()){if(!b){var c;if(!(c=!a.c.html5&&mu(a))){if(!p(a.c.disable.html5)){if(c=St())c=pu(a)||a.c.assets.js;a.c.disable.html5=!c;c||(a.c.args.html5_unavailable="1")}c=!!a.c.disable.html5}b=c?mu(a)?"flash":"unsupported":"html5"}("flash"==b?a.Ne:"html5"==b?a.Oe:a.Pe).call(a)}}function pu(a){var b=!0,c=ou(a);c&&a.c&&(a=a.c,b=G(c,"version")==a.assets.js);return b&&!!r("yt.player.Application.create")}
  387. g.Oe=function(){if(!this.V){var a=pu(this);if(a&&"html5"==qu(this))this.C="html5",this.H||this.ib();else if(ru(this),this.C="html5",a&&this.nb)this.l.appendChild(this.nb),this.ib();else{this.c.loaded=!0;var b=v(function(){var a=this.l,b=this.c.clone();r("yt.player.Application.create")(a,b);this.ib()},this);this.n=b;this.V=!0;a?this.n():(this.c.assets.js2?(this.n=a=v(function(){tc(this.c.assets.js2,b);this.n=b},this),tc(this.c.assets.js,a)):tc(this.c.assets.js,this.n),Bc(this.c.assets.css))}}};
  388. g.Ne=function(){var a=this.c.clone();if(!this.D){var b=ou(this);b&&(this.D=document.createElement("span"),this.D.tabIndex=0,this.Oa.push(T(this.D,"focus",v(this.Qc,this))),this.L=document.createElement("span"),this.L.tabIndex=0,this.Oa.push(T(this.L,"focus",v(this.Qc,this))),b.parentNode&&b.parentNode.insertBefore(this.D,b),b.parentNode&&b.parentNode.insertBefore(this.L,b.nextSibling))}a.attrs.width=a.attrs.width||"100%";a.attrs.height=a.attrs.height||"100%";if("flash"==qu(this))this.C="flash",this.H||
  389. Jt(a,!1,v(this.ib,this));else{ru(this);this.C="flash";this.c.loaded=!0;b=this.l;b=u(b)?md(b):b;a=ft(a);if(window!=window.top){var c=null;document.referrer&&(c=document.referrer.substring(0,128));a.args.framer=c}c=zt.getInstance();At(c,a.minVersion)?(c=Kt(a,c),It(b,c,a)):Mt(b,a,c);this.ib()}};g.Qc=function(){ou(this).focus()};function ou(a){var b=R(a.f);!b&&a.k&&a.k.querySelector&&(b=a.k.querySelector("#"+a.f));return b}
  390. g.ib=function(){var a=ou(this),b=!1;try{a&&a.getApiInterface&&a.getApiInterface()&&(b=!0)}catch(c){}if(b)if(this.V=!1,a.isNotServable&&a.isNotServable(this.c.args.video_id))nu(this);else{hu(this);this.H=!0;a=ou(this);a.addEventListener&&(this.Q=su(this,a,"addEventListener"));a.removeEventListener&&(this.ra=su(this,a,"removeEventListener"));for(var b=a.getApiInterface(),b=b.concat(a.getInternalApiInterface()),d=0;d<b.length;d++){var e=b[d];this.e[e]||(this.e[e]=su(this,a,e))}for(var f in this.j)this.Q(f,
  391. this.j[f]);ku(this);this.sa&&this.sa(this.e);this.ga.B("onReady",this.e);a.apiProxyReady&&a.apiProxyReady()}else this.wc=K(v(this.ib,this),50)};function su(a,b,c){var d=b[c];return function(){try{return a.Wb=null,d.apply(b,arguments)}catch(e){"Bad NPObject as private data!"!=e.message&&(e.message+=" ("+c+")",a.Wb=e,fc(e,"WARNING"))}}}
  392. function hu(a){a.H=!1;if(a.ra)for(var b in a.j)a.ra(b,a.j[b]);for(var c in a.ca)M(parseInt(c,10));a.ca={};a.Q=null;a.ra=null;for(var d in a.e)a.e[d]=null;a.e.addEventListener=v(a.ta,a);a.e.removeEventListener=v(a.Be,a);a.e.destroy=v(a.dispose,a);a.e.getLastError=v(a.Bd,a);a.e.getPlayerType=v(a.Cd,a);a.e.getCurrentVideoConfig=v(a.zd,a);a.e.loadNewVideoConfig=v(a.uc,a);a.e.isReady=v(a.Ze,a)}g.Ze=function(){return this.H};
  393. g.ta=function(a,b){if(!this.K()){var c=lu(this,b);if(c){if(!Ua(this.rd,a)&&!this.j[a]){var d=tu(this,a);this.Q&&this.Q(a,d)}this.ga.subscribe(a,c);"onReady"==a&&this.H&&K(w(c,this.e),0)}}};g.Be=function(a,b){if(!this.K()){var c=lu(this,b);c&&this.ga.lb(a,c)}};function lu(a,b){var c=b;if("string"==typeof b){if(a.Na[b])return a.Na[b];c=function(){var a=r(b);a&&a.apply(m,arguments)};a.Na[b]=c}return c?c:null}
  394. function tu(a,b){var c="ytPlayer"+b+a.R;a.j[b]=c;m[c]=function(c){var e=K(function(){if(!a.K()){a.ga.B(b,c);var f=a.ca,h=e.toString();h in f&&delete f[h]}},0);Ab(a.ca,e.toString())};return c}g.ud=function(a){a=a?Id:Hd;for(var b=a(document.activeElement);b&&(1!=b.nodeType||b==this.D||b==this.L||(b.focus(),b!=document.activeElement));)b=a(b)};g.Ge=function(a){O("a11y-announce",a)};
  395. g.ge=function(a){var b={};b.volume=isNaN(a.volume)?fu().volume:Math.min(Math.max(a.volume,0),100);b.muted=void 0==a.muted?fu().muted:a.muted;jp("yt-player-volume",b,2592E3)};g.fe=function(a){5==a&&nu(this)};g.he=function(a){O("WATCH_LATER_VIDEO_ADDED",a)};g.ie=function(a){O("WATCH_LATER_VIDEO_REMOVED",a)};g.ae=function(a){if(!Kd(this.l,He(a)))this.e.onExternalMouseMove()};g.$d=function(){hg(document,"mousemove",this.ae,!1,this)};g.be=function(){this.Ub=!0};g.ce=function(){this.Ub=!1};
  396. g.Rc=function(a){this.Ub&&a.preventDefault()};
  397. g.Pe=function(){ru(this);this.C="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=
  398. this.c.messages.player_fallback||a;a=R("player-unavailable");if(R("unavailable-submessage")&&a){R("unavailable-submessage").innerHTML=b;var b=S("icon",a),c;if(c=b)c=b?b.dataset?Vb("icon")in b.dataset:b.hasAttribute?!!b.hasAttribute("data-icon"):!!b.getAttribute("data-icon"):!1;c&&(b.src=G(b,"icon"));F(a,"hid");E(R("player"),"off-screen-trigger")}};g.Cd=function(){return this.C||qu(this)};g.Bd=function(){return this.Wb};
  399. function qu(a){return(a=ou(a))?"div"==a.tagName.toLowerCase()?"html5":"flash":null}
  400. function ru(a){au().tick.dcp=y();Xt("dcp");if(I("CSI_LOG_ON_TICK")){var b=I("TIMING_ACTION"),c=au().tick;if(b&&c._start&&$t()){var b=!0,d=I("TIMING_WAIT",[]);if(d.length)for(var e=0,f=d.length;e<f;++e)if(!(d[e]in c)){b=!1;break}if(b)if(d=au().tick,c=au().span,e=au().info,b=r("yt.timing.reportbuilder_")){if(b=b(d,c,e,void 0))du(b),Yt()}else{b={v:2,s:I("CSI_SERVICE_NAME","youtube"),action:I("TIMING_ACTION")};Vt.now&&Vt.timing&&(f=Vt.timing.navigationStart+Vt.now(),f=Math.round(y()-f),e.yt_hrd=f);var f=
  401. I("TIMING_INFO")||{},h;for(h in f)e[h]=f[h];h=e.srt;delete e.srt;var k;h||0===h||(k=Vt.timing||{},h=Math.max(0,k.responseStart-k.navigationStart),isNaN(h)&&e.pt&&(h=e.pt));if(h||0===h)e.srt=h;e.h5jse&&(f=window.location.protocol+r("ytplayer.config.assets.js"),(f=Vt.getEntriesByName?Vt.getEntriesByName(f)[0]:null)?e.h5jse=Math.round(e.h5jse-f.responseEnd):delete e.h5jse);d.aft=$t();f=d._start;if("cold"==e.yt_lt){k||(k=Vt.timing||{});var l;t:if(l=k,l.msFirstPaint)l=Math.max(0,l.msFirstPaint);else{var n=
  402. window.chrome;if(n&&(n=n.loadTimes,fa(n))){var n=n(),x=1E3*Math.min(n.requestTime||Infinity,n.startLoadTime||Infinity),x=Infinity===x?0:l.navigationStart-x;l=Math.max(0,Math.round(1E3*n.firstPaintTime+x)||0);break t}l=0}0<l&&l>f&&(d.fpt=l);l=au().span;n=k.redirectEnd-k.redirectStart;0<n&&(l.rtime_=n);n=k.domainLookupEnd-k.domainLookupStart;0<n&&(l.dns_=n);n=k.connectEnd-k.connectStart;0<n&&(l.tcp_=n);n=k.connectEnd-k.secureConnectionStart;k.secureConnectionStart>=k.navigationStart&&0<n&&(l.stcp_=
  403. n);n=k.responseStart-k.requestStart;0<n&&(l.req_=n);n=k.responseEnd-k.responseStart;0<n&&(l.rcv_=n);I("EXP_WEBFONT_ENABLED")&&Vt.getEntriesByType&&cu(d)}e.p=I("CLIENT_PROTOCOL")||"unknown";e.t=I("CLIENT_TRANSPORT")||"unknown";for(var J in e)"_"!=J.charAt(0)&&(b[J]=e[J]);I("CSI_MORE")&&(d.ps=y());J={};k=[];for(var D in d)"_"!=D.charAt(0)&&(l=Math.max(Math.round(d[D]-f),0),J[D]=l,k.push(D+"."+l));b.rt=k.join(",");D={};k=[];for(var B in c)"_"!=B.charAt(0)&&(D[B]=c[B],k.push(B+"."+c[B]));b.it=k.join(",");
  404. (B=r("ytdebug.logTiming"))&&B(b,J,D);Yt();I("EXP_DEFER_CSI_PING")?(eu(),q("yt.timing.deferredPingArgs_",b,void 0),B=K(eu,0),q("yt.timing.deferredPingTimer_",B,void 0)):du(b);B=new Tt(J.aft+(h||0));(D=r("yt.pubsub2.instance_"))&&D.publish.call(D,Ut.toString(),Ut,B)}}}a.cancel();hu(a);a.C=null;a.c&&(a.c.loaded=!1);B=ou(a);"html5"==qu(a)?a.nb=B:B&&B.destroy&&B.destroy();Ad(a.l);Ee(a.Oa);a.Oa.length=0;a.D=null;a.L=null}g.cancel=function(){this.n&&Ac(this.c.assets.js,this.n);M(this.wc);this.V=!1};
  405. g.F=function(){ru(this);this.Na=null;for(var a in this.j)m[this.j[a]]=null;this.e=null;delete this.l;delete this.k;this.c&&(this.Vb=this.c=this.c.fallback=null);gu.G.F.call(this)};var uu={},vu="player_uid_"+(1E9*Math.random()>>>0);function wu(a,b){a=u(a)?md(a):a;b=ft(b);var c=vu+"_"+ha(a),d=uu[c];if(d)return d.uc(b),d.e;d=new gu(a,c);uu[c]=d;O("player-added",d.e);Zb(d,w(xu,d));K(function(){d.uc(b)},0);return d.e}function yu(){for(var a in uu){var b=uu[a];b&&b.cancel()}}function zu(a){if(a=R(a))a=vu+"_"+ha(a),(a=uu[a])&&a.dispose()}function xu(a){uu[a.getId()]=null}function Au(a){a=R(a);if(!a)return null;var b=vu+"_"+ha(a),c=uu[b];c||(c=new gu(a,b),uu[b]=c);return c.e};var Bu=r("yt.abuse.botguardInitialized")||gt;q("yt.abuse.botguardInitialized",Bu,void 0);var Cu=r("yt.abuse.invokeBotguard")||ht;q("yt.abuse.invokeBotguard",Cu,void 0);var Du=r("yt.player.exports.navigate")||Yg;q("yt.player.exports.navigate",Du,void 0);var Eu=r("yt.player.embed")||wu;q("yt.player.embed",Eu,void 0);var Fu=r("yt.player.destroy")||zu;q("yt.player.destroy",Fu,void 0);var Gu=r("yt.player.cancelAll")||yu;q("yt.player.cancelAll",Gu,void 0);var Hu=r("yt.player.getPlayerByElement")||Au;
  406. q("yt.player.getPlayerByElement",Hu,void 0);var Iu=r("yt.player.exports.feedbackStart")||Gt;q("yt.player.exports.feedbackStart",Iu,void 0);var Ju=r("yt.player.exports.feedbackShowArticle")||Ht;q("yt.player.exports.feedbackShowArticle",Ju,void 0);var Ku=r("yt.util.activity.init")||fl;q("yt.util.activity.init",Ku,void 0);var Lu=r("yt.util.activity.getTimeSinceActive")||hl;q("yt.util.activity.getTimeSinceActive",Lu,void 0);var Mu=r("yt.util.activity.setTimestamp")||gl;
  407. q("yt.util.activity.setTimestamp",Mu,void 0);var Nu=!1;function Ou(){var a=r("yt.player.getPlayerByElement");return a?a("player-api"):null}function Pu(a){nb(R("player-mole-container"),"watch-mole",a);a=R("player-mole-container");var b=R("player");Nu=!b||C(b,"off-screen")||!a||C(a,"watch-mole");(a=Ou())&&a.isReady()&&a.setMinimized(Nu)};var Qu,Ru,Y,Su,Tu,Uu,Vu,Wu,Xu,Yu,rh,Zu,$u,av,bv,Z,cv;var dv;function ev(a,b){this.type=a;this.videoIds=b||[]}function fv(a,b){Hf("/watch_queue_ajax",{method:"POST",La:{action_check_playability:1},X:{video_ids:a.join(",")},P:function(a,d){d&&da(d)?b(d):b([])},onError:function(){b([])}})}function gv(a){u(a)&&(a=[a]);var b=new ev(1,a);dv?hv(function(){A(a,function(a){dv.ed(a)})},b,void 0):iv(b,a)}function jv(a,b,c){var d=new ev(2);dv&&hv(function(){dv.Pc(a,b,c)},d,void 0)}function kv(a){fv([a],function(b){Va(b)||lv(a)})}
  408. function lv(a){var b=new ev(2);dv&&hv(function(){dv.Lc(a)},b,void 0)}function mv(a){var b=new ev(2);dv&&hv(function(){dv.yc(a)},b,void 0)}function nv(a,b,c){b?fv([b],function(d){Va(d)||ov(a,b,c)}):ov(a,b,c)}function ov(a,b,c){dv&&hv(function(){b&&Br(dv,b,0,0,a)},void 0,c)}function pv(a,b,c){fv(b,function(b){Va(b)||!Ua(b,a)||qv(a,b,c)})}function qv(a,b,c){dv&&hv(function(){var c=dv;Br(c,a);wr(c,"updatePlaylist",{videoIds:b.join(",")})},void 0,c)}
  409. function rv(){var a=new ev(2);dv&&hv(function(){dv.stop();dv.Fc()},a,void 0)}function sv(a){dv=a;dv.subscribe("remoteQueueChange",function(){O("queue-change",new ev(2))})}function tv(){var a=Vs();$b(dv);dv=null;a?sv(a):O("queue-change",new ev(2))}function hv(a,b,c){dv&&1==dv.c&&(a.call(m),c&&K(function(){c()},0),p(b)&&O("queue-change",b))}
  410. function iv(a,b){Hf("/watch_queue_ajax",{method:"POST",La:{action_remove_from_watch_queue:1},X:{list:"WQ",video_ids:b.join(",")},P:function(){O("queue-change",a)},onError:function(){}})}var uv=[];var vv;function wv(){if(!vv){var a=R("watch-queue");if(!a)return[];vv=S("watch-queue-items-list",a)}var b=[],a=Ed(vv);A(a,function(a){(a=G(a,"video-id"))&&b.push(a)});return b};function xv(){O("yt-dom-content-change",Z)}q("yt.www.watchqueue.loadThumbnails",xv,void 0);
  411. function yv(){cv=R("watch-queue");Xu=S("watch-queue-control-bar",cv);Yu=S("watch-queue-count",Xu);rh=S("yt-uix-button-dark-overflow-action-menu",Xu);Zu=S("prev-watch-queue-button",cv);$u=S("next-watch-queue-button",cv);av=S("play-watch-queue-button",cv);bv=S("pause-watch-queue-button",cv);Z=S("watch-queue-items-list",cv);zv.push(Fe(cv,"click",Av,"yt-uix-button"));zv.push(Fe(cv,"click",Bv,"watch-queue-video"));zv.push(Fe(cv,"click",Cv,"control-bar-button"));zv.push(T(Z,Ud,Dv));zv.push(Fe(Z,Ud,Ev,"watch-queue-item"));
  412. zv.push(Fe(null,"click",Fv,"watch-queue-video-menu-choice"));zv.push(Fe(null,"click",Gv,"watch-queue-menu-choice"));Vu=new qi(R("watch-queue-count-msg").innerHTML,["count","total"]);Wu=ti(R("watch-queue-loading-template"));Hv=0;Su=!1;var a=R("watch-queue-save-as-playlist-widget");a&&(Uu=new Zs({Kb:Iv}),Bg(Uu,a));Ru=null;ys(!!I("MDX_ENABLE_CASTV2"),!0,{device:"Desktop",app:"youtube-desktop",isSignedIn:I("LOGGED_IN")});ys(!!I("MDX_ENABLE_CASTV2"),!!I("MDX_ENABLE_QUEUE"));uv.push(N("yt-remote-connection-change",
  413. tv));(a=Vs())&&sv(a);Jv.push(N("init",Kv));Jv.push(N("dispose",Lv));Jv.push(N("yt-remote-before-disconnect",Mv));Jv.push(N("yt-remote-connection-change",Nv));Nv();Kv();Jv.push(N("queue-change",Ov));Jv.push(N("watch-queue-addto-video-added",Pv));Jv.push(N("watch-queue-addto-video-removed",Pv));Jv.push(N("watch-queue-addto-video-play-next",Qv));Jv.push(N("watch-queue-addto-video-play-now",Rv));Jv.push(N("watch-queue-addto-playlist-added",Pv));Jv.push(N("watch-queue-addto-playlist-removed",Pv));Jv.push(N("watch-queue-addto-playlist-play-next",
  414. Sv));Jv.push(N("watch-queue-addto-playlist-play-now",Tv))}function Uv(){var a=R("watch7-sidebar");return a?Jd(cv)==a:!1}function Vv(){var a=!1;if(!Y||!Mf(Qu)||!I("PAGE_NAME"))return Wv(),a;var b=Xv(),c=Yv();Zv()&&c&&b!=c&&($v(c),b=c);!Zv()||!b||b!=I("VIDEO_ID")&&b!=Tu||I("LIST_ID")?Jd(cv)!=Qu&&(Qu.appendChild(cv),O("watch-queue-show",0),xv(),a=!0):(b=R("watch7-sidebar"))&&!Uv()&&(F(Qu,"mole-notification"),Bd(b,cv,0),O("watch-queue-show",1),aw(),a=!0);Wv();return a}
  415. function $v(a){if(Ru){var b=!!Y,c=b&&!(a&&(a==I("VIDEO_ID")||a==Tu));Pu(c);b&&Zv()&&(c?O("watch-queue-show",0):O("watch-queue-show",1));if(Ru.isReady())Ru.loadVideoById(a);else{var d=function(){Ru.loadVideoById(a);Ru.removeEventListener("onReady",d)};Ru.addEventListener("onReady",d)}}}function Xv(){return Ru&&Ru.isReady()?Ru.getVideoData().video_id:""}function Yv(){return Y?vr(Y).videoId:""}function bw(a){Xv()!=cw()&&dw(Xv());ew(1==a);Vv()}
  416. function Wv(){Ru&&(Xv()?Su||Pu(!!Y&&(Mf(Qu)||fw())&&Jd(cv)==Qu):Pu(!1))}function Kv(){F(Qu,"mole-notification");Tu="";at();Vv();var a=Ru;a&&a.addEventListener("onStateChange",bw)}function Lv(){pb(Qu,"mole-expanded","mole-collapsed");var a=Ru;a&&a.removeEventListener("onStateChange",bw)}function Zv(){return"watch"==I("PAGE_NAME")}function gw(a){if(a!=cw()){var b=wv(),c=b[0];hw()&&(c=b[iw()+1]);if(a!=c)if(Ua(b,a)){var d=La(b,a),b=La(b,c);jv(a,d,b)}else kv(a)}}
  417. function Av(a){if(a.currentTarget==Zu){if(fw()){var b=Ed(Z);a=iw();b=b.length;a=(b+a-1)%b;jw(a);aw();(b=cw())&&Y&&Y.bd(b,a)}}else if(a.currentTarget==$u)fw()&&(a=Ed(Z),a=(iw()+1)%a.length,jw(a),aw(),(b=cw())&&Y&&Y.ld(b,a));else if(a.currentTarget==av)Qf(av),Pf(bv),Y?(a=wv(),!Yv()&&a[0]?Br(Y,a[0]):Y.play()):Ru&&Ru.playVideo();else if(a.currentTarget==bv)Qf(bv),Pf(av),Y?Y.pause():Ru&&Ru.pauseVideo();else if(C(a.currentTarget,"remove-item-watch-queue-button")){if(a=Pd(a.currentTarget,"watch-queue-item"),
  418. b=G(a,"video-id"))E(a,"fade-out"),gv(b)}else C(a.currentTarget,"expand-video-watch-queue-button")&&kw(a.currentTarget)}function Gv(a){var b=G(a.currentTarget,"action");lw[b](a.currentTarget);a=a||window.event;a.cancelBubble=!0;a.stopPropagation&&a.stopPropagation();qh()}function Cv(a){Jd(cv)==Qu&&a.currentTarget==Xu&&(a=He(a),a&&C(a,"overflow-menu-choice")||(ob(Qu,"mole-expanded"),ob(Qu,"mole-collapsed")))}function Fv(a){var b=G(a.currentTarget,"action");mw[b](a.currentTarget)}
  419. function Dv(){F(Qu,"mole-notification");C(Qu,"mole-expanded")&&xv();qh()}function Ev(a){C(a.currentTarget,"fade-out")&&(Cd(a.currentTarget),dw(Yv()),nw());xv()}function Bv(a){a=Pd(a.currentTarget,"watch-queue-item");if(!C(a,"currently-playing")){var b=Ed(Z),b=La(b,a);jw(b);(a=G(a,"video-id"))&&Y&&Br(Y,a,0,b)}}
  420. function Iv(a){var b=a.playlistId,c=a.xe;b&&c&&(a={videoIds:wv().join(","),yd:b,P:function(){Xg(c)}},Hf("/playlist_video_ajax?action_add_to_playlist=1",{method:"POST",La:{feature:a.rf||null,authuser:a.nf||null,pageid:a.pageId||null},X:{video_ids:a.videoIds||null,source_playlist_id:a.sourcePlaylistId||null,full_list_id:a.yd||null,delete_from_playlists:a.wf||null,add_to_playlists:a.lf||null,plid:I("PLAYBACK_ID")||null},context:a.context,onError:a.onError,P:a.P,hc:a.hc}))}
  421. function kw(a){C(a,"disabled")||(a=G(a,"video-id"))&&ow(a)}function hw(){return!!S("currently-playing",Z)}function iw(){var a=S("currently-playing",Z);if(a){var b=Ed(Z);return La(b,a)}return 0}function cw(){var a=S("currently-playing",Z);return a?G(a,"video-id")||"":""}function dw(a){a=La(wv(),a);0<=a?hw()&&iw()==a||(jw(a),aw()):pw()}function jw(a){if(fw()){pw();var b=Ed(Z);b[a]&&E(b[a],"currently-playing");qw()}}
  422. function pw(){if(fw()){var a=S("currently-playing",Z);a&&F(a,"currently-playing");qw()}}function Qv(a){gw(a);Pv()}function Rv(a){Y&&Br(Y,a);a!=cw()&&($v(a),Pv());Tu=a}function Sv(a){wv();hw()&&iw();mv(a);Pv()}function Tv(a,b,c){b&&(c?pv(b,c,function(){Tu=b}):nv(a,b,function(){Tu=b}),Pv())}function Pv(){Mf(Qu)&&E(Qu,"mole-notification")}function rw(){var a=hw()?iw()+1:0,b=wv().length;Yu.innerHTML=0<a&&0<b?Vu.render({count:a,total:b}):""}function ew(a){a?(Qf(av),Pf(bv)):(Qf(bv),Pf(av))}
  423. function qw(){var a=wv().length,b=1>=a,c=hw()?iw():-1;Zu.disabled=b||0==c;$u.disabled=b||c==a-1;rw();if(0!=a){var d=null,a=Ed(Z);A(a,function(a){var b=G(a,"video-id"),c=S("play-next",a),k=S("goto-video-page",a);nb(k,"disabled",Zv()&&b==I("VIDEO_ID")&&!I("LIST_ID"));C(a,"currently-playing")?(d=a,Qf(c)):d?(d=null,nb(c,"disabled",!0)):nb(c,"disabled",!1)})}}function nw(){qw();Va(wv())?sw():tw();O("watch-queue-update")}function uw(){Hv=0;M(vw);vw=NaN}
  424. function ww(){Su=!1;if(isNaN(vw)){var a=Math.min(3E4,1E3*Math.pow(2,Hv));vw=K(function(){vw=NaN;Hv++;xw()},a)}}function fw(){var a=Fd(Z);return!!a&&C(a,"watch-queue-item")}function xw(){if(!Su){Su=!0;var a;dv?(a=Ss(),a="RQ"+(a?a.getLoungeToken():"")):a="WQ";Hf("/watch_queue_ajax",{method:"GET",La:{action_get_watch_queue_items:1,list:a},P:yw,onError:ww,wb:ww});fw()?tw():(Z.innerHTML=Wu.render({}),nw())}}
  425. function yw(a,b){Su=!1;if(Z&&b&&(b.html||!Yv())&&(uw(),Y)){var c=wv(),d=[],e=yd(b.html),f=Na(e.childNodes,function(a){return ga(a)&&1==a.nodeType});A(f,function(a){a=G(a,"video-id");d.push(a)});0==c.length&&(Z.innerHTML="");if(0==d.length)Z.innerHTML="",O("watch-queue-empty"),nw();else if(!gb(c,d)){if(d.length==c.length+1){for(var h=0;h<c.length&&c[h]==d[h];)h++;var k=cb(c);eb(k,h,0,d[h]);if(gb(k,d)){Bd(Z,f[h],h);E(f[h],"fade-in");K(function(){F(f[h],"fade-in")},0);dw(Yv());xv();nw();return}}if(d.length==
  426. c.length-1){for(e=0;e<d.length&&c[e]==d[e];)e++;k=cb(c);$a(k,e);if(gb(k,d)){c=Ed(Z);E(c[e],"fade-out");dw(Yv());return}}Z.innerHTML="";Va(f)||(A(f,function(a){Z.appendChild(a)}),xv(),dw(Yv()));nw()}}}
  427. function aw(){var a=S("currently-playing",Z);if(a){var b=$s.getInstance(),c=Z;if(c&&a){var d=nd(U(b,"scroll-unit"),c),a=La(d,a);if(0<=a&&!(!c||isNaN(a)||0>a)&&(b=nd(U(b,"scroll-unit"),c),!(0>=b.length))){a>=b.length&&(a=b.length-1);if(b.length){var d=b[0],e=d.offsetHeight;1<b.length&&(e=b[1].offsetTop-d.offsetTop);d=e}else d=0;var e=c.offsetHeight,f=Math.max(Math.floor(c.scrollTop/d),0);a>f-1&&(d=Math.floor(e/d),e=b.length,a+d>e&&(a=e-d+1));0>a&&(a=0);a=b[a].offsetTop;c&&!isNaN(a)&&(0>a&&(a=0),c.scrollTop=
  428. a,Ub(c,"scroller-offset",a+""),O("yt-dom-content-change",c))}}}xv()}function ow(a){a=wf("/watch",{v:a});Xg(a)}function zw(a){Zv()&&(a!=I("VIDEO_ID")||I("LIST_ID")?(K(function(){ow(a)},100),Tu=a):Vv())}function Mv(a){Aw=a}function Nv(){var a=Vs();$b(Y);Y=null;uw();Z.innerHTML="";nw();a?(Y=a,Y.subscribe("proxyStateChange",Bw),Y.subscribe("remotePlayerChange",Cw),Aw=null):sw();2!=Aw&&(at(),O("watch-queue-remote-connection",!!a))}
  429. function tw(){Pf(Qu);if(!Vv()){var a=Jd(cv)==Qu?0:1;O("watch-queue-show",a)}}function sw(){Jd(cv)!=Qu&&Qu.appendChild(cv);pb(Qu,"mole-expanded","mole-collapsed");Qf(Qu);Wv();O("watch-queue-hide",0)}function Bw(a,b){uw();1==b&&xw()}function Cw(){var a=vr(Y);ew(1==a.c)}function Ov(){if(Y){var a=cw(),b=Yv();b&&b!=a&&dw(b);b&&(Uv()||Tu==b)&&zw(b);xw()}}
  430. var lw={"remove-all":function(){rv();Z.innerHTML="";nw();O("watch-queue-empty");sw()},"save-as-playlist":function(){if(!Va(wv())){var a=Uu;Ih.getInstance().vc(a.ka())}},disconnect:function(){Qs()}},mw={"play-next":function(a){C(a,"disabled")||(a=G(a,"video-id"))&&gw(a)},"goto-video-page":kw},zv=[],Jv=[],Hv=0,vw=NaN,Aw=null;var Dw,Ew,Fw,Gw,Hw,Iw;function Jw(){if(Dw=S("watch-timeline"))Ew=S("watch-timeline-sections",Dw),Fw=S("watch-timeline-control-bar"),Gw=S("watch-timeline-control-bar-info",Fw),S("yt-uix-button-dark-overflow-action-menu",Fw),Hw=S("prev-watch-timeline-button"),Iw=S("next-watch-timeline-button"),Ew&&O("yt-dom-content-change",Ew),Fe(Dw,"click",Kw,"yt-uix-button"),Fe(Dw,"click",Lw,"watch-timeline-video-link"),Fe(Ew,"click",Mw,"overflow-menu-choice")}
  431. function Nw(){if("watch"==I("PAGE_NAME")){var a=R("watch-timeline-mole-container");a&&Ad(a);Jw()}}function Ow(){if("watch"==I("PAGE_NAME")){var a=R("watch-timeline-mole-container"),b=R("watch-timeline-sidebar-container");a&&b&&zd(a,Ed(b))}}function Kw(a){a.currentTarget==Gw?Pw():a.currentTarget!=Iw&&a.currentTarget!=Hw||Lw(a)}function Pw(){Qw()&&(ob(Dw,"mole-expanded"),T(Ew,Ud,function(){Ew&&O("yt-dom-content-change",Ew)}))}
  432. function Lw(a){if(Qw()){var b=a||window.event;b.returnValue=!1;b.preventDefault&&b.preventDefault();if(a=G(a.currentTarget,"video-id"))Pu(!0),(b=Ou())&&b.loadVideoById(a);O("watch-timeline-refresh",a)}}function Mw(a){var b=G(a.currentTarget,"action");Rw[b](a.currentTarget)}function Qw(){return Jd(Dw)==R("watch-timeline-mole-container")}var Rw={"goto-video-page":function(a){a=Pd(a,"watch-timeline-item");a=S("watch-timeline-video-link",a);Xg(a.href)}};var Sw;function Tw(a){Uw(R("yt-picker-"+a+"-footer"),a,!1,!1,!0);R("footer").scrollIntoView()}function Uw(a,b,c,d,e){c||(Sw&&Sw!=a&&Qf(Sw),Sw=a,e?Pf(a):Rf(a));d?S("yt-close",a).focus():(c={},c["action_"+b]=1,c.base_url=window.location.href.split("#",1)[0],Hf("/picker_ajax",{format:"JSON",method:"GET",La:c,P:v(Vw,null,a),onError:function(){Qf(a)}}))}
  433. function Vw(a,b,c){if(c&&c.html){Ub(a,"loaded",1);a.innerHTML=c.html;Ww(a);b=document.body;var d=ee(a);c=ee(b);var e=re(b),f=d.x-c.x-e.left,d=d.y-c.y-e.top,h=b.clientWidth-a.offsetWidth,k=b.clientHeight-a.offsetHeight,l=b.scrollLeft,n=b.scrollTop;if(b==document.body||b==document.documentElement)l=c.x+e.left,n=c.y+e.top,Q&&!bd(10)&&(l+=e.left,n+=e.top);l+=Math.min(f,Math.max(f-h,0));n+=Math.min(d,Math.max(d-k,0));c=new Hc(l,n);b.scrollLeft=c.x;b.scrollTop=c.y;S("yt-close",a).focus()}else Qf(a)}
  434. function Ww(a,b){var c=S("yt-picker-content",a);if(c){var d=od(null,"yt-picker-section",c);A(d,v(Xw,null,Math.floor((b||c.offsetWidth)/180)))}else fc(Error(".yt-picker-content missing"),"WARNING")}function Xw(a,b){for(var c=od(null,"yt-picker-item",b),d=Math.ceil(c.length/a),e,f=document.createElement("div"),h=0;h<a;h++){e=document.createElement("div");e.className="yt-picker-grid";for(var k=d*h;k<d*(h+1);k++)c[k]&&e.appendChild(c[k]);e.children.length&&f.appendChild(e)}b.innerHTML=f.innerHTML};q("yt.www.guide.collections.onCollectionPickerShown",function(){var a=Zh();li();var b=S("collection-name-input",a),c=G(a,"collection-id");c||(b.value="");$h(a);pi(a,!0);var d=S("subscription-picker-list-container",a);d.innerHTML="";Hf("/subscription_ajax?action_list_subscriptions=1",{method:"POST",X:{collection_id:c},P:function(b,f){$h(a);d.innerHTML=f.response.html_content;if(c){hi();var h=S("selected-channels-button",a);th(oh.getInstance(),h);mi(h)}},onError:fi(a)})},void 0);
  435. q("yt.www.guide.setup",Tj,void 0);q("yt.www.guide.selectGuideItem",function(a){if(Gg){var b=null,c=S("guide-item-selected",Gg);c&&(b=G(c,"serialized-endpoint")||"");b!=a&&(b&&F(c,"guide-item-selected"),a&&(a=ik(a))&&E(a,"guide-item-selected"))}},void 0);q("yt.www.masthead.dismissCookieAlert",function(){nj("GC_OK",void 0);uh.getInstance();Ah(110,!0);Tg("PREF",Bh(),63072E3,"/")},void 0);q("yt.www.masthead.dismissReturnToMobileMessage",function(){nj("NO_MWEB",void 0);Qf(R("return-to-mobile"))},void 0);
  436. q("yt.www.masthead.handleAccountPickerClick",function(){var a=R("yt-masthead-multilogin");if(G(a,"loaded"))tl();else{var b=el();b[I("XSRF_FIELD_NAME")]=I("XSRF_TOKEN");spf.load("/delegate_account_ajax",{method:"POST",postData:vf(b),onDone:function(){Ub(a,"loaded","true");tl()}})}},void 0);q("yt.www.masthead.loadSearchbox",vl,void 0);q("yt.net.cookies.set",Tg,void 0);q("yt.net.cookies.remove",Vg,void 0);
  437. q("yt.www.picker.load",function(a){var b=G(a,"picker-key"),c=G(a,"picker-position"),d="yt-picker-"+b+"-"+c;if(c=R(d))a=G(a,"button-menu-id")==d,d=G(c,"loaded"),Uw(c,b,!!a,!!d)},void 0);q("yt.www.picker.displayLang",function(){Tw("language")},void 0);q("yt.www.picker.applyGrid",Ww,void 0);q("yt.www.watchtimeline.setupTimeline",Jw,void 0);
  438. q("ytbin.www.pageframe.setup",function(){Ec("GUIDE_DELAYLOADED_CSS");Ec("PAGE_FRAME_DELAYLOADED_CSS",w(F,document.body,"delayed-frame-styles-not-in"),I("WAIT_TO_DELAYLOAD_FRAME_CSS")?"yt-www-pageFrameCssNotifications-load":null);Td=R("a11y-announcements");N("a11y-announce",Le);N("init",Ie);if(Je=R("a11y-skip-nav"))Ie(),T(Je,"click",Ke);S("guide-module-loading")||Tj();tj=S("yt-masthead-user-icon");Fe(R("ticker"),"click",ul,"yt-uix-close");I("SANDBAR_ENABLED")&&sl();vl();El();(Qu=R("watch-queue-mole"))?
  439. yv():I("MDX_ENABLE_CASTV2")&&ys(!0,!1,{device:"Desktop",app:"youtube-desktop",isSignedIn:I("LOGGED_IN")});N("init",Nw);N("dispose",Ow);Nw();I("YOODLE_IS_ANIMATED")&&tc(I("YOODLE_JS_URL"),function(){r("yt.www.masthead.AnimatedYoodle.init")(I("YOODLE_ANIMATION_FRAMES"),I("YOODLE_ANIMATION_DURATION"),I("YOODLE_ANIMATION_DELAY"),I("YOODLE_STOP_ON_LAST_FRAME"))});I("SAFETY_MODE_PENDING")&&Tw("safetymode")},void 0);q("ytbin.www.pageframe.cancelSetup",function(){xl()},void 0);})();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement