(function(g){var window=this;'use strict';var sGO=function(J){if(J instanceof g.c2)return J;if(typeof J.yq=="function")return J.yq(!1);if(g.Pq(J)){var y=0,v=new g.c2;v.next=function(){for(;;){if(y>=J.length)return g.SY;if(y in J)return g.GR(J[y++]);y++}}; return v}throw Error("Not implemented");},YvH=function(J,y,v){if(g.Pq(J))g.En(J,y,v); else for(J=sGO(J);;){var d=J.next();if(d.done)break;y.call(v,d.value,void 0,J)}},yj=function(J){g.Yv(J,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.Yy()).toString(36)); return J},vb=function(J,y,v){Array.isArray(v)||(v=[String(v)]); g.iyj(J.W,y,v)},Svq=function(J,y){var v=[]; YvH(y,function(d){try{var P=g.ep.prototype.T.call(this,d,!0)}catch(A){if(A=="Storage: Invalid value was encountered")return;throw A;}P===void 0?v.push(d):g.kLd(P)&&v.push(d)},J); return v},VmH=function(J,y){Svq(J,y).forEach(function(v){g.ep.prototype.remove.call(this,v)},J)},Lo0=function(J){if(J.DO){if(J.DO.locationOverrideToken)return{locationOverrideToken:J.DO.locationOverrideToken}; if(J.DO.latitudeE7!=null&&J.DO.longitudeE7!=null)return{latitudeE7:J.DO.latitudeE7,longitudeE7:J.DO.longitudeE7}}return null},tmu=function(J,y){g.cq(J,y)||J.push(y)},Wo_=function(J){var y=0,v; for(v in J)y++;return y},a5V=function(J,y){return g.YN(J,y)},xPy=function(J){try{return g.wr.JSON.parse(J)}catch(y){}J=String(J); if(/^\s*$/.test(J)?0:/^[\],:{}\s\u2028\u2029]*$/.test(J.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("("+J+")")}catch(y){}throw Error("Invalid JSON string: "+J);},dY=function(J){if(g.wr.JSON)try{return g.wr.JSON.parse(J)}catch(y){}return xPy(J)},OsO=function(){var J=Pb(); this.C=J;J.k$("/client_streamz/youtube/living_room/mdx/channel/opened",g.dK("channel_type"))},gV_=function(){var J=Pb(); this.C=J;J.k$("/client_streamz/youtube/living_room/mdx/channel/closed",g.dK("channel_type"))},DPy=function(){var J=Pb(); this.C=J;J.k$("/client_streamz/youtube/living_room/mdx/channel/message_received",g.dK("channel_type"))},cRQ=function(){var J=Pb(); this.C=J;J.k$("/client_streamz/youtube/living_room/mdx/channel/success")},Gqu=function(){var J=Pb(); this.C=J;J.k$("/client_streamz/youtube/living_room/mdx/channel/error",g.dK("channel_type"),g.dK("error_type"))},bsH=function(){var J=Pb(); this.C=J;J.k$("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},Fow=function(){var J=Pb(); this.C=J;J.k$("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},jGq=function(J,y,v,d){var P=new g.vr(null); J&&g.di(P,J);y&&g.Pr(P,y);v&&g.Ai(P,v);d&&(P.T=d);return P},eyq=function(J,y){return new g.wi(J,y)},A5=function(J,y){return Object.prototype.hasOwnProperty.call(J,y)},mPy=function(J,y){return J===y},TM=function(J,y){this.T={}; this.C=[];this.k5=this.size=0;var v=arguments.length;if(v>1){if(v%2)throw Error("Uneven number of arguments");for(var d=0;d5&&(J=J.slice(J.length-5)); var y=g.x7(SLq(),function(d){return d.loungeToken}),v=g.x7(J,function(d){return d.loungeToken}); g.Ob(v,function(d){return!g.cq(y,d)})&&V3q(); g.B1("yt-remote-local-screens",J,31536E3)},t5=function(J){J||(g.r3("yt-remote-session-screen-id"),g.r3("yt-remote-session-video-id")); s7V();J=Vj();g.bw(J,L7());M3w(J)},t3C=function(){if(!Wb){var J=g.oY(); J&&(Wb=new g.bq(J))}},WvV=function(){t3C(); return Wb?!!Wb.get("yt-remote-use-staging-server"):!1},aS=function(J,y){g.kW[J]=!0; var v=g.K0();v&&v.publish.apply(v,arguments);g.kW[J]=!1},aZw=function(){},Pb=function(){if(!x0){x0=new g.pb(new aZw); var J=g.xU("client_streamz_web_flush_count",-1);J!==-1&&(x0.J=J)}return x0},x5V=function(){var J=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return J?parseInt(J[1],10):0},OXy=function(J){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+J)!=-1||document.currentScript.src.indexOf("&"+J)!=-1)},gUV=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},OX=function(J){J.length?D5X(J.shift(),function(){OX(J)}):cNQ()},Gou=function(J){return"chrome-extension://"+J+"/cast_sender.js"},D5X=function(J,y,v){var d=document.createElement("script"); d.onerror=y;v&&(d.onload=v);g.DN(d,g.c$(J));(document.head||document.documentElement).appendChild(d)},bXH=function(){var J=x5V(),y=[]; if(J>1){var v=J-1;y.push("//www.gstatic.com/eureka/clank/"+J+"/cast_sender.js");y.push("//www.gstatic.com/eureka/clank/"+v+"/cast_sender.js")}return y},cNQ=function(){var J=gUV(); J&&J(!1,"No cast extension found")},j7q=function(){if(Fvw){var J=2,y=gUV(),v=function(){J--; J==0&&y&&y(!0)}; window.__onGCastApiAvailable=v;D5X("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",cNQ,v)}},eCX=function(){j7q(); var J=bXH();J.push("//www.gstatic.com/eureka/clank/cast_sender.js");OX(J)},Bh_=function(){j7q(); var J=bXH();J.push.apply(J,g.r(m5q.map(Gou)));J.push("//www.gstatic.com/eureka/clank/cast_sender.js");OX(J)},gY=function(J,y,v){g.u.call(this); this.L=v!=null?(0,g.Mb)(J,v):J;this.F1=y;this.V=(0,g.Mb)(this.m_,this);this.C=!1;this.T=0;this.J=this.Gu=null;this.W=[]},Dw=function(){},qLn=function(){g.Nm.call(this,"p")},rNw=function(){g.Nm.call(this,"o")},oUq=function(){return $5V=$5V||new g.Y1},CQC=function(J){g.Nm.call(this,"serverreachability",J)},cb=function(J){var y=oUq(); y.dispatchEvent(new CQC(y,J))},hCw=function(J){g.Nm.call(this,"statevent",J)},GM=function(J){var y=oUq(); y.dispatchEvent(new hCw(y,J))},IZQ=function(J,y,v,d){g.Nm.call(this,"timingevent",J); this.size=y;this.rtt=v;this.retries=d},bm=function(J,y){if(typeof J!=="function")throw Error("Fn must not be null and must be a function"); return g.wr.setTimeout(function(){J()},y)},FB=function(){},je=function(J,y,v,d){this.J=J; this.W=y;this.L8=v;this.f8=d||1;this.Ky=new g.Wr(this);this.YB=45E3;this.WX=null;this.L=!1;this.K=this.ZB=this.B=this.Ek=this.AY=this.rj=this.zK=null;this.Cy=[];this.C=null;this.G=0;this.V=this.wj=null;this.aG=-1;this.cX=!1;this.XW=0;this.GK=null;this.yl=this.Vk=this.J9=this.If=!1;this.T=new p0Q},p0Q=function(){this.J=null; this.C="";this.T=!1},fZQ=function(J,y,v){J.Ek=1; J.B=yj(y.clone());J.K=v;J.If=!0;U5q(J,null)},U5q=function(J,y){J.AY=Date.now(); ee(J);J.ZB=J.B.clone();vb(J.ZB,"t",J.f8);J.G=0;var v=J.J.Ek;J.T=new p0Q;J.C=iX0(J.J,v?y:null,!J.K);J.XW>0&&(J.GK=new g.QT((0,g.Mb)(J.Bb,J,J.C),J.XW));J.Ky.listen(J.C,"readystatechange",J.Lz);y=J.WX?g.WL(J.WX):{};J.K?(J.wj||(J.wj="POST"),y["Content-Type"]="application/x-www-form-urlencoded",J.C.send(J.ZB,J.wj,J.K,y)):(J.wj="GET",J.C.send(J.ZB,J.wj,null,y));cb(1)},HXy=function(J){if(!uqH(J))return g.zD(J.C); var y=g.k1(J.C);if(y==="")return"";var v="",d=y.length,P=g.RJ(J.C)==4;if(!J.T.J){if(typeof TextDecoder==="undefined")return mi(J),Bb(J),"";J.T.J=new g.wr.TextDecoder}for(var A=0;Ay.length)return X0H;y=y.slice(d,d+v);J.G=d+v;return y},ee=function(J){J.rj=Date.now()+J.YB; Kvw(J,J.YB)},Kvw=function(J,y){if(J.zK!=null)throw Error("WatchDog timer not null"); J.zK=bm((0,g.Mb)(J.SP,J),y)},zCn=function(J){J.zK&&(g.wr.clearTimeout(J.zK),J.zK=null)},Bb=function(J){J.J.KA()||J.cX||koV(J.J,J)},mi=function(J){zCn(J); g.dJ(J.GK);J.GK=null;J.Ky.removeAll();if(J.C){var y=J.C;J.C=null;y.abort();y.dispose()}},dWu=function(J,y){try{var v=J.J; if(v.Kr!=0&&(v.C==J||EU0(v.T,J)))if(!J.Vk&&EU0(v.T,J)&&v.Kr==3){try{var d=v.QE.C.parse(y)}catch(c){d=null}if(Array.isArray(d)&&d.length==3){var P=d;if(P[0]==0)a:{if(!v.B){if(v.C)if(v.C.AY+3E30&&(v.XW=1.5*M);d=v;var n=J.pS();if(n){var Y=g.Ek(n,"X-Client-Wire-Protocol");if(Y){var S=d.T;!S.C&&(g.ru(Y,"spdy")||g.ru(Y,"quic")||g.ru(Y,"h2"))&&(S.W=S.V,S.C=new Set,S.T&&(w0Q(S,S.T),S.T=null))}if(d.If){var V=g.Ek(n,"X-HTTP-Session-Id");V&&(d.DO=V,g.Yv(d.WX,d.If,V))}}v.Kr=3;v.V&&v.V.K4();v.ON&&(v.Lf=Date.now()-J.AY);d=v;var L=J;d.h_=JX0(d,d.Ek?d.f8:null,d.L8);if(L.Vk){yXu(d.T, L);var t=L,W=d.XW;W&&t.setTimeout(W);t.zK&&(zCn(t),ee(t));d.C=L}else vDy(d);v.J.length>0&&oS(v)}else A[0]!="stop"&&A[0]!="close"||$0(v,7);else v.Kr==3&&(A[0]=="stop"||A[0]=="close"?A[0]=="stop"?$0(v,7):v.disconnect():A[0]!="noop"&&v.V&&v.V.Fp(A),v.Cy=0)}cb(4)}catch(c){}},P$C=function(J,y){this.C=J; this.map=y;this.context=null},AXw=function(J){this.V=J||10; g.wr.PerformanceNavigationTiming?(J=g.wr.performance.getEntriesByType("navigation"),J=J.length>0&&(J[0].nextHopProtocol=="hq"||J[0].nextHopProtocol=="h2")):J=!!(g.wr.chrome&&g.wr.chrome.loadTimes&&g.wr.chrome.loadTimes()&&g.wr.chrome.loadTimes().wasFetchedViaSpdy);this.W=J?this.V:1;this.C=null;this.W>1&&(this.C=new Set);this.T=null;this.J=[]},T3_=function(J){return J.T?!0:J.C?J.C.size>=J.W:!1},ZX_=function(J){return J.T?1:J.C?J.C.size:0},EU0=function(J,y){return J.T?J.T==y:J.C?J.C.has(y):!1},w0Q= function(J,y){J.C?J.C.add(y):J.T=y},yXu=function(J,y){J.T&&J.T==y?J.T=null:J.C&&J.C.has(y)&&J.C.delete(y)},luy=function(J){if(J.T!=null)return J.J.concat(J.T.Cy); if(J.C!=null&&J.C.size!==0){var y=J.J;J=g.D(J.C.values());for(var v=J.next();!v.done;v=J.next())y=y.concat(v.value.Cy);return y}return g.rV(J.J)},M$q=function(J,y){var v=new FB; if(g.wr.Image){var d=new Image;d.onload=g.nH(C7,v,"TestLoadImage: loaded",!0,y,d);d.onerror=g.nH(C7,v,"TestLoadImage: error",!1,y,d);d.onabort=g.nH(C7,v,"TestLoadImage: abort",!1,y,d);d.ontimeout=g.nH(C7,v,"TestLoadImage: timeout",!1,y,d);g.wr.setTimeout(function(){if(d.ontimeout)d.ontimeout()},1E4); d.src=J}else y(!1)},nDq=function(J,y){var v=new FB,d=new AbortController,P=setTimeout(function(){d.abort(); C7(v,"TestPingServer: timeout",!1,y)},1E4); fetch(J,{signal:d.signal}).then(function(A){clearTimeout(P);A.ok?C7(v,"TestPingServer: ok",!0,y):C7(v,"TestPingServer: server error",!1,y)}).catch(function(){clearTimeout(P); C7(v,"TestPingServer: error",!1,y)})},C7=function(J,y,v,d,P){try{P&&(P.onload=null,P.onerror=null,P.onabort=null,P.ontimeout=null),d(v)}catch(A){}},s4H=function(){this.C=new Dw},YKq=function(J,y,v){var d=v||""; try{g.yT(J,function(P,A){var T=P;g.AO(P)&&(T=g.fb(P));y.push(d+A+"="+encodeURIComponent(T))})}catch(P){throw y.push(d+"type="+encodeURIComponent("_badmap")),P; }},h5=function(J,y,v){return v&&v.Ch?v.Ch[J]||y:y},SKC=function(J){this.J=[]; this.f8=this.h_=this.WX=this.L8=this.C=this.DO=this.If=this.cX=this.G=this.aG=this.K=null;this.Bo=this.ZB=0;this.mL=h5("failFast",!1,J);this.Vk=this.zK=this.B=this.L=this.V=null;this.H$=!0;this.AI=this.GK=-1;this.yl=this.Cy=this.AY=0;this.EH=h5("baseRetryDelayMs",5E3,J);this.Lj=h5("retryDelaySeedMs",1E4,J);this.SC=h5("forwardChannelMaxRetries",2,J);this.xj=h5("forwardChannelRequestTimeoutMs",2E4,J);this.QM=J&&J.IZK||void 0;this.M1=J&&J.zMB||void 0;this.iN=J&&J.g8b||!1;this.XW=void 0;this.Ek=J&&J.TeK|| !1;this.W="";this.T=new AXw(J&&J.Sjb);this.QE=new s4H;this.Ky=J&&J.CQf||!1;this.rj=J&&J.YjX||!1;this.Ky&&this.rj&&(this.rj=!1);this.VE=J&&J.yMR||!1;J&&J.JQB&&(this.H$=!1);this.ON=!this.Ky&&this.H$&&J&&J.h9B||!1;this.ES=void 0;J&&J.qG&&J.qG>0&&(this.ES=J.qG);this.ZE=void 0;this.Lf=0;this.YB=!1;this.J9=this.wj=null},rY=function(J){J.C&&(V$q(J),J.C.cancel(),J.C=null)},LNC=function(J){rY(J); J.B&&(g.wr.clearTimeout(J.B),J.B=null);qY(J);J.T.cancel();J.L&&(typeof J.L==="number"&&g.wr.clearTimeout(J.L),J.L=null)},oS=function(J){T3_(J.T)||J.L||(J.L=!0,g.FC(J.Dj,J),J.AY=0)},WNX=function(J,y){if(ZX_(J.T)>=J.T.W-(J.L?1:0))return!1; if(J.L)return J.J=y.Cy.concat(J.J),!0;if(J.Kr==1||J.Kr==2||J.AY>=(J.mL?0:J.SC))return!1;J.L=bm((0,g.Mb)(J.Dj,J,y),t$Q(J,J.AY));J.AY++;return!0},xWb=function(J,y){var v; y?v=y.L8:v=J.ZB++;var d=J.WX.clone();g.Yv(d,"SID",J.W);g.Yv(d,"RID",v);g.Yv(d,"AID",J.GK);IS(J,d);J.G&&J.K&&g.ti(d,J.G,J.K);v=new je(J,J.W,v,J.AY+1);J.G===null&&(v.WX=J.K);y&&(J.J=y.Cy.concat(J.J));y=auX(J,v,1E3);v.setTimeout(Math.round(J.xj*.5)+Math.round(J.xj*.5*Math.random()));w0Q(J.T,v);fZQ(v,d,y)},IS=function(J,y){J.cX&&g.Js(J.cX,function(v,d){g.Yv(y,d,v)}); J.V&&g.yT({},function(v,d){g.Yv(y,d,v)})},auX=function(J,y,v){v=Math.min(J.J.length,v); var d=J.V?(0,g.Mb)(J.V.Vr,J.V,J):null;a:{for(var P=J.J,A=-1;;){var T=["count="+v];A==-1?v>0?(A=P[0].C,T.push("ofs="+A)):A=0:T.push("ofs="+A);for(var M=!0,n=0;n=3)return!1; J.yl++;J.B=bm((0,g.Mb)(J.Un,J),t$Q(J,J.Cy));J.Cy++;return!0},V$q=function(J){J.wj!=null&&(g.wr.clearTimeout(J.wj),J.wj=null)},ORX=function(J){J.C=new je(J,J.W,"rpc",J.yl); J.G===null&&(J.C.WX=J.K);J.C.XW=0;var y=J.h_.clone();g.Yv(y,"RID","rpc");g.Yv(y,"SID",J.W);g.Yv(y,"AID",J.GK);g.Yv(y,"CI",J.Vk?"0":"1");!J.Vk&&J.ES&&g.Yv(y,"TO",J.ES);g.Yv(y,"TYPE","xmlhttp");IS(J,y);J.G&&J.K&&g.ti(y,J.G,J.K);J.XW&&J.C.setTimeout(J.XW);var v=J.C;J=J.f8;v.Ek=1;v.B=yj(y.clone());v.K=null;v.If=!0;U5q(v,J)},qY=function(J){J.zK!=null&&(g.wr.clearTimeout(J.zK),J.zK=null)},koV=function(J,y){var v=null; if(J.C==y){qY(J);V$q(J);J.C=null;var d=2}else if(EU0(J.T,y))v=y.Cy,yXu(J.T,y),d=1;else return;if(J.Kr!=0)if(y.L)if(d==1){v=y.K?y.K.length:0;y=Date.now()-y.AY;var P=J.AY;d=oUq();d.dispatchEvent(new IZQ(d,v,y,P));oS(J)}else vDy(J);else{var A=y.aG;P=y.getLastError();if(P==3||P==0&&A>0||!(d==1&&WNX(J,y)||d==2&&Q7y(J)))switch(v&&v.length>0&&(y=J.T,y.J=y.J.concat(v)),P){case 1:$0(J,5);break;case 4:$0(J,10);break;case 3:$0(J,6);break;default:$0(J,2)}}},t$Q=function(J,y){var v=J.EH+Math.floor(Math.random()* J.Lj); J.isActive()||(v*=2);return v*y},$0=function(J,y){if(y==2){var v=(0,g.Mb)(J.qRj,J),d=J.M1,P=!d; d=new g.vr(d||"//www.google.com/images/cleardot.gif");g.wr.location&&g.wr.location.protocol=="http"||g.di(d,"https");yj(d);P?M$q(d.toString(),v):nDq(d.toString(),v)}else GM(2);J.Kr=0;J.V&&J.V.rI(y);gDw(J);LNC(J)},gDw=function(J){J.Kr=0; J.J9=[];if(J.V){var y=luy(J.T);if(y.length!=0||J.J.length!=0)g.hO(J.J9,y),g.hO(J.J9,J.J),J.T.J.length=0,g.rV(J.J),J.J.length=0;J.V.Pb()}},DWQ=function(J){if(J.Kr==0)return J.J9; var y=[];g.hO(y,luy(J.T));g.hO(y,J.J);return y},JX0=function(J,y,v){var d=g.S5(v); d.C!=""?(y&&g.Pr(d,y+"."+d.C),g.Ai(d,d.J)):(d=g.wr.location,d=jGq(d.protocol,y?y+"."+d.hostname:d.hostname,+d.port,v));y=J.If;v=J.DO;y&&v&&g.Yv(d,y,v);g.Yv(d,"VER",J.Yq);IS(J,d);return d},iX0=function(J,y,v){if(y&&!J.Ek)throw Error("Can't create secondary domain capable XhrIo object."); y=J.iN&&!J.QM?new g.HQ(new g.Qm({J6:v})):new g.HQ(J.QM);y.G=J.Ek;return y},cXC=function(){},GWQ=function(){},UX=function(J,y){g.Y1.call(this); this.C=new SKC(y);this.V=J;this.T=y&&y.nBf||null;J=y&&y.Kh||null;y&&y.Efk&&(J?J["X-Client-Protocol"]="webchannel":J={"X-Client-Protocol":"webchannel"});this.C.K=J;J=y&&y.cHk||null;y&&y.cW&&(J?J["X-WebChannel-Content-Type"]=y.cW:J={"X-WebChannel-Content-Type":y.cW});y&&y.cV&&(J?J["X-WebChannel-Client-Profile"]=y.cV:J={"X-WebChannel-Client-Profile":y.cV});this.C.aG=J;(J=y&&y.tSB)&&!g.qh(J)&&(this.C.G=J);this.L=y&&y.TeK||!1;this.W=y&&y.VoR||!1;(y=y&&y.Fm)&&!g.qh(y)&&(this.C.If=y,g.sg(this.T,y)&&(J=this.T, y in J&&delete J[y]));this.J=new p7(this)},bRn=function(J){qLn.call(this); J.__headers__&&(this.headers=J.__headers__,this.statusCode=J.__status__,delete J.__headers__,delete J.__status__);var y=J.__sm__;y?this.data=(this.C=g.Tn(y))?g.L_(y,this.C):y:this.data=J},FNw=function(J){rNw.call(this); this.status=1;this.errorCode=J},p7=function(J){this.C=J},j4q=function(J,y){this.T=J; this.C=y},eJ_=function(J){return DWQ(J.C).map(function(y){var v=J.T; y=y.map;"__data__"in y?(y=y.__data__,v=v.W?xPy(y):y):v=y;return v})},f7=function(J,y){if(typeof J!=="function")throw Error("Fn must not be null and must be a function"); return g.wr.setTimeout(function(){J()},y)},um=function(J){im.dispatchEvent(new mWq(im,J))},mWq=function(J){g.Nm.call(this,"statevent",J)},Hb=function(J,y,v,d){this.C=J; this.W=y;this.G=v;this.L=d||1;this.T=45E3;this.J=new g.Wr(this);this.V=new g.Cb;this.V.setInterval(250)},qKn=function(J,y,v){J.gb=1; J.NK=yj(y.clone());J.S3=v;J.If=!0;B3w(J,null)},rXC=function(J,y,v,d,P){J.gb=1; J.NK=yj(y.clone());J.S3=null;J.If=v;P&&(J.fV=!1);B3w(J,d)},B3w=function(J,y){J.Bt=Date.now(); $Wy(J);J.Jd=J.NK.clone();vb(J.Jd,"t",J.L);J.uV=0;J.tv=J.C.IN(J.C.Yt()?y:null);J.oN>0&&(J.Td=new g.QT((0,g.Mb)(J.nZ,J,J.tv),J.oN));J.J.listen(J.tv,"readystatechange",J.hV);y=J.Ec?g.WL(J.Ec):{};J.S3?(J.Ad="POST",y["Content-Type"]="application/x-www-form-urlencoded",J.tv.send(J.Jd,J.Ad,J.S3,y)):(J.Ad="GET",J.fV&&!g.s3&&(y.Connection="close"),J.tv.send(J.Jd,J.Ad,null,y));J.C.uY(1)},hJH=function(J,y){var v=J.uV,d=y.indexOf("\n",v); if(d==-1)return oDQ;v=Number(y.substring(v,d));if(isNaN(v))return C$n;d+=1;if(d+v>y.length)return oDQ;y=y.slice(d,d+v);J.uV=d+v;return y},$Wy=function(J){J.sL=Date.now()+J.T; IuC(J,J.T)},IuC=function(J,y){if(J.Be!=null)throw Error("WatchDog timer not null"); J.Be=f7((0,g.Mb)(J.Ml,J),y)},p1b=function(J){J.Be&&(g.wr.clearTimeout(J.Be),J.Be=null)},UW_=function(J){J.C.KA()||J.ZI||J.C.wm(J)},XB=function(J){p1b(J); g.dJ(J.Td);J.Td=null;J.V.stop();J.J.removeAll();if(J.tv){var y=J.tv;J.tv=null;y.abort();y.dispose()}J.MJ&&(J.MJ=null)},fuy=function(J,y){try{J.C.z2(J,y),J.C.uY(4)}catch(v){}},uMq=function(J,y,v,d,P){if(d==0)v(!1); else{var A=P||0;d--;iRq(J,y,function(T){T?v(!0):g.wr.setTimeout(function(){uMq(J,y,v,d,A)},A)})}},iRq=function(J,y,v){var d=new Image; d.onload=function(){try{NY(d),v(!0)}catch(P){}}; d.onerror=function(){try{NY(d),v(!1)}catch(P){}}; d.onabort=function(){try{NY(d),v(!1)}catch(P){}}; d.ontimeout=function(){try{NY(d),v(!1)}catch(P){}}; g.wr.setTimeout(function(){if(d.ontimeout)d.ontimeout()},y); d.src=J},NY=function(J){J.onload=null; J.onerror=null;J.onabort=null;J.ontimeout=null},HRV=function(J){this.C=J; this.T=new Dw},X1b=function(J){var y=RS(J.C,J.H3,"/mail/images/cleardot.gif"); yj(y);uMq(y.toString(),5E3,(0,g.Mb)(J.uR,J),3,2E3);J.uY(1)},N3C=function(J){var y=J.C.L; y!=null?(um(5),y?(um(11),K7(J.C,J,!1)):(um(12),K7(J.C,J,!0))):(J.wv=new Hb(J),J.wv.Ec=J.QO,y=J.C,y=RS(y,y.Yt()?J.oO:null,J.yO),um(5),vb(y,"TYPE","xmlhttp"),rXC(J.wv,y,!1,J.oO,!1))},RJC=function(J,y,v){this.C=1; this.T=[];this.J=[];this.V=new Dw;this.K=J||null;this.L=y!=null?y:null;this.B=v||!1},KNH=function(J,y){this.C=J; this.map=y;this.context=null},zJQ=function(J,y,v,d){g.Nm.call(this,"timingevent",J); this.size=y;this.rtt=v;this.retries=d},kWy=function(J){g.Nm.call(this,"serverreachability",J)},Q4V=function(J){J.x7(1,0); J.sO=RS(J,null,J.WL);EDq(J)},ZRw=function(J){J.jA&&(J.jA.abort(),J.jA=null); J.gC&&(J.gC.cancel(),J.gC=null);J.Eu&&(g.wr.clearTimeout(J.Eu),J.Eu=null);zM(J);J.m1&&(J.m1.cancel(),J.m1=null);J.CF&&(g.wr.clearTimeout(J.CF),J.CF=null)},w10=function(J,y){if(J.C==0)throw Error("Invalid operation: sending map when state is closed"); J.T.push(new KNH(J.Hk++,y));J.C!=2&&J.C!=3||EDq(J)},JWb=function(J){var y=0; J.gC&&y++;J.m1&&y++;return y},EDq=function(J){J.m1||J.CF||(J.CF=f7((0,g.Mb)(J.T2,J),0),J.Ua=0)},dty=function(J,y){if(J.C==1){if(!y){J.DI=Math.floor(Math.random()*1E5); y=J.DI++;var v=new Hb(J,"",y);v.Ec=J.qP;var d=yWu(J),P=J.sO.clone();g.Yv(P,"RID",y);g.Yv(P,"CVER","1");k0(J,P);qKn(v,P,d);J.m1=v;J.C=2}}else J.C==3&&(y?vJC(J,y):J.T.length==0||J.m1||vJC(J))},vJC=function(J,y){if(y)if(J.LP>6){J.T=J.J.concat(J.T); J.J.length=0;var v=J.DI-1;y=yWu(J)}else v=y.G,y=y.S3;else v=J.DI++,y=yWu(J);var d=J.sO.clone();g.Yv(d,"SID",J.W);g.Yv(d,"RID",v);g.Yv(d,"AID",J.DK);k0(J,d);v=new Hb(J,J.W,v,J.Ua+1);v.Ec=J.qP;v.setTimeout(1E4+Math.round(1E4*Math.random()));J.m1=v;qKn(v,d,y)},k0=function(J,y){J.nL&&(J=J.nL.oY())&&g.Js(J,function(v,d){g.Yv(y,d,v)})},yWu=function(J){var y=Math.min(J.T.length,1E3),v=["count="+y]; if(J.LP>6&&y>0){var d=J.T[0].C;v.push("ofs="+d)}else d=0;for(var P={},A=0;A=3)return!1; J.G++;J.Eu=f7((0,g.Mb)(J.dM,J),AW_(J,J.YF));J.YF++;return!0},K7=function(J,y,v){J.Bm=J.L==null?v:!J.L; J.hM=y.c9;J.B||Q4V(J)},zM=function(J){J.fP!=null&&(g.wr.clearTimeout(J.fP),J.fP=null)},AW_=function(J,y){var v=5E3+Math.floor(Math.random()*1E4); J.isActive()||(v*=2);return v*y},EX=function(J,y){if(y==2||y==9){var v=null; J.nL&&(v=null);var d=(0,g.Mb)(J.suf,J);v||(v=new g.vr("//www.google.com/images/cleardot.gif"),yj(v));iRq(v.toString(),1E4,d)}else um(2);lmX(J,y)},lmX=function(J,y){J.C=0; J.nL&&J.nL.Jc(y);MOb(J);ZRw(J)},MOb=function(J){J.C=0; J.hM=-1;if(J.nL)if(J.J.length==0&&J.T.length==0)J.nL.pD();else{var y=g.rV(J.J),v=g.rV(J.T);J.J.length=0;J.T.length=0;J.nL.pD(y,v)}},RS=function(J,y,v){var d=g.S5(v); if(d.C!="")y&&g.Pr(d,y+"."+d.C),g.Ai(d,d.J);else{var P=window.location;d=jGq(P.protocol,y?y+"."+P.hostname:P.hostname,+P.port,v)}J.U4&&g.Js(J.U4,function(A,T){g.Yv(d,T,A)}); g.Yv(d,"VER",J.LP);k0(J,d);return d},nJO=function(){},sOu=function(){this.C=[]; this.T=[]},Yqq=function(J){g.Nm.call(this,"channelMessage"); this.message=J},Squ=function(J){g.Nm.call(this,"channelError"); this.error=J},VOV=function(J,y){this.action=J; this.params=y||{}},Qj=function(J,y){g.u.call(this); this.C=new g.Kx(this.nmW,0,this);g.X(this,this.C);this.F1=5E3;this.T=0;if(typeof J==="function")y&&(J=(0,g.Mb)(J,y));else if(J&&typeof J.handleEvent==="function")J=(0,g.Mb)(J.handleEvent,J);else throw Error("Invalid listener argument");this.J=J},LqC=function(J,y,v,d,P,A,T,M,n,Y,S,V,L,t){v=v===void 0?!1:v; d=d===void 0?function(){return""}:d; P=P===void 0?!1:P;A=A===void 0?!1:A;T=T===void 0?!1:T;M=M===void 0?function(){return g.BQ({})}:M; n=n===void 0?!1:n;S=S===void 0?!1:S;V=V===void 0?!1:V;L=L===void 0?!1:L;t=t===void 0?!1:t;this.Ek=J;this.zK=y;this.L=new g.GY;this.T=new Qj(this.wRY,this);this.C=null;this.G=!1;this.K=null;this.AY="";this.Cy=this.B=0;this.J=[];this.yl=v;this.If=d;this.V=A;this.WX=M;this.cX=Y;this.f8=T;this.wj=null;this.W=g.BQ();this.L8=P;this.J9=n;this.Ky=S;this.rj=V;this.H$=L;this.aG=t;this.XW=new OsO;this.Vk=new gV_;this.YB=new cRQ;this.ZB=new DPy;this.GK=new Gqu;this.ON=new bsH;this.ZE=new Fow},amV=function(J, y,v,d,P){tOq(J); if(J.C){var A=g.NP("ID_TOKEN"),T=J.C.qP||{};A?T["x-youtube-identity-token"]=A:delete T["x-youtube-identity-token"];J.C.qP=T}Wqw(J);d?(d.getState()!=3&&JWb(d)==0||d.getState(),J.C.connect(y,v,J.zK,d.W,d.DK)):P?J.C.connect(y,v,J.zK,P.sessionId,P.arrayId):J.C.connect(y,v,J.zK)},DtC=function(J,y){return J.H$?!0:J.rj?Object.values(xtu).includes(y):J.Ky?!Object.values(OU_).includes(y):J.aG?Object.values(gJy).includes(y):!1},bUX=function(J){var y,v; g.f(function(d){if(d.T==1)return g.F6(d,2),g.h(d,cWq(J),2);g.od(d);y=J.J;J.J=[];v=y.length;GCy(J,y,v);Zw(J);return g.C3(d,0)})},GCy=function(J,y,v){for(var d=0;d0?v=Object.assign({},v,y):delete v.Authorization;J.C.qP=v}},Wqw=function(J){J.cX&&!J.V&&jOO(J,J.cX())},wY=function(J){this.scheme="https"; this.port=this.domain="";this.C="/api/lounge";this.T=!0;J=J||document.location.href;var y=Number(g.nV(J)[4]||null)||"";y&&(this.port=":"+y);this.domain=g.s1(J)||"";J=g.IM();J.search("MSIE")>=0&&(J=J.match(/MSIE ([\d.]+)/)[1],g.hs(J,"10.0")<0&&(this.T=!1))},JE=function(J,y){var v=J.C; J.T&&(v=J.scheme+"://"+J.domain+J.port+J.C);return g.al(v+y,{})},ed0=function(J,y){g.Y1.call(this); var v=this;this.lJ=J();this.lJ.subscribe("handlerOpened",this.vk,this);this.lJ.subscribe("handlerClosed",this.onClosed,this);this.lJ.subscribe("handlerError",function(d,P){v.onError(P)}); this.lJ.subscribe("handlerMessage",this.onMessage,this);this.C=y},mtw=function(J,y,v){var d=this; v=v===void 0?function(){return""}:v; var P=P===void 0?new GWQ:P;var A=A===void 0?new g.GY:A;this.pathPrefix=J;this.C=y;this.AY=v;this.V=A;this.B=null;this.K=this.G=0;this.channel=null;this.L=0;this.J=new Qj(function(){d.J.isActive();var T;((T=d.channel)==null?void 0:ZX_((new j4q(T,T.C)).C.T))===0&&d.connect(d.B,d.G)}); this.W={};this.T={};this.zK=!1;this.logger=null;this.Cy=[];this.Mw=void 0;this.WX=new OsO;this.wj=new gV_;this.cX=new DPy;this.If=new Gqu},BSy=function(J){g.wK(J.channel,"m",function(){J.L=3; J.J.reset();J.B=null;J.G=0;for(var y=g.D(J.Cy),v=y.next();!v.done;v=y.next())v=v.value,J.channel&&J.channel.send(v);J.Cy=[];J.publish("webChannelOpened");J.WX.XI("WEB_CHANNEL")}); g.wK(J.channel,"n",function(){J.L=0;J.J.isActive()||J.publish("webChannelClosed");var y,v=(y=J.channel)==null?void 0:eJ_(new j4q(y,y.C));v&&(J.Cy=[].concat(g.r(v)));J.wj.XI("WEB_CHANNEL")}); g.wK(J.channel,"p",function(y){var v=y.data;v[0]==="gracefulReconnect"?(J.J.start(),J.channel&&J.channel.close()):J.publish("webChannelMessage",new VOV(v[0],v[1]));J.Mw=y.statusCode;J.cX.XI("WEB_CHANNEL")}); g.wK(J.channel,"o",function(){J.Mw===401||J.J.start();J.publish("webChannelError");J.If.XI("WEB_CHANNEL","")})},qqq=function(J){var y=J.AY(); y?J.W["x-youtube-lounge-xsrf-token"]=y:delete J.W["x-youtube-lounge-xsrf-token"]},rW0=function(J){g.Y1.call(this); this.C=J();this.C.subscribe("webChannelOpened",this.O_,this);this.C.subscribe("webChannelClosed",this.onClosed,this);this.C.subscribe("webChannelError",this.onError,this);this.C.subscribe("webChannelMessage",this.onMessage,this)},$tu=function(J,y,v,d,P){function A(){return new LqC(JE(J,"/bc"),y,!1,v,d)} v=v===void 0?function(){return""}:v; return g.a7("enable_mdx_web_channel_desktop")?new rW0(function(){return new mtw(JE(J,"/wc"),y,v)}):new ed0(A,P)},Imb=function(){var J=oJX; C9w();yX.push(J);hdy()},vv=function(J,y){C9w(); var v=pNH(J,String(y));yX.length==0?Utu(v):(hdy(),g.En(yX,function(d){d(v)}))},dz=function(J){vv("CP",J)},C9w=function(){yX||(yX=g.vq("yt.mdx.remote.debug.handlers_")||[],g.yq("yt.mdx.remote.debug.handlers_",yX))},Utu=function(J){var y=(Pv+1)%50; Pv=y;AE[y]=J;T5||(T5=y==49)},hdy=function(){var J=yX; if(AE[0]){var y=T5?Pv:-1,v={};do v={dP:void 0},y=(y+1)%50,v.dP=AE[y],g.En(J,function(d){return function(P){P(d.dP)}}(v)); while(y!=Pv);AE=Array(50);Pv=-1;T5=!1}},pNH=function(J,y){var v=(Date.now()-fmw)/1E3; v.toFixed&&(v=v.toFixed(3));var d=[];d.push("[",v+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(J+": "+y,"\n");return d.join("")},ly=function(J){g.yK.call(this); this.L=J;this.screens=[]},iUH=function(J,y){var v=J.get(y.uuid)||J.get(y.id); if(v)return J=v.name,v.id=y.id||v.id,v.name=y.name,v.token=y.token,v.uuid=y.uuid||v.uuid,v.name!=J;J.screens.push(y);return!0},uDw=function(J,y){var v=J.screens.length!=y.length; J.screens=g.eT(J.screens,function(A){return!!ANC(y,A)}); for(var d=y.length,P=0;P0&&J.W0&&gz(J,v)},function(y){J.V=function(){}; J.PO(y)})},a6n=function(J){var y={}; y.pairingCode=J.wj;y.theme=J.Ek;WvV()&&(y.env_useStageMdx=1);return g.WV(y)},xDq=function(J){return new Promise(function(y){J.wj=d5n(); if(J.WX){var v=new chrome.cast.DialLaunchResponse(!0,a6n(J));y(v);WWV(J)}else J.zK=function(){g.LX(J.K);J.zK=function(){}; J.K=NaN;var d=new chrome.cast.DialLaunchResponse(!0,a6n(J));y(d);WWV(J)},J.K=g.S3(function(){J.zK()},100)})},gWH=function(J,y,v){J.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(y)); var d=new n7(y);return(new Promise(function(P){O0O(J,d,function(A){A?(J.Cy=!0,VX(J.W,d),tE(J,d),gz(J,v)):g.zq(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(y)+" is not online."));P(A)},5)})).then(function(P){return P?new chrome.cast.DialLaunchResponse(!1):xDq(J)})},DDq=function(J,y){var v=J.B.receiver.label,d=J.T.friendlyName; return(new Promise(function(P){JpX(J.W,v,y,d,function(A){A&&A.token&&tE(J,A);P(A)},function(A){Wv(J,"Failed to get DIAL screen: "+A); P(null)})})).then(function(P){return P&&P.token?new chrome.cast.DialLaunchResponse(!1):xDq(J)})},O0O=function(J,y,v,d){g.LX(J.L); J.L=0;vWy(J.W,y,function(P){P||d<0?v(P):J.L=g.S3(function(){O0O(J,y,v,d-1)},300)})},gz=function(J,y){J.info("getDialAppInfoWithTimeout_ "+y); O6(J)&&(g.LX(J.G),J.G=0,y==0?cpH(J):J.G=g.S3(function(){cpH(J)},y))},cpH=function(J){O6(J)&&J.J.getDialAppInfo(function(y){J.info("getDialAppInfo dialLaunchData: "+JSON.stringify(y)); y=y.extraData||{};var v=null;if(y.loungeToken){var d;((d=J.C)==null?void 0:d.token)==y.loungeToken&&(v="staleLoungeToken")}else v="missingLoungeToken";v?(J.AY=v,gz(J,3E4)):(J.Cy=!1,J.AY="unknown",TlO(J,y.loungeToken),gz(J,y.loungeTokenRefreshIntervalMs))},function(y){J.info("getDialAppInfo error: "+y); J.AY="noLoungeTokenResponse";gz(J,3E4)})},G0q=function(J){g.LX(J.L); J.L=0;g.LX(J.G);J.G=0;J.V();J.V=function(){}; g.LX(J.K)},D$=function(J,y){Lv.call(this,J,y,"ManualSession"); this.J=g.S3((0,g.Mb)(this.X4,this,null),150)},cv=function(J,y){g.yK.call(this); this.config_=y;this.T=J;this.B=y.appId||"233637DE";this.W=y.theme||"cl";this.K=y.disableCastApi||!1;this.L=y.forceMirroring||!1;this.C=null;this.G=!1;this.J=[];this.V=(0,g.Mb)(this.QkK,this)},b0w=function(J,y){return y?g.On(J.J,function(v){return sX(y,v.label)},J):null},G5=function(J){vv("Controller",J)},oJX=function(J){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(J)},by=function(J){return J.G||!!J.J.length||!!J.C},Fy=function(J,y,v){y!=J.C&&(g.dJ(J.C),(J.C=y)?(v?J.publish("yt-remote-cast2-receiver-resumed", y.T):J.publish("yt-remote-cast2-receiver-selected",y.T),y.subscribe("sessionScreen",(0,g.Mb)(J.je,J,y)),y.subscribe("sessionFailed",function(){return FWq(J,y)}),y.C?J.publish("yt-remote-cast2-session-change",y.C):v&&J.C.X4(null)):J.publish("yt-remote-cast2-session-change",null))},FWq=function(J,y){J.C==y&&J.publish("yt-remote-cast2-session-failed")},jFu=function(J){var y=J.T.sG(),v=J.C&&J.C.T; J=g.x7(y,function(d){v&&sX(d,v.label)&&(v=null);var P=d.uuid?d.uuid:d.id,A=b0w(this,d);A?(A.label=P,A.friendlyName=d.name):(A=new chrome.cast.Receiver(P,d.name),A.receiverType=chrome.cast.ReceiverType.CUSTOM);return A},J); v&&(v.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(v=new chrome.cast.Receiver(v.label,v.friendlyName),v.receiverType=chrome.cast.ReceiverType.CUSTOM),J.push(v));return J},oWy=function(J,y,v,d){d.disableCastApi?j2("Cannot initialize because disabled by Mdx config."):egy()?mD_(y,d)&&(Bly(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?qIn(J,v):(window.__onGCastApiAvailable=function(P,A){P?qIn(J,v):(e2("Failed to load cast API: "+A),rpH(!1),Bly(!1),g.r3("yt-remote-cast-available"),g.r3("yt-remote-cast-receiver"), $Dy(),v(!1))},d.loadCastApiSetupScript?g.J4("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?x5V()>=60&&eCX():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?cNQ():x5V()>=89?Bh_():(j7q(),OX(m5q.map(Gou))))):j2("Cannot initialize because not running Chrome")},$Dy=function(){j2("dispose"); var J=mZ();J&&J.dispose();g.yq("yt.mdx.remote.cloudview.instance_",null);CoO(!1);g.Z6(hg0);hg0.length=0},Bv=function(){return!!g.qW("yt-remote-cast-installed")},I6q=function(){var J=g.qW("yt-remote-cast-receiver"); return J?J.friendlyName:null},pjq=function(){j2("clearCurrentReceiver"); g.r3("yt-remote-cast-receiver")},UDy=function(){return Bv()?mZ()?mZ().getCastSession():(e2("getCastSelector: Cast is not initialized."),null):(e2("getCastSelector: Cast API is not installed!"),null)},f6_=function(){Bv()?mZ()?q4()?(j2("Requesting cast selector."),mZ().requestSession()):(j2("Wait for cast API to be ready to request the session."),hg0.push(g.QD("yt-remote-cast2-api-ready",f6_))):e2("requestCastSelector: Cast is not initialized."):e2("requestCastSelector: Cast API is not installed!")}, rz=function(J,y){q4()?mZ().setConnectedScreenStatus(J,y):e2("setConnectedScreenStatus called before ready.")},egy=function(){var J=g.IM().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.Wz||J},i0Q=function(J,y){mZ().init(J,y)},mD_=function(J,y){var v=!1; mZ()||(J=new cv(J,y),J.subscribe("yt-remote-cast2-availability-change",function(d){g.B1("yt-remote-cast-available",d);aS("yt-remote-cast2-availability-change",d)}),J.subscribe("yt-remote-cast2-receiver-selected",function(d){j2("onReceiverSelected: "+d.friendlyName); g.B1("yt-remote-cast-receiver",d);aS("yt-remote-cast2-receiver-selected",d)}),J.subscribe("yt-remote-cast2-receiver-resumed",function(d){j2("onReceiverResumed: "+d.friendlyName); g.B1("yt-remote-cast-receiver",d);aS("yt-remote-cast2-receiver-resumed",d)}),J.subscribe("yt-remote-cast2-session-change",function(d){j2("onSessionChange: "+Y0(d)); d||g.r3("yt-remote-cast-receiver");aS("yt-remote-cast2-session-change",d)}),g.yq("yt.mdx.remote.cloudview.instance_",J),v=!0); j2("cloudview.createSingleton_: "+v);return v},mZ=function(){return g.vq("yt.mdx.remote.cloudview.instance_")},qIn=function(J,y){rpH(!0); Bly(!1);i0Q(J,function(v){v?(CoO(!0),g.wl("yt-remote-cast2-api-ready")):(e2("Failed to initialize cast API."),rpH(!1),g.r3("yt-remote-cast-available"),g.r3("yt-remote-cast-receiver"),$Dy());y(v)})},j2=function(J){vv("cloudview",J)},e2=function(J){vv("cloudview",J)},rpH=function(J){j2("setCastInstalled_ "+J); g.B1("yt-remote-cast-installed",J)},q4=function(){return!!g.vq("yt.mdx.remote.cloudview.apiReady_")},CoO=function(J){j2("setApiReady_ "+J); g.yq("yt.mdx.remote.cloudview.apiReady_",J)},Bly=function(J){g.yq("yt.mdx.remote.cloudview.initializing_",J)},$c=function(J){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.V=this.L=0;this.trackData=null;this.Nk=this.JQ=!1;this.B=this.J=this.G=this.T=0;this.C=NaN;this.W=!1;this.reset(J)},uLy=function(J){J.audioTrackId=null; J.trackData=null;J.playerState=-1;J.JQ=!1;J.Nk=!1;J.L=0;J.V=g.Yy();J.T=0;J.G=0;J.J=0;J.B=0;J.C=NaN;J.W=!1},oQ=function(J){return J.isPlaying()?(g.Yy()-J.V)/1E3:0},Cv=function(J,y){J.L=y; J.V=g.Yy()},hE=function(J){switch(J.playerState){case 1:case 1081:return(g.Yy()-J.V)/1E3+J.L; case -1E3:return 0}return J.L},H0O=function(J){return J.W?J.G+oQ(J):J.G},IQ=function(J,y,v){var d=J.videoId; J.videoId=y;J.index=v;y!=d&&uLy(J)},Xjw=function(J){var y={}; y.index=J.index;y.listId=J.listId;y.videoId=J.videoId;y.playerState=J.playerState;y.volume=J.volume;y.muted=J.muted;y.audioTrackId=J.audioTrackId;y.trackData=g.aM(J.trackData);y.hasPrevious=J.JQ;y.hasNext=J.Nk;y.playerTime=J.L;y.playerTimeAt=J.V;y.seekableStart=J.T;y.seekableEnd=J.G;y.duration=J.J;y.loadedTime=J.B;y.liveIngestionTime=J.C;return y},U6=function(J,y){g.yK.call(this); var v=this;this.J=0;this.W=J;this.L=[];this.V=new sOu;this.T=this.C=null;this.K=(0,g.Mb)(this.VbW,this);this.G=(0,g.Mb)(this.r8,this);this.B=(0,g.Mb)(this.fBb,this);this.zK=(0,g.Mb)(this.hYX,this);var d=0;J?(d=J.getProxyState(),d!=3&&(J.subscribe("proxyStateChange",this.ix,this),Nl_(this))):d=3;d!=0&&(y?this.ix(d):g.S3(function(){v.ix(d)},0)); (J=UDy())&&pv(this,J);this.subscribe("yt-remote-cast2-session-change",this.zK)},fv=function(J){return new $c(J.W.getPlayerContextData())},Nl_=function(J){g.En("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(y){this.L.push(this.W.subscribe(y,g.nH(this.skk,y),this))},J)},RgX=function(J){g.En(J.L,function(y){this.W.unsubscribeByKey(y)},J); J.L.length=0},iy=function(J){return J.getState()==1},uy=function(J,y){var v=J.V; v.C.length+v.T.length<50&&J.V.enqueue(y)},KWX=function(J,y,v){var d=fv(J); Cv(d,v);d.playerState!=-1E3&&(d.playerState=y);Hv(J,d)},Xy=function(J,y,v){J.W.sendMessage(y,v)},Hv=function(J,y){RgX(J); J.W.setPlayerContextData(Xjw(y));Nl_(J)},pv=function(J,y){J.T&&(J.T.removeUpdateListener(J.K),J.T.removeMediaListener(J.G),J.r8(null)); J.T=y;J.T&&(dz("Setting cast session: "+J.T.sessionId),J.T.addUpdateListener(J.K),J.T.addMediaListener(J.G),J.T.media.length&&J.r8(J.T.media[0]))},zgy=function(J){var y=J.C.media,v=J.C.customData; if(y&&v){var d=fv(J);y.contentId!=d.videoId&&dz("Cast changing video to: "+y.contentId);d.videoId=y.contentId;d.playerState=v.playerState;Cv(d,J.C.getEstimatedTime());Hv(J,d)}else dz("No cast media video. Ignoring state update.")},N4=function(J,y,v){return(0,g.Mb)(function(d){this.Iu("Failed to "+y+" with cast v2 channel. Error code: "+d.code); d.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.Iu("Retrying "+y+" using MDx browser channel."),Xy(this,y,v))},J)},z5=function(J,y,v,d){d=d===void 0?!1:d; g.yK.call(this);var P=this;this.L=NaN;this.wj=!1;this.K=this.B=this.Cy=this.AY=NaN;this.zK=[];this.V=this.G=this.W=this.C=this.T=null;this.WX=J;this.cX=d;this.zK.push(g.OK(window,"beforeunload",function(){P.S$(2)})); this.J=[];this.C=new $c;this.Ek=y.id;this.If=y.idType;this.T=$tu(this.WX,v,this.yy,this.If=="shortLived",this.Ek);this.T.listen("channelOpened",function(){k0q(P)}); this.T.listen("channelClosed",function(){RQ("Channel closed");isNaN(P.L)?t5(!0):t5();P.dispose()}); this.T.listen("channelError",function(A){t5();isNaN(P.v4())?(A==1&&P.If=="shortLived"&&P.publish("browserChannelAuthError",A),RQ("Channel error: "+A+" without reconnection"),P.dispose()):(P.wj=!0,RQ("Channel error: "+A+" with reconnection in "+P.v4()+" ms"),Kv(P,2))}); this.T.listen("channelMessage",function(A){EWq(P,A)}); this.T.Xi(y.token);this.subscribe("remoteQueueChange",function(){var A=P.C.videoId;g.$D()&&g.B1("yt-remote-session-video-id",A)})},QFn=function(J){return g.On(J.J,function(y){return y.type=="LOUNGE_SCREEN"})},RQ=function(J){vv("conn",J)},Kv=function(J,y){J.publish("proxyStateChange",y)},Z0n=function(J){J.L=g.S3(function(){RQ("Connecting timeout"); J.S$(1)},2E4)},wju=function(J){g.LX(J.L); J.L=NaN},J4V=function(J){g.LX(J.AY); J.AY=NaN},vRn=function(J){y4y(J); J.Cy=g.S3(function(){kc(J,"getNowPlaying")},2E4)},y4y=function(J){g.LX(J.Cy); J.Cy=NaN},k0q=function(J){RQ("Channel opened"); J.wj&&(J.wj=!1,J4V(J),J.AY=g.S3(function(){RQ("Timing out waiting for a screen.");J.S$(1)},15E3))},PDb=function(J,y){var v=null; if(y){var d=QFn(J);d&&(v={clientName:d.clientName,deviceMake:d.brand,deviceModel:d.model,osVersion:d.osVersion})}g.yq("yt.mdx.remote.remoteClient_",v);y&&(wju(J),J4V(J));v=J.T.Kd()&&isNaN(J.L);y==v?y&&(Kv(J,1),kc(J,"getSubtitlesTrack")):y?(J.hF()&&J.C.reset(),Kv(J,1),kc(J,"getNowPlaying"),dZy(J)):J.S$(1)},A4w=function(J,y){var v=y.params.videoId; delete y.params.videoId;v==J.C.videoId&&(g.Vx(y.params)?J.C.trackData=null:J.C.trackData=y.params,J.publish("remotePlayerChange"))},Tbb=function(J,y,v){var d=y.params.videoId||y.params.video_id,P=parseInt(y.params.currentIndex,10); J.C.listId=y.params.listId||J.C.listId;IQ(J.C,d,P);J.publish("remoteQueueChange",v)},M9Q=function(J,y){y.params=y.params||{}; Tbb(J,y,"NOW_PLAYING_MAY_CHANGE");lxq(J,y);J.publish("autoplayDismissed")},lxq=function(J,y){var v=parseInt(y.params.currentTime||y.params.current_time,10); Cv(J.C,isNaN(v)?0:v);v=parseInt(y.params.state,10);v=isNaN(v)?-1:v;v==-1&&J.C.playerState==-1E3&&(v=-1E3);J.C.playerState=v;v=Number(y.params.loadedTime);J.C.B=isNaN(v)?0:v;J.C.i8(Number(y.params.duration));v=J.C;var d=Number(y.params.liveIngestionTime);v.C=d;v.W=isNaN(d)?!1:!0;v=J.C;d=Number(y.params.seekableStartTime);y=Number(y.params.seekableEndTime);v.T=isNaN(d)?0:d;v.G=isNaN(y)?0:y;J.C.playerState==1?vRn(J):y4y(J);J.publish("remotePlayerChange")},nRH=function(J,y){if(J.C.playerState!=-1E3){var v= 1085; switch(parseInt(y.params.adState,10)){case 1:v=1081;break;case 2:v=1084;break;case 0:v=1083}J.C.playerState=v;y=parseInt(y.params.currentTime,10);Cv(J.C,isNaN(y)?0:y);J.publish("remotePlayerChange")}},sTQ=function(J,y){var v=y.params.muted=="true"; J.C.volume=parseInt(y.params.volume,10);J.C.muted=v;J.publish("remotePlayerChange")},YOw=function(J,y){J.G=y.params.videoId; J.publish("nowAutoplaying",parseInt(y.params.timeout,10))},SOy=function(J,y){J.G=y.params.videoId||null; J.publish("autoplayUpNext",J.G)},V9O=function(J,y){J.V=y.params.autoplayMode; J.publish("autoplayModeChange",J.V);J.V=="DISABLED"&&J.publish("autoplayDismissed")},L_b=function(J,y){var v=y.params.hasNext=="true"; J.C.JQ=y.params.hasPrevious=="true";J.C.Nk=v;J.publish("previousNextChange")},EWq=function(J,y){y=y.message; y.params?RQ("Received: action="+y.action+", params="+g.fb(y.params)):RQ("Received: action="+y.action+" {}");switch(y.action){case "loungeStatus":y=dY(y.params.devices);J.J=g.x7(y,function(d){return new MY(d)}); y=!!g.On(J.J,function(d){return d.type=="LOUNGE_SCREEN"}); PDb(J,y);y=J.Hi("mlm");J.publish("multiStateLoopEnabled",y);break;case "loungeScreenDisconnected":g.m0(J.J,function(d){return d.type=="LOUNGE_SCREEN"}); PDb(J,!1);break;case "remoteConnected":var v=new MY(dY(y.params.device));g.On(J.J,function(d){return d.equals(v)})||tmu(J.J,v); break;case "remoteDisconnected":v=new MY(dY(y.params.device));g.m0(J.J,function(d){return d.equals(v)}); break;case "gracefulDisconnect":break;case "playlistModified":Tbb(J,y,"QUEUE_MODIFIED");break;case "nowPlaying":M9Q(J,y);break;case "onStateChange":lxq(J,y);break;case "onAdStateChange":nRH(J,y);break;case "onVolumeChanged":sTQ(J,y);break;case "onSubtitlesTrackChanged":A4w(J,y);break;case "nowAutoplaying":YOw(J,y);break;case "autoplayDismissed":J.publish("autoplayDismissed");break;case "autoplayUpNext":SOy(J,y);break;case "onAutoplayModeChanged":V9O(J,y);break;case "onHasPreviousNextChanged":L_b(J, y);break;case "requestAssistedSignIn":J.publish("assistedSignInRequested",y.params.authCode);break;case "onLoopModeChanged":J.publish("loopModeChange",y.params.loopMode);break;default:RQ("Unrecognized action: "+y.action)}},dZy=function(J){g.LX(J.K); J.K=g.S3(function(){J.S$(1)},864E5)},kc=function(J,y,v){v?RQ("Sending: action="+y+", params="+g.fb(v)):RQ("Sending: action="+y); J.T.sendMessage(y,v)},t9_=function(J){ly.call(this,"ScreenServiceProxy"); this.bj=J;this.C=[];this.C.push(this.bj.$_s("screenChange",(0,g.Mb)(this.rD,this)));this.C.push(this.bj.$_s("onlineScreenChange",(0,g.Mb)(this.WZY,this)))},gRQ=function(J,y){t3C(); if(!Wb||!Wb.get("yt-remote-disable-remote-module-for-dev")){y=g.NP("MDX_CONFIG")||y;ThO();s7V();E6||(E6=new wY(y?y.loungeApiHost:void 0),WvV()&&(E6.C="/api/loungedev"));QX||(QX=g.vq("yt.mdx.remote.deferredProxies_")||[],g.yq("yt.mdx.remote.deferredProxies_",QX));W_C();var v=Z$();if(!v){var d=new S2(E6,y?y.disableAutomaticScreenCache||!1:!1);g.yq("yt.mdx.remote.screenService_",d);v=Z$();var P={};y&&(P={appId:y.appId,disableDial:y.disableDial,theme:y.theme,loadCastApiSetupScript:y.loadCastApiSetupScript, disableCastApi:y.disableCastApi,enableDialLoungeToken:y.enableDialLoungeToken,enableCastLoungeToken:y.enableCastLoungeToken,forceMirroring:y.forceMirroring});g.yq("yt.mdx.remote.enableConnectWithInitialState_",y?y.enableConnectWithInitialState||!1:!1);oWy(J,d,function(A){A?wz()&&rz(wz(),"YouTube TV"):d.subscribe("onlineScreenChange",function(){aS("yt-remote-receiver-availability-change")})},P)}y&&!g.vq("yt.mdx.remote.initialized_")&&(g.yq("yt.mdx.remote.initialized_",!0),Jf("Initializing: "+g.fb(y)), yO.push(g.QD("yt-remote-cast2-api-ready",function(){aS("yt-remote-api-ready")})),yO.push(g.QD("yt-remote-cast2-availability-change",function(){aS("yt-remote-receiver-availability-change")})),yO.push(g.QD("yt-remote-cast2-receiver-selected",function(){vH(null); aS("yt-remote-auto-connect","cast-selector-receiver")})),yO.push(g.QD("yt-remote-cast2-receiver-resumed",function(){aS("yt-remote-receiver-resumed","cast-selector-receiver")})),yO.push(g.QD("yt-remote-cast2-session-change",axq)),yO.push(g.QD("yt-remote-connection-change",function(A){A?rz(wz(),"YouTube TV"):d2()||(rz(null,null),pjq())})),yO.push(g.QD("yt-remote-cast2-session-failed",function(){aS("yt-remote-connection-failed")})),J=xZq(),y.isAuto&&(J.id+="#dial"),P=y.capabilities||[],P.length>0&&(J.capabilities= P),J.name=y.device,J.app=y.app,(y=y.theme)&&(J.theme=y),Jf(" -- with channel params: "+g.fb(J)),J?(g.B1("yt-remote-session-app",J.app),g.B1("yt-remote-session-name",J.name)):(g.r3("yt-remote-session-app"),g.r3("yt-remote-session-name")),g.yq("yt.mdx.remote.channelParams_",J),v.start(),wz()||OcQ())}},DZC=function(){var J=Z$().bj.$_gos(); var y=PH();y&&Af()&&(ANC(J,y)||J.push(y));return PQV(J)},GaX=function(){var J=c4X(); !J&&Bv()&&I6q()&&(J={key:"cast-selector-receiver",name:I6q()});return J},c4X=function(){var J=DZC(),y=PH(); y||(y=d2());return g.On(J,function(v){return y&&sX(y,v.key)?!0:!1})},PH=function(){var J=wz(); if(!J)return null;var y=Z$().XS();return Se(y,J)},axq=function(J){Jf("remote.onCastSessionChange_: "+Y0(J)); if(J){var y=PH();if(y&&y.id==J.id){if(rz(y.id,"YouTube TV"),J.idType=="shortLived"&&(J=J.token))Tw&&(Tw.token=J),(y=Af())&&y.Xi(J)}else y&&l6(),MQ(J,1)}else Af()&&l6()},l6=function(){q4()?mZ().stopSession():e2("stopSession called before API ready."); var J=Af();J&&(J.disconnect(1),bc0(null))},F_X=function(){var J=Af(); return!!J&&J.getProxyState()!=3},Jf=function(J){vv("remote",J)},Z$=function(){if(!jT0){var J=g.vq("yt.mdx.remote.screenService_"); jT0=J?new t9_(J):null}return jT0},wz=function(){return g.vq("yt.mdx.remote.currentScreenId_")},enO=function(J){g.yq("yt.mdx.remote.currentScreenId_",J)},mZQ=function(){return g.vq("yt.mdx.remote.connectData_")},vH=function(J){g.yq("yt.mdx.remote.connectData_",J)},Af=function(){return g.vq("yt.mdx.remote.connection_")},bc0=function(J){var y=Af(); vH(null);J||enO("");g.yq("yt.mdx.remote.connection_",J);QX&&(g.En(QX,function(v){v(J)}),QX.length=0); y&&!J?aS("yt-remote-connection-change",!1):!y&&J&&aS("yt-remote-connection-change",!0)},d2=function(){var J=g.$D(); if(!J)return null;var y=Z$();if(!y)return null;y=y.XS();return Se(y,J)},MQ=function(J,y){wz(); PH()&&PH();if(nM)Tw=J;else{enO(J.id);var v=g.vq("yt.mdx.remote.enableConnectWithInitialState_")||!1;J=new z5(E6,J,xZq(),v);J.connect(y,mZQ());J.subscribe("beforeDisconnect",function(d){aS("yt-remote-before-disconnect",d)}); J.subscribe("beforeDispose",function(){Af()&&(Af(),bc0(null))}); J.subscribe("browserChannelAuthError",function(){var d=PH();d&&d.idType=="shortLived"&&(q4()?mZ().handleBrowserChannelAuthError():e2("refreshLoungeToken called before API ready."))}); bc0(J)}},OcQ=function(){var J=d2(); J?(Jf("Resume connection to: "+Y0(J)),MQ(J,0)):(t5(),pjq(),Jf("Skipping connecting because no session screen found."))},W_C=function(){var J=xZq(); if(g.Vx(J)){J=L7();var y=g.qW("yt-remote-session-name")||"",v=g.qW("yt-remote-session-app")||"";J={device:"REMOTE_CONTROL",id:J,name:y,app:v,mdxVersion:3};J.authuser=String(g.NP("SESSION_INDEX","0"));(y=g.NP("DELEGATED_SESSION_ID"))&&(J.pageId=String(y));g.yq("yt.mdx.remote.channelParams_",J)}},xZq=function(){return g.vq("yt.mdx.remote.channelParams_")||{}},r4y=function(J,y,v){g.u.call(this); var d=this;this.C=J;this.S=y;this.rp=v;this.events=new g.gf(this);this.V=!1;this.L=new g.xz(64);this.T=new g.Kx(this.FC,500,this);this.J=new g.Kx(this.KV,1E3,this);this.B=new gY(this.XoK,0,this);this.W={};this.K=new g.Kx(this.z_,1E3,this);this.G=new g.QT(this.seekTo,1E3,this);this.zK=this.events.Z(this.S,"onVolumeChange",function(P){Bb_(d,P)}); g.X(this,this.events);this.events.Z(y,"onCaptionsTrackListChanged",this.J9K);this.events.Z(y,"captionschanged",this.Sky);this.events.Z(y,"captionssettingschanged",this.sy);this.events.Z(y,"videoplayerreset",this.TE);this.events.Z(y,"mdxautoplaycancel",function(){d.rp.YM()}); y.X("enable_mdx_video_play_directly")&&this.events.Z(y,"videodatachange",function(){qOb(d.C)||sW(d)||Yw(d,0)}); J=this.rp;J.tY();J.subscribe("proxyStateChange",this.wK,this);J.subscribe("remotePlayerChange",this.lz,this);J.subscribe("remoteQueueChange",this.TE,this);J.subscribe("previousNextChange",this.s1,this);J.subscribe("nowAutoplaying",this.Tp,this);J.subscribe("autoplayDismissed",this.BW,this);g.X(this,this.T);g.X(this,this.J);g.X(this,this.B);g.X(this,this.K);g.X(this,this.G);this.sy();this.TE();this.lz()},Bb_=function(J,y){if(sW(J)){J.rp.unsubscribe("remotePlayerChange",J.lz,J); var v=Math.round(y.volume);y=!!y.muted;var d=fv(J.rp);if(v!==d.volume||y!==d.muted)J.rp.setVolume(v,y),J.K.start();J.rp.subscribe("remotePlayerChange",J.lz,J)}},$Zu=function(J){J.cq(0); J.T.stop();J.i6(new g.xz(64))},oRH=function(J,y){if(sW(J)&&!J.V){var v=null; y&&(v={style:J.S.getSubtitlesUserSettings()},Object.assign(v,y));J.rp.wM(J.S.getVideoData(1).videoId,v);J.W=fv(J.rp).trackData}},Yw=function(J,y){var v=J.S.getPlaylist(); if(v==null?0:v.listId){var d=v.index;var P=v.listId.toString()}v=J.S.getVideoData(1);J.rp.playVideo(v.videoId,y,d,P,v.playerParams,v.WX,Lo0(v));J.i6(new g.xz(1))},CDV=function(J,y){if(y){var v=J.S.getOption("captions","tracklist",{EX:1}); v&&v.length?(J.S.setOption("captions","track",y),J.V=!1):(J.S.loadModule("captions"),J.V=!0)}else J.S.setOption("captions","track",{})},sW=function(J){return fv(J.rp).videoId===J.S.getVideoData(1).videoId},hnX=function(J,y){g.Hw.call(this,J); this.C=y},Sf=function(){g.z.call(this,{j:"div", N:"ytp-mdx-popup-dialog",U:{role:"dialog"},D:[{j:"div",N:"ytp-mdx-popup-dialog-inner-content",D:[{j:"div",N:"ytp-mdx-popup-title",TK:"Saliste de tu cuenta"},{j:"div",N:"ytp-mdx-popup-description",TK:"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."},{j:"div",N:"ytp-mdx-privacy-popup-buttons",D:[{j:"button",kB:["ytp-button", "ytp-mdx-privacy-popup-cancel"],TK:"Cancelar"},{j:"button",kB:["ytp-button","ytp-mdx-privacy-popup-confirm"],TK:"Confirmar"}]}]}]});this.fade=new g.Ex(this,250);this.cancelButton=this.uA("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.uA("ytp-mdx-privacy-popup-confirm");g.X(this,this.fade);this.Z(this.cancelButton,"click",this.C);this.Z(this.confirmButton,"click",this.T)},VO=function(J){g.z.call(this,{j:"div", N:"ytp-remote",D:[{j:"div",N:"ytp-remote-display-status",D:[{j:"div",N:"ytp-remote-display-status-icon",D:[g.YKH()]},{j:"div",N:"ytp-remote-display-status-text",TK:"{{statustext}}"}]}]});this.api=J;this.fade=new g.Ex(this,250);g.X(this,this.fade);this.Z(J,"presentingplayerstatechange",this.onStateChange);this.Hq(J.getPlayerStateObject())},LM=function(J,y){g.pZ.call(this,"Reproducir en",1,J,y); this.S=J;this.Od={};this.Z(J,"onMdxReceiversChange",this.W);this.Z(J,"presentingplayerstatechange",this.W);this.W()},Ixy=function(J){g.Gy.call(this,J); this.j7={key:d5n(),name:"Esta computadora"};this.bC=null;this.subscriptions=[];this.eg=this.rp=null;this.Od=[this.j7];this.cQ=this.j7;this.R_=new g.xz(64);this.UX=0;this.kH=-1;this.p6=!1;this.pL=this.WM=this.yf=null;if(!g.kO(this.player.Y())&&!g.rm(this.player.Y())){J=this.player;var y=g.G9(J);y&&(y=y.fN())&&(y=new LM(J,y),g.X(this,y));y=new VO(J);g.X(this,y);g.Hp(J,y.element,4);this.yf=new Sf;g.X(this,this.yf);g.Hp(J,this.yf.element,4);this.p6=!!d2()}},tf=function(J){J.WM&&(J.player.removeEventListener("presentingplayerstatechange", J.WM),J.WM=null)},pUq=function(J,y,v){J.R_=v; J.player.publish("presentingplayerstatechange",new g.lL(v,y))},WH=function(J,y){if(y.key!==J.cQ.key)if(y.key===J.j7.key)l6(); else if(qOb(J)&&UZC(J),J.cQ=y,!J.player.Y().X("disable_mdx_connection_in_mdx_module_for_music_web")||!g.rm(J.player.Y())){var v=J.player.getPlaylistId();var d=J.player.getVideoData(1);var P=d.videoId;if(!v&&!P||(J.player.getAppState()===2||J.player.getAppState()===1)&&J.player.Y().X("should_clear_video_data_on_player_cued_unstarted"))d=null;else{var A=J.player.getPlaylist();if(A){var T=[];for(var M=0;M2*this.size&&lm(this),!0):!1}; g.a.get=function(J,y){return A5(this.T,J)?this.T[J]:y}; g.a.set=function(J,y){A5(this.T,J)||(this.size+=1,this.C.push(J),this.k5++);this.T[J]=y}; g.a.forEach=function(J,y){for(var v=this.iQ(),d=0;d=d.C.length)return g.SY;var A=d.C[y++];return g.GR(J?A:d.T[A])}; return P}; var $PV={iLA:"atp",fCk:"ska",ejk:"que",JBy:"mus",SlY:"sus",Opx:"dsp",s$B:"seq",K1b:"mic",Fik:"dpa",dky:"mlm",rRY:"dsdtr",QqY:"ntb",wHf:"vsp",usR:"scn",K8k:"rpe",Yhx:"dcn",UFW:"dcp",VfY:"pas",PvY:"drq",W8j:"opf",Avk:"els",g6b:"isg",yxW:"svq",TvA:"mvp",axk:"ads",OTK:"stcp",WHR:"sads",DFA:"dloc",n6W:"dcw",TCj:"asw",dyx:"apw"},oVy={I4R:"u",kNk:"cl",L1K:"k",l5b:"i",X_R:"cr",giy:"m",cvW:"g",L2:"up"},xtu={pC:"adPlaying",qE:"onAdStateChange"},OU_={yBk:"nowPlaying",jqX:"onStateChange",pC:"adPlaying",qE:"onAdStateChange", A5:"nowPlayingShorts",Ib:"onShortsStateChange"},gJy={A5:"nowPlayingShorts",Ib:"onShortsStateChange"};MY.prototype.equals=function(J){return J?this.id==J.id:!1}; var nUn="",Wb=null;g.x(aZw,g.oP);var x0,Fvw=OXy("loadCastFramework")||OXy("loadCastApplicationFramework"),m5q=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Vq(gY,g.u);g.a=gY.prototype;g.a.E_=function(J){this.W=arguments;this.C=!1;this.Gu?this.J=g.Yy()+this.F1:this.Gu=g.ho(this.V,this.F1)}; g.a.stop=function(){this.Gu&&(g.wr.clearTimeout(this.Gu),this.Gu=null);this.J=null;this.C=!1;this.W=[]}; g.a.pause=function(){++this.T}; g.a.resume=function(){this.T&&(--this.T,!this.T&&this.C&&(this.C=!1,this.L.apply(null,this.W)))}; g.a.JY=function(){this.stop();gY.au.JY.call(this)}; g.a.m_=function(){this.Gu&&(g.wr.clearTimeout(this.Gu),this.Gu=null);this.J?(this.Gu=g.ho(this.V,this.J-g.Yy()),this.J=null):this.T?this.C=!0:(this.C=!1,this.L.apply(null,this.W))};Dw.prototype.stringify=function(J){return g.wr.JSON.stringify(J,void 0)}; Dw.prototype.parse=function(J){return g.wr.JSON.parse(J,void 0)};g.Vq(qLn,g.Nm);g.Vq(rNw,g.Nm);var $5V=null;g.Vq(CQC,g.Nm);g.Vq(hCw,g.Nm);g.Vq(IZQ,g.Nm);FB.prototype.debug=function(){}; FB.prototype.info=function(){}; FB.prototype.warning=function(){};var Nhy={},X0H={};g.a=je.prototype;g.a.setTimeout=function(J){this.YB=J}; g.a.Lz=function(J){J=J.target;var y=this.GK;y&&g.RJ(J)==3?y.wb():this.Bb(J)}; g.a.Bb=function(J){try{if(J==this.C)a:{var y=g.RJ(this.C),v=this.C.T,d=this.C.getStatus();if(!(y<3)&&(y!=3||this.C&&(this.T.T||g.zD(this.C)||g.k1(this.C)))){this.cX||y!=4||v==7||(v==8||d<=0?cb(3):cb(2));zCn(this);var P=this.C.getStatus();this.aG=P;var A=HXy(this);if(this.L=P==200){if(this.J9&&!this.Vk){b:{if(this.C){var T=g.Ek(this.C,"X-HTTP-Initial-Response");if(T&&!g.qh(T)){var M=T;break b}}M=null}if(J=M)this.Vk=!0,dWu(this,J);else{this.L=!1;this.V=3;GM(12);mi(this);Bb(this);break a}}if(this.If){J= !0;for(var n;!this.cX&&this.G0&&!this.yl&&(this.yl=!0,this.J.Cq(this)):(mi(this),Bb(this))}else dWu(this,A);y==4&&mi(this);this.L&&!this.cX&&(y==4?koV(this.J,this):(this.L=!1,ee(this)))}else g.D0r(this.C),P==400&&A.indexOf("Unknown SID")> 0?(this.V=3,GM(12)):(this.V=0,GM(13)),mi(this),Bb(this)}}}catch(Y){}finally{}}; g.a.cancel=function(){this.cX=!0;mi(this)}; g.a.SP=function(){this.zK=null;var J=Date.now();J-this.rj>=0?(this.Ek!=2&&(cb(3),GM(17)),mi(this),this.V=2,Bb(this)):Kvw(this,this.rj-J)}; g.a.getLastError=function(){return this.V}; g.a.pS=function(){return this.C};AXw.prototype.cancel=function(){this.J=luy(this);if(this.T)this.T.cancel(),this.T=null;else if(this.C&&this.C.size!==0){for(var J=g.D(this.C.values()),y=J.next();!y.done;y=J.next())y.value.cancel();this.C.clear()}};g.a=SKC.prototype;g.a.Yq=8;g.a.Kr=1;g.a.connect=function(J,y,v,d){GM(0);this.L8=J;this.cX=y||{};v&&d!==void 0&&(this.cX.OSID=v,this.cX.OAID=d);this.Vk=this.H$;this.WX=JX0(this,null,this.L8);oS(this)}; g.a.disconnect=function(){LNC(this);if(this.Kr==3){var J=this.ZB++,y=this.WX.clone();g.Yv(y,"SID",this.W);g.Yv(y,"RID",J);g.Yv(y,"TYPE","terminate");IS(this,y);J=new je(this,this.W,J);J.Ek=2;J.B=yj(y.clone());y=!1;if(g.wr.navigator&&g.wr.navigator.sendBeacon)try{y=g.wr.navigator.sendBeacon(J.B.toString(),"")}catch(v){}!y&&g.wr.Image&&((new Image).src=J.B,y=!0);y||(J.C=iX0(J.J,null),J.C.send(J.B));J.AY=Date.now();ee(J)}gDw(this)}; g.a.KA=function(){return this.Kr==0}; g.a.getState=function(){return this.Kr}; g.a.Dj=function(J){if(this.L)if(this.L=null,this.Kr==1){if(!J){this.ZB=Math.floor(Math.random()*1E5);J=this.ZB++;var y=new je(this,"",J),v=this.K;this.aG&&(v?(v=g.WL(v),g.xN(v,this.aG)):v=this.aG);this.G!==null||this.rj||(y.WX=v,v=null);var d;if(this.Ky)a:{for(var P=d=0;P4096){d=P;break a}if(d===4096||P===this.J.length-1){d=P+1;break a}}d= 1E3}else d=1E3;d=auX(this,y,d);P=this.WX.clone();g.Yv(P,"RID",J);g.Yv(P,"CVER",22);this.If&&g.Yv(P,"X-HTTP-Session-Id",this.If);IS(this,P);v&&(this.rj?d="headers="+g.mS(g.uZ2(v))+"&"+d:this.G&&g.ti(P,this.G,v));w0Q(this.T,y);this.VE&&g.Yv(P,"TYPE","init");this.Ky?(g.Yv(P,"$req",d),g.Yv(P,"SID","null"),y.J9=!0,fZQ(y,P,null)):fZQ(y,P,d);this.Kr=2}}else this.Kr==3&&(J?xWb(this,J):this.J.length==0||T3_(this.T)||xWb(this))}; g.a.Un=function(){this.B=null;ORX(this);if(this.ON&&!(this.YB||this.C==null||this.Lf<=0)){var J=2*this.Lf;this.wj=bm((0,g.Mb)(this.mxk,this),J)}}; g.a.mxk=function(){this.wj&&(this.wj=null,this.Vk=!1,this.YB=!0,GM(10),rY(this),ORX(this))}; g.a.Cq=function(J){this.C==J&&this.ON&&!this.YB&&(V$q(this),this.YB=!0,GM(11))}; g.a.fz=function(){this.zK!=null&&(this.zK=null,rY(this),Q7y(this),GM(19))}; g.a.qRj=function(J){J?GM(2):GM(1)}; g.a.isActive=function(){return!!this.V&&this.V.isActive(this)}; g.a=cXC.prototype;g.a.K4=function(){}; g.a.Fp=function(){}; g.a.rI=function(){}; g.a.Pb=function(){}; g.a.isActive=function(){return!0}; g.a.Vr=function(){};g.Vq(UX,g.Y1);UX.prototype.open=function(){this.C.V=this.J;this.L&&(this.C.Ek=!0);this.C.connect(this.V,this.T||void 0)}; UX.prototype.close=function(){this.C.disconnect()}; UX.prototype.send=function(J){var y=this.C;if(typeof J==="string"){var v={};v.__data__=J;J=v}else this.W&&(v={},v.__data__=g.fb(J),J=v);y.J.push(new P$C(y.Bo++,J));y.Kr==3&&oS(y)}; UX.prototype.JY=function(){this.C.V=null;delete this.J;this.C.disconnect();delete this.C;UX.au.JY.call(this)}; g.Vq(bRn,qLn);g.Vq(FNw,rNw);g.Vq(p7,cXC);p7.prototype.K4=function(){this.C.dispatchEvent("m")}; p7.prototype.Fp=function(J){this.C.dispatchEvent(new bRn(J))}; p7.prototype.rI=function(J){this.C.dispatchEvent(new FNw(J))}; p7.prototype.Pb=function(){this.C.dispatchEvent("n")};var im=new g.Y1;g.x(mWq,g.Nm);g.a=Hb.prototype;g.a.Ec=null;g.a.zC=!1;g.a.Be=null;g.a.sL=null;g.a.Bt=null;g.a.gb=null;g.a.NK=null;g.a.Jd=null;g.a.S3=null;g.a.tv=null;g.a.uV=0;g.a.MJ=null;g.a.Ad=null;g.a.m9=null;g.a.RI=-1;g.a.fV=!0;g.a.ZI=!1;g.a.oN=0;g.a.Td=null;var C$n={},oDQ={};g.a=Hb.prototype;g.a.setTimeout=function(J){this.T=J}; g.a.hV=function(J){J=J.target;var y=this.Td;y&&g.RJ(J)==3?y.wb():this.nZ(J)}; g.a.nZ=function(J){try{if(J==this.tv)a:{var y=g.RJ(this.tv),v=this.tv.T,d=this.tv.getStatus();if(g.s3&&!g.iX("420+")){if(y<4)break a}else if(y<3||y==3&&!g.zD(this.tv))break a;this.ZI||y!=4||v==7||(v==8||d<=0?this.C.uY(3):this.C.uY(2));p1b(this);var P=this.tv.getStatus();this.RI=P;var A=g.zD(this.tv);if(this.zC=P==200){y==4&&XB(this);if(this.If){for(J=!0;!this.ZI&&this.uV0?(this.m9=3,um(13)):(this.m9=0,um(14)),XB(this),UW_(this)}}catch(M){}finally{}}; g.a.cancel=function(){this.ZI=!0;XB(this)}; g.a.Ml=function(){this.Be=null;var J=Date.now();J-this.sL>=0?(this.gb!=2&&this.C.uY(3),XB(this),this.m9=2,um(18),UW_(this)):IuC(this,this.sL-J)}; g.a.getLastError=function(){return this.m9};g.a=HRV.prototype;g.a.QO=null;g.a.wv=null;g.a.xQ=!1;g.a.yO=null;g.a.o$=null;g.a.c9=-1;g.a.oO=null;g.a.H3=null;g.a.connect=function(J){this.yO=J;J=RS(this.C,null,this.yO);um(3);Date.now();var y=this.C.K;y!=null?(this.oO=y[0],(this.H3=y[1])?(this.o$=1,X1b(this)):(this.o$=2,N3C(this))):(vb(J,"MODE","init"),this.wv=new Hb(this),this.wv.Ec=this.QO,rXC(this.wv,J,!1,null,!0),this.o$=0)}; g.a.uR=function(J){if(J)this.o$=2,N3C(this);else{um(4);var y=this.C;y.hM=y.jA.c9;EX(y,9)}J&&this.uY(2)}; g.a.IN=function(J){return this.C.IN(J)}; g.a.abort=function(){this.wv&&(this.wv.cancel(),this.wv=null);this.c9=-1}; g.a.KA=function(){return!1}; g.a.z2=function(J,y){this.c9=J.RI;if(this.o$==0)if(y){try{var v=this.T.parse(y)}catch(d){J=this.C;J.hM=this.c9;EX(J,2);return}this.oO=v[0];this.H3=v[1]}else J=this.C,J.hM=this.c9,EX(J,2);else this.o$==2&&(this.xQ?(um(7),Date.now()):y=="11111"?(um(6),this.xQ=!0,Date.now(),this.c9=200,this.wv.cancel(),um(12),K7(this.C,this,!0)):(um(8),Date.now(),this.xQ=!1))}; g.a.wm=function(){this.c9=this.wv.RI;if(this.wv.zC)this.o$==0?this.H3?(this.o$=1,X1b(this)):(this.o$=2,N3C(this)):this.o$==2&&(this.xQ?(um(12),K7(this.C,this,!0)):(um(11),K7(this.C,this,!1)));else{this.o$==0?um(9):this.o$==2&&um(10);var J=this.C;this.wv.getLastError();J.hM=this.c9;EX(J,2)}}; g.a.Yt=function(){return this.C.Yt()}; g.a.isActive=function(){return this.C.isActive()}; g.a.uY=function(J){this.C.uY(J)};g.a=RJC.prototype;g.a.qP=null;g.a.U4=null;g.a.m1=null;g.a.gC=null;g.a.WL=null;g.a.sO=null;g.a.CZ=null;g.a.kx=null;g.a.DI=0;g.a.Hk=0;g.a.nL=null;g.a.CF=null;g.a.Eu=null;g.a.fP=null;g.a.jA=null;g.a.Bm=null;g.a.DK=-1;g.a.aY=-1;g.a.hM=-1;g.a.Ua=0;g.a.YF=0;g.a.LP=8;var fx_={OK:0,CCY:2,Yxj:4,bEB:5,q2f:6,STOP:7,gH:8,aaA:9,laR:10,CvA:11,JOk:12};g.Vq(zJQ,g.Nm);g.Vq(kWy,g.Nm);g.a=RJC.prototype; g.a.connect=function(J,y,v,d,P){um(0);this.WL=y;this.U4=v||{};d&&P!==void 0&&(this.U4.OSID=d,this.U4.OAID=P);this.B?(f7((0,g.Mb)(this.mK,this,J),100),Q4V(this)):this.mK(J)}; g.a.disconnect=function(){ZRw(this);if(this.C==3){var J=this.DI++,y=this.sO.clone();g.Yv(y,"SID",this.W);g.Yv(y,"RID",J);g.Yv(y,"TYPE","terminate");k0(this,y);J=new Hb(this,this.W,J);J.gb=2;J.NK=yj(y.clone());(new Image).src=J.NK.toString();J.Bt=Date.now();$Wy(J)}MOb(this)}; g.a.mK=function(J){this.jA=new HRV(this);this.jA.QO=this.qP;this.jA.T=this.V;this.jA.connect(J)}; g.a.KA=function(){return this.C==0}; g.a.getState=function(){return this.C}; g.a.T2=function(J){this.CF=null;dty(this,J)}; g.a.dM=function(){this.Eu=null;this.gC=new Hb(this,this.W,"rpc",this.G);this.gC.Ec=this.qP;this.gC.oN=0;var J=this.CZ.clone();g.Yv(J,"RID","rpc");g.Yv(J,"SID",this.W);g.Yv(J,"CI",this.Bm?"0":"1");g.Yv(J,"AID",this.DK);k0(this,J);g.Yv(J,"TYPE","xmlhttp");rXC(this.gC,J,!0,this.kx,!1)}; g.a.z2=function(J,y){if(this.C!=0&&(this.gC==J||this.m1==J))if(this.hM=J.RI,this.m1==J&&this.C==3)if(this.LP>7){try{var v=this.V.parse(y)}catch(d){v=null}if(Array.isArray(v)&&v.length==3)if(J=v,J[0]==0)a:{if(!this.Eu){if(this.gC)if(this.gC.Bt+3E30)){if(d=y==1)this.m1||this.CF||this.C==1||this.Ua>=2?d=!1:(this.CF=f7((0,g.Mb)(this.T2,this,J),AW_(this,this.Ua)),this.Ua++, d=!0);d=!(d||y==2&&TSn(this))}if(d)switch(v){case 1:EX(this,5);break;case 4:EX(this,10);break;case 3:EX(this,6);break;case 7:EX(this,12);break;default:EX(this,2)}}}; g.a.x7=function(J){if(!g.cq(arguments,this.C))throw Error("Unexpected channel state: "+this.C);}; g.a.suf=function(J){J?um(2):(um(1),lmX(this,8))}; g.a.IN=function(J){if(J)throw Error("Can't create secondary domain capable XhrIo object.");J=new g.HQ;J.G=!1;return J}; g.a.isActive=function(){return!!this.nL&&this.nL.isActive(this)}; g.a.uY=function(J){var y=im;y.dispatchEvent(new kWy(y,J))}; g.a.Yt=function(){return!1}; g.a=nJO.prototype;g.a.Ac=function(){}; g.a.gM=function(){}; g.a.ut=function(){}; g.a.Jc=function(){}; g.a.pD=function(){}; g.a.oY=function(){return{}}; g.a.isActive=function(){return!0};g.a=sOu.prototype;g.a.enqueue=function(J){this.T.push(J)}; g.a.isEmpty=function(){return this.C.length===0&&this.T.length===0}; g.a.clear=function(){this.C=[];this.T=[]}; g.a.contains=function(J){return g.cq(this.C,J)||g.cq(this.T,J)}; g.a.remove=function(J){var y=this.C;var v=(0,g.R3Q)(y,J);v>=0?(g.GQ(y,v),y=!0):y=!1;return y||g.bw(this.T,J)}; g.a.hx=function(){for(var J=[],y=this.C.length-1;y>=0;--y)J.push(this.C[y]);y=this.T.length;for(var v=0;v=icV.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(J=icV[this.T],this.Gu=g.S3((0,g.Mb)(this.rK,this),J),this.T++):this.publish("pairingFailed",Error("Server error "+J.status))}; g.a.Zh=function(){this.C=null;this.publish("pairingFailed",Error("Server not responding"))}; var icV=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Vq(nv,ly);g.a=nv.prototype;g.a.start=function(){M4(this)&&this.publish("screenChange");!g.qW("yt-remote-lounge-token-expiration")&&NSu(this);g.LX(this.C);this.C=g.S3((0,g.Mb)(this.start,this),1E4)}; g.a.add=function(J,y){M4(this);iUH(this,J);s6(this,!1);this.publish("screenChange");y(J);J.token||NSu(this)}; g.a.remove=function(J,y){var v=M4(this);HUO(this,J)&&(s6(this,!1),v=!0);y(J);v&&this.publish("screenChange")}; g.a.ZS=function(J,y,v,d){var P=M4(this),A=this.get(J.id);A?(A.name!=y&&(A.name=y,s6(this,!1),P=!0),v(J)):d(Error("no such local screen."));P&&this.publish("screenChange")}; g.a.JY=function(){g.LX(this.C);nv.au.JY.call(this)}; g.a.jD=function(J){M4(this);var y=this.screens.length;J=J&&J.screens||[];for(var v=J.length,d=0;d20)break a;M=y(A,T)}A=M}P.name=A}v(VX(this,P))},this), onError:(0,g.Mb)(function(P){d(Error("pairing request failed: "+P.status))},this), onTimeout:(0,g.Mb)(function(){d(Error("pairing request timed out."))},this)})}; g.a.JY=function(){g.dJ(this.T);g.dJ(this.C);S2.au.JY.call(this)}; g.a.hZ=function(){dDQ(this);this.publish("screenChange");this.C.update()}; S2.prototype.dispose=S2.prototype.dispose;g.Vq(Lv,g.yK);g.a=Lv.prototype;g.a.PO=function(J){this.tY()||(J&&(Wv(this,""+J),this.publish("sessionFailed")),this.C=null,this.publish("sessionScreen",null))}; g.a.info=function(J){vv(this.If,J)}; g.a.IY=function(){return null}; g.a.Pp=function(J){var y=this.T;J?(y.displayStatus=new chrome.cast.ReceiverDisplayStatus(J,[]),y.displayStatus.showStop=!0):y.displayStatus=null;chrome.cast.setReceiverDisplayStatus(y,(0,g.Mb)(function(){this.info("Updated receiver status for "+y.friendlyName+": "+J)},this),(0,g.Mb)(function(){Wv(this,"Failed to update receiver status for: "+y.friendlyName)},this))}; g.a.JY=function(){this.Pp("");Lv.au.JY.call(this)};g.x(aQ,Lv);g.a=aQ.prototype;g.a.UU=function(J){if(this.J){if(this.J==J)return;Wv(this,"Overriding cast session with new session object");tKu(this);this.AY=!1;this.K="unknown";this.J.removeUpdateListener(this.Cy);this.J.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.wj)}this.J=J;this.J.addUpdateListener(this.Cy);this.J.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.wj);sFu(this,"getMdxSessionStatus")}; g.a.X4=function(J){this.info("launchWithParams no-op for Cast: "+g.fb(J))}; g.a.stop=function(){this.J?this.J.stop((0,g.Mb)(function(){this.PO()},this),(0,g.Mb)(function(){this.PO(Error("Failed to stop receiver app."))},this)):this.PO(Error("Stopping cast device without session."))}; g.a.Pp=function(){}; g.a.JY=function(){this.info("disposeInternal");tKu(this);this.J&&(this.J.removeUpdateListener(this.Cy),this.J.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.wj));this.J=null;Lv.prototype.JY.call(this)}; g.a.s_B=function(J,y){if(!this.tY())if(y)if(y=dY(y),g.AO(y))switch(J=""+y.type,y=y.data||{},this.info("onYoutubeMessage_: "+J+" "+g.fb(y)),J){case "mdxSessionStatus":l6C(this,y);break;case "loungeToken":YIy(this,y);break;default:Wv(this,"Unknown youtube message: "+J)}else Wv(this,"Unable to parse message.");else Wv(this,"No data in message.")}; g.a.Gm=function(J,y,v,d){g.LX(this.B);this.B=0;JpX(this.W,this.T.label,J,this.T.friendlyName,(0,g.Mb)(function(P){P?y(P):d>=0?(Wv(this,"Screen "+J+" appears to be offline. "+d+" retries left."),this.B=g.S3((0,g.Mb)(this.Gm,this,J,y,v,d-1),300)):v(Error("Unable to fetch screen."))},this),v)}; g.a.IY=function(){return this.J}; g.a.Bk=function(J){this.tY()||J||(Wv(this,"Cast session died."),this.PO())};g.x(xc,Lv);g.a=xc.prototype;g.a.UU=function(J){this.J=J;this.J.addUpdateListener(this.cX)}; g.a.X4=function(J){this.WX=J;this.zK()}; g.a.stop=function(){G0q(this);this.J?this.J.stop((0,g.Mb)(this.PO,this,null),(0,g.Mb)(this.PO,this,"Failed to stop DIAL device.")):this.PO()}; g.a.JY=function(){G0q(this);this.J&&this.J.removeUpdateListener(this.cX);this.J=null;Lv.prototype.JY.call(this)}; g.a.Y7=function(J){this.tY()||J||(Wv(this,"DIAL session died."),this.V(),this.V=function(){},this.PO())};g.x(D$,Lv);D$.prototype.stop=function(){this.PO()}; D$.prototype.UU=function(){}; D$.prototype.X4=function(){g.LX(this.J);this.J=NaN;var J=Se(this.W.XS(),this.T.label);J?tE(this,J):this.PO(Error("No such screen"))}; D$.prototype.JY=function(){g.LX(this.J);this.J=NaN;Lv.prototype.JY.call(this)};g.x(cv,g.yK);g.a=cv.prototype; g.a.init=function(J,y){chrome.cast.timeout.requestSession=3E4;var v=new chrome.cast.SessionRequest(this.B,[chrome.cast.Capability.AUDIO_OUT]);g.a7("desktop_enable_cast_connect")&&(v.androidReceiverCompatible=!0);this.K||(v.dialRequest=new chrome.cast.DialRequest("YouTube"));var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;J=J||this.L?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var P=(0,g.Mb)(this.bfA,this);v=new chrome.cast.ApiConfig(v,(0,g.Mb)(this.bl, this),P,d,J);v.customDialLaunchCallback=(0,g.Mb)(this.ZyR,this);chrome.cast.initialize(v,(0,g.Mb)(function(){this.tY()||(chrome.cast.addReceiverActionListener(this.V),Imb(),this.T.subscribe("onlineScreenChange",(0,g.Mb)(this.Qy,this)),this.J=jFu(this),chrome.cast.setCustomReceivers(this.J,function(){},(0,g.Mb)(function(A){this.Iu("Failed to set initial custom receivers: "+g.fb(A))},this)),this.publish("yt-remote-cast2-availability-change",by(this)),y(!0))},this),(0,g.Mb)(function(A){this.Iu("Failed to initialize API: "+ g.fb(A)); y(!1)},this))}; g.a.LLB=function(J,y){G5("Setting connected screen ID: "+J+" -> "+y);if(this.C){var v=this.C.C;if(!J||v&&v.id!=J)G5("Unsetting old screen status: "+this.C.T.friendlyName),Fy(this,null)}if(J&&y){if(!this.C){J=Se(this.T.XS(),J);if(!J){G5("setConnectedScreenStatus: Unknown screen.");return}if(J.idType=="shortLived"){G5("setConnectedScreenStatus: Screen with id type to be short lived.");return}v=b0w(this,J);v||(G5("setConnectedScreenStatus: Connected receiver not custom..."),v=new chrome.cast.Receiver(J.uuid? J.uuid:J.id,J.name),v.receiverType=chrome.cast.ReceiverType.CUSTOM,this.J.push(v),chrome.cast.setCustomReceivers(this.J,function(){},(0,g.Mb)(function(d){this.Iu("Failed to set initial custom receivers: "+g.fb(d))},this))); G5("setConnectedScreenStatus: new active receiver: "+v.friendlyName);Fy(this,new D$(this.T,v),!0)}this.C.Pp(y)}else G5("setConnectedScreenStatus: no screen.")}; g.a.hBR=function(J){this.tY()?this.Iu("Setting connection data on disposed cast v2"):this.C?this.C.X4(J):this.Iu("Setting connection data without a session")}; g.a.Dh=function(){this.tY()?this.Iu("Stopping session on disposed cast v2"):this.C?(this.C.stop(),Fy(this,null)):G5("Stopping non-existing session")}; g.a.requestSession=function(){chrome.cast.requestSession((0,g.Mb)(this.bl,this),(0,g.Mb)(this.NnY,this))}; g.a.JY=function(){this.T.unsubscribe("onlineScreenChange",(0,g.Mb)(this.Qy,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.V);var J=oJX,y=g.vq("yt.mdx.remote.debug.handlers_");g.bw(y||[],J);g.dJ(this.C);g.yK.prototype.JY.call(this)}; g.a.Iu=function(J){vv("Controller",J)}; g.a.je=function(J,y){this.C==J&&(y||Fy(this,null),this.publish("yt-remote-cast2-session-change",y))}; g.a.QkK=function(J,y){if(!this.tY())if(J)switch(J.friendlyName=chrome.cast.unescape(J.friendlyName),G5("onReceiverAction_ "+J.label+" / "+J.friendlyName+"-- "+y),y){case chrome.cast.ReceiverAction.CAST:if(this.C)if(this.C.T.label!=J.label)G5("onReceiverAction_: Stopping active receiver: "+this.C.T.friendlyName),this.C.stop();else{G5("onReceiverAction_: Casting to active receiver.");this.C.C&&this.publish("yt-remote-cast2-session-change",this.C.C);break}switch(J.receiverType){case chrome.cast.ReceiverType.CUSTOM:Fy(this, new D$(this.T,J));break;case chrome.cast.ReceiverType.DIAL:Fy(this,new xc(this.T,J,this.W,this.config_));break;case chrome.cast.ReceiverType.CAST:Fy(this,new aQ(this.T,J,this.config_));break;default:this.Iu("Unknown receiver type: "+J.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.C&&this.C.T.label==J.label?this.C.stop():this.Iu("Stopping receiver w/o session: "+J.friendlyName)}else this.Iu("onReceiverAction_ called without receiver.")}; g.a.ZyR=function(J){if(this.tY())return Promise.reject(Error("disposed"));var y=J.receiver;y.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.Iu("Not DIAL receiver: "+y.friendlyName),y.receiverType=chrome.cast.ReceiverType.DIAL);var v=this.C?this.C.T:null;if(!v||v.label!=y.label)return this.Iu("Receiving DIAL launch request for non-clicked DIAL receiver: "+y.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(v&&v.label==y.label&&v.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.C.C)return G5("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.C.C),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.Iu('Changing CAST intent from "'+v.receiverType+'" to "dial" for '+y.friendlyName);Fy(this,new xc(this.T,y,this.W,this.config_))}y=this.C;y.B=J;y.B.appState==chrome.cast.DialAppState.RUNNING?(J=y.B.extraData||{},v=J.screenId||null,O6(y)&&J.loungeToken?J.loungeTokenRefreshIntervalMs?J=gWH(y,{name:y.T.friendlyName,screenId:J.screenId,loungeToken:J.loungeToken,dialId:y.B.receiver.label, screenIdType:"shortLived"},J.loungeTokenRefreshIntervalMs):(g.zq(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(J)+".")),J=DDq(y,v)):J=DDq(y,v)):J=xDq(y);return J}; g.a.bl=function(J){var y=this;if(!this.tY()&&!this.L){G5("New cast session ID: "+J.sessionId);var v=J.receiver;if(v.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.C)if(v.receiverType==chrome.cast.ReceiverType.CAST)G5("Got resumed cast session before resumed mdx connection."),v.friendlyName=chrome.cast.unescape(v.friendlyName),Fy(this,new aQ(this.T,v,this.config_),!0);else{this.Iu("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var d=this.C.T,P=Se(this.T.XS(), d.label);P&&sX(P,v.label)&&d.receiverType!=chrome.cast.ReceiverType.CAST&&v.receiverType==chrome.cast.ReceiverType.CAST&&(G5("onSessionEstablished_: manual to cast session change "+v.friendlyName),g.dJ(this.C),this.C=new aQ(this.T,v,this.config_),this.C.subscribe("sessionScreen",(0,g.Mb)(this.je,this,this.C)),this.C.subscribe("sessionFailed",function(){return FWq(y,y.C)}),this.C.X4(null)); this.C.UU(J)}}}; g.a.U_=function(){return this.C?this.C.IY():null}; g.a.NnY=function(J){this.tY()||(this.Iu("Failed to estabilish a session: "+g.fb(J)),J.code!=chrome.cast.ErrorCode.CANCEL&&Fy(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.a.bfA=function(J){G5("Receiver availability updated: "+J);if(!this.tY()){var y=by(this);this.G=J==chrome.cast.ReceiverAvailability.AVAILABLE;by(this)!=y&&this.publish("yt-remote-cast2-availability-change",by(this))}}; g.a.Qy=function(){this.tY()||(this.J=jFu(this),G5("Updating custom receivers: "+g.fb(this.J)),chrome.cast.setCustomReceivers(this.J,function(){},(0,g.Mb)(function(){this.Iu("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",by(this)))}; cv.prototype.setLaunchParams=cv.prototype.hBR;cv.prototype.setConnectedScreenStatus=cv.prototype.LLB;cv.prototype.stopSession=cv.prototype.Dh;cv.prototype.getCastSession=cv.prototype.U_;cv.prototype.requestSession=cv.prototype.requestSession;cv.prototype.init=cv.prototype.init;cv.prototype.dispose=cv.prototype.dispose;var hg0=[];g.a=$c.prototype; g.a.reset=function(J){this.listId="";this.index=-1;this.videoId="";uLy(this);this.volume=-1;this.muted=!1;J&&(this.index=J.index,this.listId=J.listId,this.videoId=J.videoId,this.playerState=J.playerState,this.volume=J.volume,this.muted=J.muted,this.audioTrackId=J.audioTrackId,this.trackData=J.trackData,this.JQ=J.hasPrevious,this.Nk=J.hasNext,this.L=J.playerTime,this.V=J.playerTimeAt,this.T=J.seekableStart,this.G=J.seekableEnd,this.J=J.duration,this.B=J.loadedTime,this.C=J.liveIngestionTime,this.W= !isNaN(this.C))}; g.a.isPlaying=function(){return this.playerState==1}; g.a.isBuffering=function(){return this.playerState==3}; g.a.kY=function(){return this.playerState==1081}; g.a.i8=function(J){this.J=isNaN(J)?0:J}; g.a.getDuration=function(){return this.W?this.J+oQ(this):this.J}; g.a.clone=function(){return new $c(Xjw(this))};g.x(U6,g.yK);g.a=U6.prototype;g.a.getState=function(){return this.J}; g.a.ZZ=function(){return this.W.getReconnectTimeout()}; g.a.ac=function(){this.W.reconnect()}; g.a.play=function(){iy(this)?(this.C?this.C.play(null,g.$k,N4(this,"play")):Xy(this,"play"),KWX(this,1,hE(fv(this))),this.publish("remotePlayerChange")):uy(this,this.play)}; g.a.pause=function(){iy(this)?(this.C?this.C.pause(null,g.$k,N4(this,"pause")):Xy(this,"pause"),KWX(this,2,hE(fv(this))),this.publish("remotePlayerChange")):uy(this,this.pause)}; g.a.seekTo=function(J){if(iy(this)){if(this.C){var y=fv(this),v=new chrome.cast.media.SeekRequest;v.currentTime=J;y.isPlaying()||y.isBuffering()?v.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:v.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.C.seek(v,g.$k,N4(this,"seekTo",{newTime:J}))}else Xy(this,"seekTo",{newTime:J});KWX(this,3,J);this.publish("remotePlayerChange")}else uy(this,g.nH(this.seekTo,J))}; g.a.stop=function(){if(iy(this)){this.C?this.C.stop(null,g.$k,N4(this,"stopVideo")):Xy(this,"stopVideo");var J=fv(this);J.index=-1;J.videoId="";uLy(J);Hv(this,J);this.publish("remotePlayerChange")}else uy(this,this.stop)}; g.a.setVolume=function(J,y){if(iy(this)){var v=fv(this);if(this.T){if(v.volume!=J){var d=Math.round(J)/100;this.T.setReceiverVolumeLevel(d,(0,g.Mb)(function(){dz("set receiver volume: "+d)},this),(0,g.Mb)(function(){this.Iu("failed to set receiver volume.")},this))}v.muted!=y&&this.T.setReceiverMuted(y,(0,g.Mb)(function(){dz("set receiver muted: "+y)},this),(0,g.Mb)(function(){this.Iu("failed to set receiver muted.")},this))}else{var P={volume:J, muted:y};v.volume!=-1&&(P.delta=J-v.volume);Xy(this,"setVolume",P)}v.muted=y;v.volume=J;Hv(this,v)}else uy(this,g.nH(this.setVolume,J,y))}; g.a.wM=function(J,y){if(iy(this)){var v=fv(this);J={videoId:J};y&&(v.trackData={trackName:y.name,languageCode:y.languageCode,sourceLanguageCode:y.translationLanguage?y.translationLanguage.languageCode:"",languageName:y.languageName,kind:y.kind},J.style=g.fb(y.style),g.xN(J,v.trackData));Xy(this,"setSubtitlesTrack",J);Hv(this,v)}else uy(this,g.nH(this.wM,J,y))}; g.a.setAudioTrack=function(J,y){iy(this)?(y=y.getLanguageInfo().getId(),Xy(this,"setAudioTrack",{videoId:J,audioTrackId:y}),J=fv(this),J.audioTrackId=y,Hv(this,J)):uy(this,g.nH(this.setAudioTrack,J,y))}; g.a.playVideo=function(J,y,v,d,P,A,T){d=d===void 0?null:d;P=P===void 0?null:P;A=A===void 0?null:A;T=T===void 0?null:T;var M=fv(this),n={videoId:J};v!==void 0&&(n.currentIndex=v);IQ(M,J,v||0);y!==void 0&&(Cv(M,y),n.currentTime=y);d&&(n.listId=d);P&&(n.playerParams=P);A&&(n.clickTrackingParams=A);T&&(n.locationInfo=g.fb(T));Xy(this,"setPlaylist",n);d||Hv(this,M)}; g.a.m2=function(J,y){if(iy(this)){if(J&&y){var v=fv(this);IQ(v,J,y);Hv(this,v)}Xy(this,"previous")}else uy(this,g.nH(this.m2,J,y))}; g.a.nextVideo=function(J,y){if(iy(this)){if(J&&y){var v=fv(this);IQ(v,J,y);Hv(this,v)}Xy(this,"next")}else uy(this,g.nH(this.nextVideo,J,y))}; g.a.hU=function(){if(iy(this)){Xy(this,"clearPlaylist");var J=fv(this);J.reset();Hv(this,J);this.publish("remotePlayerChange")}else uy(this,this.hU)}; g.a.YM=function(){iy(this)?Xy(this,"dismissAutoplay"):uy(this,this.YM)}; g.a.dispose=function(){if(this.J!=3){var J=this.J;this.J=3;this.publish("proxyStateChange",J,this.J)}g.yK.prototype.dispose.call(this)}; g.a.JY=function(){RgX(this);this.W=null;this.V.clear();pv(this,null);g.yK.prototype.JY.call(this)}; g.a.ix=function(J){if((J!=this.J||J==2)&&this.J!=3&&J!=0){var y=this.J;this.J=J;this.publish("proxyStateChange",y,J);if(J==1)for(;!this.V.isEmpty();)y=J=this.V,y.C.length===0&&(y.C=y.T,y.C.reverse(),y.T=[]),J.C.pop().apply(this);else J==3&&this.dispose()}}; g.a.skk=function(J,y){this.publish(J,y)}; g.a.VbW=function(J){if(!J)this.r8(null),pv(this,null);else if(this.T.receiver.volume){J=this.T.receiver.volume;var y=fv(this),v=Math.round(100*J.level||0);if(y.volume!=v||y.muted!=J.muted)dz("Cast volume update: "+J.level+(J.muted?" muted":"")),y.volume=v,y.muted=!!J.muted,Hv(this,y)}}; g.a.r8=function(J){dz("Cast media: "+!!J);this.C&&this.C.removeUpdateListener(this.B);if(this.C=J)this.C.addUpdateListener(this.B),zgy(this),this.publish("remotePlayerChange")}; g.a.fBb=function(J){J?(zgy(this),this.publish("remotePlayerChange")):this.r8(null)}; g.a.XX=function(){Xy(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.a.hYX=function(){var J=UDy();J&&pv(this,J)}; g.a.Iu=function(J){vv("CP",J)};g.x(z5,g.yK);g.a=z5.prototype; g.a.connect=function(J,y){if(y){var v=y.listId,d=y.videoId,P=y.videoIds,A=y.playerParams,T=y.clickTrackingParams,M=y.index,n={videoId:d},Y=y.currentTime,S=y.locationInfo;y=y.loopMode;Y!==void 0&&(n.currentTime=Y<=5?0:Y);A&&(n.playerParams=A);S&&(n.locationInfo=S);T&&(n.clickTrackingParams=T);v&&(n.listId=v);P&&P.length>0&&(n.videoIds=P.join(","));M!==void 0&&(n.currentIndex=M);this.cX&&(n.loopMode=y||"LOOP_MODE_OFF");v&&(this.C.listId=v);this.C.videoId=d;this.C.index=M||0;this.C.state=3;Cv(this.C, Y);this.V="UNSUPPORTED";v=this.cX?"setInitialState":"setPlaylist";RQ("Connecting with "+v+" and params: "+g.fb(n));this.T.connect({method:v,params:g.fb(n)},J,YLq())}else RQ("Connecting without params"),this.T.connect({},J,YLq());Z0n(this)}; g.a.Xi=function(J){this.T.Xi(J)}; g.a.dispose=function(){this.tY()||(g.yq("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),Kv(this,3));g.yK.prototype.dispose.call(this)}; g.a.JY=function(){wju(this);y4y(this);J4V(this);g.LX(this.B);this.B=NaN;g.LX(this.K);this.K=NaN;this.W=null;g.g3(this.zK);this.zK.length=0;this.T.dispose();g.yK.prototype.JY.call(this);this.V=this.G=this.J=this.C=this.T=null}; g.a.Hi=function(J){if(!this.J||this.J.length===0)return!1;for(var y=g.D(this.J),v=y.next();!v.done;v=y.next())if(!v.value.capabilities.has(J))return!1;return!0}; g.a.zF=function(){var J=3;this.tY()||(J=0,isNaN(this.v4())?this.T.Kd()&&isNaN(this.L)&&(J=1):J=2);return J}; g.a.S$=function(J){RQ("Disconnecting with "+J);g.yq("yt.mdx.remote.remoteClient_",null);wju(this);this.publish("beforeDisconnect",J);J==1&&t5();this.T.disconnect(J);this.dispose()}; g.a.ej=function(){var J=this.C;this.W&&(J=this.C.clone(),IQ(J,this.W,J.index));return Xjw(J)}; g.a.XRR=function(J){var y=this,v=new $c(J);v.videoId&&v.videoId!=this.C.videoId&&(this.W=v.videoId,g.LX(this.B),this.B=g.S3(function(){if(y.W){var P=y.W;y.W=null;y.C.videoId!=P&&kc(y,"getNowPlaying")}},5E3)); var d=[];this.C.listId==v.listId&&this.C.videoId==v.videoId&&this.C.index==v.index||d.push("remoteQueueChange");this.C.playerState==v.playerState&&this.C.volume==v.volume&&this.C.muted==v.muted&&hE(this.C)==hE(v)&&g.fb(this.C.trackData)==g.fb(v.trackData)||d.push("remotePlayerChange");this.C.reset(J);g.En(d,function(P){this.publish(P)},this)}; g.a.hF=function(){var J=this.T.getDeviceId(),y=g.On(this.J,function(v){return v.type=="REMOTE_CONTROL"&&v.id!=J}); return y?y.id:""}; g.a.v4=function(){return this.T.ZZ()}; g.a.xU=function(){return this.V||"UNSUPPORTED"}; g.a.HZ=function(){return this.G||""}; g.a.Pk=function(){!isNaN(this.v4())&&this.T.ac()}; g.a.crW=function(J,y){kc(this,J,y);dZy(this)}; g.a.yy=function(){var J=g.o7("SAPISID","")||g.o7("__Secure-1PAPISID")||"",y=g.o7("__Secure-3PAPISID","")||"";if(!J&&!y)return"";J=g.eB(g.jB(J),2);y=g.eB(g.jB(y),2);return g.eB(g.jB(","+J+","+y),2)}; z5.prototype.subscribe=z5.prototype.subscribe;z5.prototype.unsubscribeByKey=z5.prototype.Fg;z5.prototype.getProxyState=z5.prototype.zF;z5.prototype.disconnect=z5.prototype.S$;z5.prototype.getPlayerContextData=z5.prototype.ej;z5.prototype.setPlayerContextData=z5.prototype.XRR;z5.prototype.getOtherConnectedRemoteId=z5.prototype.hF;z5.prototype.getReconnectTimeout=z5.prototype.v4;z5.prototype.getAutoplayMode=z5.prototype.xU;z5.prototype.getAutoplayVideoId=z5.prototype.HZ;z5.prototype.reconnect=z5.prototype.Pk; z5.prototype.sendMessage=z5.prototype.crW;z5.prototype.getXsrfToken=z5.prototype.yy;z5.prototype.isCapabilitySupportedOnConnectedDevices=z5.prototype.Hi;g.x(t9_,ly);g.a=t9_.prototype;g.a.XS=function(J){return this.bj.$_gs(J)}; g.a.contains=function(J){return!!this.bj.$_c(J)}; g.a.get=function(J){return this.bj.$_g(J)}; g.a.start=function(){this.bj.$_st()}; g.a.add=function(J,y,v){this.bj.$_a(J,y,v)}; g.a.remove=function(J,y,v){this.bj.$_r(J,y,v)}; g.a.ZS=function(J,y,v,d){this.bj.$_un(J,y,v,d)}; g.a.JY=function(){for(var J=this.C.length,y=0;y1&&!this.S.getOption("remote","quickCast")?(this.Od=g.Qq(J,this.C,this),this.Wn(g.x7(J,this.C)),J=this.S.getOption("remote","currentReceiver"),J=this.C(J),this.options[J]&&this.CL(J),this.enable(!0)):this.enable(!1)}; LM.prototype.C=function(J){return J.key}; LM.prototype.bu=function(J){return J==="cast-selector-receiver"?"Transmitir\u2026":this.Od[J].name}; LM.prototype.AO=function(J){g.pZ.prototype.AO.call(this,J);this.S.setOption("remote","currentReceiver",this.Od[J]);this.A9.p8()};g.x(Ixy,g.Gy);g.a=Ixy.prototype; g.a.create=function(){var J=this.player.Y(),y=g.z3(J);J={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:J.X("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:J.X("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:J.X("enable_cast_short_lived_lounge_token")};gRQ(y,J);this.subscriptions.push(g.QD("yt-remote-before-disconnect",this.EBf,this));this.subscriptions.push(g.QD("yt-remote-connection-change",this.kuA,this));this.subscriptions.push(g.QD("yt-remote-receiver-availability-change",this.Qn, this));this.subscriptions.push(g.QD("yt-remote-auto-connect",this.y_j,this));this.subscriptions.push(g.QD("yt-remote-receiver-resumed",this.wqA,this));this.subscriptions.push(g.QD("mdx-privacy-popup-confirm",this.NiR,this));this.subscriptions.push(g.QD("mdx-privacy-popup-cancel",this.G4R,this));this.Qn()}; g.a.load=function(){this.player.cancelPlayback();g.Gy.prototype.load.call(this);this.pL=new hnX(this.player.Y(),this);this.player.AS(this.pL);this.bC=new r4y(this,this.player,this.rp);var J=(J=mZQ())?J.currentTime:0;var y=F_X()?new U6(Af(),void 0):null;J==0&&y&&(J=hE(fv(y)));J!==0&&this.cq(J);pUq(this,this.R_,this.R_);this.player.UT(6)}; g.a.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.NS();this.cQ=this.j7;g.P2(this.bC,this.rp);this.rp=this.pL=this.bC=null;g.Gy.prototype.unload.call(this);this.player.UT(5);tf(this)}; g.a.JY=function(){g.Z6(this.subscriptions);g.Gy.prototype.JY.call(this)}; g.a.G1=function(J){var y=g.iR.apply(1,arguments);this.loaded&&this.bC.VI.apply(this.bC,[J].concat(g.r(y)))}; g.a.getAdState=function(){return this.kH}; g.a.JQ=function(){return this.rp?fv(this.rp).JQ:!1}; g.a.Nk=function(){return this.rp?fv(this.rp).Nk:!1}; g.a.cq=function(J,y){this.UX=J||0;this.player.publish("progresssync",J,y);this.player.Kf("onVideoProgress",J||0)}; g.a.getCurrentTime=function(){return this.UX}; g.a.getDuration=function(){return fv(this.rp).getDuration()||0}; g.a.T4=function(){var J=fv(this.rp);return J.W?J.C+oQ(J):J.C}; g.a.LN=function(){return fv(this.rp).B}; g.a.HO=function(){return H0O(fv(this.rp))}; g.a.GU=function(){var J=fv(this.rp);return J.T>0?J.T+oQ(J):J.T}; g.a.getProgressState=function(){var J=fv(this.rp),y=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!J.kY()&&this.player.ij(),clipEnd:y.clipEnd,clipStart:y.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.T4(),isAtLiveHead:this.isAtLiveHead(),loaded:this.LN(),seekableEnd:this.HO(),seekableStart:this.GU(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.a.isAtLiveHead=function(){return H0O(fv(this.rp))-this.getCurrentTime()<=1}; g.a.nextVideo=function(){this.rp&&this.rp.nextVideo()}; g.a.m2=function(){this.rp&&this.rp.m2()}; g.a.EBf=function(J){J===1&&(this.eg=this.rp?fv(this.rp):null)}; g.a.kuA=function(){var J=F_X()?new U6(Af(),void 0):null;if(J){var y=this.cQ;this.loaded&&this.unload();this.rp=J;this.eg=null;y.key!==this.j7.key&&(this.cQ=y,this.load())}else g.dJ(this.rp),this.rp=null,this.loaded&&(this.unload(),(J=this.eg)&&J.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(J.videoId,hE(J)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.a.Qn=function(){var J=[this.j7],y=J.concat,v=DZC();Bv()&&g.qW("yt-remote-cast-available")&&v.push({key:"cast-selector-receiver",name:"Cast..."});this.Od=y.call(J,v);J=GaX()||this.j7;WH(this,J);this.player.Kf("onMdxReceiversChange")}; g.a.y_j=function(){var J=GaX();WH(this,J)}; g.a.wqA=function(){this.cQ=GaX()}; g.a.NiR=function(){this.p6=!0;tf(this);nM=!1;Tw&&MQ(Tw,1);Tw=null}; g.a.G4R=function(){this.p6=!1;tf(this);WH(this,this.j7);this.cQ=this.j7;nM=!1;Tw=null;this.player.playVideo()}; g.a.TN=function(J,y){switch(J){case "casting":return this.loaded;case "receivers":return this.Od;case "currentReceiver":return y&&(y.key==="cast-selector-receiver"?f6_():WH(this,y)),this.loaded?this.cQ:this.j7;case "quickCast":return this.Od.length===2&&this.Od[1].key==="cast-selector-receiver"?(y&&f6_(),!0):!1}}; g.a.XX=function(){this.rp.XX()}; g.a.l8=function(){return!1}; g.a.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.a.isLoggedIn=function(){var J,y;return((J=g.NP("PLAYER_CONFIG"))==null?void 0:(y=J.args)==null?void 0:y.authuser)!==void 0?!0:!(!g.NP("SESSION_INDEX")&&!g.NP("LOGGED_IN"))};g.cm("remote",Ixy);})(_yt_player);