(function(g){var window=this;'use strict';var pl=function(p){g.OV(p,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.QL()).toString(36));return p},Cl=function(p,C,V){Array.isArray(V)||(V=[String(V)]); g.g5e(p.S,C,V)},QLf=function(p){if(p instanceof g.EH)return p; if(typeof p.qB=="function")return p.qB(!1);if(g.ea(p)){var C=0,V=new g.EH;V.next=function(){for(;;){if(C>=p.length)return g.EU;if(C in p)return g.lf(p[C++]);C++}}; return V}throw Error("Not implemented");},rk8=function(p,C,V){if(g.ea(p))g.lr(p,C,V); else for(p=QLf(p);;){var N=p.next();if(N.done)break;C.call(V,N.value,void 0,p)}},B08=function(p,C){var V=[]; rk8(C,function(N){try{var H=g.kF.prototype.C.call(this,N,!0)}catch(X){if(X=="Storage: Invalid value was encountered")return;throw X;}H===void 0?V.push(N):g.H21(H)&&V.push(N)},p); return V},GzG=function(p,C){B08(p,C).forEach(function(V){g.kF.prototype.remove.call(this,V)},p)},p6E=function(p){if(p.a$){if(p.a$.locationOverrideToken)return{locationOverrideToken:p.a$.locationOverrideToken}; if(p.a$.latitudeE7!=null&&p.a$.longitudeE7!=null)return{latitudeE7:p.a$.latitudeE7,longitudeE7:p.a$.longitudeE7}}return null},Cay=function(p,C){g.W5(p,C)||p.push(C)},j6P=function(p){var C=0,V; for(V in p)C++;return C},V7r=function(p,C){return g.bc(p,C)},Nff=function(p){try{return g.xH.JSON.parse(p)}catch(C){}p=String(p); if(/^\s*$/.test(p)?0:/^[\],:{}\s\u2028\u2029]*$/.test(p.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("("+p+")")}catch(C){}throw Error("Invalid JSON string: "+p);},jA=function(p){if(g.xH.JSON)try{return g.xH.JSON.parse(p)}catch(C){}return Nff(p)},HdP=function(p){if(p.mm&&typeof p.mm=="function")return p.mm(); if(typeof Map!=="undefined"&&p instanceof Map||typeof Set!=="undefined"&&p instanceof Set)return Array.from(p.values());if(typeof p==="string")return p.split("");if(g.ea(p)){for(var C=[],V=p.length,N=0;N<V;N++)C.push(p[N]);return C}return g.yW(p)},X6E=function(p){if(p.h9&&typeof p.h9=="function")return p.h9(); if(!p.mm||typeof p.mm!="function"){if(typeof Map!=="undefined"&&p instanceof Map)return Array.from(p.keys());if(!(typeof Set!=="undefined"&&p instanceof Set)){if(g.ea(p)||typeof p==="string"){var C=[];p=p.length;for(var V=0;V<p;V++)C.push(V);return C}return g.q$(p)}}},dvc=function(p,C){if(p.forEach&&typeof p.forEach=="function")p.forEach(C,void 0); else if(g.ea(p)||typeof p==="string")Array.prototype.forEach.call(p,C,void 0);else for(var V=X6E(p),N=HdP(p),H=N.length,X=0;X<H;X++)C.call(void 0,N[X],V&&V[X],p)},id0=function(p,C,V,N){var H=new g.Ff(null); p&&g.SZ(H,p);C&&g.KE(H,C);V&&g.Dq(H,V);N&&(H.C=N);return H},hiY=function(){var p=Vd(); this.C=p;p.nk("/client_streamz/youtube/living_room/mdx/channel/opened",g.tf("channel_type"))},s62=function(){var p=Vd(); this.C=p;p.nk("/client_streamz/youtube/living_room/mdx/channel/closed",g.tf("channel_type"))},aDy=function(){var p=Vd(); this.C=p;p.nk("/client_streamz/youtube/living_room/mdx/channel/message_received",g.tf("channel_type"))},EQE=function(){var p=Vd(); this.C=p;p.nk("/client_streamz/youtube/living_room/mdx/channel/error",g.tf("channel_type"))},lDP=function(){var p=Vd(); this.C=p;p.nk("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},t7r=function(){var p=Vd(); this.C=p;p.nk("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},cp0=function(p,C){return new g.iI(p,C)},NC=function(p,C){return Object.prototype.hasOwnProperty.call(p,C)},TfF=function(p,C){return p===C},Ht=function(p,C){this.C={}; this.T=[];this.Z4=this.size=0;var V=arguments.length;if(V>1){if(V%2)throw Error("Uneven number of arguments");for(var N=0;N<V;N+=2)this.set(arguments[N],arguments[N+1])}else if(p)if(p instanceof Ht)for(V=p.h9(),N=0;N<V.length;N++)this.set(V[N],p.get(V[N]));else for(N in p)this.set(N,p[N])},XZ=function(p){if(p.size!=p.T.length){for(var C=0,V=0;C<p.T.length;){var N=p.T[C]; NC(p.C,N)&&(p.T[V++]=N);C++}p.T.length=V}if(p.size!=p.T.length){C={};for(N=V=0;V<p.T.length;){var H=p.T[V];NC(C,H)||(p.T[N++]=H,C[H]=1);V++}p.T.length=N}},di=function(p){this.name=this.id=""; this.clientName="UNKNOWN_INTERFACE";this.app="";this.type="REMOTE_CONTROL";this.ownerObfuscatedGaiaId=this.obfuscatedGaiaId=this.avatar=this.username="";this.capabilities=new Set;this.compatibleSenderThemes=new Set;this.experiments=new Set;this.theme="u";new Ht;this.model=this.brand="";this.year=0;this.chipset=this.osVersion=this.os="";this.mdxDialServerType="MDX_DIAL_SERVER_TYPE_UNKNOWN";p&&(this.id=p.id||p.name,this.name=p.name,this.clientName=p.clientName?p.clientName.toUpperCase():"UNKNOWN_INTERFACE", this.app=p.app,this.type=p.type||"REMOTE_CONTROL",this.username=p.user||"",this.avatar=p.userAvatarUri||"",this.obfuscatedGaiaId=p.obfuscatedGaiaId||"",this.ownerObfuscatedGaiaId=p.ownerObfuscatedGaiaId||"",this.theme=p.theme||"u",M70(this,p.capabilities||""),Jpy(this,p.compatibleSenderThemes||""),mv8(this,p.experiments||""),this.brand=p.brand||"",this.model=p.model||"",this.year=p.year||0,this.os=p.os||"",this.osVersion=p.osVersion||"",this.chipset=p.chipset||"",this.mdxDialServerType=p.mdxDialServerType|| "MDX_DIAL_SERVER_TYPE_UNKNOWN",p=p.deviceInfo)&&(p=JSON.parse(p),this.brand=p.brand||"",this.model=p.model||"",this.year=p.year||0,this.os=p.os||"",this.osVersion=p.osVersion||"",this.chipset=p.chipset||"",this.clientName=p.clientName?p.clientName.toUpperCase():"UNKNOWN_INTERFACE",this.mdxDialServerType=p.mdxDialServerType||"MDX_DIAL_SERVER_TYPE_UNKNOWN")},M70=function(p,C){p.capabilities.clear(); g.MZ(C.split(","),g.Wv(V7r,vQF)).forEach(function(V){p.capabilities.add(V)})},Jpy=function(p,C){p.compatibleSenderThemes.clear(); g.MZ(C.split(","),g.Wv(V7r,F25)).forEach(function(V){p.compatibleSenderThemes.add(V)})},mv8=function(p,C){p.experiments.clear(); C.split(",").forEach(function(V){p.experiments.add(V)})},iC=function(p){p=p||{}; this.name=p.name||"";this.id=p.id||p.screenId||"";this.token=p.token||p.loungeToken||"";this.uuid=p.uuid||p.dialId||"";this.idType=p.screenIdType||"normal"},hZ=function(p,C){return!!C&&(p.id==C||p.uuid==C)},Sg2=function(p){return{name:p.name, screenId:p.id,loungeToken:p.token,dialId:p.uuid,screenIdType:p.idType}},K2y=function(p){return new iC(p)},Dvf=function(p){return Array.isArray(p)?g.bZ(p,K2y):[]},sx=function(p){return p?'{name:"'+p.name+'",id:'+p.id.substr(0,6)+"..,token:"+((p.token?".."+p.token.slice(-6):"-")+",uuid:"+(p.uuid?".."+p.uuid.slice(-6):"-")+",idType:"+p.idType+"}"):"null"},uCr=function(p){return Array.isArray(p)?"["+g.bZ(p,sx).join(",")+"]":"null"},ZdY=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(p){var C=Math.random()*16|0; return(p=="x"?C:C&3|8).toString(16)})},Uv2=function(p){return g.bZ(p,function(C){return{key:C.id, name:C.name}})},fD1=function(p,C){return g.L0(p,function(V){return V||C?!V!=!C?!1:V.id==C.id:!0})},ay=function(p,C){return g.L0(p,function(V){return hZ(V,C)})},Odv=function(){var p=(0,g.kl)(); p&&GzG(p,p.T.qB(!0))},Ex=function(){var p=g.zW("yt-remote-connected-devices")||[]; g.hB(p);return p},ypp=function(p){if(p.length==0)return[]; var C=p[0].indexOf("#"),V=C==-1?p[0]:p[0].substring(0,C);return g.bZ(p,function(N,H){return H==0?N:N.substring(V.length)})},qg1=function(p){g.Yl("yt-remote-connected-devices",p,86400)},lC=function(){if(IDG)return IDG; var p=g.zW("yt-remote-device-id");p||(p=ZdY(),g.Yl("yt-remote-device-id",p,31536E3));for(var C=Ex(),V=1,N=p;g.W5(C,N);)V++,N=p+"#"+V;return IDG=N},bd8=function(){var p=Ex(),C=lC(); g.nK()&&g.Ev(p,C);p=ypp(p);if(p.length==0)try{g.Pd("remote_sid")}catch(V){}else try{g.nO("remote_sid",p.join(","),-1)}catch(V){}},Ap8=function(){return g.zW("yt-remote-session-browser-channel")},oQ2=function(){return g.zW("yt-remote-local-screens")||[]},kHY=function(){g.Yl("yt-remote-lounge-token-expiration",!0,86400)},xvy=function(p){p.length>5&&(p=p.slice(p.length-5)); var C=g.bZ(oQ2(),function(N){return N.loungeToken}),V=g.bZ(p,function(N){return N.loungeToken}); g.AU(V,function(N){return!g.W5(C,N)})&&kHY(); g.Yl("yt-remote-local-screens",p,31536E3)},tZ=function(p){p||(g.R_("yt-remote-session-screen-id"),g.R_("yt-remote-session-video-id")); bd8();p=Ex();g.rY(p,lC());qg1(p)},Yg8=function(){if(!ct){var p=g.eJ(); p&&(ct=new g.bI(p))}},ziF=function(){Yg8(); return ct?!!ct.get("yt-remote-use-staging-server"):!1},T3=function(p,C){g.t3[p]=!0; var V=g.EI();V&&V.publish.apply(V,arguments);g.t3[p]=!1},Riy=function(){},Vd=function(){if(!MC){MC=new g.A8(new Riy); var p=g.Uk("client_streamz_web_flush_count",-1);p!==-1&&(MC.V=p)}return MC},nQ1=function(){var p=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return p?parseInt(p[1],10):0},ei0=function(p){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+p)!=-1||document.currentScript.src.indexOf("&"+p)!=-1)},PaP=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},JZ=function(p){p.length?w60(p.shift(),function(){JZ(p)}):$vv()},L2E=function(p){return"chrome-extension://"+p+"/cast_sender.js"},w60=function(p,C,V){var N=document.createElement("script"); N.onerror=C;V&&(N.onload=V);g.Bn(N,g.yJ(p));(document.head||document.documentElement).appendChild(N)},gQ1=function(){var p=nQ1(),C=[]; if(p>1){var V=p-1;C.push("//www.gstatic.com/eureka/clank/"+p+"/cast_sender.js");C.push("//www.gstatic.com/eureka/clank/"+V+"/cast_sender.js")}return C},$vv=function(){var p=PaP(); p&&p(!1,"No cast extension found")},Q6r=function(){if(W21){var p=2,C=PaP(),V=function(){p--; p==0&&C&&C(!0)}; window.__onGCastApiAvailable=V;w60("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",$vv,V)}},rp0=function(){Q6r(); var p=gQ1();p.push("//www.gstatic.com/eureka/clank/cast_sender.js");JZ(p)},GH0=function(){Q6r(); var p=gQ1();p.push.apply(p,g.K(Bf2.map(L2E)));p.push("//www.gstatic.com/eureka/clank/cast_sender.js");JZ(p)},mF=function(p,C,V){g.z.call(this); this.Y=V!=null?(0,g.g1)(p,V):p;this.Xg=C;this.W=(0,g.g1)(this.R7,this);this.T=!1;this.C=0;this.V=this.Ha=null;this.S=[]},vt=function(p,C,V){g.z.call(this); this.S=V!=null?p.bind(V):p;this.Xg=C;this.V=null;this.T=!1;this.C=0;this.Ha=null},pd1=function(p){p.Ha=g.Ib(function(){p.Ha=null; p.T&&!p.C&&(p.T=!1,pd1(p))},p.Xg); var C=p.V;p.V=null;p.S.apply(null,C)},FZ=function(){},C15=function(){g.wW.call(this,"p")},jKv=function(){g.wW.call(this,"o")},Nm0=function(){return Ve1=Ve1||new g.im},HOY=function(p){g.wW.call(this,"serverreachability",p)},SA=function(p){var C=Nm0(); C.dispatchEvent(new HOY(C,p))},Xd2=function(p){g.wW.call(this,"statevent",p)},Kl=function(p){var C=Nm0(); C.dispatchEvent(new Xd2(C,p))},dUY=function(p,C,V,N){g.wW.call(this,"timingevent",p); this.size=C;this.rtt=V;this.retries=N},DG=function(p,C){if(typeof p!=="function")throw Error("Fn must not be null and must be a function"); return g.xH.setTimeout(function(){p()},C)},uC=function(){},ZG=function(p,C,V,N){this.V=p; this.S=C;this.YM=V;this.Hc=N||1;this.F$=new g.AE(this);this.Qn=45E3;this.vr=null;this.Y=!1;this.Z=this.l_=this.J=this.Ga=this.sY=this.Mo=this.a$=null;this.b_=[];this.T=null;this.D=0;this.W=this.Vn=null;this.Wc=-1;this.Wr=!1;this.UY=0;this.Y_=null;this.ER=this.R$=this.bx=this.Sa=!1;this.C=new iOv},iOv=function(){this.V=null; this.T="";this.C=!1},sKf=function(p,C,V){p.Ga=1; p.J=pl(C.clone());p.Z=V;p.Sa=!0;hr2(p,null)},hr2=function(p,C){p.sY=Date.now(); Ux(p);p.l_=p.J.clone();Cl(p.l_,"t",p.Hc);p.D=0;var V=p.V.Ga;p.C=new iOv;p.T=arP(p.V,V?C:null,!p.Z);p.UY>0&&(p.Y_=new vt((0,g.g1)(p.Mv,p,p.T),p.UY));p.F$.listen(p.T,"readystatechange",p.Dt);C=p.vr?g.Y5(p.vr):{};p.Z?(p.Vn||(p.Vn="POST"),C["Content-Type"]="application/x-www-form-urlencoded",p.T.send(p.l_,p.Vn,p.Z,C)):(p.Vn="GET",p.T.send(p.l_,p.Vn,null,C));SA(1)},lr2=function(p){if(!ED8(p))return g.dU(p.T); var C=g.i3(p.T);if(C==="")return"";var V="",N=C.length,H=g.Hi(p.T)==4;if(!p.C.V){if(typeof TextDecoder==="undefined")return fl(p),Ox(p),"";p.C.V=new g.xH.TextDecoder}for(var X=0;X<N;X++)p.C.C=!0,V+=p.C.V.decode(C[X],{stream:!(H&&X==N-1)});C.length=0;p.C.T+=V;p.D=0;return p.C.T},ED8=function(p){return p.T?p.Vn=="GET"&&p.Ga!=2&&p.V.sO:!1},TmY=function(p,C){var V=p.D,N=C.indexOf("\n",V); if(N==-1)return te5;V=Number(C.substring(V,N));if(isNaN(V))return cw5;N+=1;if(N+V>C.length)return te5;C=C.slice(N,N+V);p.D=N+V;return C},Ux=function(p){p.Mo=Date.now()+p.Qn; Mey(p,p.Qn)},Mey=function(p,C){if(p.a$!=null)throw Error("WatchDog timer not null"); p.a$=DG((0,g.g1)(p.YS,p),C)},Jwc=function(p){p.a$&&(g.xH.clearTimeout(p.a$),p.a$=null)},Ox=function(p){p.V.Jp()||p.Wr||mU1(p.V,p)},fl=function(p){Jwc(p); g.hf(p.Y_);p.Y_=null;p.F$.removeAll();if(p.T){var C=p.T;p.T=null;C.abort();C.dispose()}},UUp=function(p,C){try{var V=p.V; if(V.KO!=0&&(V.T==p||vDv(V.C,p)))if(!p.R$&&vDv(V.C,p)&&V.KO==3){try{var N=V.d7.T.parse(C)}catch(S){N=null}if(Array.isArray(N)&&N.length==3){var H=N;if(H[0]==0)a:{if(!V.J){if(V.T)if(V.T.sY+3E3<p.sY)yd(V),qC(V);else break a;F11(V);Kl(18)}}else V.QZ=H[1],0<V.QZ-V.Y_&&H[2]<37500&&V.R$&&V.b_==0&&!V.a$&&(V.a$=DG((0,g.g1)(V.BT,V),6E3));if(Sk0(V.C)<=1&&V.MW){try{V.MW()}catch(S){}V.MW=void 0}}else Iy(V,11)}else if((p.R$||V.T==p)&&yd(V),!g.FG(C))for(H=V.d7.T.parse(C),C=0;C<H.length;C++){var X=H[C];V.Y_=X[0]; X=X[1];if(V.KO==2)if(X[0]=="c"){V.S=X[1];V.Hc=X[2];var d=X[3];d!=null&&(V.Z2=d);var a=X[5];a!=null&&typeof a==="number"&&a>0&&(V.UY=1.5*a);N=V;var E=p.hq();if(E){var l=g.h$(E,"X-Client-Wire-Protocol");if(l){var t=N.C;!t.T&&(g.K0(l,"spdy")||g.K0(l,"quic")||g.K0(l,"h2"))&&(t.S=t.W,t.T=new Set,t.C&&(K1y(t,t.C),t.C=null))}if(N.Sa){var c=g.h$(E,"X-HTTP-Session-Id");c&&(N.cV=c,g.OV(N.vr,N.Sa,c))}}V.KO=3;V.W&&V.W.nI();V.wy&&(V.uJ=Date.now()-p.sY);N=V;var T=p;N.xt=DUf(N,N.Ga?N.Hc:null,N.YM);if(T.R$){u50(N.C, T);var M=T,J=N.UY;J&&M.setTimeout(J);M.a$&&(Jwc(M),Ux(M));N.T=T}else ZOv(N);V.V.length>0&&bC(V)}else X[0]!="stop"&&X[0]!="close"||Iy(V,7);else V.KO==3&&(X[0]=="stop"||X[0]=="close"?X[0]=="stop"?Iy(V,7):V.disconnect():X[0]!="noop"&&V.W&&V.W.b$(X),V.b_=0)}SA(4)}catch(S){}},frF=function(p,C){this.T=p; this.map=C;this.context=null},OO0=function(p){this.W=p||10; g.xH.PerformanceNavigationTiming?(p=g.xH.performance.getEntriesByType("navigation"),p=p.length>0&&(p[0].nextHopProtocol=="hq"||p[0].nextHopProtocol=="h2")):p=!!(g.xH.chrome&&g.xH.chrome.loadTimes&&g.xH.chrome.loadTimes()&&g.xH.chrome.loadTimes().wasFetchedViaSpdy);this.S=p?this.W:1;this.T=null;this.S>1&&(this.T=new Set);this.C=null;this.V=[]},ywr=function(p){return p.C?!0:p.T?p.T.size>=p.S:!1},Sk0=function(p){return p.C?1:p.T?p.T.size:0},vDv=function(p,C){return p.C?p.C==C:p.T?p.T.has(C):!1},K1y= function(p,C){p.T?p.T.add(C):p.C=C},u50=function(p,C){p.C&&p.C==C?p.C=null:p.T&&p.T.has(C)&&p.T.delete(C)},qkY=function(p){if(p.C!=null)return p.V.concat(p.C.b_); if(p.T!=null&&p.T.size!==0){var C=p.V;p=g.F(p.T.values());for(var V=p.next();!V.done;V=p.next())C=C.concat(V.value.b_);return C}return g.p6(p.V)},Irp=function(p,C){var V=new uC; if(g.xH.Image){var N=new Image;N.onload=g.Wv(AZ,V,"TestLoadImage: loaded",!0,C,N);N.onerror=g.Wv(AZ,V,"TestLoadImage: error",!1,C,N);N.onabort=g.Wv(AZ,V,"TestLoadImage: abort",!1,C,N);N.ontimeout=g.Wv(AZ,V,"TestLoadImage: timeout",!1,C,N);g.xH.setTimeout(function(){if(N.ontimeout)N.ontimeout()},1E4); N.src=p}else C(!1)},bOF=function(p,C){var V=new uC,N=new AbortController,H=setTimeout(function(){N.abort(); AZ(V,"TestPingServer: timeout",!1,C)},1E4); fetch(p,{signal:N.signal}).then(function(X){clearTimeout(H);X.ok?AZ(V,"TestPingServer: ok",!0,C):AZ(V,"TestPingServer: server error",!1,C)}).catch(function(){clearTimeout(H); AZ(V,"TestPingServer: error",!1,C)})},AZ=function(p,C,V,N,H){try{H&&(H.onload=null,H.onerror=null,H.onabort=null,H.ontimeout=null),N(V)}catch(X){}},Awy=function(){this.T=new FZ},oDp=function(p,C,V){var N=V||""; try{dvc(p,function(H,X){var d=H;g.Pv(H)&&(d=g.Y7(H));C.push(N+X+"="+encodeURIComponent(d))})}catch(H){throw C.push(N+"type="+encodeURIComponent("_badmap")),H; }},oy=function(p,C,V){return V&&V.n_n?V.n_n[p]||C:C},kQ1=function(p){this.V=[]; this.Hc=this.xt=this.vr=this.YM=this.T=this.cV=this.Sa=this.Wr=this.D=this.Wc=this.Z=null;this.eZ=this.l_=0;this.f9=oy("failFast",!1,p);this.R$=this.a$=this.J=this.Y=this.W=null;this.Q$=!0;this.QZ=this.Y_=-1;this.ER=this.b_=this.sY=0;this.iW=oy("baseRetryDelayMs",5E3,p);this.H1=oy("retryDelaySeedMs",1E4,p);this.W1=oy("forwardChannelMaxRetries",2,p);this.K1=oy("forwardChannelRequestTimeoutMs",2E4,p);this.XO=p&&p.TzV||void 0;this.FF=p&&p.qKY||void 0;this.sO=p&&p.Zwa||!1;this.UY=void 0;this.Ga=p&&p.lZk|| !1;this.S="";this.C=new OO0(p&&p.dRn);this.d7=new Awy;this.F$=p&&p.V6V||!1;this.Mo=p&&p.Tno||!1;this.F$&&this.Mo&&(this.Mo=!1);this.N5=p&&p.URr||!1;p&&p.E$n&&(this.Q$=!1);this.wy=!this.F$&&this.Q$&&p&&p.c8x||!1;this.zB=void 0;p&&p.HQ&&p.HQ>0&&(this.zB=p.HQ);this.MW=void 0;this.uJ=0;this.Qn=!1;this.bx=this.Vn=null},qC=function(p){p.T&&(xU8(p),p.T.cancel(),p.T=null)},Ykr=function(p){qC(p); p.J&&(g.xH.clearTimeout(p.J),p.J=null);yd(p);p.C.cancel();p.Y&&(typeof p.Y==="number"&&g.xH.clearTimeout(p.Y),p.Y=null)},bC=function(p){ywr(p.C)||p.Y||(p.Y=!0,g.J8(p.Tw,p),p.sY=0)},Rrf=function(p,C){if(Sk0(p.C)>=p.C.S-(p.Y?1:0))return!1; if(p.Y)return p.V=C.b_.concat(p.V),!0;if(p.KO==1||p.KO==2||p.sY>=(p.f9?0:p.W1))return!1;p.Y=DG((0,g.g1)(p.Tw,p,C),zrG(p,p.sY));p.sY++;return!0},erv=function(p,C){var V; C?V=C.YM:V=p.l_++;var N=p.vr.clone();g.OV(N,"SID",p.S);g.OV(N,"RID",V);g.OV(N,"AID",p.Y_);kh(p,N);p.D&&p.Z&&g.bp(N,p.D,p.Z);V=new ZG(p,p.S,V,p.sY+1);p.D===null&&(V.vr=p.Z);C&&(p.V=C.b_.concat(p.V));C=nD8(p,V,1E3);V.setTimeout(Math.round(p.K1*.5)+Math.round(p.K1*.5*Math.random()));K1y(p.C,V);sKf(V,N,C)},kh=function(p,C){p.Wr&&g.uc(p.Wr,function(V,N){g.OV(C,N,V)}); p.W&&dvc({},function(V,N){g.OV(C,N,V)})},nD8=function(p,C,V){V=Math.min(p.V.length,V); var N=p.W?(0,g.g1)(p.W.tb,p.W,p):null;a:{for(var H=p.V,X=-1;;){var d=["count="+V];X==-1?V>0?(X=H[0].T,d.push("ofs="+X)):X=0:d.push("ofs="+X);for(var a=!0,E=0;E<V;E++){var l=H[E].T,t=H[E].map;l-=X;if(l<0)X=Math.max(0,H[E].T-100),a=!1;else try{oDp(t,d,"req"+l+"_")}catch(c){N&&N(t)}}if(a){N=d.join("&");break a}}N=void 0}p=p.V.splice(0,V);C.b_=p;return N},ZOv=function(p){p.T||p.J||(p.ER=1,g.J8(p.yc,p),p.b_=0)},F11=function(p){if(p.T||p.J||p.b_>=3)return!1; p.ER++;p.J=DG((0,g.g1)(p.yc,p),zrG(p,p.b_));p.b_++;return!0},xU8=function(p){p.Vn!=null&&(g.xH.clearTimeout(p.Vn),p.Vn=null)},P1P=function(p){p.T=new ZG(p,p.S,"rpc",p.ER); p.D===null&&(p.T.vr=p.Z);p.T.UY=0;var C=p.xt.clone();g.OV(C,"RID","rpc");g.OV(C,"SID",p.S);g.OV(C,"AID",p.Y_);g.OV(C,"CI",p.R$?"0":"1");!p.R$&&p.zB&&g.OV(C,"TO",p.zB);g.OV(C,"TYPE","xmlhttp");kh(p,C);p.D&&p.Z&&g.bp(C,p.D,p.Z);p.UY&&p.T.setTimeout(p.UY);var V=p.T;p=p.Hc;V.Ga=1;V.J=pl(C.clone());V.Z=null;V.Sa=!0;hr2(V,p)},yd=function(p){p.a$!=null&&(g.xH.clearTimeout(p.a$),p.a$=null)},mU1=function(p,C){var V=null; if(p.T==C){yd(p);xU8(p);p.T=null;var N=2}else if(vDv(p.C,C))V=C.b_,u50(p.C,C),N=1;else return;if(p.KO!=0)if(C.Y)if(N==1){V=C.Z?C.Z.length:0;C=Date.now()-C.sY;var H=p.sY;N=Nm0();N.dispatchEvent(new dUY(N,V,C,H));bC(p)}else ZOv(p);else{var X=C.Wc;H=C.getLastError();if(H==3||H==0&&X>0||!(N==1&&Rrf(p,C)||N==2&&F11(p)))switch(V&&V.length>0&&(C=p.C,C.V=C.V.concat(V)),H){case 1:Iy(p,5);break;case 4:Iy(p,10);break;case 3:Iy(p,6);break;default:Iy(p,2)}}},zrG=function(p,C){var V=p.iW+Math.floor(Math.random()* p.H1); p.isActive()||(V*=2);return V*C},Iy=function(p,C){if(C==2){var V=(0,g.g1)(p.dnx,p),N=p.FF,H=!N; N=new g.Ff(N||"//www.google.com/images/cleardot.gif");g.xH.location&&g.xH.location.protocol=="http"||g.SZ(N,"https");pl(N);H?Irp(N.toString(),V):bOF(N.toString(),V)}else Kl(2);p.KO=0;p.W&&p.W.ag(C);wdv(p);Ykr(p)},wdv=function(p){p.KO=0; p.bx=[];if(p.W){var C=qkY(p.C);if(C.length!=0||p.V.length!=0)g.C6(p.bx,C),g.C6(p.bx,p.V),p.C.V.length=0,g.p6(p.V),p.V.length=0;p.W.kP()}},$UE=function(p){if(p.KO==0)return p.bx; var C=[];g.C6(C,qkY(p.C));g.C6(C,p.V);return C},DUf=function(p,C,V){var N=g.yh(V); N.T!=""?(C&&g.KE(N,C+"."+N.T),g.Dq(N,N.V)):(N=g.xH.location,N=id0(N.protocol,C?C+"."+N.hostname:N.hostname,+N.port,V));C=p.Sa;V=p.cV;C&&V&&g.OV(N,C,V);g.OV(N,"VER",p.Z2);kh(p,N);return N},arP=function(p,C,V){if(C&&!p.Ga)throw Error("Can't create secondary domain capable XhrIo object."); C=p.sO&&!p.XO?new g.jE(new g.M_({EN:V})):new g.jE(p.XO);C.D=p.Ga;return C},L1p=function(){},gDP=function(){},Yh=function(p,C){g.im.call(this); this.T=new kQ1(C);this.W=p;this.C=C&&C.Xr$||null;p=C&&C.j$_||null;C&&C.wPe&&(p?p["X-Client-Protocol"]="webchannel":p={"X-Client-Protocol":"webchannel"});this.T.Z=p;p=C&&C.Gva||null;C&&C.gC&&(p?p["X-WebChannel-Content-Type"]=C.gC:p={"X-WebChannel-Content-Type":C.gC});C&&C.Bh&&(p?p["X-WebChannel-Client-Profile"]=C.Bh:p={"X-WebChannel-Client-Profile":C.Bh});this.T.Wc=p;(p=C&&C.N9$)&&!g.FG(p)&&(this.T.D=p);this.Y=C&&C.lZk||!1;this.S=C&&C.iwx||!1;(C=C&&C.TV$)&&!g.FG(C)&&(this.T.Sa=C,g.Ia(this.C,C)&&(p= this.C,C in p&&delete p[C]));this.V=new xh(this)},W1f=function(p){C15.call(this); p.__headers__&&(this.headers=p.__headers__,this.statusCode=p.__status__,delete p.__headers__,delete p.__status__);var C=p.__sm__;C?this.data=(this.T=g.O_(C))?g.k5(C,this.T):C:this.data=p},QKP=function(p){jKv.call(this); this.status=1;this.errorCode=p},xh=function(p){this.T=p},rwF=function(p,C){this.C=p; this.T=C},Bm8=function(p){return $UE(p.T).map(function(C){var V=p.C; C=C.map;"__data__"in C?(C=C.__data__,V=V.S?Nff(C):C):V=C;return V})},z3=function(p,C){if(typeof p!=="function")throw Error("Fn must not be null and must be a function"); return g.xH.setTimeout(function(){p()},C)},nl=function(p){Ry.dispatchEvent(new GQp(Ry,p))},GQp=function(p){g.wW.call(this,"statevent",p)},eA=function(p,C,V,N){this.T=p; this.S=C;this.D=V;this.Y=N||1;this.C=45E3;this.V=new g.AE(this);this.W=new g.q7;this.W.setInterval(250)},CO8=function(p,C,V){p.CC=1; p.Vm=pl(C.clone());p.uv=V;p.Sa=!0;pwF(p,null)},j_y=function(p,C,V,N,H){p.CC=1; p.Vm=pl(C.clone());p.uv=null;p.Sa=V;H&&(p.Oj=!1);pwF(p,N)},pwF=function(p,C){p.uj=Date.now(); Vzr(p);p.nC=p.Vm.clone();Cl(p.nC,"t",p.Y);p.xT=0;p.sf=p.T.uh(p.T.mO()?C:null);p.Sp>0&&(p.aY=new vt((0,g.g1)(p.CI,p,p.sf),p.Sp));p.V.listen(p.sf,"readystatechange",p.Kb);C=p.SA?g.Y5(p.SA):{};p.uv?(p.Aj="POST",C["Content-Type"]="application/x-www-form-urlencoded",p.sf.send(p.nC,p.Aj,p.uv,C)):(p.Aj="GET",p.Oj&&!g.Vf&&(C.Connection="close"),p.sf.send(p.nC,p.Aj,null,C));p.T.cS(1)},Xwy=function(p,C){var V=p.xT,N=C.indexOf("\n",V); if(N==-1)return N85;V=Number(C.substring(V,N));if(isNaN(V))return HKf;N+=1;if(N+V>C.length)return N85;C=C.slice(N,N+V);p.xT=N+V;return C},Vzr=function(p){p.E9=Date.now()+p.C; d51(p,p.C)},d51=function(p,C){if(p.Cf!=null)throw Error("WatchDog timer not null"); p.Cf=z3((0,g.g1)(p.Uw,p),C)},iKy=function(p){p.Cf&&(g.xH.clearTimeout(p.Cf),p.Cf=null)},h8E=function(p){p.T.Jp()||p.SP||p.T.z9(p)},Pt=function(p){iKy(p); g.hf(p.aY);p.aY=null;p.W.stop();p.V.removeAll();if(p.sf){var C=p.sf;p.sf=null;C.abort();C.dispose()}p.UN&&(p.UN=null)},s_2=function(p,C){try{p.T.AC(p,C),p.T.cS(4)}catch(V){}},Elf=function(p,C,V,N,H){if(N==0)V(!1); else{var X=H||0;N--;a31(p,C,function(d){d?V(!0):g.xH.setTimeout(function(){Elf(p,C,V,N,X)},X)})}},a31=function(p,C,V){var N=new Image; N.onload=function(){try{wi(N),V(!0)}catch(H){}}; N.onerror=function(){try{wi(N),V(!1)}catch(H){}}; N.onabort=function(){try{wi(N),V(!1)}catch(H){}}; N.ontimeout=function(){try{wi(N),V(!1)}catch(H){}}; g.xH.setTimeout(function(){if(N.ontimeout)N.ontimeout()},C); N.src=p},wi=function(p){p.onload=null; p.onerror=null;p.onabort=null;p.ontimeout=null},l32=function(p){this.T=p; this.C=new FZ},tz0=function(p){var C=$h(p.T,p.PO,"/mail/images/cleardot.gif"); pl(C);Elf(C.toString(),5E3,(0,g.g1)(p.aD,p),3,2E3);p.cS(1)},cmp=function(p){var C=p.T.Y; C!=null?(nl(5),C?(nl(11),Ll(p.T,p,!1)):(nl(12),Ll(p.T,p,!0))):(p.q1=new eA(p),p.q1.SA=p.mG,C=p.T,C=$h(C,C.mO()?p.sJ:null,p.ih),nl(5),Cl(C,"TYPE","xmlhttp"),j_y(p.q1,C,!1,p.sJ,!1))},T8G=function(p,C,V){this.T=1; this.C=[];this.V=[];this.W=new FZ;this.Z=p||null;this.Y=C!=null?C:null;this.J=V||!1},Mzf=function(p,C){this.T=p; this.map=C;this.context=null},JmP=function(p,C,V,N){g.wW.call(this,"timingevent",p); this.size=C;this.rtt=V;this.retries=N},m58=function(p){g.wW.call(this,"serverreachability",p)},F_y=function(p){p.lD(1,0); p.IY=$h(p,null,p.Wq);vlY(p)},SB2=function(p){p.Cv&&(p.Cv.abort(),p.Cv=null); p.FT&&(p.FT.cancel(),p.FT=null);p.sK&&(g.xH.clearTimeout(p.sK),p.sK=null);gi(p);p.Ev&&(p.Ev.cancel(),p.Ev=null);p.w2&&(g.xH.clearTimeout(p.w2),p.w2=null)},K_2=function(p,C){if(p.T==0)throw Error("Invalid operation: sending map when state is closed"); p.C.push(new Mzf(p.gp++,C));p.T!=2&&p.T!=3||vlY(p)},D5y=function(p){var C=0; p.FT&&C++;p.Ev&&C++;return C},vlY=function(p){p.Ev||p.w2||(p.w2=z3((0,g.g1)(p.rE,p),0),p.sI=0)},U55=function(p,C){if(p.T==1){if(!C){p.ij=Math.floor(Math.random()*1E5); C=p.ij++;var V=new eA(p,"",C);V.SA=p.vP;var N=uWY(p),H=p.IY.clone();g.OV(H,"RID",C);g.OV(H,"CVER","1");Wt(p,H);CO8(V,H,N);p.Ev=V;p.T=2}}else p.T==3&&(C?ZK5(p,C):p.C.length==0||p.Ev||ZK5(p))},ZK5=function(p,C){if(C)if(p.m0>6){p.C=p.V.concat(p.C); p.V.length=0;var V=p.ij-1;C=uWY(p)}else V=C.D,C=C.uv;else V=p.ij++,C=uWY(p);var N=p.IY.clone();g.OV(N,"SID",p.S);g.OV(N,"RID",V);g.OV(N,"AID",p.rH);Wt(p,N);V=new eA(p,p.S,V,p.sI+1);V.SA=p.vP;V.setTimeout(1E4+Math.round(1E4*Math.random()));p.Ev=V;CO8(V,N,C)},Wt=function(p,C){p.Rx&&(p=p.Rx.u$())&&g.uc(p,function(V,N){g.OV(C,N,V)})},uWY=function(p){var C=Math.min(p.C.length,1E3),V=["count="+C]; if(p.m0>6&&C>0){var N=p.C[0].T;V.push("ofs="+N)}else N=0;for(var H={},X=0;X<C;H={Rs:void 0},X++){H.Rs=p.C[X].T;var d=p.C[X].map;H.Rs=p.m0<=6?X:H.Rs-N;try{g.uc(d,function(a){return function(E,l){V.push("req"+a.Rs+"_"+l+"="+encodeURIComponent(E))}}(H))}catch(a){V.push("req"+H.Rs+"_type="+encodeURIComponent("_badmap"))}}p.V=p.V.concat(p.C.splice(0,C)); return V.join("&")},f31=function(p){p.FT||p.sK||(p.D=1,p.sK=z3((0,g.g1)(p.Ig,p),0),p.A7=0)},ymc=function(p){if(p.FT||p.sK||p.A7>=3)return!1; p.D++;p.sK=z3((0,g.g1)(p.Ig,p),OK0(p,p.A7));p.A7++;return!0},Ll=function(p,C,V){p.QM=p.Y==null?V:!p.Y; p.zR=C.xE;p.J||F_y(p)},gi=function(p){p.zs!=null&&(g.xH.clearTimeout(p.zs),p.zs=null)},OK0=function(p,C){var V=5E3+Math.floor(Math.random()*1E4); p.isActive()||(V*=2);return V*C},Qd=function(p,C){if(C==2||C==9){var V=null; p.Rx&&(V=null);var N=(0,g.g1)(p.oBV,p);V||(V=new g.Ff("//www.google.com/images/cleardot.gif"),pl(V));a31(V.toString(),1E4,N)}else nl(2);qBf(p,C)},qBf=function(p,C){p.T=0; p.Rx&&p.Rx.Vc(C);I3Y(p);SB2(p)},I3Y=function(p){p.T=0; p.zR=-1;if(p.Rx)if(p.V.length==0&&p.C.length==0)p.Rx.LN();else{var C=g.p6(p.V),V=g.p6(p.C);p.V.length=0;p.C.length=0;p.Rx.LN(C,V)}},$h=function(p,C,V){var N=g.yh(V); if(N.T!="")C&&g.KE(N,C+"."+N.T),g.Dq(N,N.V);else{var H=window.location;N=id0(H.protocol,C?C+"."+H.hostname:H.hostname,+H.port,V)}p.z2&&g.uc(p.z2,function(X,d){g.OV(N,d,X)}); g.OV(N,"VER",p.m0);Wt(p,N);return N},bK5=function(){},Am0=function(){this.T=[]; this.C=[]},ol1=function(p){g.wW.call(this,"channelMessage"); this.message=p},kWv=function(p){g.wW.call(this,"channelError"); this.error=p},x5Y=function(p,C){this.action=p; this.params=C||{}},ri=function(p,C){g.z.call(this); this.T=new g.N8(this.N7x,0,this);g.R(this,this.T);this.Xg=5E3;this.C=0;if(typeof p==="function")C&&(p=(0,g.g1)(p,C));else if(p&&typeof p.handleEvent==="function")p=(0,g.g1)(p.handleEvent,p);else throw Error("Invalid listener argument");this.V=p},YBc=function(p,C,V,N,H){V=V===void 0?!1:V; N=N===void 0?function(){return""}:N; H=H===void 0?!1:H;this.sY=p;this.D=C;this.V=new g.IL;this.C=new ri(this.X1o,this);this.T=null;this.a$=!1;this.Y=null;this.Z="";this.J=this.W=0;this.S=[];this.Ga=V;this.b_=N;this.R$=H;this.vr=new hiY;this.Vn=new s62;this.Wr=new aDy;this.Sa=new EQE;this.Y_=new lDP;this.l_=new t7r},z82=function(p){if(p.T){var C=p.b_(),V=p.T.vP||{}; C?V["x-youtube-lounge-xsrf-token"]=C:delete V["x-youtube-lounge-xsrf-token"];p.T.vP=V}},Bt=function(p){this.scheme="https"; this.port=this.domain="";this.T="/api/lounge";this.C=!0;p=p||document.location.href;var C=Number(g.wA(4,p))||"";C&&(this.port=":"+C);this.domain=g.$7(p)||"";p=g.f0();p.search("MSIE")>=0&&(p=p.match(/MSIE ([\d.]+)/)[1],g.U1(p,"10.0")<0&&(this.C=!1))},G3=function(p,C){var V=p.T; p.C&&(V=p.scheme+"://"+p.domain+p.port+p.T);return g.BX(V+C,{})},R8F=function(p,C){g.im.call(this); var V=this;this.FO=p();this.FO.subscribe("handlerOpened",this.Jb,this);this.FO.subscribe("handlerClosed",this.onClosed,this);this.FO.subscribe("handlerError",function(N,H){V.onError(H)}); this.FO.subscribe("handlerMessage",this.onMessage,this);this.T=C},nlv=function(p,C,V){var N=this; V=V===void 0?function(){return""}:V; var H=H===void 0?new gDP:H;var X=X===void 0?new g.IL:X;this.pathPrefix=p;this.T=C;this.sY=V;this.W=X;this.J=null;this.Z=this.D=0;this.channel=null;this.Y=0;this.V=new ri(function(){N.V.isActive();var d;((d=N.channel)==null?void 0:Sk0((new rwF(d,d.T)).T.C))===0&&N.connect(N.J,N.D)}); this.S={};this.C={};this.a$=!1;this.logger=null;this.b_=[];this.Ld=void 0;this.vr=new hiY;this.Vn=new s62;this.Wr=new aDy;this.Sa=new EQE},e81=function(p){g.CJ(p.channel,"m",function(){p.Y=3; p.V.reset();p.J=null;p.D=0;for(var C=g.F(p.b_),V=C.next();!V.done;V=C.next())V=V.value,p.channel&&p.channel.send(V);p.b_=[];p.publish("webChannelOpened");p.vr.T("WEB_CHANNEL")}); g.CJ(p.channel,"n",function(){p.Y=0;p.V.isActive()||p.publish("webChannelClosed");var C,V=(C=p.channel)==null?void 0:Bm8(new rwF(C,C.T));V&&(p.b_=[].concat(g.K(V)));p.Vn.T("WEB_CHANNEL")}); g.CJ(p.channel,"p",function(C){var V=C.data;V[0]==="gracefulReconnect"?(p.V.start(),p.channel&&p.channel.close()):p.publish("webChannelMessage",new x5Y(V[0],V[1]));p.Ld=C.statusCode;p.Wr.T("WEB_CHANNEL")}); g.CJ(p.channel,"o",function(){p.Ld===401||p.V.start();p.publish("webChannelError");p.Sa.T("WEB_CHANNEL")})},PO0=function(p){var C=p.sY(); C?p.S["x-youtube-lounge-xsrf-token"]=C:delete p.S["x-youtube-lounge-xsrf-token"]},wwr=function(p){g.im.call(this); this.T=p();this.T.subscribe("webChannelOpened",this.Q0,this);this.T.subscribe("webChannelClosed",this.onClosed,this);this.T.subscribe("webChannelError",this.onError,this);this.T.subscribe("webChannelMessage",this.onMessage,this)},$5Y=function(p,C,V,N,H){function X(){return new YBc(G3(p,"/bc"),C,!1,V,N)} V=V===void 0?function(){return""}:V; return g.Zr("enable_mdx_web_channel_desktop")?new wwr(function(){return new nlv(G3(p,"/wc"),C,V)}):new R8F(X,H)},Q_v=function(){var p=L_c; glG();pL.push(p);W_F()},CL=function(p,C){glG(); var V=rmE(p,String(C));pL.length==0?B8c(V):(W_F(),g.lr(pL,function(N){N(V)}))},jW=function(p){CL("CP",p)},glG=function(){pL||(pL=g.zV("yt.mdx.remote.debug.handlers_")||[],g.YH("yt.mdx.remote.debug.handlers_",pL))},B8c=function(p){var C=(VI+1)%50; VI=C;NJ[C]=p;Hr||(Hr=C==49)},W_F=function(){var p=pL; if(NJ[0]){var C=Hr?VI:-1,V={};do V={mT:void 0},C=(C+1)%50,V.mT=NJ[C],g.lr(p,function(N){return function(H){H(N.mT)}}(V)); while(C!=VI);NJ=Array(50);VI=-1;Hr=!1}},rmE=function(p,C){var V=(Date.now()-GWp)/1E3; V.toFixed&&(V=V.toFixed(3));var N=[];N.push("[",V+"s","] ");N.push("[","yt.mdx.remote","] ");N.push(p+": "+C,"\n");return N.join("")},X4=function(p){g.ca.call(this); this.Y=p;this.screens=[]},pWE=function(p,C){var V=p.get(C.uuid)||p.get(C.id); if(V)return p=V.name,V.id=C.id||V.id,V.name=C.name,V.token=C.token,V.uuid=C.uuid||V.uuid,V.name!=p;p.screens.push(C);return!0},CNP=function(p,C){var V=p.screens.length!=C.length; p.screens=g.MZ(p.screens,function(X){return!!fD1(C,X)}); for(var N=C.length,H=0;H<N;H++)V=pWE(p,C[H])||V;return V},jpf=function(p,C){var V=p.screens.length; p.screens=g.MZ(p.screens,function(N){return!(N||C?!N!=!C?0:N.id==C.id:1)}); return p.screens.length<V},V_2=function(p,C,V,N,H){g.ca.call(this); this.V=p;this.D=C;this.S=V;this.Y=N;this.W=H;this.C=0;this.T=null;this.Ha=NaN},iD=function(p){X4.call(this,"LocalScreenService"); this.C=p;this.T=NaN;dD(this);this.info("Initializing with "+uCr(this.screens))},NqF=function(p){if(p.screens.length){var C=g.bZ(p.screens,function(N){return N.id}),V=G3(p.C,"/pairing/get_lounge_token_batch"); p.C.sendRequest("POST",V,{screen_ids:C.join(",")},(0,g.g1)(p.HU,p),(0,g.g1)(p.G6,p))}},dD=function(p){if(g.Zr("deprecate_pair_servlet_enabled"))return CNP(p,[]); var C=Dvf(oQ2());C=g.MZ(C,function(V){return!V.uuid}); return CNP(p,C)},hu=function(p,C){xvy(g.bZ(p.screens,Sg2)); C&&kHY()},XW8=function(p,C){g.ca.call(this); this.Y=C;C=(C=g.zW("yt-remote-online-screen-ids")||"")?C.split(","):[];for(var V={},N=this.Y(),H=N.length,X=0;X<H;++X){var d=N[X].id;V[d]=g.W5(C,d)}this.T=V;this.W=p;this.V=this.S=NaN;this.C=null;H3F("Initialized with "+g.Y7(this.T))},dp8=function(p,C,V){var N=G3(p.W,"/pairing/get_screen_availability"); p.W.sendRequest("POST",N,{lounge_token:C.token},(0,g.g1)(function(H){H=H.screens||[];for(var X=H.length,d=0;d<X;++d)if(H[d].loungeToken==C.token){V(H[d].status=="online");return}V(!1)},p),(0,g.g1)(function(){V(!1)},p))},hVF=function(p,C){a:if(j6P(C)!=j6P(p.T))var V=!1; else{V=g.q$(C);for(var N=V.length,H=0;H<N;++H)if(!p.T[V[H]]){V=!1;break a}V=!0}V||(H3F("Updated online screens: "+g.Y7(p.T)),p.T=C,p.publish("screenChange"));i35(p)},sq=function(p){isNaN(p.V)||g.KO(p.V); p.V=g.F5((0,g.g1)(p.Xi,p),p.S>0&&p.S<g.QL()?2E4:1E4)},H3F=function(p){CL("OnlineScreenService",p)},spy=function(p){var C={}; g.lr(p.Y(),function(V){V.token?C[V.token]=V.id:this.sE("Requesting availability of screen w/o lounge token.")}); return C},i35=function(p){p=g.q$(g.ZH(p.T,function(C){return C})); g.hB(p);p.length?g.Yl("yt-remote-online-screen-ids",p.join(","),60):g.R_("yt-remote-online-screen-ids")},aR=function(p,C){C=C===void 0?!1:C; X4.call(this,"ScreenService");this.S=p;this.D=C;this.T=this.C=null;this.V=[];this.W={};a1y(this)},l12=function(p,C,V,N,H,X){p.info("getAutomaticScreenByIds "+V+" / "+C); V||(V=p.W[C]);var d=p.SI(),a=V?ay(d,V):null;V&&(p.D||a)||(a=ay(d,C));if(a){a.uuid=C;var E=Eq(p,a);dp8(p.T,E,function(l){H(l?E:null)})}else V?Et8(p,V,(0,g.g1)(function(l){var t=Eq(this,new iC({name:N, screenId:V,loungeToken:l,dialId:C||""}));dp8(this.T,t,function(c){H(c?t:null)})},p),X):H(null)},t_G=function(p,C){for(var V=p.screens.length,N=0;N<V;++N)if(p.screens[N].name==C)return p.screens[N]; return null},c1F=function(p,C,V){dp8(p.T,C,V)},Et8=function(p,C,V,N){p.info("requestLoungeToken_ for "+C); var H={postParams:{screen_ids:C},method:"POST",context:p,onSuccess:function(X,d){X=d&&d.screens||[];X[0]&&X[0].screenId==C?V(X[0].loungeToken):N(Error("Missing lounge token in token response"))}, onError:function(){N(Error("Request screen lounge token failed"))}}; g.qU(G3(p.S,"/pairing/get_lounge_token_batch"),H)},Tq5=function(p){p.screens=p.C.SI(); var C=p.W,V={},N;for(N in C)V[C[N]]=N;C=p.screens.length;for(N=0;N<C;++N){var H=p.screens[N];H.uuid=V[H.id]||""}p.info("Updated manual screens: "+uCr(p.screens))},a1y=function(p){M_1(p); p.C=new iD(p.S);p.C.subscribe("screenChange",(0,g.g1)(p.gF,p));Tq5(p);p.D||(p.V=Dvf(g.zW("yt-remote-automatic-screen-cache")||[]));M_1(p);p.info("Initializing automatic screens: "+uCr(p.V));p.T=new XW8(p.S,(0,g.g1)(p.SI,p,!0));p.T.subscribe("screenChange",(0,g.g1)(function(){this.publish("onlineScreenChange")},p))},Eq=function(p,C){var V=p.get(C.id); V?(V.uuid=C.uuid,C=V):((V=ay(p.V,C.uuid))?(V.id=C.id,V.token=C.token,C=V):p.V.push(C),p.D||J15(p));M_1(p);p.W[C.uuid]=C.id;g.Yl("yt-remote-device-id-map",p.W,31536E3);return C},J15=function(p){p=g.MZ(p.V,function(C){return C.idType!="shortLived"}); g.Yl("yt-remote-automatic-screen-cache",g.bZ(p,Sg2))},M_1=function(p){p.W=g.zW("yt-remote-device-id-map")||{}},lD=function(p,C,V){g.ca.call(this); this.Sa=V;this.S=p;this.C=C;this.T=null},tu=function(p,C){p.T=C; p.publish("sessionScreen",p.T)},mp8=function(p,C){p.T&&(p.T.token=C,Eq(p.S,p.T)); p.publish("sessionScreen",p.T)},cr=function(p,C){CL(p.Sa,C)},Ts=function(p,C,V){lD.call(this,p,C,"CastSession"); var N=this;this.config_=V;this.V=null;this.b_=(0,g.g1)(this.Fc,this);this.Vn=(0,g.g1)(this.lda,this);this.a$=g.F5(function(){vtF(N,null)},12E4); this.D=this.W=this.Y=this.J=0;this.sY=!1;this.Z="unknown"},S2p=function(p,C){g.KO(p.D); p.D=0;C==0?FW5(p):p.D=g.F5(function(){FW5(p)},C)},FW5=function(p){KWy(p,"getLoungeToken"); g.KO(p.W);p.W=g.F5(function(){Dpp(p,null)},3E4)},KWy=function(p,C){p.info("sendYoutubeMessage_: "+C+" "+g.Y7()); var V={};V.type=C;p.V?p.V.sendMessage("urn:x-cast:com.google.youtube.mdx",V,function(){},(0,g.g1)(function(){cr(this,"Failed to send message: "+C+".")},p)):cr(p,"Sending yt message without session: "+g.Y7(V))},u25=function(p,C){C?(p.info("onConnectedScreenId_: Received screenId: "+C),p.T&&p.T.id==C||p.FB(C,function(V){tu(p,V)},function(){return p.Pz()},5)):p.Pz(Error("Waiting for session status timed out."))},Up5=function(p,C,V){p.info("onConnectedScreenData_: Received screenData: "+JSON.stringify(C)); var N=new iC(C);Z3f(p,N,function(H){H?(p.sY=!0,Eq(p.S,N),tu(p,N),p.Z="unknown",S2p(p,V)):(g.Vg(Error("CastSession, RemoteScreen from screenData: "+JSON.stringify(C)+" is not online.")),p.Pz())},5)},vtF=function(p,C){g.KO(p.a$); p.a$=0;C?p.config_.enableCastLoungeToken&&C.loungeToken?C.deviceId?p.T&&p.T.uuid==C.deviceId||(C.loungeTokenRefreshIntervalMs?Up5(p,{name:p.C.friendlyName,screenId:C.screenId,loungeToken:C.loungeToken,dialId:C.deviceId,screenIdType:"shortLived"},C.loungeTokenRefreshIntervalMs):(g.Vg(Error("No loungeTokenRefreshIntervalMs presents in mdxSessionStatusData: "+JSON.stringify(C)+".")),u25(p,C.screenId))):(g.Vg(Error("No device id presents in mdxSessionStatusData: "+JSON.stringify(C)+".")),u25(p,C.screenId)): u25(p,C.screenId):p.Pz(Error("Waiting for session status timed out."))},Dpp=function(p,C){g.KO(p.W); p.W=0;var V=null;if(C)if(C.loungeToken){var N;((N=p.T)==null?void 0:N.token)==C.loungeToken&&(V="staleLoungeToken")}else V="missingLoungeToken";else V="noLoungeTokenResponse";V?(p.info("Did not receive a new lounge token in onLoungeToken_ with data: "+(JSON.stringify(C)+", error: "+V)),p.Z=V,S2p(p,3E4)):(mp8(p,C.loungeToken),p.sY=!1,p.Z="unknown",S2p(p,C.loungeTokenRefreshIntervalMs))},Z3f=function(p,C,V,N){g.KO(p.Y); p.Y=0;c1F(p.S,C,function(H){H||N<0?V(H):p.Y=g.F5(function(){Z3f(p,C,V,N-1)},300)})},f1r=function(p){g.KO(p.J); p.J=0;g.KO(p.Y);p.Y=0;g.KO(p.a$);p.a$=0;g.KO(p.W);p.W=0;g.KO(p.D);p.D=0},MJ=function(p,C,V,N){lD.call(this,p,C,"DialSession"); this.config_=N;this.V=this.J=null;this.Vn="";this.Ga=V;this.vr=null;this.a$=function(){}; this.Z=NaN;this.Wr=(0,g.g1)(this.qx,this);this.W=function(){}; this.D=this.Y=0;this.b_=!1;this.sY="unknown"},Ju=function(p){var C; return!!(p.config_.enableDialLoungeToken&&((C=p.V)==null?0:C.getDialAppInfo))},O3E=function(p){p.W=p.S.vL(p.Vn,p.C.label,p.C.friendlyName,Ju(p),function(C,V){p.W=function(){}; p.b_=!0;tu(p,C);C.idType=="shortLived"&&V>0&&mU(p,V)},function(C){p.W=function(){}; p.Pz(C)})},y1G=function(p){var C={}; C.pairingCode=p.Vn;C.theme=p.Ga;ziF()&&(C.env_useStageMdx=1);return g.rA(C)},q2F=function(p){return new Promise(function(C){p.Vn=ZdY(); if(p.vr){var V=new chrome.cast.DialLaunchResponse(!0,y1G(p));C(V);O3E(p)}else p.a$=function(){g.KO(p.Z);p.a$=function(){}; p.Z=NaN;var N=new chrome.cast.DialLaunchResponse(!0,y1G(p));C(N);O3E(p)},p.Z=g.F5(function(){p.a$()},100)})},b3E=function(p,C,V){p.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(C)); var N=new iC(C);return(new Promise(function(H){I1f(p,N,function(X){X?(p.b_=!0,Eq(p.S,N),tu(p,N),mU(p,V)):g.Vg(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(C)+" is not online."));H(X)},5)})).then(function(H){return H?new chrome.cast.DialLaunchResponse(!1):q2F(p)})},A1v=function(p,C){var V=p.J.receiver.label,N=p.C.friendlyName; return(new Promise(function(H){l12(p.S,V,C,N,function(X){X&&X.token&&tu(p,X);H(X)},function(X){cr(p,"Failed to get DIAL screen: "+X); H(null)})})).then(function(H){return H&&H.token?new chrome.cast.DialLaunchResponse(!1):q2F(p)})},I1f=function(p,C,V,N){g.KO(p.Y); p.Y=0;c1F(p.S,C,function(H){H||N<0?V(H):p.Y=g.F5(function(){I1f(p,C,V,N-1)},300)})},mU=function(p,C){p.info("getDialAppInfoWithTimeout_ "+C); Ju(p)&&(g.KO(p.D),p.D=0,C==0?ot0(p):p.D=g.F5(function(){ot0(p)},C))},ot0=function(p){Ju(p)&&p.V.getDialAppInfo(function(C){p.info("getDialAppInfo dialLaunchData: "+JSON.stringify(C)); C=C.extraData||{};var V=null;if(C.loungeToken){var N;((N=p.T)==null?void 0:N.token)==C.loungeToken&&(V="staleLoungeToken")}else V="missingLoungeToken";V?(p.sY=V,mU(p,3E4)):(p.b_=!1,p.sY="unknown",mp8(p,C.loungeToken),mU(p,C.loungeTokenRefreshIntervalMs))},function(C){p.info("getDialAppInfo error: "+C); p.sY="noLoungeTokenResponse";mU(p,3E4)})},k42=function(p){g.KO(p.Y); p.Y=0;g.KO(p.D);p.D=0;p.W();p.W=function(){}; g.KO(p.Z)},vr=function(p,C){lD.call(this,p,C,"ManualSession"); this.V=g.F5((0,g.g1)(this.bC,this,null),150)},F4=function(p,C){g.ca.call(this); this.config_=C;this.C=p;this.J=C.appId||"233637DE";this.S=C.theme||"cl";this.Z=C.disableCastApi||!1;this.Y=C.forceMirroring||!1;this.T=null;this.D=!1;this.V=[];this.W=(0,g.g1)(this.UZ$,this)},xp1=function(p,C){return C?g.L0(p.V,function(V){return hZ(C,V.label)},p):null},SW=function(p){CL("Controller",p)},L_c=function(p){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(p)},KL=function(p){return p.D||!!p.V.length||!!p.T},DP=function(p,C,V){C!=p.T&&(g.hf(p.T),(p.T=C)?(V?p.publish("yt-remote-cast2-receiver-resumed", C.C):p.publish("yt-remote-cast2-receiver-selected",C.C),C.subscribe("sessionScreen",(0,g.g1)(p.Dl,p,C)),C.subscribe("sessionFailed",function(){return Y2r(p,C)}),C.T?p.publish("yt-remote-cast2-session-change",C.T):V&&p.T.bC(null)):p.publish("yt-remote-cast2-session-change",null))},Y2r=function(p,C){p.T==C&&p.publish("yt-remote-cast2-session-failed")},zVc=function(p){var C=p.C.m9(),V=p.T&&p.T.C; p=g.bZ(C,function(N){V&&hZ(N,V.label)&&(V=null);var H=N.uuid?N.uuid:N.id,X=xp1(this,N);X?(X.label=H,X.friendlyName=N.name):(X=new chrome.cast.Receiver(H,N.name),X.receiverType=chrome.cast.ReceiverType.CUSTOM);return X},p); V&&(V.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(V=new chrome.cast.Receiver(V.label,V.friendlyName),V.receiverType=chrome.cast.ReceiverType.CUSTOM),p.push(V));return p},LW2=function(p,C,V,N){N.disableCastApi?uD("Cannot initialize because disabled by Mdx config."):RVr()?nt2(C,N)&&(eVy(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?PNy(p,V):(window.__onGCastApiAvailable=function(H,X){H?PNy(p,V):(ZP("Failed to load cast API: "+X),wW8(!1),eVy(!1),g.R_("yt-remote-cast-available"),g.R_("yt-remote-cast-receiver"), $pP(),V(!1))},N.loadCastApiSetupScript?g.md("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?nQ1()>=60&&rp0():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?$vv():nQ1()>=89?GH0():(Q6r(),JZ(Bf2.map(L2E))))):uD("Cannot initialize because not running Chrome")},$pP=function(){uD("dispose"); var p=Uq();p&&p.dispose();g.YH("yt.mdx.remote.cloudview.instance_",null);gt8(!1);g.MM(WWY);WWY.length=0},fL=function(){return!!g.zW("yt-remote-cast-installed")},Qpy=function(){var p=g.zW("yt-remote-cast-receiver"); return p?p.friendlyName:null},r1Y=function(){uD("clearCurrentReceiver"); g.R_("yt-remote-cast-receiver")},BqY=function(){return fL()?Uq()?Uq().getCastSession():(ZP("getCastSelector: Cast is not initialized."),null):(ZP("getCastSelector: Cast API is not installed!"),null)},G4r=function(){fL()?Uq()?Oq()?(uD("Requesting cast selector."),Uq().requestSession()):(uD("Wait for cast API to be ready to request the session."),WWY.push(g.T7("yt-remote-cast2-api-ready",G4r))):ZP("requestCastSelector: Cast is not initialized."):ZP("requestCastSelector: Cast API is not installed!")}, yI=function(p,C){Oq()?Uq().setConnectedScreenStatus(p,C):ZP("setConnectedScreenStatus called before ready.")},RVr=function(){var p=g.f0().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.An||p},pCp=function(p,C){Uq().init(p,C)},nt2=function(p,C){var V=!1; Uq()||(p=new F4(p,C),p.subscribe("yt-remote-cast2-availability-change",function(N){g.Yl("yt-remote-cast-available",N);T3("yt-remote-cast2-availability-change",N)}),p.subscribe("yt-remote-cast2-receiver-selected",function(N){uD("onReceiverSelected: "+N.friendlyName); g.Yl("yt-remote-cast-receiver",N);T3("yt-remote-cast2-receiver-selected",N)}),p.subscribe("yt-remote-cast2-receiver-resumed",function(N){uD("onReceiverResumed: "+N.friendlyName); g.Yl("yt-remote-cast-receiver",N);T3("yt-remote-cast2-receiver-resumed",N)}),p.subscribe("yt-remote-cast2-session-change",function(N){uD("onSessionChange: "+sx(N)); N||g.R_("yt-remote-cast-receiver");T3("yt-remote-cast2-session-change",N)}),g.YH("yt.mdx.remote.cloudview.instance_",p),V=!0); uD("cloudview.createSingleton_: "+V);return V},Uq=function(){return g.zV("yt.mdx.remote.cloudview.instance_")},PNy=function(p,C){wW8(!0); eVy(!1);pCp(p,function(V){V?(gt8(!0),g.J3("yt-remote-cast2-api-ready")):(ZP("Failed to initialize cast API."),wW8(!1),g.R_("yt-remote-cast-available"),g.R_("yt-remote-cast-receiver"),$pP());C(V)})},uD=function(p){CL("cloudview",p)},ZP=function(p){CL("cloudview",p)},wW8=function(p){uD("setCastInstalled_ "+p); g.Yl("yt-remote-cast-installed",p)},Oq=function(){return!!g.zV("yt.mdx.remote.cloudview.apiReady_")},gt8=function(p){uD("setApiReady_ "+p); g.YH("yt.mdx.remote.cloudview.apiReady_",p)},eVy=function(p){g.YH("yt.mdx.remote.cloudview.initializing_",p)},qJ=function(p){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.Y=this.D=0;this.trackData=null;this.uT=this.MR=!1;this.J=this.W=this.T=this.S=0;this.V=NaN;this.C=!1;this.reset(p)},CRf=function(p){p.audioTrackId=null; p.trackData=null;p.playerState=-1;p.MR=!1;p.uT=!1;p.D=0;p.Y=g.QL();p.S=0;p.T=0;p.W=0;p.J=0;p.V=NaN;p.C=!1},IR=function(p){return p.isPlaying()?(g.QL()-p.Y)/1E3:0},bD=function(p,C){p.D=C; p.Y=g.QL()},Au=function(p){switch(p.playerState){case 1:case 1081:return(g.QL()-p.Y)/1E3+p.D; case -1E3:return 0}return p.D},oR=function(p,C,V){var N=p.videoId; p.videoId=C;p.index=V;C!=N&&CRf(p)},jxr=function(p){var C={}; C.index=p.index;C.listId=p.listId;C.videoId=p.videoId;C.playerState=p.playerState;C.volume=p.volume;C.muted=p.muted;C.audioTrackId=p.audioTrackId;C.trackData=g.zh(p.trackData);C.hasPrevious=p.MR;C.hasNext=p.uT;C.playerTime=p.D;C.playerTimeAt=p.Y;C.seekableStart=p.S;C.seekableEnd=p.T;C.duration=p.W;C.loadedTime=p.J;C.liveIngestionTime=p.V;return C},xs=function(p,C){g.ca.call(this); var V=this;this.V=0;this.S=p;this.Y=[];this.W=new Am0;this.C=this.T=null;this.Z=(0,g.g1)(this.Gko,this);this.D=(0,g.g1)(this.wA,this);this.J=(0,g.g1)(this.Nye,this);this.a$=(0,g.g1)(this.e6o,this);var N=0;p?(N=p.getProxyState(),N!=3&&(p.subscribe("proxyStateChange",this.f0,this),VVG(this))):N=3;N!=0&&(C?this.f0(N):g.F5(function(){V.f0(N)},0)); (p=BqY())&&ks(this,p);this.subscribe("yt-remote-cast2-session-change",this.a$)},Ys=function(p){return new qJ(p.S.getPlayerContextData())},VVG=function(p){g.lr("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(C){this.Y.push(this.S.subscribe(C,g.Wv(this.BYo,C),this))},p)},Nyv=function(p){g.lr(p.Y,function(C){this.S.unsubscribeByKey(C)},p); p.Y.length=0},zs=function(p){return p.getState()==1},RR=function(p,C){var V=p.W; V.T.length+V.C.length<50&&p.W.enqueue(C)},H5P=function(p,C,V){var N=Ys(p); bD(N,V);N.playerState!=-1E3&&(N.playerState=C);nL(p,N)},eW=function(p,C,V){p.S.sendMessage(C,V)},nL=function(p,C){Nyv(p); p.S.setPlayerContextData(jxr(C));VVG(p)},ks=function(p,C){p.C&&(p.C.removeUpdateListener(p.Z),p.C.removeMediaListener(p.D),p.wA(null)); p.C=C;p.C&&(jW("Setting cast session: "+p.C.sessionId),p.C.addUpdateListener(p.Z),p.C.addMediaListener(p.D),p.C.media.length&&p.wA(p.C.media[0]))},XCr=function(p){var C=p.T.media,V=p.T.customData; if(C&&V){var N=Ys(p);C.contentId!=N.videoId&&jW("Cast changing video to: "+C.contentId);N.videoId=C.contentId;N.playerState=V.playerState;bD(N,p.T.getEstimatedTime());nL(p,N)}else jW("No cast media video. Ignoring state update.")},Pr=function(p,C,V){return(0,g.g1)(function(N){this.sE("Failed to "+C+" with cast v2 channel. Error code: "+N.code); N.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.sE("Retrying "+C+" using MDx browser channel."),eW(this,C,V))},p)},LL=function(p,C,V,N){N=N===void 0?!1:N; g.ca.call(this);var H=this;this.Y=NaN;this.Vn=!1;this.Z=this.J=this.b_=this.sY=NaN;this.a$=[];this.W=this.D=this.S=this.T=this.C=null;this.vr=p;this.Wr=N;this.a$.push(g.UB(window,"beforeunload",function(){H.Tq(2)})); this.V=[];this.T=new qJ;this.Ga=C.id;this.Sa=C.idType;this.C=$5Y(this.vr,V,this.WL,this.Sa=="shortLived",this.Ga);this.C.listen("channelOpened",function(){deP(H)}); this.C.listen("channelClosed",function(){wD("Channel closed");isNaN(H.Y)?tZ(!0):tZ();H.dispose()}); this.C.listen("channelError",function(X){tZ();isNaN(H.KJ())?(X==1&&H.Sa=="shortLived"&&H.publish("browserChannelAuthError",X),wD("Channel error: "+X+" without reconnection"),H.dispose()):(H.Vn=!0,wD("Channel error: "+X+" with reconnection in "+H.KJ()+" ms"),$s(H,2))}); this.C.listen("channelMessage",function(X){i5G(H,X)}); this.C.W8(C.token);this.subscribe("remoteQueueChange",function(){var X=H.T.videoId;g.nK()&&g.Yl("yt-remote-session-video-id",X)})},hk2=function(p){return g.L0(p.V,function(C){return C.type=="LOUNGE_SCREEN"})},wD=function(p){CL("conn",p)},$s=function(p,C){p.publish("proxyStateChange",C)},sxY=function(p){p.Y=g.F5(function(){wD("Connecting timeout"); p.Tq(1)},2E4)},ah2=function(p){g.KO(p.Y); p.Y=NaN},EpE=function(p){g.KO(p.sY); p.sY=NaN},tVE=function(p){lhY(p); p.b_=g.F5(function(){gD(p,"getNowPlaying")},2E4)},lhY=function(p){g.KO(p.b_); p.b_=NaN},deP=function(p){wD("Channel opened"); p.Vn&&(p.Vn=!1,EpE(p),p.sY=g.F5(function(){wD("Timing out waiting for a screen.");p.Tq(1)},15E3))},Ty1=function(p,C){var V=null; if(C){var N=hk2(p);N&&(V={clientName:N.clientName,deviceMake:N.brand,deviceModel:N.model,osVersion:N.osVersion})}g.YH("yt.mdx.remote.remoteClient_",V);C&&(ah2(p),EpE(p));V=p.C.QT()&&isNaN(p.Y);C==V?C&&($s(p,1),gD(p,"getSubtitlesTrack")):C?(p.w4()&&p.T.reset(),$s(p,1),gD(p,"getNowPlaying"),cNp(p)):p.Tq(1)},MVG=function(p,C){var V=C.params.videoId; delete C.params.videoId;V==p.T.videoId&&(g.oa(C.params)?p.T.trackData=null:p.T.trackData=C.params,p.publish("remotePlayerChange"))},JNP=function(p,C,V){var N=C.params.videoId||C.params.video_id,H=parseInt(C.params.currentIndex,10); p.T.listId=C.params.listId||p.T.listId;oR(p.T,N,H);p.publish("remoteQueueChange",V)},vp8=function(p,C){C.params=C.params||{}; JNP(p,C,"NOW_PLAYING_MAY_CHANGE");mey(p,C);p.publish("autoplayDismissed")},mey=function(p,C){var V=parseInt(C.params.currentTime||C.params.current_time,10); bD(p.T,isNaN(V)?0:V);V=parseInt(C.params.state,10);V=isNaN(V)?-1:V;V==-1&&p.T.playerState==-1E3&&(V=-1E3);p.T.playerState=V;V=Number(C.params.loadedTime);p.T.J=isNaN(V)?0:V;p.T.Kt(Number(C.params.duration));V=p.T;var N=Number(C.params.liveIngestionTime);V.V=N;V.C=isNaN(N)?!1:!0;V=p.T;N=Number(C.params.seekableStartTime);C=Number(C.params.seekableEndTime);V.S=isNaN(N)?0:N;V.T=isNaN(C)?0:C;p.T.playerState==1?tVE(p):lhY(p);p.publish("remotePlayerChange")},FeP=function(p,C){if(p.T.playerState!=-1E3){var V= 1085; switch(parseInt(C.params.adState,10)){case 1:V=1081;break;case 2:V=1084;break;case 0:V=1083}p.T.playerState=V;C=parseInt(C.params.currentTime,10);bD(p.T,isNaN(C)?0:C);p.publish("remotePlayerChange")}},SX1=function(p,C){var V=C.params.muted=="true"; p.T.volume=parseInt(C.params.volume,10);p.T.muted=V;p.publish("remotePlayerChange")},KeF=function(p,C){p.D=C.params.videoId; p.publish("nowAutoplaying",parseInt(C.params.timeout,10))},Dep=function(p,C){p.D=C.params.videoId||null; p.publish("autoplayUpNext",p.D)},uDP=function(p,C){p.W=C.params.autoplayMode; p.publish("autoplayModeChange",p.W);p.W=="DISABLED"&&p.publish("autoplayDismissed")},Z5F=function(p,C){var V=C.params.hasNext=="true"; p.T.MR=C.params.hasPrevious=="true";p.T.uT=V;p.publish("previousNextChange")},i5G=function(p,C){C=C.message; C.params?wD("Received: action="+C.action+", params="+g.Y7(C.params)):wD("Received: action="+C.action+" {}");switch(C.action){case "loungeStatus":C=jA(C.params.devices);p.V=g.bZ(C,function(N){return new di(N)}); C=!!g.L0(p.V,function(N){return N.type=="LOUNGE_SCREEN"}); Ty1(p,C);C=p.cY("mlm");p.publish("multiStateLoopEnabled",C);break;case "loungeScreenDisconnected":g.B5(p.V,function(N){return N.type=="LOUNGE_SCREEN"}); Ty1(p,!1);break;case "remoteConnected":var V=new di(jA(C.params.device));g.L0(p.V,function(N){return N.rI(V)})||Cay(p.V,V); break;case "remoteDisconnected":V=new di(jA(C.params.device));g.B5(p.V,function(N){return N.rI(V)}); break;case "gracefulDisconnect":break;case "playlistModified":JNP(p,C,"QUEUE_MODIFIED");break;case "nowPlaying":vp8(p,C);break;case "onStateChange":mey(p,C);break;case "onAdStateChange":FeP(p,C);break;case "onVolumeChanged":SX1(p,C);break;case "onSubtitlesTrackChanged":MVG(p,C);break;case "nowAutoplaying":KeF(p,C);break;case "autoplayDismissed":p.publish("autoplayDismissed");break;case "autoplayUpNext":Dep(p,C);break;case "onAutoplayModeChanged":uDP(p,C);break;case "onHasPreviousNextChanged":Z5F(p, C);break;case "requestAssistedSignIn":p.publish("assistedSignInRequested",C.params.authCode);break;case "onLoopModeChanged":p.publish("loopModeChange",C.params.loopMode);break;default:wD("Unrecognized action: "+C.action)}},cNp=function(p){g.KO(p.Z); p.Z=g.F5(function(){p.Tq(1)},864E5)},gD=function(p,C,V){V?wD("Sending: action="+C+", params="+g.Y7(V)):wD("Sending: action="+C); p.C.sendMessage(C,V)},Ue8=function(p){X4.call(this,"ScreenServiceProxy"); this.CO=p;this.T=[];this.T.push(this.CO.$_s("screenChange",(0,g.g1)(this.y3,this)));this.T.push(this.CO.$_s("onlineScreenChange",(0,g.g1)(this.uO_,this)))},Ihr=function(p,C){Yg8(); if(!ct||!ct.get("yt-remote-disable-remote-module-for-dev")){C=g.pO("MDX_CONFIG")||C;Odv();bd8();Wr||(Wr=new Bt(C?C.loungeApiHost:void 0),ziF()&&(Wr.T="/api/loungedev"));QI||(QI=g.zV("yt.mdx.remote.deferredProxies_")||[],g.YH("yt.mdx.remote.deferredProxies_",QI));fh5();var V=rD();if(!V){var N=new aR(Wr,C?C.disableAutomaticScreenCache||!1:!1);g.YH("yt.mdx.remote.screenService_",N);V=rD();var H={};C&&(H={appId:C.appId,disableDial:C.disableDial,theme:C.theme,loadCastApiSetupScript:C.loadCastApiSetupScript, disableCastApi:C.disableCastApi,enableDialLoungeToken:C.enableDialLoungeToken,enableCastLoungeToken:C.enableCastLoungeToken,forceMirroring:C.forceMirroring});g.YH("yt.mdx.remote.enableConnectWithInitialState_",C?C.enableConnectWithInitialState||!1:!1);LW2(p,N,function(X){X?Br()&&yI(Br(),"YouTube TV"):N.subscribe("onlineScreenChange",function(){T3("yt-remote-receiver-availability-change")})},H)}C&&!g.zV("yt.mdx.remote.initialized_")&&(g.YH("yt.mdx.remote.initialized_",!0),Gs("Initializing: "+g.Y7(C)), pQ.push(g.T7("yt-remote-cast2-api-ready",function(){T3("yt-remote-api-ready")})),pQ.push(g.T7("yt-remote-cast2-availability-change",function(){T3("yt-remote-receiver-availability-change")})),pQ.push(g.T7("yt-remote-cast2-receiver-selected",function(){CQ(null); T3("yt-remote-auto-connect","cast-selector-receiver")})),pQ.push(g.T7("yt-remote-cast2-receiver-resumed",function(){T3("yt-remote-receiver-resumed","cast-selector-receiver")})),pQ.push(g.T7("yt-remote-cast2-session-change",O50)),pQ.push(g.T7("yt-remote-connection-change",function(X){X?yI(Br(),"YouTube TV"):jc()||(yI(null,null),r1Y())})),pQ.push(g.T7("yt-remote-cast2-session-failed",function(){T3("yt-remote-connection-failed")})),p=yNy(),C.isAuto&&(p.id+="#dial"),H=C.capabilities||[],g.Zr("desktop_enable_autoplay")&& H.push("atp"),H.length>0&&(p.capabilities=H),p.name=C.device,p.app=C.app,(C=C.theme)&&(p.theme=C),Gs(" -- with channel params: "+g.Y7(p)),p?(g.Yl("yt-remote-session-app",p.app),g.Yl("yt-remote-session-name",p.name)):(g.R_("yt-remote-session-app"),g.R_("yt-remote-session-name")),g.YH("yt.mdx.remote.channelParams_",p),V.start(),Br()||qXr())}},b50=function(){var p=rD().CO.$_gos(); var C=Vp();C&&Nu()&&(fD1(p,C)||p.push(C));return Uv2(p)},opy=function(){var p=ANF(); !p&&fL()&&Qpy()&&(p={key:"cast-selector-receiver",name:Qpy()});return p},ANF=function(){var p=b50(),C=Vp(); C||(C=jc());return g.L0(p,function(V){return C&&hZ(C,V.key)?!0:!1})},Vp=function(){var p=Br(); if(!p)return null;var C=rD().SI();return ay(C,p)},O50=function(p){Gs("remote.onCastSessionChange_: "+sx(p)); if(p){var C=Vp();if(C&&C.id==p.id){if(yI(C.id,"YouTube TV"),p.idType=="shortLived"&&(p=p.token))HA&&(HA.token=p),(C=Nu())&&C.W8(p)}else C&&XT(),da(p,1)}else Nu()&&XT()},XT=function(){Oq()?Uq().stopSession():ZP("stopSession called before API ready."); var p=Nu();p&&(p.disconnect(1),k1f(null))},xeY=function(){var p=Nu(); return!!p&&p.getProxyState()!=3},Gs=function(p){CL("remote",p)},rD=function(){if(!YXE){var p=g.zV("yt.mdx.remote.screenService_"); YXE=p?new Ue8(p):null}return YXE},Br=function(){return g.zV("yt.mdx.remote.currentScreenId_")},zky=function(p){g.YH("yt.mdx.remote.currentScreenId_",p)},Rk5=function(){return g.zV("yt.mdx.remote.connectData_")},CQ=function(p){g.YH("yt.mdx.remote.connectData_",p)},Nu=function(){return g.zV("yt.mdx.remote.connection_")},k1f=function(p){var C=Nu(); CQ(null);p||zky("");g.YH("yt.mdx.remote.connection_",p);QI&&(g.lr(QI,function(V){V(p)}),QI.length=0); C&&!p?T3("yt-remote-connection-change",!1):!C&&p&&T3("yt-remote-connection-change",!0)},jc=function(){var p=g.nK(); if(!p)return null;var C=rD();if(!C)return null;C=C.SI();return ay(C,p)},da=function(p,C){Br(); Vp()&&Vp();if(iE)HA=p;else{zky(p.id);var V=g.zV("yt.mdx.remote.enableConnectWithInitialState_")||!1;p=new LL(Wr,p,yNy(),V);p.connect(C,Rk5());p.subscribe("beforeDisconnect",function(N){T3("yt-remote-before-disconnect",N)}); p.subscribe("beforeDispose",function(){Nu()&&(Nu(),k1f(null))}); p.subscribe("browserChannelAuthError",function(){var N=Vp();N&&N.idType=="shortLived"&&(Oq()?Uq().handleBrowserChannelAuthError():ZP("refreshLoungeToken called before API ready."))}); k1f(p)}},qXr=function(){var p=jc(); p?(Gs("Resume connection to: "+sx(p)),da(p,0)):(tZ(),r1Y(),Gs("Skipping connecting because no session screen found."))},fh5=function(){var p=yNy(); if(g.oa(p)){p=lC();var C=g.zW("yt-remote-session-name")||"",V=g.zW("yt-remote-session-app")||"";p={device:"REMOTE_CONTROL",id:p,name:C,app:V,mdxVersion:3};p.authuser=String(g.pO("SESSION_INDEX","0"));(C=g.pO("DELEGATED_SESSION_ID"))&&(p.pageId=String(C));g.YH("yt.mdx.remote.channelParams_",p)}},yNy=function(){return g.zV("yt.mdx.remote.channelParams_")||{}},PRp=function(p,C,V){g.z.call(this); var N=this;this.module=p;this.N=C;this.Ac=V;this.events=new g.YZ(this);this.S=!1;this.W=new g.E3(64);this.T=new g.N8(this.sN,500,this);this.C=new g.N8(this.Ir,1E3,this);this.D=new mF(this.Eq$,0,this);this.V={};this.J=new g.N8(this.aS,1E3,this);this.Y=new vt(this.seekTo,1E3,this);this.Z=this.events.U(this.N,"onVolumeChange",function(H){np2(N,H)}); g.R(this,this.events);this.events.U(C,"onCaptionsTrackListChanged",this.yc_);this.events.U(C,"captionschanged",this.WMr);this.events.U(C,"captionssettingschanged",this.zH);this.events.U(C,"videoplayerreset",this.yF);this.events.U(C,"mdxautoplaycancel",function(){N.Ac.Z0()}); C.G("enable_mdx_video_play_directly")&&this.events.U(C,"videodatachange",function(){ek0(N.module)||hS(N)||am(N,0)}); p=this.Ac;p.fS();p.subscribe("proxyStateChange",this.pB,this);p.subscribe("remotePlayerChange",this.y9,this);p.subscribe("remoteQueueChange",this.yF,this);p.subscribe("previousNextChange",this.hN,this);p.subscribe("nowAutoplaying",this.W0,this);p.subscribe("autoplayDismissed",this.T0,this);g.R(this,this.T);g.R(this,this.C);g.R(this,this.D);g.R(this,this.J);g.R(this,this.Y);this.zH();this.yF();this.y9()},np2=function(p,C){if(hS(p)){p.Ac.unsubscribe("remotePlayerChange",p.y9,p); var V=Math.round(C.volume);C=!!C.muted;var N=Ys(p.Ac);if(V!==N.volume||C!==N.muted)p.Ac.setVolume(V,C),p.J.start();p.Ac.subscribe("remotePlayerChange",p.y9,p)}},wCf=function(p){p.va(0); p.T.stop();p.aN(new g.E3(64))},$ey=function(p,C){if(hS(p)&&!p.S){var V=null; C&&(V={style:p.N.getSubtitlesUserSettings()},Object.assign(V,C));p.Ac.fI(p.N.getVideoData(1).videoId,V);p.V=Ys(p.Ac).trackData}},am=function(p,C){var V=p.N.getPlaylist(); if(V==null?0:V.listId){var N=V.index;var H=V.listId.toString()}V=p.N.getVideoData(1);p.Ac.playVideo(V.videoId,C,N,H,V.playerParams,V.Sa,p6E(V));p.aN(new g.E3(1))},Ley=function(p,C){if(C){var V=p.N.getOption("captions","tracklist",{UQ:1}); V&&V.length?(p.N.setOption("captions","track",C),p.S=!1):(p.N.loadModule("captions"),p.S=!0)}else p.N.setOption("captions","track",{})},hS=function(p){return Ys(p.Ac).videoId===p.N.getVideoData(1).videoId},Ew=function(){g.w.call(this,{L:"div", B:"ytp-mdx-popup-dialog",X:{role:"dialog"},j:[{L:"div",B:"ytp-mdx-popup-dialog-inner-content",j:[{L:"div",B:"ytp-mdx-popup-title",Ak:"Voc\u00ea n\u00e3o fez login"},{L:"div",B:"ytp-mdx-popup-description",Ak:"Os v\u00eddeos que voc\u00ea assistir poder\u00e3o ser adicionados ao hist\u00f3rico de visualiza\u00e7\u00e3o da TV e influenciar\u00e3o as recomenda\u00e7\u00f5es dela. Para evitar isso, cancele e fa\u00e7a login no YouTube em um computador."},{L:"div",B:"ytp-mdx-privacy-popup-buttons",j:[{L:"button", i_:["ytp-button","ytp-mdx-privacy-popup-cancel"],Ak:"Cancelar"},{L:"button",i_:["ytp-button","ytp-mdx-privacy-popup-confirm"],Ak:"Confirmar"}]}]}]});this.T=new g.i$(this,250);this.cancelButton=this.rV("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.rV("ytp-mdx-privacy-popup-confirm");g.R(this,this.T);this.U(this.cancelButton,"click",this.C);this.U(this.confirmButton,"click",this.V)},aG=function(p){g.w.call(this,{L:"div", B:"ytp-remote",j:[{L:"div",B:"ytp-remote-display-status",j:[{L:"div",B:"ytp-remote-display-status-icon",j:[g.vl1()]},{L:"div",B:"ytp-remote-display-status-text",Ak:"{{statustext}}"}]}]});this.api=p;this.T=new g.i$(this,250);g.R(this,this.T);this.U(p,"presentingplayerstatechange",this.onStateChange);this.Ba(p.getPlayerStateObject())},ly=function(p,C){g.NA.call(this,"Reproduzir em",1,p,C); this.N=p;this.hV={};this.U(p,"onMdxReceiversChange",this.S);this.U(p,"presentingplayerstatechange",this.S);this.S()},gp1=function(p){g.Ar.call(this,p); this.zz={key:ZdY(),name:"Este computador"};this.MB=null;this.subscriptions=[];this.hJ=this.Ac=null;this.hV=[this.zz];this.x6=this.zz;this.OO=new g.E3(64);this.s3=0;this.q5=-1;this.iK=!1;this.zP=this.Fz=null;if(!g.yj(this.player.K())&&!g.$U(this.player.K())){p=this.player;var C=g.U5(p);C&&(C=C.uF())&&(C=new ly(p,C),g.R(this,C));C=new aG(p);g.R(this,C);g.gb(p,C.element,4);this.Fz=new Ew;g.R(this,this.Fz);g.gb(p,this.Fz.element,4);this.iK=!!jc()}},tv=function(p){p.zP&&(p.player.removeEventListener("presentingplayerstatechange", p.zP),p.zP=null)},Wev=function(p,C,V){p.OO=V; p.player.publish("presentingplayerstatechange",new g.FK(V,C))},cm=function(p,C){if(C.key!==p.x6.key)if(C.key===p.zz.key)XT(); else if(ek0(p)&&QxE(p),p.x6=C,!p.player.K().G("disable_mdx_connection_in_mdx_module_for_music_web")||!g.$U(p.player.K())){var V=p.player.getPlaylistId();var N=p.player.getVideoData(1);var H=N.videoId;if(!V&&!H||(p.player.getAppState()===2||p.player.getAppState()===1)&&p.player.K().G("should_clear_video_data_on_player_cued_unstarted"))N=null;else{var X=p.player.getPlaylist();if(X){var d=[];for(var a=0;a<X.getLength();a++)d[a]=g.qA(X,a).videoId}else d=[H];X=p.player.getCurrentTime(1);p={videoIds:d, listId:V,videoId:H,playerParams:N.playerParams,clickTrackingParams:N.Sa,index:Math.max(p.player.getPlaylistIndex(),0),currentTime:X===0?void 0:X};(N=p6E(N))&&(p.locationInfo=N);N=p}Gs("Connecting to: "+g.Y7(C));C.key=="cast-selector-receiver"?(CQ(N||null),C=N||null,Oq()?Uq().setLaunchParams(C):ZP("setLaunchParams called before ready.")):!N&&xeY()&&Br()==C.key?T3("yt-remote-connection-change",!0):(XT(),CQ(N||null),N=rD().SI(),(C=ay(N,C.key))&&da(C,1))}},ek0=function(p){var C=p.player.K(); return!C.G("mdx_enable_privacy_disclosure_ui")||p.isLoggedIn()||p.iK||!p.Fz?!1:g.wG(C)||g.LI(C)},QxE=function(p){p.player.getPlayerStateObject().isPlaying()?p.player.pauseVideo():(p.zP=function(C){!p.iK&&g.Kt(C,8)&&(p.player.pauseVideo(),tv(p))},p.player.addEventListener("presentingplayerstatechange",p.zP)); p.Fz&&p.Fz.hc();Nu()||(iE=!0)}; hiY.prototype.T=function(p){this.C.Xu("/client_streamz/youtube/living_room/mdx/channel/opened",p)}; s62.prototype.T=function(p){this.C.Xu("/client_streamz/youtube/living_room/mdx/channel/closed",p)}; aDy.prototype.T=function(p){this.C.Xu("/client_streamz/youtube/living_room/mdx/channel/message_received",p)}; EQE.prototype.T=function(p){this.C.Xu("/client_streamz/youtube/living_room/mdx/channel/error",p)}; lDP.prototype.T=function(){this.C.Xu("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")}; t7r.prototype.T=function(){this.C.Xu("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")}; g.h=Ht.prototype;g.h.mm=function(){XZ(this);for(var p=[],C=0;C<this.T.length;C++)p.push(this.C[this.T[C]]);return p}; g.h.h9=function(){XZ(this);return this.T.concat()}; g.h.has=function(p){return NC(this.C,p)}; g.h.rI=function(p,C){if(this===p)return!0;if(this.size!=p.size)return!1;C=C||TfF;XZ(this);for(var V,N=0;V=this.T[N];N++)if(!C(this.get(V),p.get(V)))return!1;return!0}; g.h.isEmpty=function(){return this.size==0}; g.h.clear=function(){this.C={};this.Z4=this.size=this.T.length=0}; g.h.remove=function(p){return this.delete(p)}; g.h.delete=function(p){return NC(this.C,p)?(delete this.C[p],--this.size,this.Z4++,this.T.length>2*this.size&&XZ(this),!0):!1}; g.h.get=function(p,C){return NC(this.C,p)?this.C[p]:C}; g.h.set=function(p,C){NC(this.C,p)||(this.size+=1,this.T.push(p),this.Z4++);this.C[p]=C}; g.h.forEach=function(p,C){for(var V=this.h9(),N=0;N<V.length;N++){var H=V[N],X=this.get(H);p.call(C,X,H,this)}}; g.h.clone=function(){return new Ht(this)}; g.h.keys=function(){return g.ZJ(this.qB(!0)).T()}; g.h.values=function(){return g.ZJ(this.qB(!1)).T()}; g.h.entries=function(){var p=this;return cp0(this.keys(),function(C){return[C,p.get(C)]})}; g.h.qB=function(p){XZ(this);var C=0,V=this.Z4,N=this,H=new g.EH;H.next=function(){if(V!=N.Z4)throw Error("The map has changed since the iterator was created");if(C>=N.T.length)return g.EU;var X=N.T[C++];return g.lf(p?X:N.C[X])}; return H}; var vQF={hyk:"atp",cWn:"ska",zLr:"que",PT_:"mus",Fmx:"sus",Cfe:"dsp",BoS:"seq",fMe:"mic",iqS:"dpa",D3e:"cds",HMS:"mlm",vmk:"dsdtr",KY_:"ntb",t1a:"vsp",Yfk:"scn",f__:"rpe",Em_:"dcn",u5S:"dcp",yWn:"pas",mwV:"drq",wIe:"opf",RYY:"els",PMn:"isg",g5$:"svq",pI_:"mvp",BiV:"ads"},F25={DX_:"u",w$a:"cl",MOo:"k",L8_:"i",nm$:"cr",ROe:"m",j5o:"g",Hs:"up"};di.prototype.rI=function(p){return p?this.id==p.id:!1}; var IDG="",ct=null;Riy.prototype.flush=function(p,C){p=p===void 0?[]:p;C=C===void 0?!1:C;if(g.Zr("enable_client_streamz_web")){p=g.F(p);for(var V=p.next();!V.done;V=p.next())V=g.vKV(V.value),V={serializedIncrementBatch:g.mq(V.T())},g.t1("streamzIncremented",V,{sendIsolatedPayload:C})}}; var MC,W21=ei0("loadCastFramework")||ei0("loadCastApplicationFramework"),Bf2=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Bv(mF,g.z);g.h=mF.prototype;g.h.PT=function(p){this.S=arguments;this.T=!1;this.Ha?this.V=g.QL()+this.Xg:this.Ha=g.Ib(this.W,this.Xg)}; g.h.stop=function(){this.Ha&&(g.xH.clearTimeout(this.Ha),this.Ha=null);this.V=null;this.T=!1;this.S=[]}; g.h.pause=function(){++this.C}; g.h.resume=function(){this.C&&(--this.C,!this.C&&this.T&&(this.T=!1,this.Y.apply(null,this.S)))}; g.h.CS=function(){this.stop();mF.XF.CS.call(this)}; g.h.R7=function(){this.Ha&&(g.xH.clearTimeout(this.Ha),this.Ha=null);this.V?(this.Ha=g.Ib(this.W,this.V-g.QL()),this.V=null):this.C?this.T=!0:(this.T=!1,this.Y.apply(null,this.S))};g.v(vt,g.z);g.h=vt.prototype;g.h.VI=function(p){this.V=arguments;this.Ha||this.C?this.T=!0:pd1(this)}; g.h.stop=function(){this.Ha&&(g.xH.clearTimeout(this.Ha),this.Ha=null,this.T=!1,this.V=null)}; g.h.pause=function(){this.C++}; g.h.resume=function(){this.C--;this.C||!this.T||this.Ha||(this.T=!1,pd1(this))}; g.h.CS=function(){g.z.prototype.CS.call(this);this.stop()};FZ.prototype.stringify=function(p){return g.xH.JSON.stringify(p,void 0)}; FZ.prototype.parse=function(p){return g.xH.JSON.parse(p,void 0)};g.Bv(C15,g.wW);g.Bv(jKv,g.wW);var Ve1=null;g.Bv(HOY,g.wW);g.Bv(Xd2,g.wW);g.Bv(dUY,g.wW);uC.prototype.debug=function(){}; uC.prototype.info=function(){}; uC.prototype.warning=function(){};var cw5={},te5={};g.h=ZG.prototype;g.h.setTimeout=function(p){this.Qn=p}; g.h.Dt=function(p){p=p.target;var C=this.Y_;C&&g.Hi(p)==3?C.VI():this.Mv(p)}; g.h.Mv=function(p){try{if(p==this.T)a:{var C=g.Hi(this.T),V=this.T.C,N=this.T.getStatus();if(!(C<3)&&(C!=3||this.T&&(this.C.C||g.dU(this.T)||g.i3(this.T)))){this.Wr||C!=4||V==7||(V==8||N<=0?SA(3):SA(2));Jwc(this);var H=this.T.getStatus();this.Wc=H;var X=lr2(this);if(this.Y=H==200){if(this.bx&&!this.R$){b:{if(this.T){var d=g.h$(this.T,"X-HTTP-Initial-Response");if(d&&!g.FG(d)){var a=d;break b}}a=null}if(p=a)this.R$=!0,UUp(this,p);else{this.Y=!1;this.W=3;Kl(12);fl(this);Ox(this);break a}}if(this.Sa){p= !0;for(var E;!this.Wr&&this.D<X.length;)if(E=TmY(this,X),E==te5){C==4&&(this.W=4,Kl(14),p=!1);break}else if(E==cw5){this.W=4;Kl(15);p=!1;break}else UUp(this,E);ED8(this)&&this.D!=0&&(this.C.T=this.C.T.slice(this.D),this.D=0);C!=4||X.length!=0||this.C.C||(this.W=1,Kl(16),p=!1);this.Y=this.Y&&p;p?X.length>0&&!this.ER&&(this.ER=!0,this.V.LF(this)):(fl(this),Ox(this))}else UUp(this,X);C==4&&fl(this);this.Y&&!this.Wr&&(C==4?mU1(this.V,this):(this.Y=!1,Ux(this)))}else g.eJe(this.T),H==400&&X.indexOf("Unknown SID")> 0?(this.W=3,Kl(12)):(this.W=0,Kl(13)),fl(this),Ox(this)}}}catch(l){}finally{}}; g.h.cancel=function(){this.Wr=!0;fl(this)}; g.h.YS=function(){this.a$=null;var p=Date.now();p-this.Mo>=0?(this.Ga!=2&&(SA(3),Kl(17)),fl(this),this.W=2,Ox(this)):Mey(this,this.Mo-p)}; g.h.getLastError=function(){return this.W}; g.h.hq=function(){return this.T};OO0.prototype.cancel=function(){this.V=qkY(this);if(this.C)this.C.cancel(),this.C=null;else if(this.T&&this.T.size!==0){for(var p=g.F(this.T.values()),C=p.next();!C.done;C=p.next())C.value.cancel();this.T.clear()}};g.h=kQ1.prototype;g.h.Z2=8;g.h.KO=1;g.h.connect=function(p,C,V,N){Kl(0);this.YM=p;this.Wr=C||{};V&&N!==void 0&&(this.Wr.OSID=V,this.Wr.OAID=N);this.R$=this.Q$;this.vr=DUf(this,null,this.YM);bC(this)}; g.h.disconnect=function(){Ykr(this);if(this.KO==3){var p=this.l_++,C=this.vr.clone();g.OV(C,"SID",this.S);g.OV(C,"RID",p);g.OV(C,"TYPE","terminate");kh(this,C);p=new ZG(this,this.S,p);p.Ga=2;p.J=pl(C.clone());C=!1;if(g.xH.navigator&&g.xH.navigator.sendBeacon)try{C=g.xH.navigator.sendBeacon(p.J.toString(),"")}catch(V){}!C&&g.xH.Image&&((new Image).src=p.J,C=!0);C||(p.T=arP(p.V,null),p.T.send(p.J));p.sY=Date.now();Ux(p)}wdv(this)}; g.h.Jp=function(){return this.KO==0}; g.h.getState=function(){return this.KO}; g.h.Tw=function(p){if(this.Y)if(this.Y=null,this.KO==1){if(!p){this.l_=Math.floor(Math.random()*1E5);p=this.l_++;var C=new ZG(this,"",p),V=this.Z;this.Wc&&(V?(V=g.Y5(V),g.Ra(V,this.Wc)):V=this.Wc);this.D!==null||this.Mo||(C.vr=V,V=null);var N;if(this.F$)a:{for(var H=N=0;H<this.V.length;H++){b:{var X=this.V[H];if("__data__"in X.map&&(X=X.map.__data__,typeof X==="string")){X=X.length;break b}X=void 0}if(X===void 0)break;N+=X;if(N>4096){N=H;break a}if(N===4096||H===this.V.length-1){N=H+1;break a}}N= 1E3}else N=1E3;N=nD8(this,C,N);H=this.vr.clone();g.OV(H,"RID",p);g.OV(H,"CVER",22);this.Sa&&g.OV(H,"X-HTTP-Session-Id",this.Sa);kh(this,H);V&&(this.Mo?N="headers="+g.VW(g.W9v(V))+"&"+N:this.D&&g.bp(H,this.D,V));K1y(this.C,C);this.N5&&g.OV(H,"TYPE","init");this.F$?(g.OV(H,"$req",N),g.OV(H,"SID","null"),C.bx=!0,sKf(C,H,null)):sKf(C,H,N);this.KO=2}}else this.KO==3&&(p?erv(this,p):this.V.length==0||ywr(this.C)||erv(this))}; g.h.yc=function(){this.J=null;P1P(this);if(this.wy&&!(this.Qn||this.T==null||this.uJ<=0)){var p=2*this.uJ;this.Vn=DG((0,g.g1)(this.fhr,this),p)}}; g.h.fhr=function(){this.Vn&&(this.Vn=null,this.R$=!1,this.Qn=!0,Kl(10),qC(this),P1P(this))}; g.h.LF=function(p){this.T==p&&this.wy&&!this.Qn&&(xU8(this),this.Qn=!0,Kl(11))}; g.h.BT=function(){this.a$!=null&&(this.a$=null,qC(this),F11(this),Kl(19))}; g.h.dnx=function(p){p?Kl(2):Kl(1)}; g.h.isActive=function(){return!!this.W&&this.W.isActive(this)}; g.h=L1p.prototype;g.h.nI=function(){}; g.h.b$=function(){}; g.h.ag=function(){}; g.h.kP=function(){}; g.h.isActive=function(){return!0}; g.h.tb=function(){};g.Bv(Yh,g.im);Yh.prototype.open=function(){this.T.W=this.V;this.Y&&(this.T.Ga=!0);this.T.connect(this.W,this.C||void 0)}; Yh.prototype.close=function(){this.T.disconnect()}; Yh.prototype.send=function(p){var C=this.T;if(typeof p==="string"){var V={};V.__data__=p;p=V}else this.S&&(V={},V.__data__=g.Y7(p),p=V);C.V.push(new frF(C.eZ++,p));C.KO==3&&bC(C)}; Yh.prototype.CS=function(){this.T.W=null;delete this.V;this.T.disconnect();delete this.T;Yh.XF.CS.call(this)}; g.Bv(W1f,C15);g.Bv(QKP,jKv);g.Bv(xh,L1p);xh.prototype.nI=function(){this.T.dispatchEvent("m")}; xh.prototype.b$=function(p){this.T.dispatchEvent(new W1f(p))}; xh.prototype.ag=function(p){this.T.dispatchEvent(new QKP(p))}; xh.prototype.kP=function(){this.T.dispatchEvent("n")};var Ry=new g.im;g.v(GQp,g.wW);g.h=eA.prototype;g.h.SA=null;g.h.QA=!1;g.h.Cf=null;g.h.E9=null;g.h.uj=null;g.h.CC=null;g.h.Vm=null;g.h.nC=null;g.h.uv=null;g.h.sf=null;g.h.xT=0;g.h.UN=null;g.h.Aj=null;g.h.E5=null;g.h.Ep=-1;g.h.Oj=!0;g.h.SP=!1;g.h.Sp=0;g.h.aY=null;var HKf={},N85={};g.h=eA.prototype;g.h.setTimeout=function(p){this.C=p}; g.h.Kb=function(p){p=p.target;var C=this.aY;C&&g.Hi(p)==3?C.VI():this.CI(p)}; g.h.CI=function(p){try{if(p==this.sf)a:{var C=g.Hi(this.sf),V=this.sf.C,N=this.sf.getStatus();if(g.Vf&&!g.JB("420+")){if(C<4)break a}else if(C<3||C==3&&!g.dU(this.sf))break a;this.SP||C!=4||V==7||(V==8||N<=0?this.T.cS(3):this.T.cS(2));iKy(this);var H=this.sf.getStatus();this.Ep=H;var X=g.dU(this.sf);if(this.QA=H==200){C==4&&Pt(this);if(this.Sa){for(p=!0;!this.SP&&this.xT<X.length;){var d=Xwy(this,X);if(d==N85){C==4&&(this.E5=4,nl(15),p=!1);break}else if(d==HKf){this.E5=4;nl(16);p=!1;break}else s_2(this, d)}C==4&&X.length==0&&(this.E5=1,nl(17),p=!1);this.QA=this.QA&&p;p||(Pt(this),h8E(this))}else s_2(this,X);this.QA&&!this.SP&&(C==4?this.T.z9(this):(this.QA=!1,Vzr(this)))}else H==400&&X.indexOf("Unknown SID")>0?(this.E5=3,nl(13)):(this.E5=0,nl(14)),Pt(this),h8E(this)}}catch(a){}finally{}}; g.h.cancel=function(){this.SP=!0;Pt(this)}; g.h.Uw=function(){this.Cf=null;var p=Date.now();p-this.E9>=0?(this.CC!=2&&this.T.cS(3),Pt(this),this.E5=2,nl(18),h8E(this)):d51(this,this.E9-p)}; g.h.getLastError=function(){return this.E5};g.h=l32.prototype;g.h.mG=null;g.h.q1=null;g.h.Ys=!1;g.h.ih=null;g.h.wb=null;g.h.xE=-1;g.h.sJ=null;g.h.PO=null;g.h.connect=function(p){this.ih=p;p=$h(this.T,null,this.ih);nl(3);Date.now();var C=this.T.Z;C!=null?(this.sJ=C[0],(this.PO=C[1])?(this.wb=1,tz0(this)):(this.wb=2,cmp(this))):(Cl(p,"MODE","init"),this.q1=new eA(this),this.q1.SA=this.mG,j_y(this.q1,p,!1,null,!0),this.wb=0)}; g.h.aD=function(p){if(p)this.wb=2,cmp(this);else{nl(4);var C=this.T;C.zR=C.Cv.xE;Qd(C,9)}p&&this.cS(2)}; g.h.uh=function(p){return this.T.uh(p)}; g.h.abort=function(){this.q1&&(this.q1.cancel(),this.q1=null);this.xE=-1}; g.h.Jp=function(){return!1}; g.h.AC=function(p,C){this.xE=p.Ep;if(this.wb==0)if(C){try{var V=this.C.parse(C)}catch(N){p=this.T;p.zR=this.xE;Qd(p,2);return}this.sJ=V[0];this.PO=V[1]}else p=this.T,p.zR=this.xE,Qd(p,2);else this.wb==2&&(this.Ys?(nl(7),Date.now()):C=="11111"?(nl(6),this.Ys=!0,Date.now(),this.xE=200,this.q1.cancel(),nl(12),Ll(this.T,this,!0)):(nl(8),Date.now(),this.Ys=!1))}; g.h.z9=function(){this.xE=this.q1.Ep;if(this.q1.QA)this.wb==0?this.PO?(this.wb=1,tz0(this)):(this.wb=2,cmp(this)):this.wb==2&&(this.Ys?(nl(12),Ll(this.T,this,!0)):(nl(11),Ll(this.T,this,!1)));else{this.wb==0?nl(9):this.wb==2&&nl(10);var p=this.T;this.q1.getLastError();p.zR=this.xE;Qd(p,2)}}; g.h.mO=function(){return this.T.mO()}; g.h.isActive=function(){return this.T.isActive()}; g.h.cS=function(p){this.T.cS(p)};g.h=T8G.prototype;g.h.vP=null;g.h.z2=null;g.h.Ev=null;g.h.FT=null;g.h.Wq=null;g.h.IY=null;g.h.xP=null;g.h.fN=null;g.h.ij=0;g.h.gp=0;g.h.Rx=null;g.h.w2=null;g.h.sK=null;g.h.zs=null;g.h.Cv=null;g.h.QM=null;g.h.rH=-1;g.h.s6=-1;g.h.zR=-1;g.h.sI=0;g.h.A7=0;g.h.m0=8;g.Bv(JmP,g.wW);g.Bv(m58,g.wW);g.h=T8G.prototype;g.h.connect=function(p,C,V,N,H){nl(0);this.Wq=C;this.z2=V||{};N&&H!==void 0&&(this.z2.OSID=N,this.z2.OAID=H);this.J?(z3((0,g.g1)(this.Ua,this,p),100),F_y(this)):this.Ua(p)}; g.h.disconnect=function(){SB2(this);if(this.T==3){var p=this.ij++,C=this.IY.clone();g.OV(C,"SID",this.S);g.OV(C,"RID",p);g.OV(C,"TYPE","terminate");Wt(this,C);p=new eA(this,this.S,p);p.CC=2;p.Vm=pl(C.clone());(new Image).src=p.Vm.toString();p.uj=Date.now();Vzr(p)}I3Y(this)}; g.h.Ua=function(p){this.Cv=new l32(this);this.Cv.mG=this.vP;this.Cv.C=this.W;this.Cv.connect(p)}; g.h.Jp=function(){return this.T==0}; g.h.getState=function(){return this.T}; g.h.rE=function(p){this.w2=null;U55(this,p)}; g.h.Ig=function(){this.sK=null;this.FT=new eA(this,this.S,"rpc",this.D);this.FT.SA=this.vP;this.FT.Sp=0;var p=this.xP.clone();g.OV(p,"RID","rpc");g.OV(p,"SID",this.S);g.OV(p,"CI",this.QM?"0":"1");g.OV(p,"AID",this.rH);Wt(this,p);g.OV(p,"TYPE","xmlhttp");j_y(this.FT,p,!0,this.fN,!1)}; g.h.AC=function(p,C){if(this.T!=0&&(this.FT==p||this.Ev==p))if(this.zR=p.Ep,this.Ev==p&&this.T==3)if(this.m0>7){try{var V=this.W.parse(C)}catch(N){V=null}if(Array.isArray(V)&&V.length==3)if(p=V,p[0]==0)a:{if(!this.sK){if(this.FT)if(this.FT.uj+3E3<this.Ev.uj)gi(this),this.FT.cancel(),this.FT=null;else break a;ymc(this);nl(19)}}else this.s6=p[1],0<this.s6-this.rH&&p[2]<37500&&this.QM&&this.A7==0&&!this.zs&&(this.zs=z3((0,g.g1)(this.Ow,this),6E3));else Qd(this,11)}else C!=null&&Qd(this,11);else if(this.FT== p&&gi(this),!g.FG(C))for(p=this.W.parse(C),C=0;C<p.length;C++)V=p[C],this.rH=V[0],V=V[1],this.T==2?V[0]=="c"?(this.S=V[1],this.fN=V[2],V=V[3],V!=null?this.m0=V:this.m0=6,this.T=3,this.Rx&&this.Rx.E6(),this.xP=$h(this,this.mO()?this.fN:null,this.Wq),f31(this)):V[0]=="stop"&&Qd(this,7):this.T==3&&(V[0]=="stop"?Qd(this,7):V[0]!="noop"&&this.Rx&&this.Rx.Sc(V),this.A7=0)}; g.h.Ow=function(){this.zs!=null&&(this.zs=null,this.FT.cancel(),this.FT=null,ymc(this),nl(20))}; g.h.z9=function(p){if(this.FT==p){gi(this);this.FT=null;var C=2}else if(this.Ev==p)this.Ev=null,C=1;else return;this.zR=p.Ep;if(this.T!=0)if(p.QA)if(C==1){C=p.uv?p.uv.length:0;p=Date.now()-p.uj;var V=Ry;V.dispatchEvent(new JmP(V,C,p,this.sI));vlY(this);this.V.length=0}else f31(this);else{V=p.getLastError();var N;if(!(N=V==3||V==7||V==0&&this.zR>0)){if(N=C==1)this.Ev||this.w2||this.T==1||this.sI>=2?N=!1:(this.w2=z3((0,g.g1)(this.rE,this,p),OK0(this,this.sI)),this.sI++,N=!0);N=!(N||C==2&&ymc(this))}if(N)switch(V){case 1:Qd(this, 5);break;case 4:Qd(this,10);break;case 3:Qd(this,6);break;case 7:Qd(this,12);break;default:Qd(this,2)}}}; g.h.lD=function(p){if(!g.W5(arguments,this.T))throw Error("Unexpected channel state: "+this.T);}; g.h.oBV=function(p){p?nl(2):(nl(1),qBf(this,8))}; g.h.uh=function(p){if(p)throw Error("Can't create secondary domain capable XhrIo object.");p=new g.jE;p.D=!1;return p}; g.h.isActive=function(){return!!this.Rx&&this.Rx.isActive(this)}; g.h.cS=function(p){var C=Ry;C.dispatchEvent(new m58(C,p))}; g.h.mO=function(){return!1}; g.h=bK5.prototype;g.h.E6=function(){}; g.h.Sc=function(){}; g.h.Vc=function(){}; g.h.LN=function(){}; g.h.u$=function(){return{}}; g.h.isActive=function(){return!0};g.h=Am0.prototype;g.h.enqueue=function(p){this.C.push(p)}; g.h.isEmpty=function(){return this.T.length===0&&this.C.length===0}; g.h.clear=function(){this.T=[];this.C=[]}; g.h.contains=function(p){return g.W5(this.T,p)||g.W5(this.C,p)}; g.h.remove=function(p){var C=this.T;var V=(0,g.elL)(C,p);V>=0?(g.Q8(C,V),C=!0):C=!1;return C||g.rY(this.C,p)}; g.h.mm=function(){for(var p=[],C=this.T.length-1;C>=0;--C)p.push(this.T[C]);C=this.C.length;for(var V=0;V<C;++V)p.push(this.C[V]);return p};g.v(ol1,g.wW);g.v(kWv,g.wW);g.Bv(ri,g.z);g.h=ri.prototype;g.h.N7x=function(){this.Xg=Math.min(3E5,this.Xg*2);this.V();this.C&&this.start()}; g.h.start=function(){var p=this.Xg+15E3*Math.random();g.HF(this.T,p);this.C=Date.now()+p}; g.h.stop=function(){this.T.stop();this.C=0}; g.h.isActive=function(){return this.T.isActive()}; g.h.reset=function(){this.T.stop();this.Xg=5E3};g.Bv(YBc,bK5);g.h=YBc.prototype;g.h.subscribe=function(p,C,V){return this.V.subscribe(p,C,V)}; g.h.unsubscribe=function(p,C,V){return this.V.unsubscribe(p,C,V)}; g.h.LO=function(p){return this.V.LO(p)}; g.h.publish=function(p,C){return this.V.publish.apply(this.V,arguments)}; g.h.dispose=function(){this.a$||(this.a$=!0,g.hf(this.V),this.disconnect(),g.hf(this.C),this.C=null,this.b_=function(){return""})}; g.h.fS=function(){return this.a$}; g.h.connect=function(p,C,V){if(!this.T||this.T.getState()!=2){this.Z="";this.C.stop();this.Y=p||null;this.W=C||0;p=this.sY+"/test";C=this.sY+"/bind";var N=new T8G(V?V.firstTestResults:null,V?V.secondTestResults:null,this.Ga),H=this.T;H&&(H.Rx=null);N.Rx=this;this.T=N;z82(this);if(this.T){N=g.pO("ID_TOKEN");var X=this.T.vP||{};N?X["x-youtube-identity-token"]=N:delete X["x-youtube-identity-token"];this.T.vP=X}H?(H.getState()!=3&&D5y(H)==0||H.getState(),this.T.connect(p,C,this.D,H.S,H.rH)):V?this.T.connect(p, C,this.D,V.sessionId,V.arrayId):this.T.connect(p,C,this.D)}}; g.h.disconnect=function(p){this.J=p||0;this.C.stop();z82(this);this.T&&(this.T.getState()==3&&U55(this.T),this.T.disconnect());this.J=0}; g.h.sendMessage=function(p,C){p={_sc:p};C&&g.Ra(p,C);this.C.isActive()||(this.T?this.T.getState():0)==2?this.S.push(p):this.QT()&&(z82(this),K_2(this.T,p))}; g.h.E6=function(){this.C.reset();this.Y=null;this.W=0;if(this.S.length){var p=this.S;this.S=[];for(var C=p.length,V=0;V<C;++V)K_2(this.T,p[V])}this.publish("handlerOpened");this.vr.T("BROWSER_CHANNEL")}; g.h.Vc=function(p){var C=p==2&&this.T.zR==401;p==4||C||this.C.start();this.publish("handlerError",p,C);this.Sa.T("BROWSER_CHANNEL")}; g.h.LN=function(p,C){if(!this.C.isActive())this.publish("handlerClosed");else if(C)for(var V=C.length,N=0;N<V;++N){var H=C[N].map;H&&this.S.push(H)}this.Vn.T("BROWSER_CHANNEL");p&&this.Y_.C.G9("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps",p.length);C&&this.l_.C.G9("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps",C.length)}; g.h.u$=function(){var p={v:2};this.Z&&(p.gsessionid=this.Z);this.W!=0&&(p.ui=""+this.W);this.J!=0&&(p.ui=""+this.J);this.Y&&g.Ra(p,this.Y);return p}; g.h.Sc=function(p){p[0]=="S"?this.Z=p[1]:p[0]=="gracefulReconnect"?(this.C.start(),this.T.disconnect()):this.publish("handlerMessage",new x5Y(p[0],p[1]));this.Wr.T("BROWSER_CHANNEL")}; g.h.QT=function(){return!!this.T&&this.T.getState()==3}; g.h.W8=function(p){(this.D.loungeIdToken=p)||this.C.stop();if(this.R$&&this.T){var C=this.T.vP||{};p?C["X-YouTube-LoungeId-Token"]=p:delete C["X-YouTube-LoungeId-Token"];this.T.vP=C}}; g.h.getDeviceId=function(){return this.D.id}; g.h.Rb=function(){return this.C.isActive()?this.C.C-Date.now():NaN}; g.h.k0=function(){var p=this.C;g.XV(p.T);p.start()}; g.h.X1o=function(){this.C.isActive();D5y(this.T)==0&&this.connect(this.Y,this.W)};Bt.prototype.sendRequest=function(p,C,V,N,H,X,d){p={format:X?"RAW":"JSON",method:p,context:this,timeout:5E3,withCredentials:!!d,onSuccess:g.Wv(this.S,N,!X),onError:g.Wv(this.V,H),onTimeout:g.Wv(this.W,H)};V&&(p.postParams=V,p.headers={"Content-Type":"application/x-www-form-urlencoded"});return g.qU(C,p)}; Bt.prototype.S=function(p,C,V,N){C?p(N):p({text:V.responseText})}; Bt.prototype.V=function(p,C){p(Error("Request error: "+C.status))}; Bt.prototype.W=function(p){p(Error("request timed out"))};g.v(R8F,g.im);g.h=R8F.prototype;g.h.connect=function(p,C,V){this.FO.connect(p,C,V)}; g.h.disconnect=function(p){this.FO.disconnect(p)}; g.h.k0=function(){this.FO.k0()}; g.h.getDeviceId=function(){return this.FO.getDeviceId()}; g.h.Rb=function(){return this.FO.Rb()}; g.h.QT=function(){return this.FO.QT()}; g.h.Jb=function(){this.dispatchEvent("channelOpened");var p=this.FO,C=this.T;g.Yl("yt-remote-session-browser-channel",{firstTestResults:[""],secondTestResults:!p.T.QM,sessionId:p.T.S,arrayId:p.T.rH});g.Yl("yt-remote-session-screen-id",C);p=Ex();C=lC();g.W5(p,C)||p.push(C);qg1(p);bd8()}; g.h.onClosed=function(){this.dispatchEvent("channelClosed")}; g.h.onMessage=function(p){this.dispatchEvent(new ol1(p))}; g.h.onError=function(p){this.dispatchEvent(new kWv(p?1:0))}; g.h.sendMessage=function(p,C){this.FO.sendMessage(p,C)}; g.h.W8=function(p){this.FO.W8(p)}; g.h.dispose=function(){this.FO.dispose()};g.h=nlv.prototype; g.h.connect=function(p,C){p=p===void 0?{}:p;C=C===void 0?0:C;this.Y!==2&&(this.V.stop(),this.J=p,this.D=C,PO0(this),(p=g.pO("ID_TOKEN"))?this.S["x-youtube-identity-token"]=p:delete this.S["x-youtube-identity-token"],this.T&&(this.C.device=this.T.device,this.C.name=this.T.name,this.C.app=this.T.app,this.C.id=this.T.id,this.T.Q$_&&(this.C.mdxVersion=""+this.T.Q$_),this.T.theme&&(this.C.theme=this.T.theme),this.T.capabilities&&(this.C.capabilities=this.T.capabilities),this.T.Ww&&(this.C.cst=this.T.Ww), this.T.authuser&&(this.C.authuser=this.T.authuser),this.T.pageId&&(this.C.pageId=this.T.pageId)),this.D!==0?this.C.ui=""+this.D:delete this.C.ui,Object.assign(this.C,this.J),this.channel=new Yh(this.pathPrefix,{TV$:"gsessionid",j$_:this.S,Xr$:this.C}),this.channel.open(),this.Y=2,e81(this))}; g.h.disconnect=function(p){this.Z=p===void 0?0:p;this.V.stop();PO0(this);this.channel&&(this.Z!==0?this.C.ui=""+this.Z:delete this.C.ui,this.channel.close());this.Z=0}; g.h.Rb=function(){return this.V.isActive()?this.V.C-Date.now():NaN}; g.h.k0=function(){var p=this.V;g.XV(p.T);p.start()}; g.h.sendMessage=function(p,C){this.channel&&(PO0(this),p=Object.assign({},{_sc:p},C),this.channel.send(p))}; g.h.W8=function(p){p||this.V.stop();p?this.S["X-YouTube-LoungeId-Token"]=p:delete this.S["X-YouTube-LoungeId-Token"]}; g.h.getDeviceId=function(){return this.T?this.T.id:""}; g.h.publish=function(p){return this.W.publish.apply(this.W,[p].concat(g.K(g.US.apply(1,arguments))))}; g.h.subscribe=function(p,C,V){return this.W.subscribe(p,C,V)}; g.h.unsubscribe=function(p,C,V){return this.W.unsubscribe(p,C,V)}; g.h.LO=function(p){return this.W.LO(p)}; g.h.dispose=function(){this.a$||(this.a$=!0,g.hf(this.W),this.disconnect(),g.hf(this.V),this.sY=function(){return""})}; g.h.fS=function(){return this.a$};g.v(wwr,g.im);g.h=wwr.prototype;g.h.connect=function(p,C){this.T.connect(p,C)}; g.h.disconnect=function(p){this.T.disconnect(p)}; g.h.k0=function(){this.T.k0()}; g.h.getDeviceId=function(){return this.T.getDeviceId()}; g.h.Rb=function(){return this.T.Rb()}; g.h.QT=function(){return this.T.Y===3}; g.h.Q0=function(){this.dispatchEvent("channelOpened")}; g.h.onClosed=function(){this.dispatchEvent("channelClosed")}; g.h.onMessage=function(p){this.dispatchEvent(new ol1(p))}; g.h.onError=function(){this.dispatchEvent(new kWv(this.T.Ld===401?1:0))}; g.h.sendMessage=function(p,C){this.T.sendMessage(p,C)}; g.h.W8=function(p){this.T.W8(p)}; g.h.dispose=function(){this.T.dispose()};var GWp=Date.now(),pL=null,NJ=Array(50),VI=-1,Hr=!1;g.Bv(X4,g.ca);X4.prototype.SI=function(){return this.screens}; X4.prototype.contains=function(p){return!!fD1(this.screens,p)}; X4.prototype.get=function(p){return p?ay(this.screens,p):null}; X4.prototype.info=function(p){CL(this.Y,p)};g.v(V_2,g.ca);g.h=V_2.prototype;g.h.start=function(){!this.T&&isNaN(this.Ha)&&this.xv()}; g.h.stop=function(){this.T&&(this.T.abort(),this.T=null);isNaN(this.Ha)||(g.KO(this.Ha),this.Ha=NaN)}; g.h.CS=function(){this.stop();g.ca.prototype.CS.call(this)}; g.h.xv=function(){this.Ha=NaN;this.T=g.qU(G3(this.V,"/pairing/get_screen"),{method:"POST",postParams:{pairing_code:this.D},timeout:5E3,onSuccess:(0,g.g1)(this.o7,this),onError:(0,g.g1)(this.wp,this),onTimeout:(0,g.g1)(this.jC,this)})}; g.h.o7=function(p,C){this.T=null;p=C.screen||{};p.dialId=this.S;p.name=this.Y;C=-1;this.W&&p.shortLivedLoungeToken&&p.shortLivedLoungeToken.value&&p.shortLivedLoungeToken.refreshIntervalMs&&(p.screenIdType="shortLived",p.loungeToken=p.shortLivedLoungeToken.value,C=p.shortLivedLoungeToken.refreshIntervalMs);this.publish("pairingComplete",new iC(p),C)}; g.h.wp=function(p){this.T=null;p.status&&p.status==404?this.C>=rNP.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(p=rNP[this.C],this.Ha=g.F5((0,g.g1)(this.xv,this),p),this.C++):this.publish("pairingFailed",Error("Server error "+p.status))}; g.h.jC=function(){this.T=null;this.publish("pairingFailed",Error("Server not responding"))}; var rNP=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Bv(iD,X4);g.h=iD.prototype;g.h.start=function(){dD(this)&&this.publish("screenChange");!g.zW("yt-remote-lounge-token-expiration")&&NqF(this);g.KO(this.T);this.T=g.F5((0,g.g1)(this.start,this),1E4)}; g.h.add=function(p,C){dD(this);pWE(this,p);hu(this,!1);this.publish("screenChange");C(p);p.token||NqF(this)}; g.h.remove=function(p,C){var V=dD(this);jpf(this,p)&&(hu(this,!1),V=!0);C(p);V&&this.publish("screenChange")}; g.h.Jy=function(p,C,V,N){var H=dD(this),X=this.get(p.id);X?(X.name!=C&&(X.name=C,hu(this,!1),H=!0),V(p)):N(Error("no such local screen."));H&&this.publish("screenChange")}; g.h.CS=function(){g.KO(this.T);iD.XF.CS.call(this)}; g.h.HU=function(p){dD(this);var C=this.screens.length;p=p&&p.screens||[];for(var V=p.length,N=0;N<V;++N){var H=p[N],X=this.get(H.screenId);X&&(X.token=H.loungeToken,--C)}hu(this,!C);C&&CL(this.Y,"Missed "+C+" lounge tokens.")}; g.h.G6=function(p){CL(this.Y,"Requesting lounge tokens failed: "+p)};g.v(XW8,g.ca);g.h=XW8.prototype;g.h.start=function(){var p=parseInt(g.zW("yt-remote-fast-check-period")||"0",10);(this.S=g.QL()-144E5<p?0:p)?sq(this):(this.S=g.QL()+3E5,g.Yl("yt-remote-fast-check-period",this.S),this.Xi())}; g.h.isEmpty=function(){return g.oa(this.T)}; g.h.update=function(){H3F("Updating availability on schedule.");var p=this.Y(),C=g.ZH(this.T,function(V,N){return V&&!!ay(p,N)},this); hVF(this,C)}; g.h.CS=function(){g.KO(this.V);this.V=NaN;this.C&&(this.C.abort(),this.C=null);g.ca.prototype.CS.call(this)}; g.h.Xi=function(){g.KO(this.V);this.V=NaN;this.C&&this.C.abort();var p=spy(this);if(j6P(p)){var C=G3(this.W,"/pairing/get_screen_availability");this.C=this.W.sendRequest("POST",C,{lounge_token:g.q$(p).join(",")},(0,g.g1)(this.nt_,this,p),(0,g.g1)(this.b7o,this))}else hVF(this,{}),sq(this)}; g.h.nt_=function(p,C){this.C=null;var V=g.q$(spy(this));if(g.af(V,g.q$(p))){C=C.screens||[];V={};for(var N=C.length,H=0;H<N;++H)V[p[C[H].loungeToken]]=C[H].status=="online";hVF(this,V);sq(this)}else this.sE("Changing Screen set during request."),this.Xi()}; g.h.b7o=function(p){this.sE("Screen availability failed: "+p);this.C=null;sq(this)}; g.h.sE=function(p){CL("OnlineScreenService",p)};g.Bv(aR,X4);g.h=aR.prototype;g.h.start=function(){this.C.start();this.T.start();this.screens.length&&(this.publish("screenChange"),this.T.isEmpty()||this.publish("onlineScreenChange"))}; g.h.add=function(p,C,V){this.C.add(p,C,V)}; g.h.remove=function(p,C,V){this.C.remove(p,C,V);this.T.update()}; g.h.Jy=function(p,C,V,N){this.C.contains(p)?this.C.Jy(p,C,V,N):(p="Updating name of unknown screen: "+p.name,CL(this.Y,p),N(Error(p)))}; g.h.SI=function(p){return p?this.screens:g.Gp(this.screens,g.MZ(this.V,function(C){return!this.contains(C)},this))}; g.h.m9=function(){return g.MZ(this.SI(!0),function(p){return!!this.T.T[p.id]},this)}; g.h.vL=function(p,C,V,N,H,X){var d=this;this.info("getDialScreenByPairingCode "+p+" / "+C);var a=new V_2(this.S,p,C,V,N);a.subscribe("pairingComplete",function(E,l){g.hf(a);H(Eq(d,E),l)}); a.subscribe("pairingFailed",function(E){g.hf(a);X(E)}); a.start();return(0,g.g1)(a.stop,a)}; g.h.Xc=function(p,C,V,N){g.qU(G3(this.S,"/pairing/get_screen"),{method:"POST",postParams:{pairing_code:p},timeout:5E3,onSuccess:(0,g.g1)(function(H,X){H=new iC(X.screen||{});if(!H.name||t_G(this,H.name)){a:{X=H.name;for(var d=2,a=C(X,d);t_G(this,a);){d++;if(d>20)break a;a=C(X,d)}X=a}H.name=X}V(Eq(this,H))},this), onError:(0,g.g1)(function(H){N(Error("pairing request failed: "+H.status))},this), onTimeout:(0,g.g1)(function(){N(Error("pairing request timed out."))},this)})}; g.h.CS=function(){g.hf(this.C);g.hf(this.T);aR.XF.CS.call(this)}; g.h.gF=function(){Tq5(this);this.publish("screenChange");this.T.update()}; aR.prototype.dispose=aR.prototype.dispose;g.Bv(lD,g.ca);g.h=lD.prototype;g.h.Pz=function(p){this.fS()||(p&&(cr(this,""+p),this.publish("sessionFailed")),this.T=null,this.publish("sessionScreen",null))}; g.h.info=function(p){CL(this.Sa,p)}; g.h.zw=function(){return null}; g.h.Eq=function(p){var C=this.C;p?(C.displayStatus=new chrome.cast.ReceiverDisplayStatus(p,[]),C.displayStatus.showStop=!0):C.displayStatus=null;chrome.cast.setReceiverDisplayStatus(C,(0,g.g1)(function(){this.info("Updated receiver status for "+C.friendlyName+": "+p)},this),(0,g.g1)(function(){cr(this,"Failed to update receiver status for: "+C.friendlyName)},this))}; g.h.CS=function(){this.Eq("");lD.XF.CS.call(this)};g.v(Ts,lD);g.h=Ts.prototype;g.h.V7=function(p){if(this.V){if(this.V==p)return;cr(this,"Overriding cast session with new session object");f1r(this);this.sY=!1;this.Z="unknown";this.V.removeUpdateListener(this.b_);this.V.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Vn)}this.V=p;this.V.addUpdateListener(this.b_);this.V.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.Vn);KWy(this,"getMdxSessionStatus")}; g.h.bC=function(p){this.info("launchWithParams no-op for Cast: "+g.Y7(p))}; g.h.stop=function(){this.V?this.V.stop((0,g.g1)(function(){this.Pz()},this),(0,g.g1)(function(){this.Pz(Error("Failed to stop receiver app."))},this)):this.Pz(Error("Stopping cast device without session."))}; g.h.Eq=function(){}; g.h.CS=function(){this.info("disposeInternal");f1r(this);this.V&&(this.V.removeUpdateListener(this.b_),this.V.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Vn));this.V=null;lD.prototype.CS.call(this)}; g.h.lda=function(p,C){if(!this.fS())if(C)if(C=jA(C),g.Pv(C))switch(p=""+C.type,C=C.data||{},this.info("onYoutubeMessage_: "+p+" "+g.Y7(C)),p){case "mdxSessionStatus":vtF(this,C);break;case "loungeToken":Dpp(this,C);break;default:cr(this,"Unknown youtube message: "+p)}else cr(this,"Unable to parse message.");else cr(this,"No data in message.")}; g.h.FB=function(p,C,V,N){g.KO(this.J);this.J=0;l12(this.S,this.C.label,p,this.C.friendlyName,(0,g.g1)(function(H){H?C(H):N>=0?(cr(this,"Screen "+p+" appears to be offline. "+N+" retries left."),this.J=g.F5((0,g.g1)(this.FB,this,p,C,V,N-1),300)):V(Error("Unable to fetch screen."))},this),V)}; g.h.zw=function(){return this.V}; g.h.Fc=function(p){this.fS()||p||(cr(this,"Cast session died."),this.Pz())};g.v(MJ,lD);g.h=MJ.prototype;g.h.V7=function(p){this.V=p;this.V.addUpdateListener(this.Wr)}; g.h.bC=function(p){this.vr=p;this.a$()}; g.h.stop=function(){k42(this);this.V?this.V.stop((0,g.g1)(this.Pz,this,null),(0,g.g1)(this.Pz,this,"Failed to stop DIAL device.")):this.Pz()}; g.h.CS=function(){k42(this);this.V&&this.V.removeUpdateListener(this.Wr);this.V=null;lD.prototype.CS.call(this)}; g.h.qx=function(p){this.fS()||p||(cr(this,"DIAL session died."),this.W(),this.W=function(){},this.Pz())};g.v(vr,lD);vr.prototype.stop=function(){this.Pz()}; vr.prototype.V7=function(){}; vr.prototype.bC=function(){g.KO(this.V);this.V=NaN;var p=ay(this.S.SI(),this.C.label);p?tu(this,p):this.Pz(Error("No such screen"))}; vr.prototype.CS=function(){g.KO(this.V);this.V=NaN;lD.prototype.CS.call(this)};g.v(F4,g.ca);g.h=F4.prototype; g.h.init=function(p,C){chrome.cast.timeout.requestSession=3E4;var V=new chrome.cast.SessionRequest(this.J,[chrome.cast.Capability.AUDIO_OUT]);g.Zr("desktop_enable_cast_connect")&&(V.androidReceiverCompatible=!0);this.Z||(V.dialRequest=new chrome.cast.DialRequest("YouTube"));var N=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;p=p||this.Y?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var H=(0,g.g1)(this.gGV,this);V=new chrome.cast.ApiConfig(V,(0,g.g1)(this.Rv, this),H,N,p);V.customDialLaunchCallback=(0,g.g1)(this.Byk,this);chrome.cast.initialize(V,(0,g.g1)(function(){this.fS()||(chrome.cast.addReceiverActionListener(this.W),Q_v(),this.C.subscribe("onlineScreenChange",(0,g.g1)(this.i$,this)),this.V=zVc(this),chrome.cast.setCustomReceivers(this.V,function(){},(0,g.g1)(function(X){this.sE("Failed to set initial custom receivers: "+g.Y7(X))},this)),this.publish("yt-remote-cast2-availability-change",KL(this)),C(!0))},this),(0,g.g1)(function(X){this.sE("Failed to initialize API: "+ g.Y7(X)); C(!1)},this))}; g.h.Cc$=function(p,C){SW("Setting connected screen ID: "+p+" -> "+C);if(this.T){var V=this.T.T;if(!p||V&&V.id!=p)SW("Unsetting old screen status: "+this.T.C.friendlyName),DP(this,null)}if(p&&C){if(!this.T){p=ay(this.C.SI(),p);if(!p){SW("setConnectedScreenStatus: Unknown screen.");return}if(p.idType=="shortLived"){SW("setConnectedScreenStatus: Screen with id type to be short lived.");return}V=xp1(this,p);V||(SW("setConnectedScreenStatus: Connected receiver not custom..."),V=new chrome.cast.Receiver(p.uuid? p.uuid:p.id,p.name),V.receiverType=chrome.cast.ReceiverType.CUSTOM,this.V.push(V),chrome.cast.setCustomReceivers(this.V,function(){},(0,g.g1)(function(N){this.sE("Failed to set initial custom receivers: "+g.Y7(N))},this))); SW("setConnectedScreenStatus: new active receiver: "+V.friendlyName);DP(this,new vr(this.C,V),!0)}this.T.Eq(C)}else SW("setConnectedScreenStatus: no screen.")}; g.h.IZa=function(p){this.fS()?this.sE("Setting connection data on disposed cast v2"):this.T?this.T.bC(p):this.sE("Setting connection data without a session")}; g.h.Mx=function(){this.fS()?this.sE("Stopping session on disposed cast v2"):this.T?(this.T.stop(),DP(this,null)):SW("Stopping non-existing session")}; g.h.requestSession=function(){chrome.cast.requestSession((0,g.g1)(this.Rv,this),(0,g.g1)(this.xtn,this))}; g.h.CS=function(){this.C.unsubscribe("onlineScreenChange",(0,g.g1)(this.i$,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.W);var p=L_c,C=g.zV("yt.mdx.remote.debug.handlers_");g.rY(C||[],p);g.hf(this.T);g.ca.prototype.CS.call(this)}; g.h.sE=function(p){CL("Controller",p)}; g.h.Dl=function(p,C){this.T==p&&(C||DP(this,null),this.publish("yt-remote-cast2-session-change",C))}; g.h.UZ$=function(p,C){if(!this.fS())if(p)switch(p.friendlyName=chrome.cast.unescape(p.friendlyName),SW("onReceiverAction_ "+p.label+" / "+p.friendlyName+"-- "+C),C){case chrome.cast.ReceiverAction.CAST:if(this.T)if(this.T.C.label!=p.label)SW("onReceiverAction_: Stopping active receiver: "+this.T.C.friendlyName),this.T.stop();else{SW("onReceiverAction_: Casting to active receiver.");this.T.T&&this.publish("yt-remote-cast2-session-change",this.T.T);break}switch(p.receiverType){case chrome.cast.ReceiverType.CUSTOM:DP(this, new vr(this.C,p));break;case chrome.cast.ReceiverType.DIAL:DP(this,new MJ(this.C,p,this.S,this.config_));break;case chrome.cast.ReceiverType.CAST:DP(this,new Ts(this.C,p,this.config_));break;default:this.sE("Unknown receiver type: "+p.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.T&&this.T.C.label==p.label?this.T.stop():this.sE("Stopping receiver w/o session: "+p.friendlyName)}else this.sE("onReceiverAction_ called without receiver.")}; g.h.Byk=function(p){if(this.fS())return Promise.reject(Error("disposed"));var C=p.receiver;C.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.sE("Not DIAL receiver: "+C.friendlyName),C.receiverType=chrome.cast.ReceiverType.DIAL);var V=this.T?this.T.C:null;if(!V||V.label!=C.label)return this.sE("Receiving DIAL launch request for non-clicked DIAL receiver: "+C.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(V&&V.label==C.label&&V.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.T.T)return SW("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.T.T),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.sE('Changing CAST intent from "'+V.receiverType+'" to "dial" for '+C.friendlyName);DP(this,new MJ(this.C,C,this.S,this.config_))}C=this.T;C.J=p;C.J.appState==chrome.cast.DialAppState.RUNNING?(p=C.J.extraData||{},V=p.screenId||null,Ju(C)&&p.loungeToken?p.loungeTokenRefreshIntervalMs?p=b3E(C,{name:C.C.friendlyName,screenId:p.screenId,loungeToken:p.loungeToken,dialId:C.J.receiver.label, screenIdType:"shortLived"},p.loungeTokenRefreshIntervalMs):(g.Vg(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(p)+".")),p=A1v(C,V)):p=A1v(C,V)):p=q2F(C);return p}; g.h.Rv=function(p){var C=this;if(!this.fS()&&!this.Y){SW("New cast session ID: "+p.sessionId);var V=p.receiver;if(V.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.T)if(V.receiverType==chrome.cast.ReceiverType.CAST)SW("Got resumed cast session before resumed mdx connection."),V.friendlyName=chrome.cast.unescape(V.friendlyName),DP(this,new Ts(this.C,V,this.config_),!0);else{this.sE("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var N=this.T.C,H=ay(this.C.SI(), N.label);H&&hZ(H,V.label)&&N.receiverType!=chrome.cast.ReceiverType.CAST&&V.receiverType==chrome.cast.ReceiverType.CAST&&(SW("onSessionEstablished_: manual to cast session change "+V.friendlyName),g.hf(this.T),this.T=new Ts(this.C,V,this.config_),this.T.subscribe("sessionScreen",(0,g.g1)(this.Dl,this,this.T)),this.T.subscribe("sessionFailed",function(){return Y2r(C,C.T)}),this.T.bC(null)); this.T.V7(p)}}}; g.h.cT=function(){return this.T?this.T.zw():null}; g.h.xtn=function(p){this.fS()||(this.sE("Failed to estabilish a session: "+g.Y7(p)),p.code!=chrome.cast.ErrorCode.CANCEL&&DP(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.h.gGV=function(p){SW("Receiver availability updated: "+p);if(!this.fS()){var C=KL(this);this.D=p==chrome.cast.ReceiverAvailability.AVAILABLE;KL(this)!=C&&this.publish("yt-remote-cast2-availability-change",KL(this))}}; g.h.i$=function(){this.fS()||(this.V=zVc(this),SW("Updating custom receivers: "+g.Y7(this.V)),chrome.cast.setCustomReceivers(this.V,function(){},(0,g.g1)(function(){this.sE("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",KL(this)))}; F4.prototype.setLaunchParams=F4.prototype.IZa;F4.prototype.setConnectedScreenStatus=F4.prototype.Cc$;F4.prototype.stopSession=F4.prototype.Mx;F4.prototype.getCastSession=F4.prototype.cT;F4.prototype.requestSession=F4.prototype.requestSession;F4.prototype.init=F4.prototype.init;F4.prototype.dispose=F4.prototype.dispose;var WWY=[];g.h=qJ.prototype; g.h.reset=function(p){this.listId="";this.index=-1;this.videoId="";CRf(this);this.volume=-1;this.muted=!1;p&&(this.index=p.index,this.listId=p.listId,this.videoId=p.videoId,this.playerState=p.playerState,this.volume=p.volume,this.muted=p.muted,this.audioTrackId=p.audioTrackId,this.trackData=p.trackData,this.MR=p.hasPrevious,this.uT=p.hasNext,this.D=p.playerTime,this.Y=p.playerTimeAt,this.S=p.seekableStart,this.T=p.seekableEnd,this.W=p.duration,this.J=p.loadedTime,this.V=p.liveIngestionTime,this.C= !isNaN(this.V))}; g.h.isPlaying=function(){return this.playerState==1}; g.h.isBuffering=function(){return this.playerState==3}; g.h.zS=function(){return this.playerState==1081}; g.h.Kt=function(p){this.W=isNaN(p)?0:p}; g.h.getDuration=function(){return this.C?this.W+IR(this):this.W}; g.h.clone=function(){return new qJ(jxr(this))};g.v(xs,g.ca);g.h=xs.prototype;g.h.getState=function(){return this.V}; g.h.Rb=function(){return this.S.getReconnectTimeout()}; g.h.k0=function(){this.S.reconnect()}; g.h.play=function(){zs(this)?(this.T?this.T.play(null,g.vX,Pr(this,"play")):eW(this,"play"),H5P(this,1,Au(Ys(this))),this.publish("remotePlayerChange")):RR(this,this.play)}; g.h.pause=function(){zs(this)?(this.T?this.T.pause(null,g.vX,Pr(this,"pause")):eW(this,"pause"),H5P(this,2,Au(Ys(this))),this.publish("remotePlayerChange")):RR(this,this.pause)}; g.h.seekTo=function(p){if(zs(this)){if(this.T){var C=Ys(this),V=new chrome.cast.media.SeekRequest;V.currentTime=p;C.isPlaying()||C.isBuffering()?V.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:V.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.T.seek(V,g.vX,Pr(this,"seekTo",{newTime:p}))}else eW(this,"seekTo",{newTime:p});H5P(this,3,p);this.publish("remotePlayerChange")}else RR(this,g.Wv(this.seekTo,p))}; g.h.stop=function(){if(zs(this)){this.T?this.T.stop(null,g.vX,Pr(this,"stopVideo")):eW(this,"stopVideo");var p=Ys(this);p.index=-1;p.videoId="";CRf(p);nL(this,p);this.publish("remotePlayerChange")}else RR(this,this.stop)}; g.h.setVolume=function(p,C){if(zs(this)){var V=Ys(this);if(this.C){if(V.volume!=p){var N=Math.round(p)/100;this.C.setReceiverVolumeLevel(N,(0,g.g1)(function(){jW("set receiver volume: "+N)},this),(0,g.g1)(function(){this.sE("failed to set receiver volume.")},this))}V.muted!=C&&this.C.setReceiverMuted(C,(0,g.g1)(function(){jW("set receiver muted: "+C)},this),(0,g.g1)(function(){this.sE("failed to set receiver muted.")},this))}else{var H={volume:p, muted:C};V.volume!=-1&&(H.delta=p-V.volume);eW(this,"setVolume",H)}V.muted=C;V.volume=p;nL(this,V)}else RR(this,g.Wv(this.setVolume,p,C))}; g.h.fI=function(p,C){if(zs(this)){var V=Ys(this);p={videoId:p};C&&(V.trackData={trackName:C.name,languageCode:C.languageCode,sourceLanguageCode:C.translationLanguage?C.translationLanguage.languageCode:"",languageName:C.languageName,kind:C.kind},p.style=g.Y7(C.style),g.Ra(p,V.trackData));eW(this,"setSubtitlesTrack",p);nL(this,V)}else RR(this,g.Wv(this.fI,p,C))}; g.h.setAudioTrack=function(p,C){zs(this)?(C=C.getLanguageInfo().getId(),eW(this,"setAudioTrack",{videoId:p,audioTrackId:C}),p=Ys(this),p.audioTrackId=C,nL(this,p)):RR(this,g.Wv(this.setAudioTrack,p,C))}; g.h.playVideo=function(p,C,V,N,H,X,d){N=N===void 0?null:N;H=H===void 0?null:H;X=X===void 0?null:X;d=d===void 0?null:d;var a=Ys(this),E={videoId:p};V!==void 0&&(E.currentIndex=V);oR(a,p,V||0);C!==void 0&&(bD(a,C),E.currentTime=C);N&&(E.listId=N);H&&(E.playerParams=H);X&&(E.clickTrackingParams=X);d&&(E.locationInfo=g.Y7(d));eW(this,"setPlaylist",E);N||nL(this,a)}; g.h.Gx=function(p,C){if(zs(this)){if(p&&C){var V=Ys(this);oR(V,p,C);nL(this,V)}eW(this,"previous")}else RR(this,g.Wv(this.Gx,p,C))}; g.h.nextVideo=function(p,C){if(zs(this)){if(p&&C){var V=Ys(this);oR(V,p,C);nL(this,V)}eW(this,"next")}else RR(this,g.Wv(this.nextVideo,p,C))}; g.h.U$=function(){if(zs(this)){eW(this,"clearPlaylist");var p=Ys(this);p.reset();nL(this,p);this.publish("remotePlayerChange")}else RR(this,this.U$)}; g.h.Z0=function(){zs(this)?eW(this,"dismissAutoplay"):RR(this,this.Z0)}; g.h.dispose=function(){if(this.V!=3){var p=this.V;this.V=3;this.publish("proxyStateChange",p,this.V)}g.ca.prototype.dispose.call(this)}; g.h.CS=function(){Nyv(this);this.S=null;this.W.clear();ks(this,null);g.ca.prototype.CS.call(this)}; g.h.f0=function(p){if((p!=this.V||p==2)&&this.V!=3&&p!=0){var C=this.V;this.V=p;this.publish("proxyStateChange",C,p);if(p==1)for(;!this.W.isEmpty();)C=p=this.W,C.T.length===0&&(C.T=C.C,C.T.reverse(),C.C=[]),p.T.pop().apply(this);else p==3&&this.dispose()}}; g.h.BYo=function(p,C){this.publish(p,C)}; g.h.Gko=function(p){if(!p)this.wA(null),ks(this,null);else if(this.C.receiver.volume){p=this.C.receiver.volume;var C=Ys(this),V=Math.round(100*p.level||0);if(C.volume!=V||C.muted!=p.muted)jW("Cast volume update: "+p.level+(p.muted?" muted":"")),C.volume=V,C.muted=!!p.muted,nL(this,C)}}; g.h.wA=function(p){jW("Cast media: "+!!p);this.T&&this.T.removeUpdateListener(this.J);if(this.T=p)this.T.addUpdateListener(this.J),XCr(this),this.publish("remotePlayerChange")}; g.h.Nye=function(p){p?(XCr(this),this.publish("remotePlayerChange")):this.wA(null)}; g.h.bZ=function(){eW(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.h.e6o=function(){var p=BqY();p&&ks(this,p)}; g.h.sE=function(p){CL("CP",p)};g.v(LL,g.ca);g.h=LL.prototype; g.h.connect=function(p,C){if(C){var V=C.listId,N=C.videoId,H=C.videoIds,X=C.playerParams,d=C.clickTrackingParams,a=C.index,E={videoId:N},l=C.currentTime,t=C.locationInfo;C=C.loopMode;l!==void 0&&(E.currentTime=l<=5?0:l);X&&(E.playerParams=X);t&&(E.locationInfo=t);d&&(E.clickTrackingParams=d);V&&(E.listId=V);H&&H.length>0&&(E.videoIds=H.join(","));a!==void 0&&(E.currentIndex=a);this.Wr&&(E.loopMode=C||"LOOP_MODE_OFF");V&&(this.T.listId=V);this.T.videoId=N;this.T.index=a||0;this.T.state=3;bD(this.T, l);this.W="UNSUPPORTED";V=this.Wr?"setInitialState":"setPlaylist";wD("Connecting with "+V+" and params: "+g.Y7(E));this.C.connect({method:V,params:g.Y7(E)},p,Ap8())}else wD("Connecting without params"),this.C.connect({},p,Ap8());sxY(this)}; g.h.W8=function(p){this.C.W8(p)}; g.h.dispose=function(){this.fS()||(g.YH("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),$s(this,3));g.ca.prototype.dispose.call(this)}; g.h.CS=function(){ah2(this);lhY(this);EpE(this);g.KO(this.J);this.J=NaN;g.KO(this.Z);this.Z=NaN;this.S=null;g.fK(this.a$);this.a$.length=0;this.C.dispose();g.ca.prototype.CS.call(this);this.W=this.D=this.V=this.T=this.C=null}; g.h.cY=function(p){if(!this.V||this.V.length===0)return!1;for(var C=g.F(this.V),V=C.next();!V.done;V=C.next())if(!V.value.capabilities.has(p))return!1;return!0}; g.h.kJ=function(){var p=3;this.fS()||(p=0,isNaN(this.KJ())?this.C.QT()&&isNaN(this.Y)&&(p=1):p=2);return p}; g.h.Tq=function(p){wD("Disconnecting with "+p);g.YH("yt.mdx.remote.remoteClient_",null);ah2(this);this.publish("beforeDisconnect",p);p==1&&tZ();this.C.disconnect(p);this.dispose()}; g.h.FQ=function(){var p=this.T;this.S&&(p=this.T.clone(),oR(p,this.S,p.index));return jxr(p)}; g.h.SEY=function(p){var C=this,V=new qJ(p);V.videoId&&V.videoId!=this.T.videoId&&(this.S=V.videoId,g.KO(this.J),this.J=g.F5(function(){if(C.S){var H=C.S;C.S=null;C.T.videoId!=H&&gD(C,"getNowPlaying")}},5E3)); var N=[];this.T.listId==V.listId&&this.T.videoId==V.videoId&&this.T.index==V.index||N.push("remoteQueueChange");this.T.playerState==V.playerState&&this.T.volume==V.volume&&this.T.muted==V.muted&&Au(this.T)==Au(V)&&g.Y7(this.T.trackData)==g.Y7(V.trackData)||N.push("remotePlayerChange");this.T.reset(p);g.lr(N,function(H){this.publish(H)},this)}; g.h.w4=function(){var p=this.C.getDeviceId(),C=g.L0(this.V,function(V){return V.type=="REMOTE_CONTROL"&&V.id!=p}); return C?C.id:""}; g.h.KJ=function(){return this.C.Rb()}; g.h.RT=function(){return this.W||"UNSUPPORTED"}; g.h.Yk=function(){return this.D||""}; g.h.Zt=function(){!isNaN(this.KJ())&&this.C.k0()}; g.h.aZ_=function(p,C){gD(this,p,C);cNp(this)}; g.h.WL=function(){var p=g.ee("SAPISID","")||g.ee("__Secure-1PAPISID")||"",C=g.ee("__Secure-3PAPISID","")||"";if(!p&&!C)return"";p=g.mq(g.mr(p),2);C=g.mq(g.mr(C),2);return g.mq(g.mr(","+p+","+C),2)}; LL.prototype.subscribe=LL.prototype.subscribe;LL.prototype.unsubscribeByKey=LL.prototype.LO;LL.prototype.getProxyState=LL.prototype.kJ;LL.prototype.disconnect=LL.prototype.Tq;LL.prototype.getPlayerContextData=LL.prototype.FQ;LL.prototype.setPlayerContextData=LL.prototype.SEY;LL.prototype.getOtherConnectedRemoteId=LL.prototype.w4;LL.prototype.getReconnectTimeout=LL.prototype.KJ;LL.prototype.getAutoplayMode=LL.prototype.RT;LL.prototype.getAutoplayVideoId=LL.prototype.Yk;LL.prototype.reconnect=LL.prototype.Zt; LL.prototype.sendMessage=LL.prototype.aZ_;LL.prototype.getXsrfToken=LL.prototype.WL;LL.prototype.isCapabilitySupportedOnConnectedDevices=LL.prototype.cY;g.v(Ue8,X4);g.h=Ue8.prototype;g.h.SI=function(p){return this.CO.$_gs(p)}; g.h.contains=function(p){return!!this.CO.$_c(p)}; g.h.get=function(p){return this.CO.$_g(p)}; g.h.start=function(){this.CO.$_st()}; g.h.add=function(p,C,V){this.CO.$_a(p,C,V)}; g.h.remove=function(p,C,V){this.CO.$_r(p,C,V)}; g.h.Jy=function(p,C,V,N){this.CO.$_un(p,C,V,N)}; g.h.CS=function(){for(var p=this.T.length,C=0;C<p;++C)this.CO.$_ubk(this.T[C]);this.T.length=0;this.CO=null;X4.prototype.CS.call(this)}; g.h.y3=function(){this.publish("screenChange")}; g.h.uO_=function(){this.publish("onlineScreenChange")}; aR.prototype.$_st=aR.prototype.start;aR.prototype.$_gspc=aR.prototype.Xc;aR.prototype.$_gsppc=aR.prototype.vL;aR.prototype.$_c=aR.prototype.contains;aR.prototype.$_g=aR.prototype.get;aR.prototype.$_a=aR.prototype.add;aR.prototype.$_un=aR.prototype.Jy;aR.prototype.$_r=aR.prototype.remove;aR.prototype.$_gs=aR.prototype.SI;aR.prototype.$_gos=aR.prototype.m9;aR.prototype.$_s=aR.prototype.subscribe;aR.prototype.$_ubk=aR.prototype.LO;var HA=null,iE=!1,Wr=null,QI=null,YXE=null,pQ=[];g.v(PRp,g.z);g.h=PRp.prototype;g.h.CS=function(){g.z.prototype.CS.call(this);this.T.stop();this.C.stop();this.D.stop();var p=this.Ac;p.unsubscribe("proxyStateChange",this.pB,this);p.unsubscribe("remotePlayerChange",this.y9,this);p.unsubscribe("remoteQueueChange",this.yF,this);p.unsubscribe("previousNextChange",this.hN,this);p.unsubscribe("nowAutoplaying",this.W0,this);p.unsubscribe("autoplayDismissed",this.T0,this);this.Ac=this.module=null}; g.h.vB=function(p){var C=g.US.apply(1,arguments);if(this.Ac.V!=2)if(hS(this)){if(!Ys(this.Ac).zS()||p!=="control_seek")switch(p){case "control_toggle_play_pause":Ys(this.Ac).isPlaying()?this.Ac.pause():this.Ac.play();break;case "control_play":this.Ac.play();break;case "control_pause":this.Ac.pause();break;case "control_seek":this.Y.VI(C[0],C[1]);break;case "control_subtitles_set_track":$ey(this,C[0]);break;case "control_set_audio_track":this.setAudioTrack(C[0])}}else switch(p){case "control_toggle_play_pause":case "control_play":case "control_pause":C= this.N.getCurrentTime();am(this,C===0?void 0:C);break;case "control_seek":am(this,C[0]);break;case "control_subtitles_set_track":$ey(this,C[0]);break;case "control_set_audio_track":this.setAudioTrack(C[0])}}; g.h.WMr=function(p){this.D.PT(p)}; g.h.Eq$=function(p){this.vB("control_subtitles_set_track",g.oa(p)?null:p)}; g.h.zH=function(){var p=this.N.getOption("captions","track");g.oa(p)||$ey(this,p)}; g.h.va=function(p){this.module.va(p,this.N.getVideoData().lengthSeconds)}; g.h.yc_=function(){g.oa(this.V)||Ley(this,this.V);this.S=!1}; g.h.pB=function(p,C){this.C.stop();C===2&&this.Ir()}; g.h.y9=function(){if(hS(this)){this.T.stop();var p=Ys(this.Ac);switch(p.playerState){case 1080:case 1081:case 1084:case 1085:this.module.q5=1;break;case 1082:case 1083:this.module.q5=0;break;default:this.module.q5=-1}switch(p.playerState){case 1081:case 1:this.aN(new g.E3(8));this.sN();break;case 1085:case 3:this.aN(new g.E3(9));break;case 1083:case 0:this.aN(new g.E3(2));this.Y.stop();this.va(this.N.getVideoData().lengthSeconds);break;case 1084:this.aN(new g.E3(4));break;case 2:this.aN(new g.E3(4)); this.va(Au(p));break;case -1:this.aN(new g.E3(64));break;case -1E3:this.aN(new g.E3(128,{errorCode:"mdx.remoteerror",errorMessage:"Este v\u00eddeo n\u00e3o est\u00e1 dispon\u00edvel para reprodu\u00e7\u00e3o remota.",Ve:2}))}p=Ys(this.Ac).trackData;var C=this.V;(p||C?p&&C&&p.trackName==C.trackName&&p.languageCode==C.languageCode&&p.languageName==C.languageName&&p.kind==C.kind:1)||(this.V=p,Ley(this,p));p=Ys(this.Ac);p.volume===-1||Math.round(this.N.getVolume())===p.volume&&this.N.isMuted()===p.muted|| this.J.isActive()||this.aS()}else wCf(this)}; g.h.hN=function(){this.N.publish("mdxpreviousnextchange")}; g.h.yF=function(){hS(this)||wCf(this)}; g.h.W0=function(p){isNaN(p)||this.N.publish("mdxnowautoplaying",p)}; g.h.T0=function(){this.N.publish("mdxautoplaycanceled")}; g.h.setAudioTrack=function(p){hS(this)&&this.Ac.setAudioTrack(this.N.getVideoData(1).videoId,p)}; g.h.seekTo=function(p,C){Ys(this.Ac).playerState===-1?am(this,p):C&&this.Ac.seekTo(p)}; g.h.aS=function(){var p=this;if(hS(this)){var C=Ys(this.Ac);this.events.rY(this.Z);C.muted?this.N.mute():this.N.unMute();this.N.setVolume(C.volume);this.Z=this.events.U(this.N,"onVolumeChange",function(V){np2(p,V)})}}; g.h.sN=function(){this.T.stop();if(!this.Ac.fS()){var p=Ys(this.Ac);p.isPlaying()&&this.aN(new g.E3(8));this.va(Au(p));this.T.start()}}; g.h.Ir=function(){this.C.stop();this.T.stop();var p=this.Ac.Rb();this.Ac.V==2&&!isNaN(p)&&this.C.start()}; g.h.aN=function(p){this.C.stop();var C=this.W;if(!g.JK(C,p)){var V=g.r(p,2);V!==g.r(this.W,2)&&this.N.iQ(V);this.W=p;Wev(this.module,C,p)}};g.v(Ew,g.w);Ew.prototype.hc=function(){this.T.show()}; Ew.prototype.f4=function(){this.T.hide()}; Ew.prototype.C=function(){T3("mdx-privacy-popup-cancel");this.f4()}; Ew.prototype.V=function(){T3("mdx-privacy-popup-confirm");this.f4()};g.v(aG,g.w);aG.prototype.onStateChange=function(p){this.Ba(p.state)}; aG.prototype.Ba=function(p){if(this.api.getPresentingPlayerType()===3){var C={RECEIVER_NAME:this.api.getOption("remote","currentReceiver").name};p=g.r(p,128)?g.FY("Erro em $RECEIVER_NAME",C):p.isPlaying()||p.isPaused()?g.FY("Reproduzindo em $RECEIVER_NAME",C):g.FY("Conectado a $RECEIVER_NAME",C);this.updateValue("statustext",p);this.T.show()}else this.T.hide()};g.v(ly,g.NA);ly.prototype.S=function(){var p=this.N.getOption("remote","receivers");p&&p.length>1&&!this.N.getOption("remote","quickCast")?(this.hV=g.tB(p,this.T,this),this.Zr(g.bZ(p,this.T)),p=this.N.getOption("remote","currentReceiver"),p=this.T(p),this.options[p]&&this.Ag(p),this.enable(!0)):this.enable(!1)}; ly.prototype.T=function(p){return p.key}; ly.prototype.M1=function(p){return p==="cast-selector-receiver"?"Elenco...":this.hV[p].name}; ly.prototype.qn=function(p){g.NA.prototype.qn.call(this,p);this.N.setOption("remote","currentReceiver",this.hV[p]);this.xM.f4()};g.v(gp1,g.Ar);g.h=gp1.prototype; g.h.create=function(){var p=this.player.K(),C=g.Oe(p);p={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:p.G("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:p.G("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:p.G("enable_cast_short_lived_lounge_token")};Ihr(C,p);this.subscriptions.push(g.T7("yt-remote-before-disconnect",this.i4a,this));this.subscriptions.push(g.T7("yt-remote-connection-change",this.Jca,this));this.subscriptions.push(g.T7("yt-remote-receiver-availability-change",this.H0, this));this.subscriptions.push(g.T7("yt-remote-auto-connect",this.lEa,this));this.subscriptions.push(g.T7("yt-remote-receiver-resumed",this.K6$,this));this.subscriptions.push(g.T7("mdx-privacy-popup-confirm",this.SVe,this));this.subscriptions.push(g.T7("mdx-privacy-popup-cancel",this.VZk,this));this.H0()}; g.h.load=function(){this.player.cancelPlayback();g.Ar.prototype.load.call(this);this.MB=new PRp(this,this.player,this.Ac);var p=(p=Rk5())?p.currentTime:0;var C=xeY()?new xs(Nu(),void 0):null;p==0&&C&&(p=Au(Ys(C)));p!==0&&this.va(p);Wev(this,this.OO,this.OO);this.player.Uc(6)}; g.h.unload=function(){this.player.publish("mdxautoplaycanceled");this.x6=this.zz;g.s1(this.MB,this.Ac);this.Ac=this.MB=null;g.Ar.prototype.unload.call(this);this.player.Uc(5);tv(this)}; g.h.CS=function(){g.MM(this.subscriptions);g.Ar.prototype.CS.call(this)}; g.h.Xk=function(p){var C=g.US.apply(1,arguments);this.loaded&&this.MB.vB.apply(this.MB,[p].concat(g.K(C)))}; g.h.getAdState=function(){return this.q5}; g.h.MR=function(){return this.Ac?Ys(this.Ac).MR:!1}; g.h.uT=function(){return this.Ac?Ys(this.Ac).uT:!1}; g.h.va=function(p,C){this.s3=p||0;this.player.publish("progresssync",p,C);this.player.YG("onVideoProgress",p||0)}; g.h.getCurrentTime=function(){return this.s3}; g.h.getProgressState=function(){var p=Ys(this.Ac),C=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!p.zS()&&this.player.s8(),clipEnd:C.clipEnd,clipStart:C.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:p.getDuration(),ingestionTime:p.C?p.V+IR(p):p.V,isAtLiveHead:(p.C?p.T+IR(p):p.T)-this.getCurrentTime()<=1,loaded:p.J,seekableEnd:p.C?p.T+IR(p):p.T,seekableStart:p.S>0?p.S+IR(p):p.S,offset:0,viewerLivestreamJoinMediaTime:0}}; g.h.nextVideo=function(){this.Ac&&this.Ac.nextVideo()}; g.h.Gx=function(){this.Ac&&this.Ac.Gx()}; g.h.i4a=function(p){p===1&&(this.hJ=this.Ac?Ys(this.Ac):null)}; g.h.Jca=function(){var p=xeY()?new xs(Nu(),void 0):null;if(p){var C=this.x6;this.loaded&&this.unload();this.Ac=p;this.hJ=null;C.key!==this.zz.key&&(this.x6=C,this.load())}else g.hf(this.Ac),this.Ac=null,this.loaded&&(this.unload(),(p=this.hJ)&&p.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(p.videoId,Au(p)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.h.H0=function(){var p=[this.zz],C=p.concat,V=b50();fL()&&g.zW("yt-remote-cast-available")&&V.push({key:"cast-selector-receiver",name:"Cast..."});this.hV=C.call(p,V);p=opy()||this.zz;cm(this,p);this.player.YG("onMdxReceiversChange")}; g.h.lEa=function(){var p=opy();cm(this,p)}; g.h.K6$=function(){this.x6=opy()}; g.h.SVe=function(){this.iK=!0;tv(this);iE=!1;HA&&da(HA,1);HA=null}; g.h.VZk=function(){this.iK=!1;tv(this);cm(this,this.zz);this.x6=this.zz;iE=!1;HA=null;this.player.playVideo()}; g.h.O8=function(p,C){switch(p){case "casting":return this.loaded;case "receivers":return this.hV;case "currentReceiver":return C&&(C.key==="cast-selector-receiver"?G4r():cm(this,C)),this.loaded?this.x6:this.zz;case "quickCast":return this.hV.length===2&&this.hV[1].key==="cast-selector-receiver"?(C&&G4r(),!0):!1}}; g.h.bZ=function(){this.Ac.bZ()}; g.h.Om=function(){return!1}; g.h.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.h.isLoggedIn=function(){var p,C;return((p=g.pO("PLAYER_CONFIG"))==null?void 0:(C=p.args)==null?void 0:C.authuser)!==void 0?!0:!(!g.pO("SESSION_INDEX")&&!g.pO("LOGGED_IN"))};g.bi("remote",gp1);})(_yt_player);