(function(g){var window=this;'use strict';var F8d=function(R){if(R instanceof g.OD)return R;if(typeof R.Xr=="function")return R.Xr(!1);if(g.KX(R)){var l=0,y=new g.OD;y.next=function(){for(;;){if(l>=R.length)return g.m6;if(l in R)return g.is(R[l++]);l++}}; return y}throw Error("Not implemented");},Q8A=function(R,l,y){if(g.KX(R))g.qZ(R,l,y); else for(R=F8d(R);;){var f=R.next();if(f.done)break;l.call(y,f.value,void 0,R)}},M8=function(R){g.mj(R,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.mU()).toString(36)); return R},Ry=function(R,l,y){Array.isArray(y)||(y=[String(y)]); g.SO7(R.Y,l,y)},$MK=function(R,l){var y=[]; Q8A(l,function(f){try{var A=g.T8.prototype.X.call(this,f,!0)}catch(K){if(K=="Storage: Invalid value was encountered")return;throw K;}A===void 0?y.push(f):g.CO9(A)&&y.push(f)},R); return y},eR8=function(R,l){$MK(R,l).forEach(function(y){g.T8.prototype.remove.call(this,y)},R)},bEU=function(R){if(R.US){if(R.US.locationOverrideToken)return{locationOverrideToken:R.US.locationOverrideToken}; if(R.US.latitudeE7!=null&&R.US.longitudeE7!=null)return{latitudeE7:R.US.latitudeE7,longitudeE7:R.US.longitudeE7}}return null},XgS=function(R,l){g.uA(R,l)||R.push(l)},T_t=function(R){var l=0,y; for(y in R)l++;return l},dMX=function(R,l){return g.np(R,l)},rZS=function(R){try{return g.Mo.JSON.parse(R)}catch(l){}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(l){}throw Error("Invalid JSON string: "+R);},l3=function(R){if(g.Mo.JSON)try{return g.Mo.JSON.parse(R)}catch(l){}return rZS(R)},vOU=function(){var R=yb(); this.Z=R;R.Yy("/client_streamz/youtube/living_room/mdx/channel/opened",g.GY("channel_type"))},zRU=function(){var R=yb(); this.Z=R;R.Yy("/client_streamz/youtube/living_room/mdx/channel/closed",g.GY("channel_type"))},wgD=function(){var R=yb(); this.Z=R;R.Yy("/client_streamz/youtube/living_room/mdx/channel/message_received",g.GY("channel_type"))},xMd=function(){var R=yb(); this.Z=R;R.Yy("/client_streamz/youtube/living_room/mdx/channel/success")},Ie5=function(){var R=yb(); this.Z=R;R.Yy("/client_streamz/youtube/living_room/mdx/channel/error",g.GY("channel_type"),g.GY("error_type"))},N_S=function(){var R=yb(); this.Z=R;R.Yy("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},pgt=function(){var R=yb(); this.Z=R;R.Yy("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},UM5=function(R,l,y,f){var A=new g.AI(null); R&&g.Kz(A,R);l&&g.GS(A,l);y&&g.aj(A,y);f&&(A.X=f);return A},SCd=function(R,l){return new g.Rc(R,l)},fj=function(R,l){return Object.prototype.hasOwnProperty.call(R,l)},j8U=function(R,l){return R===l},A5=function(R,l){this.X={}; this.Z=[];this.Id=this.size=0;var y=arguments.length;if(y>1){if(y%2)throw Error("Uneven number of arguments");for(var f=0;f5&&(R=R.slice(R.length-5)); var l=g.L$($rD(),function(f){return f.loungeToken}),y=g.L$(R,function(f){return f.loungeToken}); g.OJ(y,function(f){return!g.uA(l,f)})&&ebO(); g.vW("yt-remote-local-screens",R,31536E3)},h5=function(R){R||(g.w0("yt-remote-session-screen-id"),g.w0("yt-remote-session-video-id")); FeA();R=mt();g.bA(R,oy());PWU(R)},XhU=function(){if(!c_){var R=g.x8(); R&&(c_=new g.ex(R))}},TgK=function(){XhU(); return c_?!!c_.get("yt-remote-use-staging-server"):!1},Es=function(R,l){g.YS[R]=!0; var y=g.qp();y&&y.publish.apply(y,arguments);g.YS[R]=!1},drD=function(){},yb=function(){if(!W_){W_=new g.UT(new drD); var R=g.iW("client_streamz_web_flush_count",-1);R!==-1&&(W_.L=R)}return W_},r$A=function(){var R=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return R?parseInt(R[1],10):0},vaU=function(R){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+R)!=-1||document.currentScript.src.indexOf("&"+R)!=-1)},zbO=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},Lj=function(R){R.length?whd(R.shift(),function(){Lj(R)}):xrX()},IbX=function(R){return"chrome-extension://"+R+"/cast_sender.js"},whd=function(R,l,y){var f=document.createElement("script"); f.onerror=l;y&&(f.onload=y);g.iH(f,g.FI(R));(document.head||document.documentElement).appendChild(f)},Ng5=function(){var R=r$A(),l=[]; if(R>1){var y=R-1;l.push("//www.gstatic.com/eureka/clank/"+R+"/cast_sender.js");l.push("//www.gstatic.com/eureka/clank/"+y+"/cast_sender.js")}return l},xrX=function(){var R=zbO(); R&&R(!1,"No cast extension found")},Ur5=function(){if(phX){var R=2,l=zbO(),y=function(){R--; R==0&&l&&l(!0)}; window.__onGCastApiAvailable=y;whd("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",xrX,y)}},S1D=function(){Ur5(); var R=Ng5();R.push("//www.gstatic.com/eureka/clank/cast_sender.js");Lj(R)},k9K=function(){Ur5(); var R=Ng5();R.push.apply(R,g.ci(jwr.map(IbX)));R.push("//www.gstatic.com/eureka/clank/cast_sender.js");Lj(R)},Os=function(R,l,y){g.p.call(this); this.D=y!=null?(0,g.B8)(R,y):R;this.H0=l;this.J=(0,g.B8)(this.Pz,this);this.Z=!1;this.X=0;this.L=this.oV=null;this.Y=[]},i3=function(){},Dr8=function(){g.gJ.call(this,"p")},Z05=function(){g.gJ.call(this,"o")},gaU=function(){return J$d=J$d||new g.sT},V0d=function(R){g.gJ.call(this,"serverreachability",R)},P_=function(R){var l=gaU(); l.dispatchEvent(new V0d(l,R))},CWK=function(R){g.gJ.call(this,"statevent",R)},u3=function(R){var l=gaU(); l.dispatchEvent(new CWK(l,R))},q1d=function(R,l,y,f){g.gJ.call(this,"timingevent",R); this.size=l;this.rtt=y;this.retries=f},FL=function(R,l){if(typeof R!=="function")throw Error("Fn must not be null and must be a function"); return g.Mo.setTimeout(function(){R()},l)},Qb=function(){},$o=function(R,l,y,f){this.L=R; this.Y=l;this.vZ=y;this.nA=f||1;this.iQ=new g.W6(this);this.uQ=45E3;this.CX=null;this.D=!1;this.B=this.tU=this.W=this.v1=this.xb=this.B1=this.LX=null;this.Yb=[];this.Z=null;this.V=0;this.J=this.Dq=null;this.ZL=-1;this.P1=!1;this.W1=0;this.UL=null;this.sF=this.jS=this.LA=this.sL=!1;this.X=new t0U},t0U=function(){this.L=null; this.Z="";this.X=!1},M0U=function(R,l,y){R.v1=1; R.W=M8(l.clone());R.B=y;R.sL=!0;Y1d(R,null)},Y1d=function(R,l){R.xb=Date.now(); e7(R);R.tU=R.W.clone();Ry(R.tU,"t",R.nA);R.V=0;var y=R.L.v1;R.X=new t0U;R.Z=RoU(R.L,y?l:null,!R.B);R.W1>0&&(R.UL=new g.YA((0,g.B8)(R.nO,R,R.Z),R.W1));R.iQ.listen(R.Z,"readystatechange",R.fq);l=R.CX?g.Eh(R.CX):{};R.B?(R.Dq||(R.Dq="POST"),l["Content-Type"]="application/x-www-form-urlencoded",R.Z.send(R.tU,R.Dq,R.B,l)):(R.Dq="GET",R.Z.send(R.tU,R.Dq,null,l));P_(1)},yDX=function(R){if(!ldK(R))return g.q_(R.Z); var l=g.t_(R.Z);if(l==="")return"";var y="",f=l.length,A=g.VL(R.Z)==4;if(!R.X.L){if(typeof TextDecoder==="undefined")return b3(R),XL(R),"";R.X.L=new g.Mo.TextDecoder}for(var K=0;Kl.length)return fdK;l=l.slice(f,f+y);R.V=f+y;return l},e7=function(R){R.B1=Date.now()+R.uQ; GIt(R,R.uQ)},GIt=function(R,l){if(R.LX!=null)throw Error("WatchDog timer not null"); R.LX=FL((0,g.B8)(R.vz,R),l)},adU=function(R){R.LX&&(g.Mo.clearTimeout(R.LX),R.LX=null)},XL=function(R){R.L.KM()||R.P1||saK(R.L,R)},b3=function(R){adU(R); g.f_(R.UL);R.UL=null;R.iQ.removeAll();if(R.Z){var l=R.Z;R.Z=null;l.abort();l.dispose()}},E1r=function(R,l){try{var y=R.L; if(y.k0!=0&&(y.Z==R||B0r(y.X,R)))if(!R.jS&&B0r(y.X,R)&&y.k0==3){try{var f=y.TD.Z.parse(l)}catch(Q){f=null}if(Array.isArray(f)&&f.length==3){var A=f;if(A[0]==0)a:{if(!y.W){if(y.Z)if(y.Z.xb+3E30&&(y.W1=1.5*B);f=y;var H=R.yk();if(H){var n=g.Yv(H,"X-Client-Wire-Protocol");if(n){var m=f.X;!m.Z&&(g.r9(n,"spdy")||g.r9(n,"quic")||g.r9(n,"h2"))&&(m.Y=m.J,m.Z=new Set,m.X&&(mtA(m,m.X),m.X=null))}if(f.sL){var h=g.Yv(H,"X-HTTP-Session-Id");h&&(f.US=h,g.mj(f.CX,f.sL,h))}}y.k0=3;y.J&&y.J.AY();y.OF&&(y.eZ=Date.now()-R.xb);f=y;var c=R;f.f_=o1r(f,f.v1?f.nA:null,f.vZ);if(c.jS){hoK(f.X, c);var E=c,W=f.W1;W&&E.setTimeout(W);E.LX&&(adU(E),e7(E));f.Z=c}else cD5(f);y.L.length>0&&v_(y)}else K[0]!="stop"&&K[0]!="close"||ru(y,7);else y.k0==3&&(K[0]=="stop"||K[0]=="close"?K[0]=="stop"?ru(y,7):y.disconnect():K[0]!="noop"&&y.J&&y.J.Ne(K),y.Yb=0)}P_(4)}catch(Q){}},WK5=function(R,l){this.Z=R; this.map=l;this.context=null},LKd=function(R){this.J=R||10; g.Mo.PerformanceNavigationTiming?(R=g.Mo.performance.getEntriesByType("navigation"),R=R.length>0&&(R[0].nextHopProtocol=="hq"||R[0].nextHopProtocol=="h2")):R=!!(g.Mo.chrome&&g.Mo.chrome.loadTimes&&g.Mo.chrome.loadTimes()&&g.Mo.chrome.loadTimes().wasFetchedViaSpdy);this.Y=R?this.J:1;this.Z=null;this.Y>1&&(this.Z=new Set);this.X=null;this.L=[]},OFt=function(R){return R.X?!0:R.Z?R.Z.size>=R.Y:!1},n18=function(R){return R.X?1:R.Z?R.Z.size:0},B0r=function(R,l){return R.X?R.X==l:R.Z?R.Z.has(l):!1},mtA= function(R,l){R.Z?R.Z.add(l):R.X=l},hoK=function(R,l){R.X&&R.X==l?R.X=null:R.Z&&R.Z.has(l)&&R.Z.delete(l)},iFd=function(R){if(R.X!=null)return R.L.concat(R.X.Yb); if(R.Z!=null&&R.Z.size!==0){var l=R.L;R=g.u(R.Z.values());for(var y=R.next();!y.done;y=R.next())l=l.concat(y.value.Yb);return l}return g.wO(R.L)},PJD=function(R,l){var y=new Qb; if(g.Mo.Image){var f=new Image;f.onload=g.nX(zd,y,"TestLoadImage: loaded",!0,l,f);f.onerror=g.nX(zd,y,"TestLoadImage: error",!1,l,f);f.onabort=g.nX(zd,y,"TestLoadImage: abort",!1,l,f);f.ontimeout=g.nX(zd,y,"TestLoadImage: timeout",!1,l,f);g.Mo.setTimeout(function(){if(f.ontimeout)f.ontimeout()},1E4); f.src=R}else l(!1)},urr=function(R,l){var y=new Qb,f=new AbortController,A=setTimeout(function(){f.abort(); zd(y,"TestPingServer: timeout",!1,l)},1E4); fetch(R,{signal:f.signal}).then(function(K){clearTimeout(A);K.ok?zd(y,"TestPingServer: ok",!0,l):zd(y,"TestPingServer: server error",!1,l)}).catch(function(){clearTimeout(A); zd(y,"TestPingServer: error",!1,l)})},zd=function(R,l,y,f,A){try{A&&(A.onload=null,A.onerror=null,A.onabort=null,A.ontimeout=null),f(y)}catch(K){}},FKt=function(){this.Z=new i3},QaA=function(R,l,y){var f=y||""; try{g.fz(R,function(A,K){var G=A;g.GK(A)&&(G=g.jf(A));l.push(f+K+"="+encodeURIComponent(G))})}catch(A){throw l.push(f+"type="+encodeURIComponent("_badmap")),A; }},wu=function(R,l,y){return y&&y.pu?y.pu[R]||l:l},$tD=function(R){this.L=[]; this.nA=this.f_=this.CX=this.vZ=this.Z=this.US=this.sL=this.P1=this.V=this.ZL=this.B=null;this.CJ=this.tU=0;this.R2=wu("failFast",!1,R);this.jS=this.LX=this.W=this.D=this.J=null;this.ol=!0;this.Ms=this.UL=-1;this.sF=this.Yb=this.xb=0;this.J7=wu("baseRetryDelayMs",5E3,R);this.NW=wu("retryDelaySeedMs",1E4,R);this.Qq=wu("forwardChannelMaxRetries",2,R);this.Vu=wu("forwardChannelRequestTimeoutMs",2E4,R);this.Qb=R&&R.DSU||void 0;this.FR=R&&R.Z8q||void 0;this.lj=R&&R.aOq||!1;this.W1=void 0;this.v1=R&&R.sT4|| !1;this.Y="";this.X=new LKd(R&&R.AI9);this.TD=new FKt;this.iQ=R&&R.I7b||!1;this.B1=R&&R.BpX||!1;this.iQ&&this.B1&&(this.B1=!1);this.eI=R&&R.Ppq||!1;R&&R.a7X&&(this.ol=!1);this.OF=!this.iQ&&this.ol&&R&&R.O$U||!1;this.RV=void 0;R&&R.lB&&R.lB>0&&(this.RV=R.lB);this.tF=void 0;this.eZ=0;this.uQ=!1;this.LA=this.Dq=null},du=function(R){R.Z&&(eoU(R),R.Z.cancel(),R.Z=null)},bFr=function(R){du(R); R.W&&(g.Mo.clearTimeout(R.W),R.W=null);Td(R);R.X.cancel();R.D&&(typeof R.D==="number"&&g.Mo.clearTimeout(R.D),R.D=null)},v_=function(R){OFt(R.X)||R.D||(R.D=!0,g.FC(R.jE,R),R.xb=0)},T0d=function(R,l){if(n18(R.X)>=R.X.Y-(R.D?1:0))return!1; if(R.D)return R.L=l.Yb.concat(R.L),!0;if(R.k0==1||R.k0==2||R.xb>=(R.R2?0:R.Qq))return!1;R.D=FL((0,g.B8)(R.jE,R,l),XWr(R,R.xb));R.xb++;return!0},rD8=function(R,l){var y; l?y=l.vZ:y=R.tU++;var f=R.CX.clone();g.mj(f,"SID",R.Y);g.mj(f,"RID",y);g.mj(f,"AID",R.UL);xo(R,f);R.V&&R.B&&g.El(f,R.V,R.B);y=new $o(R,R.Y,y,R.xb+1);R.V===null&&(y.CX=R.B);l&&(R.L=l.Yb.concat(R.L));l=dtU(R,y,1E3);y.setTimeout(Math.round(R.Vu*.5)+Math.round(R.Vu*.5*Math.random()));mtA(R.X,y);M0U(y,f,l)},xo=function(R,l){R.P1&&g.RL(R.P1,function(y,f){g.mj(l,f,y)}); R.J&&g.fz({},function(y,f){g.mj(l,f,y)})},dtU=function(R,l,y){y=Math.min(R.L.length,y); var f=R.J?(0,g.B8)(R.J.oy,R.J,R):null;a:{for(var A=R.L,K=-1;;){var G=["count="+y];K==-1?y>0?(K=A[0].Z,G.push("ofs="+K)):K=0:G.push("ofs="+K);for(var B=!0,H=0;H=3)return!1; R.sF++;R.W=FL((0,g.B8)(R.VH,R),XWr(R,R.Yb));R.Yb++;return!0},eoU=function(R){R.Dq!=null&&(g.Mo.clearTimeout(R.Dq),R.Dq=null)},v1U=function(R){R.Z=new $o(R,R.Y,"rpc",R.sF); R.V===null&&(R.Z.CX=R.B);R.Z.W1=0;var l=R.f_.clone();g.mj(l,"RID","rpc");g.mj(l,"SID",R.Y);g.mj(l,"AID",R.UL);g.mj(l,"CI",R.jS?"0":"1");!R.jS&&R.RV&&g.mj(l,"TO",R.RV);g.mj(l,"TYPE","xmlhttp");xo(R,l);R.V&&R.B&&g.El(l,R.V,R.B);R.W1&&R.Z.setTimeout(R.W1);var y=R.Z;R=R.nA;y.v1=1;y.W=M8(l.clone());y.B=null;y.sL=!0;Y1d(y,R)},Td=function(R){R.LX!=null&&(g.Mo.clearTimeout(R.LX),R.LX=null)},saK=function(R,l){var y=null; if(R.Z==l){Td(R);eoU(R);R.Z=null;var f=2}else if(B0r(R.X,l))y=l.Yb,hoK(R.X,l),f=1;else return;if(R.k0!=0)if(l.D)if(f==1){y=l.B?l.B.length:0;l=Date.now()-l.xb;var A=R.xb;f=gaU();f.dispatchEvent(new q1d(f,y,l,A));v_(R)}else cD5(R);else{var K=l.ZL;A=l.getLastError();if(A==3||A==0&&K>0||!(f==1&&T0d(R,l)||f==2&&HF8(R)))switch(y&&y.length>0&&(l=R.X,l.L=l.L.concat(y)),A){case 1:ru(R,5);break;case 4:ru(R,10);break;case 3:ru(R,6);break;default:ru(R,2)}}},XWr=function(R,l){var y=R.J7+Math.floor(Math.random()* R.NW); R.isActive()||(y*=2);return y*l},ru=function(R,l){if(l==2){var y=(0,g.B8)(R.FkL,R),f=R.FR,A=!f; f=new g.AI(f||"//www.google.com/images/cleardot.gif");g.Mo.location&&g.Mo.location.protocol=="http"||g.Kz(f,"https");M8(f);A?PJD(f.toString(),y):urr(f.toString(),y)}else u3(2);R.k0=0;R.J&&R.J.zX(l);zod(R);bFr(R)},zod=function(R){R.k0=0; R.LA=[];if(R.J){var l=iFd(R.X);if(l.length!=0||R.L.length!=0)g.xU(R.LA,l),g.xU(R.LA,R.L),R.X.L.length=0,g.wO(R.L),R.L.length=0;R.J.o8()}},wWr=function(R){if(R.k0==0)return R.LA; var l=[];g.xU(l,iFd(R.X));g.xU(l,R.L);return l},o1r=function(R,l,y){var f=g.oj(y); f.Z!=""?(l&&g.GS(f,l+"."+f.Z),g.aj(f,f.L)):(f=g.Mo.location,f=UM5(f.protocol,l?l+"."+f.hostname:f.hostname,+f.port,y));l=R.sL;y=R.US;l&&y&&g.mj(f,l,y);g.mj(f,"VER",R.fO);xo(R,f);return f},RoU=function(R,l,y){if(l&&!R.v1)throw Error("Can't create secondary domain capable XhrIo object."); l=R.lj&&!R.Qb?new g.ZY(new g.Ml({uv:y})):new g.ZY(R.Qb);l.V=R.v1;return l},xtD=function(){},IdU=function(){},NR=function(R,l){g.sT.call(this); this.Z=new $tD(l);this.J=R;this.X=l&&l.G4$||null;R=l&&l.IqL||null;l&&l.zMb&&(R?R["X-Client-Protocol"]="webchannel":R={"X-Client-Protocol":"webchannel"});this.Z.B=R;R=l&&l.nO9||null;l&&l.Xi&&(R?R["X-WebChannel-Content-Type"]=l.Xi:R={"X-WebChannel-Content-Type":l.Xi});l&&l.rI&&(R?R["X-WebChannel-Client-Profile"]=l.rI:R={"X-WebChannel-Client-Profile":l.rI});this.Z.ZL=R;(R=l&&l.vOb)&&!g.d9(R)&&(this.Z.V=R);this.D=l&&l.sT4||!1;this.Y=l&&l.zBX||!1;(l=l&&l.YN)&&!g.d9(l)&&(this.Z.sL=l,g.Hr(this.X,l)&&(R= this.X,l in R&&delete R[l]));this.L=new Iy(this)},N0U=function(R){Dr8.call(this); R.__headers__&&(this.headers=R.__headers__,this.statusCode=R.__status__,delete R.__headers__,delete R.__status__);var l=R.__sm__;l?this.data=(this.Z=g.Ga(l))?g.hA(l,this.Z):l:this.data=R},pWD=function(R){Z05.call(this); this.status=1;this.errorCode=R},Iy=function(R){this.Z=R},UtD=function(R,l){this.X=R; this.Z=l},SGU=function(R){return wWr(R.Z).map(function(l){var y=R.X; l=l.map;"__data__"in l?(l=l.__data__,y=y.Y?rZS(l):l):y=l;return y})},pj=function(R,l){if(typeof R!=="function")throw Error("Fn must not be null and must be a function"); return g.Mo.setTimeout(function(){R()},l)},S7=function(R){Us.dispatchEvent(new jaU(Us,R))},jaU=function(R){g.gJ.call(this,"statevent",R)},j7=function(R,l,y,f){this.Z=R; this.Y=l;this.V=y;this.D=f||1;this.X=45E3;this.L=new g.W6(this);this.J=new g.Iu;this.J.setInterval(250)},Dtt=function(R,l,y){R.EX=1; R.pD=M8(l.clone());R.D0=y;R.sL=!0;kIX(R,null)},ZFX=function(R,l,y,f,A){R.EX=1; R.pD=M8(l.clone());R.D0=null;R.sL=y;A&&(R.Ih=!1);kIX(R,f)},kIX=function(R,l){R.Dw=Date.now(); JDd(R);R.K6=R.pD.clone();Ry(R.K6,"t",R.D);R.u4=0;R.yU=R.Z.L0(R.Z.Jl()?l:null);R.Z4>0&&(R.OX=new g.YA((0,g.B8)(R.d8,R,R.yU),R.Z4));R.L.listen(R.yU,"readystatechange",R.Na);l=R.b3?g.Eh(R.b3):{};R.D0?(R.cJ="POST",l["Content-Type"]="application/x-www-form-urlencoded",R.yU.send(R.K6,R.cJ,R.D0,l)):(R.cJ="GET",R.Ih&&!g.H0&&(l.Connection="close"),R.yU.send(R.K6,R.cJ,null,l));R.Z.Xq(1)},CJK=function(R,l){var y=R.u4,f=l.indexOf("\n",y); if(f==-1)return g1U;y=Number(l.substring(y,f));if(isNaN(y))return VIr;f+=1;if(f+y>l.length)return g1U;l=l.slice(f,f+y);R.u4=f+y;return l},JDd=function(R){R.XY=Date.now()+R.X; qGd(R,R.X)},qGd=function(R,l){if(R.gP!=null)throw Error("WatchDog timer not null"); R.gP=pj((0,g.B8)(R.zE,R),l)},tIX=function(R){R.gP&&(g.Mo.clearTimeout(R.gP),R.gP=null)},YGU=function(R){R.Z.KM()||R.yA||R.Z.Tj(R)},ko=function(R){tIX(R); g.f_(R.OX);R.OX=null;R.J.stop();R.L.removeAll();if(R.yU){var l=R.yU;R.yU=null;l.abort();l.dispose()}R.R7&&(R.R7=null)},MIA=function(R,l){try{R.Z.WB(R,l),R.Z.Xq(4)}catch(y){}},lgK=function(R,l,y,f,A){if(f==0)y(!1); else{var K=A||0;f--;R4Z(R,l,function(G){G?y(!0):g.Mo.setTimeout(function(){lgK(R,l,y,f,K)},K)})}},R4Z=function(R,l,y){var f=new Image; f.onload=function(){try{Dj(f),y(!0)}catch(A){}}; f.onerror=function(){try{Dj(f),y(!1)}catch(A){}}; f.onabort=function(){try{Dj(f),y(!1)}catch(A){}}; f.ontimeout=function(){try{Dj(f),y(!1)}catch(A){}}; g.Mo.setTimeout(function(){if(f.ontimeout)f.ontimeout()},l); f.src=R},Dj=function(R){R.onload=null; R.onerror=null;R.onabort=null;R.ontimeout=null},yvU=function(R){this.Z=R; this.X=new i3},fg8=function(R){var l=Zj(R.Z,R.xW,"/mail/images/cleardot.gif"); M8(l);lgK(l.toString(),5E3,(0,g.B8)(R.Gm,R),3,2E3);R.Xq(1)},Avr=function(R){var l=R.Z.D; l!=null?(S7(5),l?(S7(11),J5(R.Z,R,!1)):(S7(12),J5(R.Z,R,!0))):(R.YI=new j7(R),R.YI.b3=R.YF,l=R.Z,l=Zj(l,l.Jl()?R.ke:null,R.Ip),S7(5),Ry(l,"TYPE","xmlhttp"),ZFX(R.YI,l,!1,R.ke,!1))},Kur=function(R,l,y){this.Z=1; this.X=[];this.L=[];this.J=new i3;this.B=R||null;this.D=l!=null?l:null;this.W=y||!1},Gn5=function(R,l){this.Z=R; this.map=l;this.context=null},agU=function(R,l,y,f){g.gJ.call(this,"timingevent",R); this.size=l;this.rtt=y;this.retries=f},sqd=function(R){g.gJ.call(this,"serverreachability",R)},HOO=function(R){R.Ah(1,0); R.Su=Zj(R,null,R.xF);B4d(R)},nRX=function(R){R.xg&&(R.xg.abort(),R.xg=null); R.qW&&(R.qW.cancel(),R.qW=null);R.bG&&(g.Mo.clearTimeout(R.bG),R.bG=null);gu(R);R.bV&&(R.bV.cancel(),R.bV=null);R.Si&&(g.Mo.clearTimeout(R.Si),R.Si=null)},m1d=function(R,l){if(R.Z==0)throw Error("Invalid operation: sending map when state is closed"); R.X.push(new Gn5(R.dC++,l));R.Z!=2&&R.Z!=3||B4d(R)},oRX=function(R){var l=0; R.qW&&l++;R.bV&&l++;return l},B4d=function(R){R.bV||R.Si||(R.Si=pj((0,g.B8)(R.tY,R),0),R.vP=0)},ERU=function(R,l){if(R.Z==1){if(!l){R.CD=Math.floor(Math.random()*1E5); l=R.CD++;var y=new j7(R,"",l);y.b3=R.r3;var f=h4r(R),A=R.Su.clone();g.mj(A,"RID",l);g.mj(A,"CVER","1");Vb(R,A);Dtt(y,A,f);R.bV=y;R.Z=2}}else R.Z==3&&(l?cvS(R,l):R.X.length==0||R.bV||cvS(R))},cvS=function(R,l){if(l)if(R.Jg>6){R.X=R.L.concat(R.X); R.L.length=0;var y=R.CD-1;l=h4r(R)}else y=l.V,l=l.D0;else y=R.CD++,l=h4r(R);var f=R.Su.clone();g.mj(f,"SID",R.Y);g.mj(f,"RID",y);g.mj(f,"AID",R.Vc);Vb(R,f);y=new j7(R,R.Y,y,R.vP+1);y.b3=R.r3;y.setTimeout(1E4+Math.round(1E4*Math.random()));R.bV=y;Dtt(y,f,l)},Vb=function(R,l){R.SJ&&(R=R.SJ.SE())&&g.RL(R,function(y,f){g.mj(l,f,y)})},h4r=function(R){var l=Math.min(R.X.length,1E3),y=["count="+l]; if(R.Jg>6&&l>0){var f=R.X[0].Z;y.push("ofs="+f)}else f=0;for(var A={},K=0;K=3)return!1; R.V++;R.bG=pj((0,g.B8)(R.Oa,R),LuU(R,R.PP));R.PP++;return!0},J5=function(R,l,y){R.Aw=R.D==null?y:!R.D; R.eO=l.yw;R.W||HOO(R)},gu=function(R){R.Rd!=null&&(g.Mo.clearTimeout(R.Rd),R.Rd=null)},LuU=function(R,l){var y=5E3+Math.floor(Math.random()*1E4); R.isActive()||(y*=2);return y*l},Cj=function(R,l){if(l==2||l==9){var y=null; R.SJ&&(y=null);var f=(0,g.B8)(R.eQL,R);y||(y=new g.AI("//www.google.com/images/cleardot.gif"),M8(y));R4Z(y.toString(),1E4,f)}else S7(2);iOU(R,l)},iOU=function(R,l){R.Z=0; R.SJ&&R.SJ.KO(l);Pd8(R);nRX(R)},Pd8=function(R){R.Z=0; R.eO=-1;if(R.SJ)if(R.L.length==0&&R.X.length==0)R.SJ.yF();else{var l=g.wO(R.L),y=g.wO(R.X);R.L.length=0;R.X.length=0;R.SJ.yF(l,y)}},Zj=function(R,l,y){var f=g.oj(y); if(f.Z!="")l&&g.GS(f,l+"."+f.Z),g.aj(f,f.L);else{var A=window.location;f=UM5(A.protocol,l?l+"."+A.hostname:A.hostname,+A.port,y)}R.QA&&g.RL(R.QA,function(K,G){g.mj(f,G,K)}); g.mj(f,"VER",R.Jg);Vb(R,f);return f},uvD=function(){},FuD=function(){this.Z=[]; this.X=[]},QqD=function(R){g.gJ.call(this,"channelMessage"); this.message=R},$1t=function(R){g.gJ.call(this,"channelError"); this.error=R},e45=function(R,l){this.action=R; this.params=l||{}},qR=function(R,l){g.p.call(this); this.Z=new g.Vg(this.G9L,0,this);g.U(this,this.Z);this.H0=5E3;this.X=0;if(typeof R==="function")l&&(R=(0,g.B8)(R,l));else if(R&&typeof R.handleEvent==="function")R=(0,g.B8)(R.handleEvent,R);else throw Error("Invalid listener argument");this.L=R},bOt=function(R,l,y,f,A,K,G,B,H,n,m,h,c,E){y=y===void 0?!1:y; f=f===void 0?function(){return""}:f; A=A===void 0?!1:A;K=K===void 0?!1:K;G=G===void 0?!1:G;B=B===void 0?function(){return g.rC({})}:B; H=H===void 0?!1:H;m=m===void 0?!1:m;h=h===void 0?!1:h;c=c===void 0?!1:c;E=E===void 0?!1:E;this.v1=R;this.LX=l;this.D=new g.$8;this.X=new qR(this.n4X,this);this.Z=null;this.V=!1;this.B=null;this.xb="";this.Yb=this.W=0;this.L=[];this.sF=y;this.sL=f;this.J=K;this.CX=B;this.P1=n;this.nA=G;this.Dq=null;this.Y=g.rC();this.vZ=A;this.LA=H;this.iQ=m;this.B1=h;this.ol=c;this.ZL=E;this.W1=new vOU;this.jS=new zRU;this.uQ=new xMd;this.tU=new wgD;this.UL=new Ie5;this.OF=new N_S;this.tF=new pgt},d1U=function(R, l,y,f,A){XxX(R); if(R.Z){var K=g.JZ("ID_TOKEN"),G=R.Z.r3||{};K?G["x-youtube-identity-token"]=K:delete G["x-youtube-identity-token"];R.Z.r3=G}T4U(R);f?(f.getState()!=3&&oRX(f)==0||f.getState(),R.Z.connect(l,y,R.LX,f.Y,f.Vc)):A?R.Z.connect(l,y,R.LX,A.sessionId,A.arrayId):R.Z.connect(l,y,R.LX)},wx8=function(R,l){return R.ol?!0:R.B1?Object.values(rvS).includes(l):R.iQ?!Object.values(vR5).includes(l):R.ZL?Object.values(z45).includes(l):!1},N4S=function(R){var l,y; g.w(function(f){if(f.X==1)return g.eJ(f,2),g.v(f,x1d(R),2);g.zT(f);l=R.L;R.L=[];y=l.length;IgU(R,l,y);t5(R);return g.x7(f,0)})},IgU=function(R,l,y){for(var f=0;f0?y=Object.assign({},y,l):delete y.Authorization;R.Z.r3=y}},T4U=function(R){R.P1&&!R.J&&U1Z(R,R.P1())},Yo=function(R){this.scheme="https"; this.port=this.domain="";this.Z="/api/lounge";this.X=!0;R=R||document.location.href;var l=Number(g.HF(R)[4]||null)||"";l&&(this.port=":"+l);this.domain=g.n4(R)||"";R=g.pp();R.search("MSIE")>=0&&(R=R.match(/MSIE ([\d.]+)/)[1],g.x_(R,"10.0")<0&&(this.X=!1))},MR=function(R,l){var y=R.Z; R.X&&(y=R.scheme+"://"+R.domain+R.port+R.Z);return g.L4(y+l,{})},SE5=function(R,l){g.sT.call(this); var y=this;this.SZ=R();this.SZ.subscribe("handlerOpened",this.hh,this);this.SZ.subscribe("handlerClosed",this.onClosed,this);this.SZ.subscribe("handlerError",function(f,A){y.onError(A)}); this.SZ.subscribe("handlerMessage",this.onMessage,this);this.Z=l},jq8=function(R,l,y){var f=this; y=y===void 0?function(){return""}:y; var A=A===void 0?new IdU:A;var K=K===void 0?new g.$8:K;this.pathPrefix=R;this.Z=l;this.xb=y;this.J=K;this.W=null;this.B=this.V=0;this.channel=null;this.D=0;this.L=new qR(function(){f.L.isActive();var G;((G=f.channel)==null?void 0:n18((new UtD(G,G.Z)).Z.X))===0&&f.connect(f.W,f.V)}); this.Y={};this.X={};this.LX=!1;this.logger=null;this.Yb=[];this.CM=void 0;this.CX=new vOU;this.Dq=new zRU;this.P1=new wgD;this.sL=new Ie5},knO=function(R){g.lx(R.channel,"m",function(){R.D=3; R.L.reset();R.W=null;R.V=0;for(var l=g.u(R.Yb),y=l.next();!y.done;y=l.next())y=y.value,R.channel&&R.channel.send(y);R.Yb=[];R.publish("webChannelOpened");R.CX.vA("WEB_CHANNEL")}); g.lx(R.channel,"n",function(){R.D=0;R.L.isActive()||R.publish("webChannelClosed");var l,y=(l=R.channel)==null?void 0:SGU(new UtD(l,l.Z));y&&(R.Yb=[].concat(g.ci(y)));R.Dq.vA("WEB_CHANNEL")}); g.lx(R.channel,"p",function(l){var y=l.data;y[0]==="gracefulReconnect"?(R.L.start(),R.channel&&R.channel.close()):R.publish("webChannelMessage",new e45(y[0],y[1]));R.CM=l.statusCode;R.P1.vA("WEB_CHANNEL")}); g.lx(R.channel,"o",function(){R.CM===401||R.L.start();R.publish("webChannelError");R.sL.vA("WEB_CHANNEL","")})},D1X=function(R){var l=R.xb(); l?R.Y["x-youtube-lounge-xsrf-token"]=l:delete R.Y["x-youtube-lounge-xsrf-token"]},ZOU=function(R){g.sT.call(this); this.Z=R();this.Z.subscribe("webChannelOpened",this.Ug,this);this.Z.subscribe("webChannelClosed",this.onClosed,this);this.Z.subscribe("webChannelError",this.onError,this);this.Z.subscribe("webChannelMessage",this.onMessage,this)},Jv8=function(R,l,y,f,A){function K(){return new bOt(MR(R,"/bc"),l,!1,y,f)} y=y===void 0?function(){return""}:y; return g.O1("enable_mdx_web_channel_desktop")?new ZOU(function(){return new jq8(MR(R,"/wc"),l,y)}):new SE5(K,A)},qEA=function(){var R=gRK; VYA();RJ.push(R);Cdr()},lf=function(R,l){VYA(); var y=tYK(R,String(l));RJ.length==0?YEr(y):(Cdr(),g.qZ(RJ,function(f){f(y)}))},y3=function(R){lf("CP",R)},VYA=function(){RJ||(RJ=g.yr("yt.mdx.remote.debug.handlers_")||[],g.lA("yt.mdx.remote.debug.handlers_",RJ))},YEr=function(R){var l=(fb+1)%50; fb=l;Ad[l]=R;Kb||(Kb=l==49)},Cdr=function(){var R=RJ; if(Ad[0]){var l=Kb?fb:-1,y={};do y={Uy:void 0},l=(l+1)%50,y.Uy=Ad[l],g.qZ(R,function(f){return function(A){A(f.Uy)}}(y)); while(l!=fb);Ad=Array(50);fb=-1;Kb=!1}},tYK=function(R,l){var y=(Date.now()-MYD)/1E3; y.toFixed&&(y=y.toFixed(3));var f=[];f.push("[",y+"s","] ");f.push("[","yt.mdx.remote","] ");f.push(R+": "+l,"\n");return f.join("")},Gb=function(R){g.Ae.call(this); this.D=R;this.screens=[]},RXO=function(R,l){var y=R.get(l.uuid)||R.get(l.id); if(y)return R=y.name,y.id=l.id||y.id,y.name=l.name,y.token=l.token,y.uuid=l.uuid||y.uuid,y.name!=R;R.screens.push(l);return!0},lAX=function(R,l){var y=R.screens.length!=l.length; R.screens=g.bs(R.screens,function(K){return!!Led(l,K)}); for(var f=l.length,A=0;A0&&R.Y0&&O0(R,y)},function(l){R.J=function(){}; R.hO(l)})},dpr=function(R){var l={}; l.pairingCode=R.Dq;l.theme=R.v1;TgK()&&(l.env_useStageMdx=1);return g.WF(l)},rL5=function(R){return new Promise(function(l){R.Dq=EaX(); if(R.CX){var y=new chrome.cast.DialLaunchResponse(!0,dpr(R));l(y);TGS(R)}else R.LX=function(){g.E1(R.B);R.LX=function(){}; R.B=NaN;var f=new chrome.cast.DialLaunchResponse(!0,dpr(R));l(f);TGS(R)},R.B=g.h$(function(){R.LX()},100)})},zXS=function(R,l,y){R.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(l)); var f=new ay(l);return(new Promise(function(A){vSX(R,f,function(K){K?(R.Yb=!0,ma(R.Y,f),hd(R,f),O0(R,y)):g.CE(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(l)+" is not online."));A(K)},5)})).then(function(A){return A?new chrome.cast.DialLaunchResponse(!1):rL5(R)})},wvS=function(R,l){var y=R.W.receiver.label,f=R.X.friendlyName; return(new Promise(function(A){oSS(R.Y,y,l,f,function(K){K&&K.token&&hd(R,K);A(K)},function(K){cL(R,"Failed to get DIAL screen: "+K); A(null)})})).then(function(A){return A&&A.token?new chrome.cast.DialLaunchResponse(!1):rL5(R)})},vSX=function(R,l,y,f){g.E1(R.D); R.D=0;cLZ(R.Y,l,function(A){A||f<0?y(A):R.D=g.h$(function(){vSX(R,l,y,f-1)},300)})},O0=function(R,l){R.info("getDialAppInfoWithTimeout_ "+l); Lb(R)&&(g.E1(R.V),R.V=0,l==0?xp5(R):R.V=g.h$(function(){xp5(R)},l))},xp5=function(R){Lb(R)&&R.L.getDialAppInfo(function(l){R.info("getDialAppInfo dialLaunchData: "+JSON.stringify(l)); l=l.extraData||{};var y=null;if(l.loungeToken){var f;((f=R.Z)==null?void 0:f.token)==l.loungeToken&&(y="staleLoungeToken")}else y="missingLoungeToken";y?(R.xb=y,O0(R,3E4)):(R.Yb=!1,R.xb="unknown",O1K(R,l.loungeToken),O0(R,l.loungeTokenRefreshIntervalMs))},function(l){R.info("getDialAppInfo error: "+l); R.xb="noLoungeTokenResponse";O0(R,3E4)})},IAS=function(R){g.E1(R.D); R.D=0;g.E1(R.V);R.V=0;R.J();R.J=function(){}; g.E1(R.B)},PL=function(R,l){oJ.call(this,R,l,"ManualSession"); this.L=g.h$((0,g.B8)(this.pL,this,null),150)},uf=function(R,l){g.Ae.call(this); this.config_=l;this.X=R;this.W=l.appId||"233637DE";this.Y=l.theme||"cl";this.B=l.disableCastApi||!1;this.D=l.forceMirroring||!1;this.Z=null;this.V=!1;this.L=[];this.J=(0,g.B8)(this.vGS,this)},NG5=function(R,l){return l?g.iA(R.L,function(y){return B_(l,y.label)},R):null},FG=function(R){lf("Controller",R)},gRK=function(R){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(R)},Q3=function(R){return R.V||!!R.L.length||!!R.Z},$W=function(R,l,y){l!=R.Z&&(g.f_(R.Z),(R.Z=l)?(y?R.publish("yt-remote-cast2-receiver-resumed", l.X):R.publish("yt-remote-cast2-receiver-selected",l.X),l.subscribe("sessionScreen",(0,g.B8)(R.LU,R,l)),l.subscribe("sessionFailed",function(){return pvZ(R,l)}),l.Z?R.publish("yt-remote-cast2-session-change",l.Z):y&&R.Z.pL(null)):R.publish("yt-remote-cast2-session-change",null))},pvZ=function(R,l){R.Z==l&&R.publish("yt-remote-cast2-session-failed")},Up8=function(R){var l=R.X.lr(),y=R.Z&&R.Z.X; R=g.L$(l,function(f){y&&B_(f,y.label)&&(y=null);var A=f.uuid?f.uuid:f.id,K=NG5(this,f);K?(K.label=A,K.friendlyName=f.name):(K=new chrome.cast.Receiver(A,f.name),K.receiverType=chrome.cast.ReceiverType.CUSTOM);return K},R); y&&(y.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(y=new chrome.cast.Receiver(y.label,y.friendlyName),y.receiverType=chrome.cast.ReceiverType.CUSTOM),R.push(y));return R},gS5=function(R,l,y,f){f.disableCastApi?eA("Cannot initialize because disabled by Mdx config."):S3U()?j1K(l,f)&&(kEK(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?DpK(R,y):(window.__onGCastApiAvailable=function(A,K){A?DpK(R,y):(bf("Failed to load cast API: "+K),Z1r(!1),kEK(!1),g.w0("yt-remote-cast-available"),g.w0("yt-remote-cast-receiver"), JL5(),y(!1))},f.loadCastApiSetupScript?g.f6("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?r$A()>=60&&S1D():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?xrX():r$A()>=89?k9K():(Ur5(),Lj(jwr.map(IbX))))):eA("Cannot initialize because not running Chrome")},JL5=function(){eA("dispose"); var R=XG();R&&R.dispose();g.lA("yt.mdx.remote.cloudview.instance_",null);V8U(!1);g.lq(CF8);CF8.length=0},Tb=function(){return!!g.zI("yt-remote-cast-installed")},q38=function(){var R=g.zI("yt-remote-cast-receiver"); return R?R.friendlyName:null},t8S=function(){eA("clearCurrentReceiver"); g.w0("yt-remote-cast-receiver")},Y3t=function(){return Tb()?XG()?XG().getCastSession():(bf("getCastSelector: Cast is not initialized."),null):(bf("getCastSelector: Cast API is not installed!"),null)},M85=function(){Tb()?XG()?d$()?(eA("Requesting cast selector."),XG().requestSession()):(eA("Wait for cast API to be ready to request the session."),CF8.push(g.Rn("yt-remote-cast2-api-ready",M85))):bf("requestCastSelector: Cast is not initialized."):bf("requestCastSelector: Cast API is not installed!")}, r$=function(R,l){d$()?XG().setConnectedScreenStatus(R,l):bf("setConnectedScreenStatus called before ready.")},S3U=function(){var R=g.pp().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.iz||R},RUK=function(R,l){XG().init(R,l)},j1K=function(R,l){var y=!1; XG()||(R=new uf(R,l),R.subscribe("yt-remote-cast2-availability-change",function(f){g.vW("yt-remote-cast-available",f);Es("yt-remote-cast2-availability-change",f)}),R.subscribe("yt-remote-cast2-receiver-selected",function(f){eA("onReceiverSelected: "+f.friendlyName); g.vW("yt-remote-cast-receiver",f);Es("yt-remote-cast2-receiver-selected",f)}),R.subscribe("yt-remote-cast2-receiver-resumed",function(f){eA("onReceiverResumed: "+f.friendlyName); g.vW("yt-remote-cast-receiver",f);Es("yt-remote-cast2-receiver-resumed",f)}),R.subscribe("yt-remote-cast2-session-change",function(f){eA("onSessionChange: "+H_(f)); f||g.w0("yt-remote-cast-receiver");Es("yt-remote-cast2-session-change",f)}),g.lA("yt.mdx.remote.cloudview.instance_",R),y=!0); eA("cloudview.createSingleton_: "+y);return y},XG=function(){return g.yr("yt.mdx.remote.cloudview.instance_")},DpK=function(R,l){Z1r(!0); kEK(!1);RUK(R,function(y){y?(V8U(!0),g.yK("yt-remote-cast2-api-ready")):(bf("Failed to initialize cast API."),Z1r(!1),g.w0("yt-remote-cast-available"),g.w0("yt-remote-cast-receiver"),JL5());l(y)})},eA=function(R){lf("cloudview",R)},bf=function(R){lf("cloudview",R)},Z1r=function(R){eA("setCastInstalled_ "+R); g.vW("yt-remote-cast-installed",R)},d$=function(){return!!g.yr("yt.mdx.remote.cloudview.apiReady_")},V8U=function(R){eA("setApiReady_ "+R); g.lA("yt.mdx.remote.cloudview.apiReady_",R)},kEK=function(R){g.lA("yt.mdx.remote.cloudview.initializing_",R)},vL=function(R){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.J=this.D=0;this.trackData=null;this.Vl=this.ip=!1;this.W=this.L=this.V=this.X=0;this.Z=NaN;this.Y=!1;this.reset(R)},lIK=function(R){R.audioTrackId=null; R.trackData=null;R.playerState=-1;R.ip=!1;R.Vl=!1;R.D=0;R.J=g.mU();R.X=0;R.V=0;R.L=0;R.W=0;R.Z=NaN;R.Y=!1},zb=function(R){return R.isPlaying()?(g.mU()-R.J)/1E3:0},w$=function(R,l){R.D=l; R.J=g.mU()},xW=function(R){switch(R.playerState){case 1:case 1081:return(g.mU()-R.J)/1E3+R.D; case -1E3:return 0}return R.D},ySS=function(R){return R.Y?R.V+zb(R):R.V},IJ=function(R,l,y){var f=R.videoId; R.videoId=l;R.index=y;l!=f&&lIK(R)},fIX=function(R){var l={}; l.index=R.index;l.listId=R.listId;l.videoId=R.videoId;l.playerState=R.playerState;l.volume=R.volume;l.muted=R.muted;l.audioTrackId=R.audioTrackId;l.trackData=g.Wr(R.trackData);l.hasPrevious=R.ip;l.hasNext=R.Vl;l.playerTime=R.D;l.playerTimeAt=R.J;l.seekableStart=R.X;l.seekableEnd=R.V;l.duration=R.L;l.loadedTime=R.W;l.liveIngestionTime=R.Z;return l},pb=function(R,l){g.Ae.call(this); var y=this;this.L=0;this.Y=R;this.D=[];this.J=new FuD;this.X=this.Z=null;this.B=(0,g.B8)(this.K$L,this);this.V=(0,g.B8)(this.oN,this);this.W=(0,g.B8)(this.tSb,this);this.LX=(0,g.B8)(this.cU4,this);var f=0;R?(f=R.getProxyState(),f!=3&&(R.subscribe("proxyStateChange",this.KF,this),ASA(this))):f=3;f!=0&&(l?this.KF(f):g.h$(function(){y.KF(f)},0)); (R=Y3t())&&NI(this,R);this.subscribe("yt-remote-cast2-session-change",this.LX)},U0=function(R){return new vL(R.Y.getPlayerContextData())},ASA=function(R){g.qZ("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(l){this.D.push(this.Y.subscribe(l,g.nX(this.FLS,l),this))},R)},K1d=function(R){g.qZ(R.D,function(l){this.Y.unsubscribeByKey(l)},R); R.D.length=0},SA=function(R){return R.getState()==1},jA=function(R,l){var y=R.J; y.Z.length+y.X.length<50&&R.J.enqueue(l)},GUU=function(R,l,y){var f=U0(R); w$(f,y);f.playerState!=-1E3&&(f.playerState=l);kW(R,f)},D4=function(R,l,y){R.Y.sendMessage(l,y)},kW=function(R,l){K1d(R); R.Y.setPlayerContextData(fIX(l));ASA(R)},NI=function(R,l){R.X&&(R.X.removeUpdateListener(R.B),R.X.removeMediaListener(R.V),R.oN(null)); R.X=l;R.X&&(y3("Setting cast session: "+R.X.sessionId),R.X.addUpdateListener(R.B),R.X.addMediaListener(R.V),R.X.media.length&&R.oN(R.X.media[0]))},aI8=function(R){var l=R.Z.media,y=R.Z.customData; if(l&&y){var f=U0(R);l.contentId!=f.videoId&&y3("Cast changing video to: "+l.contentId);f.videoId=l.contentId;f.playerState=y.playerState;w$(f,R.Z.getEstimatedTime());kW(R,f)}else y3("No cast media video. Ignoring state update.")},Z4=function(R,l,y){return(0,g.B8)(function(f){this.Yr("Failed to "+l+" with cast v2 channel. Error code: "+f.code); f.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.Yr("Retrying "+l+" using MDx browser channel."),D4(this,l,y))},R)},V3=function(R,l,y,f){f=f===void 0?!1:f; g.Ae.call(this);var A=this;this.D=NaN;this.Dq=!1;this.B=this.W=this.Yb=this.xb=NaN;this.LX=[];this.J=this.V=this.Y=this.Z=this.X=null;this.CX=R;this.P1=f;this.LX.push(g.PW(window,"beforeunload",function(){A.LI(2)})); this.L=[];this.Z=new vL;this.v1=l.id;this.sL=l.idType;this.X=Jv8(this.CX,y,this.ir,this.sL=="shortLived",this.v1);this.X.listen("channelOpened",function(){snt(A)}); this.X.listen("channelClosed",function(){Jd("Channel closed");isNaN(A.D)?h5(!0):h5();A.dispose()}); this.X.listen("channelError",function(K){h5();isNaN(A.bl())?(K==1&&A.sL=="shortLived"&&A.publish("browserChannelAuthError",K),Jd("Channel error: "+K+" without reconnection"),A.dispose()):(A.Dq=!0,Jd("Channel error: "+K+" with reconnection in "+A.bl()+" ms"),g$(A,2))}); this.X.listen("channelMessage",function(K){BzK(A,K)}); this.X.Vr(l.token);this.subscribe("remoteQueueChange",function(){var K=A.Z.videoId;g.x1()&&g.vW("yt-remote-session-video-id",K)})},H6X=function(R){return g.iA(R.L,function(l){return l.type=="LOUNGE_SCREEN"})},Jd=function(R){lf("conn",R)},g$=function(R,l){R.publish("proxyStateChange",l)},nVO=function(R){R.D=g.h$(function(){Jd("Connecting timeout"); R.LI(1)},2E4)},med=function(R){g.E1(R.D); R.D=NaN},oVU=function(R){g.E1(R.xb); R.xb=NaN},cSU=function(R){hUZ(R); R.Yb=g.h$(function(){Cb(R,"getNowPlaying")},2E4)},hUZ=function(R){g.E1(R.Yb); R.Yb=NaN},snt=function(R){Jd("Channel opened"); R.Dq&&(R.Dq=!1,oVU(R),R.xb=g.h$(function(){Jd("Timing out waiting for a screen.");R.LI(1)},15E3))},W1K=function(R,l){var y=null; if(l){var f=H6X(R);f&&(y={clientName:f.clientName,deviceMake:f.brand,deviceModel:f.model,osVersion:f.osVersion})}g.lA("yt.mdx.remote.remoteClient_",y);l&&(med(R),oVU(R));y=R.X.dH()&&isNaN(R.D);l==y?l&&(g$(R,1),Cb(R,"getSubtitlesTrack")):l?(R.pT()&&R.Z.reset(),g$(R,1),Cb(R,"getNowPlaying"),EVK(R)):R.LI(1)},L1K=function(R,l){var y=l.params.videoId; delete l.params.videoId;y==R.Z.videoId&&(g.oL(l.params)?R.Z.trackData=null:R.Z.trackData=l.params,R.publish("remotePlayerChange"))},O6A=function(R,l,y){var f=l.params.videoId||l.params.video_id,A=parseInt(l.params.currentIndex,10); R.Z.listId=l.params.listId||R.Z.listId;IJ(R.Z,f,A);R.publish("remoteQueueChange",y)},PqS=function(R,l){l.params=l.params||{}; O6A(R,l,"NOW_PLAYING_MAY_CHANGE");i6S(R,l);R.publish("autoplayDismissed")},i6S=function(R,l){var y=parseInt(l.params.currentTime||l.params.current_time,10); w$(R.Z,isNaN(y)?0:y);y=parseInt(l.params.state,10);y=isNaN(y)?-1:y;y==-1&&R.Z.playerState==-1E3&&(y=-1E3);R.Z.playerState=y;y=Number(l.params.loadedTime);R.Z.W=isNaN(y)?0:y;R.Z.Oz(Number(l.params.duration));y=R.Z;var f=Number(l.params.liveIngestionTime);y.Z=f;y.Y=isNaN(f)?!1:!0;y=R.Z;f=Number(l.params.seekableStartTime);l=Number(l.params.seekableEndTime);y.X=isNaN(f)?0:f;y.V=isNaN(l)?0:l;R.Z.playerState==1?cSU(R):hUZ(R);R.publish("remotePlayerChange")},ujA=function(R,l){if(R.Z.playerState!=-1E3){var y= 1085; switch(parseInt(l.params.adState,10)){case 1:y=1081;break;case 2:y=1084;break;case 0:y=1083}R.Z.playerState=y;l=parseInt(l.params.currentTime,10);w$(R.Z,isNaN(l)?0:l);R.publish("remotePlayerChange")}},F15=function(R,l){var y=l.params.muted=="true"; R.Z.volume=parseInt(l.params.volume,10);R.Z.muted=y;R.publish("remotePlayerChange")},QnS=function(R,l){R.V=l.params.videoId; R.publish("nowAutoplaying",parseInt(l.params.timeout,10))},$ed=function(R,l){R.V=l.params.videoId||null; R.publish("autoplayUpNext",R.V)},eUd=function(R,l){R.J=l.params.autoplayMode; R.publish("autoplayModeChange",R.J);R.J=="DISABLED"&&R.publish("autoplayDismissed")},b68=function(R,l){var y=l.params.hasNext=="true"; R.Z.ip=l.params.hasPrevious=="true";R.Z.Vl=y;R.publish("previousNextChange")},BzK=function(R,l){l=l.message; l.params?Jd("Received: action="+l.action+", params="+g.jf(l.params)):Jd("Received: action="+l.action+" {}");switch(l.action){case "loungeStatus":l=l3(l.params.devices);R.L=g.L$(l,function(f){return new Gd(f)}); l=!!g.iA(R.L,function(f){return f.type=="LOUNGE_SCREEN"}); W1K(R,l);l=R.JE("mlm");R.publish("multiStateLoopEnabled",l);break;case "loungeScreenDisconnected":g.TK(R.L,function(f){return f.type=="LOUNGE_SCREEN"}); W1K(R,!1);break;case "remoteConnected":var y=new Gd(l3(l.params.device));g.iA(R.L,function(f){return f.equals(y)})||XgS(R.L,y); break;case "remoteDisconnected":y=new Gd(l3(l.params.device));g.TK(R.L,function(f){return f.equals(y)}); break;case "gracefulDisconnect":break;case "playlistModified":O6A(R,l,"QUEUE_MODIFIED");break;case "nowPlaying":PqS(R,l);break;case "onStateChange":i6S(R,l);break;case "onAdStateChange":ujA(R,l);break;case "onVolumeChanged":F15(R,l);break;case "onSubtitlesTrackChanged":L1K(R,l);break;case "nowAutoplaying":QnS(R,l);break;case "autoplayDismissed":R.publish("autoplayDismissed");break;case "autoplayUpNext":$ed(R,l);break;case "onAutoplayModeChanged":eUd(R,l);break;case "onHasPreviousNextChanged":b68(R, l);break;case "requestAssistedSignIn":R.publish("assistedSignInRequested",l.params.authCode);break;case "onLoopModeChanged":R.publish("loopModeChange",l.params.loopMode);break;default:Jd("Unrecognized action: "+l.action)}},EVK=function(R){g.E1(R.B); R.B=g.h$(function(){R.LI(1)},864E5)},Cb=function(R,l,y){y?Jd("Sending: action="+l+", params="+g.jf(y)):Jd("Sending: action="+l); R.X.sendMessage(l,y)},X$U=function(R){Gb.call(this,"ScreenServiceProxy"); this.a9=R;this.Z=[];this.Z.push(this.a9.$_s("screenChange",(0,g.B8)(this.Ma,this)));this.Z.push(this.a9.$_s("onlineScreenChange",(0,g.B8)(this.o$S,this)))},zUS=function(R,l){XhU(); if(!c_||!c_.get("yt-remote-disable-remote-module-for-dev")){l=g.JZ("MDX_CONFIG")||l;O0K();FeA();qI||(qI=new Yo(l?l.loungeApiHost:void 0),TgK()&&(qI.Z="/api/loungedev"));td||(td=g.yr("yt.mdx.remote.deferredProxies_")||[],g.lA("yt.mdx.remote.deferredProxies_",td));TzO();var y=YW();if(!y){var f=new nb(qI,l?l.disableAutomaticScreenCache||!1:!1);g.lA("yt.mdx.remote.screenService_",f);y=YW();var A={};l&&(A={appId:l.appId,disableDial:l.disableDial,theme:l.theme,loadCastApiSetupScript:l.loadCastApiSetupScript, disableCastApi:l.disableCastApi,enableDialLoungeToken:l.enableDialLoungeToken,enableCastLoungeToken:l.enableCastLoungeToken,forceMirroring:l.forceMirroring});g.lA("yt.mdx.remote.enableConnectWithInitialState_",l?l.enableConnectWithInitialState||!1:!1);gS5(R,f,function(K){K?MI()&&r$(MI(),"YouTube TV"):f.subscribe("onlineScreenChange",function(){Es("yt-remote-receiver-availability-change")})},A)}l&&!g.yr("yt.mdx.remote.initialized_")&&(g.lA("yt.mdx.remote.initialized_",!0),RV("Initializing: "+g.jf(l)), lv.push(g.Rn("yt-remote-cast2-api-ready",function(){Es("yt-remote-api-ready")})),lv.push(g.Rn("yt-remote-cast2-availability-change",function(){Es("yt-remote-receiver-availability-change")})),lv.push(g.Rn("yt-remote-cast2-receiver-selected",function(){y7(null); Es("yt-remote-auto-connect","cast-selector-receiver")})),lv.push(g.Rn("yt-remote-cast2-receiver-resumed",function(){Es("yt-remote-receiver-resumed","cast-selector-receiver")})),lv.push(g.Rn("yt-remote-cast2-session-change",deA)),lv.push(g.Rn("yt-remote-connection-change",function(K){K?r$(MI(),"YouTube TV"):fL()||(r$(null,null),t8S())})),lv.push(g.Rn("yt-remote-cast2-session-failed",function(){Es("yt-remote-connection-failed")})),R=rSS(),l.isAuto&&(R.id+="#dial"),A=l.capabilities||[],A.length>0&&(R.capabilities= A),R.name=l.device,R.app=l.app,(l=l.theme)&&(R.theme=l),RV(" -- with channel params: "+g.jf(R)),R?(g.vW("yt-remote-session-app",R.app),g.vW("yt-remote-session-name",R.name)):(g.w0("yt-remote-session-app"),g.w0("yt-remote-session-name")),g.lA("yt.mdx.remote.channelParams_",R),y.start(),MI()||vVU())}},w$K=function(){var R=YW().a9.$_gos(); var l=Ai();l&&KL()&&(Led(R,l)||R.push(l));return WeU(R)},IIK=function(){var R=xeO(); !R&&Tb()&&q38()&&(R={key:"cast-selector-receiver",name:q38()});return R},xeO=function(){var R=w$K(),l=Ai(); l||(l=fL());return g.iA(R,function(y){return l&&B_(l,y.key)?!0:!1})},Ai=function(){var R=MI(); if(!R)return null;var l=YW().PQ();return nj(l,R)},deA=function(R){RV("remote.onCastSessionChange_: "+H_(R)); if(R){var l=Ai();if(l&&l.id==R.id){if(r$(l.id,"YouTube TV"),R.idType=="shortLived"&&(R=R.token))Gz&&(Gz.token=R),(l=KL())&&l.Vr(R)}else l&&aV(),sK(R,1)}else KL()&&aV()},aV=function(){d$()?XG().stopSession():bf("stopSession called before API ready."); var R=KL();R&&(R.disconnect(1),NzO(null))},p$d=function(){var R=KL(); return!!R&&R.getProxyState()!=3},RV=function(R){lf("remote",R)},YW=function(){if(!Uer){var R=g.yr("yt.mdx.remote.screenService_"); Uer=R?new X$U(R):null}return Uer},MI=function(){return g.yr("yt.mdx.remote.currentScreenId_")},SxZ=function(R){g.lA("yt.mdx.remote.currentScreenId_",R)},jnO=function(){return g.yr("yt.mdx.remote.connectData_")},y7=function(R){g.lA("yt.mdx.remote.connectData_",R)},KL=function(){return g.yr("yt.mdx.remote.connection_")},NzO=function(R){var l=KL(); y7(null);R||SxZ("");g.lA("yt.mdx.remote.connection_",R);td&&(g.qZ(td,function(y){y(R)}),td.length=0); l&&!R?Es("yt-remote-connection-change",!1):!l&&R&&Es("yt-remote-connection-change",!0)},fL=function(){var R=g.x1(); if(!R)return null;var l=YW();if(!l)return null;l=l.PQ();return nj(l,R)},sK=function(R,l){MI(); Ai()&&Ai();if(BH)Gz=R;else{SxZ(R.id);var y=g.yr("yt.mdx.remote.enableConnectWithInitialState_")||!1;R=new V3(qI,R,rSS(),y);R.connect(l,jnO());R.subscribe("beforeDisconnect",function(f){Es("yt-remote-before-disconnect",f)}); R.subscribe("beforeDispose",function(){KL()&&(KL(),NzO(null))}); R.subscribe("browserChannelAuthError",function(){var f=Ai();f&&f.idType=="shortLived"&&(d$()?XG().handleBrowserChannelAuthError():bf("refreshLoungeToken called before API ready."))}); NzO(R)}},vVU=function(){var R=fL(); R?(RV("Resume connection to: "+H_(R)),sK(R,0)):(h5(),t8S(),RV("Skipping connecting because no session screen found."))},TzO=function(){var R=rSS(); if(g.oL(R)){R=oy();var l=g.zI("yt-remote-session-name")||"",y=g.zI("yt-remote-session-app")||"";R={device:"REMOTE_CONTROL",id:R,name:l,app:y,mdxVersion:3};R.authuser=String(g.JZ("SESSION_INDEX","0"));(l=g.JZ("DELEGATED_SESSION_ID"))&&(R.pageId=String(l));g.lA("yt.mdx.remote.channelParams_",R)}},rSS=function(){return g.yr("yt.mdx.remote.channelParams_")||{}},Z6r=function(R,l,y){g.p.call(this); var f=this;this.Z=R;this.G=l;this.HZ=y;this.events=new g.QW(this);this.J=!1;this.D=new g.uZ(64);this.X=new g.Vg(this.zx,500,this);this.L=new g.Vg(this.NI,1E3,this);this.W=new Os(this.uJ7,0,this);this.Y={};this.B=new g.Vg(this.uL,1E3,this);this.V=new g.YA(this.seekTo,1E3,this);this.LX=this.events.N(this.G,"onVolumeChange",function(A){kUK(f,A)}); g.U(this,this.events);this.events.N(l,"onCaptionsTrackListChanged",this.JF1);this.events.N(l,"captionschanged",this.UU4);this.events.N(l,"captionssettingschanged",this.mU);this.events.N(l,"videoplayerreset",this.KK);this.events.N(l,"mdxautoplaycancel",function(){f.HZ.QM()}); l.C("enable_mdx_video_play_directly")&&this.events.N(l,"videodatachange",function(){DeK(f.Z)||HH(f)||nL(f,0)}); R=this.HZ;R.Fx();R.subscribe("proxyStateChange",this.wv,this);R.subscribe("remotePlayerChange",this.hd,this);R.subscribe("remoteQueueChange",this.KK,this);R.subscribe("previousNextChange",this.HF,this);R.subscribe("nowAutoplaying",this.K1,this);R.subscribe("autoplayDismissed",this.Fi,this);g.U(this,this.X);g.U(this,this.L);g.U(this,this.W);g.U(this,this.B);g.U(this,this.V);this.mU();this.KK();this.hd()},kUK=function(R,l){if(HH(R)){R.HZ.unsubscribe("remotePlayerChange",R.hd,R); var y=Math.round(l.volume);l=!!l.muted;var f=U0(R.HZ);if(y!==f.volume||l!==f.muted)R.HZ.setVolume(y,l),R.B.start();R.HZ.subscribe("remotePlayerChange",R.hd,R)}},JSO=function(R){R.J1(0); R.X.stop();R.Xc(new g.uZ(64))},gVS=function(R,l){if(HH(R)&&!R.J){var y=null; l&&(y={style:R.G.getSubtitlesUserSettings()},Object.assign(y,l));R.HZ.r8(R.G.getVideoData(1).videoId,y);R.Y=U0(R.HZ).trackData}},nL=function(R,l){var y=R.G.getPlaylist(); if(y==null?0:y.listId){var f=y.index;var A=y.listId.toString()}y=R.G.getVideoData(1);R.HZ.playVideo(y.videoId,l,f,A,y.playerParams,y.CX,bEU(y));R.Xc(new g.uZ(1))},VcU=function(R,l){if(l){var y=R.G.getOption("captions","tracklist",{XS:1}); y&&y.length?(R.G.setOption("captions","track",l),R.J=!1):(R.G.loadModule("captions"),R.J=!0)}else R.G.setOption("captions","track",{})},HH=function(R){return U0(R.HZ).videoId===R.G.getVideoData(1).videoId},CqS=function(R,l){g.k0.call(this,R); this.Z=l},mm=function(){g.Z.call(this,{T:"div", j:"ytp-mdx-popup-dialog",K:{role:"dialog"},S:[{T:"div",j:"ytp-mdx-popup-dialog-inner-content",S:[{T:"div",j:"ytp-mdx-popup-title",IE:"Saliste de tu cuenta"},{T:"div",j:"ytp-mdx-popup-description",IE:"Es posible que los videos que mires se agreguen al historial de reproducciones de la TV, lo que puede influir en las recomendaciones. Para que esto no suceda, presiona \u201cCancelar\u201d y accede a YouTube desde tu computadora."},{T:"div",j:"ytp-mdx-privacy-popup-buttons",S:[{T:"button",QL:["ytp-button", "ytp-mdx-privacy-popup-cancel"],IE:"Cancelar"},{T:"button",QL:["ytp-button","ytp-mdx-privacy-popup-confirm"],IE:"Confirmar"}]}]}]});this.fade=new g.MF(this,250);this.cancelButton=this.pX("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.pX("ytp-mdx-privacy-popup-confirm");g.U(this,this.fade);this.N(this.cancelButton,"click",this.Z);this.N(this.confirmButton,"click",this.X)},oV=function(R){g.Z.call(this,{T:"div", j:"ytp-remote",S:[{T:"div",j:"ytp-remote-display-status",S:[{T:"div",j:"ytp-remote-display-status-icon",S:[g.mtj()]},{T:"div",j:"ytp-remote-display-status-text",IE:"{{statustext}}"}]}]});this.api=R;this.fade=new g.MF(this,250);g.U(this,this.fade);this.N(R,"presentingplayerstatechange",this.onStateChange);this.vl(R.getPlayerStateObject())},hi=function(R,l){g.N4.call(this,"Reproducir en",1,R,l); this.G=R;this.zi={};this.N(R,"onMdxReceiversChange",this.Y);this.N(R,"presentingplayerstatechange",this.Y);this.Y()},qxS=function(R){g.Fc.call(this,R); this.yI={key:EaX(),name:"Esta computadora"};this.Lm=null;this.subscriptions=[];this.kE=this.HZ=null;this.zi=[this.yI];this.y8=this.yI;this.Ak=new g.uZ(64);this.fC=0;this.yD=-1;this.ZM=!1;this.DW=this.q6=this.Hj=null;if(!g.qE(this.player.U())&&!g.xi(this.player.U())){R=this.player;var l=g.Qs(R);l&&(l=l.Ju())&&(l=new hi(R,l),g.U(this,l));l=new oV(R);g.U(this,l);g.kT(R,l.element,4);this.Hj=new mm;g.U(this,this.Hj);g.kT(R,this.Hj.element,4);this.ZM=!!fL()}},cH=function(R){R.q6&&(R.player.removeEventListener("presentingplayerstatechange", R.q6),R.q6=null)},tcK=function(R,l,y){R.Ak=y; R.player.publish("presentingplayerstatechange",new g.HR(y,l))},EK=function(R,l){if(l.key!==R.y8.key)if(l.key===R.yI.key)aV(); else if(DeK(R)&&YxO(R),R.y8=l,!R.player.U().C("disable_mdx_connection_in_mdx_module_for_music_web")||!g.xi(R.player.U())){var y=R.player.getPlaylistId();var f=R.player.getVideoData(1);var A=f.videoId;if(!y&&!A||(R.player.getAppState()===2||R.player.getAppState()===1)&&R.player.U().C("should_clear_video_data_on_player_cued_unstarted"))f=null;else{var K=R.player.getPlaylist();if(K){var G=[];for(var B=0;B2*this.size&&Kj(this),!0):!1}; g.L.get=function(R,l){return fj(this.X,R)?this.X[R]:l}; g.L.set=function(R,l){fj(this.X,R)||(this.size+=1,this.Z.push(R),this.Id++);this.X[R]=l}; g.L.forEach=function(R,l){for(var y=this.kH(),f=0;f=f.Z.length)return g.m6;var K=f.Z[l++];return g.is(R?K:f.X[K])}; return A}; var JZO={YiL:"atp",h3L:"ska",Zmx:"que",b7U:"mus",dAx:"sus",uOb:"dsp",Qt4:"seq",Lo$:"mic",ZfL:"dpa",pQL:"mlm",w04:"dsdtr",FoQ:"ntb",g8S:"vsp",D$7:"scn",LNE:"rpe",MaL:"dcn",rRU:"dcp",UCX:"pas",mPb:"drq",fTX:"opf",scL:"els",bfQ:"isg",PPq:"svq",y24:"mvp",aXE:"ads",k37:"stcp",fjx:"sads",iw$:"dloc",L8b:"dcw",pEE:"asw",xD1:"apw"},gOt={eCS:"u",vvU:"cl",WSE:"k",TtU:"i",EvE:"cr",sU$:"m",oh4:"g",P2:"up"},rvS={po:"adPlaying",yO:"onAdStateChange"},vR5={PyE:"nowPlaying",jUS:"onStateChange",po:"adPlaying",yO:"onAdStateChange", xk:"nowPlayingShorts",b1:"onShortsStateChange"},z45={xk:"nowPlayingShorts",b1:"onShortsStateChange"};Gd.prototype.equals=function(R){return R?this.id==R.id:!1}; var uyZ="",c_=null;g.O(drD,g.NL);var W_,phX=vaU("loadCastFramework")||vaU("loadCastApplicationFramework"),jwr=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.hK(Os,g.p);g.L=Os.prototype;g.L.gC=function(R){this.Y=arguments;this.Z=!1;this.oV?this.L=g.mU()+this.H0:this.oV=g.N_(this.J,this.H0)}; g.L.stop=function(){this.oV&&(g.Mo.clearTimeout(this.oV),this.oV=null);this.L=null;this.Z=!1;this.Y=[]}; g.L.pause=function(){++this.X}; g.L.resume=function(){this.X&&(--this.X,!this.X&&this.Z&&(this.Z=!1,this.D.apply(null,this.Y)))}; g.L.G4=function(){this.stop();Os.lO.G4.call(this)}; g.L.Pz=function(){this.oV&&(g.Mo.clearTimeout(this.oV),this.oV=null);this.L?(this.oV=g.N_(this.J,this.L-g.mU()),this.L=null):this.X?this.Z=!0:(this.Z=!1,this.D.apply(null,this.Y))};i3.prototype.stringify=function(R){return g.Mo.JSON.stringify(R,void 0)}; i3.prototype.parse=function(R){return g.Mo.JSON.parse(R,void 0)};g.hK(Dr8,g.gJ);g.hK(Z05,g.gJ);var J$d=null;g.hK(V0d,g.gJ);g.hK(CWK,g.gJ);g.hK(q1d,g.gJ);Qb.prototype.debug=function(){}; Qb.prototype.info=function(){}; Qb.prototype.warning=function(){};var ADt={},fdK={};g.L=$o.prototype;g.L.setTimeout=function(R){this.uQ=R}; g.L.fq=function(R){R=R.target;var l=this.UL;l&&g.VL(R)==3?l.BJ():this.nO(R)}; g.L.nO=function(R){try{if(R==this.Z)a:{var l=g.VL(this.Z),y=this.Z.X,f=this.Z.getStatus();if(!(l<3)&&(l!=3||this.Z&&(this.X.X||g.q_(this.Z)||g.t_(this.Z)))){this.P1||l!=4||y==7||(y==8||f<=0?P_(3):P_(2));adU(this);var A=this.Z.getStatus();this.ZL=A;var K=yDX(this);if(this.D=A==200){if(this.LA&&!this.jS){b:{if(this.Z){var G=g.Yv(this.Z,"X-HTTP-Initial-Response");if(G&&!g.d9(G)){var B=G;break b}}B=null}if(R=B)this.jS=!0,E1r(this,R);else{this.D=!1;this.J=3;u3(12);b3(this);XL(this);break a}}if(this.sL){R= !0;for(var H;!this.P1&&this.V0&&!this.sF&&(this.sF=!0,this.L.Zp(this)):(b3(this),XL(this))}else E1r(this,K);l==4&&b3(this);this.D&&!this.P1&&(l==4?saK(this.L,this):(this.D=!1,e7(this)))}else g.PsQ(this.Z),A==400&&K.indexOf("Unknown SID")> 0?(this.J=3,u3(12)):(this.J=0,u3(13)),b3(this),XL(this)}}}catch(n){}finally{}}; g.L.cancel=function(){this.P1=!0;b3(this)}; g.L.vz=function(){this.LX=null;var R=Date.now();R-this.B1>=0?(this.v1!=2&&(P_(3),u3(17)),b3(this),this.J=2,XL(this)):GIt(this,this.B1-R)}; g.L.getLastError=function(){return this.J}; g.L.yk=function(){return this.Z};LKd.prototype.cancel=function(){this.L=iFd(this);if(this.X)this.X.cancel(),this.X=null;else if(this.Z&&this.Z.size!==0){for(var R=g.u(this.Z.values()),l=R.next();!l.done;l=R.next())l.value.cancel();this.Z.clear()}};g.L=$tD.prototype;g.L.fO=8;g.L.k0=1;g.L.connect=function(R,l,y,f){u3(0);this.vZ=R;this.P1=l||{};y&&f!==void 0&&(this.P1.OSID=y,this.P1.OAID=f);this.jS=this.ol;this.CX=o1r(this,null,this.vZ);v_(this)}; g.L.disconnect=function(){bFr(this);if(this.k0==3){var R=this.tU++,l=this.CX.clone();g.mj(l,"SID",this.Y);g.mj(l,"RID",R);g.mj(l,"TYPE","terminate");xo(this,l);R=new $o(this,this.Y,R);R.v1=2;R.W=M8(l.clone());l=!1;if(g.Mo.navigator&&g.Mo.navigator.sendBeacon)try{l=g.Mo.navigator.sendBeacon(R.W.toString(),"")}catch(y){}!l&&g.Mo.Image&&((new Image).src=R.W,l=!0);l||(R.Z=RoU(R.L,null),R.Z.send(R.W));R.xb=Date.now();e7(R)}zod(this)}; g.L.KM=function(){return this.k0==0}; g.L.getState=function(){return this.k0}; g.L.jE=function(R){if(this.D)if(this.D=null,this.k0==1){if(!R){this.tU=Math.floor(Math.random()*1E5);R=this.tU++;var l=new $o(this,"",R),y=this.B;this.ZL&&(y?(y=g.Eh(y),g.Lp(y,this.ZL)):y=this.ZL);this.V!==null||this.B1||(l.CX=y,y=null);var f;if(this.iQ)a:{for(var A=f=0;A4096){f=A;break a}if(f===4096||A===this.L.length-1){f=A+1;break a}}f= 1E3}else f=1E3;f=dtU(this,l,f);A=this.CX.clone();g.mj(A,"RID",R);g.mj(A,"CVER",22);this.sL&&g.mj(A,"X-HTTP-Session-Id",this.sL);xo(this,A);y&&(this.B1?f="headers="+g.bH(g.jkZ(y))+"&"+f:this.V&&g.El(A,this.V,y));mtA(this.X,l);this.eI&&g.mj(A,"TYPE","init");this.iQ?(g.mj(A,"$req",f),g.mj(A,"SID","null"),l.LA=!0,M0U(l,A,null)):M0U(l,A,f);this.k0=2}}else this.k0==3&&(R?rD8(this,R):this.L.length==0||OFt(this.X)||rD8(this))}; g.L.VH=function(){this.W=null;v1U(this);if(this.OF&&!(this.uQ||this.Z==null||this.eZ<=0)){var R=2*this.eZ;this.Dq=FL((0,g.B8)(this.h9b,this),R)}}; g.L.h9b=function(){this.Dq&&(this.Dq=null,this.jS=!1,this.uQ=!0,u3(10),du(this),v1U(this))}; g.L.Zp=function(R){this.Z==R&&this.OF&&!this.uQ&&(eoU(this),this.uQ=!0,u3(11))}; g.L.VJ=function(){this.LX!=null&&(this.LX=null,du(this),HF8(this),u3(19))}; g.L.FkL=function(R){R?u3(2):u3(1)}; g.L.isActive=function(){return!!this.J&&this.J.isActive(this)}; g.L=xtD.prototype;g.L.AY=function(){}; g.L.Ne=function(){}; g.L.zX=function(){}; g.L.o8=function(){}; g.L.isActive=function(){return!0}; g.L.oy=function(){};g.hK(NR,g.sT);NR.prototype.open=function(){this.Z.J=this.L;this.D&&(this.Z.v1=!0);this.Z.connect(this.J,this.X||void 0)}; NR.prototype.close=function(){this.Z.disconnect()}; NR.prototype.send=function(R){var l=this.Z;if(typeof R==="string"){var y={};y.__data__=R;R=y}else this.Y&&(y={},y.__data__=g.jf(R),R=y);l.L.push(new WK5(l.CJ++,R));l.k0==3&&v_(l)}; NR.prototype.G4=function(){this.Z.J=null;delete this.L;this.Z.disconnect();delete this.Z;NR.lO.G4.call(this)}; g.hK(N0U,Dr8);g.hK(pWD,Z05);g.hK(Iy,xtD);Iy.prototype.AY=function(){this.Z.dispatchEvent("m")}; Iy.prototype.Ne=function(R){this.Z.dispatchEvent(new N0U(R))}; Iy.prototype.zX=function(R){this.Z.dispatchEvent(new pWD(R))}; Iy.prototype.o8=function(){this.Z.dispatchEvent("n")};var Us=new g.sT;g.O(jaU,g.gJ);g.L=j7.prototype;g.L.b3=null;g.L.uo=!1;g.L.gP=null;g.L.XY=null;g.L.Dw=null;g.L.EX=null;g.L.pD=null;g.L.K6=null;g.L.D0=null;g.L.yU=null;g.L.u4=0;g.L.R7=null;g.L.cJ=null;g.L.sH=null;g.L.bN=-1;g.L.Ih=!0;g.L.yA=!1;g.L.Z4=0;g.L.OX=null;var VIr={},g1U={};g.L=j7.prototype;g.L.setTimeout=function(R){this.X=R}; g.L.Na=function(R){R=R.target;var l=this.OX;l&&g.VL(R)==3?l.BJ():this.d8(R)}; g.L.d8=function(R){try{if(R==this.yU)a:{var l=g.VL(this.yU),y=this.yU.X,f=this.yU.getStatus();if(g.H0&&!g.Up("420+")){if(l<4)break a}else if(l<3||l==3&&!g.q_(this.yU))break a;this.yA||l!=4||y==7||(y==8||f<=0?this.Z.Xq(3):this.Z.Xq(2));tIX(this);var A=this.yU.getStatus();this.bN=A;var K=g.q_(this.yU);if(this.uo=A==200){l==4&&ko(this);if(this.sL){for(R=!0;!this.yA&&this.u40?(this.sH=3,S7(13)):(this.sH=0,S7(14)),ko(this),YGU(this)}}catch(B){}finally{}}; g.L.cancel=function(){this.yA=!0;ko(this)}; g.L.zE=function(){this.gP=null;var R=Date.now();R-this.XY>=0?(this.EX!=2&&this.Z.Xq(3),ko(this),this.sH=2,S7(18),YGU(this)):qGd(this,this.XY-R)}; g.L.getLastError=function(){return this.sH};g.L=yvU.prototype;g.L.YF=null;g.L.YI=null;g.L.Ja=!1;g.L.Ip=null;g.L.MC=null;g.L.yw=-1;g.L.ke=null;g.L.xW=null;g.L.connect=function(R){this.Ip=R;R=Zj(this.Z,null,this.Ip);S7(3);Date.now();var l=this.Z.B;l!=null?(this.ke=l[0],(this.xW=l[1])?(this.MC=1,fg8(this)):(this.MC=2,Avr(this))):(Ry(R,"MODE","init"),this.YI=new j7(this),this.YI.b3=this.YF,ZFX(this.YI,R,!1,null,!0),this.MC=0)}; g.L.Gm=function(R){if(R)this.MC=2,Avr(this);else{S7(4);var l=this.Z;l.eO=l.xg.yw;Cj(l,9)}R&&this.Xq(2)}; g.L.L0=function(R){return this.Z.L0(R)}; g.L.abort=function(){this.YI&&(this.YI.cancel(),this.YI=null);this.yw=-1}; g.L.KM=function(){return!1}; g.L.WB=function(R,l){this.yw=R.bN;if(this.MC==0)if(l){try{var y=this.X.parse(l)}catch(f){R=this.Z;R.eO=this.yw;Cj(R,2);return}this.ke=y[0];this.xW=y[1]}else R=this.Z,R.eO=this.yw,Cj(R,2);else this.MC==2&&(this.Ja?(S7(7),Date.now()):l=="11111"?(S7(6),this.Ja=!0,Date.now(),this.yw=200,this.YI.cancel(),S7(12),J5(this.Z,this,!0)):(S7(8),Date.now(),this.Ja=!1))}; g.L.Tj=function(){this.yw=this.YI.bN;if(this.YI.uo)this.MC==0?this.xW?(this.MC=1,fg8(this)):(this.MC=2,Avr(this)):this.MC==2&&(this.Ja?(S7(12),J5(this.Z,this,!0)):(S7(11),J5(this.Z,this,!1)));else{this.MC==0?S7(9):this.MC==2&&S7(10);var R=this.Z;this.YI.getLastError();R.eO=this.yw;Cj(R,2)}}; g.L.Jl=function(){return this.Z.Jl()}; g.L.isActive=function(){return this.Z.isActive()}; g.L.Xq=function(R){this.Z.Xq(R)};g.L=Kur.prototype;g.L.r3=null;g.L.QA=null;g.L.bV=null;g.L.qW=null;g.L.xF=null;g.L.Su=null;g.L.hY=null;g.L.Gj=null;g.L.CD=0;g.L.dC=0;g.L.SJ=null;g.L.Si=null;g.L.bG=null;g.L.Rd=null;g.L.xg=null;g.L.Aw=null;g.L.Vc=-1;g.L.Ua=-1;g.L.eO=-1;g.L.vP=0;g.L.PP=0;g.L.Jg=8;var Mct={OK:0,aj9:2,ruU:4,vI4:5,CRU:6,STOP:7,Gp:8,aW7:9,Tz7:10,Gg9:11,yJ$:12};g.hK(agU,g.gJ);g.hK(sqd,g.gJ);g.L=Kur.prototype; g.L.connect=function(R,l,y,f,A){S7(0);this.xF=l;this.QA=y||{};f&&A!==void 0&&(this.QA.OSID=f,this.QA.OAID=A);this.W?(pj((0,g.B8)(this.wI,this,R),100),HOO(this)):this.wI(R)}; g.L.disconnect=function(){nRX(this);if(this.Z==3){var R=this.CD++,l=this.Su.clone();g.mj(l,"SID",this.Y);g.mj(l,"RID",R);g.mj(l,"TYPE","terminate");Vb(this,l);R=new j7(this,this.Y,R);R.EX=2;R.pD=M8(l.clone());(new Image).src=R.pD.toString();R.Dw=Date.now();JDd(R)}Pd8(this)}; g.L.wI=function(R){this.xg=new yvU(this);this.xg.YF=this.r3;this.xg.X=this.J;this.xg.connect(R)}; g.L.KM=function(){return this.Z==0}; g.L.getState=function(){return this.Z}; g.L.tY=function(R){this.Si=null;ERU(this,R)}; g.L.Oa=function(){this.bG=null;this.qW=new j7(this,this.Y,"rpc",this.V);this.qW.b3=this.r3;this.qW.Z4=0;var R=this.hY.clone();g.mj(R,"RID","rpc");g.mj(R,"SID",this.Y);g.mj(R,"CI",this.Aw?"0":"1");g.mj(R,"AID",this.Vc);Vb(this,R);g.mj(R,"TYPE","xmlhttp");ZFX(this.qW,R,!0,this.Gj,!1)}; g.L.WB=function(R,l){if(this.Z!=0&&(this.qW==R||this.bV==R))if(this.eO=R.bN,this.bV==R&&this.Z==3)if(this.Jg>7){try{var y=this.J.parse(l)}catch(f){y=null}if(Array.isArray(y)&&y.length==3)if(R=y,R[0]==0)a:{if(!this.bG){if(this.qW)if(this.qW.Dw+3E30)){if(f=l==1)this.bV||this.Si||this.Z==1||this.vP>=2?f=!1:(this.Si=pj((0,g.B8)(this.tY,this,R),LuU(this,this.vP)),this.vP++, f=!0);f=!(f||l==2&&OOX(this))}if(f)switch(y){case 1:Cj(this,5);break;case 4:Cj(this,10);break;case 3:Cj(this,6);break;case 7:Cj(this,12);break;default:Cj(this,2)}}}; g.L.Ah=function(R){if(!g.uA(arguments,this.Z))throw Error("Unexpected channel state: "+this.Z);}; g.L.eQL=function(R){R?S7(2):(S7(1),iOU(this,8))}; g.L.L0=function(R){if(R)throw Error("Can't create secondary domain capable XhrIo object.");R=new g.ZY;R.V=!1;return R}; g.L.isActive=function(){return!!this.SJ&&this.SJ.isActive(this)}; g.L.Xq=function(R){var l=Us;l.dispatchEvent(new sqd(l,R))}; g.L.Jl=function(){return!1}; g.L=uvD.prototype;g.L.cB=function(){}; g.L.Ea=function(){}; g.L.kS=function(){}; g.L.KO=function(){}; g.L.yF=function(){}; g.L.SE=function(){return{}}; g.L.isActive=function(){return!0};g.L=FuD.prototype;g.L.enqueue=function(R){this.X.push(R)}; g.L.isEmpty=function(){return this.Z.length===0&&this.X.length===0}; g.L.clear=function(){this.Z=[];this.X=[]}; g.L.contains=function(R){return g.uA(this.Z,R)||g.uA(this.X,R)}; g.L.remove=function(R){var l=this.Z;var y=(0,g.GKX)(l,R);y>=0?(g.FS(l,y),l=!0):l=!1;return l||g.bA(this.X,R)}; g.L.QX=function(){for(var R=[],l=this.Z.length-1;l>=0;--l)R.push(this.Z[l]);l=this.X.length;for(var y=0;y=RHK.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(R=RHK[this.X],this.oV=g.h$((0,g.B8)(this.Vg,this),R),this.X++):this.publish("pairingFailed",Error("Server error "+R.status))}; g.L.Eg=function(){this.Z=null;this.publish("pairingFailed",Error("Server not responding"))}; var RHK=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.hK(s0,Gb);g.L=s0.prototype;g.L.start=function(){aJ(this)&&this.publish("screenChange");!g.zI("yt-remote-lounge-token-expiration")&&ALt(this);g.E1(this.Z);this.Z=g.h$((0,g.B8)(this.start,this),1E4)}; g.L.add=function(R,l){aJ(this);RXO(this,R);BL(this,!1);this.publish("screenChange");l(R);R.token||ALt(this)}; g.L.remove=function(R,l){var y=aJ(this);yLU(this,R)&&(BL(this,!1),y=!0);l(R);y&&this.publish("screenChange")}; g.L.zd=function(R,l,y,f){var A=aJ(this),K=this.get(R.id);K?(K.name!=l&&(K.name=l,BL(this,!1),A=!0),y(R)):f(Error("no such local screen."));A&&this.publish("screenChange")}; g.L.G4=function(){g.E1(this.Z);s0.lO.G4.call(this)}; g.L.zZ=function(R){aJ(this);var l=this.screens.length;R=R&&R.screens||[];for(var y=R.length,f=0;f20)break a;B=l(K,G)}K=B}A.name=K}y(ma(this,A))},this), onError:(0,g.B8)(function(A){f(Error("pairing request failed: "+A.status))},this), onTimeout:(0,g.B8)(function(){f(Error("pairing request timed out."))},this)})}; g.L.G4=function(){g.f_(this.X);g.f_(this.Z);nb.lO.G4.call(this)}; g.L.E5=function(){ESr(this);this.publish("screenChange");this.Z.update()}; nb.prototype.dispose=nb.prototype.dispose;g.hK(oJ,g.Ae);g.L=oJ.prototype;g.L.hO=function(R){this.Fx()||(R&&(cL(this,""+R),this.publish("sessionFailed")),this.Z=null,this.publish("sessionScreen",null))}; g.L.info=function(R){lf(this.sL,R)}; g.L.BB=function(){return null}; g.L.h_=function(R){var l=this.X;R?(l.displayStatus=new chrome.cast.ReceiverDisplayStatus(R,[]),l.displayStatus.showStop=!0):l.displayStatus=null;chrome.cast.setReceiverDisplayStatus(l,(0,g.B8)(function(){this.info("Updated receiver status for "+l.friendlyName+": "+R)},this),(0,g.B8)(function(){cL(this,"Failed to update receiver status for: "+l.friendlyName)},this))}; g.L.G4=function(){this.h_("");oJ.lO.G4.call(this)};g.O(E0,oJ);g.L=E0.prototype;g.L.dO=function(R){if(this.L){if(this.L==R)return;cL(this,"Overriding cast session with new session object");XvD(this);this.xb=!1;this.B="unknown";this.L.removeUpdateListener(this.Yb);this.L.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Dq)}this.L=R;this.L.addUpdateListener(this.Yb);this.L.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.Dq);F9d(this,"getMdxSessionStatus")}; g.L.pL=function(R){this.info("launchWithParams no-op for Cast: "+g.jf(R))}; g.L.stop=function(){this.L?this.L.stop((0,g.B8)(function(){this.hO()},this),(0,g.B8)(function(){this.hO(Error("Failed to stop receiver app."))},this)):this.hO(Error("Stopping cast device without session."))}; g.L.h_=function(){}; g.L.G4=function(){this.info("disposeInternal");XvD(this);this.L&&(this.L.removeUpdateListener(this.Yb),this.L.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Dq));this.L=null;oJ.prototype.G4.call(this)}; g.L.FML=function(R,l){if(!this.Fx())if(l)if(l=l3(l),g.GK(l))switch(R=""+l.type,l=l.data||{},this.info("onYoutubeMessage_: "+R+" "+g.jf(l)),R){case "mdxSessionStatus":i1K(this,l);break;case "loungeToken":Q15(this,l);break;default:cL(this,"Unknown youtube message: "+R)}else cL(this,"Unable to parse message.");else cL(this,"No data in message.")}; g.L.CT=function(R,l,y,f){g.E1(this.W);this.W=0;oSS(this.Y,this.X.label,R,this.X.friendlyName,(0,g.B8)(function(A){A?l(A):f>=0?(cL(this,"Screen "+R+" appears to be offline. "+f+" retries left."),this.W=g.h$((0,g.B8)(this.CT,this,R,l,y,f-1),300)):y(Error("Unable to fetch screen."))},this),y)}; g.L.BB=function(){return this.L}; g.L.uK=function(R){this.Fx()||R||(cL(this,"Cast session died."),this.hO())};g.O(WL,oJ);g.L=WL.prototype;g.L.dO=function(R){this.L=R;this.L.addUpdateListener(this.P1)}; g.L.pL=function(R){this.CX=R;this.LX()}; g.L.stop=function(){IAS(this);this.L?this.L.stop((0,g.B8)(this.hO,this,null),(0,g.B8)(this.hO,this,"Failed to stop DIAL device.")):this.hO()}; g.L.G4=function(){IAS(this);this.L&&this.L.removeUpdateListener(this.P1);this.L=null;oJ.prototype.G4.call(this)}; g.L.kR=function(R){this.Fx()||R||(cL(this,"DIAL session died."),this.J(),this.J=function(){},this.hO())};g.O(PL,oJ);PL.prototype.stop=function(){this.hO()}; PL.prototype.dO=function(){}; PL.prototype.pL=function(){g.E1(this.L);this.L=NaN;var R=nj(this.Y.PQ(),this.X.label);R?hd(this,R):this.hO(Error("No such screen"))}; PL.prototype.G4=function(){g.E1(this.L);this.L=NaN;oJ.prototype.G4.call(this)};g.O(uf,g.Ae);g.L=uf.prototype; g.L.init=function(R,l){chrome.cast.timeout.requestSession=3E4;var y=new chrome.cast.SessionRequest(this.W,[chrome.cast.Capability.AUDIO_OUT]);g.O1("desktop_enable_cast_connect")&&(y.androidReceiverCompatible=!0);this.B||(y.dialRequest=new chrome.cast.DialRequest("YouTube"));var f=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;R=R||this.D?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var A=(0,g.B8)(this.VZU,this);y=new chrome.cast.ApiConfig(y,(0,g.B8)(this.ZQ, this),A,f,R);y.customDialLaunchCallback=(0,g.B8)(this.rUQ,this);chrome.cast.initialize(y,(0,g.B8)(function(){this.Fx()||(chrome.cast.addReceiverActionListener(this.J),qEA(),this.X.subscribe("onlineScreenChange",(0,g.B8)(this.Me,this)),this.L=Up8(this),chrome.cast.setCustomReceivers(this.L,function(){},(0,g.B8)(function(K){this.Yr("Failed to set initial custom receivers: "+g.jf(K))},this)),this.publish("yt-remote-cast2-availability-change",Q3(this)),l(!0))},this),(0,g.B8)(function(K){this.Yr("Failed to initialize API: "+ g.jf(K)); l(!1)},this))}; g.L.UjL=function(R,l){FG("Setting connected screen ID: "+R+" -> "+l);if(this.Z){var y=this.Z.Z;if(!R||y&&y.id!=R)FG("Unsetting old screen status: "+this.Z.X.friendlyName),$W(this,null)}if(R&&l){if(!this.Z){R=nj(this.X.PQ(),R);if(!R){FG("setConnectedScreenStatus: Unknown screen.");return}if(R.idType=="shortLived"){FG("setConnectedScreenStatus: Screen with id type to be short lived.");return}y=NG5(this,R);y||(FG("setConnectedScreenStatus: Connected receiver not custom..."),y=new chrome.cast.Receiver(R.uuid? R.uuid:R.id,R.name),y.receiverType=chrome.cast.ReceiverType.CUSTOM,this.L.push(y),chrome.cast.setCustomReceivers(this.L,function(){},(0,g.B8)(function(f){this.Yr("Failed to set initial custom receivers: "+g.jf(f))},this))); FG("setConnectedScreenStatus: new active receiver: "+y.friendlyName);$W(this,new PL(this.X,y),!0)}this.Z.h_(l)}else FG("setConnectedScreenStatus: no screen.")}; g.L.E44=function(R){this.Fx()?this.Yr("Setting connection data on disposed cast v2"):this.Z?this.Z.pL(R):this.Yr("Setting connection data without a session")}; g.L.lK=function(){this.Fx()?this.Yr("Stopping session on disposed cast v2"):this.Z?(this.Z.stop(),$W(this,null)):FG("Stopping non-existing session")}; g.L.requestSession=function(){chrome.cast.requestSession((0,g.B8)(this.ZQ,this),(0,g.B8)(this.MZq,this))}; g.L.G4=function(){this.X.unsubscribe("onlineScreenChange",(0,g.B8)(this.Me,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.J);var R=gRK,l=g.yr("yt.mdx.remote.debug.handlers_");g.bA(l||[],R);g.f_(this.Z);g.Ae.prototype.G4.call(this)}; g.L.Yr=function(R){lf("Controller",R)}; g.L.LU=function(R,l){this.Z==R&&(l||$W(this,null),this.publish("yt-remote-cast2-session-change",l))}; g.L.vGS=function(R,l){if(!this.Fx())if(R)switch(R.friendlyName=chrome.cast.unescape(R.friendlyName),FG("onReceiverAction_ "+R.label+" / "+R.friendlyName+"-- "+l),l){case chrome.cast.ReceiverAction.CAST:if(this.Z)if(this.Z.X.label!=R.label)FG("onReceiverAction_: Stopping active receiver: "+this.Z.X.friendlyName),this.Z.stop();else{FG("onReceiverAction_: Casting to active receiver.");this.Z.Z&&this.publish("yt-remote-cast2-session-change",this.Z.Z);break}switch(R.receiverType){case chrome.cast.ReceiverType.CUSTOM:$W(this, new PL(this.X,R));break;case chrome.cast.ReceiverType.DIAL:$W(this,new WL(this.X,R,this.Y,this.config_));break;case chrome.cast.ReceiverType.CAST:$W(this,new E0(this.X,R,this.config_));break;default:this.Yr("Unknown receiver type: "+R.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.Z&&this.Z.X.label==R.label?this.Z.stop():this.Yr("Stopping receiver w/o session: "+R.friendlyName)}else this.Yr("onReceiverAction_ called without receiver.")}; g.L.rUQ=function(R){if(this.Fx())return Promise.reject(Error("disposed"));var l=R.receiver;l.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.Yr("Not DIAL receiver: "+l.friendlyName),l.receiverType=chrome.cast.ReceiverType.DIAL);var y=this.Z?this.Z.X:null;if(!y||y.label!=l.label)return this.Yr("Receiving DIAL launch request for non-clicked DIAL receiver: "+l.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(y&&y.label==l.label&&y.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.Z.Z)return FG("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.Z.Z),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.Yr('Changing CAST intent from "'+y.receiverType+'" to "dial" for '+l.friendlyName);$W(this,new WL(this.X,l,this.Y,this.config_))}l=this.Z;l.W=R;l.W.appState==chrome.cast.DialAppState.RUNNING?(R=l.W.extraData||{},y=R.screenId||null,Lb(l)&&R.loungeToken?R.loungeTokenRefreshIntervalMs?R=zXS(l,{name:l.X.friendlyName,screenId:R.screenId,loungeToken:R.loungeToken,dialId:l.W.receiver.label, screenIdType:"shortLived"},R.loungeTokenRefreshIntervalMs):(g.CE(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(R)+".")),R=wvS(l,y)):R=wvS(l,y)):R=rL5(l);return R}; g.L.ZQ=function(R){var l=this;if(!this.Fx()&&!this.D){FG("New cast session ID: "+R.sessionId);var y=R.receiver;if(y.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.Z)if(y.receiverType==chrome.cast.ReceiverType.CAST)FG("Got resumed cast session before resumed mdx connection."),y.friendlyName=chrome.cast.unescape(y.friendlyName),$W(this,new E0(this.X,y,this.config_),!0);else{this.Yr("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var f=this.Z.X,A=nj(this.X.PQ(), f.label);A&&B_(A,y.label)&&f.receiverType!=chrome.cast.ReceiverType.CAST&&y.receiverType==chrome.cast.ReceiverType.CAST&&(FG("onSessionEstablished_: manual to cast session change "+y.friendlyName),g.f_(this.Z),this.Z=new E0(this.X,y,this.config_),this.Z.subscribe("sessionScreen",(0,g.B8)(this.LU,this,this.Z)),this.Z.subscribe("sessionFailed",function(){return pvZ(l,l.Z)}),this.Z.pL(null)); this.Z.dO(R)}}}; g.L.Ss=function(){return this.Z?this.Z.BB():null}; g.L.MZq=function(R){this.Fx()||(this.Yr("Failed to estabilish a session: "+g.jf(R)),R.code!=chrome.cast.ErrorCode.CANCEL&&$W(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.L.VZU=function(R){FG("Receiver availability updated: "+R);if(!this.Fx()){var l=Q3(this);this.V=R==chrome.cast.ReceiverAvailability.AVAILABLE;Q3(this)!=l&&this.publish("yt-remote-cast2-availability-change",Q3(this))}}; g.L.Me=function(){this.Fx()||(this.L=Up8(this),FG("Updating custom receivers: "+g.jf(this.L)),chrome.cast.setCustomReceivers(this.L,function(){},(0,g.B8)(function(){this.Yr("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",Q3(this)))}; uf.prototype.setLaunchParams=uf.prototype.E44;uf.prototype.setConnectedScreenStatus=uf.prototype.UjL;uf.prototype.stopSession=uf.prototype.lK;uf.prototype.getCastSession=uf.prototype.Ss;uf.prototype.requestSession=uf.prototype.requestSession;uf.prototype.init=uf.prototype.init;uf.prototype.dispose=uf.prototype.dispose;var CF8=[];g.L=vL.prototype; g.L.reset=function(R){this.listId="";this.index=-1;this.videoId="";lIK(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.ip=R.hasPrevious,this.Vl=R.hasNext,this.D=R.playerTime,this.J=R.playerTimeAt,this.X=R.seekableStart,this.V=R.seekableEnd,this.L=R.duration,this.W=R.loadedTime,this.Z=R.liveIngestionTime,this.Y= !isNaN(this.Z))}; g.L.isPlaying=function(){return this.playerState==1}; g.L.isBuffering=function(){return this.playerState==3}; g.L.M_=function(){return this.playerState==1081}; g.L.Oz=function(R){this.L=isNaN(R)?0:R}; g.L.getDuration=function(){return this.Y?this.L+zb(this):this.L}; g.L.clone=function(){return new vL(fIX(this))};g.O(pb,g.Ae);g.L=pb.prototype;g.L.getState=function(){return this.L}; g.L.oS=function(){return this.Y.getReconnectTimeout()}; g.L.Us=function(){this.Y.reconnect()}; g.L.play=function(){SA(this)?(this.Z?this.Z.play(null,g.v0,Z4(this,"play")):D4(this,"play"),GUU(this,1,xW(U0(this))),this.publish("remotePlayerChange")):jA(this,this.play)}; g.L.pause=function(){SA(this)?(this.Z?this.Z.pause(null,g.v0,Z4(this,"pause")):D4(this,"pause"),GUU(this,2,xW(U0(this))),this.publish("remotePlayerChange")):jA(this,this.pause)}; g.L.seekTo=function(R){if(SA(this)){if(this.Z){var l=U0(this),y=new chrome.cast.media.SeekRequest;y.currentTime=R;l.isPlaying()||l.isBuffering()?y.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:y.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.Z.seek(y,g.v0,Z4(this,"seekTo",{newTime:R}))}else D4(this,"seekTo",{newTime:R});GUU(this,3,R);this.publish("remotePlayerChange")}else jA(this,g.nX(this.seekTo,R))}; g.L.stop=function(){if(SA(this)){this.Z?this.Z.stop(null,g.v0,Z4(this,"stopVideo")):D4(this,"stopVideo");var R=U0(this);R.index=-1;R.videoId="";lIK(R);kW(this,R);this.publish("remotePlayerChange")}else jA(this,this.stop)}; g.L.setVolume=function(R,l){if(SA(this)){var y=U0(this);if(this.X){if(y.volume!=R){var f=Math.round(R)/100;this.X.setReceiverVolumeLevel(f,(0,g.B8)(function(){y3("set receiver volume: "+f)},this),(0,g.B8)(function(){this.Yr("failed to set receiver volume.")},this))}y.muted!=l&&this.X.setReceiverMuted(l,(0,g.B8)(function(){y3("set receiver muted: "+l)},this),(0,g.B8)(function(){this.Yr("failed to set receiver muted.")},this))}else{var A={volume:R, muted:l};y.volume!=-1&&(A.delta=R-y.volume);D4(this,"setVolume",A)}y.muted=l;y.volume=R;kW(this,y)}else jA(this,g.nX(this.setVolume,R,l))}; g.L.r8=function(R,l){if(SA(this)){var y=U0(this);R={videoId:R};l&&(y.trackData={trackName:l.name,languageCode:l.languageCode,sourceLanguageCode:l.translationLanguage?l.translationLanguage.languageCode:"",languageName:l.languageName,kind:l.kind},R.style=g.jf(l.style),g.Lp(R,y.trackData));D4(this,"setSubtitlesTrack",R);kW(this,y)}else jA(this,g.nX(this.r8,R,l))}; g.L.setAudioTrack=function(R,l){SA(this)?(l=l.getLanguageInfo().getId(),D4(this,"setAudioTrack",{videoId:R,audioTrackId:l}),R=U0(this),R.audioTrackId=l,kW(this,R)):jA(this,g.nX(this.setAudioTrack,R,l))}; g.L.playVideo=function(R,l,y,f,A,K,G){f=f===void 0?null:f;A=A===void 0?null:A;K=K===void 0?null:K;G=G===void 0?null:G;var B=U0(this),H={videoId:R};y!==void 0&&(H.currentIndex=y);IJ(B,R,y||0);l!==void 0&&(w$(B,l),H.currentTime=l);f&&(H.listId=f);A&&(H.playerParams=A);K&&(H.clickTrackingParams=K);G&&(H.locationInfo=g.jf(G));D4(this,"setPlaylist",H);f||kW(this,B)}; g.L.Ij=function(R,l){if(SA(this)){if(R&&l){var y=U0(this);IJ(y,R,l);kW(this,y)}D4(this,"previous")}else jA(this,g.nX(this.Ij,R,l))}; g.L.nextVideo=function(R,l){if(SA(this)){if(R&&l){var y=U0(this);IJ(y,R,l);kW(this,y)}D4(this,"next")}else jA(this,g.nX(this.nextVideo,R,l))}; g.L.Vt=function(){if(SA(this)){D4(this,"clearPlaylist");var R=U0(this);R.reset();kW(this,R);this.publish("remotePlayerChange")}else jA(this,this.Vt)}; g.L.QM=function(){SA(this)?D4(this,"dismissAutoplay"):jA(this,this.QM)}; g.L.dispose=function(){if(this.L!=3){var R=this.L;this.L=3;this.publish("proxyStateChange",R,this.L)}g.Ae.prototype.dispose.call(this)}; g.L.G4=function(){K1d(this);this.Y=null;this.J.clear();NI(this,null);g.Ae.prototype.G4.call(this)}; g.L.KF=function(R){if((R!=this.L||R==2)&&this.L!=3&&R!=0){var l=this.L;this.L=R;this.publish("proxyStateChange",l,R);if(R==1)for(;!this.J.isEmpty();)l=R=this.J,l.Z.length===0&&(l.Z=l.X,l.Z.reverse(),l.X=[]),R.Z.pop().apply(this);else R==3&&this.dispose()}}; g.L.FLS=function(R,l){this.publish(R,l)}; g.L.K$L=function(R){if(!R)this.oN(null),NI(this,null);else if(this.X.receiver.volume){R=this.X.receiver.volume;var l=U0(this),y=Math.round(100*R.level||0);if(l.volume!=y||l.muted!=R.muted)y3("Cast volume update: "+R.level+(R.muted?" muted":"")),l.volume=y,l.muted=!!R.muted,kW(this,l)}}; g.L.oN=function(R){y3("Cast media: "+!!R);this.Z&&this.Z.removeUpdateListener(this.W);if(this.Z=R)this.Z.addUpdateListener(this.W),aI8(this),this.publish("remotePlayerChange")}; g.L.tSb=function(R){R?(aI8(this),this.publish("remotePlayerChange")):this.oN(null)}; g.L.Rx=function(){D4(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.L.cU4=function(){var R=Y3t();R&&NI(this,R)}; g.L.Yr=function(R){lf("CP",R)};g.O(V3,g.Ae);g.L=V3.prototype; g.L.connect=function(R,l){if(l){var y=l.listId,f=l.videoId,A=l.videoIds,K=l.playerParams,G=l.clickTrackingParams,B=l.index,H={videoId:f},n=l.currentTime,m=l.locationInfo;l=l.loopMode;n!==void 0&&(H.currentTime=n<=5?0:n);K&&(H.playerParams=K);m&&(H.locationInfo=m);G&&(H.clickTrackingParams=G);y&&(H.listId=y);A&&A.length>0&&(H.videoIds=A.join(","));B!==void 0&&(H.currentIndex=B);this.P1&&(H.loopMode=l||"LOOP_MODE_OFF");y&&(this.Z.listId=y);this.Z.videoId=f;this.Z.index=B||0;this.Z.state=3;w$(this.Z, n);this.J="UNSUPPORTED";y=this.P1?"setInitialState":"setPlaylist";Jd("Connecting with "+y+" and params: "+g.jf(H));this.X.connect({method:y,params:g.jf(H)},R,QwZ())}else Jd("Connecting without params"),this.X.connect({},R,QwZ());nVO(this)}; g.L.Vr=function(R){this.X.Vr(R)}; g.L.dispose=function(){this.Fx()||(g.lA("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),g$(this,3));g.Ae.prototype.dispose.call(this)}; g.L.G4=function(){med(this);hUZ(this);oVU(this);g.E1(this.W);this.W=NaN;g.E1(this.B);this.B=NaN;this.Y=null;g.uJ(this.LX);this.LX.length=0;this.X.dispose();g.Ae.prototype.G4.call(this);this.J=this.V=this.L=this.Z=this.X=null}; g.L.JE=function(R){if(!this.L||this.L.length===0)return!1;for(var l=g.u(this.L),y=l.next();!y.done;y=l.next())if(!y.value.capabilities.has(R))return!1;return!0}; g.L.TZ=function(){var R=3;this.Fx()||(R=0,isNaN(this.bl())?this.X.dH()&&isNaN(this.D)&&(R=1):R=2);return R}; g.L.LI=function(R){Jd("Disconnecting with "+R);g.lA("yt.mdx.remote.remoteClient_",null);med(this);this.publish("beforeDisconnect",R);R==1&&h5();this.X.disconnect(R);this.dispose()}; g.L.ww=function(){var R=this.Z;this.Y&&(R=this.Z.clone(),IJ(R,this.Y,R.index));return fIX(R)}; g.L.kDU=function(R){var l=this,y=new vL(R);y.videoId&&y.videoId!=this.Z.videoId&&(this.Y=y.videoId,g.E1(this.W),this.W=g.h$(function(){if(l.Y){var A=l.Y;l.Y=null;l.Z.videoId!=A&&Cb(l,"getNowPlaying")}},5E3)); var f=[];this.Z.listId==y.listId&&this.Z.videoId==y.videoId&&this.Z.index==y.index||f.push("remoteQueueChange");this.Z.playerState==y.playerState&&this.Z.volume==y.volume&&this.Z.muted==y.muted&&xW(this.Z)==xW(y)&&g.jf(this.Z.trackData)==g.jf(y.trackData)||f.push("remotePlayerChange");this.Z.reset(R);g.qZ(f,function(A){this.publish(A)},this)}; g.L.pT=function(){var R=this.X.getDeviceId(),l=g.iA(this.L,function(y){return y.type=="REMOTE_CONTROL"&&y.id!=R}); return l?l.id:""}; g.L.bl=function(){return this.X.oS()}; g.L.h8=function(){return this.J||"UNSUPPORTED"}; g.L.Uq=function(){return this.V||""}; g.L.Bz=function(){!isNaN(this.bl())&&this.X.Us()}; g.L.dj7=function(R,l){Cb(this,R,l);EVK(this)}; g.L.ir=function(){var R=g.xa("SAPISID","")||g.xa("__Secure-1PAPISID")||"",l=g.xa("__Secure-3PAPISID","")||"";if(!R&&!l)return"";R=g.b4(g.eS(R),2);l=g.b4(g.eS(l),2);return g.b4(g.eS(","+R+","+l),2)}; V3.prototype.subscribe=V3.prototype.subscribe;V3.prototype.unsubscribeByKey=V3.prototype.un;V3.prototype.getProxyState=V3.prototype.TZ;V3.prototype.disconnect=V3.prototype.LI;V3.prototype.getPlayerContextData=V3.prototype.ww;V3.prototype.setPlayerContextData=V3.prototype.kDU;V3.prototype.getOtherConnectedRemoteId=V3.prototype.pT;V3.prototype.getReconnectTimeout=V3.prototype.bl;V3.prototype.getAutoplayMode=V3.prototype.h8;V3.prototype.getAutoplayVideoId=V3.prototype.Uq;V3.prototype.reconnect=V3.prototype.Bz; V3.prototype.sendMessage=V3.prototype.dj7;V3.prototype.getXsrfToken=V3.prototype.ir;V3.prototype.isCapabilitySupportedOnConnectedDevices=V3.prototype.JE;g.O(X$U,Gb);g.L=X$U.prototype;g.L.PQ=function(R){return this.a9.$_gs(R)}; g.L.contains=function(R){return!!this.a9.$_c(R)}; g.L.get=function(R){return this.a9.$_g(R)}; g.L.start=function(){this.a9.$_st()}; g.L.add=function(R,l,y){this.a9.$_a(R,l,y)}; g.L.remove=function(R,l,y){this.a9.$_r(R,l,y)}; g.L.zd=function(R,l,y,f){this.a9.$_un(R,l,y,f)}; g.L.G4=function(){for(var R=this.Z.length,l=0;l1&&!this.G.getOption("remote","quickCast")?(this.zi=g.YU(R,this.Z,this),this.Gc(g.L$(R,this.Z)),R=this.G.getOption("remote","currentReceiver"),R=this.Z(R),this.options[R]&&this.BE(R),this.enable(!0)):this.enable(!1)}; hi.prototype.Z=function(R){return R.key}; hi.prototype.IU=function(R){return R==="cast-selector-receiver"?"Transmitir\u2026":this.zi[R].name}; hi.prototype.ZX=function(R){g.N4.prototype.ZX.call(this,R);this.G.setOption("remote","currentReceiver",this.zi[R]);this.Te.Rl()};g.O(qxS,g.Fc);g.L=qxS.prototype; g.L.create=function(){var R=this.player.U(),l=g.CI(R);R={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:R.C("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:R.C("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:R.C("enable_cast_short_lived_lounge_token")};zUS(l,R);this.subscriptions.push(g.Rn("yt-remote-before-disconnect",this.W$L,this));this.subscriptions.push(g.Rn("yt-remote-connection-change",this.jVq,this));this.subscriptions.push(g.Rn("yt-remote-receiver-availability-change",this.iJ, this));this.subscriptions.push(g.Rn("yt-remote-auto-connect",this.fNb,this));this.subscriptions.push(g.Rn("yt-remote-receiver-resumed",this.nG$,this));this.subscriptions.push(g.Rn("mdx-privacy-popup-confirm",this.M_L,this));this.subscriptions.push(g.Rn("mdx-privacy-popup-cancel",this.BQL,this));this.iJ()}; g.L.load=function(){this.player.cancelPlayback();g.Fc.prototype.load.call(this);this.DW=new CqS(this.player.U(),this);this.player.kQ(this.DW);this.Lm=new Z6r(this,this.player,this.HZ);var R=(R=jnO())?R.currentTime:0;var l=p$d()?new pb(KL(),void 0):null;R==0&&l&&(R=xW(U0(l)));R!==0&&this.J1(R);tcK(this,this.Ak,this.Ak);this.player.hv(6)}; g.L.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.FZ();this.y8=this.yI;g.A4(this.Lm,this.HZ);this.HZ=this.DW=this.Lm=null;g.Fc.prototype.unload.call(this);this.player.hv(5);cH(this)}; g.L.G4=function(){g.lq(this.subscriptions);g.Fc.prototype.G4.call(this)}; g.L.gU=function(R){var l=g.SJ.apply(1,arguments);this.loaded&&this.Lm.Re.apply(this.Lm,[R].concat(g.ci(l)))}; g.L.getAdState=function(){return this.yD}; g.L.ip=function(){return this.HZ?U0(this.HZ).ip:!1}; g.L.Vl=function(){return this.HZ?U0(this.HZ).Vl:!1}; g.L.J1=function(R,l){this.fC=R||0;this.player.publish("progresssync",R,l);this.player.Ej("onVideoProgress",R||0)}; g.L.getCurrentTime=function(){return this.fC}; g.L.getDuration=function(){return U0(this.HZ).getDuration()||0}; g.L.wc=function(){var R=U0(this.HZ);return R.Y?R.Z+zb(R):R.Z}; g.L.Dm=function(){return U0(this.HZ).W}; g.L.FO=function(){return ySS(U0(this.HZ))}; g.L.oB=function(){var R=U0(this.HZ);return R.X>0?R.X+zb(R):R.X}; g.L.getProgressState=function(){var R=U0(this.HZ),l=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!R.M_()&&this.player.EY(),clipEnd:l.clipEnd,clipStart:l.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.wc(),isAtLiveHead:this.isAtLiveHead(),loaded:this.Dm(),seekableEnd:this.FO(),seekableStart:this.oB(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.L.isAtLiveHead=function(){return ySS(U0(this.HZ))-this.getCurrentTime()<=1}; g.L.nextVideo=function(){this.HZ&&this.HZ.nextVideo()}; g.L.Ij=function(){this.HZ&&this.HZ.Ij()}; g.L.W$L=function(R){R===1&&(this.kE=this.HZ?U0(this.HZ):null)}; g.L.jVq=function(){var R=p$d()?new pb(KL(),void 0):null;if(R){var l=this.y8;this.loaded&&this.unload();this.HZ=R;this.kE=null;l.key!==this.yI.key&&(this.y8=l,this.load())}else g.f_(this.HZ),this.HZ=null,this.loaded&&(this.unload(),(R=this.kE)&&R.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(R.videoId,xW(R)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.L.iJ=function(){var R=[this.yI],l=R.concat,y=w$K();Tb()&&g.zI("yt-remote-cast-available")&&y.push({key:"cast-selector-receiver",name:"Cast..."});this.zi=l.call(R,y);R=IIK()||this.yI;EK(this,R);this.player.Ej("onMdxReceiversChange")}; g.L.fNb=function(){var R=IIK();EK(this,R)}; g.L.nG$=function(){this.y8=IIK()}; g.L.M_L=function(){this.ZM=!0;cH(this);BH=!1;Gz&&sK(Gz,1);Gz=null}; g.L.BQL=function(){this.ZM=!1;cH(this);EK(this,this.yI);this.y8=this.yI;BH=!1;Gz=null;this.player.playVideo()}; g.L.MD=function(R,l){switch(R){case "casting":return this.loaded;case "receivers":return this.zi;case "currentReceiver":return l&&(l.key==="cast-selector-receiver"?M85():EK(this,l)),this.loaded?this.y8:this.yI;case "quickCast":return this.zi.length===2&&this.zi[1].key==="cast-selector-receiver"?(l&&M85(),!0):!1}}; g.L.Rx=function(){this.HZ.Rx()}; g.L.Km=function(){return!1}; g.L.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.L.isLoggedIn=function(){var R,l;return((R=g.JZ("PLAYER_CONFIG"))==null?void 0:(l=R.args)==null?void 0:l.authuser)!==void 0?!0:!(!g.JZ("SESSION_INDEX")&&!g.JZ("LOGGED_IN"))};g.uR("remote",qxS);})(_yt_player);