uawdijnntqw1x1x1
IP : 216.73.216.30
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
files
/
need-2-delete
/
.
/
mini-borishof.ru1
/
upload
/
coooper
/
remote.js
/
/
(function(g){var window=this;var Vya=function(a,b){return g.Kb(a,b)},$5=function(a,b,c){a.A.set(b,c)},a6=function(a){$5(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^(0,g.D)()).toString(36)); return a},b6=function(a,b,c){Array.isArray(c)||(c=[String(c)]); g.gn(a.A,b,c)},Wya=function(a,b){var c=[]; g.lk(b,function(d){try{var e=g.jo.prototype.u.call(this,d,!0)}catch(f){if("Storage: Invalid value was encountered"==f)return;throw f;}void 0===e?c.push(d):g.io(e)&&c.push(d)},a); return c},Xya=function(a,b){var c=Wya(a,b); (0,g.y)(c,function(d){g.jo.prototype.remove.call(this,d)},a)},Yya=function(a){if(a.Zc){if(a.Zc.locationOverrideToken)return{locationOverrideToken:a.Zc.locationOverrideToken}; if(null!=a.Zc.latitudeE7&&null!=a.Zc.longitudeE7)return{latitudeE7:a.Zc.latitudeE7,longitudeE7:a.Zc.longitudeE7}}return null},Zya=function(a,b){g.fb(a,b)||a.push(b)},c6=function(a){var b=0,c; for(c in a)b++;return b},$ya=function(a,b){var c=b instanceof g.yc?b:g.Dc(b,/^data:image\//i.test(b)); a.src=g.zc(c)},d6=function(){},aza=function(a){try{return g.v.JSON.parse(a)}catch(b){}a=String(a); if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.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("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},bza=function(a){if(a.Qd&&"function"==typeof a.Qd)return a.Qd(); if("string"===typeof a)return a.split("");if(g.Na(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return g.Gb(a)},cza=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0); else if(g.Na(a)||"string"===typeof a)(0,g.y)(a,b,void 0);else{if(a.Ve&&"function"==typeof a.Ve)var c=a.Ve();else if(a.Qd&&"function"==typeof a.Qd)c=void 0;else if(g.Na(a)||"string"===typeof a){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=g.Hb(a);d=bza(a);e=d.length;for(var f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}},dza=function(a,b,c,d){var e=new g.Vm(null,void 0); a&&g.Wm(e,a);b&&g.Xm(e,b);c&&g.Ym(e,c);d&&(e.u=d);return e},e6=function(a,b){g.Ro[a]=!0; var c=g.Po();c&&c.publish.apply(c,arguments);g.Ro[a]=!1},f6=function(a){this.app=this.name=this.id=""; this.type="REMOTE_CONTROL";this.obfuscatedGaiaId=this.avatar=this.username="";this.capabilities=new Set;this.experiments=new Set;this.theme="u";new g.Sm;a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.username=a.user||"",this.avatar=a.userAvatarUri||"",this.obfuscatedGaiaId=a.obfuscatedGaiaId||"",this.theme=a.theme||"u",eza(this,a.capabilities||""),fza(this,a.experiments||""))},eza=function(a,b){a.capabilities.clear(); (0,g.Ae)(b.split(","),g.Sa(Vya,gza)).forEach(function(c){a.capabilities.add(c)})},fza=function(a,b){a.experiments.clear(); b.split(",").forEach(function(c){a.experiments.add(c)})},g6=function(a){a=a||{}; this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||""},h6=function(a,b){return!!b&&(a.id==b||a.uuid==b)},hza=function(a){return{name:a.name, screenId:a.id,loungeToken:a.token,dialId:a.uuid}},iza=function(a){return new g6(a)},jza=function(a){return Array.isArray(a)?(0,g.Ic)(a,iza):[]},i6=function(a){return a?'{name:"'+a.name+'",id:'+a.id.substr(0,6)+"..,token:"+(a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+"}":"null"},j6=function(a){return Array.isArray(a)?"["+(0,g.Ic)(a,i6).join(",")+"]":"null"},k6=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()| 0; return("x"==a?b:b&3|8).toString(16)})},kza=function(a){return(0,g.Ic)(a,function(b){return{key:b.id, name:b.name}})},l6=function(a,b){return g.cb(a,function(c){return c||b?!c!=!b?!1:c.id==b.id:!0})},m6=function(a,b){return g.cb(a,function(c){return h6(c,b)})},lza=function(){var a=(0,g.Ws)(); a&&Xya(a,a.o.Ph(!0))},n6=function(){var a=g.Zs("yt-remote-connected-devices")||[]; g.wb(a);return a},mza=function(a){if(g.gb(a))return[]; var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return(0,g.Ic)(a,function(d,e){return 0==e?d:d.substring(c.length)})},nza=function(a){g.Ys("yt-remote-connected-devices",a,86400)},p6=function(){if(o6)return o6; var a=g.Zs("yt-remote-device-id");a||(a=k6(),g.Ys("yt-remote-device-id",a,31536E3));for(var b=n6(),c=1,d=a;g.fb(b,d);)c++,d=a+"#"+c;return o6=d},q6=function(){var a=n6(),b=p6(); g.fb(a,b);g.at()&&g.yb(a,b);a=mza(a);if(g.gb(a))try{g.Cq.remove("remote_sid","/","youtube.com")}catch(c){}else try{g.Dq("remote_sid",a.join(","),-1)}catch(c){}},oza=function(){return g.Zs("yt-remote-session-browser-channel")},pza=function(){return g.Zs("yt-remote-local-screens")||[]},qza=function(){g.Ys("yt-remote-lounge-token-expiration",!0,86400)},rza=function(a){5<a.length&&(a=a.slice(a.length-5)); var b=(0,g.Ic)(pza(),function(d){return d.loungeToken}),c=(0,g.Ic)(a,function(d){return d.loungeToken}); (0,g.yi)(c,function(d){return!g.fb(b,d)})&&qza(); g.Ys("yt-remote-local-screens",a,31536E3)},sza=function(a,b){g.Ys("yt-remote-session-browser-channel",a); g.Ys("yt-remote-session-screen-id",b);var c=n6(),d=p6();g.fb(c,d)||c.push(d);nza(c);q6()},r6=function(a){a||(g.$s("yt-remote-session-screen-id"),g.$s("yt-remote-session-video-id")); q6();a=n6();g.kb(a,p6());nza(a)},tza=function(){if(!s6){var a=g.po(); a&&(s6=new g.co(a))}return s6?!!s6.get("yt-remote-use-staging-server"):!1},uza=function(a){return!!document.currentScript&&(-1!=document.currentScript.src.indexOf("?"+a)||-1!=document.currentScript.src.indexOf("&"+a))},vza=function(){return"function"==typeof window.__onGCastApiAvailable?window.__onGCastApiAvailable:null},t6=function(a){a.length?wza(a.shift(),function(){t6(a)}):u6()},xza=function(a){return"chrome-extension://"+a+"/cast_sender.js"},wza=function(a,b,c){var d=document.createElement("script"); d.onerror=b;c&&(d.onload=c);d.src=a;(document.head||document.documentElement).appendChild(d)},u6=function(){var a=vza(); a&&a(!1,"No cast extension found")},zza=function(){if(yza){var a=2,b=vza(),c=function(){a--; 0==a&&b&&b(!0)}; window.__onGCastApiAvailable=c;wza("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",u6,c)}},Aza=function(){zza(); var a=window.navigator.userAgent.match(/Chrome\/([0-9]+)/);t6(["//www.gstatic.com/eureka/clank/"+(a?parseInt(a[1],10):0)+"/cast_sender.js","//www.gstatic.com/eureka/clank/cast_sender.js"])},v6=function(a,b,c){g.A.call(this); this.F=null!=c?(0,g.x)(a,c):a;this.Jd=b;this.C=(0,g.x)(this.LG,this);this.o=!1;this.u=0;this.A=this.Ka=null;this.B=[]},w6=function(a,b,c){g.A.call(this); this.B=null!=c?a.bind(c):a;this.Jd=b;this.A=null;this.o=!1;this.u=0;this.Ka=null},x6=function(a){a.Ka=g.ag(function(){a.Ka=null; a.o&&!a.u&&(a.o=!1,x6(a))},a.Jd); var b=a.A;a.A=null;a.B.apply(null,b)},y6=function(a){if(g.v.JSON)try{return g.v.JSON.parse(a)}catch(b){}return aza(a)},z6=function(){},A6=function(){},Bza=function(){},Dza=function(a){return(a=Cza(a))?new ActiveXObject(a):new XMLHttpRequest},Cza=function(a){if(!a.u&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.u=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.u},B6=function(a,b,c,d){this.o=a; this.A=b;this.I=c;this.G=d||1;this.C=45E3;this.B=new g.A1(this);this.u=new g.$f;this.u.setInterval(250)},Fza=function(a,b,c){a.Rl=1; a.Sh=a6(b.clone());a.kk=c;a.F=!0;Eza(a,null)},C6=function(a,b,c,d,e){a.Rl=1; a.Sh=a6(b.clone());a.kk=null;a.F=c;e&&(a.ED=!1);Eza(a,d)},Eza=function(a,b){a.Ml=(0,g.D)(); D6(a);a.Ti=a.Sh.clone();b6(a.Ti,"t",a.G);a.po=0;a.bd=a.o.Ft(a.o.Yn()?b:null);0<a.nu&&(a.xr=new w6((0,g.x)(a.EE,a,a.bd),a.nu));a.B.na(a.bd,"readystatechange",a.AO);var c=a.Dj?g.Rb(a.Dj):{};a.kk?(a.ks="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.bd.send(a.Ti,a.ks,a.kk,c)):(a.ks="GET",a.ED&&!g.pe&&(c.Connection="close"),a.bd.send(a.Ti,a.ks,null,c));a.o.Of(1)},Iza=function(a,b,c){for(var d=!0;!a.lj&&a.po<c.length;){var e=Gza(a,c); if(e==E6){4==b&&(a.ji=4,F6(15),d=!1);break}else if(e==Hza){a.ji=4;F6(16);d=!1;break}else G6(a,e)}4==b&&0==c.length&&(a.ji=1,F6(17),d=!1);a.Wf=a.Wf&&d;d||(H6(a),I6(a))},Gza=function(a,b){var c=a.po,d=b.indexOf("\n",c); if(-1==d)return E6;c=Number(b.substring(c,d));if(isNaN(c))return Hza;d+=1;if(d+c>b.length)return E6;var e=b.substr(d,c);a.po=d+c;return e},Kza=function(a,b){a.Ml=(0,g.D)(); D6(a);var c=b?window.location.hostname:"";a.Ti=a.Sh.clone();$5(a.Ti,"DOMAIN",c);$5(a.Ti,"t",a.G);try{a.cg=new ActiveXObject("htmlfile")}catch(n){H6(a);a.ji=7;F6(22);I6(a);return}var d="<html><body>";if(b){for(var e="",f=0;f<c.length;f++){var h=c.charAt(f);if("<"==h)e+="\\x3c";else if(">"==h)e+="\\x3e";else{var l=h;if(l in J6)h=J6[l];else if(l in Jza)h=J6[l]=Jza[l];else{var m=l.charCodeAt(0);if(31<m&&127>m)h=l;else{if(256>m){if(h="\\x",16>m||256<m)h+="0"}else h="\\u",4096>m&&(h+="0");h+=m.toString(16).toUpperCase()}h= J6[l]=h}e+=h}}d+='<script>document.domain="'+e+'"\x3c/script>'}c=g.bd(g.bc("b/12014412"),d+"</body></html>");a.cg.open();a.cg.write(g.Xc(c));a.cg.close();a.cg.parentWindow.m=(0,g.x)(a.SN,a);a.cg.parentWindow.d=(0,g.x)(a.IC,a,!0);a.cg.parentWindow.rpcClose=(0,g.x)(a.IC,a,!1);c=a.cg.createElement("DIV");a.cg.parentWindow.document.body.appendChild(c);d=g.Cc(a.Ti.toString());d=g.jd(g.zc(d));d=g.bd(g.bc("b/12014412"),'<iframe src="'+d+'"></iframe>');g.cd(c,d);a.o.Of(1)},D6=function(a){a.fx=(0,g.D)()+a.C; Lza(a,a.C)},Lza=function(a,b){if(null!=a.Yl)throw Error("WatchDog timer not null"); a.Yl=K6((0,g.x)(a.aO,a),b)},L6=function(a){a.Yl&&(g.v.clearTimeout(a.Yl),a.Yl=null)},I6=function(a){a.o.Jz()||a.lj||a.o.Kp(a)},H6=function(a){L6(a); g.Me(a.xr);a.xr=null;a.u.stop();g.Ita(a.B);if(a.bd){var b=a.bd;a.bd=null;b.abort();b.dispose()}a.cg&&(a.cg=null)},G6=function(a,b){try{a.o.AC(a,b),a.o.Of(4)}catch(c){}},Nza=function(a,b,c,d,e){if(0==d)c(!1); else{var f=e||0;d--;Mza(a,b,function(h){h?c(!0):g.v.setTimeout(function(){Nza(a,b,c,d,f)},f)})}},Mza=function(a,b,c){var d=new Image; d.onload=function(){try{M6(d),c(!0)}catch(e){}}; d.onerror=function(){try{M6(d),c(!1)}catch(e){}}; d.onabort=function(){try{M6(d),c(!1)}catch(e){}}; d.ontimeout=function(){try{M6(d),c(!1)}catch(e){}}; g.v.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b); $ya(d,a)},M6=function(a){a.onload=null; a.onerror=null;a.onabort=null;a.ontimeout=null},Oza=function(a){this.o=a; this.u=new z6},Pza=function(a){var b=N6(a.o,a.om,"/mail/images/cleardot.gif"); a6(b);Nza(b.toString(),5E3,(0,g.x)(a.LF,a),3,2E3);a.Of(1)},P6=function(a){var b=a.o.M; if(null!=b)F6(5),b?(F6(11),O6(a.o,a,!1)):(F6(12),O6(a.o,a,!0));else if(a.qe=new B6(a,void 0,void 0,void 0),a.qe.Dj=a.lu,b=a.o,b=N6(b,b.Yn()?a.Qm:null,a.mu),F6(5),!g.ne||g.Sd(10))b6(b,"TYPE","xmlhttp"),C6(a.qe,b,!1,a.Qm,!1);else{b6(b,"TYPE","html");var c=a.qe;a=!!a.Qm;c.Rl=3;c.Sh=a6(b.clone());Kza(c,a)}},Q6=function(a){g.pf.call(this); this.headers=new g.Sm;this.U=a||null;this.A=!1;this.T=this.o=null;this.ga=this.M="";this.F=0;this.B="";this.C=this.ba=this.I=this.Z=!1;this.G=0;this.N=null;this.ea="";this.R=this.aa=!1},Qza=function(a){return g.ne&&g.Rd(9)&&"number"===typeof a.timeout&&void 0!==a.ontimeout},Rza=function(a){return"content-type"==a.toLowerCase()},Tza=function(a,b){a.A=!1; a.o&&(a.C=!0,a.o.abort(),a.C=!1);a.B=b;a.F=5;Sza(a);R6(a)},Sza=function(a){a.Z||(a.Z=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))},Vza=function(a){if(a.A&&"undefined"!=typeof g.F1)if(a.T[1]&&4==S6(a)&&2==a.getStatus())T6(a,"Local request error detected and ignored"); else if(a.I&&4==S6(a))g.ag(a.wC,0,a);else if(a.dispatchEvent("readystatechange"),4==S6(a)){T6(a,"Request complete");a.A=!1;try{var b=a.getStatus();a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=g.td(1,String(a.M));if(!f&&g.v.self&&g.v.self.location){var h=g.v.self.location.protocol;f=h.substr(0,h.length-1)}e=!Uza.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success"); else{a.F=6;try{var l=2<S6(a)?a.o.statusText:""}catch(m){l=""}a.B=l+" ["+a.getStatus()+"]";Sza(a)}}finally{R6(a)}}},R6=function(a,b){if(a.o){Wza(a); var c=a.o,d=a.T[0]?g.Ka:null;a.o=null;a.T=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){}}},Wza=function(a){a.o&&a.R&&(a.o.ontimeout=null); a.N&&(g.v.clearTimeout(a.N),a.N=null)},S6=function(a){return a.o?a.o.readyState:0},U6=function(a){try{return a.o?a.o.responseText:""}catch(b){return""}},T6=function(a,b){return b+" ["+a.ga+" "+a.M+" "+a.getStatus()+"]"},V6=function(a,b,c){this.o=1; this.u=[];this.B=[];this.C=new z6;this.I=a||null;this.M=null!=b?b:null;this.F=c||!1},Xza=function(a,b){this.o=a; this.map=b;this.context=null},Yza=function(a){g.Oe.call(this,"statevent",a)},Zza=function(a,b){g.Oe.call(this,"timingevent",a); this.size=b},$za=function(a){g.Oe.call(this,"serverreachability",a)},cAa=function(a){aAa(a); if(3==a.o){var b=a.yn++,c=a.rp.clone();$5(c,"SID",a.A);$5(c,"RID",b);$5(c,"TYPE","terminate");W6(a,c);b=new B6(a,a.A,b,void 0);b.Rl=2;b.Sh=a6(c.clone());$ya(new Image,b.Sh.toString());b.Ml=(0,g.D)();D6(b)}bAa(a)},dAa=function(a){a.jG(1,0); a.rp=N6(a,null,a.ku);X6(a)},aAa=function(a){a.Vh&&(a.Vh.abort(),a.Vh=null); a.Bc&&(a.Bc.cancel(),a.Bc=null);a.Vg&&(g.v.clearTimeout(a.Vg),a.Vg=null);Y6(a);a.fe&&(a.fe.cancel(),a.fe=null);a.ai&&(g.v.clearTimeout(a.ai),a.ai=null)},eAa=function(a,b){if(0==a.o)throw Error("Invalid operation: sending map when state is closed"); a.u.push(new Xza(a.BK++,b));2!=a.o&&3!=a.o||X6(a)},X6=function(a){a.fe||a.ai||(a.ai=K6((0,g.x)(a.HC,a),0),a.Sk=0)},gAa=function(a,b){if(1==a.o){if(!b){a.yn=Math.floor(1E5*Math.random()); var c=a.yn++,d=new B6(a,"",c,void 0);d.Dj=null;var e=Z6(a),f=a.rp.clone();$5(f,"RID",c);$5(f,"CVER","1");W6(a,f);Fza(d,f,e);a.fe=d;a.o=2}}else 3==a.o&&(b?fAa(a,b):0==a.u.length||a.fe||fAa(a))},fAa=function(a,b){if(b)if(6<a.mj){a.u=a.B.concat(a.u); a.B.length=0;var c=a.yn-1;var d=Z6(a)}else c=b.I,d=b.kk;else c=a.yn++,d=Z6(a);var e=a.rp.clone();$5(e,"SID",a.A);$5(e,"RID",c);$5(e,"AID",a.pl);W6(a,e);c=new B6(a,a.A,c,a.Sk+1);c.Dj=null;c.setTimeout(1E4+Math.round(1E4*Math.random()));a.fe=c;Fza(c,e,d)},W6=function(a,b){if(a.Gd){var c=a.Gd.hz(); c&&g.Ab(c,function(d,e){$5(b,e,d)})}},Z6=function(a){var b=Math.min(a.u.length,1E3),c=["count="+b]; if(6<a.mj&&0<b){var d=a.u[0].o;c.push("ofs="+d)}else d=0;for(var e=0;e<b;e++){var f=a.u[e].o,h=a.u[e].map;f=6>=a.mj?e:f-d;try{g.Ab(h,function(l,m){c.push("req"+f+"_"+m+"="+encodeURIComponent(l))})}catch(l){c.push("req"+f+"_type="+encodeURIComponent("_badmap"))}}a.B=a.B.concat(a.u.splice(0,b)); return c.join("&")},hAa=function(a){a.Bc||a.Vg||(a.G=1,a.Vg=K6((0,g.x)(a.GC,a),0),a.Ek=0)},$6=function(a){if(a.Bc||a.Vg||3<=a.Ek)return!1; a.G++;a.Vg=K6((0,g.x)(a.GC,a),iAa(a,a.Ek));a.Ek++;return!0},O6=function(a,b,c){a.gs=c; a.ng=b.oh;a.F||dAa(a)},Y6=function(a){null!=a.rj&&(g.v.clearTimeout(a.rj),a.rj=null)},iAa=function(a,b){var c=5E3+Math.floor(1E4*Math.random()); a.isActive()||(c*=2);return c*b},a7=function(a,b){if(2==b||9==b){var c=null; a.Gd&&(c=null);var d=(0,g.x)(a.lP,a);c||(c=new g.Vm("//www.google.com/images/cleardot.gif"),a6(c));Mza(c.toString(),1E4,d)}else F6(2);jAa(a,b)},jAa=function(a,b){a.o=0; a.Gd&&a.Gd.uy(b);bAa(a);aAa(a)},bAa=function(a){a.o=0; a.ng=-1;if(a.Gd)if(0==a.B.length&&0==a.u.length)a.Gd.nt();else{g.ob(a.B);var b=g.ob(a.u);a.B.length=0;a.u.length=0;a.Gd.nt(b)}},N6=function(a,b,c){var d=g.cn(c); if(""!=d.o)b&&g.Xm(d,b+"."+d.o),g.Ym(d,d.B);else{var e=window.location;d=dza(e.protocol,b?b+"."+e.hostname:e.hostname,+e.port,c)}a.Gm&&g.Ab(a.Gm,function(f,h){$5(d,h,f)}); $5(d,"VER",a.mj);W6(a,d);return d},K6=function(a,b){if(!g.Oa(a))throw Error("Fn must not be null and must be a function"); return g.v.setTimeout(function(){a()},b)},F6=function(a){b7.dispatchEvent(new Yza(b7,a))},kAa=function(){},lAa=function(){this.o=[]; this.u=[]},mAa=function(a,b){this.action=a; this.params=b||{}},c7=function(a,b){g.A.call(this); this.o=new g.H(this.LN,0,this);g.C(this,this.o);this.Jd=5E3;this.u=0;if("function"===typeof a)b&&(a=(0,g.x)(a,b));else if(a&&"function"===typeof a.handleEvent)a=(0,g.x)(a.handleEvent,a);else throw Error("Invalid listener argument");this.A=a},d7=function(a,b,c){this.N=a; this.F=b;this.A=new g.bo;this.u=new c7(this.OO,this);this.o=null;this.Mb=!1;this.C=null;this.M="";this.I=this.B=0;this.G=[];this.R=c||!1},nAa=function(a){return{firstTestResults:[""], secondTestResults:!a.o.gs,sessionId:a.o.A,arrayId:a.o.pl}},oAa=function(a,b){a.I=b||0; a.u.stop();a.o&&(3==a.o.o&&gAa(a.o),cAa(a.o));a.I=0},e7=function(a){return!!a.o&&3==a.o.o},pAa=function(a,b){(a.F.loungeIdToken=b)||a.u.stop()},f7=function(a){this.port=this.domain=""; this.o="/api/lounge";this.u=!0;a=a||document.location.href;var b=Number(g.td(4,a))||"";b&&(this.port=":"+b);this.domain=g.ud(a)||"";a=g.Pc;0<=a.search("MSIE")&&(a=a.match(/MSIE ([\d.]+)/)[1],0>g.vc(a,"10.0")&&(this.u=!1))},g7=function(a,b){var c=a.o; a.u&&(c="https://"+a.domain+a.port+a.o);return g.Ed(c+b,{})},h7=function(a,b,c,d,e){a={format:"JSON", method:"POST",context:a,timeout:5E3,withCredentials:!1,onSuccess:g.Sa(a.B,d,!0),onError:g.Sa(a.A,e),Ke:g.Sa(a.C,e)};c&&(a.Db=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return g.wq(b,a)},tAa=function(){var a=qAa; rAa();i7.push(a);sAa(i7)},j7=function(a,b){rAa(); var c=i7,d=uAa(a,String(b));g.gb(c)?vAa(d):(sAa(c),(0,g.y)(c,function(e){e(d)}))},rAa=function(){i7||(i7=g.Ja("yt.mdx.remote.debug.handlers_")||[],g.Ha("yt.mdx.remote.debug.handlers_",i7,void 0))},vAa=function(a){var b=(k7+1)%50; k7=b;l7[b]=a;m7||(m7=49==b)},sAa=function(a){var b=l7; if(b[0]){var c=k7,d=m7?c:-1;do{d=(d+1)%50;var e=b[d];(0,g.y)(a,function(f){f(e)})}while(d!=c); l7=Array(50);k7=-1;m7=!1}},uAa=function(a,b){var c=((0,g.D)()-wAa)/1E3; c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")},n7=function(a){g.N.call(this); this.F=a;this.screens=[]},xAa=function(a,b){var c=a.get(b.uuid)||a.get(b.id); if(c){var d=c.name;c.id=b.id||c.id;c.name=b.name;c.token=b.token;c.uuid=b.uuid||c.uuid;return c.name!=d}a.screens.push(b);return!0},yAa=function(a,b){var c=a.screens.length!=b.length; a.screens=(0,g.Ae)(a.screens,function(f){return!!l6(b,f)}); for(var d=0,e=b.length;d<e;d++)c=xAa(a,b[d])||c;return c},zAa=function(a,b){var c=a.screens.length; a.screens=(0,g.Ae)(a.screens,function(d){return!(d||b?!d!=!b?0:d.id==b.id:1)}); return a.screens.length<c},o7=function(a,b,c,d){g.N.call(this); this.F=a;this.B=b;this.C=c;this.A=d;this.u=0;this.o=null;this.Ka=NaN},q7=function(a){n7.call(this,"LocalScreenService"); this.u=a;this.o=NaN;p7(this);this.info("Initializing with "+j6(this.screens))},AAa=function(a){if(a.screens.length){var b=(0,g.Ic)(a.screens,function(d){return d.id}),c=g7(a.u,"/pairing/get_lounge_token_batch"); h7(a.u,c,{screen_ids:b.join(",")},(0,g.x)(a.VG,a),(0,g.x)(a.UG,a))}},p7=function(a){var b=jza(pza()); b=(0,g.Ae)(b,function(c){return!c.uuid}); return yAa(a,b)},r7=function(a,b){rza((0,g.Ic)(a.screens,hza)); b&&qza()},t7=function(a,b){g.N.call(this); this.F=b;var c=g.Zs("yt-remote-online-screen-ids")||"";c=c?c.split(","):[];for(var d={},e=this.F(),f=0,h=e.length;f<h;++f){var l=e[f].id;d[l]=g.fb(c,l)}this.o=d;this.C=a;this.A=this.B=NaN;this.u=null;s7("Initialized with "+g.Nk(this.o))},BAa=function(a,b,c){var d=g7(a.C,"/pairing/get_screen_availability"); h7(a.C,d,{lounge_token:b.token},(0,g.x)(function(e){e=e.screens||[];for(var f=0,h=e.length;f<h;++f)if(e[f].loungeToken==b.token){c("online"==e[f].status);return}c(!1)},a),(0,g.x)(function(){c(!1)},a))},u7=function(a,b){a:if(c6(b)!=c6(a.o))var c=!1; else{c=g.Hb(b);for(var d=0,e=c.length;d<e;++d)if(!a.o[c[d]]){c=!1;break a}c=!0}c||(s7("Updated online screens: "+g.Nk(a.o)),a.o=b,a.S("screenChange"));CAa(a)},v7=function(a){isNaN(a.A)||g.Oo(a.A); a.A=g.Mo((0,g.x)(a.dw,a),0<a.B&&a.B<(0,g.D)()?2E4:1E4)},s7=function(a){j7("OnlineScreenService",a)},DAa=function(a){var b={}; (0,g.y)(a.F(),function(c){c.token?b[c.token]=c.id:this.oc("Requesting availability of screen w/o lounge token.")}); return b},CAa=function(a){a=g.Hb(g.Bb(a.o,function(b){return b})); g.wb(a);a.length?g.Ys("yt-remote-online-screen-ids",a.join(","),60):g.$s("yt-remote-online-screen-ids")},w7=function(a){n7.call(this,"ScreenService"); this.C=a;this.o=this.u=null;this.A=[];this.B={};EAa(this)},GAa=function(a,b,c,d,e,f){a.info("getAutomaticScreenByIds "+c+" / "+b); c||(c=a.B[b]);var h=a.Ee();if(h=(c?m6(h,c):null)||m6(h,b)){h.uuid=b;var l=x7(a,h);BAa(a.o,l,function(m){e(m?l:null)})}else c?FAa(a,c,(0,g.x)(function(m){var n=x7(this,new g6({name:d, screenId:c,loungeToken:m,dialId:b||""}));BAa(this.o,n,function(q){e(q?n:null)})},a),f):e(null)},HAa=function(a,b){for(var c=0,d=a.screens.length;c<d;++c)if(a.screens[c].name==b)return a.screens[c]; return null},FAa=function(a,b,c,d){a.info("requestLoungeToken_ for "+b); var e={Db:{screen_ids:b},method:"POST",context:a,onSuccess:function(f,h){var l=h&&h.screens||[];l[0]&&l[0].screenId==b?c(l[0].loungeToken):d(Error("Missing lounge token in token response"))}, onError:function(){d(Error("Request screen lounge token failed"))}}; g.wq(g7(a.C,"/pairing/get_lounge_token_batch"),e)},IAa=function(a){a.screens=a.u.Ee(); var b=a.B,c={},d;for(d in b)c[b[d]]=d;b=0;for(d=a.screens.length;b<d;++b){var e=a.screens[b];e.uuid=c[e.id]||""}a.info("Updated manual screens: "+j6(a.screens))},EAa=function(a){y7(a); a.u=new q7(a.C);a.u.subscribe("screenChange",(0,g.x)(a.cH,a));IAa(a);a.A=jza(g.Zs("yt-remote-automatic-screen-cache")||[]);y7(a);a.info("Initializing automatic screens: "+j6(a.A));a.o=new t7(a.C,(0,g.x)(a.Ee,a,!0));a.o.subscribe("screenChange",(0,g.x)(function(){this.S("onlineScreenChange")},a))},x7=function(a,b){var c=a.get(b.id); c?(c.uuid=b.uuid,b=c):((c=m6(a.A,b.uuid))?(c.id=b.id,c.token=b.token,b=c):a.A.push(b),g.Ys("yt-remote-automatic-screen-cache",(0,g.Ic)(a.A,hza)));y7(a);a.B[b.uuid]=b.id;g.Ys("yt-remote-device-id-map",a.B,31536E3);return b},y7=function(a){a.B=g.Zs("yt-remote-device-id-map")||{}},z7=function(a,b,c){g.N.call(this); this.T=c;this.M=a;this.o=b;this.I=null},A7=function(a,b){j7(a.T,b)},B7=function(a,b){z7.call(this,a,b,"CastSession"); this.u=null;this.A=0;this.C=(0,g.x)(this.PP,this);this.B=(0,g.x)(this.hO,this);this.A=g.Mo((0,g.x)(function(){JAa(this,null)},this),12E4)},KAa=function(a){a.info("sendYoutubeMessage_: getMdxSessionStatus "+g.Nk(void 0)); var b={type:"getMdxSessionStatus"};a.u?a.u.sendMessage("urn:x-cast:com.google.youtube.mdx",b,g.Ka,(0,g.x)(function(){A7(this,"Failed to send message: getMdxSessionStatus.")},a)):A7(a,"Sending yt message without session: "+g.Nk(b))},JAa=function(a,b){g.Oo(a.A); if(b){if(a.info("onConnectedScreenId_: Received screenId: "+b),!a.getScreen()||a.getScreen().id!=b){var c=(0,g.x)(a.jr,a),d=(0,g.x)(a.Je,a);a.Cz(b,c,d,5)}}else a.Je(Error("Waiting for session status timed out."))},C7=function(a,b,c){z7.call(this,a,b,"DialSession"); this.A=this.G=null;this.N="";this.U=c;this.B=null;this.F=g.Ka;this.C=NaN;this.R=(0,g.x)(this.SP,this);this.u=g.Ka},LAa=function(a){a.u=a.M.LE(a.N,a.o.label,a.o.friendlyName,(0,g.x)(function(b){this.u=g.Ka; this.jr(b)},a),(0,g.x)(function(b){this.u=g.Ka; this.Je(b)},a))},MAa=function(a){var b={}; b.pairingCode=a.N;b.theme=a.U;if(a.B){var c=a.B.currentTime||0;b.v=a.B.videoId;b.t=c}tza()&&(b.env_useStageMdx=1);return g.Cd(b)},D7=function(a,b){z7.call(this,a,b,"ManualSession"); this.u=g.Mo((0,g.x)(this.ql,this,null),150)},E7=function(a,b,c,d){g.N.call(this); this.u=a;this.G=b||"233637DE";this.F=c||"cl";this.I=d||!1;this.o=null;this.C=!1;this.A=[];this.B=(0,g.x)(this.aN,this)},NAa=function(a,b){return b?g.cb(a.A,function(c){return h6(b,c.label)},a):null},F7=function(a){j7("Controller",a)},qAa=function(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)},G7=function(a){return a.C||!!a.A.length||!!a.o},H7=function(a,b,c){b!=a.o&&(g.Me(a.o),(a.o=b)?(c?a.S("yt-remote-cast2-receiver-resumed",b.o):a.S("yt-remote-cast2-receiver-selected", b.o),b.subscribe("sessionScreen",(0,g.x)(a.FC,a,b)),b.getScreen()?a.S("yt-remote-cast2-session-change",b.getScreen()):c&&a.o.ql(null)):a.S("yt-remote-cast2-session-change",null))},OAa=function(a){var b=a.u.KE(),c=a.o&&a.o.o; a=(0,g.Ic)(b,function(d){c&&h6(d,c.label)&&(c=null);var e=d.uuid?d.uuid:d.id,f=NAa(this,d);f?(f.label=e,f.friendlyName=d.name):(f=new chrome.cast.Receiver(e,d.name),f.receiverType=chrome.cast.ReceiverType.CUSTOM);return f},a); c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a},UAa=function(a,b,c,d,e,f,h){PAa()?QAa(b,e,f,h)&&(J7(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?RAa(a,c):(window.__onGCastApiAvailable=function(l,m){l?RAa(a,c):(K7("Failed to load cast API: "+m),L7(!1),J7(!1),g.$s("yt-remote-cast-available"),g.$s("yt-remote-cast-receiver"),SAa(),c(!1))},d?g.Yo("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"): 0<=window.navigator.userAgent.indexOf("Android")&&0<=window.navigator.userAgent.indexOf("Chrome/")&&window.navigator.presentation?Aza():!window.chrome||!window.navigator.presentation||0<=window.navigator.userAgent.indexOf("Edge")?u6():(zza(),t6(TAa.map(xza))))):I7("Cannot initialize because not running Chrome")},SAa=function(){I7("dispose"); var a=M7();a&&a.dispose();g.Ha("yt.mdx.remote.cloudview.instance_",null,void 0);VAa(!1);g.Uo(N7);N7.length=0},O7=function(){return!!g.Zs("yt-remote-cast-installed")},WAa=function(){var a=g.Zs("yt-remote-cast-receiver"); return a?a.friendlyName:null},XAa=function(){I7("clearCurrentReceiver"); g.$s("yt-remote-cast-receiver")},YAa=function(){return O7()?M7()?M7().getCastSession():(K7("getCastSelector: Cast is not initialized."),null):(K7("getCastSelector: Cast API is not installed!"),null)},Q7=function(){O7()?M7()?P7()?(I7("Requesting cast selector."),M7().requestSession()):(I7("Wait for cast API to be ready to request the session."),N7.push(g.To("yt-remote-cast2-api-ready",Q7))):K7("requestCastSelector: Cast is not initialized."):K7("requestCastSelector: Cast API is not installed!")},R7= function(a,b){P7()?M7().setConnectedScreenStatus(a,b):K7("setConnectedScreenStatus called before ready.")},PAa=function(){var a=0<=g.Pc.search(/ (CrMo|Chrome|CriOS)\//); return g.Qw||a},ZAa=function(a,b){M7().init(a,b)},QAa=function(a,b,c,d){var e=!1; M7()||(a=new E7(a,b,c,d),a.subscribe("yt-remote-cast2-availability-change",function(f){g.Ys("yt-remote-cast-available",f);e6("yt-remote-cast2-availability-change",f)}),a.subscribe("yt-remote-cast2-receiver-selected",function(f){I7("onReceiverSelected: "+f.friendlyName); g.Ys("yt-remote-cast-receiver",f);e6("yt-remote-cast2-receiver-selected",f)}),a.subscribe("yt-remote-cast2-receiver-resumed",function(f){I7("onReceiverResumed: "+f.friendlyName); g.Ys("yt-remote-cast-receiver",f)}),a.subscribe("yt-remote-cast2-session-change",function(f){I7("onSessionChange: "+i6(f)); f||g.$s("yt-remote-cast-receiver");e6("yt-remote-cast2-session-change",f)}),g.Ha("yt.mdx.remote.cloudview.instance_",a,void 0),e=!0); I7("cloudview.createSingleton_: "+e);return e},M7=function(){return g.Ja("yt.mdx.remote.cloudview.instance_")},RAa=function(a,b){L7(!0); J7(!1);ZAa(a,function(c){c?(VAa(!0),g.Vo("yt-remote-cast2-api-ready")):(K7("Failed to initialize cast API."),L7(!1),g.$s("yt-remote-cast-available"),g.$s("yt-remote-cast-receiver"),SAa());b(c)})},I7=function(a){j7("cloudview",a)},K7=function(a){j7("cloudview",a)},L7=function(a){I7("setCastInstalled_ "+a); g.Ys("yt-remote-cast-installed",a)},P7=function(){return!!g.Ja("yt.mdx.remote.cloudview.apiReady_")},VAa=function(a){I7("setApiReady_ "+a); g.Ha("yt.mdx.remote.cloudview.apiReady_",a,void 0)},J7=function(a){g.Ha("yt.mdx.remote.cloudview.initializing_",a,void 0)},S7=function(a){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.F=this.G=0;this.o=null;this.hasNext=this.og=!1;this.M=this.I=this.u=this.C=0;this.B=NaN;this.A=!1;this.reset(a)},T7=function(a){a.audioTrackId=null; a.o=null;a.playerState=-1;a.og=!1;a.hasNext=!1;a.G=0;a.F=(0,g.D)();a.C=0;a.u=0;a.I=0;a.M=0;a.B=NaN;a.A=!1},U7=function(a){return a.qb()?((0,g.D)()-a.F)/1E3:0},V7=function(a,b){a.G=b; a.F=(0,g.D)()},W7=function(a){switch(a.playerState){case 1:case 1081:return((0,g.D)()-a.F)/1E3+a.G; case -1E3:return 0}return a.G},X7=function(a,b,c){var d=a.videoId; a.videoId=b;a.index=c;b!=d&&T7(a)},Y7=function(a){var b={}; b.index=a.index;b.listId=a.listId;b.videoId=a.videoId;b.playerState=a.playerState;b.volume=a.volume;b.muted=a.muted;b.audioTrackId=a.audioTrackId;b.trackData=g.Sb(a.o);b.hasPrevious=a.og;b.hasNext=a.hasNext;b.playerTime=a.G;b.playerTimeAt=a.F;b.seekableStart=a.C;b.seekableEnd=a.u;b.duration=a.I;b.loadedTime=a.M;b.liveIngestionTime=a.B;return b},$7=function(a,b){g.N.call(this); this.o=0;this.B=a;this.F=[];this.C=new lAa;this.A=this.u=null;this.M=(0,g.x)(this.iL,this);this.G=(0,g.x)(this.An,this);this.I=(0,g.x)(this.hL,this);this.N=(0,g.x)(this.rL,this);var c=0;a?(c=a.getProxyState(),3!=c&&(a.subscribe("proxyStateChange",this.ix,this),$Aa(this))):c=3;0!=c&&(b?this.ix(c):g.Mo((0,g.x)(function(){this.ix(c)},this),0)); var d=YAa();d&&Z7(this,d);this.subscribe("yt-remote-cast2-session-change",this.N)},a8=function(a){return new S7(a.B.getPlayerContextData())},$Aa=function(a){(0,g.y)("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange".split(" "),function(b){this.F.push(this.B.subscribe(b,g.Sa(this.XM,b),this))},a)},aBa=function(a){(0,g.y)(a.F,function(b){this.B.unsubscribeByKey(b)},a); a.F.length=0},b8=function(a,b){var c=a.C; 50>c.o.length+c.u.length&&a.C.u.push(b)},d8=function(a,b,c){var d=a8(a); V7(d,c);-1E3!=d.playerState&&(d.playerState=b);c8(a,d)},e8=function(a,b,c){a.B.sendMessage(b,c)},c8=function(a,b){aBa(a); a.B.setPlayerContextData(Y7(b));$Aa(a)},Z7=function(a,b){a.A&&(a.A.removeUpdateListener(a.M),a.A.removeMediaListener(a.G),a.An(null)); a.A=b;a.A&&(j7("CP","Setting cast session: "+a.A.sessionId),a.A.addUpdateListener(a.M),a.A.addMediaListener(a.G),a.A.media.length&&a.An(a.A.media[0]))},bBa=function(a){var b=a.u.media,c=a.u.customData; if(b&&c){var d=a8(a);b.contentId!=d.videoId&&j7("CP","Cast changing video to: "+b.contentId);d.videoId=b.contentId;d.playerState=c.playerState;V7(d,a.u.getEstimatedTime());c8(a,d)}else j7("CP","No cast media video. Ignoring state update.")},f8=function(a,b,c){return(0,g.x)(function(d){this.oc("Failed to "+b+" with cast v2 channel. Error code: "+d.code); d.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.oc("Retrying "+b+" using MDx browser channel."),e8(this,b,c))},a)},g8=function(a,b,c){g.N.call(this); this.C=NaN;this.R=!1;this.I=this.G=this.M=this.N=NaN;this.T=[];this.B=this.F=this.A=this.fb=this.o=null;this.Z=a;this.T.push(g.ip(window,"beforeunload",(0,g.x)(this.NG,this)));this.u=[];this.fb=new S7;this.U=b.id;this.o=cBa(this,c);this.o.subscribe("handlerOpened",this.mL,this);this.o.subscribe("handlerClosed",this.jL,this);this.o.subscribe("handlerError",this.kL,this);this.o.subscribe("handlerMessage",this.lL,this);pAa(this.o,b.token);this.subscribe("remoteQueueChange",function(){var d=this.fb.videoId; g.at()&&g.Ys("yt-remote-session-video-id",d)},this)},h8=function(a){j7("conn",a)},cBa=function(a,b){return new d7(g7(a.Z,"/bc"),b)},i8=function(a,b){a.S("proxyStateChange",b)},dBa=function(a){a.C=g.Mo((0,g.x)(function(){h8("Connecting timeout"); this.Nk(1)},a),2E4)},j8=function(a){g.Oo(a.C); a.C=NaN},k8=function(a){g.Oo(a.N); a.N=NaN},eBa=function(a){l8(a); a.M=g.Mo((0,g.x)(function(){m8(this,"getNowPlaying")},a),2E4)},l8=function(a){g.Oo(a.M); a.M=NaN},gBa=function(a,b){b&&(j8(a),k8(a)); b==(e7(a.o)&&isNaN(a.C))?b&&(i8(a,1),m8(a,"getSubtitlesTrack")):b?(a.Az()&&a.fb.reset(),i8(a,1),m8(a,"getNowPlaying"),fBa(a)):a.Nk(1)},hBa=function(a,b){var c=b.params.videoId; delete b.params.videoId;c==a.fb.videoId&&(g.Ob(b.params)?a.fb.o=null:a.fb.o=b.params,a.S("remotePlayerChange"))},iBa=function(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10); a.fb.listId=b.params.listId||a.fb.listId;X7(a.fb,c,d);a.S("remoteQueueChange")},kBa=function(a,b){b.params=b.params||{}; iBa(a,b);jBa(a,b);a.S("autoplayDismissed")},jBa=function(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10); V7(a.fb,isNaN(c)?0:c);c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;-1==c&&-1E3==a.fb.playerState&&(c=-1E3);a.fb.playerState=c;c=Number(b.params.loadedTime);a.fb.M=isNaN(c)?0:c;c=Number(b.params.duration);a.fb.I=isNaN(c)?0:c;c=a.fb;var d=Number(b.params.liveIngestionTime);c.B=d;c.A=isNaN(d)?!1:!0;c=a.fb;d=Number(b.params.seekableStartTime);var e=Number(b.params.seekableEndTime);c.C=isNaN(d)?0:d;c.u=isNaN(e)?0:e;1==a.fb.playerState?eBa(a):l8(a);a.S("remotePlayerChange")},lBa=function(a,b){if(-1E3!= a.fb.playerState){var c=1085; switch(parseInt(b.params.adState,10)){case 1:c=1081;break;case 2:c=1084;break;case 0:c=1083}a.fb.playerState=c;c=parseInt(b.params.currentTime,10);V7(a.fb,isNaN(c)?0:c);a.S("remotePlayerChange")}},mBa=function(a,b){var c="true"==b.params.muted; a.fb.volume=parseInt(b.params.volume,10);a.fb.muted=c;a.S("remotePlayerChange")},nBa=function(a,b){a.F=b.params.videoId; a.S("nowAutoplaying",parseInt(b.params.timeout,10))},oBa=function(a,b){var c="true"==b.params.hasNext; a.fb.og="true"==b.params.hasPrevious;a.fb.hasNext=c;a.S("previousNextChange")},fBa=function(a){g.Oo(a.I); a.I=g.Mo((0,g.x)(a.Nk,a,1),864E5)},m8=function(a,b,c){c?h8("Sending: action="+b+", params="+g.Nk(c)):h8("Sending: action="+b); a.o.sendMessage(b,c)},n8=function(a){n7.call(this,"ScreenServiceProxy"); this.Id=a;this.o=[];this.o.push(this.Id.$_s("screenChange",(0,g.x)(this.NP,this)));this.o.push(this.Id.$_s("onlineScreenChange",(0,g.x)(this.AM,this)))},tBa=function(a){var b={device:"Desktop", app:"youtube-desktop"};b=g.K("MDX_CONFIG")||b;lza();q6();o8||(o8=new f7(b?b.loungeApiHost:void 0),tza()&&(o8.o="/api/loungedev"));p8||(p8=g.Ja("yt.mdx.remote.deferredProxies_")||[],g.Ha("yt.mdx.remote.deferredProxies_",p8,void 0));pBa();var c=q8();if(!c){var d=new w7(o8);g.Ha("yt.mdx.remote.screenService_",d,void 0);c=q8();var e=!1,f=void 0,h=void 0,l=!1;b&&(e=!!b.loadCastApiSetupScript,f=b.appId,h=b.theme,l=!!b.disableDial);UAa(a,d,function(m){m?r8()&&R7(r8(),"YouTube TV"):d.subscribe("onlineScreenChange", function(){e6("yt-remote-receiver-availability-change")})},e,f,h,l)}b&&!g.Ja("yt.mdx.remote.initialized_")&&(g.Ha("yt.mdx.remote.initialized_",!0,void 0),s8("Initializing: "+g.Nk(b)),t8.push(g.To("yt-remote-cast2-availability-change",function(){e6("yt-remote-receiver-availability-change")})),t8.push(g.To("yt-remote-cast2-receiver-selected",function(){u8(null); e6("yt-remote-auto-connect","cast-selector-receiver")})),t8.push(g.To("yt-remote-cast2-receiver-resumed",function(){e6("yt-remote-receiver-resumed","cast-selector-receiver")})),t8.push(g.To("yt-remote-cast2-session-change",qBa)),t8.push(g.To("yt-remote-connection-change",function(m){m?R7(r8(),"YouTube TV"):v8()||(R7(null,null),XAa())})),a=w8(),b.isAuto&&(a.id+="#dial"),g.Co("desktop_enable_autoplay")&&(a.capabilities=["atp"]),a.name=b.device,a.app=b.app,(h=b.theme)&&(a.theme=h),s8(" -- with channel params: "+ g.Nk(a)),rBa(a),c.start(),r8()||sBa())},vBa=function(){var a=uBa(); O7()&&g.Zs("yt-remote-cast-available")&&a.push({key:"cast-selector-receiver",name:"Cast..."});return a},uBa=function(){var a=q8().Id.$_gos(); var b=x8();b&&y8()&&(l6(a,b)||a.push(b));return kza(a)},z8=function(){var a=wBa(); !a&&O7()&&WAa()&&(a={key:"cast-selector-receiver",name:WAa()});return a},wBa=function(){var a=uBa(),b=x8(); b||(b=v8());return g.cb(a,function(c){return b&&h6(b,c.key)?!0:!1})},x8=function(){var a=r8(); if(!a)return null;var b=q8().Ee();return m6(b,a)},qBa=function(a){s8("remote.onCastSessionChange_: "+i6(a)); if(a){var b=x8();b&&b.id==a.id?R7(b.id,"YouTube TV"):(b&&A8(),B8(a,1))}else y8()&&A8()},A8=function(){P7()?M7().stopSession():K7("stopSession called before API ready."); var a=y8();a&&(a.disconnect(1),C8(null))},D8=function(){var a=y8(); return!!a&&3!=a.getProxyState()},s8=function(a){j7("remote",a)},q8=function(){if(!E8){var a=g.Ja("yt.mdx.remote.screenService_"); E8=a?new n8(a):null}return E8},r8=function(){return g.Ja("yt.mdx.remote.currentScreenId_")},xBa=function(a){g.Ha("yt.mdx.remote.currentScreenId_",a,void 0)},yBa=function(){return g.Ja("yt.mdx.remote.connectData_")},u8=function(a){g.Ha("yt.mdx.remote.connectData_",a,void 0)},y8=function(){return g.Ja("yt.mdx.remote.connection_")},C8=function(a){var b=y8(); u8(null);a||xBa("");g.Ha("yt.mdx.remote.connection_",a,void 0);p8&&((0,g.y)(p8,function(c){c(a)}),p8.length=0); b&&!a?e6("yt-remote-connection-change",!1):!b&&a&&e6("yt-remote-connection-change",!0)},v8=function(){var a=g.at(); if(!a)return null;var b=q8();if(!b)return null;b=b.Ee();return m6(b,a)},B8=function(a,b){r8(); x8()&&x8();if(F8)G8=a;else{xBa(a.id);var c=new g8(o8,a,w8());c.connect(b,yBa());c.subscribe("beforeDisconnect",function(d){e6("yt-remote-before-disconnect",d)}); c.subscribe("beforeDispose",function(){y8()&&(y8(),C8(null))}); C8(c)}},sBa=function(){var a=v8(); a?(s8("Resume connection to: "+i6(a)),B8(a,0)):(r6(),XAa(),s8("Skipping connecting because no session screen found."))},pBa=function(){var a=w8(); if(g.Ob(a)){a=p6();var b=g.Zs("yt-remote-session-name")||"",c=g.Zs("yt-remote-session-app")||"";a={device:"REMOTE_CONTROL",id:a,name:b,app:c,mdxVersion:3};g.Ha("yt.mdx.remote.channelParams_",a,void 0)}},w8=function(){return g.Ja("yt.mdx.remote.channelParams_")||{}},rBa=function(a){a?(g.Ys("yt-remote-session-app",a.app),g.Ys("yt-remote-session-name",a.name)):(g.$s("yt-remote-session-app"),g.$s("yt-remote-session-name")); g.Ha("yt.mdx.remote.channelParams_",a,void 0)},H8=function(a,b,c){g.A.call(this); var d=this;this.module=a;this.H=b;this.Ya=c;this.events=new g.cs(this);this.M=this.events.L(this.H,"onVolumeChange",this.gC);this.B=!1;this.suggestion=null;this.C=new g.cH(64);this.o=new g.H(this.OD,500,this);this.u=new g.H(this.PD,1E3,this);this.G=new v6(this.tP,0,this);this.A={};this.I=new g.H(this.uE,1E3,this);this.F=new w6(this.seekTo,1E3,this);this.N=g.Ka;g.C(this,this.events);this.events.L(b,"onCaptionsTrackListChanged",this.aM);this.events.L(b,"captionschanged",this.gL);this.events.L(b,"captionssettingschanged", this.RD);this.events.L(b,"videoplayerreset",this.kr);this.events.L(b,"mdxautoplaycancel",function(){d.Ya.Qy()}); a=this.Ya;a.ia();a.subscribe("proxyStateChange",this.zC,this);a.subscribe("remotePlayerChange",this.Gn,this);a.subscribe("remoteQueueChange",this.kr,this);a.subscribe("previousNextChange",this.vC,this);a.subscribe("nowAutoplaying",this.rC,this);a.subscribe("autoplayDismissed",this.RB,this);g.C(this,this.o);g.C(this,this.u);g.C(this,this.G);g.C(this,this.I);g.C(this,this.F);this.RD();this.kr();this.Gn()},zBa=function(a){a.Vb(0); a.o.stop();a.Nc(new g.cH(64))},J8=function(a,b){if(I8(a)&&!a.B){var c=null; b&&(c={style:a.H.getSubtitlesUserSettings()},g.Ub(c,b));a.Ya.IE(a.H.getVideoData(1).videoId,c);a.A=a8(a.Ya).o}},K8=function(a,b){var c=a.H.getPlaylist(); if(c){var d=c.index;var e=c.listId.toString()}c=a.H.getVideoData(1);a.Ya.playVideo(c.videoId,b,d,e,c.playerParams,c.Ef,Yya(c));a.Nc(new g.cH(1))},ABa=function(a,b){if(b){var c=a.H.getOption("captions","tracklist",{aA:1}); c&&c.length?(a.H.setOption("captions","track",b),a.B=!1):(a.H.loadModule("captions"),a.B=!0)}else a.H.setOption("captions","track",{})},I8=function(a){return a8(a.Ya).videoId===a.H.getVideoData(1).videoId},L8=function(){g.U.call(this,{D:"div", J:"ytp-mdx-manual-pairing-popup-dialog",P:{role:"dialog"},K:[{D:"div",J:"ytp-mdx-manual-pairing-popup-dialog-inner-content",K:[{D:"div",J:"ytp-mdx-manual-pairing-popup-title",W:"\u0421\u043a\u043e\u0440\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441 \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u043e\u043c."}, {D:"div",J:"ytp-mdx-manual-pairing-popup-buttons",K:[{D:"button",Y:["ytp-button","ytp-mdx-manual-pairing-popup-learn-more"],W:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435..."},{D:"button",Y:["ytp-button","ytp-mdx-manual-pairing-popup-ok"],W:"\u041e\u041a"}]}]}]});this.o=new g.cO(this,250);this.learnMoreButton=this.da("ytp-mdx-manual-pairing-popup-learn-more");this.okButton=this.da("ytp-mdx-manual-pairing-popup-ok");g.C(this,this.o);this.L(this.learnMoreButton,"click",this.u);this.L(this.okButton, "click",this.A)},M8=function(){g.U.call(this,{D:"div", J:"ytp-mdx-popup-dialog",P:{role:"dialog"},K:[{D:"div",J:"ytp-mdx-popup-dialog-inner-content",K:[{D:"div",J:"ytp-mdx-popup-title",W:"\u0412\u044b \u0432\u044b\u0448\u043b\u0438 \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430"},{D:"div",J:"ytp-mdx-popup-description",W:'\u0420\u043e\u043b\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043d\u0430 \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u0435, \u0447\u0442\u043e \u0441\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 "\u041e\u0442\u043c\u0435\u043d\u0430" \u0438 \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435.'}, {D:"div",J:"ytp-mdx-privacy-popup-buttons",K:[{D:"button",Y:["ytp-button","ytp-mdx-privacy-popup-cancel"],W:"\u041e\u0442\u043c\u0435\u043d\u0430"},{D:"button",Y:["ytp-button","ytp-mdx-privacy-popup-confirm"],W:"\u041e\u041a"}]}]}]});this.o=new g.cO(this,250);this.cancelButton=this.da("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.da("ytp-mdx-privacy-popup-confirm");g.C(this,this.o);this.L(this.cancelButton,"click",this.u);this.L(this.confirmButton,"click",this.A)},N8=function(a){g.U.call(this, {D:"div", J:"ytp-remote",K:[{D:"div",J:"ytp-remote-display-status",K:[{D:"div",J:"ytp-remote-display-status-icon",K:[g.jM()]},{D:"div",J:"ytp-remote-display-status-text",W:"{{statustext}}"}]}]});this.api=a;this.o=new g.cO(this,250);g.C(this,this.o);this.L(a,"presentingplayerstatechange",this.u);BBa(this,g.hM(a))},BBa=function(a,b){if(3===a.api.getPresentingPlayerType()){var c={RECEIVER_NAME:a.api.getOption("remote","currentReceiver").name}; c=g.T(b,128)?g.KL('\u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 "$RECEIVER_NAME"',c):b.qb()||g.T(b,4)?g.KL('\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 "$RECEIVER_NAME"',c):g.KL('\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 "$RECEIVER_NAME"', c);a.ma("statustext",c);a.o.show()}else a.o.hide()},O8=function(a,b){g.wR.call(this,"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430",0,a,b); this.H=a;this.Si={};this.L(a,"onMdxReceiversChange",this.B);this.L(a,"presentingplayerstatechange",this.B);this.B()},P8=function(a){g.IN.call(this,a); this.Jf={key:k6(),name:"\u042d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440"};this.Ae=null;this.subscriptions=[];this.Ov=this.Ya=null;this.Si=[this.Jf];this.Xh=this.Jf;this.Rb=new g.cH(64);this.rA=0;this.jd=-1;this.sl=null;this.Hn=this.lq=!1;this.jk=this.Il=null;if(!g.Iy(this.player.O())){a=this.player;var b=g.VM(a);b&&(b=b.Aj())&&(b=new O8(a,b),g.C(this,b));b=new N8(a);g.C(this,b);g.uN(a,b.element,4);this.Il=new M8;g.C(this,this.Il);g.uN(a,this.Il.element,4);g.P(this.player.O().experiments, "pair_servlet_deprecation_warning_enabled")&&(this.sl=new L8,g.C(this,this.sl),g.uN(a,this.sl.element,4));this.Hn=!!v8();this.lq=!!g.Zs("yt-remote-manual-pairing-warning-shown")}},Q8=function(a){a.jk&&(a.player.removeEventListener("presentingplayerstatechange",a.jk),a.jk=null)},CBa=function(a,b,c){a.Rb=c; a.player.S("presentingplayerstatechange",new g.lH(c,b))},DBa=function(a,b,c){var d=!1; 1===b?d=!a.Hn:2===b&&(d=!a.lq);d&&g.nH(c,8)&&(a.player.pauseVideo(),Q8(a))},R8=function(a,b){if(b.key!==a.Xh.key)if(b.key===a.Jf.key)A8(); else{if(a.sl&&!a.lq&&b!==a.Jf&&"cast-selector-receiver"!==b.key&&g.Ry(a.player.O()))EBa(a);else{var c;(c=!g.P(a.player.O().experiments,"mdx_enable_privacy_disclosure_ui"))||(c=((c=g.K("PLAYER_CONFIG"))&&c.args&&void 0!==c.args.authuser?!0:!(!g.K("SESSION_INDEX")&&!g.K("LOGGED_IN")))||a.Hn||!a.Il);(c?0:g.Ry(a.player.O())||g.Vy(a.player.O()))&&FBa(a)}a.Xh=b;var d=a.player.getPlaylistId();c=a.player.getVideoData(1);var e=c.videoId;if(!d&&!e||(2===a.player.getAppState()||1===a.player.getAppState())&& g.P(a.player.O().experiments,"should_clear_video_data_on_player_cued_unstarted"))c=null;else{var f=a.player.getPlaylist();if(f){var h=[];for(var l=0;l<f.getLength();l++)h[l]=f.Ca(l).videoId}else h=[e];f=a.player.getCurrentTime(1);d={videoIds:h,listId:d,videoId:e,playerParams:c.playerParams,clickTrackingParams:c.Ef,index:Math.max(a.player.getPlaylistIndex(),0),currentTime:0===f?void 0:f};(c=Yya(c))&&(d.locationInfo=c);c=d}s8("Connecting to: "+g.Nk(b));"cast-selector-receiver"==b.key?(u8(c||null),c= c||null,P7()?M7().setLaunchParams(c):K7("setLaunchParams called before ready.")):!c&&D8()&&r8()==b.key?e6("yt-remote-connection-change",!0):(A8(),u8(c||null),c=q8().Ee(),(c=m6(c,b.key))&&B8(c,1))}},FBa=function(a){g.hM(a.player).qb()?a.player.pauseVideo():(a.jk=function(b){DBa(a,1,b)},a.player.addEventListener("presentingplayerstatechange",a.jk)); a.Il&&a.Il.Wb();y8()||(F8=!0)},EBa=function(a){g.hM(a.player).qb()?a.player.pauseVideo():(a.jk=function(b){DBa(a,2,b)},a.player.addEventListener("presentingplayerstatechange",a.jk)); a.sl&&a.sl.Wb();y8()||(F8=!0)},Jza={"\x00":"\\0", "\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},J6={"'":"\\'"},GBa={},gza={uQ:"atp",mT:"ska",XS:"que",mS:"mus",lT:"sus",tR:"dsp",eT:"seq"},s6,o6="",yza=uza("loadCastFramework")||uza("loadCastApplicationFramework"),TAa=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ g.Ua(v6,g.A);g.k=v6.prototype;g.k.KG=function(a){this.B=arguments;this.o=!1;this.Ka?this.A=(0,g.D)()+this.Jd:this.Ka=g.ag(this.C,this.Jd)}; g.k.stop=function(){this.Ka&&(g.v.clearTimeout(this.Ka),this.Ka=null);this.A=null;this.o=!1;this.B=[]}; g.k.pause=function(){++this.u}; g.k.resume=function(){this.u&&(--this.u,!this.u&&this.o&&(this.o=!1,this.F.apply(null,this.B)))}; g.k.X=function(){this.stop();v6.sc.X.call(this)}; g.k.LG=function(){this.A?(this.Ka=g.ag(this.C,this.A-(0,g.D)()),this.A=null):(this.Ka=null,this.u?this.o=!0:(this.o=!1,this.F.apply(null,this.B)))};g.t(w6,g.A);g.k=w6.prototype;g.k.FA=function(a){this.A=arguments;this.Ka||this.u?this.o=!0:x6(this)}; g.k.stop=function(){this.Ka&&(g.v.clearTimeout(this.Ka),this.Ka=null,this.o=!1,this.A=null)}; g.k.pause=function(){this.u++}; g.k.resume=function(){this.u--;this.u||!this.o||this.Ka||(this.o=!1,x6(this))}; g.k.X=function(){g.A.prototype.X.call(this);this.stop()};z6.prototype.stringify=function(a){return g.v.JSON.stringify(a,void 0)}; z6.prototype.parse=function(a){return g.v.JSON.parse(a,void 0)};A6.prototype.o=null;A6.prototype.getOptions=function(){var a;(a=this.o)||(a={},Cza(this)&&(a[0]=!0,a[1]=!0),a=this.o=a);return a};var S8;g.Ua(Bza,A6);S8=new Bza;g.k=B6.prototype;g.k.Dj=null;g.k.Wf=!1;g.k.Yl=null;g.k.fx=null;g.k.Ml=null;g.k.Rl=null;g.k.Sh=null;g.k.Ti=null;g.k.kk=null;g.k.bd=null;g.k.po=0;g.k.cg=null;g.k.ks=null;g.k.ji=null;g.k.Rm=-1;g.k.ED=!0;g.k.lj=!1;g.k.nu=0;g.k.xr=null;var Hza={},E6={};g.k=B6.prototype;g.k.setTimeout=function(a){this.C=a}; g.k.AO=function(a){a=a.target;var b=this.xr;b&&3==S6(a)?b.FA():this.EE(a)}; g.k.EE=function(a){try{if(a==this.bd)a:{var b=S6(this.bd),c=this.bd.F,d=this.bd.getStatus();if(g.ne&&!g.Sd(10)||g.pe&&!g.Rd("420+")){if(4>b)break a}else if(3>b||3==b&&!g.Ch&&!U6(this.bd))break a;this.lj||4!=b||7==c||(8==c||0>=d?this.o.Of(3):this.o.Of(2));L6(this);var e=this.bd.getStatus();this.Rm=e;var f=U6(this.bd);(this.Wf=200==e)?(4==b&&H6(this),this.F?(Iza(this,b,f),g.Ch&&this.Wf&&3==b&&(this.B.na(this.u,"tick",this.uO),this.u.start())):G6(this,f),this.Wf&&!this.lj&&(4==b?this.o.Kp(this):(this.Wf= !1,D6(this)))):(400==e&&0<f.indexOf("Unknown SID")?(this.ji=3,F6(13)):(this.ji=0,F6(14)),H6(this),I6(this))}}catch(h){this.bd&&U6(this.bd)}finally{}}; g.k.uO=function(){var a=S6(this.bd),b=U6(this.bd);this.po<b.length&&(L6(this),Iza(this,a,b),this.Wf&&4!=a&&D6(this))}; g.k.SN=function(a){K6((0,g.x)(this.RN,this,a),0)}; g.k.RN=function(a){this.lj||(L6(this),G6(this,a),D6(this))}; g.k.IC=function(a){K6((0,g.x)(this.QN,this,a),0)}; g.k.QN=function(a){this.lj||(H6(this),this.Wf=a,this.o.Kp(this),this.o.Of(4))}; g.k.cancel=function(){this.lj=!0;H6(this)}; g.k.aO=function(){this.Yl=null;var a=(0,g.D)();0<=a-this.fx?(2!=this.Rl&&this.o.Of(3),H6(this),this.ji=2,F6(18),I6(this)):Lza(this,this.fx-a)}; g.k.getLastError=function(){return this.ji};g.k=Oza.prototype;g.k.lu=null;g.k.qe=null;g.k.yr=!1;g.k.Kz=null;g.k.np=null;g.k.Ou=null;g.k.mu=null;g.k.Xe=null;g.k.oh=-1;g.k.Qm=null;g.k.om=null;g.k.connect=function(a){this.mu=a;a=N6(this.o,null,this.mu);F6(3);this.Kz=(0,g.D)();var b=this.o.I;null!=b?(this.Qm=b[0],(this.om=b[1])?(this.Xe=1,Pza(this)):(this.Xe=2,P6(this))):(b6(a,"MODE","init"),this.qe=new B6(this,void 0,void 0,void 0),this.qe.Dj=this.lu,C6(this.qe,a,!1,null,!0),this.Xe=0)}; g.k.LF=function(a){if(a)this.Xe=2,P6(this);else{F6(4);var b=this.o;b.ng=b.Vh.oh;a7(b,9)}a&&this.Of(2)}; g.k.Ft=function(a){return this.o.Ft(a)}; g.k.abort=function(){this.qe&&(this.qe.cancel(),this.qe=null);this.oh=-1}; g.k.Jz=function(){return!1}; g.k.AC=function(a,b){this.oh=a.Rm;if(0==this.Xe)if(b){try{var c=this.u.parse(b)}catch(d){c=this.o;c.ng=this.oh;a7(c,2);return}this.Qm=c[0];this.om=c[1]}else c=this.o,c.ng=this.oh,a7(c,2);else if(2==this.Xe)if(this.yr)F6(7),this.Ou=(0,g.D)();else if("11111"==b){if(F6(6),this.yr=!0,this.np=(0,g.D)(),c=this.np-this.Kz,!g.ne||g.Sd(10)||500>c)this.oh=200,this.qe.cancel(),F6(12),O6(this.o,this,!0)}else F6(8),this.np=this.Ou=(0,g.D)(),this.yr=!1}; g.k.Kp=function(){this.oh=this.qe.Rm;if(this.qe.Wf)0==this.Xe?this.om?(this.Xe=1,Pza(this)):(this.Xe=2,P6(this)):2==this.Xe&&((!g.ne||g.Sd(10)?!this.yr:200>this.Ou-this.np)?(F6(11),O6(this.o,this,!1)):(F6(12),O6(this.o,this,!0)));else{0==this.Xe?F6(9):2==this.Xe&&F6(10);var a=this.o;this.qe.getLastError();a.ng=this.oh;a7(a,2)}}; g.k.Yn=function(){return this.o.Yn()}; g.k.isActive=function(){return this.o.isActive()}; g.k.Of=function(a){this.o.Of(a)};g.Ua(Q6,g.pf);var Uza=/^https?$/i,HBa=["POST","PUT"];g.k=Q6.prototype; g.k.send=function(a,b,c,d){if(this.o)throw Error("[goog.net.XhrIo] Object is active with another request="+this.M+"; newUri="+a);b=b?b.toUpperCase():"GET";this.M=a;this.B="";this.F=0;this.ga=b;this.Z=!1;this.A=!0;this.o=this.U?Dza(this.U):Dza(S8);this.T=this.U?this.U.getOptions():S8.getOptions();this.o.onreadystatechange=(0,g.x)(this.wC,this);try{d6(T6(this,"Opening Xhr")),this.ba=!0,this.o.open(b,String(a),!0),this.ba=!1}catch(f){d6(T6(this,"Error opening Xhr: "+f.message));Tza(this,f);return}a= c||"";var e=this.headers.clone();d&&cza(d,function(f,h){e.set(h,f)}); d=g.cb(e.Ve(),Rza);c=g.v.FormData&&a instanceof g.v.FormData;!g.fb(HBa,b)||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(f,h){this.o.setRequestHeader(h,f)},this); this.ea&&(this.o.responseType=this.ea);"withCredentials"in this.o&&this.o.withCredentials!==this.aa&&(this.o.withCredentials=this.aa);try{Wza(this),0<this.G&&(this.R=Qza(this.o),d6(T6(this,"Will abort after "+this.G+"ms if incomplete, xhr2 "+this.R)),this.R?(this.o.timeout=this.G,this.o.ontimeout=(0,g.x)(this.Lz,this)):this.N=g.ag(this.Lz,this.G,this)),d6(T6(this,"Sending request")),this.I=!0,this.o.send(a),this.I=!1}catch(f){d6(T6(this,"Send error: "+f.message)),Tza(this,f)}}; g.k.Lz=function(){"undefined"!=typeof g.F1&&this.o&&(this.B="Timed out after "+this.G+"ms, aborting",this.F=8,T6(this,this.B),this.dispatchEvent("timeout"),this.abort(8))}; g.k.abort=function(a){this.o&&this.A&&(T6(this,"Aborting"),this.A=!1,this.C=!0,this.o.abort(),this.C=!1,this.F=a||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),R6(this))}; g.k.X=function(){this.o&&(this.A&&(this.A=!1,this.C=!0,this.o.abort(),this.C=!1),R6(this,!0));Q6.sc.X.call(this)}; g.k.wC=function(){this.ia()||(this.ba||this.I||this.C?Vza(this):this.ZM())}; g.k.ZM=function(){Vza(this)}; g.k.isActive=function(){return!!this.o}; g.k.getStatus=function(){try{return 2<S6(this)?this.o.status:-1}catch(a){return-1}}; g.k.getLastError=function(){return"string"===typeof this.B?this.B:String(this.B)};g.k=V6.prototype;g.k.Gm=null;g.k.fe=null;g.k.Bc=null;g.k.ku=null;g.k.rp=null;g.k.jy=null;g.k.Jp=null;g.k.yn=0;g.k.BK=0;g.k.Gd=null;g.k.ai=null;g.k.Vg=null;g.k.rj=null;g.k.Vh=null;g.k.gs=null;g.k.pl=-1;g.k.qA=-1;g.k.ng=-1;g.k.Sk=0;g.k.Ek=0;g.k.mj=8;var b7=new g.pf;g.Ua(Yza,g.Oe);g.Ua(Zza,g.Oe);g.Ua($za,g.Oe);g.k=V6.prototype;g.k.connect=function(a,b,c,d,e){F6(0);this.ku=b;this.Gm=c||{};d&&void 0!==e&&(this.Gm.OSID=d,this.Gm.OAID=e);this.F?(K6((0,g.x)(this.Cy,this,a),100),dAa(this)):this.Cy(a)}; g.k.Cy=function(a){this.Vh=new Oza(this);this.Vh.lu=null;this.Vh.u=this.C;this.Vh.connect(a)}; g.k.Jz=function(){return 0==this.o}; g.k.HC=function(a){this.ai=null;gAa(this,a)}; g.k.GC=function(){this.Vg=null;this.Bc=new B6(this,this.A,"rpc",this.G);this.Bc.Dj=null;this.Bc.nu=0;var a=this.jy.clone();$5(a,"RID","rpc");$5(a,"SID",this.A);$5(a,"CI",this.gs?"0":"1");$5(a,"AID",this.pl);W6(this,a);if(!g.ne||g.Sd(10))$5(a,"TYPE","xmlhttp"),C6(this.Bc,a,!0,this.Jp,!1);else{$5(a,"TYPE","html");var b=this.Bc,c=!!this.Jp;b.Rl=3;b.Sh=a6(a.clone());Kza(b,c)}}; g.k.AC=function(a,b){if(0!=this.o&&(this.Bc==a||this.fe==a))if(this.ng=a.Rm,this.fe==a&&3==this.o)if(7<this.mj){try{var c=this.C.parse(b)}catch(f){c=null}if(Array.isArray(c)&&3==c.length)if(0==c[0])a:{if(!this.Vg){if(this.Bc)if(this.Bc.Ml+3E3<this.fe.Ml)Y6(this),this.Bc.cancel(),this.Bc=null;else break a;$6(this);F6(19)}}else this.qA=c[1],0<this.qA-this.pl&&37500>c[2]&&this.gs&&0==this.Ek&&!this.rj&&(this.rj=K6((0,g.x)(this.cL,this),6E3));else a7(this,11)}else b!=GBa.SQ.o&&a7(this,11);else if(this.Bc== a&&Y6(this),!g.kc(b)){c=this.C.parse(b);for(var d=0;d<c.length;d++){var e=c[d];this.pl=e[0];e=e[1];2==this.o?"c"==e[0]?(this.A=e[1],this.Jp=e[2],e=e[3],null!=e?this.mj=e:this.mj=6,this.o=3,this.Gd&&this.Gd.wy(),this.jy=N6(this,this.Yn()?this.Jp:null,this.ku),hAa(this)):"stop"==e[0]&&a7(this,7):3==this.o&&("stop"==e[0]?a7(this,7):"noop"!=e[0]&&this.Gd&&this.Gd.vy(e),this.Ek=0)}}}; g.k.cL=function(){null!=this.rj&&(this.rj=null,this.Bc.cancel(),this.Bc=null,$6(this),F6(20))}; g.k.Kp=function(a){if(this.Bc==a){Y6(this);this.Bc=null;var b=2}else if(this.fe==a)this.fe=null,b=1;else return;this.ng=a.Rm;if(0!=this.o)if(a.Wf)1==b?(b=(0,g.D)()-a.Ml,b7.dispatchEvent(new Zza(b7,a.kk?a.kk.length:0,b,this.Sk)),X6(this),this.B.length=0):hAa(this);else{var c=a.getLastError(),d;if(!(d=3==c||7==c||0==c&&0<this.ng)){if(d=1==b)this.fe||this.ai||1==this.o||2<=this.Sk?d=!1:(this.ai=K6((0,g.x)(this.HC,this,a),iAa(this,this.Sk)),this.Sk++,d=!0);d=!(d||2==b&&$6(this))}if(d)switch(c){case 1:a7(this, 5);break;case 4:a7(this,10);break;case 3:a7(this,6);break;case 7:a7(this,12);break;default:a7(this,2)}}}; g.k.jG=function(a){if(!g.fb(arguments,this.o))throw Error("Unexpected channel state: "+this.o);}; g.k.lP=function(a){a?F6(2):(F6(1),jAa(this,8))}; g.k.Ft=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new Q6;a.aa=!1;return a}; g.k.isActive=function(){return!!this.Gd&&this.Gd.isActive(this)}; g.k.Of=function(a){b7.dispatchEvent(new $za(b7,a))}; g.k.Yn=function(){return!(!g.ne||g.Sd(10))}; g.k=kAa.prototype;g.k.wy=function(){}; g.k.vy=function(){}; g.k.uy=function(){}; g.k.nt=function(){}; g.k.hz=function(){return{}}; g.k.isActive=function(){return!0};g.k=lAa.prototype;g.k.isEmpty=function(){return g.gb(this.o)&&g.gb(this.u)}; g.k.clear=function(){this.o=[];this.u=[]}; g.k.contains=function(a){return g.fb(this.o,a)||g.fb(this.u,a)}; g.k.remove=function(a){var b=this.o;var c=(0,g.Nta)(b,a);0<=c?(g.jb(b,c),b=!0):b=!1;return b||g.kb(this.u,a)}; g.k.Qd=function(){for(var a=[],b=this.o.length-1;0<=b;--b)a.push(this.o[b]);var c=this.u.length;for(b=0;b<c;++b)a.push(this.u[b]);return a};g.Ua(c7,g.A);g.k=c7.prototype;g.k.LN=function(){this.Jd=Math.min(3E5,2*this.Jd);this.A();this.u&&this.start()}; g.k.start=function(){var a=this.Jd+15E3*Math.random();this.o.eb(a);this.u=(0,g.D)()+a}; g.k.stop=function(){this.o.stop();this.u=0}; g.k.isActive=function(){return this.o.isActive()}; g.k.reset=function(){this.o.stop();this.Jd=5E3};g.Ua(d7,kAa);g.k=d7.prototype;g.k.subscribe=function(a,b,c){return this.A.subscribe(a,b,c)}; g.k.unsubscribe=function(a,b,c){return this.A.unsubscribe(a,b,c)}; g.k.Ii=function(a){return this.A.Ej(a)}; g.k.S=function(a,b){return this.A.S.apply(this.A,arguments)}; g.k.dispose=function(){this.Mb||(this.Mb=!0,g.Me(this.A),oAa(this),g.Me(this.u),this.u=null)}; g.k.ia=function(){return this.Mb}; g.k.connect=function(a,b,c){if(!this.o||2!=this.o.o){this.M="";this.u.stop();this.C=a||null;this.B=b||0;a=this.N+"/test";b=this.N+"/bind";var d=new V6(c?c.firstTestResults:null,c?c.secondTestResults:null,this.R),e=this.o;e&&(e.Gd=null);d.Gd=this;this.o=d;e?this.o.connect(a,b,this.F,e.A,e.pl):c?this.o.connect(a,b,this.F,c.sessionId,c.arrayId):this.o.connect(a,b,this.F)}}; g.k.sendMessage=function(a,b){var c={_sc:a};b&&g.Ub(c,b);this.u.isActive()||2==(this.o?this.o.o:0)?this.G.push(c):e7(this)&&eAa(this.o,c)}; g.k.wy=function(){this.u.reset();this.C=null;this.B=0;if(this.G.length){var a=this.G;this.G=[];for(var b=0,c=a.length;b<c;++b)eAa(this.o,a[b])}this.S("handlerOpened")}; g.k.uy=function(a){var b=2==a&&401==this.o.ng;4==a||b||this.u.start();this.S("handlerError",a)}; g.k.nt=function(a){if(!this.u.isActive())this.S("handlerClosed");else if(a)for(var b=0,c=a.length;b<c;++b){var d=a[b].map;d&&this.G.push(d)}}; g.k.hz=function(){var a={v:2};this.M&&(a.gsessionid=this.M);0!=this.B&&(a.ui=""+this.B);0!=this.I&&(a.ui=""+this.I);this.C&&g.Ub(a,this.C);return a}; g.k.vy=function(a){"S"==a[0]?this.M=a[1]:"gracefulReconnect"==a[0]?(this.u.start(),cAa(this.o)):this.S("handlerMessage",new mAa(a[0],a[1]))}; g.k.OO=function(){this.u.isActive();var a=this.o,b=0;a.Bc&&b++;a.fe&&b++;0==b&&this.connect(this.C,this.B)};f7.prototype.B=function(a,b,c,d){b?a(d):a({text:c.responseText})}; f7.prototype.A=function(a,b){a(Error("Request error: "+b.status))}; f7.prototype.C=function(a){a(Error("request timed out"))};var wAa=(0,g.D)(),i7=null,l7=Array(50),k7=-1,m7=!1;g.Ua(n7,g.N);n7.prototype.Ee=function(){return this.screens}; n7.prototype.contains=function(a){return!!l6(this.screens,a)}; n7.prototype.get=function(a){return a?m6(this.screens,a):null}; n7.prototype.info=function(a){j7(this.F,a)};g.t(o7,g.N);g.k=o7.prototype;g.k.start=function(){!this.o&&isNaN(this.Ka)&&this.JE()}; g.k.stop=function(){this.o&&(this.o.abort(),this.o=null);isNaN(this.Ka)||(g.Oo(this.Ka),this.Ka=NaN)}; g.k.X=function(){this.stop();g.N.prototype.X.call(this)}; g.k.JE=function(){this.Ka=NaN;this.o=g.wq(g7(this.F,"/pairing/get_screen"),{method:"POST",Db:{pairing_code:this.B},timeout:5E3,onSuccess:(0,g.x)(this.LP,this),onError:(0,g.x)(this.KP,this),Ke:(0,g.x)(this.MP,this)})}; g.k.LP=function(a,b){this.o=null;var c=b.screen||{};c.dialId=this.C;c.name=this.A;this.S("pairingComplete",new g6(c))}; g.k.KP=function(a){this.o=null;a.status&&404==a.status?this.u>=IBa.length?this.S("pairingFailed",Error("DIAL polling timed out")):(a=IBa[this.u],this.Ka=g.Mo((0,g.x)(this.JE,this),a),this.u++):this.S("pairingFailed",Error("Server error "+a.status))}; g.k.MP=function(){this.o=null;this.S("pairingFailed",Error("Server not responding"))}; var IBa=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Ua(q7,n7);g.k=q7.prototype;g.k.start=function(){p7(this)&&this.S("screenChange");!g.Zs("yt-remote-lounge-token-expiration")&&AAa(this);g.Oo(this.o);this.o=g.Mo((0,g.x)(this.start,this),1E4)}; g.k.add=function(a,b){p7(this);xAa(this,a);r7(this,!1);this.S("screenChange");b(a);a.token||AAa(this)}; g.k.remove=function(a,b){var c=p7(this);zAa(this,a)&&(r7(this,!1),c=!0);b(a);c&&this.S("screenChange")}; g.k.Zr=function(a,b,c,d){var e=p7(this),f=this.get(a.id);f?(f.name!=b&&(f.name=b,r7(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.S("screenChange")}; g.k.X=function(){g.Oo(this.o);q7.sc.X.call(this)}; g.k.VG=function(a){p7(this);var b=this.screens.length;a=a&&a.screens||[];for(var c=0,d=a.length;c<d;++c){var e=a[c],f=this.get(e.screenId);f&&(f.token=e.loungeToken,--b)}r7(this,!b);b&&j7(this.F,"Missed "+b+" lounge tokens.")}; g.k.UG=function(a){j7(this.F,"Requesting lounge tokens failed: "+a)};g.t(t7,g.N);g.k=t7.prototype;g.k.start=function(){var a=parseInt(g.Zs("yt-remote-fast-check-period")||"0",10);(this.B=(0,g.D)()-144E5<a?0:a)?v7(this):(this.B=(0,g.D)()+3E5,g.Ys("yt-remote-fast-check-period",this.B),this.dw())}; g.k.isEmpty=function(){return g.Ob(this.o)}; g.k.update=function(){s7("Updating availability on schedule.");var a=this.F(),b=g.Bb(this.o,function(c,d){return c&&!!m6(a,d)},this); u7(this,b)}; g.k.X=function(){g.Oo(this.A);this.A=NaN;this.u&&(this.u.abort(),this.u=null);g.N.prototype.X.call(this)}; g.k.dw=function(){g.Oo(this.A);this.A=NaN;this.u&&this.u.abort();var a=DAa(this);if(c6(a)){var b=g7(this.C,"/pairing/get_screen_availability");this.u=h7(this.C,b,{lounge_token:g.Hb(a).join(",")},(0,g.x)(this.vN,this,a),(0,g.x)(this.uN,this))}else u7(this,{}),v7(this)}; g.k.vN=function(a,b){this.u=null;var c=g.Hb(DAa(this));if(g.xb(c,g.Hb(a))){c=b.screens||[];for(var d={},e=0,f=c.length;e<f;++e)d[a[c[e].loungeToken]]="online"==c[e].status;u7(this,d);v7(this)}else this.oc("Changing Screen set during request."),this.dw()}; g.k.uN=function(a){this.oc("Screen availability failed: "+a);this.u=null;v7(this)}; g.k.oc=function(a){j7("OnlineScreenService",a)};g.Ua(w7,n7);g.k=w7.prototype;g.k.start=function(){this.u.start();this.o.start();this.screens.length&&(this.S("screenChange"),this.o.isEmpty()||this.S("onlineScreenChange"))}; g.k.add=function(a,b,c){this.u.add(a,b,c)}; g.k.remove=function(a,b,c){this.u.remove(a,b,c);this.o.update()}; g.k.Zr=function(a,b,c,d){this.u.contains(a)?this.u.Zr(a,b,c,d):(a="Updating name of unknown screen: "+a.name,j7(this.F,a),d(Error(a)))}; g.k.Ee=function(a){return a?this.screens:g.nb(this.screens,(0,g.Ae)(this.A,function(b){return!this.contains(b)},this))}; g.k.KE=function(){return(0,g.Ae)(this.Ee(!0),function(a){return!!this.o.o[a.id]},this)}; g.k.LE=function(a,b,c,d,e){this.info("getDialScreenByPairingCode "+a+" / "+b);var f=new o7(this.C,a,b,c);f.subscribe("pairingComplete",(0,g.x)(function(h){g.Me(f);d(x7(this,h))},this)); f.subscribe("pairingFailed",function(h){g.Me(f);e(h)}); f.start();return(0,g.x)(f.stop,f)}; g.k.OP=function(a,b,c,d){g.wq(g7(this.C,"/pairing/get_screen"),{method:"POST",Db:{pairing_code:a},timeout:5E3,onSuccess:(0,g.x)(function(e,f){var h=new g6(f.screen||{});if(!h.name||HAa(this,h.name)){a:{var l=h.name;for(var m=2,n=b(l,m);HAa(this,n);){m++;if(20<m)break a;n=b(l,m)}l=n}h.name=l}c(x7(this,h))},this), onError:(0,g.x)(function(e){d(Error("pairing request failed: "+e.status))},this), Ke:(0,g.x)(function(){d(Error("pairing request timed out."))},this)})}; g.k.X=function(){g.Me(this.u);g.Me(this.o);w7.sc.X.call(this)}; g.k.cH=function(){IAa(this);this.S("screenChange");this.o.update()}; w7.prototype.dispose=w7.prototype.dispose;g.Ua(z7,g.N);g.k=z7.prototype;g.k.getScreen=function(){return this.I}; g.k.jr=function(a){this.I=a;this.S("sessionScreen",this.I)}; g.k.Je=function(a){this.ia()||(a&&A7(this,""+a),this.I=null,this.S("sessionScreen",null))}; g.k.info=function(a){j7(this.T,a)}; g.k.NE=function(){return null}; g.k.ow=function(a){var b=this.o;a?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,(0,g.x)(function(){this.info("Updated receiver status for "+b.friendlyName+": "+a)},this),(0,g.x)(function(){A7(this,"Failed to update receiver status for: "+b.friendlyName)},this))}; g.k.X=function(){this.ow("");z7.sc.X.call(this)};g.t(B7,z7);g.k=B7.prototype;g.k.nw=function(a){if(this.u){if(this.u==a)return;A7(this,"Overriding cast sesison with new session object");this.u.removeUpdateListener(this.C);this.u.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.B)}this.u=a;this.u.addUpdateListener(this.C);this.u.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.B);KAa(this)}; g.k.ql=function(a){this.info("launchWithParams no-op for Cast: "+g.Nk(a))}; g.k.stop=function(){this.u?this.u.stop((0,g.x)(function(){this.Je()},this),(0,g.x)(function(){this.Je(Error("Failed to stop receiver app."))},this)):this.Je(Error("Stopping cast device witout session."))}; g.k.ow=function(){}; g.k.X=function(){this.info("disposeInternal");g.Oo(this.A);this.A=0;this.u&&(this.u.removeUpdateListener(this.C),this.u.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.B));this.u=null;z7.prototype.X.call(this)}; g.k.hO=function(a,b){if(!this.ia())if(b){var c=y6(b);if(g.Pa(c)){var d=""+c.type;c=c.data||{};this.info("onYoutubeMessage_: "+d+" "+g.Nk(c));switch(d){case "mdxSessionStatus":JAa(this,c.screenId);break;default:A7(this,"Unknown youtube message: "+d)}}else A7(this,"Unable to parse message.")}else A7(this,"No data in message.")}; g.k.Cz=function(a,b,c,d){GAa(this.M,this.o.label,a,this.o.friendlyName,(0,g.x)(function(e){e?b(e):0<=d?(A7(this,"Screen "+a+" appears to be offline. "+d+" retries left."),g.Mo((0,g.x)(this.Cz,this,a,b,c,d-1),300)):c(Error("Unable to fetch screen."))},this),c)}; g.k.NE=function(){return this.u}; g.k.PP=function(a){this.ia()||a||(A7(this,"Cast session died."),this.Je())};g.t(C7,z7);g.k=C7.prototype;g.k.nw=function(a){this.A=a;this.A.addUpdateListener(this.R)}; g.k.ql=function(a){this.B=a;this.F()}; g.k.stop=function(){this.u();this.u=g.Ka;g.Oo(this.C);this.A?this.A.stop((0,g.x)(this.Je,this,null),(0,g.x)(this.Je,this,"Failed to stop DIAL device.")):this.Je()}; g.k.X=function(){this.u();this.u=g.Ka;g.Oo(this.C);this.A&&this.A.removeUpdateListener(this.R);this.A=null;z7.prototype.X.call(this)}; g.k.SP=function(a){this.ia()||a||(A7(this,"DIAL session died."),this.u(),this.u=g.Ka,this.Je())}; g.k.zu=function(a){this.N=k6();if(this.B){var b=new chrome.cast.DialLaunchResponse(!0,MAa(this));a(b);LAa(this)}else this.F=(0,g.x)(function(){g.Oo(this.C);this.F=g.Ka;this.C=NaN;var c=new chrome.cast.DialLaunchResponse(!0,MAa(this));a(c);LAa(this)},this),this.C=g.Mo((0,g.x)(function(){this.F()},this),100)}; g.k.tH=function(a,b,c){GAa(this.M,this.G.receiver.label,a,this.o.friendlyName,(0,g.x)(function(d){d&&d.token?(this.jr(d),b(new chrome.cast.DialLaunchResponse(!1))):this.zu(b,c)},this),(0,g.x)(function(d){A7(this,"Failed to get DIAL screen: "+d); this.zu(b,c)},this))};g.t(D7,z7);D7.prototype.stop=function(){this.Je()}; D7.prototype.nw=function(){}; D7.prototype.ql=function(){g.Oo(this.u);this.u=NaN;var a=m6(this.M.Ee(),this.o.label);a?this.jr(a):this.Je(Error("No such screen"))}; D7.prototype.X=function(){g.Oo(this.u);this.u=NaN;z7.prototype.X.call(this)};g.t(E7,g.N);g.k=E7.prototype; g.k.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest(this.G);this.I||(c.dialRequest=new chrome.cast.DialRequest("YouTube"));var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED,e=a?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION,f=(0,g.x)(this.eN,this);c=new chrome.cast.ApiConfig(c,(0,g.x)(this.DC,this),f,d,e);c.customDialLaunchCallback=(0,g.x)(this.yL,this);chrome.cast.initialize(c,(0,g.x)(function(){this.ia()|| (chrome.cast.addReceiverActionListener(this.B),tAa(),this.u.subscribe("onlineScreenChange",(0,g.x)(this.ME,this)),this.A=OAa(this),chrome.cast.setCustomReceivers(this.A,g.Ka,(0,g.x)(function(h){this.oc("Failed to set initial custom receivers: "+g.Nk(h))},this)),this.S("yt-remote-cast2-availability-change",G7(this)),b(!0))},this),(0,g.x)(function(h){this.oc("Failed to initialize API: "+g.Nk(h)); b(!1)},this))}; g.k.VO=function(a,b){F7("Setting connected screen ID: "+a+" -> "+b);if(this.o){var c=this.o.getScreen();if(!a||c&&c.id!=a)F7("Unsetting old screen status: "+this.o.o.friendlyName),H7(this,null)}if(a&&b){if(!this.o){c=m6(this.u.Ee(),a);if(!c){F7("setConnectedScreenStatus: Unknown screen.");return}var d=NAa(this,c);d||(F7("setConnectedScreenStatus: Connected receiver not custom..."),d=new chrome.cast.Receiver(c.uuid?c.uuid:c.id,c.name),d.receiverType=chrome.cast.ReceiverType.CUSTOM,this.A.push(d),chrome.cast.setCustomReceivers(this.A, g.Ka,(0,g.x)(function(e){this.oc("Failed to set initial custom receivers: "+g.Nk(e))},this))); F7("setConnectedScreenStatus: new active receiver: "+d.friendlyName);H7(this,new D7(this.u,d),!0)}this.o.ow(b)}else F7("setConnectedScreenStatus: no screen.")}; g.k.WO=function(a){this.ia()?this.oc("Setting connection data on disposed cast v2"):this.o?this.o.ql(a):this.oc("Setting connection data without a session")}; g.k.RP=function(){this.ia()?this.oc("Stopping session on disposed cast v2"):this.o?(this.o.stop(),H7(this,null)):F7("Stopping non-existing session")}; g.k.requestSession=function(){chrome.cast.requestSession((0,g.x)(this.DC,this),(0,g.x)(this.yN,this))}; g.k.X=function(){this.u.unsubscribe("onlineScreenChange",(0,g.x)(this.ME,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.B);var a=qAa,b=g.Ja("yt.mdx.remote.debug.handlers_");g.kb(b||[],a);g.Me(this.o);g.N.prototype.X.call(this)}; g.k.oc=function(a){j7("Controller",a)}; g.k.FC=function(a,b){this.o==a&&(b||H7(this,null),this.S("yt-remote-cast2-session-change",b))}; g.k.aN=function(a,b){if(!this.ia())if(a)switch(a.friendlyName=chrome.cast.unescape(a.friendlyName),F7("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.o)if(this.o.o.label!=a.label)F7("onReceiverAction_: Stopping active receiver: "+this.o.o.friendlyName),this.o.stop();else{F7("onReceiverAction_: Casting to active receiver.");this.o.getScreen()&&this.S("yt-remote-cast2-session-change",this.o.getScreen());break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:H7(this, new D7(this.u,a));break;case chrome.cast.ReceiverType.DIAL:H7(this,new C7(this.u,a,this.F));break;case chrome.cast.ReceiverType.CAST:H7(this,new B7(this.u,a));break;default:this.oc("Unknown receiver type: "+a.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.o&&this.o.o.label==a.label?this.o.stop():this.oc("Stopping receiver w/o session: "+a.friendlyName)}else this.oc("onReceiverAction_ called without receiver.")}; g.k.yL=function(a){if(this.ia())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.oc("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.o?this.o.o:null;if(!c||c.label!=b.label)return this.oc("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.o.getScreen())return F7("Reselecting dial screen."), this.S("yt-remote-cast2-session-change",this.o.getScreen()),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.oc('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+b.friendlyName);H7(this,new C7(this.u,b,this.F))}b=this.o;b.G=a;return b.G.appState==chrome.cast.DialAppState.RUNNING?new Promise((0,g.x)(b.tH,b,(b.G.extraData||{}).screenId||null)):new Promise((0,g.x)(b.zu,b))}; g.k.DC=function(a){if(!this.ia()){F7("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.o)if(b.receiverType==chrome.cast.ReceiverType.CAST)F7("Got resumed cast session before resumed mdx connection."),b.friendlyName=chrome.cast.unescape(b.friendlyName),H7(this,new B7(this.u,b),!0);else{this.oc("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var c=this.o.o,d=m6(this.u.Ee(),c.label);d&&h6(d,b.label)&& c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==chrome.cast.ReceiverType.CAST&&(F7("onSessionEstablished_: manual to cast session change "+b.friendlyName),g.Me(this.o),this.o=new B7(this.u,b),this.o.subscribe("sessionScreen",(0,g.x)(this.FC,this,this.o)),this.o.ql(null));this.o.nw(a)}}}; g.k.QP=function(){return this.o?this.o.NE():null}; g.k.yN=function(a){this.ia()||(this.oc("Failed to estabilish a session: "+g.Nk(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&H7(this,null))}; g.k.eN=function(a){F7("Receiver availability updated: "+a);if(!this.ia()){var b=G7(this);this.C=a==chrome.cast.ReceiverAvailability.AVAILABLE;G7(this)!=b&&this.S("yt-remote-cast2-availability-change",G7(this))}}; g.k.ME=function(){this.ia()||(this.A=OAa(this),F7("Updating custom receivers: "+g.Nk(this.A)),chrome.cast.setCustomReceivers(this.A,g.Ka,(0,g.x)(function(){this.oc("Failed to set custom receivers.")},this)),this.S("yt-remote-cast2-availability-change",G7(this)))}; E7.prototype.setLaunchParams=E7.prototype.WO;E7.prototype.setConnectedScreenStatus=E7.prototype.VO;E7.prototype.stopSession=E7.prototype.RP;E7.prototype.getCastSession=E7.prototype.QP;E7.prototype.requestSession=E7.prototype.requestSession;E7.prototype.init=E7.prototype.init;E7.prototype.dispose=E7.prototype.dispose;var N7=[];g.k=S7.prototype; g.k.reset=function(a){this.listId="";this.index=-1;this.videoId="";T7(this);this.volume=-1;this.muted=!1;a&&(this.index=a.index,this.listId=a.listId,this.videoId=a.videoId,this.playerState=a.playerState,this.volume=a.volume,this.muted=a.muted,this.audioTrackId=a.audioTrackId,this.o=a.trackData,this.og=a.hasPrevious,this.hasNext=a.hasNext,this.G=a.playerTime,this.F=a.playerTimeAt,this.C=a.seekableStart,this.u=a.seekableEnd,this.I=a.duration,this.M=a.loadedTime,this.B=a.liveIngestionTime,this.A=!isNaN(this.B))}; g.k.qb=function(){return 1==this.playerState}; g.k.isAdPlaying=function(){return 1081==this.playerState}; g.k.getDuration=function(){return this.A?this.I+U7(this):this.I}; g.k.clone=function(){return new S7(Y7(this))};g.t($7,g.N);g.k=$7.prototype;g.k.play=function(){1==this.o?(this.u?this.u.play(null,g.Ka,f8(this,"play")):e8(this,"play"),d8(this,1,W7(a8(this))),this.S("remotePlayerChange")):b8(this,this.play)}; g.k.pause=function(){1==this.o?(this.u?this.u.pause(null,g.Ka,f8(this,"pause")):e8(this,"pause"),d8(this,2,W7(a8(this))),this.S("remotePlayerChange")):b8(this,this.pause)}; g.k.seekTo=function(a){if(1==this.o){if(this.u){var b=a8(this),c=new chrome.cast.media.SeekRequest;c.currentTime=a;b.qb()||3==b.playerState?c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.u.seek(c,g.Ka,f8(this,"seekTo",{newTime:a}))}else e8(this,"seekTo",{newTime:a});d8(this,3,a);this.S("remotePlayerChange")}else b8(this,g.Sa(this.seekTo,a))}; g.k.stop=function(){if(1==this.o){this.u?this.u.stop(null,g.Ka,f8(this,"stopVideo")):e8(this,"stopVideo");var a=a8(this);a.index=-1;a.videoId="";T7(a);c8(this,a);this.S("remotePlayerChange")}else b8(this,this.stop)}; g.k.setVolume=function(a,b){if(1==this.o){var c=a8(this);if(this.A){if(c.volume!=a){var d=Math.round(a)/100;this.A.setReceiverVolumeLevel(d,(0,g.x)(function(){j7("CP","set receiver volume: "+d)},this),(0,g.x)(function(){this.oc("failed to set receiver volume.")},this))}c.muted!=b&&this.A.setReceiverMuted(b,(0,g.x)(function(){j7("CP","set receiver muted: "+b)},this),(0,g.x)(function(){this.oc("failed to set receiver muted.")},this))}else{var e={volume:a, muted:b};-1!=c.volume&&(e.delta=a-c.volume);e8(this,"setVolume",e)}c.muted=b;c.volume=a;c8(this,c)}else b8(this,g.Sa(this.setVolume,a,b))}; g.k.IE=function(a,b){if(1==this.o){var c=a8(this),d={videoId:a};b&&(c.o={trackName:b.name,languageCode:b.languageCode,sourceLanguageCode:b.translationLanguage?b.translationLanguage.languageCode:"",languageName:b.languageName,kind:b.kind},d.style=g.Nk(b.style),g.Ub(d,c.o));e8(this,"setSubtitlesTrack",d);c8(this,c)}else b8(this,g.Sa(this.IE,a,b))}; g.k.setAudioTrack=function(a,b){if(1==this.o){var c=b.getLanguageInfo().getId();e8(this,"setAudioTrack",{videoId:a,audioTrackId:c});var d=a8(this);d.audioTrackId=c;c8(this,d)}else b8(this,g.Sa(this.setAudioTrack,a,b))}; g.k.playVideo=function(a,b,c,d,e,f,h){var l=a8(this);c=c||0;var m={videoId:a,currentIndex:c};X7(l,a,c);void 0!==b&&(V7(l,b),m.currentTime=b);void 0!==d&&(m.listId=d);null!=e&&(m.playerParams=e);null!=f&&(m.clickTrackingParams=f);null!=h&&(m.locationInfo=g.Nk(h));e8(this,"setPlaylist",m);d||c8(this,l)}; g.k.tr=function(a,b){if(1==this.o){if(a&&b){var c=a8(this);X7(c,a,b);c8(this,c)}e8(this,"previous")}else b8(this,g.Sa(this.tr,a,b))}; g.k.nextVideo=function(a,b){if(1==this.o){if(a&&b){var c=a8(this);X7(c,a,b);c8(this,c)}e8(this,"next")}else b8(this,g.Sa(this.nextVideo,a,b))}; g.k.Qy=function(){1==this.o?e8(this,"dismissAutoplay"):b8(this,this.Qy)}; g.k.dispose=function(){if(3!=this.o){var a=this.o;this.o=3;this.S("proxyStateChange",a,this.o)}g.N.prototype.dispose.call(this)}; g.k.X=function(){aBa(this);this.B=null;this.C.clear();Z7(this,null);g.N.prototype.X.call(this)}; g.k.ix=function(a){if((a!=this.o||2==a)&&3!=this.o&&0!=a){var b=this.o;this.o=a;this.S("proxyStateChange",b,a);if(1==a)for(;!this.C.isEmpty();)b=a=this.C,g.gb(b.o)&&(b.o=b.u,b.o.reverse(),b.u=[]),a.o.pop().apply(this);else 3==a&&this.dispose()}}; g.k.XM=function(a,b){this.S(a,b)}; g.k.iL=function(a){if(!a)this.An(null),Z7(this,null);else if(this.A.receiver.volume){a=this.A.receiver.volume;var b=a8(this),c=Math.round(100*a.level||0);if(b.volume!=c||b.muted!=a.muted)j7("CP","Cast volume update: "+a.level+(a.muted?" muted":"")),b.volume=c,b.muted=!!a.muted,c8(this,b)}}; g.k.An=function(a){j7("CP","Cast media: "+!!a);this.u&&this.u.removeUpdateListener(this.I);if(this.u=a)this.u.addUpdateListener(this.I),bBa(this),this.S("remotePlayerChange")}; g.k.hL=function(a){a?(bBa(this),this.S("remotePlayerChange")):this.An(null)}; g.k.Jw=function(){e8(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.k.rL=function(){var a=YAa();a&&Z7(this,a)}; g.k.oc=function(a){j7("CP",a)};g.t(g8,g.N);g.k=g8.prototype; g.k.connect=function(a,b){if(b){var c=b.listId,d=b.videoId,e=b.playerParams,f=b.clickTrackingParams,h=b.index,l={videoId:d},m=b.currentTime,n=b.locationInfo;void 0!==m&&(l.currentTime=5>=m?0:m);e&&(l.playerParams=e);n&&(l.locationInfo=n);f&&(l.clickTrackingParams=f);c&&(l.listId=c);void 0!==h&&(l.currentIndex=h);c&&(this.fb.listId=c);this.fb.videoId=d;this.fb.index=h||0;this.fb.state=3;V7(this.fb,m);this.B="UNSUPPORTED";h8("Connecting with setPlaylist and params: "+g.Nk(l));this.o.connect({method:"setPlaylist", params:g.Nk(l)},a,oza())}else h8("Connecting without params"),this.o.connect({},a,oza());dBa(this)}; g.k.dispose=function(){this.ia()||(this.S("beforeDispose"),i8(this,3));g.N.prototype.dispose.call(this)}; g.k.X=function(){j8(this);l8(this);k8(this);g.Oo(this.G);this.G=NaN;g.Oo(this.I);this.I=NaN;this.A=null;g.jp(this.T);this.T.length=0;this.o.dispose();g.N.prototype.X.call(this);this.B=this.F=this.u=this.fb=this.o=null}; g.k.NG=function(){this.Nk(2)}; g.k.mL=function(){h8("Channel opened");this.R&&(this.R=!1,k8(this),this.N=g.Mo((0,g.x)(function(){h8("Timing out waiting for a screen.");this.Nk(1)},this),15E3)); sza(nAa(this.o),this.U)}; g.k.jL=function(){h8("Channel closed");isNaN(this.C)?r6(!0):r6();this.dispose()}; g.k.kL=function(a){r6();isNaN(this.Mm())?(h8("Channel error: "+a+" without reconnection"),this.dispose()):(this.R=!0,h8("Channel error: "+a+" with reconnection in "+this.Mm()+" ms"),i8(this,2))}; g.k.lL=function(a){a.params?h8("Received: action="+a.action+", params="+g.Nk(a.params)):h8("Received: action="+a.action+" {}");switch(a.action){case "loungeStatus":a=y6(a.params.devices);this.u=(0,g.Ic)(a,function(c){return new f6(c)}); a=!!g.cb(this.u,function(c){return"LOUNGE_SCREEN"==c.type}); gBa(this,a);break;case "loungeScreenDisconnected":g.lb(this.u,function(c){return"LOUNGE_SCREEN"==c.type}); gBa(this,!1);break;case "remoteConnected":var b=new f6(y6(a.params.device));g.cb(this.u,function(c){return b?c.id==b.id:!1})||Zya(this.u,b); break;case "remoteDisconnected":b=new f6(y6(a.params.device));g.lb(this.u,function(c){return b?c.id==b.id:!1}); break;case "gracefulDisconnect":break;case "playlistModified":iBa(this,a);break;case "nowPlaying":kBa(this,a);break;case "onStateChange":jBa(this,a);break;case "onAdStateChange":lBa(this,a);break;case "onVolumeChanged":mBa(this,a);break;case "onSubtitlesTrackChanged":hBa(this,a);break;case "nowAutoplaying":nBa(this,a);break;case "autoplayDismissed":this.S("autoplayDismissed");break;case "autoplayUpNext":this.F=a.params.videoId||null;this.S("autoplayUpNext",this.F);break;case "onAutoplayModeChanged":this.B= a.params.autoplayMode;this.S("autoplayModeChange",this.B);"DISABLED"==this.B&&this.S("autoplayDismissed");break;case "onHasPreviousNextChanged":oBa(this,a);break;case "requestAssistedSignIn":this.S("assistedSignInRequested",a.params.authCode);break;default:h8("Unrecognized action: "+a.action)}}; g.k.KO=function(){if(this.A){var a=this.A;this.A=null;this.fb.videoId!=a&&m8(this,"getNowPlaying")}}; g.k.EG=function(){var a=3;this.ia()||(a=0,isNaN(this.Mm())?e7(this.o)&&isNaN(this.C)&&(a=1):a=2);return a}; g.k.Nk=function(a){h8("Disconnecting with "+a);j8(this);this.S("beforeDisconnect",a);1==a&&r6();oAa(this.o,a);this.dispose()}; g.k.CG=function(){var a=this.fb;this.A&&(a=this.fb.clone(),X7(a,this.A,a.index));return Y7(a)}; g.k.XO=function(a){var b=new S7(a);b.videoId&&b.videoId!=this.fb.videoId&&(this.A=b.videoId,g.Oo(this.G),this.G=g.Mo((0,g.x)(this.KO,this),5E3));var c=[];this.fb.listId==b.listId&&this.fb.videoId==b.videoId&&this.fb.index==b.index||c.push("remoteQueueChange");this.fb.playerState==b.playerState&&this.fb.volume==b.volume&&this.fb.muted==b.muted&&W7(this.fb)==W7(b)&&g.Nk(this.fb.o)==g.Nk(b.o)||c.push("remotePlayerChange");this.fb.reset(a);(0,g.y)(c,function(d){this.S(d)},this)}; g.k.Az=function(){var a=this.o.F.id,b=g.cb(this.u,function(c){return"REMOTE_CONTROL"==c.type&&c.id!=a}); return b?b.id:""}; g.k.Mm=function(){var a=this.o;return a.u.isActive()?a.u.u-(0,g.D)():NaN}; g.k.rG=function(){return this.B||"UNSUPPORTED"}; g.k.sG=function(){return this.F||""}; g.k.JP=function(){if(!isNaN(this.Mm())){var a=this.o.u;g.An(a.o);a.start()}}; g.k.SO=function(a,b){m8(this,a,b);fBa(this)}; g8.prototype.subscribe=g8.prototype.subscribe;g8.prototype.unsubscribeByKey=g8.prototype.Ii;g8.prototype.getProxyState=g8.prototype.EG;g8.prototype.disconnect=g8.prototype.Nk;g8.prototype.getPlayerContextData=g8.prototype.CG;g8.prototype.setPlayerContextData=g8.prototype.XO;g8.prototype.getOtherConnectedRemoteId=g8.prototype.Az;g8.prototype.getReconnectTimeout=g8.prototype.Mm;g8.prototype.getAutoplayMode=g8.prototype.rG;g8.prototype.getAutoplayVideoId=g8.prototype.sG;g8.prototype.reconnect=g8.prototype.JP; g8.prototype.sendMessage=g8.prototype.SO;g.t(n8,n7);g.k=n8.prototype;g.k.Ee=function(a){return this.Id.$_gs(a)}; g.k.contains=function(a){return!!this.Id.$_c(a)}; g.k.get=function(a){return this.Id.$_g(a)}; g.k.start=function(){this.Id.$_st()}; g.k.add=function(a,b,c){this.Id.$_a(a,b,c)}; g.k.remove=function(a,b,c){this.Id.$_r(a,b,c)}; g.k.Zr=function(a,b,c,d){this.Id.$_un(a,b,c,d)}; g.k.X=function(){for(var a=0,b=this.o.length;a<b;++a)this.Id.$_ubk(this.o[a]);this.o.length=0;this.Id=null;n7.prototype.X.call(this)}; g.k.NP=function(){this.S("screenChange")}; g.k.AM=function(){this.S("onlineScreenChange")}; w7.prototype.$_st=w7.prototype.start;w7.prototype.$_gspc=w7.prototype.OP;w7.prototype.$_gsppc=w7.prototype.LE;w7.prototype.$_c=w7.prototype.contains;w7.prototype.$_g=w7.prototype.get;w7.prototype.$_a=w7.prototype.add;w7.prototype.$_un=w7.prototype.Zr;w7.prototype.$_r=w7.prototype.remove;w7.prototype.$_gs=w7.prototype.Ee;w7.prototype.$_gos=w7.prototype.KE;w7.prototype.$_s=w7.prototype.subscribe;w7.prototype.$_ubk=w7.prototype.Ii;var G8=null,F8=!1,o8=null,p8=null,E8=null,t8=[];g.t(H8,g.A);g.k=H8.prototype;g.k.X=function(){g.A.prototype.X.call(this);this.o.stop();this.u.stop();this.G.stop();this.N();var a=this.Ya;a.unsubscribe("proxyStateChange",this.zC,this);a.unsubscribe("remotePlayerChange",this.Gn,this);a.unsubscribe("remoteQueueChange",this.kr,this);a.unsubscribe("previousNextChange",this.vC,this);a.unsubscribe("nowAutoplaying",this.rC,this);a.unsubscribe("autoplayDismissed",this.RB,this);this.Ya=this.module=null}; g.k.WA=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];if(2!=this.Ya.o)if(I8(this)){if(!a8(this.Ya).isAdPlaying()||"control_seek"!==a)switch(a){case "control_toggle_play_pause":a8(this.Ya).qb()?this.Ya.pause():this.Ya.play();break;case "control_play":this.Ya.play();break;case "control_pause":this.Ya.pause();break;case "control_seek":this.F.FA(c[0],c[1]);break;case "control_subtitles_set_track":J8(this,c[0]);break;case "control_set_audio_track":this.setAudioTrack(c[0])}}else switch(a){case "control_toggle_play_pause":case "control_play":case "control_pause":c= this.H.getCurrentTime();K8(this,0===c?void 0:c);break;case "control_seek":K8(this,c[0]);break;case "control_subtitles_set_track":J8(this,c[0]);break;case "control_set_audio_track":this.setAudioTrack(c[0])}}; g.k.gL=function(a){this.G.KG(a)}; g.k.tP=function(a){this.WA("control_subtitles_set_track",g.Ob(a)?null:a)}; g.k.RD=function(){var a=this.H.getOption("captions","track");g.Ob(a)||J8(this,a)}; g.k.Vb=function(a){this.module.Vb(a,this.H.getVideoData().lengthSeconds)}; g.k.gC=function(a){if(I8(this)){this.Ya.unsubscribe("remotePlayerChange",this.Gn,this);var b=Math.round(a.volume);a=!!a.muted;var c=a8(this.Ya);if(b!==c.volume||a!==c.muted)this.Ya.setVolume(b,a),this.I.start();this.Ya.subscribe("remotePlayerChange",this.Gn,this)}}; g.k.aM=function(){g.Ob(this.A)||ABa(this,this.A);this.B=!1}; g.k.zC=function(a,b){this.u.stop();2===b&&this.PD()}; g.k.Gn=function(){if(I8(this)){this.o.stop();var a=a8(this.Ya);switch(a.playerState){case 1080:case 1081:case 1084:case 1085:this.module.jd=1;break;case 1082:case 1083:this.module.jd=0;break;default:this.module.jd=-1}switch(a.playerState){case 1081:case 1:this.Nc(new g.cH(8));this.OD();break;case 1085:case 3:this.Nc(new g.cH(9));break;case 1083:case 0:this.Nc(new g.cH(2));this.F.stop();this.Vb(this.H.getVideoData().lengthSeconds);break;case 1084:this.Nc(new g.cH(4));break;case 2:this.Nc(new g.cH(4)); this.Vb(W7(a));break;case -1:this.Nc(new g.cH(64));break;case -1E3:this.Nc(new g.cH(128,{errorCode:"mdx.remoteerror",errorMessage:"\u0412\u0438\u0434\u0435\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f."}))}a=a8(this.Ya).o;var b=this.A;(a||b?a&&b&&a.trackName==b.trackName&&a.languageCode==b.languageCode&&a.languageName== b.languageName&&a.kind==b.kind:1)||(this.A=a,ABa(this,a));a=a8(this.Ya);-1===a.volume||Math.round(this.H.getVolume())===a.volume&&this.H.isMuted()===a.muted||this.I.isActive()||this.uE()}else zBa(this)}; g.k.vC=function(){this.H.S("mdxpreviousnextchange")}; g.k.kr=function(){I8(this)||zBa(this)}; g.k.rC=function(a){isNaN(a)||this.H.S("mdxnowautoplaying",a)}; g.k.RB=function(){this.H.S("mdxautoplaycanceled")}; g.k.setAudioTrack=function(a){I8(this)&&this.Ya.setAudioTrack(this.H.getVideoData(1).videoId,a)}; g.k.seekTo=function(a,b){-1===a8(this.Ya).playerState?K8(this,a):b&&this.Ya.seekTo(a)}; g.k.uE=function(){if(I8(this)){var a=a8(this.Ya);this.events.nb(this.M);a.muted?this.H.mute():this.H.unMute();this.H.setVolume(a.volume);this.M=this.events.L(this.H,"onVolumeChange",this.gC)}}; g.k.OD=function(){this.o.stop();if(!this.Ya.ia()){var a=a8(this.Ya);a.qb()&&this.Nc(new g.cH(8));this.Vb(W7(a));this.o.start()}}; g.k.PD=function(){this.u.stop();this.o.stop();var a=this.Ya.B.getReconnectTimeout();2==this.Ya.o&&!isNaN(a)&&this.u.start()}; g.k.Nc=function(a){this.u.stop();var b=this.C;if(!g.hH(b,a)){var c=g.T(a,2);c!==g.T(this.C,2)&&g.LT(this.H.app,c);this.C=a;CBa(this.module,b,a)}};g.t(L8,g.U);L8.prototype.Wb=function(){this.o.show()}; L8.prototype.Ra=function(){this.o.hide()}; L8.prototype.u=function(){g.jO("https://support.google.com/youtube/answer/7640706")}; L8.prototype.A=function(){e6("mdx-manual-pairing-popup-ok");this.Ra()};g.t(M8,g.U);M8.prototype.Wb=function(){this.o.show()}; M8.prototype.Ra=function(){this.o.hide()}; M8.prototype.u=function(){e6("mdx-privacy-popup-cancel");this.Ra()}; M8.prototype.A=function(){e6("mdx-privacy-popup-confirm");this.Ra()};g.t(N8,g.U);N8.prototype.u=function(a){BBa(this,a.state)};g.t(O8,g.wR);O8.prototype.B=function(){var a=this.H.getOption("remote","receivers");a&&1<a.length&&!this.H.getOption("remote","quickCast")?(this.Si=g.zb(a,this.o,this),g.yR(this,(0,g.Ic)(a,this.o)),a=this.H.getOption("remote","currentReceiver"),this.Kb(this.o(a)),this.enable(!0)):this.enable(!1)}; O8.prototype.o=function(a){return a.key}; O8.prototype.Mf=function(a){return"cast-selector-receiver"===a?"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c":this.Si[a].name}; O8.prototype.td=function(a){g.wR.prototype.td.call(this,a);this.H.setOption("remote","currentReceiver",this.Si[a]);this.Ma.Ra()};g.t(P8,g.IN);g.k=P8.prototype; g.k.create=function(){tBa(g.yy(this.player.O()));this.subscriptions.push(g.To("yt-remote-before-disconnect",this.eL,this));this.subscriptions.push(g.To("yt-remote-connection-change",this.fN,this));this.subscriptions.push(g.To("yt-remote-receiver-availability-change",this.xC,this));this.subscriptions.push(g.To("yt-remote-auto-connect",this.dN,this));this.subscriptions.push(g.To("yt-remote-receiver-resumed",this.cN,this));this.subscriptions.push(g.To("mdx-privacy-popup-confirm",this.yO,this));this.subscriptions.push(g.To("mdx-privacy-popup-cancel", this.xO,this));this.subscriptions.push(g.To("mdx-manual-pairing-popup-ok",this.NH,this));this.xC()}; g.k.load=function(){this.player.cancelPlayback();g.IN.prototype.load.call(this);this.Ae=new H8(this,this.player,this.Ya);var a=(a=yBa())?a.currentTime:0;var b=D8()?new $7(y8(),void 0):null;0==a&&b&&(a=W7(a8(b)));0!==a&&this.Vb(a);CBa(this,this.Rb,this.Rb);g.ST(this.player.app,6)}; g.k.unload=function(){this.player.S("mdxautoplaycanceled");this.Xh=this.Jf;g.Ne(this.Ae,this.Ya);this.Ya=this.Ae=null;g.IN.prototype.unload.call(this);g.ST(this.player.app,5);Q8(this)}; g.k.X=function(){g.Uo(this.subscriptions);g.IN.prototype.X.call(this)}; g.k.Cg=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];this.loaded&&this.Ae.WA.apply(this.Ae,[a].concat(g.la(c)))}; g.k.getAdState=function(){return this.jd}; g.k.GG=function(){return this.loaded?this.Ae.suggestion:null}; g.k.og=function(){return this.Ya?a8(this.Ya).og:!1}; g.k.hasNext=function(){return this.Ya?a8(this.Ya).hasNext:!1}; g.k.Vb=function(a,b){this.rA=a||0;this.player.S("progresssync",a,b)}; g.k.getCurrentTime=function(){return this.rA}; g.k.getProgressState=function(){var a=a8(this.Ya),b=this.player.getVideoData();return{allowSeeking:g.P(this.player.O().experiments,"web_player_mdx_allow_seeking_change_killswitch")?this.player.hd():!a.isAdPlaying()&&this.player.hd(),clipEnd:b.clipEnd,clipStart:b.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:a.getDuration(),ingestionTime:a.A?a.B+U7(a):a.B,isAtLiveHead:1>=(a.A?a.u+U7(a):a.u)-this.getCurrentTime(),loaded:a.M,seekableEnd:a.A?a.u+U7(a):a.u,seekableStart:0<a.C?a.C+ U7(a):a.C}}; g.k.nextVideo=function(){this.Ya&&this.Ya.nextVideo()}; g.k.tr=function(){this.Ya&&this.Ya.tr()}; g.k.eL=function(a){1===a&&(this.Ov=this.Ya?a8(this.Ya):null)}; g.k.fN=function(){var a=D8()?new $7(y8(),void 0):null;if(a){var b=this.Xh;this.loaded&&this.unload();this.Ya=a;this.Ov=null;b.key!==this.Jf.key&&(this.Xh=b,this.load())}else g.Me(this.Ya),this.Ya=null,this.loaded&&(this.unload(),(a=this.Ov)&&a.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(a.videoId,W7(a)));this.player.S("videodatachange","newdata",this.player.getVideoData(),3)}; g.k.xC=function(){this.Si=[this.Jf].concat(vBa());var a=z8()||this.Jf;R8(this,a);this.player.ra("onMdxReceiversChange")}; g.k.dN=function(){var a=z8();R8(this,a)}; g.k.cN=function(){this.Xh=z8()}; g.k.yO=function(){this.Hn=!0;Q8(this);F8=!1;G8&&B8(G8,1);G8=null}; g.k.xO=function(){this.Hn=!1;Q8(this);R8(this,this.Jf);this.Xh=this.Jf;F8=!1;G8=null;this.player.playVideo()}; g.k.NH=function(){this.lq=!0;Q8(this);g.Ys("yt-remote-manual-pairing-warning-shown",!0,2592E3);F8=!1;G8&&B8(G8,1);G8=null}; g.k.cd=function(a,b){switch(a){case "casting":return this.loaded;case "receivers":return this.Si;case "currentReceiver":return b&&("cast-selector-receiver"===b.key?Q7():R8(this,b)),this.loaded?this.Xh:this.Jf;case "quickCast":return 2===this.Si.length&&"cast-selector-receiver"===this.Si[1].key?(b&&Q7(),!0):!1}}; g.k.Jw=function(){this.Ya.Jw()}; g.k.Vf=function(){return!1}; g.k.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]};g.TN.remote=P8;})(_yt_player);
/var/files/need-2-delete/./mini-borishof.ru1/upload/coooper/remote.js