(function(g){var window=this;'use strict';var E6G=function(R){if(R instanceof g.AT)return R;if(typeof R.CS=="function")return R.CS(!1);if(g.JG(R)){var F=0,h=new g.AT;h.next=function(){for(;;){if(F>=R.length)return g.B2;if(F in R)return g.xj(R[F++]);F++}}; return h}throw Error("Not implemented");},B17=function(R,F,h){if(g.JG(R))g.Uv(R,F,h); else for(R=E6G(R);;){var a=R.next();if(a.done)break;F.call(h,a.value,void 0,R)}},RE=function(R){g.EX(R,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.w7()).toString(36)); return R},F4=function(R,F,h){Array.isArray(h)||(h=[String(h)]); g.dpn(R.L,F,h)},rie=function(R,F){var h=[]; B17(F,function(a){try{var J=g.qE.prototype.D.call(this,a,!0)}catch(M){if(M=="Storage: Invalid value was encountered")return;throw M;}J===void 0?h.push(a):g.UTm(J)&&h.push(a)},R); return h},YV4=function(R,F){rie(R,F).forEach(function(h){g.qE.prototype.remove.call(this,h)},R)},sM7=function(R){if(R.xO){if(R.xO.locationOverrideToken)return{locationOverrideToken:R.xO.locationOverrideToken}; if(R.xO.latitudeE7!=null&&R.xO.longitudeE7!=null)return{latitudeE7:R.xO.latitudeE7,longitudeE7:R.xO.longitudeE7}}return null},pkk=function(R,F){g.x7(R,F)||R.push(F)},ku9=function(R){var F=0,h; for(h in R)F++;return F},QM6=function(R,F){return g.wd(R,F)},$gu=function(R){try{return g.Wi.JSON.parse(R)}catch(F){}R=String(R); if(/^\s*$/.test(R)?0:/^[\],:{}\s\u2028\u2029]*$/.test(R.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("("+R+")")}catch(F){}throw Error("Invalid JSON string: "+R);},h6=function(R){if(g.Wi.JSON)try{return g.Wi.JSON.parse(R)}catch(F){}return $gu(R)},Ai7=function(){var R=aE(); this.B=R;R.oQ("/client_streamz/youtube/living_room/mdx/channel/opened",g.hV("channel_type"))},xgh=function(){var R=aE(); this.B=R;R.oQ("/client_streamz/youtube/living_room/mdx/channel/closed",g.hV("channel_type"))},N1e=function(){var R=aE(); this.B=R;R.oQ("/client_streamz/youtube/living_room/mdx/channel/message_received",g.hV("channel_type"))},HpG=function(){var R=aE(); this.B=R;R.oQ("/client_streamz/youtube/living_room/mdx/channel/success")},Lwh=function(){var R=aE(); this.B=R;R.oQ("/client_streamz/youtube/living_room/mdx/channel/error",g.hV("channel_type"),g.hV("error_type"))},T1h=function(){var R=aE(); this.B=R;R.oQ("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},yig=function(){var R=aE(); this.B=R;R.oQ("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},qVh=function(R,F,h,a){var J=new g.Jj(null); R&&g.Mn(J,R);F&&g.v9(J,F);h&&g.gI(J,h);a&&(J.D=a);return J},fPU=function(R,F){return new g.Rp(R,F)},J6=function(R,F){return Object.prototype.hasOwnProperty.call(R,F)},jMk=function(R,F){return R===F},MP=function(R,F){this.D={}; this.B=[];this.BY=this.size=0;var h=arguments.length;if(h>1){if(h%2)throw Error("Uneven number of arguments");for(var a=0;a5&&(R=R.slice(R.length-5)); var F=g.p1(r3h(),function(a){return a.loungeToken}),h=g.p1(R,function(a){return a.loungeToken}); g.kz(h,function(a){return!g.x7(F,a)})&&YgL(); g.fn("yt-remote-local-screens",R,31536E3)},r2=function(R){R||(g.Z1("yt-remote-session-screen-id"),g.Z1("yt-remote-session-video-id")); E$U();R=EC();g.Hh(R,B7());iRh(R)},p6U=function(){if(!YZ){var R=g.ON(); R&&(YZ=new g.LW(R))}},k6v=function(){p6U(); return YZ?!!YZ.get("yt-remote-use-staging-server"):!1},sC=function(R,F){g.UP[R]=!0; var h=g.Db();h&&h.publish.apply(h,arguments);g.UP[R]=!1},Qzt=function(){},aE=function(){if(!pC){pC=new g.eV(new Qzt); var R=g.k$("client_streamz_web_flush_count",-1);R!==-1&&(pC.K=R)}return pC},$lL=function(){var R=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return R?parseInt(R[1],10):0},A3L=function(R){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+R)!=-1||document.currentScript.src.indexOf("&"+R)!=-1)},xlU=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},kZ=function(R){R.length?Nbe(R.shift(),function(){kZ(R)}):HR7()},LK6=function(R){return"chrome-extension://"+R+"/cast_sender.js"},Nbe=function(R,F,h){var a=document.createElement("script"); a.onerror=F;h&&(a.onload=h);g.$N(a,g.x6(R));(document.head||document.documentElement).appendChild(a)},Tb4=function(){var R=$lL(),F=[]; if(R>1){var h=R-1;F.push("//www.gstatic.com/eureka/clank/"+R+"/cast_sender.js");F.push("//www.gstatic.com/eureka/clank/"+h+"/cast_sender.js")}return F},HR7=function(){var R=xlU(); R&&R(!1,"No cast extension found")},qgv=function(){if(y37){var R=2,F=xlU(),h=function(){R--; R==0&&F&&F(!0)}; window.__onGCastApiAvailable=h;Nbe("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",HR7,h)}},fDv=function(){qgv(); var R=Tb4();R.push("//www.gstatic.com/eureka/clank/cast_sender.js");kZ(R)},ZR9=function(){qgv(); var R=Tb4();R.push.apply(R,g.S(jzh.map(LK6)));R.push("//www.gstatic.com/eureka/clank/cast_sender.js");kZ(R)},QN=function(R,F,h){g.d.call(this); this.S=h!=null?(0,g.Ge)(R,h):R;this.W_=F;this.N=(0,g.Ge)(this.UV,this);this.B=!1;this.D=0;this.K=this.tp=null;this.L=[]},$Z=function(){},bRv=function(){g.tV.call(this,"p")},Sg7=function(){g.tV.call(this,"o")},ml4=function(){return OR6=OR6||new g.EL},o$6=function(R){g.tV.call(this,"serverreachability",R)},A6=function(R){var F=ml4(); F.dispatchEvent(new o$6(F,R))},X6U=function(R){g.tV.call(this,"statevent",R)},xZ=function(R){var F=ml4(); F.dispatchEvent(new X6U(F,R))},e$9=function(R,F,h,a){g.tV.call(this,"timingevent",R); this.size=F;this.rtt=h;this.retries=a},NP=function(R,F){if(typeof R!=="function")throw Error("Fn must not be null and must be a function"); return g.Wi.setTimeout(function(){R()},F)},H7=function(){},LC=function(R,F,h,a){this.K=R; this.L=F;this.gW=h;this.YH=a||1;this.uY=new g.pD(this);this.HG=45E3;this.Sl=null;this.S=!1;this.C=this.Fo=this.Z=this.NQ=this.KI=this.nI=this.oR=null;this.aR=[];this.B=null;this.Y=0;this.N=this.Uz=null;this.EP=-1;this.Oz=!1;this.T$=0;this.IR=null;this.Sw=this.PG=this.iY=this.fI=!1;this.D=new n$U},n$U=function(){this.K=null; this.B="";this.D=!1},dlh=function(R,F,h){R.NQ=1; R.Z=RE(F.clone());R.C=h;R.fI=!0;ufU(R,null)},ufU=function(R,F){R.KI=Date.now(); Tk(R);R.Fo=R.Z.clone();F4(R.Fo,"t",R.YH);R.Y=0;var h=R.K.NQ;R.D=new n$U;R.B=PB4(R.K,h?F:null,!R.C);R.T$>0&&(R.IR=new g.c9((0,g.Ge)(R.NT,R,R.B),R.T$));R.uY.listen(R.B,"readystatechange",R.rR);F=R.Sl?g.sR(R.Sl):{};R.C?(R.Uz||(R.Uz="POST"),F["Content-Type"]="application/x-www-form-urlencoded",R.B.send(R.Fo,R.Uz,R.C,F)):(R.Uz="GET",R.B.send(R.Fo,R.Uz,null,F));A6(1)},KKg=function(R){if(!z$4(R))return g.V0(R.B); var F=g.UL(R.B);if(F==="")return"";var h="",a=F.length,J=g.le(R.B)==4;if(!R.D.K){if(typeof TextDecoder==="undefined")return yN(R),qP(R),"";R.D.K=new g.Wi.TextDecoder}for(var M=0;MF.length)return tn7;F=F.slice(a,a+h);R.Y=a+h;return F},Tk=function(R){R.nI=Date.now()+R.HG; Vn4(R,R.HG)},Vn4=function(R,F){if(R.oR!=null)throw Error("WatchDog timer not null"); R.oR=NP((0,g.Ge)(R.AR,R),F)},Ulu=function(R){R.oR&&(g.Wi.clearTimeout(R.oR),R.oR=null)},qP=function(R){R.K.VV()||R.Oz||CB4(R.K,R)},yN=function(R){Ulu(R); g.Fm(R.IR);R.IR=null;R.uY.removeAll();if(R.B){var F=R.B;R.B=null;F.abort();F.dispose()}},MAU=function(R,F){try{var h=R.K; if(h.jq!=0&&(h.B==R||c3k(h.D,R)))if(!R.PG&&c3k(h.D,R)&&h.jq==3){try{var a=h.S9.B.parse(F)}catch(H){a=null}if(Array.isArray(a)&&a.length==3){var J=a;if(J[0]==0)a:{if(!h.Z){if(h.B)if(h.B.KI+3E30&&(h.T$=1.5*I);a=h;var w=R.nT();if(w){var E=g.CJ(w,"X-Client-Wire-Protocol");if(E){var B=a.D;!B.B&&(g.Z7(E,"spdy")||g.Z7(E,"quic")||g.Z7(E,"h2"))&&(B.L=B.N,B.B=new Set,B.D&&(FiL(B,B.D),B.D=null))}if(a.fI){var r=g.CJ(w,"X-HTTP-Session-Id");r&&(a.xO=r,g.EX(a.Sl,a.fI,r))}}h.jq=3;h.N&&h.N.Yx();h.FW&&(h.Xf=Date.now()-R.KI);a=h;var Y=R;a.gf=hNg(a,a.NQ?a.YH:null,a.gW);if(Y.PG){a16(a.D, Y);var p=Y,k=a.T$;k&&p.setTimeout(k);p.oR&&(Ulu(p),Tk(p));a.B=Y}else JsL(a);h.K.length>0&&br(h)}else M[0]!="stop"&&M[0]!="close"||Zs(h,7);else h.jq==3&&(M[0]=="stop"||M[0]=="close"?M[0]=="stop"?Zs(h,7):h.disconnect():M[0]!="noop"&&h.N&&h.N.Pb(M),h.aR=0)}A6(4)}catch(H){}},vO7=function(R,F){this.B=R; this.map=F;this.context=null},gOu=function(R){this.N=R||10; g.Wi.PerformanceNavigationTiming?(R=g.Wi.performance.getEntriesByType("navigation"),R=R.length>0&&(R[0].nextHopProtocol=="hq"||R[0].nextHopProtocol=="h2")):R=!!(g.Wi.chrome&&g.Wi.chrome.loadTimes&&g.Wi.chrome.loadTimes()&&g.Wi.chrome.loadTimes().wasFetchedViaSpdy);this.L=R?this.N:1;this.B=null;this.L>1&&(this.B=new Set);this.D=null;this.K=[]},GPU=function(R){return R.D?!0:R.B?R.B.size>=R.L:!1},RNe=function(R){return R.D?1:R.B?R.B.size:0},c3k=function(R,F){return R.D?R.D==F:R.B?R.B.has(F):!1},FiL= function(R,F){R.B?R.B.add(F):R.D=F},a16=function(R,F){R.D&&R.D==F?R.D=null:R.B&&R.B.has(F)&&R.B.delete(F)},I1G=function(R){if(R.D!=null)return R.K.concat(R.D.aR); if(R.B!=null&&R.B.size!==0){var F=R.K;R=g.N(R.B.values());for(var h=R.next();!h.done;h=R.next())F=F.concat(h.value.aR);return F}return g.Zt(R.K)},inv=function(R,F){var h=new H7; if(g.Wi.Image){var a=new Image;a.onload=g.Iu(SF,h,"TestLoadImage: loaded",!0,F,a);a.onerror=g.Iu(SF,h,"TestLoadImage: error",!1,F,a);a.onabort=g.Iu(SF,h,"TestLoadImage: abort",!1,F,a);a.ontimeout=g.Iu(SF,h,"TestLoadImage: timeout",!1,F,a);g.Wi.setTimeout(function(){if(a.ontimeout)a.ontimeout()},1E4); a.src=R}else F(!1)},wvk=function(R,F){var h=new H7,a=new AbortController,J=setTimeout(function(){a.abort(); SF(h,"TestPingServer: timeout",!1,F)},1E4); fetch(R,{signal:a.signal}).then(function(M){clearTimeout(J);M.ok?SF(h,"TestPingServer: ok",!0,F):SF(h,"TestPingServer: server error",!1,F)}).catch(function(){clearTimeout(J); SF(h,"TestPingServer: error",!1,F)})},SF=function(R,F,h,a,J){try{J&&(J.onload=null,J.onerror=null,J.onabort=null,J.ontimeout=null),a(h)}catch(M){}},EOk=function(){this.B=new $Z},BKu=function(R,F,h){var a=h||""; try{g.a3(R,function(J,M){var v=J;g.M4(J)&&(v=g.ue(J));F.push(a+M+"="+encodeURIComponent(v))})}catch(J){throw F.push(a+"type="+encodeURIComponent("_badmap")),J; }},OC=function(R,F,h){return h&&h.d3?h.d3[R]||F:F},rsv=function(R){this.K=[]; this.YH=this.gf=this.Sl=this.gW=this.B=this.xO=this.fI=this.Oz=this.Y=this.EP=this.C=null;this.Ig=this.Fo=0;this.lq=OC("failFast",!1,R);this.PG=this.oR=this.Z=this.S=this.N=null;this.It=!0;this.i9=this.IR=-1;this.Sw=this.aR=this.KI=0;this.Xk=OC("baseRetryDelayMs",5E3,R);this.g$=OC("retryDelaySeedMs",1E4,R);this.PJ=OC("forwardChannelMaxRetries",2,R);this.Ym=OC("forwardChannelRequestTimeoutMs",2E4,R);this.AT=R&&R.kEb||void 0;this.w$=R&&R.f0b||void 0;this.d$=R&&R.vst||!1;this.T$=void 0;this.NQ=R&&R.fGI|| !1;this.L="";this.D=new gOu(R&&R.JXI);this.S9=new EOk;this.uY=R&&R.mz$||!1;this.nI=R&&R.znI||!1;this.uY&&this.nI&&(this.nI=!1);this.Y6=R&&R.qal||!1;R&&R.Uzu&&(this.It=!1);this.FW=!this.uY&&this.It&&R&&R.ZYR||!1;this.Ma=void 0;R&&R.WH&&R.WH>0&&(this.Ma=R.WH);this.Ho=void 0;this.Xf=0;this.HG=!1;this.iY=this.Uz=null},jF=function(R){R.B&&(YKL(R),R.B.cancel(),R.B=null)},sAt=function(R){jF(R); R.Z&&(g.Wi.clearTimeout(R.Z),R.Z=null);fC(R);R.D.cancel();R.S&&(typeof R.S==="number"&&g.Wi.clearTimeout(R.S),R.S=null)},br=function(R){GPU(R.D)||R.S||(R.S=!0,g.T3(R.h3,R),R.KI=0)},kP7=function(R,F){if(RNe(R.D)>=R.D.L-(R.S?1:0))return!1; if(R.S)return R.K=F.aR.concat(R.K),!0;if(R.jq==1||R.jq==2||R.KI>=(R.lq?0:R.PJ))return!1;R.S=NP((0,g.Ge)(R.h3,R,F),pv4(R,R.KI));R.KI++;return!0},$mt=function(R,F){var h; F?h=F.gW:h=R.Fo++;var a=R.Sl.clone();g.EX(a,"SID",R.L);g.EX(a,"RID",h);g.EX(a,"AID",R.IR);mV(R,a);R.Y&&R.C&&g.sX(a,R.Y,R.C);h=new LC(R,R.L,h,R.KI+1);R.Y===null&&(h.Sl=R.C);F&&(R.K=F.aR.concat(R.K));F=QA6(R,h,1E3);h.setTimeout(Math.round(R.Ym*.5)+Math.round(R.Ym*.5*Math.random()));FiL(R.D,h);dlh(h,a,F)},mV=function(R,F){R.Oz&&g.Rl(R.Oz,function(h,a){g.EX(F,a,h)}); R.N&&g.a3({},function(h,a){g.EX(F,a,h)})},QA6=function(R,F,h){h=Math.min(R.K.length,h); var a=R.N?(0,g.Ge)(R.N.Sf,R.N,R):null;a:{for(var J=R.K,M=-1;;){var v=["count="+h];M==-1?h>0?(M=J[0].B,v.push("ofs="+M)):M=0:v.push("ofs="+M);for(var I=!0,w=0;w=3)return!1; R.Sw++;R.Z=NP((0,g.Ge)(R.kx,R),pv4(R,R.aR));R.aR++;return!0},YKL=function(R){R.Uz!=null&&(g.Wi.clearTimeout(R.Uz),R.Uz=null)},As6=function(R){R.B=new LC(R,R.L,"rpc",R.Sw); R.Y===null&&(R.B.Sl=R.C);R.B.T$=0;var F=R.gf.clone();g.EX(F,"RID","rpc");g.EX(F,"SID",R.L);g.EX(F,"AID",R.IR);g.EX(F,"CI",R.PG?"0":"1");!R.PG&&R.Ma&&g.EX(F,"TO",R.Ma);g.EX(F,"TYPE","xmlhttp");mV(R,F);R.Y&&R.C&&g.sX(F,R.Y,R.C);R.T$&&R.B.setTimeout(R.T$);var h=R.B;R=R.YH;h.NQ=1;h.Z=RE(F.clone());h.C=null;h.fI=!0;ufU(h,R)},fC=function(R){R.oR!=null&&(g.Wi.clearTimeout(R.oR),R.oR=null)},CB4=function(R,F){var h=null; if(R.B==F){fC(R);YKL(R);R.B=null;var a=2}else if(c3k(R.D,F))h=F.aR,a16(R.D,F),a=1;else return;if(R.jq!=0)if(F.S)if(a==1){h=F.C?F.C.length:0;F=Date.now()-F.KI;var J=R.KI;a=ml4();a.dispatchEvent(new e$9(a,h,F,J));br(R)}else JsL(R);else{var M=F.EP;J=F.getLastError();if(J==3||J==0&&M>0||!(a==1&&kP7(R,F)||a==2&&WKv(R)))switch(h&&h.length>0&&(F=R.D,F.K=F.K.concat(h)),J){case 1:Zs(R,5);break;case 4:Zs(R,10);break;case 3:Zs(R,6);break;default:Zs(R,2)}}},pv4=function(R,F){var h=R.Xk+Math.floor(Math.random()* R.g$); R.isActive()||(h*=2);return h*F},Zs=function(R,F){if(F==2){var h=(0,g.Ge)(R.vXt,R),a=R.w$,J=!a; a=new g.Jj(a||"//www.google.com/images/cleardot.gif");g.Wi.location&&g.Wi.location.protocol=="http"||g.Mn(a,"https");RE(a);J?inv(a.toString(),h):wvk(a.toString(),h)}else xZ(2);R.jq=0;R.N&&R.N.lM(F);xm7(R);sAt(R)},xm7=function(R){R.jq=0; R.iY=[];if(R.N){var F=I1G(R.D);if(F.length!=0||R.K.length!=0)g.m4(R.iY,F),g.m4(R.iY,R.K),R.D.K.length=0,g.Zt(R.K),R.K.length=0;R.N.XE()}},NK9=function(R){if(R.jq==0)return R.iY; var F=[];g.m4(F,I1G(R.D));g.m4(F,R.K);return F},hNg=function(R,F,h){var a=g.B9(h); a.B!=""?(F&&g.v9(a,F+"."+a.B),g.gI(a,a.K)):(a=g.Wi.location,a=qVh(a.protocol,F?F+"."+a.hostname:a.hostname,+a.port,h));F=R.fI;h=R.xO;F&&h&&g.EX(a,F,h);g.EX(a,"VER",R.qT);mV(R,a);return a},PB4=function(R,F,h){if(F&&!R.NQ)throw Error("Can't create secondary domain capable XhrIo object."); F=R.d$&&!R.AT?new g.z3(new g.WY({Z_:h})):new g.z3(R.AT);F.Y=R.NQ;return F},Hn7=function(){},Li6=function(){},X4=function(R,F){g.EL.call(this); this.B=new rsv(F);this.N=R;this.D=F&&F.oou||null;R=F&&F.BAl||null;F&&F.Yal&&(R?R["X-Client-Protocol"]="webchannel":R={"X-Client-Protocol":"webchannel"});this.B.C=R;R=F&&F.wRb||null;F&&F.ue&&(R?R["X-WebChannel-Content-Type"]=F.ue:R={"X-WebChannel-Content-Type":F.ue});F&&F.B5&&(R?R["X-WebChannel-Client-Profile"]=F.B5:R={"X-WebChannel-Client-Profile":F.B5});this.B.EP=R;(R=F&&F.YtA)&&!g.jP(R)&&(this.B.Y=R);this.S=F&&F.fGI||!1;this.L=F&&F.FVl||!1;(F=F&&F.Q0)&&!g.jP(F)&&(this.B.fI=F,g.i_(this.D,F)&&(R= this.D,F in R&&delete R[F]));this.K=new oE(this)},TKv=function(R){bRv.call(this); R.__headers__&&(this.headers=R.__headers__,this.statusCode=R.__status__,delete R.__headers__,delete R.__status__);var F=R.__sm__;F?this.data=(this.B=g.vV(F))?g.rd(F,this.B):F:this.data=R},ys9=function(R){Sg7.call(this); this.status=1;this.errorCode=R},oE=function(R){this.B=R},qKv=function(R,F){this.D=R; this.B=F},f14=function(R){return NK9(R.B).map(function(F){var h=R.D; F=F.map;"__data__"in F?(F=F.__data__,h=h.L?$gu(F):F):h=F;return h})},eF=function(R,F){if(typeof R!=="function")throw Error("Fn must not be null and must be a function"); return g.Wi.setTimeout(function(){R()},F)},ur=function(R){nC.dispatchEvent(new jA4(nC,R))},jA4=function(R){g.tV.call(this,"statevent",R)},d2=function(R,F,h,a){this.B=R; this.L=F;this.Y=h;this.S=a||1;this.D=45E3;this.K=new g.pD(this);this.N=new g.m7;this.N.setInterval(250)},bn7=function(R,F,h){R.TU=1; R.pJ=RE(F.clone());R.f5=h;R.fI=!0;Zn4(R,null)},SKu=function(R,F,h,a,J){R.TU=1; R.pJ=RE(F.clone());R.f5=null;R.fI=h;J&&(R.Ex=!1);Zn4(R,a)},Zn4=function(R,F){R.mX=Date.now(); Ong(R);R.Js=R.pJ.clone();F4(R.Js,"t",R.S);R.Ix=0;R.LB=R.B.eL(R.B.LJ()?F:null);R.VJ>0&&(R.wN=new g.c9((0,g.Ge)(R.wd,R,R.LB),R.VJ));R.K.listen(R.LB,"readystatechange",R.cX);F=R.K5?g.sR(R.K5):{};R.f5?(R.b_="POST",F["Content-Type"]="application/x-www-form-urlencoded",R.LB.send(R.Js,R.b_,R.f5,F)):(R.b_="GET",R.Ex&&!g.IG&&(F.Connection="close"),R.LB.send(R.Js,R.b_,null,F));R.B.QZ(1)},XvU=function(R,F){var h=R.Ix,a=F.indexOf("\n",h); if(a==-1)return mm6;h=Number(F.substring(h,a));if(isNaN(h))return oO9;a+=1;if(a+h>F.length)return mm6;F=F.slice(a,a+h);R.Ix=a+h;return F},Ong=function(R){R.xb=Date.now()+R.D; eNg(R,R.D)},eNg=function(R,F){if(R.RU!=null)throw Error("WatchDog timer not null"); R.RU=eF((0,g.Ge)(R.vX,R),F)},nOU=function(R){R.RU&&(g.Wi.clearTimeout(R.RU),R.RU=null)},uBG=function(R){R.B.VV()||R.iN||R.B.nk(R)},P7=function(R){nOU(R); g.Fm(R.wN);R.wN=null;R.N.stop();R.K.removeAll();if(R.LB){var F=R.LB;R.LB=null;F.abort();F.dispose()}R.mp&&(R.mp=null)},dmk=function(R,F){try{R.B.J3(R,F),R.B.QZ(4)}catch(h){}},zNe=function(R,F,h,a,J){if(a==0)h(!1); else{var M=J||0;a--;PHL(R,F,function(v){v?h(!0):g.Wi.setTimeout(function(){zNe(R,F,h,a,M)},M)})}},PHL=function(R,F,h){var a=new Image; a.onload=function(){try{zk(a),h(!0)}catch(J){}}; a.onerror=function(){try{zk(a),h(!1)}catch(J){}}; a.onabort=function(){try{zk(a),h(!1)}catch(J){}}; a.ontimeout=function(){try{zk(a),h(!1)}catch(J){}}; g.Wi.setTimeout(function(){if(a.ontimeout)a.ontimeout()},F); a.src=R},zk=function(R){R.onload=null; R.onerror=null;R.onabort=null;R.ontimeout=null},KiL=function(R){this.B=R; this.D=new $Z},tAu=function(R){var F=KC(R.B,R.BP,"/mail/images/cleardot.gif"); RE(F);zNe(F.toString(),5E3,(0,g.Ge)(R.VU,R),3,2E3);R.QZ(1)},l17=function(R){var F=R.B.S; F!=null?(ur(5),F?(ur(11),t6(R.B,R,!1)):(ur(12),t6(R.B,R,!0))):(R.oH=new d2(R),R.oH.K5=R.QJ,F=R.B,F=KC(F,F.LJ()?R.ZW:null,R.z4),ur(5),F4(F,"TYPE","xmlhttp"),SKu(R.oH,F,!1,R.ZW,!1))},Dmu=function(R,F,h){this.B=1; this.D=[];this.K=[];this.N=new $Z;this.C=R||null;this.S=F!=null?F:null;this.Z=h||!1},VA4=function(R,F){this.B=R; this.map=F;this.context=null},Um9=function(R,F,h,a){g.tV.call(this,"timingevent",R); this.size=F;this.rtt=h;this.retries=a},CHk=function(R){g.tV.call(this,"serverreachability",R)},Wih=function(R){R.Re(1,0); R.yu=KC(R,null,R.us);cs7(R)},R5L=function(R){R.dj&&(R.dj.abort(),R.dj=null); R.aj&&(R.aj.cancel(),R.aj=null);R.Kp&&(g.Wi.clearTimeout(R.Kp),R.Kp=null);lr(R);R.AV&&(R.AV.cancel(),R.AV=null);R.Ik&&(g.Wi.clearTimeout(R.Ik),R.Ik=null)},FF4=function(R,F){if(R.B==0)throw Error("Invalid operation: sending map when state is closed"); R.D.push(new VA4(R.OV++,F));R.B!=2&&R.B!=3||cs7(R)},h5L=function(R){var F=0; R.aj&&F++;R.AV&&F++;return F},cs7=function(R){R.AV||R.Ik||(R.Ik=eF((0,g.Ge)(R.IG,R),0),R.NW=0)},M1e=function(R,F){if(R.B==1){if(!F){R.GX=Math.floor(Math.random()*1E5); F=R.GX++;var h=new d2(R,"",F);h.K5=R.ey;var a=adt(R),J=R.yu.clone();g.EX(J,"RID",F);g.EX(J,"CVER","1");Ds(R,J);bn7(h,J,a);R.AV=h;R.B=2}}else R.B==3&&(F?JYe(R,F):R.D.length==0||R.AV||JYe(R))},JYe=function(R,F){if(F)if(R.Gv>6){R.D=R.K.concat(R.D); R.K.length=0;var h=R.GX-1;F=adt(R)}else h=F.Y,F=F.f5;else h=R.GX++,F=adt(R);var a=R.yu.clone();g.EX(a,"SID",R.L);g.EX(a,"RID",h);g.EX(a,"AID",R.MW);Ds(R,a);h=new d2(R,R.L,h,R.NW+1);h.K5=R.ey;h.setTimeout(1E4+Math.round(1E4*Math.random()));R.AV=h;bn7(h,a,F)},Ds=function(R,F){R.H7&&(R=R.H7.je())&&g.Rl(R,function(h,a){g.EX(F,a,h)})},adt=function(R){var F=Math.min(R.D.length,1E3),h=["count="+F]; if(R.Gv>6&&F>0){var a=R.D[0].B;h.push("ofs="+a)}else a=0;for(var J={},M=0;M=3)return!1; R.Y++;R.Kp=eF((0,g.Ge)(R.bM,R),gVk(R,R.ON));R.ON++;return!0},t6=function(R,F,h){R.Mp=R.S==null?h:!R.S; R.v0=F.i7;R.Z||Wih(R)},lr=function(R){R.Uc!=null&&(g.Wi.clearTimeout(R.Uc),R.Uc=null)},gVk=function(R,F){var h=5E3+Math.floor(Math.random()*1E4); R.isActive()||(h*=2);return h*F},VN=function(R,F){if(F==2||F==9){var h=null; R.H7&&(h=null);var a=(0,g.Ge)(R.SGn,R);h||(h=new g.Jj("//www.google.com/images/cleardot.gif"),RE(h));PHL(h.toString(),1E4,a)}else ur(2);Id7(R,F)},Id7=function(R,F){R.B=0; R.H7&&R.H7.Zw(F);im7(R);R5L(R)},im7=function(R){R.B=0; R.v0=-1;if(R.H7)if(R.K.length==0&&R.D.length==0)R.H7.Bp();else{var F=g.Zt(R.K),h=g.Zt(R.D);R.K.length=0;R.D.length=0;R.H7.Bp(F,h)}},KC=function(R,F,h){var a=g.B9(h); if(a.B!="")F&&g.v9(a,F+"."+a.B),g.gI(a,a.K);else{var J=window.location;a=qVh(J.protocol,F?F+"."+J.hostname:J.hostname,+J.port,h)}R.fJ&&g.Rl(R.fJ,function(M,v){g.EX(a,v,M)}); g.EX(a,"VER",R.Gv);Ds(R,a);return a},wRU=function(){},EVe=function(){this.B=[]; this.D=[]},BSt=function(R){g.tV.call(this,"channelMessage"); this.message=R},rY7=function(R){g.tV.call(this,"channelError"); this.error=R},YUL=function(R,F){this.action=R; this.params=F||{}},UC=function(R,F){g.d.call(this); this.B=new g.DY(this.aQI,0,this);g.z(this,this.B);this.W_=5E3;this.D=0;if(typeof R==="function")F&&(R=(0,g.Ge)(R,F));else if(R&&typeof R.handleEvent==="function")R=(0,g.Ge)(R.handleEvent,R);else throw Error("Invalid listener argument");this.K=R},sf7=function(R,F,h,a,J,M,v,I,w,E,B,r,Y,p){h=h===void 0?!1:h; a=a===void 0?function(){return""}:a; J=J===void 0?!1:J;M=M===void 0?!1:M;v=v===void 0?!1:v;I=I===void 0?function(){return g.jV({})}:I; w=w===void 0?!1:w;B=B===void 0?!1:B;r=r===void 0?!1:r;Y=Y===void 0?!1:Y;p=p===void 0?!1:p;this.NQ=R;this.oR=F;this.S=new g.Hs;this.D=new UC(this.O_A,this);this.B=null;this.Y=!1;this.C=null;this.KI="";this.aR=this.Z=0;this.K=[];this.Sw=h;this.fI=a;this.N=M;this.Sl=I;this.Oz=E;this.YH=v;this.Uz=null;this.L=g.jV();this.gW=J;this.iY=w;this.uY=B;this.nI=r;this.It=Y;this.EP=p;this.T$=new Ai7;this.PG=new xgh;this.HG=new HpG;this.Fo=new N1e;this.IR=new Lwh;this.FW=new T1h;this.Ho=new yig},Qft=function(R, F,h,a,J){pRg(R); if(R.B){var M=g.Kp("ID_TOKEN"),v=R.B.ey||{};M?v["x-youtube-identity-token"]=M:delete v["x-youtube-identity-token"];R.B.ey=v}kC9(R);a?(a.getState()!=3&&h5L(a)==0||a.getState(),R.B.connect(F,h,R.oR,a.L,a.MW)):J?R.B.connect(F,h,R.oR,J.sessionId,J.arrayId):R.B.connect(F,h,R.oR)},NSU=function(R,F){return R.It?!0:R.nI?Object.values($UU).includes(F):R.uY?!Object.values(AY9).includes(F):R.EP?Object.values(xUL).includes(F):!1},TSv=function(R){var F,h; g.u(function(a){if(a.D==1)return g.L_(a,2),g.m(a,Hm4(R),2);g.SB(a);F=R.K;R.K=[];h=F.length;LF4(R,F,h);CC(R);return g.Om(a,0)})},LF4=function(R,F,h){for(var a=0;a0?h=Object.assign({},h,F):delete h.Authorization;R.B.ey=h}},kC9=function(R){R.Oz&&!R.N&&qU9(R,R.Oz())},c7=function(R){this.scheme="https"; this.port=this.domain="";this.B="/api/lounge";this.D=!0;R=R||document.location.href;var F=Number(g.Gg(R)[4]||null)||"";F&&(this.port=":"+F);this.domain=g.I8(R)||"";R=g.ol();R.search("MSIE")>=0&&(R=R.match(/MSIE ([\d.]+)/)[1],g.mB(R,"10.0")<0&&(this.D=!1))},W7=function(R,F){var h=R.B; R.D&&(h=R.scheme+"://"+R.domain+R.port+R.B);return g.sA(h+F,{})},fde=function(R,F){g.EL.call(this); var h=this;this.nV=R();this.nV.subscribe("handlerOpened",this.MB,this);this.nV.subscribe("handlerClosed",this.onClosed,this);this.nV.subscribe("handlerError",function(a,J){h.onError(J)}); this.nV.subscribe("handlerMessage",this.onMessage,this);this.B=F},jfv=function(R,F,h){var a=this; h=h===void 0?function(){return""}:h; var J=J===void 0?new Li6:J;var M=M===void 0?new g.Hs:M;this.pathPrefix=R;this.B=F;this.KI=h;this.N=M;this.Z=null;this.C=this.Y=0;this.channel=null;this.S=0;this.K=new UC(function(){a.K.isActive();var v;((v=a.channel)==null?void 0:RNe((new qKv(v,v.B)).B.D))===0&&a.connect(a.Z,a.Y)}); this.L={};this.D={};this.oR=!1;this.logger=null;this.aR=[];this.Xt=void 0;this.Sl=new Ai7;this.Uz=new xgh;this.Oz=new N1e;this.fI=new Lwh},Zmk=function(R){g.R2(R.channel,"m",function(){R.S=3; R.K.reset();R.Z=null;R.Y=0;for(var F=g.N(R.aR),h=F.next();!h.done;h=F.next())h=h.value,R.channel&&R.channel.send(h);R.aR=[];R.publish("webChannelOpened");R.Sl.tj("WEB_CHANNEL")}); g.R2(R.channel,"n",function(){R.S=0;R.K.isActive()||R.publish("webChannelClosed");var F,h=(F=R.channel)==null?void 0:f14(new qKv(F,F.B));h&&(R.aR=[].concat(g.S(h)));R.Uz.tj("WEB_CHANNEL")}); g.R2(R.channel,"p",function(F){var h=F.data;h[0]==="gracefulReconnect"?(R.K.start(),R.channel&&R.channel.close()):R.publish("webChannelMessage",new YUL(h[0],h[1]));R.Xt=F.statusCode;R.Oz.tj("WEB_CHANNEL")}); g.R2(R.channel,"o",function(){R.Xt===401||R.K.start();R.publish("webChannelError");R.fI.tj("WEB_CHANNEL","")})},bmk=function(R){var F=R.KI(); F?R.L["x-youtube-lounge-xsrf-token"]=F:delete R.L["x-youtube-lounge-xsrf-token"]},SUu=function(R){g.EL.call(this); this.B=R();this.B.subscribe("webChannelOpened",this.qB,this);this.B.subscribe("webChannelClosed",this.onClosed,this);this.B.subscribe("webChannelError",this.onError,this);this.B.subscribe("webChannelMessage",this.onMessage,this)},Om7=function(R,F,h,a,J){function M(){return new sf7(W7(R,"/bc"),F,!1,h,a)} h=h===void 0?function(){return""}:h; return g.pR("enable_mdx_web_channel_desktop")?new SUu(function(){return new jfv(W7(R,"/wc"),F,h)}):new fde(M,J)},e5u=function(){var R=mUv; oV7();Rv.push(R);XR4()},FE=function(R,F){oV7(); var h=nV7(R,String(F));Rv.length==0?uhk(h):(XR4(),g.Uv(Rv,function(a){a(h)}))},hW=function(R){FE("CP",R)},oV7=function(){Rv||(Rv=g.hG("yt.mdx.remote.debug.handlers_")||[],g.Fk("yt.mdx.remote.debug.handlers_",Rv))},uhk=function(R){var F=(av+1)%50; av=F;JW[F]=R;Mc||(Mc=F==49)},XR4=function(){var R=Rv; if(JW[0]){var F=Mc?av:-1,h={};do h={wF:void 0},F=(F+1)%50,h.wF=JW[F],g.Uv(R,function(a){return function(J){J(a.wF)}}(h)); while(F!=av);JW=Array(50);av=-1;Mc=!1}},nV7=function(R,F){var h=(Date.now()-dU7)/1E3; h.toFixed&&(h=h.toFixed(3));var a=[];a.push("[",h+"s","] ");a.push("[","yt.mdx.remote","] ");a.push(R+": "+F,"\n");return a.join("")},vA=function(R){g.h0.call(this); this.S=R;this.screens=[]},PIu=function(R,F){var h=R.get(F.uuid)||R.get(F.id); if(h)return R=h.name,h.id=F.id||h.id,h.name=F.name,h.token=F.token,h.uuid=F.uuid||h.uuid,h.name!=R;R.screens.push(F);return!0},z57=function(R,F){var h=R.screens.length!=F.length; R.screens=g.TR(R.screens,function(M){return!!g$4(F,M)}); for(var a=F.length,J=0;J0&&R.L0&&$v(R,h)},function(F){R.N=function(){}; R.TN(F)})},QD4=function(R){var F={}; F.pairingCode=R.Uz;F.theme=R.NQ;k6v()&&(F.env_useStageMdx=1);return g.YR(F)},$d7=function(R){return new Promise(function(F){R.Uz=Mnk(); if(R.Sl){var h=new chrome.cast.DialLaunchResponse(!0,QD4(R));F(h);kjU(R)}else R.oR=function(){g.rb(R.C);R.oR=function(){}; R.C=NaN;var a=new chrome.cast.DialLaunchResponse(!0,QD4(R));F(a);kjU(R)},R.C=g.Eg(function(){R.oR()},100)})},xdk=function(R,F,h){R.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(F)); var a=new Gk(F);return(new Promise(function(J){Aqt(R,a,function(M){M?(R.aR=!0,BA(R.L,a),Yv(R,a),$v(R,h)):g.DP(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(F)+" is not online."));J(M)},5)})).then(function(J){return J?new chrome.cast.DialLaunchResponse(!1):$d7(R)})},NM6=function(R,F){var h=R.Z.receiver.label,a=R.D.friendlyName; return(new Promise(function(J){hQ9(R.L,h,F,a,function(M){M&&M.token&&Yv(R,M);J(M)},function(M){sB(R,"Failed to get DIAL screen: "+M); J(null)})})).then(function(J){return J&&J.token?new chrome.cast.DialLaunchResponse(!1):$d7(R)})},Aqt=function(R,F,h,a){g.rb(R.S); R.S=0;Jqh(R.L,F,function(J){J||a<0?h(J):R.S=g.Eg(function(){Aqt(R,F,h,a-1)},300)})},$v=function(R,F){R.info("getDialAppInfoWithTimeout_ "+F); Q8(R)&&(g.rb(R.Y),R.Y=0,F==0?Hd9(R):R.Y=g.Eg(function(){Hd9(R)},F))},Hd9=function(R){Q8(R)&&R.K.getDialAppInfo(function(F){R.info("getDialAppInfo dialLaunchData: "+JSON.stringify(F)); F=F.extraData||{};var h=null;if(F.loungeToken){var a;((a=R.B)==null?void 0:a.token)==F.loungeToken&&(h="staleLoungeToken")}else h="missingLoungeToken";h?(R.KI=h,$v(R,3E4)):(R.aR=!1,R.KI="unknown",Gjt(R,F.loungeToken),$v(R,F.loungeTokenRefreshIntervalMs))},function(F){R.info("getDialAppInfo error: "+F); R.KI="noLoungeTokenResponse";$v(R,3E4)})},Lqu=function(R){g.rb(R.S); R.S=0;g.rb(R.Y);R.Y=0;R.N();R.N=function(){}; g.rb(R.C)},AW=function(R,F){rc.call(this,R,F,"ManualSession"); this.K=g.Eg((0,g.Ge)(this.EH,this,null),150)},xv=function(R,F){g.h0.call(this); this.config_=F;this.D=R;this.Z=F.appId||"233637DE";this.L=F.theme||"cl";this.C=F.disableCastApi||!1;this.S=F.forceMirroring||!1;this.B=null;this.Y=!1;this.K=[];this.N=(0,g.Ge)(this.vmb,this)},TMu=function(R,F){return F?g.QL(R.K,function(h){return IE(F,h.label)},R):null},Nc=function(R){FE("Controller",R)},mUv=function(R){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(R)},HA=function(R){return R.Y||!!R.K.length||!!R.B},L0=function(R,F,h){F!=R.B&&(g.Fm(R.B),(R.B=F)?(h?R.publish("yt-remote-cast2-receiver-resumed", F.D):R.publish("yt-remote-cast2-receiver-selected",F.D),F.subscribe("sessionScreen",(0,g.Ge)(R.BL,R,F)),F.subscribe("sessionFailed",function(){return yqt(R,F)}),F.B?R.publish("yt-remote-cast2-session-change",F.B):h&&R.B.EH(null)):R.publish("yt-remote-cast2-session-change",null))},yqt=function(R,F){R.B==F&&R.publish("yt-remote-cast2-session-failed")},qP4=function(R){var F=R.D.Hb(),h=R.B&&R.B.D; R=g.p1(F,function(a){h&&IE(a,h.label)&&(h=null);var J=a.uuid?a.uuid:a.id,M=TMu(this,a);M?(M.label=J,M.friendlyName=a.name):(M=new chrome.cast.Receiver(J,a.name),M.receiverType=chrome.cast.ReceiverType.CUSTOM);return M},R); h&&(h.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(h=new chrome.cast.Receiver(h.label,h.friendlyName),h.receiverType=chrome.cast.ReceiverType.CUSTOM),R.push(h));return R},mdv=function(R,F,h,a){a.disableCastApi?T5("Cannot initialize because disabled by Mdx config."):fbv()?jD7(F,a)&&(Zd7(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?bdL(R,h):(window.__onGCastApiAvailable=function(J,M){J?bdL(R,h):(y8("Failed to load cast API: "+M),SPU(!1),Zd7(!1),g.Z1("yt-remote-cast-available"),g.Z1("yt-remote-cast-receiver"), Odt(),h(!1))},a.loadCastApiSetupScript?g.F5("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?$lL()>=60&&fDv():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?HR7():$lL()>=89?ZR9():(qgv(),kZ(jzh.map(LK6))))):T5("Cannot initialize because not running Chrome")},Odt=function(){T5("dispose"); var R=qc();R&&R.dispose();g.Fk("yt.mdx.remote.cloudview.instance_",null);o3e(!1);g.Wm(Xmg);Xmg.length=0},f0=function(){return!!g.jA("yt-remote-cast-installed")},eQL=function(){var R=g.jA("yt-remote-cast-receiver"); return R?R.friendlyName:null},n37=function(){T5("clearCurrentReceiver"); g.Z1("yt-remote-cast-receiver")},u8e=function(){return f0()?qc()?qc().getCastSession():(y8("getCastSelector: Cast is not initialized."),null):(y8("getCastSelector: Cast API is not installed!"),null)},dd4=function(){f0()?qc()?j4()?(T5("Requesting cast selector."),qc().requestSession()):(T5("Wait for cast API to be ready to request the session."),Xmg.push(g.cm("yt-remote-cast2-api-ready",dd4))):y8("requestCastSelector: Cast is not initialized."):y8("requestCastSelector: Cast API is not installed!")}, Zg=function(R,F){j4()?qc().setConnectedScreenStatus(R,F):y8("setConnectedScreenStatus called before ready.")},fbv=function(){var R=g.ol().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.kK||R},Pnt=function(R,F){qc().init(R,F)},jD7=function(R,F){var h=!1; qc()||(R=new xv(R,F),R.subscribe("yt-remote-cast2-availability-change",function(a){g.fn("yt-remote-cast-available",a);sC("yt-remote-cast2-availability-change",a)}),R.subscribe("yt-remote-cast2-receiver-selected",function(a){T5("onReceiverSelected: "+a.friendlyName); g.fn("yt-remote-cast-receiver",a);sC("yt-remote-cast2-receiver-selected",a)}),R.subscribe("yt-remote-cast2-receiver-resumed",function(a){T5("onReceiverResumed: "+a.friendlyName); g.fn("yt-remote-cast-receiver",a);sC("yt-remote-cast2-receiver-resumed",a)}),R.subscribe("yt-remote-cast2-session-change",function(a){T5("onSessionChange: "+ir(a)); a||g.Z1("yt-remote-cast-receiver");sC("yt-remote-cast2-session-change",a)}),g.Fk("yt.mdx.remote.cloudview.instance_",R),h=!0); T5("cloudview.createSingleton_: "+h);return h},qc=function(){return g.hG("yt.mdx.remote.cloudview.instance_")},bdL=function(R,F){SPU(!0); Zd7(!1);Pnt(R,function(h){h?(o3e(!0),g.Re("yt-remote-cast2-api-ready")):(y8("Failed to initialize cast API."),SPU(!1),g.Z1("yt-remote-cast-available"),g.Z1("yt-remote-cast-receiver"),Odt());F(h)})},T5=function(R){FE("cloudview",R)},y8=function(R){FE("cloudview",R)},SPU=function(R){T5("setCastInstalled_ "+R); g.fn("yt-remote-cast-installed",R)},j4=function(){return!!g.hG("yt.mdx.remote.cloudview.apiReady_")},o3e=function(R){T5("setApiReady_ "+R); g.Fk("yt.mdx.remote.cloudview.apiReady_",R)},Zd7=function(R){g.Fk("yt.mdx.remote.cloudview.initializing_",R)},bq=function(R){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.N=this.S=0;this.trackData=null;this.NC=this.xJ=!1;this.Z=this.K=this.Y=this.D=0;this.B=NaN;this.L=!1;this.reset(R)},zQ4=function(R){R.audioTrackId=null; R.trackData=null;R.playerState=-1;R.xJ=!1;R.NC=!1;R.S=0;R.N=g.w7();R.D=0;R.Y=0;R.K=0;R.Z=0;R.B=NaN;R.L=!1},S4=function(R){return R.isPlaying()?(g.w7()-R.N)/1E3:0},OB=function(R,F){R.S=F; R.N=g.w7()},mJ=function(R){switch(R.playerState){case 1:case 1081:return(g.w7()-R.N)/1E3+R.S; case -1E3:return 0}return R.S},Kq7=function(R){return R.L?R.Y+S4(R):R.Y},ov=function(R,F,h){var a=R.videoId; R.videoId=F;R.index=h;F!=a&&zQ4(R)},tlt=function(R){var F={}; F.index=R.index;F.listId=R.listId;F.videoId=R.videoId;F.playerState=R.playerState;F.volume=R.volume;F.muted=R.muted;F.audioTrackId=R.audioTrackId;F.trackData=g.pM(R.trackData);F.hasPrevious=R.xJ;F.hasNext=R.NC;F.playerTime=R.S;F.playerTimeAt=R.N;F.seekableStart=R.D;F.seekableEnd=R.Y;F.duration=R.K;F.loadedTime=R.Z;F.liveIngestionTime=R.B;return F},e4=function(R,F){g.h0.call(this); var h=this;this.K=0;this.L=R;this.S=[];this.N=new EVe;this.D=this.B=null;this.C=(0,g.Ge)(this.Jbu,this);this.Y=(0,g.Ge)(this.MJ,this);this.Z=(0,g.Ge)(this.wGn,this);this.oR=(0,g.Ge)(this.tln,this);var a=0;R?(a=R.getProxyState(),a!=3&&(R.subscribe("proxyStateChange",this.TB,this),lb4(this))):a=3;a!=0&&(F?this.TB(a):g.Eg(function(){h.TB(a)},0)); (R=u8e())&&XE(this,R);this.subscribe("yt-remote-cast2-session-change",this.oR)},n0=function(R){return new bq(R.L.getPlayerContextData())},lb4=function(R){g.Uv("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(F){this.S.push(this.L.subscribe(F,g.Iu(this.rpI,F),this))},R)},Dd4=function(R){g.Uv(R.S,function(F){this.L.unsubscribeByKey(F)},R); R.S.length=0},uq=function(R){return R.getState()==1},dc=function(R,F){var h=R.N; h.B.length+h.D.length<50&&R.N.enqueue(F)},Vl6=function(R,F,h){var a=n0(R); OB(a,h);a.playerState!=-1E3&&(a.playerState=F);PA(R,a)},z5=function(R,F,h){R.L.sendMessage(F,h)},PA=function(R,F){Dd4(R); R.L.setPlayerContextData(tlt(F));lb4(R)},XE=function(R,F){R.D&&(R.D.removeUpdateListener(R.C),R.D.removeMediaListener(R.Y),R.MJ(null)); R.D=F;R.D&&(hW("Setting cast session: "+R.D.sessionId),R.D.addUpdateListener(R.C),R.D.addMediaListener(R.Y),R.D.media.length&&R.MJ(R.D.media[0]))},Udu=function(R){var F=R.B.media,h=R.B.customData; if(F&&h){var a=n0(R);F.contentId!=a.videoId&&hW("Cast changing video to: "+F.contentId);a.videoId=F.contentId;a.playerState=h.playerState;OB(a,R.B.getEstimatedTime());PA(R,a)}else hW("No cast media video. Ignoring state update.")},K0=function(R,F,h){return(0,g.Ge)(function(a){this.UG("Failed to "+F+" with cast v2 channel. Error code: "+a.code); a.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.UG("Retrying "+F+" using MDx browser channel."),z5(this,F,h))},R)},Dg=function(R,F,h,a){a=a===void 0?!1:a; g.h0.call(this);var J=this;this.S=NaN;this.Uz=!1;this.C=this.Z=this.aR=this.KI=NaN;this.oR=[];this.N=this.Y=this.L=this.B=this.D=null;this.Sl=R;this.Oz=a;this.oR.push(g.QG(window,"beforeunload",function(){J.aA(2)})); this.K=[];this.B=new bq;this.NQ=F.id;this.fI=F.idType;this.D=Om7(this.Sl,h,this.zZ,this.fI=="shortLived",this.NQ);this.D.listen("channelOpened",function(){Cn4(J)}); this.D.listen("channelClosed",function(){tW("Channel closed");isNaN(J.S)?r2(!0):r2();J.dispose()}); this.D.listen("channelError",function(M){r2();isNaN(J.DS())?(M==1&&J.fI=="shortLived"&&J.publish("browserChannelAuthError",M),tW("Channel error: "+M+" without reconnection"),J.dispose()):(J.Uz=!0,tW("Channel error: "+M+" with reconnection in "+J.DS()+" ms"),lq(J,2))}); this.D.listen("channelMessage",function(M){cq9(J,M)}); this.D.Rk(F.token);this.subscribe("remoteQueueChange",function(){var M=J.B.videoId;g.bH()&&g.fn("yt-remote-session-video-id",M)})},Wq9=function(R){return g.QL(R.K,function(F){return F.type=="LOUNGE_SCREEN"})},tW=function(R){FE("conn",R)},lq=function(R,F){R.publish("proxyStateChange",F)},RIU=function(R){R.S=g.Eg(function(){tW("Connecting timeout"); R.aA(1)},2E4)},FTg=function(R){g.rb(R.S); R.S=NaN},hI9=function(R){g.rb(R.KI); R.KI=NaN},J_7=function(R){ajU(R); R.aR=g.Eg(function(){V8(R,"getNowPlaying")},2E4)},ajU=function(R){g.rb(R.aR); R.aR=NaN},Cn4=function(R){tW("Channel opened"); R.Uz&&(R.Uz=!1,hI9(R),R.KI=g.Eg(function(){tW("Timing out waiting for a screen.");R.aA(1)},15E3))},vG6=function(R,F){var h=null; if(F){var a=Wq9(R);a&&(h={clientName:a.clientName,deviceMake:a.brand,deviceModel:a.model,osVersion:a.osVersion})}g.Fk("yt.mdx.remote.remoteClient_",h);F&&(FTg(R),hI9(R));h=R.D.gX()&&isNaN(R.S);F==h?F&&(lq(R,1),V8(R,"getSubtitlesTrack")):F?(R.Ly()&&R.B.reset(),lq(R,1),V8(R,"getNowPlaying"),M_v(R)):R.aA(1)},gG7=function(R,F){var h=F.params.videoId; delete F.params.videoId;h==R.B.videoId&&(g.BV(F.params)?R.B.trackData=null:R.B.trackData=F.params,R.publish("remotePlayerChange"))},Gs6=function(R,F,h){var a=F.params.videoId||F.params.video_id,J=parseInt(F.params.currentIndex,10); R.B.listId=F.params.listId||R.B.listId;ov(R.B,a,J);R.publish("remoteQueueChange",h)},iw4=function(R,F){F.params=F.params||{}; Gs6(R,F,"NOW_PLAYING_MAY_CHANGE");IjG(R,F);R.publish("autoplayDismissed")},IjG=function(R,F){var h=parseInt(F.params.currentTime||F.params.current_time,10); OB(R.B,isNaN(h)?0:h);h=parseInt(F.params.state,10);h=isNaN(h)?-1:h;h==-1&&R.B.playerState==-1E3&&(h=-1E3);R.B.playerState=h;h=Number(F.params.loadedTime);R.B.Z=isNaN(h)?0:h;R.B.Td(Number(F.params.duration));h=R.B;var a=Number(F.params.liveIngestionTime);h.B=a;h.L=isNaN(a)?!1:!0;h=R.B;a=Number(F.params.seekableStartTime);F=Number(F.params.seekableEndTime);h.D=isNaN(a)?0:a;h.Y=isNaN(F)?0:F;R.B.playerState==1?J_7(R):ajU(R);R.publish("remotePlayerChange")},wOh=function(R,F){if(R.B.playerState!=-1E3){var h= 1085; switch(parseInt(F.params.adState,10)){case 1:h=1081;break;case 2:h=1084;break;case 0:h=1083}R.B.playerState=h;F=parseInt(F.params.currentTime,10);OB(R.B,isNaN(F)?0:F);R.publish("remotePlayerChange")}},EGu=function(R,F){var h=F.params.muted=="true"; R.B.volume=parseInt(F.params.volume,10);R.B.muted=h;R.publish("remotePlayerChange")},B_u=function(R,F){R.Y=F.params.videoId; R.publish("nowAutoplaying",parseInt(F.params.timeout,10))},r_L=function(R,F){R.Y=F.params.videoId||null; R.publish("autoplayUpNext",R.Y)},YY7=function(R,F){R.N=F.params.autoplayMode; R.publish("autoplayModeChange",R.N);R.N=="DISABLED"&&R.publish("autoplayDismissed")},set=function(R,F){var h=F.params.hasNext=="true"; R.B.xJ=F.params.hasPrevious=="true";R.B.NC=h;R.publish("previousNextChange")},cq9=function(R,F){F=F.message; F.params?tW("Received: action="+F.action+", params="+g.ue(F.params)):tW("Received: action="+F.action+" {}");switch(F.action){case "loungeStatus":F=h6(F.params.devices);R.K=g.p1(F,function(a){return new g2(a)}); F=!!g.QL(R.K,function(a){return a.type=="LOUNGE_SCREEN"}); vG6(R,F);F=R.GR("mlm");R.publish("multiStateLoopEnabled",F);break;case "loungeScreenDisconnected":g.q4(R.K,function(a){return a.type=="LOUNGE_SCREEN"}); vG6(R,!1);break;case "remoteConnected":var h=new g2(h6(F.params.device));g.QL(R.K,function(a){return a.equals(h)})||pkk(R.K,h); break;case "remoteDisconnected":h=new g2(h6(F.params.device));g.q4(R.K,function(a){return a.equals(h)}); break;case "gracefulDisconnect":break;case "playlistModified":Gs6(R,F,"QUEUE_MODIFIED");break;case "nowPlaying":iw4(R,F);break;case "onStateChange":IjG(R,F);break;case "onAdStateChange":wOh(R,F);break;case "onVolumeChanged":EGu(R,F);break;case "onSubtitlesTrackChanged":gG7(R,F);break;case "nowAutoplaying":B_u(R,F);break;case "autoplayDismissed":R.publish("autoplayDismissed");break;case "autoplayUpNext":r_L(R,F);break;case "onAutoplayModeChanged":YY7(R,F);break;case "onHasPreviousNextChanged":set(R, F);break;case "requestAssistedSignIn":R.publish("assistedSignInRequested",F.params.authCode);break;case "onLoopModeChanged":R.publish("loopModeChange",F.params.loopMode);break;default:tW("Unrecognized action: "+F.action)}},M_v=function(R){g.rb(R.C); R.C=g.Eg(function(){R.aA(1)},864E5)},V8=function(R,F,h){h?tW("Sending: action="+F+", params="+g.ue(h)):tW("Sending: action="+F); R.D.sendMessage(F,h)},pO4=function(R){vA.call(this,"ScreenServiceProxy"); this.UT=R;this.B=[];this.B.push(this.UT.$_s("screenChange",(0,g.Ge)(this.tR,this)));this.B.push(this.UT.$_s("onlineScreenChange",(0,g.Ge)(this.Mwo,this)))},x_u=function(R,F){p6U(); if(!YZ||!YZ.get("yt-remote-disable-remote-module-for-dev")){F=g.Kp("MDX_CONFIG")||F;G67();E$U();UB||(UB=new c7(F?F.loungeApiHost:void 0),k6v()&&(UB.B="/api/loungedev"));C0||(C0=g.hG("yt.mdx.remote.deferredProxies_")||[],g.Fk("yt.mdx.remote.deferredProxies_",C0));ks4();var h=cA();if(!h){var a=new EB(UB,F?F.disableAutomaticScreenCache||!1:!1);g.Fk("yt.mdx.remote.screenService_",a);h=cA();var J={};F&&(J={appId:F.appId,disableDial:F.disableDial,theme:F.theme,loadCastApiSetupScript:F.loadCastApiSetupScript, disableCastApi:F.disableCastApi,enableDialLoungeToken:F.enableDialLoungeToken,enableCastLoungeToken:F.enableCastLoungeToken,forceMirroring:F.forceMirroring});g.Fk("yt.mdx.remote.enableConnectWithInitialState_",F?F.enableConnectWithInitialState||!1:!1);mdv(R,a,function(M){M?WA()&&Zg(WA(),"YouTube TV"):a.subscribe("onlineScreenChange",function(){sC("yt-remote-receiver-availability-change")})},J)}F&&!g.hG("yt.mdx.remote.initialized_")&&(g.Fk("yt.mdx.remote.initialized_",!0),Rb("Initializing: "+g.ue(F)), FY.push(g.cm("yt-remote-cast2-api-ready",function(){sC("yt-remote-api-ready")})),FY.push(g.cm("yt-remote-cast2-availability-change",function(){sC("yt-remote-receiver-availability-change")})),FY.push(g.cm("yt-remote-cast2-receiver-selected",function(){hZ(null); sC("yt-remote-auto-connect","cast-selector-receiver")})),FY.push(g.cm("yt-remote-cast2-receiver-resumed",function(){sC("yt-remote-receiver-resumed","cast-selector-receiver")})),FY.push(g.cm("yt-remote-cast2-session-change",Qe4)),FY.push(g.cm("yt-remote-connection-change",function(M){M?Zg(WA(),"YouTube TV"):ab()||(Zg(null,null),n37())})),FY.push(g.cm("yt-remote-cast2-session-failed",function(){sC("yt-remote-connection-failed")})),R=$_U(),F.isAuto&&(R.id+="#dial"),J=F.capabilities||[],J.length>0&&(R.capabilities= J),R.name=F.device,R.app=F.app,(F=F.theme)&&(R.theme=F),Rb(" -- with channel params: "+g.ue(R)),R?(g.fn("yt-remote-session-app",R.app),g.fn("yt-remote-session-name",R.name)):(g.Z1("yt-remote-session-app"),g.Z1("yt-remote-session-name")),g.Fk("yt.mdx.remote.channelParams_",R),h.start(),WA()||A_7())}},N_k=function(){var R=cA().UT.$_gos(); var F=JZ();F&&MV()&&(g$4(R,F)||R.push(F));return v$k(R)},LTe=function(){var R=Hwe(); !R&&f0()&&eQL()&&(R={key:"cast-selector-receiver",name:eQL()});return R},Hwe=function(){var R=N_k(),F=JZ(); F||(F=ab());return g.QL(R,function(h){return F&&IE(F,h.key)?!0:!1})},JZ=function(){var R=WA(); if(!R)return null;var F=cA().v9();return w2(F,R)},Qe4=function(R){Rb("remote.onCastSessionChange_: "+ir(R)); if(R){var F=JZ();if(F&&F.id==R.id){if(Zg(F.id,"YouTube TV"),R.idType=="shortLived"&&(R=R.token))vt&&(vt.token=R),(F=MV())&&F.Rk(R)}else F&&gm(),G_(R,1)}else MV()&&gm()},gm=function(){j4()?qc().stopSession():y8("stopSession called before API ready."); var R=MV();R&&(R.disconnect(1),T_u(null))},y_7=function(){var R=MV(); return!!R&&R.getProxyState()!=3},Rb=function(R){FE("remote",R)},cA=function(){if(!qY4){var R=g.hG("yt.mdx.remote.screenService_"); qY4=R?new pO4(R):null}return qY4},WA=function(){return g.hG("yt.mdx.remote.currentScreenId_")},fjk=function(R){g.Fk("yt.mdx.remote.currentScreenId_",R)},je9=function(){return g.hG("yt.mdx.remote.connectData_")},hZ=function(R){g.Fk("yt.mdx.remote.connectData_",R)},MV=function(){return g.hG("yt.mdx.remote.connection_")},T_u=function(R){var F=MV(); hZ(null);R||fjk("");g.Fk("yt.mdx.remote.connection_",R);C0&&(g.Uv(C0,function(h){h(R)}),C0.length=0); F&&!R?sC("yt-remote-connection-change",!1):!F&&R&&sC("yt-remote-connection-change",!0)},ab=function(){var R=g.bH(); if(!R)return null;var F=cA();if(!F)return null;F=F.v9();return w2(F,R)},G_=function(R,F){WA(); JZ()&&JZ();if(Ib)vt=R;else{fjk(R.id);var h=g.hG("yt.mdx.remote.enableConnectWithInitialState_")||!1;R=new Dg(UB,R,$_U(),h);R.connect(F,je9());R.subscribe("beforeDisconnect",function(a){sC("yt-remote-before-disconnect",a)}); R.subscribe("beforeDispose",function(){MV()&&(MV(),T_u(null))}); R.subscribe("browserChannelAuthError",function(){var a=JZ();a&&a.idType=="shortLived"&&(j4()?qc().handleBrowserChannelAuthError():y8("refreshLoungeToken called before API ready."))}); T_u(R)}},A_7=function(){var R=ab(); R?(Rb("Resume connection to: "+ir(R)),G_(R,0)):(r2(),n37(),Rb("Skipping connecting because no session screen found."))},ks4=function(){var R=$_U(); if(g.BV(R)){R=B7();var F=g.jA("yt-remote-session-name")||"",h=g.jA("yt-remote-session-app")||"";R={device:"REMOTE_CONTROL",id:R,name:F,app:h,mdxVersion:3};R.authuser=String(g.Kp("SESSION_INDEX","0"));(F=g.Kp("DELEGATED_SESSION_ID"))&&(R.pageId=String(F));g.Fk("yt.mdx.remote.channelParams_",R)}},$_U=function(){return g.hG("yt.mdx.remote.channelParams_")||{}},SYv=function(R,F,h){g.d.call(this); var a=this;this.B=R;this.U=F;this.z_=h;this.events=new g.xK(this);this.N=!1;this.S=new g.$u(64);this.D=new g.DY(this.lW,500,this);this.K=new g.DY(this.Ps,1E3,this);this.Z=new QN(this.FAz,0,this);this.L={};this.C=new g.DY(this.JB,1E3,this);this.Y=new g.c9(this.seekTo,1E3,this);this.oR=this.events.T(this.U,"onVolumeChange",function(J){Zwe(a,J)}); g.z(this,this.events);this.events.T(F,"onCaptionsTrackListChanged",this.LCz);this.events.T(F,"captionschanged",this.goo);this.events.T(F,"captionssettingschanged",this.Hs);this.events.T(F,"videoplayerreset",this.xN);this.events.T(F,"mdxautoplaycancel",function(){a.z_.RK()}); F.X("enable_mdx_video_play_directly")&&this.events.T(F,"videodatachange",function(){bwu(a.B)||iF(a)||wm(a,0)}); R=this.z_;R.RR();R.subscribe("proxyStateChange",this.QN,this);R.subscribe("remotePlayerChange",this.gm,this);R.subscribe("remoteQueueChange",this.xN,this);R.subscribe("previousNextChange",this.Hr,this);R.subscribe("nowAutoplaying",this.IW,this);R.subscribe("autoplayDismissed",this.RW,this);g.z(this,this.D);g.z(this,this.K);g.z(this,this.Z);g.z(this,this.C);g.z(this,this.Y);this.Hs();this.xN();this.gm()},Zwe=function(R,F){if(iF(R)){R.z_.unsubscribe("remotePlayerChange",R.gm,R); var h=Math.round(F.volume);F=!!F.muted;var a=n0(R.z_);if(h!==a.volume||F!==a.muted)R.z_.setVolume(h,F),R.C.start();R.z_.subscribe("remotePlayerChange",R.gm,R)}},Ow7=function(R){R.Na(0); R.D.stop();R.aT(new g.$u(64))},m_G=function(R,F){if(iF(R)&&!R.N){var h=null; F&&(h={style:R.U.getSubtitlesUserSettings()},Object.assign(h,F));R.z_.nM(R.U.getVideoData(1).videoId,h);R.L=n0(R.z_).trackData}},wm=function(R,F){var h=R.U.getPlaylist(); if(h==null?0:h.listId){var a=h.index;var J=h.listId.toString()}h=R.U.getVideoData(1);R.z_.playVideo(h.videoId,F,a,J,h.playerParams,h.Sl,sM7(h));R.aT(new g.$u(1))},oGv=function(R,F){if(F){var h=R.U.getOption("captions","tracklist",{BH:1}); h&&h.length?(R.U.setOption("captions","track",F),R.N=!1):(R.U.loadModule("captions"),R.N=!0)}else R.U.setOption("captions","track",{})},iF=function(R){return n0(R.z_).videoId===R.U.getVideoData(1).videoId},XOe=function(R,F){g.Kc.call(this,R); this.B=F},Ez=function(){g.D.call(this,{G:"div", J:"ytp-mdx-popup-dialog",j:{role:"dialog"},V:[{G:"div",J:"ytp-mdx-popup-dialog-inner-content",V:[{G:"div",J:"ytp-mdx-popup-title",Dn:"You're signed out"},{G:"div",J:"ytp-mdx-popup-description",Dn:"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."},{G:"div",J:"ytp-mdx-privacy-popup-buttons",V:[{G:"button",sz:["ytp-button","ytp-mdx-privacy-popup-cancel"],Dn:"Cancel"},{G:"button",sz:["ytp-button", "ytp-mdx-privacy-popup-confirm"],Dn:"Confirm"}]}]}]});this.fade=new g.CB(this,250);this.cancelButton=this.mI("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.mI("ytp-mdx-privacy-popup-confirm");g.z(this,this.fade);this.T(this.cancelButton,"click",this.B);this.T(this.confirmButton,"click",this.D)},Bt=function(R){g.D.call(this,{G:"div", J:"ytp-remote",V:[{G:"div",J:"ytp-remote-display-status",V:[{G:"div",J:"ytp-remote-display-status-icon",V:[g.EOi()]},{G:"div",J:"ytp-remote-display-status-text",Dn:"{{statustext}}"}]}]});this.api=R;this.fade=new g.CB(this,250);g.z(this,this.fade);this.T(R,"presentingplayerstatechange",this.onStateChange);this.wf(R.getPlayerStateObject())},rm=function(R,F){g.Xq.call(this,"Play on",1,R,F); this.U=R;this.kz={};this.T(R,"onMdxReceiversChange",this.L);this.T(R,"presentingplayerstatechange",this.L);this.L()},eIg=function(R){g.Hb.call(this,R); this.ij={key:Mnk(),name:"This computer"};this.B4=null;this.subscriptions=[];this.w9=this.z_=null;this.kz=[this.ij];this.Em=this.ij;this.Wc=new g.$u(64);this.N1=0;this.m3=-1;this.z1=!1;this.GT=this.nx=this.FD=null;if(!g.Uk(this.player.W())&&!g.b5(this.player.W())){R=this.player;var F=g.Hn(R);F&&(F=F.v1())&&(F=new rm(R,F),g.z(this,F));F=new Bt(R);g.z(this,F);g.Pn(R,F.element,4);this.FD=new Ez;g.z(this,this.FD);g.Pn(R,this.FD.element,4);this.z1=!!ab()}},Y2=function(R){R.nx&&(R.player.removeEventListener("presentingplayerstatechange", R.nx),R.nx=null)},nG4=function(R,F,h){R.Wc=h; R.player.publish("presentingplayerstatechange",new g.G2(h,F))},sz=function(R,F){if(F.key!==R.Em.key)if(F.key===R.ij.key)gm(); else if(bwu(R)&&u5g(R),R.Em=F,!R.player.W().X("disable_mdx_connection_in_mdx_module_for_music_web")||!g.b5(R.player.W())){var h=R.player.getPlaylistId();var a=R.player.getVideoData(1);var J=a.videoId;if(!h&&!J||(R.player.getAppState()===2||R.player.getAppState()===1)&&R.player.W().X("should_clear_video_data_on_player_cued_unstarted"))a=null;else{var M=R.player.getPlaylist();if(M){var v=[];for(var I=0;I2*this.size&&v7(this),!0):!1}; g.Q.get=function(R,F){return J6(this.D,R)?this.D[R]:F}; g.Q.set=function(R,F){J6(this.D,R)||(this.size+=1,this.B.push(R),this.BY++);this.D[R]=F}; g.Q.forEach=function(R,F){for(var h=this.yj(),a=0;a=a.B.length)return g.B2;var M=a.B[F++];return g.xj(R?M:a.D[M])}; return J}; var Op4={p_A:"atp",bXI:"ska",dnI:"que",AIb:"mus",TTA:"sus",HBz:"dsp",c5G:"seq",E_l:"mic",dIu:"dpa",G5o:"mlm",o7o:"dsdtr",NYo:"ntb",MXI:"vsp",s3I:"scn",EYn:"rpe",zVQ:"dcn",Ctt:"dcp",Iko:"pas",B4l:"drq",X9l:"opf",reI:"els",AeI:"isg",qUu:"svq",UCI:"mvp",Lau:"ads",VEo:"stcp",X4G:"sads",uOo:"dloc",E7R:"dcw",GVQ:"asw",fqz:"apw"},mgk={O7n:"u",kT$:"cl",tbG:"k",i$I:"i",W3G:"cr",rIn:"m",g7u:"g",LR:"up"},$UU={aD:"adPlaying",uE:"onAdStateChange"},AY9={q0$:"nowPlaying",Pbl:"onStateChange",aD:"adPlaying",uE:"onAdStateChange", zo:"nowPlayingShorts",Bj:"onShortsStateChange"},xUL={zo:"nowPlayingShorts",Bj:"onShortsStateChange"};g2.prototype.equals=function(R){return R?this.id==R.id:!1}; var w6g="",YZ=null;g.A(Qzt,g.Ox);var pC,y37=A3L("loadCastFramework")||A3L("loadCastApplicationFramework"),jzh=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Bh(QN,g.d);g.Q=QN.prototype;g.Q.Gx=function(R){this.L=arguments;this.B=!1;this.tp?this.K=g.w7()+this.W_:this.tp=g.o2(this.N,this.W_)}; g.Q.stop=function(){this.tp&&(g.Wi.clearTimeout(this.tp),this.tp=null);this.K=null;this.B=!1;this.L=[]}; g.Q.pause=function(){++this.D}; g.Q.resume=function(){this.D&&(--this.D,!this.D&&this.B&&(this.B=!1,this.S.apply(null,this.L)))}; g.Q.Ez=function(){this.stop();QN.dk.Ez.call(this)}; g.Q.UV=function(){this.tp&&(g.Wi.clearTimeout(this.tp),this.tp=null);this.K?(this.tp=g.o2(this.N,this.K-g.w7()),this.K=null):this.D?this.B=!0:(this.B=!1,this.S.apply(null,this.L))};$Z.prototype.stringify=function(R){return g.Wi.JSON.stringify(R,void 0)}; $Z.prototype.parse=function(R){return g.Wi.JSON.parse(R,void 0)};g.Bh(bRv,g.tV);g.Bh(Sg7,g.tV);var OR6=null;g.Bh(o$6,g.tV);g.Bh(X6U,g.tV);g.Bh(e$9,g.tV);H7.prototype.debug=function(){}; H7.prototype.info=function(){}; H7.prototype.warning=function(){};var lD9={},tn7={};g.Q=LC.prototype;g.Q.setTimeout=function(R){this.HG=R}; g.Q.rR=function(R){R=R.target;var F=this.IR;F&&g.le(R)==3?F.HT():this.NT(R)}; g.Q.NT=function(R){try{if(R==this.B)a:{var F=g.le(this.B),h=this.B.D,a=this.B.getStatus();if(!(F<3)&&(F!=3||this.B&&(this.D.D||g.V0(this.B)||g.UL(this.B)))){this.Oz||F!=4||h==7||(h==8||a<=0?A6(3):A6(2));Ulu(this);var J=this.B.getStatus();this.EP=J;var M=KKg(this);if(this.S=J==200){if(this.iY&&!this.PG){b:{if(this.B){var v=g.CJ(this.B,"X-HTTP-Initial-Response");if(v&&!g.jP(v)){var I=v;break b}}I=null}if(R=I)this.PG=!0,MAU(this,R);else{this.S=!1;this.N=3;xZ(12);yN(this);qP(this);break a}}if(this.fI){R= !0;for(var w;!this.Oz&&this.Y0&&!this.Sw&&(this.Sw=!0,this.K.I8(this)):(yN(this),qP(this))}else MAU(this,M);F==4&&yN(this);this.S&&!this.Oz&&(F==4?CB4(this.K,this):(this.S=!1,Tk(this)))}else g.xhI(this.B),J==400&&M.indexOf("Unknown SID")> 0?(this.N=3,xZ(12)):(this.N=0,xZ(13)),yN(this),qP(this)}}}catch(E){}finally{}}; g.Q.cancel=function(){this.Oz=!0;yN(this)}; g.Q.AR=function(){this.oR=null;var R=Date.now();R-this.nI>=0?(this.NQ!=2&&(A6(3),xZ(17)),yN(this),this.N=2,qP(this)):Vn4(this,this.nI-R)}; g.Q.getLastError=function(){return this.N}; g.Q.nT=function(){return this.B};gOu.prototype.cancel=function(){this.K=I1G(this);if(this.D)this.D.cancel(),this.D=null;else if(this.B&&this.B.size!==0){for(var R=g.N(this.B.values()),F=R.next();!F.done;F=R.next())F.value.cancel();this.B.clear()}};g.Q=rsv.prototype;g.Q.qT=8;g.Q.jq=1;g.Q.connect=function(R,F,h,a){xZ(0);this.gW=R;this.Oz=F||{};h&&a!==void 0&&(this.Oz.OSID=h,this.Oz.OAID=a);this.PG=this.It;this.Sl=hNg(this,null,this.gW);br(this)}; g.Q.disconnect=function(){sAt(this);if(this.jq==3){var R=this.Fo++,F=this.Sl.clone();g.EX(F,"SID",this.L);g.EX(F,"RID",R);g.EX(F,"TYPE","terminate");mV(this,F);R=new LC(this,this.L,R);R.NQ=2;R.Z=RE(F.clone());F=!1;if(g.Wi.navigator&&g.Wi.navigator.sendBeacon)try{F=g.Wi.navigator.sendBeacon(R.Z.toString(),"")}catch(h){}!F&&g.Wi.Image&&((new Image).src=R.Z,F=!0);F||(R.B=PB4(R.K,null),R.B.send(R.Z));R.KI=Date.now();Tk(R)}xm7(this)}; g.Q.VV=function(){return this.jq==0}; g.Q.getState=function(){return this.jq}; g.Q.h3=function(R){if(this.S)if(this.S=null,this.jq==1){if(!R){this.Fo=Math.floor(Math.random()*1E5);R=this.Fo++;var F=new LC(this,"",R),h=this.C;this.EP&&(h?(h=g.sR(h),g.km(h,this.EP)):h=this.EP);this.Y!==null||this.nI||(F.Sl=h,h=null);var a;if(this.uY)a:{for(var J=a=0;J4096){a=J;break a}if(a===4096||J===this.K.length-1){a=J+1;break a}}a= 1E3}else a=1E3;a=QA6(this,F,a);J=this.Sl.clone();g.EX(J,"RID",R);g.EX(J,"CVER",22);this.fI&&g.EX(J,"X-HTTP-Session-Id",this.fI);mV(this,J);h&&(this.nI?a="headers="+g.yT(g.PE_(h))+"&"+a:this.Y&&g.sX(J,this.Y,h));FiL(this.D,F);this.Y6&&g.EX(J,"TYPE","init");this.uY?(g.EX(J,"$req",a),g.EX(J,"SID","null"),F.iY=!0,dlh(F,J,null)):dlh(F,J,a);this.jq=2}}else this.jq==3&&(R?$mt(this,R):this.K.length==0||GPU(this.D)||$mt(this))}; g.Q.kx=function(){this.Z=null;As6(this);if(this.FW&&!(this.HG||this.B==null||this.Xf<=0)){var R=2*this.Xf;this.Uz=NP((0,g.Ge)(this.PuR,this),R)}}; g.Q.PuR=function(){this.Uz&&(this.Uz=null,this.PG=!1,this.HG=!0,xZ(10),jF(this),As6(this))}; g.Q.I8=function(R){this.B==R&&this.FW&&!this.HG&&(YKL(this),this.HG=!0,xZ(11))}; g.Q.sV=function(){this.oR!=null&&(this.oR=null,jF(this),WKv(this),xZ(19))}; g.Q.vXt=function(R){R?xZ(2):xZ(1)}; g.Q.isActive=function(){return!!this.N&&this.N.isActive(this)}; g.Q=Hn7.prototype;g.Q.Yx=function(){}; g.Q.Pb=function(){}; g.Q.lM=function(){}; g.Q.XE=function(){}; g.Q.isActive=function(){return!0}; g.Q.Sf=function(){};g.Bh(X4,g.EL);X4.prototype.open=function(){this.B.N=this.K;this.S&&(this.B.NQ=!0);this.B.connect(this.N,this.D||void 0)}; X4.prototype.close=function(){this.B.disconnect()}; X4.prototype.send=function(R){var F=this.B;if(typeof R==="string"){var h={};h.__data__=R;R=h}else this.L&&(h={},h.__data__=g.ue(R),R=h);F.K.push(new vO7(F.Ig++,R));F.jq==3&&br(F)}; X4.prototype.Ez=function(){this.B.N=null;delete this.K;this.B.disconnect();delete this.B;X4.dk.Ez.call(this)}; g.Bh(TKv,bRv);g.Bh(ys9,Sg7);g.Bh(oE,Hn7);oE.prototype.Yx=function(){this.B.dispatchEvent("m")}; oE.prototype.Pb=function(R){this.B.dispatchEvent(new TKv(R))}; oE.prototype.lM=function(R){this.B.dispatchEvent(new ys9(R))}; oE.prototype.XE=function(){this.B.dispatchEvent("n")};var nC=new g.EL;g.A(jA4,g.tV);g.Q=d2.prototype;g.Q.K5=null;g.Q.bz=!1;g.Q.RU=null;g.Q.xb=null;g.Q.mX=null;g.Q.TU=null;g.Q.pJ=null;g.Q.Js=null;g.Q.f5=null;g.Q.LB=null;g.Q.Ix=0;g.Q.mp=null;g.Q.b_=null;g.Q.L5=null;g.Q.KJ=-1;g.Q.Ex=!0;g.Q.iN=!1;g.Q.VJ=0;g.Q.wN=null;var oO9={},mm6={};g.Q=d2.prototype;g.Q.setTimeout=function(R){this.D=R}; g.Q.cX=function(R){R=R.target;var F=this.wN;F&&g.le(R)==3?F.HT():this.wd(R)}; g.Q.wd=function(R){try{if(R==this.LB)a:{var F=g.le(this.LB),h=this.LB.D,a=this.LB.getStatus();if(g.IG&&!g.nh("420+")){if(F<4)break a}else if(F<3||F==3&&!g.V0(this.LB))break a;this.iN||F!=4||h==7||(h==8||a<=0?this.B.QZ(3):this.B.QZ(2));nOU(this);var J=this.LB.getStatus();this.KJ=J;var M=g.V0(this.LB);if(this.bz=J==200){F==4&&P7(this);if(this.fI){for(R=!0;!this.iN&&this.Ix0?(this.L5=3,ur(13)):(this.L5=0,ur(14)),P7(this),uBG(this)}}catch(I){}finally{}}; g.Q.cancel=function(){this.iN=!0;P7(this)}; g.Q.vX=function(){this.RU=null;var R=Date.now();R-this.xb>=0?(this.TU!=2&&this.B.QZ(3),P7(this),this.L5=2,ur(18),uBG(this)):eNg(this,this.xb-R)}; g.Q.getLastError=function(){return this.L5};g.Q=KiL.prototype;g.Q.QJ=null;g.Q.oH=null;g.Q.c8=!1;g.Q.z4=null;g.Q.x_=null;g.Q.i7=-1;g.Q.ZW=null;g.Q.BP=null;g.Q.connect=function(R){this.z4=R;R=KC(this.B,null,this.z4);ur(3);Date.now();var F=this.B.C;F!=null?(this.ZW=F[0],(this.BP=F[1])?(this.x_=1,tAu(this)):(this.x_=2,l17(this))):(F4(R,"MODE","init"),this.oH=new d2(this),this.oH.K5=this.QJ,SKu(this.oH,R,!1,null,!0),this.x_=0)}; g.Q.VU=function(R){if(R)this.x_=2,l17(this);else{ur(4);var F=this.B;F.v0=F.dj.i7;VN(F,9)}R&&this.QZ(2)}; g.Q.eL=function(R){return this.B.eL(R)}; g.Q.abort=function(){this.oH&&(this.oH.cancel(),this.oH=null);this.i7=-1}; g.Q.VV=function(){return!1}; g.Q.J3=function(R,F){this.i7=R.KJ;if(this.x_==0)if(F){try{var h=this.D.parse(F)}catch(a){R=this.B;R.v0=this.i7;VN(R,2);return}this.ZW=h[0];this.BP=h[1]}else R=this.B,R.v0=this.i7,VN(R,2);else this.x_==2&&(this.c8?(ur(7),Date.now()):F=="11111"?(ur(6),this.c8=!0,Date.now(),this.i7=200,this.oH.cancel(),ur(12),t6(this.B,this,!0)):(ur(8),Date.now(),this.c8=!1))}; g.Q.nk=function(){this.i7=this.oH.KJ;if(this.oH.bz)this.x_==0?this.BP?(this.x_=1,tAu(this)):(this.x_=2,l17(this)):this.x_==2&&(this.c8?(ur(12),t6(this.B,this,!0)):(ur(11),t6(this.B,this,!1)));else{this.x_==0?ur(9):this.x_==2&&ur(10);var R=this.B;this.oH.getLastError();R.v0=this.i7;VN(R,2)}}; g.Q.LJ=function(){return this.B.LJ()}; g.Q.isActive=function(){return this.B.isActive()}; g.Q.QZ=function(R){this.B.QZ(R)};g.Q=Dmu.prototype;g.Q.ey=null;g.Q.fJ=null;g.Q.AV=null;g.Q.aj=null;g.Q.us=null;g.Q.yu=null;g.Q.TZ=null;g.Q.Ck=null;g.Q.GX=0;g.Q.OV=0;g.Q.H7=null;g.Q.Ik=null;g.Q.Kp=null;g.Q.Uc=null;g.Q.dj=null;g.Q.Mp=null;g.Q.MW=-1;g.Q.t3=-1;g.Q.v0=-1;g.Q.NW=0;g.Q.ON=0;g.Q.Gv=8;var d_U={OK:0,LYo:2,C1G:4,k5G:5,ROn:6,STOP:7,nD:8,L3u:9,irl:10,m2Q:11,UFo:12};g.Bh(Um9,g.tV);g.Bh(CHk,g.tV);g.Q=Dmu.prototype; g.Q.connect=function(R,F,h,a,J){ur(0);this.us=F;this.fJ=h||{};a&&J!==void 0&&(this.fJ.OSID=a,this.fJ.OAID=J);this.Z?(eF((0,g.Ge)(this.aK,this,R),100),Wih(this)):this.aK(R)}; g.Q.disconnect=function(){R5L(this);if(this.B==3){var R=this.GX++,F=this.yu.clone();g.EX(F,"SID",this.L);g.EX(F,"RID",R);g.EX(F,"TYPE","terminate");Ds(this,F);R=new d2(this,this.L,R);R.TU=2;R.pJ=RE(F.clone());(new Image).src=R.pJ.toString();R.mX=Date.now();Ong(R)}im7(this)}; g.Q.aK=function(R){this.dj=new KiL(this);this.dj.QJ=this.ey;this.dj.D=this.N;this.dj.connect(R)}; g.Q.VV=function(){return this.B==0}; g.Q.getState=function(){return this.B}; g.Q.IG=function(R){this.Ik=null;M1e(this,R)}; g.Q.bM=function(){this.Kp=null;this.aj=new d2(this,this.L,"rpc",this.Y);this.aj.K5=this.ey;this.aj.VJ=0;var R=this.TZ.clone();g.EX(R,"RID","rpc");g.EX(R,"SID",this.L);g.EX(R,"CI",this.Mp?"0":"1");g.EX(R,"AID",this.MW);Ds(this,R);g.EX(R,"TYPE","xmlhttp");SKu(this.aj,R,!0,this.Ck,!1)}; g.Q.J3=function(R,F){if(this.B!=0&&(this.aj==R||this.AV==R))if(this.v0=R.KJ,this.AV==R&&this.B==3)if(this.Gv>7){try{var h=this.N.parse(F)}catch(a){h=null}if(Array.isArray(h)&&h.length==3)if(R=h,R[0]==0)a:{if(!this.Kp){if(this.aj)if(this.aj.mX+3E30)){if(a=F==1)this.AV||this.Ik||this.B==1||this.NW>=2?a=!1:(this.Ik=eF((0,g.Ge)(this.IG,this,R),gVk(this,this.NW)),this.NW++, a=!0);a=!(a||F==2&&GC7(this))}if(a)switch(h){case 1:VN(this,5);break;case 4:VN(this,10);break;case 3:VN(this,6);break;case 7:VN(this,12);break;default:VN(this,2)}}}; g.Q.Re=function(R){if(!g.x7(arguments,this.B))throw Error("Unexpected channel state: "+this.B);}; g.Q.SGn=function(R){R?ur(2):(ur(1),Id7(this,8))}; g.Q.eL=function(R){if(R)throw Error("Can't create secondary domain capable XhrIo object.");R=new g.z3;R.Y=!1;return R}; g.Q.isActive=function(){return!!this.H7&&this.H7.isActive(this)}; g.Q.QZ=function(R){var F=nC;F.dispatchEvent(new CHk(F,R))}; g.Q.LJ=function(){return!1}; g.Q=wRU.prototype;g.Q.FE=function(){}; g.Q.y_=function(){}; g.Q.Wb=function(){}; g.Q.Zw=function(){}; g.Q.Bp=function(){}; g.Q.je=function(){return{}}; g.Q.isActive=function(){return!0};g.Q=EVe.prototype;g.Q.enqueue=function(R){this.D.push(R)}; g.Q.isEmpty=function(){return this.B.length===0&&this.D.length===0}; g.Q.clear=function(){this.B=[];this.D=[]}; g.Q.contains=function(R){return g.x7(this.B,R)||g.x7(this.D,R)}; g.Q.remove=function(R){var F=this.B;var h=(0,g.lTL)(F,R);h>=0?(g.N4(F,h),F=!0):F=!1;return F||g.Hh(this.D,R)}; g.Q.UU=function(){for(var R=[],F=this.B.length-1;F>=0;--F)R.push(this.B[F]);F=this.D.length;for(var h=0;h=Pit.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(R=Pit[this.D],this.tp=g.Eg((0,g.Ge)(this.Md,this),R),this.D++):this.publish("pairingFailed",Error("Server error "+R.status))}; g.Q.lP=function(){this.B=null;this.publish("pairingFailed",Error("Server not responding"))}; var Pit=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Bh(Iv,vA);g.Q=Iv.prototype;g.Q.start=function(){G5(this)&&this.publish("screenChange");!g.jA("yt-remote-lounge-token-expiration")&&lde(this);g.rb(this.B);this.B=g.Eg((0,g.Ge)(this.start,this),1E4)}; g.Q.add=function(R,F){G5(this);PIu(this,R);iq(this,!1);this.publish("screenChange");F(R);R.token||lde(this)}; g.Q.remove=function(R,F){var h=G5(this);KF7(this,R)&&(iq(this,!1),h=!0);F(R);h&&this.publish("screenChange")}; g.Q.O1=function(R,F,h,a){var J=G5(this),M=this.get(R.id);M?(M.name!=F&&(M.name=F,iq(this,!1),J=!0),h(R)):a(Error("no such local screen."));J&&this.publish("screenChange")}; g.Q.Ez=function(){g.rb(this.B);Iv.dk.Ez.call(this)}; g.Q.rP=function(R){G5(this);var F=this.screens.length;R=R&&R.screens||[];for(var h=R.length,a=0;a20)break a;I=F(M,v)}M=I}J.name=M}h(BA(this,J))},this), onError:(0,g.Ge)(function(J){a(Error("pairing request failed: "+J.status))},this), onTimeout:(0,g.Ge)(function(){a(Error("pairing request timed out."))},this)})}; g.Q.Ez=function(){g.Fm(this.D);g.Fm(this.B);EB.dk.Ez.call(this)}; g.Q.lr=function(){Mlk(this);this.publish("screenChange");this.B.update()}; EB.prototype.dispose=EB.prototype.dispose;g.Bh(rc,g.h0);g.Q=rc.prototype;g.Q.TN=function(R){this.RR()||(R&&(sB(this,""+R),this.publish("sessionFailed")),this.B=null,this.publish("sessionScreen",null))}; g.Q.info=function(R){FE(this.fI,R)}; g.Q.xx=function(){return null}; g.Q.gV=function(R){var F=this.D;R?(F.displayStatus=new chrome.cast.ReceiverDisplayStatus(R,[]),F.displayStatus.showStop=!0):F.displayStatus=null;chrome.cast.setReceiverDisplayStatus(F,(0,g.Ge)(function(){this.info("Updated receiver status for "+F.friendlyName+": "+R)},this),(0,g.Ge)(function(){sB(this,"Failed to update receiver status for: "+F.friendlyName)},this))}; g.Q.Ez=function(){this.gV("");rc.dk.Ez.call(this)};g.A(p0,rc);g.Q=p0.prototype;g.Q.Xm=function(R){if(this.K){if(this.K==R)return;sB(this,"Overriding cast session with new session object");pmk(this);this.KI=!1;this.C="unknown";this.K.removeUpdateListener(this.aR);this.K.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Uz)}this.K=R;this.K.addUpdateListener(this.aR);this.K.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.Uz);E3g(this,"getMdxSessionStatus")}; g.Q.EH=function(R){this.info("launchWithParams no-op for Cast: "+g.ue(R))}; g.Q.stop=function(){this.K?this.K.stop((0,g.Ge)(function(){this.TN()},this),(0,g.Ge)(function(){this.TN(Error("Failed to stop receiver app."))},this)):this.TN(Error("Stopping cast device without session."))}; g.Q.gV=function(){}; g.Q.Ez=function(){this.info("disposeInternal");pmk(this);this.K&&(this.K.removeUpdateListener(this.aR),this.K.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Uz));this.K=null;rc.prototype.Ez.call(this)}; g.Q.rTt=function(R,F){if(!this.RR())if(F)if(F=h6(F),g.M4(F))switch(R=""+F.type,F=F.data||{},this.info("onYoutubeMessage_: "+R+" "+g.ue(F)),R){case "mdxSessionStatus":Ibg(this,F);break;case "loungeToken":BMh(this,F);break;default:sB(this,"Unknown youtube message: "+R)}else sB(this,"Unable to parse message.");else sB(this,"No data in message.")}; g.Q.Sa=function(R,F,h,a){g.rb(this.Z);this.Z=0;hQ9(this.L,this.D.label,R,this.D.friendlyName,(0,g.Ge)(function(J){J?F(J):a>=0?(sB(this,"Screen "+R+" appears to be offline. "+a+" retries left."),this.Z=g.Eg((0,g.Ge)(this.Sa,this,R,F,h,a-1),300)):h(Error("Unable to fetch screen."))},this),h)}; g.Q.xx=function(){return this.K}; g.Q.gR=function(R){this.RR()||R||(sB(this,"Cast session died."),this.TN())};g.A(kv,rc);g.Q=kv.prototype;g.Q.Xm=function(R){this.K=R;this.K.addUpdateListener(this.Oz)}; g.Q.EH=function(R){this.Sl=R;this.oR()}; g.Q.stop=function(){Lqu(this);this.K?this.K.stop((0,g.Ge)(this.TN,this,null),(0,g.Ge)(this.TN,this,"Failed to stop DIAL device.")):this.TN()}; g.Q.Ez=function(){Lqu(this);this.K&&this.K.removeUpdateListener(this.Oz);this.K=null;rc.prototype.Ez.call(this)}; g.Q.Y1=function(R){this.RR()||R||(sB(this,"DIAL session died."),this.N(),this.N=function(){},this.TN())};g.A(AW,rc);AW.prototype.stop=function(){this.TN()}; AW.prototype.Xm=function(){}; AW.prototype.EH=function(){g.rb(this.K);this.K=NaN;var R=w2(this.L.v9(),this.D.label);R?Yv(this,R):this.TN(Error("No such screen"))}; AW.prototype.Ez=function(){g.rb(this.K);this.K=NaN;rc.prototype.Ez.call(this)};g.A(xv,g.h0);g.Q=xv.prototype; g.Q.init=function(R,F){chrome.cast.timeout.requestSession=3E4;var h=new chrome.cast.SessionRequest(this.Z,[chrome.cast.Capability.AUDIO_OUT]);g.pR("desktop_enable_cast_connect")&&(h.androidReceiverCompatible=!0);this.C||(h.dialRequest=new chrome.cast.DialRequest("YouTube"));var a=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;R=R||this.S?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var J=(0,g.Ge)(this.OVu,this);h=new chrome.cast.ApiConfig(h,(0,g.Ge)(this.Cv, this),J,a,R);h.customDialLaunchCallback=(0,g.Ge)(this.HII,this);chrome.cast.initialize(h,(0,g.Ge)(function(){this.RR()||(chrome.cast.addReceiverActionListener(this.N),e5u(),this.D.subscribe("onlineScreenChange",(0,g.Ge)(this.Q_,this)),this.K=qP4(this),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Ge)(function(M){this.UG("Failed to set initial custom receivers: "+g.ue(M))},this)),this.publish("yt-remote-cast2-availability-change",HA(this)),F(!0))},this),(0,g.Ge)(function(M){this.UG("Failed to initialize API: "+ g.ue(M)); F(!1)},this))}; g.Q.Jjo=function(R,F){Nc("Setting connected screen ID: "+R+" -> "+F);if(this.B){var h=this.B.B;if(!R||h&&h.id!=R)Nc("Unsetting old screen status: "+this.B.D.friendlyName),L0(this,null)}if(R&&F){if(!this.B){R=w2(this.D.v9(),R);if(!R){Nc("setConnectedScreenStatus: Unknown screen.");return}if(R.idType=="shortLived"){Nc("setConnectedScreenStatus: Screen with id type to be short lived.");return}h=TMu(this,R);h||(Nc("setConnectedScreenStatus: Connected receiver not custom..."),h=new chrome.cast.Receiver(R.uuid? R.uuid:R.id,R.name),h.receiverType=chrome.cast.ReceiverType.CUSTOM,this.K.push(h),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Ge)(function(a){this.UG("Failed to set initial custom receivers: "+g.ue(a))},this))); Nc("setConnectedScreenStatus: new active receiver: "+h.friendlyName);L0(this,new AW(this.D,h),!0)}this.B.gV(F)}else Nc("setConnectedScreenStatus: no screen.")}; g.Q.INI=function(R){this.RR()?this.UG("Setting connection data on disposed cast v2"):this.B?this.B.EH(R):this.UG("Setting connection data without a session")}; g.Q.JR=function(){this.RR()?this.UG("Stopping session on disposed cast v2"):this.B?(this.B.stop(),L0(this,null)):Nc("Stopping non-existing session")}; g.Q.requestSession=function(){chrome.cast.requestSession((0,g.Ge)(this.Cv,this),(0,g.Ge)(this.jTI,this))}; g.Q.Ez=function(){this.D.unsubscribe("onlineScreenChange",(0,g.Ge)(this.Q_,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.N);var R=mUv,F=g.hG("yt.mdx.remote.debug.handlers_");g.Hh(F||[],R);g.Fm(this.B);g.h0.prototype.Ez.call(this)}; g.Q.UG=function(R){FE("Controller",R)}; g.Q.BL=function(R,F){this.B==R&&(F||L0(this,null),this.publish("yt-remote-cast2-session-change",F))}; g.Q.vmb=function(R,F){if(!this.RR())if(R)switch(R.friendlyName=chrome.cast.unescape(R.friendlyName),Nc("onReceiverAction_ "+R.label+" / "+R.friendlyName+"-- "+F),F){case chrome.cast.ReceiverAction.CAST:if(this.B)if(this.B.D.label!=R.label)Nc("onReceiverAction_: Stopping active receiver: "+this.B.D.friendlyName),this.B.stop();else{Nc("onReceiverAction_: Casting to active receiver.");this.B.B&&this.publish("yt-remote-cast2-session-change",this.B.B);break}switch(R.receiverType){case chrome.cast.ReceiverType.CUSTOM:L0(this, new AW(this.D,R));break;case chrome.cast.ReceiverType.DIAL:L0(this,new kv(this.D,R,this.L,this.config_));break;case chrome.cast.ReceiverType.CAST:L0(this,new p0(this.D,R,this.config_));break;default:this.UG("Unknown receiver type: "+R.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.B&&this.B.D.label==R.label?this.B.stop():this.UG("Stopping receiver w/o session: "+R.friendlyName)}else this.UG("onReceiverAction_ called without receiver.")}; g.Q.HII=function(R){if(this.RR())return Promise.reject(Error("disposed"));var F=R.receiver;F.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.UG("Not DIAL receiver: "+F.friendlyName),F.receiverType=chrome.cast.ReceiverType.DIAL);var h=this.B?this.B.D:null;if(!h||h.label!=F.label)return this.UG("Receiving DIAL launch request for non-clicked DIAL receiver: "+F.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(h&&h.label==F.label&&h.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.B.B)return Nc("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.B.B),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.UG('Changing CAST intent from "'+h.receiverType+'" to "dial" for '+F.friendlyName);L0(this,new kv(this.D,F,this.L,this.config_))}F=this.B;F.Z=R;F.Z.appState==chrome.cast.DialAppState.RUNNING?(R=F.Z.extraData||{},h=R.screenId||null,Q8(F)&&R.loungeToken?R.loungeTokenRefreshIntervalMs?R=xdk(F,{name:F.D.friendlyName,screenId:R.screenId,loungeToken:R.loungeToken,dialId:F.Z.receiver.label, screenIdType:"shortLived"},R.loungeTokenRefreshIntervalMs):(g.DP(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(R)+".")),R=NM6(F,h)):R=NM6(F,h)):R=$d7(F);return R}; g.Q.Cv=function(R){var F=this;if(!this.RR()&&!this.S){Nc("New cast session ID: "+R.sessionId);var h=R.receiver;if(h.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.B)if(h.receiverType==chrome.cast.ReceiverType.CAST)Nc("Got resumed cast session before resumed mdx connection."),h.friendlyName=chrome.cast.unescape(h.friendlyName),L0(this,new p0(this.D,h,this.config_),!0);else{this.UG("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var a=this.B.D,J=w2(this.D.v9(), a.label);J&&IE(J,h.label)&&a.receiverType!=chrome.cast.ReceiverType.CAST&&h.receiverType==chrome.cast.ReceiverType.CAST&&(Nc("onSessionEstablished_: manual to cast session change "+h.friendlyName),g.Fm(this.B),this.B=new p0(this.D,h,this.config_),this.B.subscribe("sessionScreen",(0,g.Ge)(this.BL,this,this.B)),this.B.subscribe("sessionFailed",function(){return yqt(F,F.B)}),this.B.EH(null)); this.B.Xm(R)}}}; g.Q.wR=function(){return this.B?this.B.xx():null}; g.Q.jTI=function(R){this.RR()||(this.UG("Failed to estabilish a session: "+g.ue(R)),R.code!=chrome.cast.ErrorCode.CANCEL&&L0(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.Q.OVu=function(R){Nc("Receiver availability updated: "+R);if(!this.RR()){var F=HA(this);this.Y=R==chrome.cast.ReceiverAvailability.AVAILABLE;HA(this)!=F&&this.publish("yt-remote-cast2-availability-change",HA(this))}}; g.Q.Q_=function(){this.RR()||(this.K=qP4(this),Nc("Updating custom receivers: "+g.ue(this.K)),chrome.cast.setCustomReceivers(this.K,function(){},(0,g.Ge)(function(){this.UG("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",HA(this)))}; xv.prototype.setLaunchParams=xv.prototype.INI;xv.prototype.setConnectedScreenStatus=xv.prototype.Jjo;xv.prototype.stopSession=xv.prototype.JR;xv.prototype.getCastSession=xv.prototype.wR;xv.prototype.requestSession=xv.prototype.requestSession;xv.prototype.init=xv.prototype.init;xv.prototype.dispose=xv.prototype.dispose;var Xmg=[];g.Q=bq.prototype; g.Q.reset=function(R){this.listId="";this.index=-1;this.videoId="";zQ4(this);this.volume=-1;this.muted=!1;R&&(this.index=R.index,this.listId=R.listId,this.videoId=R.videoId,this.playerState=R.playerState,this.volume=R.volume,this.muted=R.muted,this.audioTrackId=R.audioTrackId,this.trackData=R.trackData,this.xJ=R.hasPrevious,this.NC=R.hasNext,this.S=R.playerTime,this.N=R.playerTimeAt,this.D=R.seekableStart,this.Y=R.seekableEnd,this.K=R.duration,this.Z=R.loadedTime,this.B=R.liveIngestionTime,this.L= !isNaN(this.B))}; g.Q.isPlaying=function(){return this.playerState==1}; g.Q.isBuffering=function(){return this.playerState==3}; g.Q.Hu=function(){return this.playerState==1081}; g.Q.Td=function(R){this.K=isNaN(R)?0:R}; g.Q.getDuration=function(){return this.L?this.K+S4(this):this.K}; g.Q.clone=function(){return new bq(tlt(this))};g.A(e4,g.h0);g.Q=e4.prototype;g.Q.getState=function(){return this.K}; g.Q.XT=function(){return this.L.getReconnectTimeout()}; g.Q.b6=function(){this.L.reconnect()}; g.Q.play=function(){uq(this)?(this.B?this.B.play(null,g.bX,K0(this,"play")):z5(this,"play"),Vl6(this,1,mJ(n0(this))),this.publish("remotePlayerChange")):dc(this,this.play)}; g.Q.pause=function(){uq(this)?(this.B?this.B.pause(null,g.bX,K0(this,"pause")):z5(this,"pause"),Vl6(this,2,mJ(n0(this))),this.publish("remotePlayerChange")):dc(this,this.pause)}; g.Q.seekTo=function(R){if(uq(this)){if(this.B){var F=n0(this),h=new chrome.cast.media.SeekRequest;h.currentTime=R;F.isPlaying()||F.isBuffering()?h.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:h.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.B.seek(h,g.bX,K0(this,"seekTo",{newTime:R}))}else z5(this,"seekTo",{newTime:R});Vl6(this,3,R);this.publish("remotePlayerChange")}else dc(this,g.Iu(this.seekTo,R))}; g.Q.stop=function(){if(uq(this)){this.B?this.B.stop(null,g.bX,K0(this,"stopVideo")):z5(this,"stopVideo");var R=n0(this);R.index=-1;R.videoId="";zQ4(R);PA(this,R);this.publish("remotePlayerChange")}else dc(this,this.stop)}; g.Q.setVolume=function(R,F){if(uq(this)){var h=n0(this);if(this.D){if(h.volume!=R){var a=Math.round(R)/100;this.D.setReceiverVolumeLevel(a,(0,g.Ge)(function(){hW("set receiver volume: "+a)},this),(0,g.Ge)(function(){this.UG("failed to set receiver volume.")},this))}h.muted!=F&&this.D.setReceiverMuted(F,(0,g.Ge)(function(){hW("set receiver muted: "+F)},this),(0,g.Ge)(function(){this.UG("failed to set receiver muted.")},this))}else{var J={volume:R, muted:F};h.volume!=-1&&(J.delta=R-h.volume);z5(this,"setVolume",J)}h.muted=F;h.volume=R;PA(this,h)}else dc(this,g.Iu(this.setVolume,R,F))}; g.Q.nM=function(R,F){if(uq(this)){var h=n0(this);R={videoId:R};F&&(h.trackData={trackName:F.name,languageCode:F.languageCode,sourceLanguageCode:F.translationLanguage?F.translationLanguage.languageCode:"",languageName:F.languageName,kind:F.kind},R.style=g.ue(F.style),g.km(R,h.trackData));z5(this,"setSubtitlesTrack",R);PA(this,h)}else dc(this,g.Iu(this.nM,R,F))}; g.Q.setAudioTrack=function(R,F){uq(this)?(F=F.getLanguageInfo().getId(),z5(this,"setAudioTrack",{videoId:R,audioTrackId:F}),R=n0(this),R.audioTrackId=F,PA(this,R)):dc(this,g.Iu(this.setAudioTrack,R,F))}; g.Q.playVideo=function(R,F,h,a,J,M,v){a=a===void 0?null:a;J=J===void 0?null:J;M=M===void 0?null:M;v=v===void 0?null:v;var I=n0(this),w={videoId:R};h!==void 0&&(w.currentIndex=h);ov(I,R,h||0);F!==void 0&&(OB(I,F),w.currentTime=F);a&&(w.listId=a);J&&(w.playerParams=J);M&&(w.clickTrackingParams=M);v&&(w.locationInfo=g.ue(v));z5(this,"setPlaylist",w);a||PA(this,I)}; g.Q.f6=function(R,F){if(uq(this)){if(R&&F){var h=n0(this);ov(h,R,F);PA(this,h)}z5(this,"previous")}else dc(this,g.Iu(this.f6,R,F))}; g.Q.nextVideo=function(R,F){if(uq(this)){if(R&&F){var h=n0(this);ov(h,R,F);PA(this,h)}z5(this,"next")}else dc(this,g.Iu(this.nextVideo,R,F))}; g.Q.Ub=function(){if(uq(this)){z5(this,"clearPlaylist");var R=n0(this);R.reset();PA(this,R);this.publish("remotePlayerChange")}else dc(this,this.Ub)}; g.Q.RK=function(){uq(this)?z5(this,"dismissAutoplay"):dc(this,this.RK)}; g.Q.dispose=function(){if(this.K!=3){var R=this.K;this.K=3;this.publish("proxyStateChange",R,this.K)}g.h0.prototype.dispose.call(this)}; g.Q.Ez=function(){Dd4(this);this.L=null;this.N.clear();XE(this,null);g.h0.prototype.Ez.call(this)}; g.Q.TB=function(R){if((R!=this.K||R==2)&&this.K!=3&&R!=0){var F=this.K;this.K=R;this.publish("proxyStateChange",F,R);if(R==1)for(;!this.N.isEmpty();)F=R=this.N,F.B.length===0&&(F.B=F.D,F.B.reverse(),F.D=[]),R.B.pop().apply(this);else R==3&&this.dispose()}}; g.Q.rpI=function(R,F){this.publish(R,F)}; g.Q.Jbu=function(R){if(!R)this.MJ(null),XE(this,null);else if(this.D.receiver.volume){R=this.D.receiver.volume;var F=n0(this),h=Math.round(100*R.level||0);if(F.volume!=h||F.muted!=R.muted)hW("Cast volume update: "+R.level+(R.muted?" muted":"")),F.volume=h,F.muted=!!R.muted,PA(this,F)}}; g.Q.MJ=function(R){hW("Cast media: "+!!R);this.B&&this.B.removeUpdateListener(this.Z);if(this.B=R)this.B.addUpdateListener(this.Z),Udu(this),this.publish("remotePlayerChange")}; g.Q.wGn=function(R){R?(Udu(this),this.publish("remotePlayerChange")):this.MJ(null)}; g.Q.U8=function(){z5(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.Q.tln=function(){var R=u8e();R&&XE(this,R)}; g.Q.UG=function(R){FE("CP",R)};g.A(Dg,g.h0);g.Q=Dg.prototype; g.Q.connect=function(R,F){if(F){var h=F.listId,a=F.videoId,J=F.videoIds,M=F.playerParams,v=F.clickTrackingParams,I=F.index,w={videoId:a},E=F.currentTime,B=F.locationInfo;F=F.loopMode;E!==void 0&&(w.currentTime=E<=5?0:E);M&&(w.playerParams=M);B&&(w.locationInfo=B);v&&(w.clickTrackingParams=v);h&&(w.listId=h);J&&J.length>0&&(w.videoIds=J.join(","));I!==void 0&&(w.currentIndex=I);this.Oz&&(w.loopMode=F||"LOOP_MODE_OFF");h&&(this.B.listId=h);this.B.videoId=a;this.B.index=I||0;this.B.state=3;OB(this.B, E);this.N="UNSUPPORTED";h=this.Oz?"setInitialState":"setPlaylist";tW("Connecting with "+h+" and params: "+g.ue(w));this.D.connect({method:h,params:g.ue(w)},R,Bbk())}else tW("Connecting without params"),this.D.connect({},R,Bbk());RIU(this)}; g.Q.Rk=function(R){this.D.Rk(R)}; g.Q.dispose=function(){this.RR()||(g.Fk("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),lq(this,3));g.h0.prototype.dispose.call(this)}; g.Q.Ez=function(){FTg(this);ajU(this);hI9(this);g.rb(this.Z);this.Z=NaN;g.rb(this.C);this.C=NaN;this.L=null;g.$O(this.oR);this.oR.length=0;this.D.dispose();g.h0.prototype.Ez.call(this);this.N=this.Y=this.K=this.B=this.D=null}; g.Q.GR=function(R){if(!this.K||this.K.length===0)return!1;for(var F=g.N(this.K),h=F.next();!h.done;h=F.next())if(!h.value.capabilities.has(R))return!1;return!0}; g.Q.xA=function(){var R=3;this.RR()||(R=0,isNaN(this.DS())?this.D.gX()&&isNaN(this.S)&&(R=1):R=2);return R}; g.Q.aA=function(R){tW("Disconnecting with "+R);g.Fk("yt.mdx.remote.remoteClient_",null);FTg(this);this.publish("beforeDisconnect",R);R==1&&r2();this.D.disconnect(R);this.dispose()}; g.Q.Zr=function(){var R=this.B;this.L&&(R=this.B.clone(),ov(R,this.L,R.index));return tlt(R)}; g.Q.Fjt=function(R){var F=this,h=new bq(R);h.videoId&&h.videoId!=this.B.videoId&&(this.L=h.videoId,g.rb(this.Z),this.Z=g.Eg(function(){if(F.L){var J=F.L;F.L=null;F.B.videoId!=J&&V8(F,"getNowPlaying")}},5E3)); var a=[];this.B.listId==h.listId&&this.B.videoId==h.videoId&&this.B.index==h.index||a.push("remoteQueueChange");this.B.playerState==h.playerState&&this.B.volume==h.volume&&this.B.muted==h.muted&&mJ(this.B)==mJ(h)&&g.ue(this.B.trackData)==g.ue(h.trackData)||a.push("remotePlayerChange");this.B.reset(R);g.Uv(a,function(J){this.publish(J)},this)}; g.Q.Ly=function(){var R=this.D.getDeviceId(),F=g.QL(this.K,function(h){return h.type=="REMOTE_CONTROL"&&h.id!=R}); return F?F.id:""}; g.Q.DS=function(){return this.D.XT()}; g.Q.N8=function(){return this.N||"UNSUPPORTED"}; g.Q.M8=function(){return this.Y||""}; g.Q.Tx=function(){!isNaN(this.DS())&&this.D.b6()}; g.Q.Pqo=function(R,F){V8(this,R,F);M_v(this)}; g.Q.zZ=function(){var R=g.Sn("SAPISID","")||g.Sn("__Secure-1PAPISID")||"",F=g.Sn("__Secure-3PAPISID","")||"";if(!R&&!F)return"";R=g.Tf(g.L1(R),2);F=g.Tf(g.L1(F),2);return g.Tf(g.L1(","+R+","+F),2)}; Dg.prototype.subscribe=Dg.prototype.subscribe;Dg.prototype.unsubscribeByKey=Dg.prototype.W7;Dg.prototype.getProxyState=Dg.prototype.xA;Dg.prototype.disconnect=Dg.prototype.aA;Dg.prototype.getPlayerContextData=Dg.prototype.Zr;Dg.prototype.setPlayerContextData=Dg.prototype.Fjt;Dg.prototype.getOtherConnectedRemoteId=Dg.prototype.Ly;Dg.prototype.getReconnectTimeout=Dg.prototype.DS;Dg.prototype.getAutoplayMode=Dg.prototype.N8;Dg.prototype.getAutoplayVideoId=Dg.prototype.M8;Dg.prototype.reconnect=Dg.prototype.Tx; Dg.prototype.sendMessage=Dg.prototype.Pqo;Dg.prototype.getXsrfToken=Dg.prototype.zZ;Dg.prototype.isCapabilitySupportedOnConnectedDevices=Dg.prototype.GR;g.A(pO4,vA);g.Q=pO4.prototype;g.Q.v9=function(R){return this.UT.$_gs(R)}; g.Q.contains=function(R){return!!this.UT.$_c(R)}; g.Q.get=function(R){return this.UT.$_g(R)}; g.Q.start=function(){this.UT.$_st()}; g.Q.add=function(R,F,h){this.UT.$_a(R,F,h)}; g.Q.remove=function(R,F,h){this.UT.$_r(R,F,h)}; g.Q.O1=function(R,F,h,a){this.UT.$_un(R,F,h,a)}; g.Q.Ez=function(){for(var R=this.B.length,F=0;F1&&!this.U.getOption("remote","quickCast")?(this.kz=g.Cg(R,this.B,this),this.Dk(g.p1(R,this.B)),R=this.U.getOption("remote","currentReceiver"),R=this.B(R),this.options[R]&&this.xZ(R),this.enable(!0)):this.enable(!1)}; rm.prototype.B=function(R){return R.key}; rm.prototype.dY=function(R){return R==="cast-selector-receiver"?"Cast...":this.kz[R].name}; rm.prototype.dL=function(R){g.Xq.prototype.dL.call(this,R);this.U.setOption("remote","currentReceiver",this.kz[R]);this.mC.Nt()};g.A(eIg,g.Hb);g.Q=eIg.prototype; g.Q.create=function(){var R=this.player.W(),F=g.V9(R);R={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:R.X("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:R.X("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:R.X("enable_cast_short_lived_lounge_token")};x_u(F,R);this.subscriptions.push(g.cm("yt-remote-before-disconnect",this.lnI,this));this.subscriptions.push(g.cm("yt-remote-connection-change",this.Nfb,this));this.subscriptions.push(g.cm("yt-remote-receiver-availability-change",this.e2, this));this.subscriptions.push(g.cm("yt-remote-auto-connect",this.R3$,this));this.subscriptions.push(g.cm("yt-remote-receiver-resumed",this.cpI,this));this.subscriptions.push(g.cm("mdx-privacy-popup-confirm",this.jzG,this));this.subscriptions.push(g.cm("mdx-privacy-popup-cancel",this.WNl,this));this.e2()}; g.Q.load=function(){this.player.cancelPlayback();g.Hb.prototype.load.call(this);this.GT=new XOe(this.player.W(),this);this.player.tv(this.GT);this.B4=new SYv(this,this.player,this.z_);var R=(R=je9())?R.currentTime:0;var F=y_7()?new e4(MV(),void 0):null;R==0&&F&&(R=mJ(n0(F)));R!==0&&this.Na(R);nG4(this,this.Wc,this.Wc);this.player.PE(6)}; g.Q.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.Av();this.Em=this.ij;g.hT(this.B4,this.z_);this.z_=this.GT=this.B4=null;g.Hb.prototype.unload.call(this);this.player.PE(5);Y2(this)}; g.Q.Ez=function(){g.Wm(this.subscriptions);g.Hb.prototype.Ez.call(this)}; g.Q.gJ=function(R){var F=g.u7.apply(1,arguments);this.loaded&&this.B4.Ru.apply(this.B4,[R].concat(g.S(F)))}; g.Q.getAdState=function(){return this.m3}; g.Q.xJ=function(){return this.z_?n0(this.z_).xJ:!1}; g.Q.NC=function(){return this.z_?n0(this.z_).NC:!1}; g.Q.Na=function(R,F){this.N1=R||0;this.player.publish("progresssync",R,F);this.player.xm("onVideoProgress",R||0)}; g.Q.getCurrentTime=function(){return this.N1}; g.Q.getDuration=function(){return n0(this.z_).getDuration()||0}; g.Q.oz=function(){var R=n0(this.z_);return R.L?R.B+S4(R):R.B}; g.Q.Sb=function(){return n0(this.z_).Z}; g.Q.R3=function(){return Kq7(n0(this.z_))}; g.Q.Nh=function(){var R=n0(this.z_);return R.D>0?R.D+S4(R):R.D}; g.Q.getProgressState=function(){var R=n0(this.z_),F=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!R.Hu()&&this.player.xX(),clipEnd:F.clipEnd,clipStart:F.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.oz(),isAtLiveHead:this.isAtLiveHead(),loaded:this.Sb(),seekableEnd:this.R3(),seekableStart:this.Nh(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.Q.isAtLiveHead=function(){return Kq7(n0(this.z_))-this.getCurrentTime()<=1}; g.Q.nextVideo=function(){this.z_&&this.z_.nextVideo()}; g.Q.f6=function(){this.z_&&this.z_.f6()}; g.Q.lnI=function(R){R===1&&(this.w9=this.z_?n0(this.z_):null)}; g.Q.Nfb=function(){var R=y_7()?new e4(MV(),void 0):null;if(R){var F=this.Em;this.loaded&&this.unload();this.z_=R;this.w9=null;F.key!==this.ij.key&&(this.Em=F,this.load())}else g.Fm(this.z_),this.z_=null,this.loaded&&(this.unload(),(R=this.w9)&&R.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(R.videoId,mJ(R)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.Q.e2=function(){var R=[this.ij],F=R.concat,h=N_k();f0()&&g.jA("yt-remote-cast-available")&&h.push({key:"cast-selector-receiver",name:"Cast..."});this.kz=F.call(R,h);R=LTe()||this.ij;sz(this,R);this.player.xm("onMdxReceiversChange")}; g.Q.R3$=function(){var R=LTe();sz(this,R)}; g.Q.cpI=function(){this.Em=LTe()}; g.Q.jzG=function(){this.z1=!0;Y2(this);Ib=!1;vt&&G_(vt,1);vt=null}; g.Q.WNl=function(){this.z1=!1;Y2(this);sz(this,this.ij);this.Em=this.ij;Ib=!1;vt=null;this.player.playVideo()}; g.Q.eq=function(R,F){switch(R){case "casting":return this.loaded;case "receivers":return this.kz;case "currentReceiver":return F&&(F.key==="cast-selector-receiver"?dd4():sz(this,F)),this.loaded?this.Em:this.ij;case "quickCast":return this.kz.length===2&&this.kz[1].key==="cast-selector-receiver"?(F&&dd4(),!0):!1}}; g.Q.U8=function(){this.z_.U8()}; g.Q.t5=function(){return!1}; g.Q.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.Q.isLoggedIn=function(){var R,F;return((R=g.Kp("PLAYER_CONFIG"))==null?void 0:(F=R.args)==null?void 0:F.authuser)!==void 0?!0:!(!g.Kp("SESSION_INDEX")&&!g.Kp("LOGGED_IN"))};g.NO("remote",eIg);})(_yt_player);