(function(g){var window=this;'use strict';var wZ=function(C){g.GS(C,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.Cd()).toString(36));return C},C5=function(C,b,h){Array.isArray(h)||(h=[String(h)]); g.OMH(C.X,b,h)},yZ0=function(C){if(C instanceof g.gh)return C; if(typeof C.x7=="function")return C.x7(!1);if(g.nW(C)){var b=0,h=new g.gh;h.next=function(){for(;;){if(b>=C.length)return g.kN;if(b in C)return g.pT(C[b++]);b++}}; return h}throw Error("Not implemented");},rZ0=function(C,b,h){if(g.nW(C))g.l7(C,b,h); else for(C=yZ0(C);;){var N=C.next();if(N.done)break;b.call(h,N.value,void 0,C)}},i20=function(C,b){var h=[]; rZ0(b,function(N){try{var p=g.ie.prototype.K.call(this,N,!0)}catch(P){if(P=="Storage: Invalid value was encountered")return;throw P;}p===void 0?h.push(N):g.wcl(p)&&h.push(N)},C); return h},JZD=function(C,b){i20(C,b).forEach(function(h){g.ie.prototype.remove.call(this,h)},C)},uYC=function(C){if(C.KO){if(C.KO.locationOverrideToken)return{locationOverrideToken:C.KO.locationOverrideToken}; if(C.KO.latitudeE7!=null&&C.KO.longitudeE7!=null)return{latitudeE7:C.KO.latitudeE7,longitudeE7:C.KO.longitudeE7}}return null},RPo=function(C,b){g.Id(C,b)||C.push(b)},Q2o=function(C){var b=0,h; for(h in C)b++;return b},UME=function(C,b){return g.mg(C,b)},X4$=function(C){try{return g.KW.JSON.parse(C)}catch(b){}C=String(C); if(/^\s*$/.test(C)?0:/^[\],:{}\s\u2028\u2029]*$/.test(C.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("("+C+")")}catch(b){}throw Error("Invalid JSON string: "+C);},bD=function(C){if(g.KW.JSON)try{return g.KW.JSON.parse(C)}catch(b){}return X4$(C)},KX$=function(C){if(C.hj&&typeof C.hj=="function")return C.hj(); if(typeof Map!=="undefined"&&C instanceof Map||typeof Set!=="undefined"&&C instanceof Set)return Array.from(C.values());if(typeof C==="string")return C.split("");if(g.nW(C)){for(var b=[],h=C.length,N=0;N1){if(h%2)throw Error("Uneven number of arguments");for(var N=0;N5&&(C=C.slice(C.length-5)); var b=g.M_(uZe(),function(N){return N.loungeToken}),h=g.M_(C,function(N){return N.loungeToken}); g.q_(h,function(N){return!g.Id(b,N)})&&RAh(); g.uU("yt-remote-local-screens",C,31536E3)},Yf=function(C){C||(g.QJ("yt-remote-session-screen-id"),g.QJ("yt-remote-session-video-id")); iep();C=L5();g.wD(C,Ze());yho(C)},UJp=function(){if(!aU){var C=g.XY(); C&&(aU=new g.AZ(C))}},XCh=function(){UJp(); return aU?!!aU.get("yt-remote-use-staging-server"):!1},lD=function(C,b){g.gj[C]=!0; var h=g.hp();h&&h.publish.apply(h,arguments);g.gj[C]=!1},K7p=function(){},hS=function(){if(!oU){oU=new g.qR(new K7p); var C=g.HQ("client_streamz_web_flush_count",-1);C!==-1&&(oU.N=C)}return oU},soe=function(){var C=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return C?parseInt(C[1],10):0},Oep=function(C){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+C)!=-1||document.currentScript.src.indexOf("&"+C)!=-1)},vtd=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},FM=function(C){C.length?DJE(C.shift(),function(){FM(C)}):dJD()},W7D=function(C){return"chrome-extension://"+C+"/cast_sender.js"},DJE=function(C,b,h){var N=document.createElement("script"); N.onerror=b;h&&(N.onload=h);g.Dq(N,g.qJ(C));(document.head||document.documentElement).appendChild(N)},Etj=function(){var C=soe(),b=[]; if(C>1){var h=C-1;b.push("//www.gstatic.com/eureka/clank/"+C+"/cast_sender.js");b.push("//www.gstatic.com/eureka/clank/"+h+"/cast_sender.js")}return b},dJD=function(){var C=vtd(); C&&C(!1,"No cast extension found")},tsE=function(){if(ntI){var C=2,b=vtd(),h=function(){C--; C==0&&b&&b(!0)}; window.__onGCastApiAvailable=h;DJE("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",dJD,h)}},TWI=function(){tsE(); var C=Etj();C.push("//www.gstatic.com/eureka/clank/cast_sender.js");FM(C)},IOE=function(){tsE(); var C=Etj();C.push.apply(C,g.M(BWj.map(W7D)));C.push("//www.gstatic.com/eureka/clank/cast_sender.js");FM(C)},Gw=function(C,b,h){g.O.call(this); this.W=h!=null?(0,g.Il)(C,h):C;this.Zo=b;this.G=(0,g.Il)(this.TA,this);this.j=!1;this.K=0;this.N=this.Lj=null;this.X=[]},SC=function(C,b,h){g.O.call(this); this.X=h!=null?C.bind(h):C;this.Zo=b;this.N=null;this.j=!1;this.K=0;this.Lj=null},xJe=function(C){C.Lj=g.Vh(function(){C.Lj=null; C.j&&!C.K&&(C.j=!1,xJe(C))},C.Zo); var b=C.N;C.N=null;C.X.apply(null,b)},$f=function(){},wCo=function(){g.un.call(this,"p")},CaD=function(){g.un.call(this,"o")},hdU=function(){return bND=bND||new g.x9},NJo=function(C){g.un.call(this,"serverreachability",C)},zw=function(C){var b=hdU(); b.dispatchEvent(new NJo(b,C))},gGD=function(C){g.un.call(this,"statevent",C)},Hd=function(C){var b=hdU(); b.dispatchEvent(new gGD(b,C))},pQj=function(C,b,h,N){g.un.call(this,"timingevent",C); this.size=b;this.rtt=h;this.retries=N},Vd=function(C,b){if(typeof C!=="function")throw Error("Fn must not be null and must be a function"); return g.KW.setTimeout(function(){C()},b)},Mz=function(){},qz=function(C,b,h,N){this.N=C; this.X=b;this.Yg=h;this.SC=N||1;this.Vz=new g.VV(this);this.kh=45E3;this.Df=null;this.W=!1;this.V=this.m6=this.L=this.rO=this.nO=this.zi=this.KO=null;this.N2=[];this.j=null;this.J=0;this.G=this.q2=null;this.sI=-1;this.Qz=!1;this.Yh=0;this.CO=null;this.ob=this.t4=this.G$=this.sX=!1;this.K=new PaC},PaC=function(){this.N=null; this.j="";this.K=!1},cKE=function(C,b,h){C.rO=1; C.L=wZ(b.clone());C.V=h;C.sX=!0;jfE(C,null)},jfE=function(C,b){C.nO=Date.now(); mH(C);C.m6=C.L.clone();C5(C.m6,"t",C.SC);C.J=0;var h=C.N.rO;C.K=new PaC;C.j=kuC(C.N,h?b:null,!C.V);C.Yh>0&&(C.CO=new SC((0,g.Il)(C.f_,C,C.j),C.Yh));C.Vz.listen(C.j,"readystatechange",C.O9);b=C.Df?g.iF(C.Df):{};C.V?(C.q2||(C.q2="POST"),b["Content-Type"]="application/x-www-form-urlencoded",C.j.send(C.m6,C.q2,C.V,b)):(C.q2="GET",C.j.send(C.m6,C.q2,null,b));zw(1)},LtE=function(C){if(!edh(C))return g.xE(C.j); var b=g.wt(C.j);if(b==="")return"";var h="",N=b.length,p=g.Bt(C.j)==4;if(!C.K.N){if(typeof TextDecoder==="undefined")return f5(C),AS(C),"";C.K.N=new g.KW.TextDecoder}for(var P=0;Pb.length)return ZND;b=b.slice(N,N+h);C.J=N+h;return b},mH=function(C){C.zi=Date.now()+C.kh; l1I(C,C.kh)},l1I=function(C,b){if(C.KO!=null)throw Error("WatchDog timer not null"); C.KO=Vd((0,g.Il)(C.VN,C),b)},oGE=function(C){C.KO&&(g.KW.clearTimeout(C.KO),C.KO=null)},AS=function(C){C.N.nX()||C.Qz||Ft0(C.N,C)},f5=function(C){oGE(C); g.kI(C.CO);C.CO=null;C.Vz.removeAll();if(C.j){var b=C.j;C.j=null;b.abort();b.dispose()}},qSE=function(C,b){try{var h=C.N; if(h.jQ!=0&&(h.j==C||Gu$(h.K,C)))if(!C.t4&&Gu$(h.K,C)&&h.jQ==3){try{var N=h.OG.j.parse(b)}catch(V){N=null}if(Array.isArray(N)&&N.length==3){var p=N;if(p[0]==0)a:{if(!h.L){if(h.j)if(h.j.nO+3E30&&(h.Yh=1.5*e);N=h;var L=C.jj();if(L){var Z=g.Cn(L,"X-Client-Wire-Protocol");if(Z){var Y=N.K;!Y.j&&(g.qp(Z,"spdy")||g.qp(Z,"quic")||g.qp(Z,"h2"))&&(Y.X=Y.G,Y.j=new Set,Y.K&&(zdD(Y,Y.K),Y.K=null))}if(N.sX){var a=g.Cn(L,"X-HTTP-Session-Id");a&&(N.lF=a,g.GS(N.Df,N.sX,a))}}h.jQ=3;h.G&&h.G.Sd();h.IV&&(h.HW=Date.now()-C.nO);N=h;var l=C;N.Yr=HN$(N,N.rO?N.SC:null,N.Yg);if(l.t4){VXI(N.K, l);var F=l,G=N.Yh;G&&F.setTimeout(G);F.KO&&(oGE(F),mH(F));N.j=l}else MXh(N);h.N.length>0&&JS(h)}else P[0]!="stop"&&P[0]!="close"||iD(h,7);else h.jQ==3&&(P[0]=="stop"||P[0]=="close"?P[0]=="stop"?iD(h,7):h.disconnect():P[0]!="noop"&&h.G&&h.G.u2(P),h.N2=0)}zw(4)}catch(V){}},mQh=function(C,b){this.j=C; this.map=b;this.context=null},f1h=function(C){this.G=C||10; g.KW.PerformanceNavigationTiming?(C=g.KW.performance.getEntriesByType("navigation"),C=C.length>0&&(C[0].nextHopProtocol=="hq"||C[0].nextHopProtocol=="h2")):C=!!(g.KW.chrome&&g.KW.chrome.loadTimes&&g.KW.chrome.loadTimes()&&g.KW.chrome.loadTimes().wasFetchedViaSpdy);this.X=C?this.G:1;this.j=null;this.X>1&&(this.j=new Set);this.K=null;this.N=[]},AKD=function(C){return C.K?!0:C.j?C.j.size>=C.X:!1},$QC=function(C){return C.K?1:C.j?C.j.size:0},Gu$=function(C,b){return C.K?C.K==b:C.j?C.j.has(b):!1},zdD= function(C,b){C.j?C.j.add(b):C.K=b},VXI=function(C,b){C.K&&C.K==b?C.K=null:C.j&&C.j.has(b)&&C.j.delete(b)},yKd=function(C){if(C.K!=null)return C.N.concat(C.K.N2); if(C.j!=null&&C.j.size!==0){var b=C.N;C=g.z(C.j.values());for(var h=C.next();!h.done;h=C.next())b=b.concat(h.value.N2);return b}return g.hj(C.N)},rKD=function(C,b){var h=new Mz; if(g.KW.Image){var N=new Image;N.onload=g.wo(uD,h,"TestLoadImage: loaded",!0,b,N);N.onerror=g.wo(uD,h,"TestLoadImage: error",!1,b,N);N.onabort=g.wo(uD,h,"TestLoadImage: abort",!1,b,N);N.ontimeout=g.wo(uD,h,"TestLoadImage: timeout",!1,b,N);g.KW.setTimeout(function(){if(N.ontimeout)N.ontimeout()},1E4); N.src=C}else b(!1)},iNC=function(C,b){var h=new Mz,N=new AbortController,p=setTimeout(function(){N.abort(); uD(h,"TestPingServer: timeout",!1,b)},1E4); fetch(C,{signal:N.signal}).then(function(P){clearTimeout(p);P.ok?uD(h,"TestPingServer: ok",!0,b):uD(h,"TestPingServer: server error",!1,b)}).catch(function(){clearTimeout(p); uD(h,"TestPingServer: error",!1,b)})},uD=function(C,b,h,N,p){try{p&&(p.onload=null,p.onerror=null,p.onabort=null,p.ontimeout=null),N(h)}catch(P){}},JKj=function(){this.j=new $f},uue=function(C,b,h){var N=h||""; try{O2d(C,function(p,P){var c=p;g.tl(p)&&(c=g.fb(p));b.push(N+P+"="+encodeURIComponent(c))})}catch(p){throw b.push(N+"type="+encodeURIComponent("_badmap")),p; }},RU=function(C,b,h){return h&&h.iOf?h.iOf[C]||b:b},Rde=function(C){this.N=[]; this.SC=this.Yr=this.Df=this.Yg=this.j=this.lF=this.sX=this.Qz=this.J=this.sI=this.V=null;this.ge=this.m6=0;this.fK=RU("failFast",!1,C);this.t4=this.KO=this.L=this.W=this.G=null;this.AZ=!0;this.OU=this.CO=-1;this.ob=this.N2=this.nO=0;this.Xy=RU("baseRetryDelayMs",5E3,C);this.Fy=RU("retryDelaySeedMs",1E4,C);this.pK=RU("forwardChannelMaxRetries",2,C);this.aL=RU("forwardChannelRequestTimeoutMs",2E4,C);this.w9=C&&C.kSz||void 0;this.k6=C&&C.Y8h||void 0;this.mw=C&&C.FAX||!1;this.Yh=void 0;this.rO=C&&C.E1z|| !1;this.X="";this.K=new f1h(C&&C.c_E);this.OG=new JKj;this.Vz=C&&C.VZ4||!1;this.zi=C&&C.S1D||!1;this.Vz&&this.zi&&(this.zi=!1);this.LK=C&&C.atO||!1;C&&C.OTi&&(this.AZ=!1);this.IV=!this.Vz&&this.AZ&&C&&C.tZD||!1;this.yd=void 0;C&&C.H3&&C.H3>0&&(this.yd=C.H3);this.Xs=void 0;this.HW=0;this.kh=!1;this.G$=this.q2=null},r3=function(C){C.j&&(QfU(C),C.j.cancel(),C.j=null)},UQp=function(C){r3(C); C.L&&(g.KW.clearTimeout(C.L),C.L=null);yd(C);C.K.cancel();C.W&&(typeof C.W==="number"&&g.KW.clearTimeout(C.W),C.W=null)},JS=function(C){AKD(C.K)||C.W||(C.W=!0,g.kE(C.tG,C),C.nO=0)},KtC=function(C,b){if($QC(C.K)>=C.K.X-(C.W?1:0))return!1; if(C.W)return C.N=b.N2.concat(C.N),!0;if(C.jQ==1||C.jQ==2||C.nO>=(C.fK?0:C.pK))return!1;C.W=Vd((0,g.Il)(C.tG,C,b),XQC(C,C.nO));C.nO++;return!0},OND=function(C,b){var h; b?h=b.Yg:h=C.m6++;var N=C.Df.clone();g.GS(N,"SID",C.X);g.GS(N,"RID",h);g.GS(N,"AID",C.CO);Qd(C,N);C.J&&C.V&&g.Hu(N,C.J,C.V);h=new qz(C,C.X,h,C.nO+1);C.J===null&&(h.Df=C.V);b&&(C.N=b.N2.concat(C.N));b=sfI(C,h,1E3);h.setTimeout(Math.round(C.aL*.5)+Math.round(C.aL*.5*Math.random()));zdD(C.K,h);cKE(h,N,b)},Qd=function(C,b){C.Qz&&g.GA(C.Qz,function(h,N){g.GS(b,N,h)}); C.G&&O2d({},function(h,N){g.GS(b,N,h)})},sfI=function(C,b,h){h=Math.min(C.N.length,h); var N=C.G?(0,g.Il)(C.G.IP,C.G,C):null;a:{for(var p=C.N,P=-1;;){var c=["count="+h];P==-1?h>0?(P=p[0].j,c.push("ofs="+P)):P=0:c.push("ofs="+P);for(var e=!0,L=0;L=3)return!1; C.ob++;C.L=Vd((0,g.Il)(C.l2,C),XQC(C,C.N2));C.N2++;return!0},QfU=function(C){C.q2!=null&&(g.KW.clearTimeout(C.q2),C.q2=null)},vGD=function(C){C.j=new qz(C,C.X,"rpc",C.ob); C.J===null&&(C.j.Df=C.V);C.j.Yh=0;var b=C.Yr.clone();g.GS(b,"RID","rpc");g.GS(b,"SID",C.X);g.GS(b,"AID",C.CO);g.GS(b,"CI",C.t4?"0":"1");!C.t4&&C.yd&&g.GS(b,"TO",C.yd);g.GS(b,"TYPE","xmlhttp");Qd(C,b);C.J&&C.V&&g.Hu(b,C.J,C.V);C.Yh&&C.j.setTimeout(C.Yh);var h=C.j;C=C.SC;h.rO=1;h.L=wZ(b.clone());h.V=null;h.sX=!0;jfE(h,C)},yd=function(C){C.KO!=null&&(g.KW.clearTimeout(C.KO),C.KO=null)},Ft0=function(C,b){var h=null; if(C.j==b){yd(C);QfU(C);C.j=null;var N=2}else if(Gu$(C.K,b))h=b.N2,VXI(C.K,b),N=1;else return;if(C.jQ!=0)if(b.W)if(N==1){h=b.V?b.V.length:0;b=Date.now()-b.nO;var p=C.nO;N=hdU();N.dispatchEvent(new pQj(N,h,b,p));JS(C)}else MXh(C);else{var P=b.sI;p=b.getLastError();if(p==3||p==0&&P>0||!(N==1&&KtC(C,b)||N==2&&SS0(C)))switch(h&&h.length>0&&(b=C.K,b.N=b.N.concat(h)),p){case 1:iD(C,5);break;case 4:iD(C,10);break;case 3:iD(C,6);break;default:iD(C,2)}}},XQC=function(C,b){var h=C.Xy+Math.floor(Math.random()* C.Fy); C.isActive()||(h*=2);return h*b},iD=function(C,b){if(b==2){var h=(0,g.Il)(C.MqD,C),N=C.k6,p=!N; N=new g.eB(N||"//www.google.com/images/cleardot.gif");g.KW.location&&g.KW.location.protocol=="http"||g.L0(N,"https");wZ(N);p?rKD(N.toString(),h):iNC(N.toString(),h)}else Hd(2);C.jQ=0;C.G&&C.G.b2(b);DQE(C);UQp(C)},DQE=function(C){C.jQ=0; C.G$=[];if(C.G){var b=yKd(C.K);if(b.length!=0||C.N.length!=0)g.NI(C.G$,b),g.NI(C.G$,C.N),C.K.N.length=0,g.hj(C.N),C.N.length=0;C.G.C_()}},dQ$=function(C){if(C.jQ==0)return C.G$; var b=[];g.NI(b,yKd(C.K));g.NI(b,C.N);return b},HN$=function(C,b,h){var N=g.SB(h); N.j!=""?(b&&g.ZH(N,b+"."+N.j),g.Yk(N,N.N)):(N=g.KW.location,N=vbo(N.protocol,b?b+"."+N.hostname:N.hostname,+N.port,h));b=C.sX;h=C.lF;b&&h&&g.GS(N,b,h);g.GS(N,"VER",C.p_);Qd(C,N);return N},kuC=function(C,b,h){if(b&&!C.rO)throw Error("Can't create secondary domain capable XhrIo object."); b=C.mw&&!C.w9?new g.nb(new g.Pu({rk:h})):new g.nb(C.w9);b.J=C.rO;return b},WtD=function(){},EGd=function(){},XM=function(C,b){g.x9.call(this); this.j=new Rde(b);this.G=C;this.K=b&&b.rZo||null;C=b&&b.MCi||null;b&&b.r_z&&(C?C["X-Client-Protocol"]="webchannel":C={"X-Client-Protocol":"webchannel"});this.j.V=C;C=b&&b.WTo||null;b&&b.uL&&(C?C["X-WebChannel-Content-Type"]=b.uL:C={"X-WebChannel-Content-Type":b.uL});b&&b.Wq&&(C?C["X-WebChannel-Client-Profile"]=b.Wq:C={"X-WebChannel-Client-Profile":b.Wq});this.j.sI=C;(C=b&&b.q8f)&&!g.Mp(C)&&(this.j.J=C);this.W=b&&b.E1z||!1;this.X=b&&b.nUX||!1;(b=b&&b.ffp)&&!g.Mp(b)&&(this.j.sX=b,g.qe(this.K,b)&&(C= this.K,b in C&&delete C[b]));this.N=new UM(this)},nGh=function(C){wCo.call(this); C.__headers__&&(this.headers=C.__headers__,this.statusCode=C.__status__,delete C.__headers__,delete C.__status__);var b=C.__sm__;b?this.data=(this.j=g.HE(b))?g.yT(b,this.j):b:this.data=C},tXD=function(C){CaD.call(this); this.status=1;this.errorCode=C},UM=function(C){this.j=C},TJe=function(C,b){this.K=C; this.j=b},BJd=function(C){return dQ$(C.j).map(function(b){var h=C.K; b=b.map;"__data__"in b?(b=b.__data__,h=h.X?X4$(b):b):h=b;return h})},K5=function(C,b){if(typeof C!=="function")throw Error("Fn must not be null and must be a function"); return g.KW.setTimeout(function(){C()},b)},OM=function(C){sM.dispatchEvent(new I1o(sM,C))},I1o=function(C){g.un.call(this,"statevent",C)},vd=function(C,b,h,N){this.j=C; this.X=b;this.J=h;this.W=N||1;this.K=45E3;this.N=new g.VV(this);this.G=new g.Ht;this.G.setInterval(250)},wQD=function(C,b,h){C.UC=1; C.Fp=wZ(b.clone());C.HA=h;C.sX=!0;xQE(C,null)},CUI=function(C,b,h,N,p){C.UC=1; C.Fp=wZ(b.clone());C.HA=null;C.sX=h;p&&(C.T9=!1);xQE(C,N)},xQE=function(C,b){C.U5=Date.now(); bpE(C);C.kI=C.Fp.clone();C5(C.kI,"t",C.W);C.zd=0;C.J6=C.j.zN(C.j.Pg()?b:null);C.k_>0&&(C.Ll=new SC((0,g.Il)(C.YH,C,C.J6),C.k_));C.N.listen(C.J6,"readystatechange",C.jY);b=C.aJ?g.iF(C.aJ):{};C.HA?(C.PV="POST",b["Content-Type"]="application/x-www-form-urlencoded",C.J6.send(C.kI,C.PV,C.HA,b)):(C.PV="GET",C.T9&&!g.TA&&(b.Connection="close"),C.J6.send(C.kI,C.PV,null,b));C.j.n6(1)},gaI=function(C,b){var h=C.zd,N=b.indexOf("\n",h); if(N==-1)return hjd;h=Number(b.substring(h,N));if(isNaN(h))return NUD;N+=1;if(N+h>b.length)return hjd;b=b.slice(N,N+h);C.zd=N+h;return b},bpE=function(C){C.U4=Date.now()+C.K; pj$(C,C.K)},pj$=function(C,b){if(C.NI!=null)throw Error("WatchDog timer not null"); C.NI=K5((0,g.Il)(C.vG,C),b)},PUo=function(C){C.NI&&(g.KW.clearTimeout(C.NI),C.NI=null)},j1o=function(C){C.j.nX()||C.LP||C.j.Vi(C)},De=function(C){PUo(C); g.kI(C.Ll);C.Ll=null;C.G.stop();C.N.removeAll();if(C.J6){var b=C.J6;C.J6=null;b.abort();b.dispose()}C.VT&&(C.VT=null)},cJ$=function(C,b){try{C.j.mN(C,b),C.j.n6(4)}catch(h){}},ejE=function(C,b,h,N,p){if(N==0)h(!1); else{var P=p||0;N--;kmj(C,b,function(c){c?h(!0):g.KW.setTimeout(function(){ejE(C,b,h,N,P)},P)})}},kmj=function(C,b,h){var N=new Image; N.onload=function(){try{d3(N),h(!0)}catch(p){}}; N.onerror=function(){try{d3(N),h(!1)}catch(p){}}; N.onabort=function(){try{d3(N),h(!1)}catch(p){}}; N.ontimeout=function(){try{d3(N),h(!1)}catch(p){}}; g.KW.setTimeout(function(){if(N.ontimeout)N.ontimeout()},b); N.src=C},d3=function(C){C.onload=null; C.onerror=null;C.onabort=null;C.ontimeout=null},LJE=function(C){this.j=C; this.K=new $f},Zpd=function(C){var b=Wd(C.j,C.Nc,"/mail/images/cleardot.gif"); wZ(b);ejE(b.toString(),5E3,(0,g.Il)(C.po,C),3,2E3);C.n6(1)},YJe=function(C){var b=C.j.W; b!=null?(OM(5),b?(OM(11),EM(C.j,C,!1)):(OM(12),EM(C.j,C,!0))):(C.dH=new vd(C),C.dH.aJ=C.TN,b=C.j,b=Wd(b,b.Pg()?C.Td:null,C.O4),OM(5),C5(b,"TYPE","xmlhttp"),CUI(C.dH,b,!1,C.Td,!1))},a7d=function(C,b,h){this.j=1; this.K=[];this.N=[];this.G=new $f;this.V=C||null;this.W=b!=null?b:null;this.L=h||!1},l7D=function(C,b){this.j=C; this.map=b;this.context=null},oad=function(C,b,h,N){g.un.call(this,"timingevent",C); this.size=b;this.rtt=h;this.retries=N},FJE=function(C){g.un.call(this,"serverreachability",C)},SJ$=function(C){C.KD(1,0); C.Vf=Wd(C,null,C.IN);Gmj(C)},$aD=function(C){C.sY&&(C.sY.abort(),C.sY=null); C.o2&&(C.o2.cancel(),C.o2=null);C.EF&&(g.KW.clearTimeout(C.EF),C.EF=null);n5(C);C.c$&&(C.c$.cancel(),C.c$=null);C.vj&&(g.KW.clearTimeout(C.vj),C.vj=null)},zjU=function(C,b){if(C.j==0)throw Error("Invalid operation: sending map when state is closed"); C.K.push(new l7D(C.Ny++,b));C.j!=2&&C.j!=3||Gmj(C)},Hpo=function(C){var b=0; C.o2&&b++;C.c$&&b++;return b},Gmj=function(C){C.c$||C.vj||(C.vj=K5((0,g.Il)(C.Uv,C),0),C.wl=0)},qJI=function(C,b){if(C.j==1){if(!b){C.Tm=Math.floor(Math.random()*1E5); b=C.Tm++;var h=new vd(C,"",b);h.aJ=C.ZZ;var N=VwE(C),p=C.Vf.clone();g.GS(p,"RID",b);g.GS(p,"CVER","1");tS(C,p);wQD(h,p,N);C.c$=h;C.j=2}}else C.j==3&&(b?Mw0(C,b):C.K.length==0||C.c$||Mw0(C))},Mw0=function(C,b){if(b)if(C.JH>6){C.K=C.N.concat(C.K); C.N.length=0;var h=C.Tm-1;b=VwE(C)}else h=b.J,b=b.HA;else h=C.Tm++,b=VwE(C);var N=C.Vf.clone();g.GS(N,"SID",C.X);g.GS(N,"RID",h);g.GS(N,"AID",C.Bx);tS(C,N);h=new vd(C,C.X,h,C.wl+1);h.aJ=C.ZZ;h.setTimeout(1E4+Math.round(1E4*Math.random()));C.c$=h;wQD(h,N,b)},tS=function(C,b){C.Tx&&(C=C.Tx.V1())&&g.GA(C,function(h,N){g.GS(b,N,h)})},VwE=function(C){var b=Math.min(C.K.length,1E3),h=["count="+b]; if(C.JH>6&&b>0){var N=C.K[0].j;h.push("ofs="+N)}else N=0;for(var p={},P=0;P=3)return!1; C.J++;C.EF=K5((0,g.Il)(C.kH,C),f7C(C,C.Xm));C.Xm++;return!0},EM=function(C,b,h){C.HI=C.W==null?h:!C.W; C.pk=b.G2;C.L||SJ$(C)},n5=function(C){C.Q$!=null&&(g.KW.clearTimeout(C.Q$),C.Q$=null)},f7C=function(C,b){var h=5E3+Math.floor(Math.random()*1E4); C.isActive()||(h*=2);return h*b},Tw=function(C,b){if(b==2||b==9){var h=null; C.Tx&&(h=null);var N=(0,g.Il)(C.yLf,C);h||(h=new g.eB("//www.google.com/images/cleardot.gif"),wZ(h));kmj(h.toString(),1E4,N)}else OM(2);yJh(C,b)},yJh=function(C,b){C.j=0; C.Tx&&C.Tx.Pf(b);rJe(C);$aD(C)},rJe=function(C){C.j=0; C.pk=-1;if(C.Tx)if(C.N.length==0&&C.K.length==0)C.Tx.vX();else{var b=g.hj(C.N),h=g.hj(C.K);C.N.length=0;C.K.length=0;C.Tx.vX(b,h)}},Wd=function(C,b,h){var N=g.SB(h); if(N.j!="")b&&g.ZH(N,b+"."+N.j),g.Yk(N,N.N);else{var p=window.location;N=vbo(p.protocol,b?b+"."+p.hostname:p.hostname,+p.port,h)}C.zm&&g.GA(C.zm,function(P,c){g.GS(N,c,P)}); g.GS(N,"VER",C.JH);tS(C,N);return N},ipD=function(){},JJU=function(){this.j=[]; this.K=[]},urj=function(C){g.un.call(this,"channelMessage"); this.message=C},RjD=function(C){g.un.call(this,"channelError"); this.error=C},Q1E=function(C,b){this.action=C; this.params=b||{}},Bd=function(C,b){g.O.call(this); this.j=new g.wl(this.wFE,0,this);g.D(this,this.j);this.Zo=5E3;this.K=0;if(typeof C==="function")b&&(C=(0,g.Il)(C,b));else if(C&&typeof C.handleEvent==="function")C=(0,g.Il)(C.handleEvent,C);else throw Error("Invalid listener argument");this.N=C},Ua0=function(C,b,h,N,p,P,c){h=h===void 0?!1:h; N=N===void 0?function(){return""}:N; p=p===void 0?!1:p;P=P===void 0?!1:P;c=c===void 0?function(){return g.FX({})}:c; this.Qz=C;this.KO=b;this.G=new g.f2;this.K=new Bd(this.ryf,this);this.j=null;this.J=!1;this.V=null;this.nO="";this.N2=this.L=0;this.N=[];this.m6=h;this.q2=N;this.W=P;this.sX=c;this.X=g.FX();this.Yh=p;this.CO=new DMD;this.Df=new dMd;this.t4=new WX0;this.rO=new EbI;this.kh=new nbC;this.zi=new t6d},KJC=function(C,b,h,N,p){XjC(C); if(C.j){var P=g.Tf("ID_TOKEN"),c=C.j.ZZ||{};P?c["x-youtube-identity-token"]=P:delete c["x-youtube-identity-token"];C.j.ZZ=c}N?(N.getState()!=3&&Hpo(N)==0||N.getState(),C.j.connect(b,h,C.KO,N.X,N.Bx)):p?C.j.connect(b,h,C.KO,p.sessionId,p.arrayId):C.j.connect(b,h,C.KO)},vaI=function(C){var b,h; g.R(function(N){if(N.j==1)return g.z6(N,2),g.J(N,s1D(C),2);g.MW(N);b=C.N;C.N=[];h=b.length;Opp(C,b,h);IU(C);return g.qW(N,0)})},Opp=function(C,b,h){for(var N=0;N0?h=Object.assign({},h,b):delete h.Authorization;C.j.ZZ=h}).catch(function(){})},xf=function(C){this.scheme="https"; this.port=this.domain="";this.j="/api/lounge";this.K=!0;C=C||document.location.href;var b=Number(g.Qh(4,C))||"";b&&(this.port=":"+b);this.domain=g.Uq(C)||"";C=g.rD();C.search("MSIE")>=0&&(C=C.match(/MSIE ([\d.]+)/)[1],g.yj(C,"10.0")<0&&(this.K=!1))},w3=function(C,b){var h=C.j; C.K&&(h=C.scheme+"://"+C.domain+C.port+C.j);return g.Dh(h+b,{})},DaD=function(C,b){g.x9.call(this); var h=this;this.B7=C();this.B7.subscribe("handlerOpened",this.ww,this);this.B7.subscribe("handlerClosed",this.onClosed,this);this.B7.subscribe("handlerError",function(N,p){h.onError(p)}); this.B7.subscribe("handlerMessage",this.onMessage,this);this.j=b},dad=function(C,b,h){var N=this; h=h===void 0?function(){return""}:h; var p=p===void 0?new EGd:p;var P=P===void 0?new g.f2:P;this.pathPrefix=C;this.j=b;this.nO=h;this.G=P;this.L=null;this.V=this.J=0;this.channel=null;this.W=0;this.N=new Bd(function(){N.N.isActive();var c;((c=N.channel)==null?void 0:$QC((new TJe(c,c.j)).j.K))===0&&N.connect(N.L,N.J)}); this.X={};this.K={};this.KO=!1;this.logger=null;this.N2=[];this.FH=void 0;this.Df=new DMD;this.q2=new dMd;this.Qz=new WX0;this.sX=new EbI},WJh=function(C){g.vP(C.channel,"m",function(){C.W=3; C.N.reset();C.L=null;C.J=0;for(var b=g.z(C.N2),h=b.next();!h.done;h=b.next())h=h.value,C.channel&&C.channel.send(h);C.N2=[];C.publish("webChannelOpened");C.Df.j("WEB_CHANNEL")}); g.vP(C.channel,"n",function(){C.W=0;C.N.isActive()||C.publish("webChannelClosed");var b,h=(b=C.channel)==null?void 0:BJd(new TJe(b,b.j));h&&(C.N2=[].concat(g.M(h)));C.q2.j("WEB_CHANNEL")}); g.vP(C.channel,"p",function(b){var h=b.data;h[0]==="gracefulReconnect"?(C.N.start(),C.channel&&C.channel.close()):C.publish("webChannelMessage",new Q1E(h[0],h[1]));C.FH=b.statusCode;C.Qz.j("WEB_CHANNEL")}); g.vP(C.channel,"o",function(){C.FH===401||C.N.start();C.publish("webChannelError");C.sX.j("WEB_CHANNEL")})},Ead=function(C){var b=C.nO(); b?C.X["x-youtube-lounge-xsrf-token"]=b:delete C.X["x-youtube-lounge-xsrf-token"]},naj=function(C){g.x9.call(this); this.j=C();this.j.subscribe("webChannelOpened",this.BG,this);this.j.subscribe("webChannelClosed",this.onClosed,this);this.j.subscribe("webChannelError",this.onError,this);this.j.subscribe("webChannelMessage",this.onMessage,this)},twE=function(C,b,h,N,p){function P(){return new Ua0(w3(C,"/bc"),b,!1,h,N)} h=h===void 0?function(){return""}:h; return g.zu("enable_mdx_web_channel_desktop")?new naj(function(){return new dad(w3(C,"/wc"),b,h)}):new DaD(P,p)},xao=function(){var C=TUD; BUD();C7.push(C);I7I()},bm=function(C,b){BUD(); var h=wjE(C,String(b));C7.length==0?CfU(h):(I7I(),g.l7(C7,function(N){N(h)}))},hf=function(C){bm("CP",C)},BUD=function(){C7||(C7=g.v1("yt.mdx.remote.debug.handlers_")||[],g.sl("yt.mdx.remote.debug.handlers_",C7))},CfU=function(C){var b=(Nh+1)%50; Nh=b;gu[b]=C;p7||(p7=b==49)},I7I=function(){var C=C7; if(gu[0]){var b=p7?Nh:-1,h={};do h={Jx:void 0},b=(b+1)%50,h.Jx=gu[b],g.l7(C,function(N){return function(p){p(N.Jx)}}(h)); while(b!=Nh);gu=Array(50);Nh=-1;p7=!1}},wjE=function(C,b){var h=(Date.now()-bBC)/1E3; h.toFixed&&(h=h.toFixed(3));var N=[];N.push("[",h+"s","] ");N.push("[","yt.mdx.remote","] ");N.push(C+": "+b,"\n");return N.join("")},P0=function(C){g.jv.call(this); this.W=C;this.screens=[]},hOd=function(C,b){var h=C.get(b.uuid)||C.get(b.id); if(h)return C=h.name,h.id=b.id||h.id,h.name=b.name,h.token=b.token,h.uuid=b.uuid||h.uuid,h.name!=C;C.screens.push(b);return!0},Nmd=function(C,b){var h=C.screens.length!=b.length; C.screens=g.kS(C.screens,function(P){return!!mJe(b,P)}); for(var N=b.length,p=0;p0&&C.X0&&SG(C,h)},function(b){C.G=function(){}; C.zn(b)})},Ji$=function(C){var b={}; b.pairingCode=C.q2;b.theme=C.rO;XCh()&&(b.env_useStageMdx=1);return g.vt(b)},uyp=function(C){return new Promise(function(b){C.q2=Msd(); if(C.Df){var h=new chrome.cast.DialLaunchResponse(!0,Ji$(C));b(h);iBh(C)}else C.KO=function(){g.Gu(C.V);C.KO=function(){}; C.V=NaN;var N=new chrome.cast.DialLaunchResponse(!0,Ji$(C));b(N);iBh(C)},C.V=g.of(function(){C.KO()},100)})},QRE=function(C,b,h){C.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(b)); var N=new jC(b);return(new Promise(function(p){ROU(C,N,function(P){P?(C.N2=!0,ZW(C.X,N),ar(C,N),SG(C,h)):g.xt(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(b)+" is not online."));p(P)},5)})).then(function(p){return p?new chrome.cast.DialLaunchResponse(!1):uyp(C)})},U$D=function(C,b){var h=C.L.receiver.label,N=C.K.friendlyName; return(new Promise(function(p){lQ0(C.X,h,b,N,function(P){P&&P.token&&ar(C,P);p(P)},function(P){lm(C,"Failed to get DIAL screen: "+P); p(null)})})).then(function(p){return p&&p.token?new chrome.cast.DialLaunchResponse(!1):uyp(C)})},ROU=function(C,b,h,N){g.Gu(C.W); C.W=0;FKd(C.X,b,function(p){p||N<0?h(p):C.W=g.of(function(){ROU(C,b,h,N-1)},300)})},SG=function(C,b){C.info("getDialAppInfoWithTimeout_ "+b); GT(C)&&(g.Gu(C.J),C.J=0,b==0?XGD(C):C.J=g.of(function(){XGD(C)},b))},XGD=function(C){GT(C)&&C.N.getDialAppInfo(function(b){C.info("getDialAppInfo dialLaunchData: "+JSON.stringify(b)); b=b.extraData||{};var h=null;if(b.loungeToken){var N;((N=C.j)==null?void 0:N.token)==b.loungeToken&&(h="staleLoungeToken")}else h="missingLoungeToken";h?(C.nO=h,SG(C,3E4)):(C.N2=!1,C.nO="unknown",zOE(C,b.loungeToken),SG(C,b.loungeTokenRefreshIntervalMs))},function(b){C.info("getDialAppInfo error: "+b); C.nO="noLoungeTokenResponse";SG(C,3E4)})},KKd=function(C){g.Gu(C.W); C.W=0;g.Gu(C.J);C.J=0;C.G();C.G=function(){}; g.Gu(C.V)},$P=function(C,b){YP.call(this,C,b,"ManualSession"); this.N=g.of((0,g.Il)(this.zp,this,null),150)},zT=function(C,b){g.jv.call(this); this.config_=b;this.K=C;this.L=b.appId||"233637DE";this.X=b.theme||"cl";this.V=b.disableCastApi||!1;this.W=b.forceMirroring||!1;this.j=null;this.J=!1;this.N=[];this.G=(0,g.Il)(this.GMO,this)},sRD=function(C,b){return b?g.Te(C.N,function(h){return cd(b,h.label)},C):null},H0=function(C){bm("Controller",C)},TUD=function(C){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(C)},VP=function(C){return C.J||!!C.N.length||!!C.j},Mh=function(C,b,h){b!=C.j&&(g.kI(C.j),(C.j=b)?(h?C.publish("yt-remote-cast2-receiver-resumed", b.K):C.publish("yt-remote-cast2-receiver-selected",b.K),b.subscribe("sessionScreen",(0,g.Il)(C.lm,C,b)),b.subscribe("sessionFailed",function(){return OBE(C,b)}),b.j?C.publish("yt-remote-cast2-session-change",b.j):h&&C.j.zp(null)):C.publish("yt-remote-cast2-session-change",null))},OBE=function(C,b){C.j==b&&C.publish("yt-remote-cast2-session-failed")},v1h=function(C){var b=C.K.Ov(),h=C.j&&C.j.K; C=g.M_(b,function(N){h&&cd(N,h.label)&&(h=null);var p=N.uuid?N.uuid:N.id,P=sRD(this,N);P?(P.label=p,P.friendlyName=N.name):(P=new chrome.cast.Receiver(p,N.name),P.receiverType=chrome.cast.ReceiverType.CUSTOM);return P},C); h&&(h.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(h=new chrome.cast.Receiver(h.label,h.friendlyName),h.receiverType=chrome.cast.ReceiverType.CUSTOM),C.push(h));return C},TmD=function(C,b,h,N){N.disableCastApi?qh("Cannot initialize because disabled by Mdx config."):D$D()?d$h(b,N)&&(WKE(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?E1j(C,h):(window.__onGCastApiAvailable=function(p,P){p?E1j(C,h):(mL("Failed to load cast API: "+P),n1$(!1),WKE(!1),g.QJ("yt-remote-cast-available"),g.QJ("yt-remote-cast-receiver"), tnD(),h(!1))},N.loadCastApiSetupScript?g.kp("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?soe()>=60&&TWI():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?dJD():soe()>=89?IOE():(tsE(),FM(BWj.map(W7D))))):qh("Cannot initialize because not running Chrome")},tnD=function(){qh("dispose"); var C=f7();C&&C.dispose();g.sl("yt.mdx.remote.cloudview.instance_",null);Bmj(!1);g.j8(IQU);IQU.length=0},Af=function(){return!!g.R1("yt-remote-cast-installed")},x$$=function(){var C=g.R1("yt-remote-cast-receiver"); return C?C.friendlyName:null},wGU=function(){qh("clearCurrentReceiver"); g.QJ("yt-remote-cast-receiver")},CZ0=function(){return Af()?f7()?f7().getCastSession():(mL("getCastSelector: Cast is not initialized."),null):(mL("getCastSelector: Cast API is not installed!"),null)},bQp=function(){Af()?f7()?yP()?(qh("Requesting cast selector."),f7().requestSession()):(qh("Wait for cast API to be ready to request the session."),IQU.push(g.Pl("yt-remote-cast2-api-ready",bQp))):mL("requestCastSelector: Cast is not initialized."):mL("requestCastSelector: Cast API is not installed!")}, ru=function(C,b){yP()?f7().setConnectedScreenStatus(C,b):mL("setConnectedScreenStatus called before ready.")},D$D=function(){var C=g.rD().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.Am||C},hTh=function(C,b){f7().init(C,b)},d$h=function(C,b){var h=!1; f7()||(C=new zT(C,b),C.subscribe("yt-remote-cast2-availability-change",function(N){g.uU("yt-remote-cast-available",N);lD("yt-remote-cast2-availability-change",N)}),C.subscribe("yt-remote-cast2-receiver-selected",function(N){qh("onReceiverSelected: "+N.friendlyName); g.uU("yt-remote-cast-receiver",N);lD("yt-remote-cast2-receiver-selected",N)}),C.subscribe("yt-remote-cast2-receiver-resumed",function(N){qh("onReceiverResumed: "+N.friendlyName); g.uU("yt-remote-cast-receiver",N);lD("yt-remote-cast2-receiver-resumed",N)}),C.subscribe("yt-remote-cast2-session-change",function(N){qh("onSessionChange: "+kf(N)); N||g.QJ("yt-remote-cast-receiver");lD("yt-remote-cast2-session-change",N)}),g.sl("yt.mdx.remote.cloudview.instance_",C),h=!0); qh("cloudview.createSingleton_: "+h);return h},f7=function(){return g.v1("yt.mdx.remote.cloudview.instance_")},E1j=function(C,b){n1$(!0); WKE(!1);hTh(C,function(h){h?(Bmj(!0),g.cl("yt-remote-cast2-api-ready")):(mL("Failed to initialize cast API."),n1$(!1),g.QJ("yt-remote-cast-available"),g.QJ("yt-remote-cast-receiver"),tnD());b(h)})},qh=function(C){bm("cloudview",C)},mL=function(C){bm("cloudview",C)},n1$=function(C){qh("setCastInstalled_ "+C); g.uU("yt-remote-cast-installed",C)},yP=function(){return!!g.v1("yt.mdx.remote.cloudview.apiReady_")},Bmj=function(C){qh("setApiReady_ "+C); g.sl("yt.mdx.remote.cloudview.apiReady_",C)},WKE=function(C){g.sl("yt.mdx.remote.cloudview.initializing_",C)},im=function(C){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.W=this.J=0;this.trackData=null;this.iN=this.xC=!1;this.L=this.G=this.j=this.X=0;this.N=NaN;this.K=!1;this.reset(C)},Nfo=function(C){C.audioTrackId=null; C.trackData=null;C.playerState=-1;C.xC=!1;C.iN=!1;C.J=0;C.W=g.Cd();C.X=0;C.j=0;C.G=0;C.L=0;C.N=NaN;C.K=!1},Jf=function(C){return C.isPlaying()?(g.Cd()-C.W)/1E3:0},um=function(C,b){C.J=b; C.W=g.Cd()},Rr=function(C){switch(C.playerState){case 1:case 1081:return(g.Cd()-C.W)/1E3+C.J; case -1E3:return 0}return C.J},QP=function(C,b,h){var N=C.videoId; C.videoId=b;C.index=h;b!=N&&Nfo(C)},gwD=function(C){var b={}; b.index=C.index;b.listId=C.listId;b.videoId=C.videoId;b.playerState=C.playerState;b.volume=C.volume;b.muted=C.muted;b.audioTrackId=C.audioTrackId;b.trackData=g.J8(C.trackData);b.hasPrevious=C.xC;b.hasNext=C.iN;b.playerTime=C.J;b.playerTimeAt=C.W;b.seekableStart=C.X;b.seekableEnd=C.j;b.duration=C.G;b.loadedTime=C.L;b.liveIngestionTime=C.N;return b},Xv=function(C,b){g.jv.call(this); var h=this;this.N=0;this.X=C;this.W=[];this.G=new JJU;this.K=this.j=null;this.V=(0,g.Il)(this.Nn4,this);this.J=(0,g.Il)(this.Qv,this);this.L=(0,g.Il)(this.KEo,this);this.KO=(0,g.Il)(this.wWz,this);var N=0;C?(N=C.getProxyState(),N!=3&&(C.subscribe("proxyStateChange",this.Af,this),pm0(this))):N=3;N!=0&&(b?this.Af(N):g.of(function(){h.Af(N)},0)); (C=CZ0())&&Ut(this,C);this.subscribe("yt-remote-cast2-session-change",this.KO)},K7=function(C){return new im(C.X.getPlayerContextData())},pm0=function(C){g.l7("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(b){this.W.push(this.X.subscribe(b,g.wo(this.WkO,b),this))},C)},PZ0=function(C){g.l7(C.W,function(b){this.X.unsubscribeByKey(b)},C); C.W.length=0},Ot=function(C){return C.getState()==1},v0=function(C,b){var h=C.G; h.j.length+h.K.length<50&&C.G.enqueue(b)},jtp=function(C,b,h){var N=K7(C); um(N,h);N.playerState!=-1E3&&(N.playerState=b);DW(C,N)},du=function(C,b,h){C.X.sendMessage(b,h)},DW=function(C,b){PZ0(C); C.X.setPlayerContextData(gwD(b));pm0(C)},Ut=function(C,b){C.K&&(C.K.removeUpdateListener(C.V),C.K.removeMediaListener(C.J),C.Qv(null)); C.K=b;C.K&&(hf("Setting cast session: "+C.K.sessionId),C.K.addUpdateListener(C.V),C.K.addMediaListener(C.J),C.K.media.length&&C.Qv(C.K.media[0]))},c0e=function(C){var b=C.j.media,h=C.j.customData; if(b&&h){var N=K7(C);b.contentId!=N.videoId&&hf("Cast changing video to: "+b.contentId);N.videoId=b.contentId;N.playerState=h.playerState;um(N,C.j.getEstimatedTime());DW(C,N)}else hf("No cast media video. Ignoring state update.")},W0=function(C,b,h){return(0,g.Il)(function(N){this.Q8("Failed to "+b+" with cast v2 channel. Error code: "+N.code); N.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.Q8("Retrying "+b+" using MDx browser channel."),du(this,b,h))},C)},tf=function(C,b,h,N){N=N===void 0?!1:N; g.jv.call(this);var p=this;this.W=NaN;this.q2=!1;this.V=this.L=this.N2=this.nO=NaN;this.KO=[];this.G=this.J=this.X=this.j=this.K=null;this.Df=C;this.Qz=N;this.KO.push(g.Hj(window,"beforeunload",function(){p.Fm(2)})); this.N=[];this.j=new im;this.rO=b.id;this.sX=b.idType;this.K=twE(this.Df,h,this.K3,this.sX=="shortLived",this.rO);this.K.listen("channelOpened",function(){koD(p)}); this.K.listen("channelClosed",function(){Et("Channel closed");isNaN(p.W)?Yf(!0):Yf();p.dispose()}); this.K.listen("channelError",function(P){Yf();isNaN(p.sD())?(P==1&&p.sX=="shortLived"&&p.publish("browserChannelAuthError",P),Et("Channel error: "+P+" without reconnection"),p.dispose()):(p.q2=!0,Et("Channel error: "+P+" with reconnection in "+p.sD()+" ms"),n7(p,2))}); this.K.listen("channelMessage",function(P){eT0(p,P)}); this.K.t$(b.token);this.subscribe("remoteQueueChange",function(){var P=p.j.videoId;g.UJ()&&g.uU("yt-remote-session-video-id",P)})},LbE=function(C){return g.Te(C.N,function(b){return b.type=="LOUNGE_SCREEN"})},Et=function(C){bm("conn",C)},n7=function(C,b){C.publish("proxyStateChange",b)},ZQd=function(C){C.W=g.of(function(){Et("Connecting timeout"); C.Fm(1)},2E4)},YpE=function(C){g.Gu(C.W); C.W=NaN},aYC=function(C){g.Gu(C.nO); C.nO=NaN},owj=function(C){lY0(C); C.N2=g.of(function(){TT(C,"getNowPlaying")},2E4)},lY0=function(C){g.Gu(C.N2); C.N2=NaN},koD=function(C){Et("Channel opened"); C.q2&&(C.q2=!1,aYC(C),C.nO=g.of(function(){Et("Timing out waiting for a screen.");C.Fm(1)},15E3))},GoE=function(C,b){var h=null; if(b){var N=LbE(C);N&&(h={clientName:N.clientName,deviceMake:N.brand,deviceModel:N.model,osVersion:N.osVersion})}g.sl("yt.mdx.remote.remoteClient_",h);b&&(YpE(C),aYC(C));h=C.K.Op()&&isNaN(C.W);b==h?b&&(n7(C,1),TT(C,"getSubtitlesTrack")):b?(C.hg()&&C.j.reset(),n7(C,1),TT(C,"getNowPlaying"),Fbe(C)):C.Fm(1)},Spj=function(C,b){var h=b.params.videoId; delete b.params.videoId;h==C.j.videoId&&(g.A8(b.params)?C.j.trackData=null:C.j.trackData=b.params,C.publish("remotePlayerChange"))},$PD=function(C,b,h){var N=b.params.videoId||b.params.video_id,p=parseInt(b.params.currentIndex,10); C.j.listId=b.params.listId||C.j.listId;QP(C.j,N,p);C.publish("remoteQueueChange",h)},HQE=function(C,b){b.params=b.params||{}; $PD(C,b,"NOW_PLAYING_MAY_CHANGE");zTj(C,b);C.publish("autoplayDismissed")},zTj=function(C,b){var h=parseInt(b.params.currentTime||b.params.current_time,10); um(C.j,isNaN(h)?0:h);h=parseInt(b.params.state,10);h=isNaN(h)?-1:h;h==-1&&C.j.playerState==-1E3&&(h=-1E3);C.j.playerState=h;h=Number(b.params.loadedTime);C.j.L=isNaN(h)?0:h;C.j.zI(Number(b.params.duration));h=C.j;var N=Number(b.params.liveIngestionTime);h.N=N;h.K=isNaN(N)?!1:!0;h=C.j;N=Number(b.params.seekableStartTime);b=Number(b.params.seekableEndTime);h.X=isNaN(N)?0:N;h.j=isNaN(b)?0:b;C.j.playerState==1?owj(C):lY0(C);C.publish("remotePlayerChange")},Vie=function(C,b){if(C.j.playerState!=-1E3){var h= 1085; switch(parseInt(b.params.adState,10)){case 1:h=1081;break;case 2:h=1084;break;case 0:h=1083}C.j.playerState=h;b=parseInt(b.params.currentTime,10);um(C.j,isNaN(b)?0:b);C.publish("remotePlayerChange")}},Mip=function(C,b){var h=b.params.muted=="true"; C.j.volume=parseInt(b.params.volume,10);C.j.muted=h;C.publish("remotePlayerChange")},qpd=function(C,b){C.J=b.params.videoId; C.publish("nowAutoplaying",parseInt(b.params.timeout,10))},mPI=function(C,b){C.J=b.params.videoId||null; C.publish("autoplayUpNext",C.J)},fY0=function(C,b){C.G=b.params.autoplayMode; C.publish("autoplayModeChange",C.G);C.G=="DISABLED"&&C.publish("autoplayDismissed")},A0j=function(C,b){var h=b.params.hasNext=="true"; C.j.xC=b.params.hasPrevious=="true";C.j.iN=h;C.publish("previousNextChange")},eT0=function(C,b){b=b.message; b.params?Et("Received: action="+b.action+", params="+g.fb(b.params)):Et("Received: action="+b.action+" {}");switch(b.action){case "loungeStatus":b=bD(b.params.devices);C.N=g.M_(b,function(N){return new Pd(N)}); b=!!g.Te(C.N,function(N){return N.type=="LOUNGE_SCREEN"}); GoE(C,b);b=C.FL("mlm");C.publish("multiStateLoopEnabled",b);break;case "loungeScreenDisconnected":g.Cs(C.N,function(N){return N.type=="LOUNGE_SCREEN"}); GoE(C,!1);break;case "remoteConnected":var h=new Pd(bD(b.params.device));g.Te(C.N,function(N){return N.y8(h)})||RPo(C.N,h); break;case "remoteDisconnected":h=new Pd(bD(b.params.device));g.Cs(C.N,function(N){return N.y8(h)}); break;case "gracefulDisconnect":break;case "playlistModified":$PD(C,b,"QUEUE_MODIFIED");break;case "nowPlaying":HQE(C,b);break;case "onStateChange":zTj(C,b);break;case "onAdStateChange":Vie(C,b);break;case "onVolumeChanged":Mip(C,b);break;case "onSubtitlesTrackChanged":Spj(C,b);break;case "nowAutoplaying":qpd(C,b);break;case "autoplayDismissed":C.publish("autoplayDismissed");break;case "autoplayUpNext":mPI(C,b);break;case "onAutoplayModeChanged":fY0(C,b);break;case "onHasPreviousNextChanged":A0j(C, b);break;case "requestAssistedSignIn":C.publish("assistedSignInRequested",b.params.authCode);break;case "onLoopModeChanged":C.publish("loopModeChange",b.params.loopMode);break;default:Et("Unrecognized action: "+b.action)}},Fbe=function(C){g.Gu(C.V); C.V=g.of(function(){C.Fm(1)},864E5)},TT=function(C,b,h){h?Et("Sending: action="+b+", params="+g.fb(h)):Et("Sending: action="+b); C.K.sendMessage(b,h)},y00=function(C){P0.call(this,"ScreenServiceProxy"); this.M9=C;this.j=[];this.j.push(this.M9.$_s("screenChange",(0,g.Il)(this.GH,this)));this.j.push(this.M9.$_s("onlineScreenChange",(0,g.Il)(this.e8X,this)))},RT0=function(C,b){UJp(); if(!aU||!aU.get("yt-remote-disable-remote-module-for-dev")){b=g.Tf("MDX_CONFIG")||b;fOI();iep();B0||(B0=new xf(b?b.loungeApiHost:void 0),XCh()&&(B0.j="/api/loungedev"));Ir||(Ir=g.v1("yt.mdx.remote.deferredProxies_")||[],g.sl("yt.mdx.remote.deferredProxies_",Ir));r0I();var h=xP();if(!h){var N=new L7(B0,b?b.disableAutomaticScreenCache||!1:!1);g.sl("yt.mdx.remote.screenService_",N);h=xP();var p={};b&&(p={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.sl("yt.mdx.remote.enableConnectWithInitialState_",b?b.enableConnectWithInitialState||!1:!1);TmD(C,N,function(P){P?wu()&&ru(wu(),"YouTube TV"):N.subscribe("onlineScreenChange",function(){lD("yt-remote-receiver-availability-change")})},p)}b&&!g.v1("yt.mdx.remote.initialized_")&&(g.sl("yt.mdx.remote.initialized_",!0),Cm("Initializing: "+g.fb(b)), b9.push(g.Pl("yt-remote-cast2-api-ready",function(){lD("yt-remote-api-ready")})),b9.push(g.Pl("yt-remote-cast2-availability-change",function(){lD("yt-remote-receiver-availability-change")})),b9.push(g.Pl("yt-remote-cast2-receiver-selected",function(){ht(null); lD("yt-remote-auto-connect","cast-selector-receiver")})),b9.push(g.Pl("yt-remote-cast2-receiver-resumed",function(){lD("yt-remote-receiver-resumed","cast-selector-receiver")})),b9.push(g.Pl("yt-remote-cast2-session-change",iQI)),b9.push(g.Pl("yt-remote-connection-change",function(P){P?ru(wu(),"YouTube TV"):Nt()||(ru(null,null),wGU())})),b9.push(g.Pl("yt-remote-cast2-session-failed",function(){lD("yt-remote-connection-failed")})),C=J0d(),b.isAuto&&(C.id+="#dial"),p=b.capabilities||[],g.zu("desktop_enable_autoplay")&& p.push("atp"),p.length>0&&(C.capabilities=p),C.name=b.device,C.app=b.app,(b=b.theme)&&(C.theme=b),Cm(" -- with channel params: "+g.fb(C)),C?(g.uU("yt-remote-session-app",C.app),g.uU("yt-remote-session-name",C.name)):(g.QJ("yt-remote-session-app"),g.QJ("yt-remote-session-name")),g.sl("yt.mdx.remote.channelParams_",C),h.start(),wu()||uPD())}},Qte=function(){var C=xP().M9.$_gos(); var b=gS();b&&pm()&&(mJe(C,b)||C.push(b));return qBo(C)},Xmd=function(){var C=UP$(); !C&&Af()&&x$$()&&(C={key:"cast-selector-receiver",name:x$$()});return C},UP$=function(){var C=Qte(),b=gS(); b||(b=Nt());return g.Te(C,function(h){return b&&cd(b,h.key)?!0:!1})},gS=function(){var C=wu(); if(!C)return null;var b=xP().tC();return eC(b,C)},iQI=function(C){Cm("remote.onCastSessionChange_: "+kf(C)); if(C){var b=gS();if(b&&b.id==C.id){if(ru(b.id,"YouTube TV"),C.idType=="shortLived"&&(C=C.token))P8&&(P8.token=C),(b=pm())&&b.t$(C)}else b&&j2(),c8(C,1)}else pm()&&j2()},j2=function(){yP()?f7().stopSession():mL("stopSession called before API ready."); var C=pm();C&&(C.disconnect(1),KbE(null))},stC=function(){var C=pm(); return!!C&&C.getProxyState()!=3},Cm=function(C){bm("remote",C)},xP=function(){if(!OQd){var C=g.v1("yt.mdx.remote.screenService_"); OQd=C?new y00(C):null}return OQd},wu=function(){return g.v1("yt.mdx.remote.currentScreenId_")},vwE=function(C){g.sl("yt.mdx.remote.currentScreenId_",C)},DPU=function(){return g.v1("yt.mdx.remote.connectData_")},ht=function(C){g.sl("yt.mdx.remote.connectData_",C)},pm=function(){return g.v1("yt.mdx.remote.connection_")},KbE=function(C){var b=pm(); ht(null);C||vwE("");g.sl("yt.mdx.remote.connection_",C);Ir&&(g.l7(Ir,function(h){h(C)}),Ir.length=0); b&&!C?lD("yt-remote-connection-change",!1):!b&&C&&lD("yt-remote-connection-change",!0)},Nt=function(){var C=g.UJ(); if(!C)return null;var b=xP();if(!b)return null;b=b.tC();return eC(b,C)},c8=function(C,b){wu(); gS()&&gS();if(kK)P8=C;else{vwE(C.id);var h=g.v1("yt.mdx.remote.enableConnectWithInitialState_")||!1;C=new tf(B0,C,J0d(),h);C.connect(b,DPU());C.subscribe("beforeDisconnect",function(N){lD("yt-remote-before-disconnect",N)}); C.subscribe("beforeDispose",function(){pm()&&(pm(),KbE(null))}); C.subscribe("browserChannelAuthError",function(){var N=gS();N&&N.idType=="shortLived"&&(yP()?f7().handleBrowserChannelAuthError():mL("refreshLoungeToken called before API ready."))}); KbE(C)}},uPD=function(){var C=Nt(); C?(Cm("Resume connection to: "+kf(C)),c8(C,0)):(Yf(),wGU(),Cm("Skipping connecting because no session screen found."))},r0I=function(){var C=J0d(); if(g.A8(C)){C=Ze();var b=g.R1("yt-remote-session-name")||"",h=g.R1("yt-remote-session-app")||"";C={device:"REMOTE_CONTROL",id:C,name:b,app:h,mdxVersion:3};C.authuser=String(g.Tf("SESSION_INDEX","0"));(b=g.Tf("DELEGATED_SESSION_ID"))&&(C.pageId=String(b));g.sl("yt.mdx.remote.channelParams_",C)}},J0d=function(){return g.v1("yt.mdx.remote.channelParams_")||{}},Ewe=function(C,b,h){g.O.call(this); var N=this;this.module=C;this.Z=b;this.GE=h;this.events=new g.Jm(this);this.X=!1;this.G=new g.xe(64);this.j=new g.wl(this.DX,500,this);this.K=new g.wl(this.HS,1E3,this);this.J=new Gw(this.zro,0,this);this.N={};this.L=new g.wl(this.G3,1E3,this);this.W=new SC(this.seekTo,1E3,this);this.V=this.events.S(this.Z,"onVolumeChange",function(p){dPC(N,p)}); g.D(this,this.events);this.events.S(b,"onCaptionsTrackListChanged",this.bjO);this.events.S(b,"captionschanged",this.vr6);this.events.S(b,"captionssettingschanged",this.tB);this.events.S(b,"videoplayerreset",this.Y8);this.events.S(b,"mdxautoplaycancel",function(){N.GE.i8()}); b.D("enable_mdx_video_play_directly")&&this.events.S(b,"videodatachange",function(){WbE(N.module)||e2(N)||Lm(N,0)}); C=this.GE;C.HE();C.subscribe("proxyStateChange",this.Mm,this);C.subscribe("remotePlayerChange",this.bI,this);C.subscribe("remoteQueueChange",this.Y8,this);C.subscribe("previousNextChange",this.Ju,this);C.subscribe("nowAutoplaying",this.G6,this);C.subscribe("autoplayDismissed",this.Iy,this);g.D(this,this.j);g.D(this,this.K);g.D(this,this.J);g.D(this,this.L);g.D(this,this.W);this.tB();this.Y8();this.bI()},dPC=function(C,b){if(e2(C)){C.GE.unsubscribe("remotePlayerChange",C.bI,C); var h=Math.round(b.volume);b=!!b.muted;var N=K7(C.GE);if(h!==N.volume||b!==N.muted)C.GE.setVolume(h,b),C.L.start();C.GE.subscribe("remotePlayerChange",C.bI,C)}},nwD=function(C){C.cW(0); C.j.stop();C.WW(new g.xe(64))},tih=function(C,b){if(e2(C)&&!C.X){var h=null; b&&(h={style:C.Z.getSubtitlesUserSettings()},Object.assign(h,b));C.GE.jN(C.Z.getVideoData(1).videoId,h);C.N=K7(C.GE).trackData}},Lm=function(C,b){var h=C.Z.getPlaylist(); if(h==null?0:h.listId){var N=h.index;var p=h.listId.toString()}h=C.Z.getVideoData(1);C.GE.playVideo(h.videoId,b,N,p,h.playerParams,h.sX,uYC(h));C.WW(new g.xe(1))},Tfd=function(C,b){if(b){var h=C.Z.getOption("captions","tracklist",{rQ:1}); h&&h.length?(C.Z.setOption("captions","track",b),C.X=!1):(C.Z.loadModule("captions"),C.X=!0)}else C.Z.setOption("captions","track",{})},e2=function(C){return K7(C.GE).videoId===C.Z.getVideoData(1).videoId},Z2=function(){g.n.call(this,{B:"div", C:"ytp-mdx-popup-dialog",T:{role:"dialog"},U:[{B:"div",C:"ytp-mdx-popup-dialog-inner-content",U:[{B:"div",C:"ytp-mdx-popup-title",BE:"You're signed out"},{B:"div",C:"ytp-mdx-popup-description",BE:"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."},{B:"div",C:"ytp-mdx-privacy-popup-buttons",U:[{B:"button",J4:["ytp-button","ytp-mdx-privacy-popup-cancel"],BE:"Cancel"},{B:"button",J4:["ytp-button", "ytp-mdx-privacy-popup-confirm"],BE:"Confirm"}]}]}]});this.j=new g.CF(this,250);this.cancelButton=this.dO("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.dO("ytp-mdx-privacy-popup-confirm");g.D(this,this.j);this.S(this.cancelButton,"click",this.K);this.S(this.confirmButton,"click",this.N)},YK=function(C){g.n.call(this,{B:"div", C:"ytp-remote",U:[{B:"div",C:"ytp-remote-display-status",U:[{B:"div",C:"ytp-remote-display-status-icon",U:[g.lQK()]},{B:"div",C:"ytp-remote-display-status-text",BE:"{{statustext}}"}]}]});this.api=C;this.j=new g.CF(this,250);g.D(this,this.j);this.S(C,"presentingplayerstatechange",this.onStateChange);this.TE(C.getPlayerStateObject())},a5=function(C,b){g.tn.call(this,"Play on",1,C,b); this.Z=C;this.ll={};this.S(C,"onMdxReceiversChange",this.X);this.S(C,"presentingplayerstatechange",this.X);this.X()},BfI=function(C){g.qK.call(this,C); this.rf={key:Msd(),name:"This computer"};this.d8=null;this.subscriptions=[];this.A7=this.GE=null;this.ll=[this.rf];this.GS=this.rf;this.TM=new g.xe(64);this.v3=0;this.Gx=-1;this.I5=!1;this.AD=this.SK=null;if(!g.mG(this.player.Y())&&!g.X_(this.player.Y())){C=this.player;var b=g.PK(C);b&&(b=b.r8())&&(b=new a5(C,b),g.D(this,b));b=new YK(C);g.D(this,b);g.MC(C,b.element,4);this.SK=new Z2;g.D(this,this.SK);g.MC(C,this.SK.element,4);this.I5=!!Nt()}},l9=function(C){C.AD&&(C.player.removeEventListener("presentingplayerstatechange", C.AD),C.AD=null)},IYo=function(C,b,h){C.TM=h; C.player.publish("presentingplayerstatechange",new g.ZK(h,b))},o5=function(C,b){if(b.key!==C.GS.key)if(b.key===C.rf.key)j2(); else if(WbE(C)&&xPI(C),C.GS=b,!C.player.Y().D("disable_mdx_connection_in_mdx_module_for_music_web")||!g.X_(C.player.Y())){var h=C.player.getPlaylistId();var N=C.player.getVideoData(1);var p=N.videoId;if(!h&&!p||(C.player.getAppState()===2||C.player.getAppState()===1)&&C.player.Y().D("should_clear_video_data_on_player_cued_unstarted"))N=null;else{var P=C.player.getPlaylist();if(P){var c=[];for(var e=0;e2*this.size&&p5(this),!0):!1}; g.k.get=function(C,b){return Nz(this.K,C)?this.K[C]:b}; g.k.set=function(C,b){Nz(this.K,C)||(this.size+=1,this.j.push(C),this.BA++);this.K[C]=b}; g.k.forEach=function(C,b){for(var h=this.Yo(),N=0;N=N.j.length)return g.kN;var P=N.j[b++];return g.pT(C?P:N.K[P])}; return p}; var GfD={BiO:"atp",tJ6:"ska",voz:"que",qVE:"mus",pM$:"sus",LLh:"dsp",oo$:"seq",N8E:"mic",KLE:"dpa",WuE:"cds",xLO:"mlm",vsz:"dsdtr",DLi:"ntb",Ed4:"vsp",sSX:"scn",K72:"rpe",OfO:"dcn",A6z:"dcp",i2o:"pas",ITO:"drq",M9i:"opf",WLO:"els",q2f:"isg",HSf:"svq",dL4:"mvp",qe2:"ads",wT$:"iat"},SBI={odE:"u",y6E:"cl",iIO:"k",BHo:"i",FuD:"cr",WCf:"m",fTO:"g",eW:"up"};Pd.prototype.y8=function(C){return C?this.id==C.id:!1}; var rhE="",aU=null;K7p.prototype.flush=function(C,b){C=C===void 0?[]:C;b=b===void 0?!1:b;if(g.zu("enable_client_streamz_web")){C=g.z(C);for(var h=C.next();!h.done;h=C.next())h=g.YWl(h.value),h={serializedIncrementBatch:g.So(h.j())},g.k1("streamzIncremented",h,{sendIsolatedPayload:b})}}; var oU,ntI=Oep("loadCastFramework")||Oep("loadCastApplicationFramework"),BWj=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.bC(Gw,g.O);g.k=Gw.prototype;g.k.zA=function(C){this.X=arguments;this.j=!1;this.Lj?this.N=g.Cd()+this.Zo:this.Lj=g.Vh(this.G,this.Zo)}; g.k.stop=function(){this.Lj&&(g.KW.clearTimeout(this.Lj),this.Lj=null);this.N=null;this.j=!1;this.X=[]}; g.k.pause=function(){++this.K}; g.k.resume=function(){this.K&&(--this.K,!this.K&&this.j&&(this.j=!1,this.W.apply(null,this.X)))}; g.k.wO=function(){this.stop();Gw.Re.wO.call(this)}; g.k.TA=function(){this.Lj&&(g.KW.clearTimeout(this.Lj),this.Lj=null);this.N?(this.Lj=g.Vh(this.G,this.N-g.Cd()),this.N=null):this.K?this.j=!0:(this.j=!1,this.W.apply(null,this.X))};g.S(SC,g.O);g.k=SC.prototype;g.k.LY=function(C){this.N=arguments;this.Lj||this.K?this.j=!0:xJe(this)}; g.k.stop=function(){this.Lj&&(g.KW.clearTimeout(this.Lj),this.Lj=null,this.j=!1,this.N=null)}; g.k.pause=function(){this.K++}; g.k.resume=function(){this.K--;this.K||!this.j||this.Lj||(this.j=!1,xJe(this))}; g.k.wO=function(){g.O.prototype.wO.call(this);this.stop()};$f.prototype.stringify=function(C){return g.KW.JSON.stringify(C,void 0)}; $f.prototype.parse=function(C){return g.KW.JSON.parse(C,void 0)};g.bC(wCo,g.un);g.bC(CaD,g.un);var bND=null;g.bC(NJo,g.un);g.bC(gGD,g.un);g.bC(pQj,g.un);Mz.prototype.debug=function(){}; Mz.prototype.info=function(){}; Mz.prototype.warning=function(){};var YSe={},ZND={};g.k=qz.prototype;g.k.setTimeout=function(C){this.kh=C}; g.k.O9=function(C){C=C.target;var b=this.CO;b&&g.Bt(C)==3?b.LY():this.f_(C)}; g.k.f_=function(C){try{if(C==this.j)a:{var b=g.Bt(this.j),h=this.j.K,N=this.j.getStatus();if(!(b<3)&&(b!=3||this.j&&(this.K.K||g.xE(this.j)||g.wt(this.j)))){this.Qz||b!=4||h==7||(h==8||N<=0?zw(3):zw(2));oGE(this);var p=this.j.getStatus();this.sI=p;var P=LtE(this);if(this.W=p==200){if(this.G$&&!this.t4){b:{if(this.j){var c=g.Cn(this.j,"X-HTTP-Initial-Response");if(c&&!g.Mp(c)){var e=c;break b}}e=null}if(C=e)this.t4=!0,qSE(this,C);else{this.W=!1;this.G=3;Hd(12);f5(this);AS(this);break a}}if(this.sX){C= !0;for(var L;!this.Qz&&this.J0&&!this.ob&&(this.ob=!0,this.N.A2(this)):(f5(this),AS(this))}else qSE(this,P);b==4&&f5(this);this.W&&!this.Qz&&(b==4?Ft0(this.N,this):(this.W=!1,mH(this)))}else g.R4W(this.j),p==400&&P.indexOf("Unknown SID")> 0?(this.G=3,Hd(12)):(this.G=0,Hd(13)),f5(this),AS(this)}}}catch(Z){}finally{}}; g.k.cancel=function(){this.Qz=!0;f5(this)}; g.k.VN=function(){this.KO=null;var C=Date.now();C-this.zi>=0?(this.rO!=2&&(zw(3),Hd(17)),f5(this),this.G=2,AS(this)):l1I(this,this.zi-C)}; g.k.getLastError=function(){return this.G}; g.k.jj=function(){return this.j};f1h.prototype.cancel=function(){this.N=yKd(this);if(this.K)this.K.cancel(),this.K=null;else if(this.j&&this.j.size!==0){for(var C=g.z(this.j.values()),b=C.next();!b.done;b=C.next())b.value.cancel();this.j.clear()}};g.k=Rde.prototype;g.k.p_=8;g.k.jQ=1;g.k.connect=function(C,b,h,N){Hd(0);this.Yg=C;this.Qz=b||{};h&&N!==void 0&&(this.Qz.OSID=h,this.Qz.OAID=N);this.t4=this.AZ;this.Df=HN$(this,null,this.Yg);JS(this)}; g.k.disconnect=function(){UQp(this);if(this.jQ==3){var C=this.m6++,b=this.Df.clone();g.GS(b,"SID",this.X);g.GS(b,"RID",C);g.GS(b,"TYPE","terminate");Qd(this,b);C=new qz(this,this.X,C);C.rO=2;C.L=wZ(b.clone());b=!1;if(g.KW.navigator&&g.KW.navigator.sendBeacon)try{b=g.KW.navigator.sendBeacon(C.L.toString(),"")}catch(h){}!b&&g.KW.Image&&((new Image).src=C.L,b=!0);b||(C.j=kuC(C.N,null),C.j.send(C.L));C.nO=Date.now();mH(C)}DQE(this)}; g.k.nX=function(){return this.jQ==0}; g.k.getState=function(){return this.jQ}; g.k.tG=function(C){if(this.W)if(this.W=null,this.jQ==1){if(!C){this.m6=Math.floor(Math.random()*1E5);C=this.m6++;var b=new qz(this,"",C),h=this.V;this.sI&&(h?(h=g.iF(h),g.uF(h,this.sI)):h=this.sI);this.J!==null||this.zi||(b.Df=h,h=null);var N;if(this.Vz)a:{for(var p=N=0;p4096){N=p;break a}if(N===4096||p===this.N.length-1){N=p+1;break a}}N= 1E3}else N=1E3;N=sfI(this,b,N);p=this.Df.clone();g.GS(p,"RID",C);g.GS(p,"CVER",22);this.sX&&g.GS(p,"X-HTTP-Session-Id",this.sX);Qd(this,p);h&&(this.zi?N="headers="+g.TC(g.v9_(h))+"&"+N:this.J&&g.Hu(p,this.J,h));zdD(this.K,b);this.LK&&g.GS(p,"TYPE","init");this.Vz?(g.GS(p,"$req",N),g.GS(p,"SID","null"),b.G$=!0,cKE(b,p,null)):cKE(b,p,N);this.jQ=2}}else this.jQ==3&&(C?OND(this,C):this.N.length==0||AKD(this.K)||OND(this))}; g.k.l2=function(){this.L=null;vGD(this);if(this.IV&&!(this.kh||this.j==null||this.HW<=0)){var C=2*this.HW;this.q2=Vd((0,g.Il)(this.I9h,this),C)}}; g.k.I9h=function(){this.q2&&(this.q2=null,this.t4=!1,this.kh=!0,Hd(10),r3(this),vGD(this))}; g.k.A2=function(C){this.j==C&&this.IV&&!this.kh&&(QfU(this),this.kh=!0,Hd(11))}; g.k.AI=function(){this.KO!=null&&(this.KO=null,r3(this),SS0(this),Hd(19))}; g.k.MqD=function(C){C?Hd(2):Hd(1)}; g.k.isActive=function(){return!!this.G&&this.G.isActive(this)}; g.k=WtD.prototype;g.k.Sd=function(){}; g.k.u2=function(){}; g.k.b2=function(){}; g.k.C_=function(){}; g.k.isActive=function(){return!0}; g.k.IP=function(){};g.bC(XM,g.x9);XM.prototype.open=function(){this.j.G=this.N;this.W&&(this.j.rO=!0);this.j.connect(this.G,this.K||void 0)}; XM.prototype.close=function(){this.j.disconnect()}; XM.prototype.send=function(C){var b=this.j;if(typeof C==="string"){var h={};h.__data__=C;C=h}else this.X&&(h={},h.__data__=g.fb(C),C=h);b.N.push(new mQh(b.ge++,C));b.jQ==3&&JS(b)}; XM.prototype.wO=function(){this.j.G=null;delete this.N;this.j.disconnect();delete this.j;XM.Re.wO.call(this)}; g.bC(nGh,wCo);g.bC(tXD,CaD);g.bC(UM,WtD);UM.prototype.Sd=function(){this.j.dispatchEvent("m")}; UM.prototype.u2=function(C){this.j.dispatchEvent(new nGh(C))}; UM.prototype.b2=function(C){this.j.dispatchEvent(new tXD(C))}; UM.prototype.C_=function(){this.j.dispatchEvent("n")};var sM=new g.x9;g.S(I1o,g.un);g.k=vd.prototype;g.k.aJ=null;g.k.IT=!1;g.k.NI=null;g.k.U4=null;g.k.U5=null;g.k.UC=null;g.k.Fp=null;g.k.kI=null;g.k.HA=null;g.k.J6=null;g.k.zd=0;g.k.VT=null;g.k.PV=null;g.k.Dn=null;g.k.k5=-1;g.k.T9=!0;g.k.LP=!1;g.k.k_=0;g.k.Ll=null;var NUD={},hjd={};g.k=vd.prototype;g.k.setTimeout=function(C){this.K=C}; g.k.jY=function(C){C=C.target;var b=this.Ll;b&&g.Bt(C)==3?b.LY():this.YH(C)}; g.k.YH=function(C){try{if(C==this.J6)a:{var b=g.Bt(this.J6),h=this.J6.K,N=this.J6.getStatus();if(g.TA&&!g.GQ("420+")){if(b<4)break a}else if(b<3||b==3&&!g.xE(this.J6))break a;this.LP||b!=4||h==7||(h==8||N<=0?this.j.n6(3):this.j.n6(2));PUo(this);var p=this.J6.getStatus();this.k5=p;var P=g.xE(this.J6);if(this.IT=p==200){b==4&&De(this);if(this.sX){for(C=!0;!this.LP&&this.zd0?(this.Dn=3,OM(13)):(this.Dn=0,OM(14)),De(this),j1o(this)}}catch(e){}finally{}}; g.k.cancel=function(){this.LP=!0;De(this)}; g.k.vG=function(){this.NI=null;var C=Date.now();C-this.U4>=0?(this.UC!=2&&this.j.n6(3),De(this),this.Dn=2,OM(18),j1o(this)):pj$(this,this.U4-C)}; g.k.getLastError=function(){return this.Dn};g.k=LJE.prototype;g.k.TN=null;g.k.dH=null;g.k.Wd=!1;g.k.O4=null;g.k.B5=null;g.k.G2=-1;g.k.Td=null;g.k.Nc=null;g.k.connect=function(C){this.O4=C;C=Wd(this.j,null,this.O4);OM(3);Date.now();var b=this.j.V;b!=null?(this.Td=b[0],(this.Nc=b[1])?(this.B5=1,Zpd(this)):(this.B5=2,YJe(this))):(C5(C,"MODE","init"),this.dH=new vd(this),this.dH.aJ=this.TN,CUI(this.dH,C,!1,null,!0),this.B5=0)}; g.k.po=function(C){if(C)this.B5=2,YJe(this);else{OM(4);var b=this.j;b.pk=b.sY.G2;Tw(b,9)}C&&this.n6(2)}; g.k.zN=function(C){return this.j.zN(C)}; g.k.abort=function(){this.dH&&(this.dH.cancel(),this.dH=null);this.G2=-1}; g.k.nX=function(){return!1}; g.k.mN=function(C,b){this.G2=C.k5;if(this.B5==0)if(b){try{var h=this.K.parse(b)}catch(N){C=this.j;C.pk=this.G2;Tw(C,2);return}this.Td=h[0];this.Nc=h[1]}else C=this.j,C.pk=this.G2,Tw(C,2);else this.B5==2&&(this.Wd?(OM(7),Date.now()):b=="11111"?(OM(6),this.Wd=!0,Date.now(),this.G2=200,this.dH.cancel(),OM(12),EM(this.j,this,!0)):(OM(8),Date.now(),this.Wd=!1))}; g.k.Vi=function(){this.G2=this.dH.k5;if(this.dH.IT)this.B5==0?this.Nc?(this.B5=1,Zpd(this)):(this.B5=2,YJe(this)):this.B5==2&&(this.Wd?(OM(12),EM(this.j,this,!0)):(OM(11),EM(this.j,this,!1)));else{this.B5==0?OM(9):this.B5==2&&OM(10);var C=this.j;this.dH.getLastError();C.pk=this.G2;Tw(C,2)}}; g.k.Pg=function(){return this.j.Pg()}; g.k.isActive=function(){return this.j.isActive()}; g.k.n6=function(C){this.j.n6(C)};g.k=a7d.prototype;g.k.ZZ=null;g.k.zm=null;g.k.c$=null;g.k.o2=null;g.k.IN=null;g.k.Vf=null;g.k.gT=null;g.k.A9=null;g.k.Tm=0;g.k.Ny=0;g.k.Tx=null;g.k.vj=null;g.k.EF=null;g.k.Q$=null;g.k.sY=null;g.k.HI=null;g.k.Bx=-1;g.k.L_=-1;g.k.pk=-1;g.k.wl=0;g.k.Xm=0;g.k.JH=8;g.bC(oad,g.un);g.bC(FJE,g.un);g.k=a7d.prototype;g.k.connect=function(C,b,h,N,p){OM(0);this.IN=b;this.zm=h||{};N&&p!==void 0&&(this.zm.OSID=N,this.zm.OAID=p);this.L?(K5((0,g.Il)(this.Ed,this,C),100),SJ$(this)):this.Ed(C)}; g.k.disconnect=function(){$aD(this);if(this.j==3){var C=this.Tm++,b=this.Vf.clone();g.GS(b,"SID",this.X);g.GS(b,"RID",C);g.GS(b,"TYPE","terminate");tS(this,b);C=new vd(this,this.X,C);C.UC=2;C.Fp=wZ(b.clone());(new Image).src=C.Fp.toString();C.U5=Date.now();bpE(C)}rJe(this)}; g.k.Ed=function(C){this.sY=new LJE(this);this.sY.TN=this.ZZ;this.sY.K=this.G;this.sY.connect(C)}; g.k.nX=function(){return this.j==0}; g.k.getState=function(){return this.j}; g.k.Uv=function(C){this.vj=null;qJI(this,C)}; g.k.kH=function(){this.EF=null;this.o2=new vd(this,this.X,"rpc",this.J);this.o2.aJ=this.ZZ;this.o2.k_=0;var C=this.gT.clone();g.GS(C,"RID","rpc");g.GS(C,"SID",this.X);g.GS(C,"CI",this.HI?"0":"1");g.GS(C,"AID",this.Bx);tS(this,C);g.GS(C,"TYPE","xmlhttp");CUI(this.o2,C,!0,this.A9,!1)}; g.k.mN=function(C,b){if(this.j!=0&&(this.o2==C||this.c$==C))if(this.pk=C.k5,this.c$==C&&this.j==3)if(this.JH>7){try{var h=this.G.parse(b)}catch(N){h=null}if(Array.isArray(h)&&h.length==3)if(C=h,C[0]==0)a:{if(!this.EF){if(this.o2)if(this.o2.U5+3E30)){if(N=b==1)this.c$||this.vj||this.j==1||this.wl>=2?N=!1:(this.vj=K5((0,g.Il)(this.Uv,this,C),f7C(this,this.wl)),this.wl++,N=!0);N=!(N||b==2&&AJo(this))}if(N)switch(h){case 1:Tw(this, 5);break;case 4:Tw(this,10);break;case 3:Tw(this,6);break;case 7:Tw(this,12);break;default:Tw(this,2)}}}; g.k.KD=function(C){if(!g.Id(arguments,this.j))throw Error("Unexpected channel state: "+this.j);}; g.k.yLf=function(C){C?OM(2):(OM(1),yJh(this,8))}; g.k.zN=function(C){if(C)throw Error("Can't create secondary domain capable XhrIo object.");C=new g.nb;C.J=!1;return C}; g.k.isActive=function(){return!!this.Tx&&this.Tx.isActive(this)}; g.k.n6=function(C){var b=sM;b.dispatchEvent(new FJE(b,C))}; g.k.Pg=function(){return!1}; g.k=ipD.prototype;g.k.T8=function(){}; g.k.z8=function(){}; g.k.Pf=function(){}; g.k.vX=function(){}; g.k.V1=function(){return{}}; g.k.isActive=function(){return!0};g.k=JJU.prototype;g.k.enqueue=function(C){this.K.push(C)}; g.k.isEmpty=function(){return this.j.length===0&&this.K.length===0}; g.k.clear=function(){this.j=[];this.K=[]}; g.k.contains=function(C){return g.Id(this.j,C)||g.Id(this.K,C)}; g.k.remove=function(C){var b=this.j;var h=(0,g.rtV)(b,C);h>=0?(g.xI(b,h),b=!0):b=!1;return b||g.wD(this.K,C)}; g.k.hj=function(){for(var C=[],b=this.j.length-1;b>=0;--b)C.push(this.j[b]);b=this.K.length;for(var h=0;h=wmD.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(C=wmD[this.K],this.Lj=g.of((0,g.Il)(this.nV,this),C),this.K++):this.publish("pairingFailed",Error("Server error "+C.status))}; g.k.RP=function(){this.j=null;this.publish("pairingFailed",Error("Server not responding"))}; var wmD=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.bC(c0,P0);g.k=c0.prototype;g.k.start=function(){jG(this)&&this.publish("screenChange");!g.R1("yt-remote-lounge-token-expiration")&&PfI(this);g.Gu(this.j);this.j=g.of((0,g.Il)(this.start,this),1E4)}; g.k.add=function(C,b){jG(this);hOd(this,C);kP(this,!1);this.publish("screenChange");b(C);C.token||PfI(this)}; g.k.remove=function(C,b){var h=jG(this);g1U(this,C)&&(kP(this,!1),h=!0);b(C);h&&this.publish("screenChange")}; g.k.D3=function(C,b,h,N){var p=jG(this),P=this.get(C.id);P?(P.name!=b&&(P.name=b,kP(this,!1),p=!0),h(C)):N(Error("no such local screen."));p&&this.publish("screenChange")}; g.k.wO=function(){g.Gu(this.j);c0.Re.wO.call(this)}; g.k.NOh=function(C){jG(this);var b=this.screens.length;C=C&&C.screens||[];for(var h=C.length,N=0;N20)break a;e=b(P,c)}P=e}p.name=P}h(ZW(this,p))},this), onError:(0,g.Il)(function(p){N(Error("pairing request failed: "+p.status))},this), onTimeout:(0,g.Il)(function(){N(Error("pairing request timed out."))},this)})}; g.k.wO=function(){g.kI(this.K);g.kI(this.j);L7.Re.wO.call(this)}; g.k.W6O=function(){GnE(this);this.publish("screenChange");this.j.update()}; L7.prototype.dispose=L7.prototype.dispose;g.bC(YP,g.jv);g.k=YP.prototype;g.k.zn=function(C){this.HE()||(C&&(lm(this,""+C),this.publish("sessionFailed")),this.j=null,this.publish("sessionScreen",null))}; g.k.info=function(C){bm(this.sX,C)}; g.k.IU=function(){return null}; g.k.zD=function(C){var b=this.K;C?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(C,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,(0,g.Il)(function(){this.info("Updated receiver status for "+b.friendlyName+": "+C)},this),(0,g.Il)(function(){lm(this,"Failed to update receiver status for: "+b.friendlyName)},this))}; g.k.wO=function(){this.zD("");YP.Re.wO.call(this)};g.S(or,YP);g.k=or.prototype;g.k.UL=function(C){if(this.N){if(this.N==C)return;lm(this,"Overriding cast session with new session object");rie(this);this.nO=!1;this.V="unknown";this.N.removeUpdateListener(this.N2);this.N.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.q2)}this.N=C;this.N.addUpdateListener(this.N2);this.N.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.q2);q1D(this,"getMdxSessionStatus")}; g.k.zp=function(C){this.info("launchWithParams no-op for Cast: "+g.fb(C))}; g.k.stop=function(){this.N?this.N.stop((0,g.Il)(function(){this.zn()},this),(0,g.Il)(function(){this.zn(Error("Failed to stop receiver app."))},this)):this.zn(Error("Stopping cast device without session."))}; g.k.zD=function(){}; g.k.wO=function(){this.info("disposeInternal");rie(this);this.N&&(this.N.removeUpdateListener(this.N2),this.N.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.q2));this.N=null;YP.prototype.wO.call(this)}; g.k.Dzf=function(C,b){if(!this.HE())if(b)if(b=bD(b),g.tl(b))switch(C=""+b.type,b=b.data||{},this.info("onYoutubeMessage_: "+C+" "+g.fb(b)),C){case "mdxSessionStatus":HBE(this,b);break;case "loungeToken":m$h(this,b);break;default:lm(this,"Unknown youtube message: "+C)}else lm(this,"Unable to parse message.");else lm(this,"No data in message.")}; g.k.YG=function(C,b,h,N){g.Gu(this.L);this.L=0;lQ0(this.X,this.K.label,C,this.K.friendlyName,(0,g.Il)(function(p){p?b(p):N>=0?(lm(this,"Screen "+C+" appears to be offline. "+N+" retries left."),this.L=g.of((0,g.Il)(this.YG,this,C,b,h,N-1),300)):h(Error("Unable to fetch screen."))},this),h)}; g.k.IU=function(){return this.N}; g.k.dw=function(C){this.HE()||C||(lm(this,"Cast session died."),this.zn())};g.S(Fv,YP);g.k=Fv.prototype;g.k.UL=function(C){this.N=C;this.N.addUpdateListener(this.Qz)}; g.k.zp=function(C){this.Df=C;this.KO()}; g.k.stop=function(){KKd(this);this.N?this.N.stop((0,g.Il)(this.zn,this,null),(0,g.Il)(this.zn,this,"Failed to stop DIAL device.")):this.zn()}; g.k.wO=function(){KKd(this);this.N&&this.N.removeUpdateListener(this.Qz);this.N=null;YP.prototype.wO.call(this)}; g.k.qy=function(C){this.HE()||C||(lm(this,"DIAL session died."),this.G(),this.G=function(){},this.zn())};g.S($P,YP);$P.prototype.stop=function(){this.zn()}; $P.prototype.UL=function(){}; $P.prototype.zp=function(){g.Gu(this.N);this.N=NaN;var C=eC(this.X.tC(),this.K.label);C?ar(this,C):this.zn(Error("No such screen"))}; $P.prototype.wO=function(){g.Gu(this.N);this.N=NaN;YP.prototype.wO.call(this)};g.S(zT,g.jv);g.k=zT.prototype; g.k.init=function(C,b){chrome.cast.timeout.requestSession=3E4;var h=new chrome.cast.SessionRequest(this.L,[chrome.cast.Capability.AUDIO_OUT]);g.zu("desktop_enable_cast_connect")&&(h.androidReceiverCompatible=!0);this.V||(h.dialRequest=new chrome.cast.DialRequest("YouTube"));var N=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;C=C||this.W?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var p=(0,g.Il)(this.Dsz,this);h=new chrome.cast.ApiConfig(h,(0,g.Il)(this.fM, this),p,N,C);h.customDialLaunchCallback=(0,g.Il)(this.WE2,this);chrome.cast.initialize(h,(0,g.Il)(function(){this.HE()||(chrome.cast.addReceiverActionListener(this.G),xao(),this.K.subscribe("onlineScreenChange",(0,g.Il)(this.vN,this)),this.N=v1h(this),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.Il)(function(P){this.Q8("Failed to set initial custom receivers: "+g.fb(P))},this)),this.publish("yt-remote-cast2-availability-change",VP(this)),b(!0))},this),(0,g.Il)(function(P){this.Q8("Failed to initialize API: "+ g.fb(P)); b(!1)},this))}; g.k.YRX=function(C,b){H0("Setting connected screen ID: "+C+" -> "+b);if(this.j){var h=this.j.j;if(!C||h&&h.id!=C)H0("Unsetting old screen status: "+this.j.K.friendlyName),Mh(this,null)}if(C&&b){if(!this.j){C=eC(this.K.tC(),C);if(!C){H0("setConnectedScreenStatus: Unknown screen.");return}if(C.idType=="shortLived"){H0("setConnectedScreenStatus: Screen with id type to be short lived.");return}h=sRD(this,C);h||(H0("setConnectedScreenStatus: Connected receiver not custom..."),h=new chrome.cast.Receiver(C.uuid? C.uuid:C.id,C.name),h.receiverType=chrome.cast.ReceiverType.CUSTOM,this.N.push(h),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.Il)(function(N){this.Q8("Failed to set initial custom receivers: "+g.fb(N))},this))); H0("setConnectedScreenStatus: new active receiver: "+h.friendlyName);Mh(this,new $P(this.K,h),!0)}this.j.zD(b)}else H0("setConnectedScreenStatus: no screen.")}; g.k.L56=function(C){this.HE()?this.Q8("Setting connection data on disposed cast v2"):this.j?this.j.zp(C):this.Q8("Setting connection data without a session")}; g.k.sK=function(){this.HE()?this.Q8("Stopping session on disposed cast v2"):this.j?(this.j.stop(),Mh(this,null)):H0("Stopping non-existing session")}; g.k.requestSession=function(){chrome.cast.requestSession((0,g.Il)(this.fM,this),(0,g.Il)(this.kMD,this))}; g.k.wO=function(){this.K.unsubscribe("onlineScreenChange",(0,g.Il)(this.vN,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.G);var C=TUD,b=g.v1("yt.mdx.remote.debug.handlers_");g.wD(b||[],C);g.kI(this.j);g.jv.prototype.wO.call(this)}; g.k.Q8=function(C){bm("Controller",C)}; g.k.lm=function(C,b){this.j==C&&(b||Mh(this,null),this.publish("yt-remote-cast2-session-change",b))}; g.k.GMO=function(C,b){if(!this.HE())if(C)switch(C.friendlyName=chrome.cast.unescape(C.friendlyName),H0("onReceiverAction_ "+C.label+" / "+C.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.j)if(this.j.K.label!=C.label)H0("onReceiverAction_: Stopping active receiver: "+this.j.K.friendlyName),this.j.stop();else{H0("onReceiverAction_: Casting to active receiver.");this.j.j&&this.publish("yt-remote-cast2-session-change",this.j.j);break}switch(C.receiverType){case chrome.cast.ReceiverType.CUSTOM:Mh(this, new $P(this.K,C));break;case chrome.cast.ReceiverType.DIAL:Mh(this,new Fv(this.K,C,this.X,this.config_));break;case chrome.cast.ReceiverType.CAST:Mh(this,new or(this.K,C,this.config_));break;default:this.Q8("Unknown receiver type: "+C.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.j&&this.j.K.label==C.label?this.j.stop():this.Q8("Stopping receiver w/o session: "+C.friendlyName)}else this.Q8("onReceiverAction_ called without receiver.")}; g.k.WE2=function(C){if(this.HE())return Promise.reject(Error("disposed"));var b=C.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.Q8("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var h=this.j?this.j.K:null;if(!h||h.label!=b.label)return this.Q8("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(h&&h.label==b.label&&h.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.j.j)return H0("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.j.j),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.Q8('Changing CAST intent from "'+h.receiverType+'" to "dial" for '+b.friendlyName);Mh(this,new Fv(this.K,b,this.X,this.config_))}b=this.j;b.L=C;b.L.appState==chrome.cast.DialAppState.RUNNING?(C=b.L.extraData||{},h=C.screenId||null,GT(b)&&C.loungeToken?C.loungeTokenRefreshIntervalMs?C=QRE(b,{name:b.K.friendlyName,screenId:C.screenId,loungeToken:C.loungeToken,dialId:b.L.receiver.label, screenIdType:"shortLived"},C.loungeTokenRefreshIntervalMs):(g.xt(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(C)+".")),C=U$D(b,h)):C=U$D(b,h)):C=uyp(b);return C}; g.k.fM=function(C){var b=this;if(!this.HE()&&!this.W){H0("New cast session ID: "+C.sessionId);var h=C.receiver;if(h.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.j)if(h.receiverType==chrome.cast.ReceiverType.CAST)H0("Got resumed cast session before resumed mdx connection."),h.friendlyName=chrome.cast.unescape(h.friendlyName),Mh(this,new or(this.K,h,this.config_),!0);else{this.Q8("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var N=this.j.K,p=eC(this.K.tC(), N.label);p&&cd(p,h.label)&&N.receiverType!=chrome.cast.ReceiverType.CAST&&h.receiverType==chrome.cast.ReceiverType.CAST&&(H0("onSessionEstablished_: manual to cast session change "+h.friendlyName),g.kI(this.j),this.j=new or(this.K,h,this.config_),this.j.subscribe("sessionScreen",(0,g.Il)(this.lm,this,this.j)),this.j.subscribe("sessionFailed",function(){return OBE(b,b.j)}),this.j.zp(null)); this.j.UL(C)}}}; g.k.WG=function(){return this.j?this.j.IU():null}; g.k.kMD=function(C){this.HE()||(this.Q8("Failed to estabilish a session: "+g.fb(C)),C.code!=chrome.cast.ErrorCode.CANCEL&&Mh(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.k.Dsz=function(C){H0("Receiver availability updated: "+C);if(!this.HE()){var b=VP(this);this.J=C==chrome.cast.ReceiverAvailability.AVAILABLE;VP(this)!=b&&this.publish("yt-remote-cast2-availability-change",VP(this))}}; g.k.vN=function(){this.HE()||(this.N=v1h(this),H0("Updating custom receivers: "+g.fb(this.N)),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.Il)(function(){this.Q8("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",VP(this)))}; zT.prototype.setLaunchParams=zT.prototype.L56;zT.prototype.setConnectedScreenStatus=zT.prototype.YRX;zT.prototype.stopSession=zT.prototype.sK;zT.prototype.getCastSession=zT.prototype.WG;zT.prototype.requestSession=zT.prototype.requestSession;zT.prototype.init=zT.prototype.init;zT.prototype.dispose=zT.prototype.dispose;var IQU=[];g.k=im.prototype; g.k.reset=function(C){this.listId="";this.index=-1;this.videoId="";Nfo(this);this.volume=-1;this.muted=!1;C&&(this.index=C.index,this.listId=C.listId,this.videoId=C.videoId,this.playerState=C.playerState,this.volume=C.volume,this.muted=C.muted,this.audioTrackId=C.audioTrackId,this.trackData=C.trackData,this.xC=C.hasPrevious,this.iN=C.hasNext,this.J=C.playerTime,this.W=C.playerTimeAt,this.X=C.seekableStart,this.j=C.seekableEnd,this.G=C.duration,this.L=C.loadedTime,this.N=C.liveIngestionTime,this.K= !isNaN(this.N))}; g.k.isPlaying=function(){return this.playerState==1}; g.k.isBuffering=function(){return this.playerState==3}; g.k.tR=function(){return this.playerState==1081}; g.k.zI=function(C){this.G=isNaN(C)?0:C}; g.k.getDuration=function(){return this.K?this.G+Jf(this):this.G}; g.k.clone=function(){return new im(gwD(this))};g.S(Xv,g.jv);g.k=Xv.prototype;g.k.getState=function(){return this.N}; g.k.SU=function(){return this.X.getReconnectTimeout()}; g.k.Xi=function(){this.X.reconnect()}; g.k.play=function(){Ot(this)?(this.j?this.j.play(null,g.Lb,W0(this,"play")):du(this,"play"),jtp(this,1,Rr(K7(this))),this.publish("remotePlayerChange")):v0(this,this.play)}; g.k.pause=function(){Ot(this)?(this.j?this.j.pause(null,g.Lb,W0(this,"pause")):du(this,"pause"),jtp(this,2,Rr(K7(this))),this.publish("remotePlayerChange")):v0(this,this.pause)}; g.k.seekTo=function(C){if(Ot(this)){if(this.j){var b=K7(this),h=new chrome.cast.media.SeekRequest;h.currentTime=C;b.isPlaying()||b.isBuffering()?h.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:h.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.j.seek(h,g.Lb,W0(this,"seekTo",{newTime:C}))}else du(this,"seekTo",{newTime:C});jtp(this,3,C);this.publish("remotePlayerChange")}else v0(this,g.wo(this.seekTo,C))}; g.k.stop=function(){if(Ot(this)){this.j?this.j.stop(null,g.Lb,W0(this,"stopVideo")):du(this,"stopVideo");var C=K7(this);C.index=-1;C.videoId="";Nfo(C);DW(this,C);this.publish("remotePlayerChange")}else v0(this,this.stop)}; g.k.setVolume=function(C,b){if(Ot(this)){var h=K7(this);if(this.K){if(h.volume!=C){var N=Math.round(C)/100;this.K.setReceiverVolumeLevel(N,(0,g.Il)(function(){hf("set receiver volume: "+N)},this),(0,g.Il)(function(){this.Q8("failed to set receiver volume.")},this))}h.muted!=b&&this.K.setReceiverMuted(b,(0,g.Il)(function(){hf("set receiver muted: "+b)},this),(0,g.Il)(function(){this.Q8("failed to set receiver muted.")},this))}else{var p={volume:C, muted:b};h.volume!=-1&&(p.delta=C-h.volume);du(this,"setVolume",p)}h.muted=b;h.volume=C;DW(this,h)}else v0(this,g.wo(this.setVolume,C,b))}; g.k.jN=function(C,b){if(Ot(this)){var h=K7(this);C={videoId:C};b&&(h.trackData={trackName:b.name,languageCode:b.languageCode,sourceLanguageCode:b.translationLanguage?b.translationLanguage.languageCode:"",languageName:b.languageName,kind:b.kind},C.style=g.fb(b.style),g.uF(C,h.trackData));du(this,"setSubtitlesTrack",C);DW(this,h)}else v0(this,g.wo(this.jN,C,b))}; g.k.setAudioTrack=function(C,b){Ot(this)?(b=b.getLanguageInfo().getId(),du(this,"setAudioTrack",{videoId:C,audioTrackId:b}),C=K7(this),C.audioTrackId=b,DW(this,C)):v0(this,g.wo(this.setAudioTrack,C,b))}; g.k.playVideo=function(C,b,h,N,p,P,c){N=N===void 0?null:N;p=p===void 0?null:p;P=P===void 0?null:P;c=c===void 0?null:c;var e=K7(this),L={videoId:C};h!==void 0&&(L.currentIndex=h);QP(e,C,h||0);b!==void 0&&(um(e,b),L.currentTime=b);N&&(L.listId=N);p&&(L.playerParams=p);P&&(L.clickTrackingParams=P);c&&(L.locationInfo=g.fb(c));du(this,"setPlaylist",L);N||DW(this,e)}; g.k.wN=function(C,b){if(Ot(this)){if(C&&b){var h=K7(this);QP(h,C,b);DW(this,h)}du(this,"previous")}else v0(this,g.wo(this.wN,C,b))}; g.k.nextVideo=function(C,b){if(Ot(this)){if(C&&b){var h=K7(this);QP(h,C,b);DW(this,h)}du(this,"next")}else v0(this,g.wo(this.nextVideo,C,b))}; g.k.BJ=function(){if(Ot(this)){du(this,"clearPlaylist");var C=K7(this);C.reset();DW(this,C);this.publish("remotePlayerChange")}else v0(this,this.BJ)}; g.k.i8=function(){Ot(this)?du(this,"dismissAutoplay"):v0(this,this.i8)}; g.k.dispose=function(){if(this.N!=3){var C=this.N;this.N=3;this.publish("proxyStateChange",C,this.N)}g.jv.prototype.dispose.call(this)}; g.k.wO=function(){PZ0(this);this.X=null;this.G.clear();Ut(this,null);g.jv.prototype.wO.call(this)}; g.k.Af=function(C){if((C!=this.N||C==2)&&this.N!=3&&C!=0){var b=this.N;this.N=C;this.publish("proxyStateChange",b,C);if(C==1)for(;!this.G.isEmpty();)b=C=this.G,b.j.length===0&&(b.j=b.K,b.j.reverse(),b.K=[]),C.j.pop().apply(this);else C==3&&this.dispose()}}; g.k.WkO=function(C,b){this.publish(C,b)}; g.k.Nn4=function(C){if(!C)this.Qv(null),Ut(this,null);else if(this.K.receiver.volume){C=this.K.receiver.volume;var b=K7(this),h=Math.round(100*C.level||0);if(b.volume!=h||b.muted!=C.muted)hf("Cast volume update: "+C.level+(C.muted?" muted":"")),b.volume=h,b.muted=!!C.muted,DW(this,b)}}; g.k.Qv=function(C){hf("Cast media: "+!!C);this.j&&this.j.removeUpdateListener(this.L);if(this.j=C)this.j.addUpdateListener(this.L),c0e(this),this.publish("remotePlayerChange")}; g.k.KEo=function(C){C?(c0e(this),this.publish("remotePlayerChange")):this.Qv(null)}; g.k.CQ=function(){du(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.k.wWz=function(){var C=CZ0();C&&Ut(this,C)}; g.k.Q8=function(C){bm("CP",C)};g.S(tf,g.jv);g.k=tf.prototype; g.k.connect=function(C,b){if(b){var h=b.listId,N=b.videoId,p=b.videoIds,P=b.playerParams,c=b.clickTrackingParams,e=b.index,L={videoId:N},Z=b.currentTime,Y=b.locationInfo;b=b.loopMode;Z!==void 0&&(L.currentTime=Z<=5?0:Z);P&&(L.playerParams=P);Y&&(L.locationInfo=Y);c&&(L.clickTrackingParams=c);h&&(L.listId=h);p&&p.length>0&&(L.videoIds=p.join(","));e!==void 0&&(L.currentIndex=e);this.Qz&&(L.loopMode=b||"LOOP_MODE_OFF");h&&(this.j.listId=h);this.j.videoId=N;this.j.index=e||0;this.j.state=3;um(this.j, Z);this.G="UNSUPPORTED";h=this.Qz?"setInitialState":"setPlaylist";Et("Connecting with "+h+" and params: "+g.fb(L));this.K.connect({method:h,params:g.fb(L)},C,JhD())}else Et("Connecting without params"),this.K.connect({},C,JhD());ZQd(this)}; g.k.t$=function(C){this.K.t$(C)}; g.k.dispose=function(){this.HE()||(g.sl("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),n7(this,3));g.jv.prototype.dispose.call(this)}; g.k.wO=function(){YpE(this);lY0(this);aYC(this);g.Gu(this.L);this.L=NaN;g.Gu(this.V);this.V=NaN;this.X=null;g.VJ(this.KO);this.KO.length=0;this.K.dispose();g.jv.prototype.wO.call(this);this.G=this.J=this.N=this.j=this.K=null}; g.k.FL=function(C){if(!this.N||this.N.length===0)return!1;for(var b=g.z(this.N),h=b.next();!h.done;h=b.next())if(!h.value.capabilities.has(C))return!1;return!0}; g.k.uG=function(){var C=3;this.HE()||(C=0,isNaN(this.sD())?this.K.Op()&&isNaN(this.W)&&(C=1):C=2);return C}; g.k.Fm=function(C){Et("Disconnecting with "+C);g.sl("yt.mdx.remote.remoteClient_",null);YpE(this);this.publish("beforeDisconnect",C);C==1&&Yf();this.K.disconnect(C);this.dispose()}; g.k.fU=function(){var C=this.j;this.X&&(C=this.j.clone(),QP(C,this.X,C.index));return gwD(C)}; g.k.Ppf=function(C){var b=this,h=new im(C);h.videoId&&h.videoId!=this.j.videoId&&(this.X=h.videoId,g.Gu(this.L),this.L=g.of(function(){if(b.X){var p=b.X;b.X=null;b.j.videoId!=p&&TT(b,"getNowPlaying")}},5E3)); var N=[];this.j.listId==h.listId&&this.j.videoId==h.videoId&&this.j.index==h.index||N.push("remoteQueueChange");this.j.playerState==h.playerState&&this.j.volume==h.volume&&this.j.muted==h.muted&&Rr(this.j)==Rr(h)&&g.fb(this.j.trackData)==g.fb(h.trackData)||N.push("remotePlayerChange");this.j.reset(C);g.l7(N,function(p){this.publish(p)},this)}; g.k.hg=function(){var C=this.K.getDeviceId(),b=g.Te(this.N,function(h){return h.type=="REMOTE_CONTROL"&&h.id!=C}); return b?b.id:""}; g.k.sD=function(){return this.K.SU()}; g.k.q3=function(){return this.G||"UNSUPPORTED"}; g.k.Wk=function(){return this.J||""}; g.k.oP=function(){!isNaN(this.sD())&&this.K.Xi()}; g.k.ivf=function(C,b){TT(this,C,b);Fbe(this)}; g.k.K3=function(){var C=g.Xu("SAPISID","")||g.Xu("__Secure-1PAPISID")||"",b=g.Xu("__Secure-3PAPISID","")||"";if(!C&&!b)return"";C=g.So(g.ze(C),2);b=g.So(g.ze(b),2);return g.So(g.ze(","+C+","+b),2)}; tf.prototype.subscribe=tf.prototype.subscribe;tf.prototype.unsubscribeByKey=tf.prototype.v2;tf.prototype.getProxyState=tf.prototype.uG;tf.prototype.disconnect=tf.prototype.Fm;tf.prototype.getPlayerContextData=tf.prototype.fU;tf.prototype.setPlayerContextData=tf.prototype.Ppf;tf.prototype.getOtherConnectedRemoteId=tf.prototype.hg;tf.prototype.getReconnectTimeout=tf.prototype.sD;tf.prototype.getAutoplayMode=tf.prototype.q3;tf.prototype.getAutoplayVideoId=tf.prototype.Wk;tf.prototype.reconnect=tf.prototype.oP; tf.prototype.sendMessage=tf.prototype.ivf;tf.prototype.getXsrfToken=tf.prototype.K3;tf.prototype.isCapabilitySupportedOnConnectedDevices=tf.prototype.FL;g.S(y00,P0);g.k=y00.prototype;g.k.tC=function(C){return this.M9.$_gs(C)}; g.k.contains=function(C){return!!this.M9.$_c(C)}; g.k.get=function(C){return this.M9.$_g(C)}; g.k.start=function(){this.M9.$_st()}; g.k.add=function(C,b,h){this.M9.$_a(C,b,h)}; g.k.remove=function(C,b,h){this.M9.$_r(C,b,h)}; g.k.D3=function(C,b,h,N){this.M9.$_un(C,b,h,N)}; g.k.wO=function(){for(var C=this.j.length,b=0;b1&&!this.Z.getOption("remote","quickCast")?(this.ll=g.oI(C,this.j,this),this.GC(g.M_(C,this.j)),C=this.Z.getOption("remote","currentReceiver"),C=this.j(C),this.options[C]&&this.ra(C),this.enable(!0)):this.enable(!1)}; a5.prototype.j=function(C){return C.key}; a5.prototype.o0=function(C){return C==="cast-selector-receiver"?"Cast...":this.ll[C].name}; a5.prototype.GO=function(C){g.tn.prototype.GO.call(this,C);this.Z.setOption("remote","currentReceiver",this.ll[C]);this.xg.QV()};g.S(BfI,g.qK);g.k=BfI.prototype; g.k.create=function(){var C=this.player.Y(),b=g.qX(C);C={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:C.D("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:C.D("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:C.D("enable_cast_short_lived_lounge_token")};RT0(b,C);this.subscriptions.push(g.Pl("yt-remote-before-disconnect",this.AZE,this));this.subscriptions.push(g.Pl("yt-remote-connection-change",this.J8z,this));this.subscriptions.push(g.Pl("yt-remote-receiver-availability-change",this.yW, this));this.subscriptions.push(g.Pl("yt-remote-auto-connect",this.aiD,this));this.subscriptions.push(g.Pl("yt-remote-receiver-resumed",this.Etz,this));this.subscriptions.push(g.Pl("mdx-privacy-popup-confirm",this.Tei,this));this.subscriptions.push(g.Pl("mdx-privacy-popup-cancel",this.ze$,this));this.yW()}; g.k.load=function(){this.player.cancelPlayback();g.qK.prototype.load.call(this);this.d8=new Ewe(this,this.player,this.GE);var C=(C=DPU())?C.currentTime:0;var b=stC()?new Xv(pm(),void 0):null;C==0&&b&&(C=Rr(K7(b)));C!==0&&this.cW(C);IYo(this,this.TM,this.TM);this.player.Pm(6)}; g.k.unload=function(){this.player.publish("mdxautoplaycanceled");this.GS=this.rf;g.eD(this.d8,this.GE);this.GE=this.d8=null;g.qK.prototype.unload.call(this);this.player.Pm(5);l9(this)}; g.k.wO=function(){g.j8(this.subscriptions);g.qK.prototype.wO.call(this)}; g.k.r3=function(C){var b=g.yH.apply(1,arguments);this.loaded&&this.d8.p5.apply(this.d8,[C].concat(g.M(b)))}; g.k.getAdState=function(){return this.Gx}; g.k.xC=function(){return this.GE?K7(this.GE).xC:!1}; g.k.iN=function(){return this.GE?K7(this.GE).iN:!1}; g.k.cW=function(C,b){this.v3=C||0;this.player.publish("progresssync",C,b);this.player.IL("onVideoProgress",C||0)}; g.k.getCurrentTime=function(){return this.v3}; g.k.getProgressState=function(){var C=K7(this.GE),b=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!C.tR()&&this.player.hL(),clipEnd:b.clipEnd,clipStart:b.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:C.getDuration(),ingestionTime:C.K?C.N+Jf(C):C.N,isAtLiveHead:(C.K?C.j+Jf(C):C.j)-this.getCurrentTime()<=1,loaded:C.L,seekableEnd:C.K?C.j+Jf(C):C.j,seekableStart:C.X>0?C.X+Jf(C):C.X,offset:0,viewerLivestreamJoinMediaTime:0}}; g.k.nextVideo=function(){this.GE&&this.GE.nextVideo()}; g.k.wN=function(){this.GE&&this.GE.wN()}; g.k.AZE=function(C){C===1&&(this.A7=this.GE?K7(this.GE):null)}; g.k.J8z=function(){var C=stC()?new Xv(pm(),void 0):null;if(C){var b=this.GS;this.loaded&&this.unload();this.GE=C;this.A7=null;b.key!==this.rf.key&&(this.GS=b,this.load())}else g.kI(this.GE),this.GE=null,this.loaded&&(this.unload(),(C=this.A7)&&C.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(C.videoId,Rr(C)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.k.yW=function(){var C=[this.rf],b=C.concat,h=Qte();Af()&&g.R1("yt-remote-cast-available")&&h.push({key:"cast-selector-receiver",name:"Cast..."});this.ll=b.call(C,h);C=Xmd()||this.rf;o5(this,C);this.player.IL("onMdxReceiversChange")}; g.k.aiD=function(){var C=Xmd();o5(this,C)}; g.k.Etz=function(){this.GS=Xmd()}; g.k.Tei=function(){this.I5=!0;l9(this);kK=!1;P8&&c8(P8,1);P8=null}; g.k.ze$=function(){this.I5=!1;l9(this);o5(this,this.rf);this.GS=this.rf;kK=!1;P8=null;this.player.playVideo()}; g.k.X8=function(C,b){switch(C){case "casting":return this.loaded;case "receivers":return this.ll;case "currentReceiver":return b&&(b.key==="cast-selector-receiver"?bQp():o5(this,b)),this.loaded?this.GS:this.rf;case "quickCast":return this.ll.length===2&&this.ll[1].key==="cast-selector-receiver"?(b&&bQp(),!0):!1}}; g.k.CQ=function(){this.GE.CQ()}; g.k.Aj=function(){return!1}; g.k.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.k.isLoggedIn=function(){var C,b;return((C=g.Tf("PLAYER_CONFIG"))==null?void 0:(b=C.args)==null?void 0:b.authuser)!==void 0?!0:!(!g.Tf("SESSION_INDEX")&&!g.Tf("LOGGED_IN"))};g.MK("remote",BfI);})(_yt_player);