astroport/doc/Turning the database inside.../fU9hR3kiOK0_data/annotations_module.js

288 lines
70 KiB
JavaScript

(function(g){var window=this;/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var A2=function(a){a.S("cardstatechange",g.YK(a)&&g.ZK(a)?1:0)},nsa=function(a){if(/-[a-z]/.test("pollChoiceIndex"))return null;
if(g.Zj&&a.dataset){if(g.Nc()&&!("pollChoiceIndex"in a.dataset))return null;a=a.dataset.pollChoiceIndex;return void 0===a?null:a}return a.getAttribute("data-"+g.jd("pollChoiceIndex"))},osa=function(a){return Math.pow(a,3)},psa=function(a){return 3*a*a-2*a*a*a},B2=function(a,b){var c=g.xo("use_default_events_client")?void 0:g.Qq;
(0,g.y)(b,function(d){d={csn:a,ve:g.Yr(d),eventType:4};var e={al:g.es(a),bj:a};"UNDEFINED_CSN"==a?g.rs("visualElementShown",d,e):c?g.fq("visualElementShown",d,c,e):g.Rq("visualElementShown",d,e)})},C2=function(a,b){var c=g.xo("use_default_events_client")?void 0:g.Qq;
(0,g.y)(b,function(d){var e=void 0;e=void 0===e?!1:e;d={csn:a,ve:g.Yr(d),eventType:e?16:8};e={al:g.es(a),bj:a,CE:e};"UNDEFINED_CSN"==a?g.rs("visualElementHidden",d,e):c?g.fq("visualElementHidden",d,c,e):g.Rq("visualElementHidden",d,e)})},F2=function(a){a=g.Pa(a);
delete D2[a];g.Mb(D2)&&E2&&E2.stop()},rsa=function(){E2||(E2=new g.I(function(){qsa()},20));
var a=E2;a.isActive()||a.start()},qsa=function(){var a=(0,g.H)();
g.zb(D2,function(b){ssa(b,a)});
g.Mb(D2)||rsa()},G2=function(a,b,c,d){g.Fn.call(this);
if(!Array.isArray(a)||!Array.isArray(b))throw Error("Start and end parameters must be arrays");if(a.length!=b.length)throw Error("Start and end points must be the same length");this.w=a;this.G=b;this.duration=c;this.C=d;this.coords=[];this.progress=this.F=0;this.B=null},ssa=function(a,b){b<a.startTime&&(a.endTime=b+a.endTime-a.startTime,a.startTime=b);
a.progress=(b-a.startTime)/(a.endTime-a.startTime);1<a.progress&&(a.progress=1);a.F=1E3/(b-a.B);a.B=b;tsa(a,a.progress);1==a.progress?(a.o=0,F2(a),a.Fc(),a.pm()):a.eb()&&a.Ut()},tsa=function(a,b){g.Ma(a.C)&&(b=a.C(b));
a.coords=Array(a.w.length);for(var c=0;c<a.w.length;c++)a.coords[c]=(a.G[c]-a.w[c])*b+a.w[c]},usa=function(a,b){g.Je.call(this,a);
this.coords=b.coords;this.x=b.coords[0];this.y=b.coords[1];this.z=b.coords[2];this.duration=b.duration;this.progress=b.progress;this.fps=b.F;this.state=b.o},H2=function(a,b,c,d,e){G2.call(this,b,c,d,e);
this.element=a},I2=function(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");
H2.call(this,a,b,c,d,e)},J2=function(a){g.A.call(this);
this.u=a||window;this.o=[]},vsa=function(a,b,c,d){c=(0,g.x)(c,d||a.u);
b=g.Np(b,"change",c,"iv-card-poll-choice-input");a.o.push(b)},K2=function(a){return a.baseUrl||null},L2=function(a,b){return(0,g.ue)((0,g.Cc)(a,b,void 0),function(c){return!!c})},wsa=function(a,b,c){function d(tb){var nb=tb.hovercardButton;
if(!nb)return null;nb=nb.subscribeButtonRenderer;if(!nb)return null;var Yd=f(nb.unsubscribedButtonText),qf=f(nb.subscribedButtonText);if(nb.subscribed){var Kh=f(nb.subscriberCountWithUnsubscribeText);var Lh=f(nb.subscriberCountText)}else Kh=f(nb.subscriberCountText),Lh=f(nb.subscriberCountWithSubscribeText);var ag=null;return tb.signinEndpoint&&(ag=g.Hb(tb,"signinEndpoint","webNavigationEndpointData","url"),!ag)?null:Yd&&(qf||ag)?{subscribed:nb.subscribed,subscribeText:Yd,subscribeCount:Kh,unsubscribeText:qf,
unsubscribeCount:Lh,enabled:nb.enabled,signinUrl:ag,classic:tb.useClassicSubscribeButton}:null}
function e(tb){if(tb){var nb=[],Yd=tb.videoId;Yd&&nb.push("v="+Yd);(Yd=tb.playlistId)&&nb.push("list="+Yd);(tb=tb.startTimeSeconds)&&nb.push("t="+tb);return"/watch?"+nb.join("&")}}
function f(tb){if(!tb)return null;var nb=tb.simpleText;return nb?nb:tb.runs?(0,g.Cc)(tb.runs,function(Yd){return Yd.text}).join(""):null}
b=b.endscreenElementRenderer;if(!b)return null;var k=b.style,l=b.endpoint||{},m=null,n=null,p=null,t=null,u=null,z=null,C=!1,D=null,E=null,F=null,G=null,fa=null;if("VIDEO"==k)m=l.urlEndpoint?l.urlEndpoint.url:e(l.watchEndpoint),n=!1,p=a,t=f(b.videoDuration);else if("PLAYLIST"==k)m=l.urlEndpoint?l.urlEndpoint.url:e(l.watchEndpoint),n=!1,p=a,u=f(b.playlistLength);else if("CHANNEL"==k){if(C=g.Hb(l,"browseEndpoint","browseId"))z=C,m="/channel/"+z;n=!1;p="new";(C=!!b.isSubscribe)?D=d(b):E=f(b.subscribersText)}else"WEBSITE"==
k?((F=g.Hb(l,"urlEndpoint","url"))&&(m=F),n=!0,p="new",F=b.icon.thumbnails[0].url):"CREATOR_MERCHANDISE"==k&&(b.productPrice&&(G=f(b.productPrice)),b.additionalFeesText&&(fa=f(b.additionalFeesText)),(n=g.Hb(l,"urlEndpoint","url"))&&(m=n),n=!0,p="new");a=g.Hb(b,"title","accessibility","accessibilityData","label");var oa=b.endpoint?b.endpoint.clickTrackingParams:null,kc="";if(b.metadata){var Rc=f(b.metadata);Rc&&(kc=Rc)}return{id:"element-"+c,type:k,title:f(b.title),metadata:kc,callToAction:f(b.callToAction),
Ow:b.image,iconUrl:F,left:parseFloat(b.left),width:parseFloat(b.width),top:parseFloat(b.top),aspectRatio:parseFloat(b.aspectRatio),startMs:parseInt(b.startMs,10),endMs:parseInt(b.endMs,10),videoDuration:t,playlistLength:u,channelId:z,subscribeButton:D,subscribersText:E,isSubscribe:C,targetUrl:m,cG:n,Ob:{itct:oa},LO:p,Rk:a?a:null,gG:b.isPlaceholder,impressionUrls:L2(b.impressionUrls||[],K2),UF:L2(b.hovercardShowUrls||[],K2),clickUrls:L2(l.loggingUrls||[],K2),visualElement:g.Wr(b.trackingParams),productPrice:G,
additionalFeesText:fa}},M2=function(a,b){var c={};
c.startMs=parseInt(a.startMs,10);c.impressionUrls=L2(a.impressionUrls||[],K2);a.trackingParams&&(c.visualElement=g.Wr(a.trackingParams));c.elements=L2(a.elements||[],function(d,e){return wsa(b,d,e)});
return c},N2=function(a){g.vL.call(this,a);
this.A=this.u=null;this.o={};this.F={};this.C=this.w=null;this.I=[];a=a.N();this.P=g.Ry(a)||g.Ty(a);this.M=!0;this.G=0;this.B=new g.Gr(this);g.B(this,this.B);this.B.L(this.player,g.lC("creatorendscreen"),this.UG);this.B.L(this.player,"crx_creatorendscreen",this.VG);this.B.L(this.player,"resize",this.Xy);this.B.L(window,"focus",this.JN);this.load();var b=g.oe("STYLE");(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(b);g.Ge(this,function(){g.te(b)});
b.sheet&&(b.sheet.insertRule(".ytp-ce-playlist-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASBAMAAACk4JNkAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEVMaXGzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7P///91E4wTAAAACXRSTlMArBbpVOtYrReN+x2FAAAAAWJLR0QKaND0VgAAACFJREFUCNdjYCAWzIQAFBaZ6hgVYLKcJnBWGEyWvYGASwCXtBf7m4i3CQAAAABJRU5ErkJggg==) no-repeat center;background-size:18px;width:18px;height:18px}",0),b.sheet.insertRule(".ytp-ce-size-853 .ytp-ce-playlist-icon, .ytp-ce-size-1280 .ytp-ce-playlist-icon, .ytp-ce-size-1920 .ytp-ce-playlist-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEVMaXGzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7P///9RfzIKAAAAC3RSTlMAvDeyLvxYtDK9Ogx4T1QAAAABYktHRAyBs1FjAAAAK0lEQVQY02NgoBjshgO8HJoYwKiAMGAD92YHJM7uMCTO9gaEHs4FlPuZAQC8Fj8x/xHjxwAAAABJRU5ErkJggg==) no-repeat center;background-size:24px;width:24px;height:24px}",
0))},xsa=function(a){return a.player.getVideoData().lc?"current":a.P?"new":"current"},O2=function(a){return"creator-endscreen-editor"===a.player.N().playerStyle},P2=function(a,b,c){c=void 0===c?!0:c;
g.fR(a.player.app,"creatorendscreen",void 0);a.w&&(a.w.dispose(),a.w=null,a.C.dispose(),a.C=null);for(var d in a.o)a.o[d].dispose();a.o={};a.F={};0<a.I.length&&(a.I.forEach(function(l){l.dispose()}),a.I.length=0);
a.G=0;if((a.u=b)&&b.elements){c&&ysa(a);c=[];d=new g.iC(b.startMs,0x7ffffffffffff,{id:"ytp-ce-in-endscreen",namespace:"creatorendscreen"});c.push(d);a.player.N().o||(a.w=new g.R({D:"div",H:"ytp-ce-shadow"}),g.iL(a.player,a.w.element,4),a.C=new g.lN(a.w,200));for(d=0;d<b.elements.length;++d){var e=b.elements[d],f=zsa(a,e);a.o[e.id]=f;a.F[e.id]=e;g.iL(a.player,f.element,4);var k=new g.iC(e.startMs,e.endMs,{id:"ytp-ce-element-"+e.id,namespace:"creatorendscreen"});c.push(k);Asa(a,f,e)}g.eL(a.player,c);
a.Xy()}},ysa=function(a){var b=g.bs(),c=g.ds();
c&&b&&a.u.visualElement&&g.ys(c,b,a.u.visualElement)},zsa=function(a,b){var c=null;
switch(b.type){case "VIDEO":c={D:"div",Y:["ytp-ce-element","ytp-ce-video"],O:{tabindex:"0","aria-label":b.Rk||"","aria-hidden":"true"},J:[{D:"div",H:"ytp-ce-element-shadow"},{D:"div",H:"ytp-ce-covering-image",O:Q2(b)},{D:"div",H:"ytp-ce-covering-shadow-top"},{D:"a",H:"ytp-ce-covering-overlay",O:{href:R2(a,b.targetUrl),tabindex:"-1"},J:[{D:"div",Y:["ytp-ce-video-title","yt-ui-ellipsis","yt-ui-ellipsis-2"],O:{dir:g.Ln(b.title||"")},W:b.title},{D:"div",H:"ytp-ce-video-duration",W:b.videoDuration}]}]};
c=new g.R(c);break;case "PLAYLIST":c={D:"div",Y:["ytp-ce-element","ytp-ce-playlist"],O:{tabindex:"0","aria-label":b.Rk||"","aria-hidden":"true"},J:[{D:"div",H:"ytp-ce-element-shadow"},{D:"div",H:"ytp-ce-covering-image",O:Q2(b)},{D:"div",H:"ytp-ce-covering-shadow-top"},{D:"a",H:"ytp-ce-covering-overlay",O:{href:R2(a,b.targetUrl),tabindex:"-1"},J:[{D:"div",Y:["ytp-ce-playlist-title","yt-ui-ellipsis","yt-ui-ellipsis-2"],O:{dir:g.Ln(b.title||"")},W:b.title},{D:"div",H:"ytp-ce-playlist-count",J:[{D:"div",
H:"ytp-ce-playlist-icon"},{D:"div",H:"ytp-ce-playlist-count-text",W:b.playlistLength}]}]}]};c=new g.R(c);break;case "CHANNEL":c={D:"div",Y:["ytp-ce-element","ytp-ce-channel",b.isSubscribe?"ytp-ce-channel-this":"ytp-ce-channel-that"],O:{tabindex:"0","aria-label":b.Rk||"","aria-hidden":"true"},J:[{D:"div",H:"ytp-ce-element-shadow"},{D:"div",H:"ytp-ce-expanding-overlay",J:[{D:"div",H:"ytp-ce-expanding-overlay-hider"},{D:"div",H:"ytp-ce-expanding-overlay-background"},{D:"div",H:"ytp-ce-expanding-overlay-content",
J:[{D:"div",H:"ytp-ce-expanding-overlay-body",J:[{D:"div",H:"ytp-ce-expanding-overlay-body-padding",J:[{D:"a",Y:["ytp-ce-channel-title","ytp-ce-link"],O:{href:R2(a,b.targetUrl),target:"_blank",tabindex:"-1",dir:g.Ln(b.title||"")},W:b.title},b.subscribeButton?{D:"div",H:"ytp-ce-subscribe-container",J:[{D:"div",H:"ytp-ce-channel-subscribe"}]}:"",b.subscribersText?{D:"div",H:"ytp-ce-channel-subscribers-text",W:b.subscribersText}:"",b.metadata?{D:"div",Y:["ytp-ce-channel-metadata","yt-ui-ellipsis","yt-ui-ellipsis-3"],
W:b.metadata}:""]}]}]}]},{D:"div",H:"ytp-ce-expanding-image",O:Q2(b)}]};c=new g.R(c);var d=g.ae(document,"div","ytp-ce-channel-subscribe",c.element)[0];if(b.subscribeButton&&b.channelId){g.J(d,"ytp-ce-subscribe-button");if(a.player.N().o){var e=null;var f=b.Ob.itct}else e="endscreen",f=null;e=new g.yQ(b.subscribeButton.subscribeText,b.subscribeButton.subscribeCount,b.subscribeButton.unsubscribeText,b.subscribeButton.unsubscribeCount,b.subscribeButton.enabled,b.subscribeButton.classic,b.channelId,
!!b.subscribeButton.subscribed,e,f,b.subscribeButton.signinUrl,a.player);d.appendChild(e.element);a.I.push(e)}break;case "WEBSITE":c={D:"div",Y:["ytp-ce-element","ytp-ce-website"],O:{tabindex:"0","aria-label":b.Rk||"","aria-hidden":"true"},J:[{D:"div",H:"ytp-ce-element-shadow"},{D:"div",H:"ytp-ce-expanding-overlay",J:[{D:"div",H:"ytp-ce-expanding-overlay-hider"},{D:"div",H:"ytp-ce-expanding-overlay-background"},{D:"div",H:"ytp-ce-expanding-overlay-content",J:[{D:"div",H:"ytp-ce-expanding-overlay-body",
J:[{D:"div",H:"ytp-ce-expanding-overlay-body-padding",J:[{D:"div",H:"ytp-ce-website-title",O:{dir:g.Ln(b.title||"")},W:b.title},{D:"div",H:"ytp-ce-website-metadata",W:b.metadata},{D:"a",Y:["ytp-ce-website-goto","ytp-ce-link"],O:{href:R2(a,b.targetUrl),target:"_blank",tabindex:"-1"},W:b.callToAction}]}]}]}]},{D:"div",H:"ytp-ce-expanding-image",O:Q2(b)},{D:"div",H:"ytp-ce-expanding-icon",O:Bsa(b.iconUrl)}]};c=new g.R(c);break;case "CREATOR_MERCHANDISE":c="",b.productPrice&&(c={D:"div",H:"ytp-ce-merchandise-price-container",
J:[{D:"div",H:"ytp-ce-merchandise-price",W:b.productPrice}]},b.additionalFeesText&&c.J.push({D:"div",H:"ytp-ce-merchandise-additional-fees",W:b.additionalFeesText})),c={D:"div",Y:["ytp-ce-element","ytp-ce-merchandise"],O:{tabindex:"0","aria-label":b.Rk||"","aria-hidden":"true"},J:[{D:"div",H:"ytp-ce-element-shadow"},{D:"div",H:"ytp-ce-expanding-overlay",J:[{D:"div",H:"ytp-ce-expanding-overlay-hider"},{D:"div",H:"ytp-ce-expanding-overlay-background"},{D:"div",H:"ytp-ce-expanding-overlay-content",J:[{D:"div",
H:"ytp-ce-expanding-overlay-body",J:[{D:"div",H:"ytp-ce-expanding-overlay-body-padding",J:[{D:"div",H:"ytp-ce-merchandise-title",O:{dir:g.Ln(b.title||"")},W:b.title},c,{D:"div",H:"ytp-ce-merchandise-metadata",W:b.metadata},{D:"a",Y:["ytp-ce-merchandise-goto","ytp-ce-link"],O:{href:R2(a,b.targetUrl),target:"_blank",tabindex:"-1"},W:b.callToAction}]}]}]}]},{D:"div",H:"ytp-ce-expanding-image",O:Q2(b)},{D:"div",H:"ytp-ce-merchandise-invideo-cta-container",J:[{D:"div",H:"ytp-ce-merchandise-invideo-cta",
W:b.callToAction}]}]},c=new g.R(c)}b.gG&&g.J(c.element,"ytp-ce-placeholder");return c},Q2=function(a){if(a.Ow)var b=a.Ow.thumbnails;
return Bsa(b?b[b.length-1].url:null)},Bsa=function(a){return a?{style:"background-image: url("+a+")"}:{}},Asa=function(a,b,c){function d(){k(1)}
function e(){k(-1)}
b.ka("mouseenter",(0,g.x)(a.Xs,a,b,c));b.ka("mouseleave",(0,g.x)(a.au,a,b,c));a.player.N().o||b.ka("click",(0,g.x)(function(l){g.J(l.element,"ytp-ce-element-hover")},a,b));
b.ka("click",(0,g.x)(a.yA,a,c));b.ka("keypress",(0,g.x)(a.yA,a,c));b.ka("focus",(0,g.x)(function(l,m){this.Xs(l,m)},a,b,c));
b.ka("blur",(0,g.x)(function(l,m){this.au(l,m)},a,b,c));
b.ka("touchstart",(0,g.x)(a.Xs,a,b,c));var f=g.ce("ytp-ce-expanding-overlay-hider",b.element);f&&b.L(f,"touchstart",function(l){l=l||window.event;l.cancelBubble=!0;l.stopPropagation&&l.stopPropagation();g.Dn(b.element,"ytp-ce-element-hover");g.Dn(b.element,"ytp-ce-force-expand")});
b.ka("keydown",(0,g.x)(function(l,m){this.M=9==m.keyCode&&!m.shiftKey},a,b));
var k=(0,g.x)(function(l,m,n){this.G+=n;0<this.G?(g.J(l.element,"ytp-ce-force-expand"),S2(this,m.id,!0)):(g.Dn(l.element,"ytp-ce-force-expand"),g.Dn(l.element,"ytp-ce-element-hover"),S2(this,m.id,!1))},a,b,c);
c=(0,g.x)(function(l,m){m&&(l.ka("blur",g.Qa(function(){"none"!=m.style.display&&a.M&&m.focus()})),l.L(m,"focus",d),l.L(m,"blur",e))},a,b);
c(g.ce("ytp-sb-subscribe",b.element));c(g.ce("ytp-sb-unsubscribe",b.element));b.ka("focus",d);b.ka("blur",e)},R2=function(a,b){var c=a.player.N();
if(b){if(b.startsWith("//"))return c.protocol+":"+b;if(b.startsWith("/"))return g.tz(c)+b}else return"";return b},S2=function(a,b,c){a.w&&(c?a.C.show():a.C.hide());
for(var d in a.o)d!=b&&g.K(a.o[d].element,"ytp-ce-element-shadow-show",c)},T2=function(a,b,c){function d(){f||(e++,e==b.length&&(k.stop(),c&&c()))}
if(!b||0==b.length||O2(a))c&&c();else{b=Csa(a,b);var e=0,f=!1,k=new g.I(function(){f=!0;c&&c()},1E3,a);
k.start();for(a=0;a<b.length;a++)g.cr(b[a],d)}},U2=function(a,b,c){T2(a,b.clickUrls,c);
(a=g.ds())&&b.cG&&g.zs(a,b.visualElement)},Csa=function(a,b){var c=a.player.getVideoData().clientPlaybackNonce,d=a.player.getCurrentTime().toFixed(2);
c={CPN:c,AD_CPN:c,MT:d};d=[];for(var e=0;e<b.length;e++)d.push(Dsa(b[e],c));return d},Dsa=function(a,b){return a.replace(/%5B[a-zA-Z_:]+%5D|\[[a-zA-Z_:]+\]/g,function(c){var d=unescape(c);
d=d.substring(1,d.length-1);return b[d]?escape(b[d]):c})},Esa=function(a){return Array.isArray(a)&&a.length?a[0]:a},V2=function(a){return"string"===typeof a?a:""},W2=function(a,b,c){for(var d in b)if(b[d]==a)return a;
return c},Gsa=function(a){var b=Fsa;
if(null==a)return null;if(g.La(a)){var c=[];(0,g.y)(a,function(d){(d=b(d))&&c.push(d)});
return c}return(a=b(a))?[a]:[]},Hsa=function(a){this.externalId=a},Isa=function(a,b,c,d){this.value=a;
this.target=b;this.showLinkIcon=c;this.o=d},X2=function(a){if(!a)return null;
var b=g.wc(V2(a.value));b=g.uc(b);if(!b)return null;var c=W2(a.target,Jsa,"current");if(null==c)a=null;else{var d=a.show_link_icon;a=new Isa(b,c,"true"==d||"false"==d?"true"==d:!0,null!=a.pause_on_navigation?a.pause_on_navigation:!0)}return a},Y2=function(a){return a.value?a.value:null},Ksa=function(a,b,c,d){this.type=a;
this.trigger=b;this.url=c;this.subscribeData=d},Fsa=function(a){if(!a)return null;
var b=W2(a.type,Lsa),c=W2(a.trigger,Msa),d=Esa(a.url);d=X2(d?d:null);a=Esa(a.subscribeData);var e=a?a:null;e?(a=V2(e.external_user_id),e=V2(e.subscription_token),a=a&&e?new Hsa(a):null):a=null;return b?new Ksa(b,c,d,a):null},Z2=function(a,b,c,d,e){this.id=a;
this.type=b;this.style=c;this.o=d||[];this.data=e},Nsa=function(a,b){return g.Xa(a.o,b,void 0)},Osa=function(a,b){return a.id.replace(/[^a-z0-9-]/gi,"-")+"-"+b.toString()},Psa=function(a,b){this.merchant=a;
this.price=b},Qsa=function(a){this.o=a},Rsa=function(a,b,c){b&&(c?$2(a,(0,g.Cc)(b,g.Qa(function(d,e){return g.dn(e,d)},c))):$2(a,b))},$2=function(a,b,c,d){var e=1,f=-1;
if(c){var k=!1;var l=function(){e--;e||k||(clearTimeout(f),k=!0,c())};
f=setTimeout(function(){k=!0;c()},1E3)}(0,g.y)(b||[],function(m){e++;
g.cr(m,l)});
d&&(e++,0!=d&&a.o.sendVideoStatsEngageEvent(d,l))},Ssa=function(a,b,c,d,e,f,k){this.o=a;
this.w=b;this.A=c;this.videoData=d;this.logger=e;this.K=f;this.u=k},a3=function(a,b){this.o=a;
this.w=b},Vsa=function(a,b){var c=[];
(0,g.y)(b.choices,function(k){c.push(Tsa(b,k))},a);
var d={D:"ul",O:{role:"radiogroup"},J:c},e={};b.ej&&(e["aria-label"]=g.gM("$POLL_TITLE \u2013 Connectez-vous pour r\u00e9pondre au sondage.",{POLL_TITLE:b.title}));var f=["iv-card","iv-card-poll"];d=[{D:"div",H:"iv-card-content",J:[b3("h2",e,b.title),{D:"form",J:[{D:"fieldset",J:[d]}]}]}];b.ej&&(f.push("iv-card-unavailable"),d.push({D:"div",Y:["iv-card-sign-in"],J:[{D:"h2",W:"Vous voulez voter\u00a0?"},{D:"a",Y:["iv-card-sign-in-button","iv-button"],O:{href:Y2(b.ej)},J:[{D:"span",Y:["iv-button-content"],
W:"Se connecter"}]}]}));f=new g.R({D:"div",Y:f,J:d});d=f.element;Usa(b,d);vsa(a.o.o,d,g.Qa(a.A,b),a);(0,g.y)(g.be("iv-card-poll-choice-input",d),function(k){this.o.o.ka(k,"focus",g.Qa(this.u,!0));this.o.o.ka(k,"blur",g.Qa(this.u,!1))},a);
b.ej&&(d=g.ce("iv-card-sign-in-button",d),a.w(d,b.ej,b.id,b.Ob,b.Gc.click,5));return f},Wsa=function(a,b,c){var d=["yt-badge",
"standalone-ypc-badge-renderer-icon",b.eP?"standalone-ypc-badge-renderer-icon-purchased":"standalone-ypc-badge-renderer-icon-available"],e={};d=b.fG&&b.kw?{D:"span",Y:d,O:e,W:b.kw}:"";c={D:"div",Y:["iv-card",c],J:[{D:"a",H:"iv-click-target",O:{href:Y2(b.url)},J:[c3(b.jj,d?{D:"div",H:"iv-card-image-text",J:[d,b.priceText]}:""),{D:"div",H:"iv-card-content",J:[{D:"h2",H:"iv-card-primary-link",W:b.title},d3(a,b)]}]}]};c=new g.R(c);e3(a,g.be("iv-click-target",c.element),b,b.url);return c},f3=function(a){return a.customMessage?
b3("div","iv-card-message",a.customMessage):""},c3=function(a,b){var c="background-image: url("+a+");",d=[];
b&&d.push(b);return{D:"div",H:"iv-card-image",O:{style:c},J:d}},d3=function(a,b){if(!b.metaInfo||0==b.metaInfo.length)return"";
var c=[];(0,g.y)(b.metaInfo,function(d){c.push(b3("li","",d))},a);
return{D:"ul",H:"iv-card-meta-info",J:c}},Tsa=function(a,b){return{D:"li",
H:Osa(a,b.index),J:[{D:"label",J:[{D:"input",H:"iv-card-poll-choice-input",O:{type:"checkbox",role:"radio",name:a.id.replace(/[^a-z0-9-]/gi,"-")+b.index.toString(),value:b.index.toString(),"data-poll-choice-index":b.index.toString()}},{D:"span",H:"iv-card-poll-choice-text",J:[{D:"span",H:"iv-card-poll-choice-percent"},b3("span",void 0,b.desc)]}]},{D:"div",H:"iv-card-poll-result",J:[{D:"div",H:"iv-card-poll-result-bar"}]}]}},b3=function(a,b,c){b?"string"===typeof b?b={"class":b}:Array.isArray(b)&&
(b={"class":b.join(" ")}):b={};
b.dir=g.Ln(c);return{D:a,O:b,W:c}},Xsa=function(a){if(!a.customMessage)return"";
var b=["iv-card-action","iv-card-primary-link"],c={};a.qn&&(b.push("iv-card-action-icon"),c.style="background-image: url("+a.qn+");");c.dir=g.Ln(a.customMessage);var d=[{D:"span",W:a.customMessage}];a.showLinkIcon&&(d.push("\u00a0"),d.push({D:"span",H:"iv-card-link-icon"}));return{D:"div",Y:b,O:c,J:d}},Usa=function(a,b){var c=0;
(0,g.y)(a.choices,function(m){c+=m.count});
c=c||1;for(var d=0;d<a.choices.length;d++){var e=a.choices[d],f=g.ce(Osa(a,e.index),b);e=e.count/c;null==a.Ce&&(e=0);g.K(f.getElementsByTagName("label")[0],"iv-card-poll-choice-checked",a.Ce==d);f.getElementsByTagName("input")[0].checked=a.Ce==d;var k=Math.floor(100*e).toFixed(0),l=g.ce("iv-card-poll-choice-percent",f);g.ye(l,g.gM("$PERCENT\u00a0%",{PERCENT:k}));f=g.ce("iv-card-poll-result-bar",f);g.sh(f,"transform","scaleX("+e.toFixed(2)+")")}g.K(b,"iv-card-poll-voted",null!=a.Ce);g.K(b,"iv-card-poll-expanded",
null!=a.Ce&&1<a.choices.length)},e3=function(a,b,c,d){d&&(0,g.y)(b,function(e){this.w(e,d,c.id,c.Ob,c.Gc.click,5)},a)},Ysa=function(a){var b;
(b=a)&&!(b=1<a.length?"/"==a.charAt(0)&&"/"!=a.charAt(1):"/"==a)&&(b=a.replace(/^(https?:)?\/\//,""),b=b.split("/",1),b=!b||1>b.length||!b[0]?[]:b[0].toLowerCase().split(".").reverse(),b="com"==b[0]&&"youtube"==b[1]||"be"==b[0]&&"youtu"==b[1]);return b?-1==a.indexOf("/redirect?"):!1},Zsa=function(a,b){return b?b:Ysa(a)?"current":"new"},g3=function(a,b){g.A.call(this);
var c=this;this.Ka=a;this.context=b;this.dv=!1;this.ga=new Map;this.ma=new Map;this.context.K.addEventListener(g.lC("annotations_module"),function(d){(d=c.ga.get(d))&&d.apply(c)});
this.context.K.addEventListener("crx_annotations_module",function(d){(d=c.ma.get(d))&&d.apply(c)})},$sa=function(a,b,c,d,e){var f=Y2(b);
if(f){var k=Zsa(f,b.target),l=(0,g.x)(function(){b.o&&this.context.K.pauseVideo();var m=this.context.videoData.lc||!1,n=g.mq(f||"");m&&n&&(n.v||n.list)?g.rT(this.context.K.app,n.v,c,n.list,!1,void 0):g.GN(f||"","current"==k?"_top":void 0,c)},a);
"new"==k&&(l(),l=null);$2(a.context.logger,d,l,e);Ysa(f)||(a=g.ds(),d=c.itct,a&&d&&g.zs(a,g.Wr(d)))}},ata=function(a){if(a.urlEndpoint&&a.urlEndpoint.url)return a.urlEndpoint.url;
if(a.watchEndpoint&&a.watchEndpoint.videoId){var b="/watch?v="+a.watchEndpoint.videoId;a.watchEndpoint.playlistId&&(b+="&list="+a.watchEndpoint.playlistId);a.watchEndpoint.index&&(b+="&index="+a.watchEndpoint.index);a.watchEndpoint.startTimeSeconds&&(b+="&t="+a.watchEndpoint.startTimeSeconds);return b}return null},h3=function(a,b,c){return{Yx:(a.impressionLoggingUrlsV2s||[]).map(function(d){return d.baseUrl}),
click:(c.loggingUrls||[]).map(function(d){return d.baseUrl}),
close:(b.dismissLoggingUrlsV2s||[]).map(function(d){return d.baseUrl}),
qC:(b.impressionLoggingUrlsV2s||[]).map(function(d){return d.baseUrl}),
Vp:(b.clickLoggingUrlsV2s||[]).map(function(d){return d.baseUrl})}},k3=function(a,b,c){g3.call(this,b,c);
var d=this;this.u=a;this.aa=this.Ia=this.B=this.Ea=!1;this.ha=null;this.ba=new g.I(g.Ia,c.A.Wa?4E3:3E3);g.B(this,this.ba);this.za=new g.I(g.Ia);g.B(this,this.za);this.G=new a3(c,(0,g.x)(this.yk,this),(0,g.x)(this.Co,this));this.U=new g.R({D:"div",H:"iv-drawer",O:{id:"iv-drawer"},J:[{D:"div",H:"iv-drawer-header",O:{"aria-role":"heading"},J:[{D:"span",H:"iv-drawer-header-text"},{D:"button",Y:["iv-drawer-close-button","ytp-button"],O:{"aria-label":"Masquer les fiches",tabindex:"0"}}]},{D:"div",H:"iv-drawer-content"}]});
g.B(this,this.U);this.C=this.U.element;this.oa=new g.lN(this.U,330);g.B(this,this.oa);this.Ca=g.ce("iv-drawer-header-text",this.C);this.A=g.ce("iv-drawer-content",this.C);this.w=[];this.Aa=this.R=this.F=this.da=this.o=null;this.V=[];this.addCueRange(0,1E3*c.videoData.lengthSeconds,"",function(){d.Ia&&i3(d,"YOUTUBE_DRAWER_AUTO_OPEN")},function(){(d.Ia=d.B)&&j3(d)});
this.M=this.I=this.Z=null;this.P=0},bta=function(a,b){b.data.autoOpenMs&&a.addCueRange(b.data.autoOpenMs,0x8000000000000,"",function(){i3(a,"YOUTUBE_DRAWER_AUTO_OPEN")});
b.data.autoCloseMs&&a.addCueRange(b.data.autoCloseMs,0x8000000000000,"",function(){j3(a)});
var c=b.data.headerText;g.ye(a.Ca,c);a.R&&a.R.setAttribute("title",c);a.Z=g.Wr(b.data.trackingParams);a.M=g.Wr(b.data.closeTrackingParams);a.I=g.Wr(b.data.iconTrackingParams)},cta=function(a,b){var c=b.cardId?b.cardId:"cr:"+a.P;
if(b.content.simpleCardContentRenderer){if(!b.cueRanges.length)return;var d=b.content.simpleCardContentRenderer,e=b.teaser.simpleCardTeaserRenderer,f=b.icon?b.icon.infoCardIconRenderer:null;c={id:c,timestamp:a.P,type:"simple",teaserText:g.T(e.message),teaserDurationMs:parseInt(b.cueRanges[0].teaserDurationMs,10),startMs:parseInt(b.cueRanges[0].startCardActiveMs,10),autoOpen:!!b.autoOpen,Ob:l3(a,c,b,d),sponsored:!1,Gc:h3(d,e,d.command),de:d.trackingParams?g.Wr(d.trackingParams):null,Yd:e.trackingParams?
g.Wr(e.trackingParams):null,yd:f&&f.trackingParams?g.Wr(f.trackingParams):null,imageUrl:m3(d.image.thumbnails,290).url,displayDomain:d.displayDomain?g.T(d.displayDomain):null,showLinkIcon:!!d.showLinkIcon,qn:null,title:d.title?g.T(d.title):"",customMessage:d.callToAction?g.T(d.callToAction):"",url:d.command.urlEndpoint.url?X2({pause_on_navigation:!a.context.videoData.va,target:"new",value:d.command.urlEndpoint.url}):null};n3(a,c)}else if(b.content.collaboratorInfoCardContentRenderer){if(!b.cueRanges.length)return;
d=b.content.collaboratorInfoCardContentRenderer;e=b.teaser.simpleCardTeaserRenderer;f=b.icon?b.icon.infoCardIconRenderer:null;c={id:c,timestamp:a.P,type:"collaborator",teaserText:g.T(e.message),teaserDurationMs:parseInt(b.cueRanges[0].teaserDurationMs,10),startMs:parseInt(b.cueRanges[0].startCardActiveMs,10),autoOpen:!!b.autoOpen,Ob:l3(a,c,b,d),sponsored:!1,Gc:h3(d,e,d.endpoint),de:d.trackingParams?g.Wr(d.trackingParams):null,Yd:e.trackingParams?g.Wr(e.trackingParams):null,yd:f&&f.trackingParams?
g.Wr(f.trackingParams):null,channelId:d.endpoint.browseEndpoint.browseId,customMessage:d.customText?g.T(d.customText):null,wB:m3(d.channelAvatar.thumbnails,290).url,title:d.channelName?g.T(d.channelName):"",metaInfo:[d.subscriberCountText?g.T(d.subscriberCountText):""],url:X2({pause_on_navigation:!a.context.videoData.va,target:"new",value:d.endpoint.browseEndpoint.canonicalBaseUrl?d.endpoint.browseEndpoint.canonicalBaseUrl:"/channel/"+d.endpoint.browseEndpoint.browseId})};n3(a,c)}else if(b.content.playlistInfoCardContentRenderer){if(!b.cueRanges.length)return;
d=b.content.playlistInfoCardContentRenderer;e=b.teaser.simpleCardTeaserRenderer;f=b.icon?b.icon.infoCardIconRenderer:null;c={id:c,timestamp:a.P,type:"playlist",teaserText:g.T(e.message),teaserDurationMs:parseInt(b.cueRanges[0].teaserDurationMs,10),startMs:parseInt(b.cueRanges[0].startCardActiveMs,10),autoOpen:!!b.autoOpen,Ob:l3(a,c,b,d),sponsored:!1,Gc:h3(d,e,d.action),de:d.trackingParams?g.Wr(d.trackingParams):null,Yd:e.trackingParams?g.Wr(e.trackingParams):null,yd:f&&f.trackingParams?g.Wr(f.trackingParams):
null,jj:m3(d.playlistThumbnail.thumbnails,258).url,customMessage:d.customMessage?g.T(d.customMessage):null,playlistVideoCount:g.T(d.playlistVideoCount),title:d.playlistTitle?g.T(d.playlistTitle):"",metaInfo:[d.channelName?g.T(d.channelName):"",d.videoCountText?g.T(d.videoCountText):""],url:X2({pause_on_navigation:!a.context.videoData.va,target:"new",value:ata(d.action)})};n3(a,c)}else if(b.content.videoInfoCardContentRenderer){if(!b.cueRanges.length)return;d=b.content.videoInfoCardContentRenderer;
e=b.teaser.simpleCardTeaserRenderer;f=b.icon?b.icon.infoCardIconRenderer:null;c={id:c,timestamp:a.P,type:"video",teaserText:g.T(e.message),teaserDurationMs:parseInt(b.cueRanges[0].teaserDurationMs,10),startMs:parseInt(b.cueRanges[0].startCardActiveMs,10),autoOpen:!!b.autoOpen,Ob:l3(a,c,b,d),sponsored:!1,Gc:h3(d,e,d.action),de:d.trackingParams?g.Wr(d.trackingParams):null,Yd:e.trackingParams?g.Wr(e.trackingParams):null,yd:f&&f.trackingParams?g.Wr(f.trackingParams):null,jj:m3(d.videoThumbnail.thumbnails,
258).url,videoDuration:d.lengthString?g.T(d.lengthString):null,customMessage:d.customMessage?g.T(d.customMessage):null,title:d.videoTitle?g.T(d.videoTitle):"",metaInfo:[d.channelName?g.T(d.channelName):"",d.viewCountText?g.T(d.viewCountText):""],isLiveNow:!!d.badge,url:X2({pause_on_navigation:!a.context.videoData.va,target:"new",value:ata(d.action)})};n3(a,c)}a.P++},m3=function(a,b){for(var c=-1,d=-1,e=0;e<a.length;e++){if(a[e].height==b||290==a[e].width)return a[e];
((a[e].height||0)<b||290>(a[e].width||0))&&(0>c||(a[c].height||0)<(a[e].height||0)||(a[c].width||0)<(a[e].width||0))?c=e:((a[e].height||0)>=b||290<=(a[e].width||0))&&(0>d||(a[d].height||0)>(a[e].height||0)||(a[d].width||0)>(a[e].width||0))&&(d=e)}return a[0<=d?d:c]},l3=function(a,b,c,d){return{feature:c.feature?c.feature:"cards",
src_vid:a.context.videoData.videoId,annotation_id:b,ei:a.context.videoData.eventId,itct:d.trackingParams}},eta=function(a,b){var c=dta(a,b);
c&&(c==a.o&&(a.o=null),a.u.removeCueRange(c.card.id),g.te(c.er),g.db(a.w,c),a.un(),o3(a))},i3=function(a,b,c){if(!a.B){a.oa.show();
a.da=new g.I(function(){g.J(a.context.K.getRootNode(),g.lM.IV_DRAWER_OPEN)},0);
a.da.start();a.ha=g.Ep(a.A,"mousewheel",(0,g.x)(a.OL,a));a.B=!0;var d=g.ds();d&&a.Z&&a.M&&B2(d,[a.Z,a.M]);var e={TRIGGER_TYPE:b};(0,g.y)(a.w,function(f){f.Cy||(f.Cy=!0,Rsa(a.context.logger,f.card.Gc.Yx,e));d&&B2(d,[f.card.de])});
A2(a.u);c&&(a.F=new g.I(function(){a.wa=a.R;a.Aa.focus()},330),a.F.start())}},j3=function(a){a.B&&(a.oa.hide(),g.Fp(a.ha),a.ha=null,g.Dn(a.context.K.getRootNode(),g.lM.IV_DRAWER_OPEN),a.B=!1,A2(a.u),a.F&&a.F.stop(),a.F=new g.I(function(){a.wa&&(a.wa.focus(),a.wa=null)},330),a.F.start())},fta=function(a){var b=g.ce("iv-drawer-close-button",a.C);
a.context.o.ka(b,"click",a.iE,a);a.context.o.ka(a.A,"touchend",function(){a.ba.start()});
a.context.o.ka(a.A,"scroll",a.yE,a);a.context.u.subscribe("onHideControls",function(){a.aa=!0});
a.context.u.subscribe("onShowControls",function(){a.aa=!1});
a.context.u.subscribe("onVideoAreaChange",function(){a.aa=g.Bn(a.u.getRootNode(),"ytp-autohide")});
a.V.push(g.Oo("iv-button-shown",a.oG,a));a.V.push(g.Oo("iv-button-hidden",a.nG,a));a.V.push(g.Oo("iv-teaser-shown",a.rG,a));a.V.push(g.Oo("iv-teaser-hidden",a.qG,a));a.V.push(g.Oo("iv-teaser-clicked",a.pG,a))},n3=function(a,b){a.Ea||(g.Cn(a.ua(),[g.lM.STOP_EVENT_PROPAGATION,
"iv-drawer-manager"]),g.iL(a.u,a.C,5),fta(a),a.R=g.ce("ytp-cards-button",a.u.getRootNode()),a.Aa=g.ce("iv-drawer-close-button",a.C),a.Ea=!0);eta(a,b.id);var c=gta(a,b);if(c){var d={card:b,er:c.element,Cy:!1},e=hta(a,d);g.kb(a.w,e,0,d);c.ca(a.A,e);a.un();b.autoOpen?a.addCueRange(b.startMs,0x8000000000000,b.id,g.Qa(a.vO,d)):(c=1E3*a.context.K.getCurrentTime(),5E3>c&&c>b.startMs&&a.bC(d),a.addCueRange(b.startMs,b.startMs+1,b.id,g.Qa(a.bC,d)),o3(a))}},gta=function(a,b){switch(b.type){case "simple":var c=
a.G;
var d=b.displayDomain?{D:"div",H:"iv-card-image-text",W:b.displayDomain}:"";var e=Xsa(b);d={D:"div",Y:["iv-card"],J:[{D:"a",H:"iv-click-target",O:{href:Y2(b.url)},J:[c3(b.imageUrl,d),{D:"div",H:"iv-card-content",J:[b3("h2",void 0,b.title),e]}]}]};d=new g.R(d);e3(c,g.be("iv-click-target",d.element),b,b.url);return d;case "collaborator":return c=a.G,d={D:"div",Y:["iv-card","iv-card-channel"],J:[{D:"a",Y:["iv-click-target"],O:{href:Y2(b.url),"data-ytid":b.channelId},J:[c3(b.wB),{D:"div",H:"iv-card-content",
J:[f3(b),{D:"h2",H:"iv-card-primary-link",W:b.title},d3(c,b)]}]}]},d=new g.R(d),e3(c,g.be("iv-click-target",d.element),b,b.url),d;case "episode":return Wsa(a.G,b,"iv-card-episode");case "movie":return Wsa(a.G,b,"iv-card-movie");case "playlist":return c=a.G,d={D:"div",Y:["iv-card","iv-card-playlist"],J:[{D:"a",H:"iv-click-target",O:{href:Y2(b.url)},J:[c3(b.jj,{D:"div",H:"iv-card-image-overlay",J:[{D:"span",H:"iv-card-playlist-video-count",W:b.playlistVideoCount}]}),{D:"div",H:"iv-card-content",J:[f3(b),
b3("h2","iv-card-primary-link",b.title),d3(c,b)]}]}]},d=new g.R(d),e3(c,g.be("iv-click-target",d.element),b,b.url),d;case "poll":return Vsa(a.G,b);case "productListing":c=a.G;var f=!g.ab(b.offers);d=["iv-card"];e="";var k=Xsa(b);f&&(d.push("iv-card-product-listing"),e="iv-card-primary-link",f=b.offers[0],k=[],f.price&&k.push({D:"div",H:"iv-card-offer-price",W:f.price}),f.merchant&&k.push({D:"div",H:"iv-card-offer-merchant",W:f.merchant}),k={D:"div",J:k});d={D:"div",Y:d,O:{tabindex:"0"},J:[{D:"a",
Y:["iv-card-image","iv-click-target"],O:{style:"background-image: url("+b.imageUrl+");",href:Y2(b.url),"aria-hidden":"true",tabindex:"-1"}},{D:"div",H:"iv-card-content",J:[b.sponsored?{D:"div",H:"iv-card-sponsored",J:["Lien commercial",{D:"div",H:"iv-ad-info-container",J:[{D:"div",H:"iv-ad-info",W:"{{adInfo}}"},{D:"div",H:"iv-ad-info-icon-container",J:[{D:"div",H:"iv-ad-info-icon"},{D:"div",H:"iv-ad-info-callout"}]}]}]}:"",{D:"a",H:"iv-click-target",O:{href:Y2(b.url)},J:[b3("h2",e,b.title),k]}]}]};
d=new g.R(d);e=g.oe("span");g.ye(e,"Vous voyez ce produit, car nous pensons qu'il est pertinent pour la vid\u00e9o. Il se peut que le marchand r\u00e9mun\u00e8re Google.");d.qb(e,"adInfo");e3(c,g.be("iv-click-target",d.element),b,b.url);return d;case "video":return c=a.G,d=b.isLiveNow?{D:"span",Y:["yt-badge","yt-badge-live"],W:"EN DIRECT MAINTENANT"}:"",d={D:"div",Y:["iv-card","iv-card-video"],J:[{D:"a",H:"iv-click-target",O:{href:Y2(b.url)},J:[c3(b.jj,b.videoDuration?{D:"span",H:"iv-card-video-duration",
W:b.videoDuration}:""),{D:"div",H:"iv-card-content",J:[f3(b),b3("h2","iv-card-primary-link",b.title),d3(c,b),d]}]}]},d=new g.R(d),e3(c,g.be("iv-click-target",d.element),b,b.url),d}return null},hta=function(a,b){if(0==a.w.length)return 0;
var c=g.Ya(a.w,function(d){return b.card.startMs>d.card.startMs||b.card.startMs==d.card.startMs&&b.card.timestamp>=d.card.timestamp?!0:!1});
return-1==c?0:c+1},ita=function(a){return a.o?"productListing"==a.o.card.type:(0,g.ti)(a.w,function(b){return"productListing"==b.card.type})},o3=function(a){g.K(a.u.getRootNode(),"ytp-cards-shopping-active",ita(a))},jta=function(a,b){if(a.U.Ha()){var c=new G2([0,
a.A.scrollTop],[0,b.er.offsetTop],600,psa);a.context.w.ka(c,"animate",function(d){a.A.scrollTop=d.y});
a.context.w.ka(c,"finish",function(d){a.A.scrollTop=d.y});
c.play()}else g.Qu(a.U,!0),a.A.scrollTop=b.er.offsetTop,g.Qu(a.U,!1)},p3=function(a){return a.o&&a.o.card?a.o.card:a.w[0]&&a.w[0].card?a.w[0].card:null},dta=function(a,b){return g.Xa(a.w,function(c){return c.card.id==b})},q3=function(a,b,c){g3.call(this,a,b);
this.annotation=c;this.isActive=!1},kta=function(a){var b=a.annotation.data;
"start_ms"in b&&"end_ms"in b&&a.addCueRange(a.annotation.data.start_ms,a.annotation.data.end_ms,a.annotation.id,function(){a.show()},function(){a.hide()})},r3=function(a,b,c){q3.call(this,a,b,c);
this.u=null;this.F=!1;this.w=null;this.A=!1;this.o=this.C=this.B=null},s3=function(a,b,c){q3.call(this,a,b,c);
this.I=this.B=this.P=!1;this.F=5E3;this.A=null;this.G=g.ne("DIV","iv-promo-contents");this.u=this.w=this.o=null;this.C=new g.I(function(){this.o.setAttribute("aria-hidden",!0);g.Oh(this.w,!1);g.Oh(this.u,!0)},700,this);
g.B(this,this.C)},lta=function(a){var b=a.annotation.data;
if("cta"==a.annotation.style)var c=6;else if("video"==a.annotation.style||"playlist"==a.annotation.style)c=7;a.F=b.collapse_delay_ms||a.F;var d=["iv-promo","iv-promo-inactive"];a.ua().setAttribute("aria-hidden",!0);a.ua().setAttribute("aria-label","Promotion");a.ua().tabIndex=0;var e=a.annotation.jc(),f=b.image_url;if(f){var k=g.ne("DIV",["iv-promo-img","iv-click-target"]);f=g.ne("IMG",{src:f,"aria-hidden":"true"});k.appendChild(f);b.video_duration&&!b.is_live?(f=g.ne("SPAN","iv-promo-video-duration",
b.video_duration),k.appendChild(f)):b.playlist_length&&(f=g.ne("SPAN","iv-promo-playlist-length",b.playlist_length.toString()),k.appendChild(f));e&&a.yk(k,e,a.annotation.id,b.session_data,void 0,c)}e?(f=g.ne("A","iv-promo-txt"),g.Yc(f,Y2(e)),a.o=f):a.o=g.ne("DIV","iv-promo-txt");switch(a.annotation.style){case "cta":case "website":var l=g.ne("P",null,g.ne("STRONG",null,b.text_line_1));var m=g.ne("P",null,g.ne("SPAN","iv-promo-link",b.text_line_2));if(f=b.text_line_3){d.push("iv-promo-website-card-cta-redesign");
g.P(a.context.A.experiments,"web_action_cta_larger_ui")&&d.push("iv-promo-website-card-cta-larger-ui");var n=g.ne("BUTTON",["iv-promo-round-expand-icon","ytp-button"]);f=g.ne("BUTTON",["iv-button","iv-promo-button"],g.ne("SPAN","iv-button-content",f));var p=g.ne("DIV","iv-promo-button-container");p.appendChild(f);e&&a.yk(a.ua(),e,a.annotation.id,b.session_data,void 0,c)}g.J(a.o,"iv-click-target");e&&a.yk(a.o,e,a.annotation.id,b.session_data,void 0,c);break;case "playlist":case "video":l=g.ne("P",
null,g.ne("SPAN",null,b.text_line_1)),m=g.ne("P",null,g.ne("STRONG",null,b.text_line_2)),b.is_live&&(l=m,m=g.ne("SPAN",["yt-badge","iv-promo-badge-live"],"EN DIRECT MAINTENANT")),g.J(a.o,"iv-click-target"),e&&a.yk(a.o,e,a.annotation.id,b.session_data,void 0,c),d.push("iv-promo-video")}l&&a.o.appendChild(l);m&&a.o.appendChild(m);a.G.appendChild(a.o);p&&a.G.appendChild(p);c=g.ne("DIV","iv-promo-actions");a.u=g.ne("BUTTON",["iv-promo-expand","ytp-button"]);a.u.title="Agrandir";a.context.o.ka(a.u,"click",
g.Qa(a.hs,5E3),a);c.appendChild(a.u);g.Oh(a.u,!1);a.context.o.ka(a.ua(),"mouseover",a.xF,a);a.context.o.ka(a.ua(),"mouseout",a.wF,a);a.context.o.ka(a.ua(),"touchend",g.Qa(a.hs,5E3),a);a.w=g.ne("BUTTON",["iv-promo-close","ytp-button"]);a.w.title="Fermer";a.context.o.ka(a.w,"click","cta"==a.annotation.style&&b.text_line_3?a.pF:a.oF,a);c.appendChild(a.w);g.Cn(a.ua(),d);k&&(a.ua().appendChild(k),n&&k.appendChild(n));a.ua().appendChild(a.G);a.ua().appendChild(c)},mta=function(a){a.B||a.I||a.A||(g.J(a.ua(),
"iv-promo-collapsed"),a.B=!0,a.C.start())},nta=function(a){a.C.stop();
a.B&&(g.En(a.ua(),["iv-promo-collapsed","iv-promo-collapsed-no-delay"]),a.B=!1,a.o&&a.o.removeAttribute("aria-hidden"),g.Oh(a.u,!1),g.Oh(a.w,!0))},ota=function(a,b){a.A||(a.A=g.Uf(function(){t3(this);
mta(this)},b,a))},t3=function(a){a.A&&(g.v.clearTimeout(a.A),a.A=null)},u3=function(a){g.vL.call(this,a);
this.P=!1;this.I=0;this.F={};this.V=new Qsa(a);this.B=new g.Gr(this);g.B(this,this.B);this.C=this.w=null;this.B.L(this.player,"onVideoAreaChange",(0,g.x)(this.S,this,"onVideoAreaChange"));this.B.L(this.player,"onHideControls",(0,g.x)(this.S,this,"onHideControls"));this.B.L(this.player,"onShowControls",(0,g.x)(this.S,this,"onShowControls"));this.B.L(this.player,"resize",(0,g.x)(this.S,this,"resize"));this.B.L(this.player,"presentingplayerstatechange",(0,g.x)(this.S,this,"presentingplayerstatechange"));
this.subscribe("presentingplayerstatechange",this.lM,this);this.subscribe("resize",this.pp,this);this.player.N().I.subscribe("vast_info_card_add",this.iB,this);this.U=new g.Gr(this);g.B(this,this.U);this.R=g.ne("DIV","video-custom-annotations");this.u=new g.R({D:"div",Y:["ytp-player-content","ytp-iv-player-content"]});g.B(this,this.u);g.iL(this.player,this.u.element,4);this.u.hide();this.A=new g.R({D:"div",Y:["ytp-iv-video-content"]});g.B(this,this.A);g.qe(this.A.element,g.ne("DIV","video-annotations",
this.R));this.G=this.o=null;this.M=[];pta(this)&&this.load();var b=g.oe("STYLE");(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(b);g.Ge(this,function(){g.te(b)});
if(a=b.sheet)a.insertRule(".iv-promo .iv-promo-contents .iv-promo-txt .iv-promo-link:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUBAMAAAB/pwA+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAHlBMVEVMaXH////////////////////////////////////Z6AnKAAAACXRSTlMA+/A2IuI1mJIldm0CAAAAAWJLR0QB/wIt3gAAAEVJREFUCNdjYGCYCQUMBJlACOIzIDElIcyZkwxgojOVWWDMSQauMKYySySUOSnBdSaUOZ0lEsac2YqwYiZ+JhwgM7E5HACgzVCI/YJ59AAAAABJRU5ErkJggg==) no-repeat center;background-size:10px;width:10px;height:10px}",
0),a.insertRule(".iv-promo .iv-promo-actions .iv-promo-close:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEVMaXH///////////////////////////////////////////9tKdXLAAAAC3RSTlMAVaQDpaimqQbl5rjXUFUAAAABYktHRAH/Ai3eAAAAPUlEQVQI12MQMmAwEmDwDmaOTmAw39663YCBuXp2MQMDQ+fOBgYG5ujVwQwMptvbgeLaxczVCQwiBgxmAgBkXg1FN5iwiAAAAABJRU5ErkJggg==) no-repeat center;background-size:9px;width:9px;height:9px}",
0),a.insertRule(".iv-promo .iv-promo-actions .iv-promo-expand:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAJBAMAAADnQZCTAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEVMaXHMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMz////eMKB4AAAAC3RSTlMAOpE7k5Uvj5kpfRaQSaQAAAABYktHRAsf18TAAAAAHklEQVQI12MQYGBQZmBwTWCo0GSo6AKRQDZQRIABADXXA/UkIpvtAAAAAElFTkSuQmCC) no-repeat center;background-size:4px 9px;width:4px;height:9px}",0),a.insertRule(".iv-promo-website-card-cta-redesign .iv-promo-round-expand-icon:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfgCgUUEztsNfqrAAAAXklEQVRYw+3Uuw2AQAwEUUNXfBpDIvBRMhQwJJAScNrA0r4CdiQHjjAzK4NGKucPAFmCnZcmwcTphBNO9CTGH4VB+/Zm6YlYis9fhedXz38FNvFriCCl808iw8ysrBu65gCeuV/CfgAAAABJRU5ErkJggg==) no-repeat center;background-size:18px 18px;width:18px;height:18px}",
0),a.insertRule(".iv-card-link-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASBAMAAACk4JNkAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEVMaXG7u7u7u7u7u7u7u7u7u7u7u7v///+WKTAlAAAABnRSTlMAFdQWbGj9GiOuAAAAAWJLR0QHFmGI6wAAAEhJREFUCNdjYACBNCBgQGMxMKrBWEJJaRAJRjVlKEsoSQDIAqtSZICwgEIQFkgIZBRECMxiBqsCsVjAqsCygQwwFgMeFgQgswBg2xjLrfC4mgAAAABJRU5ErkJggg==) no-repeat center;background-size:9px;width:9px;height:9px}",0),a.insertRule(".iv-card-playlist-video-count:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEVMaXH///////////////////////////////////////////9tKdXLAAAAC3RSTlMAvDeyLvxYtDK9Ogx4T1QAAAABYktHRAH/Ai3eAAAAK0lEQVQY02NgoBjshgO8HJoYwKiAMGAD92YHJM7uMCTO9gaEHs4FlPuZAQC8Fj8x/xHjxwAAAABJRU5ErkJggg==) no-repeat center;background-size:24px;width:24px;height:24px}",
0),a.insertRule(".iv-drawer-close-button:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAgMAAAArG7R0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEVMaXH////////OZTV/AAAAAnRSTlMAoKBFbtAAAAABYktHRAH/Ai3eAAAAKUlEQVQI12MIYGBlSGGQBMIUBjbHCQyM0xwYGDIZwBjEBomB5EBqgGoBolQGzYuy51cAAAAASUVORK5CYII=) no-repeat center;background-size:12px;width:12px;height:12px}",0),a.insertRule(".iv-ad-info-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAMAAACecocUAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAVFBMVEVMaXGUlJSYmJiZmZmYmJiXl5eZmZmZmZmWlpaVlZWOjo6ZmZmSkpKXl5eYmJiYmJiZmZmZmZmZmZmZmZmYmJiJiYmXl5eZmZmYmJiWlpaZmZn///+81lbeAAAAGnRSTlMAE5DM80DliTMMEjccWIM5p1UjaTQNgB5cLlr5mgUAAAABYktHRBsCYNSkAAAAVElEQVQI102NRw7AIBADhw7ppIf/PzQLJ/ZgWSNrFlDaWKMVcs6HmGLwTqjEME6CFDrAXBYIGhNh3TJEg02wHydctvFc7sbrvnXZV8/zfs3T+7u/P7CrAso35YfPAAAAAElFTkSuQmCC) no-repeat center;background-size:11px;width:11px;height:11px}",
0),a.insertRule(".annotation-close-button {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEVMaXEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/Pz9aWloBAQGZmZlbW1v///+X9wUzAAAACHRSTlMANprf+g6lyRmB9hUAAAABYktHRA5vvTBPAAAAWUlEQVQI12NgYBAycVZkAIKwDiBIZWBgrQAx2gMY2DrAIIFBomPWju6VHY0MGh1rbu891dHEYNGx9+yd2x3NDB4d3XfO7uhoQTDgUnDFcO1wA+FWwC2FOQMAdKg6tUSAFEAAAAAASUVORK5CYII=) no-repeat center}",0),a.insertRule(".annotation-link-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAMAAAANmfvwAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAUVBMVEVMaXH////////////////////////////////////////////////////////////////////////////////////////////////////////JzkR1AAAAGnRSTlMAfXf+c3xsdGdv/GJoXPtXXflSVk5L7DBH9VeFfsQAAAABYktHRAH/Ai3eAAAAgElEQVQ4y93SSQ6AIAwFULSOOOJs739Qf9SF0VA2uNCu+psHaQJK7cVCqY+Rg92PXA++Q84KnCR03UIRJrFEKMEgZYFQhpyzQHSBWJJAdIVUENtJ3SC0mu3EdOh7zXZiBrRdzQLJ0Y1GfOlpVstD3HaZktX9X/gvRCxvxL6FR7IBS1RTM5xIpLoAAAAASUVORK5CYII=) no-repeat center}",
0)},qta=function(){var a=g.ne("DIV",["annotation",
"annotation-type-custom"]);g.Oh(a,!1);return a},rta=function(a){switch(a){case "annotation-editor":case "live-dashboard":return!0}return!1},pta=function(a){var b=a.player.N();
a=a.player.getVideoData();return 1==(b.annotationsLoadPolicy||a.annotationsLoadPolicy)&&!a.SC||b.I.get(a.videoId)||g.KB(a)||g.LB(a)?!0:!1},sta=function(a,b,c){a.P=!0;
a.C=g.Eq(b,c)},tta=function(a,b){for(var c={},d=0;d<b.attributes.length;d++){var e=b.attributes[d];
c[e.name]=e.nodeValue}for(d=0;d<b.childNodes.length;d++)if(e=b.childNodes[d],g.Na(e)&&1==e.nodeType){if(c[e.tagName])var f=c[e.tagName];else if("data"==e.tagName){0<e.childNodes.length&&(f=e.childNodes[0].nodeValue,c[e.tagName]="string"==typeof f?f.trim():f);continue}else f=[],c[e.tagName]=f;e&&"TEXT"==e.tagName?1==e.childNodes.length&&3==e.childNodes[0].nodeType?f.push(e.childNodes[0].nodeValue):f.push(""):e&&f.push(tta(a,e))}return c},uta=function(a,b,c){return!(a.loaded&&a.I==b&&a.player.getVideoData().videoId==
c)},xta=function(a){var b=a.player.getVideoData();
if(b.be){var c=a.player.N().I.get(b.videoId);if(c){var d={format:"XML",Zd:{},method:"POST",withCredentials:!0};d.Fc=(0,g.x)(function(e,f,k){uta(this,e,f)||(e=g.yq(k)&&k.responseXML?k.responseXML:null)&&v3(this,e)},a,a.I,b.videoId);
g.Vp()&&(d.Fc=vta(a,d.Fc));d.sb={ic_only:"1"};wta(d,c);a.P=!0;g.Eq(b.be,d)}}},wta=function(a,b){a.method="POST";
a.sb=a.sb||{};b.zn&&(a.sb.ic_coll=b.zn);b.An&&(a.sb.ic_xml=b.An);b.Pm&&(a.sb.ic_track=b.Pm)},yta=function(a){var b=new g.R({D:"div"});
g.Oh(b.element,!1);var c=new k3(a.player,b.element,w3(a));g.B(c,b);b.ca(a.u.element);c.Em();return c},w3=function(a){if(!a.G){var b=new J2(a);
g.B(a,b);var c=new g.C1(a);g.B(a,c);a.G=new Ssa(b,c,a.player.N(),a.player.getVideoData(),a.V,a.player,a.Oh)}return a.G},v3=function(a,b){var c=!1,d=b.getElementsByTagName("annotations");
if(d&&!(1>d.length)&&(d=d[0].getAttribute("itct"))){var e=g.ds();if(e){var f=g.bs();f&&g.ts(g.xo("use_default_events_client")?void 0:g.Qq,e,f,[g.Wr(d)])}}d=b.getElementsByTagName("annotation");for(e=0;e<d.length;e++){var k=tta(a,d[e]);f=null;try{if(k){var l=k.id,m=/.+/;var n="string"===typeof l&&null!=m&&null!=l&&l.match(m)?l:"";var p=W2(k.type,zta),t=W2(k.style,Ata),u=V2(k.data),z=0!=u.length?JSON.parse(u):{},C=Gsa(k.action);f=n&&p?new Z2(n,p,t,C,z):null}else f=null}catch(fa){}if(f){a:{switch(f.type){case "branding":case "promotion":k=
!0;break a}k=!1}if(k){k=a;m=f;var D=qta(),E=null;switch(m.type){case "branding":if(k.player.N().Ca)break;k.u.element.appendChild(D);E=new r3(D,w3(k),m);break;case "promotion":g.iL(k.player,D,4),E=new s3(D,w3(k),m)}E&&E.Em();if(k=E)g.B(a,k),a.F[f.id]=k}else if("card"==f.type||"drawer"==f.type){a.o||(a.o=yta(a),g.B(a,a.o));if("card"==f.type){if(c=a.o,E=f&&f.data&&f.data.card_type)switch(k=f.data.tracking||{},k={Yx:k.impression,click:k.click,close:k.close,qC:k.teaser_impression,Vp:k.teaser_click},m=
f.data.tracking_params||{},D=null,E){case "collaborator":f={id:f.id,timestamp:f.data.timestamp||0,type:f.data.card_type,teaserText:f.data.teaser_text,teaserDurationMs:f.data.teaser_duration_ms,startMs:f.data.start_ms,autoOpen:f.data.auto_open||!1,Ob:f.data.session_data||{},sponsored:f.data.sponsored||!1,Gc:k,de:m.card?g.Wr(m.card):null,Yd:m.teaser?g.Wr(m.teaser):null,yd:m.icon?g.Wr(m.icon):null,channelId:f.data.channel_id,customMessage:f.data.custom_message?f.data.custom_message:null,wB:f.data.image_url,
title:f.data.title,metaInfo:f.data.meta_info,url:X2({pause_on_navigation:f.data.pause_on_navigation,target:f.data.target||"new",value:f.data.url})};n3(c,f);break;case "episode":case "movie":f={id:f.id,timestamp:f.data.timestamp||0,type:f.data.card_type,teaserText:f.data.teaser_text,teaserDurationMs:f.data.teaser_duration_ms,startMs:f.data.start_ms,autoOpen:f.data.auto_open||!1,Ob:f.data.session_data||{},sponsored:f.data.sponsored||!1,Gc:k,de:m.card?g.Wr(m.card):null,Yd:m.teaser?g.Wr(m.teaser):null,
yd:m.icon?g.Wr(m.icon):null,jj:f.data.image_url,kw:f.data.badge_symbol||"",priceText:f.data.price_text||"",title:f.data.title,metaInfo:f.data.meta_info,fG:!!f.data.is_paygated,eP:!!f.data.user_has_entitlement,url:X2({target:f.data.target||"new",value:f.data.url})};n3(c,f);break;case "playlist":f={id:f.id,timestamp:f.data.timestamp||0,type:f.data.card_type,teaserText:f.data.teaser_text,teaserDurationMs:f.data.teaser_duration_ms,startMs:f.data.start_ms,autoOpen:f.data.auto_open||!1,Ob:f.data.session_data||
{},sponsored:f.data.sponsored||!1,Gc:k,de:m.card?g.Wr(m.card):null,Yd:m.teaser?g.Wr(m.teaser):null,yd:m.icon?g.Wr(m.icon):null,jj:f.data.image_url,playlistVideoCount:f.data.playlist_video_count,customMessage:f.data.custom_message?f.data.custom_message:null,title:f.data.title,metaInfo:f.data.meta_info,url:X2({pause_on_navigation:f.data.pause_on_navigation,target:f.data.target||"new",value:f.data.url})};n3(c,f);break;case "poll":f={id:f.id,timestamp:f.data.timestamp||0,type:f.data.card_type,teaserText:f.data.teaser_text,
teaserDurationMs:f.data.teaser_duration_ms,startMs:f.data.start_ms,autoOpen:f.data.auto_open||!1,Ob:f.data.session_data||{},sponsored:f.data.sponsored||!1,Gc:k,de:m.card?g.Wr(m.card):null,Yd:m.teaser?g.Wr(m.teaser):null,yd:m.icon?g.Wr(m.icon):null,title:f.data.title,choices:f.data.choices,Ce:f.data.hasOwnProperty("old_vote")?f.data.old_vote:null,ej:f.data.signin_url?X2({target:"current",value:f.data.signin_url}):null,pP:f.data.hasOwnProperty("xsrf_token")?f.data.xsrf_token:null};n3(c,f);break;case "productListing":f.data.signin_url&&
(D=X2({target:"current",value:f.data.signin_url}));E=[];for(var F=f.data.offers||[],G=0;G<F.length;G++)E.push(new Psa(g.fd(F[G].merchant),g.fd(F[G].price)));f={yT:!1,id:f.id,timestamp:f.data.timestamp||0,type:f.data.card_type,teaserText:f.data.teaser_text,teaserDurationMs:f.data.teaser_duration_ms,startMs:f.data.start_ms,autoOpen:f.data.auto_open||!1,Ob:f.data.session_data||{},sponsored:f.data.sponsored||!1,Gc:k,de:m.card?g.Wr(m.card):null,Yd:m.teaser?g.Wr(m.teaser):null,yd:m.icon?g.Wr(m.icon):null,
imageUrl:f.data.image_url,displayDomain:f.data.display_domain?f.data.display_domain:null,showLinkIcon:!!f.data.show_link_icon,qn:f.data.button_icon_url?f.data.button_icon_url:null,title:f.data.title,customMessage:f.data.custom_message?f.data.custom_message:null,url:X2({pause_on_navigation:f.data.pause_on_navigation,target:f.data.target||"new",value:f.data.url}),ej:D,VT:f.data.signin_title?f.data.signin_title:null,UT:f.data.signin_message?f.data.signin_message:null,offers:E};n3(c,f);break;case "simple":f=
{id:f.id,timestamp:f.data.timestamp||0,type:f.data.card_type,teaserText:f.data.teaser_text,teaserDurationMs:f.data.teaser_duration_ms,startMs:f.data.start_ms,autoOpen:f.data.auto_open||!1,Ob:f.data.session_data||{},sponsored:f.data.sponsored||!1,Gc:k,de:m.card?g.Wr(m.card):null,Yd:m.teaser?g.Wr(m.teaser):null,yd:m.icon?g.Wr(m.icon):null,imageUrl:f.data.image_url,displayDomain:f.data.display_domain?f.data.display_domain:null,showLinkIcon:!!f.data.show_link_icon,qn:f.data.button_icon_url?f.data.button_icon_url:
null,title:f.data.title,customMessage:f.data.custom_message?f.data.custom_message:null,url:X2({pause_on_navigation:f.data.pause_on_navigation,target:f.data.target||"new",value:f.data.url})};n3(c,f);break;case "video":f={id:f.id,timestamp:f.data.timestamp||0,type:f.data.card_type,teaserText:f.data.teaser_text,teaserDurationMs:f.data.teaser_duration_ms,startMs:f.data.start_ms,autoOpen:f.data.auto_open||!1,Ob:f.data.session_data||{},sponsored:f.data.sponsored||!1,Gc:k,de:m.card?g.Wr(m.card):null,Yd:m.teaser?
g.Wr(m.teaser):null,yd:m.icon?g.Wr(m.icon):null,jj:f.data.image_url,videoDuration:f.data.video_duration||null,customMessage:f.data.custom_message?f.data.custom_message:null,title:f.data.title,metaInfo:f.data.meta_info,isLiveNow:!!f.data.is_live_now,url:X2({pause_on_navigation:f.data.pause_on_navigation,target:f.data.target||"new",value:f.data.url})},n3(c,f)}}else bta(a.o,f);c=!0}}}c&&(A2(a.player),a.pp())},Bta=function(a,b){var c=!1;
a.o||(a.o=yta(a),g.B(a,a.o));for(var d=g.q(b.cards||[]),e=d.next();!e.done;e=d.next())cta(a.o,e.value.cardRenderer),c=!0;c&&(c=a.o,d=b.headerText?g.T(b.headerText):"",g.ye(c.Ca,d),c.R&&c.R.setAttribute("title",d),c.Z=b.trackingParams?g.Wr(b.trackingParams):null,c.M=b.closeButton.infoCardIconRenderer.trackingParams?g.Wr(b.closeButton.infoCardIconRenderer.trackingParams):null,c.I=b.icon.infoCardIconRenderer.trackingParams?g.Wr(b.icon.infoCardIconRenderer.trackingParams):null,A2(a.player),a.pp())},Cta=
function(a,b,c,d,e){if(!a.player.N().Ca){var f=[];
b.navigationEndpoint&&b.navigationEndpoint.browseEndpoint&&b.navigationEndpoint.browseEndpoint.browseId&&f.push(new Ksa("openUrl","click",new Isa("/channel/"+b.navigationEndpoint.browseEndpoint.browseId,"new",!0,!0),null));var k=b.watermark.thumbnails[0];d={channel_name:b.channelName,end_ms:b.endTimeMs,image_height:k.height,image_type:1,image_url:k.url,image_width:k.width,is_mobile:!1,session_data:{annotation_id:c,ei:e,feature:"iv",itct:b.trackingParams,src_vid:d},start_ms:b.startTimeMs};if(b.subscribeButton&&
b.subscribeButton.subscribeButtonRenderer){d.channel_id=b.subscribeButton.subscribeButtonRenderer.channelId;b=b.subscribeButton.subscribeButtonRenderer;k=e=null;b.subscribed?(b.subscriberCountWithUnsubscribeText&&(e=g.T(b.subscriberCountWithUnsubscribeText)),b.subscriberCountText&&(k=g.T(b.subscriberCountText))):(b.subscriberCountText&&(e=g.T(b.subscriberCountText)),b.subscriberCountWithSubscribeText&&(k=g.T(b.subscriberCountWithSubscribeText)));var l="";b.signInEndpoint&&b.signInEndpoint.webNavigationEndpointData&&
b.signInEndpoint.webNavigationEndpointData.url&&(l=b.signInEndpoint.webNavigationEndpointData.url);b={subscribeText:g.T(b.unsubscribedButtonText),subscribeCount:e,unsubscribeText:g.T(b.subscribedButtonText),unsubscribeCount:k,enabled:b.enabled,classic:!1,subscribed:b.subscribed,feature:"iv",signInUrl:l};d.standalone_subscribe_button_data=b}f=new Z2(c,"branding","branding",f,d);d=qta();a.u.element.appendChild(d);f=new r3(d,w3(a),f);f.Em();g.B(f,f);a.F[c]=f}},vta=function(a,b){return(0,g.x)(function(){if(!this.ea()){var c=
Array.prototype.slice.call(arguments,0);
c.unshift(b);b=g.Qa.apply(window,c);this.M.push(g.Tp(b))}},a)},D2={},E2=null;g.Sa(G2,g.Fn);g.h=G2.prototype;g.h.getDuration=function(){return this.duration};
g.h.play=function(a){if(a||0==this.o)this.progress=0,this.coords=this.w;else if(this.eb())return!1;F2(this);this.startTime=a=(0,g.H)();-1==this.o&&(this.startTime-=this.duration*this.progress);this.endTime=this.startTime+this.duration;this.B=this.startTime;this.progress||this.mp();this.re("play");-1==this.o&&this.re("resume");this.o=1;var b=g.Pa(this);b in D2||(D2[b]=this);rsa();ssa(this,a);return!0};
g.h.stop=function(a){F2(this);this.o=0;a&&(this.progress=1);tsa(this,this.progress);this.re("stop");this.pm()};
g.h.pause=function(){this.eb()&&(F2(this),this.o=-1,this.re("pause"))};
g.h.X=function(){0==this.o||this.stop(!1);this.re("destroy");G2.Gb.X.call(this)};
g.h.destroy=function(){this.dispose()};
g.h.Ut=function(){this.re("animate")};
g.h.re=function(a){this.dispatchEvent(new usa(a,this))};
g.Sa(usa,g.Je);g.Sa(H2,G2);H2.prototype.A=g.Ia;H2.prototype.Ut=function(){this.A();H2.Gb.Ut.call(this)};
H2.prototype.pm=function(){this.A();H2.Gb.pm.call(this)};
H2.prototype.mp=function(){this.A();H2.Gb.mp.call(this)};
g.Sa(I2,H2);I2.prototype.A=function(){this.element.style.left=Math.round(this.coords[0])+"px";this.element.style.top=Math.round(this.coords[1])+"px"};g.r(J2,g.A);J2.prototype.ka=function(a,b,c,d){c=(0,g.x)(c,d||this.u);a=g.Ep(a,b,c);this.o.push(a);return a};
J2.prototype.Ns=function(a,b,c,d){c=(0,g.x)(c,d||this.u);a=g.Op(a,b,c);this.o.push(a);return a};
J2.prototype.bb=function(a){g.Fp(a);g.db(this.o,a)};
J2.prototype.X=function(){g.Fp(this.o);this.o.length=0;g.A.prototype.X.call(this)};g.r(N2,g.vL);g.h=N2.prototype;g.h.load=function(){g.vL.prototype.load.call(this);if(!O2(this)){var a=g.JB(this.player.getVideoData());if(a)a=M2(a,xsa(this)),P2(this,a,!1);else{var b=this.player.getVideoData();a=b.videoId;this.A&&this.A.abort();a={method:"POST",Fc:(0,g.x)(this.YK,this,a),Zd:{v:a},withCredentials:!0};this.P&&(a.Zd.ptype="embedded");var c=this.player.getVideoData().Kn;c&&(a.sb={ad_tracking:c});if(b=g.IB(b))if(b=g.wc(b),b=g.uc(b))this.A=g.Eq(b,a)}}};
g.h.unload=function(){P2(this,null);this.A&&(this.A.abort(),this.A=null);g.vL.prototype.unload.call(this)};
g.h.Oc=function(a,b){if(!O2(this))return null;if("loadCustomEndscreenRenderer"==a){var c=M2(b,"new");P2(this,c);return!0}return null};
g.h.getOptions=function(){return O2(this)?["loadCustomEndscreenRenderer"]:[]};
g.h.YK=function(a,b){var c=this.A=null;if(200==b.status){var d=b.responseText;")]}"==d.substring(0,3)&&(d=d.substring(3),c=JSON.parse(d),c=M2(c,xsa(this)))}P2(this,c)};
g.h.Xy=function(){if(this.u&&this.u.elements){var a=this.player.getVideoContentRect();if(a&&0!=a.width&&0!=a.height){var b=this.player.getPlayerSize();if(b&&0!=b.width&&0!=b.height){var c=a.width/a.height;var d=0;for(var e=-1,f=0;f<Dta.length;f++){var k=Math.abs(b.width-Dta[f]);if(-1==e||d>=k)e=f,d=k}d=Eta[e];this.w&&g.sh(this.w.element,"outline-width",Math.max(b.width,b.height)+"px");for(b=0;b<this.u.elements.length;++b)if(f=this.u.elements[b].id,e=this.o[f],k=this.F[f],e&&k){var l=k.width*c/k.aspectRatio;
f=Math.round(l*a.height);var m=a.left+Math.round(k.left*a.width),n=a.top+Math.round(k.top*a.height);g.Mh(e.element,Math.round(k.width*a.width),f);g.Ah(e.element,m,n);g.En(e.element,Fta);m=k.left+k.width/2;k=k.top+l/2;g.J(e.element,.5>=m&&.5>=k?"ytp-ce-top-left-quad":.5<m&&.5>=k?"ytp-ce-top-right-quad":.5>=m&&.5<k?"ytp-ce-bottom-left-quad":"ytp-ce-bottom-right-quad");g.En(e.element,Eta);g.J(e.element,d);(e=g.ae(document,"div","ytp-ce-expanding-overlay-body",e.element)[0])&&g.sh(e,"height",f+"px")}}}}};
g.h.UG=function(a){if(this.u)if("ytp-ce-in-endscreen"==a.getId())T2(this,this.u.impressionUrls),(a=g.ds())&&this.u.visualElement&&g.us(a,this.u.visualElement);else{a=a.getId().substring(15);var b=this.o[a],c=this.F[a];g.J(b.element,"ytp-ce-element-show");b.element.removeAttribute("aria-hidden");b=this.player.getRootNode();g.J(b,"ytp-ce-shown");T2(this,c.impressionUrls);(b=g.ds())&&g.us(b,c.visualElement);this.player.N().w&&this.player.na("endscreenelementshown",a)}};
g.h.VG=function(a){if("ytp-ce-in-endscreen"!=a.getId()){a=a.getId().substring(15);var b=this.o[a];g.Dn(b.element,"ytp-ce-element-show");b.element.setAttribute("aria-hidden",!0);b=this.player.getRootNode();g.Dn(b,"ytp-ce-shown");this.player.N().w&&this.player.na("endscreenelementhidden",a)}};
g.h.JN=function(a){var b=this;a.target===window&&(new g.I(function(){for(var c in b.o)g.En(b.o[c].element,["ytp-ce-force-expand","ytp-ce-element-hover","ytp-ce-element-shadow-show"])},0)).start()};
g.h.yA=function(a,b){if(a.targetUrl&&(!b||"keypress"!=b.type||13==b.keyCode)){for(var c=b.target;c&&!g.Bn(c,"ytp-ce-element");){g.Bn(c,"subscribe-label")&&U2(this,a);if(g.Bn(c,"ytp-ce-channel-subscribe"))return;c=g.we(c)}if(!c||g.Bn(c,"ytp-ce-element-hover")){b.preventDefault();b.stopPropagation();if(c=this.o[a.id])this.au(c,a),c.element.blur();b.ctrlKey||b.metaKey||"new"==a.LO?(U2(this,a),this.aC(),this.player.pauseVideo(),c=g.wc(R2(this,a.targetUrl)),c=g.uc(c),g.GN(c,void 0,a.Ob)):(c=this.player.getVideoData().lc,
c=(0,g.x)(this.DO,this,c,R2(this,a.targetUrl),a.Ob),c=(0,g.x)(this.aC,this,c),U2(this,a,c))}}};
g.h.DO=function(a,b,c){var d=g.mq(b);a&&d&&(d.v||d.list)?g.rT(this.player.app,d.v,c,d.list,!1,void 0):g.FN(b,c)};
g.h.Xs=function(a,b){g.Bn(a.element,"ytp-ce-element-hover")||("VIDEO"==b.type||"PLAYLIST"==b.type?g.J(a.element,"ytp-ce-element-hover"):this.player.N().o?(new g.I(function(){g.J(a.element,"ytp-ce-element-hover")},200)).start():g.J(a.element,"ytp-ce-element-hover"),T2(this,b.UF),S2(this,b.id,!0))};
g.h.au=function(a,b){g.Dn(a.element,"ytp-ce-element-hover");g.Dn(a.element,"ytp-ce-force-expand");S2(this,b.id,!1)};
g.h.aC=function(a){this.player.sendVideoStatsEngageEvent(17,a)};
var Dta=[346,426,470,506,570,640,853,1280,1920],Eta="ytp-ce-size-346 ytp-ce-size-426 ytp-ce-size-470 ytp-ce-size-506 ytp-ce-size-570 ytp-ce-size-640 ytp-ce-size-853 ytp-ce-size-1280 ytp-ce-size-1920".split(" "),Fta=["ytp-ce-top-left-quad","ytp-ce-top-right-quad","ytp-ce-bottom-left-quad","ytp-ce-bottom-right-quad"];var Jsa={uQ:"current",SR:"new"};var Lsa={CLOSE:"close",VR:"openUrl",GD:"subscribe"},Msa={oQ:"click",CLOSE:"close",iR:"hidden",BS:"rollOut",CS:"rollOver",HS:"shown"};Z2.prototype.jc=function(){var a=Nsa(this,function(b){return"openUrl"==b.type&&null!=b.url});
return a?a.url:null};
var Ata={RP:"anchored",iD:"branding",CHANNEL:"channel",tQ:"cta",lR:"highlightText",CR:"label",PLAYLIST:"playlist",nS:"popup",MS:"speech",GD:"subscribe",XS:"title",VIDEO:"video",kT:"website"},zta={iD:"branding",fQ:"card",BQ:"drawer",kR:"highlight",JR:"marker",sS:"promotion",TEXT:"text",mT:"widget"};a3.prototype.u=function(a,b){var c=g.De(b.target,"label");c&&g.K(c,"iv-card-poll-choice-focused",a)};
a3.prototype.A=function(a,b){var c=g.De(b.target,null,"iv-card-poll",void 0);if(c)if(a.ej)g.ce("iv-card-sign-in-button",c).click();else{var d=parseInt(nsa(b.target),10);if(null==a.Ce)a.choices[d].count++,a.Ce=d;else if(a.Ce!=d){var e=a.choices[a.Ce];e.count=Math.max(e.count-1,0);a.choices[d].count++;a.Ce=d}else e=a.choices[a.Ce],e.count=Math.max(e.count-1,0),a.Ce=null;Usa(a,c);g.Iq(this.o.videoData.be,{Zd:{action_poll_vote:1},sb:{poll_id:a.id,index:d,session_token:a.pP}});$2(this.o.logger,a.Gc.click,
void 0,5);(c=g.ds())&&a.de&&g.zs(c,a.de)}};g.r(g3,g.A);g.h=g3.prototype;g.h.addCueRange=function(a,b,c,d,e){a=new g.iC(a,b,{id:c});a.namespace="annotations_module";d&&this.ga.set(a,d);e&&this.ma.set(a,e);g.eL(this.context.K,[a])};
g.h.Em=function(){this.context.u.subscribe("resize",this.un,this)};
g.h.ua=function(){return this.Ka};
g.h.yk=function(a,b,c,d,e,f){this.context.o.ka(a,"click",g.Qa(this.Co,b,c,d,e||[],f||0),this);this.context.o.ka(a,"touchstart",g.Qa(function(){this.dv=!1}),this);
this.context.o.ka(a,"touchmove",g.Qa(function(){this.dv=!0}),this)};
g.h.Co=function(a,b,c,d,e,f){if(this.dv)return!1;f&&(f.stopPropagation(),f.preventDefault());$sa(this,a,c,d,e);return!1};
g.h.show=function(){};
g.h.hide=function(){};
g.h.destroy=function(){g.te(this.ua())};
g.h.un=function(){};
g.h.X=function(){this.ga.clear();this.ma.clear();g.A.prototype.X.call(this)};g.r(k3,g3);g.h=k3.prototype;g.h.isAvailable=function(){var a;if(a=!!this.w.length)(a=this.u.getRootNode())?(a=g.Nh(a),a=173<a.width&&173<a.height):a=!1;return a};
g.h.un=function(){var a=this.isAvailable();g.Oh(this.ua(),a);g.K(this.context.K.getRootNode(),g.lM.IV_DRAWER_ENABLED,a);A2(this.u)};
g.h.destroy=function(){var a=g.XK(g.KK(this.u));a&&a.Ts(!1,void 0);try{this.u.getRootNode().removeChild(this.C)}catch(b){}g.Po(this.V);g.Fp(this.ha);this.da&&this.da.dispose();this.F&&this.F.dispose();g3.prototype.destroy.call(this)};
g.h.OL=function(a){this.ba.start();a.preventDefault();a=a||window.event;var b=0;"MozMousePixelScroll"==a.type?b=0==(a.axis==a.HORIZONTAL_AXIS)?a.detail:0:window.opera?b=a.detail:b=0==a.wheelDelta%120?"WebkitTransform"in document.documentElement.style?window.chrome&&0==navigator.platform.indexOf("Mac")?a.wheelDeltaY/-30:a.wheelDeltaY/-1.2:a.wheelDelta/-1.6:a.wheelDeltaY/-3;if(a=b)this.A.scrollTop+=a};
g.h.bC=function(a){if(!g.Bn(this.u.getRootNode(),"ytp-cards-teaser-shown")){if(this.o!=a){var b=g.ds(),c=this.o?this.o.card.yd:this.I;b&&c&&C2(b,[c]);this.o=a;o3(this)}if(b="none"!=this.ua().style.display)2==this.context.K.getPresentingPlayerType()?b=1==this.context.K.getAdState():(b=this.context.K.getPlayerState(),c=0==b&&0===this.context.K.getCurrentTime(),b=1==b||3==b||c);b&&a.card.teaserDurationMs&&(b={teaserText:a.card.teaserText,durationMs:a.card.teaserDurationMs},(c=g.XK(g.KK(this.u)))&&c.Ts(!0,
b));this.za.isActive()||((!this.B||!this.ba.isActive()&&this.aa)&&jta(this,a),this.za.start(910+a.card.teaserDurationMs))}};
g.h.vO=function(a){this.B||(this.o=a,o3(this),jta(this,a),i3(this,"YOUTUBE_DRAWER_AUTO_OPEN",!1))};
g.h.iE=function(){if(this.B){$2(this.context.logger,p3(this).Gc.close);var a=g.ds();a&&this.M&&g.zs(a,this.M);j3(this)}};
g.h.yE=function(){g.K(this.C,"iv-drawer-scrolled",0<this.A.scrollTop)};
g.h.oG=function(){var a=g.ds(),b=p3(this);b=b?b.yd:this.I;a&&b&&B2(a,[b])};
g.h.nG=function(){var a=g.ds(),b=p3(this);b=b?b.yd:this.I;a&&b&&C2(a,[b])};
g.h.rG=function(){var a=p3(this);$2(this.context.logger,a.Gc.qC);var b=g.ds();b&&a&&B2(b,[a.Yd,a.yd])};
g.h.qG=function(){var a=g.ds(),b=p3(this);a&&b&&C2(a,[b.Yd])};
g.h.pG=function(a){var b=p3(this),c=g.ds();this.o?a?(a=this.context.logger,$2(a,b.Gc.Vp),a.o.sendVideoStatsEngageEvent(4,void 0),c&&b.Yd&&g.zs(c,b.Yd)):(a=this.context.logger,$2(a,b.Gc.Vp),a.o.sendVideoStatsEngageEvent(4,void 0),c&&b.yd&&g.zs(c,b.yd)):(a=this.context.logger,$2(a,b.Gc.Vp),a.o.sendVideoStatsEngageEvent(4,void 0),c&&this.I&&g.zs(c,this.I))};g.r(q3,g3);q3.prototype.Em=function(){g3.prototype.Em.call(this);kta(this)};
q3.prototype.show=function(){g3.prototype.show.call(this);var a=g.ds(),b=this.annotation.data;a&&b&&(b=b.session_data)&&B2(a,[g.Wr(b.itct)])};
q3.prototype.hide=function(){g3.prototype.hide.call(this);var a=g.ds(),b=this.annotation.data;a&&b&&(b=b.session_data)&&C2(a,[g.Wr(b.itct)])};g.r(r3,q3);g.h=r3.prototype;g.h.EO=function(a,b,c,d){this.w.stop();if(!this.A){var e=g.Nh(a);this.o||(g.Jh(a,e.width),g.Jh(b,e.width));g.sh(c,"top",e.height-Math.max(Math.min(e.height,d)/2+10,20)+"px");g.sh(c,"right","1px");this.A=!0;g.Oh(a,!0);this.B=new g.I(function(){g.J(this.ua(),"iv-branding-active")},0,this);
this.B.start()}};
g.h.TF=function(a,b){g.Dn(this.ua(),"iv-branding-active");this.C=new g.I((0,g.x)(function(){g.Oh(a,!1);this.o||g.Jh(b,0)},this),250);
this.C.start();this.A=!1};
g.h.show=function(){if(!this.isActive){q3.prototype.show.call(this);if(!this.F){g.J(this.ua(),"iv-branding");var a=this.annotation.data;this.u=g.ne("IMG",{"aria-label":"Filigrane de cha\u00eene",src:a.image_url,"class":"branding-img iv-click-target",width:a.image_width,height:a.image_height});g.Oh(this.u,!1);var b=g.ne("DIV","branding-img-container",this.u);this.ua().appendChild(b);(b=this.annotation.jc())&&this.yk(this.u,b,this.annotation.id,a.session_data);if(a.channel_name){var c=g.ne("DIV","iv-branding-context-name");
g.ye(c,a.channel_name);var d=g.ne("DIV","iv-branding-context-subscribe");if(b=a.standalone_subscribe_button_data)this.o=new g.yQ(b.subscribeText,b.subscribeCount,b.unsubscribeText,b.unsubscribeCount,!!b.enabled,!!b.classic,a.channel_id,!!b.subscribed,b.feature,a.session_data.itct,b.signinUrl,this.context.K),this.o.ca(d);b=g.ne("DIV","iv-branding-context-subscribe-caret");c=g.ne("DIV","branding-context-container-inner",b,c,d);g.Oh(c,!1);d=g.ne("DIV","branding-context-container-outer",c);g.sh(d,"right",
a.image_width+"px");this.ua().appendChild(d);this.w=new g.I(g.Qa(this.TF,c,d),500,this);g.B(this,this.w);this.context.o.ka(this.ua(),"mouseover",(0,g.x)(this.EO,this,c,d,b,a.image_height));this.context.o.ka(this.ua(),"mouseout",(0,g.x)(this.w.start,this.w,void 0))}this.F=!0}g.Oh(this.ua(),!0);this.isActive=!0;if(this.u){a=this.u;var e=void 0===e?0:e;b=g.Eh(a);c=g.Nh(a);b=(new g.ph(b.x,b.y,c.width,c.height)).width;g.Ah(a,b);e=new I2(a,[b,a.offsetTop],[b-b-e,a.offsetTop],200,osa);g.B(this,e);this.context.w.ka(e,
"begin",g.Qa(g.Oh,a,!0));e.play()}}};
g.h.hide=function(){this.isActive&&(q3.prototype.hide.call(this),g.Oh(this.ua(),!1),this.isActive=!1)};
g.h.destroy=function(){this.o&&(this.o.dispose(),this.o=null);q3.prototype.destroy.call(this)};g.r(s3,q3);g.h=s3.prototype;g.h.show=function(){this.isActive||(q3.prototype.show.call(this),this.P||(lta(this),this.P=!0),g.Oh(this.ua(),!0),g.Uf(function(){g.Dn(this.ua(),"iv-promo-inactive")},100,this),this.ua().removeAttribute("aria-hidden"),this.isActive=!0,t3(this),nta(this),ota(this,this.F))};
g.h.hide=function(){this.isActive&&(g.J(this.ua(),"iv-promo-inactive"),this.isActive=!1,this.ua().setAttribute("aria-hidden",!0))};
g.h.Co=function(a,b,c,d,e,f){return this.B?!1:q3.prototype.Co.call(this,a,b,c,d,e,f)};
g.h.hs=function(a,b){b.stopPropagation();nta(this);ota(this,a);this.o.focus()};
g.h.xF=function(a){this.I=!0;this.hs(500,a)};
g.h.wF=function(){this.I=!1;mta(this)};
g.h.oF=function(a){a.stopPropagation();this.hide()};
g.h.pF=function(a){a.stopPropagation();t3(this);this.B=!0;g.J(this.ua(),"iv-promo-collapsed-no-delay");this.C.start()};
g.h.destroy=function(){this.C.dispose();q3.prototype.destroy.call(this)};g.r(u3,g.vL);g.h=u3.prototype;g.h.Oc=function(a,b){if(!rta(this.player.N().playerStyle))return null;switch(a){case "loadCustomAnnotationsXml":var c=g.B1(b);c&&v3(this,c);return!0;case "removeCustomAnnotationById":return b&&this.o&&(eta(this.o,b),A2(this.player)),!0}return null};
g.h.getOptions=function(){return rta(this.player.N().playerStyle)?["loadCustomAnnotationsXml","removeCustomAnnotationById"]:[]};
g.h.pp=function(){if(this.A){var a=g.QK(this.player).getVideoContentRect(!0);g.Mh(this.A.element,a.width,a.height);g.Ah(this.A.element,a.left,a.top)}if(this.o){var b=g.$K(this.player);a=this.o;b=b.width;g.K(a.C,"iv-drawer-small",426>=b);g.K(a.C,"iv-drawer-big",1280<=b)}};
g.h.lM=function(a){this.Rf(a.state);g.V(a.state,2)&&(this.Vl()&&this.Ny()&&2!=this.player.getPresentingPlayerType()&&this.setCardsVisible(!1),this.Ts(!1))};
g.h.load=function(){g.vL.prototype.load.call(this);this.Rf(g.PK(this.player));this.I++;var a=this.player.getVideoData(),b=a.videoId,c=(0,g.x)(this.aL,this,b,this.I),d=(0,g.x)(function(){this.C=null},this);
g.Vp()&&(c=vta(this,c));c={format:"XML",Fc:c,onError:d,Zd:{}};a.isPharma&&(c.Zd.pharma="1");c.method="POST";c.withCredentials=!0;(b=this.player.N().I.get(b))&&wta(c,b);b=b&&(b.An||b.zn);if(!a.ln||b)a.be?sta(this,a.be,c):(this.w=(0,g.x)(this.TG,this,c),this.player.addEventListener("videodatachange",this.w));g.iL(this.player,this.A.element,4);this.pp();(b=g.KB(a))&&Bta(this,b);(b=g.LB(a))&&b.featuredChannel&&Cta(this,b.featuredChannel,b.annotationId||"branding",a.videoId||null,a.eventId||null)};
g.h.Rf=function(a){a=!a.isCued()&&!g.V(a,1024);g.Qu(this.u,a);g.Qu(this.A,a)};
g.h.TG=function(a){var b=this.player.getVideoData();b.be&&(this.w&&(this.player.removeEventListener("videodatachange",this.w),this.w=null),sta(this,b.be,a))};
g.h.unload=function(){g.fR(this.player.app,"annotations_module",void 0);g.zb(this.F,function(a){a.destroy()});
this.G=null;this.o&&(this.o.destroy(),this.o=null,A2(this.player));this.P=!1;this.C&&(this.C.abort(),this.C=null);this.F={};this.u.hide();g.vL.prototype.unload.call(this);g.Nu(this.A);this.w&&(this.player.removeEventListener("videodatachange",this.w),this.w=null)};
g.h.aL=function(a,b,c){this.C=null;!uta(this,b,a)&&(a=g.yq(c)&&c.responseXML?c.responseXML:null)&&(v3(this,a),g.J(this.player.getRootNode(),"iv-module-loaded"))};
g.h.iB=function(a){a==this.player.getVideoData().videoId&&(this.loaded?xta(this):this.load())};
g.h.Vl=function(){return!!this.o&&this.o.isAvailable()};
g.h.Ny=function(){this.Vl();return!!this.o&&this.o.B};
g.h.setCardsVisible=function(a,b,c){b=void 0===b?!1:b;this.Vl();this.o&&(a?c?i3(this.o,c,b):i3(this.o,"YOUTUBE_DRAWER_AUTO_OPEN",b):j3(this.o))};
g.h.Ts=function(a,b){this.player.S(a?"cardsteasershow":"cardsteaserhide",b)};
g.h.X=function(){this.player.N().I.unsubscribe("vast_info_card_add",this.iB,this);g.Dn(this.player.getRootNode(),g.lM.IV_DRAWER_OPEN);for(var a=this.M,b=0,c=a.length;b<c;b++)g.Wp(a[b]);this.M.length=0;g.vL.prototype.X.call(this)};g.KL.annotations_module=u3;g.KL.creatorendscreen=N2;})(_yt_player);