482,channelCreatedWithObakeImage:484,channelEditedWithObakeImage:485,offlineDeleteEvent:486, crossDeviceNotificationTransfer:487,androidIntentEvent:488,unpluggedAmbientInterludesCounterfactualEvent:489,keyPlaysPlayback:490,shortsCreationFallbackEvent:493,vssData:491,castMatch:494,miniAppPerformanceMetrics:495,userFeedbackEvent:496,kidsGuestSessionMismatch:498,musicSideloadedPlaylistMigrationEvent:499,sleepTimerSessionFinishEvent:500,watchEpPromoConflict:503,innertubeResponseCacheMetrics:505,miniAppAdEvent:506,dataPlanUpsellEvent:507,producerProjectRenamed:508,producerMediaSelectionEvent:511, embedsAutoplayStatusChanged:512,remoteConnectEvent:513,connectedSessionMisattributionEvent:514,producerProjectElementModified:515,adsSeenClientLogging:517,producerEvent:518,tvhtml5CleanStart:519,deviceAccountMetricsEvent:520,derpLogEvent:521,playablesPortalEvent:523,ipValidationStarted:524,ipValidationReceived:525,reelsSequenceMutationEvent:527,watchZoomStateChange:528,metadataEditorEvent:529,kidsPrismaDeeplinksEvent:530,creationOrchestrationEvent:531,coordinatedSamplingTriggered:532,dnaRecapScreenshotEvent:534, mdxLocalNetworkPermissionRequestEvent:536,mdxLocalNetworkPermissionResponseEvent:537,sessionReplayEvent:538,sessionReplayStatusEvent:539,loggingReliabilityProbe:540,keyValueStoreStatsEvent:541,deviceLocationPermissionEvent:542,remoteControlStarted:543,remoteControlCompleted:544,reelsAdsEvents:545};var tlb=W_("ServiceWorkerLogsDatabase",{cM:{SWHealthLog:{tv:1}},shared:!0,upgrade:(D,X)=>{X(1)&&Pc(Tg(D,"SWHealthLog",{keyPath:"id",autoIncrement:!0}),"swHealthNewRequest",["interface","timestamp"])}, version:1});var dG={},xLu=0;var Gu;var Ln=class{constructor(){this.L=new Map;this.Z=!1}requestComplete(D,X){X&&(this.Z=!0);D=this.removeParams(D);this.L.get(D)||this.L.set(D,X)}isEndpointCFR(D){D=this.removeParams(D);return(D=this.L.get(D))?!1:D===!1&&this.Z?!0:null}removeParams(D){return D.split("?")[0]}};Ln.prototype.removeParams=Ln.prototype.removeParams;Ln.prototype.isEndpointCFR=Ln.prototype.isEndpointCFR;Ln.prototype.requestComplete=Ln.prototype.requestComplete;Ln.getInstance=iOb;var gG=class extends g.Jv{constructor(){super();this.Z=!1;this.L=Y51();this.L.listen("networkstatus-online",()=>{if(this.Z&&g.GF("offline_error_handling")){var D=QF().get("errors",!0);if(D){for(const X in D)if(D[X]){const B=new g.AO(X,"sent via offline_errors");B.name=D[X].name;B.stack=D[X].stack;B.level=D[X].level;g.WB(B)}QF().set("errors",{},2592E3,!0)}}})}eP(){return this.L.eP()}BP(D){this.L.L=D}tf(){const D=window.navigator.onLine; return D===void 0?!0:D}NS(){this.Z=!0}listen(D,X){return this.L.listen(D,X)}vW(D){return Lq(this.L,D)}};gG.prototype.sendNetworkCheckRequest=gG.prototype.vW;gG.prototype.listen=gG.prototype.listen;gG.prototype.enableErrorFlushing=gG.prototype.NS;gG.prototype.getWindowStatus=gG.prototype.tf;gG.prototype.networkStatusHint=gG.prototype.BP;gG.prototype.isNetworkAvailable=gG.prototype.eP;gG.getInstance=lCo;g.at=class extends g.Jv{constructor(D={}){super();this.L=this.V=0;this.Z=lCo();const X=g.MX("yt.networkStatusManager.instance.listen").bind(this.Z);X&&(D.rateLimit?(this.rateLimit=D.rateLimit,X("networkstatus-online",()=>{$L$(this,"publicytnetworkstatus-online")}),X("networkstatus-offline",()=>{$L$(this,"publicytnetworkstatus-offline")})):(X("networkstatus-online",()=>{this.dispatchEvent("publicytnetworkstatus-online")}),X("networkstatus-offline",()=>{this.dispatchEvent("publicytnetworkstatus-offline")})))}eP(){const D= g.MX("yt.networkStatusManager.instance.isNetworkAvailable"); return D?D.bind(this.Z)():!0}BP(D){const X=g.MX("yt.networkStatusManager.instance.networkStatusHint").bind(this.Z);X&&X(D)}async vW(D){const X=g.MX("yt.networkStatusManager.instance.sendNetworkCheckRequest").bind(this.Z);return g.GF("skip_network_check_if_cfr")&&iOb().isEndpointCFR("generate_204")?new Promise(B=>{this.BP(window.navigator?.onLine||!0);B(this.eP())}):X?X(D):!0}};var Y3,WS$=class extends kw${constructor(){Y3||(Y3=new g.at({eF7:!0,epZ:!0}));super({fH:{VJ:SX$,xc:T4_,yr:E7$,jb:n7B,C1:wJY,set:g7Y},GI:Y3,handleError:(D,X,B)=>{const C=B?.error?.code;C===400||C===415?(D=new g.AO(D.message,X,B?.error?.code),uy(D,void 0,void 0,void 0,!0)):g.WB(D)}, vy:uy,RQ:fC$,now:g.Q,sF:mL_,Gd:g.zg(),J8:"publicytnetworkstatus-online",IZ:"publicytnetworkstatus-offline",B$:!0,yD:.1,Kq:ZW("potential_esf_error_limit",10),hF:g.GF,lD:!(M3()&&g.re(document.location.toString())!=="www.youtube-nocookie.com")});this.G=new g.CQ;g.GF("networkless_immediately_drop_all_requests")&&P$$();Thz("LogsDatabaseV2")}writeThenSend(D,X){X||(X={});X=nn(D,X);M3()||(this.L=!1);super.writeThenSend(D,X)}sendThenWrite(D,X,B){X||(X={});X=nn(D,X);M3()||(this.L=!1);super.sendThenWrite(D, X,B)}sendAndWrite(D,X){X||(X={});X=nn(D,X);M3()||(this.L=!1);super.sendAndWrite(D,X)}awaitInitialization(){return this.G.promise}};var u1u=g.hz.ytNetworklessLoggingInitializationOptions||{isNwlInitialized:!1};g.Jz("ytNetworklessLoggingInitializationOptions",u1u);g.$H=class{constructor(D){this.config_=null;D?this.config_=D:u3Y()&&(this.config_=g.Ar())}isReady(){!this.config_&&u3Y()&&(this.config_=g.Ar());return!!this.config_}};var sg$,Sg,tr;sg$=g.hz.ytPubsubPubsubInstance||new g.cs;Sg=g.hz.ytPubsubPubsubSubscribedKeys||{};tr=g.hz.ytPubsubPubsubTopicToKeys||{};g.P_=g.hz.ytPubsubPubsubIsSynchronous||{};g.cs.prototype.subscribe=g.cs.prototype.subscribe;g.cs.prototype.unsubscribeByKey=g.cs.prototype.nH;g.cs.prototype.publish=g.cs.prototype.publish;g.cs.prototype.clear=g.cs.prototype.clear;g.Jz("ytPubsubPubsubInstance",sg$);g.Jz("ytPubsubPubsubTopicToKeys",tr);g.Jz("ytPubsubPubsubIsSynchronous",g.P_); g.Jz("ytPubsubPubsubSubscribedKeys",Sg);var jr_={};var USV=class extends g.Sf{append(D){D=D.oo();this.oo().appendChild(D)}},It=class extends USV{constructor(D){super();this.L=D}oo(){return this.L}};var Rv1=class extends g.Sf{constructor(D,X){super();this.U=[];this.Y=!1;this.Z=0;this.G=this.S=this.V=!1;this.Z3=null;const B=(0,g.U$)(D,X);this.L=new g.tM(()=>B(this.Z3),300); g.U(this,this.L);this.N=this.K=Infinity}onTouchStart(D){this.Y=!0;this.Z=D.touches.length;this.L.isActive()&&(this.L.stop(),this.G=!0);D=D.touches;this.S=zM_(this,D)||D.length!=1;var X=D.item(0);this.S||!X?this.N=this.K=Infinity:(this.K=X.clientX,this.N=X.clientY);this.U.length=0;for(X=0;X=0)}if(X||D&&(D.clientX-this.K)**2+(D.clientY-this.N)**2>25)this.V=!0}onTouchEnd(D){var X= D.changedTouches;X&&this.Y&&this.Z==1&&!this.V&&!this.G&&!this.S&&zM_(this,X)&&(this.Z3=D,this.L.start());this.Z=D.touches.length;this.Z===0&&(this.V=this.Y=!1,this.U.length=0);this.G=!1}};var mW=Date.now().toString();var vF={};var JN=Symbol("injectionDeps"),KJ=class{constructor(D){this.name=D}toString(){return`InjectionToken(${this.name})`}},uD=class{constructor(D){this.key=D}},RMs=class{constructor(){this.Z=new Map;this.U=new Map;this.L=new Map;this.dn={cnU:()=>new Map(this.Z), RFc:D=>{const X=this.Z.get(D.jx),B=this.L.get(D.jx);this.L.delete(D.jx);hN(this,D);return()=>{this.Z.delete(D.jx);this.L.delete(D.jx);X&&hN(this,X);B&&this.L.set(D.jx,B)}}}}resolve(D){return D instanceof uD?MB(this,D.key,[],!0):MB(this,D,[])}};var AN;var HF=window;var cF=g.GF("web_enable_lifecycle_monitoring")&&F6()!==0,ICV=g.GF("web_enable_lifecycle_monitoring");var ZOb=class{constructor(D){this.scheduler=g.zg();this.Z=new g.CQ;this.L=D;for(let X=0;X{B.Cp();this.L[X].fq=!0;this.L.every(V=>V.fq===!0)&&this.Z.resolve()}; const C=js(D,B.priority??0);this.L[X]={...B,Cp:D,jobId:C}}}cancel(){for(const D of this.L)D.jobId===void 0||D.fq||this.scheduler.um(D.jobId),D.fq=!0;this.Z.resolve()}};var cn_=class{constructor(){this.state="none";this.plugins=[];this.Z=void 0;this.V={};cF&&bD(this.state)}get currentState(){return this.state}install(D){this.plugins.push(D);return this}uninstall(...D){D.forEach(X=>{X=this.plugins.indexOf(X);X>-1&&this.plugins.splice(X,1)})}transition(D,X){cF&&aCA(this.state); var B=this.transitions.find(C=>Array.isArray(C.from)?C.from.find(V=>V===this.state&&C.to===D):C.from===this.state&&C.to===D); if(B){this.U&&(Ys9(this.U),this.U=void 0);KSb(this,D,X);this.state=D;cF&&bD(this.state);B=B.action.bind(this);const C=this.plugins.filter(V=>V[D]).map(V=>V[D]); B(GmA(this,C),X)}else throw Error(`no transition specified from ${this.state} to ${D}`);}};var QrV=class extends cn_{constructor(){super();this.L=null;this.Z=10;this.transitions=[{from:"none",to:"application_navigating",action:this.G},{from:"application_navigating",to:"none",action:this.S},{from:"application_navigating",to:"application_navigating",action:()=>{}}, {from:"none",to:"none",action:()=>{}}]}G(D,X){this.L=g.Hc(0,()=>{this.currentState==="application_navigating"&&this.transition("none")},5E3); D(X?.event)}S(D,X){this.L&&(g.Zv.um(this.L),this.L=null);D(X?.event)}},NB;var m8=[];g.Jz("yt.logging.transport.getScrapedGelPayloads",function(){return m8});var aO=void 0,qB=void 0;var oO=class{constructor(){this.store={};this.L=0;this.Z={};this.dn={TB0:()=>this.L}}storePayload(D,X){D=YA(D); this.store[D]?this.store[D].push(X):(this.Z={},this.store[D]=[X]);this.L++;g.GF("more_accurate_gel_parser")&&(X=new CustomEvent("TRANSPORTING_NEW_EVENT"),window.dispatchEvent(X));return D}smartExtractMatchingEntries(D){if(!D.keys.length)return[];const X=Kr(this,D.keys.splice(0,1)[0]),B=[];for(let C=0;C`Cannot read property '${D.key}'`, O3:{Error:[{FY:/(Permission denied) to access property "([^']+)"/,groups:["reason","key"]}],TypeError:[{FY:/Cannot read property '([^']+)' of (null|undefined)/,groups:["key","value"]},{FY:/\u65e0\u6cd5\u83b7\u53d6\u672a\u5b9a\u4e49\u6216 (null|undefined) \u5f15\u7528\u7684\u5c5e\u6027\u201c([^\u201d]+)\u201d/,groups:["value","key"]},{FY:/\uc815\uc758\ub418\uc9c0 \uc54a\uc74c \ub610\ub294 (null|undefined) \ucc38\uc870\uc778 '([^']+)' \uc18d\uc131\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4./, groups:["value","key"]},{FY:/No se puede obtener la propiedad '([^']+)' de referencia nula o sin definir/,groups:["key"]},{FY:/Unable to get property '([^']+)' of (undefined or null) reference/,groups:["key","value"]},{FY:/(null) is not an object \(evaluating '(?:([^.]+)\.)?([^']+)'\)/,groups:["value","base","key"]}]}},{Us:D=>`Cannot call '${D.key}'`, O3:{TypeError:[{FY:/(?:([^ ]+)?\.)?([^ ]+) is not a function/,groups:["base","key"]},{FY:/([^ ]+) called on (null or undefined)/,groups:["key","value"]},{FY:/Object (.*) has no method '([^ ]+)'/,groups:["base","key"]},{FY:/Object doesn't support property or method '([^ ]+)'/,groups:["key"]},{FY:/\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f '([^']+)' \u30d7\u30ed\u30d1\u30c6\u30a3\u307e\u305f\u306f\u30e1\u30bd\u30c3\u30c9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093/,groups:["key"]}, {FY:/\uac1c\uccb4\uac00 '([^']+)' \uc18d\uc131\uc774\ub098 \uba54\uc11c\ub4dc\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4./,groups:["key"]}]}},{Us:D=>`${D.key} is not defined`, O3:{ReferenceError:[{FY:/(.*) is not defined/,groups:["key"]},{FY:/Can't find variable: (.*)/,groups:["key"]}]}}];var Ol9={q3:[],Pg:[{callback:TK$,weight:500},{callback:SNY,weight:500}]};var Pmo=class{constructor(){this.Pg=[];this.q3=[]}},H9;var Ne=new g.cs;var yRb=new Set,BIA=0,l3_=0,i5V=0,V0o=[],Coz=[],$NA=["PhantomJS","Googlebot","TO STOP THIS SECURITY SCAN go/scan"];var vO_=new g.r("parallelCommand");var phu=new g.r("performOnceCommand");var u8s=new g.r("serialCommand");var YH=void 0;Gd({},"sgPmTd");Gd(null,"jypsq");Gd(null,"mWiOof");Date.now();var M0b=class extends kf{constructor(D){super(arguments);this.csn=D}},kzz=new sy("screen-created",M0b),TB=[],JRb=zjb,SA=0,eA=new Map,dY=new Map,GB=new Map;var dX=class{constructor(D,X=null,B={},C,V,x){this.componentType=D;this.renderer=X;this.macros=B;this.layoutId=C;this.interactionLoggingClientData=V;this.L=x;this.id=Xr(D)}};g.a$(g.Bl,g.Sf);g.b=g.Bl.prototype;g.b.subscribe=function(D,X,B){return this.S7()?0:this.j3.subscribe(D,X,B)}; g.b.unsubscribe=function(D,X,B){return this.S7()?!1:this.j3.unsubscribe(D,X,B)}; g.b.nH=function(D){return this.S7()?!1:this.j3.nH(D)}; g.b.publish=function(D,X){return this.S7()?!1:this.j3.publish.apply(this.j3,arguments)}; g.b.KW=function(D,X){for(let B in D)this.subscribe(B,D[B],X)}; g.b.vt=function(D,X){for(let B in D)this.unsubscribe(B,D[B],X)};var PR=16/9,Nzu=[.25,.5,.75,1,1.25,1.5,1.75,2],qhB=Nzu.concat([3,4,5,6,7,8,9,10,15]),auo=Nzu.concat([2.5,3,3.5,4]);var b5u=1;g.G5=class extends g.Sf{constructor(D){super();this.zW={};this.iQ={};this.element=this.createElement(D)}createElement(D,X){X=X||D.O==="svg";let B;var C=D.D,V=D.l0;X?(B=document.createElementNS("http://www.w3.org/2000/svg",D.O),g.cU&&(D.B||(D.B={}),D.B.focusable="false")):B=g.y8(D.O);if(C){if(C=VW(this,B,"class",C))xM(this,B,"class",C),this.zW[C]=B}else if(V){for(var x of V)this.zW[x]=B;xM(this,B,"class",V.join(" "))}C=D.QV;V=D.W;if(C)X=VW(this,B,"child",C),X!==void 0&&B.appendChild(g.mO(X));else if(V){C= 0;for(var y of V)y&&(typeof y==="string"?(V=VW(this,B,"child",y),V!=null&&B.appendChild(g.mO(V))):y.element?B.appendChild(y.element):(x=y,V=this.createElement(x,X),B.appendChild(V),x.GD&&(x=C9(),V.id=x,V=document.createElementNS("http://www.w3.org/2000/svg","use"),V.setAttribute("class","ytp-svg-shadow"),V.setAttributeNS("http://www.w3.org/1999/xlink","href",`#${x}`),$I(B,V,C++))))}if(D=D.B){X=B;for(const m of Object.keys(D))y=D[m],xM(this,X,m,typeof y==="string"?VW(this,X,m,y):y)}return B}oa(D){return this.zW[D]}Ia(D, X){typeof X==="number"?$I(D,this.element,X):D.appendChild(this.element)}detach(){g.W3(this.element)}update(D){for(const X of Object.keys(D))this.updateValue(X,D[X])}updateValue(D,X){(D=this.iQ[`{{${D}}}`])&&xM(this,D[0],D[1],X)}u0(){this.zW={};this.iQ={};this.detach();super.u0()}};g.t=class extends g.G5{constructor(D){super(D);this.U2=!0;this.Z3=!1;this.listeners=[]}setContent(D,X){this.updateValue(X||"content",D)}show(){this.U2||(g.YI(this.element,"display",""),this.U2=!0)}hide(){this.U2&&(g.YI(this.element,"display","none"),this.U2=!1)}BC(D){D?this.show():this.hide()}oG(D){this.Z3=D}vK(){return this.U2}listen(D,X,B){return this.C(this.element,D,X,B)}C(D,X,B,C){B=(0,g.U$)(B,C||this);C={target:D,type:X,listener:B};this.listeners.push(C);D.addEventListener(X,B);return C}D$(D){this.listeners.forEach((X, B)=>{X===D&&(X=this.listeners.splice(B,1)[0],X.target.removeEventListener(X.type,X.listener))})}focus(){this.element.focus()}u0(){for(;this.listeners.length;){const D=this.listeners.pop(); D&&D.target.removeEventListener(D.type,D.listener)}super.u0()}};g.CM=class extends g.t{constructor(D){super(D);this.s2=new g.Bl;g.U(this,this.s2)}subscribe(D,X,B){return this.s2.subscribe(D,X,B)}unsubscribe(D,X,B){return this.s2.unsubscribe(D,X,B)}nH(D){return this.s2.nH(D)}publish(D,...X){return this.s2.publish(D,...X)}};var YhX=new WeakSet,Zo=class extends g.CM{constructor(D,X,B,C,V,x,y=null){super(X);this.api=D;this.macros={};this.componentType=B;this.K=this.N=null;this.xU=y;this.layoutId=C;this.interactionLoggingClientData=V;this.tF=x;this.ww=null;this.xk=new It(this.element);g.U(this,this.xk);this.BZ=this.C(this.element,"click",this.onClick);this.G2=[];this.vZ=new Rv1(this.onClick,this);g.U(this,this.vZ);this.Lr=!1;this.b0=this.pv=null}bind(D){this.ww||D.renderer&&this.init(D.id,D.renderer,{},D);return Promise.resolve()}init(D, X,B){this.ww=D;this.element.setAttribute("id",this.ww);this.xU&&g.V7(this.element,this.xU);this.pv=X&&X.adRendererCommands;this.b0=X.interaction;this.b0?.onTap&&g.V7(this.element,"ytp-ad-component--clickable");this.macros=B;this.N=X.trackingParams||null;this.K=g.Z(X.rendererContext,Dwo)?.loggingDirectives??X.loggingDirectives;this.N!=null?this.createServerVe(this.element,this.N):this.K&&(D=this.element,X=this.K,this.api.createServerVe(D,this,!0),this.api.setTrackingParams(D,X.trackingParams||null))}clear(){}hide(){super.hide(); (this.N!=null||this.K)&&this.logVisibility(this.element,!1)}show(){super.show();if(!this.Lr){this.Lr=!0;var D=this.pv&&this.pv.impressionCommand;const X=this.b0?.onFirstVisible;D?this.U7(D):X&&(D=IV(X))&&this.U7(D)}(this.N!=null||this.K)&&this.logVisibility(this.element,!0)}onClick(D){if((this.N||this.K)&&!YhX.has(D)){var X=this.element;this.api.hasVe(X)&&this.U2&&this.api.logClick(X,this.interactionLoggingClientData);YhX.add(D)}var B=this.pv&&this.pv.clickCommand;X=this.b0?.onTap;if(B){var C=this.WZ(B); this.U7(C)}else{if(B=X)a:{B=this.element;D=D.composedPath();for(C of D){if(C===B)break;if(C.className.indexOf("ytp-ad-component--clickable")>=0){B=!1;break a}}B=!0}B&&(C=IV(X))&&this.U7(C)}}WZ(D){return D}onTouchStart(D){this.vZ.onTouchStart(D)}onTouchMove(D){this.vZ.onTouchMove(D)}onTouchEnd(D){if(this.vZ)this.vZ.onTouchEnd(D)}U7(D){this.layoutId?this.tF.executeCommand(D,this.layoutId):(D=new g.AO("There is undefined layoutId when calling the runCommand method.",{componentType:this.componentType}), g.E(D))}createServerVe(D,X){this.api.createServerVe(D,this);this.api.setTrackingParams(D,X)}logVisibility(D,X){this.api.hasVe(D)&&this.api.logVisibility(D,X,this.interactionLoggingClientData)}u0(){this.clear(null);this.D$(this.BZ);for(const D of this.G2)this.D$(D);super.u0()}};var aL=class extends Zo{constructor(D,X,B,C,V=[],x="button",y=!1,m,l=!1){V={O:"button",l0:["ytp-ad-button"].concat(V)};m!=null&&(V.B={tabindex:m});super(D,V,x,X,B,C);this.L=this.Z=this.U=null;this.G=y;this.V=l;this.hide()}init(D,X,B){super.init(D,X,B);this.L=X;if(X.text==null&&X.icon==null)g.UW(Error("ButtonRenderer did not have text or an icon set."));else{switch(X.style||null){case "STYLE_UNKNOWN":D="ytp-ad-button-link";break;default:D=null}D!=null&&g.V7(this.element,D);X.text!=null&&(D=g.mv(X.text), g.CR(D)||(this.element.setAttribute("aria-label",D),this.U=new g.CM({O:"span",D:"ytp-ad-button-text",QV:D}),g.U(this,this.U),this.U.Ia(this.element)));X.accessibilityData&&X.accessibilityData.accessibilityData&&X.accessibilityData.accessibilityData.label&&!g.CR(X.accessibilityData.accessibilityData.label)&&this.element.setAttribute("aria-label",X.accessibilityData.accessibilityData.label);X.icon!=null&&(X=sr(X.icon,this.V),X!=null&&(this.Z=new g.CM({O:"span",D:"ytp-ad-button-icon",W:[X]}),g.U(this, this.Z)),this.G?$I(this.element,this.Z.element,0):this.Z.Ia(this.element))}}clear(){this.hide()}onClick(D){super.onClick(D);for(const X of Biu(this))this.layoutId?this.tF.executeCommand(X,this.layoutId):g.E(Error("Missing layoutId for button."));this.api.onAdUxClicked(this.componentType,this.layoutId)}};var CdA=class extends g.Sf{constructor(){super();this.L=new Map;this.Z=t3$(D=>{if(D.target&&(D=this.L.get(D.target))&&D)for(let X=0;X0&&(this.toggleButton(!this.isToggled()),this.Y());super.onClick(D)}Y(){g.q(this.V,"ytp-ad-toggle-button-toggled",this.isToggled());for(const D of ixu(this,this.isToggled()))this.layoutId? this.tF.executeCommand(D,this.layoutId):g.E(Error("Missing layoutId for toggle button."));if(this.isToggled())this.api.onAdUxClicked("toggle-button",this.layoutId);qz(this)}clear(){this.hide()}toggleButton(D){g.q(this.V,"ytp-ad-toggle-button-toggled",D);this.L.checked=D;qz(this)}isToggled(){return this.L.checked}};var IBX=class{constructor(D,X,B){this.actionType=X;this.id=B;this.content=D}};var oru=class extends N5{constructor(D){super();this.L=D;this.C(this.L,"onAdUxUpdate",this.S)}S(D){if(Array.isArray(D))for(const X of D)X instanceof IBX&&this.V(X)}};var p8$=class extends Zo{constructor(D,X,B,C){super(D,{O:"div",D:"ytp-ad-feedback-dialog-background",W:[{O:"div",D:"ytp-ad-feedback-dialog-container",W:[{O:"div",D:"ytp-ad-feedback-dialog-form",B:{role:"dialog",tabindex:"-1"},W:[{O:"div",D:"ytp-ad-feedback-dialog-title",W:[{O:"span",QV:"{{title}}"}]},{O:"span",D:"ytp-ad-info-dialog-feedback-options-title",QV:"{{reasonsTitle}}"},{O:"div",D:"ytp-ad-info-dialog-feedback-options"},{O:"div",D:"ytp-ad-feedback-dialog-confirm-container",W:[{O:"button",D:"ytp-ad-feedback-dialog-cancel-button", QV:"{{cancelLabel}}"},{O:"button",D:"ytp-ad-feedback-dialog-confirm-button",QV:"{{confirmLabel}}"}]}]}]}]},"ad-info-dialog",X,B,C);this.V=[];this.L=null;this.G=this.oa("ytp-ad-feedback-dialog-cancel-button");this.S=this.oa("ytp-ad-feedback-dialog-confirm-button");this.J=this.oa("ytp-ad-info-dialog-feedback-options");this.s7=this.oa("ytp-ad-feedback-dialog-title");this.U=this.Z=null;this.hide()}init(D,X,B){super.init(D,X,B);X.reasons?X.confirmLabel==null?g.E(Error("AdFeedbackRenderer.confirmLabel was not set.")): (X.cancelLabel==null&&g.UW(Error("AdFeedbackRenderer.cancelLabel was not set.")),X.title==null&&g.UW(Error("AdFeedbackRenderer.title was not set.")),vw9(this,X)):g.E(Error("AdFeedbackRenderer.reasons were not set."))}clear(){Dg(this.G);Dg(this.S);this.V.length=0;this.hide()}hide(){this.L&&this.L.hide();this.Z&&this.Z.hide();super.hide();this.U&&this.U.focus()}show(){this.L&&this.L.show();this.Z&&this.Z.show();this.U=document.activeElement;super.show();this.G.focus()}Y(){this.api.onAdUxClicked("ad-feedback-dialog-close-button", this.layoutId);this.publish("a");this.hide()}HZ(){this.hide()}},f1B=class{constructor(D,X){this.Z=X;this.L=new g.CM({O:"label",D:"ytp-ad-feedback-dialog-reason-label",W:[{O:"input",D:"ytp-ad-feedback-dialog-reason-input",B:{type:"radio",name:"feedback-reason-group"}},{O:"span",D:"ytp-ad-feedback-dialog-reason-text",QV:g.mv(D)}]});this.U=this.L.oa("ytp-ad-feedback-dialog-reason-input")}oo(){return this.L.element}getCommand(){return this.Z}isChecked(){return this.U.checked}};var Jhu=class extends K9u{G(D){super.G(D);this.api.onAdUxClicked("ad-mute-confirm-dialog-close-button")}V(D){super.V(D);this.api.onAdUxClicked("ad-mute-confirm-dialog-close-button")}S(D){super.S(D);this.api.onAdUxClicked("ad-mute-confirm-dialog-confirm-button");this.publish("b")}};var bxB=class extends Zo{constructor(D,X,B,C,V){super(D,{O:"div",D:"ytp-ad-info-dialog-background",W:[{O:"div",D:"ytp-ad-info-dialog-container",W:[{O:"div",D:"ytp-ad-info-dialog-form",B:{role:"dialog",tabindex:"-1"},W:[{O:"div",D:"ytp-ad-info-dialog-title",QV:"{{title}}"},{O:"ul",D:"ytp-ad-info-dialog-ad-reasons"},{O:"div",D:"ytp-ad-info-dialog-message"},{O:"div",D:"ytp-ad-info-dialog-mute-container"},{O:"div",D:"ytp-ad-info-dialog-confirm-container",W:[{O:"button",D:"ytp-ad-info-dialog-confirm-button", QV:"{{confirmLabel}}"}]}]}]}]},"ad-info-dialog",X,B,C);this.L=this.Z=null;this.S=this.oa("ytp-ad-info-dialog-confirm-button");this.D3=this.oa("ytp-ad-info-dialog-mute-container");this.YU=this.oa("ytp-ad-info-dialog-message");this.HZ=this.oa("ytp-ad-info-dialog-ad-reasons");this.V=this.U=null;this.J=V;this.G=null;this.O7=!1;this.Y=null;this.hide()}init(D,X,B){super.init(D,X,B);this.G=X;if(X.dialogMessage==null&&X.title==null)g.E(Error("Neither AdInfoDialogRenderer.dialogMessage nor AdInfoDialogRenderer.title was set.")); else{X.confirmLabel==null&&g.UW(Error("AdInfoDialogRenderer.confirmLabel was not set."));if(D=X.closeOverlayRenderer&&g.Z(X.closeOverlayRenderer,C_)||null)this.L=new aL(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,["ytp-ad-info-dialog-close-button"],"ad-info-dialog-close-button"),g.U(this,this.L),this.L.init(Xr("button"),D,this.macros),this.L.Ia(this.element);X.title&&(D=g.mv(X.title),this.updateValue("title",D));if(X.adReasons)for(D=X.adReasons,B=0;Bthis.hide()); g.U(this,this.s7);this.O7=0;this.D3=!1;this.mG=x;this.hide()}init(D,X,B){super.init(D,X,B);D=X.durationMilliseconds;typeof D==="number"&&D<0&&g.E(Error("durationMilliseconds was specified incorrectly in AdPreviewRenderer with a value of: "+D));this.mG&&(this.S?g.V7(this.Z.element,"modern-countdown-next-to-thumbnail"):g.V7(this.Z.element,"countdown-next-to-thumbnail"));D=X.durationMilliseconds;this.O7=D==null||D===0?this.L.Gg():D;if(X.templatedCountdown)var C=X.templatedCountdown.templatedAdText;else X.staticPreview&& (C=X.staticPreview);this.V.init(Xr("ad-text"),C,B);(C=this.api.getVideoData({playerType:1}))&&C.hm&&X.thumbnail?this.Y.init(Xr("ad-image"),X.thumbnail,B):(this.HZ.hide(),this.S&&this.mG&&g.V7(this.V.element,"ytp-ad-preview-text-modern-postroll"))}clear(){this.hide()}hide(){this.Z.hide();this.V.hide();this.Y.hide();K9(this);super.hide()}show(){IL(this);this.Z.show();this.V.show();this.Y.show();super.show()}G(){this.hide()}U(){if(this.L!=null){var D=this.L.getProgressState();D!=null&&D.current!=null&& (D=1E3*D.current,!this.D3&&D>=this.O7?(this.s7.hide(),this.D3=!0,this.publish("i")):this.V&&this.V.isTemplated()&&(D=Math.max(0,Math.ceil((this.O7-D)/1E3)),D!=this.Cv&&(YM(this.V,{TIME_REMAINING:String(D)}),this.Cv=D)))}}};var dSu=class extends E0{constructor(D,X,B,C,V,x){super(D,{O:"div",l0:["ytp-flyout-cta","ytp-flyout-cta-inactive"],W:[{O:"div",D:"ytp-flyout-cta-icon-container"},{O:"div",D:"ytp-flyout-cta-body",W:[{O:"div",D:"ytp-flyout-cta-text-container",W:[{O:"div",D:"ytp-flyout-cta-headline-container"},{O:"div",D:"ytp-flyout-cta-description-container"}]},{O:"div",D:"ytp-flyout-cta-action-button-container"}]}]},"flyout-cta",X,B,C,V);this.V=new Qr(this.api,this.layoutId,this.interactionLoggingClientData,this.tF, "ytp-flyout-cta-icon");g.U(this,this.V);this.V.Ia(this.oa("ytp-flyout-cta-icon-container"));this.V.element.classList.add("ytp-flyout-cta-icon-rounded");this.Y=new gX(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,"ytp-flyout-cta-headline");g.U(this,this.Y);this.Y.Ia(this.oa("ytp-flyout-cta-headline-container"));this.S=new gX(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,"ytp-flyout-cta-description");g.U(this,this.S);this.S.Ia(this.oa("ytp-flyout-cta-description-container")); this.Z=new aL(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,["ytp-flyout-cta-action-button","ytp-flyout-cta-action-button-rounded"]);g.U(this,this.Z);this.Z.Ia(this.oa("ytp-flyout-cta-action-button-container"));this.Z.element.setAttribute("tabIndex","-1");gd(this.Z.element);this.s7=null;this.O7=0;this.D3=x;this.hide()}init(D,X,B){super.init(D,X,B);if(X.image&&X.image.thumbnail)if(X.headline)if(X.description)if((D=X.actionButton&&g.Z(X.actionButton,C_))&&D.navigationEndpoint){const V= this.api.getVideoData({playerType:2});if(V!=null)if(X.image&&X.image.thumbnail){var C=X.image.thumbnail.thumbnails;C!=null&&C.length>0&&g.CR(g.$h(C[0].url))&&(C[0].url=V.profilePicture)}else g.UW(Error("FlyoutCtaRenderer does not have image.thumbnail."));this.V.init(Xr("ad-image"),X.image,B);this.Y.init(Xr("ad-text"),X.headline,B);this.S.init(Xr("ad-text"),X.description,B);this.Z.init(Xr("button"),D,B);B=wd(this.Z.element);nq(this.Z.element,B+" This link opens in new tab");this.s7=D.navigationEndpoint; this.api.Py()||this.show();this.api.addEventListener("playerUnderlayVisibilityChange",this.HZ.bind(this));this.O7=X.startMs||0;IL(this)}else g.E(Error("FlyoutCtaRenderer has no valid action button."));else g.E(Error("FlyoutCtaRenderer has no description AdText."));else g.E(Error("FlyoutCtaRenderer has no headline AdText."));else g.UW(Error("FlyoutCtaRenderer has no image."))}onClick(D){super.onClick(D);this.api.pauseVideo();!g.v3(this.Z.element,D.target)&&this.s7&&(this.layoutId?this.tF.executeCommand(this.s7, this.layoutId):g.E(Error("Missing layoutId for flyout cta.")))}U(){if(this.L){var D=this.L.getProgressState();(D&&D.current||this.D3)&&1E3*D.current>=this.O7&&(K9(this),g.y7(this.element,"ytp-flyout-cta-inactive"),this.Z.element.removeAttribute("tabIndex"))}}G(){this.clear()}clear(){this.hide();this.api.removeEventListener("playerUnderlayVisibilityChange",this.HZ.bind(this))}show(){this.Z&&this.Z.show();super.show()}hide(){this.Z&&this.Z.hide();super.hide()}HZ(D){D=="hidden"?this.show():this.hide()}};var Gwo=class extends Zo{constructor(D,X,B,C){super(D,{O:"div",D:"ytp-ad-instream-user-sentiment-container"},"instream-user-sentiment",X,B,C,null);this.L=null;this.U=new LJ(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,["ytp-ad-instream-user-sentiment-like-button"]);g.U(this,this.U);this.U.Ia(this.element);this.Z=new LJ(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,["ytp-ad-instream-user-sentiment-dislike-button"]);g.U(this,this.Z);this.Z.Ia(this.element);this.V= new g.nJ(this,400,!1,500,()=>this.hide()); g.U(this,this.V);this.hide()}init(D,X,B){super.init(D,X,B);this.L=X;if(this.L.rectangle){D=this.L.likeButton&&g.Z(this.L.likeButton,U0);X=this.L.dislikeButton&&g.Z(this.L.dislikeButton,U0);this.U.init(Xr("toggle-button"),D,B);this.Z.init(Xr("toggle-button"),X,B);this.C(this.element,"change",this.G);this.V.show(100);this.show();for(const C of this.L&&this.L.impressionCommands||[])this.layoutId?this.tF.executeCommand(C,this.layoutId):g.E(Error("Missing layoutId for instream user sentiment."))}}clear(){this.hide()}hide(){this.U.hide(); this.Z.hide();super.hide()}show(){this.U.show();this.Z.show();super.show()}G(){i_(this.element,"ytp-ad-instream-user-sentiment-selected");this.L.postMessageAction&&g.pm(this.api,"onYtShowToast",this.L.postMessageAction);this.V.hide()}onClick(D){this.G2.length>0&&this.G();super.onClick(D)}};var T5=class extends g.Sf{constructor(D,X,B,C,V=0,x=!1){super();this.Z=D;this.U=!1;this.pv=C;this.s7=x;this.S=!1;this.L=null;X>0&&(this.L=new g.tM(this.Z3,X,this),g.U(this,this.L));this.G=new g.tM(this.Z3,B,this);g.U(this,this.G);this.J=Ws(this.Z,V,1,C);g.U(this,this.J);this.Y=Ws(this.Z,0,C,1);g.U(this,this.Y);this.V=new N5;g.U(this,this.V)}u0(){this.reset();super.u0()}reset(){this.V.Z();this.S=!1;this.L&&this.L.stop();this.G.stop();this.U&&(this.U=!1,this.Y.play())}start(){this.reset();this.V.C(this.Z, "mouseover",this.N,this);this.V.C(this.Z,"mouseout",this.K,this);this.s7&&(this.V.C(this.Z,"focusin",this.N,this),this.V.C(this.Z,"focusout",this.K,this));this.L?this.L.start():(this.S=this.U=!0,g.YI(this.Z,{opacity:this.pv}))}N(){this.U&&(this.U=!1,this.Y.play());this.G.stop();this.L&&this.L.stop()}K(){this.S?this.G.start():this.L&&this.L.start()}Z3(){this.U||(this.U=!0,this.J.play(),this.S=!0)}};var Sm=class{constructor(D,X){this.Z=D;this.L=X}},RY$=[new Sm("b.f_",0),new Sm("j.s_",2),new Sm("r.s_",4),new Sm("e.h_",6),new Sm("i.s_",8),new Sm("s.t_",10),new Sm("p.h_",12),new Sm("s.i_",14),new Sm("f.i_",16),new Sm("a.b_",18),new Sm("a.o_"),new Sm("g.o_",22),new Sm("p.i_",24),new Sm("p.m_"),new Sm("n.k_",20),new Sm("i.f_"),new Sm("a.s_"),new Sm("m.c_"),new Sm("n.h_",26),new Sm("o.p_"),new Sm("m.p_",28),new Sm("o.a_"),new Sm("d.p_"),new Sm("e.i_")].reduce((D,X)=>{D[X.Z]=X;return D},{});g.b0=class{constructor(D,X){this.state=D;this.oldState=X}uI(D){return Gn(this,D)>0}};var Zau=class extends E0{constructor(D,X,B,C,V,x){super(D,{O:"div",D:"ytp-ad-skip-button-slot"},"skip-button",X,B,C,V);this.s7=null;this.HZ=!1;this.D3=x;this.Y=this.api.j().experiments.hF("enable_modern_skip_button_on_web");this.Cv=!1;this.S=new g.CM({O:"span",l0:["ytp-ad-skip-button-container"]});this.Y&&this.S.element.classList.add("ytp-ad-skip-button-container-detached");g.U(this,this.S);this.S.Ia(this.element);this.Z=this.V=null;this.mG=new g.nJ(this.S,500,!1,100,()=>this.hide()); g.U(this,this.mG);this.O7=new T5(this.S.element,15E3,5E3,.5,.5,this.Y);g.U(this,this.O7);this.hide()}init(D,X,B){super.init(D,X,B);this.s7=X;(this.HZ=NiB(this))&&g.UW(Error("hasAdControlInClickCommands_ is true."));if(!X||g.Z2(X))g.E(Error("SkipButtonRenderer was not specified or empty."));else if(!X.message||g.Z2(X.message))g.E(Error("SkipButtonRenderer.message was not specified or empty."));else{D=this.Y?{iconType:"SKIP_NEXT_NEW"}:{iconType:"SKIP_NEXT"};X=this.api.j().X("delhi_modern_web_player_icons"); const C=sr(D,!1,!1,X);C==null?g.E(Error("Icon for SkipButton was unable to be retrieved. Icon.IconType: "+D.iconType+".")):(this.api.j().X("disable_touch_events_on_skip_button")&&(C.B={...C.B,"aria-hidden":"true",focusable:"false"}),this.V=new g.CM({O:"button",l0:[this.Y?"ytp-ad-skip-button-modern":"ytp-ad-skip-button","ytp-button",X?"ytp-ad-skip-button-icon-delhi":""],W:[{O:"span",D:this.Y?"ytp-ad-skip-button-icon-modern":"ytp-ad-skip-button-icon",W:[C]}]}),g.U(this,this.V),this.V.Ia(this.S.element), this.Z=new gX(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,"ytp-ad-skip-button-text"),this.Y&&this.Z.element.classList.add("ytp-ad-skip-button-text-centered"),this.Z.init(Xr("ad-text"),this.s7.message,B),g.U(this,this.Z),$I(this.V.element,this.Z.element,0));this.api.j().X("disable_touch_events_on_skip_button")||(B=this.api.j(),!(this.G2.length>0)&&B.Z&&(dl?0:"ontouchstart"in document.documentElement&&(VS()||CT()))&&(this.D$(this.BZ),this.G2=[this.C(this.element,"touchstart",this.onTouchStart, this),this.C(this.element,"touchmove",this.onTouchMove,this),this.C(this.element,"touchend",this.onTouchEnd,this)]))}}clear(){this.O7.reset();this.hide()}hide(){this.S.hide();this.Z&&this.Z.hide();K9(this);super.hide()}onClick(D){if(this.V!=null){if(D){var X=D||window.event;X.returnValue=!1;X.preventDefault&&X.preventDefault()}if(s4u(D,{contentCpn:this.api.getVideoData({playerType:1})?.clientPlaybackNonce||""})===0)g.pm(this.api,"onAbnormalityDetected");else if(super.onClick(D),this.publish("j"), g.pm(this.api,"onAdSkip"),this.D3||!this.HZ)this.api.onAdUxClicked(this.componentType,this.layoutId)}}WZ(D){if(!this.D3)return this.HZ&&dc("SkipButton click commands not pruned while ALC exist"),D;const X=g.Z(D,g.Zd)?.commands;if(!X)return D;D=[];for(let B=0;B=this.Y&&qeX(this,!0)}};var QgX=class extends aL{constructor(D,X,B,C){super(D,X,B,C,["ytp-ad-visit-advertiser-button"],"visit-advertiser")}init(D,X,B){super.init(D,X,B);D=!1;X.text!=null&&(D=g.mv(X.text),D=!g.CR(D));D?X.navigationEndpoint==null?g.UW(Error("No visit advertiser clickthrough provided in renderer,")):X.style!=="STYLE_UNKNOWN"?g.UW(Error("Button style was not a link-style type in renderer,")):this.show():g.UW(Error("No visit advertiser text was present in the renderer."))}};var PH=class extends Zo{constructor(D,X,B,C,V=!1,x=!1){super(D,{O:"span",D:"ytp-ad-simple-ad-badge"},"simple-ad-badge",X,B,C);this.L=this.oa("ytp-ad-simple-ad-badge");(this.Z=V)&&this.L.classList.add("ytp-ad-simple-ad-badge--clean-player");x&&this.L.classList.add("ytp-ad-simple-ad-badge--survey");this.hide()}init(D,X,B){super.init(D,X,B);D=X.text;g.CR(yW(D))?g.UW(Error("SimpleAdBadgeRenderer has invalid or empty text")):(D&&D.text&&(X=D.text,this.Z||(X=this.api.j(),X=D.text+" "+(X&&X.Z?"\u2022":"\u00b7")), X={text:X,isTemplated:D.isTemplated},D.style&&(X.style=D.style),D.targetId&&(X.targetId=D.targetId),D=new gX(this.api,this.layoutId,this.interactionLoggingClientData,this.tF),D.init(Xr("simple-ad-badge"),X,B),D.Ia(this.element),g.U(this,D)),this.show())}clear(){this.hide()}};var t0=class extends dX{constructor(D,X,B,C,V=!1){super("player-overlay",D,{},X,C);this.videoAdDurationSeconds=B;this.interactionLoggingClientData=C;this.SA=V}};var vw=class extends g.Bl{constructor(D,X){super();this.api=D;this.durationMs=X;this.L=null;this.handler=new N5(this);g.U(this,this.handler);this.Z=evu;this.handler.C(this.api,"presentingplayerstatechange",this.U);this.L=this.handler.C(this.api,"onAdPlaybackProgress",this.Ki)}Gg(){return this.durationMs}stop(){this.L&&this.handler.D$(this.L)}Ki(D){this.Z={seekableStart:0,seekableEnd:this.durationMs/1E3,current:D.current};this.publish("h")}getProgressState(){return this.Z}U(D){D.uI(2)&&this.publish("g")}};var O0=class extends g.Bl{constructor(D){super();this.L=!1;this.eR=0;this.handler=new N5(this);g.U(this,this.handler);this.durationMs=D;this.timer=new g.PI(100);g.U(this,this.timer);this.handler.C(this.timer,"tick",this.Ki);this.Z={seekableStart:0,seekableEnd:D/1E3,current:0};this.start()}Gg(){return this.durationMs}start(){this.L||(this.L=!0,this.timer.start())}stop(){this.L&&(this.L=!1,this.timer.stop())}Ki(){this.eR+=100;let D=!1;this.eR>this.durationMs&&(this.eR=this.durationMs,this.timer.stop(), D=!0);this.Z={seekableStart:0,seekableEnd:this.durationMs/1E3,current:this.eR/1E3};this.publish("h");D&&this.publish("g")}getProgressState(){return this.Z}};var rX=class extends E0{constructor(D,X,B,C,V,x,y){super(D,{O:"span",D:y?"ytp-ad-duration-remaining--clean-player":"ytp-ad-duration-remaining"},"ad-duration-remaining",X,B,C,V);this.videoAdDurationSeconds=x;this.Z=null;y&&this.api.j().Z&&(this.element.classList.add("ytp-ad-duration-remaining--mweb"),xf&&this.element.classList.add("ytp-ad-duration-remaining--mweb-ios"));this.hide()}init(D,X,B){super.init(D,X,B);if(X?.templatedCountdown?.templatedAdText){D=X.templatedCountdown.templatedAdText;if(!D.isTemplated){g.UW(Error("AdDurationRemainingRenderer has no templated ad text.")); return}this.Z=new gX(this.api,this.layoutId,this.interactionLoggingClientData,this.tF);this.Z.init(Xr("ad-text"),D,{});this.Z.Ia(this.element);g.U(this,this.Z)}this.show()}clear(){this.hide()}hide(){K9(this);super.hide()}G(){this.hide()}U(){if(this.L!=null){var D=this.L.getProgressState();if(D!=null&&D.current!=null&&this.Z){var X=this.L instanceof vw?this.videoAdDurationSeconds!==void 0?this.videoAdDurationSeconds:D.seekableEnd:this.videoAdDurationSeconds!==void 0?this.videoAdDurationSeconds:this.L instanceof O0?D.seekableEnd:this.api.getDuration({playerType:2,kS:!1});D=D.current;X=this.api.getVideoData()?.LQ?.()?Math.max(X-D,0):X-D;YM(this.Z,{FORMATTED_AD_DURATION_REMAINING:String(g.QW(X)),TIME_REMAINING:String(Math.ceil(X))})}}}show(){IL(this);super.show()}};var L9Y=class extends gX{constructor(D,X,B,C){super(D,X,B,C,"ytp-video-ad-top-bar-title","ad-title")}onClick(D){super.onClick(D);this.api.onAdUxClicked(this.componentType)}};var Ds=class{constructor(D){this.content=D.content;if(D.commandRuns)for(const X of D.commandRuns)this.loggingDirectives=g.Z(X,IQb),X.onTap&&(this.interaction={onTap:X.onTap})}},Xj=class extends Zo{constructor(D,X,B,C){super(D,{O:"div",D:"ad-simple-attributed-string"},"ad-simple-attributed-string",X,B,C);this.hide()}init(D,X){super.init(D,X,{});(D=X.content)?(g.fi(this.element,D),this.element.setAttribute("aria-label",X.interaction?.accessibility?.label||D)):g.E(Error("AdSimpleAttributedString does not have text content"))}clear(){this.hide()}onClick(D){super.onClick(D)}};var B7=class extends Zo{constructor(D,X,B,C,V){super(D,{O:"span",D:V?"ytp-ad-badge--clean-player":"ytp-ad-badge"},"ad-badge",X,B,C);this.Z=V;this.adBadgeText=new Xj(this.api,this.layoutId,this.interactionLoggingClientData,this.tF);this.adBadgeText.Ia(this.element);g.U(this,this.adBadgeText);V?(this.adBadgeText.element.classList.add("ytp-ad-badge__text--clean-player"),xf&&this.adBadgeText.element.classList.add("ytp-ad-badge--stark-clean-player-ios")):this.adBadgeText.element.classList.add("ytp-ad-badge__text"); this.hide()}init(D,X){super.init(D,X,{});(D=X.label)&&D.content&&!g.CR(D.content)?(this.adBadgeText.init(Xr("ad-simple-attributed-string"),new Ds(D)),(X=X.adPodIndex)&&X.content&&!g.CR(X.content)&&(this.L=new Xj(this.api,this.layoutId,this.interactionLoggingClientData,this.tF),this.L.Ia(this.element),g.U(this,this.L),this.L.element.classList.add("ytp-ad-badge__pod-index"),this.L.init(Xr("ad-simple-attributed-string"),new Ds(X))),this.element.classList.add(this.Z?"ytp-ad-badge--stark-clean-player": "ytp-ad-badge--stark"),this.show()):g.E(Error("No label is returned in AdBadgeViewModel."))}show(){this.adBadgeText.show();this.L?.show();super.show()}hide(){this.adBadgeText.hide();this.L?.hide();super.hide()}};var gr$=class extends Zo{constructor(D,X,B,C){super(D,{O:"span",D:"ytp-ad-pod-index"},"ad-pod-index",X,B,C);this.api.j().Z&&(this.element.classList.add("ytp-ad-pod-index--mweb"),xf&&this.element.classList.add("ytp-ad-pod-index--mweb-ios"));this.hide()}init(D,X){super.init(D,X,{});(D=X.adPodIndex)&&D.content&&!g.CR(D.content)&&(this.L=new Xj(this.api,this.layoutId,this.interactionLoggingClientData,this.tF),this.L.Ia(this.element),g.U(this,this.L),this.L.init(Xr("ad-simple-attributed-string"),new Ds(D)), X.visibilityCondition==="AD_POD_INDEX_VISIBILITY_CONDITION_AUTOHIDE"&&this.element.classList.add("ytp-ad-pod-index--autohide"));this.element.classList.add("ytp-ad-pod-index--stark");this.show()}show(){this.L?.show();super.show()}hide(){this.L?.hide();super.hide()}};var Erz=class extends Zo{constructor(D,X,B,C){super(D,{O:"div",D:"ytp-ad-disclosure-banner"},"ad-disclosure-banner",X,B,C);this.hide()}init(D,X){super.init(D,X,{});X?.text?X.text?.content&&!g.CR(X.text.content)&&(this.L=new g.CM({O:"div",D:"ytp-ad-disclosure-banner__text",QV:X.text.content}),g.U(this,this.L),this.L.Ia(this.element),this.api.j().X("enable_ad_disclosure_banner_a11y_fix")?((D=X.interaction?.accessibility?.label)||(D=`${X.text.content} ${"This link opens in new tab"}`),nq(this.element, D)):this.element.setAttribute("aria-label",X.interaction?.accessibility?.label||X.text.content),X.interaction?.onTap&&(this.api.j().X("remove_chevron_from_ad_disclosure_banner_h5")||(this.Z=new g.CM({O:"div",D:"ytp-ad-disclosure-banner__chevron",W:[g.Wl()]}),g.U(this,this.Z),this.Z.Ia(this.element)),this.api.j().X("enable_ad_disclosure_banner_a11y_fix")&&(gd(this.element),this.element.setAttribute("tabindex","0"),this.listen("keydown",this.CO))),this.show()):g.E(Error("No banner text found in AdDisclosureBanner."))}CO(D){if(D.key=== "Enter"||D.key===" ")D.preventDefault(),this.element.click()}clear(){this.hide()}};var J6=class{constructor(D,X){this.Z=D;this.L=X}};var fM=class extends g.CM{constructor(D,X,B,C=!1){super({O:"div",D:"ytp-ad-persistent-progress-bar-container",W:[{O:"div",D:"ytp-ad-persistent-progress-bar"}]});this.api=D;this.Z=X;this.U=B;C&&this.element.classList.add("ytp-ad-persistent-progress-bar-container--clean-player");g.U(this,this.Z);this.progressBar=this.oa("ytp-ad-persistent-progress-bar");this.L=-1;this.C(D,"presentingplayerstatechange",this.onStateChange);this.hide();this.onStateChange()}Ki(){const D=this.Z.getProgressState();let X= D.seekableEnd;this.api.getPresentingPlayerType()===2&&(X=this.U?this.U/1E3:D.seekableEnd);this.progressBar.style.width=Er(new J6(D.seekableStart,X),D.current,0)*100+"%"}onStateChange(){g.m4(this.api.j())||(this.api.getPresentingPlayerType()===2?this.L===-1&&(this.show(),this.L=this.Z.subscribe("h",this.Ki,this),this.Ki()):this.L!==-1&&(this.hide(),this.Z.nH(this.L),this.L=-1))}};var cPs=class extends Zo{constructor(D,X,B,C,V,x){super(D,{O:"div",D:"ytp-ad-player-overlay",W:[{O:"div",D:"ytp-ad-player-overlay-flyout-cta"},{O:"div",D:"ytp-ad-player-overlay-instream-info"},{O:"div",D:"ytp-ad-player-overlay-skip-or-preview"},{O:"div",D:"ytp-ad-player-overlay-progress-bar"},{O:"div",D:"ytp-ad-player-overlay-instream-user-sentiment"},{O:"div",D:"ytp-ad-player-overlay-ad-disclosure-banner"}]},"player-overlay",X,B,C);this.S=x;this.G=this.oa("ytp-ad-player-overlay-flyout-cta");this.G.classList.add("ytp-ad-player-overlay-flyout-cta-rounded"); this.L=this.oa("ytp-ad-player-overlay-instream-info");this.V=null;Yez(this)&&(D=xI("div"),g.V7(D,"ytp-ad-player-overlay-top-bar-gradients"),X=D,B=this.L,B.parentNode&&B.parentNode.insertBefore(X,B),(X=this.api.getVideoData({playerType:2}))&&X.isListed&&X.title&&(B=new L9Y(this.api,this.layoutId,this.interactionLoggingClientData,this.tF),B.Ia(D),B.init(Xr("ad-title"),{text:X.title},this.macros),g.U(this,B)),this.V=D);this.U=null;this.HZ=this.oa("ytp-ad-player-overlay-skip-or-preview");this.s7=this.oa("ytp-ad-player-overlay-progress-bar"); this.J=this.oa("ytp-ad-player-overlay-instream-user-sentiment");this.Y=this.oa("ytp-ad-player-overlay-ad-disclosure-banner");this.Z=V;g.U(this,this.Z);this.hide()}init(D,X,B,C){super.init(D,X,B);if(X.skipOrPreviewRenderer){if(D=g.Z(X.skipOrPreviewRenderer,Q5))B=new $$(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,this.Z,this.S),B.Ia(this.HZ),B.init(Xr("skip-button"),D,this.macros),g.U(this,B);if(D=g.Z(X.skipOrPreviewRenderer,Q5))var V=D.skipOffsetMilliseconds}X.brandInteractionRenderer&& (D=X.brandInteractionRenderer.brandInteractionRenderer,B=new Gwo(this.api,this.layoutId,this.interactionLoggingClientData,this.tF),B.Ia(this.J),B.init(Xr("instream-user-sentiment"),D,this.macros),g.U(this,B));if(D=g.Z(X,C6o))if(B=g.Z(D,C6o))D=new dSu(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,this.Z,!!X.showWithoutLinkedMediaLayout),g.U(this,D),D.Ia(this.G),D.init(Xr("flyout-cta"),B,this.macros);C=C&&C.videoAdDurationSeconds;X.adBadgeRenderer&&(B=X.adBadgeRenderer,D=g.Z(B,hy), D!=null?(B=new B7(this.api,this.layoutId,this.interactionLoggingClientData,this.tF,!1),g.U(this,B),B.Ia(this.L),B.init(Xr("ad-badge"),D,this.macros),this.U=B.element):(D=B.simpleAdBadgeRenderer,D==null&&(D={text:{text:"Ad",isTemplated:!1}}),B=new PH(this.api,this.layoutId,this.interactionLoggingClientData,this.tF),g.U(this,B),B.Ia(this.L),B.init(Xr("simple-ad-badge"),D,this.macros)));X.adPodIndex&&(D=g.Z(X.adPodIndex,fQV),D!=null&&(B=new gr$(this.api,this.layoutId,this.