(function(g){var window=this;'use strict';var O_C=function(O){if(O instanceof g.q3)return O;if(typeof O.e5=="function")return O.e5(!1);if(g.OC(O)){var R=0,J=new g.q3;J.next=function(){for(;;){if(R>=O.length)return g.KB;if(R in O)return g.kl(O[R++]);R++}}; return J}throw Error("Not implemented");},RN_=function(O,R,J){if(g.OC(O))g.e6(O,R,J); else for(O=O_C(O);;){var l=O.next();if(l.done)break;R.call(J,l.value,void 0,O)}},Rw=function(O){g.CP(O,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.Fk()).toString(36)); return O},Je=function(O,R,J){Array.isArray(J)||(J=[String(J)]); g.p3L(O.N,R,J)},JFR=function(O,R){var J=[]; RN_(R,function(l){try{var u=g.qx.prototype.S.call(this,l,!0)}catch(F){if(F=="Storage: Invalid value was encountered")return;throw F;}u===void 0?J.push(l):g.UGs(u)&&J.push(l)},O); return J},gjo=function(O,R){JFR(O,R).forEach(function(J){g.qx.prototype.remove.call(this,J)},O)},i__=function(O){if(O.Re){if(O.Re.locationOverrideToken)return{locationOverrideToken:O.Re.locationOverrideToken}; if(O.Re.latitudeE7!=null&&O.Re.longitudeE7!=null)return{latitudeE7:O.Re.latitudeE7,longitudeE7:O.Re.longitudeE7}}return null},lDQ=function(O,R){g.Zo(O,R)||O.push(R)},u64=function(O){var R=0,J; for(J in O)R++;return R},FSM=function(O,R){return g.hV(O,R)},G3b=function(O){try{return g.YW.JSON.parse(O)}catch(R){}O=String(O); if(/^\s*$/.test(O)?0:/^[\],:{}\s\u2028\u2029]*$/.test(O.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("("+O+")")}catch(R){}throw Error("Invalid JSON string: "+O);},gi=function(O){if(g.YW.JSON)try{return g.YW.JSON.parse(O)}catch(R){}return G3b(O)},KSo=function(){var O=i_(); this.L=O;O.Oa("/client_streamz/youtube/living_room/mdx/channel/opened",g.C7("channel_type"))},yFR=function(){var O=i_(); this.L=O;O.Oa("/client_streamz/youtube/living_room/mdx/channel/closed",g.C7("channel_type"))},wW6=function(){var O=i_(); this.L=O;O.Oa("/client_streamz/youtube/living_room/mdx/channel/message_received",g.C7("channel_type"))},IDk=function(){var O=i_(); this.L=O;O.Oa("/client_streamz/youtube/living_room/mdx/channel/success")},Clo=function(){var O=i_(); this.L=O;O.Oa("/client_streamz/youtube/living_room/mdx/channel/error",g.C7("channel_type"),g.C7("error_type"))},rFt=function(){var O=i_(); this.L=O;O.Oa("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},t8k=function(){var O=i_(); this.L=O;O.Oa("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},ojC=function(O){if(O.j5&&typeof O.j5=="function")return O.j5(); if(typeof Map!=="undefined"&&O instanceof Map||typeof Set!=="undefined"&&O instanceof Set)return Array.from(O.values());if(typeof O==="string")return O.split("");if(g.OC(O)){for(var R=[],J=O.length,l=0;l1){if(J%2)throw Error("Uneven number of arguments");for(var l=0;l5&&(O=O.slice(O.length-5)); var R=g.jO(lSV(),function(l){return l.loungeToken}),J=g.jO(O,function(l){return l.loungeToken}); g.QX(J,function(l){return!g.Zo(R,l)})&&u7t(); g.bE("yt-remote-local-screens",O,31536E3)},te=function(O){O||(g.A6("yt-remote-session-screen-id"),g.A6("yt-remote-session-video-id")); gs4();O=CW();g.ft(O,ri());RPV(O)},Gv6=function(){if(!ow){var O=g.eP(); O&&(ow=new g.Tw(O))}},KpV=function(){Gv6(); return ow?!!ow.get("yt-remote-use-staging-server"):!1},Z6=function(O,R){g.ih[O]=!0; var J=g.J_();J&&J.publish.apply(J,arguments);g.ih[O]=!1},y6R=function(){},i_=function(){if(!Va){Va=new g.Hh(new y6R); var O=g.N5("client_streamz_web_flush_count",-1);O!==-1&&(Va.B=O)}return Va},wfM=function(){var O=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return O?parseInt(O[1],10):0},ISM=function(O){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+O)!=-1||document.currentScript.src.indexOf("&"+O)!=-1)},CEI=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},fW=function(O){O.length?r6C(O.shift(),function(){fW(O)}):tmI()},osV=function(O){return"chrome-extension://"+O+"/cast_sender.js"},r6C=function(O,R,J){var l=document.createElement("script"); l.onerror=R;J&&(l.onload=J);g.GY(l,g.at(O));(document.head||document.documentElement).appendChild(l)},ZaC=function(){var O=wfM(),R=[]; if(O>1){var J=O-1;R.push("//www.gstatic.com/eureka/clank/"+O+"/cast_sender.js");R.push("//www.gstatic.com/eureka/clank/"+J+"/cast_sender.js")}return R},tmI=function(){var O=CEI(); O&&O(!1,"No cast extension found")},fSo=function(){if(Vmt){var O=2,R=CEI(),J=function(){O--; O==0&&R&&R(!0)}; window.__onGCastApiAvailable=J;r6C("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",tmI,J)}},S$k=function(){fSo(); var O=ZaC();O.push("//www.gstatic.com/eureka/clank/cast_sender.js");fW(O)},mNC=function(){fSo(); var O=ZaC();O.push.apply(O,g.X(NZV.map(osV)));O.push("//www.gstatic.com/eureka/clank/cast_sender.js");fW(O)},Sx=function(O,R,J){g.p.call(this); this.j=J!=null?(0,g.iQ)(O,J):O;this.Wc=R;this.D=(0,g.iQ)(this.DW,this);this.L=!1;this.S=0;this.B=this.GR=null;this.N=[]},Np=function(){},EsR=function(){g.n7.call(this,"p")},DNo=function(){g.n7.call(this,"o")},vs6=function(){return aSI=aSI||new g.tW},Xf4=function(O){g.n7.call(this,"serverreachability",O)},mm=function(O){var R=vs6(); R.dispatchEvent(new Xf4(R,O))},TZ6=function(O){g.n7.call(this,"statevent",O)},EK=function(O){var R=vs6(); R.dispatchEvent(new TZ6(R,O))},$N6=function(O,R,J,l){g.n7.call(this,"timingevent",O); this.size=R;this.rtt=J;this.retries=l},D6=function(O,R){if(typeof O!=="function")throw Error("Fn must not be null and must be a function"); return g.YW.setTimeout(function(){O()},R)},aw=function(){},vc=function(O,R,J,l){this.B=O; this.N=R;this.d5=J;this.AT=l||1;this.fJ=new g.Vf(this);this.KJ=45E3;this.Qh=null;this.j=!1;this.W=this.AR=this.V=this.Iu=this.OQ=this.sQ=this.SN=null;this.Hq=[];this.L=null;this.J=0;this.D=this.iz=null;this.Rz=-1;this.xS=!1;this.Td=0;this.Gd=null;this.w5=this.JR=this.SG=this.N1=!1;this.S=new Mmb},Mmb=function(){this.B=null; this.L="";this.S=!1},kvI=function(O,R,J){O.Iu=1; O.V=Rw(R.clone());O.W=J;O.N1=!0;q$M(O,null)},q$M=function(O,R){O.OQ=Date.now(); XA(O);O.AR=O.V.clone();Je(O.AR,"t",O.AT);O.J=0;var J=O.B.Iu;O.S=new Mmb;O.L=sU4(O.B,J?R:null,!O.W);O.Td>0&&(O.Gd=new g.RP((0,g.iQ)(O.kc,O,O.L),O.Td));O.fJ.listen(O.L,"readystatechange",O.Jg);R=O.Qh?g.RW(O.Qh):{};O.W?(O.iz||(O.iz="POST"),R["Content-Type"]="application/x-www-form-urlencoded",O.L.send(O.AR,O.iz,O.W,R)):(O.iz="GET",O.L.send(O.AR,O.iz,null,R));mm(1)},WpQ=function(O){if(!ba4(O))return g.nE(O.L); var R=g.ch(O.L);if(R==="")return"";var J="",l=R.length,u=g.hW(O.L)==4;if(!O.S.B){if(typeof TextDecoder==="undefined")return T6(O),$1(O),"";O.S.B=new g.YW.TextDecoder}for(var F=0;FR.length)return A66;R=R.slice(l,l+J);O.J=l+J;return R},XA=function(O){O.sQ=Date.now()+O.KJ; pfb(O,O.KJ)},pfb=function(O,R){if(O.SN!=null)throw Error("WatchDog timer not null"); O.SN=D6((0,g.iQ)(O.ZW,O),R)},BZk=function(O){O.SN&&(g.YW.clearTimeout(O.SN),O.SN=null)},$1=function(O){O.B.fA()||O.xS||HaQ(O.B,O)},T6=function(O){BZk(O); g.rd(O.Gd);O.Gd=null;O.fJ.removeAll();if(O.L){var R=O.L;O.L=null;R.abort();R.dispose()}},hP6=function(O,R){try{var J=O.B; if(J.s0!=0&&(J.L==O||xNt(J.S,O)))if(!O.JR&&xNt(J.S,O)&&J.s0==3){try{var l=J.eR.L.parse(R)}catch(m){l=null}if(Array.isArray(l)&&l.length==3){var u=l;if(u[0]==0)a:{if(!J.V){if(J.L)if(J.L.OQ+3E30&&(J.Td=1.5*y);l=J;var w=O.De();if(w){var I=g.On(w,"X-Client-Wire-Protocol");if(I){var C=l.S;!C.L&&(g.ZJ(I,"spdy")||g.ZJ(I,"quic")||g.ZJ(I,"h2"))&&(C.N=C.D,C.L=new Set,C.S&&(QUR(C,C.S),C.S=null))}if(l.N1){var r=g.On(w,"X-HTTP-Session-Id");r&&(l.vY=r,g.CP(l.Qh,l.N1,r))}}J.s0=3;J.D&&J.D.Cl();J.zJ&&(J.Y9=Date.now()-O.OQ);l=J;var t=O;l.Jo=Lp6(l,l.Iu?l.AT:null,l.d5);if(t.JR){Y$b(l.S, t);var Z=t,V=l.Td;V&&Z.setTimeout(V);Z.SN&&(BZk(Z),XA(Z));l.L=t}else dNk(l);J.B.length>0&&sK(J)}else F[0]!="stop"&&F[0]!="close"||k1(J,7);else J.s0==3&&(F[0]=="stop"||F[0]=="close"?F[0]=="stop"?k1(J,7):J.disconnect():F[0]!="noop"&&J.D&&J.D.Kl(F),J.Hq=0)}mm(4)}catch(m){}},zP6=function(O,R){this.L=O; this.map=R;this.context=null},ns_=function(O){this.D=O||10; g.YW.PerformanceNavigationTiming?(O=g.YW.performance.getEntriesByType("navigation"),O=O.length>0&&(O[0].nextHopProtocol=="hq"||O[0].nextHopProtocol=="h2")):O=!!(g.YW.chrome&&g.YW.chrome.loadTimes&&g.YW.chrome.loadTimes()&&g.YW.chrome.loadTimes().wasFetchedViaSpdy);this.N=O?this.D:1;this.L=null;this.N>1&&(this.L=new Set);this.S=null;this.B=[]},c6R=function(O){return O.S?!0:O.L?O.L.size>=O.N:!1},jU6=function(O){return O.S?1:O.L?O.L.size:0},xNt=function(O,R){return O.S?O.S==R:O.L?O.L.has(R):!1},QUR= function(O,R){O.L?O.L.add(R):O.S=R},Y$b=function(O,R){O.S&&O.S==R?O.S=null:O.L&&O.L.has(R)&&O.L.delete(R)},OgM=function(O){if(O.S!=null)return O.B.concat(O.S.Hq); if(O.L!=null&&O.L.size!==0){var R=O.B;O=g.N(O.L.values());for(var J=O.next();!J.done;J=O.next())R=R.concat(J.value.Hq);return R}return g.m4(O.B)},RvR=function(O,R){var J=new aw; if(g.YW.Image){var l=new Image;l.onload=g.uQ(b_,J,"TestLoadImage: loaded",!0,R,l);l.onerror=g.uQ(b_,J,"TestLoadImage: error",!1,R,l);l.onabort=g.uQ(b_,J,"TestLoadImage: abort",!1,R,l);l.ontimeout=g.uQ(b_,J,"TestLoadImage: timeout",!1,R,l);g.YW.setTimeout(function(){if(l.ontimeout)l.ontimeout()},1E4); l.src=O}else R(!1)},JSC=function(O,R){var J=new aw,l=new AbortController,u=setTimeout(function(){l.abort(); b_(J,"TestPingServer: timeout",!1,R)},1E4); fetch(O,{signal:l.signal}).then(function(F){clearTimeout(u);F.ok?b_(J,"TestPingServer: ok",!0,R):b_(J,"TestPingServer: server error",!1,R)}).catch(function(){clearTimeout(u); b_(J,"TestPingServer: error",!1,R)})},b_=function(O,R,J,l,u){try{u&&(u.onload=null,u.onerror=null,u.onabort=null,u.ontimeout=null),l(J)}catch(F){}},gSC=function(){this.L=new Np},igt=function(O,R,J){var l=J||""; try{V84(O,function(u,F){var G=u;g.Rb(u)&&(G=g.Uf(u));R.push(l+F+"="+encodeURIComponent(G))})}catch(u){throw R.push(l+"type="+encodeURIComponent("_badmap")),u; }},Wc=function(O,R,J){return J&&J.pqJ?J.pqJ[O]||R:R},lAt=function(O){this.B=[]; this.AT=this.Jo=this.Qh=this.d5=this.L=this.vY=this.N1=this.xS=this.J=this.Rz=this.W=null;this.xe=this.AR=0;this.vW=Wc("failFast",!1,O);this.JR=this.SN=this.V=this.j=this.D=null;this.mM=!0;this.CG=this.Gd=-1;this.w5=this.Hq=this.OQ=0;this.Xw=Wc("baseRetryDelayMs",5E3,O);this.yk=Wc("retryDelaySeedMs",1E4,O);this.jR=Wc("forwardChannelMaxRetries",2,O);this.m1=Wc("forwardChannelRequestTimeoutMs",2E4,O);this.E8=O&&O.udq||void 0;this.DZ=O&&O.oaJ||void 0;this.Re=O&&O.FOJ||!1;this.Td=void 0;this.Iu=O&&O.BIh|| !1;this.N="";this.S=new ns_(O&&O.EyS);this.eR=new gSC;this.fJ=O&&O.HSu||!1;this.sQ=O&&O.csd||!1;this.fJ&&this.sQ&&(this.sQ=!1);this.Ie=O&&O.xiU||!1;O&&O.enR&&(this.mM=!1);this.zJ=!this.fJ&&this.mM&&O&&O.z8S||!1;this.TR=void 0;O&&O.Sg&&O.Sg>0&&(this.TR=O.Sg);this.Py=void 0;this.Y9=0;this.KJ=!1;this.SG=this.iz=null},qp=function(O){O.L&&(uIk(O),O.L.cancel(),O.L=null)},F3_=function(O){qp(O); O.V&&(g.YW.clearTimeout(O.V),O.V=null);Mp(O);O.S.cancel();O.j&&(typeof O.j==="number"&&g.YW.clearTimeout(O.j),O.j=null)},sK=function(O){c6R(O.S)||O.j||(O.j=!0,g.aL(O.Vf,O),O.OQ=0)},K36=function(O,R){if(jU6(O.S)>=O.S.N-(O.j?1:0))return!1; if(O.j)return O.B=R.Hq.concat(O.B),!0;if(O.s0==1||O.s0==2||O.OQ>=(O.vW?0:O.jR))return!1;O.j=D6((0,g.iQ)(O.Vf,O,R),GW_(O,O.OQ));O.OQ++;return!0},wuQ=function(O,R){var J; R?J=R.d5:J=O.AR++;var l=O.Qh.clone();g.CP(l,"SID",O.N);g.CP(l,"RID",J);g.CP(l,"AID",O.Gd);Ae(O,l);O.J&&O.W&&g.Zj(l,O.J,O.W);J=new vc(O,O.N,J,O.OQ+1);O.J===null&&(J.Qh=O.W);R&&(O.B=R.Hq.concat(O.B));R=ySk(O,J,1E3);J.setTimeout(Math.round(O.m1*.5)+Math.round(O.m1*.5*Math.random()));QUR(O.S,J);kvI(J,l,R)},Ae=function(O,R){O.xS&&g.BR(O.xS,function(J,l){g.CP(R,l,J)}); O.D&&V84({},function(J,l){g.CP(R,l,J)})},ySk=function(O,R,J){J=Math.min(O.B.length,J); var l=O.D?(0,g.iQ)(O.D.EN,O.D,O):null;a:{for(var u=O.B,F=-1;;){var G=["count="+J];F==-1?J>0?(F=u[0].L,G.push("ofs="+F)):F=0:G.push("ofs="+F);for(var y=!0,w=0;w=3)return!1; O.w5++;O.V=D6((0,g.iQ)(O.lO,O),GW_(O,O.Hq));O.Hq++;return!0},uIk=function(O){O.iz!=null&&(g.YW.clearTimeout(O.iz),O.iz=null)},IAk=function(O){O.L=new vc(O,O.N,"rpc",O.w5); O.J===null&&(O.L.Qh=O.W);O.L.Td=0;var R=O.Jo.clone();g.CP(R,"RID","rpc");g.CP(R,"SID",O.N);g.CP(R,"AID",O.Gd);g.CP(R,"CI",O.JR?"0":"1");!O.JR&&O.TR&&g.CP(R,"TO",O.TR);g.CP(R,"TYPE","xmlhttp");Ae(O,R);O.J&&O.W&&g.Zj(R,O.J,O.W);O.Td&&O.L.setTimeout(O.Td);var J=O.L;O=O.AT;J.Iu=1;J.V=Rw(R.clone());J.W=null;J.N1=!0;q$M(J,O)},Mp=function(O){O.SN!=null&&(g.YW.clearTimeout(O.SN),O.SN=null)},HaQ=function(O,R){var J=null; if(O.L==R){Mp(O);uIk(O);O.L=null;var l=2}else if(xNt(O.S,R))J=R.Hq,Y$b(O.S,R),l=1;else return;if(O.s0!=0)if(R.j)if(l==1){J=R.W?R.W.length:0;R=Date.now()-R.OQ;var u=O.OQ;l=vs6();l.dispatchEvent(new $N6(l,J,R,u));sK(O)}else dNk(O);else{var F=R.Rz;u=R.getLastError();if(u==3||u==0&&F>0||!(l==1&&K36(O,R)||l==2&&UNk(O)))switch(J&&J.length>0&&(R=O.S,R.B=R.B.concat(J)),u){case 1:k1(O,5);break;case 4:k1(O,10);break;case 3:k1(O,6);break;default:k1(O,2)}}},GW_=function(O,R){var J=O.Xw+Math.floor(Math.random()* O.yk); O.isActive()||(J*=2);return J*R},k1=function(O,R){if(R==2){var J=(0,g.iQ)(O.Q8z,O),l=O.DZ,u=!l; l=new g.lD(l||"//www.google.com/images/cleardot.gif");g.YW.location&&g.YW.location.protocol=="http"||g.uD(l,"https");Rw(l);u?RvR(l.toString(),J):JSC(l.toString(),J)}else EK(2);O.s0=0;O.D&&O.D.TF(R);Cqk(O);F3_(O)},Cqk=function(O){O.s0=0; O.SG=[];if(O.D){var R=OgM(O.S);if(R.length!=0||O.B.length!=0)g.Do(O.SG,R),g.Do(O.SG,O.B),O.S.B.length=0,g.m4(O.B),O.B.length=0;O.D.An()}},rSk=function(O){if(O.s0==0)return O.SG; var R=[];g.Do(R,OgM(O.S));g.Do(R,O.B);return R},Lp6=function(O,R,J){var l=g.rE(J); l.L!=""?(R&&g.Fh(l,R+"."+l.L),g.GR(l,l.B)):(l=g.YW.location,l=fDC(l.protocol,R?R+"."+l.hostname:l.hostname,+l.port,J));R=O.N1;J=O.vY;R&&J&&g.CP(l,R,J);g.CP(l,"VER",O.zF);Ae(O,l);return l},sU4=function(O,R,J){if(R&&!O.Iu)throw Error("Can't create secondary domain capable XhrIo object."); R=O.Re&&!O.E8?new g.LE(new g.R8({hM:J})):new g.LE(O.E8);R.J=O.Iu;return R},tDI=function(){},oSk=function(){},Pc=function(O,R){g.tW.call(this); this.L=new lAt(R);this.D=O;this.S=R&&R.H1u||null;O=R&&R.Sfh||null;R&&R.Jsh&&(O?O["X-Client-Protocol"]="webchannel":O={"X-Client-Protocol":"webchannel"});this.L.W=O;O=R&&R.Ilh||null;R&&R.qC&&(O?O["X-WebChannel-Content-Type"]=R.qC:O={"X-WebChannel-Content-Type":R.qC});R&&R.i4&&(O?O["X-WebChannel-Client-Profile"]=R.i4:O={"X-WebChannel-Client-Profile":R.i4});this.L.Rz=O;(O=R&&R.yPh)&&!g.oW(O)&&(this.L.J=O);this.j=R&&R.BIh||!1;this.N=R&&R.xpQ||!1;(R=R&&R.bJh)&&!g.oW(R)&&(this.L.N1=R,g.YM(this.S,R)&&(O= this.S,R in O&&delete O[R]));this.B=new ex(this)},ZgI=function(O){EsR.call(this); O.__headers__&&(this.headers=O.__headers__,this.statusCode=O.__status__,delete O.__headers__,delete O.__status__);var R=O.__sm__;R?this.data=(this.L=g.j6(R))?g.cR(R,this.L):R:this.data=O},VDI=function(O){DNo.call(this); this.status=1;this.errorCode=O},ex=function(O){this.L=O},fAt=function(O,R){this.S=O; this.L=R},S4b=function(O){return rSk(O.L).map(function(R){var J=O.S; R=R.map;"__data__"in R?(R=R.__data__,J=J.N?G3b(R):R):J=R;return J})},pW=function(O,R){if(typeof O!=="function")throw Error("Fn must not be null and must be a function"); return g.YW.setTimeout(function(){O()},R)},Hc=function(O){Bc.dispatchEvent(new Njt(Bc,O))},Njt=function(O){g.n7.call(this,"statevent",O)},x1=function(O,R,J,l){this.L=O; this.N=R;this.J=J;this.j=l||1;this.S=45E3;this.B=new g.Vf(this);this.D=new g.Ph;this.D.setInterval(250)},ES6=function(O,R,J){O.LF=1; O.Yx=Rw(R.clone());O.Ch=J;O.N1=!0;m$4(O,null)},D$C=function(O,R,J,l,u){O.LF=1; O.Yx=Rw(R.clone());O.Ch=null;O.N1=J;u&&(O.l9=!1);m$4(O,l)},m$4=function(O,R){O.Xb=Date.now(); aAC(O);O.RK=O.Yx.clone();Je(O.RK,"t",O.j);O.S7=0;O.hx=O.L.q4(O.L.j1()?R:null);O.N4>0&&(O.fm=new g.RP((0,g.iQ)(O.Px,O,O.hx),O.N4));O.B.listen(O.hx,"readystatechange",O.UN);R=O.Kh?g.RW(O.Kh):{};O.Ch?(O.nF="POST",R["Content-Type"]="application/x-www-form-urlencoded",O.hx.send(O.RK,O.nF,O.Ch,R)):(O.nF="GET",O.l9&&!g.d7&&(R.Connection="close"),O.hx.send(O.RK,O.nF,null,R));O.L.v2(1)},Tjb=function(O,R){var J=O.S7,l=R.indexOf("\n",J); if(l==-1)return vSt;J=Number(R.substring(J,l));if(isNaN(J))return Xu6;l+=1;if(l+J>R.length)return vSt;R=R.slice(l,l+J);O.S7=l+J;return R},aAC=function(O){O.YP=Date.now()+O.S; $$M(O,O.S)},$$M=function(O,R){if(O.iT!=null)throw Error("WatchDog timer not null"); O.iT=pW((0,g.iQ)(O.G1,O),R)},MD6=function(O){O.iT&&(g.YW.clearTimeout(O.iT),O.iT=null)},q4C=function(O){O.L.fA()||O.qh||O.L.X2(O)},UK=function(O){MD6(O); g.rd(O.fm);O.fm=null;O.D.stop();O.B.removeAll();if(O.hx){var R=O.hx;O.hx=null;R.abort();R.dispose()}O.GQ&&(O.GQ=null)},kWo=function(O,R){try{O.L.sj(O,R),O.L.v2(4)}catch(J){}},bgs=function(O,R,J,l,u){if(l==0)J(!1); else{var F=u||0;l--;sJk(O,R,function(G){G?J(!0):g.YW.setTimeout(function(){bgs(O,R,J,l,F)},F)})}},sJk=function(O,R,J){var l=new Image; l.onload=function(){try{jx(l),J(!0)}catch(u){}}; l.onerror=function(){try{jx(l),J(!1)}catch(u){}}; l.onabort=function(){try{jx(l),J(!1)}catch(u){}}; l.ontimeout=function(){try{jx(l),J(!1)}catch(u){}}; g.YW.setTimeout(function(){if(l.ontimeout)l.ontimeout()},R); l.src=O},jx=function(O){O.onload=null; O.onerror=null;O.onabort=null;O.ontimeout=null},W3R=function(O){this.L=O; this.S=new Np},ASQ=function(O){var R=Qa(O.L,O.Nj,"/mail/images/cleardot.gif"); Rw(R);bgs(R.toString(),5E3,(0,g.iQ)(O.BF,O),3,2E3);O.v2(1)},evt=function(O){var R=O.L.j; R!=null?(Hc(5),R?(Hc(11),LW(O.L,O,!1)):(Hc(12),LW(O.L,O,!0))):(O.L$=new x1(O),O.L$.Kh=O.QH,R=O.L,R=Qa(R,R.j1()?O.HS:null,O.j_),Hc(5),Je(R,"TYPE","xmlhttp"),D$C(O.L$,R,!1,O.HS,!1))},Pqk=function(O,R,J){this.L=1; this.S=[];this.B=[];this.D=new Np;this.W=O||null;this.j=R!=null?R:null;this.V=J||!1},pu6=function(O,R){this.L=O; this.map=R;this.context=null},Bj6=function(O,R,J,l){g.n7.call(this,"timingevent",O); this.size=R;this.rtt=J;this.retries=l},HgR=function(O){g.n7.call(this,"serverreachability",O)},U$6=function(O){O.kF(1,0); O.Fl=Qa(O,null,O.yH);x$R(O)},jJR=function(O){O.xn&&(O.xn.abort(),O.xn=null); O.eQ&&(O.eQ.cancel(),O.eQ=null);O.GG&&(g.YW.clearTimeout(O.GG),O.GG=null);Y1(O);O.pL&&(O.pL.cancel(),O.pL=null);O.ws&&(g.YW.clearTimeout(O.ws),O.ws=null)},QJC=function(O,R){if(O.L==0)throw Error("Invalid operation: sending map when state is closed"); O.S.push(new pu6(O.z1++,R));O.L!=2&&O.L!=3||x$R(O)},L3Q=function(O){var R=0; O.eQ&&R++;O.pL&&R++;return R},x$R=function(O){O.pL||O.ws||(O.ws=pW((0,g.iQ)(O.fl,O),0),O.py=0)},hvC=function(O,R){if(O.L==1){if(!R){O.yZ=Math.floor(Math.random()*1E5); R=O.yZ++;var J=new x1(O,"",R);J.Kh=O.Rt;var l=Y4b(O),u=O.Fl.clone();g.CP(u,"RID",R);g.CP(u,"CVER","1");di(O,u);ES6(J,u,l);O.pL=J;O.L=2}}else O.L==3&&(R?d$4(O,R):O.S.length==0||O.pL||d$4(O))},d$4=function(O,R){if(R)if(O.P7>6){O.S=O.B.concat(O.S); O.B.length=0;var J=O.yZ-1;R=Y4b(O)}else J=R.J,R=R.Ch;else J=O.yZ++,R=Y4b(O);var l=O.Fl.clone();g.CP(l,"SID",O.N);g.CP(l,"RID",J);g.CP(l,"AID",O.NS);di(O,l);J=new x1(O,O.N,J,O.py+1);J.Kh=O.Rt;J.setTimeout(1E4+Math.round(1E4*Math.random()));O.pL=J;ES6(J,l,R)},di=function(O,R){O.Wf&&(O=O.Wf.SF())&&g.BR(O,function(J,l){g.CP(R,l,J)})},Y4b=function(O){var R=Math.min(O.S.length,1E3),J=["count="+R]; if(O.P7>6&&R>0){var l=O.S[0].L;J.push("ofs="+l)}else l=0;for(var u={},F=0;F=3)return!1; O.J++;O.GG=pW((0,g.iQ)(O.oZ,O),nSC(O,O.h6));O.h6++;return!0},LW=function(O,R,J){O.Pb=O.j==null?J:!O.j; O.aT=R.Ex;O.V||U$6(O)},Y1=function(O){O.c7!=null&&(g.YW.clearTimeout(O.c7),O.c7=null)},nSC=function(O,R){var J=5E3+Math.floor(Math.random()*1E4); O.isActive()||(J*=2);return J*R},he=function(O,R){if(R==2||R==9){var J=null; O.Wf&&(J=null);var l=(0,g.iQ)(O.q0d,O);J||(J=new g.lD("//www.google.com/images/cleardot.gif"),Rw(J));sJk(J.toString(),1E4,l)}else Hc(2);OrQ(O,R)},OrQ=function(O,R){O.L=0; O.Wf&&O.Wf.R5(R);RqM(O);jJR(O)},RqM=function(O){O.L=0; O.aT=-1;if(O.Wf)if(O.B.length==0&&O.S.length==0)O.Wf.IQ();else{var R=g.m4(O.B),J=g.m4(O.S);O.B.length=0;O.S.length=0;O.Wf.IQ(R,J)}},Qa=function(O,R,J){var l=g.rE(J); if(l.L!="")R&&g.Fh(l,R+"."+l.L),g.GR(l,l.B);else{var u=window.location;l=fDC(u.protocol,R?R+"."+u.hostname:u.hostname,+u.port,J)}O.xx&&g.BR(O.xx,function(F,G){g.CP(l,G,F)}); g.CP(l,"VER",O.P7);di(O,l);return l},J2C=function(){},g86=function(){this.L=[]; this.S=[]},ir6=function(O){g.n7.call(this,"channelMessage"); this.message=O},lZV=function(O){g.n7.call(this,"channelError"); this.error=O},ueb=function(O,R){this.action=O; this.params=R||{}},z6=function(O,R){g.p.call(this); this.L=new g.zR(this.Sdd,0,this);g.H(this,this.L);this.Wc=5E3;this.S=0;if(typeof O==="function")R&&(O=(0,g.iQ)(O,R));else if(O&&typeof O.handleEvent==="function")O=(0,g.iQ)(O.handleEvent,O);else throw Error("Invalid listener argument");this.B=O},FMC=function(O,R,J,l,u,F,G,y,w,I,C,r,t,Z){J=J===void 0?!1:J; l=l===void 0?function(){return""}:l; u=u===void 0?!1:u;F=F===void 0?!1:F;G=G===void 0?!1:G;y=y===void 0?function(){return g.$t({})}:y; w=w===void 0?!1:w;C=C===void 0?!1:C;r=r===void 0?!1:r;t=t===void 0?!1:t;Z=Z===void 0?!1:Z;this.Iu=O;this.SN=R;this.j=new g.X8;this.S=new z6(this.QFQ,this);this.L=null;this.J=!1;this.W=null;this.OQ="";this.Hq=this.V=0;this.B=[];this.w5=J;this.N1=l;this.D=F;this.Qh=y;this.xS=I;this.AT=G;this.iz=null;this.N=g.$t();this.d5=u;this.SG=w;this.fJ=C;this.sQ=r;this.mM=t;this.Rz=Z;this.Td=new KSo;this.JR=new yFR;this.KJ=new IDk;this.AR=new wW6;this.Gd=new Clo;this.zJ=new rFt;this.Py=new t8k},y2_=function(O, R,J,l,u){G$6(O); if(O.L){var F=g.YB("ID_TOKEN"),G=O.L.Rt||{};F?G["x-youtube-identity-token"]=F:delete G["x-youtube-identity-token"];O.L.Rt=G}KMC(O);l?(l.getState()!=3&&L3Q(l)==0||l.getState(),O.L.connect(R,J,O.SN,l.N,l.NS)):u?O.L.connect(R,J,O.SN,u.sessionId,u.arrayId):O.L.connect(R,J,O.SN)},r2Q=function(O,R){return O.mM?!0:O.sQ?Object.values(we6).includes(R):O.fJ?!Object.values(IZ_).includes(R):O.Rz?Object.values(Cd6).includes(R):!1},Zr4=function(O){var R,J; g.A(function(l){if(l.S==1)return g.E_(l,2),g.k(l,thI(O),2);g.M0(l);R=O.B;O.B=[];J=R.length;o8Q(O,R,J);nW(O);return g.kW(l,0)})},o8Q=function(O,R,J){for(var l=0;l0?J=Object.assign({},J,R):delete J.Authorization;O.L.Rt=J}},KMC=function(O){O.xS&&!O.D&&fZ_(O,O.xS())},cc=function(O){this.scheme="https"; this.port=this.domain="";this.L="/api/lounge";this.S=!0;O=O||document.location.href;var R=Number(g.ao(O)[4]||null)||"";R&&(this.port=":"+R);this.domain=g.vQ(O)||"";O=g.aW();O.search("MSIE")>=0&&(O=O.match(/MSIE ([\d.]+)/)[1],g.m2(O,"10.0")<0&&(this.S=!1))},OL=function(O,R){var J=O.L; O.S&&(J=O.scheme+"://"+O.domain+O.port+O.L);return g.s9(J+R,{})},SOM=function(O,R){g.tW.call(this); var J=this;this.Rj=O();this.Rj.subscribe("handlerOpened",this.Vy,this);this.Rj.subscribe("handlerClosed",this.onClosed,this);this.Rj.subscribe("handlerError",function(l,u){J.onError(u)}); this.Rj.subscribe("handlerMessage",this.onMessage,this);this.L=R},NHb=function(O,R,J){var l=this; J=J===void 0?function(){return""}:J; var u=u===void 0?new oSk:u;var F=F===void 0?new g.X8:F;this.pathPrefix=O;this.L=R;this.OQ=J;this.D=F;this.V=null;this.W=this.J=0;this.channel=null;this.j=0;this.B=new z6(function(){l.B.isActive();var G;((G=l.channel)==null?void 0:jU6((new fAt(G,G.L)).L.S))===0&&l.connect(l.V,l.J)}); this.N={};this.S={};this.SN=!1;this.logger=null;this.Hq=[];this.rS=void 0;this.Qh=new KSo;this.iz=new yFR;this.xS=new wW6;this.N1=new Clo},mdC=function(O){g.uM(O.channel,"m",function(){O.j=3; O.B.reset();O.V=null;O.J=0;for(var R=g.N(O.Hq),J=R.next();!J.done;J=R.next())J=J.value,O.channel&&O.channel.send(J);O.Hq=[];O.publish("webChannelOpened");O.Qh.Gh("WEB_CHANNEL")}); g.uM(O.channel,"n",function(){O.j=0;O.B.isActive()||O.publish("webChannelClosed");var R,J=(R=O.channel)==null?void 0:S4b(new fAt(R,R.L));J&&(O.Hq=[].concat(g.X(J)));O.iz.Gh("WEB_CHANNEL")}); g.uM(O.channel,"p",function(R){var J=R.data;J[0]==="gracefulReconnect"?(O.B.start(),O.channel&&O.channel.close()):O.publish("webChannelMessage",new ueb(J[0],J[1]));O.rS=R.statusCode;O.xS.Gh("WEB_CHANNEL")}); g.uM(O.channel,"o",function(){O.rS===401||O.B.start();O.publish("webChannelError");O.N1.Gh("WEB_CHANNEL","")})},E8_=function(O){var R=O.OQ(); R?O.N["x-youtube-lounge-xsrf-token"]=R:delete O.N["x-youtube-lounge-xsrf-token"]},Dd4=function(O){g.tW.call(this); this.L=O();this.L.subscribe("webChannelOpened",this.Ag,this);this.L.subscribe("webChannelClosed",this.onClosed,this);this.L.subscribe("webChannelError",this.onError,this);this.L.subscribe("webChannelMessage",this.onMessage,this)},aZQ=function(O,R,J,l,u){function F(){return new FMC(OL(O,"/bc"),R,!1,J,l)} J=J===void 0?function(){return""}:J; return g.S8("enable_mdx_web_channel_desktop")?new Dd4(function(){return new NHb(OL(O,"/wc"),R,J)}):new SOM(F,u)},$dM=function(){var O=v8R; Xe6();Rf.push(O);THo()},Ju=function(O,R){Xe6(); var J=Mhb(O,String(R));Rf.length==0?qOs(J):(THo(),g.e6(Rf,function(l){l(J)}))},gS=function(O){Ju("CP",O)},Xe6=function(){Rf||(Rf=g.hs("yt.mdx.remote.debug.handlers_")||[],g.dh("yt.mdx.remote.debug.handlers_",Rf))},qOs=function(O){var R=(iS+1)%50; iS=R;lS[R]=O;uS||(uS=R==49)},THo=function(){var O=Rf; if(lS[0]){var R=uS?iS:-1,J={};do J={u9:void 0},R=(R+1)%50,J.u9=lS[R],g.e6(O,function(l){return function(u){u(l.u9)}}(J)); while(R!=iS);lS=Array(50);iS=-1;uS=!1}},Mhb=function(O,R){var J=(Date.now()-k$_)/1E3; J.toFixed&&(J=J.toFixed(3));var l=[];l.push("[",J+"s","] ");l.push("[","yt.mdx.remote","] ");l.push(O+": "+R,"\n");return l.join("")},F2=function(O){g.y8.call(this); this.j=O;this.screens=[]},sAo=function(O,R){var J=O.get(R.uuid)||O.get(R.id); if(J)return O=J.name,J.id=R.id||J.id,J.name=R.name,J.token=R.token,J.uuid=R.uuid||J.uuid,J.name!=O;O.screens.push(R);return!0},brI=function(O,R){var J=O.screens.length!=R.length; O.screens=g.Ai(O.screens,function(F){return!!njo(R,F)}); for(var l=R.length,u=0;u0&&O.N0&&SM(O,J)},function(R){O.D=function(){}; O.Uc(R)})},y_C=function(O){var R={}; R.pairingCode=O.iz;R.theme=O.Iu;KpV()&&(R.env_useStageMdx=1);return g.ki(R)},wVR=function(O){return new Promise(function(R){O.iz=hNt(); if(O.Qh){var J=new chrome.cast.DialLaunchResponse(!0,y_C(O));R(J);KRb(O)}else O.SN=function(){g.ZD(O.W);O.SN=function(){}; O.W=NaN;var l=new chrome.cast.DialLaunchResponse(!0,y_C(O));R(l);KRb(O)},O.W=g.tF(function(){O.SN()},100)})},Cho=function(O,R,J){O.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(R)); var l=new KW(R);return(new Promise(function(u){IOC(O,l,function(F){F?(O.Hq=!0,CG(O.N,l),tu(O,l),SM(O,J)):g.zH(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(R)+" is not online."));u(F)},5)})).then(function(u){return u?new chrome.cast.DialLaunchResponse(!1):wVR(O)})},r_6=function(O,R){var J=O.V.receiver.label,l=O.S.friendlyName; return(new Promise(function(u){LMC(O.N,J,R,l,function(F){F&&F.token&&tu(O,F);u(F)},function(F){of(O,"Failed to get DIAL screen: "+F); u(null)})})).then(function(u){return u&&u.token?new chrome.cast.DialLaunchResponse(!1):wVR(O)})},IOC=function(O,R,J,l){g.ZD(O.j); O.j=0;dd4(O.N,R,function(u){u||l<0?J(u):O.j=g.tF(function(){IOC(O,R,J,l-1)},300)})},SM=function(O,R){O.info("getDialAppInfoWithTimeout_ "+R); fG(O)&&(g.ZD(O.J),O.J=0,R==0?tAb(O):O.J=g.tF(function(){tAb(O)},R))},tAb=function(O){fG(O)&&O.B.getDialAppInfo(function(R){O.info("getDialAppInfo dialLaunchData: "+JSON.stringify(R)); R=R.extraData||{};var J=null;if(R.loungeToken){var l;((l=O.L)==null?void 0:l.token)==R.loungeToken&&(J="staleLoungeToken")}else J="missingLoungeToken";J?(O.OQ=J,SM(O,3E4)):(O.Hq=!1,O.OQ="unknown",c26(O,R.loungeToken),SM(O,R.loungeTokenRefreshIntervalMs))},function(R){O.info("getDialAppInfo error: "+R); O.OQ="noLoungeTokenResponse";SM(O,3E4)})},o5C=function(O){g.ZD(O.j); O.j=0;g.ZD(O.J);O.J=0;O.D();O.D=function(){}; g.ZD(O.W)},Nl=function(O,R){rS.call(this,O,R,"ManualSession"); this.B=g.tF((0,g.iQ)(this.e6,this,null),150)},ma=function(O,R){g.y8.call(this); this.config_=R;this.S=O;this.V=R.appId||"233637DE";this.N=R.theme||"cl";this.W=R.disableCastApi||!1;this.j=R.forceMirroring||!1;this.L=null;this.J=!1;this.B=[];this.D=(0,g.iQ)(this.Qjq,this)},Z$V=function(O,R){return R?g.rC(O.B,function(J){return ya(R,J.label)},O):null},EL=function(O){Ju("Controller",O)},v8R=function(O){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(O)},Dx=function(O){return O.J||!!O.B.length||!!O.L},af=function(O,R,J){R!=O.L&&(g.rd(O.L),(O.L=R)?(J?O.publish("yt-remote-cast2-receiver-resumed", R.S):O.publish("yt-remote-cast2-receiver-selected",R.S),R.subscribe("sessionScreen",(0,g.iQ)(O.xg,O,R)),R.subscribe("sessionFailed",function(){return VA4(O,R)}),R.L?O.publish("yt-remote-cast2-session-change",R.L):J&&O.L.e6(null)):O.publish("yt-remote-cast2-session-change",null))},VA4=function(O,R){O.L==R&&O.publish("yt-remote-cast2-session-failed")},fOM=function(O){var R=O.S.Hj(),J=O.L&&O.L.S; O=g.jO(R,function(l){J&&ya(l,J.label)&&(J=null);var u=l.uuid?l.uuid:l.id,F=Z$V(this,l);F?(F.label=u,F.friendlyName=l.name):(F=new chrome.cast.Receiver(u,l.name),F.receiverType=chrome.cast.ReceiverType.CUSTOM);return F},O); J&&(J.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(J=new chrome.cast.Receiver(J.label,J.friendlyName),J.receiverType=chrome.cast.ReceiverType.CUSTOM),O.push(J));return O},v5s=function(O,R,J,l){l.disableCastApi?v9("Cannot initialize because disabled by Mdx config."):SZC()?NQV(R,l)&&(mf4(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?E56(O,J):(window.__onGCastApiAvailable=function(u,F){u?E56(O,J):(X2("Failed to load cast API: "+F),Df4(!1),mf4(!1),g.A6("yt-remote-cast-available"),g.A6("yt-remote-cast-receiver"), aOo(),J(!1))},l.loadCastApiSetupScript?g.K$("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?wfM()>=60&&S$k():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?tmI():wfM()>=89?mNC():(fSo(),fW(NZV.map(osV))))):v9("Cannot initialize because not running Chrome")},aOo=function(){v9("dispose"); var O=TD();O&&O.dispose();g.dh("yt.mdx.remote.cloudview.instance_",null);XVo(!1);g.FZ(TQI);TQI.length=0},$R=function(){return!!g.Wf("yt-remote-cast-installed")},$fV=function(){var O=g.Wf("yt-remote-cast-receiver"); return O?O.friendlyName:null},MAI=function(){v9("clearCurrentReceiver"); g.A6("yt-remote-cast-receiver")},qZt=function(){return $R()?TD()?TD().getCastSession():(X2("getCastSelector: Cast is not initialized."),null):(X2("getCastSelector: Cast API is not installed!"),null)},kT_=function(){$R()?TD()?Ml()?(v9("Requesting cast selector."),TD().requestSession()):(v9("Wait for cast API to be ready to request the session."),TQI.push(g.uh("yt-remote-cast2-api-ready",kT_))):X2("requestCastSelector: Cast is not initialized."):X2("requestCastSelector: Cast API is not installed!")}, ql=function(O,R){Ml()?TD().setConnectedScreenStatus(O,R):X2("setConnectedScreenStatus called before ready.")},SZC=function(){var O=g.aW().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.Wd||O},sVR=function(O,R){TD().init(O,R)},NQV=function(O,R){var J=!1; TD()||(O=new ma(O,R),O.subscribe("yt-remote-cast2-availability-change",function(l){g.bE("yt-remote-cast-available",l);Z6("yt-remote-cast2-availability-change",l)}),O.subscribe("yt-remote-cast2-receiver-selected",function(l){v9("onReceiverSelected: "+l.friendlyName); g.bE("yt-remote-cast-receiver",l);Z6("yt-remote-cast2-receiver-selected",l)}),O.subscribe("yt-remote-cast2-receiver-resumed",function(l){v9("onReceiverResumed: "+l.friendlyName); g.bE("yt-remote-cast-receiver",l);Z6("yt-remote-cast2-receiver-resumed",l)}),O.subscribe("yt-remote-cast2-session-change",function(l){v9("onSessionChange: "+wi(l)); l||g.A6("yt-remote-cast-receiver");Z6("yt-remote-cast2-session-change",l)}),g.dh("yt.mdx.remote.cloudview.instance_",O),J=!0); v9("cloudview.createSingleton_: "+J);return J},TD=function(){return g.hs("yt.mdx.remote.cloudview.instance_")},E56=function(O,R){Df4(!0); mf4(!1);sVR(O,function(J){J?(XVo(!0),g.GT("yt-remote-cast2-api-ready")):(X2("Failed to initialize cast API."),Df4(!1),g.A6("yt-remote-cast-available"),g.A6("yt-remote-cast-receiver"),aOo());R(J)})},v9=function(O){Ju("cloudview",O)},X2=function(O){Ju("cloudview",O)},Df4=function(O){v9("setCastInstalled_ "+O); g.bE("yt-remote-cast-installed",O)},Ml=function(){return!!g.hs("yt.mdx.remote.cloudview.apiReady_")},XVo=function(O){v9("setApiReady_ "+O); g.dh("yt.mdx.remote.cloudview.apiReady_",O)},mf4=function(O){g.dh("yt.mdx.remote.cloudview.initializing_",O)},kR=function(O){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.j=this.J=0;this.trackData=null;this.rB=this.u7=!1;this.V=this.D=this.L=this.N=0;this.B=NaN;this.S=!1;this.reset(O)},b$b=function(O){O.audioTrackId=null; O.trackData=null;O.playerState=-1;O.u7=!1;O.rB=!1;O.J=0;O.j=g.Fk();O.N=0;O.L=0;O.D=0;O.V=0;O.B=NaN;O.S=!1},sL=function(O){return O.isPlaying()?(g.Fk()-O.j)/1E3:0},bS=function(O,R){O.J=R; O.j=g.Fk()},W9=function(O){switch(O.playerState){case 1:case 1081:return(g.Fk()-O.j)/1E3+O.J; case -1E3:return 0}return O.J},Au=function(O,R,J){var l=O.videoId; O.videoId=R;O.index=J;R!=l&&b$b(O)},WRQ=function(O){var R={}; R.index=O.index;R.listId=O.listId;R.videoId=O.videoId;R.playerState=O.playerState;R.volume=O.volume;R.muted=O.muted;R.audioTrackId=O.audioTrackId;R.trackData=g.Jx(O.trackData);R.hasPrevious=O.u7;R.hasNext=O.rB;R.playerTime=O.J;R.playerTimeAt=O.j;R.seekableStart=O.N;R.seekableEnd=O.L;R.duration=O.D;R.loadedTime=O.V;R.liveIngestionTime=O.B;return R},P9=function(O,R){g.y8.call(this); var J=this;this.B=0;this.N=O;this.j=[];this.D=new g86;this.S=this.L=null;this.W=(0,g.iQ)(this.m9z,this);this.J=(0,g.iQ)(this.zX,this);this.V=(0,g.iQ)(this.kJ1,this);this.SN=(0,g.iQ)(this.lAJ,this);var l=0;O?(l=O.getProxyState(),l!=3&&(O.subscribe("proxyStateChange",this.H6,this),A_C(this))):l=3;l!=0&&(R?this.H6(l):g.tF(function(){J.H6(l)},0)); (O=qZt())&&eM(this,O);this.subscribe("yt-remote-cast2-session-change",this.SN)},pG=function(O){return new kR(O.N.getPlayerContextData())},A_C=function(O){g.e6("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(R){this.j.push(this.N.subscribe(R,g.uQ(this.NOS,R),this))},O)},euM=function(O){g.e6(O.j,function(R){this.N.unsubscribeByKey(R)},O); O.j.length=0},B9=function(O){return O.getState()==1},H9=function(O,R){var J=O.D; J.L.length+J.S.length<50&&O.D.enqueue(R)},Ph6=function(O,R,J){var l=pG(O); bS(l,J);l.playerState!=-1E3&&(l.playerState=R);xR(O,l)},UL=function(O,R,J){O.N.sendMessage(R,J)},xR=function(O,R){euM(O); O.N.setPlayerContextData(WRQ(R));A_C(O)},eM=function(O,R){O.S&&(O.S.removeUpdateListener(O.W),O.S.removeMediaListener(O.J),O.zX(null)); O.S=R;O.S&&(gS("Setting cast session: "+O.S.sessionId),O.S.addUpdateListener(O.W),O.S.addMediaListener(O.J),O.S.media.length&&O.zX(O.S.media[0]))},pVI=function(O){var R=O.L.media,J=O.L.customData; if(R&&J){var l=pG(O);R.contentId!=l.videoId&&gS("Cast changing video to: "+R.contentId);l.videoId=R.contentId;l.playerState=J.playerState;bS(l,O.L.getEstimatedTime());xR(O,l)}else gS("No cast media video. Ignoring state update.")},jM=function(O,R,J){return(0,g.iQ)(function(l){this.pA("Failed to "+R+" with cast v2 channel. Error code: "+l.code); l.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.pA("Retrying "+R+" using MDx browser channel."),UL(this,R,J))},O)},YR=function(O,R,J,l){l=l===void 0?!1:l; g.y8.call(this);var u=this;this.j=NaN;this.iz=!1;this.W=this.V=this.Hq=this.OQ=NaN;this.SN=[];this.D=this.J=this.N=this.L=this.S=null;this.Qh=O;this.xS=l;this.SN.push(g.E$(window,"beforeunload",function(){u.L9(2)})); this.B=[];this.L=new kR;this.Iu=R.id;this.N1=R.idType;this.S=aZQ(this.Qh,J,this.Bj,this.N1=="shortLived",this.Iu);this.S.listen("channelOpened",function(){BQC(u)}); this.S.listen("channelClosed",function(){Q4("Channel closed");isNaN(u.j)?te(!0):te();u.dispose()}); this.S.listen("channelError",function(F){te();isNaN(u.Dt())?(F==1&&u.N1=="shortLived"&&u.publish("browserChannelAuthError",F),Q4("Channel error: "+F+" without reconnection"),u.dispose()):(u.iz=!0,Q4("Channel error: "+F+" with reconnection in "+u.Dt()+" ms"),LG(u,2))}); this.S.listen("channelMessage",function(F){H$k(u,F)}); this.S.Kd(R.token);this.subscribe("remoteQueueChange",function(){var F=u.L.videoId;g.em()&&g.bE("yt-remote-session-video-id",F)})},xf4=function(O){return g.rC(O.B,function(R){return R.type=="LOUNGE_SCREEN"})},Q4=function(O){Ju("conn",O)},LG=function(O,R){O.publish("proxyStateChange",R)},UfR=function(O){O.j=g.tF(function(){Q4("Connecting timeout"); O.L9(1)},2E4)},jVo=function(O){g.ZD(O.j); O.j=NaN},QVk=function(O){g.ZD(O.OQ); O.OQ=NaN},YZo=function(O){LRM(O); O.Hq=g.tF(function(){dS(O,"getNowPlaying")},2E4)},LRM=function(O){g.ZD(O.Hq); O.Hq=NaN},BQC=function(O){Q4("Channel opened"); O.iz&&(O.iz=!1,QVk(O),O.OQ=g.tF(function(){Q4("Timing out waiting for a screen.");O.L9(1)},15E3))},huC=function(O,R){var J=null; if(R){var l=xf4(O);l&&(J={clientName:l.clientName,deviceMake:l.brand,deviceModel:l.model,osVersion:l.osVersion})}g.dh("yt.mdx.remote.remoteClient_",J);R&&(jVo(O),QVk(O));J=O.S.XN()&&isNaN(O.j);R==J?R&&(LG(O,1),dS(O,"getSubtitlesTrack")):R?(O.Qt()&&O.L.reset(),LG(O,1),dS(O,"getNowPlaying"),dfM(O)):O.L9(1)},zuQ=function(O,R){var J=R.params.videoId; delete R.params.videoId;J==O.L.videoId&&(g.nt(R.params)?O.L.trackData=null:O.L.trackData=R.params,O.publish("remotePlayerChange"))},n56=function(O,R,J){var l=R.params.videoId||R.params.video_id,u=parseInt(R.params.currentIndex,10); O.L.listId=R.params.listId||O.L.listId;Au(O.L,l,u);O.publish("remoteQueueChange",J)},ON6=function(O,R){R.params=R.params||{}; n56(O,R,"NOW_PLAYING_MAY_CHANGE");c_R(O,R);O.publish("autoplayDismissed")},c_R=function(O,R){var J=parseInt(R.params.currentTime||R.params.current_time,10); bS(O.L,isNaN(J)?0:J);J=parseInt(R.params.state,10);J=isNaN(J)?-1:J;J==-1&&O.L.playerState==-1E3&&(J=-1E3);O.L.playerState=J;J=Number(R.params.loadedTime);O.L.V=isNaN(J)?0:J;O.L.SA(Number(R.params.duration));J=O.L;var l=Number(R.params.liveIngestionTime);J.B=l;J.S=isNaN(l)?!1:!0;J=O.L;l=Number(R.params.seekableStartTime);R=Number(R.params.seekableEndTime);J.N=isNaN(l)?0:l;J.L=isNaN(R)?0:R;O.L.playerState==1?YZo(O):LRM(O);O.publish("remotePlayerChange")},REV=function(O,R){if(O.L.playerState!=-1E3){var J= 1085; switch(parseInt(R.params.adState,10)){case 1:J=1081;break;case 2:J=1084;break;case 0:J=1083}O.L.playerState=J;R=parseInt(R.params.currentTime,10);bS(O.L,isNaN(R)?0:R);O.publish("remotePlayerChange")}},JaV=function(O,R){var J=R.params.muted=="true"; O.L.volume=parseInt(R.params.volume,10);O.L.muted=J;O.publish("remotePlayerChange")},gUC=function(O,R){O.J=R.params.videoId; O.publish("nowAutoplaying",parseInt(R.params.timeout,10))},iNQ=function(O,R){O.J=R.params.videoId||null; O.publish("autoplayUpNext",O.J)},lg_=function(O,R){O.D=R.params.autoplayMode; O.publish("autoplayModeChange",O.D);O.D=="DISABLED"&&O.publish("autoplayDismissed")},u5t=function(O,R){var J=R.params.hasNext=="true"; O.L.u7=R.params.hasPrevious=="true";O.L.rB=J;O.publish("previousNextChange")},H$k=function(O,R){R=R.message; R.params?Q4("Received: action="+R.action+", params="+g.Uf(R.params)):Q4("Received: action="+R.action+" {}");switch(R.action){case "loungeStatus":R=gi(R.params.devices);O.B=g.jO(R,function(l){return new G6(l)}); R=!!g.rC(O.B,function(l){return l.type=="LOUNGE_SCREEN"}); huC(O,R);R=O.yG("mlm");O.publish("multiStateLoopEnabled",R);break;case "loungeScreenDisconnected":g.S6(O.B,function(l){return l.type=="LOUNGE_SCREEN"}); huC(O,!1);break;case "remoteConnected":var J=new G6(gi(R.params.device));g.rC(O.B,function(l){return l.equals(J)})||lDQ(O.B,J); break;case "remoteDisconnected":J=new G6(gi(R.params.device));g.S6(O.B,function(l){return l.equals(J)}); break;case "gracefulDisconnect":break;case "playlistModified":n56(O,R,"QUEUE_MODIFIED");break;case "nowPlaying":ON6(O,R);break;case "onStateChange":c_R(O,R);break;case "onAdStateChange":REV(O,R);break;case "onVolumeChanged":JaV(O,R);break;case "onSubtitlesTrackChanged":zuQ(O,R);break;case "nowAutoplaying":gUC(O,R);break;case "autoplayDismissed":O.publish("autoplayDismissed");break;case "autoplayUpNext":iNQ(O,R);break;case "onAutoplayModeChanged":lg_(O,R);break;case "onHasPreviousNextChanged":u5t(O, R);break;case "requestAssistedSignIn":O.publish("assistedSignInRequested",R.params.authCode);break;case "onLoopModeChanged":O.publish("loopModeChange",R.params.loopMode);break;default:Q4("Unrecognized action: "+R.action)}},dfM=function(O){g.ZD(O.W); O.W=g.tF(function(){O.L9(1)},864E5)},dS=function(O,R,J){J?Q4("Sending: action="+R+", params="+g.Uf(J)):Q4("Sending: action="+R); O.S.sendMessage(R,J)},FKb=function(O){F2.call(this,"ScreenServiceProxy"); this.NK=O;this.L=[];this.L.push(this.NK.$_s("screenChange",(0,g.iQ)(this.RH,this)));this.L.push(this.NK.$_s("onlineScreenChange",(0,g.iQ)(this.D71,this)))},Igo=function(O,R){Gv6(); if(!ow||!ow.get("yt-remote-disable-remote-module-for-dev")){R=g.YB("MDX_CONFIG")||R;cFR();gs4();hu||(hu=new cc(R?R.loungeApiHost:void 0),KpV()&&(hu.L="/api/loungedev"));zD||(zD=g.hs("yt.mdx.remote.deferredProxies_")||[],g.dh("yt.mdx.remote.deferredProxies_",zD));GNk();var J=nG();if(!J){var l=new If(hu,R?R.disableAutomaticScreenCache||!1:!1);g.dh("yt.mdx.remote.screenService_",l);J=nG();var u={};R&&(u={appId:R.appId,disableDial:R.disableDial,theme:R.theme,loadCastApiSetupScript:R.loadCastApiSetupScript, disableCastApi:R.disableCastApi,enableDialLoungeToken:R.enableDialLoungeToken,enableCastLoungeToken:R.enableCastLoungeToken,forceMirroring:R.forceMirroring});g.dh("yt.mdx.remote.enableConnectWithInitialState_",R?R.enableConnectWithInitialState||!1:!1);v5s(O,l,function(F){F?c9()&&ql(c9(),"YouTube TV"):l.subscribe("onlineScreenChange",function(){Z6("yt-remote-receiver-availability-change")})},u)}R&&!g.hs("yt.mdx.remote.initialized_")&&(g.dh("yt.mdx.remote.initialized_",!0),Ob("Initializing: "+g.Uf(R)), R0.push(g.uh("yt-remote-cast2-api-ready",function(){Z6("yt-remote-api-ready")})),R0.push(g.uh("yt-remote-cast2-availability-change",function(){Z6("yt-remote-receiver-availability-change")})),R0.push(g.uh("yt-remote-cast2-receiver-selected",function(){J5(null); Z6("yt-remote-auto-connect","cast-selector-receiver")})),R0.push(g.uh("yt-remote-cast2-receiver-resumed",function(){Z6("yt-remote-receiver-resumed","cast-selector-receiver")})),R0.push(g.uh("yt-remote-cast2-session-change",KKt)),R0.push(g.uh("yt-remote-connection-change",function(F){F?ql(c9(),"YouTube TV"):g0()||(ql(null,null),MAI())})),R0.push(g.uh("yt-remote-cast2-session-failed",function(){Z6("yt-remote-connection-failed")})),O=ya6(),R.isAuto&&(O.id+="#dial"),u=R.capabilities||[],g.S8("desktop_enable_autoplay")&& u.push("atp"),u.length>0&&(O.capabilities=u),O.name=R.device,O.app=R.app,(R=R.theme)&&(O.theme=R),Ob(" -- with channel params: "+g.Uf(O)),O?(g.bE("yt-remote-session-app",O.app),g.bE("yt-remote-session-name",O.name)):(g.A6("yt-remote-session-app"),g.A6("yt-remote-session-name")),g.dh("yt.mdx.remote.channelParams_",O),J.start(),c9()||wM4())}},CVR=function(){var O=nG().NK.$_gos(); var R=it();R&<()&&(njo(O,R)||O.push(R));return zN_(O)},trb=function(){var O=ra6(); !O&&$R()&&$fV()&&(O={key:"cast-selector-receiver",name:$fV()});return O},ra6=function(){var O=CVR(),R=it(); R||(R=g0());return g.rC(O,function(J){return R&&ya(R,J.key)?!0:!1})},it=function(){var O=c9(); if(!O)return null;var R=nG().vP();return Iw(R,O)},KKt=function(O){Ob("remote.onCastSessionChange_: "+wi(O)); if(O){var R=it();if(R&&R.id==O.id){if(ql(R.id,"YouTube TV"),O.idType=="shortLived"&&(O=O.token))ut&&(ut.token=O),(R=lt())&&R.Kd(O)}else R&&Fz(),G7(O,1)}else lt()&&Fz()},Fz=function(){Ml()?TD().stopSession():X2("stopSession called before API ready."); var O=lt();O&&(O.disconnect(1),oU6(null))},ZN6=function(){var O=lt(); return!!O&&O.getProxyState()!=3},Ob=function(O){Ju("remote",O)},nG=function(){if(!Vr4){var O=g.hs("yt.mdx.remote.screenService_"); Vr4=O?new FKb(O):null}return Vr4},c9=function(){return g.hs("yt.mdx.remote.currentScreenId_")},fgR=function(O){g.dh("yt.mdx.remote.currentScreenId_",O)},Sik=function(){return g.hs("yt.mdx.remote.connectData_")},J5=function(O){g.dh("yt.mdx.remote.connectData_",O)},lt=function(){return g.hs("yt.mdx.remote.connection_")},oU6=function(O){var R=lt(); J5(null);O||fgR("");g.dh("yt.mdx.remote.connection_",O);zD&&(g.e6(zD,function(J){J(O)}),zD.length=0); R&&!O?Z6("yt-remote-connection-change",!1):!R&&O&&Z6("yt-remote-connection-change",!0)},g0=function(){var O=g.em(); if(!O)return null;var R=nG();if(!R)return null;R=R.vP();return Iw(R,O)},G7=function(O,R){c9(); it()&&it();if(K0)ut=O;else{fgR(O.id);var J=g.hs("yt.mdx.remote.enableConnectWithInitialState_")||!1;O=new YR(hu,O,ya6(),J);O.connect(R,Sik());O.subscribe("beforeDisconnect",function(l){Z6("yt-remote-before-disconnect",l)}); O.subscribe("beforeDispose",function(){lt()&&(lt(),oU6(null))}); O.subscribe("browserChannelAuthError",function(){var l=it();l&&l.idType=="shortLived"&&(Ml()?TD().handleBrowserChannelAuthError():X2("refreshLoungeToken called before API ready."))}); oU6(O)}},wM4=function(){var O=g0(); O?(Ob("Resume connection to: "+wi(O)),G7(O,0)):(te(),MAI(),Ob("Skipping connecting because no session screen found."))},GNk=function(){var O=ya6(); if(g.nt(O)){O=ri();var R=g.Wf("yt-remote-session-name")||"",J=g.Wf("yt-remote-session-app")||"";O={device:"REMOTE_CONTROL",id:O,name:R,app:J,mdxVersion:3};O.authuser=String(g.YB("SESSION_INDEX","0"));(R=g.YB("DELEGATED_SESSION_ID"))&&(O.pageId=String(R));g.dh("yt.mdx.remote.channelParams_",O)}},ya6=function(){return g.hs("yt.mdx.remote.channelParams_")||{}},EU4=function(O,R,J){g.p.call(this); var l=this;this.L=O;this.X=R;this.OZ=J;this.events=new g.p8(this);this.D=!1;this.j=new g.GP(64);this.S=new g.zR(this.Ou,500,this);this.B=new g.zR(this.bJ,1E3,this);this.V=new Sx(this.A1g,0,this);this.N={};this.W=new g.zR(this.gZ,1E3,this);this.J=new g.RP(this.seekTo,1E3,this);this.SN=this.events.U(this.X,"onVolumeChange",function(u){Nw6(l,u)}); g.H(this,this.events);this.events.U(R,"onCaptionsTrackListChanged",this.BzR);this.events.U(R,"captionschanged",this.GJ1);this.events.U(R,"captionssettingschanged",this.qL);this.events.U(R,"videoplayerreset",this.LM);this.events.U(R,"mdxautoplaycancel",function(){l.OZ.Jb()}); R.Z("enable_mdx_video_play_directly")&&this.events.U(R,"videodatachange",function(){mPM(l.L)||yR(l)||w0(l,0)}); O=this.OZ;O.jN();O.subscribe("proxyStateChange",this.QW,this);O.subscribe("remotePlayerChange",this.Ce,this);O.subscribe("remoteQueueChange",this.LM,this);O.subscribe("previousNextChange",this.hL,this);O.subscribe("nowAutoplaying",this.HN,this);O.subscribe("autoplayDismissed",this.z9,this);g.H(this,this.S);g.H(this,this.B);g.H(this,this.V);g.H(this,this.W);g.H(this,this.J);this.qL();this.LM();this.Ce()},Nw6=function(O,R){if(yR(O)){O.OZ.unsubscribe("remotePlayerChange",O.Ce,O); var J=Math.round(R.volume);R=!!R.muted;var l=pG(O.OZ);if(J!==l.volume||R!==l.muted)O.OZ.setVolume(J,R),O.W.start();O.OZ.subscribe("remotePlayerChange",O.Ce,O)}},DPo=function(O){O.v3(0); O.S.stop();O.H3(new g.GP(64))},agM=function(O,R){if(yR(O)&&!O.D){var J=null; R&&(J={style:O.X.getSubtitlesUserSettings()},Object.assign(J,R));O.OZ.OY(O.X.getVideoData(1).videoId,J);O.N=g.e(pG(O.OZ).trackData)}},w0=function(O,R){var J=O.X.getPlaylist(); if(J==null?0:J.listId){var l=J.index;var u=J.listId.toString()}J=O.X.getVideoData(1);O.OZ.playVideo(J.videoId,R,l,u,J.playerParams,J.AR,i__(J));O.H3(new g.GP(1))},vUo=function(O,R){if(R){var J=O.X.getOption("captions","tracklist",{wL:1}); J&&J.length?(O.X.setOption("captions","track",R),O.D=!1):(O.X.loadModule("captions"),O.D=!0)}else O.X.setOption("captions","track",{})},yR=function(O){return pG(O.OZ).videoId===O.X.getVideoData(1).videoId},XMV=function(O){this.L=O},I0=function(){g.L.call(this,{Y:"div", G:"ytp-mdx-popup-dialog",C:{role:"dialog"},K:[{Y:"div",G:"ytp-mdx-popup-dialog-inner-content",K:[{Y:"div",G:"ytp-mdx-popup-title",FQ:"No has iniciado sesi\u00f3n"},{Y:"div",G:"ytp-mdx-popup-description",FQ:"Los v\u00eddeos que veas podr\u00edan aparecer en el historial de reproducciones de la TV e influir en las recomendaciones. Puedes evitarlo si cancelas e inicias sesi\u00f3n en YouTube desde tu ordenador."},{Y:"div",G:"ytp-mdx-privacy-popup-buttons",K:[{Y:"button",q1:["ytp-button","ytp-mdx-privacy-popup-cancel"], FQ:"Cancelar"},{Y:"button",q1:["ytp-button","ytp-mdx-privacy-popup-confirm"],FQ:"Confirmar"}]}]}]});this.fade=new g.iz(this,250);this.cancelButton=this.Bq("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.Bq("ytp-mdx-privacy-popup-confirm");g.H(this,this.fade);this.U(this.cancelButton,"click",this.L);this.U(this.confirmButton,"click",this.S)},C0=function(O){g.L.call(this,{Y:"div", G:"ytp-remote",K:[{Y:"div",G:"ytp-remote-display-status",K:[{Y:"div",G:"ytp-remote-display-status-icon",K:[g.F3z()]},{Y:"div",G:"ytp-remote-display-status-text",FQ:"{{statustext}}"}]}]});this.api=O;this.fade=new g.iz(this,250);g.H(this,this.fade);this.U(O,"presentingplayerstatechange",this.onStateChange);this.UZ(O.getPlayerStateObject())},r0=function(O,R){g.kf.call(this,"Reproducir en",1,O,R); this.X=O;this.fH={};this.U(O,"onMdxReceiversChange",this.N);this.U(O,"presentingplayerstatechange",this.N);this.N()},Tws=function(O){g.tN.call(this,O); this.Z2={key:hNt(),name:"Este ordenador"};this.wY=null;this.subscriptions=[];this.Fa=this.OZ=null;this.fH=[this.Z2];this.IX=this.Z2;this.QI=new g.GP(64);this.UK=0;this.iS=-1;this.BB=!1;this.ac=this.un=this.MW=null;if(!g.Aj(this.player.T())&&!g.p9(this.player.T())){O=this.player;var R=g.oI(O);R&&(R=R.jo())&&(R=new r0(O,R),g.H(this,R));R=new C0(O);g.H(this,R);g.bR(O,R.element,4);this.MW=new I0;g.H(this,this.MW);g.bR(O,this.MW.element,4);this.BB=!!g0()}},t5=function(O){O.un&&(O.player.removeEventListener("presentingplayerstatechange", O.un),O.un=null)},$PC=function(O,R,J){O.QI=J; O.player.publish("presentingplayerstatechange",new g.tT(J,R))},o0=function(O,R){if(R.key!==O.IX.key)if(R.key===O.Z2.key)Fz(); else if(mPM(O)&&Mrs(O),O.IX=R,!O.player.T().Z("disable_mdx_connection_in_mdx_module_for_music_web")||!g.p9(O.player.T())){var J=O.player.getPlaylistId();var l=O.player.getVideoData(1);var u=l.videoId;if(!J&&!u||(O.player.getAppState()===2||O.player.getAppState()===1)&&O.player.T().Z("should_clear_video_data_on_player_cued_unstarted"))l=null;else{var F=O.player.getPlaylist();if(F){var G=[];for(var y=0;y2*this.size&&FA(this),!0):!1}; g.f.get=function(O,R){return l_(this.S,O)?this.S[O]:R}; g.f.set=function(O,R){l_(this.S,O)||(this.size+=1,this.L.push(O),this.GD++);this.S[O]=R}; g.f.forEach=function(O,R){for(var J=this.kz(),l=0;l=l.L.length)return g.KB;var F=l.L[R++];return g.kl(O?F:l.S[F])}; return u}; var aD6={F9N:"atp",ml1:"ska",gzU:"que",hBX:"mus",Ulu:"sus",CVq:"dsp",QoU:"seq",Hxd:"mic",HLQ:"dpa",NRg:"cds",BY1:"mlm",g7z:"dsdtr",jt1:"ntb",xdQ:"vsp",YOz:"scn",HsQ:"rpe",fQQ:"dcn",RZQ:"dcp",zBJ:"pas",n7X:"drq",r4S:"opf",NUN:"els",pQh:"isg",ycS:"svq",ixd:"mvp",u8d:"ads",CZQ:"stcp",rcS:"sads",Lfz:"dloc"},j9b={v51:"u",Ded:"cl",kVQ:"k",wPg:"i",K9d:"cr",pIS:"m",aHN:"g",J9:"up"},we6={jn:"adPlaying",Qm:"onAdStateChange"},IZ_={y4S:"nowPlaying",dPz:"onStateChange",jn:"adPlaying",Qm:"onAdStateChange",YG:"nowPlayingShorts", Xu:"onShortsStateChange"},Cd6={YG:"nowPlayingShorts",Xu:"onShortsStateChange"};G6.prototype.equals=function(O){return O?this.id==O.id:!1}; var J6C="",ow=null;y6R.prototype.flush=function(O,R){O=O===void 0?[]:O;R=R===void 0?!1:R;if(g.S8("enable_client_streamz_web")){O=g.N(O);for(var J=O.next();!J.done;J=O.next())J=g.OD2(J.value),J={serializedIncrementBatch:g.RK(J.S())},g.wj("streamzIncremented",J,{sendIsolatedPayload:R})}}; var Va,Vmt=ISM("loadCastFramework")||ISM("loadCastApplicationFramework"),NZV=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.y6(Sx,g.p);g.f=Sx.prototype;g.f.IV=function(O){this.N=arguments;this.L=!1;this.GR?this.B=g.Fk()+this.Wc:this.GR=g.pE(this.D,this.Wc)}; g.f.stop=function(){this.GR&&(g.YW.clearTimeout(this.GR),this.GR=null);this.B=null;this.L=!1;this.N=[]}; g.f.pause=function(){++this.S}; g.f.resume=function(){this.S&&(--this.S,!this.S&&this.L&&(this.L=!1,this.j.apply(null,this.N)))}; g.f.eN=function(){this.stop();Sx.gS.eN.call(this)}; g.f.DW=function(){this.GR&&(g.YW.clearTimeout(this.GR),this.GR=null);this.B?(this.GR=g.pE(this.D,this.B-g.Fk()),this.B=null):this.S?this.L=!0:(this.L=!1,this.j.apply(null,this.N))};Np.prototype.stringify=function(O){return g.YW.JSON.stringify(O,void 0)}; Np.prototype.parse=function(O){return g.YW.JSON.parse(O,void 0)};g.y6(EsR,g.n7);g.y6(DNo,g.n7);var aSI=null;g.y6(Xf4,g.n7);g.y6(TZ6,g.n7);g.y6($N6,g.n7);aw.prototype.debug=function(){}; aw.prototype.info=function(){}; aw.prototype.warning=function(){};var ePs={},A66={};g.f=vc.prototype;g.f.setTimeout=function(O){this.KJ=O}; g.f.Jg=function(O){O=O.target;var R=this.Gd;R&&g.hW(O)==3?R.bM():this.kc(O)}; g.f.kc=function(O){try{if(O==this.L)a:{var R=g.hW(this.L),J=this.L.S,l=this.L.getStatus();if(!(R<3)&&(R!=3||this.L&&(this.S.S||g.nE(this.L)||g.ch(this.L)))){this.xS||R!=4||J==7||(J==8||l<=0?mm(3):mm(2));BZk(this);var u=this.L.getStatus();this.Rz=u;var F=WpQ(this);if(this.j=u==200){if(this.SG&&!this.JR){b:{if(this.L){var G=g.On(this.L,"X-HTTP-Initial-Response");if(G&&!g.oW(G)){var y=G;break b}}y=null}if(O=y)this.JR=!0,hP6(this,O);else{this.j=!1;this.D=3;EK(12);T6(this);$1(this);break a}}if(this.N1){O= !0;for(var w;!this.xS&&this.J0&&!this.w5&&(this.w5=!0,this.B.u3(this)):(T6(this),$1(this))}else hP6(this,F);R==4&&T6(this);this.j&&!this.xS&&(R==4?HaQ(this.B,this):(this.j=!1,XA(this)))}else g.EGs(this.L),u==400&&F.indexOf("Unknown SID")> 0?(this.D=3,EK(12)):(this.D=0,EK(13)),T6(this),$1(this)}}}catch(I){}finally{}}; g.f.cancel=function(){this.xS=!0;T6(this)}; g.f.ZW=function(){this.SN=null;var O=Date.now();O-this.sQ>=0?(this.Iu!=2&&(mm(3),EK(17)),T6(this),this.D=2,$1(this)):pfb(this,this.sQ-O)}; g.f.getLastError=function(){return this.D}; g.f.De=function(){return this.L};ns_.prototype.cancel=function(){this.B=OgM(this);if(this.S)this.S.cancel(),this.S=null;else if(this.L&&this.L.size!==0){for(var O=g.N(this.L.values()),R=O.next();!R.done;R=O.next())R.value.cancel();this.L.clear()}};g.f=lAt.prototype;g.f.zF=8;g.f.s0=1;g.f.connect=function(O,R,J,l){EK(0);this.d5=O;this.xS=R||{};J&&l!==void 0&&(this.xS.OSID=J,this.xS.OAID=l);this.JR=this.mM;this.Qh=Lp6(this,null,this.d5);sK(this)}; g.f.disconnect=function(){F3_(this);if(this.s0==3){var O=this.AR++,R=this.Qh.clone();g.CP(R,"SID",this.N);g.CP(R,"RID",O);g.CP(R,"TYPE","terminate");Ae(this,R);O=new vc(this,this.N,O);O.Iu=2;O.V=Rw(R.clone());R=!1;if(g.YW.navigator&&g.YW.navigator.sendBeacon)try{R=g.YW.navigator.sendBeacon(O.V.toString(),"")}catch(J){}!R&&g.YW.Image&&((new Image).src=O.V,R=!0);R||(O.L=sU4(O.B,null),O.L.send(O.V));O.OQ=Date.now();XA(O)}Cqk(this)}; g.f.fA=function(){return this.s0==0}; g.f.getState=function(){return this.s0}; g.f.Vf=function(O){if(this.j)if(this.j=null,this.s0==1){if(!O){this.AR=Math.floor(Math.random()*1E5);O=this.AR++;var R=new vc(this,"",O),J=this.W;this.Rz&&(J?(J=g.RW(J),g.gY(J,this.Rz)):J=this.Rz);this.J!==null||this.sQ||(R.Qh=J,J=null);var l;if(this.fJ)a:{for(var u=l=0;u4096){l=u;break a}if(l===4096||u===this.B.length-1){l=u+1;break a}}l= 1E3}else l=1E3;l=ySk(this,R,l);u=this.Qh.clone();g.CP(u,"RID",O);g.CP(u,"CVER",22);this.N1&&g.CP(u,"X-HTTP-Session-Id",this.N1);Ae(this,u);J&&(this.sQ?l="headers="+g.r7(g.B2A(J))+"&"+l:this.J&&g.Zj(u,this.J,J));QUR(this.S,R);this.Ie&&g.CP(u,"TYPE","init");this.fJ?(g.CP(u,"$req",l),g.CP(u,"SID","null"),R.SG=!0,kvI(R,u,null)):kvI(R,u,l);this.s0=2}}else this.s0==3&&(O?wuQ(this,O):this.B.length==0||c6R(this.S)||wuQ(this))}; g.f.lO=function(){this.V=null;IAk(this);if(this.zJ&&!(this.KJ||this.L==null||this.Y9<=0)){var O=2*this.Y9;this.iz=D6((0,g.iQ)(this.EHQ,this),O)}}; g.f.EHQ=function(){this.iz&&(this.iz=null,this.JR=!1,this.KJ=!0,EK(10),qp(this),IAk(this))}; g.f.u3=function(O){this.L==O&&this.zJ&&!this.KJ&&(uIk(this),this.KJ=!0,EK(11))}; g.f.aV=function(){this.SN!=null&&(this.SN=null,qp(this),UNk(this),EK(19))}; g.f.Q8z=function(O){O?EK(2):EK(1)}; g.f.isActive=function(){return!!this.D&&this.D.isActive(this)}; g.f=tDI.prototype;g.f.Cl=function(){}; g.f.Kl=function(){}; g.f.TF=function(){}; g.f.An=function(){}; g.f.isActive=function(){return!0}; g.f.EN=function(){};g.y6(Pc,g.tW);Pc.prototype.open=function(){this.L.D=this.B;this.j&&(this.L.Iu=!0);this.L.connect(this.D,this.S||void 0)}; Pc.prototype.close=function(){this.L.disconnect()}; Pc.prototype.send=function(O){var R=this.L;if(typeof O==="string"){var J={};J.__data__=O;O=J}else this.N&&(J={},J.__data__=g.Uf(O),O=J);R.B.push(new zP6(R.xe++,O));R.s0==3&&sK(R)}; Pc.prototype.eN=function(){this.L.D=null;delete this.B;this.L.disconnect();delete this.L;Pc.gS.eN.call(this)}; g.y6(ZgI,EsR);g.y6(VDI,DNo);g.y6(ex,tDI);ex.prototype.Cl=function(){this.L.dispatchEvent("m")}; ex.prototype.Kl=function(O){this.L.dispatchEvent(new ZgI(O))}; ex.prototype.TF=function(O){this.L.dispatchEvent(new VDI(O))}; ex.prototype.An=function(){this.L.dispatchEvent("n")};var Bc=new g.tW;g.S(Njt,g.n7);g.f=x1.prototype;g.f.Kh=null;g.f.eT=!1;g.f.iT=null;g.f.YP=null;g.f.Xb=null;g.f.LF=null;g.f.Yx=null;g.f.RK=null;g.f.Ch=null;g.f.hx=null;g.f.S7=0;g.f.GQ=null;g.f.nF=null;g.f.tA=null;g.f.QZ=-1;g.f.l9=!0;g.f.qh=!1;g.f.N4=0;g.f.fm=null;var Xu6={},vSt={};g.f=x1.prototype;g.f.setTimeout=function(O){this.S=O}; g.f.UN=function(O){O=O.target;var R=this.fm;R&&g.hW(O)==3?R.bM():this.Px(O)}; g.f.Px=function(O){try{if(O==this.hx)a:{var R=g.hW(this.hx),J=this.hx.S,l=this.hx.getStatus();if(g.d7&&!g.vE("420+")){if(R<4)break a}else if(R<3||R==3&&!g.nE(this.hx))break a;this.qh||R!=4||J==7||(J==8||l<=0?this.L.v2(3):this.L.v2(2));MD6(this);var u=this.hx.getStatus();this.QZ=u;var F=g.nE(this.hx);if(this.eT=u==200){R==4&&UK(this);if(this.N1){for(O=!0;!this.qh&&this.S70?(this.tA=3,Hc(13)):(this.tA=0,Hc(14)),UK(this),q4C(this)}}catch(y){}finally{}}; g.f.cancel=function(){this.qh=!0;UK(this)}; g.f.G1=function(){this.iT=null;var O=Date.now();O-this.YP>=0?(this.LF!=2&&this.L.v2(3),UK(this),this.tA=2,Hc(18),q4C(this)):$$M(this,this.YP-O)}; g.f.getLastError=function(){return this.tA};g.f=W3R.prototype;g.f.QH=null;g.f.L$=null;g.f.dg=!1;g.f.j_=null;g.f.f$=null;g.f.Ex=-1;g.f.HS=null;g.f.Nj=null;g.f.connect=function(O){this.j_=O;O=Qa(this.L,null,this.j_);Hc(3);Date.now();var R=this.L.W;R!=null?(this.HS=R[0],(this.Nj=R[1])?(this.f$=1,ASQ(this)):(this.f$=2,evt(this))):(Je(O,"MODE","init"),this.L$=new x1(this),this.L$.Kh=this.QH,D$C(this.L$,O,!1,null,!0),this.f$=0)}; g.f.BF=function(O){if(O)this.f$=2,evt(this);else{Hc(4);var R=this.L;R.aT=R.xn.Ex;he(R,9)}O&&this.v2(2)}; g.f.q4=function(O){return this.L.q4(O)}; g.f.abort=function(){this.L$&&(this.L$.cancel(),this.L$=null);this.Ex=-1}; g.f.fA=function(){return!1}; g.f.sj=function(O,R){this.Ex=O.QZ;if(this.f$==0)if(R){try{var J=this.S.parse(R)}catch(l){O=this.L;O.aT=this.Ex;he(O,2);return}this.HS=J[0];this.Nj=J[1]}else O=this.L,O.aT=this.Ex,he(O,2);else this.f$==2&&(this.dg?(Hc(7),Date.now()):R=="11111"?(Hc(6),this.dg=!0,Date.now(),this.Ex=200,this.L$.cancel(),Hc(12),LW(this.L,this,!0)):(Hc(8),Date.now(),this.dg=!1))}; g.f.X2=function(){this.Ex=this.L$.QZ;if(this.L$.eT)this.f$==0?this.Nj?(this.f$=1,ASQ(this)):(this.f$=2,evt(this)):this.f$==2&&(this.dg?(Hc(12),LW(this.L,this,!0)):(Hc(11),LW(this.L,this,!1)));else{this.f$==0?Hc(9):this.f$==2&&Hc(10);var O=this.L;this.L$.getLastError();O.aT=this.Ex;he(O,2)}}; g.f.j1=function(){return this.L.j1()}; g.f.isActive=function(){return this.L.isActive()}; g.f.v2=function(O){this.L.v2(O)};g.f=Pqk.prototype;g.f.Rt=null;g.f.xx=null;g.f.pL=null;g.f.eQ=null;g.f.yH=null;g.f.Fl=null;g.f.Wx=null;g.f.xP=null;g.f.yZ=0;g.f.z1=0;g.f.Wf=null;g.f.ws=null;g.f.GG=null;g.f.c7=null;g.f.xn=null;g.f.Pb=null;g.f.NS=-1;g.f.Mv=-1;g.f.aT=-1;g.f.py=0;g.f.h6=0;g.f.P7=8;var qiQ={OK:0,bsJ:2,oVS:4,IYR:5,XD1:6,STOP:7,NI:8,bEg:9,eLQ:10,OEd:11,BKu:12};g.y6(Bj6,g.n7);g.y6(HgR,g.n7);g.f=Pqk.prototype; g.f.connect=function(O,R,J,l,u){Hc(0);this.yH=R;this.xx=J||{};l&&u!==void 0&&(this.xx.OSID=l,this.xx.OAID=u);this.V?(pW((0,g.iQ)(this.YL,this,O),100),U$6(this)):this.YL(O)}; g.f.disconnect=function(){jJR(this);if(this.L==3){var O=this.yZ++,R=this.Fl.clone();g.CP(R,"SID",this.N);g.CP(R,"RID",O);g.CP(R,"TYPE","terminate");di(this,R);O=new x1(this,this.N,O);O.LF=2;O.Yx=Rw(R.clone());(new Image).src=O.Yx.toString();O.Xb=Date.now();aAC(O)}RqM(this)}; g.f.YL=function(O){this.xn=new W3R(this);this.xn.QH=this.Rt;this.xn.S=this.D;this.xn.connect(O)}; g.f.fA=function(){return this.L==0}; g.f.getState=function(){return this.L}; g.f.fl=function(O){this.ws=null;hvC(this,O)}; g.f.oZ=function(){this.GG=null;this.eQ=new x1(this,this.N,"rpc",this.J);this.eQ.Kh=this.Rt;this.eQ.N4=0;var O=this.Wx.clone();g.CP(O,"RID","rpc");g.CP(O,"SID",this.N);g.CP(O,"CI",this.Pb?"0":"1");g.CP(O,"AID",this.NS);di(this,O);g.CP(O,"TYPE","xmlhttp");D$C(this.eQ,O,!0,this.xP,!1)}; g.f.sj=function(O,R){if(this.L!=0&&(this.eQ==O||this.pL==O))if(this.aT=O.QZ,this.pL==O&&this.L==3)if(this.P7>7){try{var J=this.D.parse(R)}catch(l){J=null}if(Array.isArray(J)&&J.length==3)if(O=J,O[0]==0)a:{if(!this.GG){if(this.eQ)if(this.eQ.Xb+3E30)){if(l=R==1)this.pL||this.ws||this.L==1||this.py>=2?l=!1:(this.ws=pW((0,g.iQ)(this.fl,this,O),nSC(this,this.py)),this.py++, l=!0);l=!(l||R==2&&cSM(this))}if(l)switch(J){case 1:he(this,5);break;case 4:he(this,10);break;case 3:he(this,6);break;case 7:he(this,12);break;default:he(this,2)}}}; g.f.kF=function(O){if(!g.Zo(arguments,this.L))throw Error("Unexpected channel state: "+this.L);}; g.f.q0d=function(O){O?Hc(2):(Hc(1),OrQ(this,8))}; g.f.q4=function(O){if(O)throw Error("Can't create secondary domain capable XhrIo object.");O=new g.LE;O.J=!1;return O}; g.f.isActive=function(){return!!this.Wf&&this.Wf.isActive(this)}; g.f.v2=function(O){var R=Bc;R.dispatchEvent(new HgR(R,O))}; g.f.j1=function(){return!1}; g.f=J2C.prototype;g.f.nP=function(){}; g.f.LP=function(){}; g.f.gJ=function(){}; g.f.R5=function(){}; g.f.IQ=function(){}; g.f.SF=function(){return{}}; g.f.isActive=function(){return!0};g.f=g86.prototype;g.f.enqueue=function(O){this.S.push(O)}; g.f.isEmpty=function(){return this.L.length===0&&this.S.length===0}; g.f.clear=function(){this.L=[];this.S=[]}; g.f.contains=function(O){return g.Zo(this.L,O)||g.Zo(this.S,O)}; g.f.remove=function(O){var R=this.L;var J=(0,g.LHC)(R,O);J>=0?(g.V6(R,J),R=!0):R=!1;return R||g.ft(this.S,O)}; g.f.j5=function(){for(var O=[],R=this.L.length-1;R>=0;--R)O.push(this.L[R]);R=this.S.length;for(var J=0;J=kN6.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(O=kN6[this.S],this.GR=g.tF((0,g.iQ)(this.L0,this),O),this.S++):this.publish("pairingFailed",Error("Server error "+O.status))}; g.f.CO=function(){this.L=null;this.publish("pairingFailed",Error("Server not responding"))}; var kN6=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.y6(KG,F2);g.f=KG.prototype;g.f.start=function(){GD(this)&&this.publish("screenChange");!g.Wf("yt-remote-lounge-token-expiration")&&eqo(this);g.ZD(this.L);this.L=g.tF((0,g.iQ)(this.start,this),1E4)}; g.f.add=function(O,R){GD(this);sAo(this,O);y4(this,!1);this.publish("screenChange");R(O);O.token||eqo(this)}; g.f.remove=function(O,R){var J=GD(this);WMR(this,O)&&(y4(this,!1),J=!0);R(O);J&&this.publish("screenChange")}; g.f.tS=function(O,R,J,l){var u=GD(this),F=this.get(O.id);F?(F.name!=R&&(F.name=R,y4(this,!1),u=!0),J(O)):l(Error("no such local screen."));u&&this.publish("screenChange")}; g.f.eN=function(){g.ZD(this.L);KG.gS.eN.call(this)}; g.f.Ee=function(O){GD(this);var R=this.screens.length;O=O&&O.screens||[];for(var J=O.length,l=0;l20)break a;y=R(F,G)}F=y}u.name=F}J(CG(this,u))},this), onError:(0,g.iQ)(function(u){l(Error("pairing request failed: "+u.status))},this), onTimeout:(0,g.iQ)(function(){l(Error("pairing request timed out."))},this)})}; g.f.eN=function(){g.rd(this.S);g.rd(this.L);If.gS.eN.call(this)}; g.f.KB=function(){hqk(this);this.publish("screenChange");this.L.update()}; If.prototype.dispose=If.prototype.dispose;g.y6(rS,g.y8);g.f=rS.prototype;g.f.Uc=function(O){this.jN()||(O&&(of(this,""+O),this.publish("sessionFailed")),this.L=null,this.publish("sessionScreen",null))}; g.f.info=function(O){Ju(this.N1,O)}; g.f.eF=function(){return null}; g.f.L2=function(O){var R=this.S;O?(R.displayStatus=new chrome.cast.ReceiverDisplayStatus(O,[]),R.displayStatus.showStop=!0):R.displayStatus=null;chrome.cast.setReceiverDisplayStatus(R,(0,g.iQ)(function(){this.info("Updated receiver status for "+R.friendlyName+": "+O)},this),(0,g.iQ)(function(){of(this,"Failed to update receiver status for: "+R.friendlyName)},this))}; g.f.eN=function(){this.L2("");rS.gS.eN.call(this)};g.S(Zx,rS);g.f=Zx.prototype;g.f.fn=function(O){if(this.B){if(this.B==O)return;of(this,"Overriding cast session with new session object");GT4(this);this.OQ=!1;this.W="unknown";this.B.removeUpdateListener(this.Hq);this.B.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.iz)}this.B=O;this.B.addUpdateListener(this.Hq);this.B.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.iz);g5k(this,"getMdxSessionStatus")}; g.f.e6=function(O){this.info("launchWithParams no-op for Cast: "+g.Uf(O))}; g.f.stop=function(){this.B?this.B.stop((0,g.iQ)(function(){this.Uc()},this),(0,g.iQ)(function(){this.Uc(Error("Failed to stop receiver app."))},this)):this.Uc(Error("Stopping cast device without session."))}; g.f.L2=function(){}; g.f.eN=function(){this.info("disposeInternal");GT4(this);this.B&&(this.B.removeUpdateListener(this.Hq),this.B.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.iz));this.B=null;rS.prototype.eN.call(this)}; g.f.N2X=function(O,R){if(!this.jN())if(R)if(R=gi(R),g.Rb(R))switch(O=""+R.type,R=R.data||{},this.info("onYoutubeMessage_: "+O+" "+g.Uf(R)),O){case "mdxSessionStatus":O$s(this,R);break;case "loungeToken":i$4(this,R);break;default:of(this,"Unknown youtube message: "+O)}else of(this,"Unable to parse message.");else of(this,"No data in message.")}; g.f.IM=function(O,R,J,l){g.ZD(this.V);this.V=0;LMC(this.N,this.S.label,O,this.S.friendlyName,(0,g.iQ)(function(u){u?R(u):l>=0?(of(this,"Screen "+O+" appears to be offline. "+l+" retries left."),this.V=g.tF((0,g.iQ)(this.IM,this,O,R,J,l-1),300)):J(Error("Unable to fetch screen."))},this),J)}; g.f.eF=function(){return this.B}; g.f.sN=function(O){this.jN()||O||(of(this,"Cast session died."),this.Uc())};g.S(V4,rS);g.f=V4.prototype;g.f.fn=function(O){this.B=O;this.B.addUpdateListener(this.xS)}; g.f.e6=function(O){this.Qh=O;this.SN()}; g.f.stop=function(){o5C(this);this.B?this.B.stop((0,g.iQ)(this.Uc,this,null),(0,g.iQ)(this.Uc,this,"Failed to stop DIAL device.")):this.Uc()}; g.f.eN=function(){o5C(this);this.B&&this.B.removeUpdateListener(this.xS);this.B=null;rS.prototype.eN.call(this)}; g.f.Wo=function(O){this.jN()||O||(of(this,"DIAL session died."),this.D(),this.D=function(){},this.Uc())};g.S(Nl,rS);Nl.prototype.stop=function(){this.Uc()}; Nl.prototype.fn=function(){}; Nl.prototype.e6=function(){g.ZD(this.B);this.B=NaN;var O=Iw(this.N.vP(),this.S.label);O?tu(this,O):this.Uc(Error("No such screen"))}; Nl.prototype.eN=function(){g.ZD(this.B);this.B=NaN;rS.prototype.eN.call(this)};g.S(ma,g.y8);g.f=ma.prototype; g.f.init=function(O,R){chrome.cast.timeout.requestSession=3E4;var J=new chrome.cast.SessionRequest(this.V,[chrome.cast.Capability.AUDIO_OUT]);g.S8("desktop_enable_cast_connect")&&(J.androidReceiverCompatible=!0);this.W||(J.dialRequest=new chrome.cast.DialRequest("YouTube"));var l=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;O=O||this.j?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var u=(0,g.iQ)(this.jjz,this);J=new chrome.cast.ApiConfig(J,(0,g.iQ)(this.vN, this),u,l,O);J.customDialLaunchCallback=(0,g.iQ)(this.cTS,this);chrome.cast.initialize(J,(0,g.iQ)(function(){this.jN()||(chrome.cast.addReceiverActionListener(this.D),$dM(),this.S.subscribe("onlineScreenChange",(0,g.iQ)(this.wJ,this)),this.B=fOM(this),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.iQ)(function(F){this.pA("Failed to set initial custom receivers: "+g.Uf(F))},this)),this.publish("yt-remote-cast2-availability-change",Dx(this)),R(!0))},this),(0,g.iQ)(function(F){this.pA("Failed to initialize API: "+ g.Uf(F)); R(!1)},this))}; g.f.asq=function(O,R){EL("Setting connected screen ID: "+O+" -> "+R);if(this.L){var J=this.L.L;if(!O||J&&J.id!=O)EL("Unsetting old screen status: "+this.L.S.friendlyName),af(this,null)}if(O&&R){if(!this.L){O=Iw(this.S.vP(),O);if(!O){EL("setConnectedScreenStatus: Unknown screen.");return}if(O.idType=="shortLived"){EL("setConnectedScreenStatus: Screen with id type to be short lived.");return}J=Z$V(this,O);J||(EL("setConnectedScreenStatus: Connected receiver not custom..."),J=new chrome.cast.Receiver(O.uuid? O.uuid:O.id,O.name),J.receiverType=chrome.cast.ReceiverType.CUSTOM,this.B.push(J),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.iQ)(function(l){this.pA("Failed to set initial custom receivers: "+g.Uf(l))},this))); EL("setConnectedScreenStatus: new active receiver: "+J.friendlyName);af(this,new Nl(this.S,J),!0)}this.L.L2(R)}else EL("setConnectedScreenStatus: no screen.")}; g.f.kSh=function(O){this.jN()?this.pA("Setting connection data on disposed cast v2"):this.L?this.L.e6(O):this.pA("Setting connection data without a session")}; g.f.oV=function(){this.jN()?this.pA("Stopping session on disposed cast v2"):this.L?(this.L.stop(),af(this,null)):EL("Stopping non-existing session")}; g.f.requestSession=function(){chrome.cast.requestSession((0,g.iQ)(this.vN,this),(0,g.iQ)(this.tZU,this))}; g.f.eN=function(){this.S.unsubscribe("onlineScreenChange",(0,g.iQ)(this.wJ,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.D);var O=v8R,R=g.hs("yt.mdx.remote.debug.handlers_");g.ft(R||[],O);g.rd(this.L);g.y8.prototype.eN.call(this)}; g.f.pA=function(O){Ju("Controller",O)}; g.f.xg=function(O,R){this.L==O&&(R||af(this,null),this.publish("yt-remote-cast2-session-change",R))}; g.f.Qjq=function(O,R){if(!this.jN())if(O)switch(O.friendlyName=chrome.cast.unescape(O.friendlyName),EL("onReceiverAction_ "+O.label+" / "+O.friendlyName+"-- "+R),R){case chrome.cast.ReceiverAction.CAST:if(this.L)if(this.L.S.label!=O.label)EL("onReceiverAction_: Stopping active receiver: "+this.L.S.friendlyName),this.L.stop();else{EL("onReceiverAction_: Casting to active receiver.");this.L.L&&this.publish("yt-remote-cast2-session-change",this.L.L);break}switch(O.receiverType){case chrome.cast.ReceiverType.CUSTOM:af(this, new Nl(this.S,O));break;case chrome.cast.ReceiverType.DIAL:af(this,new V4(this.S,O,this.N,this.config_));break;case chrome.cast.ReceiverType.CAST:af(this,new Zx(this.S,O,this.config_));break;default:this.pA("Unknown receiver type: "+O.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.L&&this.L.S.label==O.label?this.L.stop():this.pA("Stopping receiver w/o session: "+O.friendlyName)}else this.pA("onReceiverAction_ called without receiver.")}; g.f.cTS=function(O){if(this.jN())return Promise.reject(Error("disposed"));var R=O.receiver;R.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.pA("Not DIAL receiver: "+R.friendlyName),R.receiverType=chrome.cast.ReceiverType.DIAL);var J=this.L?this.L.S:null;if(!J||J.label!=R.label)return this.pA("Receiving DIAL launch request for non-clicked DIAL receiver: "+R.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(J&&J.label==R.label&&J.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.L.L)return EL("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.L.L),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.pA('Changing CAST intent from "'+J.receiverType+'" to "dial" for '+R.friendlyName);af(this,new V4(this.S,R,this.N,this.config_))}R=this.L;R.V=O;R.V.appState==chrome.cast.DialAppState.RUNNING?(O=R.V.extraData||{},J=O.screenId||null,fG(R)&&O.loungeToken?O.loungeTokenRefreshIntervalMs?O=Cho(R,{name:R.S.friendlyName,screenId:O.screenId,loungeToken:O.loungeToken,dialId:R.V.receiver.label, screenIdType:"shortLived"},O.loungeTokenRefreshIntervalMs):(g.zH(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(O)+".")),O=r_6(R,J)):O=r_6(R,J)):O=wVR(R);return O}; g.f.vN=function(O){var R=this;if(!this.jN()&&!this.j){EL("New cast session ID: "+O.sessionId);var J=O.receiver;if(J.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.L)if(J.receiverType==chrome.cast.ReceiverType.CAST)EL("Got resumed cast session before resumed mdx connection."),J.friendlyName=chrome.cast.unescape(J.friendlyName),af(this,new Zx(this.S,J,this.config_),!0);else{this.pA("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var l=this.L.S,u=Iw(this.S.vP(), l.label);u&&ya(u,J.label)&&l.receiverType!=chrome.cast.ReceiverType.CAST&&J.receiverType==chrome.cast.ReceiverType.CAST&&(EL("onSessionEstablished_: manual to cast session change "+J.friendlyName),g.rd(this.L),this.L=new Zx(this.S,J,this.config_),this.L.subscribe("sessionScreen",(0,g.iQ)(this.xg,this,this.L)),this.L.subscribe("sessionFailed",function(){return VA4(R,R.L)}),this.L.e6(null)); this.L.fn(O)}}}; g.f.M_=function(){return this.L?this.L.eF():null}; g.f.tZU=function(O){this.jN()||(this.pA("Failed to estabilish a session: "+g.Uf(O)),O.code!=chrome.cast.ErrorCode.CANCEL&&af(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.f.jjz=function(O){EL("Receiver availability updated: "+O);if(!this.jN()){var R=Dx(this);this.J=O==chrome.cast.ReceiverAvailability.AVAILABLE;Dx(this)!=R&&this.publish("yt-remote-cast2-availability-change",Dx(this))}}; g.f.wJ=function(){this.jN()||(this.B=fOM(this),EL("Updating custom receivers: "+g.Uf(this.B)),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.iQ)(function(){this.pA("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",Dx(this)))}; ma.prototype.setLaunchParams=ma.prototype.kSh;ma.prototype.setConnectedScreenStatus=ma.prototype.asq;ma.prototype.stopSession=ma.prototype.oV;ma.prototype.getCastSession=ma.prototype.M_;ma.prototype.requestSession=ma.prototype.requestSession;ma.prototype.init=ma.prototype.init;ma.prototype.dispose=ma.prototype.dispose;var TQI=[];g.f=kR.prototype; g.f.reset=function(O){this.listId="";this.index=-1;this.videoId="";b$b(this);this.volume=-1;this.muted=!1;O&&(this.index=O.index,this.listId=O.listId,this.videoId=O.videoId,this.playerState=O.playerState,this.volume=O.volume,this.muted=O.muted,this.audioTrackId=O.audioTrackId,this.trackData=O.trackData,this.u7=O.hasPrevious,this.rB=O.hasNext,this.J=O.playerTime,this.j=O.playerTimeAt,this.N=O.seekableStart,this.L=O.seekableEnd,this.D=O.duration,this.V=O.loadedTime,this.B=O.liveIngestionTime,this.S= !isNaN(this.B))}; g.f.isPlaying=function(){return this.playerState==1}; g.f.isBuffering=function(){return this.playerState==3}; g.f.Ml=function(){return this.playerState==1081}; g.f.SA=function(O){this.D=isNaN(O)?0:O}; g.f.getDuration=function(){return this.S?this.D+sL(this):this.D}; g.f.clone=function(){return new kR(WRQ(this))};g.S(P9,g.y8);g.f=P9.prototype;g.f.getState=function(){return this.B}; g.f.Mp=function(){return this.N.getReconnectTimeout()}; g.f.DS=function(){this.N.reconnect()}; g.f.play=function(){B9(this)?(this.L?this.L.play(null,g.rv,jM(this,"play")):UL(this,"play"),Ph6(this,1,W9(pG(this))),this.publish("remotePlayerChange")):H9(this,this.play)}; g.f.pause=function(){B9(this)?(this.L?this.L.pause(null,g.rv,jM(this,"pause")):UL(this,"pause"),Ph6(this,2,W9(pG(this))),this.publish("remotePlayerChange")):H9(this,this.pause)}; g.f.seekTo=function(O){if(B9(this)){if(this.L){var R=pG(this),J=new chrome.cast.media.SeekRequest;J.currentTime=O;R.isPlaying()||R.isBuffering()?J.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:J.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.L.seek(J,g.rv,jM(this,"seekTo",{newTime:O}))}else UL(this,"seekTo",{newTime:O});Ph6(this,3,O);this.publish("remotePlayerChange")}else H9(this,g.uQ(this.seekTo,O))}; g.f.stop=function(){if(B9(this)){this.L?this.L.stop(null,g.rv,jM(this,"stopVideo")):UL(this,"stopVideo");var O=pG(this);O.index=-1;O.videoId="";b$b(O);xR(this,O);this.publish("remotePlayerChange")}else H9(this,this.stop)}; g.f.setVolume=function(O,R){if(B9(this)){var J=pG(this);if(this.S){if(J.volume!=O){var l=Math.round(O)/100;this.S.setReceiverVolumeLevel(l,(0,g.iQ)(function(){gS("set receiver volume: "+l)},this),(0,g.iQ)(function(){this.pA("failed to set receiver volume.")},this))}J.muted!=R&&this.S.setReceiverMuted(R,(0,g.iQ)(function(){gS("set receiver muted: "+R)},this),(0,g.iQ)(function(){this.pA("failed to set receiver muted.")},this))}else{var u={volume:O, muted:R};J.volume!=-1&&(u.delta=O-J.volume);UL(this,"setVolume",u)}J.muted=R;J.volume=O;xR(this,J)}else H9(this,g.uQ(this.setVolume,O,R))}; g.f.OY=function(O,R){if(B9(this)){var J=pG(this);O={videoId:O};R&&(J.trackData={trackName:R.name,languageCode:R.languageCode,sourceLanguageCode:R.translationLanguage?R.translationLanguage.languageCode:"",languageName:R.languageName,kind:R.kind},O.style=g.Uf(R.style),g.gY(O,J.trackData));UL(this,"setSubtitlesTrack",O);xR(this,J)}else H9(this,g.uQ(this.OY,O,R))}; g.f.setAudioTrack=function(O,R){B9(this)?(R=R.getLanguageInfo().getId(),UL(this,"setAudioTrack",{videoId:O,audioTrackId:R}),O=pG(this),O.audioTrackId=R,xR(this,O)):H9(this,g.uQ(this.setAudioTrack,O,R))}; g.f.playVideo=function(O,R,J,l,u,F,G){l=l===void 0?null:l;u=u===void 0?null:u;F=F===void 0?null:F;G=G===void 0?null:G;var y=pG(this),w={videoId:O};J!==void 0&&(w.currentIndex=J);Au(y,O,J||0);R!==void 0&&(bS(y,R),w.currentTime=R);l&&(w.listId=l);u&&(w.playerParams=u);F&&(w.clickTrackingParams=F);G&&(w.locationInfo=g.Uf(G));UL(this,"setPlaylist",w);l||xR(this,y)}; g.f.j2=function(O,R){if(B9(this)){if(O&&R){var J=pG(this);Au(J,O,R);xR(this,J)}UL(this,"previous")}else H9(this,g.uQ(this.j2,O,R))}; g.f.nextVideo=function(O,R){if(B9(this)){if(O&&R){var J=pG(this);Au(J,O,R);xR(this,J)}UL(this,"next")}else H9(this,g.uQ(this.nextVideo,O,R))}; g.f.z6=function(){if(B9(this)){UL(this,"clearPlaylist");var O=pG(this);O.reset();xR(this,O);this.publish("remotePlayerChange")}else H9(this,this.z6)}; g.f.Jb=function(){B9(this)?UL(this,"dismissAutoplay"):H9(this,this.Jb)}; g.f.dispose=function(){if(this.B!=3){var O=this.B;this.B=3;this.publish("proxyStateChange",O,this.B)}g.y8.prototype.dispose.call(this)}; g.f.eN=function(){euM(this);this.N=null;this.D.clear();eM(this,null);g.y8.prototype.eN.call(this)}; g.f.H6=function(O){if((O!=this.B||O==2)&&this.B!=3&&O!=0){var R=this.B;this.B=O;this.publish("proxyStateChange",R,O);if(O==1)for(;!this.D.isEmpty();)R=O=this.D,R.L.length===0&&(R.L=R.S,R.L.reverse(),R.S=[]),O.L.pop().apply(this);else O==3&&this.dispose()}}; g.f.NOS=function(O,R){this.publish(O,R)}; g.f.m9z=function(O){if(!O)this.zX(null),eM(this,null);else if(this.S.receiver.volume){O=this.S.receiver.volume;var R=pG(this),J=Math.round(100*O.level||0);if(R.volume!=J||R.muted!=O.muted)gS("Cast volume update: "+O.level+(O.muted?" muted":"")),R.volume=J,R.muted=!!O.muted,xR(this,R)}}; g.f.zX=function(O){gS("Cast media: "+!!O);this.L&&this.L.removeUpdateListener(this.V);if(this.L=O)this.L.addUpdateListener(this.V),pVI(this),this.publish("remotePlayerChange")}; g.f.kJ1=function(O){O?(pVI(this),this.publish("remotePlayerChange")):this.zX(null)}; g.f.k_=function(){UL(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.f.lAJ=function(){var O=qZt();O&&eM(this,O)}; g.f.pA=function(O){Ju("CP",O)};g.S(YR,g.y8);g.f=YR.prototype; g.f.connect=function(O,R){if(R){var J=R.listId,l=R.videoId,u=R.videoIds,F=R.playerParams,G=R.clickTrackingParams,y=R.index,w={videoId:l},I=R.currentTime,C=R.locationInfo;R=R.loopMode;I!==void 0&&(w.currentTime=I<=5?0:I);F&&(w.playerParams=F);C&&(w.locationInfo=C);G&&(w.clickTrackingParams=G);J&&(w.listId=J);u&&u.length>0&&(w.videoIds=u.join(","));y!==void 0&&(w.currentIndex=y);this.xS&&(w.loopMode=R||"LOOP_MODE_OFF");J&&(this.L.listId=J);this.L.videoId=l;this.L.index=y||0;this.L.state=3;bS(this.L, I);this.D="UNSUPPORTED";J=this.xS?"setInitialState":"setPlaylist";Q4("Connecting with "+J+" and params: "+g.Uf(w));this.S.connect({method:J,params:g.Uf(w)},O,iaC())}else Q4("Connecting without params"),this.S.connect({},O,iaC());UfR(this)}; g.f.Kd=function(O){this.S.Kd(O)}; g.f.dispose=function(){this.jN()||(g.dh("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),LG(this,3));g.y8.prototype.dispose.call(this)}; g.f.eN=function(){jVo(this);LRM(this);QVk(this);g.ZD(this.V);this.V=NaN;g.ZD(this.W);this.W=NaN;this.N=null;g.DS(this.SN);this.SN.length=0;this.S.dispose();g.y8.prototype.eN.call(this);this.D=this.J=this.B=this.L=this.S=null}; g.f.yG=function(O){if(!this.B||this.B.length===0)return!1;for(var R=g.N(this.B),J=R.next();!J.done;J=R.next())if(!J.value.capabilities.has(O))return!1;return!0}; g.f.uq=function(){var O=3;this.jN()||(O=0,isNaN(this.Dt())?this.S.XN()&&isNaN(this.j)&&(O=1):O=2);return O}; g.f.L9=function(O){Q4("Disconnecting with "+O);g.dh("yt.mdx.remote.remoteClient_",null);jVo(this);this.publish("beforeDisconnect",O);O==1&&te();this.S.disconnect(O);this.dispose()}; g.f.Hp=function(){var O=this.L;this.N&&(O=this.L.clone(),Au(O,this.N,O.index));return WRQ(O)}; g.f.lsJ=function(O){var R=this,J=new kR(O);J.videoId&&J.videoId!=this.L.videoId&&(this.N=J.videoId,g.ZD(this.V),this.V=g.tF(function(){if(R.N){var u=R.N;R.N=null;R.L.videoId!=u&&dS(R,"getNowPlaying")}},5E3)); var l=[];this.L.listId==J.listId&&this.L.videoId==J.videoId&&this.L.index==J.index||l.push("remoteQueueChange");this.L.playerState==J.playerState&&this.L.volume==J.volume&&this.L.muted==J.muted&&W9(this.L)==W9(J)&&g.Uf(this.L.trackData)==g.Uf(J.trackData)||l.push("remotePlayerChange");this.L.reset(O);g.e6(l,function(u){this.publish(u)},this)}; g.f.Qt=function(){var O=this.S.getDeviceId(),R=g.rC(this.B,function(J){return J.type=="REMOTE_CONTROL"&&J.id!=O}); return R?R.id:""}; g.f.Dt=function(){return this.S.Mp()}; g.f.T8=function(){return this.D||"UNSUPPORTED"}; g.f.K5=function(){return this.J||""}; g.f.fO=function(){!isNaN(this.Dt())&&this.S.DS()}; g.f.ZAQ=function(O,R){dS(this,O,R);dfM(this)}; g.f.Bj=function(){var O=g.e8("SAPISID","")||g.e8("__Secure-1PAPISID")||"",R=g.e8("__Secure-3PAPISID","")||"";if(!O&&!R)return"";O=g.RK(g.Oa(O),2);R=g.RK(g.Oa(R),2);return g.RK(g.Oa(","+O+","+R),2)}; YR.prototype.subscribe=YR.prototype.subscribe;YR.prototype.unsubscribeByKey=YR.prototype.Pf;YR.prototype.getProxyState=YR.prototype.uq;YR.prototype.disconnect=YR.prototype.L9;YR.prototype.getPlayerContextData=YR.prototype.Hp;YR.prototype.setPlayerContextData=YR.prototype.lsJ;YR.prototype.getOtherConnectedRemoteId=YR.prototype.Qt;YR.prototype.getReconnectTimeout=YR.prototype.Dt;YR.prototype.getAutoplayMode=YR.prototype.T8;YR.prototype.getAutoplayVideoId=YR.prototype.K5;YR.prototype.reconnect=YR.prototype.fO; YR.prototype.sendMessage=YR.prototype.ZAQ;YR.prototype.getXsrfToken=YR.prototype.Bj;YR.prototype.isCapabilitySupportedOnConnectedDevices=YR.prototype.yG;g.S(FKb,F2);g.f=FKb.prototype;g.f.vP=function(O){return this.NK.$_gs(O)}; g.f.contains=function(O){return!!this.NK.$_c(O)}; g.f.get=function(O){return this.NK.$_g(O)}; g.f.start=function(){this.NK.$_st()}; g.f.add=function(O,R,J){this.NK.$_a(O,R,J)}; g.f.remove=function(O,R,J){this.NK.$_r(O,R,J)}; g.f.tS=function(O,R,J,l){this.NK.$_un(O,R,J,l)}; g.f.eN=function(){for(var O=this.L.length,R=0;R1&&!this.X.getOption("remote","quickCast")?(this.fH=g.PR(O,this.L,this),this.So(g.jO(O,this.L)),O=g.e(this.X.getOption("remote","currentReceiver")),O=this.L(O),this.options[O]&&this.o8(O),this.enable(!0)):this.enable(!1)}; r0.prototype.L=function(O){return O.key}; r0.prototype.gB=function(O){return O==="cast-selector-receiver"?"Enviar...":this.fH[O].name}; r0.prototype.wI=function(O){g.kf.prototype.wI.call(this,O);this.X.setOption("remote","currentReceiver",this.fH[O]);this.Fh.Xh()};g.S(Tws,g.tN);g.f=Tws.prototype; g.f.create=function(){var O=this.player.T(),R=g.Wv(O);O={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:O.Z("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:O.Z("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:O.Z("enable_cast_short_lived_lounge_token")};Igo(R,O);this.subscriptions.push(g.uh("yt-remote-before-disconnect",this.aAQ,this));this.subscriptions.push(g.uh("yt-remote-connection-change",this.x5d,this));this.subscriptions.push(g.uh("yt-remote-receiver-availability-change",this.qB, this));this.subscriptions.push(g.uh("yt-remote-auto-connect",this.v8q,this));this.subscriptions.push(g.uh("yt-remote-receiver-resumed",this.XYQ,this));this.subscriptions.push(g.uh("mdx-privacy-popup-confirm",this.KlR,this));this.subscriptions.push(g.uh("mdx-privacy-popup-cancel",this.T2d,this));this.qB()}; g.f.load=function(){this.player.cancelPlayback();g.tN.prototype.load.call(this);this.ac=new XMV(this);this.player.Lm(this.ac);this.wY=new EU4(this,this.player,this.OZ);var O=(O=Sik())?O.currentTime:0;var R=ZN6()?new P9(g.e(lt()),void 0):null;O==0&&R&&(O=W9(pG(R)));O!==0&&this.v3(O);$PC(this,this.QI,this.QI);this.player.nS(6)}; g.f.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.df();this.IX=this.Z2;g.ti(this.wY,this.OZ);this.OZ=this.ac=this.wY=null;g.tN.prototype.unload.call(this);this.player.nS(5);t5(this)}; g.f.eN=function(){g.FZ(this.subscriptions);g.tN.prototype.eN.call(this)}; g.f.UB=function(O){var R=g.As.apply(1,arguments);this.loaded&&this.wY.qM.apply(this.wY,[O].concat(g.X(R)))}; g.f.getAdState=function(){return this.iS}; g.f.u7=function(){return this.OZ?pG(this.OZ).u7:!1}; g.f.rB=function(){return this.OZ?pG(this.OZ).rB:!1}; g.f.v3=function(O,R){this.UK=O||0;this.player.publish("progresssync",O,R);this.player.P3("onVideoProgress",O||0)}; g.f.getCurrentTime=function(){return this.UK}; g.f.getProgressState=function(){var O=pG(this.OZ),R=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!O.Ml()&&this.player.QD(),clipEnd:R.clipEnd,clipStart:R.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:O.getDuration(),ingestionTime:O.S?O.B+sL(O):O.B,isAtLiveHead:(O.S?O.L+sL(O):O.L)-this.getCurrentTime()<=1,loaded:O.V,seekableEnd:O.S?O.L+sL(O):O.L,seekableStart:O.N>0?O.N+sL(O):O.N,offset:0,viewerLivestreamJoinMediaTime:0}}; g.f.nextVideo=function(){this.OZ&&this.OZ.nextVideo()}; g.f.j2=function(){this.OZ&&this.OZ.j2()}; g.f.aAQ=function(O){O===1&&(this.Fa=this.OZ?pG(this.OZ):null)}; g.f.x5d=function(){var O=ZN6()?new P9(g.e(lt()),void 0):null;if(O){var R=this.IX;this.loaded&&this.unload();this.OZ=O;this.Fa=null;R.key!==this.Z2.key&&(this.IX=R,this.load())}else g.rd(this.OZ),this.OZ=null,this.loaded&&(this.unload(),(O=this.Fa)&&O.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(O.videoId,W9(O)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.f.qB=function(){var O=[this.Z2],R=O.concat,J=CVR();$R()&&g.Wf("yt-remote-cast-available")&&J.push({key:"cast-selector-receiver",name:"Cast..."});this.fH=R.call(O,J);O=trb()||this.Z2;o0(this,O);this.player.P3("onMdxReceiversChange")}; g.f.v8q=function(){var O=g.e(trb());o0(this,O)}; g.f.XYQ=function(){this.IX=g.e(trb())}; g.f.KlR=function(){this.BB=!0;t5(this);K0=!1;ut&&G7(ut,1);ut=null}; g.f.T2d=function(){this.BB=!1;t5(this);o0(this,this.Z2);this.IX=this.Z2;K0=!1;ut=null;this.player.playVideo()}; g.f.fW=function(O,R){switch(O){case "casting":return this.loaded;case "receivers":return this.fH;case "currentReceiver":return R&&(R.key==="cast-selector-receiver"?kT_():o0(this,R)),this.loaded?this.IX:this.Z2;case "quickCast":return this.fH.length===2&&this.fH[1].key==="cast-selector-receiver"?(R&&kT_(),!0):!1}}; g.f.k_=function(){this.OZ.k_()}; g.f.t4=function(){return!1}; g.f.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.f.isLoggedIn=function(){var O,R;return((O=g.YB("PLAYER_CONFIG"))==null?void 0:(R=O.args)==null?void 0:R.authuser)!==void 0?!0:!(!g.YB("SESSION_INDEX")&&!g.YB("LOGGED_IN"))};g.r5("remote",Tws);})(_yt_player);