(function(g){var window=this;'use strict';var c7=function(a){g.fk(a,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.Xa()).toString(36));return a},d7=function(a,b,c){Array.isArray(c)||(c=[String(c)]); g.Sga(a.D,b,c)},Dpb=function(a){if(a instanceof g.Rm)return a; if(typeof a.xm=="function")return a.xm(!1);if(g.Qa(a)){var b=0,c=new g.Rm;c.next=function(){for(;;){if(b>=a.length)return g.n1;if(b in a)return g.Sm(a[b++]);b++}}; return c}throw Error("Not implemented");},Epb=function(a,b,c){if(g.Qa(a))g.cc(a,b,c); else for(a=Dpb(a);;){var d=a.next();if(d.done)break;b.call(c,d.value,void 0,a)}},Fpb=function(a,b){var c=[]; Epb(b,function(d){try{var e=g.pp.prototype.B.call(this,d,!0)}catch(f){if(f=="Storage: Invalid value was encountered")return;throw f;}e===void 0?c.push(d):g.Mla(e)&&c.push(d)},a); return c},Gpb=function(a,b){Fpb(a,b).forEach(function(c){g.pp.prototype.remove.call(this,c)},a)},Hpb=function(a){if(a.qa){if(a.qa.locationOverrideToken)return{locationOverrideToken:a.qa.locationOverrideToken}; if(a.qa.latitudeE7!=null&&a.qa.longitudeE7!=null)return{latitudeE7:a.qa.latitudeE7,longitudeE7:a.qa.longitudeE7}}return null},Ipb=function(a,b){g.Nb(a,b)||a.push(b)},Jpb=function(a){var b=0,c; for(c in a)b++;return b},Kpb=function(a,b){return g.zc(a,b)},Lpb=function(a){try{return g.Ka.JSON.parse(a)}catch(b){}a=String(a); if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},e7=function(a){if(g.Ka.JSON)try{return g.Ka.JSON.parse(a)}catch(b){}return Lpb(a)},Mpb=function(a){if(a.Nm&&typeof a.Nm=="function")return a.Nm(); if(typeof Map!=="undefined"&&a instanceof Map||typeof Set!=="undefined"&&a instanceof Set)return Array.from(a.values());if(typeof a==="string")return a.split("");if(g.Qa(a)){for(var b=[],c=a.length,d=0;d1){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d5&&(a=a.slice(a.length-5)); var b=g.nl(tqb(),function(d){return d.loungeToken}),c=g.nl(a,function(d){return d.loungeToken}); g.ol(c,function(d){return!g.Nb(b,d)})&&uqb(); g.us("yt-remote-local-screens",a,31536E3)},p7=function(a){a||(g.ws("yt-remote-session-screen-id"),g.ws("yt-remote-session-video-id")); rqb();a=n7();g.Qb(a,o7());pqb(a)},wqb=function(){if(!q7){var a=g.vp(); a&&(q7=new g.mp(a))}},xqb=function(){wqb(); return q7?!!q7.get("yt-remote-use-staging-server"):!1},r7=function(a,b){g.Xu[a]=!0; var c=g.Vu();c&&c.publish.apply(c,arguments);g.Xu[a]=!1},yqb=function(){},f7=function(){if(!s7){s7=new g.Me(new yqb); var a=g.ir("client_streamz_web_flush_count",-1);a!==-1&&(s7.C=a)}return s7},zqb=function(){var a=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return a?parseInt(a[1],10):0},Aqb=function(a){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+a)!=-1||document.currentScript.src.indexOf("&"+a)!=-1)},Bqb=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},t7=function(a){a.length?Cqb(a.shift(),function(){t7(a)}):Dqb()},Eqb=function(a){return"chrome-extension://"+a+"/cast_sender.js"},Cqb=function(a,b,c){var d=document.createElement("script"); d.onerror=b;c&&(d.onload=c);g.Od(d,g.jq(a));(document.head||document.documentElement).appendChild(d)},Fqb=function(){var a=zqb(),b=[]; if(a>1){var c=a-1;b.push("//www.gstatic.com/eureka/clank/"+a+"/cast_sender.js");b.push("//www.gstatic.com/eureka/clank/"+c+"/cast_sender.js")}return b},Dqb=function(){var a=Bqb(); a&&a(!1,"No cast extension found")},Hqb=function(){if(Gqb){var a=2,b=Bqb(),c=function(){a--; a==0&&b&&b(!0)}; window.__onGCastApiAvailable=c;Cqb("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",Dqb,c)}},Iqb=function(){Hqb(); var a=Fqb();a.push("//www.gstatic.com/eureka/clank/cast_sender.js");t7(a)},Kqb=function(){Hqb(); var a=Fqb();a.push.apply(a,g.x(Jqb.map(Eqb)));a.push("//www.gstatic.com/eureka/clank/cast_sender.js");t7(a)},u7=function(a,b,c){g.O.call(this); this.K=c!=null?(0,g.Ua)(a,c):a;this.dj=b;this.G=(0,g.Ua)(this.Y4,this);this.j=!1;this.B=0;this.C=this.ud=null;this.D=[]},v7=function(a,b,c){g.O.call(this); this.D=c!=null?a.bind(c):a;this.dj=b;this.C=null;this.j=!1;this.B=0;this.ud=null},Lqb=function(a){a.ud=g.Ke(function(){a.ud=null; a.j&&!a.B&&(a.j=!1,Lqb(a))},a.dj); var b=a.C;a.C=null;a.D.apply(null,b)},w7=function(){},Mqb=function(){g.nb.call(this,"p")},Nqb=function(){g.nb.call(this,"o")},Pqb=function(){return Oqb=Oqb||new g.Uc},Qqb=function(a){g.nb.call(this,"serverreachability",a)},x7=function(a){var b=Pqb(); b.dispatchEvent(new Qqb(b,a))},Rqb=function(a){g.nb.call(this,"statevent",a)},y7=function(a){var b=Pqb(); b.dispatchEvent(new Rqb(b,a))},Sqb=function(a,b,c,d){g.nb.call(this,"timingevent",a); this.size=b;this.rtt=c;this.retries=d},z7=function(a,b){if(typeof a!=="function")throw Error("Fn must not be null and must be a function"); return g.Ka.setTimeout(function(){a()},b)},A7=function(){},B7=function(a,b,c,d){this.C=a; this.D=b;this.Tb=c;this.Ob=d||1;this.yb=new g.kk(this);this.fb=45E3;this.Ka=null;this.K=!1;this.Y=this.Ya=this.Z=this.Ra=this.Aa=this.ob=this.qa=null;this.ra=[];this.j=null;this.N=0;this.G=this.Fa=null;this.Jb=-1;this.Ma=!1;this.Xa=0;this.Wa=null;this.Kb=this.Va=this.Ab=this.Ga=!1;this.B=new Tqb},Tqb=function(){this.C=null; this.j="";this.B=!1},Vqb=function(a,b,c){a.Ra=1; a.Z=c7(b.clone());a.Y=c;a.Ga=!0;Uqb(a,null)},Uqb=function(a,b){a.Aa=Date.now(); C7(a);a.Ya=a.Z.clone();d7(a.Ya,"t",a.Ob);a.N=0;var c=a.C.Ra;a.B=new Tqb;a.j=Wqb(a.C,c?b:null,!a.Y);a.Xa>0&&(a.Wa=new v7((0,g.Ua)(a.ZU,a,a.j),a.Xa));a.yb.listen(a.j,"readystatechange",a.a5);b=a.Ka?g.Ec(a.Ka):{};a.Y?(a.Fa||(a.Fa="POST"),b["Content-Type"]="application/x-www-form-urlencoded",a.j.send(a.Ya,a.Fa,a.Y,b)):(a.Fa="GET",a.j.send(a.Ya,a.Fa,null,b));x7(1)},Yqb=function(a){if(!Xqb(a))return g.Qi(a.j); var b=g.Ri(a.j);if(b==="")return"";var c="",d=b.length,e=g.Oi(a.j)==4;if(!a.B.C){if(typeof TextDecoder==="undefined")return D7(a),E7(a),"";a.B.C=new g.Ka.TextDecoder}for(var f=0;fb.length)return Zqb;b=b.slice(d,d+c);a.N=d+c;return b},C7=function(a){a.ob=Date.now()+a.fb; brb(a,a.fb)},brb=function(a,b){if(a.qa!=null)throw Error("WatchDog timer not null"); a.qa=z7((0,g.Ua)(a.Z4,a),b)},crb=function(a){a.qa&&(g.Ka.clearTimeout(a.qa),a.qa=null)},E7=function(a){a.C.Og()||a.Ma||drb(a.C,a)},D7=function(a){crb(a); g.gb(a.Wa);a.Wa=null;a.yb.removeAll();if(a.j){var b=a.j;a.j=null;b.abort();b.dispose()}},lrb=function(a,b){try{var c=a.C; if(c.Uh!=0&&(c.j==a||erb(c.B,a)))if(!a.Va&&erb(c.B,a)&&c.Uh==3){try{var d=c.lf.j.parse(b)}catch(y){d=null}if(Array.isArray(d)&&d.length==3){var e=d;if(e[0]==0)a:{if(!c.Z){if(c.j)if(c.j.Aa+3E30&&(c.Xa=1.5*l);d=c;var m=a.lQ();if(m){var n=g.Si(m,"X-Client-Wire-Protocol");if(n){var p=d.B;!p.j&&(g.sb(n,"spdy")||g.sb(n,"quic")||g.sb(n,"h2"))&&(p.D=p.G,p.j=new Set,p.B&&(hrb(p,p.B),p.B=null))}if(d.Ga){var q=g.Si(m,"X-HTTP-Session-Id");q&&(d.Ae=q,g.fk(d.Ka,d.Ga,q))}}c.Uh=3;c.G&&c.G.gV();c.yc&&(c.Wc=Date.now()-a.Aa);d=c;var r=a;d.Ed=irb(d,d.Ra?d.Ob:null,d.Tb);if(r.Va){jrb(d.B, r);var t=r,u=d.Xa;u&&t.setTimeout(u);t.qa&&(crb(t),C7(t));d.j=r}else krb(d);c.C.length>0&&I7(c)}else f[0]!="stop"&&f[0]!="close"||H7(c,7);else c.Uh==3&&(f[0]=="stop"||f[0]=="close"?f[0]=="stop"?H7(c,7):c.disconnect():f[0]!="noop"&&c.G&&c.G.fV(f),c.ra=0)}x7(4)}catch(y){}},mrb=function(a,b){this.j=a; this.map=b;this.context=null},nrb=function(a){this.G=a||10; g.Ka.PerformanceNavigationTiming?(a=g.Ka.performance.getEntriesByType("navigation"),a=a.length>0&&(a[0].nextHopProtocol=="hq"||a[0].nextHopProtocol=="h2")):a=!!(g.Ka.chrome&&g.Ka.chrome.loadTimes&&g.Ka.chrome.loadTimes()&&g.Ka.chrome.loadTimes().wasFetchedViaSpdy);this.D=a?this.G:1;this.j=null;this.D>1&&(this.j=new Set);this.B=null;this.C=[]},orb=function(a){return a.B?!0:a.j?a.j.size>=a.D:!1},grb=function(a){return a.B?1:a.j?a.j.size:0},erb=function(a,b){return a.B?a.B==b:a.j?a.j.has(b):!1},hrb= function(a,b){a.j?a.j.add(b):a.B=b},jrb=function(a,b){a.B&&a.B==b?a.B=null:a.j&&a.j.has(b)&&a.j.delete(b)},prb=function(a){if(a.B!=null)return a.C.concat(a.B.ra); if(a.j!=null&&a.j.size!==0){var b=a.C;a=g.w(a.j.values());for(var c=a.next();!c.done;c=a.next())b=b.concat(c.value.ra);return b}return g.Tb(a.C)},qrb=function(a,b){var c=new A7; if(g.Ka.Image){var d=new Image;d.onload=g.Wa(J7,c,"TestLoadImage: loaded",!0,b,d);d.onerror=g.Wa(J7,c,"TestLoadImage: error",!1,b,d);d.onabort=g.Wa(J7,c,"TestLoadImage: abort",!1,b,d);d.ontimeout=g.Wa(J7,c,"TestLoadImage: timeout",!1,b,d);g.Ka.setTimeout(function(){if(d.ontimeout)d.ontimeout()},1E4); d.src=a}else b(!1)},rrb=function(a,b){var c=new A7,d=new AbortController,e=setTimeout(function(){d.abort(); J7(c,"TestPingServer: timeout",!1,b)},1E4); fetch(a,{signal:d.signal}).then(function(f){clearTimeout(e);f.ok?J7(c,"TestPingServer: ok",!0,b):J7(c,"TestPingServer: server error",!1,b)}).catch(function(){clearTimeout(e); J7(c,"TestPingServer: error",!1,b)})},J7=function(a,b,c,d,e){try{e&&(e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null),d(c)}catch(f){}},srb=function(){this.j=new w7},trb=function(a,b,c){var d=c||""; try{Opb(a,function(e,f){var h=e;g.Ra(e)&&(h=g.si(e));b.push(d+f+"="+encodeURIComponent(h))})}catch(e){throw b.push(d+"type="+encodeURIComponent("_badmap")),e; }},K7=function(a,b,c){return c&&c.e$?c.e$[a]||b:b},urb=function(a){this.C=[]; this.Ob=this.Ed=this.Ka=this.Tb=this.j=this.Ae=this.Ga=this.Ma=this.N=this.Jb=this.Y=null;this.Sf=this.Ya=0;this.Rf=K7("failFast",!1,a);this.Va=this.qa=this.Z=this.K=this.G=null;this.wc=!0;this.Je=this.Wa=-1;this.Kb=this.ra=this.Aa=0;this.Qf=K7("baseRetryDelayMs",5E3,a);this.Tf=K7("retryDelaySeedMs",1E4,a);this.yh=K7("forwardChannelMaxRetries",2,a);this.Fd=K7("forwardChannelRequestTimeoutMs",2E4,a);this.ge=a&&a.Zpa||void 0;this.Vf=a&&a.Poa||void 0;this.kf=a&&a.Xpa||!1;this.Xa=void 0;this.Ra=a&&a.Dea|| !1;this.D="";this.B=new nrb(a&&a.Tma);this.lf=new srb;this.yb=a&&a.kna||!1;this.ob=a&&a.Zma||!1;this.yb&&this.ob&&(this.ob=!1);this.Uf=a&&a.Jma||!1;a&&a.mna&&(this.wc=!1);this.yc=!this.yb&&this.wc&&a&&a.Xma||!1;this.Zd=void 0;a&&a.s_&&a.s_>0&&(this.Zd=a.s_);this.Rc=void 0;this.Wc=0;this.fb=!1;this.Ab=this.Fa=null},G7=function(a){a.j&&(vrb(a),a.j.cancel(),a.j=null)},wrb=function(a){G7(a); a.Z&&(g.Ka.clearTimeout(a.Z),a.Z=null);F7(a);a.B.cancel();a.K&&(typeof a.K==="number"&&g.Ka.clearTimeout(a.K),a.K=null)},I7=function(a){orb(a.B)||a.K||(a.K=!0,g.Ae(a.cV,a),a.Aa=0)},yrb=function(a,b){if(grb(a.B)>=a.B.D-(a.K?1:0))return!1; if(a.K)return a.C=b.ra.concat(a.C),!0;if(a.Uh==1||a.Uh==2||a.Aa>=(a.Rf?0:a.yh))return!1;a.K=z7((0,g.Ua)(a.cV,a,b),xrb(a,a.Aa));a.Aa++;return!0},Arb=function(a,b){var c; b?c=b.Tb:c=a.Ya++;var d=a.Ka.clone();g.fk(d,"SID",a.D);g.fk(d,"RID",c);g.fk(d,"AID",a.Wa);L7(a,d);a.N&&a.Y&&g.jk(d,a.N,a.Y);c=new B7(a,a.D,c,a.Aa+1);a.N===null&&(c.Ka=a.Y);b&&(a.C=b.ra.concat(a.C));b=zrb(a,c,1E3);c.setTimeout(Math.round(a.Fd*.5)+Math.round(a.Fd*.5*Math.random()));hrb(a.B,c);Vqb(c,d,b)},L7=function(a,b){a.Ma&&g.pc(a.Ma,function(c,d){g.fk(b,d,c)}); a.G&&Opb({},function(c,d){g.fk(b,d,c)})},zrb=function(a,b,c){c=Math.min(a.C.length,c); var d=a.G?(0,g.Ua)(a.G.c5,a.G,a):null;a:{for(var e=a.C,f=-1;;){var h=["count="+c];f==-1?c>0?(f=e[0].j,h.push("ofs="+f)):f=0:h.push("ofs="+f);for(var l=!0,m=0;m=3)return!1; a.Kb++;a.Z=z7((0,g.Ua)(a.bV,a),xrb(a,a.ra));a.ra++;return!0},vrb=function(a){a.Fa!=null&&(g.Ka.clearTimeout(a.Fa),a.Fa=null)},Brb=function(a){a.j=new B7(a,a.D,"rpc",a.Kb); a.N===null&&(a.j.Ka=a.Y);a.j.Xa=0;var b=a.Ed.clone();g.fk(b,"RID","rpc");g.fk(b,"SID",a.D);g.fk(b,"AID",a.Wa);g.fk(b,"CI",a.Va?"0":"1");!a.Va&&a.Zd&&g.fk(b,"TO",a.Zd);g.fk(b,"TYPE","xmlhttp");L7(a,b);a.N&&a.Y&&g.jk(b,a.N,a.Y);a.Xa&&a.j.setTimeout(a.Xa);var c=a.j;a=a.Ob;c.Ra=1;c.Z=c7(b.clone());c.Y=null;c.Ga=!0;Uqb(c,a)},F7=function(a){a.qa!=null&&(g.Ka.clearTimeout(a.qa),a.qa=null)},drb=function(a,b){var c=null; if(a.j==b){F7(a);vrb(a);a.j=null;var d=2}else if(erb(a.B,b))c=b.ra,jrb(a.B,b),d=1;else return;if(a.Uh!=0)if(b.K)if(d==1){c=b.Y?b.Y.length:0;b=Date.now()-b.Aa;var e=a.Aa;d=Pqb();d.dispatchEvent(new Sqb(d,c,b,e));I7(a)}else krb(a);else{var f=b.Jb;e=b.getLastError();if(e==3||e==0&&f>0||!(d==1&&yrb(a,b)||d==2&&frb(a)))switch(c&&c.length>0&&(b=a.B,b.C=b.C.concat(c)),e){case 1:H7(a,5);break;case 4:H7(a,10);break;case 3:H7(a,6);break;default:H7(a,2)}}},xrb=function(a,b){var c=a.Qf+Math.floor(Math.random()* a.Tf); a.isActive()||(c*=2);return c*b},H7=function(a,b){if(b==2){var c=(0,g.Ua)(a.Kea,a),d=a.Vf,e=!d; d=new g.Xj(d||"//www.google.com/images/cleardot.gif");g.Ka.location&&g.Ka.location.protocol=="http"||g.Yj(d,"https");c7(d);e?qrb(d.toString(),c):rrb(d.toString(),c)}else y7(2);a.Uh=0;a.G&&a.G.eV(b);Crb(a);wrb(a)},Crb=function(a){a.Uh=0; a.Ab=[];if(a.G){var b=prb(a.B);if(b.length!=0||a.C.length!=0)g.Ub(a.Ab,b),g.Ub(a.Ab,a.C),a.B.C.length=0,g.Tb(a.C),a.C.length=0;a.G.dV()}},Drb=function(a){if(a.Uh==0)return a.Ab; var b=[];g.Ub(b,prb(a.B));g.Ub(b,a.C);return b},irb=function(a,b,c){var d=g.gk(c); d.j!=""?(b&&g.Zj(d,b+"."+d.j),g.ak(d,d.C)):(d=g.Ka.location,d=Ppb(d.protocol,b?b+"."+d.hostname:d.hostname,+d.port,c));b=a.Ga;c=a.Ae;b&&c&&g.fk(d,b,c);g.fk(d,"VER",a.aV);L7(a,d);return d},Wqb=function(a,b,c){if(b&&!a.Ra)throw Error("Can't create secondary domain capable XhrIo object."); b=a.kf&&!a.ge?new g.Li(new g.Tj({J2:c})):new g.Li(a.ge);b.K=a.Ra;return b},Erb=function(){},Frb=function(){},N7=function(a,b){g.Uc.call(this); this.j=new urb(b);this.G=a;this.B=b&&b.R$||null;a=b&&b.Q$||null;b&&b.Rma&&(a?a["X-Client-Protocol"]="webchannel":a={"X-Client-Protocol":"webchannel"});this.j.Y=a;a=b&&b.roa||null;b&&b.E_&&(a?a["X-WebChannel-Content-Type"]=b.E_:a={"X-WebChannel-Content-Type":b.E_});b&&b.vX&&(a?a["X-WebChannel-Client-Profile"]=b.vX:a={"X-WebChannel-Client-Profile":b.vX});this.j.Jb=a;(a=b&&b.qoa)&&!g.qb(a)&&(this.j.N=a);this.K=b&&b.Dea||!1;this.D=b&&b.rpa||!1;(b=b&&b.b$)&&!g.qb(b)&&(this.j.Ga=b,g.yc(this.B,b)&&(a=this.B, b in a&&delete a[b]));this.C=new M7(this)},Grb=function(a){Mqb.call(this); a.__headers__&&(this.headers=a.__headers__,this.statusCode=a.__status__,delete a.__headers__,delete a.__status__);var b=a.__sm__;b?this.data=(this.j=g.vc(b))?g.Cc(b,this.j):b:this.data=a},Hrb=function(a){Nqb.call(this); this.status=1;this.errorCode=a},M7=function(a){this.j=a},Irb=function(a,b){this.B=a; this.j=b},Jrb=function(a){return Drb(a.j).map(function(b){var c=a.B; b=b.map;"__data__"in b?(b=b.__data__,c=c.D?Lpb(b):b):c=b;return c})},O7=function(a,b){if(typeof a!=="function")throw Error("Fn must not be null and must be a function"); return g.Ka.setTimeout(function(){a()},b)},Q7=function(a){P7.dispatchEvent(new Krb(P7,a))},Krb=function(a){g.nb.call(this,"statevent",a)},R7=function(a,b,c,d){this.j=a; this.D=b;this.N=c;this.K=d||1;this.B=45E3;this.C=new g.kk(this);this.G=new g.Je;this.G.setInterval(250)},Mrb=function(a,b,c){a.yI=1; a.mD=c7(b.clone());a.Yv=c;a.Ga=!0;Lrb(a,null)},Nrb=function(a,b,c,d,e){a.yI=1; a.mD=c7(b.clone());a.Yv=null;a.Ga=c;e&&(a.X1=!1);Lrb(a,d)},Lrb=function(a,b){a.pD=Date.now(); Orb(a);a.xI=a.mD.clone();d7(a.xI,"t",a.K);a.AI=0;a.vj=a.j.sN(a.j.qD()?b:null);a.qN>0&&(a.wI=new v7((0,g.Ua)(a.hV,a,a.vj),a.qN));a.C.listen(a.vj,"readystatechange",a.e5);b=a.Wv?g.Ec(a.Wv):{};a.Yv?(a.zI="POST",b["Content-Type"]="application/x-www-form-urlencoded",a.vj.send(a.xI,a.zI,a.Yv,b)):(a.zI="GET",a.X1&&!g.lc&&(b.Connection="close"),a.vj.send(a.xI,a.zI,null,b));a.j.ys(1)},Rrb=function(a,b){var c=a.AI,d=b.indexOf("\n",c); if(d==-1)return Prb;c=Number(b.substring(c,d));if(isNaN(c))return Qrb;d+=1;if(d+c>b.length)return Prb;b=b.slice(d,d+c);a.AI=d+c;return b},Orb=function(a){a.rN=Date.now()+a.B; Srb(a,a.B)},Srb=function(a,b){if(a.oz!=null)throw Error("WatchDog timer not null"); a.oz=O7((0,g.Ua)(a.d5,a),b)},Trb=function(a){a.oz&&(g.Ka.clearTimeout(a.oz),a.oz=null)},Urb=function(a){a.j.Og()||a.nD||a.j.uN(a)},S7=function(a){Trb(a); g.gb(a.wI);a.wI=null;a.G.stop();a.C.removeAll();if(a.vj){var b=a.vj;a.vj=null;b.abort();b.dispose()}a.e3&&(a.e3=null)},Vrb=function(a,b){try{a.j.iV(a,b),a.j.ys(4)}catch(c){}},Xrb=function(a,b,c,d,e){if(d==0)c(!1); else{var f=e||0;d--;Wrb(a,b,function(h){h?c(!0):g.Ka.setTimeout(function(){Xrb(a,b,c,d,f)},f)})}},Wrb=function(a,b,c){var d=new Image; d.onload=function(){try{T7(d),c(!0)}catch(e){}}; d.onerror=function(){try{T7(d),c(!1)}catch(e){}}; d.onabort=function(){try{T7(d),c(!1)}catch(e){}}; d.ontimeout=function(){try{T7(d),c(!1)}catch(e){}}; g.Ka.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b); d.src=a},T7=function(a){a.onload=null; a.onerror=null;a.onabort=null;a.ontimeout=null},Yrb=function(a){this.j=a; this.B=new w7},Zrb=function(a){var b=U7(a.j,a.nE,"/mail/images/cleardot.gif"); c7(b);Xrb(b.toString(),5E3,(0,g.Ua)(a.w7,a),3,2E3);a.ys(1)},$rb=function(a){var b=a.j.K; b!=null?(Q7(5),b?(Q7(11),V7(a.j,a,!1)):(Q7(12),V7(a.j,a,!0))):(a.jl=new R7(a),a.jl.Wv=a.tN,b=a.j,b=U7(b,b.qD()?a.BI:null,a.vN),Q7(5),d7(b,"TYPE","xmlhttp"),Nrb(a.jl,b,!1,a.BI,!1))},asb=function(a,b,c){this.j=1; this.B=[];this.C=[];this.G=new w7;this.Y=a||null;this.K=b!=null?b:null;this.Z=c||!1},bsb=function(a,b){this.j=a; this.map=b;this.context=null},csb=function(a,b,c,d){g.nb.call(this,"timingevent",a); this.size=b;this.rtt=c;this.retries=d},dsb=function(a){g.nb.call(this,"serverreachability",a)},fsb=function(a){a.f5(1,0); a.CI=U7(a,null,a.xN);esb(a)},gsb=function(a){a.Kt&&(a.Kt.abort(),a.Kt=null); a.Xg&&(a.Xg.cancel(),a.Xg=null);a.lr&&(g.Ka.clearTimeout(a.lr),a.lr=null);W7(a);a.zk&&(a.zk.cancel(),a.zk=null);a.nt&&(g.Ka.clearTimeout(a.nt),a.nt=null)},hsb=function(a,b){if(a.j==0)throw Error("Invalid operation: sending map when state is closed"); a.B.push(new bsb(a.g5++,b));a.j!=2&&a.j!=3||esb(a)},isb=function(a){var b=0; a.Xg&&b++;a.zk&&b++;return b},esb=function(a){a.zk||a.nt||(a.nt=O7((0,g.Ua)(a.mV,a),0),a.qz=0)},lsb=function(a,b){if(a.j==1){if(!b){a.sD=Math.floor(Math.random()*1E5); b=a.sD++;var c=new R7(a,"",b);c.Wv=a.vp;var d=jsb(a),e=a.CI.clone();g.fk(e,"RID",b);g.fk(e,"CVER","1");X7(a,e);Mrb(c,e,d);a.zk=c;a.j=2}}else a.j==3&&(b?ksb(a,b):a.B.length==0||a.zk||ksb(a))},ksb=function(a,b){if(b)if(a.Zv>6){a.B=a.C.concat(a.B); a.C.length=0;var c=a.sD-1;b=jsb(a)}else c=b.N,b=b.Yv;else c=a.sD++,b=jsb(a);var d=a.CI.clone();g.fk(d,"SID",a.D);g.fk(d,"RID",c);g.fk(d,"AID",a.rz);X7(a,d);c=new R7(a,a.D,c,a.qz+1);c.Wv=a.vp;c.setTimeout(1E4+Math.round(1E4*Math.random()));a.zk=c;Mrb(c,d,b)},X7=function(a,b){a.Ti&&(a=a.Ti.qV())&&g.pc(a,function(c,d){g.fk(b,d,c)})},jsb=function(a){var b=Math.min(a.B.length,1E3),c=["count="+b]; if(a.Zv>6&&b>0){var d=a.B[0].j;c.push("ofs="+d)}else d=0;for(var e={},f=0;f=3)return!1; a.N++;a.lr=O7((0,g.Ua)(a.lV,a),nsb(a,a.pz));a.pz++;return!0},V7=function(a,b,c){a.dN=a.K==null?c:!a.K; a.wp=b.jr;a.Z||fsb(a)},W7=function(a){a.cw!=null&&(g.Ka.clearTimeout(a.cw),a.cw=null)},nsb=function(a,b){var c=5E3+Math.floor(Math.random()*1E4); a.isActive()||(c*=2);return c*b},Y7=function(a,b){if(b==2||b==9){var c=null; a.Ti&&(c=null);var d=(0,g.Ua)(a.Jea,a);c||(c=new g.Xj("//www.google.com/images/cleardot.gif"),c7(c));Wrb(c.toString(),1E4,d)}else Q7(2);psb(a,b)},psb=function(a,b){a.j=0; a.Ti&&a.Ti.nV(b);qsb(a);gsb(a)},qsb=function(a){a.j=0; a.wp=-1;if(a.Ti)if(a.C.length==0&&a.B.length==0)a.Ti.yN();else{var b=g.Tb(a.C),c=g.Tb(a.B);a.C.length=0;a.B.length=0;a.Ti.yN(b,c)}},U7=function(a,b,c){var d=g.gk(c); if(d.j!="")b&&g.Zj(d,b+"."+d.j),g.ak(d,d.C);else{var e=window.location;d=Ppb(e.protocol,b?b+"."+e.hostname:e.hostname,+e.port,c)}a.rD&&g.pc(a.rD,function(f,h){g.fk(d,h,f)}); g.fk(d,"VER",a.Zv);X7(a,d);return d},rsb=function(){},ssb=function(){this.j=[]; this.B=[]},tsb=function(a){g.nb.call(this,"channelMessage"); this.message=a},usb=function(a){g.nb.call(this,"channelError"); this.error=a},vsb=function(a,b){this.action=a; this.params=b||{}},Z7=function(a,b){g.O.call(this); this.j=new g.Lo(this.zca,0,this);g.P(this,this.j);this.dj=5E3;this.B=0;if(typeof a==="function")b&&(a=(0,g.Ua)(a,b));else if(a&&typeof a.handleEvent==="function")a=(0,g.Ua)(a.handleEvent,a);else throw Error("Invalid listener argument");this.C=a},wsb=function(a,b,c,d,e){c=c===void 0?!1:c; d=d===void 0?function(){return""}:d; e=e===void 0?!1:e;this.Aa=a;this.N=b;this.C=new g.lp;this.B=new Z7(this.Oda,this);this.j=null;this.qa=!1;this.K=null;this.Y="";this.Z=this.G=0;this.D=[];this.Ra=c;this.ra=d;this.Va=e;this.Ka=new Qpb;this.Fa=new Spb;this.Ma=new Upb;this.Ga=new Wpb;this.Wa=new Ypb;this.Ya=new Zpb},xsb=function(a){if(a.j){var b=a.ra(),c=a.j.vp||{}; b?c["x-youtube-lounge-xsrf-token"]=b:delete c["x-youtube-lounge-xsrf-token"];a.j.vp=c}},$7=function(a){this.scheme="https"; this.port=this.domain="";this.j="/api/lounge";this.B=!0;a=a||document.location.href;var b=Number(g.zi(4,a))||"";b&&(this.port=":"+b);this.domain=g.Ai(a)||"";a=g.xb();a.search("MSIE")>=0&&(a=a.match(/MSIE ([\d.]+)/)[1],g.wb(a,"10.0")<0&&(this.B=!1))},a8=function(a,b){var c=a.j; a.B&&(c=a.scheme+"://"+a.domain+a.port+a.j);return g.Hi(c+b,{})},ysb=function(a,b){g.Uc.call(this); var c=this;this.Hd=a();this.Hd.subscribe("handlerOpened",this.j5,this);this.Hd.subscribe("handlerClosed",this.onClosed,this);this.Hd.subscribe("handlerError",function(d,e){c.onError(e)}); this.Hd.subscribe("handlerMessage",this.onMessage,this);this.j=b},zsb=function(a,b,c){var d=this; c=c===void 0?function(){return""}:c; var e=e===void 0?new Frb:e;var f=f===void 0?new g.lp:f;this.pathPrefix=a;this.j=b;this.Aa=c;this.G=f;this.Z=null;this.Y=this.N=0;this.channel=null;this.K=0;this.C=new Z7(function(){d.C.isActive();var h;((h=d.channel)==null?void 0:grb((new Irb(h,h.j)).j.B))===0&&d.connect(d.Z,d.N)}); this.D={};this.B={};this.qa=!1;this.logger=null;this.ra=[];this.Bg=void 0;this.Ka=new Qpb;this.Fa=new Spb;this.Ma=new Upb;this.Ga=new Wpb},Asb=function(a){g.Lc(a.channel,"m",function(){a.K=3; a.C.reset();a.Z=null;a.N=0;for(var b=g.w(a.ra),c=b.next();!c.done;c=b.next())c=c.value,a.channel&&a.channel.send(c);a.ra=[];a.publish("webChannelOpened");Rpb(a.Ka,"WEB_CHANNEL")}); g.Lc(a.channel,"n",function(){a.K=0;a.C.isActive()||a.publish("webChannelClosed");var b,c=(b=a.channel)==null?void 0:Jrb(new Irb(b,b.j));c&&(a.ra=[].concat(g.x(c)));Tpb(a.Fa,"WEB_CHANNEL")}); g.Lc(a.channel,"p",function(b){var c=b.data;c[0]==="gracefulReconnect"?(a.C.start(),a.channel&&a.channel.close()):a.publish("webChannelMessage",new vsb(c[0],c[1]));a.Bg=b.statusCode;Vpb(a.Ma,"WEB_CHANNEL")}); g.Lc(a.channel,"o",function(){a.Bg===401||a.C.start();a.publish("webChannelError");Xpb(a.Ga,"WEB_CHANNEL")})},Bsb=function(a){var b=a.Aa(); b?a.D["x-youtube-lounge-xsrf-token"]=b:delete a.D["x-youtube-lounge-xsrf-token"]},Csb=function(a){g.Uc.call(this); this.j=a();this.j.subscribe("webChannelOpened",this.k5,this);this.j.subscribe("webChannelClosed",this.onClosed,this);this.j.subscribe("webChannelError",this.onError,this);this.j.subscribe("webChannelMessage",this.onMessage,this)},Dsb=function(a,b,c,d,e){function f(){return new wsb(a8(a,"/bc"),b,!1,c,d)} c=c===void 0?function(){return""}:c; return g.hr("enable_mdx_web_channel_desktop")?new Csb(function(){return new zsb(a8(a,"/wc"),b,c)}):new ysb(f,e)},Hsb=function(){var a=Esb; Fsb();b8.push(a);Gsb()},c8=function(a,b){Fsb(); var c=Isb(a,String(b));b8.length==0?Jsb(c):(Gsb(),g.cc(b8,function(d){d(c)}))},d8=function(a){c8("CP",a)},Fsb=function(){b8||(b8=g.Ma("yt.mdx.remote.debug.handlers_")||[],g.La("yt.mdx.remote.debug.handlers_",b8))},Jsb=function(a){var b=(e8+1)%50; e8=b;f8[b]=a;g8||(g8=b==49)},Gsb=function(){var a=b8; if(f8[0]){var b=g8?e8:-1;do{b=(b+1)%50;var c=f8[b];g.cc(a,function(d){d(c)})}while(b!=e8); f8=Array(50);e8=-1;g8=!1}},Isb=function(a,b){var c=(Date.now()-Ksb)/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("")},h8=function(a){g.Xw.call(this); this.K=a;this.screens=[]},Lsb=function(a,b){var c=a.get(b.uuid)||a.get(b.id); if(c)return a=c.name,c.id=b.id||c.id,c.name=b.name,c.token=b.token,c.uuid=b.uuid||c.uuid,c.name!=a;a.screens.push(b);return!0},Msb=function(a,b){var c=a.screens.length!=b.length; a.screens=g.Wm(a.screens,function(f){return!!mqb(b,f)}); for(var d=0,e=b.length;d0&&a.D0&&u8(a,c)},function(b){a.G=function(){}; a.Lj(b)})},otb=function(a){var b={}; b.pairingCode=a.Fa;b.theme=a.Ra;xqb()&&(b.env_useStageMdx=1);return g.Gi(b)},ptb=function(a){return new Promise(function(b){a.Fa=kqb(); if(a.Ka){var c=new chrome.cast.DialLaunchResponse(!0,otb(a));b(c);ntb(a)}else a.qa=function(){g.er(a.Y);a.qa=function(){}; a.Y=NaN;var d=new chrome.cast.DialLaunchResponse(!0,otb(a));b(d);ntb(a)},a.Y=g.cr(function(){a.qa()},100)})},rtb=function(a,b,c){a.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(b)); var d=new j7(b);return(new Promise(function(e){qtb(a,d,function(f){f?(a.ra=!0,n8(a.D,d),p8(a,d),u8(a,c)):g.Hq(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(b)+" is not online."));e(f)},5)})).then(function(e){return e?new chrome.cast.DialLaunchResponse(!1):ptb(a)})},stb=function(a,b){var c=a.Z.receiver.label,d=a.B.friendlyName; return(new Promise(function(e){Ysb(a.D,c,b,d,function(f){f&&f.token&&p8(a,f);e(f)},function(f){q8(a,"Failed to get DIAL screen: "+f); e(null)})})).then(function(e){return e&&e.token?new chrome.cast.DialLaunchResponse(!1):ptb(a)})},qtb=function(a,b,c,d){g.er(a.K); a.K=0;$sb(a.D,b,function(e){e||d<0?c(e):a.K=g.cr(function(){qtb(a,b,c,d-1)},300)})},u8=function(a,b){a.info("getDialAppInfoWithTimeout_ "+b); t8(a)&&(g.er(a.N),a.N=0,b==0?ttb(a):a.N=g.cr(function(){ttb(a)},b))},ttb=function(a){t8(a)&&a.C.getDialAppInfo(function(b){a.info("getDialAppInfo dialLaunchData: "+JSON.stringify(b)); b=b.extraData||{};var c=null;if(b.loungeToken){var d;((d=a.j)==null?void 0:d.token)==b.loungeToken&&(c="staleLoungeToken")}else c="missingLoungeToken";c?(a.Aa=c,u8(a,3E4)):(a.ra=!1,a.Aa="unknown",dtb(a,b.loungeToken),u8(a,b.loungeTokenRefreshIntervalMs))},function(b){a.info("getDialAppInfo error: "+b); a.Aa="noLoungeTokenResponse";u8(a,3E4)})},utb=function(a){g.er(a.K); a.K=0;g.er(a.N);a.N=0;a.G();a.G=function(){}; g.er(a.Y)},v8=function(a,b){o8.call(this,a,b,"ManualSession"); this.C=g.cr((0,g.Ua)(this.bB,this,null),150)},w8=function(a,b){g.Xw.call(this); this.config_=b;this.B=a;this.Z=b.appId||"233637DE";this.D=b.theme||"cl";this.Y=b.disableCastApi||!1;this.K=b.forceMirroring||!1;this.j=null;this.N=!1;this.C=[];this.G=(0,g.Ua)(this.Mba,this)},vtb=function(a,b){return b?g.Lb(a.C,function(c){return k7(b,c.label)},a):null},x8=function(a){c8("Controller",a)},Esb=function(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)},y8=function(a){return a.N||!!a.C.length||!!a.j},z8=function(a,b,c){b!=a.j&&(g.gb(a.j),(a.j=b)?(c?a.publish("yt-remote-cast2-receiver-resumed", b.B):a.publish("yt-remote-cast2-receiver-selected",b.B),b.subscribe("sessionScreen",(0,g.Ua)(a.D0,a,b)),b.subscribe("sessionFailed",function(){return wtb(a,b)}),b.j?a.publish("yt-remote-cast2-session-change",b.j):c&&a.j.bB(null)):a.publish("yt-remote-cast2-session-change",null))},wtb=function(a,b){a.j==b&&a.publish("yt-remote-cast2-session-failed")},xtb=function(a){var b=a.B.rV(),c=a.j&&a.j.B; a=g.nl(b,function(d){c&&k7(d,c.label)&&(c=null);var e=d.uuid?d.uuid:d.id,f=vtb(this,d);f?(f.label=e,f.friendlyName=d.name):(f=new chrome.cast.Receiver(e,d.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},Etb=function(a,b,c,d){d.disableCastApi?A8("Cannot initialize because disabled by Mdx config."):ytb()?ztb(b,d)&&(Atb(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?Btb(a,c):(window.__onGCastApiAvailable=function(e,f){e?Btb(a,c):(B8("Failed to load cast API: "+f),Ctb(!1),Atb(!1),g.ws("yt-remote-cast-available"),g.ws("yt-remote-cast-receiver"), Dtb(),c(!1))},d.loadCastApiSetupScript?g.bv("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"):window.navigator.userAgent.indexOf("Android")>=0&&window.navigator.userAgent.indexOf("Chrome/")>=0&&window.navigator.presentation?zqb()>=60&&Iqb():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?Dqb():zqb()>=89?Kqb():(Hqb(),t7(Jqb.map(Eqb))))):A8("Cannot initialize because not running Chrome")},Dtb=function(){A8("dispose"); var a=C8();a&&a.dispose();g.La("yt.mdx.remote.cloudview.instance_",null);Ftb(!1);g.$u(Gtb);Gtb.length=0},D8=function(){return!!g.vs("yt-remote-cast-installed")},Htb=function(){var a=g.vs("yt-remote-cast-receiver"); return a?a.friendlyName:null},Itb=function(){A8("clearCurrentReceiver"); g.ws("yt-remote-cast-receiver")},Jtb=function(){return D8()?C8()?C8().getCastSession():(B8("getCastSelector: Cast is not initialized."),null):(B8("getCastSelector: Cast API is not installed!"),null)},Ktb=function(){D8()?C8()?E8()?(A8("Requesting cast selector."),C8().requestSession()):(A8("Wait for cast API to be ready to request the session."),Gtb.push(g.Zu("yt-remote-cast2-api-ready",Ktb))):B8("requestCastSelector: Cast is not initialized."):B8("requestCastSelector: Cast API is not installed!")}, F8=function(a,b){E8()?C8().setConnectedScreenStatus(a,b):B8("setConnectedScreenStatus called before ready.")},ytb=function(){var a=g.xb().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.eE||a},Ltb=function(a,b){C8().init(a,b)},ztb=function(a,b){var c=!1; C8()||(a=new w8(a,b),a.subscribe("yt-remote-cast2-availability-change",function(d){g.us("yt-remote-cast-available",d);r7("yt-remote-cast2-availability-change",d)}),a.subscribe("yt-remote-cast2-receiver-selected",function(d){A8("onReceiverSelected: "+d.friendlyName); g.us("yt-remote-cast-receiver",d);r7("yt-remote-cast2-receiver-selected",d)}),a.subscribe("yt-remote-cast2-receiver-resumed",function(d){A8("onReceiverResumed: "+d.friendlyName); g.us("yt-remote-cast-receiver",d);r7("yt-remote-cast2-receiver-resumed",d)}),a.subscribe("yt-remote-cast2-session-change",function(d){A8("onSessionChange: "+l7(d)); d||g.ws("yt-remote-cast-receiver");r7("yt-remote-cast2-session-change",d)}),g.La("yt.mdx.remote.cloudview.instance_",a),c=!0); A8("cloudview.createSingleton_: "+c);return c},C8=function(){return g.Ma("yt.mdx.remote.cloudview.instance_")},Btb=function(a,b){Ctb(!0); Atb(!1);Ltb(a,function(c){c?(Ftb(!0),g.av("yt-remote-cast2-api-ready")):(B8("Failed to initialize cast API."),Ctb(!1),g.ws("yt-remote-cast-available"),g.ws("yt-remote-cast-receiver"),Dtb());b(c)})},A8=function(a){c8("cloudview",a)},B8=function(a){c8("cloudview",a)},Ctb=function(a){A8("setCastInstalled_ "+a); g.us("yt-remote-cast-installed",a)},E8=function(){return!!g.Ma("yt.mdx.remote.cloudview.apiReady_")},Ftb=function(a){A8("setApiReady_ "+a); g.La("yt.mdx.remote.cloudview.apiReady_",a)},Atb=function(a){g.La("yt.mdx.remote.cloudview.initializing_",a)},G8=function(a){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.K=this.N=0;this.trackData=null;this.Hl=this.Zp=!1;this.Z=this.G=this.j=this.D=0;this.C=NaN;this.B=!1;this.reset(a)},Mtb=function(a){a.audioTrackId=null; a.trackData=null;a.playerState=-1;a.Zp=!1;a.Hl=!1;a.N=0;a.K=g.Xa();a.D=0;a.j=0;a.G=0;a.Z=0;a.C=NaN;a.B=!1},H8=function(a){return a.isPlaying()?(g.Xa()-a.K)/1E3:0},I8=function(a,b){a.N=b; a.K=g.Xa()},J8=function(a){switch(a.playerState){case 1:case 1081:return(g.Xa()-a.K)/1E3+a.N; case -1E3:return 0}return a.N},K8=function(a,b,c){var d=a.videoId; a.videoId=b;a.index=c;b!=d&&Mtb(a)},Ntb=function(a){var b={}; b.index=a.index;b.listId=a.listId;b.videoId=a.videoId;b.playerState=a.playerState;b.volume=a.volume;b.muted=a.muted;b.audioTrackId=a.audioTrackId;b.trackData=g.Fc(a.trackData);b.hasPrevious=a.Zp;b.hasNext=a.Hl;b.playerTime=a.N;b.playerTimeAt=a.K;b.seekableStart=a.D;b.seekableEnd=a.j;b.duration=a.G;b.loadedTime=a.Z;b.liveIngestionTime=a.C;return b},M8=function(a,b){g.Xw.call(this); var c=this;this.C=0;this.D=a;this.K=[];this.G=new ssb;this.B=this.j=null;this.Y=(0,g.Ua)(this.zaa,this);this.N=(0,g.Ua)(this.vG,this);this.Z=(0,g.Ua)(this.yaa,this);this.qa=(0,g.Ua)(this.Baa,this);var d=0;a?(d=a.getProxyState(),d!=3&&(a.subscribe("proxyStateChange",this.CT,this),Otb(this))):d=3;d!=0&&(b?this.CT(d):g.cr(function(){c.CT(d)},0)); (a=Jtb())&&L8(this,a);this.subscribe("yt-remote-cast2-session-change",this.qa)},N8=function(a){return new G8(a.D.getPlayerContextData())},Otb=function(a){g.cc("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(b){this.K.push(this.D.subscribe(b,g.Wa(this.Kba,b),this))},a)},Ptb=function(a){g.cc(a.K,function(b){this.D.unsubscribeByKey(b)},a); a.K.length=0},O8=function(a){return a.getState()==1},P8=function(a,b){var c=a.G; c.j.length+c.B.length<50&&a.G.enqueue(b)},Qtb=function(a,b,c){var d=N8(a); I8(d,c);d.playerState!=-1E3&&(d.playerState=b);Q8(a,d)},R8=function(a,b,c){a.D.sendMessage(b,c)},Q8=function(a,b){Ptb(a); a.D.setPlayerContextData(Ntb(b));Otb(a)},L8=function(a,b){a.B&&(a.B.removeUpdateListener(a.Y),a.B.removeMediaListener(a.N),a.vG(null)); a.B=b;a.B&&(d8("Setting cast session: "+a.B.sessionId),a.B.addUpdateListener(a.Y),a.B.addMediaListener(a.N),a.B.media.length&&a.vG(a.B.media[0]))},Rtb=function(a){var b=a.j.media,c=a.j.customData; if(b&&c){var d=N8(a);b.contentId!=d.videoId&&d8("Cast changing video to: "+b.contentId);d.videoId=b.contentId;d.playerState=c.playerState;I8(d,a.j.getEstimatedTime());Q8(a,d)}else d8("No cast media video. Ignoring state update.")},S8=function(a,b,c){return(0,g.Ua)(function(d){this.hg("Failed to "+b+" with cast v2 channel. Error code: "+d.code); d.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.hg("Retrying "+b+" using MDx browser channel."),R8(this,b,c))},a)},V8=function(a,b,c,d){d=d===void 0?!1:d; g.Xw.call(this);var e=this;this.K=NaN;this.Fa=!1;this.Y=this.Z=this.ra=this.Aa=NaN;this.qa=[];this.G=this.N=this.D=this.j=this.B=null;this.Ka=a;this.Ma=d;this.qa.push(g.is(window,"beforeunload",function(){e.bA(2)})); this.C=[];this.j=new G8;this.Ra=b.id;this.Ga=b.idType;this.B=Dsb(this.Ka,c,this.wV,this.Ga=="shortLived",this.Ra);this.B.listen("channelOpened",function(){Stb(e)}); this.B.listen("channelClosed",function(){T8("Channel closed");isNaN(e.K)?p7(!0):p7();e.dispose()}); this.B.listen("channelError",function(f){p7();isNaN(e.rF())?(f==1&&e.Ga=="shortLived"&&e.publish("browserChannelAuthError",f),T8("Channel error: "+f+" without reconnection"),e.dispose()):(e.Fa=!0,T8("Channel error: "+f+" with reconnection in "+e.rF()+" ms"),U8(e,2))}); this.B.listen("channelMessage",function(f){Ttb(e,f)}); this.B.Ls(b.token);this.subscribe("remoteQueueChange",function(){var f=e.j.videoId;g.xs()&&g.us("yt-remote-session-video-id",f)})},Utb=function(a){return g.Lb(a.C,function(b){return b.type=="LOUNGE_SCREEN"})},T8=function(a){c8("conn",a)},U8=function(a,b){a.publish("proxyStateChange",b)},Vtb=function(a){a.K=g.cr(function(){T8("Connecting timeout"); a.bA(1)},2E4)},Wtb=function(a){g.er(a.K); a.K=NaN},Xtb=function(a){g.er(a.Aa); a.Aa=NaN},Ztb=function(a){Ytb(a); a.ra=g.cr(function(){W8(a,"getNowPlaying")},2E4)},Ytb=function(a){g.er(a.ra); a.ra=NaN},Stb=function(a){T8("Channel opened"); a.Fa&&(a.Fa=!1,Xtb(a),a.Aa=g.cr(function(){T8("Timing out waiting for a screen.");a.bA(1)},15E3))},aub=function(a,b){var c=null; if(b){var d=Utb(a);d&&(c={clientName:d.clientName,deviceMake:d.brand,deviceModel:d.model,osVersion:d.osVersion})}g.La("yt.mdx.remote.remoteClient_",c);b&&(Wtb(a),Xtb(a));c=a.B.MA()&&isNaN(a.K);b==c?b&&(U8(a,1),W8(a,"getSubtitlesTrack")):b?(a.CY()&&a.j.reset(),U8(a,1),W8(a,"getNowPlaying"),$tb(a)):a.bA(1)},bub=function(a,b){var c=b.params.videoId; delete b.params.videoId;c==a.j.videoId&&(g.Bc(b.params)?a.j.trackData=null:a.j.trackData=b.params,a.publish("remotePlayerChange"))},cub=function(a,b,c){var d=b.params.videoId||b.params.video_id,e=parseInt(b.params.currentIndex,10); a.j.listId=b.params.listId||a.j.listId;K8(a.j,d,e);a.publish("remoteQueueChange",c)},eub=function(a,b){b.params=b.params||{}; cub(a,b,"NOW_PLAYING_MAY_CHANGE");dub(a,b);a.publish("autoplayDismissed")},dub=function(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10); I8(a.j,isNaN(c)?0:c);c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;c==-1&&a.j.playerState==-1E3&&(c=-1E3);a.j.playerState=c;c=Number(b.params.loadedTime);a.j.Z=isNaN(c)?0:c;a.j.Yo(Number(b.params.duration));c=a.j;var d=Number(b.params.liveIngestionTime);c.C=d;c.B=isNaN(d)?!1:!0;c=a.j;d=Number(b.params.seekableStartTime);b=Number(b.params.seekableEndTime);c.D=isNaN(d)?0:d;c.j=isNaN(b)?0:b;a.j.playerState==1?Ztb(a):Ytb(a);a.publish("remotePlayerChange")},fub=function(a,b){if(a.j.playerState!=-1E3){var c= 1085; switch(parseInt(b.params.adState,10)){case 1:c=1081;break;case 2:c=1084;break;case 0:c=1083}a.j.playerState=c;b=parseInt(b.params.currentTime,10);I8(a.j,isNaN(b)?0:b);a.publish("remotePlayerChange")}},gub=function(a,b){var c=b.params.muted=="true"; a.j.volume=parseInt(b.params.volume,10);a.j.muted=c;a.publish("remotePlayerChange")},hub=function(a,b){a.N=b.params.videoId; a.publish("nowAutoplaying",parseInt(b.params.timeout,10))},iub=function(a,b){a.N=b.params.videoId||null; a.publish("autoplayUpNext",a.N)},jub=function(a,b){a.G=b.params.autoplayMode; a.publish("autoplayModeChange",a.G);a.G=="DISABLED"&&a.publish("autoplayDismissed")},kub=function(a,b){var c=b.params.hasNext=="true"; a.j.Zp=b.params.hasPrevious=="true";a.j.Hl=c;a.publish("previousNextChange")},Ttb=function(a,b){b=b.message; b.params?T8("Received: action="+b.action+", params="+g.si(b.params)):T8("Received: action="+b.action+" {}");switch(b.action){case "loungeStatus":b=e7(b.params.devices);a.C=g.nl(b,function(d){return new dqb(d)}); b=!!g.Lb(a.C,function(d){return d.type=="LOUNGE_SCREEN"}); aub(a,b);b=a.IZ("mlm");a.publish("multiStateLoopEnabled",b);break;case "loungeScreenDisconnected":g.Rb(a.C,function(d){return d.type=="LOUNGE_SCREEN"}); aub(a,!1);break;case "remoteConnected":var c=new dqb(e7(b.params.device));g.Lb(a.C,function(d){return c?d.id==c.id:!1})||Ipb(a.C,c); break;case "remoteDisconnected":c=new dqb(e7(b.params.device));g.Rb(a.C,function(d){return c?d.id==c.id:!1}); break;case "gracefulDisconnect":break;case "playlistModified":cub(a,b,"QUEUE_MODIFIED");break;case "nowPlaying":eub(a,b);break;case "onStateChange":dub(a,b);break;case "onAdStateChange":fub(a,b);break;case "onVolumeChanged":gub(a,b);break;case "onSubtitlesTrackChanged":bub(a,b);break;case "nowAutoplaying":hub(a,b);break;case "autoplayDismissed":a.publish("autoplayDismissed");break;case "autoplayUpNext":iub(a,b);break;case "onAutoplayModeChanged":jub(a,b);break;case "onHasPreviousNextChanged":kub(a, b);break;case "requestAssistedSignIn":a.publish("assistedSignInRequested",b.params.authCode);break;case "onLoopModeChanged":a.publish("loopModeChange",b.params.loopMode);break;default:T8("Unrecognized action: "+b.action)}},$tb=function(a){g.er(a.Y); a.Y=g.cr(function(){a.bA(1)},864E5)},W8=function(a,b,c){c?T8("Sending: action="+b+", params="+g.si(c)):T8("Sending: action="+b); a.B.sendMessage(b,c)},lub=function(a){h8.call(this,"ScreenServiceProxy"); this.jh=a;this.j=[];this.j.push(this.jh.$_s("screenChange",(0,g.Ua)(this.u5,this)));this.j.push(this.jh.$_s("onlineScreenChange",(0,g.Ua)(this.tba,this)))},qub=function(a,b){wqb(); if(!q7||!q7.get("yt-remote-disable-remote-module-for-dev")){b=g.Eq("MDX_CONFIG")||b;nqb();rqb();X8||(X8=new $7(b?b.loungeApiHost:void 0),xqb()&&(X8.j="/api/loungedev"));W9||(W9=g.Ma("yt.mdx.remote.deferredProxies_")||[],g.La("yt.mdx.remote.deferredProxies_",W9));mub();var c=Y9();if(!c){var d=new m8(X8,b?b.disableAutomaticScreenCache||!1:!1);g.La("yt.mdx.remote.screenService_",d);c=Y9();var e={};b&&(e={appId:b.appId,disableDial:b.disableDial,theme:b.theme,loadCastApiSetupScript:b.loadCastApiSetupScript, disableCastApi:b.disableCastApi,enableDialLoungeToken:b.enableDialLoungeToken,enableCastLoungeToken:b.enableCastLoungeToken,forceMirroring:b.forceMirroring});g.La("yt.mdx.remote.enableConnectWithInitialState_",b?b.enableConnectWithInitialState||!1:!1);Etb(a,d,function(f){f?Z9()&&F8(Z9(),"YouTube TV"):d.subscribe("onlineScreenChange",function(){r7("yt-remote-receiver-availability-change")})},e)}b&&!g.Ma("yt.mdx.remote.initialized_")&&(g.La("yt.mdx.remote.initialized_",!0),$9("Initializing: "+g.si(b)), a$.push(g.Zu("yt-remote-cast2-api-ready",function(){r7("yt-remote-api-ready")})),a$.push(g.Zu("yt-remote-cast2-availability-change",function(){r7("yt-remote-receiver-availability-change")})),a$.push(g.Zu("yt-remote-cast2-receiver-selected",function(){b$(null); r7("yt-remote-auto-connect","cast-selector-receiver")})),a$.push(g.Zu("yt-remote-cast2-receiver-resumed",function(){r7("yt-remote-receiver-resumed","cast-selector-receiver")})),a$.push(g.Zu("yt-remote-cast2-session-change",nub)),a$.push(g.Zu("yt-remote-connection-change",function(f){f?F8(Z9(),"YouTube TV"):c$()||(F8(null,null),Itb())})),a$.push(g.Zu("yt-remote-cast2-session-failed",function(){r7("yt-remote-connection-failed")})),a=oub(),b.isAuto&&(a.id+="#dial"),e=b.capabilities||[],g.hr("desktop_enable_autoplay")&& e.push("atp"),e.length>0&&(a.capabilities=e),a.name=b.device,a.app=b.app,(b=b.theme)&&(a.theme=b),$9(" -- with channel params: "+g.si(a)),a?(g.us("yt-remote-session-app",a.app),g.us("yt-remote-session-name",a.name)):(g.ws("yt-remote-session-app"),g.ws("yt-remote-session-name")),g.La("yt.mdx.remote.channelParams_",a),c.start(),Z9()||pub())}},rub=function(){var a=Y9().jh.$_gos(); var b=d$();b&&e$()&&(mqb(a,b)||a.push(b));return lqb(a)},tub=function(){var a=sub(); !a&&D8()&&Htb()&&(a={key:"cast-selector-receiver",name:Htb()});return a},sub=function(){var a=rub(),b=d$(); b||(b=c$());return g.Lb(a,function(c){return b&&k7(b,c.key)?!0:!1})},d$=function(){var a=Z9(); if(!a)return null;var b=Y9().El();return m7(b,a)},nub=function(a){$9("remote.onCastSessionChange_: "+l7(a)); if(a){var b=d$();if(b&&b.id==a.id){if(F8(b.id,"YouTube TV"),a.idType=="shortLived"&&(a=a.token))f$&&(f$.token=a),(b=e$())&&b.Ls(a)}else b&&g$(),h$(a,1)}else e$()&&g$()},g$=function(){E8()?C8().stopSession():B8("stopSession called before API ready."); var a=e$();a&&(a.disconnect(1),uub(null))},vub=function(){var a=e$(); return!!a&&a.getProxyState()!=3},$9=function(a){c8("remote",a)},Y9=function(){if(!wub){var a=g.Ma("yt.mdx.remote.screenService_"); wub=a?new lub(a):null}return wub},Z9=function(){return g.Ma("yt.mdx.remote.currentScreenId_")},xub=function(a){g.La("yt.mdx.remote.currentScreenId_",a)},yub=function(){return g.Ma("yt.mdx.remote.connectData_")},b$=function(a){g.La("yt.mdx.remote.connectData_",a)},e$=function(){return g.Ma("yt.mdx.remote.connection_")},uub=function(a){var b=e$(); b$(null);a||xub("");g.La("yt.mdx.remote.connection_",a);W9&&(g.cc(W9,function(c){c(a)}),W9.length=0); b&&!a?r7("yt-remote-connection-change",!1):!b&&a&&r7("yt-remote-connection-change",!0)},c$=function(){var a=g.xs(); if(!a)return null;var b=Y9();if(!b)return null;b=b.El();return m7(b,a)},h$=function(a,b){Z9(); d$()&&d$();if(i$)f$=a;else{xub(a.id);var c=g.Ma("yt.mdx.remote.enableConnectWithInitialState_")||!1;a=new V8(X8,a,oub(),c);a.connect(b,yub());a.subscribe("beforeDisconnect",function(d){r7("yt-remote-before-disconnect",d)}); a.subscribe("beforeDispose",function(){e$()&&(e$(),uub(null))}); a.subscribe("browserChannelAuthError",function(){var d=d$();d&&d.idType=="shortLived"&&(E8()?C8().handleBrowserChannelAuthError():B8("refreshLoungeToken called before API ready."))}); uub(a)}},pub=function(){var a=c$(); a?($9("Resume connection to: "+l7(a)),h$(a,0)):(p7(),Itb(),$9("Skipping connecting because no session screen found."))},mub=function(){var a=oub(); if(g.Bc(a)){a=o7();var b=g.vs("yt-remote-session-name")||"",c=g.vs("yt-remote-session-app")||"";a={device:"REMOTE_CONTROL",id:a,name:b,app:c,mdxVersion:3};a.authuser=String(g.Eq("SESSION_INDEX","0"));(b=g.Eq("DELEGATED_SESSION_ID"))&&(a.pageId=String(b));g.La("yt.mdx.remote.channelParams_",a)}},oub=function(){return g.Ma("yt.mdx.remote.channelParams_")||{}},Bub=function(a,b,c){g.O.call(this); var d=this;this.module=a;this.J=b;this.Ic=c;this.events=new g.iE(this);this.D=!1;this.G=new g.fF(64);this.j=new g.Lo(this.F2,500,this);this.B=new g.Lo(this.G2,1E3,this);this.N=new u7(this.gfa,0,this);this.C={};this.Z=new g.Lo(this.D3,1E3,this);this.K=new v7(this.seekTo,1E3,this);this.Y=this.events.T(this.J,"onVolumeChange",function(e){zub(d,e)}); g.P(this,this.events);this.events.T(b,"onCaptionsTrackListChanged",this.bba);this.events.T(b,"captionschanged",this.waa);this.events.T(b,"captionssettingschanged",this.N2);this.events.T(b,"videoplayerreset",this.IL);this.events.T(b,"mdxautoplaycancel",function(){d.Ic.OX()}); b.L("enable_mdx_video_play_directly")&&this.events.T(b,"videodatachange",function(){Aub(d.module)||j$(d)||k$(d,0)}); a=this.Ic;a.La();a.subscribe("proxyStateChange",this.z0,this);a.subscribe("remotePlayerChange",this.FG,this);a.subscribe("remoteQueueChange",this.IL,this);a.subscribe("previousNextChange",this.w0,this);a.subscribe("nowAutoplaying",this.s0,this);a.subscribe("autoplayDismissed",this.X_,this);g.P(this,this.j);g.P(this,this.B);g.P(this,this.N);g.P(this,this.Z);g.P(this,this.K);this.N2();this.IL();this.FG()},zub=function(a,b){if(j$(a)){a.Ic.unsubscribe("remotePlayerChange",a.FG,a); var c=Math.round(b.volume);b=!!b.muted;var d=N8(a.Ic);if(c!==d.volume||b!==d.muted)a.Ic.setVolume(c,b),a.Z.start();a.Ic.subscribe("remotePlayerChange",a.FG,a)}},Cub=function(a){a.Tc(0); a.j.stop();a.Ec(new g.fF(64))},Dub=function(a,b){if(j$(a)&&!a.D){var c=null; b&&(c={style:a.J.getSubtitlesUserSettings()},g.Gc(c,b));a.Ic.vV(a.J.getVideoData(1).videoId,c);a.C=N8(a.Ic).trackData}},k$=function(a,b){var c=a.J.getPlaylist(); if(c==null?0:c.listId){var d=c.index;var e=c.listId.toString()}c=a.J.getVideoData(1);a.Ic.playVideo(c.videoId,b,d,e,c.playerParams,c.Ma,Hpb(c));a.Ec(new g.fF(1))},Eub=function(a,b){if(b){var c=a.J.getOption("captions","tracklist",{rZ:1}); c&&c.length?(a.J.setOption("captions","track",b),a.D=!1):(a.J.loadModule("captions"),a.D=!0)}else a.J.setOption("captions","track",{})},j$=function(a){return N8(a.Ic).videoId===a.J.getVideoData(1).videoId},l$=function(){g.U.call(this,{I:"div", S:"ytp-mdx-popup-dialog",X:{role:"dialog"},V:[{I:"div",S:"ytp-mdx-popup-dialog-inner-content",V:[{I:"div",S:"ytp-mdx-popup-title",va:"You're signed out"},{I:"div",S:"ytp-mdx-popup-description",va:"Videos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer."},{I:"div",S:"ytp-mdx-privacy-popup-buttons",V:[{I:"button",Na:["ytp-button","ytp-mdx-privacy-popup-cancel"],va:"Cancel"},{I:"button",Na:["ytp-button", "ytp-mdx-privacy-popup-confirm"],va:"Confirm"}]}]}]});this.j=new g.Tx(this,250);this.cancelButton=this.Ea("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.Ea("ytp-mdx-privacy-popup-confirm");g.P(this,this.j);this.T(this.cancelButton,"click",this.B);this.T(this.confirmButton,"click",this.C)},m$=function(a){g.U.call(this,{I:"div", S:"ytp-remote",V:[{I:"div",S:"ytp-remote-display-status",V:[{I:"div",S:"ytp-remote-display-status-icon",V:[g.Zra()]},{I:"div",S:"ytp-remote-display-status-text",va:"{{statustext}}"}]}]});this.api=a;this.j=new g.Tx(this,250);g.P(this,this.j);this.T(a,"presentingplayerstatechange",this.onStateChange);this.zd(a.getPlayerStateObject())},n$=function(a,b){g.aT.call(this,"Play on",1,a,b); this.J=a;this.ev={};this.T(a,"onMdxReceiversChange",this.D);this.T(a,"presentingplayerstatechange",this.D);this.D()},Fub=function(a){g.ST.call(this,a); this.qq={key:kqb(),name:"This computer"};this.zm=null;this.subscriptions=[];this.LS=this.Ic=null;this.ev=[this.qq];this.Nt=this.qq;this.Fe=new g.fF(64);this.WZ=0;this.xi=-1;this.YG=!1;this.XG=this.VB=null;if(!g.xO(this.player.U())&&!g.yy(this.player.U())){a=this.player;var b=g.WQ(a);b&&(b=b.Mm())&&(b=new n$(a,b),g.P(this,b));b=new m$(a);g.P(this,b);g.oR(a,b.element,4);this.VB=new l$;g.P(this,this.VB);g.oR(a,this.VB.element,4);this.YG=!!c$()}},o$=function(a){a.XG&&(a.player.removeEventListener("presentingplayerstatechange", a.XG),a.XG=null)},Gub=function(a,b,c){a.Fe=c; a.player.publish("presentingplayerstatechange",new g.dy(c,b))},p$=function(a,b){if(b.key!==a.Nt.key)if(b.key===a.qq.key)g$(); else if(Aub(a)&&Hub(a),a.Nt=b,!a.player.U().L("disable_mdx_connection_in_mdx_module_for_music_web")||!g.yy(a.player.U())){var c=a.player.getPlaylistId();var d=a.player.getVideoData(1);var e=d.videoId;if(!c&&!e||(a.player.getAppState()===2||a.player.getAppState()===1)&&a.player.U().L("should_clear_video_data_on_player_cued_unstarted"))d=null;else{var f=a.player.getPlaylist();if(f){var h=[];for(var l=0;l2*this.size&&i7(this),!0):!1}; g.k.get=function(a,b){return g7(this.B,a)?this.B[a]:b}; g.k.set=function(a,b){g7(this.B,a)||(this.size+=1,this.j.push(a),this.Jv++);this.B[a]=b}; g.k.forEach=function(a,b){for(var c=this.Yn(),d=0;d=d.j.length)return g.n1;var f=d.j[b++];return g.Sm(a?f:d.B[f])}; return e}; var eqb={vga:"atp",Rka:"ska",nka:"que",zja:"mus",Pka:"sus",bia:"dsp",Cka:"seq",qja:"mic",pha:"dpa",Cga:"cds",xja:"mlm",nha:"dsdtr",Gja:"ntb",Gla:"vsp",Aha:"scn",pka:"rpe",jha:"dcn",lha:"dcp",Vja:"pas",mha:"drq",Lja:"opf",zha:"els",Hka:"svq",yja:"mvp"},fqb={Fla:"u",Mga:"cl",Wia:"k",tia:"i",bha:"cr",Aja:"m",Oha:"g",Z6:"up"},qqb="",q7=null; yqb.prototype.flush=function(a,b){a=a===void 0?[]:a;b=b===void 0?!1:b;if(g.hr("enable_client_streamz_web")){a=g.w(a);for(var c=a.next();!c.done;c=a.next())c=g.dfa(c.value),c={serializedIncrementBatch:g.Pe(c.j())},g.Xs("streamzIncremented",c,{sendIsolatedPayload:b})}}; var s7,Gqb=Aqb("loadCastFramework")||Aqb("loadCastApplicationFramework"),Jqb=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Ya(u7,g.O);g.k=u7.prototype;g.k.X4=function(a){this.D=arguments;this.j=!1;this.ud?this.C=g.Xa()+this.dj:this.ud=g.Ke(this.G,this.dj)}; g.k.stop=function(){this.ud&&(g.Ka.clearTimeout(this.ud),this.ud=null);this.C=null;this.j=!1;this.D=[]}; g.k.pause=function(){++this.B}; g.k.resume=function(){this.B&&(--this.B,!this.B&&this.j&&(this.j=!1,this.K.apply(null,this.D)))}; g.k.xa=function(){this.stop();u7.Pf.xa.call(this)}; g.k.Y4=function(){this.ud&&(g.Ka.clearTimeout(this.ud),this.ud=null);this.C?(this.ud=g.Ke(this.G,this.C-g.Xa()),this.C=null):this.B?this.j=!0:(this.j=!1,this.K.apply(null,this.D))};g.z(v7,g.O);g.k=v7.prototype;g.k.pN=function(a){this.C=arguments;this.ud||this.B?this.j=!0:Lqb(this)}; g.k.stop=function(){this.ud&&(g.Ka.clearTimeout(this.ud),this.ud=null,this.j=!1,this.C=null)}; g.k.pause=function(){this.B++}; g.k.resume=function(){this.B--;this.B||!this.j||this.ud||(this.j=!1,Lqb(this))}; g.k.xa=function(){g.O.prototype.xa.call(this);this.stop()};w7.prototype.stringify=function(a){return g.Ka.JSON.stringify(a,void 0)}; w7.prototype.parse=function(a){return g.Ka.JSON.parse(a,void 0)};g.Ya(Mqb,g.nb);g.Ya(Nqb,g.nb);var Oqb=null;g.Ya(Qqb,g.nb);g.Ya(Rqb,g.nb);g.Ya(Sqb,g.nb);A7.prototype.debug=function(){}; A7.prototype.info=function(){}; A7.prototype.warning=function(){};var $qb={},Zqb={};g.k=B7.prototype;g.k.setTimeout=function(a){this.fb=a}; g.k.a5=function(a){a=a.target;var b=this.Wa;b&&g.Oi(a)==3?b.pN():this.ZU(a)}; g.k.ZU=function(a){try{if(a==this.j)a:{var b=g.Oi(this.j),c=this.j.B,d=this.j.getStatus();if(!(b<3)&&(b!=3||this.j&&(this.B.B||g.Qi(this.j)||g.Ri(this.j)))){this.Ma||b!=4||c==7||(c==8||d<=0?x7(3):x7(2));crb(this);var e=this.j.getStatus();this.Jb=e;var f=Yqb(this);if(this.K=e==200){if(this.Ab&&!this.Va){b:{if(this.j){var h=g.Si(this.j,"X-HTTP-Initial-Response");if(h&&!g.qb(h)){var l=h;break b}}l=null}if(a=l)this.Va=!0,lrb(this,a);else{this.K=!1;this.G=3;y7(12);D7(this);E7(this);break a}}if(this.Ga){a= !0;for(var m;!this.Ma&&this.N0&&!this.Kb&&(this.Kb=!0,this.C.UR(this)):(D7(this),E7(this))}else lrb(this,f);b==4&&D7(this);this.K&&!this.Ma&&(b==4?drb(this.C,this):(this.K=!1,C7(this)))}else g.Ufa(this.j),e==400&&f.indexOf("Unknown SID")> 0?(this.G=3,y7(12)):(this.G=0,y7(13)),D7(this),E7(this)}}}catch(n){}finally{}}; g.k.cancel=function(){this.Ma=!0;D7(this)}; g.k.Z4=function(){this.qa=null;var a=Date.now();a-this.ob>=0?(this.Ra!=2&&(x7(3),y7(17)),D7(this),this.G=2,E7(this)):brb(this,this.ob-a)}; g.k.getLastError=function(){return this.G}; g.k.lQ=function(){return this.j};nrb.prototype.cancel=function(){this.C=prb(this);if(this.B)this.B.cancel(),this.B=null;else if(this.j&&this.j.size!==0){for(var a=g.w(this.j.values()),b=a.next();!b.done;b=a.next())b.value.cancel();this.j.clear()}};g.k=urb.prototype;g.k.aV=8;g.k.Uh=1;g.k.connect=function(a,b,c,d){y7(0);this.Tb=a;this.Ma=b||{};c&&d!==void 0&&(this.Ma.OSID=c,this.Ma.OAID=d);this.Va=this.wc;this.Ka=irb(this,null,this.Tb);I7(this)}; g.k.disconnect=function(){wrb(this);if(this.Uh==3){var a=this.Ya++,b=this.Ka.clone();g.fk(b,"SID",this.D);g.fk(b,"RID",a);g.fk(b,"TYPE","terminate");L7(this,b);a=new B7(this,this.D,a);a.Ra=2;a.Z=c7(b.clone());b=!1;if(g.Ka.navigator&&g.Ka.navigator.sendBeacon)try{b=g.Ka.navigator.sendBeacon(a.Z.toString(),"")}catch(c){}!b&&g.Ka.Image&&((new Image).src=a.Z,b=!0);b||(a.j=Wqb(a.C,null),a.j.send(a.Z));a.Aa=Date.now();C7(a)}Crb(this)}; g.k.Og=function(){return this.Uh==0}; g.k.getState=function(){return this.Uh}; g.k.cV=function(a){if(this.K)if(this.K=null,this.Uh==1){if(!a){this.Ya=Math.floor(Math.random()*1E5);a=this.Ya++;var b=new B7(this,"",a),c=this.Y;this.Jb&&(c?(c=g.Ec(c),g.Gc(c,this.Jb)):c=this.Jb);this.N!==null||this.ob||(b.Ka=c,c=null);var d;if(this.yb)a:{for(var e=d=0;e4096){d=e;break a}if(d===4096||e===this.C.length-1){d=e+1;break a}}d= 1E3}else d=1E3;d=zrb(this,b,d);e=this.Ka.clone();g.fk(e,"RID",a);g.fk(e,"CVER",22);this.Ga&&g.fk(e,"X-HTTP-Session-Id",this.Ga);L7(this,e);c&&(this.ob?d="headers="+g.Qd(g.Tga(c))+"&"+d:this.N&&g.jk(e,this.N,c));hrb(this.B,b);this.Uf&&g.fk(e,"TYPE","init");this.yb?(g.fk(e,"$req",d),g.fk(e,"SID","null"),b.Ab=!0,Vqb(b,e,null)):Vqb(b,e,d);this.Uh=2}}else this.Uh==3&&(a?Arb(this,a):this.C.length==0||orb(this.B)||Arb(this))}; g.k.bV=function(){this.Z=null;Brb(this);if(this.yc&&!(this.fb||this.j==null||this.Wc<=0)){var a=2*this.Wc;this.Fa=z7((0,g.Ua)(this.vaa,this),a)}}; g.k.vaa=function(){this.Fa&&(this.Fa=null,this.Va=!1,this.fb=!0,y7(10),G7(this),Brb(this))}; g.k.UR=function(a){this.j==a&&this.yc&&!this.fb&&(vrb(this),this.fb=!0,y7(11))}; g.k.b5=function(){this.qa!=null&&(this.qa=null,G7(this),frb(this),y7(19))}; g.k.Kea=function(a){a?y7(2):y7(1)}; g.k.isActive=function(){return!!this.G&&this.G.isActive(this)}; g.k=Erb.prototype;g.k.gV=function(){}; g.k.fV=function(){}; g.k.eV=function(){}; g.k.dV=function(){}; g.k.isActive=function(){return!0}; g.k.c5=function(){};g.Ya(N7,g.Uc);N7.prototype.open=function(){this.j.G=this.C;this.K&&(this.j.Ra=!0);this.j.connect(this.G,this.B||void 0)}; N7.prototype.close=function(){this.j.disconnect()}; N7.prototype.send=function(a){var b=this.j;if(typeof a==="string"){var c={};c.__data__=a;a=c}else this.D&&(c={},c.__data__=g.si(a),a=c);b.C.push(new mrb(b.Sf++,a));b.Uh==3&&I7(b)}; N7.prototype.xa=function(){this.j.G=null;delete this.C;this.j.disconnect();delete this.j;N7.Pf.xa.call(this)}; g.Ya(Grb,Mqb);g.Ya(Hrb,Nqb);g.Ya(M7,Erb);M7.prototype.gV=function(){this.j.dispatchEvent("m")}; M7.prototype.fV=function(a){this.j.dispatchEvent(new Grb(a))}; M7.prototype.eV=function(a){this.j.dispatchEvent(new Hrb(a))}; M7.prototype.dV=function(){this.j.dispatchEvent("n")};var P7=new g.Uc;g.z(Krb,g.nb);g.k=R7.prototype;g.k.Wv=null;g.k.kt=!1;g.k.oz=null;g.k.rN=null;g.k.pD=null;g.k.yI=null;g.k.mD=null;g.k.xI=null;g.k.Yv=null;g.k.vj=null;g.k.AI=0;g.k.e3=null;g.k.zI=null;g.k.Xv=null;g.k.oD=-1;g.k.X1=!0;g.k.nD=!1;g.k.qN=0;g.k.wI=null;var Qrb={},Prb={};g.k=R7.prototype;g.k.setTimeout=function(a){this.B=a}; g.k.e5=function(a){a=a.target;var b=this.wI;b&&g.Oi(a)==3?b.pN():this.hV(a)}; g.k.hV=function(a){try{if(a==this.vj)a:{var b=g.Oi(this.vj),c=this.vj.B,d=this.vj.getStatus();if(g.lc&&!g.kc("420+")){if(b<4)break a}else if(b<3||b==3&&!g.Qi(this.vj))break a;this.nD||b!=4||c==7||(c==8||d<=0?this.j.ys(3):this.j.ys(2));Trb(this);var e=this.vj.getStatus();this.oD=e;var f=g.Qi(this.vj);if(this.kt=e==200){b==4&&S7(this);if(this.Ga){for(a=!0;!this.nD&&this.AI0?(this.Xv=3,Q7(13)):(this.Xv=0,Q7(14)),S7(this),Urb(this)}}catch(l){}finally{}}; g.k.cancel=function(){this.nD=!0;S7(this)}; g.k.d5=function(){this.oz=null;var a=Date.now();a-this.rN>=0?(this.yI!=2&&this.j.ys(3),S7(this),this.Xv=2,Q7(18),Urb(this)):Srb(this,this.rN-a)}; g.k.getLastError=function(){return this.Xv};g.k=Yrb.prototype;g.k.tN=null;g.k.jl=null;g.k.hM=!1;g.k.vN=null;g.k.jm=null;g.k.jr=-1;g.k.BI=null;g.k.nE=null;g.k.connect=function(a){this.vN=a;a=U7(this.j,null,this.vN);Q7(3);Date.now();var b=this.j.Y;b!=null?(this.BI=b[0],(this.nE=b[1])?(this.jm=1,Zrb(this)):(this.jm=2,$rb(this))):(d7(a,"MODE","init"),this.jl=new R7(this),this.jl.Wv=this.tN,Nrb(this.jl,a,!1,null,!0),this.jm=0)}; g.k.w7=function(a){if(a)this.jm=2,$rb(this);else{Q7(4);var b=this.j;b.wp=b.Kt.jr;Y7(b,9)}a&&this.ys(2)}; g.k.sN=function(a){return this.j.sN(a)}; g.k.abort=function(){this.jl&&(this.jl.cancel(),this.jl=null);this.jr=-1}; g.k.Og=function(){return!1}; g.k.iV=function(a,b){this.jr=a.oD;if(this.jm==0)if(b){try{var c=this.B.parse(b)}catch(d){a=this.j;a.wp=this.jr;Y7(a,2);return}this.BI=c[0];this.nE=c[1]}else a=this.j,a.wp=this.jr,Y7(a,2);else this.jm==2&&(this.hM?(Q7(7),Date.now()):b=="11111"?(Q7(6),this.hM=!0,Date.now(),this.jr=200,this.jl.cancel(),Q7(12),V7(this.j,this,!0)):(Q7(8),Date.now(),this.hM=!1))}; g.k.uN=function(){this.jr=this.jl.oD;if(this.jl.kt)this.jm==0?this.nE?(this.jm=1,Zrb(this)):(this.jm=2,$rb(this)):this.jm==2&&(this.hM?(Q7(12),V7(this.j,this,!0)):(Q7(11),V7(this.j,this,!1)));else{this.jm==0?Q7(9):this.jm==2&&Q7(10);var a=this.j;this.jl.getLastError();a.wp=this.jr;Y7(a,2)}}; g.k.qD=function(){return this.j.qD()}; g.k.isActive=function(){return this.j.isActive()}; g.k.ys=function(a){this.j.ys(a)};g.k=asb.prototype;g.k.vp=null;g.k.rD=null;g.k.zk=null;g.k.Xg=null;g.k.xN=null;g.k.CI=null;g.k.jV=null;g.k.wN=null;g.k.sD=0;g.k.g5=0;g.k.Ti=null;g.k.nt=null;g.k.lr=null;g.k.cw=null;g.k.Kt=null;g.k.dN=null;g.k.rz=-1;g.k.kV=-1;g.k.wp=-1;g.k.qz=0;g.k.pz=0;g.k.Zv=8;g.Ya(csb,g.nb);g.Ya(dsb,g.nb);g.k=asb.prototype;g.k.connect=function(a,b,c,d,e){Q7(0);this.xN=b;this.rD=c||{};d&&e!==void 0&&(this.rD.OSID=d,this.rD.OAID=e);this.Z?(O7((0,g.Ua)(this.yX,this,a),100),fsb(this)):this.yX(a)}; g.k.disconnect=function(){gsb(this);if(this.j==3){var a=this.sD++,b=this.CI.clone();g.fk(b,"SID",this.D);g.fk(b,"RID",a);g.fk(b,"TYPE","terminate");X7(this,b);a=new R7(this,this.D,a);a.yI=2;a.mD=c7(b.clone());(new Image).src=a.mD.toString();a.pD=Date.now();Orb(a)}qsb(this)}; g.k.yX=function(a){this.Kt=new Yrb(this);this.Kt.tN=this.vp;this.Kt.B=this.G;this.Kt.connect(a)}; g.k.Og=function(){return this.j==0}; g.k.getState=function(){return this.j}; g.k.mV=function(a){this.nt=null;lsb(this,a)}; g.k.lV=function(){this.lr=null;this.Xg=new R7(this,this.D,"rpc",this.N);this.Xg.Wv=this.vp;this.Xg.qN=0;var a=this.jV.clone();g.fk(a,"RID","rpc");g.fk(a,"SID",this.D);g.fk(a,"CI",this.dN?"0":"1");g.fk(a,"AID",this.rz);X7(this,a);g.fk(a,"TYPE","xmlhttp");Nrb(this.Xg,a,!0,this.wN,!1)}; g.k.iV=function(a,b){if(this.j!=0&&(this.Xg==a||this.zk==a))if(this.wp=a.oD,this.zk==a&&this.j==3)if(this.Zv>7){try{var c=this.G.parse(b)}catch(d){c=null}if(Array.isArray(c)&&c.length==3)if(a=c,a[0]==0)a:{if(!this.lr){if(this.Xg)if(this.Xg.pD+3E30)){if(d=b==1)this.zk||this.nt||this.j==1||this.qz>=2?d=!1:(this.nt=O7((0,g.Ua)(this.mV,this,a),nsb(this,this.qz)),this.qz++,d=!0);d=!(d||b==2&&osb(this))}if(d)switch(c){case 1:Y7(this, 5);break;case 4:Y7(this,10);break;case 3:Y7(this,6);break;case 7:Y7(this,12);break;default:Y7(this,2)}}}; g.k.f5=function(a){if(!g.Nb(arguments,this.j))throw Error("Unexpected channel state: "+this.j);}; g.k.Jea=function(a){a?Q7(2):(Q7(1),psb(this,8))}; g.k.sN=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new g.Li;a.K=!1;return a}; g.k.isActive=function(){return!!this.Ti&&this.Ti.isActive(this)}; g.k.ys=function(a){var b=P7;b.dispatchEvent(new dsb(b,a))}; g.k.qD=function(){return!1}; g.k=rsb.prototype;g.k.pV=function(){}; g.k.oV=function(){}; g.k.nV=function(){}; g.k.yN=function(){}; g.k.qV=function(){return{}}; g.k.isActive=function(){return!0};g.k=ssb.prototype;g.k.enqueue=function(a){this.B.push(a)}; g.k.isEmpty=function(){return this.j.length===0&&this.B.length===0}; g.k.clear=function(){this.j=[];this.B=[]}; g.k.contains=function(a){return g.Nb(this.j,a)||g.Nb(this.B,a)}; g.k.remove=function(a){var b=this.j;var c=(0,g.B8a)(b,a);c>=0?(g.Ob(b,c),b=!0):b=!1;return b||g.Qb(this.B,a)}; g.k.Nm=function(){for(var a=[],b=this.j.length-1;b>=0;--b)a.push(this.j[b]);var c=this.B.length;for(b=0;b=Iub.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(a=Iub[this.B],this.ud=g.cr((0,g.Ua)(this.d1,this),a),this.B++):this.publish("pairingFailed",Error("Server error "+a.status))}; g.k.n5=function(){this.j=null;this.publish("pairingFailed",Error("Server not responding"))}; var Iub=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Ya(j8,h8);g.k=j8.prototype;g.k.start=function(){i8(this)&&this.publish("screenChange");!g.vs("yt-remote-lounge-token-expiration")&&Psb(this);g.er(this.j);this.j=g.cr((0,g.Ua)(this.start,this),1E4)}; g.k.add=function(a,b){i8(this);Lsb(this,a);k8(this,!1);this.publish("screenChange");b(a);a.token||Psb(this)}; g.k.remove=function(a,b){var c=i8(this);Nsb(this,a)&&(k8(this,!1),c=!0);b(a);c&&this.publish("screenChange")}; g.k.cN=function(a,b,c,d){var e=i8(this),f=this.get(a.id);f?(f.name!=b&&(f.name=b,k8(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.publish("screenChange")}; g.k.xa=function(){g.er(this.j);j8.Pf.xa.call(this)}; g.k.B9=function(a){i8(this);var b=this.screens.length;a=a&&a.screens||[];for(var c=0,d=a.length;c20)break a;l=b(f,h)}f=l}e.name=f}c(n8(this,e))},this), onError:(0,g.Ua)(function(e){d(Error("pairing request failed: "+e.status))},this), onTimeout:(0,g.Ua)(function(){d(Error("pairing request timed out."))},this)})}; g.k.xa=function(){g.gb(this.B);g.gb(this.j);m8.Pf.xa.call(this)}; g.k.L9=function(){atb(this);this.publish("screenChange");this.j.update()}; m8.prototype.dispose=m8.prototype.dispose;g.Ya(o8,g.Xw);g.k=o8.prototype;g.k.Lj=function(a){this.La()||(a&&(q8(this,""+a),this.publish("sessionFailed")),this.j=null,this.publish("sessionScreen",null))}; g.k.info=function(a){c8(this.Ga,a)}; g.k.tV=function(){return null}; g.k.yT=function(a){var b=this.B;a?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,(0,g.Ua)(function(){this.info("Updated receiver status for "+b.friendlyName+": "+a)},this),(0,g.Ua)(function(){q8(this,"Failed to update receiver status for: "+b.friendlyName)},this))}; g.k.xa=function(){this.yT("");o8.Pf.xa.call(this)};g.z(r8,o8);g.k=r8.prototype;g.k.wT=function(a){if(this.C){if(this.C==a)return;q8(this,"Overriding cast session with new session object");mtb(this);this.Aa=!1;this.Y="unknown";this.C.removeUpdateListener(this.ra);this.C.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Fa)}this.C=a;this.C.addUpdateListener(this.ra);this.C.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.Fa);htb(this,"getMdxSessionStatus")}; g.k.bB=function(a){this.info("launchWithParams no-op for Cast: "+g.si(a))}; g.k.stop=function(){this.C?this.C.stop((0,g.Ua)(function(){this.Lj()},this),(0,g.Ua)(function(){this.Lj(Error("Failed to stop receiver app."))},this)):this.Lj(Error("Stopping cast device without session."))}; g.k.yT=function(){}; g.k.xa=function(){this.info("disposeInternal");mtb(this);this.C&&(this.C.removeUpdateListener(this.ra),this.C.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Fa));this.C=null;o8.prototype.xa.call(this)}; g.k.Mca=function(a,b){if(!this.La())if(b)if(b=e7(b),g.Ra(b))switch(a=""+b.type,b=b.data||{},this.info("onYoutubeMessage_: "+a+" "+g.si(b)),a){case "mdxSessionStatus":etb(this,b);break;case "loungeToken":itb(this,b);break;default:q8(this,"Unknown youtube message: "+a)}else q8(this,"Unable to parse message.");else q8(this,"No data in message.")}; g.k.HY=function(a,b,c,d){g.er(this.Z);this.Z=0;Ysb(this.D,this.B.label,a,this.B.friendlyName,(0,g.Ua)(function(e){e?b(e):d>=0?(q8(this,"Screen "+a+" appears to be offline. "+d+" retries left."),this.Z=g.cr((0,g.Ua)(this.HY,this,a,b,c,d-1),300)):c(Error("Unable to fetch screen."))},this),c)}; g.k.tV=function(){return this.C}; g.k.p5=function(a){this.La()||a||(q8(this,"Cast session died."),this.Lj())};g.z(s8,o8);g.k=s8.prototype;g.k.wT=function(a){this.C=a;this.C.addUpdateListener(this.Ma)}; g.k.bB=function(a){this.Ka=a;this.qa()}; g.k.stop=function(){utb(this);this.C?this.C.stop((0,g.Ua)(this.Lj,this,null),(0,g.Ua)(this.Lj,this,"Failed to stop DIAL device.")):this.Lj()}; g.k.xa=function(){utb(this);this.C&&this.C.removeUpdateListener(this.Ma);this.C=null;o8.prototype.xa.call(this)}; g.k.q5=function(a){this.La()||a||(q8(this,"DIAL session died."),this.G(),this.G=function(){},this.Lj())};g.z(v8,o8);v8.prototype.stop=function(){this.Lj()}; v8.prototype.wT=function(){}; v8.prototype.bB=function(){g.er(this.C);this.C=NaN;var a=m7(this.D.El(),this.B.label);a?p8(this,a):this.Lj(Error("No such screen"))}; v8.prototype.xa=function(){g.er(this.C);this.C=NaN;o8.prototype.xa.call(this)};g.z(w8,g.Xw);g.k=w8.prototype; g.k.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest(this.Z,[chrome.cast.Capability.AUDIO_OUT]);g.hr("desktop_enable_cast_connect")&&(c.androidReceiverCompatible=!0);this.Y||(c.dialRequest=new chrome.cast.DialRequest("YouTube"));var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;a=a||this.K?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var e=(0,g.Ua)(this.Pba,this);c=new chrome.cast.ApiConfig(c,(0,g.Ua)(this.B0, this),e,d,a);c.customDialLaunchCallback=(0,g.Ua)(this.Iaa,this);chrome.cast.initialize(c,(0,g.Ua)(function(){this.La()||(chrome.cast.addReceiverActionListener(this.G),Hsb(),this.B.subscribe("onlineScreenChange",(0,g.Ua)(this.uV,this)),this.C=xtb(this),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.Ua)(function(f){this.hg("Failed to set initial custom receivers: "+g.si(f))},this)),this.publish("yt-remote-cast2-availability-change",y8(this)),b(!0))},this),(0,g.Ua)(function(f){this.hg("Failed to initialize API: "+ g.si(f)); b(!1)},this))}; g.k.aea=function(a,b){x8("Setting connected screen ID: "+a+" -> "+b);if(this.j){var c=this.j.j;if(!a||c&&c.id!=a)x8("Unsetting old screen status: "+this.j.B.friendlyName),z8(this,null)}if(a&&b){if(!this.j){a=m7(this.B.El(),a);if(!a){x8("setConnectedScreenStatus: Unknown screen.");return}if(a.idType=="shortLived"){x8("setConnectedScreenStatus: Screen with id type to be short lived.");return}c=vtb(this,a);c||(x8("setConnectedScreenStatus: Connected receiver not custom..."),c=new chrome.cast.Receiver(a.uuid? a.uuid:a.id,a.name),c.receiverType=chrome.cast.ReceiverType.CUSTOM,this.C.push(c),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.Ua)(function(d){this.hg("Failed to set initial custom receivers: "+g.si(d))},this))); x8("setConnectedScreenStatus: new active receiver: "+c.friendlyName);z8(this,new v8(this.B,c),!0)}this.j.yT(b)}else x8("setConnectedScreenStatus: no screen.")}; g.k.dea=function(a){this.La()?this.hg("Setting connection data on disposed cast v2"):this.j?this.j.bB(a):this.hg("Setting connection data without a session")}; g.k.s5=function(){this.La()?this.hg("Stopping session on disposed cast v2"):this.j?(this.j.stop(),z8(this,null)):x8("Stopping non-existing session")}; g.k.requestSession=function(){chrome.cast.requestSession((0,g.Ua)(this.B0,this),(0,g.Ua)(this.kca,this))}; g.k.xa=function(){this.B.unsubscribe("onlineScreenChange",(0,g.Ua)(this.uV,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.G);var a=Esb,b=g.Ma("yt.mdx.remote.debug.handlers_");g.Qb(b||[],a);g.gb(this.j);g.Xw.prototype.xa.call(this)}; g.k.hg=function(a){c8("Controller",a)}; g.k.D0=function(a,b){this.j==a&&(b||z8(this,null),this.publish("yt-remote-cast2-session-change",b))}; g.k.Mba=function(a,b){if(!this.La())if(a)switch(a.friendlyName=chrome.cast.unescape(a.friendlyName),x8("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.j)if(this.j.B.label!=a.label)x8("onReceiverAction_: Stopping active receiver: "+this.j.B.friendlyName),this.j.stop();else{x8("onReceiverAction_: Casting to active receiver.");this.j.j&&this.publish("yt-remote-cast2-session-change",this.j.j);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:z8(this, new v8(this.B,a));break;case chrome.cast.ReceiverType.DIAL:z8(this,new s8(this.B,a,this.D,this.config_));break;case chrome.cast.ReceiverType.CAST:z8(this,new r8(this.B,a,this.config_));break;default:this.hg("Unknown receiver type: "+a.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.j&&this.j.B.label==a.label?this.j.stop():this.hg("Stopping receiver w/o session: "+a.friendlyName)}else this.hg("onReceiverAction_ called without receiver.")}; g.k.Iaa=function(a){if(this.La())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.hg("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.j?this.j.B:null;if(!c||c.label!=b.label)return this.hg("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.j.j)return x8("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.j.j),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.hg('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+b.friendlyName);z8(this,new s8(this.B,b,this.D,this.config_))}b=this.j;b.Z=a;b.Z.appState==chrome.cast.DialAppState.RUNNING?(a=b.Z.extraData||{},c=a.screenId||null,t8(b)&&a.loungeToken?a.loungeTokenRefreshIntervalMs?a=rtb(b,{name:b.B.friendlyName,screenId:a.screenId,loungeToken:a.loungeToken,dialId:b.Z.receiver.label, screenIdType:"shortLived"},a.loungeTokenRefreshIntervalMs):(g.Hq(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(a)+".")),a=stb(b,c)):a=stb(b,c)):a=ptb(b);return a}; g.k.B0=function(a){var b=this;if(!this.La()&&!this.K){x8("New cast session ID: "+a.sessionId);var c=a.receiver;if(c.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.j)if(c.receiverType==chrome.cast.ReceiverType.CAST)x8("Got resumed cast session before resumed mdx connection."),c.friendlyName=chrome.cast.unescape(c.friendlyName),z8(this,new r8(this.B,c,this.config_),!0);else{this.hg("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var d=this.j.B,e=m7(this.B.El(), d.label);e&&k7(e,c.label)&&d.receiverType!=chrome.cast.ReceiverType.CAST&&c.receiverType==chrome.cast.ReceiverType.CAST&&(x8("onSessionEstablished_: manual to cast session change "+c.friendlyName),g.gb(this.j),this.j=new r8(this.B,c,this.config_),this.j.subscribe("sessionScreen",(0,g.Ua)(this.D0,this,this.j)),this.j.subscribe("sessionFailed",function(){return wtb(b,b.j)}),this.j.bB(null)); this.j.wT(a)}}}; g.k.r5=function(){return this.j?this.j.tV():null}; g.k.kca=function(a){this.La()||(this.hg("Failed to estabilish a session: "+g.si(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&z8(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.k.Pba=function(a){x8("Receiver availability updated: "+a);if(!this.La()){var b=y8(this);this.N=a==chrome.cast.ReceiverAvailability.AVAILABLE;y8(this)!=b&&this.publish("yt-remote-cast2-availability-change",y8(this))}}; g.k.uV=function(){this.La()||(this.C=xtb(this),x8("Updating custom receivers: "+g.si(this.C)),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.Ua)(function(){this.hg("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",y8(this)))}; w8.prototype.setLaunchParams=w8.prototype.dea;w8.prototype.setConnectedScreenStatus=w8.prototype.aea;w8.prototype.stopSession=w8.prototype.s5;w8.prototype.getCastSession=w8.prototype.r5;w8.prototype.requestSession=w8.prototype.requestSession;w8.prototype.init=w8.prototype.init;w8.prototype.dispose=w8.prototype.dispose;var Gtb=[];g.k=G8.prototype; g.k.reset=function(a){this.listId="";this.index=-1;this.videoId="";Mtb(this);this.volume=-1;this.muted=!1;a&&(this.index=a.index,this.listId=a.listId,this.videoId=a.videoId,this.playerState=a.playerState,this.volume=a.volume,this.muted=a.muted,this.audioTrackId=a.audioTrackId,this.trackData=a.trackData,this.Zp=a.hasPrevious,this.Hl=a.hasNext,this.N=a.playerTime,this.K=a.playerTimeAt,this.D=a.seekableStart,this.j=a.seekableEnd,this.G=a.duration,this.Z=a.loadedTime,this.C=a.liveIngestionTime,this.B= !isNaN(this.C))}; g.k.isPlaying=function(){return this.playerState==1}; g.k.isBuffering=function(){return this.playerState==3}; g.k.Il=function(){return this.playerState==1081}; g.k.Yo=function(a){this.G=isNaN(a)?0:a}; g.k.getDuration=function(){return this.B?this.G+H8(this):this.G}; g.k.clone=function(){return new G8(Ntb(this))};g.z(M8,g.Xw);g.k=M8.prototype;g.k.getState=function(){return this.C}; g.k.du=function(){return this.D.getReconnectTimeout()}; g.k.Dy=function(){this.D.reconnect()}; g.k.play=function(){O8(this)?(this.j?this.j.play(null,g.Yc,S8(this,"play")):R8(this,"play"),Qtb(this,1,J8(N8(this))),this.publish("remotePlayerChange")):P8(this,this.play)}; g.k.pause=function(){O8(this)?(this.j?this.j.pause(null,g.Yc,S8(this,"pause")):R8(this,"pause"),Qtb(this,2,J8(N8(this))),this.publish("remotePlayerChange")):P8(this,this.pause)}; g.k.seekTo=function(a){if(O8(this)){if(this.j){var b=N8(this),c=new chrome.cast.media.SeekRequest;c.currentTime=a;b.isPlaying()||b.isBuffering()?c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.j.seek(c,g.Yc,S8(this,"seekTo",{newTime:a}))}else R8(this,"seekTo",{newTime:a});Qtb(this,3,a);this.publish("remotePlayerChange")}else P8(this,g.Wa(this.seekTo,a))}; g.k.stop=function(){if(O8(this)){this.j?this.j.stop(null,g.Yc,S8(this,"stopVideo")):R8(this,"stopVideo");var a=N8(this);a.index=-1;a.videoId="";Mtb(a);Q8(this,a);this.publish("remotePlayerChange")}else P8(this,this.stop)}; g.k.setVolume=function(a,b){if(O8(this)){var c=N8(this);if(this.B){if(c.volume!=a){var d=Math.round(a)/100;this.B.setReceiverVolumeLevel(d,(0,g.Ua)(function(){d8("set receiver volume: "+d)},this),(0,g.Ua)(function(){this.hg("failed to set receiver volume.")},this))}c.muted!=b&&this.B.setReceiverMuted(b,(0,g.Ua)(function(){d8("set receiver muted: "+b)},this),(0,g.Ua)(function(){this.hg("failed to set receiver muted.")},this))}else{var e={volume:a, muted:b};c.volume!=-1&&(e.delta=a-c.volume);R8(this,"setVolume",e)}c.muted=b;c.volume=a;Q8(this,c)}else P8(this,g.Wa(this.setVolume,a,b))}; g.k.vV=function(a,b){if(O8(this)){var c=N8(this);a={videoId:a};b&&(c.trackData={trackName:b.name,languageCode:b.languageCode,sourceLanguageCode:b.translationLanguage?b.translationLanguage.languageCode:"",languageName:b.languageName,kind:b.kind},a.style=g.si(b.style),g.Gc(a,c.trackData));R8(this,"setSubtitlesTrack",a);Q8(this,c)}else P8(this,g.Wa(this.vV,a,b))}; g.k.setAudioTrack=function(a,b){O8(this)?(b=b.getLanguageInfo().getId(),R8(this,"setAudioTrack",{videoId:a,audioTrackId:b}),a=N8(this),a.audioTrackId=b,Q8(this,a)):P8(this,g.Wa(this.setAudioTrack,a,b))}; g.k.playVideo=function(a,b,c,d,e,f,h){d=d===void 0?null:d;e=e===void 0?null:e;f=f===void 0?null:f;h=h===void 0?null:h;var l=N8(this),m={videoId:a};c!==void 0&&(m.currentIndex=c);K8(l,a,c||0);b!==void 0&&(I8(l,b),m.currentTime=b);d&&(m.listId=d);e&&(m.playerParams=e);f&&(m.clickTrackingParams=f);h&&(m.locationInfo=g.si(h));R8(this,"setPlaylist",m);d||Q8(this,l)}; g.k.bM=function(a,b){if(O8(this)){if(a&&b){var c=N8(this);K8(c,a,b);Q8(this,c)}R8(this,"previous")}else P8(this,g.Wa(this.bM,a,b))}; g.k.nextVideo=function(a,b){if(O8(this)){if(a&&b){var c=N8(this);K8(c,a,b);Q8(this,c)}R8(this,"next")}else P8(this,g.Wa(this.nextVideo,a,b))}; g.k.RO=function(){if(O8(this)){R8(this,"clearPlaylist");var a=N8(this);a.reset();Q8(this,a);this.publish("remotePlayerChange")}else P8(this,this.RO)}; g.k.OX=function(){O8(this)?R8(this,"dismissAutoplay"):P8(this,this.OX)}; g.k.dispose=function(){if(this.C!=3){var a=this.C;this.C=3;this.publish("proxyStateChange",a,this.C)}g.Xw.prototype.dispose.call(this)}; g.k.xa=function(){Ptb(this);this.D=null;this.G.clear();L8(this,null);g.Xw.prototype.xa.call(this)}; g.k.CT=function(a){if((a!=this.C||a==2)&&this.C!=3&&a!=0){var b=this.C;this.C=a;this.publish("proxyStateChange",b,a);if(a==1)for(;!this.G.isEmpty();)b=a=this.G,b.j.length===0&&(b.j=b.B,b.j.reverse(),b.B=[]),a.j.pop().apply(this);else a==3&&this.dispose()}}; g.k.Kba=function(a,b){this.publish(a,b)}; g.k.zaa=function(a){if(!a)this.vG(null),L8(this,null);else if(this.B.receiver.volume){a=this.B.receiver.volume;var b=N8(this),c=Math.round(100*a.level||0);if(b.volume!=c||b.muted!=a.muted)d8("Cast volume update: "+a.level+(a.muted?" muted":"")),b.volume=c,b.muted=!!a.muted,Q8(this,b)}}; g.k.vG=function(a){d8("Cast media: "+!!a);this.j&&this.j.removeUpdateListener(this.Z);if(this.j=a)this.j.addUpdateListener(this.Z),Rtb(this),this.publish("remotePlayerChange")}; g.k.yaa=function(a){a?(Rtb(this),this.publish("remotePlayerChange")):this.vG(null)}; g.k.iU=function(){R8(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.k.Baa=function(){var a=Jtb();a&&L8(this,a)}; g.k.hg=function(a){c8("CP",a)};g.z(V8,g.Xw);g.k=V8.prototype; g.k.connect=function(a,b){if(b){var c=b.listId,d=b.videoId,e=b.videoIds,f=b.playerParams,h=b.clickTrackingParams,l=b.index,m={videoId:d},n=b.currentTime,p=b.locationInfo;b=b.loopMode;n!==void 0&&(m.currentTime=n<=5?0:n);f&&(m.playerParams=f);p&&(m.locationInfo=p);h&&(m.clickTrackingParams=h);c&&(m.listId=c);e&&e.length>0&&(m.videoIds=e.join(","));l!==void 0&&(m.currentIndex=l);this.Ma&&(m.loopMode=b||"LOOP_MODE_OFF");c&&(this.j.listId=c);this.j.videoId=d;this.j.index=l||0;this.j.state=3;I8(this.j, n);this.G="UNSUPPORTED";c=this.Ma?"setInitialState":"setPlaylist";T8("Connecting with "+c+" and params: "+g.si(m));this.B.connect({method:c,params:g.si(m)},a,sqb())}else T8("Connecting without params"),this.B.connect({},a,sqb());Vtb(this)}; g.k.Ls=function(a){this.B.Ls(a)}; g.k.dispose=function(){this.La()||(g.La("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),U8(this,3));g.Xw.prototype.dispose.call(this)}; g.k.xa=function(){Wtb(this);Ytb(this);Xtb(this);g.er(this.Z);this.Z=NaN;g.er(this.Y);this.Y=NaN;this.D=null;g.js(this.qa);this.qa.length=0;this.B.dispose();g.Xw.prototype.xa.call(this);this.G=this.N=this.C=this.j=this.B=null}; g.k.IZ=function(a){if(!this.C||this.C.length===0)return!1;for(var b=g.w(this.C),c=b.next();!c.done;c=b.next())if(!c.value.capabilities.has(a))return!1;return!0}; g.k.i9=function(){var a=3;this.La()||(a=0,isNaN(this.rF())?this.B.MA()&&isNaN(this.K)&&(a=1):a=2);return a}; g.k.bA=function(a){T8("Disconnecting with "+a);g.La("yt.mdx.remote.remoteClient_",null);Wtb(this);this.publish("beforeDisconnect",a);a==1&&p7();this.B.disconnect(a);this.dispose()}; g.k.c9=function(){var a=this.j;this.D&&(a=this.j.clone(),K8(a,this.D,a.index));return Ntb(a)}; g.k.gea=function(a){var b=this,c=new G8(a);c.videoId&&c.videoId!=this.j.videoId&&(this.D=c.videoId,g.er(this.Z),this.Z=g.cr(function(){if(b.D){var e=b.D;b.D=null;b.j.videoId!=e&&W8(b,"getNowPlaying")}},5E3)); var d=[];this.j.listId==c.listId&&this.j.videoId==c.videoId&&this.j.index==c.index||d.push("remoteQueueChange");this.j.playerState==c.playerState&&this.j.volume==c.volume&&this.j.muted==c.muted&&J8(this.j)==J8(c)&&g.si(this.j.trackData)==g.si(c.trackData)||d.push("remotePlayerChange");this.j.reset(a);g.cc(d,function(e){this.publish(e)},this)}; g.k.CY=function(){var a=this.B.getDeviceId(),b=g.Lb(this.C,function(c){return c.type=="REMOTE_CONTROL"&&c.id!=a}); return b?b.id:""}; g.k.rF=function(){return this.B.du()}; g.k.L8=function(){return this.G||"UNSUPPORTED"}; g.k.M8=function(){return this.N||""}; g.k.t5=function(){!isNaN(this.rF())&&this.B.Dy()}; g.k.Xda=function(a,b){W8(this,a,b);$tb(this)}; g.k.wV=function(){var a=g.xr("SAPISID","")||g.xr("__Secure-1PAPISID")||"",b=g.xr("__Secure-3PAPISID","")||"";if(!a&&!b)return"";a=g.Pe(g.Oe(a),2);b=g.Pe(g.Oe(b),2);return g.Pe(g.Oe(","+a+","+b),2)}; V8.prototype.subscribe=V8.prototype.subscribe;V8.prototype.unsubscribeByKey=V8.prototype.wh;V8.prototype.getProxyState=V8.prototype.i9;V8.prototype.disconnect=V8.prototype.bA;V8.prototype.getPlayerContextData=V8.prototype.c9;V8.prototype.setPlayerContextData=V8.prototype.gea;V8.prototype.getOtherConnectedRemoteId=V8.prototype.CY;V8.prototype.getReconnectTimeout=V8.prototype.rF;V8.prototype.getAutoplayMode=V8.prototype.L8;V8.prototype.getAutoplayVideoId=V8.prototype.M8;V8.prototype.reconnect=V8.prototype.t5; V8.prototype.sendMessage=V8.prototype.Xda;V8.prototype.getXsrfToken=V8.prototype.wV;V8.prototype.isCapabilitySupportedOnConnectedDevices=V8.prototype.IZ;g.z(lub,h8);g.k=lub.prototype;g.k.El=function(a){return this.jh.$_gs(a)}; g.k.contains=function(a){return!!this.jh.$_c(a)}; g.k.get=function(a){return this.jh.$_g(a)}; g.k.start=function(){this.jh.$_st()}; g.k.add=function(a,b,c){this.jh.$_a(a,b,c)}; g.k.remove=function(a,b,c){this.jh.$_r(a,b,c)}; g.k.cN=function(a,b,c,d){this.jh.$_un(a,b,c,d)}; g.k.xa=function(){for(var a=0,b=this.j.length;a1&&!this.J.getOption("remote","quickCast")?(this.ev=g.dc(a,this.j,this),g.bT(this,g.nl(a,this.j)),a=this.J.getOption("remote","currentReceiver"),a=this.j(a),this.options[a]&&this.Ui(a),this.enable(!0)):this.enable(!1)}; n$.prototype.j=function(a){return a.key}; n$.prototype.ql=function(a){return a==="cast-selector-receiver"?"Cast...":this.ev[a].name}; n$.prototype.Ig=function(a){g.aT.prototype.Ig.call(this,a);this.J.setOption("remote","currentReceiver",this.ev[a]);this.Eb.Nb()};g.z(Fub,g.ST);g.k=Fub.prototype; g.k.create=function(){var a=this.player.U(),b=g.wO(a);a={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:a.L("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:a.L("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:a.L("enable_cast_short_lived_lounge_token")};qub(b,a);this.subscriptions.push(g.Zu("yt-remote-before-disconnect",this.uaa,this));this.subscriptions.push(g.Zu("yt-remote-connection-change",this.Qba,this));this.subscriptions.push(g.Zu("yt-remote-receiver-availability-change",this.y0, this));this.subscriptions.push(g.Zu("yt-remote-auto-connect",this.Oba,this));this.subscriptions.push(g.Zu("yt-remote-receiver-resumed",this.Nba,this));this.subscriptions.push(g.Zu("mdx-privacy-popup-confirm",this.kda,this));this.subscriptions.push(g.Zu("mdx-privacy-popup-cancel",this.jda,this));this.y0()}; g.k.load=function(){this.player.cancelPlayback();g.ST.prototype.load.call(this);this.zm=new Bub(this,this.player,this.Ic);var a=(a=yub())?a.currentTime:0;var b=vub()?new M8(e$(),void 0):null;a==0&&b&&(a=J8(N8(b)));a!==0&&this.Tc(a);Gub(this,this.Fe,this.Fe);this.player.Nq(6)}; g.k.unload=function(){this.player.publish("mdxautoplaycanceled");this.Nt=this.qq;g.ib(this.zm,this.Ic);this.Ic=this.zm=null;g.ST.prototype.unload.call(this);this.player.Nq(5);o$(this)}; g.k.xa=function(){g.$u(this.subscriptions);g.ST.prototype.xa.call(this)}; g.k.AG=function(a){var b=g.Da.apply(1,arguments);this.loaded&&this.zm.Gl.apply(this.zm,[a].concat(g.x(b)))}; g.k.getAdState=function(){return this.xi}; g.k.Zp=function(){return this.Ic?N8(this.Ic).Zp:!1}; g.k.Hl=function(){return this.Ic?N8(this.Ic).Hl:!1}; g.k.Tc=function(a,b){this.WZ=a||0;this.player.publish("progresssync",a,b);this.player.Hc("onVideoProgress",a||0)}; g.k.getCurrentTime=function(){return this.WZ}; g.k.getProgressState=function(){var a=N8(this.Ic),b=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!a.Il()&&this.player.Lh(),clipEnd:b.clipEnd,clipStart:b.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:a.getDuration(),ingestionTime:a.B?a.C+H8(a):a.C,isAtLiveHead:(a.B?a.j+H8(a):a.j)-this.getCurrentTime()<=1,loaded:a.Z,seekableEnd:a.B?a.j+H8(a):a.j,seekableStart:a.D>0?a.D+H8(a):a.D,offset:0,viewerLivestreamJoinMediaTime:0}}; g.k.nextVideo=function(){this.Ic&&this.Ic.nextVideo()}; g.k.bM=function(){this.Ic&&this.Ic.bM()}; g.k.uaa=function(a){a===1&&(this.LS=this.Ic?N8(this.Ic):null)}; g.k.Qba=function(){var a=vub()?new M8(e$(),void 0):null;if(a){var b=this.Nt;this.loaded&&this.unload();this.Ic=a;this.LS=null;b.key!==this.qq.key&&(this.Nt=b,this.load())}else g.gb(this.Ic),this.Ic=null,this.loaded&&(this.unload(),(a=this.LS)&&a.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(a.videoId,J8(a)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.k.y0=function(){var a=[this.qq],b=a.concat,c=rub();D8()&&g.vs("yt-remote-cast-available")&&c.push({key:"cast-selector-receiver",name:"Cast..."});this.ev=b.call(a,c);a=tub()||this.qq;p$(this,a);this.player.Hc("onMdxReceiversChange")}; g.k.Oba=function(){var a=tub();p$(this,a)}; g.k.Nba=function(){this.Nt=tub()}; g.k.kda=function(){this.YG=!0;o$(this);i$=!1;f$&&h$(f$,1);f$=null}; g.k.jda=function(){this.YG=!1;o$(this);p$(this,this.qq);this.Nt=this.qq;i$=!1;f$=null;this.player.playVideo()}; g.k.Wh=function(a,b){switch(a){case "casting":return this.loaded;case "receivers":return this.ev;case "currentReceiver":return b&&(b.key==="cast-selector-receiver"?Ktb():p$(this,b)),this.loaded?this.Nt:this.qq;case "quickCast":return this.ev.length===2&&this.ev[1].key==="cast-selector-receiver"?(b&&Ktb(),!0):!1}}; g.k.iU=function(){this.Ic.iU()}; g.k.pn=function(){return!1}; g.k.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.k.isLoggedIn=function(){var a,b;return((a=g.Eq("PLAYER_CONFIG"))==null?void 0:(b=a.args)==null?void 0:b.authuser)!==void 0?!0:!(!g.Eq("SESSION_INDEX")&&!g.Eq("LOGGED_IN"))};g.RT("remote",Fub);})(_yt_player);