(function(g){var window=this;'use strict';var Lz=function(e){g.bX(e,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.s9()).toString(36));return e},aW=function(e,N,y){Array.isArray(y)||(y=[String(y)]); g.qxH(e.j,N,y)},c40=function(e){if(e instanceof g.Eo)return e; if(typeof e.SW=="function")return e.SW(!1);if(g.KM(e)){var N=0,y=new g.Eo;y.next=function(){for(;;){if(N>=e.length)return g.pF;if(N in e)return g.Aq(e[N++]);N++}}; return y}throw Error("Not implemented");},kYT=function(e,N,y){if(g.KM(e))g.$R(e,N,y); else for(e=c40(e);;){var w=e.next();if(w.done)break;N.call(y,w.value,void 0,e)}},Bef=function(e,N){var y=[]; kYT(N,function(w){try{var E=g.fi.prototype.N.call(this,w,!0)}catch(A){if(A=="Storage: Invalid value was encountered")return;throw A;}E===void 0?y.push(w):g.Gu5(E)&&y.push(w)},e); return y},XDM=function(e,N){Bef(e,N).forEach(function(y){g.fi.prototype.remove.call(this,y)},e)},PnZ=function(e){if(e.Ng){if(e.Ng.locationOverrideToken)return{locationOverrideToken:e.Ng.locationOverrideToken}; if(e.Ng.latitudeE7!=null&&e.Ng.longitudeE7!=null)return{latitudeE7:e.Ng.latitudeE7,longitudeE7:e.Ng.longitudeE7}}return null},dAF=function(e,N){g.Gw(e,N)||e.push(N)},I6_=function(e){var N=0,y; for(y in e)N++;return N},v1f=function(e,N){return g.di(e,N)},zTT=function(e){try{return g.xJ.JSON.parse(e)}catch(N){}e=String(e); if(/^\s*$/.test(e)?0:/^[\],:{}\s\u2028\u2029]*$/.test(e.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("("+e+")")}catch(N){}throw Error("Invalid JSON string: "+e);},eN=function(e){if(g.xJ.JSON)try{return g.xJ.JSON.parse(e)}catch(N){}return zTT(e)},ii_=function(e){if(e.WP&&typeof e.WP=="function")return e.WP(); if(typeof Map!=="undefined"&&e instanceof Map||typeof Set!=="undefined"&&e instanceof Set)return Array.from(e.values());if(typeof e==="string")return e.split("");if(g.KM(e)){for(var N=[],y=e.length,w=0;w1){if(y%2)throw Error("Uneven number of arguments");for(var w=0;w5&&(e=e.slice(e.length-5)); var N=g.dn(Pg_(),function(w){return w.loungeToken}),y=g.dn(e,function(w){return w.loungeToken}); g.Ip(y,function(w){return!g.Gw(N,w)})&&dyM(); g.uY("yt-remote-local-screens",e,31536E3)},Yk=function(e){e||(g.Zw("yt-remote-session-screen-id"),g.Zw("yt-remote-session-video-id")); Bx0();e=rU();g.Lq(e,$k());cTw(e)},vrf=function(){if(!MQ){var e=g.j6(); e&&(MQ=new g.D6(e))}},z8w=function(){vrf(); return MQ?!!MQ.get("yt-remote-use-staging-server"):!1},lu=function(e,N){g.Al[e]=!0; var y=g.wW();y&&y.publish.apply(y,arguments);g.Al[e]=!1},ib0=function(){},NQ=function(){if(!FN){FN=new g.Pc(new ib0); var e=g.PL("client_streamz_web_flush_count",-1);e!==-1&&(FN.K=e)}return FN},DyV=function(){var e=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return e?parseInt(e[1],10):0},grw=function(e){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+e)!=-1||document.currentScript.src.indexOf("&"+e)!=-1)},VCw=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},SN=function(e){e.length?fOw(e.shift(),function(){SN(e)}):tCF()},ugX=function(e){return"chrome-extension://"+e+"/cast_sender.js"},fOw=function(e,N,y){var w=document.createElement("script"); w.onerror=N;y&&(w.onload=y);g.QZ(w,g.vz(e));(document.head||document.documentElement).appendChild(w)},qa0=function(){var e=DyV(),N=[]; if(e>1){var y=e-1;N.push("//www.gstatic.com/eureka/clank/"+e+"/cast_sender.js");N.push("//www.gstatic.com/eureka/clank/"+y+"/cast_sender.js")}return N},tCF=function(){var e=VCw(); e&&e(!1,"No cast extension found")},xyw=function(){if(ZbF){var e=2,N=VCw(),y=function(){e--; e==0&&N&&N(!0)}; window.__onGCastApiAvailable=y;fOw("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",tCF,y)}},jG_=function(){xyw(); var e=qa0();e.push("//www.gstatic.com/eureka/clank/cast_sender.js");SN(e)},QG_=function(){xyw(); var e=qa0();e.push.apply(e,g.B(nrw.map(ugX)));e.push("//www.gstatic.com/eureka/clank/cast_sender.js");SN(e)},on=function(e,N,y){g.x.call(this); this.Z=y!=null?(0,g.Gs)(e,y):e;this.uR=N;this.L=(0,g.Gs)(this.Mq,this);this.J=!1;this.N=0;this.K=this.g7=null;this.j=[]},bu=function(e,N,y){g.x.call(this); this.j=y!=null?e.bind(y):e;this.uR=N;this.K=null;this.J=!1;this.N=0;this.g7=null},myX=function(e){e.g7=g.Bc(function(){e.g7=null; e.J&&!e.N&&(e.J=!1,myX(e))},e.uR); var N=e.K;e.K=null;e.j.apply(null,N)},hS=function(){},Hbf=function(){g.gs.call(this,"p")},Ky5=function(){g.gs.call(this,"o")},ObZ=function(){return WyT=WyT||new g.Ux},R8w=function(e){g.gs.call(this,"serverreachability",e)},ck=function(e){var N=ObZ(); N.dispatchEvent(new R8w(N,e))},GzF=function(e){g.gs.call(this,"statevent",e)},kk=function(e){var N=ObZ(); N.dispatchEvent(new GzF(N,e))},Uyw=function(e,N,y,w){g.gs.call(this,"timingevent",e); this.size=N;this.rtt=y;this.retries=w},Bk=function(e,N){if(typeof e!=="function")throw Error("Fn must not be null and must be a function"); return g.xJ.setTimeout(function(){e()},N)},XN=function(){},Pk=function(e,N,y,w){this.K=e; this.j=N;this.Xz=y;this.Y_=w||1;this.Kx=new g.XL(this);this.VB=45E3;this.aq=null;this.Z=!1;this.D=this.Wk=this.U=this.Zl=this.qg=this.Dl=this.Ng=null;this.Kh=[];this.J=null;this.G=0;this.L=this.l9=null;this.a9=-1;this.Rq=!1;this.Ut=0;this.Bk=null;this.SR=this.Et=this.dT=this.i9=!1;this.N=new LyV},LyV=function(){this.K=null; this.J="";this.N=!1},aOZ=function(e,N,y){e.Zl=1; e.U=Lz(N.clone());e.D=y;e.i9=!0;sGV(e,null)},sGV=function(e,N){e.qg=Date.now(); dU(e);e.Wk=e.U.clone();aW(e.Wk,"t",e.Y_);e.G=0;var y=e.K.Zl;e.N=new LyV;e.J=egZ(e.K,y?N:null,!e.D);e.Ut>0&&(e.Bk=new bu((0,g.Gs)(e.WH,e,e.J),e.Ut));e.Kx.listen(e.J,"readystatechange",e.Ig);N=e.aq?g.DA(e.aq):{};e.D?(e.l9||(e.l9="POST"),N["Content-Type"]="application/x-www-form-urlencoded",e.J.send(e.Wk,e.l9,e.D,N)):(e.l9="GET",e.J.send(e.Wk,e.l9,null,N));ck(1)},yEw=function(e){if(!N2f(e))return g.LY(e.J); var N=g.s0(e.J);if(N==="")return"";var y="",w=N.length,E=g.G8(e.J)==4;if(!e.N.K){if(typeof TextDecoder==="undefined")return In(e),vk(e),"";e.N.K=new g.xJ.TextDecoder}for(var A=0;AN.length)return wL0;N=N.slice(w,w+y);e.G=w+y;return N},dU=function(e){e.Dl=Date.now()+e.VB; T25(e,e.VB)},T25=function(e,N){if(e.Ng!=null)throw Error("WatchDog timer not null"); e.Ng=Bk((0,g.Gs)(e.QA,e),N)},JEw=function(e){e.Ng&&(g.xJ.clearTimeout(e.Ng),e.Ng=null)},vk=function(e){e.K.u6()||e.Rq||pLT(e.K,e)},In=function(e){JEw(e); g.JV(e.Bk);e.Bk=null;e.Kx.removeAll();if(e.J){var N=e.J;e.J=null;N.abort();N.dispose()}},S8M=function(e,N){try{var y=e.K; if(y.O_!=0&&(y.J==e||C4k(y.N,e)))if(!e.Et&&C4k(y.N,e)&&y.O_==3){try{var w=y.jN.J.parse(N)}catch(k){w=null}if(Array.isArray(w)&&w.length==3){var E=w;if(E[0]==0)a:{if(!y.U){if(y.J)if(y.J.qg+3E30&&(y.Ut=1.5*p);w=y;var C=e.PM();if(C){var r=g.aD(C,"X-Client-Wire-Protocol");if(r){var Y=w.N;!Y.J&&(g.B_(r,"spdy")||g.B_(r,"quic")||g.B_(r,"h2"))&&(Y.j=Y.L,Y.J=new Set,Y.N&&(Y8w(Y,Y.N),Y.N=null))}if(w.i9){var M=g.aD(C,"X-HTTP-Session-Id");M&&(w.YO=M,g.bX(w.aq,w.i9,M))}}y.O_=3;y.L&&y.L.IB();y.FZ&&(y.PY=Date.now()-e.qg);w=y;var l=e;w.U2=MH_(w,w.Zl?w.Y_:null,w.Xz);if(l.Et){lJw(w.N, l);var F=l,S=w.Ut;S&&F.setTimeout(S);F.Ng&&(JEw(F),dU(F));w.J=l}else FHk(w);y.K.length>0&&gU(y)}else A[0]!="stop"&&A[0]!="close"||Dl(y,7);else y.O_==3&&(A[0]=="stop"||A[0]=="close"?A[0]=="stop"?Dl(y,7):y.disconnect():A[0]!="noop"&&y.L&&y.L.Qd(A),y.Kh=0)}ck(4)}catch(k){}},o3w=function(e,N){this.J=e; this.map=N;this.context=null},bpX=function(e){this.L=e||10; g.xJ.PerformanceNavigationTiming?(e=g.xJ.performance.getEntriesByType("navigation"),e=e.length>0&&(e[0].nextHopProtocol=="hq"||e[0].nextHopProtocol=="h2")):e=!!(g.xJ.chrome&&g.xJ.chrome.loadTimes&&g.xJ.chrome.loadTimes()&&g.xJ.chrome.loadTimes().wasFetchedViaSpdy);this.j=e?this.L:1;this.J=null;this.j>1&&(this.J=new Set);this.N=null;this.K=[]},hgf=function(e){return e.N?!0:e.J?e.J.size>=e.j:!1},$RV=function(e){return e.N?1:e.J?e.J.size:0},C4k=function(e,N){return e.N?e.N==N:e.J?e.J.has(N):!1},Y8w= function(e,N){e.J?e.J.add(N):e.N=N},lJw=function(e,N){e.N&&e.N==N?e.N=null:e.J&&e.J.has(N)&&e.J.delete(N)},cE5=function(e){if(e.N!=null)return e.K.concat(e.N.Kh); if(e.J!=null&&e.J.size!==0){var N=e.K;e=g.c(e.J.values());for(var y=e.next();!y.done;y=e.next())N=N.concat(y.value.Kh);return N}return g.eE(e.K)},kkk=function(e,N){var y=new XN; if(g.xJ.Image){var w=new Image;w.onload=g.LM(Vj,y,"TestLoadImage: loaded",!0,N,w);w.onerror=g.LM(Vj,y,"TestLoadImage: error",!1,N,w);w.onabort=g.LM(Vj,y,"TestLoadImage: abort",!1,N,w);w.ontimeout=g.LM(Vj,y,"TestLoadImage: timeout",!1,N,w);g.xJ.setTimeout(function(){if(w.ontimeout)w.ontimeout()},1E4); w.src=e}else N(!1)},B2T=function(e,N){var y=new XN,w=new AbortController,E=setTimeout(function(){w.abort(); Vj(y,"TestPingServer: timeout",!1,N)},1E4); fetch(e,{signal:w.signal}).then(function(A){clearTimeout(E);A.ok?Vj(y,"TestPingServer: ok",!0,N):Vj(y,"TestPingServer: server error",!1,N)}).catch(function(){clearTimeout(E); Vj(y,"TestPingServer: error",!1,N)})},Vj=function(e,N,y,w,E){try{E&&(E.onload=null,E.onerror=null,E.onabort=null,E.ontimeout=null),w(y)}catch(A){}},XLf=function(){this.J=new hS},P4X=function(e,N,y){var w=y||""; try{g1Z(e,function(E,A){var T=E;g.W5(E)&&(T=g.ID(E));N.push(w+A+"="+encodeURIComponent(T))})}catch(E){throw N.push(w+"type="+encodeURIComponent("_badmap")),E; }},f8=function(e,N,y){return y&&y.TPs?y.TPs[e]||N:N},dRT=function(e){this.K=[]; this.Y_=this.U2=this.aq=this.Xz=this.J=this.YO=this.i9=this.Rq=this.G=this.a9=this.D=null;this.sY=this.Wk=0;this.UY=f8("failFast",!1,e);this.Et=this.Ng=this.U=this.Z=this.L=null;this.pX=!0;this.NK=this.Bk=-1;this.SR=this.Kh=this.qg=0;this.im=f8("baseRetryDelayMs",5E3,e);this.Fr=f8("retryDelaySeedMs",1E4,e);this.WE=f8("forwardChannelMaxRetries",2,e);this.CC=f8("forwardChannelRequestTimeoutMs",2E4,e);this.jp=e&&e.YfW||void 0;this.NG=e&&e.Grl||void 0;this.DD=e&&e.moq||!1;this.Ut=void 0;this.Zl=e&&e.uIh|| !1;this.j="";this.N=new bpX(e&&e.SmG);this.jN=new XLf;this.Kx=e&&e.eJh||!1;this.Dl=e&&e.HzW||!1;this.Kx&&this.Dl&&(this.Dl=!1);this.Js=e&&e.lSW||!1;e&&e.gih&&(this.pX=!1);this.FZ=!this.Kx&&this.pX&&e&&e.Zzg||!1;this.LX=void 0;e&&e.CK&&e.CK>0&&(this.LX=e.CK);this.jn=void 0;this.PY=0;this.VB=!1;this.dT=this.l9=null},iu=function(e){e.J&&(IJ0(e),e.J.cancel(),e.J=null)},v3V=function(e){iu(e); e.U&&(g.xJ.clearTimeout(e.U),e.U=null);zq(e);e.N.cancel();e.Z&&(typeof e.Z==="number"&&g.xJ.clearTimeout(e.Z),e.Z=null)},gU=function(e){hgf(e.N)||e.Z||(e.Z=!0,g.Jo(e.g9,e),e.qg=0)},ip5=function(e,N){if($RV(e.N)>=e.N.j-(e.Z?1:0))return!1; if(e.Z)return e.K=N.Kh.concat(e.K),!0;if(e.O_==1||e.O_==2||e.qg>=(e.UY?0:e.WE))return!1;e.Z=Bk((0,g.Gs)(e.g9,e,N),zgw(e,e.qg));e.qg++;return!0},g30=function(e,N){var y; N?y=N.Xz:y=e.Wk++;var w=e.aq.clone();g.bX(w,"SID",e.j);g.bX(w,"RID",y);g.bX(w,"AID",e.Bk);tS(e,w);e.G&&e.D&&g.BN(w,e.G,e.D);y=new Pk(e,e.j,y,e.qg+1);e.G===null&&(y.aq=e.D);N&&(e.K=N.Kh.concat(e.K));N=DR_(e,y,1E3);y.setTimeout(Math.round(e.CC*.5)+Math.round(e.CC*.5*Math.random()));Y8w(e.N,y);aOZ(y,w,N)},tS=function(e,N){e.Rq&&g.oB(e.Rq,function(y,w){g.bX(N,w,y)}); e.L&&g1Z({},function(y,w){g.bX(N,w,y)})},DR_=function(e,N,y){y=Math.min(e.K.length,y); var w=e.L?(0,g.Gs)(e.L.s5,e.L,e):null;a:{for(var E=e.K,A=-1;;){var T=["count="+y];A==-1?y>0?(A=E[0].J,T.push("ofs="+A)):A=0:T.push("ofs="+A);for(var p=!0,C=0;C=3)return!1; e.SR++;e.U=Bk((0,g.Gs)(e.vH,e),zgw(e,e.Kh));e.Kh++;return!0},IJ0=function(e){e.l9!=null&&(g.xJ.clearTimeout(e.l9),e.l9=null)},VH_=function(e){e.J=new Pk(e,e.j,"rpc",e.SR); e.G===null&&(e.J.aq=e.D);e.J.Ut=0;var N=e.U2.clone();g.bX(N,"RID","rpc");g.bX(N,"SID",e.j);g.bX(N,"AID",e.Bk);g.bX(N,"CI",e.Et?"0":"1");!e.Et&&e.LX&&g.bX(N,"TO",e.LX);g.bX(N,"TYPE","xmlhttp");tS(e,N);e.G&&e.D&&g.BN(N,e.G,e.D);e.Ut&&e.J.setTimeout(e.Ut);var y=e.J;e=e.Y_;y.Zl=1;y.U=Lz(N.clone());y.D=null;y.i9=!0;sGV(y,e)},zq=function(e){e.Ng!=null&&(g.xJ.clearTimeout(e.Ng),e.Ng=null)},pLT=function(e,N){var y=null; if(e.J==N){zq(e);IJ0(e);e.J=null;var w=2}else if(C4k(e.N,N))y=N.Kh,lJw(e.N,N),w=1;else return;if(e.O_!=0)if(N.Z)if(w==1){y=N.D?N.D.length:0;N=Date.now()-N.qg;var E=e.qg;w=ObZ();w.dispatchEvent(new Uyw(w,y,N,E));gU(e)}else FHk(e);else{var A=N.a9;E=N.getLastError();if(E==3||E==0&&A>0||!(w==1&&ip5(e,N)||w==2&&rEf(e)))switch(y&&y.length>0&&(N=e.N,N.K=N.K.concat(y)),E){case 1:Dl(e,5);break;case 4:Dl(e,10);break;case 3:Dl(e,6);break;default:Dl(e,2)}}},zgw=function(e,N){var y=e.im+Math.floor(Math.random()* e.Fr); e.isActive()||(y*=2);return y*N},Dl=function(e,N){if(N==2){var y=(0,g.Gs)(e.S4q,e),w=e.NG,E=!w; w=new g.rS(w||"//www.google.com/images/cleardot.gif");g.xJ.location&&g.xJ.location.protocol=="http"||g.$u(w,"https");Lz(w);E?kkk(w.toString(),y):B2T(w.toString(),y)}else kk(2);e.O_=0;e.L&&e.L.MM(N);fJ0(e);v3V(e)},fJ0=function(e){e.O_=0; e.dT=[];if(e.L){var N=cE5(e.N);if(N.length!=0||e.K.length!=0)g.Nd(e.dT,N),g.Nd(e.dT,e.K),e.N.K.length=0,g.eE(e.K),e.K.length=0;e.L.Vd()}},tHF=function(e){if(e.O_==0)return e.dT; var N=[];g.Nd(N,cE5(e.N));g.Nd(N,e.K);return N},MH_=function(e,N,y){var w=g.hh(y); w.J!=""?(N&&g.Yu(w,N+"."+w.J),g.Mk(w,w.K)):(w=g.xJ.location,w=V65(w.protocol,N?N+"."+w.hostname:w.hostname,+w.port,y));N=e.i9;y=e.YO;N&&y&&g.bX(w,N,y);g.bX(w,"VER",e.ev);tS(e,w);return w},egZ=function(e,N,y){if(N&&!e.Zl)throw Error("Can't create secondary domain capable XhrIo object."); N=e.DD&&!e.jp?new g.Wc(new g.T3({Za:y})):new g.Wc(e.jp);N.G=e.Zl;return N},uj_=function(){},q8w=function(){},qQ=function(e,N){g.Ux.call(this); this.J=new dRT(N);this.L=e;this.N=N&&N.ag1||null;e=N&&N.cMl||null;N&&N.aSG&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"});this.J.D=e;e=N&&N.jNB||null;N&&N.nK&&(e?e["X-WebChannel-Content-Type"]=N.nK:e={"X-WebChannel-Content-Type":N.nK});N&&N.CD&&(e?e["X-WebChannel-Client-Profile"]=N.CD:e={"X-WebChannel-Client-Profile":N.CD});this.J.a9=e;(e=N&&N.fUZ)&&!g.kw(e)&&(this.J.G=e);this.Z=N&&N.uIh||!1;this.j=N&&N.knP||!1;(N=N&&N.C99)&&!g.kw(N)&&(this.J.i9=N,g.P4(this.N,N)&&(e= this.N,N in e&&delete e[N]));this.K=new uu(this)},Zpq=function(e){Hbf.call(this); e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var N=e.__sm__;N?this.data=(this.J=g.kY(N))?g.zM(N,this.J):N:this.data=e},xRf=function(e){Ky5.call(this); this.status=1;this.errorCode=e},uu=function(e){this.J=e},jyw=function(e,N){this.N=e; this.J=N},n3w=function(e){return tHF(e.J).map(function(N){var y=e.N; N=N.map;"__data__"in N?(N=N.__data__,y=y.j?zTT(N):N):y=N;return y})},Zl=function(e,N){if(typeof e!=="function")throw Error("Fn must not be null and must be a function"); return g.xJ.setTimeout(function(){e()},N)},jN=function(e){xk.dispatchEvent(new Qy0(xk,e))},Qy0=function(e){g.gs.call(this,"statevent",e)},n8=function(e,N,y,w){this.J=e; this.j=N;this.G=y;this.Z=w||1;this.N=45E3;this.K=new g.XL(this);this.L=new g.kT;this.L.setInterval(250)},HpV=function(e,N,y){e.lA=1; e.dW=Lz(N.clone());e.IM=y;e.i9=!0;mR5(e,null)},KHf=function(e,N,y,w,E){e.lA=1; e.dW=Lz(N.clone());e.IM=null;e.i9=y;E&&(e.Ia=!1);mR5(e,w)},mR5=function(e,N){e.PV=Date.now(); WHf(e);e.hD=e.dW.clone();aW(e.hD,"t",e.Z);e.xg=0;e.Lj=e.J.l0(e.J.Zy()?N:null);e.A0>0&&(e.AD=new bu((0,g.Gs)(e.DL,e,e.Lj),e.A0));e.K.listen(e.Lj,"readystatechange",e.FK);N=e.MF?g.DA(e.MF):{};e.IM?(e.uA="POST",N["Content-Type"]="application/x-www-form-urlencoded",e.Lj.send(e.hD,e.uA,e.IM,N)):(e.uA="GET",e.Ia&&!g.RB&&(N.Connection="close"),e.Lj.send(e.hD,e.uA,null,N));e.J.oN(1)},GkM=function(e,N){var y=e.xg,w=N.indexOf("\n",y); if(w==-1)return OpM;y=Number(N.substring(y,w));if(isNaN(y))return Rg0;w+=1;if(w+y>N.length)return OpM;N=N.slice(w,w+y);e.xg=w+y;return N},WHf=function(e){e.h0=Date.now()+e.N; UR_(e,e.N)},UR_=function(e,N){if(e.RC!=null)throw Error("WatchDog timer not null"); e.RC=Zl((0,g.Gs)(e.pS,e),N)},LH5=function(e){e.RC&&(g.xJ.clearTimeout(e.RC),e.RC=null)},sy5=function(e){e.J.u6()||e.RF||e.J.xd(e)},Qj=function(e){LH5(e); g.JV(e.AD);e.AD=null;e.L.stop();e.K.removeAll();if(e.Lj){var N=e.Lj;e.Lj=null;N.abort();N.dispose()}e.Da&&(e.Da=null)},aJk=function(e,N){try{e.J.sO(e,N),e.J.oN(4)}catch(y){}},N9w=function(e,N,y,w,E){if(w==0)y(!1); else{var A=E||0;w--;ePM(e,N,function(T){T?y(!0):g.xJ.setTimeout(function(){N9w(e,N,y,w,A)},A)})}},ePM=function(e,N,y){var w=new Image; w.onload=function(){try{mt(w),y(!0)}catch(E){}}; w.onerror=function(){try{mt(w),y(!1)}catch(E){}}; w.onabort=function(){try{mt(w),y(!1)}catch(E){}}; w.ontimeout=function(){try{mt(w),y(!1)}catch(E){}}; g.xJ.setTimeout(function(){if(w.ontimeout)w.ontimeout()},N); w.src=e},mt=function(e){e.onload=null; e.onerror=null;e.onabort=null;e.ontimeout=null},y2w=function(e){this.J=e; this.N=new hS},wEX=function(e){var N=Hk(e.J,e.Ev,"/mail/images/cleardot.gif"); Lz(N);N9w(N.toString(),5E3,(0,g.Gs)(e.Gu,e),3,2E3);e.oN(1)},EhX=function(e){var N=e.J.Z; N!=null?(jN(5),N?(jN(11),K8(e.J,e,!1)):(jN(12),K8(e.J,e,!0))):(e.dk=new n8(e),e.dk.MF=e.u0,N=e.J,N=Hk(N,N.Zy()?e.iA:null,e.yS),jN(5),aW(N,"TYPE","xmlhttp"),KHf(e.dk,N,!1,e.iA,!1))},A25=function(e,N,y){this.J=1; this.N=[];this.K=[];this.L=new hS;this.D=e||null;this.Z=N!=null?N:null;this.U=y||!1},T9k=function(e,N){this.J=e; this.map=N;this.context=null},J2k=function(e,N,y,w){g.gs.call(this,"timingevent",e); this.size=N;this.rtt=y;this.retries=w},pEw=function(e){g.gs.call(this,"serverreachability",e)},r2_=function(e){e.J2(1,0); e.y7=Hk(e,null,e.cR);CYV(e)},$IX=function(e){e.W1&&(e.W1.abort(),e.W1=null); e.SZ&&(e.SZ.cancel(),e.SZ=null);e.eI&&(g.xJ.clearTimeout(e.eI),e.eI=null);Wk(e);e.mS&&(e.mS.cancel(),e.mS=null);e.P1&&(g.xJ.clearTimeout(e.P1),e.P1=null)},YF0=function(e,N){if(e.J==0)throw Error("Invalid operation: sending map when state is closed"); e.N.push(new T9k(e.N1++,N));e.J!=2&&e.J!=3||CYV(e)},Muw=function(e){var N=0; e.SZ&&N++;e.mS&&N++;return N},CYV=function(e){e.mS||e.P1||(e.P1=Zl((0,g.Gs)(e.NN,e),0),e.Pv=0)},SFZ=function(e,N){if(e.J==1){if(!N){e.LJ=Math.floor(Math.random()*1E5); N=e.LJ++;var y=new n8(e,"",N);y.MF=e.zq;var w=lw_(e),E=e.y7.clone();g.bX(E,"RID",N);g.bX(E,"CVER","1");Ot(e,E);HpV(y,E,w);e.mS=y;e.J=2}}else e.J==3&&(N?F6F(e,N):e.N.length==0||e.mS||F6F(e))},F6F=function(e,N){if(N)if(e.Df>6){e.N=e.K.concat(e.N); e.K.length=0;var y=e.LJ-1;N=lw_(e)}else y=N.G,N=N.IM;else y=e.LJ++,N=lw_(e);var w=e.y7.clone();g.bX(w,"SID",e.j);g.bX(w,"RID",y);g.bX(w,"AID",e.Z9);Ot(e,w);y=new n8(e,e.j,y,e.Pv+1);y.MF=e.zq;y.setTimeout(1E4+Math.round(1E4*Math.random()));e.mS=y;HpV(y,w,N)},Ot=function(e,N){e.JA&&(e=e.JA.fL())&&g.oB(e,function(y,w){g.bX(N,w,y)})},lw_=function(e){var N=Math.min(e.N.length,1E3),y=["count="+N]; if(e.Df>6&&N>0){var w=e.N[0].J;y.push("ofs="+w)}else w=0;for(var E={},A=0;A=3)return!1; e.G++;e.eI=Zl((0,g.Gs)(e.JR,e),bOw(e,e.Ca));e.Ca++;return!0},K8=function(e,N,y){e.e2=e.Z==null?y:!e.Z; e.Vk=N.W7;e.U||r2_(e)},Wk=function(e){e.s8!=null&&(g.xJ.clearTimeout(e.s8),e.s8=null)},bOw=function(e,N){var y=5E3+Math.floor(Math.random()*1E4); e.isActive()||(y*=2);return y*N},Rn=function(e,N){if(N==2||N==9){var y=null; e.JA&&(y=null);var w=(0,g.Gs)(e.aWP,e);y||(y=new g.rS("//www.google.com/images/cleardot.gif"),Lz(y));ePM(y.toString(),1E4,w)}else jN(2);c20(e,N)},c20=function(e,N){e.J=0; e.JA&&e.JA.kR(N);khf(e);$IX(e)},khf=function(e){e.J=0; e.Vk=-1;if(e.JA)if(e.K.length==0&&e.N.length==0)e.JA.SF();else{var N=g.eE(e.K),y=g.eE(e.N);e.K.length=0;e.N.length=0;e.JA.SF(N,y)}},Hk=function(e,N,y){var w=g.hh(y); if(w.J!="")N&&g.Yu(w,N+"."+w.J),g.Mk(w,w.K);else{var E=window.location;w=V65(E.protocol,N?N+"."+E.hostname:E.hostname,+E.port,y)}e.rW&&g.oB(e.rW,function(A,T){g.bX(w,T,A)}); g.bX(w,"VER",e.Df);Ot(e,w);return w},B9w=function(){},XEw=function(){this.J=[]; this.N=[]},PY0=function(e){g.gs.call(this,"channelMessage"); this.message=e},dI_=function(e){g.gs.call(this,"channelError"); this.error=e},Iw_=function(e,N){this.action=e; this.params=N||{}},Gq=function(e,N){g.x.call(this); this.J=new g.e6(this.FaG,0,this);g.Q(this,this.J);this.uR=5E3;this.N=0;if(typeof e==="function")N&&(e=(0,g.Gs)(e,N));else if(e&&typeof e.handleEvent==="function")e=(0,g.Gs)(e.handleEvent,e);else throw Error("Invalid listener argument");this.K=e},vhw=function(e,N,y,w,E,A,T){y=y===void 0?!1:y; w=w===void 0?function(){return""}:w; E=E===void 0?!1:E;A=A===void 0?!1:A;T=T===void 0?function(){return g.S9({})}:T; this.Rq=e;this.Ng=N;this.L=new g.zY;this.N=new Gq(this.aMs,this);this.J=null;this.G=!1;this.D=null;this.qg="";this.Kh=this.U=0;this.K=[];this.Wk=y;this.l9=w;this.Z=A;this.i9=T;this.j=g.S9();this.Ut=E;this.Bk=new f6F;this.aq=new t6w;this.Et=new uM_;this.Zl=new q2w;this.VB=new Zi_;this.Dl=new xAV},iOZ=function(e,N,y,w,E){zP0(e); if(e.J){var A=g.Lb("ID_TOKEN"),T=e.J.zq||{};A?T["x-youtube-identity-token"]=A:delete T["x-youtube-identity-token"];e.J.zq=T}w?(w.getState()!=3&&Muw(w)==0||w.getState(),e.J.connect(N,y,e.Ng,w.j,w.Z9)):E?e.J.connect(N,y,e.Ng,E.sessionId,E.arrayId):e.J.connect(N,y,e.Ng)},Vuw=function(e){var N,y; g.f(function(w){if(w.J==1)return g.kJ(w,2),g.D(w,DIZ(e),2);g.P5(w);N=e.K;e.K=[];y=N.length;gh_(e,N,y);Ut(e);return g.d_(w,0)})},gh_=function(e,N,y){for(var w=0;w0?y=Object.assign({},y,N):delete y.Authorization;e.J.zq=y}).catch(function(){})},L8=function(e){this.scheme="https"; this.port=this.domain="";this.J="/api/lounge";this.N=!0;e=e||document.location.href;var N=Number(g.to(4,e))||"";N&&(this.port=":"+N);this.domain=g.uB(e)||"";e=g.zw();e.search("MSIE")>=0&&(e=e.match(/MSIE ([\d.]+)/)[1],g.v_(e,"10.0")<0&&(this.N=!1))},an=function(e,N){var y=e.J; e.N&&(y=e.scheme+"://"+e.domain+e.port+e.J);return g.Qb(y+N,{})},fwT=function(e,N){g.Ux.call(this); var y=this;this.bB=e();this.bB.subscribe("handlerOpened",this.KS,this);this.bB.subscribe("handlerClosed",this.onClosed,this);this.bB.subscribe("handlerError",function(w,E){y.onError(E)}); this.bB.subscribe("handlerMessage",this.onMessage,this);this.J=N},tuZ=function(e,N,y){var w=this; y=y===void 0?function(){return""}:y; var E=E===void 0?new q8w:E;var A=A===void 0?new g.zY:A;this.pathPrefix=e;this.J=N;this.qg=y;this.L=A;this.U=null;this.D=this.G=0;this.channel=null;this.Z=0;this.K=new Gq(function(){w.K.isActive();var T;((T=w.channel)==null?void 0:$RV((new jyw(T,T.J)).J.N))===0&&w.connect(w.U,w.G)}); this.j={};this.N={};this.Ng=!1;this.logger=null;this.Kh=[];this.Ie=void 0;this.aq=new f6F;this.l9=new t6w;this.Rq=new uM_;this.i9=new q2w},ucw=function(e){g.jv(e.channel,"m",function(){e.Z=3; e.K.reset();e.U=null;e.G=0;for(var N=g.c(e.Kh),y=N.next();!y.done;y=N.next())y=y.value,e.channel&&e.channel.send(y);e.Kh=[];e.publish("webChannelOpened");e.aq.J("WEB_CHANNEL")}); g.jv(e.channel,"n",function(){e.Z=0;e.K.isActive()||e.publish("webChannelClosed");var N,y=(N=e.channel)==null?void 0:n3w(new jyw(N,N.J));y&&(e.Kh=[].concat(g.B(y)));e.l9.J("WEB_CHANNEL")}); g.jv(e.channel,"p",function(N){var y=N.data;y[0]==="gracefulReconnect"?(e.K.start(),e.channel&&e.channel.close()):e.publish("webChannelMessage",new Iw_(y[0],y[1]));e.Ie=N.statusCode;e.Rq.J("WEB_CHANNEL")}); g.jv(e.channel,"o",function(){e.Ie===401||e.K.start();e.publish("webChannelError");e.i9.J("WEB_CHANNEL")})},qFM=function(e){var N=e.qg(); N?e.j["x-youtube-lounge-xsrf-token"]=N:delete e.j["x-youtube-lounge-xsrf-token"]},ZOZ=function(e){g.Ux.call(this); this.J=e();this.J.subscribe("webChannelOpened",this.t2,this);this.J.subscribe("webChannelClosed",this.onClosed,this);this.J.subscribe("webChannelError",this.onError,this);this.J.subscribe("webChannelMessage",this.onMessage,this)},xI_=function(e,N,y,w,E){function A(){return new vhw(an(e,"/bc"),N,!1,y,w)} y=y===void 0?function(){return""}:y; return g.Xj("enable_mdx_web_channel_desktop")?new ZOZ(function(){return new tuZ(an(e,"/wc"),N,y)}):new fwT(A,E)},mIw=function(){var e=jz_; nh0();eG.push(e);QzZ()},N1=function(e,N){nh0(); var y=HO5(e,String(N));eG.length==0?K6F(y):(QzZ(),g.$R(eG,function(w){w(y)}))},yr=function(e){N1("CP",e)},nh0=function(){eG||(eG=g.nM("yt.mdx.remote.debug.handlers_")||[],g.jM("yt.mdx.remote.debug.handlers_",eG))},K6F=function(e){var N=(wb+1)%50; wb=N;Eu[N]=e;AD||(AD=N==49)},QzZ=function(){var e=eG; if(Eu[0]){var N=AD?wb:-1,y={};do y={Ra:void 0},N=(N+1)%50,y.Ra=Eu[N],g.$R(e,function(w){return function(E){E(w.Ra)}}(y)); while(N!=wb);Eu=Array(50);wb=-1;AD=!1}},HO5=function(e,N){var y=(Date.now()-W6q)/1E3; y.toFixed&&(y=y.toFixed(3));var w=[];w.push("[",y+"s","] ");w.push("[","yt.mdx.remote","] ");w.push(e+": "+N,"\n");return w.join("")},TU=function(e){g.pT.call(this); this.Z=e;this.screens=[]},OOq=function(e,N){var y=e.get(N.uuid)||e.get(N.id); if(y)return e=y.name,y.id=N.id||y.id,y.name=N.name,y.token=N.token,y.uuid=N.uuid||y.uuid,y.name!=e;e.screens.push(N);return!0},RPV=function(e,N){var y=e.screens.length!=N.length; e.screens=g.CG(e.screens,function(A){return!!or5(N,A)}); for(var w=N.length,E=0;E0&&e.j0&&hD(e,y)},function(N){e.L=function(){}; e.sP(N)})},XVZ=function(e){var N={}; N.pairingCode=e.l9;N.theme=e.Zl;z8w()&&(N.env_useStageMdx=1);return g.nY(N)},PCw=function(e){return new Promise(function(N){e.l9=FyF(); if(e.aq){var y=new chrome.cast.DialLaunchResponse(!0,XVZ(e));N(y);B0T(e)}else e.Ng=function(){g.cL(e.D);e.Ng=function(){}; e.D=NaN;var w=new chrome.cast.DialLaunchResponse(!0,XVZ(e));N(w);B0T(e)},e.D=g.b4(function(){e.Ng()},100)})},ImM=function(e,N,y){e.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(N)); var w=new Tq(N);return(new Promise(function(E){d7_(e,w,function(A){A?(e.Kh=!0,Yc(e.j,w),lD(e,w),hD(e,y)):g.eH(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(N)+" is not online."));E(A)},5)})).then(function(E){return E?new chrome.cast.DialLaunchResponse(!1):PCw(e)})},v$F=function(e,N){var y=e.U.receiver.label,w=e.N.friendlyName; return(new Promise(function(E){T00(e.j,y,N,w,function(A){A&&A.token&&lD(e,A);E(A)},function(A){Fk(e,"Failed to get DIAL screen: "+A); E(null)})})).then(function(E){return E&&E.token?new chrome.cast.DialLaunchResponse(!1):PCw(e)})},d7_=function(e,N,y,w){g.cL(e.Z); e.Z=0;pVX(e.j,N,function(E){E||w<0?y(E):e.Z=g.b4(function(){d7_(e,N,y,w-1)},300)})},hD=function(e,N){e.info("getDialAppInfoWithTimeout_ "+N); bD(e)&&(g.cL(e.G),e.G=0,N==0?zb5(e):e.G=g.b4(function(){zb5(e)},N))},zb5=function(e){bD(e)&&e.K.getDialAppInfo(function(N){e.info("getDialAppInfo dialLaunchData: "+JSON.stringify(N)); N=N.extraData||{};var y=null;if(N.loungeToken){var w;((w=e.J)==null?void 0:w.token)==N.loungeToken&&(y="staleLoungeToken")}else y="missingLoungeToken";y?(e.qg=y,hD(e,3E4)):(e.Kh=!1,e.qg="unknown",Ymw(e,N.loungeToken),hD(e,N.loungeTokenRefreshIntervalMs))},function(N){e.info("getDialAppInfo error: "+N); e.qg="noLoungeTokenResponse";hD(e,3E4)})},ilV=function(e){g.cL(e.Z); e.Z=0;g.cL(e.G);e.G=0;e.L();e.L=function(){}; g.cL(e.D)},cS=function(e,N){M1.call(this,e,N,"ManualSession"); this.K=g.b4((0,g.Gs)(this.y0,this,null),150)},kc=function(e,N){g.pT.call(this); this.config_=N;this.N=e;this.U=N.appId||"233637DE";this.j=N.theme||"cl";this.D=N.disableCastApi||!1;this.Z=N.forceMirroring||!1;this.J=null;this.G=!1;this.K=[];this.L=(0,g.Gs)(this.OCG,this)},D7M=function(e,N){return N?g.Ok(e.K,function(y){return JS(N,y.label)},e):null},BS=function(e){N1("Controller",e)},jz_=function(e){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(e)},Xk=function(e){return e.G||!!e.K.length||!!e.J},PS=function(e,N,y){N!=e.J&&(g.JV(e.J),(e.J=N)?(y?e.publish("yt-remote-cast2-receiver-resumed", N.N):e.publish("yt-remote-cast2-receiver-selected",N.N),N.subscribe("sessionScreen",(0,g.Gs)(e.Ew,e,N)),N.subscribe("sessionFailed",function(){return g$f(e,N)}),N.J?e.publish("yt-remote-cast2-session-change",N.J):y&&e.J.y0(null)):e.publish("yt-remote-cast2-session-change",null))},g$f=function(e,N){e.J==N&&e.publish("yt-remote-cast2-session-failed")},V10=function(e){var N=e.N.jG(),y=e.J&&e.J.N; e=g.dn(N,function(w){y&&JS(w,y.label)&&(y=null);var E=w.uuid?w.uuid:w.id,A=D7M(this,w);A?(A.label=E,A.friendlyName=w.name):(A=new chrome.cast.Receiver(E,w.name),A.receiverType=chrome.cast.ReceiverType.CUSTOM);return A},e); y&&(y.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(y=new chrome.cast.Receiver(y.label,y.friendlyName),y.receiverType=chrome.cast.ReceiverType.CUSTOM),e.push(y));return e},jvX=function(e,N,y,w){w.disableCastApi?db("Cannot initialize because disabled by Mdx config."):fm_()?t10(N,w)&&(u6f(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?qmT(e,y):(window.__onGCastApiAvailable=function(E,A){E?qmT(e,y):(I6("Failed to load cast API: "+A),ZlV(!1),u6f(!1),g.Zw("yt-remote-cast-available"),g.Zw("yt-remote-cast-receiver"), x7q(),y(!1))},w.loadCastApiSetupScript?g.rW("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?DyV()>=60&&jG_():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?tCF():DyV()>=89?QG_():(xyw(),SN(nrw.map(ugX))))):db("Cannot initialize because not running Chrome")},x7q=function(){db("dispose"); var e=vS();e&&e.dispose();g.jM("yt.mdx.remote.cloudview.instance_",null);n$X(!1);g.pE(QvV);QvV.length=0},zU=function(){return!!g.qI("yt-remote-cast-installed")},m7w=function(){var e=g.qI("yt-remote-cast-receiver"); return e?e.friendlyName:null},Hlw=function(){db("clearCurrentReceiver"); g.Zw("yt-remote-cast-receiver")},K10=function(){return zU()?vS()?vS().getCastSession():(I6("getCastSelector: Cast is not initialized."),null):(I6("getCastSelector: Cast API is not installed!"),null)},W1V=function(){zU()?vS()?iD()?(db("Requesting cast selector."),vS().requestSession()):(db("Wait for cast API to be ready to request the session."),QvV.push(g.Jl("yt-remote-cast2-api-ready",W1V))):I6("requestCastSelector: Cast is not initialized."):I6("requestCastSelector: Cast API is not installed!")}, DP=function(e,N){iD()?vS().setConnectedScreenStatus(e,N):I6("setConnectedScreenStatus called before ready.")},fm_=function(){var e=g.zw().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.i$||e},OlX=function(e,N){vS().init(e,N)},t10=function(e,N){var y=!1; vS()||(e=new kc(e,N),e.subscribe("yt-remote-cast2-availability-change",function(w){g.uY("yt-remote-cast-available",w);lu("yt-remote-cast2-availability-change",w)}),e.subscribe("yt-remote-cast2-receiver-selected",function(w){db("onReceiverSelected: "+w.friendlyName); g.uY("yt-remote-cast-receiver",w);lu("yt-remote-cast2-receiver-selected",w)}),e.subscribe("yt-remote-cast2-receiver-resumed",function(w){db("onReceiverResumed: "+w.friendlyName); g.uY("yt-remote-cast-receiver",w);lu("yt-remote-cast2-receiver-resumed",w)}),e.subscribe("yt-remote-cast2-session-change",function(w){db("onSessionChange: "+p8(w)); w||g.Zw("yt-remote-cast-receiver");lu("yt-remote-cast2-session-change",w)}),g.jM("yt.mdx.remote.cloudview.instance_",e),y=!0); db("cloudview.createSingleton_: "+y);return y},vS=function(){return g.nM("yt.mdx.remote.cloudview.instance_")},qmT=function(e,N){ZlV(!0); u6f(!1);OlX(e,function(y){y?(n$X(!0),g.CE("yt-remote-cast2-api-ready")):(I6("Failed to initialize cast API."),ZlV(!1),g.Zw("yt-remote-cast-available"),g.Zw("yt-remote-cast-receiver"),x7q());N(y)})},db=function(e){N1("cloudview",e)},I6=function(e){N1("cloudview",e)},ZlV=function(e){db("setCastInstalled_ "+e); g.uY("yt-remote-cast-installed",e)},iD=function(){return!!g.nM("yt.mdx.remote.cloudview.apiReady_")},n$X=function(e){db("setApiReady_ "+e); g.jM("yt.mdx.remote.cloudview.apiReady_",e)},u6f=function(e){g.jM("yt.mdx.remote.cloudview.initializing_",e)},gb=function(e){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.Z=this.G=0;this.trackData=null;this.gk=this.GJ=!1;this.U=this.L=this.J=this.j=0;this.K=NaN;this.N=!1;this.reset(e)},Rb_=function(e){e.audioTrackId=null; e.trackData=null;e.playerState=-1;e.GJ=!1;e.gk=!1;e.G=0;e.Z=g.s9();e.j=0;e.J=0;e.L=0;e.U=0;e.K=NaN;e.N=!1},Vr=function(e){return e.isPlaying()?(g.s9()-e.Z)/1E3:0},f4=function(e,N){e.G=N; e.Z=g.s9()},tD=function(e){switch(e.playerState){case 1:case 1081:return(g.s9()-e.Z)/1E3+e.G; case -1E3:return 0}return e.G},uD=function(e,N,y){var w=e.videoId; e.videoId=N;e.index=y;N!=w&&Rb_(e)},Gv0=function(e){var N={}; N.index=e.index;N.listId=e.listId;N.videoId=e.videoId;N.playerState=e.playerState;N.volume=e.volume;N.muted=e.muted;N.audioTrackId=e.audioTrackId;N.trackData=g.gi(e.trackData);N.hasPrevious=e.GJ;N.hasNext=e.gk;N.playerTime=e.G;N.playerTimeAt=e.Z;N.seekableStart=e.j;N.seekableEnd=e.J;N.duration=e.L;N.loadedTime=e.U;N.liveIngestionTime=e.K;return N},ZP=function(e,N){g.pT.call(this); var y=this;this.K=0;this.j=e;this.Z=[];this.L=new XEw;this.N=this.J=null;this.D=(0,g.Gs)(this.pYk,this);this.G=(0,g.Gs)(this.ML,this);this.U=(0,g.Gs)(this.s9q,this);this.Ng=(0,g.Gs)(this.Jzq,this);var w=0;e?(w=e.getProxyState(),w!=3&&(e.subscribe("proxyStateChange",this.uG,this),U7f(this))):w=3;w!=0&&(N?this.uG(w):g.b4(function(){y.uG(w)},0)); (e=K10())&&q1(this,e);this.subscribe("yt-remote-cast2-session-change",this.Ng)},xc=function(e){return new gb(e.j.getPlayerContextData())},U7f=function(e){g.$R("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(N){this.Z.push(this.j.subscribe(N,g.LM(this.bCg,N),this))},e)},L1w=function(e){g.$R(e.Z,function(N){this.j.unsubscribeByKey(N)},e); e.Z.length=0},jG=function(e){return e.getState()==1},n4=function(e,N){var y=e.L; y.J.length+y.N.length<50&&e.L.enqueue(N)},svw=function(e,N,y){var w=xc(e); f4(w,y);w.playerState!=-1E3&&(w.playerState=N);Qr(e,w)},me=function(e,N,y){e.j.sendMessage(N,y)},Qr=function(e,N){L1w(e); e.j.setPlayerContextData(Gv0(N));U7f(e)},q1=function(e,N){e.N&&(e.N.removeUpdateListener(e.D),e.N.removeMediaListener(e.G),e.ML(null)); e.N=N;e.N&&(yr("Setting cast session: "+e.N.sessionId),e.N.addUpdateListener(e.D),e.N.addMediaListener(e.G),e.N.media.length&&e.ML(e.N.media[0]))},am5=function(e){var N=e.J.media,y=e.J.customData; if(N&&y){var w=xc(e);N.contentId!=w.videoId&&yr("Cast changing video to: "+N.contentId);w.videoId=N.contentId;w.playerState=y.playerState;f4(w,e.J.getEstimatedTime());Qr(e,w)}else yr("No cast media video. Ignoring state update.")},HS=function(e,N,y){return(0,g.Gs)(function(w){this.EX("Failed to "+N+" with cast v2 channel. Error code: "+w.code); w.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.EX("Retrying "+N+" using MDx browser channel."),me(this,N,y))},e)},Ou=function(e,N,y,w){w=w===void 0?!1:w; g.pT.call(this);var E=this;this.Z=NaN;this.l9=!1;this.D=this.U=this.Kh=this.qg=NaN;this.Ng=[];this.L=this.G=this.j=this.J=this.N=null;this.aq=e;this.Rq=w;this.Ng.push(g.PE(window,"beforeunload",function(){E.AO(2)})); this.K=[];this.J=new gb;this.Zl=N.id;this.i9=N.idType;this.N=xI_(this.aq,y,this.hR,this.i9=="shortLived",this.Zl);this.N.listen("channelOpened",function(){eWk(E)}); this.N.listen("channelClosed",function(){K4("Channel closed");isNaN(E.Z)?Yk(!0):Yk();E.dispose()}); this.N.listen("channelError",function(A){Yk();isNaN(E.WQ())?(A==1&&E.i9=="shortLived"&&E.publish("browserChannelAuthError",A),K4("Channel error: "+A+" without reconnection"),E.dispose()):(E.l9=!0,K4("Channel error: "+A+" with reconnection in "+E.WQ()+" ms"),WS(E,2))}); this.N.listen("channelMessage",function(A){Now(E,A)}); this.N.tf(N.token);this.subscribe("remoteQueueChange",function(){var A=E.J.videoId;g.xh()&&g.uY("yt-remote-session-video-id",A)})},yxF=function(e){return g.Ok(e.K,function(N){return N.type=="LOUNGE_SCREEN"})},K4=function(e){N1("conn",e)},WS=function(e,N){e.publish("proxyStateChange",N)},wiw=function(e){e.Z=g.b4(function(){K4("Connecting timeout"); e.AO(1)},2E4)},EpX=function(e){g.cL(e.Z); e.Z=NaN},Ax0=function(e){g.cL(e.qg); e.qg=NaN},Jxw=function(e){ToV(e); e.Kh=g.b4(function(){R6(e,"getNowPlaying")},2E4)},ToV=function(e){g.cL(e.Kh); e.Kh=NaN},eWk=function(e){K4("Channel opened"); e.l9&&(e.l9=!1,Ax0(e),e.qg=g.b4(function(){K4("Timing out waiting for a screen.");e.AO(1)},15E3))},CtT=function(e,N){var y=null; if(N){var w=yxF(e);w&&(y={clientName:w.clientName,deviceMake:w.brand,deviceModel:w.model,osVersion:w.osVersion})}g.jM("yt.mdx.remote.remoteClient_",y);N&&(EpX(e),Ax0(e));y=e.N.yp()&&isNaN(e.Z);N==y?N&&(WS(e,1),R6(e,"getSubtitlesTrack")):N?(e.Ee()&&e.J.reset(),WS(e,1),R6(e,"getNowPlaying"),pi_(e)):e.AO(1)},rxw=function(e,N){var y=N.params.videoId; delete N.params.videoId;y==e.J.videoId&&(g.v4(N.params)?e.J.trackData=null:e.J.trackData=N.params,e.publish("remotePlayerChange"))},$9T=function(e,N,y){var w=N.params.videoId||N.params.video_id,E=parseInt(N.params.currentIndex,10); e.J.listId=N.params.listId||e.J.listId;uD(e.J,w,E);e.publish("remoteQueueChange",y)},M7q=function(e,N){N.params=N.params||{}; $9T(e,N,"NOW_PLAYING_MAY_CHANGE");YET(e,N);e.publish("autoplayDismissed")},YET=function(e,N){var y=parseInt(N.params.currentTime||N.params.current_time,10); f4(e.J,isNaN(y)?0:y);y=parseInt(N.params.state,10);y=isNaN(y)?-1:y;y==-1&&e.J.playerState==-1E3&&(y=-1E3);e.J.playerState=y;y=Number(N.params.loadedTime);e.J.U=isNaN(y)?0:y;e.J.zV(Number(N.params.duration));y=e.J;var w=Number(N.params.liveIngestionTime);y.K=w;y.N=isNaN(w)?!1:!0;y=e.J;w=Number(N.params.seekableStartTime);N=Number(N.params.seekableEndTime);y.j=isNaN(w)?0:w;y.J=isNaN(N)?0:N;e.J.playerState==1?Jxw(e):ToV(e);e.publish("remotePlayerChange")},lxT=function(e,N){if(e.J.playerState!=-1E3){var y= 1085; switch(parseInt(N.params.adState,10)){case 1:y=1081;break;case 2:y=1084;break;case 0:y=1083}e.J.playerState=y;N=parseInt(N.params.currentTime,10);f4(e.J,isNaN(N)?0:N);e.publish("remotePlayerChange")}},FKw=function(e,N){var y=N.params.muted=="true"; e.J.volume=parseInt(N.params.volume,10);e.J.muted=y;e.publish("remotePlayerChange")},SEk=function(e,N){e.G=N.params.videoId; e.publish("nowAutoplaying",parseInt(N.params.timeout,10))},op0=function(e,N){e.G=N.params.videoId||null; e.publish("autoplayUpNext",e.G)},b6_=function(e,N){e.L=N.params.autoplayMode; e.publish("autoplayModeChange",e.L);e.L=="DISABLED"&&e.publish("autoplayDismissed")},hWw=function(e,N){var y=N.params.hasNext=="true"; e.J.GJ=N.params.hasPrevious=="true";e.J.gk=y;e.publish("previousNextChange")},Now=function(e,N){N=N.message; N.params?K4("Received: action="+N.action+", params="+g.ID(N.params)):K4("Received: action="+N.action+" {}");switch(N.action){case "loungeStatus":N=eN(N.params.devices);e.K=g.dn(N,function(w){return new AS(w)}); N=!!g.Ok(e.K,function(w){return w.type=="LOUNGE_SCREEN"}); CtT(e,N);N=e.Wj("mlm");e.publish("multiStateLoopEnabled",N);break;case "loungeScreenDisconnected":g.sk(e.K,function(w){return w.type=="LOUNGE_SCREEN"}); CtT(e,!1);break;case "remoteConnected":var y=new AS(eN(N.params.device));g.Ok(e.K,function(w){return w.Bw(y)})||dAF(e.K,y); break;case "remoteDisconnected":y=new AS(eN(N.params.device));g.sk(e.K,function(w){return w.Bw(y)}); break;case "gracefulDisconnect":break;case "playlistModified":$9T(e,N,"QUEUE_MODIFIED");break;case "nowPlaying":M7q(e,N);break;case "onStateChange":YET(e,N);break;case "onAdStateChange":lxT(e,N);break;case "onVolumeChanged":FKw(e,N);break;case "onSubtitlesTrackChanged":rxw(e,N);break;case "nowAutoplaying":SEk(e,N);break;case "autoplayDismissed":e.publish("autoplayDismissed");break;case "autoplayUpNext":op0(e,N);break;case "onAutoplayModeChanged":b6_(e,N);break;case "onHasPreviousNextChanged":hWw(e, N);break;case "requestAssistedSignIn":e.publish("assistedSignInRequested",N.params.authCode);break;case "onLoopModeChanged":e.publish("loopModeChange",N.params.loopMode);break;default:K4("Unrecognized action: "+N.action)}},pi_=function(e){g.cL(e.D); e.D=g.b4(function(){e.AO(1)},864E5)},R6=function(e,N,y){y?K4("Sending: action="+N+", params="+g.ID(y)):K4("Sending: action="+N); e.N.sendMessage(N,y)},cxX=function(e){TU.call(this,"ScreenServiceProxy"); this.GS=e;this.J=[];this.J.push(this.GS.$_s("screenChange",(0,g.Gs)(this.x8,this)));this.J.push(this.GS.$_s("onlineScreenChange",(0,g.Gs)(this.vkt,this)))},d9q=function(e,N){vrf(); if(!MQ||!MQ.get("yt-remote-disable-remote-module-for-dev")){N=g.Lb("MDX_CONFIG")||N;bb_();Bx0();GU||(GU=new L8(N?N.loungeApiHost:void 0),z8w()&&(GU.J="/api/loungedev"));Uu||(Uu=g.nM("yt.mdx.remote.deferredProxies_")||[],g.jM("yt.mdx.remote.deferredProxies_",Uu));kik();var y=L4();if(!y){var w=new $c(GU,N?N.disableAutomaticScreenCache||!1:!1);g.jM("yt.mdx.remote.screenService_",w);y=L4();var E={};N&&(E={appId:N.appId,disableDial:N.disableDial,theme:N.theme,loadCastApiSetupScript:N.loadCastApiSetupScript, disableCastApi:N.disableCastApi,enableDialLoungeToken:N.enableDialLoungeToken,enableCastLoungeToken:N.enableCastLoungeToken,forceMirroring:N.forceMirroring});g.jM("yt.mdx.remote.enableConnectWithInitialState_",N?N.enableConnectWithInitialState||!1:!1);jvX(e,w,function(A){A?a6()&&DP(a6(),"YouTube TV"):w.subscribe("onlineScreenChange",function(){lu("yt-remote-receiver-availability-change")})},E)}N&&!g.nM("yt.mdx.remote.initialized_")&&(g.jM("yt.mdx.remote.initialized_",!0),e_("Initializing: "+g.ID(N)), Nj.push(g.Jl("yt-remote-cast2-api-ready",function(){lu("yt-remote-api-ready")})),Nj.push(g.Jl("yt-remote-cast2-availability-change",function(){lu("yt-remote-receiver-availability-change")})),Nj.push(g.Jl("yt-remote-cast2-receiver-selected",function(){y5(null); lu("yt-remote-auto-connect","cast-selector-receiver")})),Nj.push(g.Jl("yt-remote-cast2-receiver-resumed",function(){lu("yt-remote-receiver-resumed","cast-selector-receiver")})),Nj.push(g.Jl("yt-remote-cast2-session-change",Boq)),Nj.push(g.Jl("yt-remote-connection-change",function(A){A?DP(a6(),"YouTube TV"):wc()||(DP(null,null),Hlw())})),Nj.push(g.Jl("yt-remote-cast2-session-failed",function(){lu("yt-remote-connection-failed")})),e=XiV(),N.isAuto&&(e.id+="#dial"),E=N.capabilities||[],g.Xj("desktop_enable_autoplay")&& E.push("atp"),E.length>0&&(e.capabilities=E),e.name=N.device,e.app=N.app,(N=N.theme)&&(e.theme=N),e_(" -- with channel params: "+g.ID(e)),e?(g.uY("yt-remote-session-app",e.app),g.uY("yt-remote-session-name",e.name)):(g.Zw("yt-remote-session-app"),g.Zw("yt-remote-session-name")),g.jM("yt.mdx.remote.channelParams_",e),y.start(),a6()||Ptf())}},Ixw=function(){var e=L4().GS.$_gos(); var N=EQ();N&&A1()&&(or5(e,N)||e.push(N));return SaX(e)},zWZ=function(){var e=vpT(); !e&&zU()&&m7w()&&(e={key:"cast-selector-receiver",name:m7w()});return e},vpT=function(){var e=Ixw(),N=EQ(); N||(N=wc());return g.Ok(e,function(y){return N&&JS(N,y.key)?!0:!1})},EQ=function(){var e=a6(); if(!e)return null;var N=L4().Wc();return C8(N,e)},Boq=function(e){e_("remote.onCastSessionChange_: "+p8(e)); if(e){var N=EQ();if(N&&N.id==e.id){if(DP(N.id,"YouTube TV"),e.idType=="shortLived"&&(e=e.token))TZ&&(TZ.token=e),(N=A1())&&N.tf(e)}else N&&J1(),pu(e,1)}else A1()&&J1()},J1=function(){iD()?vS().stopSession():I6("stopSession called before API ready."); var e=A1();e&&(e.disconnect(1),i6F(null))},D9k=function(){var e=A1(); return!!e&&e.getProxyState()!=3},e_=function(e){N1("remote",e)},L4=function(){if(!gpk){var e=g.nM("yt.mdx.remote.screenService_"); gpk=e?new cxX(e):null}return gpk},a6=function(){return g.nM("yt.mdx.remote.currentScreenId_")},V7f=function(e){g.jM("yt.mdx.remote.currentScreenId_",e)},fxF=function(){return g.nM("yt.mdx.remote.connectData_")},y5=function(e){g.jM("yt.mdx.remote.connectData_",e)},A1=function(){return g.nM("yt.mdx.remote.connection_")},i6F=function(e){var N=A1(); y5(null);e||V7f("");g.jM("yt.mdx.remote.connection_",e);Uu&&(g.$R(Uu,function(y){y(e)}),Uu.length=0); N&&!e?lu("yt-remote-connection-change",!1):!N&&e&&lu("yt-remote-connection-change",!0)},wc=function(){var e=g.xh(); if(!e)return null;var N=L4();if(!N)return null;N=N.Wc();return C8(N,e)},pu=function(e,N){a6(); EQ()&&EQ();if(Cu)TZ=e;else{V7f(e.id);var y=g.nM("yt.mdx.remote.enableConnectWithInitialState_")||!1;e=new Ou(GU,e,XiV(),y);e.connect(N,fxF());e.subscribe("beforeDisconnect",function(w){lu("yt-remote-before-disconnect",w)}); e.subscribe("beforeDispose",function(){A1()&&(A1(),i6F(null))}); e.subscribe("browserChannelAuthError",function(){var w=EQ();w&&w.idType=="shortLived"&&(iD()?vS().handleBrowserChannelAuthError():I6("refreshLoungeToken called before API ready."))}); i6F(e)}},Ptf=function(){var e=wc(); e?(e_("Resume connection to: "+p8(e)),pu(e,0)):(Yk(),Hlw(),e_("Skipping connecting because no session screen found."))},kik=function(){var e=XiV(); if(g.v4(e)){e=$k();var N=g.qI("yt-remote-session-name")||"",y=g.qI("yt-remote-session-app")||"";e={device:"REMOTE_CONTROL",id:e,name:N,app:y,mdxVersion:3};e.authuser=String(g.Lb("SESSION_INDEX","0"));(N=g.Lb("DELEGATED_SESSION_ID"))&&(e.pageId=String(N));g.jM("yt.mdx.remote.channelParams_",e)}},XiV=function(){return g.nM("yt.mdx.remote.channelParams_")||{}},qE_=function(e,N,y){g.x.call(this); var w=this;this.module=e;this.C=N;this.Sn=y;this.events=new g.fd(this);this.j=!1;this.L=new g.a8(64);this.J=new g.e6(this.aP,500,this);this.N=new g.e6(this.SX,1E3,this);this.G=new on(this.vx9,0,this);this.K={};this.U=new g.e6(this.cB,1E3,this);this.Z=new bu(this.seekTo,1E3,this);this.D=this.events.Y(this.C,"onVolumeChange",function(E){t7f(w,E)}); g.Q(this,this.events);this.events.Y(N,"onCaptionsTrackListChanged",this.rzt);this.events.Y(N,"captionschanged",this.Igl);this.events.Y(N,"captionssettingschanged",this.Hh);this.events.Y(N,"videoplayerreset",this.td);this.events.Y(N,"mdxautoplaycancel",function(){w.Sn.Wt()}); N.T("enable_mdx_video_play_directly")&&this.events.Y(N,"videodatachange",function(){uGw(w.module)||rc(w)||$G(w,0)}); e=this.Sn;e.Ss();e.subscribe("proxyStateChange",this.TL,this);e.subscribe("remotePlayerChange",this.kc,this);e.subscribe("remoteQueueChange",this.td,this);e.subscribe("previousNextChange",this.Pd,this);e.subscribe("nowAutoplaying",this.aU,this);e.subscribe("autoplayDismissed",this.JJ,this);g.Q(this,this.J);g.Q(this,this.N);g.Q(this,this.G);g.Q(this,this.U);g.Q(this,this.Z);this.Hh();this.td();this.kc()},t7f=function(e,N){if(rc(e)){e.Sn.unsubscribe("remotePlayerChange",e.kc,e); var y=Math.round(N.volume);N=!!N.muted;var w=xc(e.Sn);if(y!==w.volume||N!==w.muted)e.Sn.setVolume(y,N),e.U.start();e.Sn.subscribe("remotePlayerChange",e.kc,e)}},Z6T=function(e){e.HY(0); e.J.stop();e.zi(new g.a8(64))},x9T=function(e,N){if(rc(e)&&!e.j){var y=null; N&&(y={style:e.C.getSubtitlesUserSettings()},Object.assign(y,N));e.Sn.AR(e.C.getVideoData(1).videoId,y);e.K=xc(e.Sn).trackData}},$G=function(e,N){var y=e.C.getPlaylist(); if(y==null?0:y.listId){var w=y.index;var E=y.listId.toString()}y=e.C.getVideoData(1);e.Sn.playVideo(y.videoId,N,w,E,y.playerParams,y.i9,PnZ(y));e.zi(new g.a8(1))},je_=function(e,N){if(N){var y=e.C.getOption("captions","tracklist",{Cn:1}); y&&y.length?(e.C.setOption("captions","track",N),e.j=!1):(e.C.loadModule("captions"),e.j=!0)}else e.C.setOption("captions","track",{})},rc=function(e){return xc(e.Sn).videoId===e.C.getVideoData(1).videoId},YG=function(){g.W.call(this,{S:"div", B:"ytp-mdx-popup-dialog",V:{role:"dialog"},W:[{S:"div",B:"ytp-mdx-popup-dialog-inner-content",W:[{S:"div",B:"ytp-mdx-popup-title",b9:"Voc\u00ea n\u00e3o fez login"},{S:"div",B:"ytp-mdx-popup-description",b9:"Os v\u00eddeos que voc\u00ea assistir poder\u00e3o ser adicionados ao hist\u00f3rico de visualiza\u00e7\u00e3o da TV e influenciar\u00e3o as recomenda\u00e7\u00f5es dela. Para evitar isso, cancele e fa\u00e7a login no YouTube em um computador."},{S:"div",B:"ytp-mdx-privacy-popup-buttons",W:[{S:"button", dP:["ytp-button","ytp-mdx-privacy-popup-cancel"],b9:"Cancelar"},{S:"button",dP:["ytp-button","ytp-mdx-privacy-popup-confirm"],b9:"Confirmar"}]}]}]});this.J=new g.NE(this,250);this.cancelButton=this.hW("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.hW("ytp-mdx-privacy-popup-confirm");g.Q(this,this.J);this.Y(this.cancelButton,"click",this.N);this.Y(this.confirmButton,"click",this.K)},Mj=function(e){g.W.call(this,{S:"div", B:"ytp-remote",W:[{S:"div",B:"ytp-remote-display-status",W:[{S:"div",B:"ytp-remote-display-status-icon",W:[g.$73()]},{S:"div",B:"ytp-remote-display-status-text",b9:"{{statustext}}"}]}]});this.api=e;this.J=new g.NE(this,250);g.Q(this,this.J);this.Y(e,"presentingplayerstatechange",this.onStateChange);this.IJ(e.getPlayerStateObject())},l1=function(e,N){g.Go.call(this,"Reproduzir em",1,e,N); this.C=e;this.NF={};this.Y(e,"onMdxReceiversChange",this.j);this.Y(e,"presentingplayerstatechange",this.j);this.j()},npw=function(e){g.dH.call(this,e); this.DS={key:FyF(),name:"Este computador"};this.dK=null;this.subscriptions=[];this.aD=this.Sn=null;this.NF=[this.DS];this.v1=this.DS;this.k9=new g.a8(64);this.Jr=0;this.Cw=-1;this.Sl=!1;this.cS=this.AC=null;if(!g.IK(this.player.X())&&!g.ZY(this.player.X())){e=this.player;var N=g.T9(e);N&&(N=N.X6())&&(N=new l1(e,N),g.Q(this,N));N=new Mj(e);g.Q(this,N);g.Pb(e,N.element,4);this.AC=new YG;g.Q(this,this.AC);g.Pb(e,this.AC.element,4);this.Sl=!!wc()}},FY=function(e){e.cS&&(e.player.removeEventListener("presentingplayerstatechange", e.cS),e.cS=null)},QeM=function(e,N,y){e.k9=y; e.player.publish("presentingplayerstatechange",new g.ME(y,N))},S_=function(e,N){if(N.key!==e.v1.key)if(N.key===e.DS.key)J1(); else if(uGw(e)&&m9_(e),e.v1=N,!e.player.X().T("disable_mdx_connection_in_mdx_module_for_music_web")||!g.ZY(e.player.X())){var y=e.player.getPlaylistId();var w=e.player.getVideoData(1);var E=w.videoId;if(!y&&!E||(e.player.getAppState()===2||e.player.getAppState()===1)&&e.player.X().T("should_clear_video_data_on_player_cued_unstarted"))w=null;else{var A=e.player.getPlaylist();if(A){var T=[];for(var p=0;p2*this.size&&Et(this),!0):!1}; g.J.get=function(e,N){return yj(this.N,e)?this.N[e]:N}; g.J.set=function(e,N){yj(this.N,e)||(this.size+=1,this.J.push(e),this.Hy++);this.N[e]=N}; g.J.forEach=function(e,N){for(var y=this.Nk(),w=0;w=w.J.length)return g.pF;var A=w.J[N++];return g.Aq(e?A:w.N[A])}; return E}; var Cgq={k41:"atp",Zi9:"ska",Ik1:"que",bcP:"mus",CZh:"sus",nXq:"dsp",Oi9:"seq",pPB:"mic",s$1:"dpa",qPg:"cds",fkt:"mlm",I0s:"dsdtr",u6P:"ntb",hr1:"vsp",qHl:"scn",s8P:"rpe",V_1:"dcn",M_t:"dcp",TKt:"pas",Q$1:"drq",c3h:"opf",woP:"els",bOq:"isg",xAW:"svq",j81:"mvp",q_1:"ads",Jyg:"iat"},rTT={OlG:"u",cAs:"cl",Tkt:"k",NkP:"i",mXZ:"cr",wPl:"m",RFG:"g",F5:"up"};AS.prototype.Bw=function(e){return e?this.id==e.id:!1}; var kzV="",MQ=null;ib0.prototype.flush=function(e,N){e=e===void 0?[]:e;N=N===void 0?!1:N;if(g.Xj("enable_client_streamz_web")){e=g.c(e);for(var y=e.next();!y.done;y=e.next())y=g.CcH(y.value),y={serializedIncrementBatch:g.oN(y.J())},g.$$("streamzIncremented",y,{sendIsolatedPayload:N})}}; var FN,ZbF=grw("loadCastFramework")||grw("loadCastApplicationFramework"),nrw=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.e0(on,g.x);g.J=on.prototype;g.J.VA=function(e){this.j=arguments;this.J=!1;this.g7?this.K=g.s9()+this.uR:this.g7=g.Bc(this.L,this.uR)}; g.J.stop=function(){this.g7&&(g.xJ.clearTimeout(this.g7),this.g7=null);this.K=null;this.J=!1;this.j=[]}; g.J.pause=function(){++this.N}; g.J.resume=function(){this.N&&(--this.N,!this.N&&this.J&&(this.J=!1,this.Z.apply(null,this.j)))}; g.J.fh=function(){this.stop();on.cw.fh.call(this)}; g.J.Mq=function(){this.g7&&(g.xJ.clearTimeout(this.g7),this.g7=null);this.K?(this.g7=g.Bc(this.L,this.K-g.s9()),this.K=null):this.N?this.J=!0:(this.J=!1,this.Z.apply(null,this.j))};g.b(bu,g.x);g.J=bu.prototype;g.J.OZ=function(e){this.K=arguments;this.g7||this.N?this.J=!0:myX(this)}; g.J.stop=function(){this.g7&&(g.xJ.clearTimeout(this.g7),this.g7=null,this.J=!1,this.K=null)}; g.J.pause=function(){this.N++}; g.J.resume=function(){this.N--;this.N||!this.J||this.g7||(this.J=!1,myX(this))}; g.J.fh=function(){g.x.prototype.fh.call(this);this.stop()};hS.prototype.stringify=function(e){return g.xJ.JSON.stringify(e,void 0)}; hS.prototype.parse=function(e){return g.xJ.JSON.parse(e,void 0)};g.e0(Hbf,g.gs);g.e0(Ky5,g.gs);var WyT=null;g.e0(R8w,g.gs);g.e0(GzF,g.gs);g.e0(Uyw,g.gs);XN.prototype.debug=function(){}; XN.prototype.info=function(){}; XN.prototype.warning=function(){};var E3q={},wL0={};g.J=Pk.prototype;g.J.setTimeout=function(e){this.VB=e}; g.J.Ig=function(e){e=e.target;var N=this.Bk;N&&g.G8(e)==3?N.OZ():this.WH(e)}; g.J.WH=function(e){try{if(e==this.J)a:{var N=g.G8(this.J),y=this.J.N,w=this.J.getStatus();if(!(N<3)&&(N!=3||this.J&&(this.N.N||g.LY(this.J)||g.s0(this.J)))){this.Rq||N!=4||y==7||(y==8||w<=0?ck(3):ck(2));JEw(this);var E=this.J.getStatus();this.a9=E;var A=yEw(this);if(this.Z=E==200){if(this.dT&&!this.Et){b:{if(this.J){var T=g.aD(this.J,"X-HTTP-Initial-Response");if(T&&!g.kw(T)){var p=T;break b}}p=null}if(e=p)this.Et=!0,S8M(this,e);else{this.Z=!1;this.L=3;kk(12);In(this);vk(this);break a}}if(this.i9){e= !0;for(var C;!this.Rq&&this.G0&&!this.SR&&(this.SR=!0,this.K.CF(this)):(In(this),vk(this))}else S8M(this,A);N==4&&In(this);this.Z&&!this.Rq&&(N==4?pLT(this.K,this):(this.Z=!1,dU(this)))}else g.DP1(this.J),E==400&&A.indexOf("Unknown SID")> 0?(this.L=3,kk(12)):(this.L=0,kk(13)),In(this),vk(this)}}}catch(r){}finally{}}; g.J.cancel=function(){this.Rq=!0;In(this)}; g.J.QA=function(){this.Ng=null;var e=Date.now();e-this.Dl>=0?(this.Zl!=2&&(ck(3),kk(17)),In(this),this.L=2,vk(this)):T25(this,this.Dl-e)}; g.J.getLastError=function(){return this.L}; g.J.PM=function(){return this.J};bpX.prototype.cancel=function(){this.K=cE5(this);if(this.N)this.N.cancel(),this.N=null;else if(this.J&&this.J.size!==0){for(var e=g.c(this.J.values()),N=e.next();!N.done;N=e.next())N.value.cancel();this.J.clear()}};g.J=dRT.prototype;g.J.ev=8;g.J.O_=1;g.J.connect=function(e,N,y,w){kk(0);this.Xz=e;this.Rq=N||{};y&&w!==void 0&&(this.Rq.OSID=y,this.Rq.OAID=w);this.Et=this.pX;this.aq=MH_(this,null,this.Xz);gU(this)}; g.J.disconnect=function(){v3V(this);if(this.O_==3){var e=this.Wk++,N=this.aq.clone();g.bX(N,"SID",this.j);g.bX(N,"RID",e);g.bX(N,"TYPE","terminate");tS(this,N);e=new Pk(this,this.j,e);e.Zl=2;e.U=Lz(N.clone());N=!1;if(g.xJ.navigator&&g.xJ.navigator.sendBeacon)try{N=g.xJ.navigator.sendBeacon(e.U.toString(),"")}catch(y){}!N&&g.xJ.Image&&((new Image).src=e.U,N=!0);N||(e.J=egZ(e.K,null),e.J.send(e.U));e.qg=Date.now();dU(e)}fJ0(this)}; g.J.u6=function(){return this.O_==0}; g.J.getState=function(){return this.O_}; g.J.g9=function(e){if(this.Z)if(this.Z=null,this.O_==1){if(!e){this.Wk=Math.floor(Math.random()*1E5);e=this.Wk++;var N=new Pk(this,"",e),y=this.D;this.a9&&(y?(y=g.DA(y),g.VM(y,this.a9)):y=this.a9);this.G!==null||this.Dl||(N.aq=y,y=null);var w;if(this.Kx)a:{for(var E=w=0;E4096){w=E;break a}if(w===4096||E===this.K.length-1){w=E+1;break a}}w= 1E3}else w=1E3;w=DR_(this,N,w);E=this.aq.clone();g.bX(E,"RID",e);g.bX(E,"CVER",22);this.i9&&g.bX(E,"X-HTTP-Session-Id",this.i9);tS(this,E);y&&(this.Dl?w="headers="+g.RA(g.Zg5(y))+"&"+w:this.G&&g.BN(E,this.G,y));Y8w(this.N,N);this.Js&&g.bX(E,"TYPE","init");this.Kx?(g.bX(E,"$req",w),g.bX(E,"SID","null"),N.dT=!0,aOZ(N,E,null)):aOZ(N,E,w);this.O_=2}}else this.O_==3&&(e?g30(this,e):this.K.length==0||hgf(this.N)||g30(this))}; g.J.vH=function(){this.U=null;VH_(this);if(this.FZ&&!(this.VB||this.J==null||this.PY<=0)){var e=2*this.PY;this.l9=Bk((0,g.Gs)(this.Q9Z,this),e)}}; g.J.Q9Z=function(){this.l9&&(this.l9=null,this.Et=!1,this.VB=!0,kk(10),iu(this),VH_(this))}; g.J.CF=function(e){this.J==e&&this.FZ&&!this.VB&&(IJ0(this),this.VB=!0,kk(11))}; g.J.DA=function(){this.Ng!=null&&(this.Ng=null,iu(this),rEf(this),kk(19))}; g.J.S4q=function(e){e?kk(2):kk(1)}; g.J.isActive=function(){return!!this.L&&this.L.isActive(this)}; g.J=uj_.prototype;g.J.IB=function(){}; g.J.Qd=function(){}; g.J.MM=function(){}; g.J.Vd=function(){}; g.J.isActive=function(){return!0}; g.J.s5=function(){};g.e0(qQ,g.Ux);qQ.prototype.open=function(){this.J.L=this.K;this.Z&&(this.J.Zl=!0);this.J.connect(this.L,this.N||void 0)}; qQ.prototype.close=function(){this.J.disconnect()}; qQ.prototype.send=function(e){var N=this.J;if(typeof e==="string"){var y={};y.__data__=e;e=y}else this.j&&(y={},y.__data__=g.ID(e),e=y);N.K.push(new o3w(N.sY++,e));N.O_==3&&gU(N)}; qQ.prototype.fh=function(){this.J.L=null;delete this.K;this.J.disconnect();delete this.J;qQ.cw.fh.call(this)}; g.e0(Zpq,Hbf);g.e0(xRf,Ky5);g.e0(uu,uj_);uu.prototype.IB=function(){this.J.dispatchEvent("m")}; uu.prototype.Qd=function(e){this.J.dispatchEvent(new Zpq(e))}; uu.prototype.MM=function(e){this.J.dispatchEvent(new xRf(e))}; uu.prototype.Vd=function(){this.J.dispatchEvent("n")};var xk=new g.Ux;g.b(Qy0,g.gs);g.J=n8.prototype;g.J.MF=null;g.J.C2=!1;g.J.RC=null;g.J.h0=null;g.J.PV=null;g.J.lA=null;g.J.dW=null;g.J.hD=null;g.J.IM=null;g.J.Lj=null;g.J.xg=0;g.J.Da=null;g.J.uA=null;g.J.QE=null;g.J.CJ=-1;g.J.Ia=!0;g.J.RF=!1;g.J.A0=0;g.J.AD=null;var Rg0={},OpM={};g.J=n8.prototype;g.J.setTimeout=function(e){this.N=e}; g.J.FK=function(e){e=e.target;var N=this.AD;N&&g.G8(e)==3?N.OZ():this.DL(e)}; g.J.DL=function(e){try{if(e==this.Lj)a:{var N=g.G8(this.Lj),y=this.Lj.N,w=this.Lj.getStatus();if(g.RB&&!g.SE("420+")){if(N<4)break a}else if(N<3||N==3&&!g.LY(this.Lj))break a;this.RF||N!=4||y==7||(y==8||w<=0?this.J.oN(3):this.J.oN(2));LH5(this);var E=this.Lj.getStatus();this.CJ=E;var A=g.LY(this.Lj);if(this.C2=E==200){N==4&&Qj(this);if(this.i9){for(e=!0;!this.RF&&this.xg0?(this.QE=3,jN(13)):(this.QE=0,jN(14)),Qj(this),sy5(this)}}catch(p){}finally{}}; g.J.cancel=function(){this.RF=!0;Qj(this)}; g.J.pS=function(){this.RC=null;var e=Date.now();e-this.h0>=0?(this.lA!=2&&this.J.oN(3),Qj(this),this.QE=2,jN(18),sy5(this)):UR_(this,this.h0-e)}; g.J.getLastError=function(){return this.QE};g.J=y2w.prototype;g.J.u0=null;g.J.dk=null;g.J.Er=!1;g.J.yS=null;g.J.yI=null;g.J.W7=-1;g.J.iA=null;g.J.Ev=null;g.J.connect=function(e){this.yS=e;e=Hk(this.J,null,this.yS);jN(3);Date.now();var N=this.J.D;N!=null?(this.iA=N[0],(this.Ev=N[1])?(this.yI=1,wEX(this)):(this.yI=2,EhX(this))):(aW(e,"MODE","init"),this.dk=new n8(this),this.dk.MF=this.u0,KHf(this.dk,e,!1,null,!0),this.yI=0)}; g.J.Gu=function(e){if(e)this.yI=2,EhX(this);else{jN(4);var N=this.J;N.Vk=N.W1.W7;Rn(N,9)}e&&this.oN(2)}; g.J.l0=function(e){return this.J.l0(e)}; g.J.abort=function(){this.dk&&(this.dk.cancel(),this.dk=null);this.W7=-1}; g.J.u6=function(){return!1}; g.J.sO=function(e,N){this.W7=e.CJ;if(this.yI==0)if(N){try{var y=this.N.parse(N)}catch(w){e=this.J;e.Vk=this.W7;Rn(e,2);return}this.iA=y[0];this.Ev=y[1]}else e=this.J,e.Vk=this.W7,Rn(e,2);else this.yI==2&&(this.Er?(jN(7),Date.now()):N=="11111"?(jN(6),this.Er=!0,Date.now(),this.W7=200,this.dk.cancel(),jN(12),K8(this.J,this,!0)):(jN(8),Date.now(),this.Er=!1))}; g.J.xd=function(){this.W7=this.dk.CJ;if(this.dk.C2)this.yI==0?this.Ev?(this.yI=1,wEX(this)):(this.yI=2,EhX(this)):this.yI==2&&(this.Er?(jN(12),K8(this.J,this,!0)):(jN(11),K8(this.J,this,!1)));else{this.yI==0?jN(9):this.yI==2&&jN(10);var e=this.J;this.dk.getLastError();e.Vk=this.W7;Rn(e,2)}}; g.J.Zy=function(){return this.J.Zy()}; g.J.isActive=function(){return this.J.isActive()}; g.J.oN=function(e){this.J.oN(e)};g.J=A25.prototype;g.J.zq=null;g.J.rW=null;g.J.mS=null;g.J.SZ=null;g.J.cR=null;g.J.y7=null;g.J.pL=null;g.J.z_=null;g.J.LJ=0;g.J.N1=0;g.J.JA=null;g.J.P1=null;g.J.eI=null;g.J.s8=null;g.J.W1=null;g.J.e2=null;g.J.Z9=-1;g.J.F3=-1;g.J.Vk=-1;g.J.Pv=0;g.J.Ca=0;g.J.Df=8;g.e0(J2k,g.gs);g.e0(pEw,g.gs);g.J=A25.prototype;g.J.connect=function(e,N,y,w,E){jN(0);this.cR=N;this.rW=y||{};w&&E!==void 0&&(this.rW.OSID=w,this.rW.OAID=E);this.U?(Zl((0,g.Gs)(this.Zb,this,e),100),r2_(this)):this.Zb(e)}; g.J.disconnect=function(){$IX(this);if(this.J==3){var e=this.LJ++,N=this.y7.clone();g.bX(N,"SID",this.j);g.bX(N,"RID",e);g.bX(N,"TYPE","terminate");Ot(this,N);e=new n8(this,this.j,e);e.lA=2;e.dW=Lz(N.clone());(new Image).src=e.dW.toString();e.PV=Date.now();WHf(e)}khf(this)}; g.J.Zb=function(e){this.W1=new y2w(this);this.W1.u0=this.zq;this.W1.N=this.L;this.W1.connect(e)}; g.J.u6=function(){return this.J==0}; g.J.getState=function(){return this.J}; g.J.NN=function(e){this.P1=null;SFZ(this,e)}; g.J.JR=function(){this.eI=null;this.SZ=new n8(this,this.j,"rpc",this.G);this.SZ.MF=this.zq;this.SZ.A0=0;var e=this.pL.clone();g.bX(e,"RID","rpc");g.bX(e,"SID",this.j);g.bX(e,"CI",this.e2?"0":"1");g.bX(e,"AID",this.Z9);Ot(this,e);g.bX(e,"TYPE","xmlhttp");KHf(this.SZ,e,!0,this.z_,!1)}; g.J.sO=function(e,N){if(this.J!=0&&(this.SZ==e||this.mS==e))if(this.Vk=e.CJ,this.mS==e&&this.J==3)if(this.Df>7){try{var y=this.L.parse(N)}catch(w){y=null}if(Array.isArray(y)&&y.length==3)if(e=y,e[0]==0)a:{if(!this.eI){if(this.SZ)if(this.SZ.PV+3E30)){if(w=N==1)this.mS||this.P1||this.J==1||this.Pv>=2?w=!1:(this.P1=Zl((0,g.Gs)(this.NN,this,e),bOw(this,this.Pv)),this.Pv++,w=!0);w=!(w||N==2&&hPT(this))}if(w)switch(y){case 1:Rn(this, 5);break;case 4:Rn(this,10);break;case 3:Rn(this,6);break;case 7:Rn(this,12);break;default:Rn(this,2)}}}; g.J.J2=function(e){if(!g.Gw(arguments,this.J))throw Error("Unexpected channel state: "+this.J);}; g.J.aWP=function(e){e?jN(2):(jN(1),c20(this,8))}; g.J.l0=function(e){if(e)throw Error("Can't create secondary domain capable XhrIo object.");e=new g.Wc;e.G=!1;return e}; g.J.isActive=function(){return!!this.JA&&this.JA.isActive(this)}; g.J.oN=function(e){var N=xk;N.dispatchEvent(new pEw(N,e))}; g.J.Zy=function(){return!1}; g.J=B9w.prototype;g.J.tR=function(){}; g.J.KL=function(){}; g.J.kR=function(){}; g.J.SF=function(){}; g.J.fL=function(){return{}}; g.J.isActive=function(){return!0};g.J=XEw.prototype;g.J.enqueue=function(e){this.N.push(e)}; g.J.isEmpty=function(){return this.J.length===0&&this.N.length===0}; g.J.clear=function(){this.J=[];this.N=[]}; g.J.contains=function(e){return g.Gw(this.J,e)||g.Gw(this.N,e)}; g.J.remove=function(e){var N=this.J;var y=(0,g.Bc1)(N,e);y>=0?(g.Uk(N,y),N=!0):N=!1;return N||g.Lq(this.N,e)}; g.J.WP=function(){for(var e=[],N=this.J.length-1;N>=0;--N)e.push(this.J[N]);N=this.N.length;for(var y=0;y=H6q.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(e=H6q[this.N],this.g7=g.b4((0,g.Gs)(this.AF,this),e),this.N++):this.publish("pairingFailed",Error("Server error "+e.status))}; g.J.bq=function(){this.J=null;this.publish("pairingFailed",Error("Server not responding"))}; var H6q=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.e0(p4,TU);g.J=p4.prototype;g.J.start=function(){JD(this)&&this.publish("screenChange");!g.qI("yt-remote-lounge-token-expiration")&&L6X(this);g.cL(this.J);this.J=g.b4((0,g.Gs)(this.start,this),1E4)}; g.J.add=function(e,N){JD(this);OOq(this,e);C4(this,!1);this.publish("screenChange");N(e);e.token||L6X(this)}; g.J.remove=function(e,N){var y=JD(this);GhM(this,e)&&(C4(this,!1),y=!0);N(e);y&&this.publish("screenChange")}; g.J.Wl=function(e,N,y,w){var E=JD(this),A=this.get(e.id);A?(A.name!=N&&(A.name=N,C4(this,!1),E=!0),y(e)):w(Error("no such local screen."));E&&this.publish("screenChange")}; g.J.fh=function(){g.cL(this.J);p4.cw.fh.call(this)}; g.J.FPk=function(e){JD(this);var N=this.screens.length;e=e&&e.screens||[];for(var y=e.length,w=0;w20)break a;p=N(A,T)}A=p}E.name=A}y(Yc(this,E))},this), onError:(0,g.Gs)(function(E){w(Error("pairing request failed: "+E.status))},this), onTimeout:(0,g.Gs)(function(){w(Error("pairing request timed out."))},this)})}; g.J.fh=function(){g.JV(this.N);g.JV(this.J);$c.cw.fh.call(this)}; g.J.qtZ=function(){CCX(this);this.publish("screenChange");this.J.update()}; $c.prototype.dispose=$c.prototype.dispose;g.e0(M1,g.pT);g.J=M1.prototype;g.J.sP=function(e){this.Ss()||(e&&(Fk(this,""+e),this.publish("sessionFailed")),this.J=null,this.publish("sessionScreen",null))}; g.J.info=function(e){N1(this.i9,e)}; g.J.qN=function(){return null}; g.J.qR=function(e){var N=this.N;e?(N.displayStatus=new chrome.cast.ReceiverDisplayStatus(e,[]),N.displayStatus.showStop=!0):N.displayStatus=null;chrome.cast.setReceiverDisplayStatus(N,(0,g.Gs)(function(){this.info("Updated receiver status for "+N.friendlyName+": "+e)},this),(0,g.Gs)(function(){Fk(this,"Failed to update receiver status for: "+N.friendlyName)},this))}; g.J.fh=function(){this.qR("");M1.cw.fh.call(this)};g.b(SG,M1);g.J=SG.prototype;g.J.bG=function(e){if(this.K){if(this.K==e)return;Fk(this,"Overriding cast session with new session object");kvX(this);this.qg=!1;this.D="unknown";this.K.removeUpdateListener(this.Kh);this.K.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.l9)}this.K=e;this.K.addUpdateListener(this.Kh);this.K.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.l9);SmX(this,"getMdxSessionStatus")}; g.J.y0=function(e){this.info("launchWithParams no-op for Cast: "+g.ID(e))}; g.J.stop=function(){this.K?this.K.stop((0,g.Gs)(function(){this.sP()},this),(0,g.Gs)(function(){this.sP(Error("Failed to stop receiver app."))},this)):this.sP(Error("Stopping cast device without session."))}; g.J.qR=function(){}; g.J.fh=function(){this.info("disposeInternal");kvX(this);this.K&&(this.K.removeUpdateListener(this.Kh),this.K.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.l9));this.K=null;M1.prototype.fh.call(this)}; g.J.lD9=function(e,N){if(!this.Ss())if(N)if(N=eN(N),g.W5(N))switch(e=""+N.type,N=N.data||{},this.info("onYoutubeMessage_: "+e+" "+g.ID(N)),e){case "mdxSessionStatus":M1w(this,N);break;case "loungeToken":o$0(this,N);break;default:Fk(this,"Unknown youtube message: "+e)}else Fk(this,"Unable to parse message.");else Fk(this,"No data in message.")}; g.J.Xk=function(e,N,y,w){g.cL(this.U);this.U=0;T00(this.j,this.N.label,e,this.N.friendlyName,(0,g.Gs)(function(E){E?N(E):w>=0?(Fk(this,"Screen "+e+" appears to be offline. "+w+" retries left."),this.U=g.b4((0,g.Gs)(this.Xk,this,e,N,y,w-1),300)):y(Error("Unable to fetch screen."))},this),y)}; g.J.qN=function(){return this.K}; g.J.Oq=function(e){this.Ss()||e||(Fk(this,"Cast session died."),this.sP())};g.b(o6,M1);g.J=o6.prototype;g.J.bG=function(e){this.K=e;this.K.addUpdateListener(this.Rq)}; g.J.y0=function(e){this.aq=e;this.Ng()}; g.J.stop=function(){ilV(this);this.K?this.K.stop((0,g.Gs)(this.sP,this,null),(0,g.Gs)(this.sP,this,"Failed to stop DIAL device.")):this.sP()}; g.J.fh=function(){ilV(this);this.K&&this.K.removeUpdateListener(this.Rq);this.K=null;M1.prototype.fh.call(this)}; g.J.A2=function(e){this.Ss()||e||(Fk(this,"DIAL session died."),this.L(),this.L=function(){},this.sP())};g.b(cS,M1);cS.prototype.stop=function(){this.sP()}; cS.prototype.bG=function(){}; cS.prototype.y0=function(){g.cL(this.K);this.K=NaN;var e=C8(this.j.Wc(),this.N.label);e?lD(this,e):this.sP(Error("No such screen"))}; cS.prototype.fh=function(){g.cL(this.K);this.K=NaN;M1.prototype.fh.call(this)};g.b(kc,g.pT);g.J=kc.prototype; g.J.init=function(e,N){chrome.cast.timeout.requestSession=3E4;var y=new chrome.cast.SessionRequest(this.U,[chrome.cast.Capability.AUDIO_OUT]);g.Xj("desktop_enable_cast_connect")&&(y.androidReceiverCompatible=!0);this.D||(y.dialRequest=new chrome.cast.DialRequest("YouTube"));var w=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;e=e||this.Z?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var E=(0,g.Gs)(this.l_k,this);y=new chrome.cast.ApiConfig(y,(0,g.Gs)(this.GL, this),E,w,e);y.customDialLaunchCallback=(0,g.Gs)(this.bXh,this);chrome.cast.initialize(y,(0,g.Gs)(function(){this.Ss()||(chrome.cast.addReceiverActionListener(this.L),mIw(),this.N.subscribe("onlineScreenChange",(0,g.Gs)(this.Os,this)),this.K=V10(this),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Gs)(function(A){this.EX("Failed to set initial custom receivers: "+g.ID(A))},this)),this.publish("yt-remote-cast2-availability-change",Xk(this)),N(!0))},this),(0,g.Gs)(function(A){this.EX("Failed to initialize API: "+ g.ID(A)); N(!1)},this))}; g.J.EzW=function(e,N){BS("Setting connected screen ID: "+e+" -> "+N);if(this.J){var y=this.J.J;if(!e||y&&y.id!=e)BS("Unsetting old screen status: "+this.J.N.friendlyName),PS(this,null)}if(e&&N){if(!this.J){e=C8(this.N.Wc(),e);if(!e){BS("setConnectedScreenStatus: Unknown screen.");return}if(e.idType=="shortLived"){BS("setConnectedScreenStatus: Screen with id type to be short lived.");return}y=D7M(this,e);y||(BS("setConnectedScreenStatus: Connected receiver not custom..."),y=new chrome.cast.Receiver(e.uuid? e.uuid:e.id,e.name),y.receiverType=chrome.cast.ReceiverType.CUSTOM,this.K.push(y),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Gs)(function(w){this.EX("Failed to set initial custom receivers: "+g.ID(w))},this))); BS("setConnectedScreenStatus: new active receiver: "+y.friendlyName);PS(this,new cS(this.N,y),!0)}this.J.qR(N)}else BS("setConnectedScreenStatus: no screen.")}; g.J.YXG=function(e){this.Ss()?this.EX("Setting connection data on disposed cast v2"):this.J?this.J.y0(e):this.EX("Setting connection data without a session")}; g.J.lq=function(){this.Ss()?this.EX("Stopping session on disposed cast v2"):this.J?(this.J.stop(),PS(this,null)):BS("Stopping non-existing session")}; g.J.requestSession=function(){chrome.cast.requestSession((0,g.Gs)(this.GL,this),(0,g.Gs)(this.nOG,this))}; g.J.fh=function(){this.N.unsubscribe("onlineScreenChange",(0,g.Gs)(this.Os,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.L);var e=jz_,N=g.nM("yt.mdx.remote.debug.handlers_");g.Lq(N||[],e);g.JV(this.J);g.pT.prototype.fh.call(this)}; g.J.EX=function(e){N1("Controller",e)}; g.J.Ew=function(e,N){this.J==e&&(N||PS(this,null),this.publish("yt-remote-cast2-session-change",N))}; g.J.OCG=function(e,N){if(!this.Ss())if(e)switch(e.friendlyName=chrome.cast.unescape(e.friendlyName),BS("onReceiverAction_ "+e.label+" / "+e.friendlyName+"-- "+N),N){case chrome.cast.ReceiverAction.CAST:if(this.J)if(this.J.N.label!=e.label)BS("onReceiverAction_: Stopping active receiver: "+this.J.N.friendlyName),this.J.stop();else{BS("onReceiverAction_: Casting to active receiver.");this.J.J&&this.publish("yt-remote-cast2-session-change",this.J.J);break}switch(e.receiverType){case chrome.cast.ReceiverType.CUSTOM:PS(this, new cS(this.N,e));break;case chrome.cast.ReceiverType.DIAL:PS(this,new o6(this.N,e,this.j,this.config_));break;case chrome.cast.ReceiverType.CAST:PS(this,new SG(this.N,e,this.config_));break;default:this.EX("Unknown receiver type: "+e.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.J&&this.J.N.label==e.label?this.J.stop():this.EX("Stopping receiver w/o session: "+e.friendlyName)}else this.EX("onReceiverAction_ called without receiver.")}; g.J.bXh=function(e){if(this.Ss())return Promise.reject(Error("disposed"));var N=e.receiver;N.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.EX("Not DIAL receiver: "+N.friendlyName),N.receiverType=chrome.cast.ReceiverType.DIAL);var y=this.J?this.J.N:null;if(!y||y.label!=N.label)return this.EX("Receiving DIAL launch request for non-clicked DIAL receiver: "+N.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(y&&y.label==N.label&&y.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.J.J)return BS("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.J.J),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.EX('Changing CAST intent from "'+y.receiverType+'" to "dial" for '+N.friendlyName);PS(this,new o6(this.N,N,this.j,this.config_))}N=this.J;N.U=e;N.U.appState==chrome.cast.DialAppState.RUNNING?(e=N.U.extraData||{},y=e.screenId||null,bD(N)&&e.loungeToken?e.loungeTokenRefreshIntervalMs?e=ImM(N,{name:N.N.friendlyName,screenId:e.screenId,loungeToken:e.loungeToken,dialId:N.U.receiver.label, screenIdType:"shortLived"},e.loungeTokenRefreshIntervalMs):(g.eH(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(e)+".")),e=v$F(N,y)):e=v$F(N,y)):e=PCw(N);return e}; g.J.GL=function(e){var N=this;if(!this.Ss()&&!this.Z){BS("New cast session ID: "+e.sessionId);var y=e.receiver;if(y.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.J)if(y.receiverType==chrome.cast.ReceiverType.CAST)BS("Got resumed cast session before resumed mdx connection."),y.friendlyName=chrome.cast.unescape(y.friendlyName),PS(this,new SG(this.N,y,this.config_),!0);else{this.EX("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var w=this.J.N,E=C8(this.N.Wc(), w.label);E&&JS(E,y.label)&&w.receiverType!=chrome.cast.ReceiverType.CAST&&y.receiverType==chrome.cast.ReceiverType.CAST&&(BS("onSessionEstablished_: manual to cast session change "+y.friendlyName),g.JV(this.J),this.J=new SG(this.N,y,this.config_),this.J.subscribe("sessionScreen",(0,g.Gs)(this.Ew,this,this.J)),this.J.subscribe("sessionFailed",function(){return g$f(N,N.J)}),this.J.y0(null)); this.J.bG(e)}}}; g.J.h2=function(){return this.J?this.J.qN():null}; g.J.nOG=function(e){this.Ss()||(this.EX("Failed to estabilish a session: "+g.ID(e)),e.code!=chrome.cast.ErrorCode.CANCEL&&PS(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.J.l_k=function(e){BS("Receiver availability updated: "+e);if(!this.Ss()){var N=Xk(this);this.G=e==chrome.cast.ReceiverAvailability.AVAILABLE;Xk(this)!=N&&this.publish("yt-remote-cast2-availability-change",Xk(this))}}; g.J.Os=function(){this.Ss()||(this.K=V10(this),BS("Updating custom receivers: "+g.ID(this.K)),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Gs)(function(){this.EX("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",Xk(this)))}; kc.prototype.setLaunchParams=kc.prototype.YXG;kc.prototype.setConnectedScreenStatus=kc.prototype.EzW;kc.prototype.stopSession=kc.prototype.lq;kc.prototype.getCastSession=kc.prototype.h2;kc.prototype.requestSession=kc.prototype.requestSession;kc.prototype.init=kc.prototype.init;kc.prototype.dispose=kc.prototype.dispose;var QvV=[];g.J=gb.prototype; g.J.reset=function(e){this.listId="";this.index=-1;this.videoId="";Rb_(this);this.volume=-1;this.muted=!1;e&&(this.index=e.index,this.listId=e.listId,this.videoId=e.videoId,this.playerState=e.playerState,this.volume=e.volume,this.muted=e.muted,this.audioTrackId=e.audioTrackId,this.trackData=e.trackData,this.GJ=e.hasPrevious,this.gk=e.hasNext,this.G=e.playerTime,this.Z=e.playerTimeAt,this.j=e.seekableStart,this.J=e.seekableEnd,this.L=e.duration,this.U=e.loadedTime,this.K=e.liveIngestionTime,this.N= !isNaN(this.K))}; g.J.isPlaying=function(){return this.playerState==1}; g.J.isBuffering=function(){return this.playerState==3}; g.J.Wo=function(){return this.playerState==1081}; g.J.zV=function(e){this.L=isNaN(e)?0:e}; g.J.getDuration=function(){return this.N?this.L+Vr(this):this.L}; g.J.clone=function(){return new gb(Gv0(this))};g.b(ZP,g.pT);g.J=ZP.prototype;g.J.getState=function(){return this.K}; g.J.qp=function(){return this.j.getReconnectTimeout()}; g.J.Pm=function(){this.j.reconnect()}; g.J.play=function(){jG(this)?(this.J?this.J.play(null,g.CY,HS(this,"play")):me(this,"play"),svw(this,1,tD(xc(this))),this.publish("remotePlayerChange")):n4(this,this.play)}; g.J.pause=function(){jG(this)?(this.J?this.J.pause(null,g.CY,HS(this,"pause")):me(this,"pause"),svw(this,2,tD(xc(this))),this.publish("remotePlayerChange")):n4(this,this.pause)}; g.J.seekTo=function(e){if(jG(this)){if(this.J){var N=xc(this),y=new chrome.cast.media.SeekRequest;y.currentTime=e;N.isPlaying()||N.isBuffering()?y.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:y.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.J.seek(y,g.CY,HS(this,"seekTo",{newTime:e}))}else me(this,"seekTo",{newTime:e});svw(this,3,e);this.publish("remotePlayerChange")}else n4(this,g.LM(this.seekTo,e))}; g.J.stop=function(){if(jG(this)){this.J?this.J.stop(null,g.CY,HS(this,"stopVideo")):me(this,"stopVideo");var e=xc(this);e.index=-1;e.videoId="";Rb_(e);Qr(this,e);this.publish("remotePlayerChange")}else n4(this,this.stop)}; g.J.setVolume=function(e,N){if(jG(this)){var y=xc(this);if(this.N){if(y.volume!=e){var w=Math.round(e)/100;this.N.setReceiverVolumeLevel(w,(0,g.Gs)(function(){yr("set receiver volume: "+w)},this),(0,g.Gs)(function(){this.EX("failed to set receiver volume.")},this))}y.muted!=N&&this.N.setReceiverMuted(N,(0,g.Gs)(function(){yr("set receiver muted: "+N)},this),(0,g.Gs)(function(){this.EX("failed to set receiver muted.")},this))}else{var E={volume:e, muted:N};y.volume!=-1&&(E.delta=e-y.volume);me(this,"setVolume",E)}y.muted=N;y.volume=e;Qr(this,y)}else n4(this,g.LM(this.setVolume,e,N))}; g.J.AR=function(e,N){if(jG(this)){var y=xc(this);e={videoId:e};N&&(y.trackData={trackName:N.name,languageCode:N.languageCode,sourceLanguageCode:N.translationLanguage?N.translationLanguage.languageCode:"",languageName:N.languageName,kind:N.kind},e.style=g.ID(N.style),g.VM(e,y.trackData));me(this,"setSubtitlesTrack",e);Qr(this,y)}else n4(this,g.LM(this.AR,e,N))}; g.J.setAudioTrack=function(e,N){jG(this)?(N=N.getLanguageInfo().getId(),me(this,"setAudioTrack",{videoId:e,audioTrackId:N}),e=xc(this),e.audioTrackId=N,Qr(this,e)):n4(this,g.LM(this.setAudioTrack,e,N))}; g.J.playVideo=function(e,N,y,w,E,A,T){w=w===void 0?null:w;E=E===void 0?null:E;A=A===void 0?null:A;T=T===void 0?null:T;var p=xc(this),C={videoId:e};y!==void 0&&(C.currentIndex=y);uD(p,e,y||0);N!==void 0&&(f4(p,N),C.currentTime=N);w&&(C.listId=w);E&&(C.playerParams=E);A&&(C.clickTrackingParams=A);T&&(C.locationInfo=g.ID(T));me(this,"setPlaylist",C);w||Qr(this,p)}; g.J.Pu=function(e,N){if(jG(this)){if(e&&N){var y=xc(this);uD(y,e,N);Qr(this,y)}me(this,"previous")}else n4(this,g.LM(this.Pu,e,N))}; g.J.nextVideo=function(e,N){if(jG(this)){if(e&&N){var y=xc(this);uD(y,e,N);Qr(this,y)}me(this,"next")}else n4(this,g.LM(this.nextVideo,e,N))}; g.J.Gh=function(){if(jG(this)){me(this,"clearPlaylist");var e=xc(this);e.reset();Qr(this,e);this.publish("remotePlayerChange")}else n4(this,this.Gh)}; g.J.Wt=function(){jG(this)?me(this,"dismissAutoplay"):n4(this,this.Wt)}; g.J.dispose=function(){if(this.K!=3){var e=this.K;this.K=3;this.publish("proxyStateChange",e,this.K)}g.pT.prototype.dispose.call(this)}; g.J.fh=function(){L1w(this);this.j=null;this.L.clear();q1(this,null);g.pT.prototype.fh.call(this)}; g.J.uG=function(e){if((e!=this.K||e==2)&&this.K!=3&&e!=0){var N=this.K;this.K=e;this.publish("proxyStateChange",N,e);if(e==1)for(;!this.L.isEmpty();)N=e=this.L,N.J.length===0&&(N.J=N.N,N.J.reverse(),N.N=[]),e.J.pop().apply(this);else e==3&&this.dispose()}}; g.J.bCg=function(e,N){this.publish(e,N)}; g.J.pYk=function(e){if(!e)this.ML(null),q1(this,null);else if(this.N.receiver.volume){e=this.N.receiver.volume;var N=xc(this),y=Math.round(100*e.level||0);if(N.volume!=y||N.muted!=e.muted)yr("Cast volume update: "+e.level+(e.muted?" muted":"")),N.volume=y,N.muted=!!e.muted,Qr(this,N)}}; g.J.ML=function(e){yr("Cast media: "+!!e);this.J&&this.J.removeUpdateListener(this.U);if(this.J=e)this.J.addUpdateListener(this.U),am5(this),this.publish("remotePlayerChange")}; g.J.s9q=function(e){e?(am5(this),this.publish("remotePlayerChange")):this.ML(null)}; g.J.DH=function(){me(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.J.Jzq=function(){var e=K10();e&&q1(this,e)}; g.J.EX=function(e){N1("CP",e)};g.b(Ou,g.pT);g.J=Ou.prototype; g.J.connect=function(e,N){if(N){var y=N.listId,w=N.videoId,E=N.videoIds,A=N.playerParams,T=N.clickTrackingParams,p=N.index,C={videoId:w},r=N.currentTime,Y=N.locationInfo;N=N.loopMode;r!==void 0&&(C.currentTime=r<=5?0:r);A&&(C.playerParams=A);Y&&(C.locationInfo=Y);T&&(C.clickTrackingParams=T);y&&(C.listId=y);E&&E.length>0&&(C.videoIds=E.join(","));p!==void 0&&(C.currentIndex=p);this.Rq&&(C.loopMode=N||"LOOP_MODE_OFF");y&&(this.J.listId=y);this.J.videoId=w;this.J.index=p||0;this.J.state=3;f4(this.J, r);this.L="UNSUPPORTED";y=this.Rq?"setInitialState":"setPlaylist";K4("Connecting with "+y+" and params: "+g.ID(C));this.N.connect({method:y,params:g.ID(C)},e,XzF())}else K4("Connecting without params"),this.N.connect({},e,XzF());wiw(this)}; g.J.tf=function(e){this.N.tf(e)}; g.J.dispose=function(){this.Ss()||(g.jM("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),WS(this,3));g.pT.prototype.dispose.call(this)}; g.J.fh=function(){EpX(this);ToV(this);Ax0(this);g.cL(this.U);this.U=NaN;g.cL(this.D);this.D=NaN;this.j=null;g.d9(this.Ng);this.Ng.length=0;this.N.dispose();g.pT.prototype.fh.call(this);this.L=this.G=this.K=this.J=this.N=null}; g.J.Wj=function(e){if(!this.K||this.K.length===0)return!1;for(var N=g.c(this.K),y=N.next();!y.done;y=N.next())if(!y.value.capabilities.has(e))return!1;return!0}; g.J.Hn=function(){var e=3;this.Ss()||(e=0,isNaN(this.WQ())?this.N.yp()&&isNaN(this.Z)&&(e=1):e=2);return e}; g.J.AO=function(e){K4("Disconnecting with "+e);g.jM("yt.mdx.remote.remoteClient_",null);EpX(this);this.publish("beforeDisconnect",e);e==1&&Yk();this.N.disconnect(e);this.dispose()}; g.J.CB=function(){var e=this.J;this.j&&(e=this.J.clone(),uD(e,this.j,e.index));return Gv0(e)}; g.J.Wik=function(e){var N=this,y=new gb(e);y.videoId&&y.videoId!=this.J.videoId&&(this.j=y.videoId,g.cL(this.U),this.U=g.b4(function(){if(N.j){var E=N.j;N.j=null;N.J.videoId!=E&&R6(N,"getNowPlaying")}},5E3)); var w=[];this.J.listId==y.listId&&this.J.videoId==y.videoId&&this.J.index==y.index||w.push("remoteQueueChange");this.J.playerState==y.playerState&&this.J.volume==y.volume&&this.J.muted==y.muted&&tD(this.J)==tD(y)&&g.ID(this.J.trackData)==g.ID(y.trackData)||w.push("remotePlayerChange");this.J.reset(e);g.$R(w,function(E){this.publish(E)},this)}; g.J.Ee=function(){var e=this.N.getDeviceId(),N=g.Ok(this.K,function(y){return y.type=="REMOTE_CONTROL"&&y.id!=e}); return N?N.id:""}; g.J.WQ=function(){return this.N.qp()}; g.J.wl=function(){return this.L||"UNSUPPORTED"}; g.J.q4=function(){return this.G||""}; g.J.uq=function(){!isNaN(this.WQ())&&this.N.Pm()}; g.J.Hqh=function(e,N){R6(this,e,N);pi_(this)}; g.J.hR=function(){var e=g.jH("SAPISID","")||g.jH("__Secure-1PAPISID")||"",N=g.jH("__Secure-3PAPISID","")||"";if(!e&&!N)return"";e=g.oN(g.hV(e),2);N=g.oN(g.hV(N),2);return g.oN(g.hV(","+e+","+N),2)}; Ou.prototype.subscribe=Ou.prototype.subscribe;Ou.prototype.unsubscribeByKey=Ou.prototype.qr;Ou.prototype.getProxyState=Ou.prototype.Hn;Ou.prototype.disconnect=Ou.prototype.AO;Ou.prototype.getPlayerContextData=Ou.prototype.CB;Ou.prototype.setPlayerContextData=Ou.prototype.Wik;Ou.prototype.getOtherConnectedRemoteId=Ou.prototype.Ee;Ou.prototype.getReconnectTimeout=Ou.prototype.WQ;Ou.prototype.getAutoplayMode=Ou.prototype.wl;Ou.prototype.getAutoplayVideoId=Ou.prototype.q4;Ou.prototype.reconnect=Ou.prototype.uq; Ou.prototype.sendMessage=Ou.prototype.Hqh;Ou.prototype.getXsrfToken=Ou.prototype.hR;Ou.prototype.isCapabilitySupportedOnConnectedDevices=Ou.prototype.Wj;g.b(cxX,TU);g.J=cxX.prototype;g.J.Wc=function(e){return this.GS.$_gs(e)}; g.J.contains=function(e){return!!this.GS.$_c(e)}; g.J.get=function(e){return this.GS.$_g(e)}; g.J.start=function(){this.GS.$_st()}; g.J.add=function(e,N,y){this.GS.$_a(e,N,y)}; g.J.remove=function(e,N,y){this.GS.$_r(e,N,y)}; g.J.Wl=function(e,N,y,w){this.GS.$_un(e,N,y,w)}; g.J.fh=function(){for(var e=this.J.length,N=0;N1&&!this.C.getOption("remote","quickCast")?(this.NF=g.l7(e,this.J,this),this.Pc(g.dn(e,this.J)),e=this.C.getOption("remote","currentReceiver"),e=this.J(e),this.options[e]&&this.BI(e),this.enable(!0)):this.enable(!1)}; l1.prototype.J=function(e){return e.key}; l1.prototype.CE=function(e){return e==="cast-selector-receiver"?"Elenco...":this.NF[e].name}; l1.prototype.dQ=function(e){g.Go.prototype.dQ.call(this,e);this.C.setOption("remote","currentReceiver",this.NF[e]);this.x_.rT()};g.b(npw,g.dH);g.J=npw.prototype; g.J.create=function(){var e=this.player.X(),N=g.dw(e);e={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:e.T("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:e.T("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:e.T("enable_cast_short_lived_lounge_token")};d9q(N,e);this.subscriptions.push(g.Jl("yt-remote-before-disconnect",this.MRh,this));this.subscriptions.push(g.Jl("yt-remote-connection-change",this.xKl,this));this.subscriptions.push(g.Jl("yt-remote-receiver-availability-change",this.LZ, this));this.subscriptions.push(g.Jl("yt-remote-auto-connect",this.hvP,this));this.subscriptions.push(g.Jl("yt-remote-receiver-resumed",this.Aa1,this));this.subscriptions.push(g.Jl("mdx-privacy-popup-confirm",this.eZh,this));this.subscriptions.push(g.Jl("mdx-privacy-popup-cancel",this.Wat,this));this.LZ()}; g.J.load=function(){this.player.cancelPlayback();g.dH.prototype.load.call(this);this.dK=new qE_(this,this.player,this.Sn);var e=(e=fxF())?e.currentTime:0;var N=D9k()?new ZP(A1(),void 0):null;e==0&&N&&(e=tD(xc(N)));e!==0&&this.HY(e);QeM(this,this.k9,this.k9);this.player.yY(6)}; g.J.unload=function(){this.player.publish("mdxautoplaycanceled");this.v1=this.DS;g.pq(this.dK,this.Sn);this.Sn=this.dK=null;g.dH.prototype.unload.call(this);this.player.yY(5);FY(this)}; g.J.fh=function(){g.pE(this.subscriptions);g.dH.prototype.fh.call(this)}; g.J.D2=function(e){var N=g.iE.apply(1,arguments);this.loaded&&this.dK.Xo.apply(this.dK,[e].concat(g.B(N)))}; g.J.getAdState=function(){return this.Cw}; g.J.GJ=function(){return this.Sn?xc(this.Sn).GJ:!1}; g.J.gk=function(){return this.Sn?xc(this.Sn).gk:!1}; g.J.HY=function(e,N){this.Jr=e||0;this.player.publish("progresssync",e,N);this.player.pC("onVideoProgress",e||0)}; g.J.getCurrentTime=function(){return this.Jr}; g.J.getProgressState=function(){var e=xc(this.Sn),N=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!e.Wo()&&this.player.Bf(),clipEnd:N.clipEnd,clipStart:N.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:e.getDuration(),ingestionTime:e.N?e.K+Vr(e):e.K,isAtLiveHead:(e.N?e.J+Vr(e):e.J)-this.getCurrentTime()<=1,loaded:e.U,seekableEnd:e.N?e.J+Vr(e):e.J,seekableStart:e.j>0?e.j+Vr(e):e.j,offset:0,viewerLivestreamJoinMediaTime:0}}; g.J.nextVideo=function(){this.Sn&&this.Sn.nextVideo()}; g.J.Pu=function(){this.Sn&&this.Sn.Pu()}; g.J.MRh=function(e){e===1&&(this.aD=this.Sn?xc(this.Sn):null)}; g.J.xKl=function(){var e=D9k()?new ZP(A1(),void 0):null;if(e){var N=this.v1;this.loaded&&this.unload();this.Sn=e;this.aD=null;N.key!==this.DS.key&&(this.v1=N,this.load())}else g.JV(this.Sn),this.Sn=null,this.loaded&&(this.unload(),(e=this.aD)&&e.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(e.videoId,tD(e)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.J.LZ=function(){var e=[this.DS],N=e.concat,y=Ixw();zU()&&g.qI("yt-remote-cast-available")&&y.push({key:"cast-selector-receiver",name:"Cast..."});this.NF=N.call(e,y);e=zWZ()||this.DS;S_(this,e);this.player.pC("onMdxReceiversChange")}; g.J.hvP=function(){var e=zWZ();S_(this,e)}; g.J.Aa1=function(){this.v1=zWZ()}; g.J.eZh=function(){this.Sl=!0;FY(this);Cu=!1;TZ&&pu(TZ,1);TZ=null}; g.J.Wat=function(){this.Sl=!1;FY(this);S_(this,this.DS);this.v1=this.DS;Cu=!1;TZ=null;this.player.playVideo()}; g.J.uv=function(e,N){switch(e){case "casting":return this.loaded;case "receivers":return this.NF;case "currentReceiver":return N&&(N.key==="cast-selector-receiver"?W1V():S_(this,N)),this.loaded?this.v1:this.DS;case "quickCast":return this.NF.length===2&&this.NF[1].key==="cast-selector-receiver"?(N&&W1V(),!0):!1}}; g.J.DH=function(){this.Sn.DH()}; g.J.uZ=function(){return!1}; g.J.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.J.isLoggedIn=function(){var e,N;return((e=g.Lb("PLAYER_CONFIG"))==null?void 0:(N=e.args)==null?void 0:N.authuser)!==void 0?!0:!(!g.Lb("SESSION_INDEX")&&!g.Lb("LOGGED_IN"))};g.Po("remote",npw);})(_yt_player);