(function(g){var window=this;var gxa=function(a,b){var c=new g.RI;c.o=a.o;c.D=a.D;c.C=a.C;c.B=a.B;c.G=a.G;c.F=a.F;c.I=a.I;c.g=b;return c},a6=function(a){return a.g?a.g.languageCode:a.o},b6=function(a){var b={format:a.A,
languageCode:a.o,languageName:a.D,displayName:g.SI(a),kind:a.B,name:a.C,id:a.ya,is_servable:a.N,is_translateable:a.G,vss_id:a.F};a.g&&(a=a.g,b.translationLanguage={languageCode:a.languageCode,languageName:a.languageName,languageOriginal:a.g,id:a.id,is_default:a.isDefault});return b},c6=function(a){if(!hxa.test(a))throw Error("'"+a+"' is not a valid hex color");
4==a.length&&(a=a.replace(ixa,"#$1$1$2$2$3$3"));a=a.toLowerCase();return[(0,window.parseInt)(a.substr(1,2),16),(0,window.parseInt)(a.substr(3,2),16),(0,window.parseInt)(a.substr(5,2),16)]},jxa=function(a,b){for(var c in a)if(!(c in b)||a[c]!==b[c])return!1;
for(c in b)if(!(c in a))return!1;return!0},kxa=function(a){for(var b in a)delete a[b]},d6=function(a,b,c,d,e,f,k){f=void 0===f?!1:f;
k=void 0===k?null:k;g.bS.call(this,a,a+b,{priority:c,namespace:"captions"});this.windowId=d;this.text=e;this.C=f;this.o=k},e6=function(a,b,c,d,e){g.bS.call(this,a,a+b,{priority:c,
namespace:"captions"});this.id=d;this.params=e;this.o=[]},g6=function(a){a=void 0===a?{}:a;
var b="_"+f6++;return new e6(0,0x8000000000000,0,b,a)},j6=function(a,b,c,d,e,f){var k={};
g.Ha(k,b);g.Ha(k,a.params);g.Ha(k,c);var l={};g.Ha(l,b.rb);a.params.rb&&g.Ha(l,a.params.rb);g.Ha(l,c.rb);k.rb=l;g.Y.call(this,{H:"div",M:"caption-window",R:{id:"caption-window-"+a.id,dir:k.bk==h6.Yp?"rtl":"ltr",tabindex:0,"aria-live":"assertive",lang:k.lang},K:[{H:"span",M:"captions-text"}]});this.B=[];this.J=!1;this.F=a;this.D=[];this.G=[];this.sa=e;this.ra=f;this.C=null;this.V=.96*e;this.ga=.96*f;this.o=k;this.pa=c;this.A=this.wa["captions-text"];this.ha=null!=this.A.style["box-decoration-break"]||
null!=this.A.style["-webkit-box-decoration-break"];this.L=d/360*16;this.type=i6.Vp;this.aa=this.L*lxa(l);a=new g.vG(this.element,!0);g.L(this,a);a.subscribe("dragstart",this.ZM,this);a.subscribe("dragmove",this.YM,this);a.subscribe("dragend",this.XM,this);this.da=this.ea=0;a="";this.o.ik&&(a=c6(this.o.windowColor),a="rgba("+a[0]+","+a[1]+","+a[2]+","+this.o.ik+")");b={"background-color":a,display:!1===this.o.isVisible?"none":"","text-align":mxa[this.o.textAlign]};this.ha&&(b["border-radius"]=a?this.aa/
8+"px":"");g.oh(this.element,b);switch(this.o.Tg){case 0:case 1:case 2:g.S(this.element,"ytp-caption-window-top");break;case 6:case 7:case 8:g.S(this.element,"ytp-caption-window-bottom")}},lxa=function(a){var b=1+.25*(a.fj||0);
if(a.offset==k6.Ov||a.offset==k6.Rv)b*=.8;return b},l6=function(a,b){var c={},d=b.background?b.background:a.o.rb.background;
if(null!=b.Ue||b.background){var e=null!=b.Ue?b.Ue:a.o.rb.Ue;d=c6(d);c.background="rgba("+d[0]+","+d[1]+","+d[2]+","+e+")";a.ha&&(c["box-decoration-break"]="clone",c["border-radius"]=a.aa/8+"px")}if(null!=b.fj||null!=b.offset)c["font-size"]=a.L*lxa(b)+"px";d=1;e=b.color||a.o.rb.color;if(b.color||null!=b.Ih)e=c6(e),d=null==b.Ih?a.o.rb.Ih:b.Ih,e="rgba("+e[0]+","+e[1]+","+e[2]+","+d+")",c.color=e,c.fill=e;var f=b.Yh;f==g.M2.NONE&&(f=null);if(f){e="rgba(34, 34, 34, "+d+")";var k="rgba(204, 204, 204, "+
d+")";b.Gw&&(k=e=b.Gw);var l=a.L/16/2,m=Math.max(l,1),n=Math.max(2*l,1),q=Math.max(3*l,1),r=Math.max(5*l,1);d=[];switch(f){case g.M2.DROP_SHADOW:for(;q<=r;q+=l)d.push(n+"px "+n+"px "+q+"px "+e);break;case g.M2.RAISED:n=2<=window.devicePixelRatio?.5:1;for(f=m;f<=q;f+=n)d.push(f+"px "+f+"px "+e);break;case g.M2.DEPRESSED:d.push(m+"px "+m+"px "+k);d.push("-"+m+"px -"+m+"px "+e);break;case g.M2.Yv:for(q=0;5>q;q++)d.push("0 0 "+n+"px "+e)}c["text-shadow"]=d.join(", ")}e="";switch(b.fontFamily){case g.O2.uv:e=
'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace';break;case g.O2.Av:e='"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif';break;case g.O2.tv:e='"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace';break;case g.O2.CASUAL:e='"Comic Sans MS", Impact, Handlee, fantasy';break;case g.O2.CURSIVE:e='"Monotype Corsiva", "URW Chancery L", "Apple Chancery", "Dancing Script", cursive';break;case g.O2.Zp:e=g.mF()?'"Carrois Gothic SC", sans-serif-smallcaps':
'"Arial Unicode Ms", Arial, Helvetica, Verdana, "Marcellus SC", sans-serif';break;case g.O2.km:case g.O2.Wp:e='"YouTube Noto", Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif'}e&&(c["font-family"]=e);e=b.offset;null==e&&(e=a.o.rb.offset);switch(e){case k6.Ov:c["vertical-align"]="sub";break;case k6.Rv:c["vertical-align"]="super"}b.fontFamily==g.O2.Zp&&(c["font-variant"]="small-caps");b.bold&&(c["font-weight"]="bold");b.os&&(c["font-style"]="italic");b.underline&&
(c["text-decoration"]="underline");b.Br&&(c.visibility="hidden");return c},nxa=function(a,b,c){a.J=a.J||!!c;
var d={};g.Ha(d,a.o.rb);g.Ha(d,c||b.o);g.Ha(d,a.pa.rb);c=a.D[0];if(c&&d.background==c.background&&d.Ue==c.Ue&&!!d.Br==!!c.Br&&d.Yh==c.Yh){var e;for(e=0;e<a.D.length;e++)if(jxa(d,a.D[e])){var f=a.G[e];break}if(!f){e={};for(var k in d)d[k]!=c[k]&&(e[k]=d[k]);f=g.Cd("SPAN");g.oh(f,l6(a,e));a.G[0].appendChild(f);e=1}a.G.length=e;a.D.length=e}else a.G.length=0,a.D.length=0,f=g.Cd("SPAN"),g.oh(f,l6(a,d)),a.A.appendChild(f);a.C&&a.C.parentNode!=f&&(g.Jd(a.C),f.appendChild(a.C));c=(k=g.u(b.text))?b.text.split("\n"):
[b.text];for(e=0;e<c.length;e++){var l=c[e];if(0<e||0==a.B.length||!b.C){if(0<e||0!=a.B.length){var m=g.Cd("BR");f.appendChild(m)}f.appendChild(g.Dd("\u00a0"));a.C=g.Dd("\u00a0");f.appendChild(a.C)}l&&(m=a.C,m.parentNode&&m.parentNode.insertBefore(k?g.Dd(l):l,m))}a.D.push(d);a.G.push(f);a.B.push(b)},oxa=function(){},n6=function(a){this.F=a;
this.B=this.o=this.mode=this.A=0;this.C=new m6(this);this.D=new m6(this);this.g=[];this.clear()},qxa=function(a,b,c){if(255==a&&255==b||!a&&!b)return{Nm:a,
Om:b,result:0};a=pxa[a];b=pxa[b];if(a&128){if(!(b&128)&&0!=c.g&&c.o==b)return{Nm:a,Om:b,result:1}}else if(b&128&&1<=a&&31>=a)return{Nm:a,Om:b,result:2};return{Nm:a,Om:b,result:3}},sxa=function(a,b,c,d){255==b&&255==c||!b&&!c?(45==++a.B&&a.reset(),a.C.g.clear(),a.D.g.clear()):(a.B=0,rxa(a.C,b,c,d))},txa=function(a,b){a.g.sort(function(a,b){var c=a.time-b.time;
return 0==c?a.order-b.order:c});
for(var c=0;c<a.g.length;c++){var d=a.g[c];a.o=d.time;0==d.type?sxa(a,d.Bw,d.Cw,b):1==d.type&&a.A&496&&rxa(a.D,d.Bw,d.Cw,b)}a.g.length=0},o6=function(){this.g=0},p6=function(){this.o=this.A=this.g=0},q6=function(){this.timestamp=this.qe=0;
this.g=!1},r6=function(a){this.A=[];
for(var b=0;15>=b;b++){this.A[b]=[];for(var c=0;32>=c;c++)this.A[b][c]=new q6}this.g=this.o=this.Hc=0;this.style=new o6;this.C=a;this.B=0},s6=function(a,b){if(3==a.style.g){for(var c=0,d=0,e=a.C.o+0,f="",k="",l=e,m=1;15>=m;++m){for(var n=!1,q=d?d:1;32>=q;++q){var r=a.A[m][q];
if(0!=r.qe){0==c&&(c=m,d=q);n=String.fromCharCode(r.qe);var w=r.timestamp;w<e&&(e=w);r.timestamp=l;k&&(f+=k,k="");f+=n;n=!0}if((0==r.qe||32==q)&&n){k="\n";break}else if(d&&!n)break}if(c&&!n)break}f&&b.B(c,d,e,l,f)}else for(d=c=0,f=e=a.C.o+0,k=1;15>=k;++k)for(l="",m=1;32>=m;++m)if(q=a.A[k][m],r=q.qe,0!=r&&(0==c&&(c=k,d=m),n=String.fromCharCode(r),w=q.timestamp,w<=e&&(e=w),l+=n,q.reset()),32==m||0==r)l&&b.B(c,d,e,f,l),e=f,l="",d=c=0},yxa=function(a,b){switch(a){case 0:return uxa[(b&127)-32];
case 1:return vxa[b&15];case 2:return wxa[b&31];case 3:return xxa[b&31]}return 0},t6=function(a){return a.A[a.Hc][a.o]},u6=function(a,b,c){2<=b&&1<a.o&&(--a.o,t6(a).qe=0);
var d=t6(a);d.timestamp=a.C.o+0;d.qe=yxa(b,c);32>a.o&&a.o++},zxa=function(a,b,c,d){for(var e=0;e<d;e++)for(var f=0;32>=f;f++)a.A[b+e][f].hn(a.A[c+e][f])},v6=function(a,b,c){for(var d=0;d<c;d++)for(var e=0;32>=e;e++)a.A[b+d][e].reset()},w6=function(a){a.Hc=0<a.g?a.g:1;
a.o=1;v6(a,0,15)},x6=function(a){this.B=a;
this.C=0;this.style=new o6;this.D=new r6(a);this.F=new r6(a);this.G=new r6(a);this.o=this.D;this.A=this.F;this.g=this.o},y6=function(a,b,c){var d=a.o,e=!1;
switch(a.style.get()){case 4:if(0<d.g)break;case 1:case 2:s6(d,c),w6(a.o),w6(a.A),d.Hc=15,d.g=b,e=!0}a.style.set(3);a.g=d;a.g.style=a.style;a.B.mode=1<<d.B;e?d.o=1:d.g!=b&&(d.g>b?(s6(d,c),v6(d,d.Hc-d.g,b)):d.Hc<b&&(b=d.g),d.g=b)},Axa=function(a){a.style.set(1);
a.g=a.A;a.g.g=0;a.g.style=a.style;a.B.mode=1<<a.g.B},Bxa=function(a){a.style.set(4);
a.g=a.G;a.g.style=a.style;a.B.mode=1<<a.g.B},m6=function(a){this.o=a;
this.g=new p6;this.C=0;this.A=new x6(a);this.D=new x6(a);this.B=this.A},rxa=function(a,b,c,d){a.g.update();
b=qxa(b,c,a.g);switch(b.result){case 0:return;case 1:case 2:return}var e=b.Nm;c=b.Om;if(32<=e||!e)a.o.mode&a.o.A&&(b=e,b&128&&(b=127),c&128&&(c=127),e=a.B.g,b&96&&u6(e,0,b),c&96&&u6(e,0,c),!a.o.F&&0!=b&&0!=c&&3==e.style.g&&s6(e,d));else if(e&16)a:if(!a.g.matches(e,c)&&(b=a.g,b.A=e,b.o=c,b.g=2,b=e&8?a.D:a.A,a.B=b,a.o.mode=1<<(a.C<<2)+(b.C<<1)+(4==b.style.g?1:0),(a.o.mode|1<<(a.C<<2)+(b.C<<1)+(4!=b.style.g?1:0))&a.o.A))if(c&64){d=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|c>>5&1];a=c&16?4*((c&
14)>>1):0;c=b.g;switch(b.style.get()){case 4:d=c.Hc;break;case 3:if(d!=c.Hc){if(d<c.g&&(d=c.g,d==c.Hc))break;var f=1+c.Hc-c.g,k=1+d-c.g;zxa(c,k,f,c.g);b=f;e=c.g;k<f?(f=k+e-f,0<f&&(b+=f,e-=f)):(f=f+e-k,0<f&&(e-=f));v6(c,b,e)}}c.Hc=d;c.o=a+1}else switch(e&7){case 1:switch(c&112){case 32:u6(b.g,0,32);break a;case 48:57==c?(b=b.g,t6(b).qe=0,32>b.o&&b.o++):u6(b.g,1,c&15)}break;case 2:c&32&&u6(b.g,2,c&31);break;case 3:c&32&&u6(b.g,3,c&31);break;case 4:case 5:if(32<=c&&47>=c)switch(c){case 32:Axa(b);break;
case 33:b=b.g;1<b.o&&(--b.o,t6(b).qe=0);break;case 36:b=b.g;d=t6(b);for(a=0;15>=a;a++)for(c=0;32>=c;c++)if(b.A[a][c]==d){for(;32>=c;c++)b.A[a][c].reset();break}break;case 37:y6(b,2,d);break;case 38:y6(b,3,d);break;case 39:y6(b,4,d);break;case 40:u6(b.g,0,32);break;case 41:b.style.set(2);b.g=b.o;b.g.g=0;b.g.style=b.style;b.B.mode=1<<b.g.B;break;case 42:d=b.G;d.g=15;d.style.set(4);w6(d);Bxa(b);break;case 43:Bxa(b);break;case 44:a=b.o;switch(b.style.get()){case 1:case 2:case 3:s6(a,d)}v6(a,0,15);break;
case 45:b:{a=b.g;switch(b.style.get()){default:case 2:case 1:break b;case 4:if(15>a.Hc){++a.Hc;a.o=1;break b}case 3:}2>a.g&&(a.g=2,a.Hc<a.g&&(a.Hc=a.g));b=a.Hc-a.g+1;s6(a,d);zxa(a,b,b+1,a.g-1);v6(a,a.Hc,1)}break;case 46:v6(b.A,0,15);break;case 47:s6(b.o,d);d=b.A;a=b.B.o+0;for(c=1;15>=c;++c)for(e=1;32>=e;++e)d.A[c][e].timestamp=a;d=b.A;b.A=b.o;b.o=d;Axa(b)}break;case 7:switch(c){case 33:case 34:case 35:b=b.g,32<(b.o+=c&3)&&(b.o=32)}}},z6=function(){},A6=function(a){this.A=a;
this.o=null},Dxa=function(a,b,c){var d=a.getAttribute("t");
d=d?(0,window.parseInt)(d,10):1E3*(0,window.parseFloat)(a.getAttribute("start")||0);var e=a.getAttribute("d");e=e?(0,window.parseFloat)(e):1E3*(0,window.parseFloat)(a.getAttribute("dur")||0);b=a.getAttribute("w")||b;var f=!!a.getAttribute("append"),k=f?B6.aq:B6.wm;a=g.wr("<html>"+(a.firstChild&&a.firstChild.nodeValue||"")+"</html>");Cxa(d,e,k,b,f,a.firstChild,{},c)},Cxa=function(a,b,c,d,e,f,k,l){switch(f.tagName){case "b":k.bold=!0;
break;case "i":k.os=!0;break;case "u":k.underline=!0;break;case "font":var m=f.getAttribute("color");C6.test(m);k.color=m}for(m=0;m<f.childNodes.length;m++){var n=f.childNodes[m];if(3==n.nodeType)l.push(new d6(a,b,c,d,n.nodeValue,e||0<m,g.$b(k)?void 0:k));else{var q={};g.Ha(q,k);Cxa(a,b,c,d,e||0<m,n,q,l)}}},D6=function(){this.A={};
this.o=null},E6=function(a){this.o={};
this.C={};this.D={};this.A="_"+f6++;this.B=a},F6=function(a,b){var c=a.getAttribute(b);
if(null!=c)return(0,window.parseFloat)(c)},G6=function(a,b){var c=a.getAttribute(b);
if(null!=c)return"1"==c},H6=function(a,b){var c=F6(a,b);
if(void 0!=c)return c},I6=function(a,b){var c=a.getAttribute(b);
if(null!=c)return C6.test(c),c},Exa=function(a,b){var c={},d=b.getAttribute("ws");
g.Ha(c,d?a.D[d]:a.B);d=H6(b,"mh");null!=d&&(c.Fs=d);d=H6(b,"ju");null!=d&&(c.textAlign=d);d=H6(b,"pd");null!=d&&(c.bk=d);d=I6(b,"wfc");null!=d&&(c.windowColor=d);d=F6(b,"wfo");void 0!=d&&(c.ik=d/255);return c},Fxa=function(a,b){var c={},d=b.getAttribute("wp");
d&&g.Ha(c,a.C[d]);d=H6(b,"ap");null!=d&&(c.Tg=d);d=F6(b,"cc");null!=d&&(c.SH=d);d=F6(b,"ah");null!=d&&(c.ti=d);d=F6(b,"rc");null!=d&&(c.Vo=d);d=F6(b,"av");null!=d&&(c.Oi=d);return c},Gxa=function(a,b,c){var d={};
g.Ha(d,Fxa(a,b));g.Ha(d,Exa(a,b));c?jxa(d,a.B)?(c=a.A,d=a.B):c="_"+f6++:c=b.getAttribute("id")||"0";a=F6(b,"t");b=F6(b,"d")||0x8000000000000;return new e6(a,b,0,c,d)},J6=function(a,b,c){this.F=c;
this.version=this.C=this.D=this.g=0;this.o=new window.DataView(a);this.A=[]},K6=function(a){var b=a.g;
a.g+=1;return a.o.getUint8(b)},Hxa=function(a){var b=a.g;
a.g+=4;return a.o.getUint32(b)},L6=function(a,b){this.B=a;
this.o="CC3"==b.D?4:0;this.A=new n6(!1);this.A.A=1<<this.o},Ixa=function(a){if(!(a.g<a.o.byteLength))return!1;
var b=Hxa(a);b.toString(16);if(1380139777!=b)return!1;a.version=K6(a);if(1<a.version)return!1;K6(a);K6(a);K6(a);return!0},Jxa=function(){this.o=[];
this.g=[]},M6=function(a,b){return b?a.g.concat(a.o):a.g},N6=function(a,b){switch(b.B){case "asr":var c=a.o;
g.gb(c,(0,g.A)(b.J,b))||c.push(b);break;default:c=a.g,g.gb(c,(0,g.A)(b.J,b))||c.push(b)}},O6=function(){this.o=null},Kxa=function(a,b,c,d,e,f,k,l,m){switch(k.tagName){case "b":l.bold=!0;
break;case "i":l.os=!0;break;case "u":l.underline=!0}for(var n=0;n<k.childNodes.length;n++){var q=k.childNodes[n];if(3==q.nodeType)q=new d6(b,c,d,e.id,q.nodeValue,f||0<n,g.$b(l)?void 0:l),m.push(q),e!=a.o&&e.o.push(q);else{var r={};g.Ha(r,l);Kxa(a,b,c,d,e,!0,q,r,m)}}},P6=function(a){var b=0;
a=g.ma(a.split(":"));for(var c=a.next();!c.done;c=a.next())b=60*b+c.value;return 1E3*b},Q6=function(a){g.K.call(this);
this.Uy=!!a;this.o=new Jxa;this.C=[];this.g=null},Mxa=function(a){var b={};
if(a=a6(a))b.lang=a,Lxa.test(a)&&(b.bk=h6.Yp);return b},Nxa=function(a,b,c,d,e){d=d||0;
e=e||0;if(g.u(b)){if("WEBVTT"==b.substring(0,6))return a.g||(a.g=new O6),a.g.g(b,d);b=g.wr(b);if(!b||!b.firstChild)return[];a.g||("timedtext"==b.firstChild.tagName?3==(0,window.parseInt)(b.firstChild.getAttribute("format"),10)?a.g=new E6(Mxa(c)):a.g=new D6:a.g=new A6(Mxa(c)));return a.g.g(b,d)}try{if(g.u(b))var f=!1;else{var k=new J6(b,0,0);f=Ixa(k)}if(f)return a.g||(a.g=new L6(e,c)),a.g.g(b,d)}catch(l){g.PE(l)}return[]},R6=function(a){Q6.call(this,a.Um);
this.B=void 0;this.A=null;this.C=a.captionTranslationLanguages},S6=function(){this.qb=[]},T6=function(a,b,c,d,e,f){g.K.call(this);
this.J=b;this.B=new S6;this.g=null;this.D=d;this.I=f;this.o=this.A=null;this.L=c;this.C=e||!1;this.F=new g.Ft(this.kz,1E3,this);g.L(this,this.F);this.G=new g.qG(this);g.L(this,this.G);this.G.P(b,"seekto",this.jA);this.jA(b.getCurrentTime());this.kz()},U6=function(a,b){Q6.call(this);
this.D=a;this.T=b;this.A=null;this.B=!1},V6=function(a,b,c,d,e,f){j6.call(this,a,b,c,d,e,f);
this.type=i6.Up},W6=function(a,b,c,d,e,f){j6.call(this,a,b,c,d,e,f);
g.S(this.element,"ytp-caption-window-rollup");this.type=i6.Xp;this.I=this.N=0;this.O=window.NaN;this.na=null;this.Y=new g.Ft(this.FR,433,this);g.L(this,this.Y)},X6=function(a){if(!a.N){var b=g.Cd("SPAN");
g.oh(b,l6(a,a.o.rb));a.A.appendChild(b);b.appendChild(g.Dd("M"));var c=b.offsetHeight,d=g.Cd("BR");b.appendChild(d);b.appendChild(g.Dd("M"));a.N=b.offsetHeight-c;a.A.removeChild(b)}return a.N},Y6=function(a,b,c,d){Q6.call(this,d);
c=c||g.cF(a).hl||"";c=c.split("_").join("-");this.D=g.eF(a,{hl:c});this.B=b;this.F={};this.A=null},b7=function(a){g.bX.call(this,a);
g.oE();this.F=g.X(a);this.o=a.fa();this.ha=g.gW(a);this.T=a;var b=null,c=g.RD("yt-html5-player-modules::subtitlesModuleData");c&&(b=new g.yD(c));this.ba=b;this.C={rb:{}};this.G={rb:{}};this.J=[];this.L={};this.V={};this.O=!1;this.na="1"==this.o.Xb.cc_auto_caps||"1"==this.F.N.cc_auto_caps;c=b=this.A=this.B=this.D=this.I=this.N=this.ga=null;Z6(this)||(b=new g.Ct(this.nD,void 0,this),g.L(this,b),c=new g.Ft(this.pT,2E3,this),g.L(this,c));this.aa=b;this.da=c;this.Y=new g.qG(this);g.L(this,this.Y);Z6(this)||
this.Y.P(a,"resize",this.pu);this.Y.P(a,"onPlaybackAudioChange",this.TO);this.Y.P(a,"crn_captions",this.FM,this);this.Y.P(a,"crx_captions",this.GM,this);$6(this,a7(this,"display-settings")||{})},Z6=function(a){if("3"!=a.F.B)return!1;
a=a.T.app.D;return!(!a||!a.g.textTracks)},Oxa=function(a){if(a.o.captionTracks.length)var b=a.g.uh().yw;
if("FORCED_ON"==b||1==a.F.Xg||1==a.o.Xg||"alwayson"==g.tQ(a.o,"yt:cc"))return!0;if(2==a.F.Xg){var c=a7(a,"module-enabled");if(null!=c)return!!c}return"ON"==b||"on"==g.tQ(a.o,"yt:cc")},Pxa=function(a,b){if(a.B){var c=M6(a.B.o,b||a.na);
if(a.D&&a.D.g)return a.D.g;if(!a.F.experiments.g("legacy_default_caption_track"))for(var d=[a.o.Wg,a.F.Wg,g.tQ(a.o,"yt:cc_default_lang")],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(a6(c[f])==d[e])return c[f];return a.D&&a.D.Kq?a.D.Kq:c[0]||a.D&&a.D.Ik}return null},c7=function(a,b,c,d){a.loaded&&a.unload();
null!=c&&(a.O=c);a.A=b;a.load(d)},Qxa=function(a,b){var c=g.QZ(a.ha,!0).height;
if(!c)return null;var d=a.ha.Xa();switch(null!=b.params.Fs?b.params.Fs:b.params.ZT?i6.Xp:1<b.o.length?i6.Up:i6.Vp){case i6.Up:return new V6(b,a.C,a.G,c,d.width,d.height);case i6.Xp:return new W6(b,a.C,a.G,c,d.width,d.height);default:return new j6(b,a.C,a.G,c,d.width,d.height)}},$6=function(a,b,c){var d=d7.rb;
a.C={};g.Ha(a.C,d7);a.C.rb={};g.Ha(a.C.rb,d);a.G={rb:{}};var e=b.backgroundOverride?a.G:a.C,f=b.background||d.background;C6.test(f);e.rb.background=f;e=b.colorOverride?a.G:a.C;f=b.color||d.color;C6.test(f);e.rb.color=f;e=b.windowColorOverride?a.G:a.C;f=b.windowColor||d7.windowColor;C6.test(f);e.windowColor=f;e=b.backgroundOpacityOverride?a.G:a.C;f=b.backgroundOpacity;null==f&&(f=d.Ue);e.rb.Ue=f;e=b.fontSizeIncrementOverride?a.G:a.C;f=b.fontSizeIncrement;null==f&&(f=d.fj);e.rb.fj=f;e=b.textOpacityOverride?
a.G:a.C;f=b.textOpacity;null==f&&(f=d.Ih);e.rb.Ih=f;e=b.windowOpacityOverride?a.G:a.C;f=b.windowOpacity;null==f&&(f=d7.ik);e.ik=f;e=b.charEdgeStyleOverride?a.G:a.C;f=b.charEdgeStyle;null==f&&(f=d.Yh);e.rb.Yh=f;e=b.fontFamilyOverride?a.G:a.C;f=b.fontFamily;null==f&&(f=d.fontFamily);e.rb.fontFamily=f;a.loaded&&a.pu();c&&e7(a,"display-settings",b)},Sxa=function(a,b){if(b&&!a.I){var c=g6({bk:h6.Tp,
lang:"en"});a.I=[c,new d6(c.start,c.end-c.start,0,c.id,g.U("YTP_SAMPLE_SUBTITLES"))];g.sW(a.g,a.I)}else!b&&a.I&&(Rxa(a,a.I),a.I=null)},Rxa=function(a,b){g.uW(a.g,b);
(0,g.H)(b,function(a){g.sb(this.J,a)},a);
a.aa.Sk()},Txa=function(a,b){return a&&g.u(a)&&C6.test(a)?a:b},Uxa=function(a,b){return g.ta(a)&&!(0,window.isNaN)(a)?Math.max(0,Math.min(1,(0,window.parseFloat)(a))):b},Wxa=function(a,b){if(a&&g.u(a)){var c=Vxa.indexOf(a);
return-1!=c?c:b}return b},Yxa=function(a,b){if(a&&g.u(a)){var c=Xxa.indexOf(a);
return-1!=c?c:b}return b},Zxa=function(a,b){return g.ta(a)&&!(0,window.isNaN)(a)?g.$c(a,-2,4):b},a7=function(a,b){if(!a.ba)return null;
try{var c=a.ba.get(b)}catch(d){a.ba.remove(b)}return c},e7=function(a,b,c){if(a.ba)try{a.ba.set(b,c)}catch(d){}};
g.UJ.prototype.Kn=g.ca(2,function(a){return(a=this.di(a))?a.o:0});
g.oM.prototype.Kn=g.ca(1,function(){return 0});
g.RI.prototype.J=g.ca(0,function(a){return a?this.toString()==a.toString():!1});
var hxa=/^#(?:[0-9a-f]{3}){1,2}$/i,ixa=/#(.)(.)(.)/,Lxa=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,k6={Ov:0,NORMAL:1,Rv:2},Xxa="default monoSerif propSerif monoSans propSans casual cursive smallCaps".split(" "),Vxa=["none","raised","depressed","uniform","dropShadow"],C6=/^#(?:[0-9a-f]{3}){1,2}$/i;var f7={ov:0,E0:1,RE:2},mxa=["left","right","center"],h6={Tp:0,Yp:1,B1:2,AW:3},B6={Z2:0,wm:5,aq:6},i6={Vp:0,Up:1,Xp:2};var d7={windowColor:g.N2.Kp,ik:0,textAlign:f7.RE,Tg:7,ti:50,Oi:100,rb:{background:g.N2.Kp,Ue:.75,Yh:g.M2.NONE,color:g.N2.cq,fontFamily:g.O2.Wp,fj:0,Ih:1,offset:k6.NORMAL}};g.p(d6,g.bS);g.p(e6,g.bS);var f6=0;g.p(j6,g.Y);g.h=j6.prototype;g.h.ZM=function(a,b){var c=g.Eh(this.element,this.element.parentElement);this.ea=a-c.x;this.da=b-c.y;g.S(this.element,"ytp-dragging")};
g.h.YM=function(a,b){var c=g.Hh(this.element),d=a-this.ea-.02*this.sa,e=b-this.da-.02*this.ra,f=(d+c.width/2)/this.V*3;f=Math.floor(g.$c(f,0,2));var k=(e+c.height/2)/this.ga*3;k=Math.floor(g.$c(k,0,2));var l=f+3*k;d=(d+f/2*c.width)/this.V;d=100*g.$c(d,0,1);c=(e+k/2*c.height)/this.ga;c=100*g.$c(c,0,1);this.F.params.Tg=l;this.F.params.Oi=c;this.F.params.ti=d;this.o.Tg=l;this.o.Oi=c;this.o.ti=d;this.pC()};
g.h.XM=function(){g.Tp(this.element,"ytp-dragging")};
g.h.pC=function(){this.Li(this.B)};
g.h.Yb=function(){return this.type};
g.h.Li=function(a){var b=Math.min(this.Ox(),this.V),c=this.Nx();g.oh(this.element,{top:0,left:0,right:"",bottom:"",width:b?b+"px":"",height:c?c+"px":"","max-width":"96%","max-height":"96%",margin:"",transform:""});this.pq(a);a={transform:"",top:"",left:"",width:b?b+"px":"",height:c?c+"px":"","max-width":"","max-height":""};var d=.96*this.o.ti+2,e=this.o.Tg;switch(e){case 0:case 3:case 6:a.left=d+"%";break;case 1:case 4:case 7:a.left=d+"%";d=this.A.offsetWidth;b||d?(b=b||d+1,a.width=b+"px",a["margin-left"]=
b/-2+"px"):a.transform+=" translateX(-50%)";break;case 2:case 5:case 8:a.right=100-d+"%"}b=.96*this.o.Oi+2;switch(e){case 0:case 1:case 2:a.top=b+"%";break;case 3:case 4:case 5:a.top=b+"%";(c=c||this.A.offsetHeight)?(a.height=c+"px",a["margin-top"]=c/-2+"px"):a.transform+=" translateY(-50%)";break;case 6:case 7:case 8:a.bottom=100-b+"%"}g.oh(this.element,a)};
g.h.pq=function(a){var b;for(b=0;b<a.length&&a[b]==this.B[b];b++);if(this.J||this.B.length>b)b=0,this.J=!1,this.B=[],this.D=[],this.G=[],this.C=null,g.Gd(this.A);for(;b<a.length;b++)nxa(this,a[b])};
g.h.Ox=function(){return 0};
g.h.Nx=function(){return 0};
g.h.toString=function(){return g.Y.prototype.toString.call(this)};oxa.prototype.B=function(){};n6.prototype.clear=function(){this.B=this.o=this.mode=0;this.g=[];this.reset()};
n6.prototype.reset=function(){this.mode=0;this.C.reset(0);this.D.reset(1)};
var pxa=[128,1,2,131,4,133,134,7,8,137,138,11,140,13,14,143,16,145,146,19,148,21,22,151,152,25,26,155,28,157,158,31,32,161,162,35,164,37,38,167,168,41,42,171,44,173,174,47,176,49,50,179,52,181,182,55,56,185,186,59,188,61,62,191,64,193,194,67,196,69,70,199,200,73,74,203,76,205,206,79,208,81,82,211,84,213,214,87,88,217,218,91,220,93,94,223,224,97,98,227,100,229,230,103,104,233,234,107,236,109,110,239,112,241,242,115,244,117,118,247,248,121,122,251,124,253,254,127,0,129,130,3,132,5,6,135,136,9,10,139,
12,141,142,15,144,17,18,147,20,149,150,23,24,153,154,27,156,29,30,159,160,33,34,163,36,165,166,39,40,169,170,43,172,45,46,175,48,177,178,51,180,53,54,183,184,57,58,187,60,189,190,63,192,65,66,195,68,197,198,71,72,201,202,75,204,77,78,207,80,209,210,83,212,85,86,215,216,89,90,219,92,221,222,95,96,225,226,99,228,101,102,231,232,105,106,235,108,237,238,111,240,113,114,243,116,245,246,119,120,249,250,123,252,125,126,255];o6.prototype.set=function(a){this.g=a};
o6.prototype.get=function(){return this.g};
p6.prototype.clear=function(){this.g=0};
p6.prototype.update=function(){this.g=2==this.g?1:0};
p6.prototype.matches=function(a,b){return 0!=this.g&&a==this.A&&b==this.o};
q6.prototype.hn=function(a){this.qe=a.qe;this.timestamp=a.timestamp;this.g=a.g};
q6.prototype.reset=function(){this.timestamp=this.qe=0;this.g=!1};
r6.prototype.debugString=function(){for(var a="\n",b=1;15>=b;++b){for(var c=1;32>=c;++c){var d=this.A[b][c];a=0==d.qe?a+"_":a+String.fromCharCode(d.qe)}a+="\n"}return a};
r6.prototype.reset=function(a){for(var b=0;15>=b;b++)for(var c=0;32>=c;c++)this.A[b][c].reset();this.B=a;this.g=0;this.o=this.Hc=1};
var uxa=[32,33,34,35,36,37,38,39,40,41,225,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,233,93,237,243,250,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,231,247,209,241,9632],vxa=[174,176,189,191,8482,162,163,9834,224,32,232,226,234,238,244,251],wxa=[193,201,211,218,220,252,8216,161,42,39,9473,169,8480,183,8220,8221,192,194,199,200,202,203,235,
206,207,239,212,217,249,219,171,187],xxa=[195,227,205,204,236,210,242,213,245,123,125,92,94,95,124,126,196,228,214,246,223,165,164,9475,197,229,216,248,9487,9491,9495,9499];x6.prototype.reset=function(a,b){this.C=b;this.style.set(2);this.o=this.D;this.A=this.F;this.g=this.o;var c=(a<<2)+(b<<1)+0;this.D.reset(c);this.F.reset(c);this.G.reset((a<<2)+(b<<1)+1)};
m6.prototype.reset=function(a){this.C=a;this.g.clear();this.B=this.A;this.A.reset(a,0);this.D.reset(a,1)};z6.prototype.reset=function(){};g.p(A6,z6);A6.prototype.g=function(a){var b=[];this.o||(this.o=g6(this.A),b.push(this.o));a=g.ma(a.firstChild.childNodes);for(var c=a.next();!c.done;c=a.next())Dxa(c.value,this.o.id,b);return b};g.p(D6,z6);
D6.prototype.g=function(a){var b=[];this.o||(this.o=g6(),this.A[this.o.id]=this.o,b.push(this.o));for(a=a.firstChild.firstChild;a;){switch(a.tagName){case "window":var c=a,d=c.getAttribute("id");a:{var e=c,f=this.A[d];if(e.getAttribute("t")||e.getAttribute("start")){c=e.getAttribute("start")?1E3*(0,window.parseFloat)(e.getAttribute("start")):(0,window.parseInt)(e.getAttribute("t"),10);f&&(f.end>=c?f.end=c:f=null);switch(e.getAttribute("op")){case "kill":c=null;break a;case "define":f=null}f||(f=g6());
var k={};f&&(g.Ha(k,f.params),f=f.params.rb)&&(k.rb={},g.Ha(k.rb,f));e.getAttribute("rc")&&(k.Vo=(0,window.parseInt)(e.getAttribute("rc"),10));e.getAttribute("cc")&&(k.SH=(0,window.parseInt)(e.getAttribute("cc"),10));e.getAttribute("ap")&&(f=(0,window.parseInt)(e.getAttribute("ap"),10),k.Tg=0>f||8<f?7:f);e.getAttribute("ah")&&(k.ti=(0,window.parseInt)(e.getAttribute("ah"),10));e.getAttribute("av")&&(k.Oi=(0,window.parseInt)(e.getAttribute("av"),10));e.getAttribute("vs")&&(k.isVisible=!!e.getAttribute("vs"));
e.getAttribute("ju")&&(k.textAlign=(0,window.parseInt)(e.getAttribute("ju"),10));e.getAttribute("pd")&&(k.bk=h6.Yp,0==(0,window.parseInt)(e.getAttribute("pd"),10)&&(k.bk=h6.Tp));e.getAttribute("bc")&&(k.rb||(k.rb={}),k.rb.backgroundColor=e.getAttribute("bc"));e.getAttribute("bo")&&(k.rb||(k.rb={}),k.rb.Ue=(0,window.parseInt)(e.getAttribute("bo"),10)/100);e.getAttribute("fc")&&(k.rb||(k.rb={}),k.rb.color=e.getAttribute("fc"));e.getAttribute("sd")&&(k.ZT=(0,window.parseInt)(e.getAttribute("sd"),10));
f=(0,window.parseInt)(e.getAttribute("d"),10)||1E3*(0,window.parseFloat)(e.getAttribute("dur"))||0x8000000000000;e=e.getAttribute("id")||"0";c=new e6(c,f,0,e,k)}else c=null}this.A[d]=c;b.push(c);break;case "text":for(d=[],Dxa(a,this.o.id,d),d=g.ma(d),c=d.next();!c.done;c=d.next())c=c.value,this.A[c.windowId]&&b.push(c)}a=a.nextSibling}return b};g.p(E6,z6);
E6.prototype.g=function(a){a.firstChild.getAttribute("format");a=g.ma(a.firstChild.childNodes);for(var b=a.next();!b.done;b=a.next())switch(b=b.value,b.tagName){case "head":var c=b;break;case "body":var d=b}if(c)for(c=g.ma(c.childNodes),a=c.next();!a.done;a=c.next())switch(a=a.value,a.tagName){case "pen":b=a.getAttribute("id");var e=this.o,f={},k=a.getAttribute("p");k&&g.Ha(f,this.o[k]);k=G6(a,"b");null!=k&&(f.bold=k);k=G6(a,"i");null!=k&&(f.os=k);k=G6(a,"u");null!=k&&(f.underline=k);k=H6(a,"et");
null!=k&&(f.Yh=k);k=H6(a,"of");null!=k&&(f.offset=k);k=I6(a,"bc");null!=k&&(f.background=k);k=I6(a,"ec");null!=k&&(f.Gw=k);k=I6(a,"fc");null!=k&&(f.color=k);k=H6(a,"fs");void 0!=k&&k!=g.O2.km&&(f.fontFamily=k);k=F6(a,"sz");void 0!=k&&(f.fj=k/100-1);k=F6(a,"bo");void 0!=k&&(f.Ue=k/255);a=F6(a,"fo");void 0!=a&&(f.Ih=a/255);e[b]=f;break;case "ws":b=a.getAttribute("id");this.D[b]=Exa(this,a);break;case "wp":b=a.getAttribute("id"),this.C[b]=Fxa(this,a)}c=[];if(d)for(a={},b=void 0,d=g.ma(d.childNodes),
e=d.next();!e.done;e=d.next())switch(e=e.value,e.tagName){case "w":var l=Gxa(this,e,!1);(e=a[l.id])&&e.end>l.start&&(e.end=l.start);a[l.id]=l;c.push(l);break;case "p":var m=b,n=Qc;f=[];k=e.getAttribute("w")||this.A;var q=!!G6(e,"a"),r=F6(e,"t")||0,w=F6(e,"d")||5E3;!n&&!q&&m&&m.windowId==k&&m.end>r&&(m.end=r);m=q?B6.aq:B6.wm;n=this.o[e.getAttribute("p")];for(var z=e.childNodes,B=0;B<z.length;B++){var C=z[B];0<B&&(q=!0);if("s"==C.tagName){var N=C;C=r;var da=w,Ea=k,Ba=q,Ca=m,Me=N.textContent?N.textContent:
"",Za=this.o[N.getAttribute("p")];N=F6(N,"t")||0;C=new d6(C+N,da-N,Ca,Ea,Me,Ba,Za)}else C=new d6(r,w,m,k,C.textContent||"",q,n);f.push(C)}b&&"\n"==b.text&&(b.text="");if(0<f.length){b=f[f.length-1];var Qc=null!=e.getAttribute("d");f[0].windowId==this.A&&(l=Gxa(this,e,!0),c.push(l));e=g.ma(f);for(f=e.next();!f.done;f=e.next())f=f.value,f.windowId=l.id,l.o.push(f),c.push(f)}}return c};g.p(J6,oxa);J6.prototype.B=function(a,b,c,d,e){if(c<d){var f="_"+f6++;c=c/1E3-this.F;d=d/1E3-this.F;var k=B6.wm;a=new e6(c,d-c,k,f,{textAlign:f7.ov,Tg:0,ti:2.5*b,Oi:5.33*a});e=new d6(c,d-c,k,f,e);this.A.push(a);this.A.push(e)}};
g.p(L6,z6);L6.prototype.g=function(a){a=new J6(a,0,this.B);if(Ixa(a)){for(;a.g<a.o.byteLength;)for(0==a.version&&(a.D=Hxa(a)*(1E3/45)),a.C=K6(a);0<a.C;a.C--){var b=K6(a),c=K6(a),d=K6(a);b&4&&(b&3)==this.o&&(0==this.o||1==this.o)&&(b=this.A,b.g.push({time:a.D,type:this.o,Bw:c,Cw:d,order:b.g.length}))}txa(this.A,a);return a.A}return[]};
L6.prototype.reset=function(){this.A.clear()};g.p(O6,z6);
O6.prototype.g=function(a,b){for(var c=[],d=a.split($xa),e=1;e<d.length;e++){var f=d[e],k=b;if(""!=f&&!aya.test(f)){var l=g7.exec(f);if(l&&3<=l.length){var m=P6(l[1]);l=P6(l[2])-m;m+=k;f=f.substring(g7.lastIndex).replace(/[\x01-\x09\x0b-\x1f]/g,"");g7.lastIndex=0;var n=f;f={};this.o||(this.o=g6({Fs:i6.Vp}),c.push(this.o));var q=this.o;k=B6.wm;if(0>n.indexOf("<")&&0>n.indexOf("&"))c.push(new d6(m,l,k,q.id,n,!1,g.$b(f)?void 0:f));else{n=n.split(bya);1!=n.length&&(k=B6.aq,q="_"+cya++,q=new e6(m,l,k,
q,{}),c.push(q));for(var r=m,w=0;w<n.length;w++){var z=n[w];if(0==w%2){var B=g.wr("<html>"+z+"</html>");if(B.getElementsByTagName("parsererror").length){var C=B.createElement("span");C.appendChild(B.createTextNode(z))}else C=B.firstChild;Kxa(this,r,l-(r-m),k,q,0<w,C,f,c)}else r=P6(z)}}}g7.lastIndex=0}}return c};
var cya=0,aya=/^NOTE/,$xa=/(?:\r\n|\r|\n){2,}/,g7=RegExp("^((?:[\\d]{2}:)?[\\d]{2}:[\\d]{2}\\.[\\d]{3})[\\t ]+--\x3e[\\t ]+((?:[\\d]{2}:)?[\\d]{2}:[\\d]{2}\\.[\\d]{3}).*(?:\r\n|\r|\n)","gm"),bya=/<((?:[\d]{2}:)?[\d]{2}:[\d]{2}\.[\d]{3})>/;g.p(Q6,g.K);Q6.prototype.Hd=function(){this.g=null};
Q6.prototype.W=function(){g.K.prototype.W.call(this);this.Hd()};
Q6.prototype.bC=function(){return!1};g.p(R6,Q6);g.h=R6.prototype;g.h.zs=function(a,b){var c=this.Pk(a),d=(0,g.A)(function(c){this.A=null;b(c.responseText,a)},this);
this.Hd();this.A=g.iF(c,{format:"RAW",Vb:d,withCredentials:!0})};
g.h.As=function(a,b,c,d){this.B=c;if(d)for(b=g.ma(d.captionTracks),c=b.next();!c.done;c=b.next())N6(this.o,c.value);a()};
g.h.Pk=function(a){var b=a.I,c={};if(this.B||a.A)c.fmt=this.B||"srv"+a.A;a.g&&(c.tlang=a.g.languageCode);return g.eF(b,c)};
g.h.Hd=function(){Q6.prototype.Hd.call(this);this.A&&this.A.abort()};
g.h.W=function(){this.Hd();Q6.prototype.W.call(this)};S6.prototype.contains=function(a){a=g.Cb(this.qb,a);return 0<=a||0>a&&1==(-a-1)%2};
S6.prototype.length=function(){return this.qb.length/2};g.p(T6,g.K);g.h=T6.prototype;g.h.W=function(){g.K.prototype.W.call(this);this.o&&this.o.abort()};
g.h.jA=function(a){var b=this.g;this.g=g.eb(this.L.fh(a).g);b!=this.g&&this.I&&this.I()};
g.h.reset=function(){this.B=new S6;this.o&&(this.o.abort(),this.o=null)};
g.h.kz=function(){var a;if(a=null!==this.g)a=this.g,a=a.ma.Bi(a);if(a&&!this.o&&!(this.g&&30<this.g.startTime-this.J.getCurrentTime())){a=this.g;a=a.ma.vl(a);if(!this.B.contains(a.g[0].va)){var b=g.TL(g.$L(a,{})),c={format:"RAW",Fd:(0,g.A)(this.AR,this),withCredentials:!0};this.C&&(c.responseType="arraybuffer");this.o=g.iF(b,c);this.A=a;b=this.B;c=this.A.g[0].va;var d=g.Cb(b.qb,c);0<=d||0>d&&1==(-d-1)%2||(d=-d-1,0<d&&1==c-b.qb[d-1]&&d<b.qb.length&&1==b.qb[d]-c?(g.rb(b.qb,d),g.rb(b.qb,d-1)):0<d&&1==
c-b.qb[d-1]?b.qb[d-1]=c:d<b.qb.length&&1==b.qb[d]-c?b.qb[d]=c:(g.yb(b.qb,d,0,c),g.yb(b.qb,d+1,0,c)))}this.g=g.eb(a.g)}this.F.start()};
g.h.AR=function(a){(this.C?!a.response:!a.responseText)||400<=a.status||null===this.D||(this.C?this.D(a.response,1E3*this.A.g[0].startTime):this.D(a.responseText,1E3*this.A.g[0].startTime));this.o=this.A=null};g.p(U6,Q6);g.h=U6.prototype;g.h.zs=function(a,b){this.Hd();var c=this.D.g[a.o];if(c){var d=1E3*c.index.Kn(c.index.xg()),e=g.X(this.T).zf;this.A=new T6(new g.uL,this.T,c,function(c,e){b(c,a,e,d)},e,(0,g.A)(function(){e&&(this.A&&this.A.reset(),this.g&&this.g.reset(),this.B=!0)},this))}};
g.h.bC=function(){var a=this.B;this.B=!1;return a};
g.h.As=function(a){g.X(this.T).zf?(N6(this.o,new g.RI({format:1,languageCode:"rawcc",languageName:"CC1",name:"",is_servable:!0,is_default:!0,is_translateable:!1})),N6(this.o,new g.RI({format:1,languageCode:"rawcc",languageName:"CC3",name:"",is_servable:!0,is_default:!0,is_translateable:!1}))):N6(this.o,new g.RI({format:1,languageCode:"en",languageName:"English",name:"",is_servable:!0,is_default:!0,is_translateable:!1}));a()};
g.h.Hd=function(){Q6.prototype.Hd.call(this);this.A&&(this.A.dispose(),this.A=null)};
g.h.Pk=function(){return""};
g.h.W=function(){this.Hd();Q6.prototype.W.call(this)};g.p(V6,j6);V6.prototype.pq=function(a){var b=this.F.o;j6.prototype.pq.call(this,a);for(a=a.length;a<b.length;a++){var c=b[a];if(f&&c.o==e)var d=f;else{d={};g.Ha(d,c.o);g.Ha(d,dya);var e=c.o;var f=d}nxa(this,c,d)}};
var dya={Br:!0};g.p(W6,j6);g.h=W6.prototype;g.h.pC=function(){g.Gt(this.Y)};
g.h.FR=function(){g.Tp(this.element,"ytp-rollup-mode");this.Li(this.na,!0)};
g.h.Ox=function(){return this.I};
g.h.Nx=function(){return this.F.params.Vo*X6(this)};
g.h.Li=function(a,b){this.na=a;if(X6(this)){for(var c=0,d=0;d<this.B.length&&c<a.length;d++)this.B[d]==a[c]&&c++;0<c&&c<a.length&&(a=this.B.concat(a.slice(c)));c=this.I;this.I=0;j6.prototype.Li.call(this,a);this.I=Math.max(c,this.A.offsetWidth+1);c=this.F.params.Vo*X6(this)-this.A.offsetHeight;c!=this.O&&(b||(0,window.isNaN)(this.O)||(g.S(this.element,"ytp-rollup-mode"),this.Y.gc()),g.oh(this.A,"transform",c?"translateY("+c+"px)":""),this.O=c);j6.prototype.Li.call(this,a)}else j6.prototype.Li.call(this,
a)};g.p(Y6,Q6);g.h=Y6.prototype;g.h.zs=function(a,b){var c=this.Pk(a),d=(0,g.A)(function(c){this.A=null;b(c.responseText,a)},this);
this.Hd();this.A=g.iF(c,{format:"RAW",Vb:d,withCredentials:!0})};
g.h.As=function(a,b,c){var d=this.D;b={type:"list",tlangs:1,v:this.B,fmts:Number(b||!1),vssids:1};this.Uy&&(b.asrs=1);d=g.eF(d,b);b=(0,g.A)(function(b){this.A=null;if((b=b.responseXML)&&b.firstChild){for(var d=this.o,e=g.ma(b.getElementsByTagName("track")),l=e.next();!l.done;l=e.next()){var m=l.value;l=m.getAttribute("formats");var n=m.getAttribute("lang_code"),q=m.getAttribute("lang_translated"),r=m.getAttribute("name"),w=m.getAttribute("kind"),z=m.getAttribute("id"),B="true"==m.getAttribute("cantran");
m=m.getAttribute("vss_id");N6(d,new g.RI({formats:l,format:c,languageCode:n,languageName:q,name:r,kind:w,id:z,is_servable:!0,is_translateable:B,vss_id:m}))}b=b.getElementsByTagName("target");d=b.length;for(e=0;e<d;e++)l=b[e].getAttribute("lang_code"),n=b[e].getAttribute("lang_translated"),q=b[e].getAttribute("lang_original"),r=b[e].getAttribute("id"),l={languageCode:l,languageName:n,languageOriginal:q,id:r},this.F[l.languageCode]=l.languageName,this.C.push(new g.QI(l))}a()},this);
this.Hd();this.A=g.iF(d,{format:"RAW",Vb:b,withCredentials:!0})};
g.h.Pk=function(a){var b=this.D,c={v:this.B,type:"track",lang:a.o,name:a.C,kind:a.B,fmt:a.A};a.g&&(c.tlang=a6(a));return b=g.eF(b,c)};
g.h.Hd=function(){Q6.prototype.Hd.call(this);this.A&&this.A.abort()};
g.h.W=function(){this.Hd();Q6.prototype.W.call(this)};g.p(b7,g.bX);g.h=b7.prototype;g.h.W=function(){Z6(this)||Sxa(this,!1);g.bX.prototype.W.call(this)};
g.h.bA=function(){return Z6(this)?!this.o.Ba:this.o.captionTracks.length&&this.g.uh().Ik?!0:Oxa(this)};
g.h.load=function(a){g.bX.prototype.load.call(this);this.D=this.g.uh();if(this.B||a)this.A?(a?this.KB(a,this.A):3!=this.g.Ya()&&this.B.zs(this.A,(0,g.A)(this.KB,this)),this.g.za("captionschanged",b6(this.A))):this.g.za("onCaptionsTrackListChanged");else{var b;a=this.o;a.Ba||g.X(this.T).zf&&null!=a.ua&&null!=a.ua.g.rawcc?b=new U6(this.o.ua,this.g):this.o.captionTracks.length?b=new R6(this.o):b=new Y6(this.o.Vm,this.o.videoId,this.o.Wg||this.F.Wg||g.tQ(this.o,"yt:cc_default_lang")||this.F.Sa,this.o.Um);
this.B=b;b.As((0,g.A)(this.hS,this),!0,Z6(this)?"vtt":void 0,this.g.uh())}};
g.h.unload=function(){if(Z6(this))for(var a=g.od(window.document,"track",void 0,this.T.app.D.g),b=0;b<a.length;b++)g.Jd(a[b]);else this.da&&g.Ht(this.da),g.vW(this.g,"captions"),this.J=[],this.B&&this.B.Hd(),this.I&&g.sW(this.g,this.I),this.pu();g.bX.prototype.unload.call(this);(a=g.eW(this.g.app))&&a.D&&g.HQ(a.D.A);this.g.za("captionschanged",{})};
g.h.hS=function(){if(this.O||Oxa(this))var a=Pxa(this,this.O);if(Z6(this))for(var b=M6(this.B.o,!0),c=0;c<b.length;c++){var d=b[c],e={kind:"subtitles",label:g.SI(d),srclang:a6(d),src:this.B.Pk(d)};d==a&&(e["default"]=1);d=this.T.app.D;e=[g.Ad("TRACK",e)];for(var f=0;f<e.length;f++)d.g.appendChild(e[f])}else!this.A&&a&&c7(this,a),this.g.za("onCaptionsTrackListChanged"),this.g.za("onApiChange")};
g.h.fU=function(){this.loaded&&!Z6(this)&&this.unload()};
g.h.KB=function(a,b,c,d){if(a){this.B.bC()&&(this.J=[],g.vW(this.T,"captions"),this.aa.Sk());a=Nxa(this.B,a,b,c,d);c={trackName:b.C,trackKind:b.B,trackLangCode:a6(b)};b.g&&(c.fromLangCode=b.o);g.mW(this.g,"cc",c);if(this.A!=(this.D&&this.D.Ik)){if(this.O&&!g.aO(this.F)&&!g.bO(this.F)){g.Ht(this.da);b=g6({Tg:0,ti:5,Oi:5,Vo:2,textAlign:f7.ov,bk:h6.Tp,lang:"en"});this.N=[b];c=g.U("YTP_CLICK_FOR_SETTINGS").split("$GEAR_ICON");this.ga||(d=new g.HW(g.IE()),g.L(this,d),this.ga=d.element);d=b.end-b.start;
var e=g.SI(this.A);e&&this.N.push(new d6(b.start,d,0,b.id,e));this.N.push(new d6(b.start,d,0,b.id,c[0]),new d6(b.start,d,0,b.id,this.ga,!0),new d6(b.start,d,0,b.id,c[1],!0));g.sW(this.g,this.N);this.da.gc()}if(this.O||g.aO(this.F))e7(this,"module-enabled",!0),this.D&&(this.D.g=this.A);(b=g.eW(this.g.app))&&b.D&&g.HQ(b.D.A)}g.sW(this.g,a);this.O=!1}};
g.h.FM=function(a){this.J.push(a);this.aa.Sk()};
g.h.GM=function(a){g.sb(this.J,a);this.aa.Sk()};
g.h.aT=function(a){if(a instanceof e6){var b=this.L[a.id];b&&b.F!=a&&(b.dispose(),delete this.L[a.id],b=null);b||(b=Qxa(this,a))&&(this.L[a.id]=b)}else b=a.windowId,this.V[b]||(this.V[b]=[]),this.V[b].push(a)};
g.h.pT=function(){Rxa(this,this.N);this.N=null};
g.h.nD=function(){this.aa.stop();kxa(this.V);this.J.sort(g.dS);var a=this.J;if(this.I){var b=(0,g.Ld)(a,function(a){return-1==this.I.indexOf(a)},this);
b.length&&(a=b)}(0,g.H)(a,this.aT,this);g.Ob(this.L,function(a,b){this.V[b]?(a.element.parentNode||g.zW(this.g,a.element,4),a.Li(this.V[b])):(a.dispose(),delete this.L[b])},this)};
g.h.oC=function(){$6(this,{},!0)};
g.h.gr=function(){var a=d7.rb;a={background:a.background,backgroundOpacity:a.Ue,charEdgeStyle:a.Yh,color:a.color,fontFamily:a.fontFamily,fontSizeIncrement:a.fj,textOpacity:a.Ih,windowColor:d7.windowColor,windowOpacity:d7.ik};var b=a7(this,"display-settings"),c;for(c in b)null!=b[c]&&(a[c]=b[c]);return a};
g.h.tu=function(a,b){var c={};g.Ha(c,a7(this,"display-settings"));g.Ha(c,a);$6(this,c,b);this.g.X("captionssettingschanged")};
g.h.pu=function(){!Z6(this)&&this.loaded&&(g.Ob(this.L,function(a,b){a.dispose();delete this.L[b]},this),this.nD())};
g.h.Rs=function(a,b){switch(a){case "fontSize":if((0,window.isNaN)(b))break;var c=g.$c(b,-2,4);this.tu({fontSizeIncrement:c});return c;case "reload":b&&!Z6(this)&&c7(this,this.A,!0);break;case "stickyLoading":void 0!=b&&this.F.Hb&&e7(this,"module-enabled",!!b);break;case "track":if(!this.B)return{};if(b){if(Z6(this))break;if(!g.Aa(b))break;if(g.$b(b)){c7(this,null,!0);break}for(var d=M6(this.B.o,!0),e=0;e<d.length;e++){var f=d[e];f.o!=b.languageCode||c&&f.D!=b.languageName||(c=b.translationLanguage?
gxa(f,b.translationLanguage):f)}!c||c==this.A&&this.loaded||c7(this,c,!0)}else return this.loaded&&this.A&&this.A!=(this.D&&this.D.Ik)?b6(this.A):{};return"";case "tracklist":return this.B?(0,g.J)(M6(this.B.o,b&&b.includeAsr),function(a){return b6(a)}):[];
case "translationLanguages":return this.B?this.B.C:[];case "displaySettings":c=this.gr();if(g.aO(this.F)&&b&&g.Aa(b))if(b.reset)this.oC();else{f={};for(d in b)switch(d){case "color":case "background":case "windowColor":f[d]=Txa(b[d],c[d]);break;case "textOpacity":case "backgroundOpacity":case "windowOpacity":f[d]=Uxa(b[d],c[d]);break;case "charEdgeStyle":f[d]=Wxa(b[d],c[d]);break;case "fontSizeIncrement":f[d]=Zxa(b[d],c[d]);break;case "fontFamilyOption":f.fontFamily=Yxa(b[d],c[d])}for(e in f)f[e+
"Override"]=!0;this.tu(f,!0);c=this.gr()}c.fontFamilyOption=Xxa[c.fontFamily];c.charEdgeStyle=Vxa[c.charEdgeStyle];return c;case "sampleSubtitles":Z6(this)||void 0==b||Sxa(this,!!b);break;case "xmlTrack":b&&this.F.Hb&&(Z6(this)||c7(this,new g.RI({languageName:b.name}),!1,b.xml))}};
g.h.DM=function(){var a="reload fontSize track tracklist translationLanguages displaySettings sampleSubtitle".split(" ");this.F.Hb&&a.push("stickyLoading","xmlTrack");return a};
g.h.EM=function(){var a=this.A;return a?{cc:a.F}:{}};
g.h.cD=function(){this.loaded&&this.A?(e7(this,"module-enabled",!1),this.unload()):c7(this,this.A||Pxa(this,!0),!0)};
g.h.TO=function(){this.o.captionTracks.length&&(this.loaded&&this.unload(),this.bA()&&this.load())};g.nX("captions",b7);})(_yt_player);
