invidious/assets/js/sabr/youtubei.js/youtubei.bundle.min.js

82 lines
759 KiB
JavaScript

// youtubei.js library - bundled with esbuild
var Nl=Object.defineProperty,b1=t=>{throw TypeError(t)},e6=(t,e,i)=>e in t?Nl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,a=(t,e)=>Nl(t,"name",{value:e,configurable:!0}),Ne=(t,e)=>{for(var i in e)Nl(t,i,{get:e[i],enumerable:!0})},n=(t,e,i)=>e6(t,typeof e!="symbol"?e+"":e,i),Fl=(t,e,i)=>e.has(t)||b1("Cannot "+i),h=(t,e,i)=>(Fl(t,e,"read from private field"),i?i.call(t):e.get(t)),M=(t,e,i)=>e.has(t)?b1("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),P=(t,e,i,r)=>(Fl(t,e,"write to private field"),r?r.call(t,i):e.set(t,i),i),F=(t,e,i)=>(Fl(t,e,"access private method"),i),t6=(t,e,i,r)=>({set _(o){P(t,e,o,i)},get _(){return h(t,e,r)}}),i6={};Ne(i6,{ChannelError:()=>wA,InnertubeError:()=>w,MissingParamError:()=>mA,OAuth2Error:()=>ze,ParsingError:()=>Qi,Platform:()=>ve,PlayerError:()=>Ni,SessionError:()=>Bl,base64ToU8:()=>Ia,concatMemos:()=>Og,debugFetch:()=>ZM,deepCompare:()=>Lr,escapeStringRegexp:()=>Vr,generateRandomString:()=>li,generateSidAuth:()=>Vg,getCookie:()=>Fg,getNsigProcessorFn:()=>Ug,getRandomUserAgent:()=>Sa,getStringBetweenStrings:()=>$t,hasKeys:()=>kA,isTextRun:()=>ct,streamToIterable:()=>Ng,throwIfMissing:()=>se,timeToSeconds:()=>Xt,u8ToBase64:()=>nt});var n6={};Ne(n6,{Maybe:()=>T1,Memo:()=>Hl,SuperParsedResult:()=>cs,YTNode:()=>m,observe:()=>te});var X={};Ne(X,{Level:()=>Gt,debug:()=>l6,error:()=>r6,info:()=>a6,setLevel:()=>y1,warn:()=>wo,warnOnce:()=>o6});var s6="YOUTUBEJS",Gt={NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4},$g={[Gt.ERROR]:(...t)=>console.error(...t),[Gt.WARNING]:(...t)=>console.warn(...t),[Gt.INFO]:(...t)=>console.info(...t),[Gt.DEBUG]:(...t)=>console.debug(...t)},g1=[Gt.WARNING],Jg=new Set;function vs(t,e,i){if(!$g[t]||!g1.includes(t))return;let r=[`[${s6}]`];e&&r.push(`[${e}]`),$g[t](`${r.join("")}:`,...i||[])}a(vs,"doLog");var o6=a((t,...e)=>{Jg.has(t)||(vs(Gt.WARNING,t,e),Jg.add(t))},"warnOnce"),wo=a((t,...e)=>vs(Gt.WARNING,t,e),"warn"),r6=a((t,...e)=>vs(Gt.ERROR,t,e),"error"),a6=a((t,...e)=>vs(Gt.INFO,t,e),"info"),l6=a((t,...e)=>vs(Gt.DEBUG,t,e),"debug");function y1(...t){g1=t}a(y1,"setLevel");var w1=Symbol("ObservedArray.isObserved"),Ul=class{constructor(){n(this,"type"),this.type=this.constructor.type}is(...e){return e.some(i=>this.type===i.type)}as(...e){if(!this.is(...e))throw new Qi(`Cannot cast ${this.type} to one of ${e.map(i=>i.type).join(", ")}`);return this}hasKey(e){return Reflect.has(this,e)}key(e){if(!this.hasKey(e))throw new Qi(`Missing key ${e}`);return new T1(this[e])}};a(Ul,"YTNode");n(Ul,"type","YTNode");var m=Ul,c6="Maybe",ge,Fe,si,mi,k1=class C1{constructor(e){M(this,Fe),M(this,ge),P(this,ge,e)}get typeof(){return typeof h(this,ge)}string(){return F(this,Fe,mi).call(this,"string")}isString(){return F(this,Fe,si).call(this,"string")}number(){return F(this,Fe,mi).call(this,"number")}isNumber(){return F(this,Fe,si).call(this,"number")}bigint(){return F(this,Fe,mi).call(this,"bigint")}isBigint(){return F(this,Fe,si).call(this,"bigint")}boolean(){return F(this,Fe,mi).call(this,"boolean")}isBoolean(){return F(this,Fe,si).call(this,"boolean")}symbol(){return F(this,Fe,mi).call(this,"symbol")}isSymbol(){return F(this,Fe,si).call(this,"symbol")}undefined(){return F(this,Fe,mi).call(this,"undefined")}isUndefined(){return F(this,Fe,si).call(this,"undefined")}null(){if(h(this,ge)!==null)throw new TypeError(`Expected null, got ${typeof h(this,ge)}`);return h(this,ge)}isNull(){return h(this,ge)===null}object(){return F(this,Fe,mi).call(this,"object")}isObject(){return F(this,Fe,si).call(this,"object")}function(){return F(this,Fe,mi).call(this,"function")}isFunction(){return F(this,Fe,si).call(this,"function")}array(){if(!Array.isArray(h(this,ge)))throw new TypeError(`Expected array, got ${typeof h(this,ge)}`);return h(this,ge)}arrayOfMaybe(){let e=[];return new Proxy(this.array(),{get(i,r){return Reflect.has(e,r)?Reflect.get(i,r):new C1(Reflect.get(i,r))}})}isArray(){return Array.isArray(h(this,ge))}node(){if(!(h(this,ge)instanceof m))throw new TypeError(`Expected YTNode, got ${h(this,ge).constructor.name}`);return h(this,ge)}isNode(){return h(this,ge)instanceof m}nodeOfType(...e){return this.node().as(...e)}isNodeOfType(...e){return this.isNode()&&this.node().is(...e)}observed(){if(!this.isObserved())throw new TypeError(`Expected ObservedArray, got ${typeof h(this,ge)}`);return h(this,ge)}isObserved(){var e;return(e=h(this,ge))==null?void 0:e[w1]}parsed(){if(!(h(this,ge)instanceof cs))throw new TypeError(`Expected SuperParsedResult, got ${typeof h(this,ge)}`);return h(this,ge)}isParsed(){return h(this,ge)instanceof cs}any(){return wo(c6,"This call is not meant to be used outside of debugging. Please use the specific type getter instead."),h(this,ge)}instanceof(e){if(!this.isInstanceof(e))throw new TypeError(`Expected instance of ${e.name}, got ${h(this,ge).constructor.name}`);return h(this,ge)}isInstanceof(e){return h(this,ge)instanceof e}};ge=new WeakMap;Fe=new WeakSet;si=a(function(t){return typeof h(this,ge)===t},"#checkPrimitive");mi=a(function(t){if(!F(this,Fe,si).call(this,t))throw new TypeError(`Expected ${t}, got ${this.typeof}`);return h(this,ge)},"#assertPrimitive");a(k1,"Maybe");var T1=k1,tn,S1=class{constructor(e){M(this,tn),P(this,tn,e)}get is_null(){return h(this,tn)===null}get is_array(){return!this.is_null&&Array.isArray(h(this,tn))}get is_node(){return!this.is_array}array(){if(!this.is_array)throw new TypeError("Expected an array, got a node");return h(this,tn)}item(){if(!this.is_node)throw new TypeError("Expected a node, got an array");return h(this,tn)}};tn=new WeakMap;a(S1,"SuperParsedResult");var cs=S1;function te(t){return new Proxy(t,{get(e,i){return i=="get"?(r,o)=>e.find((s,l)=>{let c=Lr(r,s);return c&&o&&e.splice(l,1),c}):i==w1?!0:i=="getAll"?(r,o)=>e.filter((s,l)=>{let c=Lr(r,s);return c&&o&&e.splice(l,1),c}):i=="matchCondition"?r=>e.find(o=>r(o)):i=="filterType"?(...r)=>te(e.filter(o=>!!o.is(...r))):i=="firstOfType"?(...r)=>e.find(o=>!!o.is(...r)):i=="first"?()=>e[0]:i=="as"?(...r)=>te(e.map(o=>{if(o.is(...r))return o;throw new Qi(`Expected node of any type ${r.map(s=>s.type).join(", ")}, got ${o.type}`)})):i=="remove"?r=>e.splice(r,1):Reflect.get(e,i)}})}a(te,"observe");var I1=class extends Map{getType(...e){return e=e.flat(),te(e.flatMap(i=>this.get(i.type)||[]))}};a(I1,"Memo");var Hl=I1,u6={};Ne(u6,{AccessibilityContext:()=>A1,AccessibilityData:()=>zt,Author:()=>le,ChildElement:()=>oS,CommandContext:()=>P3,EmojiRun:()=>n3,Format:()=>T4,RendererContext:()=>Jt,SubscriptionButton:()=>o4,Text:()=>f,TextRun:()=>o3,Thumbnail:()=>x,VideoDetails:()=>I4});var E1=class{constructor(e){n(this,"label"),this.label=e.label}};a(E1,"AccessibilityContext");var A1=E1,x1=class{constructor(e){n(this,"accessibility_identifier"),n(this,"identifier"),n(this,"label"),"accessibilityIdentifier"in e&&(this.accessibility_identifier=e.accessibilityIdentifier),"identifier"in e&&(this.identifier={accessibility_id_type:e.identifier.accessibilityIdType}),"label"in e&&(this.label=e.label)}};a(x1,"AccessibilityData");var zt=x1,he={};Ne(he,{CLIENTS:()=>z,CLIENT_NAME_IDS:()=>Wl,INNERTUBE_HEADERS_BASE:()=>d6,OAUTH:()=>h6,STREAM_HEADERS:()=>Sn,SUPPORTED_CLIENTS:()=>Ra,URLS:()=>st});var st={YT_BASE:"https://www.youtube.com",YT_MUSIC_BASE:"https://music.youtube.com",YT_SUGGESTIONS:"https://suggestqueries-clients6.youtube.com",YT_UPLOAD:"https://upload.youtube.com/",API:{BASE:"https://youtubei.googleapis.com",PRODUCTION_1:"https://www.youtube.com/youtubei/",PRODUCTION_2:"https://youtubei.googleapis.com/youtubei/",STAGING:"https://green-youtubei.sandbox.googleapis.com/youtubei/",RELEASE:"https://release-youtubei.sandbox.googleapis.com/youtubei/",TEST:"https://test-youtubei.sandbox.googleapis.com/youtubei/",CAMI:"http://cami-youtubei.sandbox.googleapis.com/youtubei/",UYTFE:"https://uytfe.sandbox.google.com/youtubei/"},GOOGLE_SEARCH_BASE:"https://www.google.com/"},h6={REGEX:{TV_SCRIPT:new RegExp('<script\\s+id="base-js"\\s+src="([^"]+)"[^>]*><\\/script>'),CLIENT_IDENTITY:new RegExp('clientId:"(?<client_id>[^"]+)",[^"]*?:"(?<client_secret>[^"]+)"')}},z={IOS:{NAME:"iOS",VERSION:"20.11.6",USER_AGENT:"com.google.ios.youtube/20.11.6 (iPhone10,4; U; CPU iOS 16_7_7 like Mac OS X)",DEVICE_MODEL:"iPhone10,4",OS_NAME:"iOS",OS_VERSION:"16.7.7.20H330"},WEB:{NAME:"WEB",VERSION:"2.20260623.01.00",API_KEY:"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8",API_VERSION:"v1",STATIC_VISITOR_ID:"6zpwvWUNAco",SUGG_EXP_ID:"ytzpb5_e2,ytpo.bo.lqp.elu=1,ytpo.bo.lqp.ecsc=1,ytpo.bo.lqp.mcsc=3,ytpo.bo.lqp.mec=1,ytpo.bo.lqp.rw=0.8,ytpo.bo.lqp.fw=0.2,ytpo.bo.lqp.szp=1,ytpo.bo.lqp.mz=3,ytpo.bo.lqp.al=en_us,ytpo.bo.lqp.zrm=1,ytpo.bo.lqp.er=1,ytpo.bo.ro.erl=1,ytpo.bo.ro.mlus=3,ytpo.bo.ro.erls=3,ytpo.bo.qfo.mlus=3,ytzprp.ppp.e=1,ytzprp.ppp.st=772,ytzprp.ppp.p=5"},MWEB:{NAME:"MWEB",VERSION:"2.20260205.04.01",API_VERSION:"v1"},WEB_KIDS:{NAME:"WEB_KIDS",VERSION:"2.20260205.00.00"},YTMUSIC:{NAME:"WEB_REMIX",VERSION:"1.20250219.01.00"},ANDROID:{NAME:"ANDROID",VERSION:"21.03.36",SDK_VERSION:36,USER_AGENT:"com.google.android.youtube/21.03.36(Linux; U; Android 16; en_US; SM-S908E Build/TP1A.220624.014) gzip"},ANDROID_VR:{NAME:"ANDROID_VR",VERSION:"1.65.10",SDK_VERSION:32,DEVICE_MAKE:"Oculus",DEVICE_MODEL:"Quest 3",USER_AGENT:"com.google.android.apps.youtube.vr.oculus/1.65.10 (Linux; U; Android 12L; eureka-user Build/SQ3A.220605.009.A1) gzip"},YTSTUDIO_ANDROID:{NAME:"ANDROID_CREATOR",VERSION:"22.43.101"},YTMUSIC_ANDROID:{NAME:"ANDROID_MUSIC",VERSION:"5.34.51"},TV:{NAME:"TVHTML5",VERSION:"7.20260311.12.00",USER_AGENT:"Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version"},TV_SIMPLY:{NAME:"TVHTML5_SIMPLY",VERSION:"1.0"},TV_EMBEDDED:{NAME:"TVHTML5_SIMPLY_EMBEDDED_PLAYER",VERSION:"2.0"},WEB_EMBEDDED:{NAME:"WEB_EMBEDDED_PLAYER",VERSION:"1.20260206.01.00",API_KEY:"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8",API_VERSION:"v1",STATIC_VISITOR_ID:"6zpwvWUNAco"},WEB_CREATOR:{NAME:"WEB_CREATOR",VERSION:"1.20241203.01.00",API_KEY:"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8",API_VERSION:"v1",STATIC_VISITOR_ID:"6zpwvWUNAco"}},Wl={iOS:"5",WEB:"1",MWEB:"2",WEB_KIDS:"76",WEB_REMIX:"67",ANDROID:"3",ANDROID_CREATOR:"14",ANDROID_MUSIC:"21",ANDROID_VR:"28",TVHTML5:"7",TVHTML5_SIMPLY:"74",TVHTML5_SIMPLY_EMBEDDED_PLAYER:"85",WEB_EMBEDDED_PLAYER:"56",WEB_CREATOR:"62"},Sn={accept:"*/*",origin:"https://www.youtube.com",referer:"https://www.youtube.com",DNT:"?1"},d6={accept:"*/*","accept-encoding":"gzip, deflate","content-type":"application/json"},Ra=["IOS","WEB","MWEB","YTKIDS","YTMUSIC","ANDROID","ANDROID_VR","YTSTUDIO_ANDROID","YTMUSIC_ANDROID","TV","TV_SIMPLY","TV_EMBEDDED","WEB_EMBEDDED","WEB_CREATOR"],v={};Ne(v,{addRuntimeParser:()=>Eg,applyCommentsMutations:()=>Rg,applyMutations:()=>Mg,getDynamicParsers:()=>P4,getParserByName:()=>ms,hasParser:()=>Fo,parse:()=>_t,parseActions:()=>Pg,parseArray:()=>xt,parseC:()=>xg,parseCommand:()=>Ag,parseCommands:()=>M4,parseFormats:()=>Dr,parseItem:()=>Ce,parseLC:()=>Rr,parseRR:()=>so,parseResponse:()=>Mr,sanitizeClassName:()=>Cs,setParserErrorHandler:()=>A4,shouldIgnore:()=>ka});var ql={};Ne(ql,{AboutChannel:()=>u3,AboutChannelView:()=>c3,AccountChannel:()=>h3,AccountItem:()=>Qc,AccountItemSection:()=>_3,AccountItemSectionHeader:()=>d3,AccountSectionList:()=>p3,ActiveAccountHeader:()=>kP,AddBannerToLiveChatCommand:()=>S7,AddChatItemAction:()=>BS,AddLiveChatTickerItemAction:()=>I7,AddToPlaylist:()=>CP,AddToPlaylistCommand:()=>WP,AddToPlaylistEndpoint:()=>m8,AddToPlaylistServiceEndpoint:()=>lS,Alert:()=>Eu,AlertWithButton:()=>S3,AnchoredSection:()=>c4,AnimatedThumbnailOverlayView:()=>I3,AppendContinuationItemsAction:()=>Ji,AttributionView:()=>E3,AudioOnlyPlayability:()=>A3,AuthorCommentBadge:()=>zP,AutomixPreviewVideo:()=>oa,AvatarStackView:()=>Lu,AvatarView:()=>ra,BackgroundPromo:()=>TP,BackstageImage:()=>R3,BackstagePost:()=>aa,BackstagePostThread:()=>SP,BadgeView:()=>ch,BrowseEndpoint:()=>b8,BrowseFeedActions:()=>fh,BrowserMediaSession:()=>IP,BumperUserEduContentView:()=>LS,Button:()=>L,ButtonCardView:()=>EP,ButtonView:()=>He,C4TabbedHeader:()=>no,CallToActionButton:()=>AP,Card:()=>xP,CardCollection:()=>wT,CarouselHeader:()=>kT,CarouselItem:()=>PP,CarouselItemView:()=>TT,CarouselLockup:()=>dT,CarouselTitleView:()=>ST,ChangeEngagementPanelVisibilityAction:()=>fP,Channel:()=>IT,ChannelAboutFullMetadata:()=>il,ChannelAgeGate:()=>MP,ChannelExternalLinkView:()=>l3,ChannelFeaturedContent:()=>RP,ChannelHeaderLinks:()=>W3,ChannelHeaderLinksView:()=>q3,ChannelMetadata:()=>ET,ChannelMobileHeader:()=>DP,ChannelOptions:()=>AT,ChannelOwnerEmptyState:()=>BP,ChannelSubMenu:()=>nl,ChannelSwitcherHeader:()=>LP,ChannelSwitcherPage:()=>m3,ChannelTagline:()=>gT,ChannelThumbnailWithLink:()=>VP,ChannelVideoPlayer:()=>OP,Chapter:()=>xT,ChildVideo:()=>NP,ChipBarView:()=>vo,ChipCloud:()=>An,ChipCloudChip:()=>Ke,ChipView:()=>tt,ClientSideToggleMenuItem:()=>FP,ClipAdState:()=>K3,ClipCreation:()=>Y3,ClipCreationScrubber:()=>G3,ClipCreationTextInput:()=>j3,ClipSection:()=>z3,CollaboratorInfoCardContent:()=>UP,CollageHeroImage:()=>HP,CollectionThumbnailView:()=>LT,CommandExecutorCommand:()=>ZC,CommentActionButtons:()=>B3,CommentDialog:()=>$P,CommentReplies:()=>NT,CommentReplyDialog:()=>FT,CommentSimplebox:()=>qT,CommentThread:()=>GT,CommentView:()=>da,CommentsEntryPointHeader:()=>WT,CommentsEntryPointTeaser:()=>HT,CommentsHeader:()=>ha,CommentsSimplebox:()=>UT,CompactChannel:()=>QP,CompactLink:()=>Po,CompactMix:()=>ZP,CompactMovie:()=>e8,CompactPlaylist:()=>i8,CompactStation:()=>n8,CompactVideo:()=>sd,CompositeVideoPrimaryInfo:()=>s8,ConfirmDialog:()=>o8,ContentMetadataView:()=>G_,ContentPreviewImageView:()=>io,ContinuationCommand:()=>qP,ContinuationItem:()=>Se,ContinuationItemView:()=>ns,ConversationBar:()=>r8,CopyLink:()=>J_,CreateCommentEndpoint:()=>y8,CreatePlaylistDialog:()=>QC,CreatePlaylistDialogFormView:()=>zT,CreatePlaylistServiceEndpoint:()=>k8,CreatorHeart:()=>D3,CreatorHeartView:()=>VS,DecoratedAvatarView:()=>tp,DecoratedPlayerBar:()=>JT,DefaultPromoPanel:()=>l8,DeletePlaylistEndpoint:()=>T8,DescriptionPreviewView:()=>XT,DialogHeaderView:()=>QT,DialogView:()=>c8,DidYouMean:()=>tS,DimChatItemAction:()=>E7,DislikeButtonView:()=>Ku,DismissableDialog:()=>u8,DismissableDialogContentSection:()=>iS,DownloadButton:()=>Ju,DownloadListItemView:()=>eS,Dropdown:()=>sa,DropdownItem:()=>XC,DropdownView:()=>KT,DynamicTextView:()=>nS,Element:()=>aS,EmergencyOnebox:()=>h8,EmojiPicker:()=>OT,EmojiPickerCategory:()=>d8,EmojiPickerCategoryButton:()=>_8,EmojiPickerUpsellCategory:()=>p8,EndScreenPlaylist:()=>hS,EndScreenVideo:()=>dS,Endscreen:()=>uS,EndscreenElement:()=>o7,EngagementPanelSectionList:()=>ua,EngagementPanelTitleHeader:()=>$3,EomSettingsDisclaimer:()=>U3,ExpandableMetadata:()=>Hh,ExpandableTab:()=>Sr,ExpandableVideoDescriptionBody:()=>Z3,ExpandedShelfContents:()=>r7,Factoid:()=>Mo,FancyDismissibleDialog:()=>a7,FeedFilterChipBar:()=>Do,FeedNudge:()=>l7,FeedTabbedHeader:()=>_S,FeedbackEndpoint:()=>I8,FlexibleActionsView:()=>oh,Form:()=>fS,FormFooterView:()=>ZT,FormPopup:()=>c7,GameCard:()=>tT,GameDetails:()=>u7,GetAccountsListInnertubeEndpoint:()=>A8,GetKidsBlocklistPickerCommand:()=>GP,GetMultiPageMenuAction:()=>mP,Grid:()=>Ir,GridChannel:()=>mS,GridHeader:()=>h7,GridMix:()=>d7,GridMovie:()=>_7,GridPlaylist:()=>vS,GridShelfView:()=>p7,GridShow:()=>f7,GridVideo:()=>yS,GuideCollapsibleEntry:()=>m7,GuideCollapsibleSectionEntry:()=>v7,GuideDownloadsEntry:()=>b7,GuideEntry:()=>Er,GuideSection:()=>Bf,GuideSubscriptionsSection:()=>wS,HashtagHeader:()=>kS,HashtagTile:()=>g7,HeatMarker:()=>np,Heatmap:()=>ap,HeroPlaylistThumbnail:()=>y7,HideEngagementPanelEndpoint:()=>x8,HighlightsCarousel:()=>ol,HistorySuggestion:()=>k7,HorizontalCardList:()=>$h,HorizontalList:()=>iT,HorizontalMovieList:()=>C7,HowThisWasMadeSectionView:()=>mT,HypeFanCreditsSectionView:()=>bT,HypePointsFactoid:()=>lT,IconLink:()=>TS,ImageBannerView:()=>SS,IncludingResultsFor:()=>T7,InfoPanelContainer:()=>ES,InfoPanelContent:()=>IS,InfoRow:()=>hT,InteractiveTabbedHeader:()=>AS,ItemSection:()=>Pt,ItemSectionHeader:()=>Xf,ItemSectionTab:()=>xS,ItemSectionTabbedHeader:()=>em,KidsBlocklistPicker:()=>BM,KidsBlocklistPickerItem:()=>tg,KidsCategoriesHeader:()=>u4,KidsCategoryTab:()=>sg,KidsHomeScreen:()=>h4,LikeButton:()=>nh,LikeButtonView:()=>ju,LikeEndpoint:()=>D8,ListItemView:()=>At,ListView:()=>_s,LiveChat:()=>MS,LiveChatActionPanel:()=>HS,LiveChatAuthorBadge:()=>FS,LiveChatAutoModMessage:()=>A7,LiveChatBanner:()=>DS,LiveChatBannerChatSummary:()=>x7,LiveChatBannerHeader:()=>RS,LiveChatBannerPoll:()=>P7,LiveChatBannerRedirect:()=>M7,LiveChatDialog:()=>o5,LiveChatHeader:()=>YS,LiveChatItemBumperView:()=>OS,LiveChatItemContextMenuEndpoint:()=>L8,LiveChatItemList:()=>zS,LiveChatMembershipItem:()=>R7,LiveChatMessageInput:()=>r5,LiveChatModeChangeMessage:()=>D7,LiveChatPaidMessage:()=>B7,LiveChatPaidSticker:()=>L7,LiveChatParticipant:()=>$S,LiveChatParticipantsList:()=>JS,LiveChatPlaceholderItem:()=>V7,LiveChatProductItem:()=>O7,LiveChatRestrictedParticipation:()=>N7,LiveChatSponsorshipsGiftPurchaseAnnouncement:()=>F7,LiveChatSponsorshipsGiftRedemptionAnnouncement:()=>U7,LiveChatSponsorshipsHeader:()=>US,LiveChatTextMessage:()=>H7,LiveChatTickerPaidMessageItem:()=>W7,LiveChatTickerPaidStickerItem:()=>q7,LiveChatTickerSponsorItem:()=>j7,LiveChatViewerEngagementMessage:()=>G7,LockupMetadataView:()=>XS,LockupView:()=>ss,MacroMarkersInfoItem:()=>J3,MacroMarkersList:()=>X3,MacroMarkersListEntity:()=>u2,MacroMarkersListItem:()=>Ph,MarkChatItemAsDeletedAction:()=>Y7,MarkChatItemsByAuthorAsDeletedAction:()=>z7,Menu:()=>ye,MenuFlexibleItem:()=>V3,MenuNavigationItem:()=>QS,MenuPopup:()=>a5,MenuServiceItem:()=>is,MenuServiceItemDownload:()=>L3,MenuTitle:()=>C3,MerchandiseItem:()=>c5,MerchandiseShelf:()=>md,Message:()=>ui,MetadataBadge:()=>Mn,MetadataRow:()=>u5,MetadataRowContainer:()=>iI,MetadataRowHeader:()=>h5,MetadataScreen:()=>d5,MicroformatData:()=>rs,Mix:()=>_5,MobileTopbar:()=>k5,ModalWithTitleAndButton:()=>p5,ModifyChannelNotificationPreferenceEndpoint:()=>O8,Movie:()=>f5,MovingThumbnail:()=>m5,MultiMarkersPlayerBar:()=>$T,MultiPageMenu:()=>f3,MultiPageMenuNotificationSection:()=>l5,MultiPageMenuSection:()=>C5,MusicCardShelf:()=>sI,MusicCardShelfHeaderBasic:()=>nI,MusicCarouselShelf:()=>Yt,MusicCarouselShelfBasicHeader:()=>oI,MusicDescriptionShelf:()=>_a,MusicDetailHeader:()=>X2,MusicDownloadStateBadge:()=>v5,MusicEditablePlaylistDetailHeader:()=>bI,MusicElementHeader:()=>rl,MusicHeader:()=>pa,MusicImmersiveHeader:()=>gI,MusicInlineBadge:()=>R2,MusicItemThumbnailOverlay:()=>Bo,MusicLargeCardItemCarousel:()=>y5,MusicMenuItemDivider:()=>ZS,MusicMultiRowListItem:()=>rI,MusicMultiSelectMenu:()=>eI,MusicMultiSelectMenuItem:()=>os,MusicNavigationButton:()=>H2,MusicPlayButton:()=>B2,MusicPlaylistEditHeader:()=>w5,MusicPlaylistShelf:()=>Ar,MusicQueue:()=>d0,MusicResponsiveHeader:()=>p0,MusicResponsiveListItem:()=>Ki,MusicResponsiveListItemFixedColumn:()=>aI,MusicResponsiveListItemFlexColumn:()=>lI,MusicShelf:()=>it,MusicSideAlignedItem:()=>wI,MusicSortFilterButton:()=>al,MusicTastebuilderShelf:()=>CI,MusicTastebuilderShelfThumbnail:()=>kI,MusicThumbnail:()=>Ai,MusicTwoRowItem:()=>Y2,MusicVisualHeader:()=>TI,NavigationEndpoint:()=>y,Notification:()=>p2,NotificationAction:()=>E5,OpenOnePickAddVideoModalCommand:()=>A5,OpenPopupAction:()=>Fc,PageHeader:()=>as,PageHeaderView:()=>SI,PageIndicatorView:()=>x5,PageIntroduction:()=>II,PanelFooterView:()=>fp,PdgCommentChip:()=>JP,PdgReplyButtonView:()=>NS,PerformCommentActionEndpoint:()=>F8,PivotBar:()=>T5,PivotBarItem:()=>S5,PivotButton:()=>EI,PlayerAnnotationsExpanded:()=>AI,PlayerCaptchaView:()=>P5,PlayerCaptionsTracklist:()=>xI,PlayerControlsOverlay:()=>M5,PlayerErrorMessage:()=>R5,PlayerLegacyDesktopYpcOffer:()=>D5,PlayerLegacyDesktopYpcTrailer:()=>ll,PlayerLiveStoryboardSpec:()=>MI,PlayerMicroformat:()=>oi,PlayerOverflow:()=>PI,PlayerOverlay:()=>fa,PlayerOverlayAutoplay:()=>RI,PlayerOverlayVideoDetails:()=>DI,PlayerStoryboardSpec:()=>Or,Playlist:()=>Ro,PlaylistAddToOption:()=>T3,PlaylistCustomThumbnail:()=>B_,PlaylistEditEndpoint:()=>H8,PlaylistHeader:()=>LI,PlaylistInfoCardContent:()=>B5,PlaylistMetadata:()=>VI,PlaylistPanel:()=>Cn,PlaylistPanelVideo:()=>go,PlaylistPanelVideoWrapper:()=>yI,PlaylistSidebar:()=>L5,PlaylistSidebarPrimaryInfo:()=>OI,PlaylistSidebarSecondaryInfo:()=>NI,PlaylistThumbnailOverlay:()=>V5,PlaylistVideo:()=>iv,PlaylistVideoList:()=>FI,PlaylistVideoThumbnail:()=>V_,Poll:()=>O5,PollHeader:()=>K7,Post:()=>rv,PostMultiImage:()=>N5,PrefetchWatchCommand:()=>q8,PremiereTrailerBadge:()=>F5,ProductList:()=>Q3,ProductListHeader:()=>U5,ProductListItem:()=>H5,ProfileColumn:()=>UI,ProfileColumnStats:()=>W5,ProfileColumnStatsEntry:()=>q5,ProfileColumnUserInfo:()=>j5,Quiz:()=>G5,RecognitionShelf:()=>K5,ReelItem:()=>bv,ReelPlayerHeader:()=>HI,ReelPlayerOverlay:()=>Y5,ReelShelf:()=>pd,ReelWatchEndpoint:()=>G8,RelatedChipCloud:()=>WI,RemoveBannerForLiveChatCommand:()=>$7,RemoveChatItemAction:()=>J7,RemoveChatItemByAuthorAction:()=>X7,ReplaceChatItemAction:()=>Q7,ReplaceLiveChatAction:()=>Z7,ReplayChatItemAction:()=>e5,RichGrid:()=>Lo,RichItem:()=>z5,RichListHeader:()=>$5,RichMetadata:()=>cl,RichMetadataRow:()=>ul,RichSection:()=>J5,RichShelf:()=>qI,RunAttestationCommand:()=>VT,SearchBox:()=>H3,SearchEndpoint:()=>Y8,SearchFilter:()=>jI,SearchFilterGroup:()=>Mv,SearchFilterOptionsDialog:()=>X5,SearchHeader:()=>hl,SearchRefinementCard:()=>eT,SearchSubMenu:()=>GI,SearchSuggestion:()=>CS,SearchSuggestionsSection:()=>KI,SecondarySearchContainer:()=>YI,SectionHeaderView:()=>vT,SectionList:()=>Ae,SegmentedLikeDislikeButton:()=>Ls,SegmentedLikeDislikeButtonView:()=>Zn,SendFeedbackAction:()=>vP,SettingBoolean:()=>Q5,SettingsCheckbox:()=>zI,SettingsOptions:()=>ir,SettingsSidebar:()=>$I,SettingsSwitch:()=>qv,ShareEndpoint:()=>$8,ShareEntityEndpoint:()=>J8,ShareEntityServiceEndpoint:()=>$p,SharePanelHeader:()=>XI,SharePanelTitleV15:()=>Z5,ShareTarget:()=>QI,SharedPost:()=>JI,SheetView:()=>yo,Shelf:()=>Qv,ShortsLockupView:()=>eb,ShowCustomThumbnail:()=>bS,ShowDialogCommand:()=>KP,ShowEngagementPanelEndpoint:()=>X8,ShowLiveChatActionPanelAction:()=>t5,ShowLiveChatDialogAction:()=>i5,ShowLiveChatTooltipCommand:()=>n5,ShowSheetCommand:()=>bo,ShowingResultsFor:()=>ZI,SignalAction:()=>bP,SignalServiceEndpoint:()=>Q8,SimpleCardContent:()=>eM,SimpleCardTeaser:()=>tM,SimpleMenuHeader:()=>tI,SimpleTextSection:()=>iM,SingleActionEmergencySupport:()=>nM,SingleColumnBrowseResults:()=>ma,SingleColumnMusicWatchNextResults:()=>sM,SingleHeroImage:()=>oM,SlimOwner:()=>rM,SlimVideoMetadata:()=>e4,SortFilterHeader:()=>PS,SortFilterSubMenu:()=>hs,SponsorCommentBadge:()=>XP,StartAt:()=>t4,StructuredDescriptionContent:()=>Tr,StructuredDescriptionPlaylistLockup:()=>_T,SubFeedOption:()=>N3,SubFeedSelector:()=>F3,SubscribeButton:()=>hi,SubscribeButtonView:()=>Zu,SubscribeEndpoint:()=>e7,SubscriptionNotificationToggleButton:()=>yT,Tab:()=>kt,Tabbed:()=>aM,TabbedSearchResults:()=>i4,TextCarouselItemView:()=>CT,TextFieldView:()=>YT,TextHeader:()=>lM,ThirdPartyShareTargetSection:()=>n4,ThumbnailBadgeView:()=>i_,ThumbnailBottomOverlayView:()=>BT,ThumbnailHoverOverlayToggleActionsView:()=>RT,ThumbnailHoverOverlayView:()=>PT,ThumbnailLandscapePortrait:()=>cM,ThumbnailOverlayBadgeView:()=>MT,ThumbnailOverlayBottomPanel:()=>gS,ThumbnailOverlayEndorsement:()=>uM,ThumbnailOverlayHoverText:()=>hM,ThumbnailOverlayInlineUnplayable:()=>dM,ThumbnailOverlayLoadingPreview:()=>_M,ThumbnailOverlayNowPlaying:()=>pM,ThumbnailOverlayPinking:()=>fM,ThumbnailOverlayPlaybackStatus:()=>mM,ThumbnailOverlayProgressBarView:()=>DT,ThumbnailOverlayResumePlayback:()=>vM,ThumbnailOverlaySidePanel:()=>bM,ThumbnailOverlayTimeStatus:()=>ds,ThumbnailOverlayTitleView:()=>gM,ThumbnailOverlayToggleButton:()=>yM,ThumbnailView:()=>l_,TimedMarkerDecoration:()=>op,TitleAndButtonListHeader:()=>wM,ToggleButton:()=>$e,ToggleButtonView:()=>En,ToggleFormField:()=>pS,ToggleMenuServiceItem:()=>kM,Tooltip:()=>CM,TopbarMenuButton:()=>I5,TopicChannelDetails:()=>TM,Transcript:()=>gu,TranscriptFooter:()=>v3,TranscriptSearchBox:()=>b3,TranscriptSearchPanel:()=>k3,TranscriptSectionHeader:()=>g3,TranscriptSegment:()=>y3,TranscriptSegmentList:()=>w3,TwoColumnBrowseResults:()=>Vo,TwoColumnSearchResults:()=>s4,TwoColumnWatchNextResults:()=>Vb,UnifiedSharePanel:()=>SM,UniversalWatchCard:()=>Ov,UnsubscribeEndpoint:()=>i7,UpdateChannelSwitcherPageAction:()=>gP,UpdateDateTextAction:()=>WS,UpdateDescriptionAction:()=>qS,UpdateEngagementPanelAction:()=>yP,UpdateEngagementPanelContentCommand:()=>YP,UpdateLiveChatPollAction:()=>s5,UpdateSubscribeButtonAction:()=>wP,UpdateTitleAction:()=>jS,UpdateToggleButtonTextAction:()=>GS,UpdateViewershipAction:()=>KS,UploadTimeFactoid:()=>rT,UpsellDialog:()=>IM,VerticalList:()=>EM,VerticalWatchCardList:()=>AM,Video:()=>la,VideoAttributeView:()=>ca,VideoAttributesSectionView:()=>fT,VideoCard:()=>oT,VideoDescriptionCourseSection:()=>pT,VideoDescriptionHeader:()=>cT,VideoDescriptionInfocardsSection:()=>uT,VideoDescriptionMusicSection:()=>ad,VideoDescriptionTranscriptSection:()=>tl,VideoInfoCardContent:()=>xM,VideoMetadataCarouselView:()=>PM,VideoOwner:()=>Gb,VideoPrimaryInfo:()=>r4,VideoSecondaryInfo:()=>_l,VideoSummaryContentView:()=>sT,VideoSummaryParagraphView:()=>nT,VideoViewCount:()=>Zm,ViewCountFactoid:()=>aT,VoiceReplyContainerView:()=>jT,WatchCardCompactVideo:()=>a4,WatchCardHeroVideo:()=>MM,WatchCardRichHeader:()=>RM,WatchCardSectionSequence:()=>DM,WatchEndpoint:()=>cS,WatchNextEndScreen:()=>BI,WatchNextEndpoint:()=>s7,WatchNextTabbedResults:()=>l4,YpcTrailer:()=>xr});var nn,P1=class{constructor(e,i){M(this,nn),P(this,nn,new ve.shim.Cache(e,i))}get cache_dir(){return h(this,nn).cache_dir}get(e){return h(this,nn).get(e)}set(e,i){return h(this,nn).set(e,i)}remove(e){return h(this,nn).remove(e)}};nn=new WeakMap;a(P1,"UniversalCache");var bR=P1,Ln,M1=class extends EventTarget{constructor(){super(),M(this,Ln,new Map)}emit(e,...i){let r=new ve.shim.CustomEvent(e,{detail:i});this.dispatchEvent(r)}on(e,i){let r=a(o=>{o instanceof ve.shim.CustomEvent?i(...o.detail):i(o)},"wrapper");h(this,Ln).set(i,r),this.addEventListener(e,r)}once(e,i){let r=a(o=>{o instanceof ve.shim.CustomEvent?i(...o.detail):i(o),this.off(e,i)},"wrapper");h(this,Ln).set(i,r),this.addEventListener(e,r)}off(e,i){let r=h(this,Ln).get(i);r&&(this.removeEventListener(e,r),h(this,Ln).delete(i))}};Ln=new WeakMap;a(M1,"EventEmitterLike");var R1=M1,jo={};Ne(jo,{chooseFormat:()=>Xl,download:()=>tw,toDash:()=>ew});var _6={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;"};function Da(t){return t.replace(/([&"<>'])/g,(e,i)=>_6[i])}a(Da,"escapeXMLString");function D1(t){return t.charAt(0).toUpperCase()+t.slice(1)}a(D1,"normalizeTag");function ie(t,e,...i){let r=i.flat();return typeof t=="function"?t({...e,children:r}):{type:D1(t),props:{...e,children:r}}}a(ie,"createElement");async function jl(t){if(typeof t=="string")return Da(t);let e=`<${t.type}`;if(t.props)for(let i of Object.keys(t.props))i!=="children"&&t.props[i]!==void 0&&(e+=` ${i}="${Da(`${t.props[i]}`)}"`);if(t.props.children){let i=await Promise.all((await Promise.all(t.props.children.flat())).flat().filter(r=>!!r).map(r=>jl(r)));if(i.length>0)return e+=`>${i.join("")}</${t.type}>`,e}return`${e}/>`}a(jl,"renderElementToString");async function B1(t){return`<?xml version="1.0" encoding="utf-8"?>${await jl(await t)}`}a(B1,"renderToString");function L1(t){return t.children}a(L1,"Fragment");var Gl=class extends m{constructor(e){super(),n(this,"boards");let i=e.spec.split("|"),r=new URL(i.shift());this.boards=i.map((o,s)=>{let[l,c,u,d,p,_,b,g]=o.split("#");r.searchParams.set("sigh",g);let C=Math.ceil(parseInt(u,10)/(parseInt(d,10)*parseInt(p,10)));return{type:"vod",template_url:r.toString().replace("$L",s).replace("$N",b),thumbnail_width:parseInt(l,10),thumbnail_height:parseInt(c,10),thumbnail_count:parseInt(u,10),interval:parseInt(_,10),columns:parseInt(d,10),rows:parseInt(p,10),storyboard_count:C}})}};a(Gl,"PlayerStoryboardSpec");n(Gl,"type","PlayerStoryboardSpec");var Or=Gl,jt={name:"youtubei.js",version:"17.2.0",description:"A JavaScript client for YouTube's private API, known as InnerTube.",type:"module",types:"./dist/src/platform/lib.d.ts",typesVersions:{"*":{agnostic:["./dist/src/platform/lib.d.ts"],web:["./dist/src/platform/lib.d.ts"],"react-native":["./dist/src/platform/lib.d.ts"],"web.bundle":["./dist/src/platform/lib.d.ts"],"web.bundle.min":["./dist/src/platform/lib.d.ts"],"cf-worker":["./dist/src/platform/lib.d.ts"]}},exports:{".":{deno:"./dist/src/platform/deno.js",node:{import:"./dist/src/platform/node.js",default:"./dist/src/platform/node.js"},types:"./dist/src/platform/lib.d.ts",browser:"./dist/src/platform/web.js","react-native":"./dist/src/platform/react-native.js",default:"./dist/src/platform/web.js"},"./package.json":"./package.json","./agnostic":{types:"./dist/src/platform/lib.d.ts",default:"./dist/src/platform/lib.js"},"./web":{types:"./dist/src/platform/lib.d.ts",default:"./dist/src/platform/web.js"},"./react-native":{types:"./dist/src/platform/lib.d.ts",default:"./dist/src/platform/react-native.js"},"./web.bundle":{types:"./dist/src/platform/lib.d.ts",default:"./bundle/browser.js"},"./cf-worker":{types:"./dist/src/platform/lib.d.ts",default:"./dist/src/platform/cf-worker.js"}},author:"LuanRT <luan.lrt4@gmail.com> (https://github.com/LuanRT)",funding:["https://github.com/sponsors/LuanRT"],contributors:["Wykerd (https://github.com/wykerd/)","MasterOfBob777 (https://github.com/MasterOfBob777)","patrickkfkan (https://github.com/patrickkfkan)","akkadaska (https://github.com/akkadaska)","Absidue (https://github.com/absidue)"],scripts:{test:"vitest run --reporter verbose",lint:"eslint ./src","lint:fix":"eslint --fix ./src","clean:source-maps":"rimraf ./bundle/browser.js.map ./bundle/cf-worker.js.map ./bundle/react-native.js.map","clean:build-output":"rimraf ./dist ./bundle/browser.js ./bundle/cf-worker.js ./bundle/react-native.js ./deno",build:"npm run clean:build-output && npm run clean:source-maps && npm run build:parser-map && npm run build:esm && npm run bundle:browser && npm run bundle:cf-worker && npm run bundle:react-native","build:esm":"tspc","build:deno":`cpy ./src ./deno && cpy ./protos ./deno && esbuild ./src/utils/DashManifest.tsx --keep-names --format=esm --platform=neutral --target=es2020 --outfile=./deno/src/utils/DashManifest.js && cpy ./package.json ./deno && replace ".js';" ".ts';" ./deno -r && replace '.js";' '.ts";' ./deno -r && replace "'./DashManifest.ts';" "'./DashManifest.js';" ./deno -r && replace "'jintr';" "'jsr:@luanrt/jintr';" ./deno -r && replace "@bufbuild/protobuf/wire" "https://esm.sh/@bufbuild/protobuf@2.0.0/wire" ./deno -r`,"build:proto":"rimraf ./protos/generated && node ./dev-scripts/generate-proto.mjs","build:parser-map":"node ./dev-scripts/gen-parser-map.mjs","bundle:browser":'esbuild ./dist/src/platform/web.js --banner:js="/* eslint-disable */" --bundle --sourcemap --target=chrome70 --keep-names --format=esm --define:global=globalThis --conditions=module --outfile=./bundle/browser.js --platform=browser',"bundle:react-native":"esbuild ./dist/src/platform/react-native.js --bundle --sourcemap --target=es2020 --keep-names --format=esm --platform=neutral --define:global=globalThis --conditions=module --outfile=./bundle/react-native.js","bundle:cf-worker":'esbuild ./dist/src/platform/cf-worker.js --banner:js="/* eslint-disable */" --bundle --sourcemap --target=es2020 --keep-names --format=esm --define:global=globalThis --conditions=module --outfile=./bundle/cf-worker.js --platform=node',"build:docs":"typedoc",prepare:"npm run build",watch:"tspc --watch"},repository:{type:"git",url:"git+https://github.com/LuanRT/YouTube.js.git"},files:["dist/","bundle/","package.json","README.md","LICENSE"],license:"MIT",dependencies:{"@bufbuild/protobuf":"^2.0.0",fflate:"^0.8.2",meriyah:"^6.1.4"},devDependencies:{"@eslint/js":"^9.37.0","@types/estree":"^1.0.6","@types/node":"^25.0.3","@typescript-eslint/eslint-plugin":"^8.46.0","@typescript-eslint/parser":"^8.46.0","cpy-cli":"^6.0.0",esbuild:"^0.28.0",eslint:"^9.37.0",globals:"^17.0.0",replace:"^1.2.2",rimraf:"^6.0.1","ts-patch":"^3.0.2","ts-proto":"^2.2.0",typedoc:"^0.28.14","typedoc-plugin-markdown":"^4.9.0",typescript:"^5.9.3","typescript-eslint":"^8.46.0",vitest:"^3.2.4"},bugs:{url:"https://github.com/LuanRT/YouTube.js/issues"},homepage:"https://github.com/LuanRT/YouTube.js#readme",keywords:["api","youtube","innertube","livechat","youtube-music","ytdl","youtube-studio","downloader","ytmusic"]},p6="StreamingInfo";function V1(t,e){var i,r,o;let s=new Map,l=t.some(c=>!!c.audio_track);for(let c of t){if((!c.index_range||!c.init_range)&&!c.is_type_otf&&!e)continue;let u=c.mime_type.split(";")[0],d=(i=$t(c.mime_type,'codecs="','"'))==null?void 0:i.split(".")[0],p=c.color_info?Object.values(c.color_info).join("-"):"",_=((r=c.audio_track)==null?void 0:r.id)||"",b=c.is_drc?"drc":"",g=c.is_vb?"vb":"",C=`${u}-${d}-${p}-${_}-${b}-${g}`;s.has(C)||s.set(C,[]),(o=s.get(C))==null||o.push(c)}return{groups:Array.from(s.values()),has_multiple_audio_tracks:l}}a(V1,"getFormatGroupings");function Kl(t,e){if(t.length>1&&new Set(t.map(i=>$t(i.mime_type,'codecs="','"'))).size===1)return e.push("codecs"),$t(t[0].mime_type,'codecs="','"')}a(Kl,"hoistCodecsIfPossible");function Yl(t,e,i){if(t.length>1&&new Set(t.map(r=>r.fps)).size===1)return i.push(e),Number(t[0][e])}a(Yl,"hoistNumberAttributeIfPossible");function O1(t,e){if(t.length>1&&new Set(t.map(i=>i.audio_channels||2)).size===1)return e.push("AudioChannelConfiguration"),t[0].audio_channels}a(O1,"hoistAudioChannelsIfPossible");async function N1(t,e){var i;let r=await e.session.http.fetch_function(`${t}&rn=0&sq=0`,{method:"GET",headers:Sn,redirect:"follow"}),o=r.url.replace("&rn=0","").replace("&sq=0",""),s=await r.text(),l=(i=$t(s,"Segment-Durations-Ms:",`\r
`))==null?void 0:i.split(",");if(!l)throw new w("Failed to extract the segment durations from this OTF stream",{url:t});let c=[];for(let u of l){let d=u.trim();if(d.length===0)continue;let p,_=$t(d,"(r=",")");_&&(p=parseInt(_)),c.push({duration:parseInt(d),repeat_count:p})}return{init_url:`${o}&sq=0`,media_url:`${o}&sq=$Number$`,timeline:c}}a(N1,"getOTFSegmentTemplate");async function zl(t,e){let i=await e.session.http.fetch_function(`${t}&rn=0&sq=0`,{method:"HEAD",headers:Sn,redirect:"follow"}),r=parseInt(i.headers.get("X-Head-Time-Millis")||""),o=parseInt(i.headers.get("X-Head-Seqnum")||"");if(isNaN(r)||isNaN(o))throw new w("Failed to extract the duration or segment count for this Post Live DVR video");return{duration:r/1e3,segment_count:o}}a(zl,"getPostLiveDvrInfo");async function F1(t,e,i,r,o,s){if(!t.item){let l=new URL(await e.decipher(o));l.searchParams.set("cpn",s||"");let c=i(l).toString();t.item=await zl(c,r)}return t.item.duration}a(F1,"getPostLiveDvrDuration");async function $l(t,e,i,r,o,s,l){let c="";if(l){let d=`${t.itag||""}:${t.xtags||""}`;c=`sabr://${t.has_video?"video":"audio"}?key=${d}`}else{let d=new URL(await t.decipher(r));d.searchParams.set("cpn",o||""),c=e(d).toString()}if(t.is_type_otf){if(!i)throw new w("Unable to get segment durations for this OTF stream without an Actions instance",{format:t});return{is_oft:!0,is_post_live_dvr:!1,getSegmentTemplate(){return N1(c,i)}}}if(s){if(!i)throw new w("Unable to get segment count for this Post Live DVR video without an Actions instance",{format:t});let d=t.target_duration_dec;if(typeof d!="number")throw new w("Format is missing target_duration_dec",{format:t});return{is_oft:!1,is_post_live_dvr:!0,async getSegmentTemplate(){return s.item||(s.item=await zl(c,i)),{media_url:`${c}&sq=$Number$`,timeline:[{duration:d*1e3,repeat_count:s.item.segment_count}]}}}}if(!t.index_range||!t.init_range)throw new w("Index and init ranges not available",{format:t});return{is_oft:!1,is_post_live_dvr:!1,base_url:c,index_range:t.index_range,init_range:t.init_range}}a($l,"getSegmentInfo");async function U1(t,e,i,r,o,s,l,c){let u=[t.itag.toString()];return t.audio_track&&u.push(t.audio_track.id),t.is_drc&&u.push("drc"),t.is_vb&&u.push("vb"),{uid:u.join("-"),bitrate:t.bitrate,codecs:e.includes("codecs")?void 0:$t(t.mime_type,'codecs="','"'),audio_sample_rate:e.includes("audio_sample_rate")?void 0:t.audio_sample_rate,channels:e.includes("AudioChannelConfiguration")?void 0:t.audio_channels||2,segment_info:await $l(t,i,r,o,s,l,c)}}a(U1,"getAudioRepresentation");function H1(t,e){if(!t.audio_track&&!e)return;let i=[t.is_original?"main":"alternate"];return(t.is_dubbed||t.is_auto_dubbed)&&i.push("dub"),t.is_descriptive&&i.push("description"),(t.is_drc||t.is_vb)&&i.push("enhanced-audio-intelligibility"),i}a(H1,"getTrackRoles");async function W1(t,e,i,r,o,s,l,c,u){var d,p;let _=t[0],{audio_track:b}=_,g=[],C=!!l,T=!!c,S;return b?C&&_.is_drc?S=l.label_drc_multiple(b.display_name):T&&_.is_vb?S=c.label_vb_multiple(b.display_name):S=b.display_name:(C||T)&&(C&&_.is_drc?S=l.label_drc:T&&_.is_vb?S=c.label_vb:S=(d=l||c)==null?void 0:d.label_original),{mime_type:_.mime_type.split(";")[0],language:(p=_.language)!=null?p:void 0,codecs:Kl(t,g),audio_sample_rate:Yl(t,"audio_sample_rate",g),track_name:S,track_roles:H1(_,C),channels:O1(t,g),drm_families:_.drm_families,drm_track_type:_.drm_track_type,representations:await Promise.all(t.map(A=>U1(A,g,e,i,r,o,s,u)))}}a(W1,"getAudioSet");var f6={BT709:"1",BT2020:"9"},Xg={BT709:"1",BT2020_10:"14",SMPTEST2084:"16",ARIB_STD_B67:"18"},m6={BT709:"1",BT2020_NCL:"14"};function q1(t){var e;let i=t.color_info,r,o,s;if(i){if(i.primaries&&(r=f6[i.primaries]),i.transfer_characteristics&&(o=Xg[i.transfer_characteristics]),i.matrix_coefficients&&(s=m6[i.matrix_coefficients],!s)){let c=new URL(t.url),u=JSON.parse(JSON.stringify(t));u.url="REDACTED",u.signature_cipher="REDACTED",u.cipher="REDACTED",wo(p6,`Unknown matrix coefficients "${i.matrix_coefficients}". The DASH manifest is still usable without this.
Please report it at ${jt.bugs.url} so we can add support for it.
InnerTube client: ${c.searchParams.get("c")}
format:`,u)}}else(e=$t(t.mime_type,'codecs="','"'))!=null&&e.startsWith("avc1")&&(o=Xg.BT709);return{primaries:r,transfer_characteristics:o,matrix_coefficients:s}}a(q1,"getColorInfo");async function j1(t,e,i,r,o,s,l,c){return{uid:t.itag.toString(),bitrate:t.bitrate,width:t.width,height:t.height,codecs:i.includes("codecs")?void 0:$t(t.mime_type,'codecs="','"'),fps:i.includes("fps")?void 0:t.fps,segment_info:await $l(t,e,o,r,s,l,c)}}a(j1,"getVideoRepresentation");async function G1(t,e,i,r,o,s,l){let c=t[0],u=q1(c),d=[];return{mime_type:c.mime_type.split(";")[0],color_info:u,codecs:Kl(t,d),fps:Yl(t,"fps",d),drm_families:c.drm_families,drm_track_type:c.drm_track_type,representations:await Promise.all(t.map(_=>j1(_,e,d,i,r,o,s,l)))}}a(G1,"getVideoSet");function K1(t){var e;let i=new Map,r=t.is(Or)?t.boards:[t.board];for(let o of r){let s=new URL(o.template_url).pathname.split(".").pop(),l=`image/${s==="jpg"?"jpeg":s}`;i.has(l)||i.set(l,[]),(e=i.get(l))==null||e.push(o)}return i}a(K1,"getStoryboardInfo");async function Y1(t,e,i,r,o){let s=e.template_url,l=i(new URL(s.replace("$M","0"))),c=o.response?o.response:t.session.http.fetch_function(l,{method:"HEAD",headers:Sn});return o.response=c,(await c).headers.get("Content-Type")||r}a(Y1,"getStoryboardMimeType");async function z1(t,e,i){let r=e.template_url,o=[],s=Math.min(e.type==="vod"?e.storyboard_count:5,10);for(let u=0;u<s;u++){let d=new URL(r.replace("$M",u.toString())),p=u===0&&i.response?i.response:t.session.http.fetch_function(d,{method:"HEAD",headers:Sn});u===0&&(i.response=p),o.push(p)}let l=await Promise.all(o),c=[];for(let u of l)c.push(parseInt(u.headers.get("Content-Length")||"0"));return Math.ceil(Math.max(...c)/(e.rows*e.columns)*8)}a(z1,"getStoryboardBitrate");function $1(t,e,i,r,o){let s=i.template_url,l=new URL(s.replace("$M","$Number$")),c;return i.type==="vod"?c=t/i.storyboard_count:c=t*i.columns*i.rows,{uid:`thumbnails_${i.thumbnail_width}x${i.thumbnail_height}`,getBitrate(){return z1(e,i,o)},sheet_width:i.thumbnail_width*i.columns,sheet_height:i.thumbnail_height*i.rows,thumbnail_height:i.thumbnail_height,thumbnail_width:i.thumbnail_width,rows:i.rows,columns:i.columns,template_duration:Math.round(c),template_url:r(l).toString(),getURL(d){return l.toString().replace("$Number$",d.toString())}}}a($1,"getImageRepresentation");function J1(t,e,i,r){let o=K1(i),s={};return Array.from(o.entries()).map(([l,c])=>({probable_mime_type:l,getMimeType(){return Y1(e,c[0],r,l,s)},representations:c.map(u=>$1(t,e,u,r,s))}))}a(J1,"getImageSets");function X1(t,e,i){let r=e==="vtt"?"text/vtt":"application/ttml+xml";return t.map(o=>{let s=new URL(o.base_url);s.searchParams.set("fmt",e);let l=["caption"];return s.searchParams.has("tlang")&&l.push("dub"),{mime_type:r,language:o.language_code,track_name:o.name.toString(),track_roles:l,representation:{uid:`text-${o.vss_id}`,base_url:i(s).toString()}}})}a(X1,"getTextSets");async function Jl(t,e=!1,i=p=>p,r,o,s,l,c,u,d){if(!t)throw new w("Streaming data not available");let p=r?t.adaptive_formats.filter(R=>!r(R)):t.adaptive_formats,_,b;if(e){if(b={},!l)throw new w("Unable to get duration or segment count for this Post Live DVR video without an Actions instance");_=a(()=>b?F1(b,p[0],i,l,s,o):Promise.resolve(0),"getDuration")}else{let R=p[0].approx_duration_ms/1e3;_=a(()=>Promise.resolve(R),"getDuration")}let{groups:g,has_multiple_audio_tracks:C}=V1(p,e),{video_groups:T,audio_groups:S}=g.reduce((R,K)=>K[0].has_audio?(C&&!K[0].audio_track||R.audio_groups.push(K),R):(R.video_groups.push(K),R),{video_groups:[],audio_groups:[]}),k,A,I=!1,D=!1;for(let R of S.flat())I===!1&&R.is_drc&&(I=!0),D===!1&&R.is_vb&&(D=!0);I&&(k={label_original:d?.label_original||"Original",label_drc:d?.label_drc||"Stable Volume",label_drc_multiple:d?.label_drc_multiple||(R=>`${R} (Stable Volume)`)}),D&&(A={label_original:d?.label_original||"Original",label_vb:d?.label_vb||"Voice Boost",label_vb_multiple:d?.label_vb_multiple||(R=>`${R} (Voice Boost)`)});let H=await Promise.all(S.map(R=>W1(R,i,l,s,o,b,k,A,d?.is_sabr))),j=await Promise.all(T.map(R=>G1(R,i,s,l,o,b,d?.is_sabr))),W=[];if(c&&l){let R;if(c.is(Or))R=p[0].approx_duration_ms/1e3;else{let K=p[0].target_duration_dec;if(K===void 0)throw new w("Format is missing target_duration_dec",{format:p[0]});R=K}W=J1(R,l,c,i)}let q=[];if(u&&d?.captions_format){if(d.captions_format!=="vtt"&&d.captions_format!=="ttml")throw new w("Invalid captions format",d.captions_format);q=X1(u,d.captions_format,i)}return{getDuration:_,audio_sets:H,video_sets:j,image_sets:W,text_sets:q}}a(Jl,"getStreamingInfo");async function Q1({info:t}){if(!t.is_oft&&!t.is_post_live_dvr)return null;let e=await t.getSegmentTemplate();return ie("segmentTemplate",{startNumber:e.init_url?"1":"0",timescale:"1000",initialization:e.init_url,media:e.media_url},ie("segmentTimeline",null,e.timeline.map(i=>ie("s",{d:i.duration,r:i.repeat_count}))))}a(Q1,"OTFPostLiveDvrSegmentInfo");function Ba({info:t}){return t.is_oft||t.is_post_live_dvr?ie(Q1,{info:t}):ie(L1,null,ie("baseURL",null,t.base_url),ie("segmentBase",{indexRange:`${t.index_range.start}-${t.index_range.end}`},ie("initialization",{range:`${t.init_range.start}-${t.init_range.end}`})))}a(Ba,"SegmentInfo");function La(t){switch(t){case"WIDEVINE":return"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";case"PLAYREADY":return"9a04f079-9840-4286-ab92-e65be0885f95";default:return null}}a(La,"getDrmSystemId");async function Z1({streamingData:t,isPostLiveDvr:e,transformURL:i,rejectFormat:r,cpn:o,player:s,actions:l,storyboards:c,captionTracks:u,options:d}){let{getDuration:p,audio_sets:_,video_sets:b,image_sets:g,text_sets:C}=await Jl(t,e,i,r,o,s,l,c,u,d);return ie("mPD",{xmlns:"urn:mpeg:dash:schema:mpd:2011",minBufferTime:"PT1.500S",profiles:"urn:mpeg:dash:profile:isoff-main:2011",type:"static",mediaPresentationDuration:`PT${await p()}S`,"xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation":"urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"},ie("period",null,_.map((T,S)=>ie("adaptationSet",{id:S,mimeType:T.mime_type,startWithSAP:"1",subsegmentAlignment:"true",lang:T.language,codecs:T.codecs,audioSamplingRate:T.audio_sample_rate,contentType:"audio"},T.drm_families&&T.drm_families.map(k=>ie("contentProtection",{schemeIdUri:`urn:uuid:${La(k)}`})),T.track_roles&&T.track_roles.map(k=>ie("role",{schemeIdUri:"urn:mpeg:dash:role:2011",value:k})),T.track_name&&ie("label",{id:S},T.track_name),T.channels&&ie("audioChannelConfiguration",{schemeIdUri:"urn:mpeg:dash:23003:3:audio_channel_configuration:2011",value:T.channels}),T.representations.map(k=>ie("representation",{id:k.uid,bandwidth:k.bitrate,codecs:k.codecs,audioSamplingRate:k.audio_sample_rate},k.channels&&ie("audioChannelConfiguration",{schemeIdUri:"urn:mpeg:dash:23003:3:audio_channel_configuration:2011",value:k.channels}),ie(Ba,{info:k.segment_info}))))),b.map((T,S)=>ie("adaptationSet",{id:S+_.length,mimeType:T.mime_type,startWithSAP:"1",subsegmentAlignment:"true",codecs:T.codecs,maxPlayoutRate:"1",frameRate:T.fps,contentType:"video"},T.drm_families&&T.drm_families.map(k=>ie("contentProtection",{schemeIdUri:`urn:uuid:${La(k)}`})),T.color_info.primaries&&ie("supplementalProperty",{schemeIdUri:"urn:mpeg:mpegB:cicp:ColourPrimaries",value:T.color_info.primaries}),T.color_info.transfer_characteristics&&ie("supplementalProperty",{schemeIdUri:"urn:mpeg:mpegB:cicp:TransferCharacteristics",value:T.color_info.transfer_characteristics}),T.color_info.matrix_coefficients&&ie("supplementalProperty",{schemeIdUri:"urn:mpeg:mpegB:cicp:MatrixCoefficients",value:T.color_info.matrix_coefficients}),T.representations.map(k=>ie("representation",{id:k.uid,bandwidth:k.bitrate,width:k.width,height:k.height,codecs:k.codecs,frameRate:k.fps},ie(Ba,{info:k.segment_info}))))),g.map(async(T,S)=>ie("adaptationSet",{id:S+_.length+b.length,mimeType:await T.getMimeType(),contentType:"image"},T.representations.map(async k=>ie("representation",{id:`thumbnails_${k.thumbnail_width}x${k.thumbnail_height}`,bandwidth:await k.getBitrate(),width:k.sheet_width,height:k.sheet_height},ie("essentialProperty",{schemeIdUri:"http://dashif.org/thumbnail_tile",value:`${k.columns}x${k.rows}`}),ie("segmentTemplate",{media:k.template_url,duration:k.template_duration,startNumber:"0"}))))),C.map((T,S)=>ie("adaptationSet",{id:S+_.length+b.length+g.length,mimeType:T.mime_type,lang:T.language,contentType:"text"},T.track_roles.map(k=>ie("role",{schemeIdUri:"urn:mpeg:dash:role:2011",value:k})),ie("label",{id:S+_.length},T.track_name),ie("representation",{id:T.representation.uid,bandwidth:"0"},ie("baseURL",null,T.representation.base_url))))))}a(Z1,"DashManifest");function ew(t,e=!1,i=p=>p,r,o,s,l,c,u,d){if(!t)throw new w("Streaming data not available");return B1(ie(Z1,{streamingData:t,isPostLiveDvr:e,transformURL:i,options:d,rejectFormat:r,cpn:o,player:s,actions:l,storyboards:c,captionTracks:u}))}a(ew,"toDash");async function tw(t,e,i,r,o,s){if(i?.status==="UNPLAYABLE")throw new w("Video is unplayable",{error_type:"UNPLAYABLE"});if(i?.status==="LOGIN_REQUIRED")throw new w("Video is login required",{error_type:"LOGIN_REQUIRED"});if(!r)throw new w("Streaming data not available.",{error_type:"NO_STREAMING_DATA"});let l={quality:"360p",type:"video+audio",format:"mp4",range:void 0,...t},c=Xl(l,r),u=await c.decipher(o);if(l.type==="video+audio"&&!t.range){let C=await e.session.http.fetch_function(`${u}&cpn=${s}`,{method:"GET",headers:Sn,redirect:"follow"});if(!C.ok)throw new w("The server responded with a non 2xx status code",{error_type:"FETCH_FAILED",response:C});let T=C.body;if(!T)throw new w("Could not get ReadableStream from fetch Response.",{error_type:"FETCH_FAILED",response:C});return T}let d=1048576*10,p=t.range?t.range.start:0,_=t.range?t.range.end:d,b=!1,g;return new ve.shim.ReadableStream({start(){},pull:a(async C=>{if(b){C.close();return}return(_>=(c.content_length?c.content_length:0)||t.range)&&(b=!0),new Promise(async(T,S)=>{try{g=new AbortController;let k=await e.session.http.fetch_function(`${u}&cpn=${s}&range=${p}-${_||""}`,{method:"GET",headers:{...Sn},signal:g.signal});if(!k.ok)throw new w("The server responded with a non 2xx status code",{error_type:"FETCH_FAILED",response:k});let A=k.body;if(!A)throw new w("Could not get ReadableStream from fetch Response.",{error_type:"FETCH_FAILED",response:k});for await(let I of Ng(A))C.enqueue(I);p=_+1,_+=d,T()}catch(k){S(k)}})},"pull"),async cancel(C){g.abort(C)}},{highWaterMark:1,size(C){return C.byteLength}})}a(tw,"download");function Xl(t,e){if(!e)throw new w("Streaming data not available");let i=[...e.formats||[],...e.adaptive_formats||[]];if(t.itag){let _=i.filter(b=>b.itag===t.itag);if(!_.length)throw new w("No matching formats found",{options:t});return _[0]}let r=t.type?t.type.includes("audio"):!0,o=t.type?t.type.includes("video"):!0,s=t.language||"original",l=t.quality||"best",c=-1,u=["best","bestefficiency"].includes(l),d=l!=="best",p=i.filter(_=>r&&!_.has_audio||o&&!_.has_video||t.codec&&!_.mime_type.includes(t.codec)||t.format!=="any"&&!_.mime_type.includes(t.format||"mp4")||!u&&_.quality_label!==l?!1:(_.width&&c<_.width&&(c=_.width),!0));if(!p.length)throw new w("No matching formats found",{options:t});if(u&&o&&(p=p.filter(_=>_.width===c)),r&&!o){let _=p.filter(b=>s!=="original"?!b.has_video&&!b.has_text&&b.language===s:!b.has_video&&!b.has_text&&b.is_original);_.length>0&&(p=_)}return d?p.sort((_,b)=>_.bitrate-b.bitrate):p.sort((_,b)=>b.bitrate-_.bitrate),p[0]}a(Xl,"chooseFormat");var Go,Ko,As,Xs,iw,nw,sw,ow=class{constructor(e,i,r){M(this,Xs),M(this,Go),M(this,Ko),M(this,As),P(this,Go,e),P(this,Ko,i),P(this,As,r||ve.shim.fetch)}get fetch_function(){return h(this,As)}async fetch(e,i){let r=h(this,Go),o=st.API.PRODUCTION_1+r.api_version,s=i?.baseURL||o,l=typeof e=="string"?new URL(`${s}${s.endsWith("/")||e.startsWith("/")?"":"/"}${e}`):e instanceof URL?e:new URL(e.url,s),c=i?.headers||(e instanceof ve.shim.Request?e.headers:new ve.shim.Headers)||new ve.shim.Headers,u=i?.body||(e instanceof ve.shim.Request?e.body:void 0),d=new ve.shim.Headers(c);F(this,Xs,nw).call(this,d,r,l),l.searchParams.set("prettyPrint","false"),l.searchParams.set("alt","json");let p=d.get("Content-Type"),_=u,b=!1,g=s===o||s===st.YT_UPLOAD;if(p==="application/json"&&g&&typeof u=="string"){let{newBody:S,isWebKids:k,clientVersion:A,clientNameId:I,adjustedClientName:D}=F(this,Xs,iw).call(this,u,r);_=S,b=k,A&&d.set("X-Youtube-Client-Version",A),I&&d.set("X-Youtube-Client-Name",I),D===z.ANDROID.NAME||D===z.YTMUSIC_ANDROID.NAME?(d.set("User-Agent",z.ANDROID.USER_AGENT),d.set("X-GOOG-API-FORMAT-VERSION","2")):D===z.IOS.NAME&&d.set("User-Agent",z.IOS.USER_AGENT)}else p==="application/x-protobuf"&&ve.shim.server&&(d.set("User-Agent",z.ANDROID.USER_AGENT),d.set("X-GOOG-API-FORMAT-VERSION","2"),d.delete("X-Youtube-Client-Version"));if(r.logged_in&&g&&!b){let S=r.oauth;S.oauth2_tokens&&(S.shouldRefreshToken()&&await S.refreshAccessToken(),d.set("Authorization",`Bearer ${S.oauth2_tokens.access_token}`));let k=h(this,Ko);if(k){let A=Fg(k,"SAPISID");A&&(d.set("Authorization",await Vg(A)),d.set("X-Goog-Authuser",r.account_index.toString()),r.context.user.onBehalfOfUser&&d.set("X-Goog-PageId",r.context.user.onBehalfOfUser)),d.set("Cookie",k)}}let C=new ve.shim.Request(l,e instanceof ve.shim.Request?e:i),T=await h(this,As).call(this,C,{body:_,headers:d,redirect:e instanceof ve.shim.Request?e.redirect:i?.redirect||"follow",...ve.shim.runtime!=="cf-worker"?{credentials:"include"}:{}});if(T.ok)return T;throw new w(`Request to ${T.url} failed with status code ${T.status}`,await T.text())}};Go=new WeakMap;Ko=new WeakMap;As=new WeakMap;Xs=new WeakSet;iw=a(function(t,e){let i=JSON.parse(t),r=JSON.parse(JSON.stringify(e.context));F(this,Xs,sw).call(this,r,i.client);let o={...i,context:r},s=o.context.client.clientVersion,l=o.context.client.clientName,c=Wl[l];delete o.client;let u=o.context.client.clientName===z.WEB_KIDS.NAME;return{newBody:JSON.stringify(o),isWebKids:u,clientVersion:s,clientNameId:c,adjustedClientName:o.context.client.clientName}},"#processJsonPayload");nw=a(function(t,e,i){t.set("Accept","*/*"),t.set("Accept-Language","*"),t.set("X-Goog-Visitor-Id",e.context.client.visitorData||""),t.set("X-Youtube-Client-Version",e.context.client.clientVersion||"");let r=Wl[e.context.client.clientName];r&&t.set("X-Youtube-Client-Name",r),ve.shim.server&&(t.set("User-Agent",e.user_agent||""),t.set("Origin",i.origin))},"#setupCommonHeaders");sw=a(function(t,e){if(!e)return;let i=e.toUpperCase();if(!Ra.includes(i))throw new w(`Invalid client: ${e}`,{available_innertube_clients:Ra});switch(i!=="WEB"&&delete t.client.configInfo,(i==="ANDROID"||i==="YTMUSIC_ANDROID"||i==="YTSTUDIO_ANDROID")&&(t.client.androidSdkVersion=z.ANDROID.SDK_VERSION,t.client.userAgent=z.ANDROID.USER_AGENT,t.client.osName="Android",t.client.osVersion="13",t.client.platform="MOBILE"),i){case"MWEB":t.client.clientVersion=z.MWEB.VERSION,t.client.clientName=z.MWEB.NAME,t.client.clientFormFactor="SMALL_FORM_FACTOR",t.client.platform="MOBILE";break;case"IOS":t.client.deviceMake="Apple",t.client.deviceModel=z.IOS.DEVICE_MODEL,t.client.clientVersion=z.IOS.VERSION,t.client.clientName=z.IOS.NAME,t.client.platform="MOBILE",t.client.osName=z.IOS.OS_NAME,t.client.osVersion=z.IOS.OS_VERSION,delete t.client.browserName,delete t.client.browserVersion;break;case"YTMUSIC":t.client.clientVersion=z.YTMUSIC.VERSION,t.client.clientName=z.YTMUSIC.NAME;break;case"ANDROID":t.client.clientVersion=z.ANDROID.VERSION,t.client.clientFormFactor="SMALL_FORM_FACTOR",t.client.clientName=z.ANDROID.NAME;break;case"ANDROID_VR":t.client.androidSdkVersion=32,t.client.osName="Android",t.client.osVersion="12L",t.client.platform="MOBILE",t.client.userAgent=z.ANDROID_VR.USER_AGENT,t.client.deviceMake=z.ANDROID_VR.DEVICE_MAKE,t.client.deviceModel=z.ANDROID_VR.DEVICE_MODEL,t.client.clientVersion=z.ANDROID_VR.VERSION,t.client.clientFormFactor="SMALL_FORM_FACTOR",t.client.clientName=z.ANDROID_VR.NAME;break;case"YTMUSIC_ANDROID":t.client.clientVersion=z.YTMUSIC_ANDROID.VERSION,t.client.clientFormFactor="SMALL_FORM_FACTOR",t.client.clientName=z.YTMUSIC_ANDROID.NAME;break;case"YTSTUDIO_ANDROID":t.client.clientVersion=z.YTSTUDIO_ANDROID.VERSION,t.client.clientFormFactor="SMALL_FORM_FACTOR",t.client.clientName=z.YTSTUDIO_ANDROID.NAME;break;case"TV":t.client.clientVersion=z.TV.VERSION,t.client.clientName=z.TV.NAME,t.client.userAgent=z.TV.USER_AGENT;break;case"TV_SIMPLY":t.client.clientVersion=z.TV_SIMPLY.VERSION,t.client.clientName=z.TV_SIMPLY.NAME;break;case"TV_EMBEDDED":t.client.clientName=z.TV_EMBEDDED.NAME,t.client.clientVersion=z.TV_EMBEDDED.VERSION,t.client.clientScreen="EMBED",t.thirdParty={embedUrl:st.YT_BASE};break;case"YTKIDS":t.client.clientVersion=z.WEB_KIDS.VERSION,t.client.clientName=z.WEB_KIDS.NAME,t.client.kidsAppInfo={categorySettings:{enabledCategories:["approved_for_you","black_joy","camp","collections","earth","explore","favorites","gaming","halloween","hero","learning","move","music","reading","shared_by_parents","shows","soccer","sports","spotlight","winter"]},contentSettings:{corpusPreference:"KIDS_CORPUS_PREFERENCE_YOUNGER",kidsNoSearchMode:"YT_KIDS_NO_SEARCH_MODE_OFF"}};break;case"WEB_EMBEDDED":t.client.clientName=z.WEB_EMBEDDED.NAME,t.client.clientVersion=z.WEB_EMBEDDED.VERSION,t.client.clientScreen="EMBED",t.thirdParty={embedUrl:st.GOOGLE_SEARCH_BASE};break;case"WEB_CREATOR":t.client.clientName=z.WEB_CREATOR.NAME,t.client.clientVersion=z.WEB_CREATOR.VERSION;break;default:break}},"#adjustContext");a(ow,"HTTPClient");var v6=ow,co={};Ne(co,{MAGIC_HEADER:()=>ec,VERSION:()=>tc,deserialize:()=>mw,serialize:()=>fw});var Je=Uint8Array,bt=Uint16Array,Ql=Int32Array,Nr=new Je([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Fr=new Je([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Va=new Je([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rw=a(function(t,e){for(var i=new bt(31),r=0;r<31;++r)i[r]=e+=1<<t[r-1];for(var o=new Ql(i[30]),r=1;r<30;++r)for(var s=i[r];s<i[r+1];++s)o[s]=s-i[r]<<5|r;return{b:i,r:o}},"freb"),aw=rw(Nr,2),lw=aw.b,Oa=aw.r;lw[28]=258,Oa[258]=28;var cw=rw(Fr,0),b6=cw.b,Qg=cw.r,Na=new bt(32768);for(de=0;de<32768;++de)pi=(de&43690)>>1|(de&21845)<<1,pi=(pi&52428)>>2|(pi&13107)<<2,pi=(pi&61680)>>4|(pi&3855)<<4,Na[de]=((pi&65280)>>8|(pi&255)<<8)>>1;var pi,de,ai=a((function(t,e,i){for(var r=t.length,o=0,s=new bt(e);o<r;++o)t[o]&&++s[t[o]-1];var l=new bt(e);for(o=1;o<e;++o)l[o]=l[o-1]+s[o-1]<<1;var c;if(i){c=new bt(1<<e);var u=15-e;for(o=0;o<r;++o)if(t[o])for(var d=o<<4|t[o],p=e-t[o],_=l[t[o]-1]++<<p,b=_|(1<<p)-1;_<=b;++_)c[Na[_]>>u]=d}else for(c=new bt(r),o=0;o<r;++o)t[o]&&(c[o]=Na[l[t[o]-1]++]>>15-t[o]);return c}),"hMap"),zi=new Je(288);for(de=0;de<144;++de)zi[de]=8;var de;for(de=144;de<256;++de)zi[de]=9;var de;for(de=256;de<280;++de)zi[de]=7;var de;for(de=280;de<288;++de)zi[de]=8;var de,uo=new Je(32);for(de=0;de<32;++de)uo[de]=5;var de,g6=ai(zi,9,0),y6=ai(zi,9,1),w6=ai(uo,5,0),k6=ai(uo,5,1),Ea=a(function(t){for(var e=t[0],i=1;i<t.length;++i)t[i]>e&&(e=t[i]);return e},"max"),Mt=a(function(t,e,i){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&i},"bits"),Aa=a(function(t,e){var i=e/8|0;return(t[i]|t[i+1]<<8|t[i+2]<<16)>>(e&7)},"bits16"),Zl=a(function(t){return(t+7)/8|0},"shft"),uw=a(function(t,e,i){return(e==null||e<0)&&(e=0),(i==null||i>t.length)&&(i=t.length),new Je(t.subarray(e,i))},"slc"),C6=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],qt=a(function(t,e,i){var r=new Error(e||C6[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,qt),!i)throw r;return r},"err"),T6=a(function(t,e,i,r){var o=t.length,s=r?r.length:0;if(!o||e.f&&!e.l)return i||new Je(0);var l=!i,c=l||e.i!=2,u=e.i;l&&(i=new Je(o*3));var d=a(function(xi){var Pi=i.length;if(xi>Pi){var _i=new Je(Math.max(Pi*2,xi));_i.set(i),i=_i}},"cbuf"),p=e.f||0,_=e.p||0,b=e.b||0,g=e.l,C=e.d,T=e.m,S=e.n,k=o*8;do{if(!g){p=Mt(t,_,1);var A=Mt(t,_+1,3);if(_+=3,A)if(A==1)g=y6,C=k6,T=9,S=5;else if(A==2){var j=Mt(t,_,31)+257,W=Mt(t,_+10,15)+4,q=j+Mt(t,_+5,31)+1;_+=14;for(var N=new Je(q),R=new Je(19),K=0;K<W;++K)R[Va[K]]=Mt(t,_+K*3,7);_+=W*3;for(var Y=Ea(R),we=(1<<Y)-1,_e=ai(R,Y,1),K=0;K<q;){var ce=_e[Mt(t,_,we)];_+=ce&15;var I=ce>>4;if(I<16)N[K++]=I;else{var G=0,Q=0;for(I==16?(Q=3+Mt(t,_,3),_+=2,G=N[K-1]):I==17?(Q=3+Mt(t,_,7),_+=3):I==18&&(Q=11+Mt(t,_,127),_+=7);Q--;)N[K++]=G}}var pe=N.subarray(0,j),ae=N.subarray(j);T=Ea(pe),S=Ea(ae),g=ai(pe,T,1),C=ai(ae,S,1)}else qt(1);else{var I=Zl(_)+4,D=t[I-4]|t[I-3]<<8,H=I+D;if(H>o){u&&qt(0);break}c&&d(b+D),i.set(t.subarray(I,H),b),e.b=b+=D,e.p=_=H*8,e.f=p;continue}if(_>k){u&&qt(0);break}}c&&d(b+131072);for(var Ie=(1<<T)-1,J=(1<<S)-1,xe=_;;xe=_){var G=g[Aa(t,_)&Ie],fe=G>>4;if(_+=G&15,_>k){u&&qt(0);break}if(G||qt(2),fe<256)i[b++]=fe;else if(fe==256){xe=_,g=null;break}else{var ke=fe-254;if(fe>264){var K=fe-257,ne=Nr[K];ke=Mt(t,_,(1<<ne)-1)+lw[K],_+=ne}var Pe=C[Aa(t,_)&J],Ct=Pe>>4;Pe||qt(3),_+=Pe&15;var ae=b6[Ct];if(Ct>3){var ne=Fr[Ct];ae+=Aa(t,_)&(1<<ne)-1,_+=ne}if(_>k){u&&qt(0);break}c&&d(b+131072);var Ee=b+ke;if(b<ae){var di=s-ae,Zi=Math.min(ae,Ee);for(di+b<0&&qt(3);b<Zi;++b)i[b]=r[di+b]}for(;b<Ee;++b)i[b]=i[b-ae]}}e.l=g,e.p=xe,e.b=b,e.f=p,g&&(p=1,e.m=T,e.d=C,e.n=S)}while(!p);return b!=i.length&&l?uw(i,0,b):i.subarray(0,b)},"inflt"),fi=a(function(t,e,i){i<<=e&7;var r=e/8|0;t[r]|=i,t[r+1]|=i>>8},"wbits"),Ts=a(function(t,e,i){i<<=e&7;var r=e/8|0;t[r]|=i,t[r+1]|=i>>8,t[r+2]|=i>>16},"wbits16"),xa=a(function(t,e){for(var i=[],r=0;r<t.length;++r)t[r]&&i.push({s:r,f:t[r]});var o=i.length,s=i.slice();if(!o)return{t:dw,l:0};if(o==1){var l=new Je(i[0].s+1);return l[i[0].s]=1,{t:l,l:1}}i.sort(function(H,j){return H.f-j.f}),i.push({s:-1,f:25001});var c=i[0],u=i[1],d=0,p=1,_=2;for(i[0]={s:-1,f:c.f+u.f,l:c,r:u};p!=o-1;)c=i[i[d].f<i[_].f?d++:_++],u=i[d!=p&&i[d].f<i[_].f?d++:_++],i[p++]={s:-1,f:c.f+u.f,l:c,r:u};for(var b=s[0].s,r=1;r<o;++r)s[r].s>b&&(b=s[r].s);var g=new bt(b+1),C=Fa(i[p-1],g,0);if(C>e){var r=0,T=0,S=C-e,k=1<<S;for(s.sort(function(j,W){return g[W.s]-g[j.s]||j.f-W.f});r<o;++r){var A=s[r].s;if(g[A]>e)T+=k-(1<<C-g[A]),g[A]=e;else break}for(T>>=S;T>0;){var I=s[r].s;g[I]<e?T-=1<<e-g[I]++-1:++r}for(;r>=0&&T;--r){var D=s[r].s;g[D]==e&&(--g[D],++T)}C=e}return{t:new Je(g),l:C}},"hTree"),Fa=a(function(t,e,i){return t.s==-1?Math.max(Fa(t.l,e,i+1),Fa(t.r,e,i+1)):e[t.s]=i},"ln"),Zg=a(function(t){for(var e=t.length;e&&!t[--e];);for(var i=new bt(++e),r=0,o=t[0],s=1,l=a(function(u){i[r++]=u},"w"),c=1;c<=e;++c)if(t[c]==o&&c!=e)++s;else{if(!o&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(o),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(o);s=1,o=t[c]}return{c:i.subarray(0,r),n:e}},"lc"),Ss=a(function(t,e){for(var i=0,r=0;r<e.length;++r)i+=t[r]*e[r];return i},"clen"),hw=a(function(t,e,i){var r=i.length,o=Zl(e+2);t[o]=r&255,t[o+1]=r>>8,t[o+2]=t[o]^255,t[o+3]=t[o+1]^255;for(var s=0;s<r;++s)t[o+s+4]=i[s];return(o+4+r)*8},"wfblk"),ey=a(function(t,e,i,r,o,s,l,c,u,d,p){fi(e,p++,i),++o[256];for(var _=xa(o,15),b=_.t,g=_.l,C=xa(s,15),T=C.t,S=C.l,k=Zg(b),A=k.c,I=k.n,D=Zg(T),H=D.c,j=D.n,W=new bt(19),q=0;q<A.length;++q)++W[A[q]&31];for(var q=0;q<H.length;++q)++W[H[q]&31];for(var N=xa(W,7),R=N.t,K=N.l,Y=19;Y>4&&!R[Va[Y-1]];--Y);var we=d+5<<3,_e=Ss(o,zi)+Ss(s,uo)+l,ce=Ss(o,b)+Ss(s,T)+l+14+3*Y+Ss(W,R)+2*W[16]+3*W[17]+7*W[18];if(u>=0&&we<=_e&&we<=ce)return hw(e,p,t.subarray(u,u+d));var G,Q,pe,ae;if(fi(e,p,1+(ce<_e)),p+=2,ce<_e){G=ai(b,g,0),Q=b,pe=ai(T,S,0),ae=T;var Ie=ai(R,K,0);fi(e,p,I-257),fi(e,p+5,j-1),fi(e,p+10,Y-4),p+=14;for(var q=0;q<Y;++q)fi(e,p+3*q,R[Va[q]]);p+=3*Y;for(var J=[A,H],xe=0;xe<2;++xe)for(var fe=J[xe],q=0;q<fe.length;++q){var ke=fe[q]&31;fi(e,p,Ie[ke]),p+=R[ke],ke>15&&(fi(e,p,fe[q]>>5&127),p+=fe[q]>>12)}}else G=g6,Q=zi,pe=w6,ae=uo;for(var q=0;q<c;++q){var ne=r[q];if(ne>255){var ke=ne>>18&31;Ts(e,p,G[ke+257]),p+=Q[ke+257],ke>7&&(fi(e,p,ne>>23&31),p+=Nr[ke]);var Pe=ne&31;Ts(e,p,pe[Pe]),p+=ae[Pe],Pe>3&&(Ts(e,p,ne>>5&8191),p+=Fr[Pe])}else Ts(e,p,G[ne]),p+=Q[ne]}return Ts(e,p,G[256]),p+Q[256]},"wblk"),S6=new Ql([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),dw=new Je(0),I6=a(function(t,e,i,r,o,s){var l=s.z||t.length,c=new Je(r+l+5*(1+Math.ceil(l/7e3))+o),u=c.subarray(r,c.length-o),d=s.l,p=(s.r||0)&7;if(e){p&&(u[0]=s.r>>3);for(var _=S6[e-1],b=_>>13,g=_&8191,C=(1<<i)-1,T=s.p||new bt(32768),S=s.h||new bt(C+1),k=Math.ceil(i/3),A=2*k,I=a(function(Dn){return(t[Dn]^t[Dn+1]<<k^t[Dn+2]<<A)&C},"hsh"),D=new Ql(25e3),H=new bt(288),j=new bt(32),W=0,q=0,N=s.i||0,R=0,K=s.w||0,Y=0;N+2<l;++N){var we=I(N),_e=N&32767,ce=S[we];if(T[_e]=ce,S[we]=_e,K<=N){var G=l-N;if((W>7e3||R>24576)&&(G>423||!d)){p=ey(t,u,0,D,H,j,q,R,Y,N-Y,p),R=W=q=0,Y=N;for(var Q=0;Q<286;++Q)H[Q]=0;for(var Q=0;Q<30;++Q)j[Q]=0}var pe=2,ae=0,Ie=g,J=_e-ce&32767;if(G>2&&we==I(N-J))for(var xe=Math.min(b,G)-1,fe=Math.min(32767,N),ke=Math.min(258,G);J<=fe&&--Ie&&_e!=ce;){if(t[N+pe]==t[N+pe-J]){for(var ne=0;ne<ke&&t[N+ne]==t[N+ne-J];++ne);if(ne>pe){if(pe=ne,ae=J,ne>xe)break;for(var Pe=Math.min(J,ne-2),Ct=0,Q=0;Q<Pe;++Q){var Ee=N-J+Q&32767,di=T[Ee],Zi=Ee-di&32767;Zi>Ct&&(Ct=Zi,ce=Ee)}}}_e=ce,ce=T[_e],J+=_e-ce&32767}if(ae){D[R++]=268435456|Oa[pe]<<18|Qg[ae];var xi=Oa[pe]&31,Pi=Qg[ae]&31;q+=Nr[xi]+Fr[Pi],++H[257+xi],++j[Pi],K=N+pe,++W}else D[R++]=t[N],++H[t[N]]}}for(N=Math.max(N,K);N<l;++N)D[R++]=t[N],++H[t[N]];p=ey(t,u,d,D,H,j,q,R,Y,N-Y,p),d||(s.r=p&7|u[p/8|0]<<3,p-=7,s.h=S,s.p=T,s.i=N,s.w=K)}else{for(var N=s.w||0;N<l+d;N+=65535){var _i=N+65535;_i>=l&&(u[p/8|0]=d,_i=l),p=hw(u,p+1,t.subarray(N,_i))}s.i=l}return uw(c,0,r+Zl(p)+o)},"dflt"),E6=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var i=e,r=9;--r;)i=(i&1&&-306674912)^i>>>1;t[e]=i}return t})(),A6=a(function(){var t=-1;return{p:a(function(e){for(var i=t,r=0;r<e.length;++r)i=E6[i&255^e[r]]^i>>>8;t=i},"p"),d:a(function(){return~t},"d")}},"crc"),x6=a(function(t,e,i,r,o){if(!o&&(o={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),l=new Je(s.length+t.length);l.set(s),l.set(t,s.length),t=l,o.w=s.length}return I6(t,e.level==null?6:e.level,e.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,i,r,o)},"dopt"),Ua=a(function(t,e,i){for(;i;++e)t[e]=i,i>>>=8},"wbytes"),P6=a(function(t,e){var i=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Ua(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),i){t[3]=8;for(var r=0;r<=i.length;++r)t[r+10]=i.charCodeAt(r)}},"gzh"),M6=a(function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&qt(6,"invalid gzip data");var e=t[3],i=10;e&4&&(i+=(t[10]|t[11]<<8)+2);for(var r=(e>>3&1)+(e>>4&1);r>0;r-=!t[i++]);return i+(e&2)},"gzs"),R6=a(function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},"gzl"),D6=a(function(t){return 10+(t.filename?t.filename.length+1:0)},"gzhl");function _w(t,e){e||(e={});var i=A6(),r=t.length;i.p(t);var o=x6(t,e,D6(e),8),s=o.length;return P6(o,e),Ua(o,s-8,i.d()),Ua(o,s-4,r),o}a(_w,"gzipSync");function pw(t,e){var i=M6(t);return i+8>t.length&&qt(6,"invalid gzip data"),T6(t.subarray(i,-8),{i:2},e&&e.out||new Je(R6(t)),e&&e.dictionary)}a(pw,"gunzipSync");var B6=typeof TextDecoder<"u"&&new TextDecoder,L6=0;try{B6.decode(dw,{stream:!0}),L6=1}catch{}var ec=5849684,tc=2;function fw(t){let e=JSON.stringify(t),i=new TextEncoder().encode(e),r=_w(i),o=new ArrayBuffer(12+r.byteLength),s=new DataView(o);return s.setUint32(0,ec,!0),s.setUint32(4,tc,!0),s.setUint32(8,r.byteLength,!0),new Uint8Array(o).set(r,12),o}a(fw,"serialize");function mw(t){if(t.byteLength<12)throw new Error("Invalid binary format: buffer too short");let e=new DataView(t.buffer,t.byteOffset,t.byteLength);if(e.getUint32(0,!0)!==ec)throw new Error("Invalid binary format: magic header mismatch");let r=e.getUint32(4,!0);if(r!==tc)throw new Error(`Unsupported binary format version: ${r}`);let o=e.getUint32(8,!0);if(12+o>t.byteLength)throw new Error("Invalid binary format: data length out of bounds");let s=t.subarray(12,12+o),l=pw(s),c=new TextDecoder().decode(l);return JSON.parse(c)}a(mw,"deserialize");var ic={};Ne(ic,{decodeVisitorData:()=>ak,encodeCommentActionParams:()=>Hr,encodeNextParams:()=>lk,encodeVisitorData:()=>rk});function vw(){let t=0,e=0;for(let r=0;r<28;r+=7){let o=this.buf[this.pos++];if(t|=(o&127)<<r,(o&128)==0)return this.assertBounds(),[t,e]}let i=this.buf[this.pos++];if(t|=(i&15)<<28,e=(i&112)>>4,(i&128)==0)return this.assertBounds(),[t,e];for(let r=3;r<=31;r+=7){let o=this.buf[this.pos++];if(e|=(o&127)<<r,(o&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}a(vw,"varint64read");function Yo(t,e,i){for(let s=0;s<28;s=s+7){let l=t>>>s,c=!(!(l>>>7)&&e==0),u=(c?l|128:l)&255;if(i.push(u),!c)return}let r=t>>>28&15|(e&7)<<4,o=e>>3!=0;if(i.push((o?r|128:r)&255),!!o){for(let s=3;s<31;s=s+7){let l=e>>>s,c=!!(l>>>7),u=(c?l|128:l)&255;if(i.push(u),!c)return}i.push(e>>>31&1)}}a(Yo,"varint64write");var zo=4294967296;function Ha(t){let e=t[0]==="-";e&&(t=t.slice(1));let i=1e6,r=0,o=0;function s(l,c){let u=Number(t.slice(l,c));o*=i,r=r*i+u,r>=zo&&(o=o+(r/zo|0),r=r%zo)}return a(s,"add1e6digit"),s(-24,-18),s(-18,-12),s(-12,-6),s(-6),e?sc(r,o):Ur(r,o)}a(Ha,"int64FromString");function bw(t,e){let i=Ur(t,e),r=i.hi&2147483648;r&&(i=sc(i.lo,i.hi));let o=nc(i.lo,i.hi);return r?"-"+o:o}a(bw,"int64ToString");function nc(t,e){if({lo:t,hi:e}=gw(t,e),e<=2097151)return String(zo*e+t);let i=t&16777215,r=(t>>>24|e<<8)&16777215,o=e>>16&65535,s=i+r*6777216+o*6710656,l=r+o*8147497,c=o*2,u=1e7;return s>=u&&(l+=Math.floor(s/u),s%=u),l>=u&&(c+=Math.floor(l/u),l%=u),c.toString()+ty(l)+ty(s)}a(nc,"uInt64ToString");function gw(t,e){return{lo:t>>>0,hi:e>>>0}}a(gw,"toUnsigned");function Ur(t,e){return{lo:t|0,hi:e|0}}a(Ur,"newBits");function sc(t,e){return e=~e,t?t=~t+1:e+=1,Ur(t,e)}a(sc,"negate");var ty=a(t=>{let e=String(t);return"0000000".slice(e.length)+e},"decimalFrom1e7WithLeadingZeros");function Wa(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let i=0;i<9;i++)e.push(t&127|128),t=t>>7;e.push(1)}}a(Wa,"varint32write");function yw(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let i=5;(t&128)!==0&&i<10;i++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}a(yw,"varint32read");var ri=ww();function ww(){let t=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"&&(!!globalThis.Deno||typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){let i=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),o=BigInt("0"),s=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let c=typeof l=="bigint"?l:BigInt(l);if(c>r||c<i)throw new Error(`invalid int64: ${l}`);return c},uParse(l){let c=typeof l=="bigint"?l:BigInt(l);if(c>s||c<o)throw new Error(`invalid uint64: ${l}`);return c},enc(l){return t.setBigInt64(0,this.parse(l),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(l){return t.setBigInt64(0,this.uParse(l),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(l,c){return t.setInt32(0,l,!0),t.setInt32(4,c,!0),t.getBigInt64(0,!0)},uDec(l,c){return t.setInt32(0,l,!0),t.setInt32(4,c,!0),t.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),qa(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),ja(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),qa(i),Ha(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),ja(i),Ha(i)},dec(i,r){return bw(i,r)},uDec(i,r){return nc(i,r)}}}a(ww,"makeInt64Support");function qa(t){if(!/^-?[0-9]+$/.test(t))throw new Error("invalid int64: "+t)}a(qa,"assertInt64String");function ja(t){if(!/^[0-9]+$/.test(t))throw new Error("invalid uint64: "+t)}a(ja,"assertUInt64String");var Pa=Symbol.for("@bufbuild/protobuf/text-encoding");function oc(){if(globalThis[Pa]==null){let t=new globalThis.TextEncoder,e=new globalThis.TextDecoder,i;globalThis[Pa]={encodeUtf8(r){return t.encode(r)},decodeUtf8(r,o){return o?(i===void 0&&(i=new globalThis.TextDecoder("utf-8",{fatal:!0})),i.decode(r)):e.decode(r)},checkUtf8(r){try{return encodeURIComponent(r),!0}catch{return!1}}}}return globalThis[Pa]}a(oc,"getTextEncoding");var Ui;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(Ui||(Ui={}));var V6=34028234663852886e22,O6=-34028234663852886e22,N6=4294967295,F6=2147483647,U6=-2147483648,kw=class{constructor(e=oc().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let o=0;o<this.chunks.length;o++)e+=this.chunks[o].length;let i=new Uint8Array(e),r=0;for(let o=0;o<this.chunks.length;o++)i.set(this.chunks[o],r),r+=this.chunks[o].length;return this.chunks=[],i}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),i=this.stack.pop();if(!i)throw new Error("invalid state, fork stack empty");return this.chunks=i.chunks,this.buf=i.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,i){return this.uint32((e<<3|i)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(Ga(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return $o(e),Wa(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let i=this.encodeUtf8(e);return this.uint32(i.byteLength),this.raw(i)}float(e){Tw(e);let i=new Uint8Array(4);return new DataView(i.buffer).setFloat32(0,e,!0),this.raw(i)}double(e){let i=new Uint8Array(8);return new DataView(i.buffer).setFloat64(0,e,!0),this.raw(i)}fixed32(e){Ga(e);let i=new Uint8Array(4);return new DataView(i.buffer).setUint32(0,e,!0),this.raw(i)}sfixed32(e){$o(e);let i=new Uint8Array(4);return new DataView(i.buffer).setInt32(0,e,!0),this.raw(i)}sint32(e){return $o(e),e=(e<<1^e>>31)>>>0,Wa(e,this.buf),this}sfixed64(e){let i=new Uint8Array(8),r=new DataView(i.buffer),o=ri.enc(e);return r.setInt32(0,o.lo,!0),r.setInt32(4,o.hi,!0),this.raw(i)}fixed64(e){let i=new Uint8Array(8),r=new DataView(i.buffer),o=ri.uEnc(e);return r.setInt32(0,o.lo,!0),r.setInt32(4,o.hi,!0),this.raw(i)}int64(e){let i=ri.enc(e);return Yo(i.lo,i.hi,this.buf),this}sint64(e){let i=ri.enc(e),r=i.hi>>31,o=i.lo<<1^r,s=(i.hi<<1|i.lo>>>31)^r;return Yo(o,s,this.buf),this}uint64(e){let i=ri.uEnc(e);return Yo(i.lo,i.hi,this.buf),this}};a(kw,"BinaryWriter");var O=kw,Cw=class{constructor(e,i=oc().decodeUtf8){this.decodeUtf8=i,this.varint64=vw,this.uint32=yw,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,i=this.uint32(),r=this.pos-e;if(r>5||r==5&&this.buf[this.pos-1]>15)throw new Error("illegal tag: varint overflows uint32");let o=i>>>3,s=i&7;if(o<=0||s>5)throw new Error("illegal tag: field no "+o+" wire type "+s);return[o,s]}skip(e,i){let r=this.pos;switch(e){case Ui.Varint:for(;this.buf[this.pos++]&128;);break;case Ui.Bit64:this.pos+=4;case Ui.Bit32:this.pos+=4;break;case Ui.LengthDelimited:let o=this.uint32();this.pos+=o;break;case Ui.StartGroup:for(;;){let[s,l]=this.tag();if(l===Ui.EndGroup){if(i!==void 0&&s!==i)throw new Error("invalid end group tag");break}this.skip(l,s)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return ri.dec(...this.varint64())}uint64(){return ri.uDec(...this.varint64())}sint64(){let[e,i]=this.varint64(),r=-(e&1);return e=(e>>>1|(i&1)<<31)^r,i=i>>>1^r,ri.dec(e,i)}bool(){let[e,i]=this.varint64();return e!==0||i!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ri.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ri.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),i=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(i,i+e)}string(e){return this.decodeUtf8(this.bytes(),e)}};a(Cw,"BinaryReader");var E=Cw;function $o(t){if(typeof t=="string")t=Number(t);else if(typeof t!="number")throw new Error("invalid int32: "+typeof t);if(!Number.isInteger(t)||t>F6||t<U6)throw new Error("invalid int32: "+t)}a($o,"assertInt32");function Ga(t){if(typeof t=="string")t=Number(t);else if(typeof t!="number")throw new Error("invalid uint32: "+typeof t);if(!Number.isInteger(t)||t>N6||t<0)throw new Error("invalid uint32: "+t)}a(Ga,"assertUInt32");function Tw(t){if(typeof t=="string"){let e=t;if(t=Number(t),Number.isNaN(t)&&e!=="NaN")throw new Error("invalid float32: "+e)}else if(typeof t!="number")throw new Error("invalid float32: "+typeof t);if(Number.isFinite(t)&&(t>V6||t<O6))throw new Error("invalid float32: "+t)}a(Tw,"assertFloat32");var H6={RELEVANCE:0,0:"RELEVANCE",POPULARITY:3,3:"POPULARITY",UNRECOGNIZED:-1,"-1":"UNRECOGNIZED"},W6={ANY_DATE:0,0:"ANY_DATE",TODAY:2,2:"TODAY",WEEK:3,3:"WEEK",MONTH:4,4:"MONTH",YEAR:5,5:"YEAR",UNRECOGNIZED:-1,"-1":"UNRECOGNIZED"},q6={ANY_TYPE:0,0:"ANY_TYPE",VIDEO:1,1:"VIDEO",CHANNEL:2,2:"CHANNEL",PLAYLIST:3,3:"PLAYLIST",MOVIE:4,4:"MOVIE",SHORTS:9,9:"SHORTS",UNRECOGNIZED:-1,"-1":"UNRECOGNIZED"},j6={ANY_DURATION:0,0:"ANY_DURATION",OVER_TWENTY_MINS:2,2:"OVER_TWENTY_MINS",UNDER_THREE_MINS:4,4:"UNDER_THREE_MINS",THREE_TO_TWENTY_MINS:5,5:"THREE_TO_TWENTY_MINS",UNRECOGNIZED:-1,"-1":"UNRECOGNIZED"};function Sw(){return{id:"",timestamp:0}}a(Sw,"createBaseVisitorData");var Iw={encode(t,e=new O){return t.id!==""&&e.uint32(10).string(t.id),t.timestamp!==0&&e.uint32(40).int32(t.timestamp),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Sw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.id=i.string();continue}case 5:{if(s!==40)break;o.timestamp=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Ew(){return{prioritize:void 0,filters:void 0}}a(Ew,"createBaseSearchFilter");var Aw={encode(t,e=new O){return t.prioritize!==void 0&&e.uint32(8).int32(t.prioritize),t.filters!==void 0&&iy.encode(t.filters,e.uint32(18).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Ew();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.prioritize=i.int32();continue}case 2:{if(s!==18)break;o.filters=iy.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function xw(){return{uploadDate:void 0,type:void 0,duration:void 0,musicSearchType:void 0,featuresHd:void 0,featuresSubtitles:void 0,featuresCreativeCommons:void 0,features3d:void 0,featuresLive:void 0,featuresPurchased:void 0,features4k:void 0,features360:void 0,featuresLocation:void 0,featuresHdr:void 0,featuresVr180:void 0}}a(xw,"createBaseSearchFilter_Filters");var iy={encode(t,e=new O){return t.uploadDate!==void 0&&e.uint32(8).int32(t.uploadDate),t.type!==void 0&&e.uint32(16).int32(t.type),t.duration!==void 0&&e.uint32(24).int32(t.duration),t.musicSearchType!==void 0&&ny.encode(t.musicSearchType,e.uint32(138).fork()).join(),t.featuresHd!==void 0&&e.uint32(32).bool(t.featuresHd),t.featuresSubtitles!==void 0&&e.uint32(40).bool(t.featuresSubtitles),t.featuresCreativeCommons!==void 0&&e.uint32(48).bool(t.featuresCreativeCommons),t.features3d!==void 0&&e.uint32(56).bool(t.features3d),t.featuresLive!==void 0&&e.uint32(64).bool(t.featuresLive),t.featuresPurchased!==void 0&&e.uint32(72).bool(t.featuresPurchased),t.features4k!==void 0&&e.uint32(112).bool(t.features4k),t.features360!==void 0&&e.uint32(120).bool(t.features360),t.featuresLocation!==void 0&&e.uint32(184).bool(t.featuresLocation),t.featuresHdr!==void 0&&e.uint32(200).bool(t.featuresHdr),t.featuresVr180!==void 0&&e.uint32(208).bool(t.featuresVr180),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=xw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.uploadDate=i.int32();continue}case 2:{if(s!==16)break;o.type=i.int32();continue}case 3:{if(s!==24)break;o.duration=i.int32();continue}case 17:{if(s!==138)break;o.musicSearchType=ny.decode(i,i.uint32());continue}case 4:{if(s!==32)break;o.featuresHd=i.bool();continue}case 5:{if(s!==40)break;o.featuresSubtitles=i.bool();continue}case 6:{if(s!==48)break;o.featuresCreativeCommons=i.bool();continue}case 7:{if(s!==56)break;o.features3d=i.bool();continue}case 8:{if(s!==64)break;o.featuresLive=i.bool();continue}case 9:{if(s!==72)break;o.featuresPurchased=i.bool();continue}case 14:{if(s!==112)break;o.features4k=i.bool();continue}case 15:{if(s!==120)break;o.features360=i.bool();continue}case 23:{if(s!==184)break;o.featuresLocation=i.bool();continue}case 25:{if(s!==200)break;o.featuresHdr=i.bool();continue}case 26:{if(s!==208)break;o.featuresVr180=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Pw(){return{song:void 0,video:void 0,album:void 0,artist:void 0,playlist:void 0}}a(Pw,"createBaseSearchFilter_Filters_MusicSearchType");var ny={encode(t,e=new O){return t.song!==void 0&&e.uint32(8).bool(t.song),t.video!==void 0&&e.uint32(16).bool(t.video),t.album!==void 0&&e.uint32(24).bool(t.album),t.artist!==void 0&&e.uint32(32).bool(t.artist),t.playlist!==void 0&&e.uint32(40).bool(t.playlist),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Pw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.song=i.bool();continue}case 2:{if(s!==16)break;o.video=i.bool();continue}case 3:{if(s!==24)break;o.album=i.bool();continue}case 4:{if(s!==32)break;o.artist=i.bool();continue}case 5:{if(s!==40)break;o.playlist=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Mw(){return{channelId:"",prefId:void 0,number0:void 0,number1:void 0}}a(Mw,"createBaseNotificationPreferences");var G6={encode(t,e=new O){return t.channelId!==""&&e.uint32(10).string(t.channelId),t.prefId!==void 0&&sy.encode(t.prefId,e.uint32(18).fork()).join(),t.number0!==void 0&&e.uint32(24).int32(t.number0),t.number1!==void 0&&e.uint32(32).int32(t.number1),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Mw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.channelId=i.string();continue}case 2:{if(s!==18)break;o.prefId=sy.decode(i,i.uint32());continue}case 3:{if(s!==24)break;o.number0=i.int32();continue}case 4:{if(s!==32)break;o.number1=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Rw(){return{index:0}}a(Rw,"createBaseNotificationPreferences_Preference");var sy={encode(t,e=new O){return t.index!==0&&e.uint32(8).int32(t.index),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Rw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.index=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Dw(){return{params:void 0,number0:void 0,number1:void 0}}a(Dw,"createBaseLiveMessageParams");var K6={encode(t,e=new O){return t.params!==void 0&&oy.encode(t.params,e.uint32(10).fork()).join(),t.number0!==void 0&&e.uint32(16).int32(t.number0),t.number1!==void 0&&e.uint32(24).int32(t.number1),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Dw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.params=oy.decode(i,i.uint32());continue}case 2:{if(s!==16)break;o.number0=i.int32();continue}case 3:{if(s!==24)break;o.number1=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Bw(){return{ids:void 0}}a(Bw,"createBaseLiveMessageParams_Params");var oy={encode(t,e=new O){return t.ids!==void 0&&ry.encode(t.ids,e.uint32(42).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Bw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 5:{if(s!==42)break;o.ids=ry.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Lw(){return{channelId:"",videoId:""}}a(Lw,"createBaseLiveMessageParams_Params_Ids");var ry={encode(t,e=new O){return t.channelId!==""&&e.uint32(10).string(t.channelId),t.videoId!==""&&e.uint32(18).string(t.videoId),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Lw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.channelId=i.string();continue}case 2:{if(s!==18)break;o.videoId=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Vw(){return{ctx:void 0,unkParam:0,params:void 0}}a(Vw,"createBaseGetCommentsSectionParams");var Y6={encode(t,e=new O){return t.ctx!==void 0&&ay.encode(t.ctx,e.uint32(18).fork()).join(),t.unkParam!==0&&e.uint32(24).int32(t.unkParam),t.params!==void 0&&ly.encode(t.params,e.uint32(50).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Vw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==18)break;o.ctx=ay.decode(i,i.uint32());continue}case 3:{if(s!==24)break;o.unkParam=i.int32();continue}case 6:{if(s!==50)break;o.params=ly.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Ow(){return{videoId:""}}a(Ow,"createBaseGetCommentsSectionParams_Context");var ay={encode(t,e=new O){return t.videoId!==""&&e.uint32(18).string(t.videoId),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Ow();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==18)break;o.videoId=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Nw(){return{unkToken:void 0,opts:void 0,repliesOpts:void 0,page:void 0,target:""}}a(Nw,"createBaseGetCommentsSectionParams_Params");var ly={encode(t,e=new O){return t.unkToken!==void 0&&e.uint32(10).string(t.unkToken),t.opts!==void 0&&cy.encode(t.opts,e.uint32(34).fork()).join(),t.repliesOpts!==void 0&&uy.encode(t.repliesOpts,e.uint32(26).fork()).join(),t.page!==void 0&&e.uint32(40).int32(t.page),t.target!==""&&e.uint32(66).string(t.target),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Nw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.unkToken=i.string();continue}case 4:{if(s!==34)break;o.opts=cy.decode(i,i.uint32());continue}case 3:{if(s!==26)break;o.repliesOpts=uy.decode(i,i.uint32());continue}case 5:{if(s!==40)break;o.page=i.int32();continue}case 8:{if(s!==66)break;o.target=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Fw(){return{videoId:"",sortBy:0,type:0,commentId:void 0}}a(Fw,"createBaseGetCommentsSectionParams_Params_Options");var cy={encode(t,e=new O){return t.videoId!==""&&e.uint32(34).string(t.videoId),t.sortBy!==0&&e.uint32(48).int32(t.sortBy),t.type!==0&&e.uint32(120).int32(t.type),t.commentId!==void 0&&e.uint32(130).string(t.commentId),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Fw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 4:{if(s!==34)break;o.videoId=i.string();continue}case 6:{if(s!==48)break;o.sortBy=i.int32();continue}case 15:{if(s!==120)break;o.type=i.int32();continue}case 16:{if(s!==130)break;o.commentId=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Uw(){return{commentId:"",unkopts:void 0,channelId:void 0,videoId:"",unkParam1:0,unkParam2:0}}a(Uw,"createBaseGetCommentsSectionParams_Params_RepliesOptions");var uy={encode(t,e=new O){return t.commentId!==""&&e.uint32(18).string(t.commentId),t.unkopts!==void 0&&hy.encode(t.unkopts,e.uint32(34).fork()).join(),t.channelId!==void 0&&e.uint32(42).string(t.channelId),t.videoId!==""&&e.uint32(50).string(t.videoId),t.unkParam1!==0&&e.uint32(64).int32(t.unkParam1),t.unkParam2!==0&&e.uint32(72).int32(t.unkParam2),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Uw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==18)break;o.commentId=i.string();continue}case 4:{if(s!==34)break;o.unkopts=hy.decode(i,i.uint32());continue}case 5:{if(s!==42)break;o.channelId=i.string();continue}case 6:{if(s!==50)break;o.videoId=i.string();continue}case 8:{if(s!==64)break;o.unkParam1=i.int32();continue}case 9:{if(s!==72)break;o.unkParam2=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Hw(){return{unkParam:0}}a(Hw,"createBaseGetCommentsSectionParams_Params_RepliesOptions_UnkOpts");var hy={encode(t,e=new O){return t.unkParam!==0&&e.uint32(8).int32(t.unkParam),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Hw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.unkParam=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Ww(){return{videoId:"",params:void 0,number:0}}a(Ww,"createBaseCreateCommentParams");var z6={encode(t,e=new O){return t.videoId!==""&&e.uint32(18).string(t.videoId),t.params!==void 0&&dy.encode(t.params,e.uint32(42).fork()).join(),t.number!==0&&e.uint32(80).int32(t.number),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Ww();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==18)break;o.videoId=i.string();continue}case 5:{if(s!==42)break;o.params=dy.decode(i,i.uint32());continue}case 10:{if(s!==80)break;o.number=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function qw(){return{index:0}}a(qw,"createBaseCreateCommentParams_Params");var dy={encode(t,e=new O){return t.index!==0&&e.uint32(8).int32(t.index),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=qw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.index=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function jw(){return{type:0,commentId:"",videoId:"",unkNum:void 0,channelId:void 0,translateCommentParams:void 0}}a(jw,"createBasePeformCommentActionParams");var $6={encode(t,e=new O){return t.type!==0&&e.uint32(8).int32(t.type),t.commentId!==""&&e.uint32(26).string(t.commentId),t.videoId!==""&&e.uint32(42).string(t.videoId),t.unkNum!==void 0&&e.uint32(16).int32(t.unkNum),t.channelId!==void 0&&e.uint32(186).string(t.channelId),t.translateCommentParams!==void 0&&_y.encode(t.translateCommentParams,e.uint32(250).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=jw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.type=i.int32();continue}case 3:{if(s!==26)break;o.commentId=i.string();continue}case 5:{if(s!==42)break;o.videoId=i.string();continue}case 2:{if(s!==16)break;o.unkNum=i.int32();continue}case 23:{if(s!==186)break;o.channelId=i.string();continue}case 31:{if(s!==250)break;o.translateCommentParams=_y.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Gw(){return{params:void 0,commentId:"",targetLanguage:""}}a(Gw,"createBasePeformCommentActionParams_TranslateCommentParams");var _y={encode(t,e=new O){return t.params!==void 0&&py.encode(t.params,e.uint32(26).fork()).join(),t.commentId!==""&&e.uint32(18).string(t.commentId),t.targetLanguage!==""&&e.uint32(34).string(t.targetLanguage),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Gw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 3:{if(s!==26)break;o.params=py.decode(i,i.uint32());continue}case 2:{if(s!==18)break;o.commentId=i.string();continue}case 4:{if(s!==34)break;o.targetLanguage=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Kw(){return{comment:void 0}}a(Kw,"createBasePeformCommentActionParams_TranslateCommentParams_Params");var py={encode(t,e=new O){return t.comment!==void 0&&fy.encode(t.comment,e.uint32(10).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Kw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.comment=fy.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Yw(){return{text:""}}a(Yw,"createBasePeformCommentActionParams_TranslateCommentParams_Params_Comment");var fy={encode(t,e=new O){return t.text!==""&&e.uint32(10).string(t.text),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Yw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.text=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function zw(){return{params:void 0}}a(zw,"createBaseHashtag");var J6={encode(t,e=new O){return t.params!==void 0&&my.encode(t.params,e.uint32(746).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=zw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 93:{if(s!==746)break;o.params=my.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function $w(){return{hashtag:"",type:0}}a($w,"createBaseHashtag_Params");var my={encode(t,e=new O){return t.hashtag!==""&&e.uint32(10).string(t.hashtag),t.type!==0&&e.uint32(24).int32(t.type),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=$w();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.hashtag=i.string();continue}case 3:{if(s!==24)break;o.type=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Jw(){return{shortId:"",params:void 0,feature2:0,feature3:0}}a(Jw,"createBaseReelSequence");var X6={encode(t,e=new O){return t.shortId!==""&&e.uint32(10).string(t.shortId),t.params!==void 0&&vy.encode(t.params,e.uint32(42).fork()).join(),t.feature2!==0&&e.uint32(80).int32(t.feature2),t.feature3!==0&&e.uint32(104).int32(t.feature3),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Jw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.shortId=i.string();continue}case 5:{if(s!==42)break;o.params=vy.decode(i,i.uint32());continue}case 10:{if(s!==80)break;o.feature2=i.int32();continue}case 13:{if(s!==104)break;o.feature3=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Xw(){return{number:0}}a(Xw,"createBaseReelSequence_Params");var vy={encode(t,e=new O){return t.number!==0&&e.uint32(24).int32(t.number),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Xw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 3:{if(s!==24)break;o.number=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Qw(){return{videoId:[],playlistTitle:void 0}}a(Qw,"createBaseNextParams");var Q6={encode(t,e=new O){for(let i of t.videoId)e.uint32(42).string(i);return t.playlistTitle!==void 0&&e.uint32(50).string(t.playlistTitle),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Qw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 5:{if(s!==42)break;o.videoId.push(i.string());continue}case 6:{if(s!==50)break;o.playlistTitle=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Zw(){return{f1:void 0}}a(Zw,"createBaseCommunityPostParams");var Z6={encode(t,e=new O){return t.f1!==void 0&&by.encode(t.f1,e.uint32(450).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Zw();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 56:{if(s!==450)break;o.f1=by.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function ek(){return{ucid1:"",postId:"",ucid2:""}}a(ek,"createBaseCommunityPostParams_Field1");var by={encode(t,e=new O){return t.ucid1!==""&&e.uint32(18).string(t.ucid1),t.postId!==""&&e.uint32(26).string(t.postId),t.ucid2!==""&&e.uint32(90).string(t.ucid2),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ek();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==18)break;o.ucid1=i.string();continue}case 3:{if(s!==26)break;o.postId=i.string();continue}case 11:{if(s!==90)break;o.ucid2=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function tk(){return{f0:void 0}}a(tk,"createBaseCommunityPostCommentsParamContainer");var eP={encode(t,e=new O){return t.f0!==void 0&&gy.encode(t.f0,e.uint32(641815778).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=tk();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 80226972:{if(s!==641815778)break;o.f0=gy.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function ik(){return{location:"",protoData:""}}a(ik,"createBaseCommunityPostCommentsParamContainer_Container");var gy={encode(t,e=new O){return t.location!==""&&e.uint32(18).string(t.location),t.protoData!==""&&e.uint32(26).string(t.protoData),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ik();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==18)break;o.location=i.string();continue}case 3:{if(s!==26)break;o.protoData=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function nk(){return{title:"",commentDataContainer:void 0}}a(nk,"createBaseCommunityPostCommentsParam");var tP={encode(t,e=new O){return t.title!==""&&e.uint32(18).string(t.title),t.commentDataContainer!==void 0&&yy.encode(t.commentDataContainer,e.uint32(426).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=nk();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==18)break;o.title=i.string();continue}case 53:{if(s!==426)break;o.commentDataContainer=yy.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function sk(){return{commentData:void 0,f0:0,title:""}}a(sk,"createBaseCommunityPostCommentsParam_CommentDataContainer");var yy={encode(t,e=new O){return t.commentData!==void 0&&wy.encode(t.commentData,e.uint32(34).fork()).join(),t.f0!==0&&e.uint32(56).int32(t.f0),t.title!==""&&e.uint32(66).string(t.title),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=sk();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 4:{if(s!==34)break;o.commentData=wy.decode(i,i.uint32());continue}case 7:{if(s!==56)break;o.f0=i.int32();continue}case 8:{if(s!==66)break;o.title=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function ok(){return{sortBy:0,f0:0,f1:0,postId:"",channelId:""}}a(ok,"createBaseCommunityPostCommentsParam_CommentDataContainer_CommentData");var wy={encode(t,e=new O){return t.sortBy!==0&&e.uint32(48).int32(t.sortBy),t.f0!==0&&e.uint32(120).int32(t.f0),t.f1!==0&&e.uint32(200).int32(t.f1),t.postId!==""&&e.uint32(234).string(t.postId),t.channelId!==""&&e.uint32(242).string(t.channelId),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ok();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 6:{if(s!==48)break;o.sortBy=i.int32();continue}case 15:{if(s!==120)break;o.f0=i.int32();continue}case 25:{if(s!==200)break;o.f1=i.int32();continue}case 29:{if(s!==234)break;o.postId=i.string();continue}case 30:{if(s!==242)break;o.channelId=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function rk(t,e){let i=Iw.encode({id:t,timestamp:e});return encodeURIComponent(nt(i.finish()).replace(/\+/g,"-").replace(/\//g,"_"))}a(rk,"encodeVisitorData");function ak(t){return Iw.decode(Ia(decodeURIComponent(t).replace(/-/g,"+").replace(/_/g,"/")))}a(ak,"decodeVisitorData");function Hr(t,e={}){let i={type:t,commentId:e.comment_id||" ",videoId:e.video_id||" ",channelId:" ",unkNum:2};if(e.hasOwnProperty("text")){if(typeof e.target_language!="string")throw new Error("target_language must be a string");e.comment_id&&delete i.unkNum,i.translateCommentParams={params:{comment:{text:e.text}},commentId:e.comment_id||" ",targetLanguage:e.target_language}}let r=$6.encode(i);return encodeURIComponent(nt(r.finish()))}a(Hr,"encodeCommentActionParams");function lk(t,e){let i=Q6.encode({videoId:t,playlistTitle:e});return encodeURIComponent(nt(i.finish()).replace(/\+/g,"-").replace(/\//g,"_"))}a(lk,"encodeNextParams");var iP={};Ne(iP,{WALK_STOP:()=>gr,createWrapperFunction:()=>lc,extractNodeSource:()=>wn,getNodeSourceRange:()=>rc,indent:()=>Ve,jsBuiltIns:()=>yn,memberBaseName:()=>ac,memberToString:()=>Kt,walkAst:()=>Wr});var gr=Symbol("WALK_STOP"),yn=new Set(["AbortController","AbortSignal","Array","ArrayBuffer","AsyncContext","Atomics","AudioContext","BigInt","BigInt64Array","BigUint64Array","Blob","Boolean","BroadcastChannel","Buffer","CanvasRenderingContext2D","clearImmediate","clearInterval","clearTimeout","confirm","console","Crypto","CustomEvent","DataView","Date","decodeURI","decodeURIComponent","document","Element","encodeURI","encodeURIComponent","Error","escape","eval","Event","EventTarget","fetch","File","FileReader","Float32Array","Float64Array","FormData","function","global","globalThis","hasOwnProperty","Headers","History","HTMLElement","HTMLCollection","IDBKeyRange","Infinity","Int16Array","Int32Array","Int8Array","Intl","IntersectionObserver","isFinite","isNaN","isPrototypeOf","JSON","location","log","Map","Math","MediaRecorder","MediaSource","MediaStream","MemberExpression","MutationObserver","NaN","navigator","Node","NodeList","Number","Object","OfflineAudioContext","parse","parseFloat","parseInt","Performance","process","Promise","prompt","prototype","Proxy","ReadableStream","Reflect","RegExp","requestAnimationFrame","requestIdleCallback","Request","Response","ResizeObserver","Screen","setImmediate","setInterval","setTimeout","SharedArrayBuffer","SharedWorker","SourceBuffer","split","String","stringify","structuredClone","SubtleCrypto","Symbol","TextDecoder","TextEncoder","this","toString","TransformStream","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","URL","URLSearchParams","valueOf","WeakMap","WeakSet","WebAssembly","WebGLRenderingContext","window","Worker","WritableStream","XMLHttpRequest","alert","arguments","atob","btoa","cancelAnimationFrame","cancelIdleCallback","queueMicrotask"]),Ve=" ";function Wr(t,e){var i,r;if(!t||typeof t!="object")return;let o=[{node:t,parent:null,exit:!1}],s=[],l=typeof e=="function"?e:(i=e.enter)!=null?i:null,c=typeof e=="function"?null:(r=e.leave)!=null?r:null,u=!1;for(;!u&&o.length>0;){let d=o.pop(),{node:p,parent:_,exit:b}=d;if(b){s.pop(),c&&c(p,_,s)===gr&&(u=!0);continue}if(!p||typeof p.type!="string")continue;let g=l?l(p,_,s):void 0;if(g===gr){u=!0;continue}if(g!==!0){o.push({node:p,parent:_,exit:!0}),s.push(p);for(let C in p){if(C==="loc"||C==="range"||C==="start"||C==="end"||!Object.prototype.hasOwnProperty.call(p,C))continue;let T=p[C];if(T)if(Array.isArray(T))for(let S=T.length-1;S>=0;S--){let k=T[S];k&&typeof k.type=="string"&&o.push({node:k,parent:p,exit:!1})}else typeof T=="object"&&typeof T.type=="string"&&o.push({node:T,parent:p,exit:!1})}}}}a(Wr,"walkAst");function rc(t){return t?Array.isArray(t.range)?t.range:typeof t.start=="number"&&typeof t.end=="number"?[t.start,t.end]:null:null}a(rc,"getNodeSourceRange");function wn(t,e){let i=rc(t);return i?e.slice(i[0],i[1]):null}a(wn,"extractNodeSource");function Kt(t,e){if(t.type!=="MemberExpression")return null;let i=[],r=t;for(;r&&r.type==="MemberExpression";){let s=r,l=s.property;if(!l)return null;if(s.computed){let c=wn(l,e);if(!c)return null;i.unshift(`[${c.trim()}]`)}else{if(l.type!=="Identifier")return null;i.unshift(`.${l.name}`)}r=s.object}let o=null;return r?.type==="Identifier"?o=r.name:r?.type==="ThisExpression"&&(o="this"),o?o+i.join(""):null}a(Kt,"memberToString");function ac(t,e){let i=t.object;for(;i&&i.type==="MemberExpression";){let r=Kt(i,e);if(r)return r;i=i.object}return i?.type==="Identifier"?i.name:i?.type==="ThisExpression"?"this":null}a(ac,"memberBaseName");function lc(t,e,i){var r;if(i.type==="CallExpression"&&i.callee.type==="Identifier"&&t.declaredVariables.has(i.callee.name))return Jo(e,i.callee.name,Xo(t,i.arguments));if(i.type==="VariableDeclarator"&&((r=i.init)==null?void 0:r.type)==="FunctionExpression"&&i.id.type==="Identifier")return Jo(e,i.id.name,Xo(t,i.init.params));if(i.type==="NewExpression"&&i.callee.type==="MemberExpression"&&i.callee.object.type==="Identifier"){let o=Kt(i.callee,t.getSource());return o?Jo(e,o,Xo(t,i.arguments),!0):void 0}}a(lc,"createWrapperFunction");function Jo(t,e,i,r=!1){return[`${Ve}function ${t}(${i.join(", ")}) {`,`${Ve}${Ve}return ${r?"new ":""}${e}(${i.join(", ")});`,`${Ve}}`].join(`
`)}a(Jo,"generateWrapper");function Xo(t,e){let i=[];for(let r of e)if(r.type==="Identifier"&&t.declaredVariables.has(r.name))i.push(r.name);else if(r.type==="Literal"&&(typeof r.value=="string"||typeof r.value=="number"))i.push(JSON.stringify(r.value));else if(r.type==="UnaryExpression"){let o=wn(r,t.getSource());o&&i.push(o.trim())}else r.type==="AssignmentPattern"&&r.left.type==="Identifier"?i.push(r.left.name):r.type==="Identifier"?i.push(r.name):i.includes("input")||i.push("input");return i}a(Xo,"parseFunctionArguments");var nP={};Ne(nP,{nsigMatcher:()=>cc,timestampMatcher:()=>uc});function cc(t){if(t.type!=="VariableDeclarator")return!1;let e=t.init;if(!e||e.type!=="FunctionExpression"||e.params.length<3)return!1;let[i,r,o]=e.params;if(i.type!=="Identifier"||r.type!=="AssignmentPattern"||o.type!=="AssignmentPattern")return!1;let s=e.body,l=s?.body||[],c=!1,u=!1;for(let d of l){if(d.type!=="ExpressionStatement")continue;let p=d.expression;if(p.type==="AssignmentExpression"&&p.operator==="="&&p.left.type==="Identifier"&&p.left.name===i.name){let _=p.right;_.type==="NewExpression"&&_.callee.type==="MemberExpression"&&(c=!0)}if(p.type==="CallExpression"&&p.callee.type==="MemberExpression"){let _=p.arguments;_.length===2&&_[0].type==="Literal"&&_[0].value==="alr"&&_[1].type==="Literal"&&_[1].value==="yes"&&(u=!0)}}return!c||!u?!1:t}a(cc,"nsigMatcher");function uc(t){var e;if(t.type!=="VariableDeclarator"||((e=t.init)==null?void 0:e.type)!=="FunctionExpression")return!1;let i=t.init.body;if(!i)return!1;let r=null;return Wr(i,o=>{if(o.type==="ObjectExpression"){for(let s of o.properties)if(s.type==="Property"&&s.key.type==="Identifier"&&s.key.name==="signatureTimestamp")return r=s,gr}}),r||!1}a(uc,"timestampMatcher");var ck=((t,e)=>{let i=new Uint32Array(69632),r=0,o=0;for(;r<2571;){let s=t[r++];if(s<0)o-=s;else{let l=t[r++];s&2&&(l=e[l]),s&1?i.fill(l,o,o+=t[r++]):i[o++]=l}}return i})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,63,2,64,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,65,2,0,0,4294836735,0,3221225471,0,4294901942,2,66,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,18,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,60,2,7,2,6,0,4286611199,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,0,65472,2,3,0,4093640191,0,660618719,0,65487,0,4294828015,0,4092591615,0,1616920031,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,71,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,72,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,10,2,0,2,15,2,22,3,0,10,2,74,2,0,2,75,2,76,2,77,2,0,2,78,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,79,2,5,3,0,2,2,80,0,2151677951,2,29,2,9,0,909311,3,0,2,0,814743551,2,49,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,110,2,51,2,0,2,81,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,17,-1,3,0,2,2,53,0,1046528,3,0,3,2,9,2,0,2,54,0,4294960127,2,10,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,82,2,10,2,0,2,83,2,84,2,85,0,12288,2,55,0,1048577,2,86,2,14,-1,2,14,0,131042,2,87,2,88,2,89,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,90,2,2,0,-16,2,91,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,17,2,0,-1,2,18,-16,3,0,206,-2,3,0,692,2,73,-1,2,18,2,10,3,0,8,2,93,2,133,2,0,0,3220242431,3,0,3,2,19,2,94,2,95,3,0,2,2,96,2,0,2,97,2,46,2,0,0,4351,2,0,2,9,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,9,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,101,2,102,2,22,2,23,3,0,3,0,67057663,3,0,349,2,103,2,104,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,105,2,106,3,0,2,2,19,2,107,3,0,10,2,10,2,18,2,0,2,47,2,0,2,31,2,108,2,25,0,1638399,0,57344,2,109,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,111,-1,2,112,2,113,2,114,-1,3,0,3,2,12,-2,2,0,2,29,-3,0,536870912,-4,2,20,2,0,2,36,0,1,2,0,2,67,2,6,2,12,2,10,2,0,2,115,-1,3,0,4,2,10,2,23,2,116,2,7,2,0,2,117,2,0,2,118,2,119,2,120,2,0,2,9,3,0,9,2,21,2,30,2,31,2,121,2,122,-2,2,123,2,124,2,30,2,21,2,8,-2,2,125,2,30,2,32,-2,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,48,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,57,0,4026531840,2,20,2,43,2,36,2,18,2,37,2,18,2,126,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,144,2,0,2,58,2,56,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,61,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,134,0,4190109695,2,52,-2,2,135,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,68,2,18,2,0,2,42,-6,2,0,2,45,2,59,2,44,2,45,2,46,2,47,0,8388351,-2,2,136,0,3028287487,2,48,2,138,0,33259519,2,49,-9,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,69,-2,3,0,28,2,32,-3,3,0,3,2,17,3,0,6,2,50,-81,2,18,3,0,2,2,36,3,0,33,2,25,2,30,3,0,124,2,12,3,0,18,2,38,-213,2,0,2,32,-54,3,0,17,2,42,2,8,2,23,2,0,2,8,2,23,2,51,2,0,2,21,2,52,2,139,2,25,-13,2,0,2,53,-6,3,0,2,-4,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,196635,3,0,191,2,54,3,0,38,2,30,2,55,2,34,-278,2,140,3,0,9,2,141,2,142,2,56,3,0,11,2,7,-72,3,0,3,2,143,0,1677656575,-130,2,26,-16,2,0,2,24,2,38,-16,0,4161266656,0,4071,0,15360,-4,2,57,-13,3,0,2,2,58,2,0,2,145,2,146,2,62,2,0,2,147,2,148,2,149,3,0,10,2,150,2,151,2,22,3,58,2,3,152,2,3,59,2,0,4294954999,2,0,-16,2,0,2,92,2,0,0,2105343,0,4160749584,0,65534,-34,2,8,2,154,-6,0,4194303871,0,4294903771,2,0,2,60,2,100,-3,2,0,0,1073684479,0,17407,-9,2,18,2,17,2,0,2,32,-14,2,18,2,32,-6,2,18,2,12,-15,2,155,3,0,6,0,8323103,-1,3,0,2,2,61,-37,2,62,2,156,2,157,2,158,2,159,2,160,-105,2,26,-32,3,0,1335,-1,3,0,129,2,32,3,0,6,2,10,3,0,180,2,161,3,0,233,2,162,3,0,18,2,10,-77,3,0,16,2,10,-47,3,0,154,2,6,3,0,130,2,25,-22250,3,0,7,2,25,-6130,3,5,2,-1,0,69207040,3,44,2,3,0,14,2,63,2,64,-3,0,3168731136,0,4294956864,2,1,2,0,2,41,3,0,4,0,4294966275,3,0,4,2,16,2,65,2,0,2,34,-1,2,18,2,66,-1,2,0,0,2047,0,4294885376,3,0,2,0,3145727,0,2617294944,0,4294770688,2,25,2,67,3,0,2,0,131135,2,98,0,70256639,0,71303167,0,272,2,42,2,6,0,32511,2,0,2,49,-1,2,99,2,68,0,4278255616,0,4294836227,0,4294549473,0,600178175,0,2952806400,0,268632067,0,4294543328,0,57540095,0,1577058304,0,1835008,0,4294688736,2,70,2,69,0,33554435,2,131,2,70,0,2952790016,0,131075,0,3594373096,0,67094296,2,69,-1,0,4294828e3,0,603979263,0,654311424,0,3,0,4294828001,0,602930687,0,1610612736,0,393219,0,4294828016,0,671088639,0,2154840064,0,4227858435,0,4236247008,2,71,2,38,-1,2,4,0,917503,2,38,-1,2,72,0,537788335,0,4026531935,-1,0,1,-1,2,33,2,73,0,7936,-3,2,0,0,2147485695,0,1010761728,0,4292984930,0,16387,2,0,2,15,2,22,3,0,10,2,74,2,0,2,75,2,76,2,77,2,0,2,78,2,0,2,12,-1,2,25,3,0,2,2,13,2,4,3,0,18,2,79,2,5,3,0,2,2,80,0,2147745791,3,19,2,0,122879,2,0,2,9,0,276824064,-2,3,0,2,2,42,2,0,0,4294903295,2,0,2,30,2,8,-1,2,18,2,51,2,0,2,81,2,49,-1,2,21,2,0,2,29,-2,0,128,-2,2,28,2,9,0,8160,-1,2,127,0,4227907585,2,0,2,37,2,0,2,50,0,4227915776,2,10,2,6,2,11,-1,0,74440192,3,0,6,-2,3,0,8,2,13,2,0,2,82,2,10,2,0,2,83,2,84,2,85,-3,2,86,2,14,-3,2,87,2,88,2,89,2,0,2,34,-83,3,0,7,0,817183,2,0,2,15,2,0,0,33023,2,21,3,90,2,-17,2,91,0,524157950,2,4,2,0,2,92,2,4,2,0,2,22,2,28,2,16,3,0,2,2,17,2,0,-1,2,18,-16,3,0,206,-2,3,0,692,2,73,-1,2,18,2,10,3,0,8,2,93,0,3072,2,0,0,2147516415,2,10,3,0,2,2,25,2,94,2,95,3,0,2,2,96,2,0,2,97,2,46,0,4294965179,0,7,2,0,2,9,2,95,2,9,-1,0,1761345536,2,98,0,4294901823,2,38,2,20,2,99,2,35,2,100,0,2080440287,2,0,2,34,2,153,0,3296722943,2,0,0,1046675455,0,939524101,0,1837055,2,101,2,102,2,22,2,23,3,0,3,0,7,3,0,349,2,103,2,104,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,2700607615,2,105,2,106,3,0,2,2,19,2,107,3,0,10,2,10,2,18,2,0,2,47,2,0,2,31,2,108,-3,2,109,3,0,3,2,20,-1,3,5,2,2,110,2,0,2,8,2,111,-1,2,112,2,113,2,114,-1,3,0,3,2,12,-2,2,0,2,29,-8,2,20,2,0,2,36,-1,2,0,2,67,2,6,2,30,2,10,2,0,2,115,-1,3,0,4,2,10,2,18,2,116,2,7,2,0,2,117,2,0,2,118,2,119,2,120,2,0,2,9,3,0,9,2,21,2,30,2,31,2,121,2,122,-2,2,123,2,124,2,30,2,21,2,8,-2,2,125,2,30,2,32,-2,2,0,2,39,-2,0,4277075969,2,30,-1,3,20,2,-1,2,33,2,126,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,50,2,98,0,4294934591,2,37,-7,2,0,0,197631,2,57,-1,2,20,2,43,2,37,2,18,0,3,2,18,2,126,2,21,2,127,2,54,-1,0,2490368,2,127,2,25,2,18,2,34,2,127,2,38,0,4294901904,0,4718591,2,127,2,35,0,335544350,-1,2,128,0,2147487743,0,1,-1,2,129,2,130,2,8,-1,2,131,2,70,0,3758161920,0,3,2,132,0,12582911,0,655360,-1,2,0,2,29,0,2147485568,0,3,2,0,2,25,0,176,-5,2,0,2,17,0,251658240,-1,2,0,2,25,0,16,-1,2,0,0,16779263,-2,2,12,-1,2,38,-5,2,0,2,133,-3,3,0,2,2,55,2,134,0,2147549183,0,2,-2,2,135,2,36,0,10,0,4294965249,0,67633151,0,4026597376,2,0,0,536871935,2,18,2,0,2,42,-6,2,0,0,1,2,59,2,17,0,1,2,46,2,25,-3,2,136,2,36,2,137,2,138,0,16778239,-10,2,35,0,4294836212,2,9,-3,2,69,-2,3,0,28,2,32,-3,3,0,3,2,17,3,0,6,2,50,-81,2,18,3,0,2,2,36,3,0,33,2,25,0,126,3,0,124,2,12,3,0,18,2,38,-213,2,10,-55,3,0,17,2,42,2,8,2,18,2,0,2,8,2,18,2,60,2,0,2,25,2,50,2,139,2,25,-13,2,0,2,73,-6,3,0,2,-4,3,0,2,0,67583,-1,2,107,-2,0,11,3,0,191,2,54,3,0,38,2,30,2,55,2,34,-278,2,140,3,0,9,2,141,2,142,2,56,3,0,11,2,7,-72,3,0,3,2,143,2,144,-187,3,0,2,2,58,2,0,2,145,2,146,2,62,2,0,2,147,2,148,2,149,3,0,10,2,150,2,151,2,22,3,58,2,3,152,2,3,59,2,2,153,-57,2,8,2,154,-7,2,18,2,0,2,60,-4,2,0,0,1065361407,0,16384,-9,2,18,2,60,2,0,2,133,-14,2,18,2,133,-6,2,18,0,81919,-15,2,155,3,0,6,2,126,-1,3,0,2,0,2063,-37,2,62,2,156,2,157,2,158,2,159,2,160,-138,3,0,1335,-1,3,0,129,2,32,3,0,6,2,10,3,0,180,2,161,3,0,233,2,162,3,0,18,2,10,-77,3,0,16,2,10,-47,3,0,154,2,6,3,0,130,2,25,-28386],[4294967295,4294967291,4092460543,4294828031,4294967294,134217726,4294903807,268435455,2147483647,1048575,1073741823,3892314111,134217727,1061158911,536805376,4294910143,4294901759,32767,4294901760,262143,536870911,8388607,4160749567,4294902783,4294918143,65535,67043328,2281701374,4294967264,2097151,4194303,255,67108863,4294967039,511,524287,131071,63,127,3238002687,4294549487,4290772991,33554431,4294901888,4286578687,67043329,4294705152,4294770687,67043583,1023,15,2047999,67043343,67051519,16777215,2147483648,4294902e3,28,4292870143,4294966783,16383,67047423,4294967279,262083,20511,41943039,493567,4294959104,603979775,65536,602799615,805044223,4294965206,8191,1031749119,4294917631,2134769663,4286578493,4282253311,4294942719,33540095,4294905855,2868854591,1608515583,265232348,534519807,2147614720,1060109444,4093640016,17376,2139062143,224,4169138175,4294909951,4286578688,4294967292,4294965759,535511039,4294966272,4294967280,32768,8289918,4294934399,4294901775,4294965375,1602223615,4294967259,4294443008,268369920,4292804608,4294967232,486341884,4294963199,3087007615,1073692671,4128527,4279238655,4294902015,4160684047,4290246655,469499899,4294967231,134086655,4294966591,2445279231,3670015,31,4294967288,4294705151,3221208447,4294902271,4294549472,4294921215,4095,4285526655,4294966527,4294966143,64,4294966719,3774873592,1877934080,262151,2555904,536807423,67043839,3758096383,3959414372,3755993023,2080374783,4294835295,4294967103,4160749565,4294934527,4087,2016,2147446655,184024726,2862017156,1593309078,268434431,268434414,4294901763,4294901761]),sP=a(t=>(ck[(t>>>5)+0]>>>t&31&1)!==0,"isIDContinue"),uk=a(t=>(ck[(t>>>5)+34816]>>>t&31&1)!==0,"isIDStart");function B(t){return t.column++,t.currentChar=t.source.charCodeAt(++t.index)}a(B,"advanceChar");function qr(t){let e=t.currentChar;if((e&64512)!==55296)return 0;let i=t.source.charCodeAt(t.index+1);return(i&64512)!==56320?0:65536+((e&1023)<<10)+(i&1023)}a(qr,"consumePossibleSurrogatePair");function jr(t,e){t.currentChar=t.source.charCodeAt(++t.index),t.flags|=1,(e&4)===0&&(t.column=0,t.line++)}a(jr,"consumeLineFeed");function $i(t){t.flags|=1,t.currentChar=t.source.charCodeAt(++t.index),t.column=0,t.line++}a($i,"scanNewLine");function hk(t){return t===160||t===65279||t===133||t===5760||t>=8192&&t<=8203||t===8239||t===8287||t===12288||t===8201||t===65519}a(hk,"isExoticECMAScriptWhitespace");function dt(t){return t<65?t-48:t-65+10&15}a(dt,"toHex");function dk(t){switch(t){case 134283266:return"NumericLiteral";case 134283267:return"StringLiteral";case 86021:case 86022:return"BooleanLiteral";case 86023:return"NullLiteral";case 65540:return"RegularExpression";case 67174408:case 67174409:case 131:return"TemplateLiteral";default:return(t&143360)===143360?"Identifier":(t&4096)===4096?"Keyword":"Punctuator"}}a(dk,"convertTokenType");var Z=[0,0,0,0,0,0,0,0,0,0,1032,0,0,2056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,3,0,0,8192,0,0,0,256,0,33024,0,0,242,242,114,114,114,114,114,114,594,594,0,0,16384,0,0,0,0,67,67,67,67,67,67,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,0,0,4099,0,71,71,71,71,71,71,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,16384,0,0,0,0],oP=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],_k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0];function ho(t){return t<=127?oP[t]>0:uk(t)}a(ho,"isIdentifierStart");function Qs(t){return t<=127?_k[t]>0:sP(t)||t===8204||t===8205}a(Qs,"isIdentifierPart");var pk=["SingleLine","MultiLine","HTMLOpen","HTMLClose","HashbangComment"];function fk(t){let{source:e}=t;t.currentChar===35&&e.charCodeAt(t.index+1)===33&&(B(t),B(t),Gr(t,e,0,4,t.tokenStart))}a(fk,"skipHashBang");function Ka(t,e,i,r,o,s){return r&2&&t.report(0),Gr(t,e,i,o,s)}a(Ka,"skipSingleHTMLComment");function Gr(t,e,i,r,o){let{index:s}=t;for(t.tokenIndex=t.index,t.tokenLine=t.line,t.tokenColumn=t.column;t.index<t.end;){if(Z[t.currentChar]&8){let l=t.currentChar===13;$i(t),l&&t.index<t.end&&t.currentChar===10&&(t.currentChar=e.charCodeAt(++t.index));break}else if((t.currentChar^8232)<=1){$i(t);break}B(t),t.tokenIndex=t.index,t.tokenLine=t.line,t.tokenColumn=t.column}if(t.options.onComment){let l={start:{line:o.line,column:o.column},end:{line:t.tokenLine,column:t.tokenColumn}};t.options.onComment(pk[r&255],e.slice(s,t.tokenIndex),o.index,t.tokenIndex,l)}return i|1}a(Gr,"skipSingleLineComment");function mk(t,e,i){let{index:r}=t;for(;t.index<t.end;)if(t.currentChar<43){let o=!1;for(;t.currentChar===42;)if(o||(i&=-5,o=!0),B(t)===47){if(B(t),t.options.onComment){let s={start:{line:t.tokenLine,column:t.tokenColumn},end:{line:t.line,column:t.column}};t.options.onComment(pk[1],e.slice(r,t.index-2),r-2,t.index,s)}return t.tokenIndex=t.index,t.tokenLine=t.line,t.tokenColumn=t.column,i}if(o)continue;Z[t.currentChar]&8?t.currentChar===13?(i|=5,$i(t)):(jr(t,i),i=i&-5|1):B(t)}else(t.currentChar^8232)<=1?(i=i&-5|1,$i(t)):(i&=-5,B(t));t.report(18)}a(mk,"skipMultiLineComment");var Hi;(function(t){t[t.Empty=0]="Empty",t[t.Escape=1]="Escape",t[t.Class=2]="Class"})(Hi||(Hi={}));var Le;(function(t){t[t.Empty=0]="Empty",t[t.IgnoreCase=1]="IgnoreCase",t[t.Global=2]="Global",t[t.Multiline=4]="Multiline",t[t.Unicode=16]="Unicode",t[t.Sticky=8]="Sticky",t[t.DotAll=32]="DotAll",t[t.Indices=64]="Indices",t[t.UnicodeSets=128]="UnicodeSets"})(Le||(Le={}));function vk(t){let e=t.index,i=Hi.Empty;e:for(;;){let d=t.currentChar;if(B(t),i&Hi.Escape)i&=~Hi.Escape;else switch(d){case 47:if(i)break;break e;case 92:i|=Hi.Escape;break;case 91:i|=Hi.Class;break;case 93:i&=Hi.Escape;break}if((d===13||d===10||d===8232||d===8233)&&t.report(34),t.index>=t.source.length)return t.report(34)}let r=t.index-1,o=Le.Empty,s=t.currentChar,{index:l}=t;for(;Qs(s);){switch(s){case 103:o&Le.Global&&t.report(36,"g"),o|=Le.Global;break;case 105:o&Le.IgnoreCase&&t.report(36,"i"),o|=Le.IgnoreCase;break;case 109:o&Le.Multiline&&t.report(36,"m"),o|=Le.Multiline;break;case 117:o&Le.Unicode&&t.report(36,"u"),o&Le.UnicodeSets&&t.report(36,"vu"),o|=Le.Unicode;break;case 118:o&Le.Unicode&&t.report(36,"uv"),o&Le.UnicodeSets&&t.report(36,"v"),o|=Le.UnicodeSets;break;case 121:o&Le.Sticky&&t.report(36,"y"),o|=Le.Sticky;break;case 115:o&Le.DotAll&&t.report(36,"s"),o|=Le.DotAll;break;case 100:o&Le.Indices&&t.report(36,"d"),o|=Le.Indices;break;default:t.report(35)}s=B(t)}let c=t.source.slice(l,t.index),u=t.source.slice(e,r);return t.tokenRegExp={pattern:u,flags:c},t.options.raw&&(t.tokenRaw=t.source.slice(t.tokenIndex,t.index)),t.tokenValue=bk(t,u,c),65540}a(vk,"scanRegularExpression");function bk(t,e,i){try{return new RegExp(e,i)}catch{try{return new RegExp(e,i),null}catch{t.report(34)}}}a(bk,"validate");function gk(t,e,i){let{index:r}=t,o="",s=B(t),l=t.index;for(;(Z[s]&8)===0;){if(s===i)return o+=t.source.slice(l,t.index),B(t),t.options.raw&&(t.tokenRaw=t.source.slice(r,t.index)),t.tokenValue=o,134283267;if((s&8)===8&&s===92){if(o+=t.source.slice(l,t.index),s=B(t),s<127||s===8232||s===8233){let c=hc(t,e,s);c>=0?o+=String.fromCodePoint(c):dc(t,c,0)}else o+=String.fromCodePoint(s);l=t.index+1}else(s===8232||s===8233)&&(t.column=-1,t.line++);t.index>=t.end&&t.report(16),s=B(t)}t.report(16)}a(gk,"scanString");function hc(t,e,i,r=0){switch(i){case 98:return 8;case 102:return 12;case 114:return 13;case 110:return 10;case 116:return 9;case 118:return 11;case 13:if(t.index<t.end){let o=t.source.charCodeAt(t.index+1);o===10&&(t.index=t.index+1,t.currentChar=o)}case 10:case 8232:case 8233:return t.column=-1,t.line++,-1;case 48:case 49:case 50:case 51:{let o=i-48,s=t.index+1,l=t.column+1;if(s<t.end){let c=t.source.charCodeAt(s);if((Z[c]&32)===0){if(o!==0||Z[c]&512){if(e&1||r)return-2;t.flags|=64}}else{if(e&1||r)return-2;if(t.currentChar=c,o=o<<3|c-48,s++,l++,s<t.end){let u=t.source.charCodeAt(s);Z[u]&32&&(t.currentChar=u,o=o<<3|u-48,s++,l++)}t.flags|=64}t.index=s-1,t.column=l-1}return o}case 52:case 53:case 54:case 55:{if(r||e&1)return-2;let o=i-48,s=t.index+1,l=t.column+1;if(s<t.end){let c=t.source.charCodeAt(s);Z[c]&32&&(o=o<<3|c-48,t.currentChar=c,t.index=s,t.column=l)}return t.flags|=64,o}case 120:{let o=B(t);if((Z[o]&64)===0)return-4;let s=dt(o),l=B(t);if((Z[l]&64)===0)return-4;let c=dt(l);return s<<4|c}case 117:{let o=B(t);if(t.currentChar===123){let s=0;for(;(Z[B(t)]&64)!==0;)if(s=s<<4|dt(t.currentChar),s>1114111)return-5;return t.currentChar<1||t.currentChar!==125?-4:s}else{if((Z[o]&64)===0)return-4;let s=t.source.charCodeAt(t.index+1);if((Z[s]&64)===0)return-4;let l=t.source.charCodeAt(t.index+2);if((Z[l]&64)===0)return-4;let c=t.source.charCodeAt(t.index+3);return(Z[c]&64)===0?-4:(t.index+=3,t.column+=3,t.currentChar=t.source.charCodeAt(t.index),dt(o)<<12|dt(s)<<8|dt(l)<<4|dt(c))}}case 56:case 57:if(r||!t.options.webcompat||e&1)return-3;t.flags|=4096;default:return i}}a(hc,"parseEscape");function dc(t,e,i){switch(e){case-1:return;case-2:t.report(i?2:1);case-3:t.report(i?3:14);case-4:t.report(7);case-5:t.report(104)}}a(dc,"handleStringError");function _c(t,e){let{index:i}=t,r=67174409,o="",s=B(t);for(;s!==96;){if(s===36&&t.source.charCodeAt(t.index+1)===123){B(t),r=67174408;break}else if(s===92)if(s=B(t),s>126)o+=String.fromCodePoint(s);else{let{index:l,line:c,column:u}=t,d=hc(t,e|1,s,1);if(d>=0)o+=String.fromCodePoint(d);else if(d!==-1&&e&64){t.index=l,t.line=c,t.column=u,o=null,s=yk(t,s),s<0&&(r=67174408);break}else dc(t,d,1)}else t.index<t.end&&(s===13&&t.source.charCodeAt(t.index)===10&&(o+=String.fromCodePoint(s),t.currentChar=t.source.charCodeAt(++t.index)),((s&83)<3&&s===10||(s^8232)<=1)&&(t.column=-1,t.line++),o+=String.fromCodePoint(s));t.index>=t.end&&t.report(17),s=B(t)}return B(t),t.tokenValue=o,t.tokenRaw=t.source.slice(i+1,t.index-(r===67174409?1:2)),r}a(_c,"scanTemplate");function yk(t,e){for(;e!==96;){switch(e){case 36:{let i=t.index+1;if(i<t.end&&t.source.charCodeAt(i)===123)return t.index=i,t.column++,-e;break}case 10:case 8232:case 8233:t.column=-1,t.line++}t.index>=t.end&&t.report(17),e=B(t)}return e}a(yk,"scanBadTemplate");function wk(t,e){return t.index>=t.end&&t.report(0),t.index--,t.column--,_c(t,e)}a(wk,"scanTemplateTail");var rP={0:"Unexpected token",30:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"\\8 and \\9 are not allowed in template strings",4:"Private identifier #%0 is not defined",5:"Illegal Unicode escape sequence",6:"Invalid code point %0",7:"Invalid hexadecimal escape sequence",9:"Octal literals are not allowed in strict mode",8:"Decimal integer literals with a leading zero are forbidden in strict mode",10:"Expected number in radix %0",151:"Invalid left-hand side assignment to a destructible right-hand side",11:"Non-number found after exponent indicator",12:"Invalid BigIntLiteral",13:"No identifiers allowed directly after numeric literal",14:"Escapes \\8 or \\9 are not syntactically valid escapes",15:"Escapes \\8 or \\9 are not allowed in strict mode",16:"Unterminated string literal",17:"Unterminated template literal",18:"Multiline comment was not closed properly",19:"The identifier contained dynamic unicode escape that was not closed",20:"Illegal character '%0'",21:"Missing hexadecimal digits",22:"Invalid implicit octal",23:"Invalid line break in string literal",24:"Only unicode escapes are legal in identifier names",25:"Expected '%0'",26:"Invalid left-hand side in assignment",27:"Invalid left-hand side in async arrow",28:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',29:"Member access on super must be in a method",31:"Await expression not allowed in formal parameter",32:"Yield expression not allowed in formal parameter",95:"Unexpected token: 'escaped keyword'",33:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",123:"Async functions can only be declared at the top level or inside a block",34:"Unterminated regular expression",35:"Unexpected regular expression flag",36:"Duplicate regular expression flag '%0'",37:"%0 functions must have exactly %1 argument%2",38:"Setter function argument must not be a rest parameter",39:"%0 declaration must have a name in this context",40:"Function name may not contain any reserved words or be eval or arguments in strict mode",41:"The rest operator is missing an argument",42:"A getter cannot be a generator",43:"A setter cannot be a generator",44:"A computed property name must be followed by a colon or paren",134:"Object literal keys that are strings or numbers must be a method or have a colon",46:"Found `* async x(){}` but this should be `async * x(){}`",45:"Getters and setters can not be generators",47:"'%0' can not be generator method",48:"No line break is allowed after '=>'",49:"The left-hand side of the arrow can only be destructed through assignment",50:"The binding declaration is not destructible",51:"Async arrow can not be followed by new expression",52:"Classes may not have a static property named 'prototype'",53:"Class constructor may not be a %0",54:"Duplicate constructor method in class",55:"Invalid increment/decrement operand",56:"Invalid use of `new` keyword on an increment/decrement expression",57:"`=>` is an invalid assignment target",58:"Rest element may not have a trailing comma",59:"Missing initializer in %0 declaration",60:"'for-%0' loop head declarations can not have an initializer",61:"Invalid left-hand side in for-%0 loop: Must have a single binding",62:"Invalid shorthand property initializer",63:"Property name __proto__ appears more than once in object literal",64:"Let is disallowed as a lexically bound name",65:"Invalid use of '%0' inside new expression",66:"Illegal 'use strict' directive in function with non-simple parameter list",67:'Identifier "let" disallowed as left-hand side expression in strict mode',68:"Illegal continue statement",69:"Illegal break statement",70:"Cannot have `let[...]` as a var name in strict mode",71:"Invalid destructuring assignment target",72:"Rest parameter may not have a default initializer",73:"The rest argument must the be last parameter",74:"Invalid rest argument",76:"In strict mode code, functions can only be declared at top level or inside a block",77:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",78:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",79:"Class declaration can't appear in single-statement context",80:"Invalid left-hand side in for-%0",81:"Invalid assignment in for-%0",82:"for await (... of ...) is only valid in async functions and async generators",83:"The first token after the template expression should be a continuation of the template",85:"`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",84:"`let \n [` is a restricted production at the start of a statement",86:"Catch clause requires exactly one parameter, not more (and no trailing comma)",87:"Catch clause parameter does not support default values",88:"Missing catch or finally after try",89:"More than one default clause in switch statement",90:"Illegal newline after throw",91:"Strict mode code may not include a with statement",92:"Illegal return statement",93:"The left hand side of the for-header binding declaration is not destructible",94:"new.target only allowed within functions or static blocks",96:"'#' not followed by identifier",102:"Invalid keyword",101:"Can not use 'let' as a class name",100:"'A lexical declaration can't define a 'let' binding",99:"Can not use `let` as variable name in strict mode",97:"'%0' may not be used as an identifier in this context",98:"Await is only valid in async functions",103:"The %0 keyword can only be used with the module goal",104:"Unicode codepoint must not be greater than 0x10FFFF",105:"%0 source must be string",106:"Only a identifier or string can be used to indicate alias",107:"Only '*' or '{...}' can be imported after default",108:"Trailing decorator may be followed by method",109:"Decorators can't be used with a constructor",110:"Can not use `await` as identifier in module or async func",111:"Can not use `await` as identifier in module",112:"HTML comments are only allowed with web compatibility (Annex B)",113:"The identifier 'let' must not be in expression position in strict mode",114:"Cannot assign to `eval` and `arguments` in strict mode",115:"The left-hand side of a for-of loop may not start with 'let'",116:"Block body arrows can not be immediately invoked without a group",117:"Block body arrows can not be immediately accessed without a group",118:"Unexpected strict mode reserved word",119:"Unexpected eval or arguments in strict mode",120:"Decorators must not be followed by a semicolon",121:"Calling delete on expression not allowed in strict mode",122:"Pattern can not have a tail",124:"Can not have a `yield` expression on the left side of a ternary",125:"An arrow function can not have a postfix update operator",126:"Invalid object literal key character after generator star",127:"Private fields can not be deleted",129:"Classes may not have a field called constructor",128:"Classes may not have a private element named constructor",130:"A class field initializer or static block may not contain arguments",131:"Generators can only be declared at the top level or inside a block",132:"Async methods are a restricted production and cannot have a newline following it",133:"Unexpected character after object literal property name",135:"Invalid key token",136:"Label '%0' has already been declared",137:"continue statement must be nested within an iteration statement",138:"Undefined label '%0'",139:"Trailing comma is disallowed inside import(...) arguments",140:"Invalid binding in JSON import",141:"import() requires exactly one argument",142:"Cannot use new with import(...)",143:"... is not allowed in import()",144:"Expected '=>'",145:"Duplicate binding '%0'",146:"Duplicate private identifier #%0",147:"Cannot export a duplicate name '%0'",150:"Duplicate %0 for-binding",148:"Exported binding '%0' needs to refer to a top-level declared variable",149:"Unexpected private field",153:"Numeric separators are not allowed at the end of numeric literals",152:"Only one underscore is allowed as numeric separator",154:"JSX value should be either an expression or a quoted JSX text",155:"Expected corresponding JSX closing tag for %0",156:"Adjacent JSX elements must be wrapped in an enclosing tag",157:"JSX attributes must only be assigned a non-empty 'expression'",158:"'%0' has already been declared",159:"'%0' shadowed a catch clause binding",160:"Dot property must be an identifier",161:"Encountered invalid input after spread/rest argument",162:"Catch without try",163:"Finally without try",164:"Expected corresponding closing tag for JSX fragment",165:"Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",166:"Invalid tagged template on optional chain",167:"Invalid optional chain from super property",168:"Invalid optional chain from new expression",169:'Cannot use "import.meta" outside a module',170:"Leading decorators must be attached to a class declaration",171:"An export name cannot include a lone surrogate, found %0",172:"A string literal cannot be used as an exported binding without `from`",173:"Private fields can't be accessed on super",174:"The only valid meta property for import is 'import.meta'",175:"'import.meta' must not contain escaped characters",176:'cannot use "await" as identifier inside an async function',177:'cannot use "await" in static blocks'},kk=class extends SyntaxError{constructor(e,i,r,...o){let s=rP[r].replace(/%(\d+)/g,(c,u)=>o[u]),l="["+e.line+":"+e.column+"-"+i.line+":"+i.column+"]: "+s;super(l),n(this,"start"),n(this,"end"),n(this,"range"),n(this,"loc"),n(this,"description"),this.start=e.index,this.end=i.index,this.range=[e.index,i.index],this.loc={start:{line:e.line,column:e.column},end:{line:i.line,column:i.column}},this.description=s}};a(kk,"ParseError");var Re=kk;function Ya(t,e,i){let r=t.currentChar,o=0,s=9,l=i&64?0:1,c=0,u=0;if(i&64)o="."+xs(t,r),r=t.currentChar,r===110&&t.report(12);else{if(r===48)if(r=B(t),(r|32)===120){for(i=136,r=B(t);Z[r]&4160;){if(r===95){u||t.report(152),u=0,r=B(t);continue}u=1,o=o*16+dt(r),c++,r=B(t)}(c===0||!u)&&t.report(c===0?21:153)}else if((r|32)===111){for(i=132,r=B(t);Z[r]&4128;){if(r===95){u||t.report(152),u=0,r=B(t);continue}u=1,o=o*8+(r-48),c++,r=B(t)}(c===0||!u)&&t.report(c===0?0:153)}else if((r|32)===98){for(i=130,r=B(t);Z[r]&4224;){if(r===95){u||t.report(152),u=0,r=B(t);continue}u=1,o=o*2+(r-48),c++,r=B(t)}(c===0||!u)&&t.report(c===0?0:153)}else if(Z[r]&32)for(e&1&&t.report(1),i=1;Z[r]&16;){if(Z[r]&512){i=32,l=0;break}o=o*8+(r-48),r=B(t)}else Z[r]&512?(e&1&&t.report(1),t.flags|=64,i=32):r===95&&t.report(0);if(i&48){if(l){for(;s>=0&&Z[r]&4112;){if(r===95){if(r=B(t),r===95||i&32)throw new Re(t.currentLocation,{index:t.index+1,line:t.line,column:t.column},152);u=1;continue}u=0,o=10*o+(r-48),r=B(t),--s}if(u)throw new Re(t.currentLocation,{index:t.index+1,line:t.line,column:t.column},153);if(s>=0&&!ho(r)&&r!==46)return t.tokenValue=o,t.options.raw&&(t.tokenRaw=t.source.slice(t.tokenIndex,t.index)),134283266}o+=xs(t,r),r=t.currentChar,r===46&&(B(t)===95&&t.report(0),i=64,o+="."+xs(t,t.currentChar),r=t.currentChar)}}let d=t.index,p=0;if(r===110&&i&128)p=1,r=B(t);else if((r|32)===101){r=B(t),Z[r]&256&&(r=B(t));let{index:_}=t;(Z[r]&16)===0&&t.report(11),o+=t.source.substring(d,_)+xs(t,r),r=t.currentChar}return(t.index<t.end&&Z[r]&16||ho(r))&&t.report(13),p?(t.tokenRaw=t.source.slice(t.tokenIndex,t.index),t.tokenValue=BigInt(t.tokenRaw.slice(0,-1).replaceAll("_","")),134283388):(t.tokenValue=i&15?o:i&32?parseFloat(t.source.substring(t.tokenIndex,t.index)):+o,t.options.raw&&(t.tokenRaw=t.source.slice(t.tokenIndex,t.index)),134283266)}a(Ya,"scanNumber");function xs(t,e){let i=0,r=t.index,o="";for(;Z[e]&4112;){if(e===95){let{index:s}=t;if(e=B(t),e===95)throw new Re(t.currentLocation,{index:t.index+1,line:t.line,column:t.column},152);i=1,o+=t.source.substring(r,s),r=t.index;continue}i=0,e=B(t)}if(i)throw new Re(t.currentLocation,{index:t.index+1,line:t.line,column:t.column},153);return o+t.source.substring(r,t.index)}a(xs,"scanDecimalDigitsOrSeparator");var ee=["end of source","identifier","number","string","regular expression","false","true","null","template continuation","template tail","=>","(","{",".","...","}",")",";",",","[","]",":","?","'",'"',"++","--","=","<<=",">>=",">>>=","**=","+=","-=","*=","/=","%=","^=","|=","&=","||=","&&=","??=","typeof","delete","void","!","~","+","-","in","instanceof","*","%","/","**","&&","||","===","!==","==","!=","<=",">=","<",">","<<",">>",">>>","&","|","^","var","let","const","break","case","catch","class","continue","debugger","default","do","else","export","extends","finally","for","function","if","import","new","return","super","switch","this","throw","try","while","with","implements","interface","package","private","protected","public","static","yield","as","async","await","constructor","get","set","accessor","from","of","enum","eval","arguments","escaped keyword","escaped future reserved keyword","reserved if strict","#","BigIntLiteral","??","?.","WhiteSpace","Illegal","LineTerminator","PrivateField","Template","@","target","meta","LineFeed","Escaped","JSXText"],Ck={this:86111,function:86104,if:20569,return:20572,var:86088,else:20563,for:20567,new:86107,in:8673330,typeof:16863275,while:20578,case:20556,break:20555,try:20577,catch:20557,delete:16863276,throw:86112,switch:86110,continue:20559,default:20561,instanceof:8411187,do:20562,void:16863277,finally:20566,async:209005,await:209006,class:86094,const:86090,constructor:12399,debugger:20560,export:20564,extends:20565,false:86021,from:209011,get:209008,implements:36964,import:86106,interface:36965,let:241737,null:86023,of:471156,package:36966,private:36967,protected:36968,public:36969,set:209009,static:36970,super:86109,true:86022,with:20579,yield:241771,enum:86133,eval:537079926,as:77932,arguments:537079927,target:209029,meta:209030,accessor:12402};function ot(t,e){var i,r;(t.flags&1)===0&&(t.getToken()&1048576)!==1048576&&t.report(30,ee[t.getToken()&255]),$(t,e,1074790417)||(r=(i=t.options).onInsertedSemicolon)==null||r.call(i,t.startIndex)}a(ot,"matchOrInsertSemicolon");function pc(t,e,i,r){return e-i<13&&r==="use strict"&&((t.getToken()&1048576)===1048576||t.flags&1)?1:0}a(pc,"isValidStrictMode");function Kr(t,e,i){return t.getToken()!==i?0:(V(t,e),1)}a(Kr,"optionalBit");function $(t,e,i){return t.getToken()!==i?!1:(V(t,e),!0)}a($,"consumeOpt");function U(t,e,i){t.getToken()!==i&&t.report(25,ee[i&255]),V(t,e)}a(U,"consume");function Et(t,e){switch(e.type){case"ArrayExpression":{e.type="ArrayPattern";let{elements:i}=e;for(let r=0,o=i.length;r<o;++r){let s=i[r];s&&Et(t,s)}return}case"ObjectExpression":{e.type="ObjectPattern";let{properties:i}=e;for(let r=0,o=i.length;r<o;++r)Et(t,i[r]);return}case"AssignmentExpression":e.type="AssignmentPattern",e.operator!=="="&&t.report(71),delete e.operator,Et(t,e.left);return;case"Property":Et(t,e.value);return;case"SpreadElement":e.type="RestElement",Et(t,e.argument)}}a(Et,"reinterpretToPattern");function _o(t,e,i,r,o){e&1&&((r&36864)===36864&&t.report(118),!o&&(r&537079808)===537079808&&t.report(119)),((r&20480)===20480||r===-2147483528)&&t.report(102),i&24&&(r&255)===73&&t.report(100),e&2050&&r===209006&&t.report(110),e&1025&&r===241771&&t.report(97,"yield")}a(_o,"validateBindingIdentifier");function fc(t,e,i){e&1&&((i&36864)===36864&&t.report(118),(i&537079808)===537079808&&t.report(119),i===-2147483527&&t.report(95),i===-2147483528&&t.report(95)),(i&20480)===20480&&t.report(102),e&2050&&i===209006&&t.report(110),e&1025&&i===241771&&t.report(97,"yield")}a(fc,"validateFunctionName");function mc(t,e,i){return i===209006&&(e&2050&&t.report(110),t.destructible|=128),i===241771&&e&1024&&t.report(97,"yield"),(i&20480)===20480||(i&36864)===36864||i==-2147483527}a(mc,"isStrictReservedWord");function Tk(t){return t.property?t.property.type==="PrivateIdentifier":!1}a(Tk,"isPropertyWithPrivateFieldKey");function vc(t,e,i,r){for(;e;){if(e["$"+i])return r&&t.report(137),1;r&&e.loop&&(r=0),e=e.$}return 0}a(vc,"isValidLabel");function Sk(t,e,i){let r=e;for(;r;)r["$"+i]&&t.report(136,i),r=r.$;e["$"+i]=1}a(Sk,"validateAndDeclareLabel");function po(t){switch(t.type){case"JSXIdentifier":return t.name;case"JSXNamespacedName":return t.namespace+":"+t.name;case"JSXMemberExpression":return po(t.object)+"."+po(t.property)}}a(po,"isEqualTagName");function bs(t,e){return t&1025?t&2&&e===209006||t&1024&&e===241771?!1:(e&12288)===12288:(e&12288)===12288||(e&36864)===36864}a(bs,"isValidIdentifier");function ko(t,e,i){(i&537079808)===537079808&&(e&1&&t.report(119),t.flags|=512),bs(e,i)||t.report(0)}a(ko,"classifyIdentifier");function Co(t,e){return Object.hasOwn(t,e)?t[e]:void 0}a(Co,"getOwnProperty");function za(t,e,i){for(var r;_k[B(t)];);return t.tokenValue=t.source.slice(t.tokenIndex,t.index),t.currentChar!==92&&t.currentChar<=126?(r=Co(Ck,t.tokenValue))!=null?r:208897:Yr(t,e,0,i)}a(za,"scanIdentifier");function Ik(t,e){let i=bc(t);return ho(i)||t.report(5),t.tokenValue=String.fromCodePoint(i),Yr(t,e,1,Z[i]&4)}a(Ik,"scanUnicodeIdentifier");function Yr(t,e,i,r){let o=t.index;for(;t.index<t.end;)if(t.currentChar===92){t.tokenValue+=t.source.slice(o,t.index),i=1;let l=bc(t);Qs(l)||t.report(5),r=r&&Z[l]&4,t.tokenValue+=String.fromCodePoint(l),o=t.index}else{let l=qr(t);if(l>0)Qs(l)||t.report(20,String.fromCodePoint(l)),t.currentChar=l,t.index++,t.column++;else if(!Qs(t.currentChar))break;B(t)}t.index<=t.end&&(t.tokenValue+=t.source.slice(o,t.index));let{length:s}=t.tokenValue;if(r&&s>=2&&s<=11){let l=Co(Ck,t.tokenValue);return l===void 0?208897|(i?-2147483648:0):i?l===209006?(e&2050)===0?l|-2147483648:-2147483528:e&1?l===36970||(l&36864)===36864?-2147483527:(l&20480)===20480?e&262144&&(e&8)===0?l|-2147483648:-2147483528:-2147274630:e&262144&&(e&8)===0&&(l&20480)===20480?l|-2147483648:l===241771?e&262144?-2147274630:e&1024?-2147483528:l|-2147483648:l===209005?-2147274630:(l&36864)===36864?l|12288|-2147483648:-2147483528:l}return 208897|(i?-2147483648:0)}a(Yr,"scanIdentifierSlowCase");function Ek(t){let e=B(t);if(e===92)return 130;let i=qr(t);return i&&(e=i),ho(e)||t.report(96),130}a(Ek,"scanPrivateIdentifier");function bc(t){return t.source.charCodeAt(t.index+1)!==117&&t.report(5),t.currentChar=t.source.charCodeAt(t.index+=2),t.column+=2,Ak(t)}a(bc,"scanIdentifierUnicodeEscape");function Ak(t){let e=0,i=t.currentChar;if(i===123){let l=t.index-2;for(;Z[B(t)]&64;)if(e=e<<4|dt(t.currentChar),e>1114111)throw new Re({index:l,line:t.line,column:t.column},t.currentLocation,104);if(t.currentChar!==125)throw new Re({index:l,line:t.line,column:t.column},t.currentLocation,7);return B(t),e}(Z[i]&64)===0&&t.report(7);let r=t.source.charCodeAt(t.index+1);(Z[r]&64)===0&&t.report(7);let o=t.source.charCodeAt(t.index+2);(Z[o]&64)===0&&t.report(7);let s=t.source.charCodeAt(t.index+3);return(Z[s]&64)===0&&t.report(7),e=dt(i)<<12|dt(r)<<8|dt(o)<<4|dt(s),t.currentChar=t.source.charCodeAt(t.index+=4),t.column+=4,e}a(Ak,"scanUnicodeEscape");var aP=[128,128,128,128,128,128,128,128,128,127,135,127,127,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,127,16842798,134283267,130,208897,8391477,8390213,134283267,67174411,16,8391476,25233968,18,25233969,67108877,8457014,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,21,1074790417,8456256,1077936155,8390721,22,132,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,69271571,136,20,8389959,208897,131,4096,4096,4096,4096,4096,4096,4096,208897,4096,208897,208897,4096,208897,4096,208897,4096,208897,4096,4096,4096,208897,4096,4096,208897,4096,4096,2162700,8389702,1074790415,16842799,128];function V(t,e){t.flags=(t.flags|1)^1,t.startIndex=t.index,t.startColumn=t.column,t.startLine=t.line,t.setToken(gc(t,e,0))}a(V,"nextToken");function gc(t,e,i){let r=t.index===0,{source:o}=t,s=t.currentLocation;for(;t.index<t.end;){t.tokenIndex=t.index,t.tokenColumn=t.column,t.tokenLine=t.line;let l=t.currentChar;if(l<=126){let c=aP[l];switch(c){case 67174411:case 16:case 2162700:case 1074790415:case 69271571:case 20:case 21:case 1074790417:case 18:case 16842799:case 132:case 128:return B(t),c;case 208897:return za(t,e,0);case 4096:return za(t,e,1);case 134283266:return Ya(t,e,144);case 134283267:return gk(t,e,l);case 131:return _c(t,e);case 136:return Ik(t,e);case 130:return Ek(t);case 127:B(t);break;case 129:i|=5,$i(t);break;case 135:jr(t,i),i=i&-5|1;break;case 8456256:{let u=B(t);if(t.index<t.end){if(u===60)return t.index<t.end&&B(t)===61?(B(t),4194332):8390978;if(u===61)return B(t),8390718;if(u===33){let d=t.index+1;if(d+1<t.end&&o.charCodeAt(d)===45&&o.charCodeAt(d+1)==45){t.column+=3,t.currentChar=o.charCodeAt(t.index+=3),i=Ka(t,o,i,e,2,t.tokenStart),s=t.tokenStart;continue}return 8456256}}return 8456256}case 1077936155:{B(t);let u=t.currentChar;return u===61?B(t)===61?(B(t),8390458):8390460:u===62?(B(t),10):1077936155}case 16842798:return B(t)!==61?16842798:B(t)!==61?8390461:(B(t),8390459);case 8391477:return B(t)!==61?8391477:(B(t),4194340);case 8391476:{if(B(t),t.index>=t.end)return 8391476;let u=t.currentChar;return u===61?(B(t),4194338):u!==42?8391476:B(t)!==61?8391735:(B(t),4194335)}case 8389959:return B(t)!==61?8389959:(B(t),4194341);case 25233968:{B(t);let u=t.currentChar;return u===43?(B(t),33619993):u===61?(B(t),4194336):25233968}case 25233969:{B(t);let u=t.currentChar;if(u===45){if(B(t),(i&1||r)&&t.currentChar===62){t.options.webcompat||t.report(112),B(t),i=Ka(t,o,i,e,3,s),s=t.tokenStart;continue}return 33619994}return u===61?(B(t),4194337):25233969}case 8457014:{if(B(t),t.index<t.end){let u=t.currentChar;if(u===47){B(t),i=Gr(t,o,i,0,t.tokenStart),s=t.tokenStart;continue}if(u===42){B(t),i=mk(t,o,i),s=t.tokenStart;continue}if(e&32)return vk(t);if(u===61)return B(t),4259875}return 8457014}case 67108877:{let u=B(t);if(u>=48&&u<=57)return Ya(t,e,80);if(u===46){let d=t.index+1;if(d<t.end&&o.charCodeAt(d)===46)return t.column+=2,t.currentChar=o.charCodeAt(t.index+=2),14}return 67108877}case 8389702:{B(t);let u=t.currentChar;return u===124?(B(t),t.currentChar===61?(B(t),4194344):8913465):u===61?(B(t),4194342):8389702}case 8390721:{B(t);let u=t.currentChar;if(u===61)return B(t),8390719;if(u!==62)return 8390721;if(B(t),t.index<t.end){let d=t.currentChar;if(d===62)return B(t)===61?(B(t),4194334):8390980;if(d===61)return B(t),4194333}return 8390979}case 8390213:{B(t);let u=t.currentChar;return u===38?(B(t),t.currentChar===61?(B(t),4194345):8913720):u===61?(B(t),4194343):8390213}case 22:{let u=B(t);if(u===63)return B(t),t.currentChar===61?(B(t),4194346):276824445;if(u===46){let d=t.index+1;if(d<t.end&&(u=o.charCodeAt(d),!(u>=48&&u<=57)))return B(t),67108990}return 22}}}else{if((l^8232)<=1){i=i&-5|1,$i(t);continue}let c=qr(t);if(c>0&&(l=c),uk(l))return t.tokenValue="",Yr(t,e,0,0);if(hk(l)){B(t);continue}t.report(20,String.fromCodePoint(l))}}return 1048576}a(gc,"scanSingleToken");var lP={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},cP={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};function xk(t){return t.replace(/&(?:[a-zA-Z]+|#[xX][\da-fA-F]+|#\d+);/g,e=>{var i;if(e.charAt(1)==="#"){let r=e.charAt(2),o=r==="X"||r==="x"?parseInt(e.slice(3),16):parseInt(e.slice(2),10);return Pk(o)}return(i=Co(lP,e.slice(1,-1)))!=null?i:e})}a(xk,"decodeHTMLStrict");function Pk(t){var e;return t>=55296&&t<=57343||t>1114111?"\uFFFD":String.fromCodePoint((e=Co(cP,t))!=null?e:t)}a(Pk,"decodeCodePoint");function Mk(t,e){return t.startIndex=t.tokenIndex=t.index,t.startColumn=t.tokenColumn=t.column,t.startLine=t.tokenLine=t.line,t.setToken(Z[t.currentChar]&8192?Rk(t):gc(t,e,0)),t.getToken()}a(Mk,"scanJSXAttributeValue");function Rk(t){let e=t.currentChar,i=B(t),r=t.index;for(;i!==e;)t.index>=t.end&&t.report(16),i=B(t);return i!==e&&t.report(16),t.tokenValue=t.source.slice(r,t.index),B(t),t.options.raw&&(t.tokenRaw=t.source.slice(t.tokenIndex,t.index)),134283267}a(Rk,"scanJSXString");function gs(t){if(t.startIndex=t.tokenIndex=t.index,t.startColumn=t.tokenColumn=t.column,t.startLine=t.tokenLine=t.line,t.index>=t.end){t.setToken(1048576);return}if(t.currentChar===60){B(t),t.setToken(8456256);return}if(t.currentChar===123){B(t),t.setToken(2162700);return}let e=0;for(;t.index<t.end;){let r=Z[t.source.charCodeAt(t.index)];if(r&1024?(e|=5,$i(t)):r&2048?(jr(t,e),e=e&-5|1):B(t),Z[t.currentChar]&16384)break}t.tokenIndex===t.index&&t.report(0);let i=t.source.slice(t.tokenIndex,t.index);t.options.raw&&(t.tokenRaw=i),t.tokenValue=xk(i),t.setToken(137)}a(gs,"nextJSXToken");function yr(t){if((t.getToken()&143360)===143360){let{index:e}=t,i=t.currentChar;for(;Z[i]&32770;)i=B(t);t.tokenValue+=t.source.slice(e,t.index),t.setToken(208897,!0)}return t.getToken()}a(yr,"rescanJSXIdentifier");var Dk=class Bk{constructor(e,i=2,r){n(this,"parser"),n(this,"type"),n(this,"parent"),n(this,"scopeError"),n(this,"variableBindings",new Map),this.parser=e,this.type=i,this.parent=r}createChildScope(e){return new Bk(this.parser,e,this)}addVarOrBlock(e,i,r,o){r&4?this.addVarName(e,i,r):this.addBlockName(e,i,r,o),o&64&&this.parser.declareUnboundVariable(i)}addVarName(e,i,r){let{parser:o}=this,s=this;for(;s&&(s.type&128)===0;){let{variableBindings:l}=s,c=l.get(i);c&&c&248&&(o.options.webcompat&&(e&1)===0&&(r&128&&c&68||c&128&&r&68)||o.report(145,i)),s===this&&c&&c&1&&r&1&&s.recordScopeError(145,i),c&&(c&256||c&512&&!o.options.webcompat)&&o.report(145,i),s.variableBindings.set(i,r),s=s.parent}}hasVariable(e){return this.variableBindings.has(e)}addBlockName(e,i,r,o){var s;let{parser:l}=this,c=this.variableBindings.get(i);c&&(c&2)===0&&(r&1?this.recordScopeError(145,i):l.options.webcompat&&(e&1)===0&&o&2&&c===64&&r===64||l.report(145,i)),this.type&64&&((s=this.parent)!=null&&s.hasVariable(i))&&(this.parent.variableBindings.get(i)&2)===0&&l.report(145,i),this.type&512&&c&&(c&2)===0&&r&1&&this.recordScopeError(145,i),this.type&32&&this.parent.variableBindings.get(i)&768&&l.report(159,i),this.variableBindings.set(i,r)}recordScopeError(e,...i){this.scopeError={type:e,params:i,start:this.parser.tokenStart,end:this.parser.currentLocation}}reportScopeError(){let{scopeError:e}=this;if(e)throw new Re(e.start,e.end,e.type,...e.params)}};a(Dk,"Scope");var uP=Dk;function To(t,e,i){let r=t.createScope().createChildScope(512);return r.addBlockName(e,i,1,0),r}a(To,"createArrowHeadParsingScope");var Lk=class{constructor(e,i){n(this,"parser"),n(this,"parent"),n(this,"refs",Object.create(null)),n(this,"privateIdentifiers",new Map),this.parser=e,this.parent=i}addPrivateIdentifier(e,i){let{privateIdentifiers:r}=this,o=i&800;o&768||(o|=768);let s=r.get(e);this.hasPrivateIdentifier(e)&&((s&32)!==(o&32)||s&o&768)&&this.parser.report(146,e),r.set(e,this.hasPrivateIdentifier(e)?s|o:o)}addPrivateIdentifierRef(e){var i,r;(r=(i=this.refs)[e])!=null||(i[e]=[]),this.refs[e].push(this.parser.tokenStart)}isPrivateIdentifierDefined(e){var i;return this.hasPrivateIdentifier(e)||!!((i=this.parent)!=null&&i.isPrivateIdentifierDefined(e))}validatePrivateIdentifierRefs(){for(let e in this.refs)if(!this.isPrivateIdentifierDefined(e)){let{index:i,line:r,column:o}=this.refs[e][0];throw new Re({index:i,line:r,column:o},{index:i+e.length,line:r,column:o+e.length},4,e)}}hasPrivateIdentifier(e){return this.privateIdentifiers.has(e)}};a(Lk,"PrivateScope");var hP=Lk,Vk=class{constructor(e,i={}){n(this,"source"),n(this,"options"),n(this,"lastOnToken",null),n(this,"token",1048576),n(this,"flags",0),n(this,"index",0),n(this,"line",1),n(this,"column",0),n(this,"startIndex",0),n(this,"end",0),n(this,"tokenIndex",0),n(this,"startColumn",0),n(this,"tokenColumn",0),n(this,"tokenLine",1),n(this,"startLine",1),n(this,"tokenValue",""),n(this,"tokenRaw",""),n(this,"tokenRegExp"),n(this,"currentChar",0),n(this,"exportedNames",new Set),n(this,"exportedBindings",new Set),n(this,"assignable",1),n(this,"destructible",0),n(this,"leadingDecorators",{decorators:[]}),this.source=e,this.options=i,this.end=e.length,this.currentChar=e.charCodeAt(0)}getToken(){return this.token}setToken(e,i=!1){this.token=e;let{onToken:r}=this.options;if(r)if(e!==1048576){let o={start:{line:this.tokenLine,column:this.tokenColumn},end:{line:this.line,column:this.column}};!i&&this.lastOnToken&&r(...this.lastOnToken),this.lastOnToken=[dk(e),this.tokenIndex,this.index,o]}else this.lastOnToken&&(r(...this.lastOnToken),this.lastOnToken=null);return e}get tokenStart(){return{index:this.tokenIndex,line:this.tokenLine,column:this.tokenColumn}}get currentLocation(){return{index:this.index,line:this.line,column:this.column}}finishNode(e,i,r){if(this.options.ranges){e.start=i.index;let o=r?r.index:this.startIndex;e.end=o,e.range=[i.index,o]}return this.options.loc&&(e.loc={start:{line:i.line,column:i.column},end:r?{line:r.line,column:r.column}:{line:this.startLine,column:this.startColumn}},this.options.source&&(e.loc.source=this.options.source)),e}addBindingToExports(e){this.exportedBindings.add(e)}declareUnboundVariable(e){let{exportedNames:i}=this;i.has(e)&&this.report(147,e),i.add(e)}report(e,...i){throw new Re(this.tokenStart,this.currentLocation,e,...i)}createScopeIfLexical(e,i){if(this.options.lexical)return this.createScope(e,i)}createScope(e,i){return new uP(this,e,i)}createPrivateScopeIfLexical(e){if(this.options.lexical)return new hP(this,e)}};a(Vk,"Parser");var dP=Vk;function Ok(t,e){return function(i,r,o,s,l){let c={type:i,value:r};e.ranges&&(c.start=o,c.end=s,c.range=[o,s]),e.loc&&(c.loc=l),t.push(c)}}a(Ok,"pushComment");function Nk(t,e){return function(i,r,o,s){let l={token:i};e.ranges&&(l.start=r,l.end=o,l.range=[r,o]),e.loc&&(l.loc=s),t.push(l)}}a(Nk,"pushToken");function Fk(t){let e={...t};return e.onComment&&(e.onComment=Array.isArray(e.onComment)?Ok(e.onComment,e):e.onComment),e.onToken&&(e.onToken=Array.isArray(e.onToken)?Nk(e.onToken,e):e.onToken),e}a(Fk,"normalizeOptions");function Uk(t,e={},i=0){let r=Fk(e);r.module&&(i|=3),r.globalReturn&&(i|=4096),r.impliedStrict&&(i|=1);let o=new dP(t,r);fk(o);let s=o.createScopeIfLexical(),l=[],c="script";if(i&2){if(c="module",l=Wk(o,i|8,s),s)for(let u of o.exportedBindings)s.hasVariable(u)||o.report(148,u)}else l=Hk(o,i|8,s);return o.finishNode({type:"Program",sourceType:c,body:l},{index:0,line:1,column:0},o.currentLocation)}a(Uk,"parseSource");function Hk(t,e,i){V(t,e|32|262144);let r=[];for(;t.getToken()===134283267;){let{index:o,tokenValue:s,tokenStart:l,tokenIndex:c}=t,u=t.getToken(),d=Ue(t,e);if(pc(t,o,c,s)){if(e|=1,t.flags&64)throw new Re(t.tokenStart,t.currentLocation,9);if(t.flags&4096)throw new Re(t.tokenStart,t.currentLocation,15)}r.push($r(t,e,d,u,l))}for(;t.getToken()!==1048576;)r.push(ys(t,e,i,void 0,4,{}));return r}a(Hk,"parseStatementList");function Wk(t,e,i){V(t,e|32);let r=[];for(;t.getToken()===134283267;){let{tokenStart:o}=t,s=t.getToken();r.push($r(t,e,Ue(t,e),s,o))}for(;t.getToken()!==1048576;)r.push(qk(t,e,i));return r}a(Wk,"parseModuleItemList");function qk(t,e,i){var r;t.getToken()===132&&Object.assign(t.leadingDecorators,{start:t.tokenStart,decorators:Eo(t,e,void 0)});let o;switch(t.getToken()){case 20564:o=cC(t,e,i);break;case 86106:o=aC(t,e,i);break;default:o=ys(t,e,i,void 0,4,{})}return(r=t.leadingDecorators)!=null&&r.decorators.length&&t.report(170),o}a(qk,"parseModuleItem");function ys(t,e,i,r,o,s){let l=t.tokenStart;switch(t.getToken()){case 86104:return Si(t,e,i,r,o,1,0,0,l);case 132:case 86094:return Cr(t,e,i,r,0);case 86090:return wr(t,e,i,r,16,0);case 241737:return oC(t,e,i,r,o);case 20564:t.report(103,"export");case 86106:switch(V(t,e),t.getToken()){case 67174411:return Tc(t,e,r,l);case 67108877:return Cc(t,e,l);default:t.report(103,"import")}case 209005:return yc(t,e,i,r,o,s,1);default:return ws(t,e,i,r,o,s,1)}}a(ys,"parseStatementListItem");function ws(t,e,i,r,o,s,l){switch(t.getToken()){case 86088:return wc(t,e,i,r,0);case 20572:return Gk(t,e,r);case 20569:return zk(t,e,i,r,s);case 20567:return rC(t,e,i,r,s);case 20562:return sC(t,e,i,r,s);case 20578:return Jk(t,e,i,r,s);case 86110:return $k(t,e,i,r,s);case 1074790417:return Kk(t,e);case 2162700:return us(t,e,i?.createChildScope(),r,s,t.tokenStart);case 86112:return Yk(t,e,r);case 20555:return Qk(t,e,s);case 20559:return Xk(t,e,s);case 20577:return tC(t,e,i,r,s);case 20579:return Zk(t,e,i,r,s);case 20560:return eC(t,e);case 209005:return yc(t,e,i,r,o,s,0);case 20557:t.report(162);case 20566:t.report(163);case 86104:t.report(e&1?76:t.options.webcompat?77:78);case 86094:t.report(79);default:return jk(t,e,i,r,o,s,l)}}a(ws,"parseStatement");function jk(t,e,i,r,o,s,l){let{tokenValue:c,tokenStart:u}=t,d=t.getToken(),p;return d===241737?(p=re(t,e),e&1&&t.report(85),t.getToken()===69271571&&t.report(84)):p=pt(t,e,r,2,0,1,0,1,t.tokenStart),d&143360&&t.getToken()===21?zr(t,e,i,r,o,s,c,p,d,l,u):(p=oe(t,e,r,p,0,0,u),p=Te(t,e,r,0,0,u,p),t.getToken()===18&&(p=ci(t,e,r,0,u,p)),In(t,e,p,u))}a(jk,"parseExpressionOrLabelledStatement");function us(t,e,i,r,o,s=t.tokenStart,l="BlockStatement"){let c=[];for(U(t,e|32,2162700);t.getToken()!==1074790415;)c.push(ys(t,e,i,r,2,{$:o}));return U(t,e|32,1074790415),t.finishNode({type:l,body:c},s)}a(us,"parseBlock");function Gk(t,e,i){(e&4096)===0&&t.report(92);let r=t.tokenStart;V(t,e|32);let o=t.flags&1||t.getToken()&1048576?null:Xe(t,e,i,0,1,t.tokenStart);return ot(t,e|32),t.finishNode({type:"ReturnStatement",argument:o},r)}a(Gk,"parseReturnStatement");function In(t,e,i,r){return ot(t,e|32),t.finishNode({type:"ExpressionStatement",expression:i},r)}a(In,"parseExpressionStatement");function zr(t,e,i,r,o,s,l,c,u,d,p){_o(t,e,0,u,1),Sk(t,s,l),V(t,e|32);let _=d&&(e&1)===0&&t.options.webcompat&&t.getToken()===86104?Si(t,e,i?.createChildScope(),r,o,0,0,0,t.tokenStart):ws(t,e,i,r,o,s,d);return t.finishNode({type:"LabeledStatement",label:c,body:_},p)}a(zr,"parseLabelledStatement");function yc(t,e,i,r,o,s,l){let{tokenValue:c,tokenStart:u}=t,d=t.getToken(),p=re(t,e);if(t.getToken()===21)return zr(t,e,i,r,o,s,c,p,d,1,u);let _=t.flags&1;if(!_){if(t.getToken()===86104)return l||t.report(123),Si(t,e,i,r,o,1,0,1,u);if(bs(e,t.getToken()))return p=Mc(t,e,r,1,u),t.getToken()===18&&(p=ci(t,e,r,0,u,p)),In(t,e,p,u)}return t.getToken()===67174411?p=ta(t,e,r,p,1,1,0,_,u):(t.getToken()===10&&(ko(t,e,d),(d&36864)===36864&&(t.flags|=256),p=Io(t,e|2048,r,t.tokenValue,p,0,1,0,u)),t.assignable=1),p=oe(t,e,r,p,0,0,u),p=Te(t,e,r,0,0,u,p),t.assignable=1,t.getToken()===18&&(p=ci(t,e,r,0,u,p)),In(t,e,p,u)}a(yc,"parseAsyncArrowOrAsyncFunctionDeclaration");function $r(t,e,i,r,o){let s=t.startIndex;r!==1074790417&&(t.assignable=2,i=oe(t,e,void 0,i,0,0,o),t.getToken()!==1074790417&&(i=Te(t,e,void 0,0,0,o,i),t.getToken()===18&&(i=ci(t,e,void 0,0,o,i))),ot(t,e|32));let l={type:"ExpressionStatement",expression:i};return i.type==="Literal"&&typeof i.value=="string"&&(l.directive=t.source.slice(o.index+1,s-1)),t.finishNode(l,o)}a($r,"parseDirective");function Kk(t,e){let i=t.tokenStart;return V(t,e|32),t.finishNode({type:"EmptyStatement"},i)}a(Kk,"parseEmptyStatement");function Yk(t,e,i){let r=t.tokenStart;V(t,e|32),t.flags&1&&t.report(90);let o=Xe(t,e,i,0,1,t.tokenStart);return ot(t,e|32),t.finishNode({type:"ThrowStatement",argument:o},r)}a(Yk,"parseThrowStatement");function zk(t,e,i,r,o){let s=t.tokenStart;V(t,e),U(t,e|32,67174411),t.assignable=1;let l=Xe(t,e,r,0,1,t.tokenStart);U(t,e|32,16);let c=$a(t,e,i,r,o),u=null;return t.getToken()===20563&&(V(t,e|32),u=$a(t,e,i,r,o)),t.finishNode({type:"IfStatement",test:l,consequent:c,alternate:u},s)}a(zk,"parseIfStatement");function $a(t,e,i,r,o){let{tokenStart:s}=t;return e&1||!t.options.webcompat||t.getToken()!==86104?ws(t,e,i,r,0,{$:o},0):Si(t,e,i?.createChildScope(),r,0,0,0,0,s)}a($a,"parseConsequentOrAlternative");function $k(t,e,i,r,o){let s=t.tokenStart;V(t,e),U(t,e|32,67174411);let l=Xe(t,e,r,0,1,t.tokenStart);U(t,e,16),U(t,e,2162700);let c=[],u=0;for(i=i?.createChildScope(8);t.getToken()!==1074790415;){let{tokenStart:d}=t,p=null,_=[];for($(t,e|32,20556)?p=Xe(t,e,r,0,1,t.tokenStart):(U(t,e|32,20561),u&&t.report(89),u=1),U(t,e|32,21);t.getToken()!==20556&&t.getToken()!==1074790415&&t.getToken()!==20561;)_.push(ys(t,e|4,i,r,2,{$:o}));c.push(t.finishNode({type:"SwitchCase",test:p,consequent:_},d))}return U(t,e|32,1074790415),t.finishNode({type:"SwitchStatement",discriminant:l,cases:c},s)}a($k,"parseSwitchStatement");function Jk(t,e,i,r,o){let s=t.tokenStart;V(t,e),U(t,e|32,67174411);let l=Xe(t,e,r,0,1,t.tokenStart);U(t,e|32,16);let c=ts(t,e,i,r,o);return t.finishNode({type:"WhileStatement",test:l,body:c},s)}a(Jk,"parseWhileStatement");function ts(t,e,i,r,o){return ws(t,(e|131072)^131072|128,i,r,0,{loop:1,$:o},0)}a(ts,"parseIterationStatementBody");function Xk(t,e,i){(e&128)===0&&t.report(68);let r=t.tokenStart;V(t,e);let o=null;if((t.flags&1)===0&&t.getToken()&143360){let{tokenValue:s}=t;o=re(t,e|32),vc(t,i,s,1)||t.report(138,s)}return ot(t,e|32),t.finishNode({type:"ContinueStatement",label:o},r)}a(Xk,"parseContinueStatement");function Qk(t,e,i){let r=t.tokenStart;V(t,e|32);let o=null;if((t.flags&1)===0&&t.getToken()&143360){let{tokenValue:s}=t;o=re(t,e|32),vc(t,i,s,0)||t.report(138,s)}else(e&132)===0&&t.report(69);return ot(t,e|32),t.finishNode({type:"BreakStatement",label:o},r)}a(Qk,"parseBreakStatement");function Zk(t,e,i,r,o){let s=t.tokenStart;V(t,e),e&1&&t.report(91),U(t,e|32,67174411);let l=Xe(t,e,r,0,1,t.tokenStart);U(t,e|32,16);let c=ws(t,e,i,r,2,o,0);return t.finishNode({type:"WithStatement",object:l,body:c},s)}a(Zk,"parseWithStatement");function eC(t,e){let i=t.tokenStart;return V(t,e|32),ot(t,e|32),t.finishNode({type:"DebuggerStatement"},i)}a(eC,"parseDebuggerStatement");function tC(t,e,i,r,o){let s=t.tokenStart;V(t,e|32);let l=i?.createChildScope(16),c=us(t,e,l,r,{$:o}),{tokenStart:u}=t,d=$(t,e|32,20557)?iC(t,e,i,r,o,u):null,p=null;if(t.getToken()===20566){V(t,e|32);let _=i?.createChildScope(4);p=us(t,e,_,r,{$:o})}return!d&&!p&&t.report(88),t.finishNode({type:"TryStatement",block:c,handler:d,finalizer:p},s)}a(tC,"parseTryStatement");function iC(t,e,i,r,o,s){let l=null,c=i;$(t,e,67174411)&&(i=i?.createChildScope(4),l=Bc(t,e,i,r,(t.getToken()&2097152)===2097152?256:512,0),t.getToken()===18?t.report(86):t.getToken()===1077936155&&t.report(87),U(t,e|32,16)),c=i?.createChildScope(32);let u=us(t,e,c,r,{$:o});return t.finishNode({type:"CatchClause",param:l,body:u},s)}a(iC,"parseCatchBlock");function nC(t,e,i,r,o){i=i?.createChildScope();let s=5764;return e=(e|s)^s|256|2048|524288|65536,us(t,e,i,r,{},o,"StaticBlock")}a(nC,"parseStaticBlock");function sC(t,e,i,r,o){let s=t.tokenStart;V(t,e|32);let l=ts(t,e,i,r,o);U(t,e,20578),U(t,e|32,67174411);let c=Xe(t,e,r,0,1,t.tokenStart);return U(t,e|32,16),$(t,e|32,1074790417),t.finishNode({type:"DoWhileStatement",body:l,test:c},s)}a(sC,"parseDoWhileStatement");function oC(t,e,i,r,o){let{tokenValue:s,tokenStart:l}=t,c=t.getToken(),u=re(t,e);if(t.getToken()&2240512){let d=kn(t,e,i,r,8,0);return ot(t,e|32),t.finishNode({type:"VariableDeclaration",kind:"let",declarations:d},l)}if(t.assignable=1,e&1&&t.report(85),t.getToken()===21)return zr(t,e,i,r,o,{},s,u,c,0,l);if(t.getToken()===10){let d;t.options.lexical&&(d=To(t,e,s)),t.flags=(t.flags|128)^128,u=ks(t,e,d,r,[u],0,l)}else u=oe(t,e,r,u,0,0,l),u=Te(t,e,r,0,0,l,u);return t.getToken()===18&&(u=ci(t,e,r,0,l,u)),In(t,e,u,l)}a(oC,"parseLetIdentOrVarDeclarationStatement");function wr(t,e,i,r,o,s){let l=t.tokenStart;V(t,e);let c=kn(t,e,i,r,o,s);return ot(t,e|32),t.finishNode({type:"VariableDeclaration",kind:o&8?"let":"const",declarations:c},l)}a(wr,"parseLexicalDeclaration");function wc(t,e,i,r,o){let s=t.tokenStart;V(t,e);let l=kn(t,e,i,r,4,o);return ot(t,e|32),t.finishNode({type:"VariableDeclaration",kind:"var",declarations:l},s)}a(wc,"parseVariableStatement");function kn(t,e,i,r,o,s){let l=1,c=[Ja(t,e,i,r,o,s)];for(;$(t,e,18);)l++,c.push(Ja(t,e,i,r,o,s));return l>1&&s&32&&t.getToken()&262144&&t.report(61,ee[t.getToken()&255]),c}a(kn,"parseVariableDeclarationList");function Ja(t,e,i,r,o,s){let{tokenStart:l}=t,c=t.getToken(),u=null,d=Bc(t,e,i,r,o,s);if(t.getToken()===1077936155){if(V(t,e|32),u=be(t,e,r,1,0,t.tokenStart),(s&32||(c&2097152)===0)&&(t.getToken()===471156||t.getToken()===8673330&&(c&2097152||(o&4)===0||e&1)))throw new Re(l,t.currentLocation,60,t.getToken()===471156?"of":"in")}else(o&16||(c&2097152)>0)&&(t.getToken()&262144)!==262144&&t.report(59,o&16?"const":"destructuring");return t.finishNode({type:"VariableDeclarator",id:d,init:u},l)}a(Ja,"parseVariableDeclaration");function rC(t,e,i,r,o){let s=t.tokenStart;V(t,e);let l=((e&2048)>0||(e&2)>0&&(e&8)>0)&&$(t,e,209006);U(t,e|32,67174411),i=i?.createChildScope(1);let c=null,u=null,d=0,p=null,_=t.getToken()===86088||t.getToken()===241737||t.getToken()===86090,b,{tokenStart:g}=t,C=t.getToken();if(_)C===241737?(p=re(t,e),t.getToken()&2240512?(t.getToken()===8673330?e&1&&t.report(67):p=t.finishNode({type:"VariableDeclaration",kind:"let",declarations:kn(t,e|131072,i,r,8,32)},g),t.assignable=1):e&1?t.report(67):(_=!1,t.assignable=1,p=oe(t,e,r,p,0,0,g),t.getToken()===471156&&t.report(115))):(V(t,e),p=t.finishNode(C===86088?{type:"VariableDeclaration",kind:"var",declarations:kn(t,e|131072,i,r,4,32)}:{type:"VariableDeclaration",kind:"const",declarations:kn(t,e|131072,i,r,16,32)},g),t.assignable=1);else if(C===1074790417)l&&t.report(82);else if((C&2097152)===2097152){let S=t.tokenStart;p=C===2162700?wt(t,e,void 0,r,1,0,0,2,32):yt(t,e,void 0,r,1,0,0,2,32),d=t.destructible,d&64&&t.report(63),t.assignable=d&16?2:1,p=oe(t,e|131072,r,p,0,0,S)}else p=gt(t,e|131072,r,1,0,1);if((t.getToken()&262144)===262144){if(t.getToken()===471156){t.assignable&2&&t.report(80,l?"await":"of"),Et(t,p),V(t,e|32),b=be(t,e,r,1,0,t.tokenStart),U(t,e|32,16);let k=ts(t,e,i,r,o);return t.finishNode({type:"ForOfStatement",left:p,right:b,body:k,await:l},s)}t.assignable&2&&t.report(80,"in"),Et(t,p),V(t,e|32),l&&t.report(82),b=Xe(t,e,r,0,1,t.tokenStart),U(t,e|32,16);let S=ts(t,e,i,r,o);return t.finishNode({type:"ForInStatement",body:S,left:p,right:b},s)}l&&t.report(82),_||(d&8&&t.getToken()!==1077936155&&t.report(80,"loop"),p=Te(t,e|131072,r,0,0,g,p)),t.getToken()===18&&(p=ci(t,e,r,0,g,p)),U(t,e|32,1074790417),t.getToken()!==1074790417&&(c=Xe(t,e,r,0,1,t.tokenStart)),U(t,e|32,1074790417),t.getToken()!==16&&(u=Xe(t,e,r,0,1,t.tokenStart)),U(t,e|32,16);let T=ts(t,e,i,r,o);return t.finishNode({type:"ForStatement",init:p,test:c,update:u,body:T},s)}a(rC,"parseForStatement");function kc(t,e,i){return bs(e,t.getToken())||t.report(118),(t.getToken()&537079808)===537079808&&t.report(119),i?.addBlockName(e,t.tokenValue,8,0),re(t,e)}a(kc,"parseRestrictedIdentifier");function aC(t,e,i){let r=t.tokenStart;V(t,e);let o=null,{tokenStart:s}=t,l=[];if(t.getToken()===134283267)o=Ue(t,e);else{if(t.getToken()&143360){let d=kc(t,e,i);if(l=[t.finishNode({type:"ImportDefaultSpecifier",local:d},s)],$(t,e,18))switch(t.getToken()){case 8391476:l.push(Xa(t,e,i));break;case 2162700:Qa(t,e,i,l);break;default:t.report(107)}}else switch(t.getToken()){case 8391476:l=[Xa(t,e,i)];break;case 2162700:Qa(t,e,i,l);break;case 67174411:return Tc(t,e,void 0,r);case 67108877:return Cc(t,e,r);default:t.report(30,ee[t.getToken()&255])}o=lC(t,e)}let c=kr(t,e),u={type:"ImportDeclaration",specifiers:l,source:o,attributes:c};return ot(t,e|32),t.finishNode(u,r)}a(aC,"parseImportDeclaration");function Xa(t,e,i){let{tokenStart:r}=t;if(V(t,e),U(t,e,77932),(t.getToken()&134217728)===134217728)throw new Re(r,t.currentLocation,30,ee[t.getToken()&255]);return t.finishNode({type:"ImportNamespaceSpecifier",local:kc(t,e,i)},r)}a(Xa,"parseImportNamespaceSpecifier");function lC(t,e){return U(t,e,209011),t.getToken()!==134283267&&t.report(105,"Import"),Ue(t,e)}a(lC,"parseModuleSpecifier");function Qa(t,e,i,r){for(V(t,e);t.getToken()&143360||t.getToken()===134283267;){let{tokenValue:o,tokenStart:s}=t,l=t.getToken(),c=Zs(t,e),u;$(t,e,77932)?((t.getToken()&134217728)===134217728||t.getToken()===18?t.report(106):_o(t,e,16,t.getToken(),0),o=t.tokenValue,u=re(t,e)):c.type==="Identifier"?(_o(t,e,16,l,0),u=c):t.report(25,ee[108]),i?.addBlockName(e,o,8,0),r.push(t.finishNode({type:"ImportSpecifier",local:u,imported:c},s)),t.getToken()!==1074790415&&U(t,e,18)}return U(t,e,1074790415),r}a(Qa,"parseImportSpecifierOrNamedImports");function Cc(t,e,i){let r=Sc(t,e,t.finishNode({type:"Identifier",name:"import"},i),i);return r=oe(t,e,void 0,r,0,0,i),r=Te(t,e,void 0,0,0,i,r),t.getToken()===18&&(r=ci(t,e,void 0,0,i,r)),In(t,e,r,i)}a(Cc,"parseImportMetaDeclaration");function Tc(t,e,i,r){let o=Ic(t,e,i,0,r);return o=oe(t,e,i,o,0,0,r),t.getToken()===18&&(o=ci(t,e,i,0,r,o)),In(t,e,o,r)}a(Tc,"parseImportCallDeclaration");function cC(t,e,i){let r=t.leadingDecorators.decorators.length?t.leadingDecorators.start:t.tokenStart;V(t,e|32);let o=[],s=null,l=null,c=[];if($(t,e|32,20561)){switch(t.getToken()){case 86104:{s=Si(t,e,i,void 0,4,1,1,0,t.tokenStart);break}case 132:case 86094:s=Cr(t,e,i,void 0,1);break;case 209005:{let{tokenStart:d}=t;s=re(t,e);let{flags:p}=t;(p&1)===0&&(t.getToken()===86104?s=Si(t,e,i,void 0,4,1,1,1,d):t.getToken()===67174411?(s=ta(t,e,void 0,s,1,1,0,p,d),s=oe(t,e,void 0,s,0,0,d),s=Te(t,e,void 0,0,0,d,s)):t.getToken()&143360&&(i&&(i=To(t,e,t.tokenValue)),s=re(t,e),s=ks(t,e,i,void 0,[s],1,d)));break}default:s=be(t,e,void 0,1,0,t.tokenStart),ot(t,e|32)}return i&&t.declareUnboundVariable("default"),t.finishNode({type:"ExportDefaultDeclaration",declaration:s},r)}switch(t.getToken()){case 8391476:{V(t,e);let d=null;$(t,e,77932)&&(i&&t.declareUnboundVariable(t.tokenValue),d=Zs(t,e)),U(t,e,209011),t.getToken()!==134283267&&t.report(105,"Export"),l=Ue(t,e);let _=kr(t,e),b={type:"ExportAllDeclaration",source:l,exported:d,attributes:_};return ot(t,e|32),t.finishNode(b,r)}case 2162700:{V(t,e);let d=[],p=[],_=0;for(;t.getToken()&143360||t.getToken()===134283267;){let{tokenStart:b,tokenValue:g}=t,C=Zs(t,e);C.type==="Literal"&&(_=1);let T;t.getToken()===77932?(V(t,e),(t.getToken()&143360)===0&&t.getToken()!==134283267&&t.report(106),i&&(d.push(t.tokenValue),p.push(g)),T=Zs(t,e)):(i&&(d.push(t.tokenValue),p.push(t.tokenValue)),T=C),o.push(t.finishNode({type:"ExportSpecifier",local:C,exported:T},b)),t.getToken()!==1074790415&&U(t,e,18)}U(t,e,1074790415),$(t,e,209011)?(t.getToken()!==134283267&&t.report(105,"Export"),l=Ue(t,e),c=kr(t,e),i&&d.forEach(b=>t.declareUnboundVariable(b))):(_&&t.report(172),i&&(d.forEach(b=>t.declareUnboundVariable(b)),p.forEach(b=>t.addBindingToExports(b)))),ot(t,e|32);break}case 132:case 86094:s=Cr(t,e,i,void 0,2);break;case 86104:s=Si(t,e,i,void 0,4,1,2,0,t.tokenStart);break;case 241737:s=wr(t,e,i,void 0,8,64);break;case 86090:s=wr(t,e,i,void 0,16,64);break;case 86088:s=wc(t,e,i,void 0,64);break;case 209005:{let{tokenStart:d}=t;if(V(t,e),(t.flags&1)===0&&t.getToken()===86104){s=Si(t,e,i,void 0,4,1,2,1,d);break}}default:t.report(30,ee[t.getToken()&255])}let u={type:"ExportNamedDeclaration",declaration:s,specifiers:o,source:l,attributes:c};return t.finishNode(u,r)}a(cC,"parseExportDeclaration");function be(t,e,i,r,o,s){let l=pt(t,e,i,2,0,r,o,1,s);return l=oe(t,e,i,l,o,0,s),Te(t,e,i,o,0,s,l)}a(be,"parseExpression");function ci(t,e,i,r,o,s){let l=[s];for(;$(t,e|32,18);)l.push(be(t,e,i,1,r,t.tokenStart));return t.finishNode({type:"SequenceExpression",expressions:l},o)}a(ci,"parseSequenceExpression");function Xe(t,e,i,r,o,s){let l=be(t,e,i,o,r,s);return t.getToken()===18?ci(t,e,i,r,s,l):l}a(Xe,"parseExpressions");function Te(t,e,i,r,o,s,l){let c=t.getToken();if((c&4194304)===4194304){t.assignable&2&&t.report(26),(!o&&c===1077936155&&l.type==="ArrayExpression"||l.type==="ObjectExpression")&&Et(t,l),V(t,e|32);let u=be(t,e,i,1,r,t.tokenStart);return t.assignable=2,t.finishNode(o?{type:"AssignmentPattern",left:l,right:u}:{type:"AssignmentExpression",left:l,operator:ee[c&255],right:u},s)}return(c&8388608)===8388608&&(l=Ti(t,e,i,r,s,4,c,l)),$(t,e|32,22)&&(l=ji(t,e,i,l,s)),l}a(Te,"parseAssignmentExpression");function Ps(t,e,i,r,o,s,l){let c=t.getToken();V(t,e|32);let u=be(t,e,i,1,r,t.tokenStart);return l=t.finishNode(o?{type:"AssignmentPattern",left:l,right:u}:{type:"AssignmentExpression",left:l,operator:ee[c&255],right:u},s),t.assignable=2,l}a(Ps,"parseAssignmentExpressionOrPattern");function ji(t,e,i,r,o){let s=be(t,(e|131072)^131072,i,1,0,t.tokenStart);U(t,e|32,21),t.assignable=1;let l=be(t,e,i,1,0,t.tokenStart);return t.assignable=2,t.finishNode({type:"ConditionalExpression",test:r,consequent:s,alternate:l},o)}a(ji,"parseConditionalExpression");function Ti(t,e,i,r,o,s,l,c){let u=-((e&131072)>0)&8673330,d,p;for(t.assignable=2;t.getToken()&8388608&&(d=t.getToken(),p=d&3840,(d&524288&&l&268435456||l&524288&&d&268435456)&&t.report(165),!(p+((d===8391735)<<8)-((u===d)<<12)<=s));)V(t,e|32),c=t.finishNode({type:d&524288||d&268435456?"LogicalExpression":"BinaryExpression",left:c,right:Ti(t,e,i,r,t.tokenStart,p,d,gt(t,e,i,0,r,1)),operator:ee[d&255]},o);return t.getToken()===1077936155&&t.report(26),c}a(Ti,"parseBinaryExpression");function uC(t,e,i,r,o){r||t.report(0);let{tokenStart:s}=t,l=t.getToken();V(t,e|32);let c=gt(t,e,i,0,o,1);return t.getToken()===8391735&&t.report(33),e&1&&l===16863276&&(c.type==="Identifier"?t.report(121):Tk(c)&&t.report(127)),t.assignable=2,t.finishNode({type:"UnaryExpression",operator:ee[l&255],argument:c,prefix:!0},s)}a(uC,"parseUnaryExpression");function hC(t,e,i,r,o,s,l,c){let u=t.getToken(),d=re(t,e),{flags:p}=t;if((p&1)===0){if(t.getToken()===86104)return Ac(t,e,i,1,r,c);if(bs(e,t.getToken()))return o||t.report(0),(t.getToken()&36864)===36864&&(t.flags|=256),Mc(t,e,i,s,c)}return!l&&t.getToken()===67174411?ta(t,e,i,d,s,1,0,p,c):t.getToken()===10?(ko(t,e,u),l&&t.report(51),(u&36864)===36864&&(t.flags|=256),Io(t,e,i,t.tokenValue,d,l,s,0,c)):(t.assignable=1,d)}a(hC,"parseAsyncExpression");function dC(t,e,i,r,o,s){if(r&&(t.destructible|=256),e&1024){V(t,e|32),e&8192&&t.report(32),o||t.report(26),t.getToken()===22&&t.report(124);let l=null,c=!1;return(t.flags&1)===0?(c=$(t,e|32,8391476),(t.getToken()&77824||c)&&(l=be(t,e,i,1,0,t.tokenStart))):t.getToken()===8391476&&t.report(30,ee[t.getToken()&255]),t.assignable=2,t.finishNode({type:"YieldExpression",argument:l,delegate:c},s)}return e&1&&t.report(97,"yield"),ea(t,e,i)}a(dC,"parseYieldExpressionOrIdentifier");function _C(t,e,i,r,o,s){o&&(t.destructible|=128),e&524288&&t.report(177);let l=ea(t,e,i);if(l.type==="ArrowFunctionExpression"||(t.getToken()&65536)===0){if(e&2048)throw new Re(s,{index:t.startIndex,line:t.startLine,column:t.startColumn},176);if(e&2)throw new Re(s,{index:t.startIndex,line:t.startLine,column:t.startColumn},110);if(e&8192&&e&2048)throw new Re(s,{index:t.startIndex,line:t.startLine,column:t.startColumn},110);return l}if(e&8192)throw new Re(s,{index:t.startIndex,line:t.startLine,column:t.startColumn},31);if(e&2048||e&2&&e&8){if(r)throw new Re(s,{index:t.startIndex,line:t.startLine,column:t.startColumn},0);let u=gt(t,e,i,0,0,1);return t.getToken()===8391735&&t.report(33),t.assignable=2,t.finishNode({type:"AwaitExpression",argument:u},s)}if(e&2)throw new Re(s,{index:t.startIndex,line:t.startLine,column:t.startColumn},98);return l}a(_C,"parseAwaitExpressionOrIdentifier");function So(t,e,i,r,o,s,l){let{tokenStart:c}=t;U(t,e|32,2162700);let u=[];if(t.getToken()!==1074790415){for(;t.getToken()===134283267;){let{index:d,tokenStart:p,tokenIndex:_,tokenValue:b}=t,g=t.getToken(),C=Ue(t,e);if(pc(t,d,_,b)){if(e|=1,t.flags&128)throw new Re(p,t.currentLocation,66);if(t.flags&64)throw new Re(p,t.currentLocation,9);if(t.flags&4096)throw new Re(p,t.currentLocation,15);l?.reportScopeError()}u.push($r(t,e,C,g,p))}e&1&&(s&&((s&537079808)===537079808&&t.report(119),(s&36864)===36864&&t.report(40)),t.flags&512&&t.report(119),t.flags&256&&t.report(118))}for(t.flags=(t.flags|512|256|64|4096)^4928,t.destructible=(t.destructible|256)^256;t.getToken()!==1074790415;)u.push(ys(t,e,i,r,4,{}));return U(t,o&24?e|32:e,1074790415),t.flags&=-4289,t.getToken()===1077936155&&t.report(26),t.finishNode({type:"BlockStatement",body:u},c)}a(So,"parseFunctionBody");function pC(t,e){let{tokenStart:i}=t;switch(V(t,e),t.getToken()){case 67108990:t.report(167);case 67174411:{(e&512)===0&&t.report(28),t.assignable=2;break}case 69271571:case 67108877:{(e&256)===0&&t.report(29),t.assignable=1;break}default:t.report(30,"super")}return t.finishNode({type:"Super"},i)}a(pC,"parseSuperExpression");function gt(t,e,i,r,o,s){let l=t.tokenStart,c=pt(t,e,i,2,0,r,o,s,l);return oe(t,e,i,c,o,0,l)}a(gt,"parseLeftHandSideExpression");function fC(t,e,i,r){t.assignable&2&&t.report(55);let o=t.getToken();return V(t,e),t.assignable=2,t.finishNode({type:"UpdateExpression",argument:i,operator:ee[o&255],prefix:!1},r)}a(fC,"parseUpdateExpression");function oe(t,e,i,r,o,s,l){if((t.getToken()&33619968)===33619968&&(t.flags&1)===0)r=fC(t,e,r,l);else if((t.getToken()&67108864)===67108864){switch(e=(e|131072)^131072,t.getToken()){case 67108877:{V(t,(e|262144|8)^8),e&16&&t.getToken()===130&&t.tokenValue==="super"&&t.report(173),t.assignable=1;let c=Jr(t,e|64,i);r=t.finishNode({type:"MemberExpression",object:r,computed:!1,property:c,optional:!1},l);break}case 69271571:{let c=!1;(t.flags&2048)===2048&&(c=!0,t.flags=(t.flags|2048)^2048),V(t,e|32);let{tokenStart:u}=t,d=Xe(t,e,i,o,1,u);U(t,e,20),t.assignable=1,r=t.finishNode({type:"MemberExpression",object:r,computed:!0,property:d,optional:!1},l),c&&(t.flags|=2048);break}case 67174411:{if((t.flags&1024)===1024)return t.flags=(t.flags|1024)^1024,r;let c=!1;(t.flags&2048)===2048&&(c=!0,t.flags=(t.flags|2048)^2048);let u=Zr(t,e,i,o);t.assignable=2,r=t.finishNode({type:"CallExpression",callee:r,arguments:u,optional:!1},l),c&&(t.flags|=2048);break}case 67108990:{V(t,(e|262144|8)^8),t.flags|=2048,t.assignable=2,r=mC(t,e,i,r,l);break}default:(t.flags&2048)===2048&&t.report(166),t.assignable=2,r=t.finishNode({type:"TaggedTemplateExpression",tag:r,quasi:t.getToken()===67174408?Qr(t,e|64,i):Xr(t,e)},l)}r=oe(t,e,i,r,0,1,l)}return s===0&&(t.flags&2048)===2048&&(t.flags=(t.flags|2048)^2048,r=t.finishNode({type:"ChainExpression",expression:r},l)),r}a(oe,"parseMemberOrUpdateExpression");function mC(t,e,i,r,o){let s=!1,l;if((t.getToken()===69271571||t.getToken()===67174411)&&(t.flags&2048)===2048&&(s=!0,t.flags=(t.flags|2048)^2048),t.getToken()===69271571){V(t,e|32);let{tokenStart:c}=t,u=Xe(t,e,i,0,1,c);U(t,e,20),t.assignable=2,l=t.finishNode({type:"MemberExpression",object:r,computed:!0,optional:!0,property:u},o)}else if(t.getToken()===67174411){let c=Zr(t,e,i,0);t.assignable=2,l=t.finishNode({type:"CallExpression",callee:r,arguments:c,optional:!0},o)}else{let c=Jr(t,e,i);t.assignable=2,l=t.finishNode({type:"MemberExpression",object:r,computed:!1,optional:!0,property:c},o)}return s&&(t.flags|=2048),l}a(mC,"parseOptionalChain");function Jr(t,e,i){return(t.getToken()&143360)===0&&t.getToken()!==-2147483528&&t.getToken()!==-2147483527&&t.getToken()!==130&&t.report(160),t.getToken()===130?mo(t,e,i,0):re(t,e)}a(Jr,"parsePropertyOrPrivatePropertyName");function vC(t,e,i,r,o,s){r&&t.report(56),o||t.report(0);let l=t.getToken();V(t,e|32);let c=gt(t,e,i,0,0,1);return t.assignable&2&&t.report(55),t.assignable=2,t.finishNode({type:"UpdateExpression",argument:c,operator:ee[l&255],prefix:!0},s)}a(vC,"parseUpdateExpressionPrefixed");function pt(t,e,i,r,o,s,l,c,u){if((t.getToken()&143360)===143360){switch(t.getToken()){case 209006:return _C(t,e,i,o,l,u);case 241771:return dC(t,e,i,l,s,u);case 209005:return hC(t,e,i,l,c,s,o,u)}let{tokenValue:d}=t,p=t.getToken(),_=re(t,e|64);return t.getToken()===10?(c||t.report(0),ko(t,e,p),(p&36864)===36864&&(t.flags|=256),Io(t,e,i,d,_,o,s,0,u)):(e&16&&!(e&32768)&&!(e&8192)&&t.tokenValue==="arguments"&&t.report(130),(p&255)===73&&(e&1&&t.report(113),r&24&&t.report(100)),t.assignable=e&1&&(p&537079808)===537079808?2:1,_)}if((t.getToken()&134217728)===134217728)return Ue(t,e);switch(t.getToken()){case 33619993:case 33619994:return vC(t,e,i,o,c,u);case 16863276:case 16842798:case 16842799:case 25233968:case 25233969:case 16863275:case 16863277:return uC(t,e,i,c,l);case 86104:return Ac(t,e,i,0,l,u);case 2162700:return IC(t,e,i,s?0:1,l);case 69271571:return SC(t,e,i,s?0:1,l);case 67174411:return AC(t,e|64,i,s,1,0,u);case 86021:case 86022:case 86023:return CC(t,e);case 86111:return TC(t,e);case 65540:return MC(t,e);case 132:case 86094:return RC(t,e,i,l,u);case 86109:return pC(t,e);case 67174409:return Xr(t,e);case 67174408:return Qr(t,e,i);case 86107:return xC(t,e,i,l);case 134283388:return Ec(t,e);case 130:return mo(t,e,i,0);case 86106:return bC(t,e,i,o,l,u);case 8456256:if(t.options.jsx)return Ao(t,e,i,0,t.tokenStart);default:if(bs(e,t.getToken()))return ea(t,e,i);t.report(30,ee[t.getToken()&255])}}a(pt,"parsePrimaryExpression");function bC(t,e,i,r,o,s){let l=re(t,e);return t.getToken()===67108877?Sc(t,e,l,s):(r&&t.report(142),l=Ic(t,e,i,o,s),t.assignable=2,oe(t,e,i,l,o,0,s))}a(bC,"parseImportCallOrMetaExpression");function Sc(t,e,i,r){(e&2)===0&&t.report(169),V(t,e);let o=t.getToken();return o!==209030&&t.tokenValue!=="meta"?t.report(174):o&-2147483648&&t.report(175),t.assignable=2,t.finishNode({type:"MetaProperty",meta:i,property:re(t,e)},r)}a(Sc,"parseImportMetaExpression");function Ic(t,e,i,r,o){U(t,e|32,67174411),t.getToken()===14&&t.report(143);let s=be(t,e,i,1,r,t.tokenStart),l=null;if(t.getToken()===18){if(U(t,e,18),t.getToken()!==16){let u=(e|131072)^131072;l=be(t,u,i,1,r,t.tokenStart)}$(t,e,18)}let c={type:"ImportExpression",source:s,options:l};return U(t,e,16),t.finishNode(c,o)}a(Ic,"parseImportExpression");function kr(t,e){if(!$(t,e,20579))return[];U(t,e,2162700);let i=[],r=new Set;for(;t.getToken()!==1074790415;){let o=t.tokenStart,s=yC(t,e);U(t,e,21);let l=gC(t,e),c=s.type==="Literal"?s.value:s.name;r.has(c)&&t.report(145,`${c}`),r.add(c),i.push(t.finishNode({type:"ImportAttribute",key:s,value:l},o)),t.getToken()!==1074790415&&U(t,e,18)}return U(t,e,1074790415),i}a(kr,"parseImportAttributes");function gC(t,e){if(t.getToken()===134283267)return Ue(t,e);t.report(30,ee[t.getToken()&255])}a(gC,"parseStringLiteral");function yC(t,e){if(t.getToken()===134283267)return Ue(t,e);if(t.getToken()&143360)return re(t,e);t.report(30,ee[t.getToken()&255])}a(yC,"parseIdentifierOrStringLiteral");function wC(t,e){let i=e.length;for(let r=0;r<i;r++){let o=e.charCodeAt(r);(o&64512)===55296&&(o>56319||++r>=i||(e.charCodeAt(r)&64512)!==56320)&&t.report(171,JSON.stringify(e.charAt(r--)))}}a(wC,"validateStringWellFormed");function Zs(t,e){if(t.getToken()===134283267)return wC(t,t.tokenValue),Ue(t,e);if(t.getToken()&143360)return re(t,e);t.report(30,ee[t.getToken()&255])}a(Zs,"parseModuleExportName");function Ec(t,e){let{tokenRaw:i,tokenValue:r,tokenStart:o}=t;V(t,e),t.assignable=2;let s={type:"Literal",value:r,bigint:String(r)};return t.options.raw&&(s.raw=i),t.finishNode(s,o)}a(Ec,"parseBigIntLiteral");function Xr(t,e){t.assignable=2;let{tokenValue:i,tokenRaw:r,tokenStart:o}=t;U(t,e,67174409);let s=[eo(t,i,r,o,!0)];return t.finishNode({type:"TemplateLiteral",expressions:[],quasis:s},o)}a(Xr,"parseTemplateLiteral");function Qr(t,e,i){e=(e|131072)^131072;let{tokenValue:r,tokenRaw:o,tokenStart:s}=t;U(t,e&-65|32,67174408);let l=[eo(t,r,o,s,!1)],c=[Xe(t,e&-65,i,0,1,t.tokenStart)];for(t.getToken()!==1074790415&&t.report(83);t.setToken(wk(t,e),!0)!==67174409;){let{tokenValue:u,tokenRaw:d,tokenStart:p}=t;U(t,e&-65|32,67174408),l.push(eo(t,u,d,p,!1)),c.push(Xe(t,e,i,0,1,t.tokenStart)),t.getToken()!==1074790415&&t.report(83)}{let{tokenValue:u,tokenRaw:d,tokenStart:p}=t;U(t,e,67174409),l.push(eo(t,u,d,p,!0))}return t.finishNode({type:"TemplateLiteral",expressions:c,quasis:l},s)}a(Qr,"parseTemplate");function eo(t,e,i,r,o){let s=t.finishNode({type:"TemplateElement",value:{cooked:e,raw:i},tail:o},r),l=o?1:2;return t.options.ranges&&(s.start+=1,s.range[0]+=1,s.end-=l,s.range[1]-=l),t.options.loc&&(s.loc.start.column+=1,s.loc.end.column-=l),s}a(eo,"parseTemplateElement");function kC(t,e,i){let r=t.tokenStart;e=(e|131072)^131072,U(t,e|32,14);let o=be(t,e,i,1,0,t.tokenStart);return t.assignable=1,t.finishNode({type:"SpreadElement",argument:o},r)}a(kC,"parseSpreadElement");function Zr(t,e,i,r){V(t,e|32);let o=[];if(t.getToken()===16)return V(t,e|64),o;for(;t.getToken()!==16&&(t.getToken()===14?o.push(kC(t,e,i)):o.push(be(t,e,i,1,r,t.tokenStart)),!(t.getToken()!==18||(V(t,e|32),t.getToken()===16))););return U(t,e|64,16),o}a(Zr,"parseArguments");function re(t,e){let{tokenValue:i,tokenStart:r}=t,o=i==="await"&&(t.getToken()&-2147483648)===0;return V(t,e|(o?32:0)),t.finishNode({type:"Identifier",name:i},r)}a(re,"parseIdentifier");function Ue(t,e){let{tokenValue:i,tokenRaw:r,tokenStart:o}=t;return t.getToken()===134283388?Ec(t,e):(V(t,e),t.assignable=2,t.finishNode(t.options.raw?{type:"Literal",value:i,raw:r}:{type:"Literal",value:i},o))}a(Ue,"parseLiteral");function CC(t,e){let i=t.tokenStart,r=ee[t.getToken()&255],o=t.getToken()===86023?null:r==="true";return V(t,e),t.assignable=2,t.finishNode(t.options.raw?{type:"Literal",value:o,raw:r}:{type:"Literal",value:o},i)}a(CC,"parseNullOrTrueOrFalseLiteral");function TC(t,e){let{tokenStart:i}=t;return V(t,e),t.assignable=2,t.finishNode({type:"ThisExpression"},i)}a(TC,"parseThisExpression");function Si(t,e,i,r,o,s,l,c,u){V(t,e|32);let d=s?Kr(t,e,8391476):0,p=null,_,b=i?t.createScope():void 0;if(t.getToken()===67174411)(l&1)===0&&t.report(39,"Function");else{let S=o&4&&((e&8)===0||(e&2)===0)?4:64|(c?1024:0)|(d?1024:0);fc(t,e,t.getToken()),i&&(S&4?i.addVarName(e,t.tokenValue,S):i.addBlockName(e,t.tokenValue,S,o),b=b?.createChildScope(128),l&&l&2&&t.declareUnboundVariable(t.tokenValue)),_=t.getToken(),t.getToken()&143360?p=re(t,e):t.report(30,ee[t.getToken()&255])}e=(e|28416)^28416|65536|(c?2048:0)|(d?1024:0)|(d?0:262144),b=b?.createChildScope(256);let g=Pc(t,(e|8192)&-524289,b,r,0,1),C=524428,T=So(t,(e|C)^C|32768|4096,b?.createChildScope(64),r,8,_,b);return t.finishNode({type:"FunctionDeclaration",id:p,params:g,body:T,async:c===1,generator:d===1},u)}a(Si,"parseFunctionDeclaration");function Ac(t,e,i,r,o,s){V(t,e|32);let l=Kr(t,e,8391476),c=(r?2048:0)|(l?1024:0),u=null,d,p=t.createScopeIfLexical(),_=552704;t.getToken()&143360&&(fc(t,(e|_)^_|c,t.getToken()),p=p?.createChildScope(128),d=t.getToken(),u=re(t,e)),e=(e|_)^_|65536|c|(l?0:262144),p=p?.createChildScope(256);let b=Pc(t,(e|8192)&-524289,p,i,o,1),g=So(t,e&-131229|32768|4096,p?.createChildScope(64),i,0,d,p);return t.assignable=2,t.finishNode({type:"FunctionExpression",id:u,params:b,body:g,async:r===1,generator:l===1},s)}a(Ac,"parseFunctionExpression");function SC(t,e,i,r,o){let s=yt(t,e,void 0,i,r,o,0,2,0);return t.destructible&64&&t.report(63),t.destructible&8&&t.report(62),s}a(SC,"parseArrayLiteral");function yt(t,e,i,r,o,s,l,c,u){let{tokenStart:d}=t;V(t,e|32);let p=[],_=0;for(e=(e|131072)^131072;t.getToken()!==20;)if($(t,e|32,18))p.push(null);else{let g,{tokenStart:C,tokenValue:T}=t,S=t.getToken();if(S&143360)if(g=pt(t,e,r,c,0,1,s,1,C),t.getToken()===1077936155){t.assignable&2&&t.report(26),V(t,e|32),i?.addVarOrBlock(e,T,c,u);let k=be(t,e,r,1,s,t.tokenStart);g=t.finishNode(l?{type:"AssignmentPattern",left:g,right:k}:{type:"AssignmentExpression",operator:"=",left:g,right:k},C),_|=t.destructible&256?256:0|t.destructible&128?128:0}else t.getToken()===18||t.getToken()===20?(t.assignable&2?_|=16:i?.addVarOrBlock(e,T,c,u),_|=t.destructible&256?256:0|t.destructible&128?128:0):(_|=c&1?32:(c&2)===0?16:0,g=oe(t,e,r,g,s,0,C),t.getToken()!==18&&t.getToken()!==20?(t.getToken()!==1077936155&&(_|=16),g=Te(t,e,r,s,l,C,g)):t.getToken()!==1077936155&&(_|=t.assignable&2?16:32));else S&2097152?(g=t.getToken()===2162700?wt(t,e,i,r,0,s,l,c,u):yt(t,e,i,r,0,s,l,c,u),_|=t.destructible,t.assignable=t.destructible&16?2:1,t.getToken()===18||t.getToken()===20?t.assignable&2&&(_|=16):t.destructible&8?t.report(71):(g=oe(t,e,r,g,s,0,C),_=t.assignable&2?16:0,t.getToken()!==18&&t.getToken()!==20?g=Te(t,e,r,s,l,C,g):t.getToken()!==1077936155&&(_|=t.assignable&2?16:32))):S===14?(g=Pn(t,e,i,r,20,c,u,0,s,l),_|=t.destructible,t.getToken()!==18&&t.getToken()!==20&&t.report(30,ee[t.getToken()&255])):(g=gt(t,e,r,1,0,1),t.getToken()!==18&&t.getToken()!==20?(g=Te(t,e,r,s,l,C,g),(c&3)===0&&S===67174411&&(_|=16)):t.assignable&2?_|=16:S===67174411&&(_|=t.assignable&1&&c&3?32:16));if(p.push(g),$(t,e|32,18)){if(t.getToken()===20)break}else break}U(t,e,20);let b=t.finishNode({type:l?"ArrayPattern":"ArrayExpression",elements:p},d);return!o&&t.getToken()&4194304?xc(t,e,r,_,s,l,d,b):(t.destructible=_,b)}a(yt,"parseArrayExpressionOrPattern");function xc(t,e,i,r,o,s,l,c){t.getToken()!==1077936155&&t.report(26),V(t,e|32),r&16&&t.report(26),s||Et(t,c);let{tokenStart:u}=t,d=be(t,e,i,1,o,u);return t.destructible=(r|64|8)^72|(t.destructible&128?128:0)|(t.destructible&256?256:0),t.finishNode(s?{type:"AssignmentPattern",left:c,right:d}:{type:"AssignmentExpression",left:c,operator:"=",right:d},l)}a(xc,"parseArrayOrObjectAssignmentPattern");function Pn(t,e,i,r,o,s,l,c,u,d){let{tokenStart:p}=t;V(t,e|32);let _=null,b=0,{tokenValue:g,tokenStart:C}=t,T=t.getToken();if(T&143360)t.assignable=1,_=pt(t,e,r,s,0,1,u,1,C),T=t.getToken(),_=oe(t,e,r,_,u,0,C),t.getToken()!==18&&t.getToken()!==o&&(t.assignable&2&&t.getToken()===1077936155&&t.report(71),b|=16,_=Te(t,e,r,u,d,C,_)),t.assignable&2?b|=16:T===o||T===18?i?.addVarOrBlock(e,g,s,l):b|=32,b|=t.destructible&128?128:0;else if(T===o)t.report(41);else if(T&2097152)_=t.getToken()===2162700?wt(t,e,i,r,1,u,d,s,l):yt(t,e,i,r,1,u,d,s,l),T=t.getToken(),T!==1077936155&&T!==o&&T!==18?(t.destructible&8&&t.report(71),_=oe(t,e,r,_,u,0,C),b|=t.assignable&2?16:0,(t.getToken()&4194304)===4194304?(t.getToken()!==1077936155&&(b|=16),_=Te(t,e,r,u,d,C,_)):((t.getToken()&8388608)===8388608&&(_=Ti(t,e,r,1,C,4,T,_)),$(t,e|32,22)&&(_=ji(t,e,r,_,C)),b|=t.assignable&2?16:32)):b|=o===1074790415&&T!==1077936155?16:t.destructible;else{b|=32,_=gt(t,e,r,1,u,1);let{tokenStart:S}=t,k=t.getToken();return k===1077936155?(t.assignable&2&&t.report(26),_=Te(t,e,r,u,d,S,_),b|=16):(k===18?b|=16:k!==o&&(_=Te(t,e,r,u,d,S,_)),b|=t.assignable&1?32:16),t.destructible=b,t.getToken()!==o&&t.getToken()!==18&&t.report(161),t.finishNode({type:d?"RestElement":"SpreadElement",argument:_},p)}if(t.getToken()!==o)if(s&1&&(b|=c?16:32),$(t,e|32,1077936155)){b&16&&t.report(26),Et(t,_);let S=be(t,e,r,1,u,t.tokenStart);_=t.finishNode(d?{type:"AssignmentPattern",left:_,right:S}:{type:"AssignmentExpression",left:_,operator:"=",right:S},C),b=16}else b|=16;return t.destructible=b,t.finishNode({type:d?"RestElement":"SpreadElement",argument:_},p)}a(Pn,"parseSpreadOrRestElement");function It(t,e,i,r,o,s){let l=11264|((r&64)===0?16896:0);e=(e|l)^l|(r&8?1024:0)|(r&16?2048:0)|(r&64?16384:0)|256|32768|65536;let c=t.createScopeIfLexical(256),u=EC(t,(e|8192)&-524289,c,i,r,1,o);c=c?.createChildScope(64);let d=So(t,e&-655373|32768|4096,c,i,0,void 0,c?.parent);return t.finishNode({type:"FunctionExpression",params:u,body:d,async:(r&16)>0,generator:(r&8)>0,id:null},s)}a(It,"parseMethodDefinition");function IC(t,e,i,r,o){let s=wt(t,e,void 0,i,r,o,0,2,0);return t.destructible&64&&t.report(63),t.destructible&8&&t.report(62),s}a(IC,"parseObjectLiteral");function wt(t,e,i,r,o,s,l,c,u){let{tokenStart:d}=t;V(t,e);let p=[],_=0,b=0;for(e=(e|131072)^131072;t.getToken()!==1074790415;){let{tokenValue:C,tokenStart:T}=t,S=t.getToken();if(S===14)p.push(Pn(t,e,i,r,1074790415,c,u,0,s,l));else{let k=0,A=null,I;if(t.getToken()&143360||t.getToken()===-2147483528||t.getToken()===-2147483527)if(t.getToken()===-2147483527&&(_|=16),A=re(t,e),t.getToken()===18||t.getToken()===1074790415||t.getToken()===1077936155)if(k|=4,e&1&&(S&537079808)===537079808?_|=16:_o(t,e,c,S,0),i?.addVarOrBlock(e,C,c,u),$(t,e|32,1077936155)){_|=8;let D=be(t,e,r,1,s,t.tokenStart);_|=t.destructible&256?256:0|t.destructible&128?128:0,I=t.finishNode({type:"AssignmentPattern",left:t.options.uniqueKeyInPattern?Object.assign({},A):A,right:D},T)}else _|=(S===209006?128:0)|(S===-2147483528?16:0),I=t.options.uniqueKeyInPattern?Object.assign({},A):A;else if($(t,e|32,21)){let{tokenStart:D}=t;if(C==="__proto__"&&b++,t.getToken()&143360){let H=t.getToken(),j=t.tokenValue;I=pt(t,e,r,c,0,1,s,1,D);let W=t.getToken();I=oe(t,e,r,I,s,0,D),t.getToken()===18||t.getToken()===1074790415?W===1077936155||W===1074790415||W===18?(_|=t.destructible&128?128:0,t.assignable&2?_|=16:(H&143360)===143360&&i?.addVarOrBlock(e,j,c,u)):_|=t.assignable&1?32:16:(t.getToken()&4194304)===4194304?(t.assignable&2?_|=16:W!==1077936155?_|=32:i?.addVarOrBlock(e,j,c,u),I=Te(t,e,r,s,l,D,I)):(_|=16,(t.getToken()&8388608)===8388608&&(I=Ti(t,e,r,1,D,4,W,I)),$(t,e|32,22)&&(I=ji(t,e,r,I,D)))}else(t.getToken()&2097152)===2097152?(I=t.getToken()===69271571?yt(t,e,i,r,0,s,l,c,u):wt(t,e,i,r,0,s,l,c,u),_=t.destructible,t.assignable=_&16?2:1,t.getToken()===18||t.getToken()===1074790415?t.assignable&2&&(_|=16):t.destructible&8?t.report(71):(I=oe(t,e,r,I,s,0,D),_=t.assignable&2?16:0,(t.getToken()&4194304)===4194304?I=Ps(t,e,r,s,l,D,I):((t.getToken()&8388608)===8388608&&(I=Ti(t,e,r,1,D,4,S,I)),$(t,e|32,22)&&(I=ji(t,e,r,I,D)),_|=t.assignable&2?16:32))):(I=gt(t,e,r,1,s,1),_|=t.assignable&1?32:16,t.getToken()===18||t.getToken()===1074790415?t.assignable&2&&(_|=16):(I=oe(t,e,r,I,s,0,D),_=t.assignable&2?16:0,t.getToken()!==18&&S!==1074790415&&(t.getToken()!==1077936155&&(_|=16),I=Te(t,e,r,s,l,D,I))))}else t.getToken()===69271571?(_|=16,S===209005&&(k|=16),k|=(S===209008?256:S===209009?512:1)|2,A=bn(t,e,r,s),_|=t.assignable,I=It(t,e,r,k,s,t.tokenStart)):t.getToken()&143360?(_|=16,S===-2147483528&&t.report(95),S===209005?(t.flags&1&&t.report(132),k|=17):S===209008?k|=256:S===209009?k|=512:t.report(0),A=re(t,e),I=It(t,e,r,k,s,t.tokenStart)):t.getToken()===67174411?(_|=16,k|=1,I=It(t,e,r,k,s,t.tokenStart)):t.getToken()===8391476?(_|=16,S===209008?t.report(42):S===209009?t.report(43):S!==209005&&t.report(30,ee[52]),V(t,e),k|=9|(S===209005?16:0),t.getToken()&143360?A=re(t,e):(t.getToken()&134217728)===134217728?A=Ue(t,e):t.getToken()===69271571?(k|=2,A=bn(t,e,r,s),_|=t.assignable):t.report(30,ee[t.getToken()&255]),I=It(t,e,r,k,s,t.tokenStart)):(t.getToken()&134217728)===134217728?(S===209005&&(k|=16),k|=S===209008?256:S===209009?512:1,_|=16,A=Ue(t,e),I=It(t,e,r,k,s,t.tokenStart)):t.report(133);else if((t.getToken()&134217728)===134217728)if(A=Ue(t,e),t.getToken()===21){U(t,e|32,21);let{tokenStart:D}=t;if(C==="__proto__"&&b++,t.getToken()&143360){I=pt(t,e,r,c,0,1,s,1,D);let{tokenValue:H}=t,j=t.getToken();I=oe(t,e,r,I,s,0,D),t.getToken()===18||t.getToken()===1074790415?j===1077936155||j===1074790415||j===18?t.assignable&2?_|=16:i?.addVarOrBlock(e,H,c,u):_|=t.assignable&1?32:16:t.getToken()===1077936155?(t.assignable&2&&(_|=16),I=Te(t,e,r,s,l,D,I)):(_|=16,I=Te(t,e,r,s,l,D,I))}else(t.getToken()&2097152)===2097152?(I=t.getToken()===69271571?yt(t,e,i,r,0,s,l,c,u):wt(t,e,i,r,0,s,l,c,u),_=t.destructible,t.assignable=_&16?2:1,t.getToken()===18||t.getToken()===1074790415?t.assignable&2&&(_|=16):(t.destructible&8)!==8&&(I=oe(t,e,r,I,s,0,D),_=t.assignable&2?16:0,(t.getToken()&4194304)===4194304?I=Ps(t,e,r,s,l,D,I):((t.getToken()&8388608)===8388608&&(I=Ti(t,e,r,1,D,4,S,I)),$(t,e|32,22)&&(I=ji(t,e,r,I,D)),_|=t.assignable&2?16:32))):(I=gt(t,e,r,1,0,1),_|=t.assignable&1?32:16,t.getToken()===18||t.getToken()===1074790415?t.assignable&2&&(_|=16):(I=oe(t,e,r,I,s,0,D),_=t.assignable&1?0:16,t.getToken()!==18&&t.getToken()!==1074790415&&(t.getToken()!==1077936155&&(_|=16),I=Te(t,e,r,s,l,D,I))))}else t.getToken()===67174411?(k|=1,I=It(t,e,r,k,s,t.tokenStart),_=t.assignable|16):t.report(134);else if(t.getToken()===69271571)if(A=bn(t,e,r,s),_|=t.destructible&256?256:0,k|=2,t.getToken()===21){V(t,e|32);let{tokenStart:D,tokenValue:H}=t,j=t.getToken();if(t.getToken()&143360){I=pt(t,e,r,c,0,1,s,1,D);let W=t.getToken();I=oe(t,e,r,I,s,0,D),(t.getToken()&4194304)===4194304?(_|=t.assignable&2?16:W===1077936155?0:32,I=Ps(t,e,r,s,l,D,I)):t.getToken()===18||t.getToken()===1074790415?W===1077936155||W===1074790415||W===18?t.assignable&2?_|=16:(j&143360)===143360&&i?.addVarOrBlock(e,H,c,u):_|=t.assignable&1?32:16:(_|=16,I=Te(t,e,r,s,l,D,I))}else(t.getToken()&2097152)===2097152?(I=t.getToken()===69271571?yt(t,e,i,r,0,s,l,c,u):wt(t,e,i,r,0,s,l,c,u),_=t.destructible,t.assignable=_&16?2:1,t.getToken()===18||t.getToken()===1074790415?t.assignable&2&&(_|=16):_&8?t.report(62):(I=oe(t,e,r,I,s,0,D),_=t.assignable&2?_|16:0,(t.getToken()&4194304)===4194304?(t.getToken()!==1077936155&&(_|=16),I=Ps(t,e,r,s,l,D,I)):((t.getToken()&8388608)===8388608&&(I=Ti(t,e,r,1,D,4,S,I)),$(t,e|32,22)&&(I=ji(t,e,r,I,D)),_|=t.assignable&2?16:32))):(I=gt(t,e,r,1,0,1),_|=t.assignable&1?32:16,t.getToken()===18||t.getToken()===1074790415?t.assignable&2&&(_|=16):(I=oe(t,e,r,I,s,0,D),_=t.assignable&1?0:16,t.getToken()!==18&&t.getToken()!==1074790415&&(t.getToken()!==1077936155&&(_|=16),I=Te(t,e,r,s,l,D,I))))}else t.getToken()===67174411?(k|=1,I=It(t,e,r,k,s,t.tokenStart),_=16):t.report(44);else if(S===8391476)if(U(t,e|32,8391476),k|=8,t.getToken()&143360){let D=t.getToken();if(A=re(t,e),k|=1,t.getToken()===67174411)_|=16,I=It(t,e,r,k,s,t.tokenStart);else throw new Re(t.tokenStart,t.currentLocation,D===209005?46:D===209008||t.getToken()===209009?45:47,ee[D&255])}else(t.getToken()&134217728)===134217728?(_|=16,A=Ue(t,e),k|=1,I=It(t,e,r,k,s,t.tokenStart)):t.getToken()===69271571?(_|=16,k|=3,A=bn(t,e,r,s),I=It(t,e,r,k,s,t.tokenStart)):t.report(126);else t.report(30,ee[S&255]);_|=t.destructible&128?128:0,t.destructible=_,p.push(t.finishNode({type:"Property",key:A,value:I,kind:k&768?k&512?"set":"get":"init",computed:(k&2)>0,method:(k&1)>0,shorthand:(k&4)>0},T))}if(_|=t.destructible,t.getToken()!==18)break;V(t,e)}U(t,e,1074790415),b>1&&(_|=64);let g=t.finishNode({type:l?"ObjectPattern":"ObjectExpression",properties:p},d);return!o&&t.getToken()&4194304?xc(t,e,r,_,s,l,d,g):(t.destructible=_,g)}a(wt,"parseObjectLiteralOrPattern");function EC(t,e,i,r,o,s,l){U(t,e,67174411);let c=[];if(t.flags=(t.flags|128)^128,t.getToken()===16)return o&512&&t.report(37,"Setter","one",""),V(t,e),c;o&256&&t.report(37,"Getter","no","s"),o&512&&t.getToken()===14&&t.report(38),e=(e|131072)^131072;let u=0,d=0;for(;t.getToken()!==18;){let p=null,{tokenStart:_}=t;if(t.getToken()&143360?((e&1)===0&&((t.getToken()&36864)===36864&&(t.flags|=256),(t.getToken()&537079808)===537079808&&(t.flags|=512)),p=ia(t,e,i,o|1,0)):(t.getToken()===2162700?p=wt(t,e,i,r,1,l,1,s,0):t.getToken()===69271571?p=yt(t,e,i,r,1,l,1,s,0):t.getToken()===14&&(p=Pn(t,e,i,r,16,s,0,0,l,1)),d=1,t.destructible&48&&t.report(50)),t.getToken()===1077936155){V(t,e|32),d=1;let b=be(t,e,r,1,0,t.tokenStart);p=t.finishNode({type:"AssignmentPattern",left:p,right:b},_)}if(u++,c.push(p),!$(t,e,18)||t.getToken()===16)break}return o&512&&u!==1&&t.report(37,"Setter","one",""),i?.reportScopeError(),d&&(t.flags|=128),U(t,e,16),c}a(EC,"parseMethodFormals");function bn(t,e,i,r){V(t,e|32);let o=be(t,(e|131072)^131072,i,1,r,t.tokenStart);return U(t,e,20),o}a(bn,"parseComputedPropertyName");function AC(t,e,i,r,o,s,l){var c;t.flags=(t.flags|128)^128;let u=t.tokenStart;V(t,e|32|262144);let d=(c=t.createScopeIfLexical())==null?void 0:c.createChildScope(512);if(e=(e|131072)^131072,$(t,e,16))return fo(t,e,d,i,[],r,0,l);let p=0;t.destructible&=-385;let _,b=[],g=0,C=0,T=0,S=t.tokenStart;for(t.assignable=1;t.getToken()!==16;){let{tokenStart:k}=t,A=t.getToken();if(A&143360)d?.addBlockName(e,t.tokenValue,1,0),(A&537079808)===537079808?C=1:(A&36864)===36864&&(T=1),_=pt(t,e,i,o,0,1,1,1,k),t.getToken()===16||t.getToken()===18?t.assignable&2&&(p|=16,C=1):(t.getToken()===1077936155?C=1:p|=16,_=oe(t,e,i,_,1,0,k),t.getToken()!==16&&t.getToken()!==18&&(_=Te(t,e,i,1,0,k,_)));else if((A&2097152)===2097152)_=A===2162700?wt(t,e|262144,d,i,0,1,0,o,s):yt(t,e|262144,d,i,0,1,0,o,s),p|=t.destructible,C=1,t.assignable=2,t.getToken()!==16&&t.getToken()!==18&&(p&8&&t.report(122),_=oe(t,e,i,_,0,0,k),p|=16,t.getToken()!==16&&t.getToken()!==18&&(_=Te(t,e,i,0,0,k,_)));else if(A===14){_=Pn(t,e,d,i,16,o,s,0,1,0),t.destructible&16&&t.report(74),C=1,g&&(t.getToken()===16||t.getToken()===18)&&b.push(_),p|=8;break}else{if(p|=16,_=be(t,e,i,1,1,k),g&&(t.getToken()===16||t.getToken()===18)&&b.push(_),t.getToken()===18&&(g||(g=1,b=[_])),g){for(;$(t,e|32,18);)b.push(be(t,e,i,1,1,t.tokenStart));t.assignable=2,_=t.finishNode({type:"SequenceExpression",expressions:b},S)}return U(t,e,16),t.destructible=p,t.options.preserveParens?t.finishNode({type:"ParenthesizedExpression",expression:_},u):_}if(g&&(t.getToken()===16||t.getToken()===18)&&b.push(_),!$(t,e|32,18))break;if(g||(g=1,b=[_]),t.getToken()===16){p|=8;break}}return g&&(t.assignable=2,_=t.finishNode({type:"SequenceExpression",expressions:b},S)),U(t,e,16),p&16&&p&8&&t.report(151),p|=t.destructible&256?256:0|t.destructible&128?128:0,t.getToken()===10?(p&48&&t.report(49),e&2050&&p&128&&t.report(31),e&1025&&p&256&&t.report(32),C&&(t.flags|=128),T&&(t.flags|=256),fo(t,e,d,i,g?b:[_],r,0,l)):(p&64&&t.report(63),p&8&&t.report(144),t.destructible=(t.destructible|256)^256|p,t.options.preserveParens?t.finishNode({type:"ParenthesizedExpression",expression:_},u):_)}a(AC,"parseParenthesizedExpression");function ea(t,e,i){let{tokenStart:r}=t,{tokenValue:o}=t,s=0,l=0;(t.getToken()&537079808)===537079808?s=1:(t.getToken()&36864)===36864&&(l=1);let c=re(t,e);if(t.assignable=1,t.getToken()===10){let u=t.options.lexical?To(t,e,o):void 0;return s&&(t.flags|=128),l&&(t.flags|=256),ks(t,e,u,i,[c],0,r)}return c}a(ea,"parseIdentifierOrArrow");function Io(t,e,i,r,o,s,l,c,u){l||t.report(57),s&&t.report(51),t.flags&=-129;let d=t.options.lexical?To(t,e,r):void 0;return ks(t,e,d,i,[o],c,u)}a(Io,"parseArrowFromIdentifier");function fo(t,e,i,r,o,s,l,c){s||t.report(57);for(let u=0;u<o.length;++u)Et(t,o[u]);return ks(t,e,i,r,o,l,c)}a(fo,"parseParenthesizedArrow");function ks(t,e,i,r,o,s,l){t.flags&1&&t.report(48),U(t,e|32,10);let c=535552;e=(e|c)^c|(s?2048:0);let u=t.getToken()!==2162700,d;if(i?.reportScopeError(),u)t.flags=(t.flags|512|256|64|4096)^4928,d=be(t,e,r,1,0,t.tokenStart);else{i=i?.createChildScope(64);let p=131084;switch(d=So(t,(e|p)^p|4096,i,r,16,void 0,void 0),t.getToken()){case 69271571:(t.flags&1)===0&&t.report(116);break;case 67108877:case 67174409:case 22:t.report(117);case 67174411:(t.flags&1)===0&&t.report(116),t.flags|=1024;break}(t.getToken()&8388608)===8388608&&(t.flags&1)===0&&t.report(30,ee[t.getToken()&255]),(t.getToken()&33619968)===33619968&&t.report(125)}return t.assignable=2,t.finishNode({type:"ArrowFunctionExpression",params:o,body:d,async:s===1,expression:u,generator:!1},l)}a(ks,"parseArrowFunctionExpression");function Pc(t,e,i,r,o,s){U(t,e,67174411),t.flags=(t.flags|128)^128;let l=[];if($(t,e,16))return l;e=(e|131072)^131072;let c=0;for(;t.getToken()!==18;){let u,{tokenStart:d}=t,p=t.getToken();if(p&143360?((e&1)===0&&((p&36864)===36864&&(t.flags|=256),(p&537079808)===537079808&&(t.flags|=512)),u=ia(t,e,i,s|1,0)):(p===2162700?u=wt(t,e,i,r,1,o,1,s,0):p===69271571?u=yt(t,e,i,r,1,o,1,s,0):p===14?u=Pn(t,e,i,r,16,s,0,0,o,1):t.report(30,ee[p&255]),c=1,t.destructible&48&&t.report(50)),t.getToken()===1077936155){V(t,e|32),c=1;let _=be(t,e,r,1,o,t.tokenStart);u=t.finishNode({type:"AssignmentPattern",left:u,right:_},d)}if(l.push(u),!$(t,e,18)||t.getToken()===16)break}return c&&(t.flags|=128),(c||e&1)&&i?.reportScopeError(),U(t,e,16),l}a(Pc,"parseFormalParametersOrFormalList");function to(t,e,i,r,o,s){let l=t.getToken();if(l&67108864){if(l===67108877){V(t,e|262144),t.assignable=1;let c=Jr(t,e,i);return to(t,e,i,t.finishNode({type:"MemberExpression",object:r,computed:!1,property:c,optional:!1},s),0,s)}else if(l===69271571){V(t,e|32);let{tokenStart:c}=t,u=Xe(t,e,i,o,1,c);return U(t,e,20),t.assignable=1,to(t,e,i,t.finishNode({type:"MemberExpression",object:r,computed:!0,property:u,optional:!1},s),0,s)}else if(l===67174408||l===67174409)return t.assignable=2,to(t,e,i,t.finishNode({type:"TaggedTemplateExpression",tag:r,quasi:t.getToken()===67174408?Qr(t,e|64,i):Xr(t,e|64)},s),0,s)}return r}a(to,"parseMemberExpressionNoCall");function xC(t,e,i,r){let{tokenStart:o}=t,s=re(t,e|32),{tokenStart:l}=t;if($(t,e,67108877)){if(e&65536&&t.getToken()===209029)return t.assignable=2,PC(t,e,s,o);t.report(94)}t.assignable=2,(t.getToken()&16842752)===16842752&&t.report(65,ee[t.getToken()&255]);let c=pt(t,e,i,2,1,0,r,1,l);e=(e|131072)^131072,t.getToken()===67108990&&t.report(168);let u=to(t,e,i,c,r,l);return t.assignable=2,t.finishNode({type:"NewExpression",callee:u,arguments:t.getToken()===67174411?Zr(t,e,i,r):[]},o)}a(xC,"parseNewExpression");function PC(t,e,i,r){let o=re(t,e);return t.finishNode({type:"MetaProperty",meta:i,property:o},r)}a(PC,"parseMetaProperty");function Mc(t,e,i,r,o){return t.getToken()===209006&&t.report(31),e&1025&&t.getToken()===241771&&t.report(32),ko(t,e,t.getToken()),(t.getToken()&36864)===36864&&(t.flags|=256),Io(t,e&-524289|2048,i,t.tokenValue,re(t,e),0,r,1,o)}a(Mc,"parseAsyncArrowAfterIdent");function ta(t,e,i,r,o,s,l,c,u){var d;V(t,e|32);let p=(d=t.createScopeIfLexical())==null?void 0:d.createChildScope(512);if(e=(e|131072)^131072,$(t,e,16))return t.getToken()===10?(c&1&&t.report(48),fo(t,e,p,i,[],o,1,u)):t.finishNode({type:"CallExpression",callee:r,arguments:[],optional:!1},u);let _=0,b=null,g=0;t.destructible=(t.destructible|256|128)^384;let C=[];for(;t.getToken()!==16;){let{tokenStart:T}=t,S=t.getToken();if(S&143360)p?.addBlockName(e,t.tokenValue,s,0),(S&537079808)===537079808?t.flags|=512:(S&36864)===36864&&(t.flags|=256),b=pt(t,e,i,s,0,1,1,1,T),t.getToken()===16||t.getToken()===18?t.assignable&2&&(_|=16,g=1):(t.getToken()===1077936155?g=1:_|=16,b=oe(t,e,i,b,1,0,T),t.getToken()!==16&&t.getToken()!==18&&(b=Te(t,e,i,1,0,T,b)));else if(S&2097152)b=S===2162700?wt(t,e,p,i,0,1,0,s,l):yt(t,e,p,i,0,1,0,s,l),_|=t.destructible,g=1,t.getToken()!==16&&t.getToken()!==18&&(_&8&&t.report(122),b=oe(t,e,i,b,0,0,T),_|=16,(t.getToken()&8388608)===8388608&&(b=Ti(t,e,i,1,u,4,S,b)),$(t,e|32,22)&&(b=ji(t,e,i,b,u)));else if(S===14)b=Pn(t,e,p,i,16,s,l,1,1,0),_|=(t.getToken()===16?0:16)|t.destructible,g=1;else{for(b=be(t,e,i,1,0,T),_=t.assignable,C.push(b);$(t,e|32,18);)C.push(be(t,e,i,1,0,T));return _|=t.assignable,U(t,e,16),t.destructible=_|16,t.assignable=2,t.finishNode({type:"CallExpression",callee:r,arguments:C,optional:!1},u)}if(C.push(b),!$(t,e|32,18))break}return U(t,e,16),_|=t.destructible&256?256:0|t.destructible&128?128:0,t.getToken()===10?(_&48&&t.report(27),(t.flags&1||c&1)&&t.report(48),_&128&&t.report(31),e&1025&&_&256&&t.report(32),g&&(t.flags|=128),fo(t,e|2048,p,i,C,o,1,u)):(_&64&&t.report(63),_&8&&t.report(62),t.assignable=2,t.finishNode({type:"CallExpression",callee:r,arguments:C,optional:!1},u))}a(ta,"parseAsyncArrowOrCallExpression");function MC(t,e){let{tokenRaw:i,tokenRegExp:r,tokenValue:o,tokenStart:s}=t;V(t,e),t.assignable=2;let l={type:"Literal",value:o,regex:r};return t.options.raw&&(l.raw=i),t.finishNode(l,s)}a(MC,"parseRegExpLiteral");function Cr(t,e,i,r,o){let s,l;t.leadingDecorators.decorators.length?(t.getToken()===132&&t.report(30,"@"),s=t.leadingDecorators.start,l=[...t.leadingDecorators.decorators],t.leadingDecorators.decorators.length=0):(s=t.tokenStart,l=Eo(t,e,r)),e=(e|16384|1)^16384,V(t,e);let c=null,u=null,{tokenValue:d}=t;t.getToken()&4096&&t.getToken()!==20565?(mc(t,e,t.getToken())&&t.report(118),(t.getToken()&537079808)===537079808&&t.report(119),i&&(i.addBlockName(e,d,32,0),o&&o&2&&t.declareUnboundVariable(d)),c=re(t,e)):(o&1)===0&&t.report(39,"Class");let p=e;$(t,e|32,20565)?(u=gt(t,e,r,0,0,0),p|=512):p=(p|512)^512;let _=Rc(t,p,e,i,r,2,8,0);return t.finishNode({type:"ClassDeclaration",id:c,superClass:u,body:_,...t.options.next?{decorators:l}:null},s)}a(Cr,"parseClassDeclaration");function RC(t,e,i,r,o){let s=null,l=null,c=Eo(t,e,i);e=(e|1|16384)^16384,V(t,e),t.getToken()&4096&&t.getToken()!==20565&&(mc(t,e,t.getToken())&&t.report(118),(t.getToken()&537079808)===537079808&&t.report(119),s=re(t,e));let u=e;$(t,e|32,20565)?(l=gt(t,e,i,0,r,0),u|=512):u=(u|512)^512;let d=Rc(t,u,e,void 0,i,2,0,r);return t.assignable=2,t.finishNode({type:"ClassExpression",id:s,superClass:l,body:d,...t.options.next?{decorators:c}:null},o)}a(RC,"parseClassExpression");function Eo(t,e,i){let r=[];if(t.options.next)for(;t.getToken()===132;)r.push(DC(t,e,i));return r}a(Eo,"parseDecorators");function DC(t,e,i){let r=t.tokenStart;V(t,e|32);let o=pt(t,e,i,2,0,1,0,1,r);return o=oe(t,e,i,o,0,0,t.tokenStart),t.finishNode({type:"Decorator",expression:o},r)}a(DC,"parseDecoratorList");function Rc(t,e,i,r,o,s,l,c){let{tokenStart:u}=t,d=t.createPrivateScopeIfLexical(o);U(t,e|32,2162700);let p=655360;e=(e|p)^p;let _=t.flags&32;t.flags=(t.flags|32)^32;let b=[];for(;t.getToken()!==1074790415;){let g=t.tokenStart,C=Eo(t,e,d);if(C.length>0&&t.tokenValue==="constructor"&&t.report(109),t.getToken()===1074790415&&t.report(108),$(t,e,1074790417)){C.length>0&&t.report(120);continue}b.push(Dc(t,e,r,d,i,s,C,0,c,C.length>0?g:t.tokenStart))}return U(t,l&8?e|32:e,1074790415),d?.validatePrivateIdentifierRefs(),t.flags=t.flags&-33|_,t.finishNode({type:"ClassBody",body:b},u)}a(Rc,"parseClassBody");function Dc(t,e,i,r,o,s,l,c,u,d){let p=c?32:0,_=null,b=t.getToken();if(b&176128||b===-2147483528)switch(_=re(t,e),b){case 36970:if(!c&&t.getToken()!==67174411&&(t.getToken()&1048576)!==1048576&&t.getToken()!==1077936155)return Dc(t,e,i,r,o,s,l,1,u,d);break;case 209005:if(t.getToken()!==67174411&&(t.flags&1)===0){if((t.getToken()&1073741824)===1073741824)return Vn(t,e,r,_,p,l,d);p|=16|(Kr(t,e,8391476)?8:0)}break;case 209008:if(t.getToken()!==67174411){if((t.getToken()&1073741824)===1073741824)return Vn(t,e,r,_,p,l,d);p|=256}break;case 209009:if(t.getToken()!==67174411){if((t.getToken()&1073741824)===1073741824)return Vn(t,e,r,_,p,l,d);p|=512}break;case 12402:if(t.getToken()!==67174411&&(t.flags&1)===0){if((t.getToken()&1073741824)===1073741824)return Vn(t,e,r,_,p,l,d);t.options.next&&(p|=1024)}break}else if(b===69271571)p|=2,_=bn(t,o,r,u);else if((b&134217728)===134217728)_=Ue(t,e);else if(b===8391476)p|=8,V(t,e);else if(t.getToken()===130)p|=8192,_=mo(t,e|16,r,768);else if((t.getToken()&1073741824)===1073741824)p|=128;else{if(c&&b===2162700)return nC(t,e|16,i,r,d);b===-2147483527?(_=re(t,e),t.getToken()!==67174411&&t.report(30,ee[t.getToken()&255])):t.report(30,ee[t.getToken()&255])}if(p&1816&&(t.getToken()&143360||t.getToken()===-2147483528||t.getToken()===-2147483527?_=re(t,e):(t.getToken()&134217728)===134217728?_=Ue(t,e):t.getToken()===69271571?(p|=2,_=bn(t,e,r,0)):t.getToken()===130?(p|=8192,_=mo(t,e,r,p)):t.report(135)),(p&2)===0&&(t.tokenValue==="constructor"?((t.getToken()&1073741824)===1073741824?t.report(129):(p&32)===0&&t.getToken()===67174411&&(p&920?t.report(53,"accessor"):(e&512)===0&&(t.flags&32?t.report(54):t.flags|=32)),p|=64):(p&8192)===0&&p&32&&t.tokenValue==="prototype"&&t.report(52)),p&1024||t.getToken()!==67174411&&(p&768)===0)return Vn(t,e,r,_,p,l,d);let g=It(t,e|16,r,p,u,t.tokenStart);return t.finishNode({type:"MethodDefinition",kind:(p&32)===0&&p&64?"constructor":p&256?"get":p&512?"set":"method",static:(p&32)>0,computed:(p&2)>0,key:_,value:g,...t.options.next?{decorators:l}:null},d)}a(Dc,"parseClassElementList");function mo(t,e,i,r){let{tokenStart:o}=t;V(t,e);let{tokenValue:s}=t;return s==="constructor"&&t.report(128),t.options.lexical&&(i||t.report(4,s),r?i.addPrivateIdentifier(s,r):i.addPrivateIdentifierRef(s)),V(t,e),t.finishNode({type:"PrivateIdentifier",name:s},o)}a(mo,"parsePrivateIdentifier");function Vn(t,e,i,r,o,s,l){let c=null;if(o&8&&t.report(0),t.getToken()===1077936155){V(t,e|32);let{tokenStart:u}=t;t.getToken()===537079927&&t.report(119);let d=11264|((o&64)===0?16896:0);e=(e|d)^d|(o&8?1024:0)|(o&16?2048:0)|(o&64?16384:0)|256|65536,c=pt(t,e|16,i,2,0,1,0,1,u),((t.getToken()&1073741824)!==1073741824||(t.getToken()&4194304)===4194304)&&(c=oe(t,e|16,i,c,0,0,u),c=Te(t,e|16,i,0,0,u,c))}return ot(t,e),t.finishNode({type:o&1024?"AccessorProperty":"PropertyDefinition",key:r,value:c,static:(o&32)>0,computed:(o&2)>0,...t.options.next?{decorators:s}:null},l)}a(Vn,"parsePropertyDefinition");function Bc(t,e,i,r,o,s){if(t.getToken()&143360||(e&1)===0&&t.getToken()===-2147483527)return ia(t,e,i,o,s);(t.getToken()&2097152)!==2097152&&t.report(30,ee[t.getToken()&255]);let l=t.getToken()===69271571?yt(t,e,i,r,1,0,1,o,s):wt(t,e,i,r,1,0,1,o,s);return t.destructible&16&&t.report(50),t.destructible&32&&t.report(50),l}a(Bc,"parseBindingPattern");function ia(t,e,i,r,o){let s=t.getToken();e&1&&((s&537079808)===537079808?t.report(119):((s&36864)===36864||s===-2147483527)&&t.report(118)),(s&20480)===20480&&t.report(102),s===241771&&(e&1024&&t.report(32),e&2&&t.report(111)),(s&255)===73&&r&24&&t.report(100),s===209006&&(e&2048&&t.report(176),e&2&&t.report(110));let{tokenValue:l,tokenStart:c}=t;return V(t,e),i?.addVarOrBlock(e,l,r,o),t.finishNode({type:"Identifier",name:l},c)}a(ia,"parseAndClassifyIdentifier");function Ao(t,e,i,r,o){if(r||U(t,e,8456256),t.getToken()===8390721){let u=BC(t,o),[d,p]=NC(t,e,i,r);return t.finishNode({type:"JSXFragment",openingFragment:u,children:d,closingFragment:p},o)}t.getToken()===8457014&&t.report(30,ee[t.getToken()&255]);let s=null,l=[],c=HC(t,e,i,r,o);if(!c.selfClosing){[l,s]=OC(t,e,i,r);let u=po(s.name);po(c.name)!==u&&t.report(155,u)}return t.finishNode({type:"JSXElement",children:l,openingElement:c,closingElement:s},o)}a(Ao,"parseJSXRootElementOrFragment");function BC(t,e){return gs(t),t.finishNode({type:"JSXOpeningFragment"},e)}a(BC,"parseJSXOpeningFragment");function LC(t,e,i,r){U(t,e,8457014);let o=Vc(t,e);return t.getToken()!==8390721&&t.report(25,ee[65]),i?gs(t):V(t,e),t.finishNode({type:"JSXClosingElement",name:o},r)}a(LC,"parseJSXClosingElement");function VC(t,e,i,r){return U(t,e,8457014),t.getToken()!==8390721&&t.report(25,ee[65]),i?gs(t):V(t,e),t.finishNode({type:"JSXClosingFragment"},r)}a(VC,"parseJSXClosingFragment");function OC(t,e,i,r){let o=[];for(;;){let s=FC(t,e,i,r);if(s.type==="JSXClosingElement")return[o,s];o.push(s)}}a(OC,"parseJSXChildrenAndClosingElement");function NC(t,e,i,r){let o=[];for(;;){let s=UC(t,e,i,r);if(s.type==="JSXClosingFragment")return[o,s];o.push(s)}}a(NC,"parseJSXChildrenAndClosingFragment");function FC(t,e,i,r){if(t.getToken()===137)return Lc(t,e);if(t.getToken()===2162700)return na(t,e,i,1,0);if(t.getToken()===8456256){let{tokenStart:o}=t;return V(t,e),t.getToken()===8457014?LC(t,e,r,o):Ao(t,e,i,1,o)}t.report(0)}a(FC,"parseJSXChildOrClosingElement");function UC(t,e,i,r){if(t.getToken()===137)return Lc(t,e);if(t.getToken()===2162700)return na(t,e,i,1,0);if(t.getToken()===8456256){let{tokenStart:o}=t;return V(t,e),t.getToken()===8457014?VC(t,e,r,o):Ao(t,e,i,1,o)}t.report(0)}a(UC,"parseJSXChildOrClosingFragment");function Lc(t,e){let i=t.tokenStart;V(t,e);let r={type:"JSXText",value:t.tokenValue};return t.options.raw&&(r.raw=t.tokenRaw),t.finishNode(r,i)}a(Lc,"parseJSXText");function HC(t,e,i,r,o){(t.getToken()&143360)!==143360&&(t.getToken()&4096)!==4096&&t.report(0);let s=Vc(t,e),l=qC(t,e,i),c=t.getToken()===8457014;return c&&U(t,e,8457014),t.getToken()!==8390721&&t.report(25,ee[65]),r||!c?gs(t):V(t,e),t.finishNode({type:"JSXOpeningElement",name:s,attributes:l,selfClosing:c},o)}a(HC,"parseJSXOpeningElementOrSelfCloseElement");function Vc(t,e){let{tokenStart:i}=t;yr(t);let r=xo(t,e);if(t.getToken()===21)return Oc(t,e,r,i);for(;$(t,e,67108877);)yr(t),r=WC(t,e,r,i);return r}a(Vc,"parseJSXElementName");function WC(t,e,i,r){let o=xo(t,e);return t.finishNode({type:"JSXMemberExpression",object:i,property:o},r)}a(WC,"parseJSXMemberExpression");function qC(t,e,i){let r=[];for(;t.getToken()!==8457014&&t.getToken()!==8390721&&t.getToken()!==1048576;)r.push(GC(t,e,i));return r}a(qC,"parseJSXAttributes");function jC(t,e,i){let r=t.tokenStart;V(t,e),U(t,e,14);let o=be(t,e,i,1,0,t.tokenStart);return U(t,e,1074790415),t.finishNode({type:"JSXSpreadAttribute",argument:o},r)}a(jC,"parseJSXSpreadAttribute");function GC(t,e,i){let{tokenStart:r}=t;if(t.getToken()===2162700)return jC(t,e,i);yr(t);let o=null,s=xo(t,e);if(t.getToken()===21&&(s=Oc(t,e,s,r)),t.getToken()===1077936155)switch(Mk(t,e)){case 134283267:o=Ue(t,e);break;case 8456256:o=Ao(t,e,i,0,t.tokenStart);break;case 2162700:o=na(t,e,i,0,1);break;default:t.report(154)}return t.finishNode({type:"JSXAttribute",value:o,name:s},r)}a(GC,"parseJsxAttribute");function Oc(t,e,i,r){U(t,e,21);let o=xo(t,e);return t.finishNode({type:"JSXNamespacedName",namespace:i,name:o},r)}a(Oc,"parseJSXNamespacedName");function na(t,e,i,r,o){let{tokenStart:s}=t;V(t,e|32);let{tokenStart:l}=t;if(t.getToken()===14)return KC(t,e,i,s);let c=null;return t.getToken()===1074790415?(o&&t.report(157),c=YC(t,{index:t.startIndex,line:t.startLine,column:t.startColumn})):c=be(t,e,i,1,0,l),t.getToken()!==1074790415&&t.report(25,ee[15]),r?gs(t):V(t,e),t.finishNode({type:"JSXExpressionContainer",expression:c},s)}a(na,"parseJSXExpressionContainer");function KC(t,e,i,r){U(t,e,14);let o=be(t,e,i,1,0,t.tokenStart);return U(t,e,1074790415),t.finishNode({type:"JSXSpreadChild",expression:o},r)}a(KC,"parseJSXSpreadChild");function YC(t,e){return t.finishNode({type:"JSXEmptyExpression"},e,t.tokenStart)}a(YC,"parseJSXEmptyExpression");function xo(t,e){let i=t.tokenStart;t.getToken()&143360||t.report(30,ee[t.getToken()&255]);let{tokenValue:r}=t;return V(t,e),t.finishNode({type:"JSXIdentifier",name:r},i)}a(xo,"parseJSXIdentifier");function zC(t,e){return Uk(t,e)}a(zC,"parseScript");var $C=class{constructor(e,i={}){n(this,"source"),n(this,"programAst"),n(this,"hasExtractions"),n(this,"extractionStates"),n(this,"dependentsTracker",new Map),n(this,"pendingPrototypeAliasBinding",null),n(this,"iifeParamName",null),n(this,"declaredVariables",new Map),this.source=e;let r=i.extractions?Array.isArray(i.extractions)?i.extractions:[i.extractions]:[];this.extractionStates=r.map(o=>({config:{collectDependencies:!0,stopWhenReady:!0,...o},dependencies:new Set,dependents:new Set,ready:!1})),this.hasExtractions=this.extractionStates.length>0,this.programAst=zC(e,{ranges:!0,loc:!1,module:!1}),this.analyzeAst()}analyzeAst(){var e,i,r;let o;for(let s of this.programAst.body)if(s.type==="ExpressionStatement"&&s.expression.type==="CallExpression"){let l=s.expression;if(l.callee.type==="FunctionExpression"){let c=l.callee,u=c.params.length>0?c.params[0]:null;if(!this.iifeParamName&&u?.type==="Identifier"&&(this.iifeParamName=u.name),((e=c.body)==null?void 0:e.type)==="BlockStatement"){o=c.body;break}}}if(o)for(let s of o.body)switch(s.type){case"ExpressionStatement":{let l=s.expression;if(l.type!=="AssignmentExpression")continue;let c=l.left,u=l.right;if(u.type==="MemberExpression"&&!u.computed&&u.property.type==="Identifier"&&u.property.name==="prototype"){let d=Kt(u,this.source),p=c.type==="Identifier"?c.name:Kt(c,this.source);if(d){let _=this.declaredVariables.get(d.replace(".prototype",""));if(p&&_){let b=new Set,g=`${p}.`;this.pendingPrototypeAliasBinding=[g,_],_.prototypeAliases.set(g,b)}}}if(c.type==="Identifier"){let d=this.declaredVariables.get(c.name);if(!d)continue;if(d.node.init=u,this.needsDependencyAnalysis(u)&&(d.dependencies=this.findDependencies(l.right,c.name)),this.onMatch(d.node,d))return}else if(l.left.type==="MemberExpression"){let d=Kt(l.left,this.source),p=(i=this.pendingPrototypeAliasBinding)==null?void 0:i[0];if(p&&(d?.includes(p)||d===p.slice(0,-1))){let g=this.declaredVariables.get(((r=this.pendingPrototypeAliasBinding)==null?void 0:r[1].name)||"");if(g){let C=g.prototypeAliases.get(p),T={name:d,node:s,dependents:this.dependentsTracker.get(d)||new Set,predeclared:!1,prototypeAliases:new Map,dependencies:this.findDependencies(u,d)};C?C.add(T):g.prototypeAliases.set(p,new Set([T]))}}else this.pendingPrototypeAliasBinding=null;if(!d||this.declaredVariables.has(d))continue;let _={name:d,node:s,dependents:this.dependentsTracker.get(d)||new Set,predeclared:!1,prototypeAliases:new Map,dependencies:this.findDependencies(u,d)},b=ac(l.left,this.source);if(b&&b!==d&&!b.startsWith("this.")&&_.dependencies.add(b.replace(".prototype","")),this.dependentsTracker.has(d)&&this.dependentsTracker.delete(d),this.declaredVariables.set(d,_),this.onMatch(s,_))return}break}case"VariableDeclaration":{this.pendingPrototypeAliasBinding=null;for(let l of s.declarations){if(l.id.type!=="Identifier")continue;let c={name:l.id.name,node:l,dependents:this.dependentsTracker.get(l.id.name)||new Set,prototypeAliases:new Map,dependencies:new Set,predeclared:!1},u=l.init;if(!u&&s.kind==="var"?c.predeclared=!0:u&&this.needsDependencyAnalysis(u)&&(c.dependencies=this.findDependencies(u,c.name)),this.dependentsTracker.has(c.name)&&this.dependentsTracker.delete(c.name),this.declaredVariables.set(c.name,c),this.onMatch(l,c))return}break}}}needsDependencyAnalysis(e){if(!e)return!1;switch(e.type){case"FunctionExpression":case"ArrowFunctionExpression":case"ArrayExpression":case"LogicalExpression":case"CallExpression":case"NewExpression":case"MemberExpression":case"BinaryExpression":case"ConditionalExpression":case"ObjectExpression":case"SequenceExpression":case"ClassExpression":case"Identifier":return!0;default:return!1}}onMatch(e,i){if(!this.hasExtractions)return!1;let r=!1,o=!1;for(let s of this.extractionStates)if(s.node){if(s.node!==e&&(this.refreshExtractionState(s),this.shouldStopTraversal()))return!0}else{if(e.type==="VariableDeclarator"&&!e.init||(o=s.config.match(e),!o))continue;s.node=e,r=!0,i&&(s.metadata=i,s.dependents=i.dependents,s.dependencies=i.dependencies,typeof o!="boolean"&&(s.matchContext=o)),this.refreshExtractionState(s)}return r?this.shouldStopTraversal():!1}refreshExtractionState(e){if(!e.node){e.ready=!1;return}if(e.config.collectDependencies===!1){e.ready=!0;return}if(!e.metadata){e.ready=!1;return}e.ready=this.areDependenciesResolved(e.dependencies)}shouldStopTraversal(){if(!this.hasExtractions)return!1;let e=!1;for(let i of this.extractionStates)if(i.config.stopWhenReady!==!1&&(e=!0,!i.node||!i.ready))return!1;return e}areDependenciesResolved(e,i=new Set){if(!e||e.size===0)return!0;for(let r of e){if(!r||yn.has(r)||r===this.iifeParamName||i.has(r))continue;let o=this.declaredVariables.get(r);if(!o||(i.add(r),!this.areDependenciesResolved(o.dependencies,i)))return!1}return!0}findDependencies(e,i){var r;let o=new Set;if(!e)return o;let s=[{names:new Set,type:"block"}],l=a(()=>s[s.length-1],"currentScope"),c=a(_=>{for(let b=s.length-1;b>=0;b--)if(s[b].names.has(_))return!0;return!1},"isInScope"),u="id"in e&&((r=e?.id)==null?void 0:r.type)==="Identifier"?e.id.name:void 0,d=a((_,b)=>{if(_)switch(_.type){case"Identifier":b.add(_.name);break;case"ObjectPattern":for(let g of _.properties)g.type==="RestElement"?d(g.argument,b):g.type==="Property"&&d(g.value,b);break;case"ArrayPattern":for(let g of _.elements)g&&d(g,b);break;case"RestElement":d(_.argument,b);break;case"AssignmentPattern":d(_.left,b);break}},"collectBindingIdentifiers"),p=a((_,b)=>{if(_?.params)for(let g of _.params)d(g,b)},"collectParams");return Wr(e,{enter:a((_,b)=>{var g,C,T,S;switch(_.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":{let k=_.type==="FunctionDeclaration",A="id"in _?(g=_.id)==null?void 0:g.name:void 0;k&&A&&l().names.add(A);let I={names:new Set,type:"function"};_.type==="FunctionExpression"&&A&&I.names.add(A),p(_,I.names),s.push(I);break}case"BlockStatement":{s.push({names:new Set,type:"block"});break}case"CatchClause":{let k=new Set;_.param&&d(_.param,k),s.push({names:k,type:"block"});break}case"VariableDeclaration":{let k=_.kind==="var"&&(C=s.findLast(A=>A.type==="function"))!=null?C:l();for(let A of _.declarations)d(A.id,k.names);break}case"ClassDeclaration":{(T=_.id)!=null&&T.name&&l().names.add(_.id.name);break}case"LabeledStatement":{((S=_.label)==null?void 0:S.type)==="Identifier"&&l().names.add(_.label.name);break}case"Identifier":{if(_.name===u||b?.type==="Property"&&b.key===_&&!b.computed||b?.type==="MethodDefinition"&&b.key===_&&!b.computed)return;if(b?.type==="MemberExpression"&&b.property===_&&!b.computed){if(b.object.type==="ThisExpression")return;let A=Kt(b,this.source);if(!A)return;let I=this.declaredVariables.get(A);if(I)I.dependents.add(i),o.add(A);else if(b.object.type==="Identifier"){let D=b.object.name,H=this.declaredVariables.get(D);if((H||D===this.iifeParamName)&&!c(D)&&!yn.has(D)){H?.dependents.add(i),o.add(A);let j=this.dependentsTracker.get(A);j?j.add(i):this.dependentsTracker.set(A,new Set([i]))}}return}if(b?.type==="MetaProperty"||c(_.name)||yn.has(_.name))return;o.add(_.name);let k=this.declaredVariables.get(_.name);if(k)k.dependents.add(i);else{let A=this.dependentsTracker.get(_.name);A?A.add(i):this.dependentsTracker.set(_.name,new Set([i]))}break}case"ForStatement":case"ForInStatement":case"ForOfStatement":{s.push({names:new Set,type:"block"});break}}},"enter"),leave:a(_=>{switch(_.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"BlockStatement":case"CatchClause":case"ForStatement":case"ForInStatement":case"ForOfStatement":s.length>1&&s.pop();break}},"leave")}),o}getExtractedMatches(){return this.extractionStates.filter(e=>!!e.node)}getSource(){return this.source}};a($C,"JsAnalyzer");var _P=$C,JC=class{constructor(e){n(this,"analyzer"),this.analyzer=e}areSafeArgs(e,i="strict"){return(e??[]).every(r=>!r||r.type==="SpreadElement"?!1:this.isSafeInitializer(r,i))}isSafeInitializer(e,i="strict"){var r;if(!e)return!0;switch(e.type){case"ClassExpression":return!0;case"Literal":{let o=e;return typeof o.value=="string"||typeof o.value=="number"||typeof o.value=="boolean"||o.value===null||!!o.regex}case"TemplateLiteral":return e.expressions.every(o=>this.isSafeInitializer(o,i));case"ArrayExpression":return e.elements.every(o=>o?o.type==="SpreadElement"?!1:this.isSafeInitializer(o,i):!0);case"ObjectExpression":return e.properties.every(o=>{if(o.type!=="Property"||o.computed||o.kind!=="init")return!1;let s=o.value;return s?s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression"||s.type==="Literal":!1});case"CallExpression":{if(e.callee.type==="Identifier"&&yn.has(e.callee.name))return this.areSafeArgs(e.arguments,i);if(e.callee.type==="MemberExpression"){if(!this.isSafeInitializer(e.callee.object,i))return!1;if(i==="strict"){let o=e.callee.property.type==="Identifier"?e.callee.property.name:"";if(e.callee.computed||!yn.has(o))return!1}return this.areSafeArgs(e.arguments,i)}return!1}case"NewExpression":{if(e.callee.type==="Identifier"){if(yn.has(e.callee.name))return this.areSafeArgs(e.arguments,i);if(i==="loose")return this.areSafeArgs(e.arguments,i)}return!1}case"UnaryExpression":return this.isSafeInitializer(e.argument,i);case"FunctionExpression":case"ArrowFunctionExpression":case"Identifier":return!0;case"MemberExpression":return i==="loose"?e.computed&&!this.isSafeInitializer(e.property,i)?!1:this.isSafeInitializer(e.object,i):!e.computed&&e.property.type==="Identifier"&&e.property.name==="prototype";case"LogicalExpression":case"BinaryExpression":return this.isSafeInitializer(e.left,i)&&this.isSafeInitializer(e.right,i);case"ConditionalExpression":return i==="loose"?this.isSafeInitializer(e.test,i)&&this.isSafeInitializer(e.consequent,i)&&this.isSafeInitializer(e.alternate,i):!1;case"SequenceExpression":return i==="loose"?e.expressions.every(o=>this.isSafeInitializer(o,i)):!1;case"AssignmentExpression":{if(e.left.type==="MemberExpression"&&!e.left.computed){let o=e.left.object;if(o.type==="Identifier"&&((r=this.analyzer.declaredVariables.get(o.name))==null?void 0:r.node.init)!==void 0)return this.isSafeInitializer(e.right,i)}else if(e.left.type==="Identifier"&&this.analyzer.declaredVariables.has(e.left.name))return this.isSafeInitializer(e.right,i);return!1}default:return!1}}getInitializerFallback(e){switch(e?.type){case"ObjectExpression":case"NewExpression":case"MemberExpression":case"LogicalExpression":return"{}";case"ArrayExpression":return"[]";default:return"undefined"}}renderNode(e,i,r={}){var o,s,l;let c=this.analyzer.getSource(),u=this.analyzer.declaredVariables,d=r.disallowSideEffectInitializers,p=typeof d=="object"&&d!==null&&(o=d.mode)!=null?o:"strict",_=!!d,b=e.type==="AssignmentExpression"?e:e.type==="ExpressionStatement"&&e.expression.type==="AssignmentExpression"?e.expression:null,g=b&&b.operator==="="?b.right:e.type==="VariableDeclarator"?e.init:null,C=_&&g&&!this.isSafeInitializer(g,p),T=this.getInitializerFallback(g),S=T;if(!C&&g)if(!i&&g.type==="Identifier"&&!u.has(g.name))S=T;else{let I=b?.left;if(!(g?.type==="MemberExpression"&&!g.computed&&g.property.type==="Identifier"&&g.property.name==="prototype")&&I?.type==="MemberExpression"&&g&&_&&I.object.type==="Identifier"&&g.type!=="FunctionExpression"&&g.type!=="ArrowFunctionExpression"&&g.type!=="LogicalExpression"&&g.type!=="ClassExpression")return`${Ve}// Skipped ${Kt(I,c)} assignment.`;S=((s=wn(g,c))==null?void 0:s.trim().replace(/;\s*$/,""))||"undefined // [JsExtractor] Failed to extract initializer source."}!C&&g&&g.type==="SequenceExpression"&&!S.startsWith("(")&&(S=`(${S})`);let A=`${e.type==="VariableDeclarator"&&e.id.type==="Identifier"?e.id.name:b&&b.left.type==="Identifier"?b.left.name:b?.type==="AssignmentExpression"?(l=Kt(b.left,c))==null?void 0:l.trim():"unknown"} = ${S};`;return e.type==="VariableDeclarator"&&e.init&&!i?`${Ve}var ${A}`:`${Ve}${A}`}buildScript(e){var i,r;let{maxDepth:o=1/0,forceVarPredeclaration:s=!1,exportRawValues:l=!1,rawValueOnly:c=[]}=e,u=this.analyzer.getExtractedMatches(),d=new Set(u.map(A=>{var I;return((I=A.metadata)==null?void 0:I.name)||""})),p=[],_=new Set,b=new Map,g={};function C(A){!A||A.includes(".")||_.add(A)}a(C,"registerPredeclaredVar");let T=a((A,I=0,D)=>{if(!(!A||I>o))for(let H of A.dependencies){if(D&&D!==H){if(!d.has(D))continue;D=void 0}if(d.has(H))continue;d.add(H);let j=this.analyzer.declaredVariables.get(H);if(!j)continue;let W=s||j.predeclared;if(W&&C(H),T(j,I+1,D),p.push(this.renderNode(j.node,W,e)),j.prototypeAliases.size>0)for(let[,q]of j.prototypeAliases)for(let N of q)T(N,I),p.push(this.renderNode(N.node,W,e))}},"visit");for(let A of u){let I=A.config.friendlyName,D=I&&c.includes(I);if(A.metadata){D||p.push(`${Ve}//#region --- start [${I||"Unknown"}] ---`);let H=(s||A.metadata.predeclared)&&!D,j=A.config.onlyProcessMatchContext;if(H&&C(A.metadata.name),A.config.collectDependencies&&!D){let W,q=A.matchContext;q?.type==="NewExpression"&&j&&(q.callee.type==="Identifier"?W=q.callee.name:q.callee.type==="MemberExpression"&&(W=Kt(q.callee,this.analyzer.getSource())||void 0)),T(A.metadata,void 0,W)}if(A.matchContext&&I&&(b.set(I,A.matchContext),l)){let W=A.matchContext,q=this.analyzer.getSource(),N=null;W.type==="Property"?N=wn(W.value,q):W.type==="Identifier"?N=W.name:N=wn(W,q),g[I]=N}D||(j||p.push(this.renderNode(A.metadata.node,H,e)),p.push(`${Ve}//#endregion --- end [${I||"Unknown"}] ---
`))}}let S=[];S.push("const __jsExtractorGlobal = typeof globalThis !== 'undefined' ? globalThis :"),S.push(`${Ve}typeof self !== 'undefined' ? self :`),S.push(`${Ve}typeof window !== 'undefined' ? window :`),S.push(`${Ve}typeof global !== 'undefined' ? global : {};
`),S.push(`const exportedVars = (function(${this.analyzer.iifeParamName}) {`),S.push(`${Ve}const window = typeof __jsExtractorGlobal.window !== 'undefined' ? __jsExtractorGlobal.window : Object.create(null);`),S.push(`${Ve}const document = typeof __jsExtractorGlobal.document !== 'undefined' ? __jsExtractorGlobal.document : {};`),S.push(`${Ve}const self = typeof __jsExtractorGlobal.self !== 'undefined' ? __jsExtractorGlobal.self : window;
`),_.size>0&&S.push(`${Ve}var ${Array.from(_).join(", ")};
`),S.push(p.join(`
`));let k=[];for(let[A,I]of b){let D=null;if(I.type==="Identifier"){let H=this.analyzer.declaredVariables.get(I.name);((i=H?.node)==null?void 0:i.type)==="VariableDeclarator"&&((r=H.node.init)==null?void 0:r.type)==="FunctionExpression"&&(D=H.node)}else(I.type==="CallExpression"||I.type==="NewExpression"||I.type==="VariableDeclarator")&&(D=I);if(D){let H=lc(this.analyzer,A,D);H&&(S.push(`${H}
`),k.push(A))}}if(l){let I=JSON.stringify(g,null,Ve.length).split(`
`),D=`${I[0]}
${I.slice(1).map(H=>Ve+H).join(`
`)}`;S.push(`${Ve}const rawValues = ${D};
`),k.push("rawValues")}return S.push(`${Ve}return { ${k.join(", ")} };`),S.push(`})({});
`),{output:S.join(`
`),exported:k,exportedRawValues:l?g:void 0}}};a(JC,"JsExtractor");var pP=JC,Nc=class extends m{constructor(e){super(),n(this,"popup"),n(this,"popup_type"),this.popup=v.parseItem(e.popup),this.popup_type=e.popupType}};a(Nc,"OpenPopupAction");n(Nc,"type","OpenPopupAction");var Fc=Nc,Uc=class extends m{constructor(e){super(),n(this,"text"),n(this,"label"),n(this,"tooltip"),n(this,"style"),n(this,"size"),n(this,"icon_type"),n(this,"is_disabled"),n(this,"target_id"),n(this,"endpoint"),n(this,"accessibility"),Reflect.has(e,"text")&&(this.text=new f(e.text).toString()),Reflect.has(e,"accessibility")&&Reflect.has(e.accessibility,"label")&&(this.label=e.accessibility.label),"accessibilityData"in e&&"accessibilityData"in e.accessibilityData&&(this.accessibility={accessibility_data:new zt(e.accessibilityData.accessibilityData)}),Reflect.has(e,"tooltip")&&(this.tooltip=e.tooltip),Reflect.has(e,"style")&&(this.style=e.style),Reflect.has(e,"size")&&(this.size=e.size),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType),Reflect.has(e,"isDisabled")&&(this.is_disabled=e.isDisabled),Reflect.has(e,"targetId")&&(this.target_id=e.targetId),this.endpoint=new y(e.navigationEndpoint||e.serviceEndpoint||e.command)}};a(Uc,"Button");n(Uc,"type","Button");var L=Uc,Hc=class extends m{constructor(e){var i;super(),n(this,"label"),n(this,"selected"),n(this,"value"),n(this,"icon_type"),n(this,"description"),n(this,"endpoint"),this.label=new f(e.label).toString(),this.selected=!!e.isSelected,Reflect.has(e,"int32Value")?this.value=e.int32Value:e.stringValue&&(this.value=e.stringValue),Reflect.has(e,"onSelectCommand")&&(this.endpoint=new y(e.onSelectCommand)),Reflect.has(e,"icon")&&(this.icon_type=(i=e.icon)==null?void 0:i.iconType),Reflect.has(e,"descriptionText")&&(this.description=new f(e.descriptionText))}};a(Hc,"DropdownItem");n(Hc,"type","DropdownItem");var XC=Hc,Wc=class extends m{constructor(e){super(),n(this,"label"),n(this,"entries"),this.label=e.label||"",this.entries=v.parseArray(e.entries,XC)}};a(Wc,"Dropdown");n(Wc,"type","Dropdown");var sa=Wc,qc=class extends m{constructor(e){super(),n(this,"title"),n(this,"title_placeholder"),n(this,"privacy_option"),n(this,"cancel_button"),n(this,"create_button"),this.title=new f(e.dialogTitle).toString(),this.title_placeholder=e.titlePlaceholder||"",this.privacy_option=v.parseItem(e.privacyOption,sa),this.create_button=v.parseItem(e.cancelButton,L),this.cancel_button=v.parseItem(e.cancelButton,L)}};a(qc,"CreatePlaylistDialog");n(qc,"type","CreatePlaylistDialog");var QC=qc,jc=class extends m{constructor(e){super(),n(this,"commands"),this.commands=v.parseCommands(e.commands)}};a(jc,"CommandExecutorCommand");n(jc,"type","CommandExecutorCommand");var ZC=jc,Gc=class Za extends m{constructor(e){var i,r,o,s,l,c,u,d;if(super(),n(this,"name"),n(this,"payload"),n(this,"dialog"),n(this,"modal"),n(this,"open_popup"),n(this,"next_endpoint"),n(this,"metadata"),n(this,"command"),n(this,"commands"),e){if(e.serialCommand||e.parallelCommand){let p=e.serialCommand||e.parallelCommand;this.commands=p.commands.map(_=>new Za(_))}(e.innertubeCommand||e.command||e.performOnceCommand)&&(e=e.innertubeCommand||e.command||e.performOnceCommand)}this.command=v.parseCommand(e),Reflect.has(e||{},"openPopupAction")&&(this.open_popup=new Fc(e.openPopupAction)),this.name=Object.keys(e||{}).find(p=>p.endsWith("Endpoint")||p.endsWith("Command")),this.payload=this.name?Reflect.get(e,this.name):{},(Reflect.has(this.payload,"dialog")||Reflect.has(this.payload,"content"))&&(this.dialog=v.parseItem(this.payload.dialog||this.payload.content)),Reflect.has(this.payload,"modal")&&(this.modal=v.parseItem(this.payload.modal)),Reflect.has(this.payload,"nextEndpoint")&&(this.next_endpoint=new Za(this.payload.nextEndpoint)),e?.serviceEndpoint&&(e=e.serviceEndpoint),this.metadata={},(r=(i=e?.commandMetadata)==null?void 0:i.webCommandMetadata)!=null&&r.url&&(this.metadata.url=e.commandMetadata.webCommandMetadata.url),(s=(o=e?.commandMetadata)==null?void 0:o.webCommandMetadata)!=null&&s.webPageType&&(this.metadata.page_type=e.commandMetadata.webCommandMetadata.webPageType),(c=(l=e?.commandMetadata)==null?void 0:l.webCommandMetadata)!=null&&c.apiUrl?this.metadata.api_url=e.commandMetadata.webCommandMetadata.apiUrl.replace("/youtubei/v1/",""):this.name&&(this.metadata.api_url=this.getPath(this.name)),(d=(u=e?.commandMetadata)==null?void 0:u.webCommandMetadata)!=null&&d.sendPost&&(this.metadata.send_post=e.commandMetadata.webCommandMetadata.sendPost),e?.createPlaylistEndpoint&&e?.createPlaylistEndpoint.createPlaylistDialog&&(this.dialog=v.parseItem(e?.createPlaylistEndpoint.createPlaylistDialog,QC))}getPath(e){switch(e){case"browseEndpoint":return"/browse";case"watchEndpoint":case"reelWatchEndpoint":return"/player";case"searchEndpoint":return"/search";case"watchPlaylistEndpoint":return"/next";case"liveChatItemContextMenuEndpoint":return"/live_chat/get_item_context_menu"}}call(e,i){if(!e)throw new Error("An API caller must be provided");if(this.command){let r=this.command;return r.is(ZC)&&(r=r.commands.at(-1)),e.execute(r.getApiPath(),{...r.buildRequest(),...i})}if(!this.metadata.api_url)throw new Error("Expected an api_url, but none was found.");return e.execute(this.metadata.api_url,{...this.payload,...i})}toURL(){if(this.metadata.url&&this.metadata.page_type)return this.metadata.page_type==="WEB_PAGE_TYPE_UNKNOWN"?this.metadata.url:`https://www.youtube.com${this.metadata.url}`}};a(Gc,"NavigationEndpoint");n(Gc,"type","NavigationEndpoint");var y=Gc,e3=class t3{constructor(e){n(this,"url"),n(this,"width"),n(this,"height"),this.url=e.url,this.width=e.width,this.height=e.height}static fromResponse(e){if(!e)return[];let i;return e.thumbnails?i=e.thumbnails:e.sources&&(i=e.sources),i?i.map(r=>new t3(r)).sort((r,o)=>o.width-r.width):[]}};a(e3,"Thumbnail");var x=e3,i3=class{constructor(e){n(this,"text"),n(this,"emoji");var i,r,o,s,l,c;this.text=((i=e.emoji)==null?void 0:i.emojiId)||((o=(r=e.emoji)==null?void 0:r.shortcuts)==null?void 0:o[0])||e.text||"",this.emoji={emoji_id:e.emoji.emojiId,shortcuts:((s=e.emoji)==null?void 0:s.shortcuts)||[],search_terms:((l=e.emoji)==null?void 0:l.searchTerms)||[],image:x.fromResponse(e.emoji.image),is_custom:!!((c=e.emoji)!=null&&c.isCustomEmoji)}}toString(){return this.text}toHTML(){let e=Kc(this.text);return`<img src="${this.emoji.image[0].url}" alt="${e}" title="${e}" style="display: inline-block; vertical-align: text-top; height: var(--yt-emoji-size, 1rem); width: var(--yt-emoji-size, 1rem);" loading="lazy" crossorigin="anonymous" />`}};a(i3,"EmojiRun");var n3=i3,s3=class{constructor(e){n(this,"text"),n(this,"text_color"),n(this,"endpoint"),n(this,"bold"),n(this,"bracket"),n(this,"dark_mode_text_color"),n(this,"deemphasize"),n(this,"italics"),n(this,"strikethrough"),n(this,"error_underline"),n(this,"underline"),n(this,"font_face"),n(this,"attachment"),this.text=e.text,this.bold=!!e.bold,this.bracket=!!e.bracket,this.italics=!!e.italics,this.strikethrough=!!e.strikethrough,this.error_underline=!!e.error_underline,this.underline=!!e.underline,this.deemphasize=!!e.deemphasize,"textColor"in e&&(this.text_color=e.textColor),"navigationEndpoint"in e&&(this.endpoint=new y(e.navigationEndpoint)),"darkModeTextColor"in e&&(this.dark_mode_text_color=e.darkModeTextColor),"fontFace"in e&&(this.font_face=e.fontFace),this.attachment=e.attachment}toString(){return this.text}toHTML(){var e;let i=[];if(this.bold&&i.push("b"),this.italics&&i.push("i"),this.strikethrough&&i.push("s"),this.deemphasize&&i.push("small"),this.underline&&i.push("u"),this.error_underline&&i.push("u"),!((e=this.text)!=null&&e.length))return"";let r=Kc(this.text),s=`<span style="white-space: pre-wrap;">${i.map(l=>`<${l}>`).join("")+r+i.map(l=>`</${l}>`).join("")}</span>`;if(this.attachment&&this.attachment.element.type.imageType.image.sources.length&&this.endpoint){let{url:l}=this.attachment.element.type.imageType.image.sources[0],c="";l&&(c=`<img src="${l}" style="vertical-align: middle; height: ${this.attachment.element.properties.layoutProperties.height.value}px; width: ${this.attachment.element.properties.layoutProperties.width.value}px;" alt="">`);let u=this.endpoint.toURL();if(u)return`<a href="${u}" class="yt-ch-link">${c}${s}</a>`}if(this.endpoint){let l=this.endpoint.toURL();if(l)return`<a href="${l}">${s}</a>`}return s}};a(s3,"TextRun");var o3=s3;function Kc(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}a(Kc,"escape");var Is="Text",r3=class a3{constructor(e){n(this,"text"),n(this,"runs"),n(this,"endpoint"),n(this,"accessibility"),n(this,"rtl"),this.isRunsData(e)?(this.runs=e.runs.map(i=>i.emoji?new n3(i):new o3(i)),this.text=this.runs.map(i=>i.text).join("")):this.text=e?.simpleText,this.isObject(e)&&"accessibility"in e&&"accessibilityData"in e.accessibility&&(this.accessibility={accessibility_data:new zt(e.accessibility.accessibilityData)}),this.rtl=!!e?.rtl,this.parseEndpoint(e)}isRunsData(e){return this.isObject(e)&&Reflect.has(e,"runs")&&Array.isArray(e.runs)}parseEndpoint(e){var i,r,o;this.isObject(e)&&("navigationEndpoint"in e?this.endpoint=new y(e.navigationEndpoint):"titleNavigationEndpoint"in e?this.endpoint=new y(e.titleNavigationEndpoint):(r=(i=this.runs)==null?void 0:i[0])!=null&&r.endpoint&&(this.endpoint=((o=this.runs)==null?void 0:o[0]).endpoint))}isObject(e){return typeof e=="object"&&e!==null}static fromAttributed(e){var i;let{content:r,commandRuns:o,attachmentRuns:s}=e,l=[{text:r,startIndex:0}],c=(i=e.styleRuns)==null?void 0:i.map(u=>{var d,p;return{...u,startIndex:(d=u.startIndex)!=null?d:0,length:(p=u.length)!=null?p:r.length}});return c?.length&&this.processStyleRuns(l,c,e),o?.length&&this.processCommandRuns(l,o,e),s?.length&&this.processAttachmentRuns(l,s,e),new a3({runs:l})}static processStyleRuns(e,i,r){for(let o of i)if(o.italic||o.strikethrough==="LINE_STYLE_SINGLE"||o.weightLabel==="FONT_WEIGHT_MEDIUM"||o.weightLabel==="FONT_WEIGHT_BOLD"){let s=Qo(e,o);if(!s){X.warn(Is,"Unable to find matching run for style run. Skipping...",{style_run:o,input_data:r,parsed_runs:JSON.parse(JSON.stringify(e))});continue}Ms(e,s,o,{bold:o.weightLabel==="FONT_WEIGHT_MEDIUM"||o.weightLabel==="FONT_WEIGHT_BOLD",italics:o.italic,strikethrough:o.strikethrough==="LINE_STYLE_SINGLE"})}else X.debug(Is,"Skipping style run as it is doesn't have any information that we parse.",{style_run:o,input_data:r})}static processCommandRuns(e,i,r){for(let o of i)if(o.onTap){let s=Qo(e,o);if(!s){X.warn(Is,"Unable to find matching run for command run. Skipping...",{command_run:o,input_data:r,parsed_runs:JSON.parse(JSON.stringify(e))});continue}Ms(e,s,o,{navigationEndpoint:o.onTap})}else X.debug(Is,'Skipping command run as it is missing the "doTap" property.',{command_run:o,input_data:r})}static processAttachmentRuns(e,i,r){var o,s,l;for(let c of i){let u=Qo(e,c);if(!u){X.warn(Is,"Unable to find matching run for attachment run. Skipping...",{attachment_run:c,input_data:r,parsed_runs:JSON.parse(JSON.stringify(e))});continue}if(c.length===0)u.attachment=c;else{let d=c.startIndex-u.startIndex,p=u.text.substring(d,d+c.length),_=/^:[^:]+:$/.test(p);if((l=(s=(o=c.element)==null?void 0:o.type)==null?void 0:s.imageType)!=null&&l.image&&(_||new RegExp("^(?:\\p{Emoji}|\\u200d)+$","u").test(p))){let b={image:c.element.type.imageType.image,isCustomEmoji:_,shortcuts:_?[p]:void 0};Ms(e,u,c,{emoji:b})}else Ms(e,u,c,{attachment:c})}}}toHTML(){return this.runs?this.runs.map(e=>e.toHTML()).join(""):this.text}isEmpty(){return this.text===void 0}toString(){return this.text||"N/A"}};a(r3,"Text");var f=r3;function Qo(t,e){return t.find(i=>i.startIndex<=e.startIndex&&e.startIndex+e.length<=i.startIndex+i.text.length)}a(Qo,"findMatchingRun");function Ms(t,e,i,r){let o=t.indexOf(e),s=[],l=i.startIndex-e.startIndex;i.startIndex>e.startIndex&&s.push({...e,text:e.text.substring(0,l)}),s.push({...e,text:e.text.substring(l,l+i.length),startIndex:i.startIndex,...r}),i.startIndex+i.length<e.startIndex+e.text.length&&s.push({...e,text:e.text.substring(l+i.length),startIndex:i.startIndex+i.length}),t.splice(o,1,...s)}a(Ms,"insertSubRun");var Yc=class extends m{constructor(e){super(),n(this,"title"),n(this,"link"),n(this,"favicon"),this.title=f.fromAttributed(e.title),this.link=f.fromAttributed(e.link),this.favicon=x.fromResponse(e.favicon)}};a(Yc,"ChannelExternalLinkView");n(Yc,"type","ChannelExternalLinkView");var l3=Yc,zc=class extends m{constructor(e){super(),n(this,"description"),n(this,"description_label"),n(this,"country"),n(this,"custom_links_label"),n(this,"subscriber_count"),n(this,"view_count"),n(this,"joined_date"),n(this,"canonical_channel_url"),n(this,"channel_id"),n(this,"additional_info_label"),n(this,"custom_url_on_tap"),n(this,"video_count"),n(this,"sign_in_for_business_email"),n(this,"links"),Reflect.has(e,"description")&&(this.description=e.description),Reflect.has(e,"descriptionLabel")&&(this.description_label=f.fromAttributed(e.descriptionLabel)),Reflect.has(e,"country")&&(this.country=e.country),Reflect.has(e,"customLinksLabel")&&(this.custom_links_label=f.fromAttributed(e.customLinksLabel)),Reflect.has(e,"subscriberCountText")&&(this.subscriber_count=e.subscriberCountText),Reflect.has(e,"viewCountText")&&(this.view_count=e.viewCountText),Reflect.has(e,"joinedDateText")&&(this.joined_date=f.fromAttributed(e.joinedDateText)),Reflect.has(e,"canonicalChannelUrl")&&(this.canonical_channel_url=e.canonicalChannelUrl),Reflect.has(e,"channelId")&&(this.channel_id=e.channelId),Reflect.has(e,"additionalInfoLabel")&&(this.additional_info_label=f.fromAttributed(e.additionalInfoLabel)),Reflect.has(e,"customUrlOnTap")&&(this.custom_url_on_tap=new y(e.customUrlOnTap)),Reflect.has(e,"videoCountText")&&(this.video_count=e.videoCountText),Reflect.has(e,"signInForBusinessEmail")&&(this.sign_in_for_business_email=f.fromAttributed(e.signInForBusinessEmail)),Reflect.has(e,"links")?this.links=v.parseArray(e.links,l3):this.links=[]}};a(zc,"AboutChannelView");n(zc,"type","AboutChannelView");var c3=zc,$c=class extends m{constructor(e){super(),n(this,"metadata"),n(this,"share_channel"),this.metadata=v.parseItem(e.metadata,c3),this.share_channel=v.parseItem(e.shareChannel,L)}};a($c,"AboutChannel");n($c,"type","AboutChannel");var u3=$c,Jc=class extends m{constructor(e){super(),n(this,"title"),n(this,"endpoint"),this.title=new f(e.title),this.endpoint=new y(e.navigationEndpoint)}};a(Jc,"AccountChannel");n(Jc,"type","AccountChannel");var h3=Jc,Xc=class extends m{constructor(e){super(),n(this,"account_name"),n(this,"account_photo"),n(this,"is_selected"),n(this,"is_disabled"),n(this,"has_channel"),n(this,"endpoint"),n(this,"account_byline"),n(this,"channel_handle"),this.account_name=new f(e.accountName),this.account_photo=x.fromResponse(e.accountPhoto),this.is_selected=!!e.isSelected,this.is_disabled=!!e.isDisabled,this.has_channel=!!e.hasChannel,this.endpoint=new y(e.serviceEndpoint),this.account_byline=new f(e.accountByline),this.channel_handle=new f(e.channelHandle)}};a(Xc,"AccountItem");n(Xc,"type","AccountItem");var Qc=Xc,Zc=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(Zc,"AccountItemSectionHeader");n(Zc,"type","AccountItemSectionHeader");var d3=Zc,eu=class extends m{constructor(e){super(),n(this,"title"),n(this,"subtitle"),n(this,"endpoint"),n(this,"style"),n(this,"icon_type"),n(this,"secondary_icon_type"),this.title=new f(e.title).toString(),"subtitle"in e&&(this.subtitle=new f(e.subtitle)),"icon"in e&&"iconType"in e.icon&&(this.icon_type=e.icon.iconType),"secondaryIcon"in e&&"iconType"in e.secondaryIcon&&(this.secondary_icon_type=e.secondaryIcon.iconType),this.endpoint=new y(e.navigationEndpoint||e.serviceEndpoint),this.style=e.style}};a(eu,"CompactLink");n(eu,"type","CompactLink");var Po=eu,tu=class extends m{constructor(e){super(),n(this,"contents"),n(this,"header"),this.contents=v.parseArray(e.contents,[Qc,Po]),this.header=v.parseItem(e.header,d3)}};a(tu,"AccountItemSection");n(tu,"type","AccountItemSection");var _3=tu,iu=class extends m{constructor(e){super(),n(this,"contents"),n(this,"footers"),this.contents=v.parseArray(e.contents,_3),this.footers=v.parseArray(e.footers,h3)}};a(iu,"AccountSectionList");n(iu,"type","AccountSectionList");var p3=iu,nu=class extends m{constructor(e){super(),n(this,"contents"),n(this,"target"),this.contents=v.parseArray(e.continuationItems),this.target=e.target}};a(nu,"AppendContinuationItemsAction");n(nu,"type","AppendContinuationItemsAction");var Ji=nu,su=class extends m{constructor(e){super(),n(this,"target_id"),n(this,"visibility"),this.target_id=e.targetId,this.visibility=e.visibility}};a(su,"ChangeEngagementPanelVisibilityAction");n(su,"type","ChangeEngagementPanelVisibilityAction");var fP=su,ou=class extends m{constructor(e){super(),n(this,"header"),n(this,"sections"),n(this,"style"),this.header=v.parseItem(e.header),this.sections=v.parseArray(e.sections),this.style=e.style}};a(ou,"MultiPageMenu");n(ou,"type","MultiPageMenu");var f3=ou,ru=class extends m{constructor(e){super(),n(this,"menu"),this.menu=v.parseItem(e.menu,f3)}};a(ru,"GetMultiPageMenuAction");n(ru,"type","GetMultiPageMenuAction");var mP=ru,au=class extends m{constructor(e){super(),n(this,"bucket"),this.bucket=e.bucket}};a(au,"SendFeedbackAction");n(au,"type","SendFeedbackAction");var vP=au,lu=class extends m{constructor(e){super(),n(this,"signal"),this.signal=e.signal}};a(lu,"SignalAction");n(lu,"type","SignalAction");var bP=lu,cu=class extends m{constructor(e){super(),n(this,"header"),n(this,"contents"),this.header=v.parseItem(e.header),this.contents=v.parse(e.contents,!0)}};a(cu,"ChannelSwitcherPage");n(cu,"type","ChannelSwitcherPage");var m3=cu,uu=class extends m{constructor(e){super(),n(this,"header"),n(this,"contents");let i=v.parseItem(e.page,m3);i&&(this.header=i.header,this.contents=i.contents)}};a(uu,"UpdateChannelSwitcherPageAction");n(uu,"type","UpdateChannelSwitcherPageAction");var gP=uu,hu=class extends m{constructor(e){super(),n(this,"title"),n(this,"icon_type"),n(this,"tooltip"),n(this,"sub_menu_items"),n(this,"accessibility"),"title"in e&&(this.title=e.title),"icon"in e&&(this.icon_type=e.icon.iconType),"tooltip"in e&&(this.tooltip=e.tooltip),"subMenuItems"in e&&(this.sub_menu_items=e.subMenuItems.map(i=>{var r,o;return{title:i.title,selected:i.selected,continuation:(o=(r=i.continuation)==null?void 0:r.reloadContinuationData)==null?void 0:o.continuation,endpoint:new y(i.serviceEndpoint||i.navigationEndpoint),subtitle:i.subtitle||null}})),"accessibility"in e&&"accessibilityData"in e.accessibility&&(this.accessibility={accessibility_data:new zt(e.accessibility.accessibilityData)})}get label(){var e,i;return(i=(e=this.accessibility)==null?void 0:e.accessibility_data)==null?void 0:i.label}};a(hu,"SortFilterSubMenu");n(hu,"type","SortFilterSubMenu");var hs=hu,du=class extends m{constructor(e){super(),n(this,"language_menu"),this.language_menu=v.parseItem(e.languageMenu,hs)}};a(du,"TranscriptFooter");n(du,"type","TranscriptFooter");var v3=du,_u=class extends m{constructor(e){super(),n(this,"formatted_placeholder"),n(this,"clear_button"),n(this,"endpoint"),n(this,"search_button"),this.formatted_placeholder=new f(e.formattedPlaceholder),this.clear_button=v.parseItem(e.clearButton,L),this.endpoint=new y(e.onTextChangeCommand),this.search_button=v.parseItem(e.searchButton,L)}};a(_u,"TranscriptSearchBox");n(_u,"type","TranscriptSearchBox");var b3=_u,pu=class extends m{constructor(e){super(),n(this,"start_ms"),n(this,"end_ms"),n(this,"snippet"),this.start_ms=e.startMs,this.end_ms=e.endMs,this.snippet=new f(e.snippet)}};a(pu,"TranscriptSectionHeader");n(pu,"type","TranscriptSectionHeader");var g3=pu,fu=class extends m{constructor(e){super(),n(this,"start_ms"),n(this,"end_ms"),n(this,"snippet"),n(this,"start_time_text"),n(this,"target_id"),this.start_ms=e.startMs,this.end_ms=e.endMs,this.snippet=new f(e.snippet),this.start_time_text=new f(e.startTimeText),this.target_id=e.targetId}};a(fu,"TranscriptSegment");n(fu,"type","TranscriptSegment");var y3=fu,mu=class extends m{constructor(e){super(),n(this,"initial_segments"),n(this,"no_result_label"),n(this,"retry_label"),n(this,"touch_captions_enabled"),this.initial_segments=v.parseArray(e.initialSegments,[y3,g3]),this.no_result_label=new f(e.noResultLabel),this.retry_label=new f(e.retryLabel),this.touch_captions_enabled=e.touchCaptionsEnabled}};a(mu,"TranscriptSegmentList");n(mu,"type","TranscriptSegmentList");var w3=mu,vu=class extends m{constructor(e){super(),n(this,"header"),n(this,"body"),n(this,"footer"),n(this,"target_id"),this.header=v.parseItem(e.header,b3),this.body=v.parseItem(e.body,w3),this.footer=v.parseItem(e.footer,v3),this.target_id=e.targetId}};a(vu,"TranscriptSearchPanel");n(vu,"type","TranscriptSearchPanel");var k3=vu,bu=class extends m{constructor(e){super(),n(this,"content"),this.content=v.parseItem(e.content,k3)}};a(bu,"Transcript");n(bu,"type","Transcript");var gu=bu,yu=class extends m{constructor(e){super(),n(this,"target_id"),n(this,"content"),this.target_id=e.targetId,this.content=v.parseItem(e.content,gu)}};a(yu,"UpdateEngagementPanelAction");n(yu,"type","UpdateEngagementPanelAction");var yP=yu,wu=class extends m{constructor(e){super(),n(this,"channel_id"),n(this,"subscribed"),this.channel_id=e.channelId,this.subscribed=e.subscribed}};a(wu,"UpdateSubscribeButtonAction");n(wu,"type","UpdateSubscribeButtonAction");var wP=wu,ku=class extends m{constructor(e){super(),n(this,"account_name"),n(this,"account_photo"),n(this,"endpoint"),n(this,"manage_account_title"),n(this,"channel_handle"),this.account_name=new f(e.accountName),this.account_photo=x.fromResponse(e.accountPhoto),this.endpoint=new y(e.serviceEndpoint),this.manage_account_title=new f(e.manageAccountTitle),this.channel_handle=new f(e.channelHandle)}};a(ku,"ActiveAccountHeader");n(ku,"type","ActiveAccountHeader");var kP=ku,Cu=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(Cu,"MenuTitle");n(Cu,"type","MenuTitle");var C3=Cu,Tu=class extends m{constructor(e){var i;super(),n(this,"add_to_playlist_service_endpoint"),n(this,"contains_selected_videos"),n(this,"playlist_id"),n(this,"privacy"),n(this,"privacy_icon"),n(this,"remove_from_playlist_service_endpoint"),n(this,"title"),this.add_to_playlist_service_endpoint=new y(e.addToPlaylistServiceEndpoint),this.contains_selected_videos=e.containsSelectedVideos,this.playlist_id=e.playlistId,this.privacy=e.privacy,this.privacy_icon={icon_type:((i=e.privacyIcon)==null?void 0:i.iconType)||null},this.remove_from_playlist_service_endpoint=new y(e.removeFromPlaylistServiceEndpoint),this.title=new f(e.title)}};a(Tu,"PlaylistAddToOption");n(Tu,"type","PlaylistAddToOption");var T3=Tu,Su=class extends m{constructor(e){super(),n(this,"actions"),n(this,"playlists"),this.actions=v.parseArray(e.actions,[C3,L]),this.playlists=v.parseArray(e.playlists,T3)}};a(Su,"AddToPlaylist");n(Su,"type","AddToPlaylist");var CP=Su,Iu=class extends m{constructor(e){super(),n(this,"text"),n(this,"alert_type"),this.text=new f(e.text),this.alert_type=e.type}};a(Iu,"Alert");n(Iu,"type","Alert");var Eu=Iu,Au=class extends m{constructor(e){super(),n(this,"text"),n(this,"alert_type"),n(this,"dismiss_button"),this.text=new f(e.text),this.alert_type=e.type,this.dismiss_button=v.parseItem(e.dismissButton,L)}};a(Au,"AlertWithButton");n(Au,"type","AlertWithButton");var S3=Au,xu=class extends m{constructor(e){super(),n(this,"thumbnail"),this.thumbnail=x.fromResponse(e.thumbnail)}};a(xu,"AnimatedThumbnailOverlayView");n(xu,"type","AnimatedThumbnailOverlayView");var I3=xu,Pu=class extends m{constructor(e){super(),n(this,"text"),n(this,"suffix"),this.text=f.fromAttributed(e.text),this.suffix=f.fromAttributed(e.suffix)}};a(Pu,"AttributionView");n(Pu,"type","AttributionView");var E3=Pu,Mu=class extends m{constructor(e){super(),n(this,"audio_only_availability"),this.audio_only_availability=e.audioOnlyAvailability}};a(Mu,"AudioOnlyPlayability");n(Mu,"type","AudioOnlyPlayability");var A3=Mu,Ru=class extends m{constructor(e){var i,r;super(),n(this,"playlist_video"),(r=(i=e?.content)==null?void 0:i.automixPlaylistVideoRenderer)!=null&&r.navigationEndpoint&&(this.playlist_video={endpoint:new y(e.content.automixPlaylistVideoRenderer.navigationEndpoint)})}};a(Ru,"AutomixPreviewVideo");n(Ru,"type","AutomixPreviewVideo");var oa=Ru,Du=class extends m{constructor(e){super(),n(this,"image"),n(this,"image_processor"),n(this,"avatar_image_size"),this.image=x.fromResponse(e.image),this.avatar_image_size=e.avatarImageSize,e.image.processor&&(this.image_processor={border_image_processor:{circular:e.image.processor.borderImageProcessor.circular}})}};a(Du,"AvatarView");n(Du,"type","AvatarView");var ra=Du,x3=class{constructor(e){n(this,"on_focus"),n(this,"on_hidden"),n(this,"on_touch_end"),n(this,"on_touch_move"),n(this,"on_long_press"),n(this,"on_tap"),n(this,"on_touch_start"),n(this,"on_visible"),n(this,"on_first_visible"),n(this,"on_hover"),"onFocus"in e&&(this.on_focus=new y(e.onFocus)),"onHidden"in e&&(this.on_hidden=new y(e.onHidden)),"onTouchEnd"in e&&(this.on_touch_end=new y(e.onTouchEnd)),"onTouchMove"in e&&(this.on_touch_move=new y(e.onTouchMove)),"onLongPress"in e&&(this.on_long_press=new y(e.onLongPress)),"onTap"in e&&(this.on_tap=new y(e.onTap)),"onTouchStart"in e&&(this.on_touch_start=new y(e.onTouchStart)),"onVisible"in e&&(this.on_visible=new y(e.onVisible)),"onFirstVisible"in e&&(this.on_first_visible=new y(e.onFirstVisible)),"onHover"in e&&(this.on_hover=new y(e.onHover))}};a(x3,"CommandContext");var P3=x3,M3=class{constructor(e){n(this,"command_context"),n(this,"accessibility_context"),e&&("commandContext"in e&&(this.command_context=new P3(e.commandContext)),"accessibilityContext"in e&&(this.accessibility_context=new A1(e.accessibilityContext)))}};a(M3,"RendererContext");var Jt=M3,Bu=class extends m{constructor(e){super(),n(this,"avatars"),n(this,"text"),n(this,"renderer_context"),this.avatars=v.parseArray(e.avatars,ra),Reflect.has(e,"text")&&(this.text=f.fromAttributed(e.text)),this.renderer_context=new Jt(e.rendererContext)}};a(Bu,"AvatarStackView");n(Bu,"type","AvatarStackView");var Lu=Bu,Vu=class extends m{constructor(e){super(),n(this,"secondary_icon_image"),n(this,"icon_name"),n(this,"enable_icon_button"),n(this,"tooltip"),n(this,"icon_image_flip_for_rtl"),n(this,"button_size"),n(this,"icon_position"),n(this,"is_full_width"),n(this,"state"),n(this,"on_disabled_tap"),n(this,"custom_border_color"),n(this,"on_tap"),n(this,"style"),n(this,"icon_image"),n(this,"custom_dark_theme_border_color"),n(this,"title"),n(this,"target_id"),n(this,"enable_full_width_margins"),n(this,"custom_font_color"),n(this,"button_type"),n(this,"enabled"),n(this,"accessibility_id"),n(this,"custom_background_color"),n(this,"on_long_press"),n(this,"title_formatted"),n(this,"on_visible"),n(this,"icon_trailing"),n(this,"accessibility_text"),"secondaryIconImage"in e&&(this.secondary_icon_image=x.fromResponse(e.secondaryIconImage)),"iconName"in e&&(this.icon_name=e.iconName),"enableIconButton"in e&&(this.enable_icon_button=e.enableIconButton),"tooltip"in e&&(this.tooltip=e.tooltip),"iconImageFlipForRtl"in e&&(this.icon_image_flip_for_rtl=e.iconImageFlipForRtl),"buttonSize"in e&&(this.button_size=e.buttonSize),"iconPosition"in e&&(this.icon_position=e.iconPosition),"isFullWidth"in e&&(this.is_full_width=e.isFullWidth),"state"in e&&(this.state=e.state),"onDisabledTap"in e&&(this.on_disabled_tap=new y(e.onDisabledTap)),"customBorderColor"in e&&(this.custom_border_color=e.customBorderColor),"onTap"in e&&(this.on_tap=new y(e.onTap)),"style"in e&&(this.style=e.style),"iconImage"in e&&(this.icon_image=e.iconImage),"customDarkThemeBorderColor"in e&&(this.custom_dark_theme_border_color=e.customDarkThemeBorderColor),"title"in e&&(this.title=e.title),"targetId"in e&&(this.target_id=e.targetId),"enableFullWidthMargins"in e&&(this.enable_full_width_margins=e.enableFullWidthMargins),"customFontColor"in e&&(this.custom_font_color=e.customFontColor),"type"in e&&(this.button_type=e.type),"enabled"in e&&(this.enabled=e.enabled),"accessibilityId"in e&&(this.accessibility_id=e.accessibilityId),"customBackgroundColor"in e&&(this.custom_background_color=e.customBackgroundColor),"onLongPress"in e&&(this.on_long_press=new y(e.onLongPress)),"titleFormatted"in e&&(this.title_formatted=e.titleFormatted),"onVisible"in e&&(this.on_visible=e.onVisible),"iconTrailing"in e&&(this.icon_trailing=e.iconTrailing),"accessibilityText"in e&&(this.accessibility_text=e.accessibilityText)}};a(Vu,"ButtonView");n(Vu,"type","ButtonView");var He=Vu,Ou=class extends m{constructor(e){super(),n(this,"body_text"),n(this,"cta_button"),n(this,"icon_type"),n(this,"title"),this.body_text=new f(e.bodyText),this.cta_button=v.parseItem(e.ctaButton,[L,He]),Reflect.has(e,"icon")&&(this.icon_type=e.icon.iconType),this.title=new f(e.title)}};a(Ou,"BackgroundPromo");n(Ou,"type","BackgroundPromo");var TP=Ou,Nu=class extends m{constructor(e){super(),n(this,"image"),n(this,"endpoint"),this.image=x.fromResponse(e.image),this.endpoint=new y(e.command)}};a(Nu,"BackstageImage");n(Nu,"type","BackstageImage");var R3=Nu,Fu=class extends m{constructor(e){var i,r,o,s,l,c,u,d,p;super(),n(this,"text"),n(this,"toggled_text"),n(this,"tooltip"),n(this,"toggled_tooltip"),n(this,"is_toggled"),n(this,"is_disabled"),n(this,"icon_type"),n(this,"like_count"),n(this,"short_like_count"),n(this,"endpoint"),n(this,"toggled_endpoint"),n(this,"button_id"),n(this,"target_id"),this.text=new f(e.defaultText),this.toggled_text=new f(e.toggledText),this.tooltip=e.defaultTooltip,this.toggled_tooltip=e.toggledTooltip,this.is_toggled=e.isToggled,this.is_disabled=e.isDisabled,this.icon_type=(i=e.defaultIcon)==null?void 0:i.iconType;let _=((s=(o=(r=e?.defaultText)==null?void 0:r.accessibility)==null?void 0:o.accessibilityData)==null?void 0:s.label)||((c=(l=e?.accessibilityData)==null?void 0:l.accessibilityData)==null?void 0:c.label)||((u=e?.accessibility)==null?void 0:u.label);this.icon_type=="LIKE"&&(this.like_count=parseInt(_.replace(/\D/g,"")),this.short_like_count=new f(e.defaultText).toString()),this.endpoint=(p=(d=e.defaultServiceEndpoint)==null?void 0:d.commandExecutorCommand)!=null&&p.commands?new y(e.defaultServiceEndpoint.commandExecutorCommand.commands.pop()):new y(e.defaultServiceEndpoint),this.toggled_endpoint=new y(e.toggledServiceEndpoint),Reflect.has(e,"toggleButtonSupportedData")&&Reflect.has(e.toggleButtonSupportedData,"toggleButtonIdData")&&(this.button_id=e.toggleButtonSupportedData.toggleButtonIdData.id),Reflect.has(e,"targetId")&&(this.target_id=e.targetId)}};a(Fu,"ToggleButton");n(Fu,"type","ToggleButton");var $e=Fu,Uu=class extends m{constructor(e){var i,r;super(),n(this,"creator_thumbnail"),n(this,"heart_icon_type"),n(this,"heart_color"),n(this,"hearted_tooltip"),n(this,"is_hearted"),n(this,"is_enabled"),n(this,"kennedy_heart_color_string"),this.creator_thumbnail=x.fromResponse(e.creatorThumbnail),Reflect.has(e,"heartIcon")&&Reflect.has(e.heartIcon,"iconType")&&(this.heart_icon_type=e.heartIcon.iconType),this.heart_color={basic_color_palette_data:{foreground_title_color:(r=(i=e.heartColor)==null?void 0:i.basicColorPaletteData)==null?void 0:r.foregroundTitleColor}},this.hearted_tooltip=e.heartedTooltip,this.is_hearted=e.isHearted,this.is_enabled=e.isEnabled,this.kennedy_heart_color_string=e.kennedyHeartColorString}};a(Uu,"CreatorHeart");n(Uu,"type","CreatorHeart");var D3=Uu,Hu=class extends m{constructor(e){super(),n(this,"like_button"),n(this,"dislike_button"),n(this,"reply_button"),n(this,"creator_heart"),this.like_button=v.parseItem(e.likeButton,$e),this.dislike_button=v.parseItem(e.dislikeButton,$e),this.reply_button=v.parseItem(e.replyButton,L),this.creator_heart=v.parseItem(e.creatorHeart,D3)}};a(Hu,"CommentActionButtons");n(Hu,"type","CommentActionButtons");var B3=Hu,Wu=class extends m{constructor(e){super(),n(this,"default_button"),n(this,"toggled_button"),n(this,"is_toggling_disabled"),n(this,"identifier"),n(this,"is_toggled"),this.default_button=v.parseItem(e.defaultButtonViewModel,He),this.toggled_button=v.parseItem(e.toggledButtonViewModel,He),this.is_toggling_disabled=e.isTogglingDisabled,this.identifier=e.identifier,Reflect.has(e,"isToggled")&&(this.is_toggled=e.isToggled)}};a(Wu,"ToggleButtonView");n(Wu,"type","ToggleButtonView");var En=Wu,qu=class extends m{constructor(e){super(),n(this,"toggle_button"),n(this,"like_status_entity_key"),n(this,"like_status_entity"),this.toggle_button=v.parseItem(e.toggleButtonViewModel,En),this.like_status_entity_key=e.likeStatusEntityKey,this.like_status_entity={key:e.likeStatusEntity.key,like_status:e.likeStatusEntity.likeStatus}}};a(qu,"LikeButtonView");n(qu,"type","LikeButtonView");var ju=qu,Gu=class extends m{constructor(e){super(),n(this,"toggle_button"),n(this,"dislike_entity_key"),this.toggle_button=v.parseItem(e.toggleButtonViewModel,En),this.dislike_entity_key=e.dislikeEntityKey}};a(Gu,"DislikeButtonView");n(Gu,"type","DislikeButtonView");var Ku=Gu,Yu=class extends m{constructor(e){if(super(),n(this,"like_button"),n(this,"dislike_button"),n(this,"icon_type"),n(this,"like_count_entity"),n(this,"dynamic_like_count_update_data"),n(this,"like_count"),n(this,"short_like_count"),this.like_button=v.parseItem(e.likeButtonViewModel,ju),this.dislike_button=v.parseItem(e.dislikeButtonViewModel,Ku),this.icon_type=e.iconType,this.like_button&&this.like_button.toggle_button){let i=this.like_button.toggle_button;i.default_button?(this.short_like_count=i.default_button.title,i.default_button.accessibility_text&&(this.like_count=parseInt(i.default_button.accessibility_text.replace(/\D/g,"")))):i.toggled_button&&(this.short_like_count=i.toggled_button.title,i.toggled_button.accessibility_text&&(this.like_count=parseInt(i.toggled_button.accessibility_text.replace(/\D/g,""))))}this.like_count_entity={key:e.likeCountEntity.key},this.dynamic_like_count_update_data={update_status_key:e.dynamicLikeCountUpdateData.updateStatusKey,placeholder_like_count_values_key:e.dynamicLikeCountUpdateData.placeholderLikeCountValuesKey,update_delay_loop_id:e.dynamicLikeCountUpdateData.updateDelayLoopId,update_delay_sec:e.dynamicLikeCountUpdateData.updateDelaySec}}};a(Yu,"SegmentedLikeDislikeButtonView");n(Yu,"type","SegmentedLikeDislikeButtonView");var Zn=Yu,zu=class extends L{constructor(e){super(e)}};a(zu,"MenuServiceItem");n(zu,"type","MenuServiceItem");var is=zu,$u=class extends m{constructor(e){super(),n(this,"style"),n(this,"size"),n(this,"endpoint"),n(this,"target_id"),this.style=e.style,this.size=e.size,this.endpoint=new y(e.command),this.target_id=e.targetId}};a($u,"DownloadButton");n($u,"type","DownloadButton");var Ju=$u,Xu=class extends m{constructor(e){super(),n(this,"has_separator"),n(this,"endpoint"),this.has_separator=!!e.hasSeparator,this.endpoint=new y(e.navigationEndpoint||e.serviceEndpoint)}};a(Xu,"MenuServiceItemDownload");n(Xu,"type","MenuServiceItemDownload");var L3=Xu,Zo,el,Qu=class extends m{constructor(e){var i,r,o,s,l,c;super(),M(this,Zo),n(this,"subscribe_button_content"),n(this,"unsubscribe_button_content"),n(this,"disable_notification_bell"),n(this,"button_style"),n(this,"is_signed_out"),n(this,"background_style"),n(this,"disable_subscribe_button"),n(this,"on_show_subscription_options"),n(this,"channel_id"),n(this,"enable_subscribe_button_post_click_animation"),n(this,"bell_accessibility_data"),this.subscribe_button_content=F(this,Zo,el).call(this,e.subscribeButtonContent),this.unsubscribe_button_content=F(this,Zo,el).call(this,e.unsubscribeButtonContent),this.disable_notification_bell=e.disableNotificationBell,"buttonStyle"in e&&(this.button_style={unsubscribed_state_style:(i=e.buttonStyle)==null?void 0:i.unsubscribedStateStyle,subscribed_state_style:(r=e.buttonStyle)==null?void 0:r.subscribedStateStyle}),this.is_signed_out=e.isSignedOut,this.background_style=e.backgroundStyle,this.disable_subscribe_button=e.disableSubscribeButton,"onShowSubscriptionOptions"in e&&(this.on_show_subscription_options=new y(e.onShowSubscriptionOptions)),this.channel_id=e.channelId,this.enable_subscribe_button_post_click_animation=e.enableSubscribeButtonPostClickAnimation,"bellAccessibilityData"in e&&(this.bell_accessibility_data={off_label:(o=e.bellAccessibilityData)==null?void 0:o.offLabel,all_label:(s=e.bellAccessibilityData)==null?void 0:s.allLabel,occasional_label:(l=e.bellAccessibilityData)==null?void 0:l.occasionalLabel,disabled_label:(c=e.bellAccessibilityData)==null?void 0:c.disabledLabel})}};Zo=new WeakSet;el=a(function(t){return{button_text:t.buttonText,accessibility_text:t.accessibilityText,image_name:t.imageName,subscribe_state_subscribed:t.subscribeState.subscribed,endpoint:new y(t.onTapCommand)}},"#parseButtonContent");a(Qu,"SubscribeButtonView");n(Qu,"type","SubscribeButtonView");var Zu=Qu,eh=class extends m{constructor(e){var i;super(),n(this,"title"),n(this,"subtitle"),n(this,"selection_text"),n(this,"selection_style"),n(this,"background_color"),n(this,"leading_accessory"),n(this,"trailing_button"),n(this,"trailing_buttons"),n(this,"is_disabled"),n(this,"is_selected"),n(this,"has_divider_below"),n(this,"renderer_context"),"title"in e&&(this.title=f.fromAttributed(e.title)),"subtitle"in e&&(this.subtitle=f.fromAttributed(e.subtitle)),"selectionText"in e&&(this.selection_text=f.fromAttributed(e.selectionText)),"selectionStyle"in e&&(this.selection_style=e.selectionStyle),"backgroundColor"in e&&(this.background_color=parseInt(e.backgroundColor,16)),this.leading_accessory=v.parseItem(e.leadingAccessory,ra),this.trailing_buttons=v.parseArray((i=e.trailingButtons)==null?void 0:i.buttons,Zu),this.trailing_button=v.parseItem(e.trailingButton),this.is_disabled=!!e.isDisabled,this.is_selected=!!e.isSelected,this.has_divider_below=!!e.hasDividerBelow,"rendererContext"in e&&(this.renderer_context=new Jt(e.rendererContext))}};a(eh,"ListItemView");n(eh,"type","ListItemView");var At=eh,th=class extends m{constructor(e){super(),n(this,"menu_item"),n(this,"top_level_button"),this.menu_item=v.parseItem(e.menuItem,[At,is,L3]),this.top_level_button=v.parseItem(e.topLevelButton,[Ju,He,L])}};a(th,"MenuFlexibleItem");n(th,"type","MenuFlexibleItem");var V3=th,ih=class extends m{constructor(e){super(),n(this,"target"),n(this,"like_status"),n(this,"likes_allowed"),n(this,"endpoints"),this.target={video_id:e.target.videoId},this.like_status=e.likeStatus,this.likes_allowed=e.likesAllowed,Reflect.has(e,"serviceEndpoints")&&(this.endpoints=e.serviceEndpoints.map(i=>new y(i)))}};a(ih,"LikeButton");n(ih,"type","LikeButton");var nh=ih,sh=class extends m{constructor(e){super(),n(this,"actions_rows"),n(this,"style"),this.actions_rows=e.actionsRows.map(i=>({actions:v.parseArray(i.actions,[He,En,Zu])})),this.style=e.style}};a(sh,"FlexibleActionsView");n(sh,"type","FlexibleActionsView");var oh=sh,rh=class extends m{constructor(e){super(),n(this,"items"),n(this,"flexible_items"),n(this,"top_level_buttons"),n(this,"accessibility"),this.items=v.parseArray(e.items),this.flexible_items=v.parseArray(e.flexibleItems,V3),this.top_level_buttons=v.parseArray(e.topLevelButtons,[$e,nh,L,He,Zn,oh]),"accessibility"in e&&"accessibilityData"in e.accessibility&&(this.accessibility={accessibility_data:new zt(e.accessibility.accessibilityData)})}get label(){var e,i;return(i=(e=this.accessibility)==null?void 0:e.accessibility_data)==null?void 0:i.label}get contents(){return this.items}};a(rh,"Menu");n(rh,"type","Menu");var ye=rh,ah=class extends m{constructor(e){super(),n(this,"id"),n(this,"author"),n(this,"content"),n(this,"published"),n(this,"poll_status"),n(this,"vote_status"),n(this,"vote_count"),n(this,"menu"),n(this,"action_buttons"),n(this,"vote_button"),n(this,"surface"),n(this,"endpoint"),n(this,"attachment"),this.id=e.postId,this.author=new le({...e.authorText,navigationEndpoint:e.authorEndpoint},null,e.authorThumbnail),this.content=new f(e.contentText),this.published=new f(e.publishedTimeText),Reflect.has(e,"pollStatus")&&(this.poll_status=e.pollStatus),Reflect.has(e,"voteStatus")&&(this.vote_status=e.voteStatus),Reflect.has(e,"voteCount")&&(this.vote_count=new f(e.voteCount)),Reflect.has(e,"actionMenu")&&(this.menu=v.parseItem(e.actionMenu,ye)),Reflect.has(e,"actionButtons")&&(this.action_buttons=v.parseItem(e.actionButtons,B3)),Reflect.has(e,"voteButton")&&(this.vote_button=v.parseItem(e.voteButton,L)),Reflect.has(e,"navigationEndpoint")&&(this.endpoint=new y(e.navigationEndpoint)),Reflect.has(e,"backstageAttachment")&&(this.attachment=v.parseItem(e.backstageAttachment)),this.surface=e.surface}};a(ah,"BackstagePost");n(ah,"type","BackstagePost");var aa=ah,lh=class extends m{constructor(e){super(),n(this,"post"),this.post=v.parseItem(e.post)}};a(lh,"BackstagePostThread");n(lh,"type","BackstagePostThread");var SP=lh,O3=class extends m{constructor(e){super(),n(this,"text"),n(this,"style"),n(this,"accessibility_label"),this.text=e.badgeText,this.style=e.badgeStyle,this.accessibility_label=e.accessibilityLabel}};a(O3,"BadgeView");var ch=O3,uh=class extends m{constructor(e){super(),n(this,"name"),n(this,"is_selected"),n(this,"endpoint"),this.name=new f(e.name),this.is_selected=e.isSelected,this.endpoint=new y(e.navigationEndpoint)}};a(uh,"SubFeedOption");n(uh,"type","SubFeedOption");var N3=uh,hh=class extends m{constructor(e){super(),n(this,"title"),n(this,"options"),this.title=new f(e.title),this.options=v.parseArray(e.options,N3)}};a(hh,"SubFeedSelector");n(hh,"type","SubFeedSelector");var F3=hh,dh=class extends m{constructor(e){super(),n(this,"disclaimer"),n(this,"info_icon"),n(this,"usage_scenario"),this.disclaimer=new f(e.disclaimer),this.info_icon={icon_type:e.infoIcon.iconType},this.usage_scenario=e.usageScenario}};a(dh,"EomSettingsDisclaimer");n(dh,"type","EomSettingsDisclaimer");var U3=dh,_h=class extends m{constructor(e){super(),n(this,"endpoint"),n(this,"search_button"),n(this,"clear_button"),n(this,"placeholder_text"),this.endpoint=new y(e.endpoint),this.search_button=v.parseItem(e.searchButton,L),this.clear_button=v.parseItem(e.clearButton,L),this.placeholder_text=new f(e.placeholderText)}};a(_h,"SearchBox");n(_h,"type","SearchBox");var H3=_h,ph=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parseArray(e.contents,[F3,U3,$e,Po,H3,L])}};a(ph,"BrowseFeedActions");n(ph,"type","BrowseFeedActions");var fh=ph,mh=class extends m{constructor(e){super(),n(this,"album"),n(this,"thumbnails"),this.album=new f(e.album),this.thumbnails=x.fromResponse(e.thumbnailDetails)}};a(mh,"BrowserMediaSession");n(mh,"type","BrowserMediaSession");var IP=mh,vh=class extends m{constructor(e){super(),n(this,"title"),n(this,"icon_name"),n(this,"renderer_context"),this.title=e.title,this.icon_name=e.image.sources[0].clientResource.imageName,this.renderer_context=new Jt(e.rendererContext)}};a(vh,"ButtonCardView");n(vh,"type","ButtonCardView");var EP=vh,bh=class extends m{constructor(e){super(),n(this,"endpoint"),n(this,"icon"),n(this,"title"),this.endpoint=new y(e.navigationEndpoint),this.icon=x.fromResponse(e.icon),this.title=new f(e.title)}};a(bh,"HeaderLink");n(bh,"type","HeaderLink");var ky=bh,gh=class extends m{constructor(e){var i,r;super(),n(this,"primary"),n(this,"secondary"),this.primary=te(((i=e.primaryLinks)==null?void 0:i.map(o=>new ky(o)))||[]),this.secondary=te(((r=e.secondaryLinks)==null?void 0:r.map(o=>new ky(o)))||[])}};a(gh,"ChannelHeaderLinks");n(gh,"type","ChannelHeaderLinks");var W3=gh,yh=class extends m{constructor(e){super(),n(this,"first_link"),n(this,"more"),Reflect.has(e,"firstLink")&&(this.first_link=f.fromAttributed(e.firstLink)),Reflect.has(e,"more")&&(this.more=f.fromAttributed(e.more))}};a(yh,"ChannelHeaderLinksView");n(yh,"type","ChannelHeaderLinksView");var q3=yh,wh=class extends m{constructor(e){super(),n(this,"placeholder_text"),n(this,"max_character_limit"),this.placeholder_text=new f(e.placeholderText),this.max_character_limit=e.maxCharacterLimit}};a(wh,"ClipCreationTextInput");n(wh,"type","ClipCreationTextInput");var j3=wh,kh=class extends m{constructor(e){var i,r,o,s,l,c;super(),n(this,"length_template"),n(this,"max_length_ms"),n(this,"min_length_ms"),n(this,"default_length_ms"),n(this,"window_size_ms"),n(this,"start_label"),n(this,"end_label"),n(this,"duration_label"),this.length_template=e.lengthTemplate,this.max_length_ms=e.maxLengthMs,this.min_length_ms=e.minLengthMs,this.default_length_ms=e.defaultLengthMs,this.window_size_ms=e.windowSizeMs,this.start_label=(r=(i=e.startAccessibility)==null?void 0:i.accessibilityData)==null?void 0:r.label,this.end_label=(s=(o=e.endAccessibility)==null?void 0:o.accessibilityData)==null?void 0:s.label,this.duration_label=(c=(l=e.durationAccessibility)==null?void 0:l.accessibilityData)==null?void 0:c.label}};a(kh,"ClipCreationScrubber");n(kh,"type","ClipCreationScrubber");var G3=kh,Ch=class extends m{constructor(e){super(),n(this,"title"),n(this,"body"),this.title=new f(e.title),this.body=new f(e.body)}};a(Ch,"ClipAdState");n(Ch,"type","ClipAdState");var K3=Ch,Th=class extends m{constructor(e){super(),n(this,"user_avatar"),n(this,"title_input"),n(this,"scrubber"),n(this,"save_button"),n(this,"display_name"),n(this,"publicity_label"),n(this,"cancel_button"),n(this,"ad_state_overlay"),n(this,"external_video_id"),n(this,"publicity_label_icon"),this.user_avatar=x.fromResponse(e.userAvatar),this.title_input=v.parseItem(e.titleInput,[j3]),this.scrubber=v.parseItem(e.scrubber,[G3]),this.save_button=v.parseItem(e.saveButton,[L]),this.display_name=new f(e.displayName),this.publicity_label=e.publicityLabel,this.cancel_button=v.parseItem(e.cancelButton,[L]),this.ad_state_overlay=v.parseItem(e.adStateOverlay,[K3]),this.external_video_id=e.externalVideoId,this.publicity_label_icon=e.publicityLabelIcon}};a(Th,"ClipCreation");n(Th,"type","ClipCreation");var Y3=Th,Sh=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parse(e.contents,!0,[Y3])}};a(Sh,"ClipSection");n(Sh,"type","ClipSection");var z3=Sh,Ih=class extends m{constructor(e){super(),n(this,"trigger"),n(this,"button"),n(this,"endpoint"),this.trigger=e.trigger,Reflect.has(e,"button")&&(this.button=v.parseItem(e.button,L)),this.endpoint=new y(e.continuationEndpoint)}};a(Ih,"ContinuationItem");n(Ih,"type","ContinuationItem");var Se=Ih,Eh=class extends m{constructor(e){super(),n(this,"title"),n(this,"visibility_button"),n(this,"contextual_info"),n(this,"menu"),this.title=new f(e.title),this.contextual_info=e.contextualInfo?new f(e.contextualInfo):void 0,this.visibility_button=v.parseItem(e.visibilityButton,L),this.menu=v.parseItem(e.menu)}};a(Eh,"EngagementPanelTitleHeader");n(Eh,"type","EngagementPanelTitleHeader");var $3=Eh,Ah=class extends m{constructor(e){super(),n(this,"info_text"),n(this,"menu"),this.info_text=new f(e.infoText),this.menu=v.parseItem(e.menu,ye)}};a(Ah,"MacroMarkersInfoItem");n(Ah,"type","MacroMarkersInfoItem");var J3=Ah,xh=class extends m{constructor(e){super(),n(this,"title"),n(this,"time_description"),n(this,"thumbnail"),n(this,"on_tap_endpoint"),n(this,"layout"),n(this,"is_highlighted"),this.title=new f(e.title),this.time_description=new f(e.timeDescription),this.thumbnail=x.fromResponse(e.thumbnail),this.on_tap_endpoint=new y(e.onTap),this.layout=e.layout,this.is_highlighted=!!e.isHighlighted}};a(xh,"MacroMarkersListItem");n(xh,"type","MacroMarkersListItem");var Ph=xh,Mh=class extends m{constructor(e){super(),n(this,"contents"),n(this,"sync_button_label"),this.contents=v.parseArray(e.contents,[J3,Ph]),this.sync_button_label=new f(e.syncButtonLabel)}};a(Mh,"MacroMarkersList");n(Mh,"type","MacroMarkersList");var X3=Mh,Rh=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parseArray(e.contents)}};a(Rh,"ProductList");n(Rh,"type","ProductList");var Q3=Rh,Dh=class extends m{constructor(e){super(),n(this,"contents"),n(this,"target_id"),n(this,"continuation"),n(this,"header"),n(this,"sub_menu"),this.contents=v.parseArray(e.contents),Reflect.has(e,"targetId")&&(this.target_id=e.targetId),Reflect.has(e,"continuations")&&(Reflect.has(e.continuations[0],"nextContinuationData")?this.continuation=e.continuations[0].nextContinuationData.continuation:Reflect.has(e.continuations[0],"reloadContinuationData")&&(this.continuation=e.continuations[0].reloadContinuationData.continuation)),Reflect.has(e,"header")&&(this.header=v.parseItem(e.header)),Reflect.has(e,"subMenu")&&(this.sub_menu=v.parseItem(e.subMenu))}};a(Dh,"SectionList");n(Dh,"type","SectionList");var Ae=Dh,Bh=class extends m{constructor(e){super(),n(this,"show_more_text"),n(this,"show_less_text"),n(this,"attributed_description_body_text"),this.show_more_text=new f(e.showMoreText),this.show_less_text=new f(e.showLessText),Reflect.has(e,"attributedDescriptionBodyText")&&(this.attributed_description_body_text=f.fromAttributed(e.attributedDescriptionBodyText))}};a(Bh,"ExpandableVideoDescriptionBody");n(Bh,"type","ExpandableVideoDescriptionBody");var Z3=Bh,Lh=class extends m{constructor(e){super(),n(this,"thumbnails"),n(this,"endpoint"),n(this,"query"),this.thumbnails=x.fromResponse(e.thumbnail),this.endpoint=new y(e.searchEndpoint),this.query=new f(e.query).toString()}};a(Lh,"SearchRefinementCard");n(Lh,"type","SearchRefinementCard");var eT=Lh,Vh=class extends m{constructor(e){super(),n(this,"game"),this.game=v.parseItem(e.game)}};a(Vh,"GameCard");n(Vh,"type","GameCard");var tT=Vh,Oh=class extends m{constructor(e){super(),n(this,"visible_item_count"),n(this,"items"),this.visible_item_count=e.visibleItemCount,this.items=v.parseArray(e.items)}get contents(){return this.items}};a(Oh,"HorizontalList");n(Oh,"type","HorizontalList");var iT=Oh,Nh=class extends m{constructor(e){super(),n(this,"text"),this.text=f.fromAttributed(e.text)}};a(Nh,"VideoSummaryParagraphView");n(Nh,"type","VideoSummaryParagraphView");var nT=Nh,Fh=class extends m{constructor(e){super(),n(this,"dislike_button_view"),n(this,"like_button_view"),n(this,"paragraphs"),"dislikeButtonViewModel"in e&&(this.dislike_button_view=v.parseItem(e.dislikeButtonViewModel,Ku)),"likeButtonViewModel"in e&&(this.like_button_view=v.parseItem(e.likeButtonViewModel,ju)),this.paragraphs=v.parseArray(e.paragraphs,nT)}};a(Fh,"VideoSummaryContentView");n(Fh,"type","VideoSummaryContentView");var sT=Fh,Uh=class extends m{constructor(e){super(),n(this,"header"),n(this,"expanded_content"),n(this,"expand_button"),n(this,"collapse_button"),Reflect.has(e,"header")&&(this.header={collapsed_title:new f(e.header.collapsedTitle),collapsed_thumbnail:x.fromResponse(e.header.collapsedThumbnail),collapsed_label:new f(e.header.collapsedLabel),expanded_title:new f(e.header.expandedTitle)}),this.expanded_content=v.parseItem(e.expandedContent,[sT,$h,iT]),this.expand_button=v.parseItem(e.expandButton,L),this.collapse_button=v.parseItem(e.collapseButton,L)}};a(Uh,"ExpandableMetadata");n(Uh,"type","ExpandableMetadata");var Hh=Uh,Wh=class extends m{constructor(e){super(),n(this,"icon_type"),n(this,"style"),n(this,"label"),n(this,"tooltip"),Reflect.has(e,"icon")&&(this.icon_type=e.icon.iconType),Reflect.has(e,"style")&&(this.style=e.style),Reflect.has(e,"label")&&(this.label=e.label),(Reflect.has(e,"tooltip")||Reflect.has(e,"iconTooltip"))&&(this.tooltip=e.tooltip||e.iconTooltip)}};a(Wh,"MetadataBadge");n(Wh,"type","MetadataBadge");var Mn=Wh,qh=class extends m{constructor(e){super(),n(this,"text"),n(this,"style"),this.text=new f(e.text).toString(),this.style=e.style}};a(qh,"ThumbnailOverlayTimeStatus");n(qh,"type","ThumbnailOverlayTimeStatus");var ds=qh,jh=class extends m{constructor(e){var i,r;super(),n(this,"video_id"),n(this,"title"),n(this,"untranslated_title"),n(this,"description_snippet"),n(this,"snippets"),n(this,"expandable_metadata"),n(this,"additional_metadatas"),n(this,"thumbnails"),n(this,"thumbnail_overlays"),n(this,"rich_thumbnail"),n(this,"author"),n(this,"badges"),n(this,"endpoint"),n(this,"published"),n(this,"view_count"),n(this,"short_view_count"),n(this,"upcoming"),n(this,"length_text"),n(this,"show_action_menu"),n(this,"is_watched"),n(this,"menu"),n(this,"byline_text"),n(this,"search_video_result_entity_key"),n(this,"service_endpoints"),n(this,"service_endpoint"),n(this,"style"),this.title=new f(e.title),this.video_id=e.videoId,this.expandable_metadata=v.parseItem(e.expandableMetadata,Hh),"untranslatedTitle"in e&&(this.untranslated_title=new f(e.untranslatedTitle)),"descriptionSnippet"in e&&(this.description_snippet=new f(e.descriptionSnippet)),"detailedMetadataSnippets"in e&&(this.snippets=e.detailedMetadataSnippets.map(o=>({text:new f(o.snippetText),hover_text:new f(o.snippetHoverText)}))),"additionalMetadatas"in e&&(this.additional_metadatas=e.additionalMetadatas.map(o=>new f(o))),this.thumbnails=x.fromResponse(e.thumbnail),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),"richThumbnail"in e&&(this.rich_thumbnail=v.parseItem(e.richThumbnail)),this.author=new le(e.ownerText,e.ownerBadges,(r=(i=e.channelThumbnailSupportedRenderers)==null?void 0:i.channelThumbnailWithLinkRenderer)==null?void 0:r.thumbnail),this.badges=v.parseArray(e.badges,Mn),"navigationEndpoint"in e&&(this.endpoint=new y(e.navigationEndpoint)),"publishedTimeText"in e&&(this.published=new f(e.publishedTimeText)),"viewCountText"in e&&(this.view_count=new f(e.viewCountText)),"shortViewCountText"in e&&(this.short_view_count=new f(e.shortViewCountText)),"upcomingEventData"in e&&(this.upcoming=new Date(+`${e.upcomingEventData.startTime}000`)),this.show_action_menu=!!e.showActionMenu,this.is_watched=!!e.isWatched,this.menu=v.parseItem(e.menu,ye),"searchVideoResultEntityKey"in e&&(this.search_video_result_entity_key=e.searchVideoResultEntityKey),"bylineText"in e&&(this.byline_text=new f(e.bylineText)),"lengthText"in e&&(this.length_text=new f(e.lengthText)),"serviceEndpoints"in e&&(this.service_endpoints=e.serviceEndpoints.map(o=>new y(o))),"serviceEndpoint"in e&&(this.service_endpoint=new y(e.serviceEndpoint)),"style"in e&&(this.style=e.style)}get id(){return this.video_id}get description(){var e;return this.snippets?this.snippets.map(i=>i.text.toString()).join(""):((e=this.description_snippet)==null?void 0:e.toString())||""}get is_live(){var e;return this.badges.some(i=>{if(i.style==="BADGE_STYLE_TYPE_LIVE_NOW"||i.label==="LIVE")return!0})||((e=this.thumbnail_overlays.firstOfType(ds))==null?void 0:e.style)==="LIVE"}get is_upcoming(){return this.upcoming&&this.upcoming>new Date}get is_premiere(){return this.badges.some(e=>e.label==="PREMIERE")}get is_4k(){return this.badges.some(e=>e.label==="4K")}get has_captions(){return this.badges.some(e=>e.label==="CC")}get best_thumbnail(){return this.thumbnails[0]}get duration(){var e;let i=this.thumbnail_overlays.firstOfType(ds),r=((e=this.length_text)==null?void 0:e.toString())||i?.text.toString();return{text:r,seconds:r?Xt(r):0}}};a(jh,"Video");n(jh,"type","Video");var la=jh,Gh=class extends la{constructor(e){var i,r,o,s;super(e),n(this,"metadata_text"),Reflect.has(e,"metadataText")&&(this.metadata_text=new f(e.metadataText),this.metadata_text.text&&(this.short_view_count=new f({simpleText:(i=this.metadata_text.text.split("\xB7")[0])==null?void 0:i.trim()}),this.published=new f({simpleText:(r=this.metadata_text.text.split("\xB7")[1])==null?void 0:r.trim()}))),Reflect.has(e,"bylineText")&&(this.author=new le(e.bylineText,e.ownerBadges,(s=(o=e.channelThumbnailSupportedRenderers)==null?void 0:o.channelThumbnailWithLinkRenderer)==null?void 0:s.thumbnail))}};a(Gh,"VideoCard");n(Gh,"type","VideoCard");var oT=Gh,Kh=class extends m{constructor(e){super(),n(this,"image"),n(this,"style"),this.image=x.fromResponse(e.image),this.style=e.style}};a(Kh,"ContentPreviewImageView");n(Kh,"type","ContentPreviewImageView");var io=Kh,Yh=class extends m{constructor(e){var i;super(),n(this,"image"),n(this,"image_style"),n(this,"title"),n(this,"subtitle"),n(this,"secondary_subtitle"),n(this,"orientation"),n(this,"sizing_rule"),n(this,"overflow_menu_on_tap"),n(this,"overflow_menu_a11y_label"),(i=e.image)!=null&&i.sources?this.image=x.fromResponse(e.image):this.image=v.parseItem(e.image,io),this.image_style=e.imageStyle,this.title=e.title,this.subtitle=e.subtitle,Reflect.has(e,"secondarySubtitle")&&(this.secondary_subtitle={content:e.secondarySubtitle.content}),this.orientation=e.orientation,this.sizing_rule=e.sizingRule,this.overflow_menu_on_tap=new y(e.overflowMenuOnTap),this.overflow_menu_a11y_label=e.overflowMenuA11yLabel}};a(Yh,"VideoAttributeView");n(Yh,"type","VideoAttributeView");var ca=Yh,zh=class extends m{constructor(e){super(),n(this,"cards"),n(this,"header"),n(this,"previous_button"),n(this,"next_button"),this.cards=v.parseArray(e.cards,[ca,eT,Ph,tT,oT]),this.header=v.parseItem(e.header),this.previous_button=v.parseItem(e.previousButton,L),this.next_button=v.parseItem(e.nextButton,L)}};a(zh,"HorizontalCardList");n(zh,"type","HorizontalCardList");var $h=zh,Jh=class extends m{constructor(e){super(),n(this,"label"),n(this,"value"),n(this,"accessibility_text"),this.label=new f(e.label),this.value=new f(e.value),this.accessibility_text=e.accessibilityText}};a(Jh,"Factoid");n(Jh,"type","Factoid");var Mo=Jh,Xh=class extends m{constructor(e){super(),n(this,"factoid"),this.factoid=v.parseItem(e.factoid,Mo)}};a(Xh,"UploadTimeFactoid");n(Xh,"type","UploadTimeFactoid");var rT=Xh,Qh=class extends m{constructor(e){super(),n(this,"view_count_entity_key"),n(this,"factoid"),n(this,"view_count_type"),this.view_count_entity_key=e.viewCountEntityKey,this.factoid=v.parseItem(e.factoid,[Mo]),this.view_count_type=e.viewCountType}};a(Qh,"ViewCountFactoid");n(Qh,"type","ViewCountFactoid");var aT=Qh,Zh=class extends m{constructor(e){super(),n(this,"factoid"),this.factoid=v.parseItem(e.factoid,Mo)}};a(Zh,"HypePointsFactoid");n(Zh,"type","HypePointsFactoid");var lT=Zh,ed=class extends m{constructor(e){super(),n(this,"channel"),n(this,"channel_navigation_endpoint"),n(this,"channel_thumbnail"),n(this,"factoids"),n(this,"publish_date"),n(this,"title"),n(this,"views"),this.title=new f(e.title),this.channel=new f(e.channel),this.channel_navigation_endpoint=new y(e.channelNavigationEndpoint),this.channel_thumbnail=x.fromResponse(e.channelThumbnail),this.publish_date=new f(e.publishDate),this.views=new f(e.views),this.factoids=v.parseArray(e.factoid,[Mo,lT,aT,rT])}};a(ed,"VideoDescriptionHeader");n(ed,"type","VideoDescriptionHeader");var cT=ed,td=class extends m{constructor(e){super(),n(this,"section_title"),n(this,"creator_videos_button"),n(this,"creator_about_button"),n(this,"section_subtitle"),n(this,"channel_avatar"),n(this,"channel_endpoint"),this.section_title=new f(e.sectionTitle),this.creator_videos_button=v.parseItem(e.creatorVideosButton,L),this.creator_about_button=v.parseItem(e.creatorAboutButton,L),this.section_subtitle=new f(e.sectionSubtitle),this.channel_avatar=x.fromResponse(e.channelAvatar),this.channel_endpoint=new y(e.channelEndpoint)}};a(td,"VideoDescriptionInfocardsSection");n(td,"type","VideoDescriptionInfocardsSection");var uT=td,id=class extends m{constructor(e){super(),n(this,"title"),n(this,"default_metadata"),n(this,"expanded_metadata"),n(this,"info_row_expand_status_key"),this.title=new f(e.title),Reflect.has(e,"defaultMetadata")&&(this.default_metadata=new f(e.defaultMetadata)),Reflect.has(e,"expandedMetadata")&&(this.expanded_metadata=new f(e.expandedMetadata)),Reflect.has(e,"infoRowExpandStatusKey")&&(this.info_row_expand_status_key=e.infoRowExpandStatusKey)}};a(id,"InfoRow");n(id,"type","InfoRow");var hT=id,nd=class extends m{constructor(e){super(),n(this,"video_id"),n(this,"thumbnails"),n(this,"rich_thumbnail"),n(this,"title"),n(this,"author"),n(this,"view_count"),n(this,"short_view_count"),n(this,"short_byline_text"),n(this,"long_byline_text"),n(this,"published"),n(this,"badges"),n(this,"thumbnail_overlays"),n(this,"endpoint"),n(this,"menu"),n(this,"length_text"),n(this,"is_watched"),n(this,"service_endpoints"),n(this,"service_endpoint"),n(this,"style"),this.video_id=e.videoId,this.thumbnails=x.fromResponse(e.thumbnail),this.title=new f(e.title),this.author=new le(e.longBylineText,e.ownerBadges,e.channelThumbnail),this.is_watched=!!e.isWatched,this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),this.menu=v.parseItem(e.menu,ye),this.badges=v.parseArray(e.badges,Mn),"publishedTimeText"in e&&(this.published=new f(e.publishedTimeText)),"shortBylineText"in e&&(this.view_count=new f(e.viewCountText)),"shortViewCountText"in e&&(this.short_view_count=new f(e.shortViewCountText)),"richThumbnail"in e&&(this.rich_thumbnail=v.parseItem(e.richThumbnail)),"shortBylineText"in e&&(this.short_byline_text=new f(e.shortBylineText)),"longBylineText"in e&&(this.long_byline_text=new f(e.longBylineText)),"lengthText"in e&&(this.length_text=new f(e.lengthText)),"serviceEndpoints"in e&&(this.service_endpoints=e.serviceEndpoints.map(i=>new y(i))),"serviceEndpoint"in e&&(this.service_endpoint=new y(e.serviceEndpoint)),"navigationEndpoint"in e&&(this.endpoint=new y(e.navigationEndpoint)),"style"in e&&(this.style=e.style)}get id(){return this.video_id}get duration(){var e;let i=this.thumbnail_overlays.firstOfType(ds),r=((e=this.length_text)==null?void 0:e.toString())||i?.text.toString();return{text:r,seconds:r?Xt(r):0}}get best_thumbnail(){return this.thumbnails[0]}get is_fundraiser(){return this.badges.some(e=>e.label==="Fundraiser")}get is_live(){return this.badges.some(e=>{if(e.style==="BADGE_STYLE_TYPE_LIVE_NOW"||e.label==="LIVE")return!0})}get is_new(){return this.badges.some(e=>e.label==="New")}get is_premiere(){return this.badges.some(e=>e.style==="PREMIERE")}};a(nd,"CompactVideo");n(nd,"type","CompactVideo");var sd=nd,od=class extends m{constructor(e){super(),n(this,"info_rows"),n(this,"video_lockup"),this.info_rows=v.parseArray(e.infoRows,hT),this.video_lockup=v.parseItem(e.videoLockup,sd)}};a(od,"CarouselLockup");n(od,"type","CarouselLockup");var dT=od,rd=class extends m{constructor(e){super(),n(this,"carousel_lockups"),n(this,"section_title"),this.carousel_lockups=v.parseArray(e.carouselLockups,dT),this.section_title=new f(e.sectionTitle)}};a(rd,"VideoDescriptionMusicSection");n(rd,"type","VideoDescriptionMusicSection");var ad=rd,ld=class extends m{constructor(e){super(),n(this,"section_title"),n(this,"sub_header_text"),n(this,"primary_button"),this.section_title=new f(e.sectionTitle),this.sub_header_text=new f(e.subHeaderText),this.primary_button=v.parseItem(e.primaryButton,L)}};a(ld,"VideoDescriptionTranscriptSection");n(ld,"type","VideoDescriptionTranscriptSection");var tl=ld,cd=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"title"),n(this,"short_byline_text"),n(this,"video_count_short_text"),n(this,"endpoint"),n(this,"thumbnail_width"),n(this,"aspect_ratio"),n(this,"max_lines_title"),n(this,"max_lines_short_byline_text"),n(this,"overlay_position"),this.thumbnail=x.fromResponse(e.thumbnail),this.title=new f(e.title),this.short_byline_text=new f(e.shortBylineText),this.video_count_short_text=new f(e.videoCountShortText),this.endpoint=new y(e.navigationEndpoint),this.thumbnail_width=e.thumbnailWidth,this.aspect_ratio=e.aspectRatio,this.max_lines_title=e.maxLinesTitle,this.max_lines_short_byline_text=e.maxLinesShortBylineText,this.overlay_position=e.overlayPosition}};a(cd,"StructuredDescriptionPlaylistLockup");n(cd,"type","StructuredDescriptionPlaylistLockup");var _T=cd,ud=class extends m{constructor(e){super(),n(this,"section_title"),n(this,"media_lockups"),this.section_title=new f(e.sectionTitle),this.media_lockups=v.parseArray(e.mediaLockups,[_T])}};a(ud,"VideoDescriptionCourseSection");n(ud,"type","VideoDescriptionCourseSection");var pT=ud,hd=class extends m{constructor(e){super(),n(this,"header_title"),n(this,"header_subtitle"),n(this,"video_attributes"),n(this,"previous_button"),n(this,"next_button"),this.header_title=e.headerTitle,this.header_subtitle=e.headerSubtitle,this.video_attributes=v.parseArray(e.videoAttributeViewModels,ca),this.previous_button=v.parseItem(e.previousButton,He),this.next_button=v.parseItem(e.nextButton,He)}};a(hd,"VideoAttributesSectionView");n(hd,"type","VideoAttributesSectionView");var fT=hd,dd=class extends m{constructor(e){super(),n(this,"section_title"),n(this,"body_text"),n(this,"body_header"),Reflect.has(e,"sectionText")&&(this.section_title=f.fromAttributed(e.sectionText)),Reflect.has(e,"bodyText")&&(this.body_text=f.fromAttributed(e.bodyText)),Reflect.has(e,"bodyHeader")&&(this.body_header=f.fromAttributed(e.bodyHeader))}};a(dd,"HowThisWasMadeSectionView");n(dd,"type","HowThisWasMadeSectionView");var mT=dd,_d=class extends m{constructor(e){super(),n(this,"title"),n(this,"items"),n(this,"endpoint"),this.title=new f(e.title),this.items=v.parseArray(e.items),Reflect.has(e,"endpoint")&&(this.endpoint=new y(e.endpoint))}get contents(){return this.items}};a(_d,"ReelShelf");n(_d,"type","ReelShelf");var pd=_d,fd=class extends m{constructor(e){super(),n(this,"title"),n(this,"menu"),n(this,"items"),this.title=e.title,this.menu=v.parseItem(e.actionButton),this.items=v.parseArray(e.items)}get contents(){return this.items}};a(fd,"MerchandiseShelf");n(fd,"type","MerchandiseShelf");var md=fd,vd=class extends m{constructor(e){super(),n(this,"headline"),this.headline=f.fromAttributed(e.headline)}};a(vd,"SectionHeaderView");n(vd,"type","SectionHeaderView");var vT=vd,bd=class extends m{constructor(e){super(),n(this,"header"),this.header=v.parseItem(e.header,vT)}};a(bd,"HypeFanCreditsSectionView");n(bd,"type","HypeFanCreditsSectionView");var bT=bd,gd=class extends m{constructor(e){super(),n(this,"items"),this.items=v.parseArray(e.items,[cT,Z3,ad,uT,pT,tl,tl,$h,pd,fT,mT,Hh,md,bT])}};a(gd,"StructuredDescriptionContent");n(gd,"type","StructuredDescriptionContent");var Tr=gd,yd=class extends m{constructor(e){super(),n(this,"header"),n(this,"content"),n(this,"target_id"),n(this,"panel_identifier"),n(this,"identifier"),n(this,"visibility"),this.header=v.parseItem(e.header,$3),this.content=v.parseItem(e.content,[ca,Ae,Se,z3,Tr,X3,Q3]),this.panel_identifier=e.panelIdentifier,this.identifier=e.identifier?{surface:e.identifier.surface,tag:e.identifier.tag}:void 0,this.target_id=e.targetId,this.visibility=e.visibility}};a(yd,"EngagementPanelSectionList");n(yd,"type","EngagementPanelSectionList");var ua=yd,wd=class extends m{constructor(e){super(),n(this,"content"),n(this,"max_lines"),n(this,"more_endpoint"),n(this,"more_icon_type"),n(this,"more_label"),n(this,"target_id"),this.content=e.content,this.max_lines=e.maxLines,this.more_endpoint=e.moreEndpoint.showEngagementPanelEndpoint?{show_engagement_panel_endpoint:{engagement_panel:v.parseItem(e.moreEndpoint.showEngagementPanelEndpoint.engagementPanel,ua),engagement_panel_popup_type:e.moreEndpoint.showEngagementPanelEndpoint.engagementPanelPresentationConfigs.engagementPanelPopupPresentationConfig.popupType,identifier:{surface:e.moreEndpoint.showEngagementPanelEndpoint.identifier.surface,tag:e.moreEndpoint.showEngagementPanelEndpoint.identifier.tag}}}:new y(e.moreEndpoint),this.more_icon_type=e.moreIcon.iconType,this.more_label=e.moreLabel,this.target_id=e.targetId}};a(wd,"ChannelTagline");n(wd,"type","ChannelTagline");var gT=wd,kd=class extends m{constructor(e){super(),n(this,"states"),n(this,"current_state_id"),n(this,"target_id"),this.states=e.states.map(i=>({id:i.stateId,next_id:i.nextStateId,state:v.parse(i.state)})),this.current_state_id=e.currentStateId,this.target_id=e.targetId}};a(kd,"SubscriptionNotificationToggleButton");n(kd,"type","SubscriptionNotificationToggleButton");var yT=kd,Cd=class extends m{constructor(e){var i,r;super(),n(this,"button_text"),n(this,"subscribed"),n(this,"enabled"),n(this,"item_type"),n(this,"channel_id"),n(this,"show_preferences"),n(this,"subscribed_text"),n(this,"unsubscribed_text"),n(this,"unsubscribe_text"),n(this,"notification_preference_button"),n(this,"service_endpoints"),n(this,"on_subscribe_endpoints"),n(this,"on_unsubscribe_endpoints"),n(this,"subscribed_entity_key"),n(this,"target_id"),n(this,"subscribe_accessibility_label"),n(this,"unsubscribe_accessibility_label"),this.button_text=new f(e.buttonText),this.subscribed=e.subscribed,this.enabled=e.enabled,this.item_type=e.type,this.channel_id=e.channelId,this.show_preferences=e.showPreferences,Reflect.has(e,"subscribedButtonText")&&(this.subscribed_text=new f(e.subscribedButtonText)),Reflect.has(e,"unsubscribedButtonText")&&(this.unsubscribed_text=new f(e.unsubscribedButtonText)),Reflect.has(e,"unsubscribeButtonText")&&(this.unsubscribe_text=new f(e.unsubscribeButtonText)),this.notification_preference_button=v.parseItem(e.notificationPreferenceButton,yT),Reflect.has(e,"serviceEndpoints")&&(this.service_endpoints=e.serviceEndpoints.map(o=>new y(o))),Reflect.has(e,"onSubscribeEndpoints")&&(this.on_subscribe_endpoints=e.onSubscribeEndpoints.map(o=>new y(o))),Reflect.has(e,"onUnsubscribeEndpoints")&&(this.on_unsubscribe_endpoints=e.onUnsubscribeEndpoints.map(o=>new y(o))),Reflect.has(e,"subscribedEntityKey")&&(this.subscribed_entity_key=e.subscribedEntityKey),Reflect.has(e,"targetId")&&(this.target_id=e.targetId),Reflect.has(e,"subscribeAccessibility")&&(this.subscribe_accessibility_label=(i=e.subscribeAccessibility.accessibilityData)==null?void 0:i.label),Reflect.has(e,"unsubscribeAccessibility")&&(this.unsubscribe_accessibility_label=(r=e.unsubscribeAccessibility.accessibilityData)==null?void 0:r.label)}};a(Cd,"SubscribeButton");n(Cd,"type","SubscribeButton");var hi=Cd,Td=class extends m{constructor(e){super(),n(this,"author"),n(this,"banner"),n(this,"tv_banner"),n(this,"mobile_banner"),n(this,"subscribers"),n(this,"videos_count"),n(this,"sponsor_button"),n(this,"subscribe_button"),n(this,"header_links"),n(this,"channel_handle"),n(this,"channel_id"),n(this,"tagline"),this.author=new le({simpleText:e.title,navigationEndpoint:e.navigationEndpoint},e.badges,e.avatar),Reflect.has(e,"banner")&&(this.banner=x.fromResponse(e.banner)),Reflect.has(e,"tv_banner")&&(this.tv_banner=x.fromResponse(e.tvBanner)),Reflect.has(e,"mobile_banner")&&(this.mobile_banner=x.fromResponse(e.mobileBanner)),Reflect.has(e,"subscriberCountText")&&(this.subscribers=new f(e.subscriberCountText)),Reflect.has(e,"videosCountText")&&(this.videos_count=new f(e.videosCountText)),Reflect.has(e,"sponsorButton")&&(this.sponsor_button=v.parseItem(e.sponsorButton,L)),Reflect.has(e,"subscribeButton")&&(this.subscribe_button=v.parseItem(e.subscribeButton,[hi,L])),Reflect.has(e,"headerLinks")&&(this.header_links=v.parseItem(e.headerLinks,[W3,q3])),Reflect.has(e,"channelHandleText")&&(this.channel_handle=new f(e.channelHandleText)),Reflect.has(e,"channelId")&&(this.channel_id=e.channelId),Reflect.has(e,"tagline")&&(this.tagline=v.parseItem(e.tagline,gT))}};a(Td,"C4TabbedHeader");n(Td,"type","C4TabbedHeader");var no=Td,Sd=class extends m{constructor(e){super(),n(this,"label"),n(this,"icon_type"),n(this,"style"),this.label=new f(e.label),this.icon_type=e.icon.iconType,this.style=e.style}};a(Sd,"CallToActionButton");n(Sd,"type","CallToActionButton");var AP=Sd,Id=class extends m{constructor(e){super(),n(this,"teaser"),n(this,"content"),n(this,"card_id"),n(this,"feature"),n(this,"cue_ranges"),this.teaser=v.parseItem(e.teaser),this.content=v.parseItem(e.content),Reflect.has(e,"cardId")&&(this.card_id=e.cardId),Reflect.has(e,"feature")&&(this.feature=e.feature),this.cue_ranges=e.cueRanges.map(i=>({start_card_active_ms:i.startCardActiveMs,end_card_active_ms:i.endCardActiveMs,teaser_duration_ms:i.teaserDurationMs,icon_after_teaser_ms:i.iconAfterTeaserMs}))}};a(Id,"Card");n(Id,"type","Card");var xP=Id,Ed=class extends m{constructor(e){super(),n(this,"cards"),n(this,"header"),n(this,"allow_teaser_dismiss"),this.cards=v.parseArray(e.cards),this.header=new f(e.headerText),this.allow_teaser_dismiss=e.allowTeaserDismiss}};a(Ed,"CardCollection");n(Ed,"type","CardCollection");var wT=Ed,Ad=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parseArray(e.contents)}};a(Ad,"CarouselHeader");n(Ad,"type","CarouselHeader");var kT=Ad,xd=class extends m{constructor(e){super(),n(this,"items"),n(this,"background_color"),n(this,"layout_style"),n(this,"pagination_thumbnails"),n(this,"paginator_alignment"),this.items=v.parseArray(e.carouselItems),this.background_color=e.backgroundColor,this.layout_style=e.layoutStyle,this.pagination_thumbnails=x.fromResponse(e.paginationThumbnails),this.paginator_alignment=e.paginatorAlignment}get contents(){return this.items}};a(xd,"CarouselItem");n(xd,"type","CarouselItem");var PP=xd,Pd=class extends m{constructor(e){super(),n(this,"icon_name"),n(this,"text"),n(this,"on_tap_endpoint"),n(this,"button"),this.icon_name=e.iconName,this.text=f.fromAttributed(e.text),this.on_tap_endpoint=new y(e.onTap),this.button=v.parseItem(e.button,He)}};a(Pd,"TextCarouselItemView");n(Pd,"type","TextCarouselItemView");var CT=Pd,Md=class extends m{constructor(e){super(),n(this,"item_type"),n(this,"carousel_item"),this.item_type=e.itemType,this.carousel_item=v.parseItem(e.carouselItem,CT)}};a(Md,"CarouselItemView");n(Md,"type","CarouselItemView");var TT=Md,Rd=class extends m{constructor(e){super(),n(this,"title"),n(this,"previous_button"),n(this,"next_button"),this.title=e.title,this.previous_button=v.parseItem(e.previousButton,He),this.next_button=v.parseItem(e.nextButton,He)}};a(Rd,"CarouselTitleView");n(Rd,"type","CarouselTitleView");var ST=Rd,Dd=class extends m{constructor(e){super(),n(this,"id"),n(this,"author"),n(this,"subscriber_count"),n(this,"video_count"),n(this,"long_byline"),n(this,"short_byline"),n(this,"endpoint"),n(this,"subscribe_button"),n(this,"description_snippet"),this.id=e.channelId,this.author=new le({...e.title,navigationEndpoint:e.navigationEndpoint},e.ownerBadges,e.thumbnail),this.subscriber_count=new f(e.subscriberCountText),this.video_count=new f(e.videoCountText),this.long_byline=new f(e.longBylineText),this.short_byline=new f(e.shortBylineText),this.endpoint=new y(e.navigationEndpoint),this.subscribe_button=v.parseItem(e.subscribeButton,[hi,L]),this.description_snippet=new f(e.descriptionSnippet)}};a(Dd,"Channel");n(Dd,"type","Channel");var IT=Dd,Bd=class extends m{constructor(e){var i,r;super(),n(this,"id"),n(this,"name"),n(this,"avatar"),n(this,"canonical_channel_url"),n(this,"primary_links"),n(this,"view_count"),n(this,"joined_date"),n(this,"description"),n(this,"email_reveal"),n(this,"can_reveal_email"),n(this,"country"),n(this,"buttons"),this.id=e.channelId,this.name=new f(e.title),this.avatar=x.fromResponse(e.avatar),this.canonical_channel_url=e.canonicalChannelUrl,this.primary_links=(r=(i=e.primaryLinks)==null?void 0:i.map(o=>({endpoint:new y(o.navigationEndpoint),icon:x.fromResponse(o.icon),title:new f(o.title)})))!=null?r:[],this.view_count=new f(e.viewCountText),this.joined_date=new f(e.joinedDateText),this.description=new f(e.description),this.email_reveal=new y(e.onBusinessEmailRevealClickCommand),this.can_reveal_email=!e.signInForBusinessEmail,this.country=new f(e.country),this.buttons=v.parseArray(e.actionButtons,L)}};a(Bd,"ChannelAboutFullMetadata");n(Bd,"type","ChannelAboutFullMetadata");var il=Bd,Ld=class extends m{constructor(e){super(),n(this,"channel_title"),n(this,"avatar"),n(this,"header"),n(this,"main_text"),n(this,"sign_in_button"),n(this,"secondary_text"),this.channel_title=e.channelTitle,this.avatar=x.fromResponse(e.avatar),this.header=new f(e.header),this.main_text=new f(e.mainText),this.sign_in_button=v.parseItem(e.signInButton,L),this.secondary_text=new f(e.secondaryText)}};a(Ld,"ChannelAgeGate");n(Ld,"type","ChannelAgeGate");var MP=Ld,Vd=class extends m{constructor(e){super(),n(this,"title"),n(this,"items"),this.title=new f(e.title),this.items=v.parseArray(e.items)}};a(Vd,"ChannelFeaturedContent");n(Vd,"type","ChannelFeaturedContent");var RP=Vd,Od=class extends m{constructor(e){super(),n(this,"title"),n(this,"description"),n(this,"url"),n(this,"rss_url"),n(this,"vanity_channel_url"),n(this,"external_id"),n(this,"is_family_safe"),n(this,"keywords"),n(this,"avatar"),n(this,"music_artist_name"),n(this,"available_countries"),n(this,"android_deep_link"),n(this,"android_appindexing_link"),n(this,"ios_appindexing_link"),this.title=e.title,this.description=e.description,this.url=e.channelUrl,this.rss_url=e.rssUrl,this.vanity_channel_url=e.vanityChannelUrl,this.external_id=e.externalId,this.is_family_safe=e.isFamilySafe,this.keywords=e.keywords,this.avatar=x.fromResponse(e.avatar),this.music_artist_name=typeof e.musicArtistName=="string"&&e.musicArtistName.length>0?e.musicArtistName:void 0,this.available_countries=e.availableCountryCodes,this.android_deep_link=e.androidDeepLink,this.android_appindexing_link=e.androidAppindexingLink,this.ios_appindexing_link=e.iosAppindexingLink}};a(Od,"ChannelMetadata");n(Od,"type","ChannelMetadata");var ET=Od,Nd=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(Nd,"ChannelMobileHeader");n(Nd,"type","ChannelMobileHeader");var DP=Nd,Fd=class extends m{constructor(e){super(),n(this,"avatar"),n(this,"endpoint"),n(this,"name"),n(this,"links"),this.avatar=x.fromResponse(e.avatar),this.endpoint=new y(e.avatarEndpoint),this.name=e.name,this.links=e.links.map(i=>new f(i))}};a(Fd,"ChannelOptions");n(Fd,"type","ChannelOptions");var AT=Fd,Ud=class extends m{constructor(e){super(),n(this,"illustration"),n(this,"description"),this.illustration=x.fromResponse(e.illustration),this.description=new f(e.description)}};a(Ud,"ChannelOwnerEmptyState");n(Ud,"type","ChannelOwnerEmptyState");var BP=Ud,Hd=class extends m{constructor(e){var i,r,o;super(),n(this,"content_type_sub_menu_items"),n(this,"sort_setting"),this.content_type_sub_menu_items=((o=(r=(i=e.sortSetting)==null?void 0:i.sortFilterSubMenuRenderer)==null?void 0:r.subMenuItems)==null?void 0:o.map(s=>({endpoint:new y(s.navigationEndpoint||s.endpoint),selected:s.selected,title:s.title})))||[],this.sort_setting=v.parseItem(e.sortSetting)}};a(Hd,"ChannelSubMenu");n(Hd,"type","ChannelSubMenu");var nl=Hd,Wd=class extends m{constructor(e){super(),n(this,"title"),n(this,"button"),this.title=new f(e.title).toString(),Reflect.has(e,"button")&&(this.button=v.parseItem(e.button,L))}};a(Wd,"ChannelSwitcherHeader");n(Wd,"type","ChannelSwitcherHeader");var LP=Wd,qd=class extends m{constructor(e){super(),n(this,"thumbnails"),n(this,"endpoint"),n(this,"accessibility"),this.thumbnails=x.fromResponse(e.thumbnail),this.endpoint=new y(e.navigationEndpoint),"accessibility"in e&&"accessibilityData"in e.accessibility&&(this.accessibility={accessibility_data:new zt(e.accessibility.accessibilityData)})}get label(){var e,i;return(i=(e=this.accessibility)==null?void 0:e.accessibility_data)==null?void 0:i.label}};a(qd,"ChannelThumbnailWithLink");n(qd,"type","ChannelThumbnailWithLink");var VP=qd,jd=class extends m{constructor(e){super(),n(this,"id"),n(this,"title"),n(this,"description"),n(this,"view_count"),n(this,"published_time"),this.id=e.videoId,this.title=new f(e.title),this.description=new f(e.description),this.view_count=new f(e.viewCountText),this.published_time=new f(e.publishedTimeText)}};a(jd,"ChannelVideoPlayer");n(jd,"type","ChannelVideoPlayer");var OP=jd,Gd=class extends m{constructor(e){super(),n(this,"title"),n(this,"time_range_start_millis"),n(this,"thumbnail"),this.title=new f(e.title),this.time_range_start_millis=e.timeRangeStartMillis,this.thumbnail=x.fromResponse(e.thumbnail)}};a(Gd,"Chapter");n(Gd,"type","Chapter");var xT=Gd,Kd=class extends m{constructor(e){super(),n(this,"id"),n(this,"title"),n(this,"duration"),n(this,"endpoint"),this.id=e.videoId,this.title=new f(e.title),this.duration={text:e.lengthText.simpleText,seconds:Xt(e.lengthText.simpleText)},this.endpoint=new y(e.navigationEndpoint)}};a(Kd,"ChildVideo");n(Kd,"type","ChildVideo");var NP=Kd,Yd=class extends m{constructor(e){super(),n(this,"accessibility_hint"),n(this,"accessibility_label"),n(this,"text"),n(this,"trailing_text"),n(this,"display_type"),n(this,"max_text_width"),n(this,"secondary_accessibility_label"),n(this,"original_text"),n(this,"tap_command"),n(this,"secondary_tap_command"),n(this,"chip_entity_key"),n(this,"selected"),"accessibilityHint"in e&&(this.accessibility_hint=e.accessibilityHint),"accessibilityLabel"in e&&(this.accessibility_label=e.accessibilityLabel),"chipEntityKey"in e&&(this.chip_entity_key=e.chipEntityKey),"text"in e&&(this.text=e.text),"trailingText"in e&&(this.trailing_text=e.trailingText),"displayType"in e&&(this.display_type=e.displayType),"maxTextWidth"in e&&(this.max_text_width=e.maxTextWidth),"originalText"in e&&(this.original_text=e.originalText),"secondaryAccessibilityLabel"in e&&(this.secondary_accessibility_label=e.secondaryAccessibilityLabel),"tapCommand"in e&&(this.tap_command=new y(e.tapCommand)),"secondaryTapCommand"in e&&(this.secondary_tap_command=new y(e.secondaryTapCommand)),this.selected=!!e.selected}get endpoint(){return this.tap_command}};a(Yd,"ChipView");n(Yd,"type","ChipView");var tt=Yd,zd=class extends m{constructor(e){super(),n(this,"chips"),n(this,"chip_bar_state_entity_key"),n(this,"renderer_context"),this.chips=v.parseArray(e.chips,tt),this.chip_bar_state_entity_key=e.chipBarStateEntityKey,"rendererContext"in e&&(this.renderer_context=new Jt(e.rendererContext))}};a(zd,"ChipBarView");n(zd,"type","ChipBarView");var vo=zd,$d=class extends m{constructor(e){super(),n(this,"is_selected"),n(this,"endpoint"),n(this,"text"),this.is_selected=e.isSelected,Reflect.has(e,"navigationEndpoint")&&(this.endpoint=new y(e.navigationEndpoint)),this.text=new f(e.text).toString()}};a($d,"ChipCloudChip");n($d,"type","ChipCloudChip");var Ke=$d,Jd=class extends m{constructor(e){super(),n(this,"chips"),n(this,"next_button"),n(this,"previous_button"),n(this,"horizontal_scrollable"),this.chips=v.parseArray(e.chips,Ke),this.next_button=v.parseItem(e.nextButton,L),this.previous_button=v.parseItem(e.previousButton,L),this.horizontal_scrollable=e.horizontalScrollable}};a(Jd,"ChipCloud");n(Jd,"type","ChipCloud");var An=Jd,Xd=class extends m{constructor(e){super(),n(this,"text"),n(this,"icon_type"),n(this,"toggled_text"),n(this,"toggled_icon_type"),n(this,"is_toggled"),n(this,"menu_item_identifier"),n(this,"endpoint"),n(this,"logging_directives"),this.text=new f(e.defaultText),this.icon_type=e.defaultIcon.iconType,this.toggled_text=new f(e.toggledText),this.toggled_icon_type=e.toggledIcon.iconType,Reflect.has(e,"isToggled")&&(this.is_toggled=e.isToggled),this.menu_item_identifier=e.menuItemIdentifier,this.endpoint=new y(e.command),Reflect.has(e,"loggingDirectives")&&(this.logging_directives={visibility:{types:e.loggingDirectives.visibility.types},enable_displaylogger_experiment:e.loggingDirectives.enableDisplayloggerExperiment})}};a(Xd,"ClientSideToggleMenuItem");n(Xd,"type","ClientSideToggleMenuItem");var FP=Xd,Qd=class extends m{constructor(e){super(),n(this,"channel_avatar"),n(this,"custom_text"),n(this,"channel_name"),n(this,"subscriber_count"),n(this,"endpoint"),this.channel_avatar=x.fromResponse(e.channelAvatar),this.custom_text=new f(e.customText),this.channel_name=new f(e.channelName),this.subscriber_count=new f(e.subscriberCountText),this.endpoint=new y(e.endpoint)}};a(Qd,"CollaboratorInfoCardContent");n(Qd,"type","CollaboratorInfoCardContent");var UP=Qd,Zd=class extends m{constructor(e){super(),n(this,"left"),n(this,"top_right"),n(this,"bottom_right"),n(this,"endpoint"),this.left=x.fromResponse(e.leftThumbnail),this.top_right=x.fromResponse(e.topRightThumbnail),this.bottom_right=x.fromResponse(e.bottomRightThumbnail),this.endpoint=new y(e.navigationEndpoint)}};a(Zd,"CollageHeroImage");n(Zd,"type","CollageHeroImage");var HP=Zd,e_=class extends m{constructor(e){super(),n(this,"icon_name"),n(this,"text"),n(this,"style"),this.icon_name=e.icon.sources[0].clientResource.imageName,this.text=f.fromAttributed(e.text),this.style=e.style}};a(e_,"ThumbnailHoverOverlayView");n(e_,"type","ThumbnailHoverOverlayView");var PT=e_,t_=class extends m{constructor(e){super(),n(this,"icon_name"),n(this,"text"),n(this,"badge_style"),n(this,"background_color"),this.text=e.text,this.badge_style=e.badgeStyle,e.backgroundColor&&(this.background_color={light_theme:e.backgroundColor.lightTheme,dark_theme:e.backgroundColor.darkTheme}),e.icon&&(this.icon_name=e.icon.sources[0].clientResource.imageName)}};a(t_,"ThumbnailBadgeView");n(t_,"type","ThumbnailBadgeView");var i_=t_,n_=class extends m{constructor(e){super(),n(this,"badges"),n(this,"position"),this.badges=v.parseArray(e.thumbnailBadges,i_),this.position=e.position}};a(n_,"ThumbnailOverlayBadgeView");n(n_,"type","ThumbnailOverlayBadgeView");var MT=n_,s_=class extends m{constructor(e){super(),n(this,"buttons"),this.buttons=v.parseArray(e.buttons,En)}};a(s_,"ThumbnailHoverOverlayToggleActionsView");n(s_,"type","ThumbnailHoverOverlayToggleActionsView");var RT=s_,o_=class extends m{constructor(e){super(),n(this,"start_percent"),this.start_percent=e.startPercent}};a(o_,"ThumbnailOverlayProgressBarView");n(o_,"type","ThumbnailOverlayProgressBarView");var DT=o_,r_=class extends m{constructor(e){super(),n(this,"progress_bar"),n(this,"badges"),this.progress_bar=v.parseItem(e.progressBar,DT),this.badges=v.parseArray(e.badges,i_)}};a(r_,"ThumbnailBottomOverlayView");n(r_,"type","ThumbnailBottomOverlayView");var BT=r_,a_=class extends m{constructor(e){super(),n(this,"image"),n(this,"overlays"),n(this,"background_color"),this.image=x.fromResponse(e.image),this.overlays=v.parseArray(e.overlays,[RT,BT,MT,PT,I3]),"backgroundColor"in e&&(this.background_color={light_theme:e.backgroundColor.lightTheme,dark_theme:e.backgroundColor.darkTheme})}};a(a_,"ThumbnailView");n(a_,"type","ThumbnailView");var l_=a_,c_=class extends m{constructor(e){var i,r;super(),n(this,"primary_thumbnail"),n(this,"stack_color"),this.primary_thumbnail=v.parseItem(e.primaryThumbnail,l_),"stackColor"in e&&(this.stack_color={light_theme:(i=e.stackColor)==null?void 0:i.lightTheme,dark_theme:(r=e.stackColor)==null?void 0:r.darkTheme})}};a(c_,"CollectionThumbnailView");n(c_,"type","CollectionThumbnailView");var LT=c_,u_=class extends m{constructor(e){super(),n(this,"open_miniplayer"),n(this,"video_id"),n(this,"list_type"),n(this,"endpoint"),n(this,"video_ids"),this.open_miniplayer=e.openMiniplayer,this.video_id=e.videoId,this.list_type=e.listType,this.endpoint=new y(e.onCreateListCommand),this.video_ids=e.videoIds}};a(u_,"AddToPlaylistCommand");n(u_,"type","AddToPlaylistCommand");var WP=u_,Dt,h_=class extends m{constructor(e){super(),M(this,Dt),P(this,Dt,e)}getApiPath(){switch(h(this,Dt).request){case"CONTINUATION_REQUEST_TYPE_WATCH_NEXT":return"next";case"CONTINUATION_REQUEST_TYPE_BROWSE":return"browse";case"CONTINUATION_REQUEST_TYPE_SEARCH":return"search";case"CONTINUATION_REQUEST_TYPE_ACCOUNTS_LIST":return"account/accounts_list";case"CONTINUATION_REQUEST_TYPE_COMMENTS_NOTIFICATION_MENU":return"notification/get_notification_menu";case"CONTINUATION_REQUEST_TYPE_COMMENT_REPLIES":return"comment/get_comment_replies";case"CONTINUATION_REQUEST_TYPE_REEL_WATCH_SEQUENCE":return"reel/reel_watch_sequence";case"CONTINUATION_REQUEST_TYPE_GET_PANEL":return"get_panel";default:return""}}buildRequest(){let e={};return h(this,Dt).formData&&(e.formData=h(this,Dt).formData),h(this,Dt).token&&(e.continuation=h(this,Dt).token),h(this,Dt).request==="CONTINUATION_REQUEST_TYPE_COMMENTS_NOTIFICATION_MENU"&&(e.notificationsMenuRequestType="NOTIFICATIONS_MENU_REQUEST_TYPE_COMMENTS",h(this,Dt).token&&(e.fetchCommentsParams={continuation:h(this,Dt).token},delete e.continuation)),e}};Dt=new WeakMap;a(h_,"ContinuationCommand");n(h_,"type","ContinuationCommand");var qP=h_,jP="kids/get_kids_blocklist_picker",Rs,d_=class extends m{constructor(e){super(),M(this,Rs),P(this,Rs,e)}getApiPath(){return jP}buildRequest(){let e={};return h(this,Rs).blockedForKidsContent&&(e.blockedForKidsContent=h(this,Rs).blockedForKidsContent),e}};Rs=new WeakMap;a(d_,"GetKidsBlocklistPickerCommand");n(d_,"type","GetKidsBlocklistPickerCommand");var GP=d_,__=class extends m{constructor(e){super(),n(this,"engagement_type"),n(this,"ids"),this.engagement_type=e.engagementType,Reflect.has(e,"ids")&&(this.ids=e.ids.map(i=>({encrypted_video_id:i.encryptedVideoId,external_channel_id:i.externalChannelId,comment_id:i.commentId,external_owner_id:i.externalOwnerId,artist_id:i.artistId,playlist_id:i.playlistId,external_post_id:i.externalPostId,share_id:i.shareId})))}};a(__,"RunAttestationCommand");n(__,"type","RunAttestationCommand");var VT=__,p_=class extends m{constructor(e){var i;super(),n(this,"inline_content"),n(this,"remove_default_padding"),this.inline_content=v.parseItem((i=e.panelLoadingStrategy)==null?void 0:i.inlineContent),this.remove_default_padding=!!e.removeDefaultPadding}};a(p_,"ShowDialogCommand");n(p_,"type","ShowDialogCommand");var KP=p_,f_=class extends m{constructor(e){var i;super(),n(this,"inline_content"),n(this,"remove_default_padding"),this.inline_content=v.parseItem((i=e.panelLoadingStrategy)==null?void 0:i.inlineContent),this.remove_default_padding=!!e.removeDefaultPadding}};a(f_,"ShowSheetCommand");n(f_,"type","ShowSheetCommand");var bo=f_,m_=class extends m{constructor(e){super(),n(this,"content_source_panel_identifier"),n(this,"target_panel_identifier"),this.content_source_panel_identifier=e.contentSourcePanelIdentifier,this.target_panel_identifier=e.targetPanelIdentifier}};a(m_,"UpdateEngagementPanelContentCommand");n(m_,"type","UpdateEngagementPanelContentCommand");var YP=m_,er,v_=class extends m{constructor(e){super(),M(this,er),n(this,"icon_type"),n(this,"tooltip"),n(this,"style"),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType),this.tooltip=e.iconTooltip,this.tooltip==="Verified"&&(this.style="BADGE_STYLE_TYPE_VERIFIED",e.style="BADGE_STYLE_TYPE_VERIFIED"),P(this,er,e)}get orig_badge(){return h(this,er)}};er=new WeakMap;a(v_,"AuthorCommentBadge");n(v_,"type","AuthorCommentBadge");var zP=v_,b_=class extends m{constructor(e){super(),n(this,"id"),n(this,"categories"),n(this,"category_buttons"),n(this,"search_placeholder"),n(this,"search_no_results"),n(this,"pick_skin_tone"),n(this,"clear_search_label"),n(this,"skin_tone_generic_label"),n(this,"skin_tone_light_label"),n(this,"skin_tone_medium_light_label"),n(this,"skin_tone_medium_label"),n(this,"skin_tone_medium_dark_label"),n(this,"skin_tone_dark_label"),this.id=e.id,this.categories=v.parseArray(e.categories),this.category_buttons=v.parseArray(e.categoryButtons),this.search_placeholder=new f(e.searchPlaceholderText),this.search_no_results=new f(e.searchNoResultsText),this.pick_skin_tone=new f(e.pickSkinToneText),this.clear_search_label=e.clearSearchLabel,this.skin_tone_generic_label=e.skinToneGenericLabel,this.skin_tone_light_label=e.skinToneLightLabel,this.skin_tone_medium_light_label=e.skinToneMediumLightLabel,this.skin_tone_medium_label=e.skinToneMediumLabel,this.skin_tone_medium_dark_label=e.skinToneMediumDarkLabel,this.skin_tone_dark_label=e.skinToneDarkLabel}};a(b_,"EmojiPicker");n(b_,"type","EmojiPicker");var OT=b_,g_=class extends m{constructor(e){super(),n(this,"editable_text"),n(this,"author_thumbnail"),n(this,"submit_button"),n(this,"cancel_button"),n(this,"placeholder"),n(this,"emoji_button"),n(this,"emoji_picker"),this.editable_text=new f(e.editableText),this.author_thumbnail=x.fromResponse(e.authorThumbnail),this.submit_button=v.parseItem(e.submitButton,L),this.cancel_button=v.parseItem(e.cancelButton,L),this.placeholder=new f(e.placeholderText),this.emoji_button=v.parseItem(e.emojiButton,L),this.emoji_picker=v.parseItem(e.emojiPicker,OT)}};a(g_,"CommentDialog");n(g_,"type","CommentDialog");var $P=g_,y_=class extends m{constructor(e){super(),n(this,"contents"),n(this,"view_replies"),n(this,"hide_replies"),n(this,"view_replies_creator_thumbnail"),n(this,"has_channel_owner_replied"),this.contents=v.parseArray(e.contents),this.view_replies=v.parseItem(e.viewReplies,L),this.hide_replies=v.parseItem(e.hideReplies,L),this.view_replies_creator_thumbnail=x.fromResponse(e.viewRepliesCreatorThumbnail),this.has_channel_owner_replied=!!e.viewRepliesCreatorThumbnail}};a(y_,"CommentReplies");n(y_,"type","CommentReplies");var NT=y_,w_=class extends m{constructor(e){super(),n(this,"reply_button"),n(this,"cancel_button"),n(this,"author_thumbnail"),n(this,"placeholder"),n(this,"error_message"),this.reply_button=v.parseItem(e.replyButton,L),this.cancel_button=v.parseItem(e.cancelButton,L),this.author_thumbnail=x.fromResponse(e.authorThumbnail),this.placeholder=new f(e.placeholderText),this.error_message=new f(e.errorMessage)}};a(w_,"CommentReplyDialog");n(w_,"type","CommentReplyDialog");var FT=w_,k_=class extends m{constructor(e){super(),n(this,"simplebox_avatar"),n(this,"simplebox_placeholder"),this.simplebox_avatar=x.fromResponse(e.simpleboxAvatar),this.simplebox_placeholder=new f(e.simpleboxPlaceholder)}};a(k_,"CommentsSimplebox");n(k_,"type","CommentsSimplebox");var UT=k_,C_=class extends m{constructor(e){super(),n(this,"teaser_avatar"),n(this,"teaser_content"),Reflect.has(e,"teaserAvatar")&&(this.teaser_avatar=x.fromResponse(e.teaserAvatar)),Reflect.has(e,"teaserContent")&&(this.teaser_content=new f(e.teaserContent))}};a(C_,"CommentsEntryPointTeaser");n(C_,"type","CommentsEntryPointTeaser");var HT=C_,T_=class extends m{constructor(e){super(),n(this,"header"),n(this,"comment_count"),n(this,"teaser_avatar"),n(this,"teaser_content"),n(this,"content_renderer"),n(this,"simplebox_placeholder"),Reflect.has(e,"headerText")&&(this.header=new f(e.headerText)),Reflect.has(e,"commentCount")&&(this.comment_count=new f(e.commentCount)),(Reflect.has(e,"teaserAvatar")||Reflect.has(e,"simpleboxAvatar"))&&(this.teaser_avatar=x.fromResponse(e.teaserAvatar||e.simpleboxAvatar)),Reflect.has(e,"teaserContent")&&(this.teaser_content=new f(e.teaserContent)),Reflect.has(e,"contentRenderer")&&(this.content_renderer=v.parseItem(e.contentRenderer,[HT,UT])),Reflect.has(e,"simpleboxPlaceholder")&&(this.simplebox_placeholder=new f(e.simpleboxPlaceholder))}};a(T_,"CommentsEntryPointHeader");n(T_,"type","CommentsEntryPointHeader");var WT=T_,S_=class extends m{constructor(e){super(),n(this,"title"),n(this,"count"),n(this,"comments_count"),n(this,"create_renderer"),n(this,"sort_menu"),n(this,"custom_emojis"),this.title=new f(e.titleText),this.count=new f(e.countText),this.comments_count=new f(e.commentsCount),this.create_renderer=v.parseItem(e.createRenderer),this.sort_menu=v.parseItem(e.sortMenu,hs),Reflect.has(e,"customEmojis")&&(this.custom_emojis=e.customEmojis.map(i=>({emoji_id:i.emojiId,shortcuts:i.shortcuts,search_terms:i.searchTerms,image:x.fromResponse(i.image),is_custom_emoji:i.isCustomEmoji})))}};a(S_,"CommentsHeader");n(S_,"type","CommentsHeader");var ha=S_,I_=class extends m{constructor(e){super(),n(this,"submit_button"),n(this,"cancel_button"),n(this,"author_thumbnail"),n(this,"placeholder"),n(this,"avatar_size"),this.submit_button=v.parseItem(e.submitButton,L),this.cancel_button=v.parseItem(e.cancelButton,L),this.author_thumbnail=x.fromResponse(e.authorThumbnail),this.placeholder=new f(e.placeholderText),this.avatar_size=e.avatarSize}};a(I_,"CommentSimplebox");n(I_,"type","CommentSimplebox");var qT=I_,E_=class extends m{constructor(e){super(),n(this,"voice_reply_unavailable_text"),n(this,"transcript_text"),this.voice_reply_unavailable_text=f.fromAttributed(e.voiceReplyUnavailableText),this.transcript_text=f.fromAttributed(e.transcriptText)}};a(E_,"VoiceReplyContainerView");n(E_,"type","VoiceReplyContainerView");var jT=E_,rt,A_=class extends m{constructor(e){super(),M(this,rt),n(this,"like_command"),n(this,"dislike_command"),n(this,"unlike_command"),n(this,"undislike_command"),n(this,"reply_command"),n(this,"prepare_account_command"),n(this,"comment_id"),n(this,"is_pinned"),n(this,"keys"),n(this,"content"),n(this,"published_time"),n(this,"author_is_channel_owner"),n(this,"creator_thumbnail_url"),n(this,"like_button_a11y"),n(this,"like_count"),n(this,"like_count_liked"),n(this,"like_count_a11y"),n(this,"like_active_tooltip"),n(this,"like_inactive_tooltip"),n(this,"dislike_active_tooltip"),n(this,"dislike_inactive_tooltip"),n(this,"heart_active_tooltip"),n(this,"reply_count"),n(this,"reply_count_a11y"),n(this,"is_member"),n(this,"member_badge"),n(this,"author"),n(this,"is_liked"),n(this,"is_disliked"),n(this,"is_hearted"),n(this,"voice_reply_container"),this.comment_id=e.commentId,this.is_pinned=!!e.pinnedText,this.keys={comment:e.commentKey,comment_surface:e.commentSurfaceKey,toolbar_state:e.toolbarStateKey,toolbar_surface:e.toolbarSurfaceKey,shared:e.sharedKey}}applyMutations(e,i,r,o){e&&(this.content=f.fromAttributed(e.properties.content),this.published_time=e.properties.publishedTime,this.author_is_channel_owner=!!e.author.isCreator,this.creator_thumbnail_url=e.toolbar.creatorThumbnailUrl,this.like_count=e.toolbar.likeCountNotliked?e.toolbar.likeCountNotliked:"0",this.like_count_liked=e.toolbar.likeCountLiked?e.toolbar.likeCountLiked:"0",this.like_count_a11y=e.toolbar.likeCountA11y,this.like_active_tooltip=e.toolbar.likeActiveTooltip,this.like_inactive_tooltip=e.toolbar.likeInactiveTooltip,this.dislike_active_tooltip=e.toolbar.dislikeActiveTooltip,this.dislike_inactive_tooltip=e.toolbar.dislikeInactiveTooltip,this.like_button_a11y=e.toolbar.likeButtonA11y,this.heart_active_tooltip=e.toolbar.heartActiveTooltip,this.reply_count_a11y=e.toolbar.replyCountA11y,this.reply_count=e.toolbar.replyCount?e.toolbar.replyCount:"0",this.is_member=!!e.author.sponsorBadgeUrl,Reflect.has(e.author,"sponsorBadgeUrl")&&(this.member_badge={url:e.author.sponsorBadgeUrl,a11y:e.author.A11y}),this.author=new le({simpleText:e.author.displayName,navigationEndpoint:e.avatar.endpoint},e.author,e.avatar.image,e.author.channelId)),i&&(this.is_hearted=i.heartState==="TOOLBAR_HEART_STATE_HEARTED",this.is_liked=i.likeState==="TOOLBAR_LIKE_STATE_LIKED",this.is_disliked=i.likeState==="TOOLBAR_LIKE_STATE_DISLIKED"),r&&("prepareAccountCommand"in r?this.prepare_account_command=new y(r.prepareAccountCommand):(this.like_command=new y(r.likeCommand),this.dislike_command=new y(r.dislikeCommand),this.unlike_command=new y(r.unlikeCommand),this.undislike_command=new y(r.undislikeCommand),this.reply_command=new y(r.replyCommand))),o&&"voiceReplyContainerViewModel"in o&&(this.voice_reply_container=v.parseItem(o.voiceReplyContainerViewModel,jT))}async like(){if(!h(this,rt))throw new w("Actions instance not set for this comment.");if(!this.like_command)throw new w("Like command not found.");if(this.is_liked)throw new w("This comment is already liked.",{comment_id:this.comment_id});return this.like_command.call(h(this,rt))}async dislike(){if(!h(this,rt))throw new w("Actions instance not set for this comment.");if(!this.dislike_command)throw new w("Dislike command not found.");if(this.is_disliked)throw new w("This comment is already disliked.",{comment_id:this.comment_id});return this.dislike_command.call(h(this,rt))}async unlike(){if(!h(this,rt))throw new w("Actions instance not set for this comment.");if(!this.unlike_command)throw new w("Unlike command not found.");if(!this.is_liked)throw new w("This comment is not liked.",{comment_id:this.comment_id});return this.unlike_command.call(h(this,rt))}async undislike(){if(!h(this,rt))throw new w("Actions instance not set for this comment.");if(!this.undislike_command)throw new w("Undislike command not found.");if(!this.is_disliked)throw new w("This comment is not disliked.",{comment_id:this.comment_id});return this.undislike_command.call(h(this,rt))}async reply(e){var i;if(!h(this,rt))throw new w("Actions instance not set for this comment.");if(!this.reply_command)throw new w("Reply command not found.");let r=(i=this.reply_command.dialog)==null?void 0:i.as(FT);if(!r)throw new w("Reply dialog not found.");let o=r.reply_button;if(!o)throw new w("Reply button not found in the dialog.");if(!o.endpoint)throw new w("Reply button endpoint not found.");return o.endpoint.call(h(this,rt),{commentText:e})}async translate(e){var i,r,o,s,l,c;if(!h(this,rt))throw new w("Actions instance not set for this comment.");if(!this.content)throw new w("Comment content not found.",{comment_id:this.comment_id});let d={text:this.content.toString().replace(/[^\p{L}\p{N}\p{P}\p{Z}]/gu,""),target_language:e},p=Hr(22,d),_=await h(this,rt).execute("comment/perform_comment_action",{action:p}),b=(r=(i=_.data.frameworkUpdates)==null?void 0:i.entityBatchUpdate)==null?void 0:r.mutations,g=(c=(l=(s=(o=b?.[0])==null?void 0:o.payload)==null?void 0:s.commentEntityPayload)==null?void 0:l.translatedContent)==null?void 0:c.content;return{..._,content:g}}setActions(e){P(this,rt,e)}};rt=new WeakMap;a(A_,"CommentView");n(A_,"type","CommentView");var da=A_,Wi,sn,tr,sl,x_=class extends m{constructor(e){super(),M(this,tr),n(this,"comment"),n(this,"replies"),n(this,"comment_replies_data"),n(this,"is_moderated_elq_comment"),n(this,"has_replies"),M(this,Wi),M(this,sn),this.comment=v.parseItem(e.commentViewModel,da),this.comment_replies_data=v.parseItem(e.replies,NT),this.is_moderated_elq_comment=e.isModeratedElqComment,this.has_replies=!!this.comment_replies_data}get has_continuation(){if(!this.replies)throw new w("Cannot determine if there is a continuation because this thread's replies have not been loaded.");return!!h(this,sn)}async getReplies(){var e;if(!h(this,Wi))throw new w("Actions instance not set for this thread.");if(!this.comment_replies_data)throw new w("This comment has no replies.",this);let i=(e=this.comment_replies_data.contents)==null?void 0:e.firstOfType(Se);if(!i)throw new w("Replies continuation not found.");let r=await i.endpoint.call(h(this,Wi),{parse:!0});if(!r.on_response_received_endpoints_memo)throw new w("Unexpected response.",r);return this.replies=F(this,tr,sl).call(this,r.on_response_received_endpoints_memo),P(this,sn,r.on_response_received_endpoints_memo.getType(Se)[0]),this}async getContinuation(){var e;if(!this.replies)throw new w("Cannot retrieve continuation because this thread's replies have not been loaded.");if(!h(this,sn))throw new w("Continuation not found.");if(!h(this,Wi))throw new w("Actions instance not set for this thread.");let i=(e=h(this,sn).button)==null?void 0:e.as(L);if(!i)throw new w('"Load more" button not found.');let r=await i.endpoint.call(h(this,Wi),{parse:!0});if(!r.on_response_received_endpoints_memo)throw new w("Unexpected response.",r);return this.replies=F(this,tr,sl).call(this,r.on_response_received_endpoints_memo),P(this,sn,r.on_response_received_endpoints_memo.getType(Se)[0]),this}setActions(e){P(this,Wi,e)}};Wi=new WeakMap;sn=new WeakMap;tr=new WeakSet;sl=a(function(t){return te(t.getType(da).map(e=>(e.setActions(h(this,Wi)),e)))},"#getPatchedReplies");a(x_,"CommentThread");n(x_,"type","CommentThread");var GT=x_,P_=class extends m{constructor(e){var i,r;super(),n(this,"text"),n(this,"color_pallette"),n(this,"icon_type"),this.text=new f(e.chipText),this.color_pallette={background_color:(i=e.chipColorPalette)==null?void 0:i.backgroundColor,foreground_title_color:(r=e.chipColorPalette)==null?void 0:r.foregroundTitleColor},Reflect.has(e,"chipIcon")&&Reflect.has(e.chipIcon,"iconType")&&(this.icon_type=e.chipIcon.iconType)}};a(P_,"PdgCommentChip");n(P_,"type","PdgCommentChip");var JP=P_,M_=class extends m{constructor(e){super(),n(this,"custom_badge"),n(this,"tooltip"),this.custom_badge=x.fromResponse(e.customBadge),this.tooltip=e.tooltip}};a(M_,"SponsorCommentBadge");n(M_,"type","SponsorCommentBadge");var XP=M_,R_=class extends m{constructor(e){super(),n(this,"title"),n(this,"channel_id"),n(this,"thumbnail"),n(this,"display_name"),n(this,"video_count"),n(this,"subscriber_count"),n(this,"endpoint"),n(this,"tv_banner"),n(this,"menu"),this.title=new f(e.title),this.channel_id=e.channelId,this.thumbnail=x.fromResponse(e.thumbnail),this.display_name=new f(e.displayName),this.video_count=new f(e.videoCountText),this.subscriber_count=new f(e.subscriberCountText),this.endpoint=new y(e.navigationEndpoint),this.tv_banner=x.fromResponse(e.tvBanner),this.menu=v.parseItem(e.menu,ye)}};a(R_,"CompactChannel");n(R_,"type","CompactChannel");var QP=R_,D_=class extends m{constructor(e){super(),n(this,"thumbnail"),this.thumbnail=x.fromResponse(e.thumbnail)}};a(D_,"PlaylistCustomThumbnail");n(D_,"type","PlaylistCustomThumbnail");var B_=D_,L_=class extends m{constructor(e){super(),n(this,"thumbnail"),this.thumbnail=x.fromResponse(e.thumbnail)}};a(L_,"PlaylistVideoThumbnail");n(L_,"type","PlaylistVideoThumbnail");var V_=L_,O_=class extends m{constructor(e){var i;super(),n(this,"id"),n(this,"title"),n(this,"author"),n(this,"thumbnails"),n(this,"thumbnail_renderer"),n(this,"video_count"),n(this,"video_count_short"),n(this,"first_videos"),n(this,"share_url"),n(this,"menu"),n(this,"badges"),n(this,"endpoint"),n(this,"thumbnail_overlays"),n(this,"view_playlist"),this.id=e.playlistId,this.title=new f(e.title),this.author=(i=e.shortBylineText)!=null&&i.simpleText?new f(e.shortBylineText):new le(e.longBylineText,e.ownerBadges,null),this.thumbnails=x.fromResponse(e.thumbnail||{thumbnails:e.thumbnails.map(r=>r.thumbnails).flat(1)}),this.video_count=new f(e.thumbnailText),this.video_count_short=new f(e.videoCountShortText),this.first_videos=v.parseArray(e.videos),this.share_url=e.shareUrl||null,this.menu=v.parseItem(e.menu),this.badges=v.parseArray(e.ownerBadges),this.endpoint=new y(e.navigationEndpoint),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),Reflect.has(e,"thumbnailRenderer")&&(this.thumbnail_renderer=v.parseItem(e.thumbnailRenderer,[V_,B_])||void 0),Reflect.has(e,"viewPlaylistText")&&(this.view_playlist=new f(e.viewPlaylistText))}};a(O_,"Playlist");n(O_,"type","Playlist");var Ro=O_,N_=class extends Ro{constructor(e){super(e)}};a(N_,"CompactMix");n(N_,"type","CompactMix");var ZP=N_,F_=class extends m{constructor(e){var i;super(),n(this,"id"),n(this,"title"),n(this,"top_metadata_items"),n(this,"thumbnails"),n(this,"thumbnail_overlays"),n(this,"author"),n(this,"duration"),n(this,"endpoint"),n(this,"badges"),n(this,"use_vertical_poster"),n(this,"menu");let r=((i=e.thumbnailOverlays.find(s=>s.thumbnailOverlayTimeStatusRenderer))==null?void 0:i.thumbnailOverlayTimeStatusRenderer.text)||"N/A";this.id=e.videoId,this.title=new f(e.title),this.top_metadata_items=new f(e.topMetadataItems),this.thumbnails=x.fromResponse(e.thumbnail),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),this.author=new le(e.shortBylineText);let o=e.lengthText?new f(e.lengthText).toString():new f(r).toString();this.duration={text:o,seconds:Xt(o)},this.endpoint=new y(e.navigationEndpoint),this.badges=v.parseArray(e.badges),this.use_vertical_poster=e.useVerticalPoster,this.menu=v.parseItem(e.menu,ye)}};a(F_,"CompactMovie");n(F_,"type","CompactMovie");var e8=F_,U_=class extends Ro{constructor(e){super(e)}};a(U_,"CompactPlaylist");n(U_,"type","CompactPlaylist");var t8=U_,i8=t8,H_=class extends m{constructor(e){super(),n(this,"title"),n(this,"description"),n(this,"video_count"),n(this,"endpoint"),n(this,"thumbnail"),this.title=new f(e.title),this.description=new f(e.description),this.video_count=new f(e.videoCountText),this.endpoint=new y(e.navigationEndpoint),this.thumbnail=x.fromResponse(e.thumbnail)}};a(H_,"CompactStation");n(H_,"type","CompactStation");var n8=H_,W_=class extends m{constructor(e){super()}};a(W_,"CompositeVideoPrimaryInfo");n(W_,"type","CompositeVideoPrimaryInfo");var s8=W_,q_=class extends m{constructor(e){super(),n(this,"title"),n(this,"confirm_button"),n(this,"cancel_button"),n(this,"dialog_messages"),this.title=new f(e.title),this.confirm_button=v.parseItem(e.confirmButton,L),this.cancel_button=v.parseItem(e.cancelButton,L),this.dialog_messages=e.dialogMessages.map(i=>new f(i))}};a(q_,"ConfirmDialog");n(q_,"type","ConfirmDialog");var o8=q_,j_=class extends m{constructor(e){var i;super(),n(this,"metadata_rows"),n(this,"delimiter"),this.metadata_rows=((i=e.metadataRows)==null?void 0:i.map(r=>{var o;return{metadata_parts:(o=r.metadataParts)==null?void 0:o.map(s=>({text:s.text?f.fromAttributed(s.text):null,avatar_stack:v.parseItem(s.avatarStack,Lu),enable_truncation:e.enableTruncation})),badges:v.parseArray(r.badges,ch)}}))||[],this.delimiter=e.delimiter}};a(j_,"ContentMetadataView");n(j_,"type","ContentMetadataView");var G_=j_,K_=class extends m{constructor(e){super(),n(this,"trigger"),n(this,"endpoint"),this.trigger=e.trigger,this.endpoint=new y(e.continuationCommand)}};a(K_,"ContinuationItemView");n(K_,"type","ContinuationItemView");var ns=K_,Y_=class extends m{constructor(e){super(),n(this,"text"),this.text=new f(e.text)}};a(Y_,"Message");n(Y_,"type","Message");var ui=Y_,z_=class extends m{constructor(e){super(),n(this,"availability_message"),this.availability_message=v.parseItem(e.availabilityMessage,ui)}};a(z_,"ConversationBar");n(z_,"type","ConversationBar");var r8=z_,$_=class extends m{constructor(e){super(),n(this,"copy_button"),n(this,"short_url"),n(this,"style"),this.copy_button=v.parseItem(e.copyButton,L),this.short_url=e.shortUrl,this.style=e.style}};a($_,"CopyLink");n($_,"type","CopyLink");var J_=$_,X_=class extends m{constructor(e){super(),n(this,"label"),n(this,"placeholder_text"),n(this,"disabled"),n(this,"options"),n(this,"dropdown_type"),n(this,"id"),this.label=new f(e.label),this.placeholder_text=new f(e.placeholderText),this.disabled=!!e.disabled,this.dropdown_type=e.type,this.id=e.id,Reflect.has(e,"options")&&(this.options=e.options.map(i=>{var r;return{title:new f(i.title),subtitle:new f(i.subtitle),leading_image:x.fromResponse(i.leadingImage),value:{privacy_status_value:(r=i.value)==null?void 0:r.privacyStatusValue},on_tap:new y(i.onTap),is_selected:!!i.isSelected}}))}};a(X_,"DropdownView");n(X_,"type","DropdownView");var KT=X_,Q_=class extends m{constructor(e){super(),n(this,"display_properties"),n(this,"content_properties"),n(this,"initial_state"),n(this,"form_field_metadata"),Reflect.has(e,"displayProperties")&&(this.display_properties={isMultiline:!!e.displayProperties.isMultiline,disableNewLines:!!e.displayProperties.disableNewLines}),Reflect.has(e,"contentProperties")&&(this.content_properties={labelText:e.contentProperties.labelText,placeholderText:e.contentProperties.placeholderText,maxCharacterCount:e.contentProperties.maxCharacterCount}),Reflect.has(e,"initialState")&&(this.initial_state={isFocused:!!e.initialState.isFocused}),Reflect.has(e,"formFieldMetadata")&&(this.form_field_metadata={formId:e.formFieldMetadata.formId,fieldId:e.formFieldMetadata.fieldId})}};a(Q_,"TextFieldView");n(Q_,"type","TextFieldView");var YT=Q_,Z_=class extends m{constructor(e){super(),n(this,"playlist_title"),n(this,"playlist_visibility"),n(this,"disable_playlist_collaborate"),n(this,"create_playlist_params_collaboration_enabled"),n(this,"create_playlist_params_collaboration_disabled"),n(this,"video_ids"),this.playlist_title=v.parseItem(e.playlistTitle,YT),this.playlist_visibility=v.parseItem(e.playlistVisibility,KT),this.disable_playlist_collaborate=!!e.disablePlaylistCollaborate,this.create_playlist_params_collaboration_enabled=e.createPlaylistParamsCollaborationEnabled,this.create_playlist_params_collaboration_disabled=e.createPlaylistParamsCollaborationDisabled,this.video_ids=e.videoIds}};a(Z_,"CreatePlaylistDialogFormView");n(Z_,"type","CreatePlaylistDialogFormView");var zT=Z_,ep=class extends m{constructor(e){super(),n(this,"avatar"),n(this,"a11y_label"),n(this,"renderer_context"),this.avatar=v.parseItem(e.avatar,ra),this.a11y_label=e.a11yLabel,this.renderer_context=new Jt(e.rendererContext)}};a(ep,"DecoratedAvatarView");n(ep,"type","DecoratedAvatarView");var tp=ep,ip=class extends m{constructor(e){super(),n(this,"time_range_start_millis"),n(this,"marker_duration_millis"),n(this,"heat_marker_intensity_score_normalized"),this.time_range_start_millis=Number.parseInt(e.startMillis,10),this.marker_duration_millis=Number.parseInt(e.durationMillis,10),this.heat_marker_intensity_score_normalized=e.intensityScoreNormalized}};a(ip,"HeatMarker");n(ip,"type","HeatMarker");var np=ip,sp=class extends m{constructor(e){super(),n(this,"visible_time_range_start_millis"),n(this,"visible_time_range_end_millis"),n(this,"decoration_time_millis"),n(this,"label"),n(this,"icon"),this.visible_time_range_start_millis=e.visibleTimeRangeStartMillis,this.visible_time_range_end_millis=e.visibleTimeRangeEndMillis,this.decoration_time_millis=e.decorationTimeMillis,this.label=new f(e.label),this.icon=e.icon}};a(sp,"TimedMarkerDecoration");n(sp,"type","TimedMarkerDecoration");var op=sp,rp=class extends m{constructor(e){super(),n(this,"max_height_dp"),n(this,"min_height_dp"),n(this,"show_hide_animation_duration_millis"),n(this,"heat_markers"),n(this,"heat_markers_decorations"),this.max_height_dp=e.maxHeightDp,this.min_height_dp=e.minHeightDp,this.show_hide_animation_duration_millis=e.showHideAnimationDurationMillis,this.heat_markers=v.parseArray(e.heatMarkers,np),this.heat_markers_decorations=v.parseArray(e.heatMarkersDecorations,op)}};a(rp,"Heatmap");n(rp,"type","Heatmap");var ap=rp,lp=class extends m{constructor(e){super(),n(this,"marker_key"),n(this,"value"),this.marker_key=e.key,this.value={},Reflect.has(e,"value")&&(Reflect.has(e.value,"heatmap")&&(this.value.heatmap=v.parseItem(e.value.heatmap,ap)),Reflect.has(e.value,"chapters")&&(this.value.chapters=v.parseArray(e.value.chapters,xT)))}};a(lp,"Marker");n(lp,"type","Marker");var a8=lp,cp=class extends m{constructor(e){var i;super(),n(this,"markers_map"),this.markers_map=te(((i=e.markersMap)==null?void 0:i.map(r=>new a8(r)))||[])}};a(cp,"MultiMarkersPlayerBar");n(cp,"type","MultiMarkersPlayerBar");var $T=cp,up=class extends m{constructor(e){super(),n(this,"player_bar"),n(this,"player_bar_action_button"),this.player_bar=v.parseItem(e.playerBar,$T),this.player_bar_action_button=v.parseItem(e.playerBarActionButton,L)}};a(up,"DecoratedPlayerBar");n(up,"type","DecoratedPlayerBar");var JT=up,hp=class extends m{constructor(e){super(),n(this,"title"),n(this,"description"),n(this,"endpoint"),n(this,"large_form_factor_background_thumbnail"),n(this,"small_form_factor_background_thumbnail"),n(this,"scrim_color_values"),n(this,"min_panel_display_duration_ms"),n(this,"min_video_play_duration_ms"),n(this,"scrim_duration"),n(this,"metadata_order"),n(this,"panel_layout"),this.title=new f(e.title),this.description=new f(e.description),this.endpoint=new y(e.navigationEndpoint),this.large_form_factor_background_thumbnail=v.parseItem(e.largeFormFactorBackgroundThumbnail),this.small_form_factor_background_thumbnail=v.parseItem(e.smallFormFactorBackgroundThumbnail),this.scrim_color_values=e.scrimColorValues,this.min_panel_display_duration_ms=e.minPanelDisplayDurationMs,this.min_video_play_duration_ms=e.minVideoPlayDurationMs,this.scrim_duration=e.scrimDuration,this.metadata_order=e.metadataOrder,this.panel_layout=e.panelLayout}};a(hp,"DefaultPromoPanel");n(hp,"type","DefaultPromoPanel");var l8=hp,dp=class extends m{constructor(e){var i,r,o,s,l,c;if(super(),n(this,"description"),n(this,"max_lines"),n(this,"truncation_text"),n(this,"always_show_truncation_text"),n(this,"more_endpoint"),n(this,"renderer_context"),"description"in e&&(this.description=f.fromAttributed(e.description)),"maxLines"in e&&(this.max_lines=parseInt(e.maxLines)),"truncationText"in e&&(this.truncation_text=f.fromAttributed(e.truncationText)),this.always_show_truncation_text=!!e.alwaysShowTruncationText,(o=(r=(i=e.rendererContext.commandContext)==null?void 0:i.onTap)==null?void 0:r.innertubeCommand)!=null&&o.showEngagementPanelEndpoint){let u=(c=(l=(s=e.rendererContext.commandContext)==null?void 0:s.onTap)==null?void 0:l.innertubeCommand)==null?void 0:c.showEngagementPanelEndpoint;this.more_endpoint={show_engagement_panel_endpoint:{engagement_panel:v.parseItem(u.engagementPanel,ua),engagement_panel_popup_type:u.engagementPanelPresentationConfigs.engagementPanelPopupPresentationConfig.popupType,identifier:{surface:u.identifier.surface,tag:u.identifier.tag}}}}this.renderer_context=new Jt(e.rendererContext)}};a(dp,"DescriptionPreviewView");n(dp,"type","DescriptionPreviewView");var XT=dp,_p=class extends m{constructor(e){super(),n(this,"headline"),this.headline=f.fromAttributed(e.headline)}};a(_p,"DialogHeaderView");n(_p,"type","DialogHeaderView");var QT=_p,pp=class extends m{constructor(e){super(),n(this,"primary_button"),n(this,"secondary_button"),n(this,"should_hide_divider"),this.primary_button=v.parseItem(e.primaryButton,He),this.secondary_button=v.parseItem(e.secondaryButton,He),this.should_hide_divider=!!e.shouldHideDivider}};a(pp,"PanelFooterView");n(pp,"type","PanelFooterView");var fp=pp,mp=class extends m{constructor(e){super(),n(this,"panel_footer"),n(this,"form_id"),n(this,"container_type"),this.panel_footer=v.parseItem(e.panelFooter,fp),this.form_id=e.formId,this.container_type=e.containerType}};a(mp,"FormFooterView");n(mp,"type","FormFooterView");var ZT=mp,vp=class extends m{constructor(e){super(),n(this,"renderer_context"),"rendererContext"in e&&(this.renderer_context=new Jt(e.rendererContext))}};a(vp,"DownloadListItemView");n(vp,"type","DownloadListItemView");var eS=vp,bp=class extends m{constructor(e){super(),n(this,"items"),n(this,"renderer_context"),this.items=v.parseArray(e.listItems,[At,eS]),"rendererContext"in e&&(this.renderer_context=new Jt(e.rendererContext))}};a(bp,"ListView");n(bp,"type","ListView");var _s=bp,gp=class extends m{constructor(e){super(),n(this,"header"),n(this,"footer"),n(this,"custom_content"),this.header=v.parseItem(e.header,QT),this.footer=v.parseItem(e.footer,[ZT,fp]),this.custom_content=v.parseItem(e.customContent,[zT,_s])}};a(gp,"DialogView");n(gp,"type","DialogView");var c8=gp,yp=class extends m{constructor(e){super(),n(this,"text"),n(this,"corrected_query"),n(this,"endpoint"),this.text=new f(e.didYouMean).toString(),this.corrected_query=new f(e.correctedQuery),this.endpoint=new y(e.navigationEndpoint||e.correctedQueryEndpoint)}};a(yp,"DidYouMean");n(yp,"type","DidYouMean");var tS=yp,wp=class extends m{constructor(e){super(),n(this,"title"),n(this,"subtitle"),this.title=new f(e.title),this.subtitle=new f(e.subtitle)}};a(wp,"DismissableDialogContentSection");n(wp,"type","DismissableDialogContentSection");var iS=wp,kp=class extends m{constructor(e){super(),n(this,"title"),n(this,"sections"),n(this,"metadata"),n(this,"display_style"),this.title=e.title,this.sections=v.parseArray(e.sections,iS),this.metadata=v.parseItem(e.metadata),this.display_style=e.displayStyle}};a(kp,"DismissableDialog");n(kp,"type","DismissableDialog");var u8=kp,Cp=class extends m{constructor(e){super(),n(this,"text"),n(this,"max_lines"),this.text=f.fromAttributed(e.text),this.max_lines=parseInt(e.maxLines)}};a(Cp,"DynamicTextView");n(Cp,"type","DynamicTextView");var nS=Cp,Tp=class sS extends m{constructor(e){var i;super(),n(this,"text"),n(this,"properties"),n(this,"child_elements"),Reflect.has(e,"type")&&Reflect.has(e.type,"textType")&&(this.text=(i=e.type.textType.text)==null?void 0:i.content),this.properties=e.properties,Reflect.has(e,"childElements")&&(this.child_elements=e.childElements.map(r=>new sS(r)))}};a(Tp,"ChildElement");n(Tp,"type","ChildElement");var oS=Tp,Sp=class rS extends m{constructor(e){var i;if(super(),n(this,"model"),n(this,"child_elements"),Reflect.has(e,"elementRenderer"))return v.parseItem(e,rS);let r=e.newElement.type.componentType;this.model=v.parseItem(r?.model),Reflect.has(e,"newElement")&&Reflect.has(e.newElement,"childElements")&&(this.child_elements=te(((i=e.newElement.childElements)==null?void 0:i.map(o=>new oS(o)))||[]))}};a(Sp,"Element");n(Sp,"type","Element");var aS=Sp,Ip=class extends m{constructor(e){super(),n(this,"title"),n(this,"first_option"),n(this,"menu"),this.title=new f(e.title),this.first_option=v.parseItem(e.firstOption),this.menu=v.parseItem(e.menu,ye)}};a(Ip,"EmergencyOnebox");n(Ip,"type","EmergencyOnebox");var h8=Ip,Ep=class extends m{constructor(e){super(),n(this,"category_id"),n(this,"title"),n(this,"emoji_ids"),n(this,"image_loading_lazy"),n(this,"category_type"),this.category_id=e.categoryId,this.title=new f(e.title),this.emoji_ids=e.emojiIds,this.image_loading_lazy=!!e.imageLoadingLazy,this.category_type=e.categoryType}};a(Ep,"EmojiPickerCategory");n(Ep,"type","EmojiPickerCategory");var d8=Ep,Ap=class extends m{constructor(e){var i;super(),n(this,"category_id"),n(this,"icon_type"),n(this,"tooltip"),this.category_id=e.categoryId,Reflect.has(e,"icon")&&(this.icon_type=(i=e.icon)==null?void 0:i.iconType),this.tooltip=e.tooltip}};a(Ap,"EmojiPickerCategoryButton");n(Ap,"type","EmojiPickerCategoryButton");var _8=Ap,xp=class extends m{constructor(e){super(),n(this,"category_id"),n(this,"title"),n(this,"upsell"),n(this,"emoji_tooltip"),n(this,"endpoint"),n(this,"emoji_ids"),this.category_id=e.categoryId,this.title=new f(e.title),this.upsell=new f(e.upsell),this.emoji_tooltip=e.emojiTooltip,this.endpoint=new y(e.command),this.emoji_ids=e.emojiIds}};a(xp,"EmojiPickerUpsellCategory");n(xp,"type","EmojiPickerUpsellCategory");var p8=xp,f8="playlist/get_add_to_playlist",Bt,Pp=class extends m{constructor(e){super(),M(this,Bt),P(this,Bt,e)}getApiPath(){return f8}buildRequest(){let e={};return e.videoIds=h(this,Bt).videoIds?h(this,Bt).videoIds:[h(this,Bt).videoId],h(this,Bt).playlistId&&(e.playlistId=h(this,Bt).playlistId),h(this,Bt).params&&(e.params=h(this,Bt).params),e.excludeWatchLater=!!h(this,Bt).excludeWatchLater,e}};Bt=new WeakMap;a(Pp,"AddToPlaylistServiceEndpoint");n(Pp,"type","AddToPlaylistServiceEndpoint");var lS=Pp,Mp=class extends lS{constructor(e){super(e)}};a(Mp,"AddToPlaylistEndpoint");n(Mp,"type","AddToPlaylistEndpoint");var m8=Mp,v8="browse",We,Rp=class extends m{constructor(e){super(),M(this,We),P(this,We,e)}getApiPath(){return v8}buildRequest(){let e={};return h(this,We).browseId&&(e.browseId=h(this,We).browseId),h(this,We).params&&(e.params=h(this,We).params),h(this,We).query&&(e.query=h(this,We).query),h(this,We).browseId==="FEsubscriptions"&&(e.subscriptionSettingsState=h(this,We).subscriptionSettingsState||"MY_SUBS_SETTINGS_STATE_LAYOUT_FORMAT_LIST"),h(this,We).browseId==="SPaccount_playback"&&(e.formData=h(this,We).formData||{accountSettingsFormData:{flagCaptionsDefaultOff:!1,flagAutoCaptionsDefaultOn:!1,flagDisableInlinePreview:!1,flagAudioDescriptionDefaultOn:!1}}),h(this,We).browseId==="FEwhat_to_watch"&&(h(this,We).browseRequestSupportedMetadata&&(e.browseRequestSupportedMetadata=h(this,We).browseRequestSupportedMetadata),h(this,We).inlineSettingStatus&&(e.inlineSettingStatus=h(this,We).inlineSettingStatus)),e}};We=new WeakMap;a(Rp,"BrowseEndpoint");n(Rp,"type","BrowseEndpoint");var b8=Rp,g8="comment/create_comment",Oe,Dp=class extends m{constructor(e){super(),M(this,Oe),P(this,Oe,e)}getApiPath(){return g8}buildRequest(){let e={};if(h(this,Oe).createCommentParams&&(e.createCommentParams=h(this,Oe).createCommentParams),h(this,Oe).commentText&&(e.commentText=h(this,Oe).commentText),h(this,Oe).attachedVideoId?e.videoAttachment={videoId:h(this,Oe).attachedVideoId}:h(this,Oe).pollOptions?e.pollAttachment={choices:h(this,Oe).pollOptions}:h(this,Oe).imageBlobId?e.imageAttachment={encryptedBlobId:h(this,Oe).imageBlobId}:h(this,Oe).sharedPostId&&(e.sharedPostAttachment={postId:h(this,Oe).sharedPostId}),h(this,Oe).accessRestrictions&&typeof h(this,Oe).accessRestrictions=="number"){let i=h(this,Oe).accessRestrictions===1?"RESTRICTION_TYPE_EVERYONE":"RESTRICTION_TYPE_SPONSORS_ONLY";e.accessRestrictions={restriction:i}}return h(this,Oe).botguardResponse&&(e.botguardResponse=h(this,Oe).botguardResponse),e}};Oe=new WeakMap;a(Dp,"CreateCommentEndpoint");n(Dp,"type","CreateCommentEndpoint");var y8=Dp,w8="playlist/create",at,Bp=class extends m{constructor(e){super(),M(this,at),P(this,at,e)}getApiPath(){return w8}buildRequest(){let e={};return h(this,at).title&&(e.title=h(this,at).title),h(this,at).privacyStatus&&(e.privacyStatus=h(this,at).privacyStatus),h(this,at).description&&(e.description=h(this,at).description),h(this,at).videoIds&&(e.videoIds=h(this,at).videoIds),h(this,at).params&&(e.params=h(this,at).params),h(this,at).sourcePlaylistId&&(e.sourcePlaylistId=h(this,at).sourcePlaylistId),e}};at=new WeakMap;a(Bp,"CreatePlaylistServiceEndpoint");n(Bp,"type","CreatePlaylistServiceEndpoint");var k8=Bp,C8="playlist/delete",Ds,Lp=class extends m{constructor(e){super(),M(this,Ds),P(this,Ds,e)}getApiPath(){return C8}buildRequest(){let e={};return h(this,Ds).playlistId&&(e.playlistId=h(this,Ds).sourcePlaylistId),e}};Ds=new WeakMap;a(Lp,"DeletePlaylistEndpoint");n(Lp,"type","DeletePlaylistEndpoint");var T8=Lp,S8="feedback",vi,Vp=class extends m{constructor(e){super(),M(this,vi),P(this,vi,e)}getApiPath(){return S8}buildRequest(){let e={};return h(this,vi).feedbackToken&&(e.feedbackTokens=[h(this,vi).feedbackToken]),h(this,vi).cpn&&(e.feedbackContext={cpn:h(this,vi).cpn}),e.isFeedbackTokenUnencrypted=!!h(this,vi).isFeedbackTokenUnencrypted,e.shouldMerge=!!h(this,vi).shouldMerge,e}};vi=new WeakMap;a(Vp,"FeedbackEndpoint");n(Vp,"type","FeedbackEndpoint");var I8=Vp,E8="account/accounts_list",De,Op=class extends m{constructor(e){super(),M(this,De),P(this,De,e)}getApiPath(){return E8}buildRequest(){let e={};return h(this,De).requestType&&(e.requestType=h(this,De).requestType,(h(this,De).requestType==="ACCOUNTS_LIST_REQUEST_TYPE_CHANNEL_SWITCHER"||h(this,De).requestType==="ACCOUNTS_LIST_REQUEST_TYPE_IDENTITY_PROMPT")&&h(this,De).nextUrl&&(e.nextNavendpoint={urlEndpoint:{url:h(this,De).nextUrl}})),h(this,De).channelSwitcherQuery&&(e.channelSwitcherQuery=h(this,De).channelSwitcherQuery),h(this,De).triggerChannelCreation&&(e.triggerChannelCreation=h(this,De).triggerChannelCreation),h(this,De).contentOwnerConfig&&h(this,De).contentOwnerConfig.externalContentOwnerId&&(e.contentOwnerConfig=h(this,De).contentOwnerConfig),h(this,De).obfuscatedSelectedGaiaId&&(e.obfuscatedSelectedGaiaId=h(this,De).obfuscatedSelectedGaiaId),h(this,De).selectedSerializedDelegationContext&&(e.selectedSerializedDelegationContext=h(this,De).selectedSerializedDelegationContext),h(this,De).callCircumstance&&(e.callCircumstance=h(this,De).callCircumstance),e}};De=new WeakMap;a(Op,"GetAccountsListInnertubeEndpoint");n(Op,"type","GetAccountsListInnertubeEndpoint");var A8=Op,Np=class extends m{constructor(e){super(),n(this,"panel_identifier"),this.panel_identifier=e.panelIdentifier}};a(Np,"HideEngagementPanelEndpoint");n(Np,"type","HideEngagementPanelEndpoint");var x8=Np,P8="like/like",M8="like/dislike",R8="like/removelike",Lt,Fp=class extends m{constructor(e){super(),M(this,Lt),P(this,Lt,e)}getApiPath(){return h(this,Lt).status==="DISLIKE"?M8:h(this,Lt).status==="INDIFFERENT"?R8:P8}buildRequest(){let e={};h(this,Lt).target&&(e.target=h(this,Lt).target);let i=this.getParams();return i&&(e.params=i),e}getParams(){switch(h(this,Lt).status){case"LIKE":return h(this,Lt).likeParams;case"DISLIKE":return h(this,Lt).dislikeParams;case"INDIFFERENT":return h(this,Lt).removeLikeParams;default:return}}};Lt=new WeakMap;a(Fp,"LikeEndpoint");n(Fp,"type","LikeEndpoint");var D8=Fp,B8="live_chat/get_item_context_menu",Bs,Up=class extends m{constructor(e){super(),M(this,Bs),P(this,Bs,e)}getApiPath(){return B8}buildRequest(){let e={};return h(this,Bs).params&&(e.params=h(this,Bs).params),e}};Bs=new WeakMap;a(Up,"LiveChatItemContextMenuEndpoint");n(Up,"type","LiveChatItemContextMenuEndpoint");var L8=Up,V8="notification/modify_channel_preference",on,Hp=class extends m{constructor(e){super(),M(this,on),P(this,on,e)}getApiPath(){return V8}buildRequest(){let e={};return h(this,on).params&&(e.params=h(this,on).params),h(this,on).secondaryParams&&(e.secondaryParams=h(this,on).secondaryParams),e}};on=new WeakMap;a(Hp,"ModifyChannelNotificationPreferenceEndpoint");n(Hp,"type","ModifyChannelNotificationPreferenceEndpoint");var O8=Hp,N8="comment/perform_comment_action",rn,Wp=class extends m{constructor(e){super(),M(this,rn),P(this,rn,e)}getApiPath(){return N8}buildRequest(){let e={};return h(this,rn).actions&&(e.actions=h(this,rn).actions),h(this,rn).action&&(e.actions=[h(this,rn).action]),e}};rn=new WeakMap;a(Wp,"PerformCommentActionEndpoint");n(Wp,"type","PerformCommentActionEndpoint");var F8=Wp,U8="browse/edit_playlist",bi,qp=class extends m{constructor(e){super(),M(this,bi),P(this,bi,e)}getApiPath(){return U8}buildRequest(){let e={};return h(this,bi).actions&&(e.actions=h(this,bi).actions),h(this,bi).playlistId&&(e.playlistId=h(this,bi).playlistId),h(this,bi).params&&(e.params=h(this,bi).params),e}};bi=new WeakMap;a(qp,"PlaylistEditEndpoint");n(qp,"type","PlaylistEditEndpoint");var H8=qp,W8="player",Be,jp=class extends m{constructor(e){super(),M(this,Be),P(this,Be,e)}getApiPath(){return W8}buildRequest(){let e={};return h(this,Be).videoId&&(e.videoId=h(this,Be).videoId),h(this,Be).playlistId&&(e.playlistId=h(this,Be).playlistId),(h(this,Be).index!==void 0||h(this,Be).playlistIndex!==void 0)&&(e.playlistIndex=h(this,Be).index||h(this,Be).playlistIndex),(h(this,Be).playerParams||h(this,Be).params)&&(e.params=h(this,Be).playerParams||h(this,Be).params),h(this,Be).startTimeSeconds&&(e.startTimeSecs=h(this,Be).startTimeSeconds),h(this,Be).overrideMutedAtStart&&(e.overrideMutedAtStart=h(this,Be).overrideMutedAtStart),e.racyCheckOk=!!h(this,Be).racyCheckOk,e.contentCheckOk=!!h(this,Be).contentCheckOk,e}};Be=new WeakMap;a(jp,"WatchEndpoint");n(jp,"type","WatchEndpoint");var cS=jp,Gp=class extends cS{constructor(e){super(e)}};a(Gp,"PrefetchWatchCommand");n(Gp,"type","PrefetchWatchCommand");var q8=Gp,j8="reel/reel_item_watch",Qe,Kp=class extends m{constructor(e){super(),M(this,Qe),P(this,Qe,e)}getApiPath(){return j8}buildRequest(){let e={};return h(this,Qe).videoId&&(e.playerRequest={videoId:h(this,Qe).videoId}),e.playerRequest&&(h(this,Qe).playerParams&&(e.playerRequest.params=h(this,Qe).playerParams),h(this,Qe).racyCheckOk&&(e.playerRequest.racyCheckOk=!!h(this,Qe).racyCheckOk),h(this,Qe).contentCheckOk&&(e.playerRequest.contentCheckOk=!!h(this,Qe).contentCheckOk)),h(this,Qe).params&&(e.params=h(this,Qe).params),h(this,Qe).inputType&&(e.inputType=h(this,Qe).inputType),e.disablePlayerResponse=!!h(this,Qe).disablePlayerResponse,e}};Qe=new WeakMap;a(Kp,"ReelWatchEndpoint");n(Kp,"type","ReelWatchEndpoint");var G8=Kp,K8="search",Vt,Yp=class extends m{constructor(e){super(),M(this,Vt),P(this,Vt,e)}getApiPath(){return K8}buildRequest(){let e={};return h(this,Vt).query&&(e.query=h(this,Vt).query),h(this,Vt).params&&(e.params=h(this,Vt).params),h(this,Vt).webSearchboxStatsUrl&&(e.webSearchboxStatsUrl=h(this,Vt).webSearchboxStatsUrl),h(this,Vt).suggestStats&&(e.suggestStats=h(this,Vt).suggestStats),e}};Vt=new WeakMap;a(Yp,"SearchEndpoint");n(Yp,"type","SearchEndpoint");var Y8=Yp,z8="share/get_share_panel",an,zp=class extends m{constructor(e){super(),M(this,an),P(this,an,e)}getApiPath(){return z8}buildRequest(){let e={};return h(this,an).serializedShareEntity&&(e.serializedSharedEntity=h(this,an).serializedShareEntity),h(this,an).clientParams&&(e.clientParams=h(this,an).clientParams),e}};an=new WeakMap;a(zp,"ShareEntityServiceEndpoint");n(zp,"type","ShareEntityServiceEndpoint");var $p=zp,Jp=class extends $p{constructor(e){super(e)}};a(Jp,"ShareEndpoint");n(Jp,"type","ShareEndpoint");var $8=Jp,Xp=class extends $p{constructor(e){super(e)}};a(Xp,"ShareEntityEndpoint");n(Xp,"type","ShareEntityEndpoint");var J8=Xp,Qp=class extends m{constructor(e){super(),n(this,"panel_identifier"),n(this,"source_panel_identifier"),this.panel_identifier=e.panelIdentifier,this.source_panel_identifier=e.sourcePanelIdentifier}};a(Qp,"ShowEngagementPanelEndpoint");n(Qp,"type","ShowEngagementPanelEndpoint");var X8=Qp,Zp=class extends m{constructor(e){super(),n(this,"actions"),n(this,"signal"),Array.isArray(e.actions)&&(this.actions=v.parseArray(e.actions.map(i=>(delete i.clickTrackingParams,i)))),this.signal=e.signal}};a(Zp,"SignalServiceEndpoint");n(Zp,"type","SignalServiceEndpoint");var Q8=Zp,Z8="subscription/subscribe",ft,ef=class extends m{constructor(e){super(),M(this,ft),P(this,ft,e)}getApiPath(){return Z8}buildRequest(){let e={};return h(this,ft).channelIds&&(e.channelIds=h(this,ft).channelIds),h(this,ft).siloName&&(e.siloName=h(this,ft).siloName),h(this,ft).params&&(e.params=h(this,ft).params),h(this,ft).botguardResponse&&(e.botguardResponse=h(this,ft).botguardResponse),h(this,ft).feature&&(e.clientFeature=h(this,ft).feature),e}};ft=new WeakMap;a(ef,"SubscribeEndpoint");n(ef,"type","SubscribeEndpoint");var e7=ef,t7="subscription/unsubscribe",gi,tf=class extends m{constructor(e){super(),M(this,gi),P(this,gi,e)}getApiPath(){return t7}buildRequest(){let e={};return h(this,gi).channelIds&&(e.channelIds=h(this,gi).channelIds),h(this,gi).siloName&&(e.siloName=h(this,gi).siloName),h(this,gi).params&&(e.params=h(this,gi).params),e}};gi=new WeakMap;a(tf,"UnsubscribeEndpoint");n(tf,"type","UnsubscribeEndpoint");var i7=tf,n7="next",Ye,nf=class extends m{constructor(e){super(),M(this,Ye),P(this,Ye,e)}getApiPath(){return n7}buildRequest(){let e={};return h(this,Ye).videoId&&(e.videoId=h(this,Ye).videoId),h(this,Ye).playlistId&&(e.playlistId=h(this,Ye).playlistId),(h(this,Ye).index!==void 0||h(this,Ye).playlistIndex!==void 0)&&(e.playlistIndex=h(this,Ye).index||h(this,Ye).playlistIndex),(h(this,Ye).playerParams||h(this,Ye).params)&&(e.params=h(this,Ye).playerParams||h(this,Ye).params),e.racyCheckOk=!!h(this,Ye).racyCheckOk,e.contentCheckOk=!!h(this,Ye).contentCheckOk,e}};Ye=new WeakMap;a(nf,"WatchNextEndpoint");n(nf,"type","WatchNextEndpoint");var s7=nf,sf=class extends m{constructor(e){super(),n(this,"elements"),n(this,"start_ms"),this.elements=v.parseArray(e.elements),this.start_ms=e.startMs}};a(sf,"Endscreen");n(sf,"type","Endscreen");var uS=sf,of=class extends m{constructor(e){super(),n(this,"style"),n(this,"title"),n(this,"endpoint"),n(this,"image"),n(this,"icon"),n(this,"metadata"),n(this,"call_to_action"),n(this,"hovercard_button"),n(this,"is_subscribe"),n(this,"playlist_length"),n(this,"thumbnail_overlays"),n(this,"left"),n(this,"top"),n(this,"width"),n(this,"aspect_ratio"),n(this,"start_ms"),n(this,"end_ms"),n(this,"id"),this.style=e.style,this.title=new f(e.title),this.endpoint=new y(e.endpoint),Reflect.has(e,"image")&&(this.image=x.fromResponse(e.image)),Reflect.has(e,"icon")&&(this.icon=x.fromResponse(e.icon)),Reflect.has(e,"metadata")&&(this.metadata=new f(e.metadata)),Reflect.has(e,"callToAction")&&(this.call_to_action=new f(e.callToAction)),Reflect.has(e,"hovercardButton")&&(this.hovercard_button=v.parseItem(e.hovercardButton)),Reflect.has(e,"isSubscribe")&&(this.is_subscribe=!!e.isSubscribe),Reflect.has(e,"playlistLength")&&(this.playlist_length=new f(e.playlistLength)),Reflect.has(e,"thumbnailOverlays")&&(this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays)),this.left=parseFloat(e.left),this.width=parseFloat(e.width),this.top=parseFloat(e.top),this.aspect_ratio=parseFloat(e.aspectRatio),this.start_ms=parseFloat(e.startMs),this.end_ms=parseFloat(e.endMs),this.id=e.id}};a(of,"EndscreenElement");n(of,"type","EndscreenElement");var o7=of,rf=class extends m{constructor(e){super(),n(this,"id"),n(this,"title"),n(this,"author"),n(this,"endpoint"),n(this,"thumbnails"),n(this,"video_count"),this.id=e.playlistId,this.title=new f(e.title),this.author=new f(e.longBylineText),this.endpoint=new y(e.navigationEndpoint),this.thumbnails=x.fromResponse(e.thumbnail),this.video_count=new f(e.videoCountText)}};a(rf,"EndScreenPlaylist");n(rf,"type","EndScreenPlaylist");var hS=rf,af=class extends m{constructor(e){super(),n(this,"id"),n(this,"title"),n(this,"thumbnails"),n(this,"thumbnail_overlays"),n(this,"author"),n(this,"endpoint"),n(this,"short_view_count"),n(this,"badges"),n(this,"duration"),this.id=e.videoId,this.title=new f(e.title),this.thumbnails=x.fromResponse(e.thumbnail),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),this.author=new le(e.shortBylineText,e.ownerBadges),this.endpoint=new y(e.navigationEndpoint),this.short_view_count=new f(e.shortViewCountText),this.badges=v.parseArray(e.badges),this.duration={text:new f(e.lengthText).toString(),seconds:e.lengthInSeconds}}};a(af,"EndScreenVideo");n(af,"type","EndScreenVideo");var dS=af,lf=class extends m{constructor(e){super(),n(this,"title"),n(this,"endpoint"),n(this,"selected"),n(this,"content"),this.title=e.title,this.endpoint=new y(e.endpoint),this.selected=e.selected,this.content=v.parseItem(e.content)}};a(lf,"ExpandableTab");n(lf,"type","ExpandableTab");var Sr=lf,cf=class extends m{constructor(e){super(),n(this,"items"),this.items=v.parseArray(e.items)}get contents(){return this.items}};a(cf,"ExpandedShelfContents");n(cf,"type","ExpandedShelfContents");var r7=cf,uf=class extends m{constructor(e){super(),n(this,"dialog_message"),n(this,"confirm_label"),this.dialog_message=new f(e.dialogMessage),this.confirm_label=new f(e.confirmLabel)}};a(uf,"FancyDismissibleDialog");n(uf,"type","FancyDismissibleDialog");var a7=uf,hf=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parseArray(e.contents,Ke)}};a(hf,"FeedFilterChipBar");n(hf,"type","FeedFilterChipBar");var Do=hf,df=class extends m{constructor(e){super(),n(this,"title"),n(this,"subtitle"),n(this,"endpoint"),n(this,"apply_modernized_style"),n(this,"trim_style"),n(this,"background_style"),this.title=new f(e.title),this.subtitle=new f(e.subtitle),this.endpoint=new y(e.impressionEndpoint),this.apply_modernized_style=e.applyModernizedStyle,this.trim_style=e.trimStyle,this.background_style=e.backgroundStyle}};a(df,"FeedNudge");n(df,"type","FeedNudge");var l7=df,_f=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(_f,"FeedTabbedHeader");n(_f,"type","FeedTabbedHeader");var _S=_f,pf=class extends m{constructor(e){super(),n(this,"label"),n(this,"toggled"),n(this,"toggle_on_action"),n(this,"toggle_off_action"),this.label=new Text(e.label),this.toggled=e.toggled,"toggleOnAction"in e&&(this.toggle_on_action=new y(e.toggleOnAction)),"toggleOffAction"in e&&(this.toggle_off_action=new y(e.toggleOffAction))}};a(pf,"ToggleFormField");n(pf,"type","ToggleFormField");var pS=pf,ff=class extends m{constructor(e){super(),n(this,"fields"),this.fields=v.parseArray(e.fields,pS)}};a(ff,"Form");n(ff,"type","Form");var fS=ff,mf=class extends m{constructor(e){super(),n(this,"title"),n(this,"form"),n(this,"buttons"),this.title=new f(e.title),this.form=v.parseItem(e.form,fS),this.buttons=v.parseArray(e.buttons,L)}};a(mf,"FormPopup");n(mf,"type","FormPopup");var c7=mf,vf=class extends m{constructor(e){super(),n(this,"title"),n(this,"box_art"),n(this,"box_art_overlay_text"),n(this,"endpoint"),n(this,"is_official_box_art"),this.title=new f(e.title),this.box_art=x.fromResponse(e.boxArt),this.box_art_overlay_text=new f(e.boxArtOverlayText),this.endpoint=new y(e.endpoint),this.is_official_box_art=!!e.isOfficialBoxArt}};a(vf,"GameDetails");n(vf,"type","GameDetails");var u7=vf,bf=class extends m{constructor(e){var i,r,o;super(),n(this,"items"),n(this,"is_collapsible"),n(this,"visible_row_count"),n(this,"target_id"),n(this,"continuation"),n(this,"header"),this.items=v.parseArray(e.items),Reflect.has(e,"header")&&(this.header=v.parseItem(e.header)),Reflect.has(e,"isCollapsible")&&(this.is_collapsible=e.isCollapsible),Reflect.has(e,"visibleRowCount")&&(this.visible_row_count=e.visibleRowCount),Reflect.has(e,"targetId")&&(this.target_id=e.targetId),this.continuation=((o=(r=(i=e.continuations)==null?void 0:i[0])==null?void 0:r.nextContinuationData)==null?void 0:o.continuation)||null}get contents(){return this.items}};a(bf,"Grid");n(bf,"type","Grid");var Ir=bf,gf=class extends m{constructor(e){super(),n(this,"id"),n(this,"author"),n(this,"subscribers"),n(this,"video_count"),n(this,"endpoint"),n(this,"subscribe_button"),this.id=e.channelId,this.author=new le({...e.title,navigationEndpoint:e.navigationEndpoint},e.ownerBadges,e.thumbnail),this.subscribers=new f(e.subscriberCountText),this.video_count=new f(e.videoCountText),this.endpoint=new y(e.navigationEndpoint),this.subscribe_button=v.parseItem(e.subscribeButton)}};a(gf,"GridChannel");n(gf,"type","GridChannel");var mS=gf,yf=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(yf,"GridHeader");n(yf,"type","GridHeader");var h7=yf,wf=class extends m{constructor(e){var i,r;super(),n(this,"id"),n(this,"title"),n(this,"author"),n(this,"thumbnails"),n(this,"video_count"),n(this,"video_count_short"),n(this,"endpoint"),n(this,"secondary_endpoint"),n(this,"thumbnail_overlays"),this.id=e.playlistId,this.title=new f(e.title),this.author=(i=e.shortBylineText)!=null&&i.simpleText?new f(e.shortBylineText):(r=e.longBylineText)!=null&&r.simpleText?new f(e.longBylineText):null,this.thumbnails=x.fromResponse(e.thumbnail),this.video_count=new f(e.videoCountText),this.video_count_short=new f(e.videoCountShortText),this.endpoint=new y(e.navigationEndpoint),this.secondary_endpoint=new y(e.secondaryNavigationEndpoint),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays)}};a(wf,"GridMix");n(wf,"type","GridMix");var d7=wf,kf=class extends m{constructor(e){var i;super(),n(this,"id"),n(this,"title"),n(this,"thumbnails"),n(this,"duration"),n(this,"endpoint"),n(this,"badges"),n(this,"metadata"),n(this,"thumbnail_overlays");let r=(i=e.thumbnailOverlays.find(o=>o.hasOwnProperty("thumbnailOverlayTimeStatusRenderer")))==null?void 0:i.thumbnailOverlayTimeStatusRenderer;this.id=e.videoId,this.title=new f(e.title),this.thumbnails=x.fromResponse(e.thumbnail),this.duration=e.lengthText?new f(e.lengthText):r?.text?new f(r.text):null,this.endpoint=new y(e.navigationEndpoint),this.badges=v.parseArray(e.badges,Mn),this.metadata=new f(e.metadata),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays)}};a(kf,"GridMovie");n(kf,"type","GridMovie");var _7=kf,Cf=class extends m{constructor(e){var i;super(),n(this,"id"),n(this,"title"),n(this,"author"),n(this,"badges"),n(this,"endpoint"),n(this,"view_playlist"),n(this,"thumbnails"),n(this,"thumbnail_renderer"),n(this,"sidebar_thumbnails"),n(this,"video_count"),n(this,"video_count_short"),this.id=e.playlistId,this.title=new f(e.title),Reflect.has(e,"shortBylineText")&&(this.author=new le(e.shortBylineText,e.ownerBadges)),this.badges=v.parseArray(e.ownerBadges),this.endpoint=new y(e.navigationEndpoint),this.view_playlist=new f(e.viewPlaylistText),this.thumbnails=x.fromResponse(e.thumbnail),this.thumbnail_renderer=v.parseItem(e.thumbnailRenderer),this.sidebar_thumbnails=[].concat(...((i=e.sidebarThumbnails)==null?void 0:i.map(r=>x.fromResponse(r)))||[])||null,this.video_count=new f(e.thumbnailText),this.video_count_short=new f(e.videoCountShortText)}};a(Cf,"GridPlaylist");n(Cf,"type","GridPlaylist");var vS=Cf,Tf=class extends m{constructor(e){super(),n(this,"contents"),n(this,"header"),n(this,"content_aspect_ratio"),n(this,"enable_vertical_expansion"),n(this,"show_more_button"),n(this,"show_less_button"),n(this,"min_collapsed_item_count"),this.contents=v.parseArray(e.contents),this.header=v.parseItem(e.header),this.content_aspect_ratio=e.contentAspectRatio,this.enable_vertical_expansion=e.enableVerticalExpansion,this.show_more_button=v.parseItem(e.showMoreButton,He),this.show_less_button=v.parseItem(e.showLessButton,He),this.min_collapsed_item_count=e.minCollapsedItemCount}};a(Tf,"GridShelfView");n(Tf,"type","GridShelfView");var p7=Tf,Sf=class extends m{constructor(e){super(),n(this,"thumbnail"),this.thumbnail=x.fromResponse(e.thumbnail)}};a(Sf,"ShowCustomThumbnail");n(Sf,"type","ShowCustomThumbnail");var bS=Sf,If=class extends m{constructor(e){super(),n(this,"text"),n(this,"icon_type"),Reflect.has(e,"text")&&(this.text=new f(e.text)),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType)}};a(If,"ThumbnailOverlayBottomPanel");n(If,"type","ThumbnailOverlayBottomPanel");var gS=If,Ef=class extends m{constructor(e){super(),n(this,"title"),n(this,"thumbnail_renderer"),n(this,"endpoint"),n(this,"long_byline_text"),n(this,"thumbnail_overlays"),n(this,"author"),this.title=new f(e.title),this.thumbnail_renderer=Ce(e.thumbnailRenderer,bS),this.endpoint=new y(e.navigationEndpoint),this.long_byline_text=new f(e.longBylineText),this.thumbnail_overlays=xt(e.thumbnailOverlays,gS),this.author=new le(e.shortBylineText,void 0)}};a(Ef,"GridShow");n(Ef,"type","GridShow");var f7=Ef,Af=class extends m{constructor(e){var i,r;super(),n(this,"video_id"),n(this,"title"),n(this,"thumbnails"),n(this,"thumbnail_overlays"),n(this,"rich_thumbnail"),n(this,"published"),n(this,"duration"),n(this,"author"),n(this,"views"),n(this,"short_view_count"),n(this,"endpoint"),n(this,"menu"),n(this,"buttons"),n(this,"upcoming"),n(this,"upcoming_text"),n(this,"is_reminder_set");let o=(i=e.thumbnailOverlays.find(s=>s.hasOwnProperty("thumbnailOverlayTimeStatusRenderer")))==null?void 0:i.thumbnailOverlayTimeStatusRenderer;this.video_id=e.videoId,this.title=new f(e.title),this.thumbnails=x.fromResponse(e.thumbnail),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),this.rich_thumbnail=v.parseItem(e.richThumbnail),this.published=new f(e.publishedTimeText),this.duration=e.lengthText?new f(e.lengthText):o?.text?new f(o.text):null,this.author=e.shortBylineText&&new le(e.shortBylineText,e.ownerBadges),this.views=new f(e.viewCountText),this.short_view_count=new f(e.shortViewCountText),this.endpoint=new y(e.navigationEndpoint),this.menu=v.parseItem(e.menu,ye),Reflect.has(e,"buttons")&&(this.buttons=v.parseArray(e.buttons)),Reflect.has(e,"upcomingEventData")&&(this.upcoming=new Date(+`${e.upcomingEventData.startTime}000`),this.upcoming_text=new f(e.upcomingEventData.upcomingEventText),this.is_reminder_set=!!((r=e.upcomingEventData)!=null&&r.isReminderSet))}get id(){return this.video_id}get is_upcoming(){return!!(this.upcoming&&this.upcoming>new Date)}};a(Af,"GridVideo");n(Af,"type","GridVideo");var yS=Af,xf=class extends m{constructor(e){super(),n(this,"title"),n(this,"endpoint"),n(this,"icon_type"),n(this,"thumbnails"),n(this,"badges"),n(this,"is_primary"),this.title=new f(e.formattedTitle),this.endpoint=new y(e.navigationEndpoint||e.serviceEndpoint),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType),Reflect.has(e,"thumbnail")&&(this.thumbnails=x.fromResponse(e.thumbnail)),Reflect.has(e,"badges")&&(this.badges=e.badges),this.is_primary=!!e.isPrimary}};a(xf,"GuideEntry");n(xf,"type","GuideEntry");var Er=xf,Pf=class extends m{constructor(e){super(),n(this,"expander_item"),n(this,"collapser_item"),n(this,"expandable_items"),this.expander_item=Ce(e.expanderItem,Er),this.collapser_item=Ce(e.collapserItem,Er),this.expandable_items=xt(e.expandableItems)}};a(Pf,"GuideCollapsibleEntry");n(Pf,"type","GuideCollapsibleEntry");var m7=Pf,Mf=class extends m{constructor(e){super(),n(this,"header_entry"),n(this,"expander_icon"),n(this,"collapser_icon"),n(this,"section_items"),this.header_entry=Ce(e.headerEntry),this.expander_icon=e.expanderIcon.iconType,this.collapser_icon=e.collapserIcon.iconType,this.section_items=xt(e.sectionItems)}};a(Mf,"GuideCollapsibleSectionEntry");n(Mf,"type","GuideCollapsibleSectionEntry");var v7=Mf,Rf=class extends Er{constructor(e){super(e.entryRenderer.guideEntryRenderer),n(this,"always_show"),this.always_show=!!e.alwaysShow}};a(Rf,"GuideDownloadsEntry");n(Rf,"type","GuideDownloadsEntry");var b7=Rf,Df=class extends m{constructor(e){super(),n(this,"title"),n(this,"items"),Reflect.has(e,"formattedTitle")&&(this.title=new f(e.formattedTitle)),this.items=xt(e.items)}};a(Df,"GuideSection");n(Df,"type","GuideSection");var Bf=Df,Lf=class extends Bf{};a(Lf,"GuideSubscriptionsSection");n(Lf,"type","GuideSubscriptionsSection");var wS=Lf,Vf=class extends m{constructor(e){super(),n(this,"hashtag"),n(this,"hashtag_info"),this.hashtag=new f(e.hashtag),this.hashtag_info=new f(e.hashtagInfoText)}};a(Vf,"HashtagHeader");n(Vf,"type","HashtagHeader");var kS=Vf,Of=class extends m{constructor(e){super(),n(this,"hashtag"),n(this,"hashtag_info_text"),n(this,"hashtag_thumbnail"),n(this,"endpoint"),n(this,"hashtag_background_color"),n(this,"hashtag_video_count"),n(this,"hashtag_channel_count"),this.hashtag=new f(e.hashtag),this.hashtag_info_text=new f(e.hashtagInfoText),this.hashtag_thumbnail=x.fromResponse(e.hashtagThumbnail),this.endpoint=new y(e.onTapCommand),this.hashtag_background_color=e.hashtagBackgroundColor,this.hashtag_video_count=new f(e.hashtagVideoCount),this.hashtag_channel_count=new f(e.hashtagChannelCount)}};a(Of,"HashtagTile");n(Of,"type","HashtagTile");var g7=Of,Nf=class extends m{constructor(e){super(),n(this,"thumbnails"),n(this,"on_tap_endpoint"),this.thumbnails=x.fromResponse(e.thumbnail),this.on_tap_endpoint=new y(e.onTap)}};a(Nf,"HeroPlaylistThumbnail");n(Nf,"type","HeroPlaylistThumbnail");var y7=Nf,Ff=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"background_image"),n(this,"strapline"),n(this,"title"),n(this,"description"),n(this,"text_on_tap_endpoint"),n(this,"cta"),e.thumbnail&&(this.thumbnail={image:x.fromResponse(e.thumbnail.image),endpoint:new y(e.thumbnail.onTap),on_long_press_endpoint:new y(e.thumbnail.onLongPress),content_mode:e.thumbnail.contentMode,crop_options:e.thumbnail.cropOptions}),this.background_image={image:x.fromResponse(e.backgroundImage.image),gradient_image:x.fromResponse(e.backgroundImage.gradientImage)},this.strapline=e.strapline,this.title=e.title,this.description=e.description,this.cta={icon_name:e.cta.iconName,title:e.cta.title,endpoint:new y(e.cta.onTap),accessibility_text:e.cta.accessibilityText,state:e.cta.state},this.text_on_tap_endpoint=new y(e.textOnTap)}};a(Ff,"Panel");n(Ff,"type","Panel");var w7=Ff,Uf=class extends m{constructor(e){super(),n(this,"panels"),this.panels=te(e.highlightsCarousel.panels.map(i=>new w7(i)))}};a(Uf,"HighlightsCarousel");n(Uf,"type","HighlightsCarousel");var ol=Uf,Hf=class extends m{constructor(e){super(),n(this,"suggestion"),n(this,"endpoint"),n(this,"icon_type"),n(this,"service_endpoint"),this.suggestion=new f(e.suggestion),this.endpoint=new y(e.navigationEndpoint),Reflect.has(e,"icon")&&(this.icon_type=e.icon.iconType),Reflect.has(e,"serviceEndpoint")&&(this.service_endpoint=new y(e.serviceEndpoint))}};a(Hf,"SearchSuggestion");n(Hf,"type","SearchSuggestion");var CS=Hf,Wf=class extends CS{constructor(e){super(e)}};a(Wf,"HistorySuggestion");n(Wf,"type","HistorySuggestion");var k7=Wf,qf=class extends m{constructor(e){super(),n(this,"items"),n(this,"previous_button"),n(this,"next_button"),this.items=v.parseArray(e.items),this.previous_button=v.parseItem(e.previousButton,L),this.next_button=v.parseItem(e.nextButton,L)}get contents(){return this.items}};a(qf,"HorizontalMovieList");n(qf,"type","HorizontalMovieList");var C7=qf,jf=class extends m{constructor(e){var i;super(),n(this,"icon_type"),n(this,"tooltip"),n(this,"endpoint"),this.icon_type=(i=e.icon)==null?void 0:i.iconType,Reflect.has(e,"tooltip")&&(this.tooltip=new f(e.tooltip).toString()),this.endpoint=new y(e.navigationEndpoint)}};a(jf,"IconLink");n(jf,"type","IconLink");var TS=jf,Gf=class extends m{constructor(e){super(),n(this,"image"),n(this,"style"),this.image=x.fromResponse(e.image),this.style=e.style}};a(Gf,"ImageBannerView");n(Gf,"type","ImageBannerView");var SS=Gf,Kf=class extends m{constructor(e){super(),n(this,"including_results_for"),n(this,"corrected_query"),n(this,"corrected_query_endpoint"),n(this,"search_only_for"),n(this,"original_query"),n(this,"original_query_endpoint"),this.including_results_for=new f(e.includingResultsFor),this.corrected_query=new f(e.correctedQuery),this.corrected_query_endpoint=new y(e.correctedQueryEndpoint),this.search_only_for=Reflect.has(e,"searchOnlyFor")?new f(e.searchOnlyFor):void 0,this.original_query=Reflect.has(e,"originalQuery")?new f(e.originalQuery):void 0,this.original_query_endpoint=Reflect.has(e,"originalQueryEndpoint")?new y(e.originalQueryEndpoint):void 0}};a(Kf,"IncludingResultsFor");n(Kf,"type","IncludingResultsFor");var T7=Kf,Yf=class extends m{constructor(e){super(),n(this,"title"),n(this,"source"),n(this,"paragraphs"),n(this,"attributed_paragraphs"),n(this,"thumbnail"),n(this,"source_endpoint"),n(this,"truncate_paragraphs"),n(this,"background"),n(this,"inline_link_icon_type"),this.title=new f(e.title),this.source=new f(e.source),Reflect.has(e,"paragraphs")&&(this.paragraphs=e.paragraphs.map(i=>new f(i))),Reflect.has(e,"attributedParagraphs")&&(this.attributed_paragraphs=e.attributedParagraphs.map(i=>f.fromAttributed(i))),this.thumbnail=x.fromResponse(e.thumbnail),this.source_endpoint=new y(e.sourceEndpoint),this.truncate_paragraphs=!!e.truncateParagraphs,this.background=e.background,Reflect.has(e,"inlineLinkIcon")&&Reflect.has(e.inlineLinkIcon,"iconType")&&(this.inline_link_icon_type=e.inlineLinkIcon.iconType)}};a(Yf,"InfoPanelContent");n(Yf,"type","InfoPanelContent");var IS=Yf,zf=class extends m{constructor(e){var i;super(),n(this,"title"),n(this,"menu"),n(this,"content"),n(this,"header_endpoint"),n(this,"background"),n(this,"title_style"),n(this,"icon_type"),this.title=new f(e.title),this.menu=v.parseItem(e.menu,ye),this.content=v.parseItem(e.content,IS),e.headerEndpoint&&(this.header_endpoint=new y(e.headerEndpoint)),this.background=e.background,this.title_style=e.titleStyle,Reflect.has(e,"icon")&&(this.icon_type=(i=e.icon)==null?void 0:i.iconType)}};a(zf,"InfoPanelContainer");n(zf,"type","InfoPanelContainer");var ES=zf,$f=class extends m{constructor(e){super(),n(this,"header_type"),n(this,"title"),n(this,"description"),n(this,"metadata"),n(this,"badges"),n(this,"box_art"),n(this,"banner"),n(this,"buttons"),n(this,"auto_generated"),this.header_type=e.type,this.title=new f(e.title),this.description=new f(e.description),this.metadata=new f(e.metadata),this.badges=v.parseArray(e.badges,Mn),this.box_art=x.fromResponse(e.boxArt),this.banner=x.fromResponse(e.banner),this.buttons=v.parseArray(e.buttons,[hi,L]),this.auto_generated=new f(e.autoGenerated)}};a($f,"InteractiveTabbedHeader");n($f,"type","InteractiveTabbedHeader");var AS=$f,Jf=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(Jf,"ItemSectionHeader");n(Jf,"type","ItemSectionHeader");var Xf=Jf,Qf=class extends m{constructor(e){super(),n(this,"title"),n(this,"selected"),n(this,"endpoint"),this.title=new f(e.title),this.selected=!!e.selected,this.endpoint=new y(e.endpoint)}};a(Qf,"ItemSectionTab");n(Qf,"type","Tab");var xS=Qf,Zf=class extends m{constructor(e){super(),n(this,"title"),n(this,"tabs"),n(this,"end_items"),this.title=new f(e.title),this.tabs=v.parseArray(e.tabs,xS),Reflect.has(e,"endItems")&&(this.end_items=v.parseArray(e.endItems))}};a(Zf,"ItemSectionTabbedHeader");n(Zf,"type","ItemSectionTabbedHeader");var em=Zf,tm=class extends m{constructor(e){super(),n(this,"filter_menu"),this.filter_menu=v.parseItem(e.filterMenu,ql.SortFilterSubMenu)}};a(tm,"SortFilterHeader");n(tm,"type","SortFilterHeader");var PS=tm,im=class extends m{constructor(e){var i,r,o;super(),n(this,"header"),n(this,"contents"),n(this,"target_id"),n(this,"continuation"),this.header=v.parseItem(e.header,[ha,Xf,em,PS,Do,vo]),this.contents=v.parseArray(e.contents),(e.targetId||e.sectionIdentifier)&&(this.target_id=e.targetId||e.sectionIdentifier),e.continuations&&(this.continuation=(o=(r=(i=e.continuations)==null?void 0:i.at(0))==null?void 0:r.nextContinuationData)==null?void 0:o.continuation)}};a(im,"ItemSection");n(im,"type","ItemSection");var Pt=im,nm=class extends m{constructor(e){var i,r;super(),n(this,"header"),n(this,"initial_display_state"),n(this,"continuation"),n(this,"client_messages"),n(this,"is_replay"),this.header=v.parseItem(e.header),this.initial_display_state=e.initialDisplayState,this.continuation=(r=(i=e.continuations[0])==null?void 0:i.reloadContinuationData)==null?void 0:r.continuation,this.client_messages={reconnect_message:new f(e.clientMessages.reconnectMessage),unable_to_reconnect_message:new f(e.clientMessages.unableToReconnectMessage),fatal_error:new f(e.clientMessages.fatalError),reconnected_message:new f(e.clientMessages.reconnectedMessage),generic_error:new f(e.clientMessages.genericError)},this.is_replay=!!e.isReplay}};a(nm,"LiveChat");n(nm,"type","LiveChat");var MS=nm,sm=class extends m{constructor(e){super(),n(this,"text"),n(this,"icon_type"),n(this,"context_menu_button"),this.text=new f(e.text),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType),this.context_menu_button=v.parseItem(e.contextMenuButton,L)}};a(sm,"LiveChatBannerHeader");n(sm,"type","LiveChatBannerHeader");var RS=sm,om=class extends m{constructor(e){super(),n(this,"header"),n(this,"contents"),n(this,"action_id"),n(this,"viewer_is_creator"),n(this,"target_id"),n(this,"is_stackable"),n(this,"background_type"),n(this,"banner_type"),n(this,"banner_properties_is_ephemeral"),n(this,"banner_properties_auto_collapse_delay_seconds"),this.header=v.parseItem(e.header,RS),this.contents=v.parseItem(e.contents),this.action_id=e.actionId,Reflect.has(e,"viewerIsCreator")&&(this.viewer_is_creator=e.viewerIsCreator),this.target_id=e.targetId,this.is_stackable=e.isStackable,Reflect.has(e,"backgroundType")&&(this.background_type=e.backgroundType),this.banner_type=e.bannerType,Reflect.has(e,"bannerProperties")&&Reflect.has(e.bannerProperties,"isEphemeral")&&(this.banner_properties_is_ephemeral=!!e.bannerProperties.isEphemeral),Reflect.has(e,"bannerProperties")&&Reflect.has(e.bannerProperties,"autoCollapseDelay")&&Reflect.has(e.bannerProperties.autoCollapseDelay,"seconds")&&(this.banner_properties_auto_collapse_delay_seconds=e.bannerProperties.autoCollapseDelay.seconds)}};a(om,"LiveChatBanner");n(om,"type","LiveChatBanner");var DS=om,rm=class extends m{constructor(e){super(),n(this,"banner"),this.banner=v.parseItem(e.bannerRenderer,DS)}};a(rm,"AddBannerToLiveChatCommand");n(rm,"type","AddBannerToLiveChatCommand");var S7=rm,am=class extends m{constructor(e){super(),n(this,"item"),n(this,"client_id"),this.item=v.parseItem(e.item),Reflect.has(e,"clientId")&&(this.client_id=e.clientId)}};a(am,"AddChatItemAction");n(am,"type","AddChatItemAction");var BS=am,lm=class extends m{constructor(e){super(),n(this,"item"),n(this,"duration_sec"),this.item=v.parseItem(e.item),this.duration_sec=e.durationSec}};a(lm,"AddLiveChatTickerItemAction");n(lm,"type","AddLiveChatTickerItemAction");var I7=lm,cm=class extends m{constructor(e){super(),n(this,"client_assigned_id"),this.client_assigned_id=e.clientAssignedId}};a(cm,"DimChatItemAction");n(cm,"type","DimChatItemAction");var E7=cm,um=class extends m{constructor(e){super(),n(this,"text"),n(this,"image_name"),n(this,"image_color"),this.text=f.fromAttributed(e.text),this.image_name=e.image.sources[0].clientResource.imageName,this.image_color=e.image.sources[0].clientResource.imageColor}};a(um,"BumperUserEduContentView");n(um,"type","BumperUserEduContentView");var LS=um,hm=class extends m{constructor(e){super(),n(this,"creator_thumbnail"),n(this,"hearted_icon_name"),n(this,"unhearted_icon_name"),n(this,"unhearted_icon_processor"),n(this,"hearted_hover_text"),n(this,"hearted_accessibility_label"),n(this,"unhearted_accessibility_label"),n(this,"engagement_state_key"),this.creator_thumbnail=x.fromResponse(e.creatorThumbnail),this.hearted_icon_name=e.heartedIcon.sources[0].clientResource.imageName,this.unhearted_icon_name=e.unheartedIcon.sources[0].clientResource.imageName,this.unhearted_icon_processor={border_image_processor:{image_tint:{color:e.unheartedIcon.processor.borderImageProcessor.imageTint.color}}},this.hearted_hover_text=e.heartedHoverText,this.hearted_accessibility_label=e.heartedAccessibilityLabel,this.unhearted_accessibility_label=e.unheartedAccessibilityLabel,this.engagement_state_key=e.engagementStateKey}};a(hm,"CreatorHeartView");n(hm,"type","CreatorHeartView");var VS=hm,dm=class extends m{constructor(e){super(),n(this,"menu_endpoint"),n(this,"moderation_buttons"),n(this,"auto_moderated_item"),n(this,"header_text"),n(this,"timestamp"),n(this,"id"),this.menu_endpoint=new y(e.contextMenuEndpoint),this.moderation_buttons=v.parseArray(e.moderationButtons,L),this.auto_moderated_item=v.parseItem(e.autoModeratedItem),this.header_text=new f(e.headerText),this.timestamp=Math.floor(parseInt(e.timestampUsec)/1e3),this.id=e.id}};a(dm,"LiveChatAutoModMessage");n(dm,"type","LiveChatAutoModMessage");var A7=dm,_m=class extends m{constructor(e){super(),n(this,"id"),n(this,"chat_summary"),n(this,"icon_type"),n(this,"like_feedback_button"),n(this,"dislike_feedback_button"),this.id=e.liveChatSummaryId,this.chat_summary=new f(e.chatSummary),this.icon_type=e.icon.iconType,this.like_feedback_button=v.parseItem(e.likeFeedbackButton,En),this.dislike_feedback_button=v.parseItem(e.dislikeFeedbackButton,En)}};a(_m,"LiveChatBannerChatSummary");n(_m,"type","LiveChatBannerChatSummary");var x7=_m,pm=class extends m{constructor(e){super(),n(this,"poll_question"),n(this,"author_photo"),n(this,"choices"),n(this,"collapsed_state_entity_key"),n(this,"live_chat_poll_state_entity_key"),n(this,"context_menu_button"),this.poll_question=new f(e.pollQuestion),this.author_photo=x.fromResponse(e.authorPhoto),this.choices=e.pollChoices.map(i=>({option_id:i.pollOptionId,text:new f(i.text).toString()})),this.collapsed_state_entity_key=e.collapsedStateEntityKey,this.live_chat_poll_state_entity_key=e.liveChatPollStateEntityKey,this.context_menu_button=v.parseItem(e.contextMenuButton,L)}};a(pm,"LiveChatBannerPoll");n(pm,"type","LiveChatBannerPoll");var P7=pm,fm=class extends m{constructor(e){super(),n(this,"banner_message"),n(this,"author_photo"),n(this,"inline_action_button"),n(this,"context_menu_button"),this.banner_message=new f(e.bannerMessage),this.author_photo=x.fromResponse(e.authorPhoto),this.inline_action_button=v.parseItem(e.inlineActionButton,L),this.context_menu_button=v.parseItem(e.contextMenuButton,L)}};a(fm,"LiveChatBannerRedirect");n(fm,"type","LiveChatBannerRedirect");var M7=fm,mm=class extends m{constructor(e){super(),n(this,"content"),this.content=v.parseItem(e.content,LS)}};a(mm,"LiveChatItemBumperView");n(mm,"type","LiveChatItemBumperView");var OS=mm,vm=class extends m{constructor(e){super(),n(this,"id"),n(this,"timestamp"),n(this,"timestamp_usec"),n(this,"timestamp_text"),n(this,"header_primary_text"),n(this,"header_subtext"),n(this,"message"),n(this,"author"),n(this,"menu_endpoint"),n(this,"context_menu_accessibility_label"),this.id=e.id,this.timestamp=Math.floor(parseInt(e.timestampUsec)/1e3),this.timestamp_usec=e.timestampUsec,Reflect.has(e,"timestampText")&&(this.timestamp_text=new f(e.timestampText)),Reflect.has(e,"headerPrimaryText")&&(this.header_primary_text=new f(e.headerPrimaryText)),this.header_subtext=new f(e.headerSubtext),Reflect.has(e,"message")&&(this.message=new f(e.message)),this.author=new le(e.authorName,e.authorBadges,e.authorPhoto,e.authorExternalChannelId),this.menu_endpoint=new y(e.contextMenuEndpoint),this.context_menu_accessibility_label=e.contextMenuAccessibility.accessibilityData.label}};a(vm,"LiveChatMembershipItem");n(vm,"type","LiveChatMembershipItem");var R7=vm,bm=class extends m{constructor(e){super(),n(this,"id"),n(this,"icon_type"),n(this,"text"),n(this,"subtext"),n(this,"timestamp"),n(this,"timestamp_usec"),n(this,"timestamp_text"),this.id=e.id,this.icon_type=e.icon.iconType,this.text=new f(e.text),this.subtext=new f(e.subtext),this.timestamp=Math.floor(parseInt(e.timestampUsec)/1e3),this.timestamp_usec=e.timestampUsec,this.timestamp_text=new f(e.timestampText)}};a(bm,"LiveChatModeChangeMessage");n(bm,"type","LiveChatModeChangeMessage");var D7=bm,gm=class extends m{constructor(e){super(),n(this,"reply_button"),n(this,"reply_count_entity_key"),n(this,"reply_count_placeholder"),this.reply_button=v.parseItem(e.replyButton,He),this.reply_count_entity_key=e.replyCountEntityKey,this.reply_count_placeholder=f.fromAttributed(e.replyCountPlaceholder)}};a(gm,"PdgReplyButtonView");n(gm,"type","PdgReplyButtonView");var NS=gm,ym=class extends m{constructor(e){super(),n(this,"id"),n(this,"message"),n(this,"author"),n(this,"author_name_text_color"),n(this,"header_background_color"),n(this,"header_text_color"),n(this,"body_background_color"),n(this,"body_text_color"),n(this,"purchase_amount"),n(this,"menu_endpoint"),n(this,"context_menu_accessibility_label"),n(this,"timestamp"),n(this,"timestamp_usec"),n(this,"timestamp_text"),n(this,"timestamp_color"),n(this,"header_overlay_image"),n(this,"text_input_background_color"),n(this,"lower_bumper"),n(this,"creator_heart_button"),n(this,"is_v2_style"),n(this,"reply_button"),this.id=e.id,this.message=new f(e.message),this.author=new le(e.authorName,e.authorBadges,e.authorPhoto,e.authorExternalChannelId),this.author_name_text_color=e.authorNameTextColor,this.header_background_color=e.headerBackgroundColor,this.header_text_color=e.headerTextColor,this.body_background_color=e.bodyBackgroundColor,this.body_text_color=e.bodyTextColor,this.purchase_amount=new f(e.purchaseAmountText).toString(),this.menu_endpoint=new y(e.contextMenuEndpoint),this.context_menu_accessibility_label=e.contextMenuAccessibility.accessibilityData.label,this.timestamp=Math.floor(parseInt(e.timestampUsec)/1e3),this.timestamp_usec=e.timestampUsec,Reflect.has(e,"timestampText")&&(this.timestamp_text=new f(e.timestampText).toString()),this.timestamp_color=e.timestampColor,Reflect.has(e,"headerOverlayImage")&&(this.header_overlay_image=x.fromResponse(e.headerOverlayImage)),this.text_input_background_color=e.textInputBackgroundColor,this.lower_bumper=v.parseItem(e.lowerBumper,OS),this.creator_heart_button=v.parseItem(e.creatorHeartButton,VS),this.is_v2_style=e.isV2Style,this.reply_button=v.parseItem(e.replyButton,NS)}};a(ym,"LiveChatPaidMessage");n(ym,"type","LiveChatPaidMessage");var B7=ym,wm=class extends m{constructor(e){super(),n(this,"id"),n(this,"author"),n(this,"money_chip_background_color"),n(this,"money_chip_text_color"),n(this,"background_color"),n(this,"author_name_text_color"),n(this,"sticker"),n(this,"sticker_accessibility_label"),n(this,"sticker_display_width"),n(this,"sticker_display_height"),n(this,"purchase_amount"),n(this,"menu_endpoint"),n(this,"context_menu"),n(this,"context_menu_accessibility_label"),n(this,"timestamp"),n(this,"timestamp_usec"),n(this,"is_v2_style"),this.id=e.id,this.author=new le(e.authorName,e.authorBadges,e.authorPhoto,e.authorExternalChannelId),this.money_chip_background_color=e.moneyChipBackgroundColor,this.money_chip_text_color=e.moneyChipTextColor,this.background_color=e.backgroundColor,this.author_name_text_color=e.authorNameTextColor,this.sticker=x.fromResponse(e.sticker),this.sticker_accessibility_label=e.sticker.accessibility.accessibilityData.label,this.sticker_display_width=e.stickerDisplayWidth,this.sticker_display_height=e.stickerDisplayHeight,this.purchase_amount=new f(e.purchaseAmountText).toString(),this.menu_endpoint=new y(e.contextMenuEndpoint),this.context_menu=this.menu_endpoint,this.context_menu_accessibility_label=e.contextMenuAccessibility.accessibilityData.label,this.timestamp=Math.floor(parseInt(e.timestampUsec)/1e3),this.timestamp_usec=e.timestampUsec,this.is_v2_style=e.isV2Style}};a(wm,"LiveChatPaidSticker");n(wm,"type","LiveChatPaidSticker");var L7=wm,km=class extends m{constructor(e){super(),n(this,"id"),n(this,"timestamp"),this.id=e.id,this.timestamp=Math.floor(parseInt(e.timestampUsec)/1e3)}};a(km,"LiveChatPlaceholderItem");n(km,"type","LiveChatPlaceholderItem");var V7=km,Cm=class extends m{constructor(e){super(),n(this,"title"),n(this,"accessibility_title"),n(this,"thumbnail"),n(this,"price"),n(this,"vendor_name"),n(this,"from_vendor_text"),n(this,"information_button"),n(this,"endpoint"),n(this,"creator_message"),n(this,"creator_name"),n(this,"author_photo"),n(this,"information_dialog"),n(this,"is_verified"),n(this,"creator_custom_message"),this.title=e.title,this.accessibility_title=e.accessibilityTitle,this.thumbnail=x.fromResponse(e.thumbnail),this.price=e.price,this.vendor_name=e.vendorName,this.from_vendor_text=e.fromVendorText,this.information_button=v.parseItem(e.informationButton),this.endpoint=new y(e.onClickCommand),this.creator_message=e.creatorMessage,this.creator_name=e.creatorName,this.author_photo=x.fromResponse(e.authorPhoto),this.information_dialog=v.parseItem(e.informationDialog),this.is_verified=e.isVerified,this.creator_custom_message=new f(e.creatorCustomMessage)}};a(Cm,"LiveChatProductItem");n(Cm,"type","LiveChatProductItem");var O7=Cm,Tm=class extends m{constructor(e){super(),n(this,"message"),n(this,"icon_type"),this.message=new f(e.message),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType)}};a(Tm,"LiveChatRestrictedParticipation");n(Tm,"type","LiveChatRestrictedParticipation");var N7=Tm,Sm=class extends Mn{constructor(e){super(e),n(this,"custom_thumbnail"),this.custom_thumbnail=x.fromResponse(e.customThumbnail)}};a(Sm,"LiveChatAuthorBadge");n(Sm,"type","LiveChatAuthorBadge");var FS=Sm,Im=class extends m{constructor(e){super(),n(this,"author_name"),n(this,"author_photo"),n(this,"author_badges"),n(this,"primary_text"),n(this,"menu_endpoint"),n(this,"context_menu_accessibility_label"),n(this,"image"),this.author_name=new f(e.authorName),this.author_photo=x.fromResponse(e.authorPhoto),this.author_badges=v.parseArray(e.authorBadges,FS),this.primary_text=new f(e.primaryText),this.menu_endpoint=new y(e.contextMenuEndpoint),this.context_menu_accessibility_label=e.contextMenuAccessibility.accessibilityData.label,this.image=x.fromResponse(e.image)}};a(Im,"LiveChatSponsorshipsHeader");n(Im,"type","LiveChatSponsorshipsHeader");var US=Im,Em=class extends m{constructor(e){super(),n(this,"id"),n(this,"timestamp_usec"),n(this,"author_external_channel_id"),n(this,"header"),this.id=e.id,this.timestamp_usec=e.timestampUsec,this.author_external_channel_id=e.authorExternalChannelId,this.header=v.parseItem(e.header,US)}};a(Em,"LiveChatSponsorshipsGiftPurchaseAnnouncement");n(Em,"type","LiveChatSponsorshipsGiftPurchaseAnnouncement");var F7=Em,Am=class extends m{constructor(e){super(),n(this,"id"),n(this,"timestamp_usec"),n(this,"timestamp_text"),n(this,"author"),n(this,"message"),n(this,"menu_endpoint"),n(this,"context_menu_accessibility_label"),this.id=e.id,this.timestamp_usec=e.timestampUsec,this.timestamp_text=new f(e.timestampText),this.author=new le(e.authorName,e.authorBadges,e.authorPhoto,e.authorExternalChannelId),this.message=new f(e.message),this.menu_endpoint=new y(e.contextMenuEndpoint),this.context_menu_accessibility_label=e.contextMenuAccessibility.accessibilityData.label}};a(Am,"LiveChatSponsorshipsGiftRedemptionAnnouncement");n(Am,"type","LiveChatSponsorshipsGiftRedemptionAnnouncement");var U7=Am,xm=class extends m{constructor(e){super(),n(this,"id"),n(this,"message"),n(this,"inline_action_buttons"),n(this,"timestamp"),n(this,"timestamp_usec"),n(this,"timestamp_text"),n(this,"author"),n(this,"menu_endpoint"),n(this,"context_menu_accessibility_label"),n(this,"before_content_buttons"),this.id=e.id,this.message=new f(e.message),this.inline_action_buttons=v.parseArray(e.inlineActionButtons,L),this.timestamp=Math.floor(parseInt(e.timestampUsec)/1e3),this.timestamp_usec=e.timestampUsec,Reflect.has(e,"timestampText")&&(this.timestamp_text=new f(e.timestampText).toString()),this.author=new le(e.authorName,e.authorBadges,e.authorPhoto,e.authorExternalChannelId),Reflect.has(e,"contextMenuEndpoint")&&(this.menu_endpoint=new y(e.contextMenuEndpoint)),Reflect.has(e,"contextMenuAccessibility")&&Reflect.has(e.contextMenuAccessibility,"accessibilityData")&&Reflect.has(e.contextMenuAccessibility.accessibilityData,"label")&&(this.context_menu_accessibility_label=e.contextMenuAccessibility.accessibilityData.label),this.before_content_buttons=v.parseArray(e.beforeContentButtons,He)}};a(xm,"LiveChatTextMessage");n(xm,"type","LiveChatTextMessage");var H7=xm,Pm=class extends m{constructor(e){var i,r;super(),n(this,"id"),n(this,"author"),n(this,"amount"),n(this,"amount_text_color"),n(this,"start_background_color"),n(this,"end_background_color"),n(this,"duration_sec"),n(this,"full_duration_sec"),n(this,"show_item"),n(this,"show_item_endpoint"),n(this,"animation_origin"),n(this,"open_engagement_panel_command"),this.id=e.id,this.author=new le(e.authorName||e.authorUsername,e.authorBadges,e.authorPhoto,e.authorExternalChannelId),Reflect.has(e,"amount")&&(this.amount=new f(e.amount)),this.amount_text_color=e.amountTextColor,this.start_background_color=e.startBackgroundColor,this.end_background_color=e.endBackgroundColor,this.duration_sec=e.durationSec,this.full_duration_sec=e.fullDurationSec,this.show_item=v.parseItem((r=(i=e.showItemEndpoint)==null?void 0:i.showLiveChatItemEndpoint)==null?void 0:r.renderer),this.show_item_endpoint=new y(e.showItemEndpoint),this.animation_origin=e.animationOrigin,this.open_engagement_panel_command=new y(e.openEngagementPanelCommand)}};a(Pm,"LiveChatTickerPaidMessageItem");n(Pm,"type","LiveChatTickerPaidMessageItem");var W7=Pm,Mm=class extends m{constructor(e){var i,r;super(),n(this,"id"),n(this,"author_external_channel_id"),n(this,"author_photo"),n(this,"start_background_color"),n(this,"end_background_color"),n(this,"duration_sec"),n(this,"full_duration_sec"),n(this,"show_item"),n(this,"show_item_endpoint"),n(this,"ticker_thumbnails"),this.id=e.id,this.author_external_channel_id=e.authorExternalChannelId,this.author_photo=x.fromResponse(e.authorPhoto),this.start_background_color=e.startBackgroundColor,this.end_background_color=e.endBackgroundColor,this.duration_sec=e.durationSec,this.full_duration_sec=e.fullDurationSec,this.show_item=v.parseItem((r=(i=e.showItemEndpoint)==null?void 0:i.showLiveChatItemEndpoint)==null?void 0:r.renderer),this.show_item_endpoint=new y(e.showItemEndpoint),this.ticker_thumbnails=e.tickerThumbnails.map(o=>{var s,l;return{thumbnails:x.fromResponse(o),label:(l=(s=o?.accessibility)==null?void 0:s.accessibilityData)==null?void 0:l.label}})}};a(Mm,"LiveChatTickerPaidStickerItem");n(Mm,"type","LiveChatTickerPaidStickerItem");var q7=Mm,Rm=class extends m{constructor(e){super(),n(this,"id"),n(this,"detail"),n(this,"author"),n(this,"duration_sec"),this.id=e.id,this.detail=new f(e.detailText),this.author=new le(e.authorName,e.authorBadges,e.sponsorPhoto,e.authorExternalChannelId),this.duration_sec=e.durationSec}};a(Rm,"LiveChatTickerSponsorItem");n(Rm,"type","LiveChatTickerSponsorItem");var j7=Rm,Dm=class extends m{constructor(e){super(),n(this,"id"),n(this,"timestamp"),n(this,"timestamp_usec"),n(this,"icon_type"),n(this,"message"),n(this,"action_button"),n(this,"menu_endpoint"),n(this,"context_menu_accessibility_label"),this.id=e.id,Reflect.has(e,"timestampUsec")&&(this.timestamp=Math.floor(parseInt(e.timestampUsec)/1e3),this.timestamp_usec=e.timestampUsec),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType),this.message=new f(e.message),this.action_button=v.parseItem(e.actionButton),Reflect.has(e,"contextMenuEndpoint")&&(this.menu_endpoint=new y(e.contextMenuEndpoint)),Reflect.has(e,"contextMenuAccessibility")&&Reflect.has(e.contextMenuAccessibility,"accessibilityData")&&Reflect.has(e.contextMenuAccessibility.accessibilityData,"label")&&(this.context_menu_accessibility_label=e.contextMenuAccessibility.accessibilityData.label)}};a(Dm,"LiveChatViewerEngagementMessage");n(Dm,"type","LiveChatViewerEngagementMessage");var G7=Dm,Bm=class extends m{constructor(e){super(),n(this,"poll_question"),n(this,"thumbnails"),n(this,"metadata"),n(this,"live_chat_poll_type"),n(this,"context_menu_button"),this.poll_question=new f(e.pollQuestion),this.thumbnails=x.fromResponse(e.thumbnail),this.metadata=new f(e.metadataText),this.live_chat_poll_type=e.liveChatPollType,this.context_menu_button=v.parseItem(e.contextMenuButton,L)}};a(Bm,"PollHeader");n(Bm,"type","PollHeader");var K7=Bm,Lm=class extends m{constructor(e){super(),n(this,"id"),n(this,"contents"),n(this,"target_id"),this.id=e.id,this.contents=v.parse(e.contents),this.target_id=e.targetId}};a(Lm,"LiveChatActionPanel");n(Lm,"type","LiveChatActionPanel");var HS=Lm,Vm=class extends m{constructor(e){super(),n(this,"deleted_state_message"),n(this,"target_item_id"),this.deleted_state_message=new f(e.deletedStateMessage),this.target_item_id=e.targetItemId}};a(Vm,"MarkChatItemAsDeletedAction");n(Vm,"type","MarkChatItemAsDeletedAction");var Y7=Vm,Om=class extends m{constructor(e){super(),n(this,"deleted_state_message"),n(this,"external_channel_id"),this.deleted_state_message=new f(e.deletedStateMessage),this.external_channel_id=e.externalChannelId}};a(Om,"MarkChatItemsByAuthorAsDeletedAction");n(Om,"type","MarkChatItemsByAuthorAsDeletedAction");var z7=Om,Nm=class extends m{constructor(e){super(),n(this,"target_action_id"),this.target_action_id=e.targetActionId}};a(Nm,"RemoveBannerForLiveChatCommand");n(Nm,"type","RemoveBannerForLiveChatCommand");var $7=Nm,Fm=class extends m{constructor(e){super(),n(this,"target_item_id"),this.target_item_id=e.targetItemId}};a(Fm,"RemoveChatItemAction");n(Fm,"type","RemoveChatItemAction");var J7=Fm,Um=class extends m{constructor(e){super(),n(this,"external_channel_id"),this.external_channel_id=e.externalChannelId}};a(Um,"RemoveChatItemByAuthorAction");n(Um,"type","RemoveChatItemByAuthorAction");var X7=Um,Hm=class extends m{constructor(e){super(),n(this,"target_item_id"),n(this,"replacement_item"),this.target_item_id=e.targetItemId,this.replacement_item=v.parseItem(e.replacementItem)}};a(Hm,"ReplaceChatItemAction");n(Hm,"type","ReplaceChatItemAction");var Q7=Hm,Wm=class extends m{constructor(e){super(),n(this,"to_replace"),n(this,"replacement"),this.to_replace=e.toReplace,this.replacement=v.parseItem(e.replacement)}};a(Wm,"ReplaceLiveChatAction");n(Wm,"type","ReplaceLiveChatAction");var Z7=Wm,qm=class extends m{constructor(e){var i;super(),n(this,"actions"),n(this,"video_offset_time_msec"),this.actions=v.parseArray((i=e.actions)==null?void 0:i.map(r=>(delete r.clickTrackingParams,r))),this.video_offset_time_msec=e.videoOffsetTimeMsec}};a(qm,"ReplayChatItemAction");n(qm,"type","ReplayChatItemAction");var e5=qm,jm=class extends m{constructor(e){super(),n(this,"panel_to_show"),this.panel_to_show=v.parseItem(e.panelToShow,HS)}};a(jm,"ShowLiveChatActionPanelAction");n(jm,"type","ShowLiveChatActionPanelAction");var t5=jm,Gm=class extends m{constructor(e){super(),n(this,"dialog"),this.dialog=v.parseItem(e.dialog)}};a(Gm,"ShowLiveChatDialogAction");n(Gm,"type","ShowLiveChatDialogAction");var i5=Gm,Km=class extends m{constructor(e){super(),n(this,"tooltip"),this.tooltip=v.parseItem(e.tooltip)}};a(Km,"ShowLiveChatTooltipCommand");n(Km,"type","ShowLiveChatTooltipCommand");var n5=Km,Ym=class extends m{constructor(e){super(),n(this,"date_text"),this.date_text=new f(e.dateText).toString()}};a(Ym,"UpdateDateTextAction");n(Ym,"type","UpdateDateTextAction");var WS=Ym,zm=class extends m{constructor(e){super(),n(this,"description"),this.description=new f(e.description)}};a(zm,"UpdateDescriptionAction");n(zm,"type","UpdateDescriptionAction");var qS=zm,$m=class extends m{constructor(e){super(),n(this,"poll_to_update"),this.poll_to_update=v.parseItem(e.pollToUpdate)}};a($m,"UpdateLiveChatPollAction");n($m,"type","UpdateLiveChatPollAction");var s5=$m,Jm=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(Jm,"UpdateTitleAction");n(Jm,"type","UpdateTitleAction");var jS=Jm,Xm=class extends m{constructor(e){super(),n(this,"default_text"),n(this,"toggled_text"),n(this,"button_id"),this.default_text=new f(e.defaultText).toString(),this.toggled_text=new f(e.toggledText).toString(),this.button_id=e.buttonId}};a(Xm,"UpdateToggleButtonTextAction");n(Xm,"type","UpdateToggleButtonTextAction");var GS=Xm,Qm=class extends m{constructor(e){super(),n(this,"original_view_count"),n(this,"unlabeled_view_count_value"),n(this,"short_view_count"),n(this,"extra_short_view_count"),n(this,"view_count"),n(this,"is_live"),"originalViewCount"in e&&(this.original_view_count=parseInt(e.originalViewCount)),"unlabeledViewCountValue"in e&&(this.unlabeled_view_count_value=new f(e.unlabeledViewCountValue)),"shortViewCount"in e&&(this.short_view_count=new f(e.shortViewCount)),"extraShortViewCount"in e&&(this.extra_short_view_count=new f(e.extraShortViewCount)),"viewCount"in e&&(this.view_count=new f(e.viewCount)),this.is_live=!!e.isLive}};a(Qm,"VideoViewCount");n(Qm,"type","VideoViewCount");var Zm=Qm,e2=class extends m{constructor(e){super(),n(this,"view_count_node"),this.view_count_node=v.parseItem(e.viewCount,Zm)}get view_count(){var e;return(e=this.view_count_node)==null?void 0:e.view_count}get extra_short_view_count(){var e;return(e=this.view_count_node)==null?void 0:e.extra_short_view_count}get short_view_count(){var e;return(e=this.view_count_node)==null?void 0:e.short_view_count}get original_view_count(){var e;return(e=this.view_count_node)==null?void 0:e.original_view_count}get unlabeled_view_count_value(){var e;return(e=this.view_count_node)==null?void 0:e.unlabeled_view_count_value}get is_live(){var e;return(e=this.view_count_node)==null?void 0:e.is_live}};a(e2,"UpdateViewershipAction");n(e2,"type","UpdateViewershipAction");var KS=e2,t2=class extends m{constructor(e){super(),n(this,"confirm_button"),n(this,"dialog_messages"),this.confirm_button=v.parseItem(e.confirmButton,L),this.dialog_messages=e.dialogMessages.map(i=>new f(i))}};a(t2,"LiveChatDialog");n(t2,"type","LiveChatDialog");var o5=t2,i2=class extends m{constructor(e){super(),n(this,"overflow_menu"),n(this,"collapse_button"),n(this,"view_selector"),this.overflow_menu=v.parseItem(e.overflowMenu,ye),this.collapse_button=v.parseItem(e.collapseButton,L),this.view_selector=v.parseItem(e.viewSelector,hs)}};a(i2,"LiveChatHeader");n(i2,"type","LiveChatHeader");var YS=i2,n2=class extends m{constructor(e){super(),n(this,"max_items_to_display"),n(this,"more_comments_below_button"),this.max_items_to_display=e.maxItemsToDisplay,this.more_comments_below_button=v.parseItem(e.moreCommentsBelowButton,L)}};a(n2,"LiveChatItemList");n(n2,"type","LiveChatItemList");var zS=n2,s2=class extends m{constructor(e){super(),n(this,"author_name"),n(this,"author_photo"),n(this,"send_button"),n(this,"target_id"),this.author_name=new f(e.authorName),this.author_photo=x.fromResponse(e.authorPhoto),this.send_button=v.parseItem(e.sendButton,L),this.target_id=e.targetId}};a(s2,"LiveChatMessageInput");n(s2,"type","LiveChatMessageInput");var r5=s2,o2=class extends m{constructor(e){super(),n(this,"name"),n(this,"photo"),n(this,"badges"),this.name=new f(e.authorName),this.photo=x.fromResponse(e.authorPhoto),this.badges=v.parseArray(e.authorBadges)}};a(o2,"LiveChatParticipant");n(o2,"type","LiveChatParticipant");var $S=o2,r2=class extends m{constructor(e){super(),n(this,"title"),n(this,"participants"),this.title=new f(e.title),this.participants=v.parseArray(e.participants,$S)}};a(r2,"LiveChatParticipantsList");n(r2,"type","LiveChatParticipantsList");var JS=r2,a2=class extends m{constructor(e){super(),n(this,"title"),n(this,"metadata"),n(this,"image"),n(this,"menu_button"),this.title=f.fromAttributed(e.title),this.metadata=v.parseItem(e.metadata,G_),this.image=v.parseItem(e.image,[tp,Lu]),this.menu_button=v.parseItem(e.menuButton,He)}};a(a2,"LockupMetadataView");n(a2,"type","LockupMetadataView");var XS=a2,l2=class extends m{constructor(e){super(),n(this,"content_image"),n(this,"metadata"),n(this,"content_id"),n(this,"content_type"),n(this,"renderer_context"),this.content_image=v.parseItem(e.contentImage,[LT,l_]),this.metadata=v.parseItem(e.metadata,XS),this.content_id=e.contentId,this.content_type=e.contentType.replace("LOCKUP_CONTENT_TYPE_",""),this.renderer_context=new Jt(e.rendererContext)}};a(l2,"LockupView");n(l2,"type","LockupView");var ss=l2,c2=class extends m{constructor(e){var i,r,o,s,l,c;super(),n(this,"marker_entity_key"),n(this,"external_video_id"),n(this,"marker_type"),n(this,"markers"),n(this,"max_height_dp"),n(this,"min_height_dp"),n(this,"show_hide_animation_duration_millis"),n(this,"timed_marker_decorations"),n(this,"raw_api_markers"),n(this,"raw_api_decorations"),this.marker_entity_key=e.key,this.external_video_id=e.externalVideoId,this.marker_type=((i=e.markersList)==null?void 0:i.markerType)||"",this.raw_api_markers=((r=e.markersList)==null?void 0:r.markers)||[],this.raw_api_decorations=((s=(o=e.markersList)==null?void 0:o.markersDecoration)==null?void 0:s.timedMarkerDecorations)||[],this.markers=te(this.raw_api_markers.map(d=>new np(d)));let u=(c=(l=e.markersList)==null?void 0:l.markersMetadata)==null?void 0:c.heatmapMetadata;this.max_height_dp=u?.maxHeightDp||40,this.min_height_dp=u?.minHeightDp||4,this.show_hide_animation_duration_millis=u?.showHideAnimationDurationMillis||200,this.timed_marker_decorations=te(this.raw_api_decorations.map(d=>new op(d)))}isHeatmap(){return this.marker_type==="MARKER_TYPE_HEATMAP"}toHeatmap(){if(!this.isHeatmap())return null;let e=this.raw_api_markers.map(o=>({HeatMarker:o})),i=this.raw_api_decorations.map(o=>({TimedMarkerDecoration:o})),r={maxHeightDp:this.max_height_dp,minHeightDp:this.min_height_dp,showHideAnimationDurationMillis:this.show_hide_animation_duration_millis,heatMarkers:e,heatMarkersDecorations:i};return Ce({Heatmap:r},ap)}};a(c2,"MacroMarkersListEntity");n(c2,"type","MacroMarkersListEntity");var u2=c2,h2=class extends L{constructor(e){super(e)}};a(h2,"MenuNavigationItem");n(h2,"type","MenuNavigationItem");var QS=h2,d2=class extends m{constructor(e){super(),n(this,"items"),this.items=v.parseArray(e.items,[QS,is])}};a(d2,"MenuPopup");n(d2,"type","MenuPopup");var a5=d2,_2=class extends m{constructor(e){super(),n(this,"thumbnails"),n(this,"video_thumbnails"),n(this,"short_message"),n(this,"sent_time"),n(this,"notification_id"),n(this,"endpoint"),n(this,"record_click_endpoint"),n(this,"menu"),n(this,"read"),this.thumbnails=x.fromResponse(e.thumbnail),this.video_thumbnails=x.fromResponse(e.videoThumbnail),this.short_message=new f(e.shortMessage),this.sent_time=new f(e.sentTimeText),this.notification_id=e.notificationId,this.endpoint=new y(e.navigationEndpoint),this.record_click_endpoint=new y(e.recordClickEndpoint),this.menu=v.parseItem(e.contextualMenu),this.read=e.read}};a(_2,"Notification");n(_2,"type","Notification");var p2=_2,f2=class extends m{constructor(e){super(),n(this,"notification_section_title"),n(this,"items"),"notificationSectionTitle"in e&&(this.notification_section_title=new f(e.notificationSectionTitle)),this.items=v.parseArray(e.items,[p2,ui,Se])}get contents(){return this.items}};a(f2,"MultiPageMenuNotificationSection");n(f2,"type","MultiPageMenuNotificationSection");var l5=f2,m2=class extends m{constructor(e){super()}};a(m2,"MusicMenuItemDivider");n(m2,"type","MusicMenuItemDivider");var ZS=m2,v2=class extends m{constructor(e){super(),n(this,"title"),n(this,"form_item_entity_key"),n(this,"selected_icon_type"),n(this,"endpoint"),n(this,"selected"),this.title=new f(e.title).toString(),this.form_item_entity_key=e.formItemEntityKey,Reflect.has(e,"selectedIcon")&&(this.selected_icon_type=e.selectedIcon.iconType),Reflect.has(e,"selectedCommand")&&(this.endpoint=new y(e.selectedCommand)),this.selected=!!this.endpoint}};a(v2,"MusicMultiSelectMenuItem");n(v2,"type","MusicMultiSelectMenuItem");var os=v2,b2=class extends m{constructor(e){var i;super(),n(this,"title"),n(this,"options"),Reflect.has(e,"title")&&Reflect.has(e.title,"musicMenuTitleRenderer")&&(this.title=new f((i=e.title.musicMenuTitleRenderer)==null?void 0:i.primaryText)),this.options=v.parseArray(e.options,[os,ZS])}};a(b2,"MusicMultiSelectMenu");n(b2,"type","MusicMultiSelectMenu");var eI=b2,g2=class extends m{constructor(e){super(),n(this,"title"),n(this,"buttons"),this.title=new f(e.title),this.buttons=v.parseArray(e.buttons,L)}};a(g2,"SimpleMenuHeader");n(g2,"type","SimpleMenuHeader");var tI=g2,y2=class extends m{constructor(e){super(),n(this,"title"),n(this,"description"),n(this,"thumbnails"),n(this,"price"),n(this,"vendor_name"),n(this,"button_text"),n(this,"button_accessibility_text"),n(this,"from_vendor_text"),n(this,"additional_fees_text"),n(this,"region_format"),n(this,"endpoint"),this.title=e.title,this.description=e.description,this.thumbnails=x.fromResponse(e.thumbnail),this.price=e.price,this.vendor_name=e.vendorName,this.button_text=e.buttonText,this.button_accessibility_text=e.buttonAccessibilityText,this.from_vendor_text=e.fromVendorText,this.additional_fees_text=e.additionalFeesText,this.region_format=e.regionFormat,this.endpoint=new y(e.buttonCommand)}};a(y2,"MerchandiseItem");n(y2,"type","MerchandiseItem");var c5=y2,w2=class extends m{constructor(e){super(),n(this,"title"),n(this,"contents"),this.title=new f(e.title),this.contents=e.contents.map(i=>new f(i))}};a(w2,"MetadataRow");n(w2,"type","MetadataRow");var u5=w2,k2=class extends m{constructor(e){super(),n(this,"rows"),n(this,"collapsed_item_count"),this.rows=v.parseArray(e.rows),this.collapsed_item_count=e.collapsedItemCount}};a(k2,"MetadataRowContainer");n(k2,"type","MetadataRowContainer");var iI=k2,C2=class extends m{constructor(e){super(),n(this,"content"),n(this,"has_divider_line"),this.content=new f(e.content),this.has_divider_line=e.hasDividerLine}};a(C2,"MetadataRowHeader");n(C2,"type","MetadataRowHeader");var h5=C2,T2=class extends m{constructor(e){super(),n(this,"section_list"),this.section_list=v.parseItem(e)}};a(T2,"MetadataScreen");n(T2,"type","MetadataScreen");var d5=T2,S2=class extends m{constructor(e){super(),n(this,"url_canonical"),n(this,"title"),n(this,"description"),n(this,"thumbnail"),n(this,"site_name"),n(this,"app_name"),n(this,"android_package"),n(this,"ios_app_store_id"),n(this,"ios_app_arguments"),n(this,"og_type"),n(this,"url_applinks_web"),n(this,"url_applinks_ios"),n(this,"url_applinks_android"),n(this,"url_twitter_ios"),n(this,"url_twitter_android"),n(this,"twitter_card_type"),n(this,"twitter_site_handle"),n(this,"schema_dot_org_type"),n(this,"noindex"),n(this,"is_unlisted"),n(this,"is_family_safe"),n(this,"tags"),n(this,"available_countries"),this.url_canonical=e.urlCanonical,this.title=e.title,this.description=e.description,this.thumbnail=x.fromResponse(e.thumbnail),this.site_name=e.siteName,this.app_name=e.appName,this.android_package=e.androidPackage,this.ios_app_store_id=e.iosAppStoreId,this.ios_app_arguments=e.iosAppArguments,this.og_type=e.ogType,this.url_applinks_web=e.urlApplinksWeb,this.url_applinks_ios=e.urlApplinksIos,this.url_applinks_android=e.urlApplinksAndroid,this.url_twitter_ios=e.urlTwitterIos,this.url_twitter_android=e.urlTwitterAndroid,this.twitter_card_type=e.twitterCardType,this.twitter_site_handle=e.twitterSiteHandle,this.schema_dot_org_type=e.schemaDotOrgType,this.noindex=e.noindex,this.is_unlisted=e.unlisted,this.is_family_safe=e.familySafe,this.tags=e.tags,this.available_countries=e.availableCountries}};a(S2,"MicroformatData");n(S2,"type","MicroformatData");var rs=S2,I2=class extends Ro{constructor(e){super(e)}};a(I2,"Mix");n(I2,"type","Mix");var _5=I2,E2=class extends m{constructor(e){super(),n(this,"title"),n(this,"content"),n(this,"button"),this.title=new f(e.title),this.content=new f(e.content),this.button=v.parseItem(e.button,L)}};a(E2,"ModalWithTitleAndButton");n(E2,"type","ModalWithTitleAndButton");var p5=E2,A2=class extends m{constructor(e){var i,r,o;super(),n(this,"id"),n(this,"title"),n(this,"description_snippet"),n(this,"top_metadata_items"),n(this,"thumbnails"),n(this,"thumbnail_overlays"),n(this,"author"),n(this,"duration"),n(this,"endpoint"),n(this,"badges"),n(this,"use_vertical_poster"),n(this,"show_action_menu"),n(this,"menu");let s=((i=e.thumbnailOverlays.find(l=>l.thumbnailOverlayTimeStatusRenderer))==null?void 0:i.thumbnailOverlayTimeStatusRenderer.text)||"N/A";this.id=e.videoId,this.title=new f(e.title),Reflect.has(e,"descriptionSnippet")&&(this.description_snippet=new f(e.descriptionSnippet)),this.top_metadata_items=new f(e.topMetadataItems),this.thumbnails=x.fromResponse(e.thumbnail),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),this.author=new le(e.longBylineText,e.ownerBadges,(o=(r=e.channelThumbnailSupportedRenderers)==null?void 0:r.channelThumbnailWithLinkRenderer)==null?void 0:o.thumbnail),this.duration={text:e.lengthText?new f(e.lengthText).toString():new f(s).toString(),seconds:Xt(e.lengthText?new f(e.lengthText).toString():new f(s).toString())},this.endpoint=new y(e.navigationEndpoint),this.badges=v.parseArray(e.badges),this.use_vertical_poster=e.useVerticalPoster,this.show_action_menu=e.showActionMenu,this.menu=v.parseItem(e.menu,ye)}};a(A2,"Movie");n(A2,"type","Movie");var f5=A2,x2=class extends m{constructor(e){var i;return super(),(i=e.movingThumbnailDetails)==null?void 0:i.thumbnails.map(r=>new x(r)).sort((r,o)=>o.width-r.width)}};a(x2,"MovingThumbnail");n(x2,"type","MovingThumbnail");var m5=x2,P2=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(P2,"MusicCardShelfHeaderBasic");n(P2,"type","MusicCardShelfHeaderBasic");var nI=P2,M2=class extends m{constructor(e){super(),n(this,"icon_type"),n(this,"accessibility"),this.icon_type=e.icon.iconType,"accessibilityData"in e&&"accessibilityData"in e.accessibilityData&&(this.accessibility={accessibility_data:new zt(e.accessibilityData.accessibilityData)})}get label(){var e,i;return(i=(e=this.accessibility)==null?void 0:e.accessibility_data)==null?void 0:i.label}};a(M2,"MusicInlineBadge");n(M2,"type","MusicInlineBadge");var R2=M2,D2=class extends m{constructor(e){super(),n(this,"endpoint"),n(this,"play_icon_type"),n(this,"pause_icon_type"),n(this,"icon_color"),n(this,"accessibility_play_data"),n(this,"accessibility_pause_data"),this.endpoint=new y(e.playNavigationEndpoint),this.play_icon_type=e.playIcon.iconType,this.pause_icon_type=e.pauseIcon.iconType,"accessibilityPlayData"in e&&"accessibilityData"in e.accessibilityPlayData&&(this.accessibility_play_data={accessibility_data:new zt(e.accessibilityPlayData.accessibilityData)}),"accessibilityPauseData"in e&&"accessibilityData"in e.accessibilityPauseData&&(this.accessibility_pause_data={accessibility_data:new zt(e.accessibilityPauseData.accessibilityData)}),this.icon_color=e.iconColor}get play_label(){var e,i;return(i=(e=this.accessibility_play_data)==null?void 0:e.accessibility_data)==null?void 0:i.label}get pause_label(){var e,i;return(i=(e=this.accessibility_pause_data)==null?void 0:e.accessibility_data)==null?void 0:i.label}};a(D2,"MusicPlayButton");n(D2,"type","MusicPlayButton");var B2=D2,L2=class extends m{constructor(e){super(),n(this,"content"),n(this,"content_position"),n(this,"display_style"),this.content=v.parseItem(e.content,B2),this.content_position=e.contentPosition,this.display_style=e.displayStyle}};a(L2,"MusicItemThumbnailOverlay");n(L2,"type","MusicItemThumbnailOverlay");var Bo=L2,V2=class extends m{constructor(e){super(),n(this,"contents"),this.contents=x.fromResponse(e.thumbnail)}};a(V2,"MusicThumbnail");n(V2,"type","MusicThumbnail");var Ai=V2,O2=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"title"),n(this,"subtitle"),n(this,"buttons"),n(this,"menu"),n(this,"on_tap"),n(this,"header"),n(this,"end_icon_type"),n(this,"subtitle_badges"),n(this,"thumbnail_overlay"),n(this,"contents"),this.thumbnail=v.parseItem(e.thumbnail,Ai),this.title=new f(e.title),this.subtitle=new f(e.subtitle),this.buttons=v.parseArray(e.buttons,L),this.menu=v.parseItem(e.menu,ye),this.on_tap=new y(e.onTap),this.header=v.parseItem(e.header,nI),Reflect.has(e,"endIcon")&&Reflect.has(e.endIcon,"iconType")&&(this.end_icon_type=e.endIcon.iconType),this.subtitle_badges=v.parseArray(e.subtitleBadges,R2),this.thumbnail_overlay=v.parseItem(e.thumbnailOverlay,Bo),Reflect.has(e,"contents")&&(this.contents=v.parseArray(e.contents))}};a(O2,"MusicCardShelf");n(O2,"type","MusicCardShelf");var sI=O2,N2=class extends m{constructor(e){super(),n(this,"title"),n(this,"strapline"),n(this,"thumbnail"),n(this,"more_content"),n(this,"end_icons"),this.title=new f(e.title),Reflect.has(e,"strapline")&&(this.strapline=new f(e.strapline)),Reflect.has(e,"thumbnail")&&(this.thumbnail=v.parseItem(e.thumbnail,Ai)),Reflect.has(e,"moreContentButton")&&(this.more_content=v.parseItem(e.moreContentButton,L)),Reflect.has(e,"endIcons")&&(this.end_icons=v.parseArray(e.endIcons,TS))}};a(N2,"MusicCarouselShelfBasicHeader");n(N2,"type","MusicCarouselShelfBasicHeader");var oI=N2,F2=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"overlay"),n(this,"on_tap"),n(this,"menu"),n(this,"subtitle"),n(this,"title"),n(this,"second_title"),n(this,"description"),n(this,"display_style"),this.thumbnail=v.parseItem(e.thumbnail,Ai),this.overlay=v.parseItem(e.overlay,Bo),this.on_tap=new y(e.onTap),this.menu=v.parseItem(e.menu,ye),this.subtitle=new f(e.subtitle),this.title=new f(e.title),Reflect.has(e,"secondTitle")&&(this.second_title=new f(e.secondTitle)),Reflect.has(e,"description")&&(this.description=new f(e.description)),Reflect.has(e,"displayStyle")&&(this.display_style=e.displayStyle)}};a(F2,"MusicMultiRowListItem");n(F2,"type","MusicMultiRowListItem");var rI=F2,U2=class extends m{constructor(e){super(),n(this,"button_text"),n(this,"endpoint"),this.button_text=new f(e.buttonText).toString(),this.endpoint=new y(e.clickCommand)}};a(U2,"MusicNavigationButton");n(U2,"type","MusicNavigationButton");var H2=U2,W2=class extends m{constructor(e){super(),n(this,"title"),n(this,"display_priority"),this.title=new f(e.text),this.display_priority=e.displayPriority}};a(W2,"MusicResponsiveListItemFixedColumn");n(W2,"type","musicResponsiveListItemFlexColumnRenderer");var aI=W2,q2=class extends m{constructor(e){super(),n(this,"title"),n(this,"display_priority"),this.title=new f(e.text),this.display_priority=e.displayPriority}};a(q2,"MusicResponsiveListItemFlexColumn");n(q2,"type","MusicResponsiveListItemFlexColumn");var lI=q2,vt,j2,cI,uI,hI,dI,_I,pI,fI,mI,vI,G2=class extends m{constructor(e){var i,r,o,s,l,c;super(),M(this,vt),n(this,"flex_columns"),n(this,"fixed_columns"),n(this,"endpoint"),n(this,"item_type"),n(this,"index"),n(this,"thumbnail"),n(this,"badges"),n(this,"menu"),n(this,"overlay"),n(this,"id"),n(this,"title"),n(this,"duration"),n(this,"album"),n(this,"artists"),n(this,"views"),n(this,"authors"),n(this,"name"),n(this,"subtitle"),n(this,"subscribers"),n(this,"song_count"),n(this,"author"),n(this,"item_count"),n(this,"year"),this.flex_columns=v.parseArray(e.flexColumns,lI),this.fixed_columns=v.parseArray(e.fixedColumns,aI);let u={video_id:((i=e?.playlistItemData)==null?void 0:i.videoId)||null,playlist_set_video_id:((r=e?.playlistItemData)==null?void 0:r.playlistSetVideoId)||null};Reflect.has(e,"navigationEndpoint")&&(this.endpoint=new y(e.navigationEndpoint));let d=(c=(l=(s=(o=this.endpoint)==null?void 0:o.payload)==null?void 0:s.browseEndpointContextSupportedConfigs)==null?void 0:l.browseEndpointContextMusicConfig)==null?void 0:c.pageType;switch(d||this.flex_columns.find(_=>{var b,g,C,T;return((T=(C=(g=(b=_.title.endpoint)==null?void 0:b.payload)==null?void 0:g.browseEndpointContextSupportedConfigs)==null?void 0:C.browseEndpointContextMusicConfig)==null?void 0:T.pageType)==="MUSIC_PAGE_TYPE_NON_MUSIC_AUDIO_TRACK_PAGE"})&&(d="MUSIC_PAGE_TYPE_NON_MUSIC_AUDIO_TRACK_PAGE"),d){case"MUSIC_PAGE_TYPE_ALBUM":this.item_type="album",F(this,vt,mI).call(this);break;case"MUSIC_PAGE_TYPE_PLAYLIST":this.item_type="playlist",F(this,vt,vI).call(this);break;case"MUSIC_PAGE_TYPE_ARTIST":case"MUSIC_PAGE_TYPE_USER_CHANNEL":this.item_type="artist",F(this,vt,dI).call(this);break;case"MUSIC_PAGE_TYPE_LIBRARY_ARTIST":this.item_type="library_artist",F(this,vt,_I).call(this);break;case"MUSIC_PAGE_TYPE_NON_MUSIC_AUDIO_TRACK_PAGE":this.item_type="non_music_track",F(this,vt,pI).call(this,u);break;case"MUSIC_PAGE_TYPE_PODCAST_SHOW_DETAIL_PAGE":this.item_type="podcast_show",F(this,vt,fI).call(this);break;default:this.flex_columns[1]?F(this,vt,cI).call(this,u):F(this,vt,j2).call(this)}Reflect.has(e,"index")&&(this.index=new f(e.index)),Reflect.has(e,"thumbnail")&&(this.thumbnail=v.parseItem(e.thumbnail,Ai)),Reflect.has(e,"badges")&&(this.badges=v.parseArray(e.badges)),Reflect.has(e,"menu")&&(this.menu=v.parseItem(e.menu,ye)),Reflect.has(e,"overlay")&&(this.overlay=v.parseItem(e.overlay,Bo))}get thumbnails(){var e;return((e=this.thumbnail)==null?void 0:e.contents)||[]}};vt=new WeakSet;j2=a(function(){this.title=this.flex_columns[0].title.toString(),this.endpoint?this.item_type="endpoint":this.item_type="unknown"},"#parseOther");cI=a(function(t){var e,i,r,o,s,l,c;switch((c=(l=(s=(o=(r=(i=(e=this.flex_columns.at(0))==null?void 0:e.title.runs)==null?void 0:i.at(0))==null?void 0:r.endpoint)==null?void 0:o.payload)==null?void 0:s.watchEndpointMusicSupportedConfigs)==null?void 0:l.watchEndpointMusicConfig)==null?void 0:c.musicVideoType){case"MUSIC_VIDEO_TYPE_UGC":case"MUSIC_VIDEO_TYPE_OMV":this.item_type="video",F(this,vt,hI).call(this,t);break;case"MUSIC_VIDEO_TYPE_ATV":this.item_type="song",F(this,vt,uI).call(this,t);break;default:F(this,vt,j2).call(this)}},"#parseVideoOrSong");uI=a(function(t){var e,i,r,o,s,l,c,u,d,p,_,b,g,C,T;this.id=t.video_id||((i=(e=this.endpoint)==null?void 0:e.payload)==null?void 0:i.videoId),this.title=this.flex_columns[0].title.toString();let S=((s=(o=(r=this.flex_columns.at(1))==null?void 0:r.title.runs)==null?void 0:o.find(I=>/^\d+$/.test(I.text.replace(/:/g,""))))==null?void 0:s.text)||((c=(l=this.fixed_columns[0])==null?void 0:l.title)==null?void 0:c.toString());S&&(this.duration={text:S,seconds:Xt(S)});let k=((d=(u=this.flex_columns.at(1))==null?void 0:u.title.runs)==null?void 0:d.find(I=>ct(I)&&I.endpoint&&I.endpoint.payload.browseId.startsWith("MPR")))||((_=(p=this.flex_columns.at(2))==null?void 0:p.title.runs)==null?void 0:_.find(I=>ct(I)&&I.endpoint&&I.endpoint.payload.browseId.startsWith("MPR")));k&&ct(k)&&(this.album={id:(g=(b=k.endpoint)==null?void 0:b.payload)==null?void 0:g.browseId,name:k.text,endpoint:k.endpoint});let A=(T=(C=this.flex_columns.at(1))==null?void 0:C.title.runs)==null?void 0:T.filter(I=>ct(I)&&I.endpoint&&I.endpoint.payload.browseId.startsWith("UC"));A&&(this.artists=A.map(I=>{var D,H;return{name:I.text,channel_id:ct(I)?(H=(D=I.endpoint)==null?void 0:D.payload)==null?void 0:H.browseId:void 0,endpoint:ct(I)?I.endpoint:void 0}}))},"#parseSong");hI=a(function(t){var e,i,r,o,s,l,c,u,d,p;this.id=t.video_id,this.title=this.flex_columns[0].title.toString(),this.views=(r=(i=(e=this.flex_columns.at(1))==null?void 0:e.title.runs)==null?void 0:i.find(g=>g.text.match(/(.*?) views/)))==null?void 0:r.toString();let _=(s=(o=this.flex_columns.at(1))==null?void 0:o.title.runs)==null?void 0:s.filter(g=>ct(g)&&g.endpoint&&g.endpoint.payload.browseId.startsWith("UC"));_&&(this.authors=_.map(g=>{var C,T;return{name:g.text,channel_id:ct(g)?(T=(C=g.endpoint)==null?void 0:C.payload)==null?void 0:T.browseId:void 0,endpoint:ct(g)?g.endpoint:void 0}}));let b=((c=(l=this.flex_columns[1].title.runs)==null?void 0:l.find(g=>/^\d+$/.test(g.text.replace(/:/g,""))))==null?void 0:c.text)||((p=(d=(u=this.fixed_columns[0])==null?void 0:u.title.runs)==null?void 0:d.find(g=>/^\d+$/.test(g.text.replace(/:/g,""))))==null?void 0:p.text);b&&(this.duration={text:b,seconds:Xt(b)})},"#parseVideo");dI=a(function(){var t,e,i,r,o,s;this.id=(e=(t=this.endpoint)==null?void 0:t.payload)==null?void 0:e.browseId,this.name=this.flex_columns[0].title.toString(),this.subtitle=(i=this.flex_columns.at(1))==null?void 0:i.title,this.subscribers=((s=(o=(r=this.subtitle)==null?void 0:r.runs)==null?void 0:o.find(l=>/^(\d*\.)?\d+[M|K]? subscribers?$/i.test(l.text)))==null?void 0:s.text)||""},"#parseArtist");_I=a(function(){var t,e,i,r;this.name=this.flex_columns[0].title.toString(),this.subtitle=(t=this.flex_columns.at(1))==null?void 0:t.title,this.song_count=((r=(i=(e=this.subtitle)==null?void 0:e.runs)==null?void 0:i.find(o=>/^\d+(,\d+)? songs?$/i.test(o.text)))==null?void 0:r.text)||""},"#parseLibraryArtist");pI=a(function(t){var e,i;this.id=t.video_id||((i=(e=this.endpoint)==null?void 0:e.payload)==null?void 0:i.videoId),this.title=this.flex_columns[0].title.toString()},"#parseNonMusicTrack");fI=a(function(){var t,e;this.id=(e=(t=this.endpoint)==null?void 0:t.payload)==null?void 0:e.browseId,this.title=this.flex_columns[0].title.toString()},"#parsePodcastShow");mI=a(function(){var t,e,i,r,o,s,l,c,u;this.id=(e=(t=this.endpoint)==null?void 0:t.payload)==null?void 0:e.browseId,this.title=this.flex_columns[0].title.toString();let d=(r=(i=this.flex_columns.at(1))==null?void 0:i.title.runs)==null?void 0:r.find(p=>ct(p)&&p.endpoint&&p.endpoint.payload.browseId.startsWith("UC"));d&&ct(d)&&(this.author={name:d.text,channel_id:(s=(o=d.endpoint)==null?void 0:o.payload)==null?void 0:s.browseId,endpoint:d.endpoint}),this.year=(u=(c=(l=this.flex_columns.at(1))==null?void 0:l.title.runs)==null?void 0:c.find(p=>/^[12][0-9]{3}$/.test(p.text)))==null?void 0:u.text},"#parseAlbum");vI=a(function(){var t,e,i,r,o,s,l,c;this.id=(e=(t=this.endpoint)==null?void 0:t.payload)==null?void 0:e.browseId,this.title=this.flex_columns[0].title.toString();let u=(r=(i=this.flex_columns.at(1))==null?void 0:i.title.runs)==null?void 0:r.find(p=>p.text.match(/\d+ (song|songs)/));this.item_count=u?u.text:void 0;let d=(s=(o=this.flex_columns.at(1))==null?void 0:o.title.runs)==null?void 0:s.find(p=>ct(p)&&p.endpoint&&p.endpoint.payload.browseId.startsWith("UC"));d&&ct(d)&&(this.author={name:d.text,channel_id:(c=(l=d.endpoint)==null?void 0:l.payload)==null?void 0:c.browseId,endpoint:d.endpoint})},"#parsePlaylist");a(G2,"MusicResponsiveListItem");n(G2,"type","MusicResponsiveListItem");var Ki=G2,K2=class extends m{constructor(e){var i,r,o,s,l,c,u,d,p,_,b,g,C,T,S,k,A,I,D,H,j,W;switch(super(),n(this,"title"),n(this,"endpoint"),n(this,"id"),n(this,"subtitle"),n(this,"badges"),n(this,"item_type"),n(this,"subscribers"),n(this,"item_count"),n(this,"year"),n(this,"views"),n(this,"artists"),n(this,"author"),n(this,"thumbnail"),n(this,"thumbnail_overlay"),n(this,"menu"),this.title=new f(e.title),this.endpoint=new y(e.navigationEndpoint),this.id=((r=(i=this.endpoint)==null?void 0:i.payload)==null?void 0:r.browseId)||((s=(o=this.endpoint)==null?void 0:o.payload)==null?void 0:s.videoId),this.subtitle=new f(e.subtitle),this.badges=v.parse(e.subtitleBadges),(d=(u=(c=(l=this.endpoint)==null?void 0:l.payload)==null?void 0:c.browseEndpointContextSupportedConfigs)==null?void 0:u.browseEndpointContextMusicConfig)==null?void 0:d.pageType){case"MUSIC_PAGE_TYPE_ARTIST":this.item_type="artist";break;case"MUSIC_PAGE_TYPE_PLAYLIST":this.item_type="playlist";break;case"MUSIC_PAGE_TYPE_ALBUM":this.item_type="album";break;default:((_=(p=this.endpoint)==null?void 0:p.metadata)==null?void 0:_.api_url)==="/next"?this.item_type="endpoint":(b=this.subtitle.runs)!=null&&b[0]?this.subtitle.runs[0].text!=="Song"?this.item_type="video":this.item_type="song":this.endpoint?this.item_type="endpoint":this.item_type="unknown";break}if(this.item_type=="artist")this.subscribers=((C=(g=this.subtitle.runs)==null?void 0:g.find(N=>/^(\d*\.)?\d+[M|K]? subscribers?$/i.test(N.text)))==null?void 0:C.text)||"";else if(this.item_type=="playlist"){let N=(T=this.subtitle.runs)==null?void 0:T.find(R=>R.text.match(/\d+ songs|song/));this.item_count=N?N.text:null}else if(this.item_type=="album"){let N=(S=this.subtitle.runs)==null?void 0:S.filter(R=>{var K,Y;return(Y=(K=R.endpoint)==null?void 0:K.payload)==null?void 0:Y.browseId.startsWith("UC")});N&&(this.artists=N.map(R=>{var K,Y;return{name:R.text,channel_id:(Y=(K=R.endpoint)==null?void 0:K.payload)==null?void 0:Y.browseId,endpoint:R.endpoint}})),this.year=(k=this.subtitle.runs)==null?void 0:k.slice(-1)[0].text,isNaN(Number(this.year))&&delete this.year}else if(this.item_type=="video"){this.views=((I=(A=this==null?void 0:this.subtitle.runs)==null?void 0:A.find(R=>R?.text.match(/(.*?) views/)))==null?void 0:I.text)||"N/A";let N=(D=this.subtitle.runs)==null?void 0:D.find(R=>{var K,Y,we;return(we=(Y=(K=R.endpoint)==null?void 0:K.payload)==null?void 0:Y.browseId)==null?void 0:we.startsWith("UC")});N&&(this.author={name:N?.text,channel_id:(j=(H=N?.endpoint)==null?void 0:H.payload)==null?void 0:j.browseId,endpoint:N?.endpoint})}else if(this.item_type=="song"){let N=(W=this.subtitle.runs)==null?void 0:W.filter(R=>{var K,Y;return(Y=(K=R.endpoint)==null?void 0:K.payload)==null?void 0:Y.browseId.startsWith("UC")});N&&(this.artists=N.map(R=>{var K,Y;return{name:R?.text,channel_id:(Y=(K=R?.endpoint)==null?void 0:K.payload)==null?void 0:Y.browseId,endpoint:R?.endpoint}}))}this.thumbnail=x.fromResponse(e.thumbnailRenderer.musicThumbnailRenderer.thumbnail),this.thumbnail_overlay=v.parseItem(e.thumbnailOverlay,Bo),this.menu=v.parseItem(e.menu,ye)}};a(K2,"MusicTwoRowItem");n(K2,"type","MusicTwoRowItem");var Y2=K2,z2=class extends m{constructor(e){super(),n(this,"header"),n(this,"contents"),n(this,"num_items_per_column"),this.header=v.parseItem(e.header,oI),this.contents=v.parseArray(e.contents,[Y2,Ki,rI,H2]),Reflect.has(e,"numItemsPerColumn")&&(this.num_items_per_column=parseInt(e.numItemsPerColumn))}};a(z2,"MusicCarouselShelf");n(z2,"type","MusicCarouselShelf");var Yt=z2,$2=class extends m{constructor(e){super(),n(this,"description"),n(this,"max_collapsed_lines"),n(this,"max_expanded_lines"),n(this,"footer"),this.description=new f(e.description),Reflect.has(e,"maxCollapsedLines")&&(this.max_collapsed_lines=e.maxCollapsedLines),Reflect.has(e,"maxExpandedLines")&&(this.max_expanded_lines=e.maxExpandedLines),this.footer=new f(e.footer)}};a($2,"MusicDescriptionShelf");n($2,"type","MusicDescriptionShelf");var _a=$2,J2=class extends m{constructor(e){var i,r,o,s,l,c,u,d,p;super(),n(this,"title"),n(this,"description"),n(this,"subtitle"),n(this,"second_subtitle"),n(this,"year"),n(this,"song_count"),n(this,"total_duration"),n(this,"thumbnails"),n(this,"badges"),n(this,"author"),n(this,"menu"),this.title=new f(e.title),this.description=new f(e.description),this.subtitle=new f(e.subtitle),this.second_subtitle=new f(e.secondSubtitle),this.year=((r=(i=this.subtitle.runs)==null?void 0:i.find(b=>/^[12][0-9]{3}$/.test(b.text)))==null?void 0:r.text)||"",this.song_count=((s=(o=this.second_subtitle.runs)==null?void 0:o[0])==null?void 0:s.text)||"",this.total_duration=((c=(l=this.second_subtitle.runs)==null?void 0:l[2])==null?void 0:c.text)||"",this.thumbnails=x.fromResponse(e.thumbnail.croppedSquareThumbnailRenderer.thumbnail),this.badges=v.parseArray(e.subtitleBadges);let _=(u=this.subtitle.runs)==null?void 0:u.find(b=>{var g,C;return(C=(g=b?.endpoint)==null?void 0:g.payload)==null?void 0:C.browseId.startsWith("UC")});_&&(this.author={name:_.text,channel_id:(p=(d=_.endpoint)==null?void 0:d.payload)==null?void 0:p.browseId,endpoint:_.endpoint}),this.menu=v.parseItem(e.menu)}};a(J2,"MusicDetailHeader");n(J2,"type","MusicDetailHeader");var X2=J2,Q2=class extends m{constructor(e){super(),n(this,"playlist_id"),n(this,"supported_download_states"),this.playlist_id=e.playlistId,this.supported_download_states=e.supportedDownloadStates}};a(Q2,"MusicDownloadStateBadge");n(Q2,"type","MusicDownloadStateBadge");var v5=Q2,Z2=class extends m{constructor(e){super(),n(this,"header"),n(this,"edit_header"),n(this,"playlist_id"),this.header=v.parseItem(e.header),this.edit_header=v.parseItem(e.editHeader),this.playlist_id=e.playlistId}};a(Z2,"MusicEditablePlaylistDetailHeader");n(Z2,"type","MusicEditablePlaylistDetailHeader");var bI=Z2,e0=class extends m{constructor(e){super(),n(this,"element"),this.element=Reflect.has(e,"elementRenderer")?v.parseItem(e,aS):null}};a(e0,"MusicElementHeader");n(e0,"type","MusicElementHeader");var rl=e0,t0=class extends m{constructor(e){super(),n(this,"header"),n(this,"title"),Reflect.has(e,"header")&&(this.header=v.parseItem(e.header)),Reflect.has(e,"title")&&(this.title=new f(e.title))}};a(t0,"MusicHeader");n(t0,"type","MusicHeader");var pa=t0,i0=class extends m{constructor(e){super(),n(this,"title"),n(this,"menu"),n(this,"more_button"),n(this,"play_button"),n(this,"share_endpoint"),n(this,"start_radio_button"),n(this,"subscription_button"),n(this,"description"),n(this,"thumbnail"),this.title=new f(e.title),this.menu=v.parseItem(e.menu,ye),this.more_button=v.parseItem(e.moreButton,$e),this.play_button=v.parseItem(e.playButton,L),"shareEndpoint"in e&&(this.share_endpoint=new y(e.shareEndpoint)),this.start_radio_button=v.parseItem(e.startRadioButton,L),this.subscription_button=v.parseItem(e.subscriptionButton,hi),this.description=new f(e.description),this.thumbnail=v.parseItem(e.thumbnail,Ai)}};a(i0,"MusicImmersiveHeader");n(i0,"type","MusicImmersiveHeader");var gI=i0,n0=class{constructor(e){n(this,"icon_name"),n(this,"endpoint"),n(this,"a11y_text"),n(this,"style"),this.icon_name=e.iconName,this.endpoint=new y(e.onTap),this.a11y_text=e.a11yText,this.style=e.style}};a(n0,"ActionButton");n(n0,"type","ActionButton");var b5=n0,s0=class{constructor(e){n(this,"image"),n(this,"content_mode"),n(this,"crop_options"),n(this,"image_aspect_ratio"),n(this,"caption"),n(this,"action_buttons"),this.image=x.fromResponse(e.image.image),this.content_mode=e.image.contentMode,this.crop_options=e.image.cropOptions,this.image_aspect_ratio=e.imageAspectRatio,this.caption=e.caption,this.action_buttons=e.actionButtons.map(i=>new b5(i))}};a(s0,"Panel");n(s0,"type","Panel");var g5=s0,o0=class extends m{constructor(e){super(),n(this,"panels"),n(this,"header"),this.header=e.shelf.header,this.panels=e.shelf.panels.map(i=>new g5(i))}};a(o0,"MusicLargeCardItemCarousel");n(o0,"type","MusicLargeCardItemCarousel");var y5=o0,r0=class extends m{constructor(e){super(),n(this,"title"),n(this,"edit_title"),n(this,"edit_description"),n(this,"privacy"),n(this,"playlist_id"),n(this,"endpoint"),n(this,"privacy_dropdown"),this.title=new f(e.title),this.edit_title=new f(e.editTitle),this.edit_description=new f(e.editDescription),this.privacy=e.privacy,this.playlist_id=e.playlistId,this.endpoint=new y(e.collaborationSettingsCommand),this.privacy_dropdown=v.parseItem(e.privacyDropdown,sa)}};a(r0,"MusicPlaylistEditHeader");n(r0,"type","MusicPlaylistEditHeader");var w5=r0,a0=class extends m{constructor(e){var i,r,o;super(),n(this,"playlist_id"),n(this,"contents"),n(this,"collapsed_item_count"),n(this,"continuation"),this.playlist_id=e.playlistId,this.contents=v.parseArray(e.contents,[Ki,Se]),this.collapsed_item_count=e.collapsedItemCount,this.continuation=((o=(r=(i=e.continuations)==null?void 0:i[0])==null?void 0:r.nextContinuationData)==null?void 0:o.continuation)||null}};a(a0,"MusicPlaylistShelf");n(a0,"type","MusicPlaylistShelf");var Ar=a0,l0=class extends m{constructor(e){var i,r,o,s,l;super(),n(this,"title"),n(this,"thumbnail"),n(this,"endpoint"),n(this,"selected"),n(this,"video_id"),n(this,"duration"),n(this,"author"),n(this,"album"),n(this,"artists"),n(this,"badges"),n(this,"menu"),n(this,"set_video_id"),this.title=new f(e.title),this.thumbnail=x.fromResponse(e.thumbnail),this.endpoint=new y(e.navigationEndpoint),this.selected=e.selected,this.video_id=e.videoId,this.duration={text:new f(e.lengthText).toString(),seconds:Xt(new f(e.lengthText).toString())};let c=(i=new f(e.longBylineText).runs)==null?void 0:i.find(d=>{var p,_,b;return(b=(_=(p=d.endpoint)==null?void 0:p.payload)==null?void 0:_.browseId)==null?void 0:b.startsWith("MPR")}),u=(r=new f(e.longBylineText).runs)==null?void 0:r.filter(d=>{var p,_,b;return(b=(_=(p=d.endpoint)==null?void 0:p.payload)==null?void 0:_.browseId)==null?void 0:b.startsWith("UC")});this.author=new f(e.shortBylineText).toString(),c&&(this.album={id:(s=(o=c.endpoint)==null?void 0:o.payload)==null?void 0:s.browseId,name:c.text,year:(l=new f(e.longBylineText).runs)==null?void 0:l.slice(-1)[0].text,endpoint:c.endpoint}),u&&(this.artists=u.map(d=>{var p,_;return{name:d.text,channel_id:(_=(p=d.endpoint)==null?void 0:p.payload)==null?void 0:_.browseId,endpoint:d.endpoint}})),this.badges=v.parseArray(e.badges),this.menu=v.parseItem(e.menu),this.set_video_id=e.playlistSetVideoId}};a(l0,"PlaylistPanelVideo");n(l0,"type","PlaylistPanelVideo");var go=l0,c0=class extends m{constructor(e){super(),n(this,"primary"),n(this,"counterpart"),this.primary=v.parseItem(e.primaryRenderer,go),Reflect.has(e,"counterpart")&&(this.counterpart=te(e.counterpart.map(i=>v.parseItem(i.counterpartRenderer,go))||[]))}};a(c0,"PlaylistPanelVideoWrapper");n(c0,"type","PlaylistPanelVideoWrapper");var yI=c0,u0=class extends m{constructor(e){var i,r,o,s,l,c;super(),n(this,"title"),n(this,"title_text"),n(this,"contents"),n(this,"playlist_id"),n(this,"is_infinite"),n(this,"continuation"),n(this,"is_editable"),n(this,"preview_description"),n(this,"num_items_to_show"),this.title=e.title,this.title_text=new f(e.titleText),this.contents=v.parseArray(e.contents,[yI,go,oa]),this.playlist_id=e.playlistId,this.is_infinite=e.isInfinite,this.continuation=((o=(r=(i=e.continuations)==null?void 0:i[0])==null?void 0:r.nextRadioContinuationData)==null?void 0:o.continuation)||((c=(l=(s=e.continuations)==null?void 0:s[0])==null?void 0:l.nextContinuationData)==null?void 0:c.continuation),this.is_editable=e.isEditable,this.preview_description=e.previewDescription,this.num_items_to_show=e.numItemsToShow}};a(u0,"PlaylistPanel");n(u0,"type","PlaylistPanel");var Cn=u0,h0=class extends m{constructor(e){super(),n(this,"content"),this.content=v.parseItem(e.content,Cn)}};a(h0,"MusicQueue");n(h0,"type","MusicQueue");var d0=h0,_0=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"buttons"),n(this,"title"),n(this,"subtitle"),n(this,"strapline_text_one"),n(this,"strapline_thumbnail"),n(this,"second_subtitle"),n(this,"subtitle_badge"),n(this,"description"),this.thumbnail=v.parseItem(e.thumbnail,Ai),this.buttons=v.parseArray(e.buttons,[Ju,$e,B2,L,ye]),this.title=new f(e.title),this.subtitle=new f(e.subtitle),this.strapline_text_one=new f(e.straplineTextOne),this.strapline_thumbnail=v.parseItem(e.straplineThumbnail,Ai),this.second_subtitle=new f(e.secondSubtitle),Reflect.has(e,"subtitleBadge")&&(this.subtitle_badge=v.parseArray(e.subtitleBadge,R2)),Reflect.has(e,"description")&&(this.description=v.parseItem(e.description,_a))}};a(_0,"MusicResponsiveHeader");n(_0,"type","MusicResponsiveHeader");var p0=_0,f0=class extends m{constructor(e){var i,r,o,s;super(),n(this,"title"),n(this,"contents"),n(this,"endpoint"),n(this,"continuation"),n(this,"bottom_text"),n(this,"bottom_button"),n(this,"subheaders"),this.title=new f(e.title),this.contents=v.parseArray(e.contents,Ki),Reflect.has(e,"bottomEndpoint")&&(this.endpoint=new y(e.bottomEndpoint)),Reflect.has(e,"continuations")&&(this.continuation=((r=(i=e.continuations)==null?void 0:i[0].nextContinuationData)==null?void 0:r.continuation)||((s=(o=e.continuations)==null?void 0:o[0].reloadContinuationData)==null?void 0:s.continuation)),Reflect.has(e,"bottomText")&&(this.bottom_text=new f(e.bottomText)),Reflect.has(e,"bottomButton")&&(this.bottom_button=v.parseItem(e.bottomButton,L)),Reflect.has(e,"subheaders")&&(this.subheaders=v.parseArray(e.subheaders))}};a(f0,"MusicShelf");n(f0,"type","MusicShelf");var it=f0,m0=class extends m{constructor(e){super(),n(this,"start_items"),n(this,"end_items"),Reflect.has(e,"startItems")&&(this.start_items=v.parseArray(e.startItems)),Reflect.has(e,"endItems")&&(this.end_items=v.parseArray(e.endItems))}};a(m0,"MusicSideAlignedItem");n(m0,"type","MusicSideAlignedItem");var wI=m0,v0=class extends m{constructor(e){super(),n(this,"title"),n(this,"icon_type"),n(this,"menu"),this.title=new f(e.title).toString(),Reflect.has(e,"icon")&&(this.icon_type=e.icon.iconType),this.menu=v.parseItem(e.menu,eI)}};a(v0,"MusicSortFilterButton");n(v0,"type","MusicSortFilterButton");var al=v0,b0=class extends m{constructor(e){super(),n(this,"thumbnail"),this.thumbnail=x.fromResponse(e.thumbnail)}};a(b0,"MusicTastebuilderShelfThumbnail");n(b0,"type","MusicTastebuilderShelfThumbnail");var kI=b0,g0=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"primary_text"),n(this,"secondary_text"),n(this,"action_button"),n(this,"is_visible"),this.thumbnail=v.parseItem(e.thumbnail,kI),this.primary_text=new f(e.primaryText),this.secondary_text=new f(e.secondaryText),this.action_button=v.parseItem(e.actionButton,L),this.is_visible=e.isVisible}};a(g0,"MusicTasteBuilderShelf");n(g0,"type","MusicTasteBuilderShelf");var CI=g0,y0=class extends m{constructor(e){var i,r;super(),n(this,"title"),n(this,"thumbnail"),n(this,"menu"),n(this,"foreground_thumbnail"),this.title=new f(e.title),this.thumbnail=e.thumbnail?x.fromResponse((i=e.thumbnail.musicThumbnailRenderer)==null?void 0:i.thumbnail):[],this.menu=v.parseItem(e.menu,ye),this.foreground_thumbnail=e.foregroundThumbnail?x.fromResponse((r=e.foregroundThumbnail.musicThumbnailRenderer)==null?void 0:r.thumbnail):[]}};a(y0,"MusicVisualHeader");n(y0,"type","MusicVisualHeader");var TI=y0,w0=class extends m{constructor(e){super(),n(this,"placeholder_text"),n(this,"buttons"),n(this,"logo_type"),this.placeholder_text=new f(e.placeholderText),this.buttons=v.parseArray(e.buttons),Reflect.has(e,"logo")&&Reflect.has(e.logo,"iconType")&&(this.logo_type=e.logo.iconType)}};a(w0,"MobileTopbar");n(w0,"type","MobileTopbar");var k5=w0,k0=class extends m{constructor(e){super(),n(this,"items"),this.items=v.parseArray(e.items)}};a(k0,"MultiPageMenuSection");n(k0,"type","MultiPageMenuSection");var C5=k0,C0=class extends m{constructor(e){super(),n(this,"items"),this.items=v.parseArray(e.items)}};a(C0,"PivotBar");n(C0,"type","PivotBar");var T5=C0,T0=class extends m{constructor(e){super(),n(this,"pivot_identifier"),n(this,"endpoint"),n(this,"title"),n(this,"accessibility_label"),n(this,"icon_type"),n(this,"accessibility"),this.pivot_identifier=e.pivotIdentifier,this.endpoint=new y(e.navigationEndpoint),this.title=new Text(e.title),"accessibility"in e&&"accessibilityData"in e.accessibility&&(this.accessibility={accessibility_data:new zt(e.accessibility.accessibilityData)}),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType)}get label(){var e,i;return(i=(e=this.accessibility)==null?void 0:e.accessibility_data)==null?void 0:i.label}};a(T0,"PivotBarItem");n(T0,"type","PivotBarItem");var S5=T0,S0=class extends m{constructor(e){super(),n(this,"icon_type"),n(this,"menu_renderer"),n(this,"target_id"),Reflect.has(e,"icon")&&Reflect.has(e.icon,"iconType")&&(this.icon_type=e.icon.iconType),this.menu_renderer=v.parseItem(e.menuRenderer),this.target_id=e.targetId}};a(S0,"TopbarMenuButton");n(S0,"type","TopbarMenuButton");var I5=S0,I0=class extends m{constructor(e){super(),n(this,"response_text"),this.response_text=new f(e.responseText)}};a(I0,"NotificationAction");n(I0,"type","NotificationAction");var E5=I0,E0=class extends m{constructor(e){super(),n(this,"list_id"),n(this,"modal_title"),n(this,"select_button_label"),this.list_id=e.listId,this.modal_title=e.modalTitle,this.select_button_label=e.selectButtonLabel}};a(E0,"OpenOnePickAddVideoModalCommand");n(E0,"type","OpenOnePickAddVideoModalCommand");var A5=E0,A0=class extends m{constructor(e){super(),n(this,"title"),n(this,"image"),n(this,"animated_image"),n(this,"hero_image"),n(this,"metadata"),n(this,"actions"),n(this,"description"),n(this,"attributation"),n(this,"banner"),this.title=v.parseItem(e.title,nS),this.image=v.parseItem(e.image,[io,tp]),this.animated_image=v.parseItem(e.animatedImage,io),this.hero_image=v.parseItem(e.heroImage,io),this.metadata=v.parseItem(e.metadata,G_),this.actions=v.parseItem(e.actions,oh),this.description=v.parseItem(e.description,XT),this.attributation=v.parseItem(e.attributation,E3),this.banner=v.parseItem(e.banner,SS)}};a(A0,"PageHeaderView");n(A0,"type","PageHeaderView");var SI=A0,x0=class extends m{constructor(e){super(),n(this,"page_title"),n(this,"content"),this.page_title=e.pageTitle,this.content=v.parseItem(e.content,SI)}};a(x0,"PageHeader");n(x0,"type","PageHeader");var as=x0,P0=class extends m{constructor(e){var i,r;super(),n(this,"indicator_count"),n(this,"selected_index"),this.indicator_count=(i=e.indicatorCount)!=null?i:0,this.selected_index=(r=e.selectedIndex)!=null?r:0}};a(P0,"PageIndicatorView");n(P0,"type","PageIndicatorView");var x5=P0,M0=class extends m{constructor(e){super(),n(this,"header_text"),n(this,"body_text"),n(this,"page_title"),n(this,"header_icon_type"),this.header_text=new f(e.headerText).toString(),this.body_text=new f(e.bodyText).toString(),this.page_title=new f(e.pageTitle).toString(),this.header_icon_type=e.headerIcon.iconType}};a(M0,"PageIntroduction");n(M0,"type","PageIntroduction");var II=M0,R0=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"endpoint"),n(this,"content_description"),n(this,"target_id"),n(this,"sound_attribution_title"),n(this,"waveform_animation_style"),n(this,"background_animation_style"),this.thumbnail=x.fromResponse(e.thumbnail),this.endpoint=new y(e.onClickCommand),this.content_description=new f(e.contentDescription),this.target_id=e.targetId,this.sound_attribution_title=new f(e.soundAttributionTitle),this.waveform_animation_style=e.waveformAnimationStyle,this.background_animation_style=e.backgroundAnimationStyle}};a(R0,"PivotButton");n(R0,"type","PivotButton");var EI=R0,D0=class extends m{constructor(e){super(),n(this,"featured_channel"),n(this,"allow_swipe_dismiss"),n(this,"annotation_id"),Reflect.has(e,"featuredChannel")&&(this.featured_channel={start_time_ms:e.featuredChannel.startTimeMs,end_time_ms:e.featuredChannel.endTimeMs,watermark:x.fromResponse(e.featuredChannel.watermark),channel_name:e.featuredChannel.channelName,endpoint:new y(e.featuredChannel.navigationEndpoint),subscribe_button:v.parseItem(e.featuredChannel.subscribeButton)}),this.allow_swipe_dismiss=e.allowSwipeDismiss,this.annotation_id=e.annotationId}};a(D0,"PlayerAnnotationsExpanded");n(D0,"type","PlayerAnnotationsExpanded");var AI=D0,B0=class extends m{constructor(e){super(),n(this,"captcha_loading_message"),n(this,"challenge_reason"),n(this,"captcha_successful_message"),n(this,"captcha_cookie_set_failure_message"),n(this,"captcha_failed_message"),"captchaLoadingMessage"in e&&(this.captcha_loading_message=f.fromAttributed(e.captchaLoadingMessage)),"challengeReason"in e&&(this.challenge_reason=f.fromAttributed(e.challengeReason)),"captchaSuccessfulMessage"in e&&(this.captcha_successful_message=f.fromAttributed(e.captchaSuccessfulMessage)),"captchaCookieSetFailureMessage"in e&&(this.captcha_cookie_set_failure_message=f.fromAttributed(e.captchaCookieSetFailureMessage)),"captchaFailedMessage"in e&&(this.captcha_failed_message=f.fromAttributed(e.captchaFailedMessage))}};a(B0,"PlayerCaptchaView");n(B0,"type","PlayerCaptchaView");var P5=B0,L0=class extends m{constructor(e){super(),n(this,"caption_tracks"),n(this,"audio_tracks"),n(this,"default_audio_track_index"),n(this,"translation_languages"),Reflect.has(e,"captionTracks")&&(this.caption_tracks=e.captionTracks.map(i=>({base_url:i.baseUrl,name:new f(i.name),vss_id:i.vssId,language_code:i.languageCode,kind:i.kind,is_translatable:i.isTranslatable}))),Reflect.has(e,"audioTracks")&&(this.audio_tracks=e.audioTracks.map(i=>({audio_track_id:i.audioTrackId,captions_initial_state:i.captionsInitialState,default_caption_track_index:i.defaultCaptionTrackIndex,has_default_track:i.hasDefaultTrack,visibility:i.visibility,caption_track_indices:i.captionTrackIndices}))),Reflect.has(e,"defaultAudioTrackIndex")&&(this.default_audio_track_index=e.defaultAudioTrackIndex),Reflect.has(e,"translationLanguages")&&(this.translation_languages=e.translationLanguages.map(i=>({language_code:i.languageCode,language_name:new f(i.languageName)})))}};a(L0,"PlayerCaptionsTracklist");n(L0,"type","PlayerCaptionsTracklist");var xI=L0,V0=class extends m{constructor(e){super(),n(this,"endpoint"),n(this,"enable_listen_first"),this.endpoint=new y(e.endpoint),this.enable_listen_first=e.enableListenFirst}};a(V0,"PlayerOverflow");n(V0,"type","PlayerOverflow");var PI=V0,O0=class extends m{constructor(e){super(),n(this,"overflow"),this.overflow=v.parseItem(e.overflow,PI)}};a(O0,"PlayerControlsOverlay");n(O0,"type","PlayerControlsOverlay");var M5=O0,N0=class extends m{constructor(e){super(),n(this,"subreason"),n(this,"reason"),n(this,"proceed_button"),n(this,"thumbnails"),n(this,"icon_type"),this.subreason=new f(e.subreason),this.reason=new f(e.reason),this.proceed_button=v.parseItem(e.proceedButton,L),this.thumbnails=x.fromResponse(e.thumbnail),Reflect.has(e,"icon")&&(this.icon_type=e.icon.iconType)}};a(N0,"PlayerErrorMessage");n(N0,"type","PlayerErrorMessage");var R5=N0,F0=class extends m{constructor(e){super(),n(this,"title"),n(this,"thumbnail"),n(this,"offer_description"),n(this,"offer_id"),this.title=e.itemTitle,this.thumbnail=e.itemThumbnail,this.offer_description=e.offerDescription,this.offer_id=e.offerId}};a(F0,"PlayerLegacyDesktopYpcOffer");n(F0,"type","PlayerLegacyDesktopYpcOffer");var D5=F0,U0=class extends m{constructor(e){super(),n(this,"video_message"),n(this,"player_response"),this.video_message=e.fullVideoMessage,this.player_response=e.unserializedPlayerResponse}};a(U0,"YpcTrailer");n(U0,"type","YpcTrailer");var xr=U0,H0=class extends m{constructor(e){super(),n(this,"video_id"),n(this,"title"),n(this,"thumbnail"),n(this,"offer_headline"),n(this,"offer_description"),n(this,"offer_id"),n(this,"offer_button_text"),n(this,"video_message"),n(this,"trailer"),this.video_id=e.trailerVideoId,this.title=e.itemTitle,this.thumbnail=e.itemThumbnail,this.offer_headline=e.offerHeadline,this.offer_description=e.offerDescription,this.offer_id=e.offerId,this.offer_button_text=e.offerButtonText,this.video_message=e.fullVideoMessage,this.trailer=v.parseItem(e.ypcTrailer,xr)}};a(H0,"PlayerLegacyDesktopYpcTrailer");n(H0,"type","PlayerLegacyDesktopYpcTrailer");var ll=H0,W0=class extends m{constructor(e){super(),n(this,"board");let[i,r,o,s,l]=e.spec.split("#");this.board={type:"live",template_url:i,thumbnail_width:parseInt(r,10),thumbnail_height:parseInt(o,10),columns:parseInt(s,10),rows:parseInt(l,10)}}};a(W0,"PlayerLiveStoryboardSpec");n(W0,"type","PlayerLiveStoryboardSpec");var MI=W0,q0=class extends m{constructor(e){var i,r;super(),n(this,"title"),n(this,"description"),n(this,"thumbnails"),n(this,"embed"),n(this,"length_seconds"),n(this,"channel"),n(this,"is_family_safe"),n(this,"is_unlisted"),n(this,"has_ypc_metadata"),n(this,"view_count"),n(this,"category"),n(this,"publish_date"),n(this,"upload_date"),n(this,"available_countries"),n(this,"start_timestamp"),n(this,"end_timestamp"),this.title=new f(e.title),this.description=new f(e.description),this.thumbnails=x.fromResponse(e.thumbnail),Reflect.has(e,"embed")&&(this.embed={iframe_url:e.embed.iframeUrl,flash_url:e.embed.flashUrl,flash_secure_url:e.embed.flashSecureUrl,width:e.embed.width,height:e.embed.height}),this.length_seconds=parseInt(e.lengthSeconds),this.channel={id:e.externalChannelId,name:e.ownerChannelName,url:e.ownerProfileUrl},this.is_family_safe=!!e.isFamilySafe,this.is_unlisted=!!e.isUnlisted,this.has_ypc_metadata=!!e.hasYpcMetadata,this.view_count=parseInt(e.viewCount),this.category=e.category,this.publish_date=e.publishDate,this.upload_date=e.uploadDate,this.available_countries=e.availableCountries,this.start_timestamp=(i=e.liveBroadcastDetails)!=null&&i.startTimestamp?new Date(e.liveBroadcastDetails.startTimestamp):null,this.end_timestamp=(r=e.liveBroadcastDetails)!=null&&r.endTimestamp?new Date(e.liveBroadcastDetails.endTimestamp):null}};a(q0,"PlayerMicroformat");n(q0,"type","PlayerMicroformat");var oi=q0,j0=class extends m{constructor(e){super(),n(this,"title"),n(this,"video_id"),n(this,"video_title"),n(this,"short_view_count"),n(this,"prefer_immediate_redirect"),n(this,"count_down_secs_for_fullscreen"),n(this,"published"),n(this,"background"),n(this,"thumbnail_overlays"),n(this,"author"),n(this,"cancel_button"),n(this,"next_button"),n(this,"close_button"),this.title=new f(e.title),this.video_id=e.videoId,this.video_title=new f(e.videoTitle),this.short_view_count=new f(e.shortViewCountText),this.prefer_immediate_redirect=e.preferImmediateRedirect,this.count_down_secs_for_fullscreen=e.countDownSecsForFullscreen,this.published=new f(e.publishedTimeText),this.background=x.fromResponse(e.background),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),this.author=new le(e.byline),this.cancel_button=v.parseItem(e.cancelButton,L),this.next_button=v.parseItem(e.nextButton,L),this.close_button=v.parseItem(e.closeButton,L)}};a(j0,"PlayerOverlayAutoplay");n(j0,"type","PlayerOverlayAutoplay");var RI=j0,G0=class extends m{constructor(e){super(),n(this,"title"),n(this,"subtitle"),this.title=new f(e.title),this.subtitle=new f(e.subtitle)}};a(G0,"PlayerOverlayVideoDetails");n(G0,"type","PlayerOverlayVideoDetails");var DI=G0,K0=class extends m{constructor(e){super(),n(this,"results"),n(this,"title"),this.results=v.parseArray(e.results,[dS,hS]),this.title=new f(e.title).toString()}};a(K0,"WatchNextEndScreen");n(K0,"type","WatchNextEndScreen");var BI=K0,Y0=class extends m{constructor(e){super(),n(this,"end_screen"),n(this,"autoplay"),n(this,"share_button"),n(this,"add_to_menu"),n(this,"fullscreen_engagement"),n(this,"actions"),n(this,"browser_media_session"),n(this,"decorated_player_bar"),n(this,"video_details"),this.end_screen=v.parseItem(e.endScreen,BI),this.autoplay=v.parseItem(e.autoplay,RI),this.share_button=v.parseItem(e.shareButton,L),this.add_to_menu=v.parseItem(e.addToMenu,ye),this.fullscreen_engagement=v.parseItem(e.fullscreenEngagement),this.actions=v.parseArray(e.actions),this.browser_media_session=v.parseItem(e.browserMediaSession),this.decorated_player_bar=v.parseItem(e.decoratedPlayerBarRenderer,JT),this.video_details=v.parseItem(e.videoDetails,DI)}};a(Y0,"PlayerOverlay");n(Y0,"type","PlayerOverlay");var fa=Y0,z0=class extends m{constructor(e){super(),n(this,"id"),n(this,"title"),n(this,"subtitle"),n(this,"stats"),n(this,"brief_stats"),n(this,"author"),n(this,"description"),n(this,"num_videos"),n(this,"view_count"),n(this,"can_share"),n(this,"can_delete"),n(this,"is_editable"),n(this,"privacy"),n(this,"save_button"),n(this,"shuffle_play_button"),n(this,"menu"),n(this,"banner"),this.id=e.playlistId,this.title=new f(e.title),this.subtitle=e.subtitle?new f(e.subtitle):null,this.stats=e.stats.map(i=>new f(i)),this.brief_stats=e.briefStats.map(i=>new f(i)),this.author=e.ownerText||e.ownerEndpoint?new le({...e.ownerText,navigationEndpoint:e.ownerEndpoint},e.ownerBadges,null):null,this.description=new f(e.descriptionText),this.num_videos=new f(e.numVideosText),this.view_count=new f(e.viewCountText),this.can_share=e.shareData.canShare,this.can_delete=e.editableDetails.canDelete,this.is_editable=e.isEditable,this.privacy=e.privacy,this.save_button=v.parseItem(e.saveButton),this.shuffle_play_button=v.parseItem(e.shufflePlayButton),this.menu=v.parseItem(e.moreActionsMenu),this.banner=v.parseItem(e.playlistHeaderBanner)}};a(z0,"PlaylistHeader");n(z0,"type","PlaylistHeader");var LI=z0,$0=class extends m{constructor(e){super(),n(this,"title"),n(this,"thumbnails"),n(this,"video_count"),n(this,"channel_name"),n(this,"endpoint"),this.title=new f(e.playlistTitle),this.thumbnails=x.fromResponse(e.thumbnail),this.video_count=new f(e.playlistVideoCount),this.channel_name=new f(e.channelName),this.endpoint=new y(e.action)}};a($0,"PlaylistInfoCardContent");n($0,"type","PlaylistInfoCardContent");var B5=$0,J0=class extends m{constructor(e){super(),n(this,"title"),n(this,"description"),this.title=e.title,this.description=e.description||null}};a(J0,"PlaylistMetadata");n(J0,"type","PlaylistMetadata");var VI=J0,X0=class extends m{constructor(e){super(),n(this,"items"),this.items=v.parseArray(e.items)}get contents(){return this.items}};a(X0,"PlaylistSidebar");n(X0,"type","PlaylistSidebar");var L5=X0,Q0=class extends m{constructor(e){super(),n(this,"stats"),n(this,"thumbnail_renderer"),n(this,"title"),n(this,"menu"),n(this,"endpoint"),n(this,"description"),this.stats=e.stats.map(i=>new f(i)),this.thumbnail_renderer=v.parseItem(e.thumbnailRenderer),this.title=new f(e.title),this.menu=v.parseItem(e.menu),this.endpoint=new y(e.navigationEndpoint),this.description=new f(e.description)}};a(Q0,"PlaylistSidebarPrimaryInfo");n(Q0,"type","PlaylistSidebarPrimaryInfo");var OI=Q0,Z0=class extends m{constructor(e){super(),n(this,"owner"),n(this,"button"),this.owner=v.parseItem(e.videoOwner),this.button=v.parseItem(e.button)}};a(Z0,"PlaylistSidebarSecondaryInfo");n(Z0,"type","PlaylistSidebarSecondaryInfo");var NI=Z0,ev=class extends m{constructor(e){super(),n(this,"icon_type"),n(this,"text"),Reflect.has(e,"icon")&&(this.icon_type=e.icon.iconType),this.text=new f(e.text)}};a(ev,"PlaylistThumbnailOverlay");n(ev,"type","PlaylistThumbnailOverlay");var V5=ev,tv=class extends m{constructor(e){super(),n(this,"id"),n(this,"index"),n(this,"title"),n(this,"author"),n(this,"thumbnails"),n(this,"thumbnail_overlays"),n(this,"set_video_id"),n(this,"endpoint"),n(this,"is_playable"),n(this,"menu"),n(this,"upcoming"),n(this,"video_info"),n(this,"accessibility_label"),n(this,"style"),n(this,"duration"),this.id=e.videoId,this.index=new f(e.index),this.title=new f(e.title),this.author=new le(e.shortBylineText),this.thumbnails=x.fromResponse(e.thumbnail),this.thumbnail_overlays=v.parseArray(e.thumbnailOverlays),this.set_video_id=e?.setVideoId,this.endpoint=new y(e.navigationEndpoint),this.is_playable=e.isPlayable,this.menu=v.parseItem(e.menu,ye),this.video_info=new f(e.videoInfo),this.accessibility_label=e.title.accessibility.accessibilityData.label,Reflect.has(e,"style")&&(this.style=e.style);let i=e.upcomingEventData&&+`${e.upcomingEventData.startTime}000`;i&&(this.upcoming=new Date(i)),this.duration={text:new f(e.lengthText).toString(),seconds:parseInt(e.lengthSeconds)}}get is_live(){var e;return((e=this.thumbnail_overlays.firstOfType(ds))==null?void 0:e.style)==="LIVE"}get is_upcoming(){var e;return((e=this.thumbnail_overlays.firstOfType(ds))==null?void 0:e.style)==="UPCOMING"}};a(tv,"PlaylistVideo");n(tv,"type","PlaylistVideo");var iv=tv,nv=class extends m{constructor(e){super(),n(this,"id"),n(this,"is_editable"),n(this,"can_reorder"),n(this,"videos"),this.id=e.playlistId,this.is_editable=e.isEditable,this.can_reorder=e.canReorder,this.videos=v.parseArray(e.contents)}};a(nv,"PlaylistVideoList");n(nv,"type","PlaylistVideoList");var FI=nv,sv=class extends m{constructor(e){super(),n(this,"choices"),n(this,"poll_type"),n(this,"total_votes"),n(this,"live_chat_poll_id"),this.choices=e.choices.map(i=>({text:new f(i.text),select_endpoint:i.selectServiceEndpoint?new y(i.selectServiceEndpoint):null,deselect_endpoint:i.deselectServiceEndpoint?new y(i.deselectServiceEndpoint):null,vote_ratio_if_selected:i?.voteRatioIfSelected||null,vote_percentage_if_selected:new f(i.votePercentageIfSelected),vote_ratio_if_not_selected:i?.voteRatioIfSelected||null,vote_percentage_if_not_selected:new f(i.votePercentageIfSelected),image:i.image?x.fromResponse(i.image):null})),Reflect.has(e,"type")&&(this.poll_type=e.type),Reflect.has(e,"totalVotes")&&(this.total_votes=new f(e.totalVotes)),Reflect.has(e,"liveChatPollId")&&(this.live_chat_poll_id=e.liveChatPollId)}};a(sv,"Poll");n(sv,"type","Poll");var O5=sv,ov=class extends aa{constructor(e){super(e)}};a(ov,"Post");n(ov,"type","Post");var rv=ov,av=class extends m{constructor(e){super(),n(this,"images"),this.images=v.parseArray(e.images,R3)}};a(av,"PostMultiImage");n(av,"type","PostMultiImage");var N5=av,lv=class extends m{constructor(e){super(),n(this,"label"),this.label=new f(e.label)}};a(lv,"PremiereTrailerBadge");n(lv,"type","PremiereTrailerBadge");var F5=lv,cv=class extends m{constructor(e){super(),n(this,"title"),n(this,"suppress_padding_disclaimer"),this.title=new f(e.title),this.suppress_padding_disclaimer=!!e.suppressPaddingDisclaimer}};a(cv,"ProductListHeader");n(cv,"type","ProductListHeader");var U5=cv,uv=class extends m{constructor(e){super(),n(this,"title"),n(this,"accessibility_title"),n(this,"thumbnail"),n(this,"price"),n(this,"endpoint"),n(this,"merchant_name"),n(this,"stay_in_app"),n(this,"view_button"),this.title=new f(e.title),this.accessibility_title=e.accessibilityTitle,this.thumbnail=x.fromResponse(e.thumbnail),this.price=e.price,this.endpoint=new y(e.onClickCommand),this.merchant_name=e.merchantName,this.stay_in_app=!!e.stayInApp,this.view_button=v.parseItem(e.viewButton,L)}};a(uv,"ProductListItem");n(uv,"type","ProductListItem");var H5=uv,hv=class extends m{constructor(e){super(),n(this,"items"),this.items=v.parseArray(e.items)}get contents(){return this.items}};a(hv,"ProfileColumn");n(hv,"type","ProfileColumn");var UI=hv,dv=class extends m{constructor(e){super(),n(this,"items"),this.items=v.parseArray(e.items)}get contents(){return this.items}};a(dv,"ProfileColumnStats");n(dv,"type","ProfileColumnStats");var W5=dv,_v=class extends m{constructor(e){super(),n(this,"label"),n(this,"value"),this.label=new f(e.label),this.value=new f(e.value)}};a(_v,"ProfileColumnStatsEntry");n(_v,"type","ProfileColumnStatsEntry");var q5=_v,pv=class extends m{constructor(e){super(),n(this,"title"),n(this,"thumbnails"),this.title=new f(e.title),this.thumbnails=x.fromResponse(e.thumbnail)}};a(pv,"ProfileColumnUserInfo");n(pv,"type","ProfileColumnUserInfo");var j5=pv,fv=class extends m{constructor(e){super(),n(this,"choices"),n(this,"total_votes"),this.choices=e.choices.map(i=>({text:new f(i.text),is_correct:i.isCorrect})),this.total_votes=new f(e.totalVotes)}};a(fv,"Quiz");n(fv,"type","Quiz");var G5=fv,mv=class extends m{constructor(e){super(),n(this,"title"),n(this,"subtitle"),n(this,"avatars"),n(this,"button"),n(this,"surface"),this.title=new f(e.title),this.subtitle=new f(e.subtitle),this.avatars=e.avatars.map(i=>new x(i)),this.button=v.parseItem(e.button,L),this.surface=e.surface}};a(mv,"RecognitionShelf");n(mv,"type","RecognitionShelf");var K5=mv,vv=class extends m{constructor(e){super(),n(this,"id"),n(this,"title"),n(this,"thumbnails"),n(this,"views"),n(this,"endpoint"),n(this,"accessibility"),this.id=e.videoId,this.title=new f(e.headline),this.thumbnails=x.fromResponse(e.thumbnail),this.views=new f(e.viewCountText),this.endpoint=new y(e.navigationEndpoint),"accessibility"in e&&"accessibilityData"in e.accessibility&&(this.accessibility={accessibility_data:new zt(e.accessibility.accessibilityData)})}get label(){var e,i;return(i=(e=this.accessibility)==null?void 0:e.accessibility_data)==null?void 0:i.label}};a(vv,"ReelItem");n(vv,"type","ReelItem");var bv=vv,gv=class extends m{constructor(e){super(),n(this,"reel_title_text"),n(this,"timestamp_text"),n(this,"channel_title_text"),n(this,"channel_thumbnail"),n(this,"author"),this.reel_title_text=new f(e.reelTitleText),this.timestamp_text=new f(e.timestampText),this.channel_title_text=new f(e.channelTitleText),this.channel_thumbnail=x.fromResponse(e.channelThumbnail),this.author=new le(e.channelNavigationEndpoint,void 0)}};a(gv,"ReelPlayerHeader");n(gv,"type","ReelPlayerHeader");var HI=gv,yv=class extends m{constructor(e){super(),n(this,"like_button"),n(this,"reel_player_header_supported_renderers"),n(this,"menu"),n(this,"next_item_button"),n(this,"prev_item_button"),n(this,"subscribe_button_renderer"),n(this,"style"),n(this,"view_comments_button"),n(this,"share_button"),n(this,"pivot_button"),n(this,"info_panel"),this.like_button=v.parseItem(e.likeButton,nh),this.reel_player_header_supported_renderers=v.parseItem(e.reelPlayerHeaderSupportedRenderers,HI),this.menu=v.parseItem(e.menu,ye),this.next_item_button=v.parseItem(e.nextItemButton,L),this.prev_item_button=v.parseItem(e.prevItemButton,L),this.subscribe_button_renderer=v.parseItem(e.subscribeButtonRenderer,[L,hi]),this.style=e.style,this.view_comments_button=v.parseItem(e.viewCommentsButton,L),this.share_button=v.parseItem(e.shareButton,L),this.pivot_button=v.parseItem(e.pivotButton,EI),this.info_panel=v.parseItem(e.infoPanel,ES)}};a(yv,"ReelPlayerOverlay");n(yv,"type","ReelPlayerOverlay");var Y5=yv,wv=class extends m{constructor(e){super(),n(this,"content"),this.content=v.parseItem(e.content)}};a(wv,"RelatedChipCloud");n(wv,"type","RelatedChipCloud");var WI=wv,kv=class extends m{constructor(e){super(),n(this,"header"),n(this,"contents"),n(this,"target_id"),this.header=v.parseItem(e.header),this.contents=v.parseArray(e.contents),Reflect.has(e,"targetId")&&(this.target_id=e.targetId)}};a(kv,"RichGrid");n(kv,"type","RichGrid");var Lo=kv,Cv=class extends m{constructor(e){super(),n(this,"content"),this.content=v.parseItem(e.content)}};a(Cv,"RichItem");n(Cv,"type","RichItem");var z5=Cv,Tv=class extends m{constructor(e){super(),n(this,"title"),n(this,"subtitle"),n(this,"title_style"),n(this,"icon_type"),this.title=new f(e.title),this.subtitle=new f(e.subtitle),Reflect.has(e,"titleStyle")&&(this.title_style=e.titleStyle.style),Reflect.has(e,"icon")&&(this.icon_type=e.icon.iconType)}};a(Tv,"RichListHeader");n(Tv,"type","RichListHeader");var $5=Tv,Sv=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"title"),n(this,"subtitle"),n(this,"call_to_action"),n(this,"icon_type"),n(this,"endpoint"),this.thumbnail=x.fromResponse(e.thumbnail),this.title=new f(e.title),this.subtitle=new f(e.subtitle),this.call_to_action=new f(e.callToAction),Reflect.has(e,"callToActionIcon")&&(this.icon_type=e.callToActionIcon.iconType),this.endpoint=new y(e.endpoint)}};a(Sv,"RichMetadata");n(Sv,"type","RichMetadata");var cl=Sv,Iv=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parseArray(e.contents)}};a(Iv,"RichMetadataRow");n(Iv,"type","RichMetadataRow");var ul=Iv,Ev=class extends m{constructor(e){super(),n(this,"content"),n(this,"full_bleed"),n(this,"target_id"),this.content=v.parseItem(e.content),this.full_bleed=!!e.fullBleed,"targetId"in e&&(this.target_id=e.targetId)}};a(Ev,"RichSection");n(Ev,"type","RichSection");var J5=Ev,Av=class extends m{constructor(e){super(),n(this,"title"),n(this,"contents"),n(this,"endpoint"),n(this,"subtitle"),n(this,"is_expanded"),n(this,"is_bottom_divider_hidden"),n(this,"is_top_divider_hidden"),n(this,"layout_sizing"),n(this,"icon_type"),n(this,"menu"),n(this,"next_button"),n(this,"previous_button"),this.title=new f(e.title),this.contents=v.parseArray(e.contents),this.is_expanded=!!e.is_expanded,this.is_bottom_divider_hidden=!!e.isBottomDividerHidden,this.is_top_divider_hidden=!!e.isTopDividerHidden,"endpoint"in e&&(this.endpoint=new y(e.endpoint)),"subtitle"in e&&(this.subtitle=new f(e.subtitle)),"layoutSizing"in e&&(this.layout_sizing=e.layoutSizing),"icon"in e&&(this.icon_type=e.icon.iconType),this.menu=v.parseItem(e.menu),this.next_button=v.parseItem(e.nextButton),this.previous_button=v.parseItem(e.previousButton)}};a(Av,"RichShelf");n(Av,"type","RichShelf");var qI=Av,xv=class extends m{constructor(e){super(),n(this,"label"),n(this,"endpoint"),n(this,"tooltip"),n(this,"status"),this.label=new f(e.label),this.endpoint=new y(e.endpoint||e.navigationEndpoint),this.tooltip=e.tooltip,Reflect.has(e,"status")&&(this.status=e.status)}get disabled(){return this.status==="FILTER_STATUS_DISABLED"}get selected(){return this.status==="FILTER_STATUS_SELECTED"}};a(xv,"SearchFilter");n(xv,"type","SearchFilter");var jI=xv,Pv=class extends m{constructor(e){super(),n(this,"title"),n(this,"filters"),this.title=new f(e.title),this.filters=v.parseArray(e.filters,jI)}};a(Pv,"SearchFilterGroup");n(Pv,"type","SearchFilterGroup");var Mv=Pv,Rv=class extends m{constructor(e){super(),n(this,"title"),n(this,"groups"),this.title=new f(e.title),this.groups=v.parseArray(e.groups,Mv)}};a(Rv,"SearchFilterOptionsDialog");n(Rv,"type","SearchFilterOptionsDialog");var X5=Rv,Dv=class extends m{constructor(e){super(),n(this,"chip_bar"),n(this,"search_filter_button"),this.chip_bar=v.parseItem(e.chipBar,An),this.search_filter_button=v.parseItem(e.searchFilterButton,L)}};a(Dv,"SearchHeader");n(Dv,"type","SearchHeader");var hl=Dv,Bv=class extends m{constructor(e){super(),n(this,"title"),n(this,"groups"),n(this,"button"),Reflect.has(e,"title")&&(this.title=new f(e.title)),Reflect.has(e,"groups")&&(this.groups=v.parseArray(e.groups,Mv)),Reflect.has(e,"button")&&(this.button=v.parseItem(e.button,$e))}};a(Bv,"SearchSubMenu");n(Bv,"type","SearchSubMenu");var GI=Bv,Lv=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parseArray(e.contents)}};a(Lv,"SearchSuggestionsSection");n(Lv,"type","SearchSuggestionsSection");var KI=Lv,Vv=class extends m{constructor(e){super(),n(this,"header"),n(this,"call_to_action"),n(this,"sections"),n(this,"collapsed_label"),this.header=v.parseItem(e.header),this.call_to_action=v.parseItem(e.callToAction),this.sections=v.parseArray(e.sections),Reflect.has(e,"collapsedLabel")&&(this.collapsed_label=new f(e.collapsedLabel))}};a(Vv,"UniversalWatchCard");n(Vv,"type","UniversalWatchCard");var Ov=Vv,Nv=class extends m{constructor(e){super(),n(this,"target_id"),n(this,"contents"),this.contents=v.parseArray(e.contents,[Ov])}};a(Nv,"SecondarySearchContainer");n(Nv,"type","SecondarySearchContainer");var YI=Nv,Fv=class extends m{constructor(e){super(),n(this,"like_button"),n(this,"dislike_button"),this.like_button=v.parseItem(e.likeButton,[$e,L]),this.dislike_button=v.parseItem(e.dislikeButton,[$e,L])}};a(Fv,"SegmentedLikeDislikeButton");n(Fv,"type","SegmentedLikeDislikeButton");var Ls=Fv,Uv=class extends m{constructor(e){super(),n(this,"title"),n(this,"summary"),n(this,"enable_endpoint"),n(this,"disable_endpoint"),n(this,"item_id"),Reflect.has(e,"title")&&(this.title=new f(e.title)),Reflect.has(e,"summary")&&(this.summary=new f(e.summary)),Reflect.has(e,"enableServiceEndpoint")&&(this.enable_endpoint=new y(e.enableServiceEndpoint)),Reflect.has(e,"disableServiceEndpoint")&&(this.disable_endpoint=new y(e.disableServiceEndpoint)),this.item_id=e.itemId}};a(Uv,"SettingBoolean");n(Uv,"type","SettingBoolean");var Q5=Uv,Hv=class extends m{constructor(e){super(),n(this,"title"),n(this,"help_text"),n(this,"enabled"),n(this,"disabled"),n(this,"id"),this.title=new f(e.title),this.help_text=new f(e.helpText),this.enabled=e.enabled,this.disabled=e.disabled,this.id=e.id}};a(Hv,"SettingsCheckbox");n(Hv,"type","SettingsCheckbox");var zI=Hv,Wv=class extends m{constructor(e){super(),n(this,"title"),n(this,"subtitle"),n(this,"enabled"),n(this,"enable_endpoint"),n(this,"disable_endpoint"),this.title=new f(e.title),this.subtitle=new f(e.subtitle),this.enabled=e.enabled,this.enable_endpoint=new y(e.enableServiceEndpoint),this.disable_endpoint=new y(e.disableServiceEndpoint)}};a(Wv,"SettingsSwitch");n(Wv,"type","SettingsSwitch");var qv=Wv,jv=class extends m{constructor(e){super(),n(this,"title"),n(this,"text"),n(this,"options"),this.title=new f(e.title),Reflect.has(e,"text")&&(this.text=new f(e.text).toString()),Reflect.has(e,"options")&&(this.options=v.parseArray(e.options,[qv,sa,J_,zI,AT]))}};a(jv,"SettingsOptions");n(jv,"type","SettingsOptions");var ir=jv,Gv=class extends m{constructor(e){super(),n(this,"title"),n(this,"items"),this.title=new f(e.title),this.items=v.parseArray(e.items,Po)}get contents(){return this.items}};a(Gv,"SettingsSidebar");n(Gv,"type","SettingsSidebar");var $I=Gv,Kv=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"content"),n(this,"published"),n(this,"menu"),n(this,"original_post"),n(this,"id"),n(this,"endpoint"),n(this,"expand_button"),n(this,"author"),this.thumbnail=x.fromResponse(e.thumbnail),this.content=new f(e.content),this.published=new f(e.publishedTimeText),this.menu=v.parseItem(e.actionMenu,ye),this.original_post=v.parseItem(e.originalPost,[aa,rv]),this.id=e.postId,this.endpoint=new y(e.navigationEndpoint),this.expand_button=v.parseItem(e.expandButton,L),this.author=new le(e.displayName,void 0)}};a(Kv,"SharedPost");n(Kv,"type","SharedPost");var JI=Kv,Yv=class extends m{constructor(e){super(),n(this,"title"),this.title=v.parseItem(e.title)}};a(Yv,"SharePanelHeader");n(Yv,"type","SharePanelHeader");var XI=Yv,zv=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(zv,"SharePanelTitleV15");n(zv,"type","SharePanelTitleV15");var Z5=zv,$v=class extends m{constructor(e){super(),n(this,"endpoint"),n(this,"service_name"),n(this,"target_id"),n(this,"title"),Reflect.has(e,"serviceEndpoint")?this.endpoint=new y(e.serviceEndpoint):Reflect.has(e,"navigationEndpoint")&&(this.endpoint=new y(e.navigationEndpoint)),this.service_name=e.serviceName,this.target_id=e.targetId,this.title=new f(e.title)}};a($v,"ShareTarget");n($v,"type","ShareTarget");var QI=$v,Jv=class extends m{constructor(e){super(),n(this,"content"),n(this,"footer"),n(this,"header"),n(this,"renderer_context"),this.content=v.parseItem(e.content),this.footer=v.parseItem(e.footer),this.header=v.parseItem(e.header),"rendererContext"in e&&(this.renderer_context=new Jt(e.rendererContext))}};a(Jv,"SheetView");n(Jv,"type","SheetView");var yo=Jv,Xv=class extends m{constructor(e){super(),n(this,"title"),n(this,"endpoint"),n(this,"content"),n(this,"icon_type"),n(this,"menu"),n(this,"play_all_button"),n(this,"subtitle"),this.title=new f(e.title),Reflect.has(e,"endpoint")&&(this.endpoint=new y(e.endpoint)),this.content=v.parseItem(e.content),Reflect.has(e,"icon")&&(this.icon_type=e.icon.iconType),Reflect.has(e,"menu")&&(this.menu=v.parseItem(e.menu)),Reflect.has(e,"playAllButton")&&(this.play_all_button=v.parseItem(e.playAllButton,L)),Reflect.has(e,"subtitle")&&(this.subtitle=new f(e.subtitle))}};a(Xv,"Shelf");n(Xv,"type","Shelf");var Qv=Xv,Zv=class extends m{constructor(e){var i;super(),n(this,"entity_id"),n(this,"accessibility_text"),n(this,"thumbnail"),n(this,"on_tap_endpoint"),n(this,"menu_on_tap"),n(this,"index_in_collection"),n(this,"menu_on_tap_a11y_label"),n(this,"overlay_metadata"),n(this,"inline_player_data"),n(this,"badge"),this.entity_id=e.entityId,this.accessibility_text=e.accessibilityText,this.thumbnail=x.fromResponse(e.thumbnail),this.on_tap_endpoint=new y(e.onTap),this.menu_on_tap=new y(e.menuOnTap),this.index_in_collection=e.indexInCollection,this.menu_on_tap_a11y_label=e.menuOnTapA11yLabel,this.overlay_metadata={primary_text:e.overlayMetadata.primaryText?f.fromAttributed(e.overlayMetadata.primaryText):void 0,secondary_text:e.overlayMetadata.secondaryText?f.fromAttributed(e.overlayMetadata.secondaryText):void 0},(i=e.inlinePlayerData)!=null&&i.onVisible&&(this.inline_player_data=new y(e.inlinePlayerData.onVisible)),e.badge&&(this.badge=v.parseItem(e.badge,ch))}};a(Zv,"ShortsLockupView");n(Zv,"type","ShortsLockupView");var eb=Zv,tb=class extends m{constructor(e){super(),n(this,"corrected_query"),n(this,"original_query"),n(this,"corrected_query_endpoint"),n(this,"original_query_endpoint"),n(this,"search_instead_for"),n(this,"showing_results_for"),this.corrected_query=new f(e.correctedQuery),this.original_query=new f(e.originalQuery),this.corrected_query_endpoint=new y(e.correctedQueryEndpoint),this.original_query_endpoint=new y(e.originalQueryEndpoint),this.search_instead_for=new f(e.searchInsteadFor),this.showing_results_for=new f(e.showingResultsFor)}};a(tb,"ShowingResultsFor");n(tb,"type","ShowingResultsFor");var ZI=tb,ib=class extends m{constructor(e){super(),n(this,"image"),n(this,"title"),n(this,"display_domain"),n(this,"show_link_icon"),n(this,"call_to_action"),n(this,"endpoint"),this.image=x.fromResponse(e.image),this.title=new f(e.title),this.display_domain=new f(e.displayDomain),this.show_link_icon=e.showLinkIcon,this.call_to_action=new f(e.callToAction),this.endpoint=new y(e.command)}};a(ib,"SimpleCardContent");n(ib,"type","SimpleCardContent");var eM=ib,nb=class extends m{constructor(e){super(),n(this,"message"),n(this,"prominent"),this.message=new f(e.message),this.prominent=e.prominent}};a(nb,"SimpleCardTeaser");n(nb,"type","SimpleCardTeaser");var tM=nb,sb=class extends m{constructor(e){super(),n(this,"lines"),n(this,"style"),this.lines=e.lines.map(i=>new f(i)),this.style=e.layoutStyle}};a(sb,"SimpleTextSection");n(sb,"type","SimpleTextSection");var iM=sb,ob=class extends m{constructor(e){super(),n(this,"action_text"),n(this,"nav_text"),n(this,"details"),n(this,"icon_type"),n(this,"endpoint"),this.action_text=new f(e.actionText),this.nav_text=new f(e.navigationText),this.details=new f(e.detailsText),this.icon_type=e.icon.iconType,this.endpoint=new y(e.navigationEndpoint)}};a(ob,"SingleActionEmergencySupport");n(ob,"type","SingleActionEmergencySupport");var nM=ob,rb=class extends m{constructor(e){super(),n(this,"title"),n(this,"selected"),n(this,"endpoint"),n(this,"content"),this.title=e.title||"N/A",this.selected=!!e.selected,this.endpoint=new y(e.endpoint),this.content=v.parseItem(e.content,[Ae,d0,Lo])}};a(rb,"Tab");n(rb,"type","Tab");var kt=rb,ab=class extends m{constructor(e){super(),n(this,"tabs"),this.tabs=v.parseArray(e.tabs,kt)}};a(ab,"SingleColumnBrowseResults");n(ab,"type","SingleColumnBrowseResults");var ma=ab,lb=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parse(e)}};a(lb,"SingleColumnMusicWatchNextResults");n(lb,"type","SingleColumnMusicWatchNextResults");var sM=lb,cb=class extends m{constructor(e){super(),n(this,"thumbnails"),n(this,"style"),this.thumbnails=x.fromResponse(e.thumbnail),this.style=e.style}};a(cb,"SingleHeroImage");n(cb,"type","SingleHeroImage");var oM=cb,ub=class extends m{constructor(e){super(),n(this,"thumbnail"),n(this,"title"),n(this,"endpoint"),n(this,"subscribe_button"),this.thumbnail=x.fromResponse(e.thumbnail),this.title=new f(e.title),this.endpoint=new y(e.navigationEndpoint),this.subscribe_button=v.parseItem(e.subscribeButton,hi)}};a(ub,"SlimOwner");n(ub,"type","SlimOwner");var rM=ub,hb=class extends m{constructor(e){super(),n(this,"title"),n(this,"collapsed_subtitle"),n(this,"expanded_subtitle"),n(this,"owner"),n(this,"description"),n(this,"video_id"),n(this,"date"),this.title=new f(e.title),this.collapsed_subtitle=new f(e.collapsedSubtitle),this.expanded_subtitle=new f(e.expandedSubtitle),this.owner=v.parseItem(e.owner),this.description=new f(e.description),this.video_id=e.videoId,this.date=new f(e.dateText)}};a(hb,"SlimVideoMetadata");n(hb,"type","SlimVideoMetadata");var e4=hb,db=class extends m{constructor(e){super(),n(this,"start_at_option_label"),this.start_at_option_label=new f(e.startAtOptionLabel)}};a(db,"StartAt");n(db,"type","StartAt");var t4=db,_b=class extends m{constructor(e){super(),n(this,"contents"),this.contents=v.parse(e)}};a(_b,"Tabbed");n(_b,"type","Tabbed");var aM=_b,pb=class extends m{constructor(e){super(),n(this,"tabs"),this.tabs=v.parseArray(e.tabs,kt)}};a(pb,"TabbedSearchResults");n(pb,"type","TabbedSearchResults");var i4=pb,fb=class extends m{constructor(e){super(),n(this,"title"),n(this,"style"),this.title=new f(e.title),this.style=e.style}};a(fb,"TextHeader");n(fb,"type","TextHeader");var lM=fb,mb=class extends m{constructor(e){super(),n(this,"share_targets"),this.share_targets=v.parseArray(e.shareTargets,QI)}};a(mb,"ThirdPartyShareTargetSection");n(mb,"type","ThirdPartyShareTargetSection");var n4=mb,vb=class extends m{constructor(e){super(),n(this,"landscape"),n(this,"portrait"),this.landscape=x.fromResponse(e.landscape),this.portrait=x.fromResponse(e.portrait)}};a(vb,"ThumbnailLandscapePortrait");n(vb,"type","ThumbnailLandscapePortrait");var cM=vb,bb=class extends m{constructor(e){super(),n(this,"text"),this.text=new f(e.text).toString()}};a(bb,"ThumbnailOverlayEndorsement");n(bb,"type","ThumbnailOverlayEndorsement");var uM=bb,gb=class extends m{constructor(e){super(),n(this,"text"),n(this,"icon_type"),this.text=new f(e.text),this.icon_type=e.icon.iconType}};a(gb,"ThumbnailOverlayHoverText");n(gb,"type","ThumbnailOverlayHoverText");var hM=gb,yb=class extends m{constructor(e){super(),n(this,"text"),n(this,"icon_type"),this.text=new f(e.text).toString(),this.icon_type=e.icon.iconType}};a(yb,"ThumbnailOverlayInlineUnplayable");n(yb,"type","ThumbnailOverlayInlineUnplayable");var dM=yb,wb=class extends m{constructor(e){super(),n(this,"text"),this.text=new f(e.text)}};a(wb,"ThumbnailOverlayLoadingPreview");n(wb,"type","ThumbnailOverlayLoadingPreview");var _M=wb,kb=class extends m{constructor(e){super(),n(this,"text"),this.text=new f(e.text).toString()}};a(kb,"ThumbnailOverlayNowPlaying");n(kb,"type","ThumbnailOverlayNowPlaying");var pM=kb,Cb=class extends m{constructor(e){super(),n(this,"hack"),this.hack=e.hack}};a(Cb,"ThumbnailOverlayPinking");n(Cb,"type","ThumbnailOverlayPinking");var fM=Cb,Tb=class extends m{constructor(e){super(),n(this,"texts"),this.texts=e.texts.map(i=>new f(i))}};a(Tb,"ThumbnailOverlayPlaybackStatus");n(Tb,"type","ThumbnailOverlayPlaybackStatus");var mM=Tb,Sb=class extends m{constructor(e){super(),n(this,"percent_duration_watched"),this.percent_duration_watched=e.percentDurationWatched}};a(Sb,"ThumbnailOverlayResumePlayback");n(Sb,"type","ThumbnailOverlayResumePlayback");var vM=Sb,Ib=class extends m{constructor(e){super(),n(this,"text"),n(this,"icon_type"),this.text=new f(e.text),this.icon_type=e.icon.iconType}};a(Ib,"ThumbnailOverlaySidePanel");n(Ib,"type","ThumbnailOverlaySidePanel");var bM=Ib,Eb=class extends m{constructor(e){var i,r,o,s;super(),n(this,"title"),n(this,"subtitle"),this.title=(r=(i=e.title)==null?void 0:i.content)!=null?r:"",this.subtitle=(s=(o=e.subtitle)==null?void 0:o.content)!=null?s:""}};a(Eb,"ThumbnailOverlayTitleView");n(Eb,"type","ThumbnailOverlayTitleView");var gM=Eb,Ab=class extends m{constructor(e){super(),n(this,"is_toggled"),n(this,"icon_type"),n(this,"tooltip"),n(this,"toggled_endpoint"),n(this,"untoggled_endpoint"),Reflect.has(e,"isToggled")&&(this.is_toggled=e.isToggled),this.icon_type={toggled:e.toggledIcon.iconType,untoggled:e.untoggledIcon.iconType},this.tooltip={toggled:e.toggledTooltip,untoggled:e.untoggledTooltip},e.toggledServiceEndpoint&&(this.toggled_endpoint=new y(e.toggledServiceEndpoint)),e.untoggledServiceEndpoint&&(this.untoggled_endpoint=new y(e.untoggledServiceEndpoint))}};a(Ab,"ThumbnailOverlayToggleButton");n(Ab,"type","ThumbnailOverlayToggleButton");var yM=Ab,xb=class extends m{constructor(e){super(),n(this,"title"),this.title=new f(e.title)}};a(xb,"TitleAndButtonListHeader");n(xb,"type","TitleAndButtonListHeader");var wM=xb,Pb=class extends m{constructor(e){super(),n(this,"text"),n(this,"toggled_text"),n(this,"icon_type"),n(this,"toggled_icon_type"),n(this,"default_endpoint"),n(this,"toggled_endpoint"),this.text=new f(e.defaultText),this.toggled_text=new f(e.toggledText),this.icon_type=e.defaultIcon.iconType,this.toggled_icon_type=e.toggledIcon.iconType,this.default_endpoint=new y(e.defaultServiceEndpoint),this.toggled_endpoint=new y(e.toggledServiceEndpoint)}};a(Pb,"ToggleMenuServiceItem");n(Pb,"type","ToggleMenuServiceItem");var kM=Pb,Mb=class extends m{constructor(e){super(),n(this,"promo_config"),n(this,"target_id"),n(this,"details"),n(this,"suggested_position"),n(this,"dismiss_stratedy"),n(this,"dwell_time_ms"),this.promo_config={promo_id:e.promoConfig.promoId,impression_endpoints:e.promoConfig.impressionEndpoints.map(i=>new y(i)),accept:new y(e.promoConfig.acceptCommand),dismiss:new y(e.promoConfig.dismissCommand)},this.target_id=e.targetId,this.details=new f(e.detailsText),this.suggested_position=e.suggestedPosition.type,this.dismiss_stratedy=e.dismissStrategy.type,this.dwell_time_ms=parseInt(e.dwellTimeMs)}};a(Mb,"Tooltip");n(Mb,"type","Tooltip");var CM=Mb,Rb=class extends m{constructor(e){var i;super(),n(this,"title"),n(this,"avatar"),n(this,"subtitle"),n(this,"subscribe_button"),n(this,"endpoint"),this.title=new f(e.title),this.avatar=x.fromResponse((i=e.thumbnail)!=null?i:e.avatar),this.subtitle=new f(e.subtitle),this.subscribe_button=v.parseItem(e.subscribeButton,hi),this.endpoint=new y(e.navigationEndpoint)}};a(Rb,"TopicChannelDetails");n(Rb,"type","TopicChannelDetails");var TM=Rb,Db=class extends m{constructor(e){super(),n(this,"tabs"),n(this,"secondary_contents"),this.tabs=v.parseArray(e.tabs,[kt,Sr]),this.secondary_contents=v.parseItem(e.secondaryContents,[Ae,fh,UI])}};a(Db,"TwoColumnBrowseResults");n(Db,"type","TwoColumnBrowseResults");var Vo=Db,Bb=class extends m{constructor(e){super(),n(this,"header"),n(this,"primary_contents"),n(this,"secondary_contents"),n(this,"target_id"),this.header=v.parseItem(e.header),this.primary_contents=v.parseItem(e.primaryContents,[Lo,Ae]),this.secondary_contents=v.parseItem(e.secondaryContents,[YI]),"targetId"in e&&(this.target_id=e.targetId)}};a(Bb,"TwoColumnSearchResults");n(Bb,"type","TwoColumnSearchResults");var s4=Bb,nr,dl,Lb=class extends m{constructor(e){var i,r,o,s,l;super(),M(this,nr),n(this,"results"),n(this,"secondary_results"),n(this,"conversation_bar"),n(this,"playlist"),n(this,"autoplay"),this.results=v.parseArray((i=e.results)==null?void 0:i.results.contents),this.secondary_results=v.parseArray((r=e.secondaryResults)==null?void 0:r.secondaryResults.results),this.conversation_bar=v.parseItem(e?.conversationBar);let c=(o=e.playlist)==null?void 0:o.playlist;c&&(this.playlist={id:c.playlistId,title:c.title,author:(s=c.shortBylineText)!=null&&s.simpleText?new f(c.shortBylineText):new le(c.longBylineText),contents:v.parseArray(c.contents),current_index:c.currentIndex,is_infinite:!!c.isInfinite,menu:v.parseItem(c.menu,ye)});let u=(l=e.autoplay)==null?void 0:l.autoplay;u&&(this.autoplay={sets:u.sets.map(d=>F(this,nr,dl).call(this,d))},u.modifiedSets&&(this.autoplay.modified_sets=u.modifiedSets.map(d=>F(this,nr,dl).call(this,d))),u.countDownSecs&&(this.autoplay.count_down_secs=u.countDownSecs))}};nr=new WeakSet;dl=a(function(t){let e={autoplay_video:new y(t.autoplayVideo)};return t.nextButtonVideo&&(e.next_button_video=new y(t.nextButtonVideo)),e},"#parseAutoplaySet");a(Lb,"TwoColumnWatchNextResults");n(Lb,"type","TwoColumnWatchNextResults");var Vb=Lb,Ob=class extends m{constructor(e){if(super(),n(this,"third_party_network_section"),n(this,"header"),n(this,"share_panel_version"),n(this,"show_loading_spinner"),e.contents){let i=e.contents.find(r=>r.thirdPartyNetworkSection);i&&(this.third_party_network_section={share_target_container:v.parseItem(i.thirdPartyNetworkSection.shareTargetContainer,n4),copy_link_container:v.parseItem(i.thirdPartyNetworkSection.copyLinkContainer,J_),start_at_container:v.parseItem(i.thirdPartyNetworkSection.startAtContainer,t4)})}this.header=v.parseItem(e.header,XI),this.share_panel_version=e.sharePanelVersion,Reflect.has(e,"showLoadingSpinner")&&(this.show_loading_spinner=e.showLoadingSpinner)}};a(Ob,"UnifiedSharePanel");n(Ob,"type","UnifiedSharePanel");var SM=Ob,Nb=class extends m{constructor(e){super(),n(this,"message_title"),n(this,"message_text"),n(this,"action_button"),n(this,"dismiss_button"),n(this,"is_visible"),this.message_title=new f(e.dialogMessageTitle),this.message_text=new f(e.dialogMessageText),this.action_button=v.parseItem(e.actionButton,L),this.dismiss_button=v.parseItem(e.dismissButton,L),this.is_visible=e.isVisible}};a(Nb,"UpsellDialog");n(Nb,"type","UpsellDialog");var IM=Nb,Fb=class extends m{constructor(e){super(),n(this,"items"),n(this,"collapsed_item_count"),n(this,"collapsed_state_button_text"),this.items=v.parseArray(e.items),this.collapsed_item_count=e.collapsedItemCount,this.collapsed_state_button_text=new f(e.collapsedStateButtonText)}get contents(){return this.items}};a(Fb,"VerticalList");n(Fb,"type","VerticalList");var EM=Fb,Ub=class extends m{constructor(e){super(),n(this,"items"),n(this,"view_all_text"),n(this,"view_all_endpoint"),this.items=v.parseArray(e.items),this.view_all_text=new f(e.viewAllText),this.view_all_endpoint=new y(e.viewAllEndpoint)}get contents(){return this.items}};a(Ub,"VerticalWatchCardList");n(Ub,"type","VerticalWatchCardList");var AM=Ub,Hb=class extends m{constructor(e){super(),n(this,"title"),n(this,"channel_name"),n(this,"view_count"),n(this,"video_thumbnails"),n(this,"duration"),n(this,"endpoint"),this.title=new f(e.videoTitle),this.channel_name=new f(e.channelName),this.view_count=new f(e.viewCountText),this.video_thumbnails=x.fromResponse(e.videoThumbnail),this.duration=new f(e.lengthString),this.endpoint=new y(e.action)}};a(Hb,"VideoInfoCardContent");n(Hb,"type","VideoInfoCardContent");var xM=Hb,Wb=class extends m{constructor(e){super(),n(this,"carousel_titles"),n(this,"carousel_items"),this.carousel_titles=v.parse(e.carouselTitles,!0,ST),this.carousel_items=v.parse(e.carouselItems,!0,TT)}};a(Wb,"VideoMetadataCarouselView");n(Wb,"type","VideoMetadataCarouselView");var PM=Wb,qb=class{constructor(e){n(this,"text"),n(this,"subscribed"),n(this,"subscription_type"),this.text=new f(e.text),this.subscribed=e.isSubscribed,"subscriptionType"in e&&(this.subscription_type=e.subscriptionType)}};a(qb,"SubscriptionButton");n(qb,"type","SubscriptionButton");var o4=qb,jb=class extends m{constructor(e){super(),n(this,"subscription_button"),n(this,"subscriber_count"),n(this,"author"),"subscriptionButton"in e&&(this.subscription_button=new o4(e.subscriptionButton)),this.subscriber_count=new f(e.subscriberCountText),this.author=new le({...e.title,navigationEndpoint:e.navigationEndpoint},e.badges,e.thumbnail)}};a(jb,"VideoOwner");n(jb,"type","VideoOwner");var Gb=jb,Kb=class extends m{constructor(e){super(),n(this,"title"),n(this,"super_title_link"),n(this,"station_name"),n(this,"view_count"),n(this,"badges"),n(this,"published"),n(this,"relative_date"),n(this,"menu"),this.title=new f(e.title),"superTitleLink"in e&&(this.super_title_link=new f(e.superTitleLink)),"stationName"in e&&(this.station_name=new f(e.stationName)),this.view_count=v.parseItem(e.viewCount,Zm),this.badges=v.parseArray(e.badges,Mn),this.published=new f(e.dateText),this.relative_date=new f(e.relativeDateText),this.menu=v.parseItem(e.videoActions,ye)}};a(Kb,"VideoPrimaryInfo");n(Kb,"type","VideoPrimaryInfo");var r4=Kb,Yb=class extends m{constructor(e){super(),n(this,"owner"),n(this,"description"),n(this,"description_placeholder"),n(this,"subscribe_button"),n(this,"metadata"),n(this,"show_more_text"),n(this,"show_less_text"),n(this,"default_expanded"),n(this,"description_collapsed_lines"),this.owner=v.parseItem(e.owner,Gb),this.description=new f(e.description),"attributedDescription"in e&&(this.description=f.fromAttributed(e.attributedDescription)),"descriptionPlaceholder"in e&&(this.description_placeholder=new f(e.descriptionPlaceholder)),this.subscribe_button=v.parseItem(e.subscribeButton,[hi,L]),this.metadata=v.parseItem(e.metadataRowContainer,iI),this.show_more_text=new f(e.showMoreText),this.show_less_text=new f(e.showLessText),this.default_expanded=e.defaultExpanded,this.description_collapsed_lines=e.descriptionCollapsedLines}};a(Yb,"VideoSecondaryInfo");n(Yb,"type","VideoSecondaryInfo");var _l=Yb,zb=class extends m{constructor(e){super(),n(this,"title"),n(this,"subtitle"),n(this,"duration"),n(this,"style"),this.title=new f(e.title),this.subtitle=new f(e.subtitle),this.duration={text:new f(e.lengthText).toString(),seconds:Xt(e.lengthText.simpleText)},this.style=e.style}};a(zb,"WatchCardCompactVideo");n(zb,"type","WatchCardCompactVideo");var a4=zb,$b=class extends m{constructor(e){var i;super(),n(this,"endpoint"),n(this,"call_to_action_button"),n(this,"hero_image"),n(this,"label"),this.endpoint=new y(e.navigationEndpoint),this.call_to_action_button=v.parseItem(e.callToActionButton),this.hero_image=v.parseItem(e.heroImage),this.label=((i=e.lengthText)==null?void 0:i.accessibility.accessibilityData.label)||""}};a($b,"WatchCardHeroVideo");n($b,"type","WatchCardHeroVideo");var MM=$b,Jb=class extends m{constructor(e){super(),n(this,"title"),n(this,"title_endpoint"),n(this,"subtitle"),n(this,"author"),n(this,"style"),this.title=new f(e.title),this.title_endpoint=new y(e.titleNavigationEndpoint),this.subtitle=new f(e.subtitle),this.author=new le(e,e.titleBadge?[e.titleBadge]:null,e.avatar),this.author.name=this.title.toString(),this.style=e.style}};a(Jb,"WatchCardRichHeader");n(Jb,"type","WatchCardRichHeader");var RM=Jb,Xb=class extends m{constructor(e){super(),n(this,"lists"),this.lists=v.parseArray(e.lists)}};a(Xb,"WatchCardSectionSequence");n(Xb,"type","WatchCardSectionSequence");var DM=Xb,Qb=class extends Vo{constructor(e){super(e)}};a(Qb,"WatchNextTabbedResults");n(Qb,"type","WatchNextTabbedResults");var l4=Qb,Zb=class extends m{constructor(e){var i,r;super(),n(this,"title"),n(this,"content"),n(this,"endpoint"),n(this,"category_assets"),n(this,"category_type"),this.title=e.title,this.content=v.parseItem(e.content,Ae),this.endpoint=new y(e.navigationEndpoint),this.category_assets={asset_key:(i=e.categoryAssets)==null?void 0:i.assetKey,background_color:(r=e.categoryAssets)==null?void 0:r.backgroundColor},this.category_type=e.categoryType}};a(Zb,"AnchoredSection");n(Zb,"type","AnchoredSection");var c4=Zb,Vs,eg=class extends m{constructor(e){super(),M(this,Vs),n(this,"child_display_name"),n(this,"child_account_description"),n(this,"avatar"),n(this,"block_button"),n(this,"blocked_entity_key"),this.child_display_name=new f(e.childDisplayName),this.child_account_description=new f(e.childAccountDescription),this.avatar=x.fromResponse(e.avatar),this.block_button=v.parseItem(e.blockButton,[$e]),this.blocked_entity_key=e.blockedEntityKey}async blockChannel(){if(!h(this,Vs))throw new w("An active caller must be provide to perform this operation.");let e=this.block_button;if(!e)throw new w("Block button was not found.",{child_display_name:this.child_display_name});if(e.is_toggled)throw new w("This channel is already blocked.",{child_display_name:this.child_display_name});return await e.endpoint.call(h(this,Vs),{parse:!1})}setActions(e){P(this,Vs,e)}};Vs=new WeakMap;a(eg,"KidsBlocklistPickerItem");n(eg,"type","KidsBlocklistPickerItem");var tg=eg,ig=class extends m{constructor(e){super(),n(this,"title"),n(this,"child_rows"),n(this,"done_button"),n(this,"successful_toast_action_message"),this.title=new f(e.title),this.child_rows=v.parse(e.childRows,!0,[tg]),this.done_button=v.parseItem(e.doneButton,[L]),this.successful_toast_action_message=new f(e.successfulToastActionMessage)}};a(ig,"KidsBlocklistPicker");n(ig,"type","KidsBlocklistPicker");var BM=ig,ng=class extends m{constructor(e){var i,r;super(),n(this,"title"),n(this,"category_assets"),n(this,"category_type"),n(this,"endpoint"),this.title=new f(e.title),this.category_assets={asset_key:(i=e.categoryAssets)==null?void 0:i.assetKey,background_color:(r=e.categoryAssets)==null?void 0:r.backgroundColor},this.category_type=e.categoryType,this.endpoint=new y(e.endpoint)}};a(ng,"KidsCategoryTab");n(ng,"type","KidsCategoryTab");var sg=ng,og=class extends m{constructor(e){super(),n(this,"category_tabs"),n(this,"privacy_button"),this.category_tabs=v.parseArray(e.categoryTabs,sg),this.privacy_button=v.parseItem(e.privacyButtonRenderer,L)}};a(og,"KidsCategoriesHeader");n(og,"type","kidsCategoriesHeader");var u4=og,rg=class extends m{constructor(e){super(),n(this,"anchors"),this.anchors=v.parseArray(e.anchors,c4)}};a(rg,"KidsHomeScreen");n(rg,"type","kidsHomeScreen");var h4=rg,LM={};Ne(LM,{camelToSnake:()=>Rn,createRuntimeClass:()=>hg,generateRuntimeClass:()=>No,generateTypescriptClass:()=>Pr,inferType:()=>Oo,introspect:()=>ba,isArrayType:()=>cg,isIgnoredKey:()=>ug,isMiscType:()=>lg,isRenderer:()=>va,isRendererList:()=>ag,mergeKeyInfo:()=>ps,parse:()=>wa,toParser:()=>ya,toTypeDeclaration:()=>ga});var VM=new Set(["trackingParams","accessibility","accessibilityData"]),pl={};function Rn(t){return t.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}a(Rn,"camelToSnake");function Oo(t,e){let i=!1;if(typeof e=="object"&&e!=null){if(i=va(e))return pl[i]=Reflect.get(e,Reflect.ownKeys(e)[0]),{type:"renderer",renderers:[i],optional:!1};if(i=ag(e)){for(let[o,s]of Object.entries(i))pl[o]=s;return{type:"array",array_type:"renderer",renderers:Object.keys(i),optional:!1}}if((i=lg(t,e))||(i=cg(e)))return i}let r=typeof e;return r==="object"?{type:"object",keys:Object.entries(e).map(([o,s])=>[o,Oo(o,s)]),optional:!1}:{type:"primitive",typeof:[r],optional:!1}}a(Oo,"inferType");function ag(t){let e=Array.isArray(t);return e&&t.length===0?!1:e&&t.every(r=>va(r))?Object.fromEntries(t.map(r=>{let o=Reflect.ownKeys(r)[0].toString();return[Cs(o),r[o]]})):!1}a(ag,"isRendererList");function lg(t,e){if(typeof e=="object"&&e!==null){if(t.endsWith("Endpoint")||t.endsWith("Command")||t==="endpoint")return{type:"misc",endpoint:new y(e),optional:!1,misc_type:"NavigationEndpoint"};if(Reflect.has(e,"simpleText")||Reflect.has(e,"runs")){let i=new f(e);return{type:"misc",misc_type:"Text",optional:!1,endpoint:i.endpoint,text:i.toString()}}if(Reflect.has(e,"thumbnails")&&Array.isArray(Reflect.get(e,"thumbnails")))return{type:"misc",misc_type:"Thumbnail",optional:!1}}return!1}a(lg,"isMiscType");function va(t){if(!(typeof t=="object"))return!1;let i=Reflect.ownKeys(t);if(i.length===1){let r=i[0].toString();if(r.endsWith("Renderer")||r.endsWith("Model"))return Cs(r)}return!1}a(va,"isRenderer");function cg(t){if(!Array.isArray(t))return!1;if(t.length===0)return{type:"array",array_type:"primitive",items:{type:"primitive",typeof:["never"],optional:!1},optional:!1};let e=t.map(s=>typeof s);if(!e.every(s=>s===e[0]))return{type:"array",array_type:"primitive",items:{type:"primitive",typeof:["unknown"],optional:!1},optional:!1};let r=e[0];if(r!=="object")return{type:"array",array_type:"primitive",items:{type:"primitive",typeof:[r],optional:!1},optional:!1};let o=[];for(let s=0;s<t.length;s++){let l=Object.entries(t[s]).map(([c,u])=>[c,Oo(c,u)]);if(s===0){o=l;continue}o=ps(o,l).resolved_key_info}return{type:"array",array_type:"object",items:{type:"object",keys:o,optional:!1},optional:!1}}a(cg,"isArrayType");function d4(t){if(typeof t!="object"||t===null)throw new w("Generator: Cannot introspect non-object",{classdata:t});return Reflect.ownKeys(t).filter(i=>!ug(i)).filter(i=>typeof i=="string").map(i=>{let r=Reflect.get(t,i),o=Oo(i,r);return[i,o]})}a(d4,"introspectKeysFirstPass");function _4(t){var e;let r=t.filter(([,c])=>{var u;return c.type!=="misc"||!(c.misc_type==="NavigationEndpoint"||c.misc_type==="Text")?!1:((u=c.endpoint)==null?void 0:u.metadata.page_type)==="WEB_PAGE_TYPE_CHANNEL"}).sort(([,c],[,u])=>c.type!=="misc"||u.type!=="misc"||c.misc_type!=="Text"||u.misc_type!=="Text"?0:u.text.length-c.text.length),o=new Set,s=r[0],l;if(s){o.add(s[0]);let u=t.map(([g])=>g).filter(g=>g.endsWith("Badges")||g==="badges"),p=(e=u.filter(g=>g.startsWith("owner")||g.startsWith("author"))[0])!=null?e:u[0],_=t.find(([g])=>g===p),b=_?_[1].type==="array"&&_[1].array_type==="renderer"&&Reflect.has(_[1].renderers,"MetadataBadge"):!1;b&&p&&o.add(p),l={type:"misc",misc_type:"Author",optional:!1,params:[s[0],b?p:void 0]}}return l&&t.push(["author",l]),t.filter(([c])=>!o.has(c))}a(_4,"introspectKeysSecondPass");function p4(t){let e=d4(t);return _4(e)}a(p4,"introspect2");function ba(t){let e=p4(t),i=new Map;for(let[,o]of e)if(o.type==="renderer"||o.type==="array"&&o.array_type==="renderer")for(let s of o.renderers){let l=pl[s];l&&i.set(s,l)}let r=Array.from(i).filter(([o])=>!Fo(o));return{key_info:e,unimplemented_dependencies:r}}a(ba,"introspect");function ug(t){return typeof t=="string"&&VM.has(t)}a(ug,"isIgnoredKey");function hg(t,e,i){var r,o;i({error_type:"class_not_found",classname:t,key_info:e});let s=(r=class extends m{static set key_info(l){P(this,o,new Map(l))}static get key_info(){return[...h(this,o).entries()]}constructor(l){super();let{key_info:c,unimplemented_dependencies:u}=ba(l),{resolved_key_info:d,changed_keys:p}=ps(s.key_info,c);p.length>0&&(s.key_info=d,i({error_type:"class_changed",classname:t,key_info:s.key_info,changed_keys:p}));for(let[b,g]of u)No(b,g,i);for(let[b,g]of c){let C=Rn(b);g.type==="misc"&&g.misc_type==="NavigationEndpoint"&&(C="endpoint"),Reflect.set(this,C,wa(b,g,l))}}},o=new WeakMap,a(r,"node"),n(r,"type",t),M(r,o,new Map),r);return s.key_info=e,Object.defineProperty(s,"name",{value:t,writable:!1}),s}a(hg,"createRuntimeClass");function No(t,e,i){let{key_info:r,unimplemented_dependencies:o}=ba(e),s=hg(t,r,i);Eg(t,s);for(let[l,c]of o)No(l,c,i);return s}a(No,"generateRuntimeClass");function Pr(t,e){let i=[],r=["super();"];for(let[o,s]of e){let l=Rn(o);s.type==="misc"&&s.misc_type==="NavigationEndpoint"&&(l="endpoint"),i.push(`${l}${s.optional?"?":""}: ${ga(s)};`),r.push(`this.${l} = ${ya(o,s)};`)}return`class ${t} extends YTNode {
static type = '${t}';
${i.join(`
`)}
constructor(data: RawNode) {
${r.join(`
`)}
}
}
`}a(Pr,"generateTypescriptClass");function fl(t,e){return`{
${e.map(([i,r])=>`${" ".repeat((t+2)*2)}${Rn(i)}${r.optional?"?":""}: ${ga(r,t+1)}`).join(`,
`)}
${" ".repeat((t+1)*2)}}`}a(fl,"toTypeDeclarationObject");function ga(t,e=0){switch(t.type){case"renderer":return`${t.renderers.map(i=>`YTNodes.${i}`).join(" | ")} | null`;case"array":switch(t.array_type){case"renderer":return`ObservedArray<${t.renderers.map(i=>`YTNodes.${i}`).join(" | ")}> | null`;case"primitive":{let i=t.items.typeof;return t.items.optional&&!i.includes("undefined")&&i.push("undefined"),`${i.length===1?`${i[0]}`:`(${i.join(" | ")})`}[]`}case"object":return`${fl(e,t.items.keys)}[]`;default:throw new Error("Unreachable code reached! Switch missing case!")}case"object":return fl(e,t.keys);case"misc":return t.misc_type==="Thumbnail"?"Thumbnail[]":t.misc_type;case"primitive":return t.typeof.join(" | ")}}a(ga,"toTypeDeclaration");function ml(t,e,i,r){let o=[...i,r];return`{
${e.map(([s,l])=>`${" ".repeat((t+2)*2)}${Rn(s)}: ${ya(s,l,o,t+1)}`).join(`,
`)}
${" ".repeat((t+1)*2)}}`}a(ml,"toParserObject");function ya(t,e,i=["data"],r=1){let o="undefined";switch(e.type){case"renderer":o=`Parser.parseItem(${i.join(".")}.${t}, ${vl(e.renderers)})`;break;case"array":switch(e.array_type){case"renderer":o=`Parser.parse(${i.join(".")}.${t}, true, ${vl(e.renderers)})`;break;case"object":o=`${i.join(".")}.${t}.map((item: any) => (${ml(r,e.items.keys,[],"item")}))`;break;case"primitive":o=`${i.join(".")}.${t}`;break;default:throw new Error("Unreachable code reached! Switch missing case!")}break;case"object":o=ml(r,e.keys,i,t);break;case"misc":switch(e.misc_type){case"Thumbnail":o=`Thumbnail.fromResponse(${i.join(".")}.${t})`;break;case"Author":{let s=`new Author(${i.join(".")}.${e.params[0]}, ${e.params[1]?`${i.join(".")}.${e.params[1]}`:"undefined"})`;return e.optional?`Reflect.has(${i.join(".")}, '${e.params[0]}') ? ${s} : undefined`:s}default:o=`new ${e.misc_type}(${i.join(".")}.${t})`;break}if(o==="undefined")throw new Error("Unreachable code reached! Switch missing case!");break;case"primitive":o=`${i.join(".")}.${t}`;break}return e.optional?`Reflect.has(${i.join(".")}, '${t}') ? ${o} : undefined`:o}a(ya,"toParser");function vl(t){return t.length===1?`YTNodes.${t[0]}`:`[ ${t.map(e=>`YTNodes.${e}`).join(", ")} ]`}a(vl,"toParserValidTypes");function Ot(t,e){let i=t;for(let r of e)i=i[r];return i}a(Ot,"accessDataFromKeyPath");function bl(t,e){let i=t;for(let r of e)if(Reflect.has(i,r))i=i[r];else return!1;return!0}a(bl,"hasDataFromKeyPath");function gl(t,e,i,r,o){let s={},l=[...i,t];for(let[c,u]of r)s[c]=o?wa(c,u,e,l):void 0;return s}a(gl,"parseObject");function wa(t,e,i,r=["data"]){let o=!e.optional||bl({data:i},[...r,t]);switch(e.type){case"renderer":return o?Ce(Ot({data:i},[...r,t]),e.renderers.map(s=>ms(s))):void 0;case"array":switch(e.array_type){case"renderer":return o?_t(Ot({data:i},[...r,t]),!0,e.renderers.map(s=>ms(s))):void 0;case"object":return o?Ot({data:i},[...r,t]).map((s,l)=>gl(`${l}`,i,[...r,t],e.items.keys,o)):void 0;case"primitive":return o?Ot({data:i},[...r,t]):void 0;default:throw new Error("Unreachable code reached! Switch missing case!")}case"object":return gl(t,i,r,e.keys,o);case"misc":switch(e.misc_type){case"NavigationEndpoint":return o?new y(Ot({data:i},[...r,t])):void 0;case"Text":return o?new f(Ot({data:i},[...r,t])):void 0;case"Thumbnail":return o?x.fromResponse(Ot({data:i},[...r,t])):void 0;case"Author":return!e.optional||bl({data:i},[...r,e.params[0]])?new le(Ot({data:i},[...r,e.params[0]]),e.params[1]?Ot({data:i},[...r,e.params[1]]):void 0):void 0;default:throw new Error("Unreachable code reached! Switch missing case!")}case"primitive":return Ot({data:i},[...r,t])}}a(wa,"parse");function ps(t,e){let i=new Map,r=new Set(t.map(([b])=>b)),o=new Set(e.map(([b])=>b)),s=e.filter(([b])=>!r.has(b)),l=t.filter(([b])=>!o.has(b)),c=t.filter(([b])=>o.has(b)),u=new Map(e);for(let[b,g]of c){let C=u.get(b);if(C){if(g.type!==C.type){i.set(b,{type:"primitive",typeof:["unknown"],optional:!0});continue}switch(g.type){case"object":{if(C.type!=="object")continue;let{resolved_key_info:T}=ps(g.keys,C.keys),S={type:"object",keys:T,optional:g.optional||C.optional};JSON.stringify(S)!==JSON.stringify(g)&&i.set(b,S)}break;case"renderer":{if(C.type!=="renderer")continue;let T={...g.renderers,...C.renderers},S=g.optional||C.optional,k={type:"renderer",renderers:T,optional:S};JSON.stringify({...k,renderers:Object.keys(k.renderers)})!==JSON.stringify({...g,renderers:Object.keys(g.renderers)})&&i.set(b,k)}break;case"array":{if(C.type!=="array")continue;switch(g.array_type){case"renderer":{if(C.array_type!=="renderer"){i.set(b,{type:"array",array_type:"primitive",items:{type:"primitive",typeof:["unknown"],optional:!0},optional:!0});continue}let T={...g.renderers,...C.renderers},S=g.optional||C.optional,k={type:"array",array_type:"renderer",renderers:T,optional:S};JSON.stringify({...k,renderers:Object.keys(k.renderers)})!==JSON.stringify({...g,renderers:Object.keys(g.renderers)})&&i.set(b,k)}break;case"object":{if(C.array_type==="primitive"&&C.items.typeof.length==1&&C.items.typeof[0]==="never")continue;if(C.array_type!=="object"){i.set(b,{type:"array",array_type:"primitive",items:{type:"primitive",typeof:["unknown"],optional:!0},optional:!0});continue}let{resolved_key_info:T}=ps(g.items.keys,C.items.keys),S={type:"array",array_type:"object",items:{type:"object",keys:T,optional:g.items.optional||C.items.optional},optional:g.optional||C.optional};JSON.stringify(S)!==JSON.stringify(g)&&i.set(b,S)}break;case"primitive":{if(g.items.typeof.includes("never")&&C.array_type==="object"){i.set(b,C);continue}if(C.array_type!=="primitive"){i.set(b,{type:"array",array_type:"primitive",items:{type:"primitive",typeof:["unknown"],optional:!0},optional:!0});continue}let T=new Set([...C.items.typeof,...g.items.typeof]);T.size>1&&T.has("never")&&T.delete("never");let S={type:"array",array_type:"primitive",items:{type:"primitive",typeof:Array.from(T),optional:g.items.optional||C.items.optional},optional:g.optional||C.optional};JSON.stringify(S)!==JSON.stringify(g)&&i.set(b,S)}break;default:throw new Error("Unreachable code reached! Switch missing case!")}break}case"misc":{if(C.type!=="misc")continue;switch(g.misc_type!==C.misc_type&&i.set(b,{type:"primitive",typeof:["unknown"],optional:!0}),g.misc_type){case"Author":{if(C.misc_type!=="Author")break;let T=g.params[1]||C.params[1],k={type:"misc",misc_type:"Author",optional:g.optional||C.optional,params:[C.params[0],T]};JSON.stringify(k)!==JSON.stringify(g)&&i.set(b,k)}break}}break;case"primitive":{if(C.type!=="primitive")continue;let T={type:"primitive",typeof:Array.from(new Set([...C.typeof,...g.typeof])),optional:g.optional||C.optional};JSON.stringify(T)!==JSON.stringify(g)&&i.set(b,T)}break}}}for(let[b,g]of s)i.set(b,{...g,optional:!0});for(let[b,g]of l)i.set(b,{...g,optional:!0});let d=t.filter(([b])=>!i.has(b));return{resolved_key_info:[...new Map([...d,...i]).entries()],changed_keys:[...i.entries()]}}a(ps,"mergeKeyInfo");var dg=class extends m{constructor(e){var i,r,o;super(),n(this,"contents"),n(this,"continuation"),this.contents=xt(e.contents),Array.isArray(e.continuations)&&(this.continuation=(o=(r=(i=e.continuations)==null?void 0:i.at(0))==null?void 0:r.nextContinuationData)==null?void 0:o.continuation)}};a(dg,"ItemSectionContinuation");n(dg,"type","itemSectionContinuation");var f4=dg,_g=class extends m{constructor(e){super(),n(this,"endpoint"),this.endpoint=new y(e.endpoint)}};a(_g,"NavigateAction");n(_g,"type","navigateAction");var pg=_g,fg=class extends m{constructor(e){super(),n(this,"miniplayer_command"),n(this,"show_premium_branding"),this.miniplayer_command=new y(e.miniplayerCommand),this.show_premium_branding=e.showPremiumBranding}};a(fg,"ShowMiniplayerCommand");n(fg,"type","showMiniplayerCommand");var OM=fg,mg=class extends m{constructor(e){super(),n(this,"target_id"),n(this,"contents"),n(this,"slot"),this.target_id=e.targetId,this.contents=_t(e.continuationItems,!0),this.slot=e?.slot}};a(mg,"ReloadContinuationItemsCommand");n(mg,"type","reloadContinuationItemsCommand");var Yi=mg,vg=class extends m{constructor(e){var i,r,o,s,l,c;super(),n(this,"continuation"),n(this,"contents"),this.contents=_t(e.contents,!0),this.continuation=((o=(r=(i=e.continuations)==null?void 0:i[0])==null?void 0:r.nextContinuationData)==null?void 0:o.continuation)||((c=(l=(s=e.continuations)==null?void 0:s[0])==null?void 0:l.reloadContinuationData)==null?void 0:c.continuation)||null}};a(vg,"SectionListContinuation");n(vg,"type","sectionListContinuation");var fs=vg,bg=class extends m{constructor(e){var i;super(),n(this,"continuation"),n(this,"contents"),this.contents=_t(e.contents,!0),this.continuation=((i=e.continuations)==null?void 0:i[0].nextContinuationData.continuation)||null}};a(bg,"MusicPlaylistShelfContinuation");n(bg,"type","musicPlaylistShelfContinuation");var m4=bg,gg=class extends m{constructor(e){var i,r,o,s;super(),n(this,"continuation"),n(this,"contents"),this.contents=xt(e.contents),this.continuation=((r=(i=e.continuations)==null?void 0:i[0].nextContinuationData)==null?void 0:r.continuation)||((s=(o=e.continuations)==null?void 0:o[0].reloadContinuationData)==null?void 0:s.continuation)||null}};a(gg,"MusicShelfContinuation");n(gg,"type","musicShelfContinuation");var yg=gg,wg=class extends m{constructor(e){var i;super(),n(this,"continuation"),n(this,"items"),this.items=_t(e.items,!0),this.continuation=((i=e.continuations)==null?void 0:i[0].nextContinuationData.continuation)||null}get contents(){return this.items}};a(wg,"GridContinuation");n(wg,"type","gridContinuation");var v4=wg,kg=class extends m{constructor(e){var i,r,o,s,l,c;super(),n(this,"continuation"),n(this,"contents"),this.contents=xt(e.contents),this.continuation=((o=(r=(i=e.continuations)==null?void 0:i[0])==null?void 0:r.nextContinuationData)==null?void 0:o.continuation)||((c=(l=(s=e.continuations)==null?void 0:s[0])==null?void 0:l.nextRadioContinuationData)==null?void 0:c.continuation)||null}};a(kg,"PlaylistPanelContinuation");n(kg,"type","playlistPanelContinuation");var b4=kg,Cg=class extends m{constructor(e){var i,r,o;super(),n(this,"continuation_type"),n(this,"timeout_ms"),n(this,"time_until_last_message_ms"),n(this,"token"),this.continuation_type=e.type,this.timeout_ms=(i=e.continuation)==null?void 0:i.timeoutMs,this.time_until_last_message_ms=(r=e.continuation)==null?void 0:r.timeUntilLastMessageMsec,this.token=(o=e.continuation)==null?void 0:o.continuation}};a(Cg,"Continuation");n(Cg,"type","continuation");var g4=Cg,Tg=class extends m{constructor(e){var i,r,o,s,l,c,u,d;super(),n(this,"actions"),n(this,"action_panel"),n(this,"item_list"),n(this,"header"),n(this,"participants_list"),n(this,"popout_message"),n(this,"emojis"),n(this,"continuation"),n(this,"viewer_name"),this.actions=_t((i=e.actions)==null?void 0:i.map(b=>(delete b.clickTrackingParams,b)),!0)||te([]),this.action_panel=Ce(e.actionPanel),this.item_list=Ce(e.itemList,zS),this.header=Ce(e.header,YS),this.participants_list=Ce(e.participantsList,JS),this.popout_message=Ce(e.popoutMessage,ui),this.emojis=((r=e.emojis)==null?void 0:r.map(b=>({emoji_id:b.emojiId,shortcuts:b.shortcuts,search_terms:b.searchTerms,image:x.fromResponse(b.image),is_custom_emoji:b.isCustomEmoji})))||[];let p,_;(o=e.continuations)!=null&&o[0].timedContinuationData?(_="timed",p=(s=e.continuations)==null?void 0:s[0].timedContinuationData):(l=e.continuations)!=null&&l[0].invalidationContinuationData?(_="invalidation",p=(c=e.continuations)==null?void 0:c[0].invalidationContinuationData):(u=e.continuations)!=null&&u[0].liveChatReplayContinuationData&&(_="replay",p=(d=e.continuations)==null?void 0:d[0].liveChatReplayContinuationData),this.continuation=new g4({continuation:p,type:_}),this.viewer_name=e.viewerName}};a(Tg,"LiveChatContinuation");n(Tg,"type","liveChatContinuation");var y4=Tg,Sg=class extends m{constructor(e){super(),n(this,"request"),n(this,"token"),this.request=e.request,this.token=e.token}};a(Sg,"ContinuationCommand");n(Sg,"type","ContinuationCommand");var yl=Sg;function w4(){return{key:void 0,value:void 0}}a(w4,"createBaseKeyValuePair");var Xi={encode(t,e=new O){return t.key!==void 0&&e.uint32(10).string(t.key),t.value!==void 0&&e.uint32(18).string(t.value),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=w4();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.key=i.string();continue}case 2:{if(s!==18)break;o.value=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function k4(){return{xtags:[]}}a(k4,"createBaseFormatXTags");var NM={encode(t,e=new O){for(let i of t.xtags)Xi.encode(i,e.uint32(10).fork()).join();return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=k4();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.xtags.push(Xi.decode(i,i.uint32()));continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}},sr,C4=class{constructor(e,i){M(this,sr),n(this,"itag"),n(this,"url"),n(this,"width"),n(this,"height"),n(this,"last_modified"),n(this,"last_modified_ms"),n(this,"content_length"),n(this,"quality"),n(this,"xtags"),n(this,"drm_families"),n(this,"fps"),n(this,"quality_label"),n(this,"projection_type"),n(this,"average_bitrate"),n(this,"bitrate"),n(this,"spatial_audio_type"),n(this,"target_duration_dec"),n(this,"fair_play_key_uri"),n(this,"stereo_layout"),n(this,"max_dvr_duration_sec"),n(this,"high_replication"),n(this,"audio_quality"),n(this,"approx_duration_ms"),n(this,"audio_sample_rate"),n(this,"audio_channels"),n(this,"loudness_db"),n(this,"signature_cipher"),n(this,"is_drc"),n(this,"is_vb"),n(this,"is_sr"),n(this,"drm_track_type"),n(this,"distinct_params"),n(this,"track_absolute_loudness_lkfs"),n(this,"mime_type"),n(this,"is_type_otf"),n(this,"init_range"),n(this,"index_range"),n(this,"cipher"),n(this,"audio_track"),n(this,"has_audio"),n(this,"has_video"),n(this,"has_text"),n(this,"language"),n(this,"is_dubbed"),n(this,"is_auto_dubbed"),n(this,"is_descriptive"),n(this,"is_secondary"),n(this,"is_original"),n(this,"color_info"),n(this,"caption_track");var r,o,s,l,c,u,d;i&&P(this,sr,i),this.itag=e.itag,this.mime_type=e.mimeType,this.is_type_otf=e.type==="FORMAT_STREAM_TYPE_OTF",this.bitrate=e.bitrate,this.average_bitrate=e.averageBitrate,Reflect.has(e,"width")&&Reflect.has(e,"height")&&(this.width=parseInt(e.width),this.height=parseInt(e.height)),Reflect.has(e,"projectionType")&&(this.projection_type=e.projectionType),Reflect.has(e,"stereoLayout")&&(this.stereo_layout=(r=e.stereoLayout)==null?void 0:r.replace("STEREO_LAYOUT_","")),Reflect.has(e,"initRange")&&(this.init_range={start:parseInt(e.initRange.start),end:parseInt(e.initRange.end)}),Reflect.has(e,"indexRange")&&(this.index_range={start:parseInt(e.indexRange.start),end:parseInt(e.indexRange.end)}),this.last_modified=new Date(Math.floor(parseInt(e.lastModified)/1e3)),this.last_modified_ms=e.lastModified,Reflect.has(e,"contentLength")&&(this.content_length=parseInt(e.contentLength)),Reflect.has(e,"quality")&&(this.quality=e.quality),Reflect.has(e,"qualityLabel")&&(this.quality_label=e.qualityLabel),Reflect.has(e,"fps")&&(this.fps=e.fps),Reflect.has(e,"url")&&(this.url=e.url),Reflect.has(e,"cipher")&&(this.cipher=e.cipher),Reflect.has(e,"signatureCipher")&&(this.signature_cipher=e.signatureCipher),Reflect.has(e,"audioQuality")&&(this.audio_quality=e.audioQuality),this.approx_duration_ms=parseInt(e.approxDurationMs),Reflect.has(e,"audioSampleRate")&&(this.audio_sample_rate=parseInt(e.audioSampleRate)),Reflect.has(e,"audioChannels")&&(this.audio_channels=e.audioChannels),Reflect.has(e,"loudnessDb")&&(this.loudness_db=e.loudnessDb),Reflect.has(e,"spatialAudioType")&&(this.spatial_audio_type=(o=e.spatialAudioType)==null?void 0:o.replace("SPATIAL_AUDIO_TYPE_","")),Reflect.has(e,"maxDvrDurationSec")&&(this.max_dvr_duration_sec=e.maxDvrDurationSec),Reflect.has(e,"targetDurationSec")&&(this.target_duration_dec=e.targetDurationSec),this.has_audio=!!e.audioBitrate||!!e.audioQuality,this.has_video=!!e.qualityLabel,this.has_text=!!e.captionTrack,Reflect.has(e,"xtags")&&(this.xtags=e.xtags),Reflect.has(e,"fairPlayKeyUri")&&(this.fair_play_key_uri=e.fairPlayKeyUri),Reflect.has(e,"drmFamilies")&&(this.drm_families=e.drmFamilies),Reflect.has(e,"drmTrackType")&&(this.drm_track_type=e.drmTrackType),Reflect.has(e,"distinctParams")&&(this.distinct_params=e.distinctParams),Reflect.has(e,"trackAbsoluteLoudnessLkfs")&&(this.track_absolute_loudness_lkfs=e.trackAbsoluteLoudnessLkfs),Reflect.has(e,"highReplication")&&(this.high_replication=e.highReplication),Reflect.has(e,"colorInfo")&&(this.color_info={primaries:(s=e.colorInfo.primaries)==null?void 0:s.replace("COLOR_PRIMARIES_",""),transfer_characteristics:(l=e.colorInfo.transferCharacteristics)==null?void 0:l.replace("COLOR_TRANSFER_CHARACTERISTICS_",""),matrix_coefficients:(c=e.colorInfo.matrixCoefficients)==null?void 0:c.replace("COLOR_MATRIX_COEFFICIENTS_","")}),Reflect.has(e,"audioTrack")&&(this.audio_track={audio_is_default:e.audioTrack.audioIsDefault,display_name:e.audioTrack.displayName,id:e.audioTrack.id}),Reflect.has(e,"captionTrack")&&(this.caption_track={display_name:e.captionTrack.displayName,vss_id:e.captionTrack.vssId,language_code:e.captionTrack.languageCode,kind:e.captionTrack.kind,id:e.captionTrack.id});let p=this.xtags?NM.decode(Ia(decodeURIComponent(this.xtags).replace(/-/g,"+").replace(/_/g,"/"))).xtags:[];if(this.has_audio||this.has_text){if(this.language=((u=p.find(_=>_.key==="lang"))==null?void 0:u.value)||null,this.has_audio){this.is_drc=!!e.isDrc||p.some(b=>b.key==="drc"&&b.value==="1"),this.is_vb=!!e.isVb||p.some(b=>b.key==="vb"&&b.value==="1");let _=(d=p.find(b=>b.key==="acont"))==null?void 0:d.value;this.is_dubbed=_==="dubbed",this.is_descriptive=_==="descriptive",this.is_secondary=_==="secondary",this.is_auto_dubbed=_==="dubbed-auto",this.is_original=_==="original"||!this.is_dubbed&&!this.is_descriptive&&!this.is_secondary&&!this.is_auto_dubbed&&!this.is_drc}this.has_text&&!this.language&&this.caption_track&&(this.language=this.caption_track.language_code)}this.has_video&&(this.is_sr=p.some(_=>_.key==="sr"&&_.value==="1"))}async decipher(e){return e?e.decipher(this.url,this.signature_cipher,this.cipher,h(this,sr)):this.url||""}};sr=new WeakMap;a(C4,"Format");var T4=C4,S4=class{constructor(e){n(this,"id"),n(this,"channel_id"),n(this,"title"),n(this,"duration"),n(this,"keywords"),n(this,"is_owner_viewing"),n(this,"short_description"),n(this,"thumbnail"),n(this,"allow_ratings"),n(this,"view_count"),n(this,"author"),n(this,"is_private"),n(this,"is_live"),n(this,"is_live_content"),n(this,"is_live_dvr_enabled"),n(this,"is_upcoming"),n(this,"is_crawlable"),n(this,"is_post_live_dvr"),n(this,"is_low_latency_live_stream"),n(this,"live_chunk_readahead"),this.id=e.videoId,this.channel_id=e.channelId,this.title=e.title,this.duration=parseInt(e.lengthSeconds),this.keywords=e.keywords,this.is_owner_viewing=!!e.isOwnerViewing,this.short_description=e.shortDescription,this.thumbnail=x.fromResponse(e.thumbnail),this.allow_ratings=!!e.allowRatings,this.view_count=parseInt(e.viewCount),this.author=e.author,this.is_private=!!e.isPrivate,this.is_live=!!e.isLive,this.is_live_content=!!e.isLiveContent,this.is_live_dvr_enabled=!!e.isLiveDvrEnabled,this.is_low_latency_live_stream=!!e.isLowLatencyLiveStream,this.is_upcoming=!!e.isUpcoming,this.is_post_live_dvr=!!e.isPostLiveDvr,this.is_crawlable=!!e.isCrawlable,this.live_chunk_readahead=e.liveChunkReadahead}};a(S4,"VideoDetails");var I4=S4,en="Parser",FM=new Set(["AdSlot","DisplayAd","SearchPyv","MealbarPromo","PrimetimePromo","PromotedSparklesWeb","CompactPromotedVideo","BrandVideoShelf","BrandVideoSingleton","StatementBanner","GuideSigninPromo","AdsEngagementPanelContent","MiniGameCardView","GenAiFeedbackFormView"]),Ig=new Map(Object.entries(ql)),E4=new Map,Tn=null,Ii=a(({classname:t,...e})=>{switch(e.error_type){case"parse":e.error instanceof Error&&X.warn(en,new w(`Something went wrong at ${t}!
This is a bug, please report it at ${jt.bugs.url}`,{stack:e.error.stack,classdata:JSON.stringify(e.classdata,null,2)}));break;case"typecheck":X.warn(en,new Qi(`Type mismatch, got ${t} expected ${Array.isArray(e.expected)?e.expected.join(" | "):e.expected}.`,e.classdata));break;case"mutation_data_missing":X.warn(en,new w(`Mutation data required for processing ${t}, but none found.
This is a bug, please report it at ${jt.bugs.url}`));break;case"mutation_data_invalid":X.warn(en,new w(`Mutation data missing or invalid for ${e.failed} out of ${e.total} MusicMultiSelectMenuItems. The titles of the failed items are: ${e.titles.join(", ")}.
This is a bug, please report it at ${jt.bugs.url}`));break;case"class_not_found":X.warn(en,new w(`${t} not found!
This is a bug, want to help us fix it? Follow the instructions at ${jt.homepage.split("#",1)[0]}/blob/main/docs/updating-the-parser.md or report it at ${jt.bugs.url}!
Introspected and JIT generated this class in the meantime:
${Pr(t,e.key_info)}`));break;case"class_changed":X.warn(en,`${t} changed!
The following keys where altered: ${e.changed_keys.map(([i])=>Rn(i)).join(", ")}
The class has changed to:
${Pr(t,e.key_info)}`);break;default:X.warn(en,"Unreachable code reached at ParserErrorHandler");break}},"ERROR_HANDLER");function A4(t){Ii=t}a(A4,"setParserErrorHandler");function Nt(){Tn=null}a(Nt,"_clearMemo");function Ft(){Tn=new Hl}a(Ft,"_createMemo");function x4(t,e){if(!Tn)return;let i=Tn.get(t);if(!i)return Tn.set(t,[e]);i.push(e)}a(x4,"_addToMemo");function Ut(){if(!Tn)throw new Error("Parser#getMemo() called before Parser#createMemo()");return Tn}a(Ut,"_getMemo");function ka(t){return FM.has(t)}a(ka,"shouldIgnore");function Cs(t){return(t.charAt(0).toUpperCase()+t.slice(1)).replace(/Renderer|Model/g,"").replace(/Radio/g,"Mix").trim()}a(Cs,"sanitizeClassName");function ms(t){let e=Ig.get(t);if(!e){let i=new Error(`Module not found: ${t}`);throw i.code="MODULE_NOT_FOUND",i}return e}a(ms,"getParserByName");function Fo(t){return Ig.has(t)}a(Fo,"hasParser");function Eg(t,e){Ig.set(t,e),E4.set(t,e)}a(Eg,"addRuntimeParser");function P4(){return Object.fromEntries(E4)}a(P4,"getDynamicParsers");function Mr(t){var e,i,r,o,s,l,c,u,d,p,_,b,g,C,T,S;let k={};Ft();let A=_t(t.contents),I=Ut();A&&(k.contents=A,k.contents_memo=I),Nt(),Ft();let D=t.onResponseReceivedActions?so(t.onResponseReceivedActions):null,H=Ut();D&&(k.on_response_received_actions=D,k.on_response_received_actions_memo=H),Nt(),Ft();let j=t.onResponseReceivedEndpoints?so(t.onResponseReceivedEndpoints):null,W=Ut();j&&(k.on_response_received_endpoints=j,k.on_response_received_endpoints_memo=W),Nt(),Ft();let q=t.onResponseReceivedCommands?so(t.onResponseReceivedCommands):null,N=Ut();q&&(k.on_response_received_commands=q,k.on_response_received_commands_memo=N),Nt(),Ft();let R=t.continuationContents?Rr(t.continuationContents):null,K=Ut();R&&(k.continuation_contents=R,k.continuation_contents_memo=K),Nt(),Ft();let Y=t.actions?Pg(t.actions):null,we=Ut();Y&&(k.actions=Y,k.actions_memo=we),Nt(),Ft();let _e=t.liveChatItemContextMenuSupportedRenderers?Ce(t.liveChatItemContextMenuSupportedRenderers):null,ce=Ut();_e&&(k.live_chat_item_context_menu_supported_renderers=_e,k.live_chat_item_context_menu_supported_renderers_memo=ce),Nt(),Ft();let G=t.header?_t(t.header):null,Q=Ut();G&&(k.header=G,k.header_memo=Q),Nt(),Ft();let pe=t.sidebar?Ce(t.sidebar):null,ae=Ut();pe&&(k.sidebar=pe,k.sidebar_memo=ae),Nt(),Ft();let Ie=_t(t.items);Ie&&(k.items=Ie,k.items_memo=Ut()),Nt(),Mg(I,(i=(e=t.frameworkUpdates)==null?void 0:e.entityBatchUpdate)==null?void 0:i.mutations),W&&Rg(W,(o=(r=t.frameworkUpdates)==null?void 0:r.entityBatchUpdate)==null?void 0:o.mutations);let J=t.continuation?xg(t.continuation):null;J&&(k.continuation=J);let xe=t.continuationEndpoint?Rr(t.continuationEndpoint):null;xe&&(k.continuation_endpoint=xe);let fe=_t(t.metadata);fe&&(k.metadata=fe);let ke=Ce(t.microformat);ke&&(k.microformat=ke);let ne=Ce(t.overlay);ne&&(k.overlay=ne);let Pe=xt(t.alerts,[Eu,S3]);Pe.length&&(k.alerts=Pe);let Ct=t.refinements;Ct&&(k.refinements=Ct);let Ee=t.estimatedResults?parseInt(t.estimatedResults):null;Ee&&(k.estimated_results=Ee);let di=_t(t.playerOverlays);di&&(k.player_overlays=di);let Zi=Ce(t.background,Ai);Zi&&(k.background=Zi);let xi=t.playbackTracking?{videostats_watchtime_url:t.playbackTracking.videostatsWatchtimeUrl.baseUrl,videostats_playback_url:t.playbackTracking.videostatsPlaybackUrl.baseUrl}:null;xi&&(k.playback_tracking=xi);let Pi=t.playabilityStatus?{status:t.playabilityStatus.status,reason:t.playabilityStatus.reason||"",embeddable:!!t.playabilityStatus.playableInEmbed||!1,audio_only_playability:Ce(t.playabilityStatus.audioOnlyPlayability,A3),error_screen:Ce(t.playabilityStatus.errorScreen)}:null;if(Pi&&(k.playability_status=Pi),t.streamingData){let Bn=new Map;k.streaming_data={expires:new Date(Date.now()+parseInt(t.streamingData.expiresInSeconds)*1e3),formats:Dr(t.streamingData.formats,Bn),adaptive_formats:Dr(t.streamingData.adaptiveFormats,Bn),dash_manifest_url:t.streamingData.dashManifestUrl,hls_manifest_url:t.streamingData.hlsManifestUrl,server_abr_streaming_url:t.streamingData.serverAbrStreamingUrl}}t.playerConfig&&(k.player_config={audio_config:{loudness_db:(s=t.playerConfig.audioConfig)==null?void 0:s.loudnessDb,perceptual_loudness_db:(l=t.playerConfig.audioConfig)==null?void 0:l.perceptualLoudnessDb,enable_per_format_loudness:(c=t.playerConfig.audioConfig)==null?void 0:c.enablePerFormatLoudness},stream_selection_config:{max_bitrate:((u=t.playerConfig.streamSelectionConfig)==null?void 0:u.maxBitrate)||"0"},media_common_config:{dynamic_readahead_config:{max_read_ahead_media_time_ms:((p=(d=t.playerConfig.mediaCommonConfig)==null?void 0:d.dynamicReadaheadConfig)==null?void 0:p.maxReadAheadMediaTimeMs)||0,min_read_ahead_media_time_ms:((b=(_=t.playerConfig.mediaCommonConfig)==null?void 0:_.dynamicReadaheadConfig)==null?void 0:b.minReadAheadMediaTimeMs)||0,read_ahead_growth_rate_ms:((C=(g=t.playerConfig.mediaCommonConfig)==null?void 0:g.dynamicReadaheadConfig)==null?void 0:C.readAheadGrowthRateMs)||0},media_ustreamer_request_config:{video_playback_ustreamer_config:(S=(T=t.playerConfig.mediaCommonConfig)==null?void 0:T.mediaUstreamerRequestConfig)==null?void 0:S.videoPlaybackUstreamerConfig}}});let _i=t.currentVideoEndpoint?new y(t.currentVideoEndpoint):null;_i&&(k.current_video_endpoint=_i);let Dn=t.endpoint?new y(t.endpoint):null;Dn&&(k.endpoint=Dn);let Wg=Ce(t.captions,xI);Wg&&(k.captions=Wg);let qg=t.videoDetails?new I4(t.videoDetails):null;qg&&(k.video_details=qg);let jg=xt(t.annotations,AI);jg.length&&(k.annotations=jg);let Gg=Ce(t.storyboards,[Or,MI]);Gg&&(k.storyboards=Gg);let Kg=Ce(t.endscreen,uS);Kg&&(k.endscreen=Kg);let Yg=Ce(t.cards,wT);Yg&&(k.cards=Yg);let zg=xt(t.engagementPanels,ua);if(zg.length&&(k.engagement_panels=zg),t.bgChallenge){let Bn={private_do_not_access_or_else_trusted_resource_url_wrapped_value:t.bgChallenge.interpreterUrl.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue,private_do_not_access_or_else_safe_script_wrapped_value:t.bgChallenge.interpreterUrl.privateDoNotAccessOrElseSafeScriptWrappedValue};k.bg_challenge={interpreter_url:Bn,interpreter_hash:t.bgChallenge.interpreterHash,program:t.bgChallenge.program,global_name:t.bgChallenge.globalName,client_experiments_state_blob:t.bgChallenge.clientExperimentsStateBlob}}return t.challenge&&(k.challenge=t.challenge),t.playerResponse&&(k.player_response=Mr(t.playerResponse)),t.watchNextResponse&&(k.watch_next_response=Mr(t.watchNextResponse)),t.cpnInfo&&(k.cpn_info={cpn:t.cpnInfo.cpn,cpn_source:t.cpnInfo.cpnSource}),t.entries&&(k.entries=t.entries.map(Bn=>new y(Bn))),t.targetId&&(k.target_id=t.targetId),k}a(Mr,"parseResponse");function Ce(t,e){if(!t)return null;let i=Object.keys(t);if(!i.length)return null;let r=Cs(i[0]);if(!ka(r))try{let s=Fo(r)?ms(r):No(r,t[i[0]],Ii);if(e){if(Array.isArray(e)){if(!e.some(c=>c.type===s.type))return Ii({classdata:t[i[0]],classname:r,error_type:"typecheck",expected:e.map(c=>c.type)}),null}else if(s.type!==e.type)return Ii({classdata:t[i[0]],classname:r,error_type:"typecheck",expected:e.type}),null}let l=new s(t[i[0]]);return x4(r,l),l}catch(o){return Ii({classname:r,classdata:t[i[0]],error:o,error_type:"parse"}),null}return null}a(Ce,"parseItem");function xt(t,e){if(Array.isArray(t)){let i=[];for(let r of t){let o=Ce(r,e);o&&i.push(o)}return te(i)}else if(!t)return te([]);throw new Qi("Expected array but got a single item")}a(xt,"parseArray");function _t(t,e,i){if(!t)return null;if(Array.isArray(t)){let r=[];for(let s of t){let l=Ce(s,i);l&&r.push(l)}let o=te(r);return e?o:new cs(o)}else if(e)throw new Qi("Expected array but got a single item");return new cs(Ce(t,i))}a(_t,"parse");var UM=/Command$/,HM=/Endpoint$/,WM=/Action$/;function Ag(t){let e=[];try{e=Object.keys(t)}catch{}for(let i of e){let r=t[i];if(UM.test(i)||HM.test(i)||WM.test(i)){let o=Cs(i);if(ka(o))return;try{if(Fo(o))return new(ms(o))(r)}catch(s){Ii({error:s,classname:o,classdata:r,error_type:"parse"})}}}}a(Ag,"parseCommand");function M4(t){if(Array.isArray(t)){let e=[];for(let i of t){let r=Ag(i);r&&e.push(r)}return te(e)}else if(!t)return te([]);throw new Qi("Expected array but got a single item")}a(M4,"parseCommands");function xg(t){return t.timedContinuationData?new g4({continuation:t.timedContinuationData,type:"timed"}):null}a(xg,"parseC");function Rr(t){return t.itemSectionContinuation?new f4(t.itemSectionContinuation):t.sectionListContinuation?new fs(t.sectionListContinuation):t.liveChatContinuation?new y4(t.liveChatContinuation):t.musicPlaylistShelfContinuation?new m4(t.musicPlaylistShelfContinuation):t.musicShelfContinuation?new yg(t.musicShelfContinuation):t.gridContinuation?new v4(t.gridContinuation):t.playlistPanelContinuation?new b4(t.playlistPanelContinuation):t.continuationCommand?new yl(t.continuationCommand):null}a(Rr,"parseLC");function so(t){return te(t.map(e=>{if(e.navigateAction)return new pg(e.navigateAction);if(e.showMiniplayerCommand)return new OM(e.showMiniplayerCommand);if(e.reloadContinuationItemsCommand)return new Yi(e.reloadContinuationItemsCommand);if(e.appendContinuationItemsAction)return new Ji(e.appendContinuationItemsAction);if(e.openPopupAction)return new Fc(e.openPopupAction)}).filter(e=>e))}a(so,"parseRR");function Pg(t){return Array.isArray(t)?_t(t.map(e=>(delete e.clickTrackingParams,e))):new cs(Ce(t))}a(Pg,"parseActions");function Dr(t,e){return t?.map(i=>new T4(i,e))||[]}a(Dr,"parseFormats");function Mg(t,e){let i=t.getType(os);if(i.length>0&&!e)Ii({error_type:"mutation_data_missing",classname:"MusicMultiSelectMenuItem"});else{let r=[];for(let o of i){let s=e.find(c=>{var u,d;return((d=(u=c.payload)==null?void 0:u.musicFormBooleanChoice)==null?void 0:d.id)===o.form_item_entity_key}),l=s?.payload.musicFormBooleanChoice;l?.selected!==void 0&&l?.opaqueToken?o.selected=l.selected:r.push(`'${o.title}'`)}r.length>0&&Ii({error_type:"mutation_data_invalid",classname:"MusicMultiSelectMenuItem",total:i.length,failed:r.length,titles:r})}if(e){let r=e.filter(o=>{var s,l;return((s=o.payload)==null?void 0:s.macroMarkersListEntity)&&((l=o.payload.macroMarkersListEntity.markersList)==null?void 0:l.markerType)==="MARKER_TYPE_HEATMAP"});for(let o of r){let s=new u2(o.payload.macroMarkersListEntity),l=t.get("MacroMarkersListEntity");l?l.push(s):t.set("MacroMarkersListEntity",[s])}}}a(Mg,"applyMutations");function Rg(t,e){var i,r,o,s,l,c,u,d;let p=t.getType(da);if(p.length>0){e||Ii({error_type:"mutation_data_missing",classname:"CommentView"});for(let _ of p){let b=(r=(i=e.find(S=>{var k,A;return((A=(k=S.payload)==null?void 0:k.commentEntityPayload)==null?void 0:A.key)===_.keys.comment}))==null?void 0:i.payload)==null?void 0:r.commentEntityPayload,g=(s=(o=e.find(S=>{var k,A;return((A=(k=S.payload)==null?void 0:k.engagementToolbarStateEntityPayload)==null?void 0:A.key)===_.keys.toolbar_state}))==null?void 0:o.payload)==null?void 0:s.engagementToolbarStateEntityPayload,C=(c=(l=e.find(S=>S.entityKey===_.keys.toolbar_surface))==null?void 0:l.payload)==null?void 0:c.engagementToolbarSurfaceEntityPayload,T=(d=(u=e.find(S=>{var k,A;return((A=(k=S.payload)==null?void 0:k.commentSurfaceEntityPayload)==null?void 0:A.key)===_.keys.comment_surface}))==null?void 0:u.payload)==null?void 0:d.commentSurfaceEntityPayload;_.applyMutations(b,g,C,T)}}}a(Rg,"applyCommentsMutations");var qM={};Ne(qM,{AccountInfo:()=>D4,Channel:()=>H4,ChannelListContinuation:()=>j4,Comments:()=>Il,FilteredChannelList:()=>K4,Guide:()=>$4,HashtagFeed:()=>iE,History:()=>Dg,HomeFeed:()=>Z4,ItemMenu:()=>sE,Library:()=>cE,LiveChat:()=>fE,NotificationsMenu:()=>bE,Playlist:()=>Ta,Search:()=>yE,Settings:()=>CE,SmoothedQueue:()=>_E,TranscriptInfo:()=>AE,VideoInfo:()=>Pl});var On,R4=class{constructor(e){if(M(this,On),n(this,"contents"),P(this,On,v.parseResponse(e.data)),!h(this,On).contents)throw new w("Page contents not found");let i=h(this,On).contents.array().as(p3)[0];if(!i)throw new w("Account section list not found");this.contents=i.contents[0]}get page(){return h(this,On)}};On=new WeakMap;a(R4,"AccountInfo");var D4=R4,Ze,Os,ht,ln,Ns,B4,wl,L4=class or{constructor(e,i,r=!1){M(this,Ns),M(this,Ze),M(this,Os),M(this,ht),M(this,ln),F(this,Ns,B4).call(this,i)||r?P(this,Ze,i):P(this,Ze,v.parseResponse(i.data));let o=Og(h(this,Ze).contents_memo,h(this,Ze).continuation_contents_memo,h(this,Ze).on_response_received_commands_memo,h(this,Ze).on_response_received_endpoints_memo,h(this,Ze).on_response_received_actions_memo,h(this,Ze).sidebar_memo,h(this,Ze).header_memo);if(!o)throw new w("No memo found in feed");P(this,ht,o),P(this,Os,e)}static getVideosFromMemo(e){return te(e.getType(la,yS,bv,eb,sd,ss,iv,go,a4).filter(i=>!i.is(ss)||i.content_type==="VIDEO"||i.content_type==="MOVIE"||i.content_type==="SHORT"))}static getPlaylistsFromMemo(e){let i=e.getType(Ro,vS),r=e.getType(ss).filter(o=>["PLAYLIST","ALBUM","PODCAST"].includes(o.content_type));return r.length>0&&i.push(...r),i}get videos(){return or.getVideosFromMemo(h(this,ht))}get posts(){return h(this,ht).getType(aa,rv,JI)}get channels(){return h(this,ht).getType(IT,mS)}get playlists(){return or.getPlaylistsFromMemo(h(this,ht))}get memo(){return h(this,ht)}get page_contents(){var e;let i=(e=h(this,ht).getType(kt))==null?void 0:e[0].content,r=h(this,ht).getType(Yi)[0],o=h(this,ht).getType(Ji)[0];return i||r||o}get shelves(){return h(this,ht).getType(Qv,qI,pd)}getShelf(e){return this.shelves.find(i=>i.title.toString()===e)}get secondary_contents(){var e,i;if(!((e=h(this,Ze).contents)!=null&&e.is_node))return null;let r=(i=h(this,Ze).contents)==null?void 0:i.item();return r.is(Vo,s4)?r.secondary_contents:null}get actions(){return h(this,Os)}get page(){return h(this,Ze)}get has_continuation(){return F(this,Ns,wl).call(this).length>0}async getContinuationData(){if(h(this,ln)){if(h(this,ln).length===0)throw new w("There are no continuations");return await h(this,ln)[0].endpoint.call(h(this,Os),{parse:!0})}if(P(this,ln,F(this,Ns,wl).call(this)),h(this,ln))return this.getContinuationData()}async getContinuation(){let e=await this.getContinuationData();if(!e)throw new w("Could not get continuation data");return new or(this.actions,e,!0)}};Ze=new WeakMap;Os=new WeakMap;ht=new WeakMap;ln=new WeakMap;Ns=new WeakSet;B4=a(function(t){return!("data"in t)},"#isParsed");wl=a(function(){if(h(this,Ze).header_memo){let t=h(this,Ze).header_memo.getType(Se,ns);return h(this,ht).getType(Se,ns).filter(e=>!t.includes(e))}return h(this,ht).getType(Se,ns)},"#getBodyContinuations");a(L4,"Feed");var Ge=L4,Nn,V4=class O4 extends Ge{constructor(e,i,r=!1){super(e,i,r),M(this,Nn)}get filter_nodes(){var e,i,r,o;if(h(this,Nn))return h(this,Nn);let s,l;if(((e=this.memo.getType(Do))==null?void 0:e.length)>1)throw new w("There are too many feed filter chipbars, you'll need to find the correct one yourself in this.page");if(this.memo.has("FeedFilterChipBar"))s=this.memo.getType(Ke);else if(this.memo.has("ChipView")){let c=this.memo.getType(tt),u=c[0];if(u.is(tt))if(u.display_type==="CHIP_VIEW_MODEL_DISPLAY_TYPE_DROP_DOWN"||u.display_type==="CHIP_VIEW_MODEL_DISPLAY_TYPE_DROP_DOWN_WITH_CLEAR"){let p=(i=u.tap_command)==null?void 0:i.command;p?.is(bo)&&((r=p.inline_content)!=null&&r.is(yo))&&((o=p.inline_content.content)!=null&&o.is(_s))&&(s=p.inline_content.content.items.as(At)),l=te(c.slice(1))}else s=c}return P(this,Nn,{primary_filters:s,secondary_filters:l}),h(this,Nn)}get filters(){var e,i;return((i=(e=this.filter_nodes)==null?void 0:e.primary_filters)==null?void 0:i.map(r=>{var o,s;return r.is(tt)||r.is(Ke)?((o=r.text)==null?void 0:o.toString())||"":r.is(At)&&((s=r.title)==null?void 0:s.toString())||""}))||[]}get secondary_filters(){var e,i;return((i=(e=this.filter_nodes)==null?void 0:e.secondary_filters)==null?void 0:i.map(r=>{var o;return((o=r.text)==null?void 0:o.toString())||""}))||[]}async getFilteredFeed(e,i){var r,o,s,l,c,u,d;let p,_=!1;if(typeof e=="string"){if(!this.filters.includes(e))throw new w(`Filter '${e}' not found`,{available_filters:this.filters});for(let g of this.filter_nodes.primary_filters||[])(g.is(tt)||g.is(Ke))&&((r=g.text)==null?void 0:r.toString())===e?(p=g.is(tt)?g.tap_command:g.endpoint,_=g.is(tt)?g.selected:g.is_selected):g.is(At)&&((o=g.title)==null?void 0:o.toString())===e&&(p=(l=(s=g?.renderer_context)==null?void 0:s.command_context)==null?void 0:l.on_tap,_=g.is_selected)}else if(["ChipCloudChip","ChipView","ListItemView"].includes(e.type))e.is(tt)?p=e.tap_command:e.is(Ke)?p=e.endpoint:e.is(At)&&(p=(u=(c=e?.renderer_context)==null?void 0:c.command_context)==null?void 0:u.on_tap),_=e.is(tt)?e.selected:e.is_selected;else throw new w("Invalid primary filter type");if(!p)throw new w("Could not find endpoint for the specified filter");if(_&&!i)return this;let b=_?this.page:await p.call(this.actions,{parse:!0});if(i){let g=new O4(this.actions,b,!0),C;if(typeof i=="string"){if(!g.secondary_filters.includes(i))throw new w(`Secondary filter '${i}' not found`,{available_filters:g.secondary_filters});C=(d=g.filter_nodes.secondary_filters)==null?void 0:d.find(T=>{var S;return((S=T.text)==null?void 0:S.toString())===i})}else if(i.is(tt))C=i;else throw new w("Invalid secondary filter type");if(C&&!C.selected){let T=C?.tap_command||C?.endpoint;if(!T)throw new w("Could not find an endpoint for the specified secondary filter");b=await T.call(this.actions,{parse:!0})}}if(!b)throw new w("Failed to fetch data for the specified filter");return new Ge(this.actions,b,!0)}};Nn=new WeakMap;a(V4,"FilterableFeed");var Ca=V4,jM={};Ne(jM,{Feed:()=>Ge,FilterableFeed:()=>Ca,MediaInfo:()=>Uo,TabbedFeed:()=>Cl});var Mi,Tt,cn,un,N4=class{constructor(e,i,r){M(this,Mi),M(this,Tt),M(this,cn),M(this,un),n(this,"basic_info"),n(this,"annotations"),n(this,"storyboards"),n(this,"endscreen"),n(this,"captions"),n(this,"cards"),n(this,"streaming_data"),n(this,"playability_status"),n(this,"player_config");var o,s,l,c,u,d,p,_,b,g,C,T,S,k,A,I,D,H,j,W,q,N;P(this,Tt,i);let R=v.parseResponse(e[0].data.playerResponse?e[0].data.playerResponse:e[0].data),K=(o=e[1])!=null&&o.data?v.parseResponse(e[1].data):void 0;if(P(this,Mi,[R,K]),P(this,cn,r),((s=R.playability_status)==null?void 0:s.status)==="ERROR")throw new w("This video is unavailable",R.playability_status);if(R.microformat&&!((l=R.microformat)!=null&&l.is(oi,rs)))throw new w("Unsupported microformat",R.microformat);this.basic_info={...R.video_details,embed:(c=R.microformat)!=null&&c.is(oi)?(u=R.microformat)==null?void 0:u.embed:null,channel:(d=R.microformat)!=null&&d.is(oi)?(p=R.microformat)==null?void 0:p.channel:null,is_unlisted:(_=R.microformat)==null?void 0:_.is_unlisted,is_family_safe:(b=R.microformat)==null?void 0:b.is_family_safe,category:(g=R.microformat)!=null&&g.is(oi)?(C=R.microformat)==null?void 0:C.category:null,has_ypc_metadata:(T=R.microformat)!=null&&T.is(oi)?(S=R.microformat)==null?void 0:S.has_ypc_metadata:null,start_timestamp:(k=R.microformat)!=null&&k.is(oi)?R.microformat.start_timestamp:null,end_timestamp:(A=R.microformat)!=null&&A.is(oi)?R.microformat.end_timestamp:null,view_count:(I=R.microformat)!=null&&I.is(oi)&&isNaN((D=R.video_details)==null?void 0:D.view_count)?R.microformat.view_count:(H=R.video_details)==null?void 0:H.view_count,url_canonical:(j=R.microformat)!=null&&j.is(rs)?(W=R.microformat)==null?void 0:W.url_canonical:null,tags:(q=R.microformat)!=null&&q.is(rs)?(N=R.microformat)==null?void 0:N.tags:null,like_count:void 0,is_liked:void 0,is_disliked:void 0},this.annotations=R.annotations,this.storyboards=R.storyboards,this.endscreen=R.endscreen,this.captions=R.captions,this.cards=R.cards,this.streaming_data=R.streaming_data,this.playability_status=R.playability_status,this.player_config=R.player_config,P(this,un,R.playback_tracking)}async toDash(e={}){var i,r;let o=h(this,Mi)[0],s=e.manifest_options||{};if(o.video_details&&o.video_details.is_live)throw new w("Generating DASH manifests for live videos is not supported. Please use the DASH and HLS manifests provided by YouTube in `streaming_data.dash_manifest_url` and `streaming_data.hls_manifest_url` instead.");let l,c;return s.include_thumbnails&&o.storyboards&&(l=o.storyboards),typeof s.captions_format=="string"&&((i=o.captions)!=null&&i.caption_tracks)&&(c=o.captions.caption_tracks),jo.toDash(this.streaming_data,(r=this.page[0].video_details)==null?void 0:r.is_post_live_dvr,e.url_transformer,e.format_filter,h(this,cn),h(this,Tt).session.player,h(this,Tt),l,c,s)}getStreamingInfo(e,i){var r;return Jl(this.streaming_data,(r=this.page[0].video_details)==null?void 0:r.is_post_live_dvr,e,i,this.cpn,h(this,Tt).session.player,h(this,Tt),h(this,Mi)[0].storyboards?h(this,Mi)[0].storyboards:void 0)}chooseFormat(e){return jo.chooseFormat(e,this.streaming_data)}async download(e={}){let i=h(this,Mi)[0];if(i.video_details&&(i.video_details.is_live||i.video_details.is_post_live_dvr))throw new w("Downloading is not supported for live and Post-Live-DVR videos, as they are split up into 5 second segments that are individual files, which require using a tool such as ffmpeg to stitch them together, so they cannot be returned in a single stream.");return jo.download(e,h(this,Tt),this.playability_status,this.streaming_data,h(this,Tt).session.player,this.cpn)}async getTranscript(){var e;let i=this.page[1];if(!i)throw new w("Cannot get transcript from basic video info.");if(!i.engagement_panels)throw new w("Engagement panels not found. Video likely has no transcript.");let r=i.engagement_panels.find(l=>l.panel_identifier==="engagement-panel-searchable-transcript");if(!r)throw new w("Transcript panel not found. Video likely has no transcript.");let o=(e=r.content)==null?void 0:e.as(Se);if(!o)throw new w("Transcript continuation not found.");let s=await o.endpoint.call(this.actions);return new AE(this.actions,s)}async addToWatchHistory(e,i,r="https://www."){if(!h(this,un))throw new w("Playback tracking not available");let o={cpn:h(this,cn),fmt:251,rtn:0,rt:0},s=h(this,un).videostats_playback_url.replace("https://s.",r);return await h(this,Tt).stats(s,{client_name:e||he.CLIENTS.WEB.NAME,client_version:i||he.CLIENTS.WEB.VERSION},o)}async updateWatchTime(e,i=he.CLIENTS.WEB.NAME,r=he.CLIENTS.WEB.VERSION,o="https://www."){if(!h(this,un))throw new w("Playback tracking not available");let s={cpn:h(this,cn),st:e.toFixed(3),et:e.toFixed(3),cmt:e.toFixed(3),final:"1"},l=h(this,un).videostats_watchtime_url.replace("https://s.",o);return await h(this,Tt).stats(l,{client_name:i,client_version:r},s)}get actions(){return h(this,Tt)}get cpn(){return h(this,cn)}get page(){return h(this,Mi)}};Mi=new WeakMap;Tt=new WeakMap;cn=new WeakMap;un=new WeakMap;a(N4,"MediaInfo");var Uo=N4,hn,dn,F4=class kl extends Ge{constructor(e,i,r=!1){var o;super(e,i,r),M(this,hn),M(this,dn),P(this,hn,e),P(this,dn,(o=this.page.contents_memo)==null?void 0:o.getType(kt))}get tabs(){var e,i;return(i=(e=h(this,dn))==null?void 0:e.map(r=>r.title.toString()))!=null?i:[]}async getTabByName(e){var i;let r=(i=h(this,dn))==null?void 0:i.find(s=>s.title.toLowerCase()===e.toLowerCase());if(!r)throw new w(`Tab "${e}" not found`);if(r.selected)return this;let o=await r.endpoint.call(h(this,hn));return new kl(h(this,hn),o,!1)}async getTabByURL(e){var i;let r=(i=h(this,dn))==null?void 0:i.find(s=>{var l;return((l=s.endpoint.metadata.url)==null?void 0:l.split("/").pop())===e});if(!r)throw new w(`Tab "${e}" not found`);if(r.selected)return this;let o=await r.endpoint.call(h(this,hn));return new kl(h(this,hn),o,!1)}hasTabWithURL(e){var i,r;return(r=(i=h(this,dn))==null?void 0:i.some(o=>{var s;return((s=o.endpoint.metadata.url)==null?void 0:s.split("/").pop())===e}))!=null?r:!1}get title(){var e,i,r;return(r=(i=(e=this.page.contents_memo)==null?void 0:e.getType(kt))==null?void 0:i.find(o=>o.selected))==null?void 0:r.title.toString()}};hn=new WeakMap;dn=new WeakMap;a(F4,"TabbedFeed");var Cl=F4,Fn,U4=class mt extends Cl{constructor(e,i,r=!1){var o,s,l,c,u;super(e,i,r),n(this,"header"),n(this,"metadata"),n(this,"subscribe_button"),n(this,"current_tab"),M(this,Fn),this.header=(s=(o=this.page.header)==null?void 0:o.item())==null?void 0:s.as(no,kT,AS,as);let d=(l=this.page.metadata)==null?void 0:l.item().as(ET),p=(c=this.page.microformat)==null?void 0:c.as(rs);if(this.page.alerts){let _=this.page.alerts[0];if(_?.alert_type==="ERROR")throw new wA(_.text.toString())}if(!d&&!this.page.contents)throw new w("Invalid channel",this);this.metadata={...d,...p||{}},this.subscribe_button=(u=this.page.header_memo)==null?void 0:u.getType(hi)[0],this.page.contents&&(this.current_tab=this.page.contents.item().as(Vo).tabs.find(_=>_.selected))}async applyFilter(e,i){var r,o,s,l,c,u,d,p,_,b;let g=this.memo.getType(vo)[0];if(!g)throw new w("Filter chip bar not found");let C;if(typeof e=="string"){if(!this.filters.includes(e))throw new w(`Filter '${e}' not found`,{available_filters:this.filters});let k=g.chips.find(A=>A.display_type==="CHIP_VIEW_MODEL_DISPLAY_TYPE_DROP_DOWN");if(k){let A=(r=k.tap_command)==null?void 0:r.command;if(A?.is(bo)&&((o=A.inline_content)!=null&&o.is(yo))&&((s=A.inline_content.content)!=null&&s.is(_s))){let D=A.inline_content.content.items.as(At).find(H=>{var j;return((j=H.title)==null?void 0:j.toString())===e});C=(u=(c=(l=D?.renderer_context)==null?void 0:l.command_context)==null?void 0:c.on_tap)==null?void 0:u.as(y)}}else C=(d=g.chips.find(A=>A.text===e))==null?void 0:d.endpoint}else if(e.is(tt))C=e.endpoint;else if(e.is(At))C=(b=(_=(p=e.renderer_context)==null?void 0:p.command_context)==null?void 0:_.on_tap)==null?void 0:b.as(y);else throw new w("Invalid primary filter type");if(!C)throw new w("Could not find endpoint for the specified filter");let T=await C.call(this.actions,{parse:!0}),S=new K4(this.actions,T,!0);return i&&(S=await S.applyFilter(e,i)),S}async applySort(e){let i=this.memo.getType(hs)[0];if(!i||!i.sub_menu_items)throw new w("No sort filter sub menu found");let r=i.sub_menu_items.find(s=>s.title===e);if(!r)throw new w(`Sort filter '${e}' not found`,{available_sort_filters:this.sort_filters});if(r.selected)return this;let o=await r.endpoint.call(this.actions,{parse:!0});return new mt(this.actions,o,!0)}async applyContentTypeFilter(e){var i,r,o;let s=(o=(r=(i=this.current_tab)==null?void 0:i.content)==null?void 0:r.as(Ae).sub_menu)==null?void 0:o.as(nl);if(!s)throw new w("Sub menu not found");let l=s.content_type_sub_menu_items.find(u=>u.title===e);if(!l)throw new w(`Sub menu item '${e}' not found`,{available_filters:this.content_type_filters});if(l.selected)return this;let c=await l.endpoint.call(this.actions,{parse:!0});return new mt(this.actions,c,!0)}get filter_nodes(){var e,i,r,o;if(h(this,Fn))return h(this,Fn);let s,l;if(((e=this.memo.getType(Do))==null?void 0:e.length)>1)throw new w("There are too many feed filter chipbars, you'll need to find the correct one yourself in this.page");if(this.memo.has("FeedFilterChipBar"))s=this.memo.getType(Ke);else if(this.memo.has("ChipView")){let c=this.memo.getType(tt),u=c[0];if(u.is(tt))if(u.display_type==="CHIP_VIEW_MODEL_DISPLAY_TYPE_DROP_DOWN"||u.display_type==="CHIP_VIEW_MODEL_DISPLAY_TYPE_DROP_DOWN_WITH_CLEAR"){let p=(i=u.tap_command)==null?void 0:i.command;p?.is(bo)&&((r=p.inline_content)!=null&&r.is(yo))&&((o=p.inline_content.content)!=null&&o.is(_s))&&(s=p.inline_content.content.items.as(At)),l=te(c.slice(1))}else s=c}return P(this,Fn,{primary_filters:s,secondary_filters:l}),h(this,Fn)}get filters(){var e,i;return((i=(e=this.filter_nodes)==null?void 0:e.primary_filters)==null?void 0:i.map(r=>{var o,s;return r.is(tt)||r.is(Ke)?((o=r.text)==null?void 0:o.toString())||"":r.is(At)&&((s=r.title)==null?void 0:s.toString())||""}))||[]}get secondary_filters(){var e,i;return((i=(e=this.filter_nodes)==null?void 0:e.secondary_filters)==null?void 0:i.map(r=>{var o;return((o=r.text)==null?void 0:o.toString())||""}))||[]}get sort_filters(){var e;let i=this.memo.getType(hs)[0];return((e=i?.sub_menu_items)==null?void 0:e.map(r=>r.title))||[]}get content_type_filters(){var e,i,r;let o=(r=(i=(e=this.current_tab)==null?void 0:e.content)==null?void 0:i.as(Ae).sub_menu)==null?void 0:r.as(nl);return o?.content_type_sub_menu_items.map(s=>s.title)||[]}async getHome(){let e=await this.getTabByURL("featured");return new mt(this.actions,e.page,!0)}async getVideos(){let e=await this.getTabByURL("videos");return new mt(this.actions,e.page,!0)}async getShorts(){let e=await this.getTabByURL("shorts");return new mt(this.actions,e.page,!0)}async getLiveStreams(){let e=await this.getTabByURL("streams");return new mt(this.actions,e.page,!0)}async getReleases(){let e=await this.getTabByURL("releases");return new mt(this.actions,e.page,!0)}async getPodcasts(){let e=await this.getTabByURL("podcasts");return new mt(this.actions,e.page,!0)}async getCourses(){let e=await this.getTabByURL("courses");return new mt(this.actions,e.page,!0)}async getPlaylists(){let e=await this.getTabByURL("playlists");return new mt(this.actions,e.page,!0)}async getCommunity(){let e=await this.getTabByURL("posts");return new mt(this.actions,e.page,!0)}async getAbout(){var e,i,r,o,s;if(this.hasTabWithURL("about"))return(await this.getTabByURL("about")).memo.getType(il)[0];let l=((e=this.header)==null?void 0:e.is(no))&&this.header.tagline;if(l||(i=this.header)!=null&&i.is(as)&&((r=this.header.content)!=null&&r.description)){if(l&&l.more_endpoint instanceof y){let d=await l.more_endpoint.call(this.actions);return new Cl(this.actions,d,!1).memo.getType(il)[0]}let c=(s=(o=this.page.header_memo)==null?void 0:o.getType(Se)[0])==null?void 0:s.endpoint;if(!c)throw new w("Failed to extract continuation to get channel about");let u=await c.call(this.actions,{parse:!0});if(!u.on_response_received_endpoints_memo)throw new w("Unexpected response while fetching channel about",{response:u});return u.on_response_received_endpoints_memo.getType(u3)[0]}throw new w("About not found")}async search(e){var i;let r=(i=this.memo.getType(Sr))==null?void 0:i[0];if(!r)throw new w("Search tab not found",this);let o=await r.endpoint.call(this.actions,{query:e,parse:!0});return new mt(this.actions,o,!0)}get has_home(){return this.hasTabWithURL("featured")}get has_videos(){return this.hasTabWithURL("videos")}get has_shorts(){return this.hasTabWithURL("shorts")}get has_live_streams(){return this.hasTabWithURL("streams")}get has_releases(){return this.hasTabWithURL("releases")}get has_podcasts(){return this.hasTabWithURL("podcasts")}get has_courses(){return this.hasTabWithURL("courses")}get has_playlists(){return this.hasTabWithURL("playlists")}get has_community(){return this.hasTabWithURL("posts")}get has_about(){var e,i,r,o,s;return this.hasTabWithURL("about")||!!((e=this.header)!=null&&e.is(no)&&((i=this.header.tagline)!=null&&i.more_endpoint))||!!((r=this.header)!=null&&r.is(as)&&((s=(o=this.header.content)==null?void 0:o.description)!=null&&s.more_endpoint))}get has_search(){var e;return((e=this.memo.getType(Sr))==null?void 0:e.length)>0}async getContinuation(){let e=await super.getContinuationData();if(!e)throw new w("Could not get continuation data");return new j4(this.actions,e,!0)}};Fn=new WeakMap;a(U4,"Channel");var H4=U4,W4=class q4 extends Ge{constructor(e,i,r=!1){var o,s;super(e,i,r),n(this,"contents"),this.contents=((o=this.page.on_response_received_actions)==null?void 0:o[0])||((s=this.page.on_response_received_endpoints)==null?void 0:s[0])}async getContinuation(){let e=await super.getContinuationData();if(!e)throw new w("Could not get continuation data");return new q4(this.actions,e,!0)}};a(W4,"ChannelListContinuation");var j4=W4,G4=class Tl extends Ca{constructor(e,i,r=!1){var o,s,l,c;super(e,i,r),n(this,"filter"),n(this,"secondary_filter"),n(this,"contents");let u=this.memo.getType(vo)[0];if(u){let d=u.chips[0];if(d.display_type==="CHIP_VIEW_MODEL_DISPLAY_TYPE_DROP_DOWN"||d.display_type==="CHIP_VIEW_MODEL_DISPLAY_TYPE_DROP_DOWN_WITH_CLEAR"){this.secondary_filter=u.chips.slice(1).find(b=>b.selected);let _=(o=d.tap_command)==null?void 0:o.command;_?.is(bo)&&((s=_.inline_content)!=null&&s.is(yo))&&((l=_.inline_content.content)!=null&&l.is(_s))&&(this.filter=_.inline_content.content.items.as(At).find(b=>b.is_selected))}else this.filter=u.chips.find(_=>_.selected)}this.page.on_response_received_actions&&this.page.on_response_received_actions.length>1&&this.page.on_response_received_actions.shift(),this.contents=(c=this.page.on_response_received_actions)==null?void 0:c[0]}async applyFilter(e,i){let r=await super.getFilteredFeed(e,i);return new Tl(this.actions,r.page,!0)}async getContinuation(){let e=await super.getContinuationData();if(!e?.on_response_received_actions_memo)throw new w("Unexpected continuation data",e);return this.memo.has("FeedFilterChipBar")&&e.on_response_received_actions_memo.set("FeedFilterChipBar",this.memo.getType(Do)),this.memo.has("ChipCloudChip")&&e.on_response_received_actions_memo.set("ChipCloudChip",this.memo.getType(Ke)),this.memo.has("ChipBarView")&&e.on_response_received_actions_memo.set("ChipBarView",this.memo.getType(vo)),this.memo.has("ChipView")&&e.on_response_received_actions_memo.set("ChipView",this.memo.getType(tt)),new Tl(this.actions,e,!0)}};a(G4,"FilteredChannelList");var K4=G4,Un,Qt,Hn,Y4=class Sl{constructor(e,i,r=!1){M(this,Un),M(this,Qt),M(this,Hn),n(this,"header"),n(this,"contents");var o,s,l,c,u;P(this,Un,r?i:v.parseResponse(i)),P(this,Qt,e);let d=h(this,Un).on_response_received_endpoints;if(!d)throw new w("Comments page did not have any content.");let p=(o=d.at(0))==null?void 0:o.as(Ji,Yi),_=(s=d.at(1))==null?void 0:s.as(Ji,Yi);this.header=(l=p?.contents)==null?void 0:l.firstOfType(ha);let b=((c=_?.contents)==null?void 0:c.filterType(GT))||[];this.contents=te(b.map(g=>(g.comment&&g.comment.setActions(h(this,Qt)),g.setActions(h(this,Qt)),g))),P(this,Hn,(u=_?.contents)==null?void 0:u.firstOfType(Se))}async applySort(e){var i,r,o,s;if(!this.header)throw new w("Page header is missing. Cannot apply sort option.");let l;if(e==="TOP_COMMENTS"?l=(r=(i=this.header.sort_menu)==null?void 0:i.sub_menu_items)==null?void 0:r.at(0):e==="NEWEST_FIRST"&&(l=(s=(o=this.header.sort_menu)==null?void 0:o.sub_menu_items)==null?void 0:s.at(1)),!l)throw new w("Could not find target button.");if(l.selected)return this;let c=await l.endpoint.call(h(this,Qt),{parse:!0});return new Sl(h(this,Qt),c,!0)}async createComment(e){var i;if(!this.header)throw new w("Page header is missing. Cannot create comment.");let r=(i=this.header.create_renderer)==null?void 0:i.as(qT).submit_button;if(!r)throw new w("Could not find target button. You are probably not logged in.");if(!r.endpoint)throw new w("Button does not have an endpoint.");return await r.endpoint.call(h(this,Qt),{commentText:e})}async getContinuation(){if(!h(this,Hn))throw new w("Continuation not found");let e=await h(this,Hn).endpoint.call(h(this,Qt),{parse:!0}),i=Object.assign({},h(this,Un));if(!i.on_response_received_endpoints||!e.on_response_received_endpoints)throw new w("Invalid reponse format, missing on_response_received_endpoints.");return i.on_response_received_endpoints.pop(),i.on_response_received_endpoints.push(e.on_response_received_endpoints[0]),new Sl(h(this,Qt),i,!0)}get has_continuation(){return!!h(this,Hn)}get page(){return h(this,Un)}};Un=new WeakMap;Qt=new WeakMap;Hn=new WeakMap;a(Y4,"Comments");var Il=Y4,Wn,z4=class{constructor(e){M(this,Wn),n(this,"contents"),P(this,Wn,v.parseResponse(e)),h(this,Wn).items&&(this.contents=h(this,Wn).items.array().as(Bf,wS))}get page(){return h(this,Wn)}};Wn=new WeakMap;a(z4,"Guide");var $4=z4,J4=class X4 extends Ge{constructor(e,i,r=!1){super(e,i,r),n(this,"sections"),n(this,"feed_actions"),this.sections=this.memo.getType(Pt),this.feed_actions=this.memo.getType(fh)[0]}async getContinuation(){let e=await this.getContinuationData();if(!e)throw new Error("No continuation data found");return new X4(this.actions,e,!0)}async removeVideo(e,i=1){var r,o,s;let l=i;for(;l>0;){let c;for(let u of this.sections){for(let d of u.contents)if(d.is(la)){if(d.video_id===e&&d.menu){c=d.menu.top_level_buttons[0].as(L).endpoint.payload.feedbackToken;break}}else if(d.is(ss)&&d.content_id===e){c=((s=(o=(r=d.metadata)==null?void 0:r.menu_button)==null?void 0:o.on_tap)==null?void 0:s.payload.panelLoadingStrategy.inlineContent.sheetViewModel.content.listViewModel.listItems).find(b=>{var g;return((g=b.listItemViewModel)==null?void 0:g.title.content)==="Remove from watch history"}).listItemViewModel.rendererContext.commandContext.onTap.innertubeCommand.feedbackEndpoint.feedbackToken;break}if(c)break}if(c){let u={feedbackTokens:[c]};if(!(await this.actions.execute("/feedback",u)).data.feedbackResponses[0].isProcessed)throw new Error("Failed to remove video from watch history");return!0}if(--l>0)try{Object.assign(this,await this.getContinuation())}catch{throw new Error("Unable to find video in watch history")}else throw new Error("Unable to find video in watch history")}return!1}};a(J4,"History");var Dg=J4,Q4=class El extends Ca{constructor(e,i,r=!1){var o;super(e,i,r),n(this,"contents"),n(this,"header"),this.header=this.memo.getType(_S)[0],this.contents=this.memo.getType(Lo)[0]||((o=this.page.on_response_received_actions)==null?void 0:o[0])}async applyFilter(e){let i=await super.getFilteredFeed(e);return new El(this.actions,i.page,!0)}async getContinuation(){var e;let i=await super.getContinuation();return i.page.header=this.page.header,this.header&&((e=i.page.header_memo)==null||e.set(this.header.type,[this.header])),new El(this.actions,i.page,!0)}};a(Q4,"HomeFeed");var Z4=Q4,eE=class tE extends Ca{constructor(e,i){if(super(e,i),n(this,"header"),n(this,"contents"),!this.page.contents_memo)throw new w("Unexpected response",this.page);let r=this.page.contents_memo.getType(kt)[0];if(!r.content)throw new w("Content tab has no content",r);this.page.header&&(this.header=this.page.header.item().as(kS,as)),this.contents=r.content.as(Lo)}async applyFilter(e){let i=await super.getFilteredFeed(e);return new tE(this.actions,i.page)}};a(eE,"HashtagFeed");var iE=eE,rr,ar,Fs,nE=class{constructor(e,i){M(this,rr),M(this,ar),M(this,Fs),P(this,rr,e),P(this,ar,i);let r=e?.live_chat_item_context_menu_supported_renderers;if(!r||!r.is(ye))throw new w('Response did not have a "live_chat_item_context_menu_supported_renderers" property. The call may have failed.');P(this,Fs,r.as(ye).items)}async selectItem(e){let i;if(e instanceof L){if(!e.endpoint)throw new w("Item does not have an endpoint.");i=e.endpoint}else{let r=h(this,Fs).find(o=>o.is(is)?o.as(is).icon_type===e:!1);if(!r||!r.is(is))throw new w(`Button "${e}" not found.`);i=r.endpoint}if(!i)throw new w("Target button does not have an endpoint.");return await i.call(h(this,ar),{parse:!0})}items(){return h(this,Fs)}page(){return h(this,rr)}};rr=new WeakMap;ar=new WeakMap;Fs=new WeakMap;a(nE,"ItemMenu");var sE=nE,Us,lr,oE=class rE extends Ge{constructor(e,i,r=!1){var o,s,l,c,u;super(e,i,r),M(this,Us),n(this,"info"),n(this,"menu"),n(this,"endpoint"),n(this,"messages");let d=this.memo.getType(LI)[0],p=this.memo.getType(OI)[0],_=this.memo.getType(NI)[0],b=this.memo.getType(FI)[0],g=(o=this.page.alerts)==null?void 0:o.firstOfType(Eu);if(g&&g.alert_type==="ERROR")throw new w(g.text.toString(),g);if(!p&&!_&&Object.keys(this.page).length===0)throw new w("Got empty continuation response. This is likely the end of the playlist.");this.info={...(s=this.page.metadata)==null?void 0:s.item().as(VI),subtitle:d?d.subtitle:null,author:(c=(l=_?.owner)==null?void 0:l.as(Gb).author)!=null?c:d?.author,thumbnails:(u=p?.thumbnail_renderer)==null?void 0:u.as(V_,B_).thumbnail,total_items:F(this,Us,lr).call(this,0,p),views:F(this,Us,lr).call(this,1,p),last_updated:F(this,Us,lr).call(this,2,p),can_share:d?.can_share,can_delete:d?.can_delete,can_reorder:b?.can_reorder,is_editable:b?.is_editable,privacy:d?.privacy},this.menu=p?.menu,this.endpoint=p?.endpoint,this.messages=this.memo.getType(ui)}get items(){return te(this.videos.as(ss,iv,bv,eb).filter(e=>e.style!=="PLAYLIST_VIDEO_RENDERER_STYLE_RECOMMENDED_VIDEO"))}get has_continuation(){let e=this.memo.getType(Ae)[0];return e?!!this.memo.getType(Se,ns).find(i=>!e.contents.includes(i)):super.has_continuation}async getContinuationData(){let e=this.memo.getType(Ae)[0];if(!e)return await super.getContinuationData();let i=this.memo.getType(Se,ns).find(r=>!e.contents.includes(r));if(!i)throw new w("There are no continuations.");return await i.endpoint.call(this.actions,{parse:!0})}async getContinuation(){let e=await this.getContinuationData();if(!e)throw new w("Could not get continuation data");return new rE(this.actions,e,!0)}};Us=new WeakSet;lr=a(function(t,e){var i;return!e||!e.stats?"N/A":((i=e.stats[t])==null?void 0:i.toString())||"N/A"},"#getStat");a(oE,"Playlist");var Ta=oE,Al,aE,lE=class extends Ge{constructor(e,i){if(super(e,i),M(this,Al),n(this,"header"),n(this,"sections"),!this.page.contents_memo)throw new w("Page contents not found");this.header=this.memo.getType(as)[0];let r=this.page.contents_memo.getType(Qv);this.sections=r.map(o=>{var s;return{type:o.icon_type,title:o.title,contents:((s=o.content)==null?void 0:s.key("items").array())||[],getAll:a(()=>F(this,Al,aE).call(this,o),"getAll")}})}get history(){return this.sections.find(e=>e.type==="WATCH_HISTORY")}get watch_later(){return this.sections.find(e=>e.type==="WATCH_LATER")}get liked_videos(){return this.sections.find(e=>e.type==="LIKE")}get playlists_section(){return this.sections.find(e=>e.type==="PLAYLISTS")}get clips(){return this.sections.find(e=>e.type==="CONTENT_CUT")}};Al=new WeakSet;aE=a(async function(t){var e;if(!((e=t.menu)!=null&&e.as(ye).top_level_buttons))throw new w(`The ${t.title.text} shelf doesn't have more items`);let i=t.menu.as(ye).top_level_buttons.firstOfType(L);if(!i)throw new w("Did not find target button.");let r=await i.as(L).endpoint.call(this.actions,{parse:!0});switch(t.icon_type){case"LIKE":case"WATCH_LATER":return new Ta(this.actions,r,!0);case"WATCH_HISTORY":return new Dg(this.actions,r,!0);case"CONTENT_CUT":return new Ge(this.actions,r,!0);default:throw new w("Target shelf not implemented.")}},"#getAll");a(lE,"Library");var cE=lE;function uE(t){let e=[];for(let i of t)if(Array.isArray(i))for(let r of i)e.push(r);else e.push(i);return e}a(uE,"flattenQueue");var hE=class{constructor(){n(this,"front"),n(this,"back"),this.front=[],this.back=[]}isEmpty(){return!this.front.length&&!this.back.length}clear(){this.front=[],this.back=[]}getValues(){return this.front.concat(this.back.reverse())}};a(hE,"DelayQueue");var GM=hE,yi,Ri,_n,St,Ht,ut,dE=class{constructor(){M(this,yi),M(this,Ri),M(this,_n),M(this,St),M(this,Ht),M(this,ut),P(this,yi,null),P(this,Ri,null),P(this,_n,null),P(this,St,[]),P(this,Ht,null),P(this,ut,new GM)}enqueueActionGroup(e){if(h(this,yi)!==null){let i=Date.now()-h(this,yi);h(this,ut).back.push(i),5<h(this,ut).front.length+h(this,ut).back.length&&(h(this,ut).front.length||(h(this,ut).front=h(this,ut).back,h(this,ut).front.reverse(),h(this,ut).back=[]),h(this,ut).front.pop()),P(this,Ri,Math.max(...h(this,ut).getValues()))}P(this,yi,Date.now()),h(this,St).push(e),h(this,Ht)===null&&P(this,Ht,setTimeout(this.emitSmoothedActions.bind(this)))}emitSmoothedActions(){if(P(this,Ht,null),h(this,St).length){let e=1e4;h(this,Ri)!==null&&h(this,yi)!==null&&(e=h(this,Ri)-Date.now()+h(this,yi)),e=h(this,St).length<e/80?1:Math.ceil(h(this,St).length/(e/80));let i=uE(h(this,St).splice(0,e));h(this,_n)&&h(this,_n).call(this,i),h(this,St)!==null&&(e==1?(e=h(this,Ri)/h(this,St).length,e*=Math.random()+.5,e=Math.min(1e3,e),e=Math.max(80,e)):e=80,P(this,Ht,setTimeout(this.emitSmoothedActions.bind(this),e)))}}clear(){h(this,Ht)!==null&&(clearTimeout(h(this,Ht)),P(this,Ht,null)),P(this,St,[])}set callback(e){P(this,_n,e)}get callback(){return h(this,_n)}get action_queue(){return h(this,St)}get estimated_update_interval(){return h(this,Ri)}get last_update_time(){return h(this,yi)}get next_update_id(){return h(this,Ht)}get poll_response_delay_queue(){return h(this,ut)}};yi=new WeakMap;Ri=new WeakMap;_n=new WeakMap;St=new WeakMap;Ht=new WeakMap;ut=new WeakMap;a(dE,"SmoothedQueue");var _E=dE,Ci,oo,cr,gn,ro,Br,je,ao,ur,hr,xn,pE=class extends R1{constructor(e){var i,r;super(),M(this,je),M(this,Ci),M(this,oo),M(this,cr),M(this,gn),M(this,ro),M(this,Br,0),n(this,"smoothed_queue"),n(this,"initial_info"),n(this,"metadata"),n(this,"running",!1),n(this,"is_replay",!1),P(this,oo,e.basic_info.id),P(this,cr,e.basic_info.channel_id),P(this,Ci,e.actions),P(this,gn,(i=e.livechat)==null?void 0:i.continuation),this.is_replay=((r=e.livechat)==null?void 0:r.is_replay)||!1,this.smoothed_queue=new _E,this.smoothed_queue.callback=async o=>{o.length?o.length<10?await F(this,je,ur).call(this,o):this.is_replay?(F(this,je,ur).call(this,o),await F(this,je,xn).call(this,2e3)):F(this,je,ur).call(this,o):await F(this,je,xn).call(this,2e3),this.running&&F(this,je,ao).call(this)}}on(e,i){super.on(e,i)}once(e,i){super.once(e,i)}start(){this.running||(this.running=!0,F(this,je,ao).call(this),F(this,je,hr).call(this))}stop(){this.smoothed_queue.clear(),this.running=!1}async sendMessage(e){let i=K6.encode({params:{ids:{videoId:h(this,oo),channelId:h(this,cr)}},number0:1,number1:4}),r=btoa(encodeURIComponent(nt(i.finish()))),o=await h(this,Ci).execute("/live_chat/send_message",{richMessage:{textSegments:[{text:e}]},clientMessageId:ve.shim.uuidv4(),client:"WEB",parse:!0,params:r});if(!o.actions)throw new w("Unexpected response from send_message",o);return o.actions.array().as(BS,VT)}applyFilter(e){var i,r,o,s,l,c,u;if(!this.initial_info)throw new w("Cannot apply filter before initial info is retrieved.");let d=(o=(r=(i=this.initial_info)==null?void 0:i.header)==null?void 0:r.view_selector)==null?void 0:o.sub_menu_items;if(e==="TOP_CHAT"){if((s=d?.at(0))!=null&&s.selected)return;P(this,gn,(l=d?.at(0))==null?void 0:l.continuation)}else{if((c=d?.at(1))!=null&&c.selected)return;P(this,gn,(u=d?.at(1))==null?void 0:u.continuation)}}async getItemMenu(e){if(!e.hasKey("menu_endpoint")||!e.key("menu_endpoint").isInstanceof(y))throw new w("This item does not have a menu.",e);let i=await e.key("menu_endpoint").instanceof(y).call(h(this,Ci),{parse:!0});if(!i)throw new w("Could not retrieve item menu.",e);return new sE(i,h(this,Ci))}async selectButton(e){return await e.endpoint.call(h(this,Ci),{parse:!0})}};Ci=new WeakMap;oo=new WeakMap;cr=new WeakMap;gn=new WeakMap;ro=new WeakMap;Br=new WeakMap;je=new WeakSet;ao=a(function(){(async()=>{try{let t=await h(this,Ci).execute(this.is_replay?"live_chat/get_live_chat_replay":"live_chat/get_live_chat",{continuation:h(this,gn),parse:!0}),e=t.continuation_contents;if(e||(this.emit("error",new w("Unexpected live chat incremental continuation response",t)),this.emit("end"),this.stop()),!(e instanceof y4)){this.stop(),this.emit("end");return}P(this,gn,e.continuation.token),e.header?(this.initial_info=e,this.emit("start",e),this.running&&F(this,je,ao).call(this)):this.smoothed_queue.enqueueActionGroup(e.actions),P(this,Br,0)}catch(t){this.emit("error",t),t6(this,Br)._++<10?(await F(this,je,xn).call(this,2e3),F(this,je,ao).call(this)):(this.emit("error",new w("Reached retry limit for incremental continuation requests",t)),this.emit("end"),this.stop())}})()},"#pollLivechat");ur=a(async function(t){let i=t.length<125?1:Math.ceil(t.length/125),r=i==1?(i=1e4/t.length,i*=Math.random()+.5,i=Math.min(1e3,i),i=Math.max(80,i)):i=80;for(let o of t)await F(this,je,xn).call(this,r),this.emit("chat-update",o)},"#emitSmoothedActions");hr=a(function(){(async()=>{var t,e,i,r,o,s,l,c,u,d,p;try{let _={videoId:h(this,oo)};h(this,ro)&&(_.continuation=h(this,ro));let b=await h(this,Ci).execute("/updated_metadata",_),g=v.parseResponse(b.data);P(this,ro,(t=g.continuation)==null?void 0:t.token),this.metadata={title:((e=g.actions)==null?void 0:e.array().firstOfType(jS))||((i=this.metadata)==null?void 0:i.title),description:((r=g.actions)==null?void 0:r.array().firstOfType(qS))||((o=this.metadata)==null?void 0:o.description),views:((s=g.actions)==null?void 0:s.array().firstOfType(KS))||((l=this.metadata)==null?void 0:l.views),likes:((c=g.actions)==null?void 0:c.array().firstOfType(GS))||((u=this.metadata)==null?void 0:u.likes),date:((d=g.actions)==null?void 0:d.array().firstOfType(WS))||((p=this.metadata)==null?void 0:p.date)},this.emit("metadata-update",this.metadata),await F(this,je,xn).call(this,5e3),this.running&&F(this,je,hr).call(this)}catch{await F(this,je,xn).call(this,2e3),this.running&&F(this,je,hr).call(this)}})()},"#pollMetadata");xn=a(async function(t){return new Promise(e=>setTimeout(()=>e(),t))},"#wait");a(pE,"LiveChat");var fE=pE,Di,Hs,mE=class vE{constructor(e,i){if(M(this,Di),M(this,Hs),n(this,"header"),n(this,"contents"),P(this,Hs,e),P(this,Di,v.parseResponse(i.data)),!h(this,Di).actions_memo)throw new w("Page actions not found");this.header=h(this,Di).actions_memo.getType(tI)[0],this.contents=h(this,Di).actions_memo.getType(p2)}async getContinuation(){var e;let i=(e=h(this,Di).actions_memo)==null?void 0:e.getType(Se)[0];if(!i)throw new w("Continuation not found");let r=await i.endpoint.call(h(this,Hs),{parse:!1});return new vE(h(this,Hs),r)}get page(){return h(this,Di)}};Di=new WeakMap;Hs=new WeakMap;a(mE,"NotificationsMenu");var bE=mE,gE=class xl extends Ge{constructor(e,i,r=!1){var o,s,l,c,u,d;super(e,i,r),n(this,"header"),n(this,"results"),n(this,"refinements"),n(this,"estimated_results"),n(this,"sub_menu"),n(this,"watch_card");let p=((o=this.page.contents_memo)==null?void 0:o.getType(Ae)[0].contents)||((l=(s=this.page.on_response_received_commands_memo)==null?void 0:s.getType(Ae)[0])==null?void 0:l.contents)||((c=this.page.on_response_received_commands)==null?void 0:c[0].as(Ji,Yi).contents);if(!p)throw new w("No contents found in search response");if(this.page.on_response_received_commands&&!this.page.header){let _=this.page.on_response_received_commands.as(Yi).find(b=>b.is(Yi)&&b.slot==="RELOAD_CONTINUATION_SLOT_HEADER");this.header=(u=_?.contents)==null?void 0:u.firstOfType(hl)}else this.header=(d=this.page.header)==null?void 0:d.item().as(hl);this.results=te(p.filterType(Pt).flatMap(_=>_.contents)),this.refinements=this.page.refinements||[],this.estimated_results=this.page.estimated_results||0,this.page.contents_memo&&(this.sub_menu=this.page.contents_memo.getType(GI)[0],this.watch_card=this.page.contents_memo.getType(Ov)[0])}async applyRefinement(e){var i;let r;if(typeof e=="string"){let s=(i=this.header)==null?void 0:i.chip_bar;if(!s)throw new w("No chip bar found in search header");let l=s.chips.find(c=>c.text===e);if(!l)throw new w(`Refinement filter "${e}" not found`,{available_filters:this.refinement_filters});if(r=l.endpoint,!r&&l.is_selected)return this}else if(e.is(Ke)){if(!e.endpoint&&e.is_selected)return this;r=e.endpoint}else throw new w("Invalid filter type");if(!r)throw new w("Could not find endpoint for the specified filter");let o=await r.call(this.actions,{parse:!0});return new xl(this.actions,o,!0)}get refinement_filters(){var e,i;return((i=(e=this.header)==null?void 0:e.chip_bar)==null?void 0:i.chips.map(r=>r.text))||[]}async getContinuation(){let e=await this.getContinuationData();if(!e)throw new w("Could not get continuation data");return new xl(this.actions,e,!0)}};a(gE,"Search");var yE=gE,pn,Ws,wE=class kE{constructor(e,i){M(this,pn),M(this,Ws),n(this,"sidebar"),n(this,"introduction"),n(this,"sections");var r,o,s,l;if(P(this,Ws,e),P(this,pn,v.parseResponse(i.data)),this.sidebar=(r=h(this,pn).sidebar)==null?void 0:r.as($I),!h(this,pn).contents)throw new w("Page contents not found");let c=h(this,pn).contents.item().as(Vo).tabs.find(d=>d.selected);if(!c)throw new w("Target tab not found");let u=(o=c.content)==null?void 0:o.as(Ae).contents.as(Pt);this.introduction=(l=(s=u?.shift())==null?void 0:s.contents)==null?void 0:l.firstOfType(II),this.sections=u?.map(d=>{var p;return{title:(p=d.header)!=null&&p.is(ha,Xf,em)?d.header.title.toString():null,contents:d.contents}})}async selectSidebarItem(e){if(!this.sidebar)throw new w("Sidebar not available");let i;if(typeof e=="string"){if(i=this.sidebar.items.find(o=>o.title===e),!i)throw new w(`Item "${e}" not found`,{available_items:this.sidebar_items})}else if(e?.is(Po))i=e;else throw new w("Invalid item",{target_item:e});let r=await i.endpoint.call(h(this,Ws),{parse:!1});return new kE(h(this,Ws),r)}getSettingOption(e){var i;if(!this.sections)throw new w("Sections not available");for(let r of this.sections)if(r.contents)for(let o of r.contents){let s=o.as(ir).options;if(s){for(let l of s)if(l.is(qv)&&((i=l.title)==null?void 0:i.toString())===e)return l}}throw new w(`Option "${e}" not found`,{available_options:this.setting_options})}get setting_options(){if(!this.sections)throw new w("Sections not available");let e=[];for(let i of this.sections)if(i.contents)for(let r of i.contents)r.as(ir).options&&(e=e.concat(r.as(ir).options));return e.map(i=>{var r;return(r=i.title)==null?void 0:r.toString()}).filter(i=>i)}get sidebar_items(){if(!this.sidebar)throw new w("Sidebar not available");return this.sidebar.items.map(e=>e.title.toString())}get page(){return h(this,pn)}};pn=new WeakMap;Ws=new WeakMap;a(wE,"Settings");var CE=wE,Bi,TE=class SE extends Uo{constructor(e,i,r){var o,s,l,c,u,d,p,_,b,g,C,T,S,k,A,I,D,H,j,W,q,N,R,K,Y,we,_e,ce,G,Q;super(e,i,r),n(this,"primary_info"),n(this,"secondary_info"),n(this,"playlist"),n(this,"game_info"),n(this,"merchandise"),n(this,"related_chip_cloud"),n(this,"watch_next_feed"),n(this,"player_overlays"),n(this,"comments_entry_point_header"),n(this,"livechat"),n(this,"autoplay"),n(this,"heat_map"),M(this,Bi);let[pe,ae]=this.page;if(this.streaming_data){let fe=this.streaming_data.adaptive_formats.find(ke=>{var ne;return(ne=ke.audio_track)==null?void 0:ne.audio_is_default});if(fe)this.streaming_data.formats.forEach(ke=>ke.language=fe.language);else if((o=this.captions)!=null&&o.caption_tracks&&((s=this.captions)==null?void 0:s.caption_tracks.length)>0){let ke=this.captions.caption_tracks.find(Pe=>Pe.kind==="asr"),ne=ke?.language_code;this.streaming_data.adaptive_formats.forEach(Pe=>{Pe.has_audio&&(Pe.language=ne)}),this.streaming_data.formats.forEach(Pe=>Pe.language=ne)}}let Ie=(l=ae?.contents)==null?void 0:l.item().as(Vb),J=Ie?.results,xe=Ie?.secondary_results;if(J&&xe){if((c=pe.microformat)!=null&&c.is(oi)&&((u=pe.microformat)==null?void 0:u.category)==="Gaming"){let Ee=(_=(p=(d=J.firstOfType(_l))==null?void 0:d.metadata)==null?void 0:p.rows)==null?void 0:_.firstOfType(ul);Ee?.is(ul)&&(this.game_info={title:(g=(b=Ee?.contents)==null?void 0:b.firstOfType(cl))==null?void 0:g.title,release_year:(T=(C=Ee?.contents)==null?void 0:C.firstOfType(cl))==null?void 0:T.subtitle})}this.primary_info=J.firstOfType(r4),this.secondary_info=J.firstOfType(_l),this.merchandise=J.firstOfType(md),this.related_chip_cloud=(S=xe.firstOfType(WI))==null?void 0:S.content.as(An),Ie?.playlist&&(this.playlist=Ie.playlist),this.watch_next_feed=((k=xe.firstOfType(Pt))==null?void 0:k.contents)||xe,this.watch_next_feed&&Array.isArray(this.watch_next_feed)&&((A=this.watch_next_feed.at(-1))!=null&&A.is(Se))&&P(this,Bi,(I=this.watch_next_feed.pop())==null?void 0:I.as(Se)),this.player_overlays=(D=ae?.player_overlays)==null?void 0:D.item().as(fa),Ie?.autoplay&&(this.autoplay=Ie.autoplay);let fe=(j=(H=this.primary_info)==null?void 0:H.menu)==null?void 0:j.top_level_buttons.firstOfType(Ls);(W=fe?.like_button)!=null&&W.is($e)&&((q=fe?.dislike_button)!=null&&q.is($e))&&(this.basic_info.like_count=(N=fe?.like_button)==null?void 0:N.like_count,this.basic_info.is_liked=(R=fe?.like_button)==null?void 0:R.is_toggled,this.basic_info.is_disliked=(K=fe?.dislike_button)==null?void 0:K.is_toggled);let ke=(we=(Y=this.primary_info)==null?void 0:Y.menu)==null?void 0:we.top_level_buttons.firstOfType(Zn);if(ke&&(this.basic_info.like_count=ke.like_count,ke.like_button)){let Ee=ke.like_button.like_status_entity.like_status;this.basic_info.is_liked=Ee==="LIKE",this.basic_info.is_disliked=Ee==="DISLIKE"}let ne=J.find(Ee=>Ee.is(Pt)&&Ee.target_id==="comments-entry-point");this.comments_entry_point_header=(_e=ne?.contents)==null?void 0:_e.firstOfType(WT),this.livechat=(ce=ae?.contents_memo)==null?void 0:ce.getType(MS)[0];let Pe=(Q=(G=this.page[1])==null?void 0:G.contents_memo)==null?void 0:Q.getType(u2),Ct=null;if(Pe){let Ee=Pe.find(di=>di.isHeatmap());if(Ee)try{Ct=Ee.toHeatmap()}catch{}}this.heat_map=Ct}}async selectFilter(e){var i,r,o,s;if(!this.related_chip_cloud)throw new w("Chip cloud not found, cannot apply filter");let l;if(typeof e=="string"){let d=(r=(i=this.related_chip_cloud)==null?void 0:i.chips)==null?void 0:r.find(p=>p.text===e);if(!d)throw new w("Invalid filter",{available_filters:this.filters});l=d}else if(e?.is(Ke))l=e;else throw new w("Invalid cloud chip",e);if(l.is_selected)return this;let c=await((o=l.endpoint)==null?void 0:o.call(this.actions,{parse:!0})),u=(s=c?.on_response_received_endpoints)==null?void 0:s.find(d=>d.is(Yi)&&d.target_id==="watch-next-feed");return this.watch_next_feed=u?.contents,this}async addToWatchHistory(){return super.addToWatchHistory()}async updateWatchTime(e){return super.updateWatchTime(e)}async getWatchNextContinuation(){var e,i,r,o,s;if(!h(this,Bi))throw new w("Watch next feed continuation not found");let l=await((e=h(this,Bi))==null?void 0:e.endpoint.call(this.actions,{parse:!0})),c=(i=l?.on_response_received_endpoints)==null?void 0:i.firstOfType(Ji);if(!c)throw new w("AppendContinuationItemsAction not found");return this.watch_next_feed=c?.contents,(o=(r=this.watch_next_feed)==null?void 0:r.at(-1))!=null&&o.is(Se)?P(this,Bi,(s=this.watch_next_feed.pop())==null?void 0:s.as(Se)):P(this,Bi,void 0),this}async like(){var e,i,r,o,s;let l=(i=(e=this.primary_info)==null?void 0:e.menu)==null?void 0:i.top_level_buttons.firstOfType(Zn);if(l){let d=(r=l?.like_button)==null?void 0:r.toggle_button;if(!d||!d.default_button||!l.like_button)throw new w("Like button not found",{video_id:this.basic_info.id});if(l.like_button.like_status_entity.like_status==="LIKE")throw new w("This video is already liked",{video_id:this.basic_info.id});if(!d.default_button.on_tap)throw new w("onTap command not found",{video_id:this.basic_info.id});return await new y(d.default_button.on_tap.payload.commands.find(b=>b.innertubeCommand)).call(this.actions)}let c=(s=(o=this.primary_info)==null?void 0:o.menu)==null?void 0:s.top_level_buttons.firstOfType(Ls),u=c?.like_button;if(!u)throw new w("Like button not found",{video_id:this.basic_info.id});if(!u.is($e))throw new w("Like button is not a toggle button. This action is likely disabled for this video.",{video_id:this.basic_info.id});if(u.is_toggled)throw new w("This video is already liked",{video_id:this.basic_info.id});return await u.endpoint.call(this.actions)}async dislike(){var e,i,r,o,s;let l=(i=(e=this.primary_info)==null?void 0:e.menu)==null?void 0:i.top_level_buttons.firstOfType(Zn);if(l){let d=(r=l?.dislike_button)==null?void 0:r.toggle_button;if(!d||!d.default_button||!l.dislike_button||!l.like_button)throw new w("Dislike button not found",{video_id:this.basic_info.id});if(l.like_button.like_status_entity.like_status==="DISLIKE")throw new w("This video is already disliked",{video_id:this.basic_info.id});if(!d.default_button.on_tap)throw new w("onTap command not found",{video_id:this.basic_info.id});return await new y(d.default_button.on_tap.payload.commands.find(b=>b.innertubeCommand)).call(this.actions)}let c=(s=(o=this.primary_info)==null?void 0:o.menu)==null?void 0:s.top_level_buttons.firstOfType(Ls),u=c?.dislike_button;if(!u)throw new w("Dislike button not found",{video_id:this.basic_info.id});if(!u.is($e))throw new w("Dislike button is not a toggle button. This action is likely disabled for this video.",{video_id:this.basic_info.id});if(u.is_toggled)throw new w("This video is already disliked",{video_id:this.basic_info.id});return await u.endpoint.call(this.actions)}async removeRating(){var e,i,r,o,s,l,c;let u,d=(i=(e=this.primary_info)==null?void 0:e.menu)==null?void 0:i.top_level_buttons.firstOfType(Zn);if(d){let g=(r=d?.like_button)==null?void 0:r.toggle_button;if(!g||!g.default_button||!d.like_button)throw new w("Like button not found",{video_id:this.basic_info.id});let C=d.like_button.like_status_entity.like_status;if(C==="LIKE")u=(o=d?.like_button)==null?void 0:o.toggle_button;else if(C==="DISLIKE")u=(s=d?.dislike_button)==null?void 0:s.toggle_button;else throw new w("This video is not liked/disliked",{video_id:this.basic_info.id});if(!u||!u.toggled_button)throw new w("Like/Dislike button not found",{video_id:this.basic_info.id});if(!u.toggled_button.on_tap)throw new w("onTap command not found",{video_id:this.basic_info.id});return await new y(u.toggled_button.on_tap.payload.commands.find(S=>S.innertubeCommand)).call(this.actions)}let p=(c=(l=this.primary_info)==null?void 0:l.menu)==null?void 0:c.top_level_buttons.firstOfType(Ls),_=p?.like_button,b=p?.dislike_button;if(!_?.is($e)||!b?.is($e))throw new w("Like/Dislike button is not a toggle button. This action is likely disabled for this video.",{video_id:this.basic_info.id});if(_?.is_toggled?u=_:b?.is_toggled&&(u=b),!u)throw new w("This video is not liked/disliked",{video_id:this.basic_info.id});return await u.toggled_endpoint.call(this.actions)}getLiveChat(){if(!this.livechat)throw new w("Live Chat is not available",{video_id:this.basic_info.id});return new fE(this)}getTrailerInfo(){var e,i;if(this.has_trailer&&((e=this.playability_status)!=null&&e.error_screen)){let r;if(this.playability_status.error_screen.is(ll)?r=(i=this.playability_status.error_screen.trailer)==null?void 0:i.player_response:this.playability_status.error_screen.is(xr)&&(r=this.playability_status.error_screen.player_response),r)return new SE([{data:r}],this.actions,this.cpn)}return null}get filters(){var e,i;return((i=(e=this.related_chip_cloud)==null?void 0:e.chips)==null?void 0:i.map(r=>{var o;return(o=r.text)==null?void 0:o.toString()}))||[]}get wn_has_continuation(){return!!h(this,Bi)}get autoplay_video_endpoint(){var e,i,r;return((r=(i=(e=this.autoplay)==null?void 0:e.sets)==null?void 0:i[0])==null?void 0:r.autoplay_video)||null}get has_trailer(){var e,i;return!!((i=(e=this.playability_status)==null?void 0:e.error_screen)!=null&&i.is(ll,xr))}get music_tracks(){var e,i,r,o,s,l;let c=(i=(e=this.page[1])==null?void 0:e.engagement_panels)==null?void 0:i.filter(u=>{var d;return(d=u.content)==null?void 0:d.is(Tr)});if(c!==void 0&&c.length>0){let u=(s=(o=(r=c[0].content)==null?void 0:r.as(Tr))==null?void 0:o.items)==null?void 0:s.filterType(ad);if(u!==void 0&&u.length>0)return(l=u[0].carousel_lockups)==null?void 0:l.map(d=>{var p,_,b,g,C,T,S,k,A,I,D,H,j,W,q,N,R,K,Y,we;let _e,ce,G,Q,pe,ae;_e=(_=(p=d.video_lockup)==null?void 0:p.title)==null?void 0:_.toString(),pe=(g=(b=d.video_lockup)==null?void 0:b.endpoint)==null?void 0:g.payload.videoId;for(let Ie=0;Ie<d.info_rows.length;Ie++){let J=d.info_rows[Ie];if(J.info_row_expand_status_key===void 0)if(_e===void 0){if(_e=((C=J.default_metadata)==null?void 0:C.toString())||((T=J.expanded_metadata)==null?void 0:T.toString()),pe===void 0){let xe=((S=J.default_metadata)==null?void 0:S.endpoint)||((k=J.expanded_metadata)==null?void 0:k.endpoint);pe=(A=xe?.payload)==null?void 0:A.videoId}}else G=((I=J.default_metadata)==null?void 0:I.toString())||((D=J.expanded_metadata)==null?void 0:D.toString());else{if(((H=J.info_row_expand_status_key)==null?void 0:H.indexOf("structured-description-music-section-artists-row-state-id"))!==-1&&(ce=((j=J.default_metadata)==null?void 0:j.toString())||((W=J.expanded_metadata)==null?void 0:W.toString()),ae===void 0)){let xe=((q=J.default_metadata)==null?void 0:q.endpoint)||((N=J.expanded_metadata)==null?void 0:N.endpoint);ae=(R=xe?.payload)==null?void 0:R.browseId}((K=J.info_row_expand_status_key)==null?void 0:K.indexOf("structured-description-music-section-licenses-row-state-id"))!==-1&&(Q=((Y=J.default_metadata)==null?void 0:Y.toString())||((we=J.expanded_metadata)==null?void 0:we.toString()))}}return{song:_e,artist:ce,album:G,license:Q,videoId:pe,channelId:ae}})}return[]}};Bi=new WeakMap;a(TE,"VideoInfo");var Pl=TE,qn,qs,IE=class EE{constructor(e,i){if(M(this,qn),M(this,qs),n(this,"transcript"),P(this,qn,v.parseResponse(i.data)),P(this,qs,e),!h(this,qn).actions_memo)throw new Error("Page actions not found");this.transcript=h(this,qn).actions_memo.getType(gu)[0]}async selectLanguage(e){var i,r,o,s;let l=(s=(o=(r=(i=this.transcript.content)==null?void 0:i.footer)==null?void 0:r.language_menu)==null?void 0:o.sub_menu_items)==null?void 0:s.find(u=>u.title.toString()===e);if(!l)throw new Error(`Language not found: ${e}`);if(l.selected)return this;let c=await h(this,qs).execute("/get_transcript",{params:l.continuation});return new EE(h(this,qs),c)}get languages(){var e,i,r,o;return((o=(r=(i=(e=this.transcript.content)==null?void 0:e.footer)==null?void 0:i.language_menu)==null?void 0:r.sub_menu_items)==null?void 0:o.map(s=>s.title.toString()))||[]}get selectedLanguage(){var e,i,r,o,s;return((s=(o=(r=(i=(e=this.transcript.content)==null?void 0:e.footer)==null?void 0:i.language_menu)==null?void 0:r.sub_menu_items)==null?void 0:o.find(l=>l.selected))==null?void 0:s.title.toString())||""}get page(){return h(this,qn)}};qn=new WeakMap;qs=new WeakMap;a(IE,"TranscriptInfo");var AE=IE,KM={};Ne(KM,{Album:()=>PE,Artist:()=>RE,Explore:()=>BE,HomeFeed:()=>VE,Library:()=>FE,LibraryContinuation:()=>WE,Playlist:()=>Bg,Recap:()=>YE,Search:()=>$E,TrackInfo:()=>Lg});var Zt,xE=class{constructor(e){M(this,Zt),n(this,"header"),n(this,"contents"),n(this,"sections"),n(this,"background"),n(this,"url");var i,r,o;if(P(this,Zt,v.parseResponse(e.data)),!h(this,Zt).contents_memo)throw new Error("No contents found in the response");this.header=(i=h(this,Zt).contents_memo.getType(X2,p0))==null?void 0:i[0],this.contents=((r=h(this,Zt).contents_memo.getType(it))==null?void 0:r[0].contents)||te([]),this.sections=h(this,Zt).contents_memo.getType(Yt)||te([]),this.background=h(this,Zt).background,this.url=(o=h(this,Zt).microformat)==null?void 0:o.as(rs).url_canonical}get page(){return h(this,Zt)}};Zt=new WeakMap;a(xE,"Album");var PE=xE,jn,dr,ME=class{constructor(e,i){M(this,jn),M(this,dr),n(this,"header"),n(this,"sections");var r,o,s;P(this,jn,v.parseResponse(e.data)),P(this,dr,i),this.header=(r=this.page.header)==null?void 0:r.item().as(gI,TI,pa);let l=((o=h(this,jn).contents_memo)==null?void 0:o.getType(it))||[],c=((s=h(this,jn).contents_memo)==null?void 0:s.getType(Yt))||[];this.sections=te([...l,...c])}async getAllSongs(){var e,i;let r=this.sections.filter(l=>l.type==="MusicShelf");if(!r.length)throw new w("Could not find any node of type MusicShelf.");let o=r.find(l=>{var c;return((c=l.title)==null?void 0:c.text)==="Top songs"});if(!o)throw new w("Could not find target shelf (Top songs).");if(!o.endpoint)throw new w("Target shelf (Top songs) did not have an endpoint.");return(i=(e=(await o.endpoint.call(h(this,dr),{client:"YTMUSIC",parse:!0})).contents_memo)==null?void 0:e.getType(Ar))==null?void 0:i[0]}get page(){return h(this,jn)}};jn=new WeakMap;dr=new WeakMap;a(ME,"Artist");var RE=ME,js,DE=class{constructor(e){M(this,js),n(this,"top_buttons"),n(this,"sections");var i,r,o;P(this,js,v.parseResponse(e.data));let s=(i=h(this,js).contents)==null?void 0:i.item().as(ma).tabs.find(c=>c.selected);if(!s)throw new w("Could not find target tab.");let l=(r=s.content)==null?void 0:r.as(Ae);if(!l)throw new w("Target tab did not have any content.");this.top_buttons=((o=l.contents.firstOfType(Ir))==null?void 0:o.items.as(H2))||[],this.sections=l.contents.filterType(Yt)}get page(){return h(this,js)}};js=new WeakMap;a(DE,"Explore");var BE=DE,Li,fn,mn,LE=class Ml{constructor(e,i){M(this,Li),M(this,fn),M(this,mn),n(this,"sections"),n(this,"header");var r,o,s,l,c,u;P(this,fn,i),P(this,Li,v.parseResponse(e.data));let d=(r=h(this,Li).contents)==null?void 0:r.item().as(ma).tabs.find(p=>p.selected);if(!d)throw new w("Could not find Home tab.");if(d.content===null){if(!h(this,Li).continuation_contents)throw new w("Continuation did not have any content.");P(this,mn,h(this,Li).continuation_contents.as(fs).continuation),this.sections=(o=h(this,Li).continuation_contents.as(fs).contents)==null?void 0:o.as(Yt);return}this.header=(l=(s=d.content)==null?void 0:s.as(Ae).header)==null?void 0:l.as(An),P(this,mn,(c=d.content)==null?void 0:c.as(Ae).continuation),this.sections=(u=d.content)==null?void 0:u.as(Ae).contents.as(Yt,CI)}async getContinuation(){if(!h(this,mn))throw new w("Continuation not found.");let e=await h(this,fn).execute("/browse",{client:"YTMUSIC",continuation:h(this,mn)});return new Ml(e,h(this,fn))}async applyFilter(e){var i,r;let o;if(typeof e=="string"){if(o=(r=(i=this.header)==null?void 0:i.chips)==null?void 0:r.as(Ke).find(l=>l.text===e),!o)throw new w("Could not find filter with given name.",{available_filters:this.filters})}else e?.is(Ke)&&(o=e);if(!o)throw new w("Invalid filter",{available_filters:this.filters});if(o?.is_selected)return this;if(!o.endpoint)throw new w("Selected filter does not have an endpoint.");let s=await o.endpoint.call(h(this,fn),{client:"YTMUSIC"});return new Ml(s,h(this,fn))}get filters(){var e,i;return((i=(e=this.header)==null?void 0:e.chips)==null?void 0:i.as(Ke).map(r=>r.text))||[]}get has_continuation(){return!!h(this,mn)}get page(){return h(this,Li)}};Li=new WeakMap;fn=new WeakMap;mn=new WeakMap;a(LE,"HomeFeed");var VE=LE,ei,Vi,Gn,OE=class NE{constructor(e,i){M(this,ei),M(this,Vi),M(this,Gn),n(this,"header"),n(this,"contents");var r,o,s,l,c;P(this,ei,v.parseResponse(e.data)),P(this,Vi,i);let u=(r=h(this,ei).contents_memo)==null?void 0:r.getType(Ae)[0];this.header=(o=u?.header)==null?void 0:o.as(wI),this.contents=(s=u?.contents)==null?void 0:s.as(Ir,it),P(this,Gn,(c=(l=this.contents)==null?void 0:l.find(d=>d.continuation))==null?void 0:c.continuation)}async applySort(e){var i,r,o,s,l,c,u,d,p;let _;if(typeof e=="string"){let T=(i=h(this,ei).contents_memo)==null?void 0:i.getType(al)[0],S=(r=T?.menu)==null?void 0:r.options.filter(k=>k instanceof os);if(_=S?.find(k=>k.title===e),!_)throw new w(`Sort option "${e}" not found`,{available_filters:S.map(k=>k.title)})}else _=e;if(!_.endpoint)throw new w("Invalid sort option");if(_.selected)return this;let b=(l=(s=(o=_.endpoint.payload)==null?void 0:o.commands)==null?void 0:s.find(T=>T.browseSectionListReloadEndpoint))==null?void 0:l.browseSectionListReloadEndpoint;if(!b)throw new w("Failed to find sort option command");let g=await h(this,Vi).execute("/browse",{client:"YTMUSIC",continuation:b.continuation.reloadContinuationData.continuation,parse:!0}),C=(u=(c=h(this,ei).contents_memo)==null?void 0:c.getType(os))==null?void 0:u.find(T=>T.selected);return C&&(C.selected=!1),_.selected=!0,this.contents=(p=(d=g.continuation_contents)==null?void 0:d.as(fs).contents)==null?void 0:p.as(Ir,it),this}async applyFilter(e){var i,r,o;let s,l=(i=h(this,ei).contents_memo)==null?void 0:i.getType(An)[0];if(typeof e=="string"){if(s=l?.chips.find(d=>d.text===e),!s)throw new w(`Filter "${e}" not found`,{available_filters:this.filters})}else s=e;if(!s.endpoint)throw new w("Invalid filter",e);let u=await new y((o=(r=s.endpoint.payload)==null?void 0:r.commands)==null?void 0:o[0]).call(h(this,Vi),{client:"YTMUSIC"});return new NE(u,h(this,Vi))}async getContinuation(){if(!h(this,Gn))throw new w("No continuation available");let e=await h(this,Vi).execute("/browse",{client:"YTMUSIC",continuation:h(this,Gn)});return new WE(e,h(this,Vi))}get has_continuation(){return!!h(this,Gn)}get sort_options(){var e,i;let r=(e=h(this,ei).contents_memo)==null?void 0:e.getType(al)[0];return((i=r?.menu)==null?void 0:i.options.filter(s=>s instanceof os)).map(s=>s.title)}get filters(){var e,i;return((i=(e=h(this,ei).contents_memo)==null?void 0:e.getType(An))==null?void 0:i[0].chips.map(r=>r.text))||[]}get page(){return h(this,ei)}};ei=new WeakMap;Vi=new WeakMap;Gn=new WeakMap;a(OE,"Library");var FE=OE,Kn,Gs,Yn,UE=class HE{constructor(e,i){if(M(this,Kn),M(this,Gs),M(this,Yn),n(this,"contents"),P(this,Kn,v.parseResponse(e.data)),P(this,Gs,i),!h(this,Kn).continuation_contents)throw new w("No continuation contents found");this.contents=h(this,Kn).continuation_contents.as(yg,v4),P(this,Yn,this.contents.continuation||null)}async getContinuation(){if(!h(this,Yn))throw new w("No continuation available");let e=await h(this,Gs).execute("/browse",{client:"YTMUSIC",continuation:h(this,Yn)});return new HE(e,h(this,Gs))}get has_continuation(){return!!h(this,Yn)}get page(){return h(this,Kn)}};Kn=new WeakMap;Gs=new WeakMap;Yn=new WeakMap;a(UE,"LibraryContinuation");var WE=UE,lt,qi,ti,zn,lo,Rl,qE,jE=class GE{constructor(e,i){M(this,Rl),M(this,lt),M(this,qi),M(this,ti),n(this,"header"),n(this,"contents"),n(this,"background"),M(this,zn),M(this,lo);var r,o,s,l,c,u,d,p;if(P(this,qi,i),P(this,lt,v.parseResponse(e.data)),P(this,zn,null),P(this,lo,null),h(this,lt).continuation_contents){let _=(r=h(this,lt).continuation_contents)==null?void 0:r.as(m4);if(!_.contents)throw new w("No contents found in the response");this.contents=_.contents.as(Ki,Se);let b=this.contents.firstOfType(Se);P(this,ti,_.continuation||b)}else if(h(this,lt).contents_memo){this.header=(o=h(this,lt).contents_memo.getType(p0,bI,X2))==null?void 0:o[0],this.contents=((l=(s=h(this,lt).contents_memo.getType(Ar))==null?void 0:s[0])==null?void 0:l.contents.as(Ki,Se))||te([]),this.background=h(this,lt).background;let _=this.contents.firstOfType(Se);P(this,ti,((u=(c=h(this,lt).contents_memo.getType(Ar))==null?void 0:c[0])==null?void 0:u.continuation)||_)}else if(h(this,lt).on_response_received_actions){let _=h(this,lt).on_response_received_actions.firstOfType(Ji);this.contents=(d=_?.contents)==null?void 0:d.as(Ki,Se),P(this,ti,(p=this.contents)==null?void 0:p.firstOfType(Se))}}async getContinuation(){if(!h(this,ti))throw new w("Continuation not found.");let e;return typeof h(this,ti)=="string"?e=await h(this,qi).execute("/browse",{client:"YTMUSIC",continuation:h(this,ti)}):e=await h(this,ti).endpoint.call(h(this,qi),{client:"YTMUSIC"}),new GE(e,h(this,qi))}async getRelated(){var e,i,r,o;let s=(e=h(this,lt).contents_memo)==null?void 0:e.getType(Ae).find(c=>c.continuation);if(!s)throw new w('Could not find "Related" section.');let l=s.continuation;for(;l;){let u=(i=(await h(this,qi).execute("/browse",{client:"YTMUSIC",continuation:l,parse:!0})).continuation_contents)==null?void 0:i.as(fs),d=(r=u?.contents)==null?void 0:r.as(Yt,it),p=(o=d?.find(_=>_.is(Yt)))==null?void 0:o.as(Yt);if(p)return p;l=u?.continuation}throw new w("Could not fetch related playlists.")}async getSuggestions(e=!0){let o=await(e||!h(this,zn)?F(this,Rl,qE).call(this):Promise.resolve(null));return o&&(P(this,zn,o.items),P(this,lo,o.continuation)),o?.items||h(this,zn)||te([])}get page(){return h(this,lt)}get items(){return this.contents||te([])}get has_continuation(){return!!h(this,ti)}};lt=new WeakMap;qi=new WeakMap;ti=new WeakMap;zn=new WeakMap;lo=new WeakMap;Rl=new WeakSet;qE=a(async function(){var t,e,i,r;let o=(t=h(this,lt).contents_memo)==null?void 0:t.getType(Ae).find(l=>l.continuation),s=h(this,lo)||o?.continuation;if(s){let c=(e=(await h(this,qi).execute("/browse",{client:"YTMUSIC",continuation:s,parse:!0})).continuation_contents)==null?void 0:e.as(fs),u=(i=c?.contents)==null?void 0:i.as(Yt,it),d=(r=u?.find(p=>p.is(it)))==null?void 0:r.as(it);return{items:d?.contents||te([]),continuation:d?.continuation||null}}return{items:te([]),continuation:null}},"#fetchSuggestions");a(jE,"Playlist");var Bg=jE,Oi,Ks,KE=class{constructor(e,i){M(this,Oi),M(this,Ks),n(this,"header"),n(this,"sections");var r,o,s,l,c,u,d;P(this,Oi,v.parseResponse(e.data)),P(this,Ks,i);let p=(r=h(this,Oi).header)==null?void 0:r.item();this.header=p?.is(rl)?(l=(s=(o=h(this,Oi).header)==null?void 0:o.item().as(rl).element)==null?void 0:s.model)==null?void 0:l.as(ol):(c=h(this,Oi).header)==null?void 0:c.item().as(pa);let _=(u=h(this,Oi).contents)==null?void 0:u.item().as(ma).tabs.firstOfType(kt);if(!_)throw new w("Target tab not found");this.sections=(d=_.content)==null?void 0:d.as(Ae).contents.as(Pt,Yt,ui)}async getPlaylist(){if(!this.header)throw new w("Header not found");if(!this.header.is(ol))throw new w("Recap playlist not available, check back later.");let i=await this.header.panels[0].text_on_tap_endpoint.call(h(this,Ks),{client:"YTMUSIC"});return new Bg(i,h(this,Ks))}get page(){return h(this,Oi)}};Oi=new WeakMap;Ks=new WeakMap;a(KE,"Recap");var YE=KE,ii,wi,$n,zE=class Dl{constructor(e,i,r){M(this,ii),M(this,wi),M(this,$n),n(this,"header"),n(this,"contents");var o,s,l;if(P(this,wi,i),P(this,ii,v.parseResponse(e.data)),!h(this,ii).contents||!h(this,ii).contents_memo)throw new w("Response did not contain any contents.");let c=h(this,ii).contents.item().as(i4).tabs.find(d=>d.selected);if(!c)throw new w("Could not find target tab.");let u=(o=c.content)==null?void 0:o.as(Ae);if(!u)throw new w("Target tab did not have any content.");this.header=(s=u.header)==null?void 0:s.as(An),this.contents=u.contents.as(it,sI,Pt),r&&P(this,$n,(l=this.contents.firstOfType(it))==null?void 0:l.continuation)}async getMore(e){if(!e||!e.endpoint)throw new w("Cannot retrieve more items for this shelf because it does not have an endpoint.");let i=await e.endpoint.call(h(this,wi),{client:"YTMUSIC"});if(!i)throw new w("Endpoint did not return any data");return new Dl(i,h(this,wi),!0)}async getContinuation(){if(!h(this,$n))throw new w("Continuation not found.");let e=await h(this,wi).execute("/search",{continuation:h(this,$n),client:"YTMUSIC"});return new YM(h(this,wi),e)}async applyFilter(e){var i,r;let o;if(typeof e=="string"){if(o=(r=(i=this.header)==null?void 0:i.chips)==null?void 0:r.as(Ke).find(l=>l.text===e),!o)throw new w("Could not find filter with given name.",{available_filters:this.filters})}else e?.is(Ke)&&(o=e);if(!o)throw new w("Invalid filter",{available_filters:this.filters});if(o?.is_selected)return this;if(!o.endpoint)throw new w("Selected filter does not have an endpoint.");let s=await o.endpoint.call(h(this,wi),{client:"YTMUSIC"});return new Dl(s,h(this,wi),!0)}get filters(){var e,i;return((i=(e=this.header)==null?void 0:e.chips)==null?void 0:i.as(Ke).map(r=>r.text))||[]}get has_continuation(){return!!h(this,$n)}get did_you_mean(){var e;return(e=h(this,ii).contents_memo)==null?void 0:e.getType(tS)[0]}get showing_results_for(){var e;return(e=h(this,ii).contents_memo)==null?void 0:e.getType(ZI)[0]}get message(){var e;return(e=h(this,ii).contents_memo)==null?void 0:e.getType(ui)[0]}get songs(){var e;return(e=this.contents)==null?void 0:e.filterType(it).find(i=>i.title.toString()==="Songs")}get videos(){var e;return(e=this.contents)==null?void 0:e.filterType(it).find(i=>i.title.toString()==="Videos")}get albums(){var e;return(e=this.contents)==null?void 0:e.filterType(it).find(i=>i.title.toString()==="Albums")}get artists(){var e;return(e=this.contents)==null?void 0:e.filterType(it).find(i=>i.title.toString()==="Artists")}get playlists(){var e;return(e=this.contents)==null?void 0:e.filterType(it).find(i=>i.title.toString()==="Community playlists")}get page(){return h(this,ii)}};ii=new WeakMap;wi=new WeakMap;$n=new WeakMap;a(zE,"Search");var $E=zE,Ys,Jn,JE=class XE{constructor(e,i){M(this,Ys),M(this,Jn),n(this,"header"),n(this,"contents");var r,o;P(this,Ys,e),P(this,Jn,v.parseResponse(i.data)),this.header=(r=h(this,Jn).header)==null?void 0:r.item().as(pa),this.contents=(o=h(this,Jn).continuation_contents)==null?void 0:o.as(yg)}async getContinuation(){var e;if(!((e=this.contents)!=null&&e.continuation))throw new w("Continuation not found.");let i=await h(this,Ys).execute("/search",{continuation:this.contents.continuation,client:"YTMUSIC"});return new XE(h(this,Ys),i)}get has_continuation(){var e;return!!((e=this.contents)!=null&&e.continuation)}get page(){return h(this,Jn)}};Ys=new WeakMap;Jn=new WeakMap;a(JE,"SearchContinuation");var YM=JE,QE=class extends Uo{constructor(e,i,r){var o,s,l;super(e,i,r),n(this,"tabs"),n(this,"current_video_endpoint"),n(this,"player_overlays");let c=this.page[1];if(c){let u=(s=(o=c.contents_memo)==null?void 0:o.getType(l4))==null?void 0:s[0];this.tabs=u?.tabs.as(kt),this.current_video_endpoint=c.current_video_endpoint,this.player_overlays=(l=c.player_overlays)==null?void 0:l.item().as(fa)}}async getTab(e){var i,r;if(!this.tabs)throw new w("Could not find any tab");let o=this.tabs.find(l=>l.title===e)||this.tabs.find(l=>{var c,u;return((u=(c=l.endpoint.payload.browseEndpointContextSupportedConfigs)==null?void 0:c.browseEndpointContextMusicConfig)==null?void 0:u.pageType)===e})||((i=this.tabs)==null?void 0:i[0]);if(!o)throw new w(`Tab "${e}" not found`,{available_tabs:this.available_tabs});if(o.content)return o.content;let s=await o.endpoint.call(this.actions,{client:"YTMUSIC",parse:!0});if(((r=s.contents)==null?void 0:r.item().type)==="Message")return s.contents.item().as(ui);if(!s.contents)throw new w("Page contents was empty",s);return s.contents.item().as(Ae).contents}async getUpNext(e=!0){var i,r;let o=await this.getTab("Up next");if(!o||!o.content)throw new w("Music queue was empty, the video id is probably invalid.",o);let s=o.content.as(Cn);if(!s.playlist_id&&e){let l=s.contents.firstOfType(oa);if(!l)throw new w("Automix item not found");let c=await((i=l.playlist_video)==null?void 0:i.endpoint.call(this.actions,{videoId:this.basic_info.id,client:"YTMUSIC",parse:!0}));if(!c||!c.contents_memo)throw new w("Could not fetch automix");return(r=c.contents_memo.getType(Cn))==null?void 0:r[0]}return s}async getUpNextContinuation(e){var i;if(!this.current_video_endpoint)throw new w("Current Video Endpoint was not defined.",this.current_video_endpoint);if(e instanceof Cn&&e.playlist_id!==this.current_video_endpoint.payload.playlistId)throw new w("PlaylistId from TrackInfo does not match with PlaylistPanel");let o=await new y({watchNextEndpoint:{...this.current_video_endpoint.payload,continuation:e.continuation}}).call(this.actions,{...this.current_video_endpoint.payload,continuation:e.continuation,client:"YTMUSIC",parse:!0}),s=(i=o.continuation_contents)==null?void 0:i.as(b4);if(!s)throw new w("No PlaylistPanel Continuation available.",o);return s}async getRelated(){return await this.getTab("MUSIC_PAGE_TYPE_TRACK_RELATED")}async getLyrics(){return(await this.getTab("MUSIC_PAGE_TYPE_TRACK_LYRICS")).firstOfType(_a)}async addToWatchHistory(){return super.addToWatchHistory(he.CLIENTS.YTMUSIC.NAME,he.CLIENTS.YTMUSIC.VERSION,"https://music.")}async updateWatchTime(e){return super.updateWatchTime(e,he.CLIENTS.YTMUSIC.NAME,he.CLIENTS.YTMUSIC.VERSION,"https://music.")}get available_tabs(){return this.tabs?this.tabs.map(e=>e.title):[]}};a(QE,"TrackInfo");var zM=QE,Lg=zM,$M={};Ne($M,{Channel:()=>tA,HomeFeed:()=>sA,Search:()=>rA,VideoInfo:()=>lA});var ZE=class eA extends Ge{constructor(e,i,r=!1){var o,s;super(e,i,r),n(this,"header"),n(this,"contents"),this.header=(o=this.page.header)==null?void 0:o.item().as(no),this.contents=this.memo.getType(Pt)[0]||((s=this.page.continuation_contents)==null?void 0:s.as(f4))}async getContinuation(){if(!this.contents)throw new Error("No continuation available.");let i=await new y({continuationCommand:{token:this.contents.continuation,request:"CONTINUATION_REQUEST_TYPE_BROWSE"}}).call(this.actions,{client:"YTKIDS"});return new eA(this.actions,i)}get has_continuation(){var e;return!!((e=this.contents)!=null&&e.continuation)}};a(ZE,"Channel");var tA=ZE,iA=class nA extends Ge{constructor(e,i,r=!1){var o,s;super(e,i,r),n(this,"header"),n(this,"contents"),this.header=(o=this.page.header)==null?void 0:o.item().as(u4),this.contents=(s=this.page.contents)==null?void 0:s.item().as(h4)}async selectCategoryTab(e){var i;let r;if(typeof e=="string"?r=(i=this.header)==null?void 0:i.category_tabs.find(s=>s.title.toString()===e):e?.is(sg)&&(r=e),!r)throw new w(`Tab "${e}" not found`);let o=await r.endpoint.call(this.actions,{client:"YTKIDS",parse:!0});return o.header=this.page.header,o.header_memo=this.page.header_memo,new nA(this.actions,o,!0)}get categories(){var e;return((e=this.header)==null?void 0:e.category_tabs.map(i=>i.title.toString()))||[]}};a(iA,"HomeFeed");var sA=iA,oA=class extends Ge{constructor(e,i){super(e,i),n(this,"estimated_results"),n(this,"contents"),this.estimated_results=this.page.estimated_results;let r=this.memo.getType(Pt)[0];if(!r)throw new w("No item section found in search response.");this.contents=r.contents}};a(oA,"Search");var rA=oA,aA=class extends Uo{constructor(e,i,r){var o,s,l,c,u;super(e,i,r),n(this,"slim_video_metadata"),n(this,"watch_next_feed"),n(this,"current_video_endpoint"),n(this,"player_overlays");let d=this.page[1],p=(o=d?.contents)==null?void 0:o.item().as(Vb),_=p?.results,b=p?.secondary_results;_&&b&&(this.slim_video_metadata=(l=(s=_.firstOfType(Pt))==null?void 0:s.contents)==null?void 0:l.firstOfType(e4),this.watch_next_feed=((c=b.firstOfType(Pt))==null?void 0:c.contents)||b,this.current_video_endpoint=d?.current_video_endpoint,this.player_overlays=(u=d?.player_overlays)==null?void 0:u.item().as(fa))}};a(aA,"VideoInfo");var lA=aA,JM={};Ne(JM,{ShortFormVideoInfo:()=>uA});var vn,cA=class extends Uo{constructor(e,i,r,o){var s;if(super(e,i,r),M(this,vn),n(this,"watch_next_feed"),n(this,"current_video_endpoint"),n(this,"player_overlays"),o){let l=v.parseResponse(o.data);l.entries&&(this.watch_next_feed=l.entries),l.continuation_endpoint&&P(this,vn,(s=l.continuation_endpoint)==null?void 0:s.as(yl))}}async getWatchNextContinuation(){var e;if(!h(this,vn))throw new w("Continuation not found");let i=await this.actions.execute("/reel/reel_watch_sequence",{sequenceParams:h(this,vn).token,parse:!0});return i.entries&&(this.watch_next_feed=i.entries),P(this,vn,(e=i.continuation_endpoint)==null?void 0:e.as(yl)),this}get wn_has_continuation(){return!!h(this,vn)}};vn=new WeakMap;a(cA,"ShortFormVideoInfo");var uA=cA,hA=class{constructor(e,i,r,o){n(this,"id"),n(this,"name"),n(this,"thumbnails"),n(this,"endpoint"),n(this,"badges"),n(this,"is_moderator"),n(this,"is_verified"),n(this,"is_verified_artist"),n(this,"url");var s,l,c,u,d,p,_,b,g,C,T,S,k,A,I,D,H,j,W,q,N,R,K,Y,we,_e,ce;let G=new f(e);this.id=o||((u=(c=(l=(s=G?.runs)==null?void 0:s[0])==null?void 0:l.endpoint)==null?void 0:c.payload)==null?void 0:u.browseId)||((p=(d=G?.endpoint)==null?void 0:d.payload)==null?void 0:p.browseId)||"N/A",this.name=G?.text||"N/A",this.thumbnails=r?x.fromResponse(r):[],this.endpoint=((b=(_=G?.runs)==null?void 0:_[0])==null?void 0:b.endpoint)||G?.endpoint,i?Array.isArray(i)?(this.badges=v.parseArray(i),this.is_moderator=(g=this.badges)==null?void 0:g.some(Q=>Q.icon_type=="MODERATOR"),this.is_verified=(C=this.badges)==null?void 0:C.some(Q=>Q.style=="BADGE_STYLE_TYPE_VERIFIED"),this.is_verified_artist=(T=this.badges)==null?void 0:T.some(Q=>Q.style=="BADGE_STYLE_TYPE_VERIFIED_ARTIST")):(this.badges=te([]),this.is_verified=!!i.isVerified,this.is_verified_artist=!!i.isArtist):this.badges=te([]),this.url=((I=(A=(k=(S=G?.runs)==null?void 0:S[0])==null?void 0:k.endpoint)==null?void 0:A.metadata)==null?void 0:I.api_url)==="/browse"&&`${st.YT_BASE}${((W=(j=(H=(D=G?.runs)==null?void 0:D[0])==null?void 0:H.endpoint)==null?void 0:j.payload)==null?void 0:W.canonicalBaseUrl)||`/u/${(K=(R=(N=(q=G?.runs)==null?void 0:q[0])==null?void 0:N.endpoint)==null?void 0:R.payload)==null?void 0:K.browseId}`}`||`${st.YT_BASE}${((we=(Y=G?.endpoint)==null?void 0:Y.payload)==null?void 0:we.canonicalBaseUrl)||`/u/${(ce=(_e=G?.endpoint)==null?void 0:_e.payload)==null?void 0:ce.browseId}`}`}get best_thumbnail(){return this.thumbnails[0]}};a(hA,"Author");var le=hA,XM={desktop:["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6.1 Safari/605.1.15","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 OPR/121.0.0.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 OPR/121.0.0.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 OPR/122.0.0.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36"],mobile:["Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Mobile Safari/537.36","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/388.0.811331708 Mobile/15E148 Safari/604.1","Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/388.0.811331708 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Mobile Safari/537.36","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/388.0.811331708 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/388.0.811331708 Mobile/15E148 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Mobile/15E148 Safari/604.1"]},QM="Utils",Ma,dA=class{static load(e){Ma=e}static get shim(){if(!Ma)throw new Error("Platform is not loaded");return Ma}};a(dA,"Platform");var ve=dA,_A=class extends Error{constructor(e,i){super(e),n(this,"date"),n(this,"version"),n(this,"info"),i&&(this.info=i),this.date=new Date,this.version=jt.version}};a(_A,"InnertubeError");var w=_A,pA=class extends w{};a(pA,"ParsingError");var Qi=pA,fA=class extends w{};a(fA,"MissingParamError");var mA=fA,vA=class extends w{};a(vA,"OAuth2Error");var ze=vA,bA=class extends Error{};a(bA,"PlayerError");var Ni=bA,gA=class extends Error{};a(gA,"SessionError");var Bl=gA,yA=class extends Error{};a(yA,"ChannelError");var wA=yA;function Lr(t,e){return Reflect.ownKeys(t).some(r=>{let o=e[r]instanceof f;return!o&&typeof e[r]=="object"?JSON.stringify(t[r])===JSON.stringify(e[r]):t[r]===(o?e[r].toString():e[r])})}a(Lr,"deepCompare");function $t(t,e,i){let r=new RegExp(`${Vr(e)}(.*?)${Vr(i)}`,"s"),o=t.match(r);return o?o[1]:void 0}a($t,"getStringBetweenStrings");function Vr(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}a(Vr,"escapeStringRegexp");function Sa(t){let e=XM[t],i=Math.floor(Math.random()*e.length);return e[i]}a(Sa,"getRandomUserAgent");async function Vg(t){let e="https://www.youtube.com",i=Math.floor(new Date().getTime()/1e3),r=[i,t,e].join(" "),o=await ve.shim.sha1Hash(r);return["SAPISIDHASH",[i,o].join("_")].join(" ")}a(Vg,"generateSidAuth");function li(t){let e=[],i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";for(let r=0;r<t;r++)e.push(i.charAt(Math.floor(Math.random()*i.length)));return e.join("")}a(li,"generateRandomString");function Xt(t){let e=t.split(":").map(i=>parseInt(i.replace(/\D/g,"")));switch(e.length){case 1:return e[0];case 2:return e[0]*60+e[1];case 3:return e[0]*3600+e[1]*60+e[2];default:throw new Error("Invalid time string")}}a(Xt,"timeToSeconds");function Og(...t){let e=new Hl;for(let i of t)if(i)for(let r of i){let o=e.get(r[0]);if(o){e.set(r[0],[...o,...r[1]]);continue}e.set(...r)}return e}a(Og,"concatMemos");function se(t){for(let[e,i]of Object.entries(t))if(!i)throw new mA(`${e} is missing`)}a(se,"throwIfMissing");function kA(t,...e){for(let i of e)if(!Reflect.has(t,i)||t[i]===void 0)return!1;return!0}a(kA,"hasKeys");async function*Ng(t){let e=t.getReader();try{for(;;){let{done:i,value:r}=await e.read();if(i)return;yield r}}finally{e.releaseLock()}}a(Ng,"streamToIterable");var ZM=a((t,e)=>{let i=typeof t=="string"?new URL(t):t instanceof URL?t:new URL(t.url),r=e?.headers?new Headers(e.headers):t instanceof Request?t.headers:new Headers,o=[...r],s=e?.body?typeof e.body=="string"?r.get("content-type")==="application/json"?JSON.stringify(JSON.parse(e.body),null,2):e.body:" <binary>":" (none)",l=o.length>0?`${o.map(([c,u])=>` ${c}: ${u}`).join(`
`)}`:" (none)";return wo(QM,`Fetch:
url: ${i.toString()}
method: ${e?.method||"GET"}
headers:
${l}
' +
' body:
${s}`),ve.shim.fetch(t,e)},"debugFetch");function nt(t){return btoa(String.fromCharCode.apply(null,Array.from(t)))}a(nt,"u8ToBase64");function Ia(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),i=e.padEnd(e.length+(4-e.length%4)%4,"=");return new Uint8Array(atob(i).split("").map(r=>r.charCodeAt(0)))}a(Ia,"base64ToU8");function ct(t){return!("emoji"in t)}a(ct,"isTextRun");function Fg(t,e,i=!1){let r=i?`(^|\\s?)\\b${e}\\b=([^;]+)`:`(^|s?)${e}=([^;]+)`,o=t.match(new RegExp(r));return o?o[2]:void 0}a(Fg,"getCookie");function Ug(t,e,i){return`function process(n = "", sp = "", s = "") {
const mockStreamingURL = "https://ytjs.googlevideo.com/videoplayback?expire=1234567890&"+"n="+encodeURIComponent(n);
const urlCtorFunction = exportedVars.nsigFunction || (() => { throw new Error('No n/sig decipher function extracted') });
const urlCtor = urlCtorFunction(mockStreamingURL, sp, s);
const proto = Object.getPrototypeOf(urlCtor);
const properties = Object.getOwnPropertyNames(proto);
const methodBlacklist = ['constructor', 'clone', 'set', 'get'];
for (const prop of properties) {
if (methodBlacklist.includes(prop))
continue;
if (typeof urlCtor[prop] === 'function')
urlCtor[prop]();
}
const sigResult = urlCtor.get(sp);
const nResult = urlCtor.get('n');
return {
sig: sigResult ? decodeURIComponent(sigResult) : undefined,
n: nResult ? decodeURIComponent(nResult) : undefined
};
}
return process("${t||""}", "${e||""}", "${i||""}");`}a(Ug,"getNsigProcessorFn");async function CA(t){let e=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];function i(r){let o=new Uint8Array(r),s=[];for(let l=0;l<o.length;++l)s.push(e[o[l]]);return s.join("")}return a(i,"hex"),i(await crypto.subtle.digest("SHA-1",new TextEncoder().encode(t)))}a(CA,"sha1Hash");function TA(t,e){throw new Error("To decipher URLs, you must provide your own JavaScript evaluator. See https://ytjs.dev/guide/getting-started.html#providing-a-custom-javascript-interpreter for more details.")}a(TA,"evaluate");var _r,SA,IA,EA=class{constructor(e){M(this,_r),n(this,"session"),this.session=e}async stats(e,i,r){let o=new URL(e);o.searchParams.set("ver","2"),o.searchParams.set("c",i.client_name.toLowerCase()),o.searchParams.set("cbrver",i.client_version),o.searchParams.set("cver",i.client_version);for(let s of Object.keys(r))o.searchParams.set(s,r[s]);return await this.session.http.fetch(o)}async execute(e,i){var r,o;let s;if(i&&!i.protobuf){if(s={...i},Reflect.has(s,"browseId")&&!i.skip_auth_check&&F(this,_r,IA).call(this,s.browseId)&&!this.session.logged_in)throw new w("You must be signed in to perform this operation.");Reflect.has(s,"skip_auth_check")&&delete s.skip_auth_check,Reflect.has(s,"override_endpoint")&&delete s.override_endpoint,Reflect.has(s,"parse")&&delete s.parse,Reflect.has(s,"request")&&delete s.request,Reflect.has(s,"clientActions")&&delete s.clientActions,Reflect.has(s,"settingItemIdForClient")&&delete s.settingItemIdForClient,Reflect.has(s,"action")&&(s.actions=[s.action],delete s.action),Reflect.has(s,"boolValue")&&(s.newValue={boolValue:s.boolValue},delete s.boolValue),Reflect.has(s,"token")&&(s.continuation=s.token,delete s.token),s?.client==="YTMUSIC"&&(s.isAudioOnly=!0)}else i&&(s=i.serialized_data);let l=Reflect.has(i||{},"override_endpoint")?i?.override_endpoint:e,c=await this.session.http.fetch(l,{method:"POST",body:i?.protobuf?s:JSON.stringify(s||{}),headers:{"Content-Type":i?.protobuf?"application/x-protobuf":"application/json"}});if(i?.parse){let u=v.parseResponse(await c.json());if(F(this,_r,SA).call(this,u)&&((o=(r=u.on_response_received_actions)==null?void 0:r[0])==null?void 0:o.type)==="navigateAction"){let d=u.on_response_received_actions.firstOfType(pg);d&&(u=await d.endpoint.call(this,{parse:!0}))}return u}return{success:c.ok,status_code:c.status,data:await c.json()}}};_r=new WeakSet;SA=a(function(t){return"on_response_received_actions"in t},"#isBrowse");IA=a(function(t){return["FElibrary","FEhistory","FEsubscriptions","FEchannels","FEplaylist_aggregation","FEmusic_listening_review","FEmusic_library_landing","SPaccount_overview","SPaccount_notifications","SPaccount_privacy","SPtime_watched"].includes(t)},"#needsLogin");a(EA,"Actions");var eR=EA,Es="OAuth2",et,Fi,AA,Xn,xA=class{constructor(e){M(this,Fi),M(this,et),n(this,"YTTV_URL"),n(this,"AUTH_SERVER_CODE_URL"),n(this,"AUTH_SERVER_TOKEN_URL"),n(this,"AUTH_SERVER_REVOKE_TOKEN_URL"),n(this,"client_id"),n(this,"oauth2_tokens"),P(this,et,e),this.YTTV_URL=new URL("/tv",he.URLS.YT_BASE),this.AUTH_SERVER_CODE_URL=new URL("/o/oauth2/device/code",he.URLS.YT_BASE),this.AUTH_SERVER_TOKEN_URL=new URL("/o/oauth2/token",he.URLS.YT_BASE),this.AUTH_SERVER_REVOKE_TOKEN_URL=new URL("/o/oauth2/revoke",he.URLS.YT_BASE)}async init(e){if(e){this.setTokens(e),this.shouldRefreshToken()&&await this.refreshAccessToken(),h(this,et).emit("auth",{credentials:this.oauth2_tokens});return}if(await F(this,Fi,AA).call(this)){X.info(Es,"Loaded OAuth2 tokens from cache.",this.oauth2_tokens);return}this.client_id||(this.client_id=await this.getClientID());let r=await this.getDeviceAndUserCode();h(this,et).emit("auth-pending",r),this.pollForAccessToken(r)}setTokens(e){let i=e;if(i.expires_in&&(i.expiry_date=new Date(Date.now()+i.expires_in*1e3).toISOString(),delete i.expires_in),!this.validateTokens(i))throw new ze("Invalid tokens provided.");this.oauth2_tokens=i,i.client&&(X.info(Es,"Using provided client id and secret."),this.client_id=i.client)}async cacheCredentials(){var e;let r=new TextEncoder().encode(JSON.stringify(this.oauth2_tokens));await((e=h(this,et).cache)==null?void 0:e.set("youtubei_oauth_credentials",r.buffer))}async removeCache(){var e;await((e=h(this,et).cache)==null?void 0:e.remove("youtubei_oauth_credentials"))}pollForAccessToken(e){if(!this.client_id)throw new ze("Client ID is missing.");let{device_code:i,interval:r}=e,{client_id:o,client_secret:s}=this.client_id,l={client_id:o,client_secret:s,code:i,grant_type:"http://oauth.net/grant_type/device/1.0"},c=setInterval(async()=>{let d=await(await h(this,Fi,Xn).fetch_function(this.AUTH_SERVER_TOKEN_URL,{body:JSON.stringify(l),method:"POST",headers:{"Content-Type":"application/json"}})).json();if(d.error){switch(d.error){case"access_denied":h(this,et).emit("auth-error",new ze("Access was denied.",d)),clearInterval(c);break;case"expired_token":h(this,et).emit("auth-error",new ze("The device code has expired.",d)),clearInterval(c);break;case"authorization_pending":case"slow_down":X.info(Es,"Polling for access token...");break;default:h(this,et).emit("auth-error",new ze("Server returned an unexpected error.",d)),clearInterval(c);break}return}this.setTokens(d),h(this,et).emit("auth",{credentials:this.oauth2_tokens}),clearInterval(c)},r*1e3)}async revokeCredentials(){if(!this.oauth2_tokens)throw new ze("Access token not found");await this.removeCache();let e=this.AUTH_SERVER_REVOKE_TOKEN_URL;return e.searchParams.set("token",this.oauth2_tokens.access_token),h(this,et).http.fetch_function(e,{method:"POST"})}async refreshAccessToken(){if(this.client_id||(this.client_id=await this.getClientID()),!this.oauth2_tokens)throw new ze("No tokens available to refresh.");let{client_id:e,client_secret:i}=this.client_id,{refresh_token:r}=this.oauth2_tokens,o={client_id:e,client_secret:i,refresh_token:r,grant_type:"refresh_token"},s=await h(this,Fi,Xn).fetch_function(this.AUTH_SERVER_TOKEN_URL,{body:JSON.stringify(o),method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok)throw new ze(`Failed to refresh access token: ${s.status}`);let l=await s.json();if(l.error_code)throw new ze("Authorization server returned an error",l);this.oauth2_tokens.access_token=l.access_token,this.oauth2_tokens.expiry_date=new Date(Date.now()+l.expires_in*1e3).toISOString(),h(this,et).emit("update-credentials",{credentials:this.oauth2_tokens})}async getDeviceAndUserCode(){if(!this.client_id)throw new ze("Client ID is missing.");let{client_id:e}=this.client_id,i={client_id:e,scope:"http://gdata.youtube.com https://www.googleapis.com/auth/youtube-paid-content",device_id:ve.shim.uuidv4(),device_model:"ytlr::"},r=await h(this,Fi,Xn).fetch_function(this.AUTH_SERVER_CODE_URL,{body:JSON.stringify(i),method:"POST",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new ze(`Failed to get device/user code: ${r.status}`);let o=await r.json();if(o.error_code)throw new ze("Authorization server returned an error",o);return o}async getClientID(){let e=await h(this,Fi,Xn).fetch_function(this.YTTV_URL,{headers:{"User-Agent":"Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version",Referer:"https://www.youtube.com/tv","Accept-Language":"en-US"}});if(!e.ok)throw new ze(`Failed to get client ID: ${e.status}`);let i=await e.text(),r;if((r=he.OAUTH.REGEX.TV_SCRIPT.exec(i))!==null){X.info(Es,`Got YouTubeTV script URL (${r[1]})`);let o=await h(this,Fi,Xn).fetch(r[1],{baseURL:he.URLS.YT_BASE});if(!o.ok)throw new ze(`TV script request failed with status code ${o.status}`);let l=(await o.text()).match(he.OAUTH.REGEX.CLIENT_IDENTITY);if(!l||!l.groups)throw new ze("Could not obtain client ID.");let{client_id:c,client_secret:u}=l.groups;return X.info(Es,`Client identity retrieved (clientId=${c}, clientSecret=${u}).`),{client_id:c,client_secret:u}}throw new ze("Could not obtain script URL.")}shouldRefreshToken(){return this.oauth2_tokens?Date.now()>new Date(this.oauth2_tokens.expiry_date).getTime():!1}validateTokens(e){return!(!e.access_token||!e.refresh_token||!e.expiry_date)}};et=new WeakMap;Fi=new WeakSet;AA=a(async function(){var t;let e=await((t=h(this,et).cache)==null?void 0:t.get("youtubei_oauth_credentials"));if(!e)return!1;let i=new TextDecoder,r=JSON.parse(i.decode(e));return this.setTokens(r),h(this,et).emit("auth",{credentials:r}),!0},"#loadFromCache");Xn=a(function(){return h(this,et).http},"#http");a(xA,"OAuth2");var tR=xA,Rt="Player",PA=class zs{constructor(e,i,r){n(this,"player_id"),n(this,"signature_timestamp"),n(this,"data"),n(this,"po_token"),this.player_id=e,this.signature_timestamp=i,this.data=r}static async create(e,i=ve.shim.fetch,r,o){var s;if(!o){let k=new URL("/iframe_api",he.URLS.YT_BASE),A=await i(k);if(!A.ok)throw new Ni(`Failed to get player id: ${A.status} (${A.statusText})`);let I=await A.text();o=$t(I,"player\\/","\\/")}if(X.info(Rt,`Using player id (${o}). Checking for cached players..`),!o)throw new Ni("Failed to get player id");if(e){let k=await zs.fromCache(e,o);if(k)return X.info(Rt,"Found up-to-date player data in cache."),k.po_token=r,k}let l=new URL(`/s/player/${o}/player_es6.vflset/en_US/base.js`,he.URLS.YT_BASE);X.info(Rt,`Could not find any cached player. Will download a new player from ${l}.`);let c=await i(l,{headers:{"user-agent":Sa("desktop")}});if(!c.ok)throw new Ni(`Failed to get player data: ${c.status}`);let u=await c.text(),d="nsigFunction",p="signatureTimestampVar",_=[{friendlyName:d,match:cc},{friendlyName:p,match:uc,collectDependencies:!1}],b=new _P(u,{extractions:_}),C=new pP(b).buildScript({disallowSideEffectInitializers:!0,exportRawValues:!0,rawValueOnly:[p]});C.exportedRawValues&&!(p in C.exportedRawValues)&&X.warn(Rt,"Failed to extract signature timestamp."),C.exported.includes(d)||X.warn(Rt,"Failed to extract n/sig decipher function.");let T=(s=C.exportedRawValues)==null?void 0:s[p],S=await zs.fromSource(o,{cache:e,signature_timestamp:parseInt(T)||0,data:C});return S.po_token=r,S}async decipher(e,i,r,o){if(e=e||i||r,!e)throw new Ni("No valid URL to decipher");let s=new URLSearchParams(e),l=new URL(s.get("url")||e),c=l.searchParams.get("n"),u=s.get("s"),d=s.get("sp");if(this.data&&(i||r||c)){let b={};if((i||r)&&(b.sig=u,b.sp=d),c)if(o?.has(c)){let g=o.get(c);l.searchParams.set("n",g)}else b.n=c;if(Object.keys(b).length>0){let g={...this.data};g.output=`${g.output}
${Ug(b.n,b.sp,b.sig)}`;let C=await ve.shim.eval(g,b);if(typeof C!="object"||C===null)throw new Ni("Got invalid result from player script evaluation.");if(typeof b.sig=="string"){let T=C.sig;if(X.info(Rt,`Transformed signature from ${u} to ${T}.`),typeof T!="string")throw new Ni("Got invalid signature from player script evaluation.");d?l.searchParams.set(d,T):l.searchParams.set("signature",T)}if(typeof b.n=="string"){let T=C.n;if(X.info(Rt,`Transformed n from ${c} to ${T}.`),typeof T!="string")throw new Ni("Failed to decipher nsig");T.startsWith("enhanced_except_")?X.warn(Rt,`Decipher script returned an error (n=${c}):`,T):o&&o.set(c,T),l.searchParams.set("n",T)}}}switch(l.searchParams.get("sabr")!=="1"&&this.po_token&&l.searchParams.set("pot",this.po_token),l.searchParams.get("c")){case"WEB":l.searchParams.set("cver",he.CLIENTS.WEB.VERSION);break;case"MWEB":l.searchParams.set("cver",he.CLIENTS.MWEB.VERSION);break;case"WEB_REMIX":l.searchParams.set("cver",he.CLIENTS.YTMUSIC.VERSION);break;case"WEB_KIDS":l.searchParams.set("cver",he.CLIENTS.WEB_KIDS.VERSION);break;case"TVHTML5":l.searchParams.set("cver",he.CLIENTS.TV.VERSION);break;case"TVHTML5_SIMPLY":l.searchParams.set("cver",he.CLIENTS.TV_SIMPLY.VERSION);break;case"TVHTML5_SIMPLY_EMBEDDED_PLAYER":l.searchParams.set("cver",he.CLIENTS.TV_EMBEDDED.VERSION);break;case"WEB_EMBEDDED_PLAYER":l.searchParams.set("cver",he.CLIENTS.WEB_EMBEDDED.VERSION);break}let _=l.toString();return X.info(Rt,`Deciphered URL: ${_}`),l.toString()}static async fromCache(e,i){let r=await e.get(i);if(!r)return null;try{let o=co.deserialize(new Uint8Array(r));return o.libraryVersion!==jt.version?(X.warn(Rt,`Cached player data is from a different library version (${o.libraryVersion}). Ignoring it.`),null):new zs(o.playerId,o.signatureTimestamp,o.data)}catch(o){return X.error(Rt,"Failed to deserialize player data from cache:",o),null}}static async fromSource(e,i){let r=new zs(e,i.signature_timestamp,i.data);return await r.cache(i.cache),r}async cache(e){if(!e||!this.data)return;let i=co.serialize({playerId:this.player_id,signatureTimestamp:this.signature_timestamp,libraryVersion:jt.version,data:this.data});await e.set(this.player_id,i)}get url(){return new URL(`/s/player/${this.player_id}/player_ias.vflset/en_US/base.js`,he.URLS.YT_BASE).toString()}static get LIBRARY_VERSION(){return 14}};a(PA,"Player");var iR=PA,nR={WEB:"WEB",MWEB:"MWEB",KIDS:"WEB_KIDS",MUSIC:"WEB_REMIX",IOS:"iOS",ANDROID:"ANDROID",ANDROID_VR:"ANDROID_VR",ANDROID_MUSIC:"ANDROID_MUSIC",ANDROID_CREATOR:"ANDROID_CREATOR",TV:"TVHTML5",TV_SIMPLY:"TVHTML5_SIMPLY",TV_EMBEDDED:"TVHTML5_SIMPLY_EMBEDDED_PLAYER",WEB_EMBEDDED:"WEB_EMBEDDED_PLAYER",WEB_CREATOR:"WEB_CREATOR"},ni="Session",ls,MA,RA,DA,BA,Hg=class Ll extends R1{constructor(e,i,r,o,s,l,c,u,d,p){super(),n(this,"context"),n(this,"api_key"),n(this,"api_version"),n(this,"account_index"),n(this,"config_data"),n(this,"player"),n(this,"cookie"),n(this,"cache"),n(this,"po_token"),n(this,"oauth"),n(this,"http"),n(this,"logged_in"),n(this,"actions"),n(this,"user_agent"),this.context=e,this.api_key=i,this.api_version=r,this.account_index=o,this.config_data=s,this.player=l,this.cookie=c,this.cache=d,this.po_token=p,this.http=new v6(this,c,u),this.actions=new eR(this),this.oauth=new tR(this),this.logged_in=!!c,this.user_agent=e.client.userAgent}on(e,i){super.on(e,i)}once(e,i){super.once(e,i)}static async create(e={}){let{context:i,api_key:r,api_version:o,account_index:s,config_data:l}=await Ll.getSessionData(e.lang,e.location,e.account_index,e.visitor_data,e.user_agent,e.enable_safety_mode,e.generate_session_locally,e.fail_fast,e.device_category,e.client_type,e.timezone,e.fetch,e.on_behalf_of_user,e.cache,e.enable_session_cache,e.po_token,e.retrieve_innertube_config);return new Ll(i,r,o,s,l,e.retrieve_player===!1?void 0:await iR.create(e.cache,e.fetch,e.po_token,e.player_id),e.cookie,e.fetch,e.cache,e.po_token)}static async fromCache(e,i){let r=await e.get("innertube_session_data");if(!r)return null;try{let o=co.deserialize(new Uint8Array(r));if(o.library_version!==parseInt(jt.version.split(".",1)[0]))return X.warn(ni,`Cached session data is from a different library version (${o.library_version}). Regenerating session data.`),null;if(i.visitor_data&&(o.context.client.visitorData=i.visitor_data),i.lang&&(o.context.client.hl=i.lang),i.location&&(o.context.client.gl=i.location),i.on_behalf_of_user&&(o.context.user.onBehalfOfUser=i.on_behalf_of_user),i.user_agent&&(o.context.client.userAgent=i.user_agent),i.client_name){let s=Object.values(z).find(l=>l.NAME===i.client_name);s?(o.context.client.clientName=s.NAME,o.context.client.clientVersion=s.VERSION):X.warn(ni,`Unknown client name: ${i.client_name}.`)}return o.context.client.timeZone=i.time_zone,o.context.client.platform=i.device_category.toUpperCase(),o.context.user.enableSafetyMode=i.enable_safety_mode,o}catch(o){return X.error(ni,"Failed to deserialize session data from cache.",o),null}}static async getSessionData(e="",i="",r=0,o="",s=Sa("desktop"),l=!1,c=!1,u=!1,d="desktop",p=nR.WEB,_=Intl.DateTimeFormat().resolvedOptions().timeZone,b=ve.shim.fetch,g,C,T=!0,S,k=!0){var A,I,D,H,j,W,q,N,R;let K={lang:e,location:i,time_zone:_,user_agent:s,device_category:d,client_name:p,enable_safety_mode:l,visitor_data:o,on_behalf_of_user:g,po_token:S},Y;if(C&&T){let we=await this.fromCache(C,K);we&&(X.info(ni,"Found session data in cache."),Y=we)}if(!Y){X.info(ni,"Generating session data.");let we=z.WEB.API_KEY,_e=z.WEB.API_VERSION,ce={hl:e||"en",gl:i||"US",remote_host:"",user_agent:s,visitor_data:o||ic.encodeVisitorData(li(11),Math.floor(Date.now()/1e3)),client_name:p,client_version:(I=(A=Object.values(z).find(G=>G.NAME===p))==null?void 0:A.VERSION)!=null?I:z.WEB.VERSION,device_category:d.toUpperCase(),os_name:"Windows",os_version:"10.0",time_zone:_,browser_name:"Chrome",browser_version:"125.0.0.0",device_make:"",device_model:"",enable_safety_mode:l};if(!c)try{let G=await F(this,ls,RA).call(this,K,b);we=G.api_key,_e=G.api_version,ce=G.context_data}catch(G){if(u)throw G;X.error(ni,"Failed to retrieve session data from server. Session data generated locally will be used instead.",G)}if(g&&(ce.on_behalf_of_user=g),Y={api_key:we,api_version:_e,context:F(this,ls,DA).call(this,ce)},k)try{X.info(ni,"Retrieving InnerTube config data.");let G={"Accept-Language":e,Accept:"*/*",Referer:st.YT_BASE,"X-Goog-Visitor-Id":ce.visitor_data,"X-Origin":st.YT_BASE,"X-Youtube-Client-Version":ce.client_version};ve.shim.server&&(G["User-Agent"]=s,G.Origin=st.YT_BASE);let pe=await(await b(`${st.API.PRODUCTION_1}v1/config?prettyPrint=false`,{headers:G,method:"POST",body:JSON.stringify({context:Y.context})})).json(),ae=(j=(H=(D=pe.responseContext)==null?void 0:D.globalConfigGroup)==null?void 0:H.rawColdConfigGroup)==null?void 0:j.configData,Ie=(q=(W=pe.responseContext)==null?void 0:W.globalConfigGroup)==null?void 0:q.coldHashData,J=(R=(N=pe.responseContext)==null?void 0:N.globalConfigGroup)==null?void 0:R.hotHashData;Y.config_data=pe.configData,Y.context.client.configInfo={...Y.context.client.configInfo,coldConfigData:ae,coldHashData:Ie,hotHashData:J}}catch(G){X.error(ni,"Failed to retrieve config data.",G)}T&&await F(this,ls,MA).call(this,Y,C)}return X.debug(ni,"Session data:",Y),{...Y,account_index:r}}async signIn(e){return new Promise(async(i,r)=>{let o=a(s=>r(s),"error_handler");this.once("auth-error",o),this.once("auth",()=>{this.off("auth-error",o),this.logged_in=!0,i()});try{await this.oauth.init(e)}catch(s){r(s)}})}async signOut(){if(!this.logged_in)throw new w("You must be signed in to perform this operation.");let e=await this.oauth.revokeCredentials();return this.logged_in=!1,e}get client_version(){return this.context.client.clientVersion}get client_name(){return this.context.client.clientName}get lang(){return this.context.client.hl}};ls=new WeakSet;MA=a(async function(t,e){if(!e)return;X.info(ni,"Compressing and caching session data.");let i=co.serialize({...t,library_version:parseInt(jt.version.split(".",1)[0])});await e.set("innertube_session_data",i)},"#storeSession");RA=a(async function(t,e=ve.shim.fetch){var i;let r=li(11);t.visitor_data&&(r=F(this,ls,BA).call(this,t.visitor_data));let o=new URL("/sw.js_data",st.YT_BASE),s=await e(o,{headers:{"Accept-Language":t.lang||"en-US","User-Agent":t.user_agent,Accept:"*/*",Referer:`${st.YT_BASE}/sw.js`,Cookie:`PREF=tz=${t.time_zone.replace("/",".")};VISITOR_INFO1_LIVE=${r};`}});if(!s.ok)throw new Bl(`Failed to retrieve session data: ${s.status}`);let l=await s.text();if(!l.startsWith(")]}'"))throw new Bl("Invalid JSPB response");let u=JSON.parse(l.replace(/^\)\]\}'/,""))[0][2],d=z.WEB.API_VERSION,[[p],_]=u,b=p[61],g=b[b.length-1];return{context_data:{hl:t.lang||p[0],gl:t.location||p[1],remote_host:p[3],visitor_data:t.visitor_data||p[13],user_agent:t.user_agent,client_name:t.client_name,client_version:t.client_name==="WEB"?p[16]:((i=Object.values(z).find(T=>T.NAME===t.client_name))==null?void 0:i.VERSION)||p[16],os_name:p[17],os_version:p[18],time_zone:p[79]||t.time_zone,device_category:t.device_category,browser_name:p[86],browser_version:p[87],device_make:p[11],device_model:p[12],app_install_data:g,device_experiment_id:p[103],rollout_token:p[107],enable_safety_mode:t.enable_safety_mode},api_key:_,api_version:d}},"#getSessionData");DA=a(function(t){let e={client:{hl:t.hl||"en",gl:t.gl||"US",remoteHost:t.remote_host,screenDensityFloat:1,screenHeightPoints:1440,screenPixelDensity:1,screenWidthPoints:2560,visitorData:t.visitor_data,clientName:t.client_name,clientVersion:t.client_version,osName:t.os_name,osVersion:t.os_version,userAgent:t.user_agent,platform:t.device_category.toUpperCase(),clientFormFactor:"UNKNOWN_FORM_FACTOR",userInterfaceTheme:"USER_INTERFACE_THEME_LIGHT",timeZone:t.time_zone,originalUrl:st.YT_BASE,deviceMake:t.device_make,deviceModel:t.device_model,browserName:t.browser_name,browserVersion:t.browser_version,utcOffsetMinutes:-Math.floor(new Date().getTimezoneOffset()),memoryTotalKbytes:"8000000",rolloutToken:t.rollout_token,deviceExperimentId:t.device_experiment_id,mainAppWebInfo:{graftUrl:st.YT_BASE,pwaInstallabilityStatus:"PWA_INSTALLABILITY_STATUS_UNKNOWN",webDisplayMode:"WEB_DISPLAY_MODE_BROWSER",isWebNativeShareAvailable:!0}},user:{enableSafetyMode:t.enable_safety_mode,lockedSafetyMode:!1},request:{useSsl:!0,internalExperimentFlags:[]}};return t.app_install_data&&(e.client.configInfo={appInstallData:t.app_install_data}),t.on_behalf_of_user&&(e.user.onBehalfOfUser=t.on_behalf_of_user),e},"#buildContext");BA=a(function(t){return ic.decodeVisitorData(t).id},"#getVisitorID");M(Hg,ls);a(Hg,"Session");var sR=Hg,oR={};Ne(oR,{Kids:()=>VA,Music:()=>FA,Studio:()=>jx});var Wt,LA=class{constructor(e){M(this,Wt),P(this,Wt,e)}async search(e){let r=await new y({searchEndpoint:{query:e}}).call(h(this,Wt).actions,{client:"YTKIDS"});return new rA(h(this,Wt).actions,r)}async getInfo(e,i){var r;let o={videoId:e},s=new y({watchEndpoint:o}),l=new y({watchNextEndpoint:o}),c=h(this,Wt),u={playbackContext:{contentPlaybackContext:{vis:0,splay:!1,lactMilliseconds:"-1",signatureTimestamp:(r=c.player)==null?void 0:r.signature_timestamp}},client:"YTKIDS"};i?.po_token?u.serviceIntegrityDimensions={poToken:i.po_token}:c.po_token&&(u.serviceIntegrityDimensions={poToken:c.po_token});let d=s.call(c.actions,u),p=l.call(c.actions,{client:"YTKIDS"}),_=await Promise.all([d,p]),b=li(16);return new lA(_,c.actions,b)}async getChannel(e){let r=await new y({browseEndpoint:{browseId:e}}).call(h(this,Wt).actions,{client:"YTKIDS"});return new tA(h(this,Wt).actions,r)}async getHomeFeed(){let i=await new y({browseEndpoint:{browseId:"FEkids_home"}}).call(h(this,Wt).actions,{client:"YTKIDS"});return new sA(h(this,Wt).actions,i)}async blockChannel(e){var i,r;let o=h(this,Wt);if(!o.logged_in)throw new w("You must be signed in to perform this operation.");let u={contents:(await new y({getKidsBlocklistPickerCommand:{blockedForKidsContent:{external_channel_id:e}}}).call(o.actions,{client:"YTKIDS"})).data.command.confirmDialogEndpoint.content,engagementPanels:[]},p=(i=v.parseResponse(u).contents_memo)==null?void 0:i.getType(tg);if(!p)throw new w("Could not find any kids profiles or supervised accounts.");let _=[];for(let b of p)(r=b.block_button)!=null&&r.is_toggled||(b.setActions(o.actions),_.push(await b.blockChannel()));return _}};Wt=new WeakMap;a(LA,"Kids");var VA=LA,Ei,me,Qn,OA,pr,NA=class{constructor(e){M(this,Qn),M(this,Ei),M(this,me),P(this,Ei,e),P(this,me,e.actions)}getInfo(e,i){var r,o,s;return e instanceof Y2?F(this,Qn,pr).call(this,e.endpoint,i):e instanceof Ki?F(this,Qn,pr).call(this,(s=(o=(r=e.overlay)==null?void 0:r.content)==null?void 0:o.endpoint)!=null?s:e.endpoint,i):e instanceof y?F(this,Qn,pr).call(this,e,i):F(this,Qn,OA).call(this,e,i)}async search(e,i={}){se({query:e});let r;if(i.type&&i.type!=="all"){let l=Aw.encode({filters:{musicSearchType:{[i.type]:!0}}});r=encodeURIComponent(nt(l.finish()))}let s=await new y({searchEndpoint:{query:e,params:r}}).call(h(this,me),{client:"YTMUSIC"});return new $E(s,h(this,me),Reflect.has(i,"type")&&i.type!=="all")}async getHomeFeed(){let i=await new y({browseEndpoint:{browseId:"FEmusic_home"}}).call(h(this,me),{client:"YTMUSIC"});return new VE(i,h(this,me))}async getExplore(){let i=await new y({browseEndpoint:{browseId:"FEmusic_explore"}}).call(h(this,me),{client:"YTMUSIC"});return new BE(i)}async getLibrary(){let i=await new y({browseEndpoint:{browseId:"FEmusic_library_landing"}}).call(h(this,me),{client:"YTMUSIC"});return new FE(i,h(this,me))}async getArtist(e){if(!e||!e.startsWith("UC")&&!e.startsWith("FEmusic_library_privately_owned_artist"))throw new w("Invalid artist id",e);let r=await new y({browseEndpoint:{browseId:e}}).call(h(this,me),{client:"YTMUSIC"});return new RE(r,h(this,me))}async getAlbum(e){if(!e||!e.startsWith("MPR")&&!e.startsWith("FEmusic_library_privately_owned_release"))throw new w("Invalid album id",e);let r=await new y({browseEndpoint:{browseId:e}}).call(h(this,me),{client:"YTMUSIC"});return new PE(r)}async getPlaylist(e){e.startsWith("VL")||(e=`VL${e}`);let r=await new y({browseEndpoint:{browseId:e}}).call(h(this,me),{client:"YTMUSIC"});return new Bg(r,h(this,me))}async getUpNext(e,i=!0){var r,o,s;se({video_id:e});let u=(r=(await new y({watchNextEndpoint:{videoId:e}}).call(h(this,me),{client:"YTMUSIC",parse:!0})).contents_memo)==null?void 0:r.getType(kt),d=u?.[0];if(!d)throw new w("Could not find target tab.");let p=(o=d.content)==null?void 0:o.as(d0);if(!p||!p.content)throw new w("Music queue was empty, the given id is probably invalid.",p);let _=p.content.as(Cn);if(!_.playlist_id&&i){let b=_.contents.firstOfType(oa);if(!b)throw new w("Automix item not found");let g=await((s=b.playlist_video)==null?void 0:s.endpoint.call(h(this,me),{videoId:e,client:"YTMUSIC",parse:!0}));if(!g||!g.contents_memo)throw new w("Could not fetch automix");return g.contents_memo.getType(Cn)[0]}return _}async getRelated(e){var i;se({video_id:e});let s=(i=(await new y({watchNextEndpoint:{videoId:e}}).call(h(this,me),{client:"YTMUSIC",parse:!0})).contents_memo)==null?void 0:i.getType(kt),l=s?.find(u=>{var d,p;return((p=(d=u.endpoint.payload.browseEndpointContextSupportedConfigs)==null?void 0:d.browseEndpointContextMusicConfig)==null?void 0:p.pageType)==="MUSIC_PAGE_TYPE_TRACK_RELATED"});if(!l)throw new w("Could not find target tab.");let c=await l.endpoint.call(h(this,me),{client:"YTMUSIC",parse:!0});if(!c.contents)throw new w("Unexpected response",c);return c.contents.item().as(Ae,ui)}async getLyrics(e){var i;se({video_id:e});let s=(i=(await new y({watchNextEndpoint:{videoId:e}}).call(h(this,me),{client:"YTMUSIC",parse:!0})).contents_memo)==null?void 0:i.getType(kt),l=s?.find(d=>{var p,_;return((_=(p=d.endpoint.payload.browseEndpointContextSupportedConfigs)==null?void 0:p.browseEndpointContextMusicConfig)==null?void 0:_.pageType)==="MUSIC_PAGE_TYPE_TRACK_LYRICS"});if(!l)throw new w("Could not find target tab.");let c=await l.endpoint.call(h(this,me),{client:"YTMUSIC",parse:!0});if(!c.contents)throw new w("Unexpected response",c);if(c.contents.item().type==="Message")throw new w(c.contents.item().as(ui).text.toString(),e);return c.contents.item().as(Ae).contents.firstOfType(_a)}async getRecap(){let i=await new y({browseEndpoint:{browseId:"FEmusic_listening_review"}}).call(h(this,me),{client:"YTMUSIC"});return new YE(i,h(this,me))}async getSearchSuggestions(e){let i=await h(this,me).execute("/music/get_search_suggestions",{input:e,client:"YTMUSIC",parse:!0});return i.contents_memo?i.contents_memo.getType(KI):[]}};Ei=new WeakMap;me=new WeakMap;Qn=new WeakSet;OA=a(async function(t,e){var i;let r={videoId:t,racyCheckOk:!0,contentCheckOk:!0},o=new y({watchEndpoint:r}),s=new y({watchNextEndpoint:r}),l={playbackContext:{contentPlaybackContext:{vis:0,splay:!1,lactMilliseconds:"-1",signatureTimestamp:(i=h(this,Ei).player)==null?void 0:i.signature_timestamp}},client:"YTMUSIC"};e?.po_token?l.serviceIntegrityDimensions={poToken:e.po_token}:h(this,Ei).po_token&&(l.serviceIntegrityDimensions={poToken:h(this,Ei).po_token});let c=o.call(h(this,me),l),u=s.call(h(this,me),{client:"YTMUSIC"}),d=await Promise.all([c,u]),p=li(16);return new Lg(d,h(this,me),p)},"#fetchInfoFromVideoId");pr=a(async function(t,e){var i;if(!t)throw new Error("This item does not have an endpoint.");let r={playbackContext:{contentPlaybackContext:{vis:0,splay:!1,lactMilliseconds:"-1",signatureTimestamp:(i=h(this,Ei).player)==null?void 0:i.signature_timestamp}},client:"YTMUSIC"};e?.po_token?r.serviceIntegrityDimensions={poToken:e.po_token}:h(this,Ei).po_token&&(r.serviceIntegrityDimensions={poToken:h(this,Ei).po_token});let o=t.call(h(this,me),r),s=t.call(h(this,me),{client:"YTMUSIC",enablePersistentPlaylistPanel:!0,override_endpoint:"/next"}),l=li(16),c=await Promise.all([o,s]);return new Lg(c,h(this,me),l)},"#fetchInfoFromEndpoint");a(NA,"Music");var FA=NA;function UA(){return{profile:void 0,supportedCapabilities:[],disabledCapabilities:[],snapshot:void 0}}a(UA,"createBaseCapabilityInfo");var Cy={encode(t,e=new O){t.profile!==void 0&&e.uint32(10).string(t.profile);for(let i of t.supportedCapabilities)Wo.encode(i,e.uint32(18).fork()).join();for(let i of t.disabledCapabilities)Wo.encode(i,e.uint32(26).fork()).join();return t.snapshot!==void 0&&e.uint32(42).string(t.snapshot),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=UA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.profile=i.string();continue}case 2:{if(s!==18)break;o.supportedCapabilities.push(Wo.decode(i,i.uint32()));continue}case 3:{if(s!==26)break;o.disabledCapabilities.push(Wo.decode(i,i.uint32()));continue}case 5:{if(s!==42)break;o.snapshot=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function HA(){return{capability:void 0,features:void 0,experimentFlags:void 0}}a(HA,"createBaseInnerTubeCapability");var Wo={encode(t,e=new O){return t.capability!==void 0&&e.uint32(8).uint32(t.capability),t.features!==void 0&&e.uint32(16).uint32(t.features),t.experimentFlags!==void 0&&e.uint32(50).string(t.experimentFlags),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=HA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.capability=i.uint32();continue}case 2:{if(s!==16)break;o.features=i.uint32();continue}case 6:{if(s!==50)break;o.experimentFlags=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function WA(){return{hl:void 0,gl:void 0,remoteHost:void 0,deviceId:void 0,debugDeviceIdOverride:void 0,carrierGeo:void 0,crackedHl:void 0,deviceMake:void 0,deviceModel:void 0,visitorData:void 0,userAgent:void 0,clientName:void 0,clientVersion:void 0,osName:void 0,osVersion:void 0,projectId:void 0,acceptLanguage:void 0,acceptRegion:void 0,originalUrl:void 0,rawDeviceId:void 0,configData:void 0,spacecastToken:void 0,internalGeo:void 0,screenWidthPoints:void 0,screenHeightPoints:void 0,screenWidthInches:void 0,screenHeightInches:void 0,screenPixelDensity:void 0,platform:void 0,spacecastClientInfo:void 0,clientFormFactor:void 0,forwardedFor:void 0,mobileDataPlanInfo:void 0,gmscoreVersionCode:void 0,webpSupport:void 0,cameraType:void 0,experimentsToken:void 0,windowWidthPoints:void 0,windowHeightPoints:void 0,configInfo:void 0,unpluggedLocationInfo:void 0,androidSdkVersion:void 0,screenDensityFloat:void 0,firstTimeSignInExperimentIds:void 0,utcOffsetMinutes:void 0,animatedWebpSupport:void 0,kidsAppInfo:void 0,musicAppInfo:void 0,tvAppInfo:void 0,internalGeoIp:void 0,unpluggedAppInfo:void 0,locationInfo:void 0,contentSizeCategory:void 0,fontScale:void 0,userInterfaceTheme:void 0,timeZone:void 0,homeGroupInfo:void 0,emlTemplateContext:void 0,coldAppBundleConfigData:void 0,browserName:void 0,browserVersion:void 0,locationPlayabilityToken:void 0,chipset:void 0,firmwareVersion:void 0,memoryTotalKbytes:void 0,mainAppWebInfo:void 0,notificationPermissionInfo:void 0,deviceBrand:void 0,glDeviceInfo:void 0}}a(WA,"createBaseClientInfo");var qo={encode(t,e=new O){return t.hl!==void 0&&e.uint32(10).string(t.hl),t.gl!==void 0&&e.uint32(18).string(t.gl),t.remoteHost!==void 0&&e.uint32(34).string(t.remoteHost),t.deviceId!==void 0&&e.uint32(50).string(t.deviceId),t.debugDeviceIdOverride!==void 0&&e.uint32(66).string(t.debugDeviceIdOverride),t.carrierGeo!==void 0&&e.uint32(82).string(t.carrierGeo),t.crackedHl!==void 0&&e.uint32(88).bool(t.crackedHl),t.deviceMake!==void 0&&e.uint32(98).string(t.deviceMake),t.deviceModel!==void 0&&e.uint32(106).string(t.deviceModel),t.visitorData!==void 0&&e.uint32(114).string(t.visitorData),t.userAgent!==void 0&&e.uint32(122).string(t.userAgent),t.clientName!==void 0&&e.uint32(128).int32(t.clientName),t.clientVersion!==void 0&&e.uint32(138).string(t.clientVersion),t.osName!==void 0&&e.uint32(146).string(t.osName),t.osVersion!==void 0&&e.uint32(154).string(t.osVersion),t.projectId!==void 0&&e.uint32(162).string(t.projectId),t.acceptLanguage!==void 0&&e.uint32(170).string(t.acceptLanguage),t.acceptRegion!==void 0&&e.uint32(178).string(t.acceptRegion),t.originalUrl!==void 0&&e.uint32(186).string(t.originalUrl),t.rawDeviceId!==void 0&&e.uint32(202).string(t.rawDeviceId),t.configData!==void 0&&e.uint32(218).string(t.configData),t.spacecastToken!==void 0&&e.uint32(250).string(t.spacecastToken),t.internalGeo!==void 0&&e.uint32(274).string(t.internalGeo),t.screenWidthPoints!==void 0&&e.uint32(296).int32(t.screenWidthPoints),t.screenHeightPoints!==void 0&&e.uint32(304).int32(t.screenHeightPoints),t.screenWidthInches!==void 0&&e.uint32(317).float(t.screenWidthInches),t.screenHeightInches!==void 0&&e.uint32(325).float(t.screenHeightInches),t.screenPixelDensity!==void 0&&e.uint32(328).int32(t.screenPixelDensity),t.platform!==void 0&&e.uint32(336).int32(t.platform),t.spacecastClientInfo!==void 0&&Ey.encode(t.spacecastClientInfo,e.uint32(362).fork()).join(),t.clientFormFactor!==void 0&&e.uint32(368).int32(t.clientFormFactor),t.forwardedFor!==void 0&&e.uint32(386).string(t.forwardedFor),t.mobileDataPlanInfo!==void 0&&xy.encode(t.mobileDataPlanInfo,e.uint32(394).fork()).join(),t.gmscoreVersionCode!==void 0&&e.uint32(400).int32(t.gmscoreVersionCode),t.webpSupport!==void 0&&e.uint32(408).bool(t.webpSupport),t.cameraType!==void 0&&e.uint32(416).int32(t.cameraType),t.experimentsToken!==void 0&&e.uint32(434).string(t.experimentsToken),t.windowWidthPoints!==void 0&&e.uint32(440).int32(t.windowWidthPoints),t.windowHeightPoints!==void 0&&e.uint32(448).int32(t.windowHeightPoints),t.configInfo!==void 0&&Py.encode(t.configInfo,e.uint32(498).fork()).join(),t.unpluggedLocationInfo!==void 0&&My.encode(t.unpluggedLocationInfo,e.uint32(506).fork()).join(),t.androidSdkVersion!==void 0&&e.uint32(512).int32(t.androidSdkVersion),t.screenDensityFloat!==void 0&&e.uint32(525).float(t.screenDensityFloat),t.firstTimeSignInExperimentIds!==void 0&&e.uint32(528).int32(t.firstTimeSignInExperimentIds),t.utcOffsetMinutes!==void 0&&e.uint32(536).int32(t.utcOffsetMinutes),t.animatedWebpSupport!==void 0&&e.uint32(544).bool(t.animatedWebpSupport),t.kidsAppInfo!==void 0&&Ry.encode(t.kidsAppInfo,e.uint32(554).fork()).join(),t.musicAppInfo!==void 0&&Vy.encode(t.musicAppInfo,e.uint32(562).fork()).join(),t.tvAppInfo!==void 0&&Oy.encode(t.tvAppInfo,e.uint32(570).fork()).join(),t.internalGeoIp!==void 0&&e.uint32(578).string(t.internalGeoIp),t.unpluggedAppInfo!==void 0&&Fy.encode(t.unpluggedAppInfo,e.uint32(586).fork()).join(),t.locationInfo!==void 0&&Uy.encode(t.locationInfo,e.uint32(594).fork()).join(),t.contentSizeCategory!==void 0&&e.uint32(610).string(t.contentSizeCategory),t.fontScale!==void 0&&e.uint32(621).float(t.fontScale),t.userInterfaceTheme!==void 0&&e.uint32(624).int32(t.userInterfaceTheme),t.timeZone!==void 0&&e.uint32(642).string(t.timeZone),t.homeGroupInfo!==void 0&&Wy.encode(t.homeGroupInfo,e.uint32(650).fork()).join(),t.emlTemplateContext!==void 0&&e.uint32(674).bytes(t.emlTemplateContext),t.coldAppBundleConfigData!==void 0&&e.uint32(682).bytes(t.coldAppBundleConfigData),t.browserName!==void 0&&e.uint32(698).string(t.browserName),t.browserVersion!==void 0&&e.uint32(706).string(t.browserVersion),t.locationPlayabilityToken!==void 0&&e.uint32(714).string(t.locationPlayabilityToken),t.chipset!==void 0&&e.uint32(738).string(t.chipset),t.firmwareVersion!==void 0&&e.uint32(746).string(t.firmwareVersion),t.memoryTotalKbytes!==void 0&&e.uint32(760).int64(t.memoryTotalKbytes),t.mainAppWebInfo!==void 0&&Ty.encode(t.mainAppWebInfo,e.uint32(770).fork()).join(),t.notificationPermissionInfo!==void 0&&Sy.encode(t.notificationPermissionInfo,e.uint32(778).fork()).join(),t.deviceBrand!==void 0&&e.uint32(786).string(t.deviceBrand),t.glDeviceInfo!==void 0&&Iy.encode(t.glDeviceInfo,e.uint32(818).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=WA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.hl=i.string();continue}case 2:{if(s!==18)break;o.gl=i.string();continue}case 4:{if(s!==34)break;o.remoteHost=i.string();continue}case 6:{if(s!==50)break;o.deviceId=i.string();continue}case 8:{if(s!==66)break;o.debugDeviceIdOverride=i.string();continue}case 10:{if(s!==82)break;o.carrierGeo=i.string();continue}case 11:{if(s!==88)break;o.crackedHl=i.bool();continue}case 12:{if(s!==98)break;o.deviceMake=i.string();continue}case 13:{if(s!==106)break;o.deviceModel=i.string();continue}case 14:{if(s!==114)break;o.visitorData=i.string();continue}case 15:{if(s!==122)break;o.userAgent=i.string();continue}case 16:{if(s!==128)break;o.clientName=i.int32();continue}case 17:{if(s!==138)break;o.clientVersion=i.string();continue}case 18:{if(s!==146)break;o.osName=i.string();continue}case 19:{if(s!==154)break;o.osVersion=i.string();continue}case 20:{if(s!==162)break;o.projectId=i.string();continue}case 21:{if(s!==170)break;o.acceptLanguage=i.string();continue}case 22:{if(s!==178)break;o.acceptRegion=i.string();continue}case 23:{if(s!==186)break;o.originalUrl=i.string();continue}case 25:{if(s!==202)break;o.rawDeviceId=i.string();continue}case 27:{if(s!==218)break;o.configData=i.string();continue}case 31:{if(s!==250)break;o.spacecastToken=i.string();continue}case 34:{if(s!==274)break;o.internalGeo=i.string();continue}case 37:{if(s!==296)break;o.screenWidthPoints=i.int32();continue}case 38:{if(s!==304)break;o.screenHeightPoints=i.int32();continue}case 39:{if(s!==317)break;o.screenWidthInches=i.float();continue}case 40:{if(s!==325)break;o.screenHeightInches=i.float();continue}case 41:{if(s!==328)break;o.screenPixelDensity=i.int32();continue}case 42:{if(s!==336)break;o.platform=i.int32();continue}case 45:{if(s!==362)break;o.spacecastClientInfo=Ey.decode(i,i.uint32());continue}case 46:{if(s!==368)break;o.clientFormFactor=i.int32();continue}case 48:{if(s!==386)break;o.forwardedFor=i.string();continue}case 49:{if(s!==394)break;o.mobileDataPlanInfo=xy.decode(i,i.uint32());continue}case 50:{if(s!==400)break;o.gmscoreVersionCode=i.int32();continue}case 51:{if(s!==408)break;o.webpSupport=i.bool();continue}case 52:{if(s!==416)break;o.cameraType=i.int32();continue}case 54:{if(s!==434)break;o.experimentsToken=i.string();continue}case 55:{if(s!==440)break;o.windowWidthPoints=i.int32();continue}case 56:{if(s!==448)break;o.windowHeightPoints=i.int32();continue}case 62:{if(s!==498)break;o.configInfo=Py.decode(i,i.uint32());continue}case 63:{if(s!==506)break;o.unpluggedLocationInfo=My.decode(i,i.uint32());continue}case 64:{if(s!==512)break;o.androidSdkVersion=i.int32();continue}case 65:{if(s!==525)break;o.screenDensityFloat=i.float();continue}case 66:{if(s!==528)break;o.firstTimeSignInExperimentIds=i.int32();continue}case 67:{if(s!==536)break;o.utcOffsetMinutes=i.int32();continue}case 68:{if(s!==544)break;o.animatedWebpSupport=i.bool();continue}case 69:{if(s!==554)break;o.kidsAppInfo=Ry.decode(i,i.uint32());continue}case 70:{if(s!==562)break;o.musicAppInfo=Vy.decode(i,i.uint32());continue}case 71:{if(s!==570)break;o.tvAppInfo=Oy.decode(i,i.uint32());continue}case 72:{if(s!==578)break;o.internalGeoIp=i.string();continue}case 73:{if(s!==586)break;o.unpluggedAppInfo=Fy.decode(i,i.uint32());continue}case 74:{if(s!==594)break;o.locationInfo=Uy.decode(i,i.uint32());continue}case 76:{if(s!==610)break;o.contentSizeCategory=i.string();continue}case 77:{if(s!==621)break;o.fontScale=i.float();continue}case 78:{if(s!==624)break;o.userInterfaceTheme=i.int32();continue}case 80:{if(s!==642)break;o.timeZone=i.string();continue}case 81:{if(s!==650)break;o.homeGroupInfo=Wy.decode(i,i.uint32());continue}case 84:{if(s!==674)break;o.emlTemplateContext=i.bytes();continue}case 85:{if(s!==682)break;o.coldAppBundleConfigData=i.bytes();continue}case 87:{if(s!==698)break;o.browserName=i.string();continue}case 88:{if(s!==706)break;o.browserVersion=i.string();continue}case 89:{if(s!==714)break;o.locationPlayabilityToken=i.string();continue}case 92:{if(s!==738)break;o.chipset=i.string();continue}case 93:{if(s!==746)break;o.firmwareVersion=i.string();continue}case 95:{if(s!==760)break;o.memoryTotalKbytes=Ho(i.int64());continue}case 96:{if(s!==770)break;o.mainAppWebInfo=Ty.decode(i,i.uint32());continue}case 97:{if(s!==778)break;o.notificationPermissionInfo=Sy.decode(i,i.uint32());continue}case 98:{if(s!==786)break;o.deviceBrand=i.string();continue}case 102:{if(s!==818)break;o.glDeviceInfo=Iy.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function qA(){return{graftUrl:void 0,pwaInstallabilityStatus:void 0,webDisplayMode:void 0,isWebNativeShareAvailable:void 0,storeDigitalGoodsApiSupportStatus:void 0}}a(qA,"createBaseClientInfo_MainAppWebInfo");var Ty={encode(t,e=new O){return t.graftUrl!==void 0&&e.uint32(10).string(t.graftUrl),t.pwaInstallabilityStatus!==void 0&&e.uint32(16).int32(t.pwaInstallabilityStatus),t.webDisplayMode!==void 0&&e.uint32(24).int32(t.webDisplayMode),t.isWebNativeShareAvailable!==void 0&&e.uint32(32).bool(t.isWebNativeShareAvailable),t.storeDigitalGoodsApiSupportStatus!==void 0&&e.uint32(40).int32(t.storeDigitalGoodsApiSupportStatus),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=qA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.graftUrl=i.string();continue}case 2:{if(s!==16)break;o.pwaInstallabilityStatus=i.int32();continue}case 3:{if(s!==24)break;o.webDisplayMode=i.int32();continue}case 4:{if(s!==32)break;o.isWebNativeShareAvailable=i.bool();continue}case 5:{if(s!==40)break;o.storeDigitalGoodsApiSupportStatus=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function jA(){return{notificationsSetting:void 0,lastDeviceOptInChangeTimeAgoSec:void 0}}a(jA,"createBaseClientInfo_NotificationPermissionInfo");var Sy={encode(t,e=new O){return t.notificationsSetting!==void 0&&e.uint32(8).int32(t.notificationsSetting),t.lastDeviceOptInChangeTimeAgoSec!==void 0&&e.uint32(16).int64(t.lastDeviceOptInChangeTimeAgoSec),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=jA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.notificationsSetting=i.int32();continue}case 2:{if(s!==16)break;o.lastDeviceOptInChangeTimeAgoSec=Ho(i.int64());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function GA(){return{glRenderer:void 0,glEsVersionMajor:void 0,glEsVersionMinor:void 0}}a(GA,"createBaseClientInfo_GLDeviceInfo");var Iy={encode(t,e=new O){return t.glRenderer!==void 0&&e.uint32(10).string(t.glRenderer),t.glEsVersionMajor!==void 0&&e.uint32(16).int32(t.glEsVersionMajor),t.glEsVersionMinor!==void 0&&e.uint32(24).int32(t.glEsVersionMinor),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=GA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.glRenderer=i.string();continue}case 2:{if(s!==16)break;o.glEsVersionMajor=i.int32();continue}case 3:{if(s!==24)break;o.glEsVersionMinor=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function KA(){return{appliances:void 0,interactionLevel:void 0}}a(KA,"createBaseClientInfo_SpacecastClientInfo");var Ey={encode(t,e=new O){return t.appliances!==void 0&&Ay.encode(t.appliances,e.uint32(10).fork()).join(),t.interactionLevel!==void 0&&e.uint32(16).int32(t.interactionLevel),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=KA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.appliances=Ay.decode(i,i.uint32());continue}case 2:{if(s!==16)break;o.interactionLevel=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function YA(){return{contentProfileToken:void 0,status:void 0,hostname:void 0,active:void 0,deviceId:void 0}}a(YA,"createBaseClientInfo_SpacecastClientInfo_SpacecastAppliance");var Ay={encode(t,e=new O){return t.contentProfileToken!==void 0&&e.uint32(10).bytes(t.contentProfileToken),t.status!==void 0&&e.uint32(16).int32(t.status),t.hostname!==void 0&&e.uint32(26).string(t.hostname),t.active!==void 0&&e.uint32(32).bool(t.active),t.deviceId!==void 0&&e.uint32(42).string(t.deviceId),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=YA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.contentProfileToken=i.bytes();continue}case 2:{if(s!==16)break;o.status=i.int32();continue}case 3:{if(s!==26)break;o.hostname=i.string();continue}case 4:{if(s!==32)break;o.active=i.bool();continue}case 5:{if(s!==42)break;o.deviceId=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function zA(){return{cpid:void 0,serializedDataPlanStatus:void 0,dataSavingQualityPickerEnabled:void 0,mccmnc:void 0}}a(zA,"createBaseClientInfo_MobileDataPlanInfo");var xy={encode(t,e=new O){return t.cpid!==void 0&&e.uint32(394).string(t.cpid),t.serializedDataPlanStatus!==void 0&&e.uint32(402).string(t.serializedDataPlanStatus),t.dataSavingQualityPickerEnabled!==void 0&&e.uint32(416).bool(t.dataSavingQualityPickerEnabled),t.mccmnc!==void 0&&e.uint32(426).string(t.mccmnc),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=zA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 49:{if(s!==394)break;o.cpid=i.string();continue}case 50:{if(s!==402)break;o.serializedDataPlanStatus=i.string();continue}case 52:{if(s!==416)break;o.dataSavingQualityPickerEnabled=i.bool();continue}case 53:{if(s!==426)break;o.mccmnc=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function $A(){return{coldConfigData:void 0,coldHashData:void 0,hotHashData:void 0,appInstallData:void 0}}a($A,"createBaseClientInfo_ConfigGroupsClientInfo");var Py={encode(t,e=new O){return t.coldConfigData!==void 0&&e.uint32(10).string(t.coldConfigData),t.coldHashData!==void 0&&e.uint32(26).string(t.coldHashData),t.hotHashData!==void 0&&e.uint32(42).string(t.hotHashData),t.appInstallData!==void 0&&e.uint32(50).string(t.appInstallData),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=$A();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.coldConfigData=i.string();continue}case 3:{if(s!==26)break;o.coldHashData=i.string();continue}case 5:{if(s!==42)break;o.hotHashData=i.string();continue}case 6:{if(s!==50)break;o.appInstallData=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function JA(){return{latitudeE7:void 0,longitudeE7:void 0,localTimestampMs:void 0,ipAddress:void 0,timezone:void 0,prefer24HourTime:void 0,locationRadiusMeters:void 0,isInitialLoad:void 0,browserPermissionGranted:void 0,clientPermissionState:void 0,locationOverrideToken:void 0}}a(JA,"createBaseClientInfo_UnpluggedLocationInfo");var My={encode(t,e=new O){return t.latitudeE7!==void 0&&e.uint32(8).int32(t.latitudeE7),t.longitudeE7!==void 0&&e.uint32(16).int32(t.longitudeE7),t.localTimestampMs!==void 0&&e.uint32(24).int64(t.localTimestampMs),t.ipAddress!==void 0&&e.uint32(34).string(t.ipAddress),t.timezone!==void 0&&e.uint32(42).string(t.timezone),t.prefer24HourTime!==void 0&&e.uint32(48).bool(t.prefer24HourTime),t.locationRadiusMeters!==void 0&&e.uint32(56).int32(t.locationRadiusMeters),t.isInitialLoad!==void 0&&e.uint32(64).bool(t.isInitialLoad),t.browserPermissionGranted!==void 0&&e.uint32(72).bool(t.browserPermissionGranted),t.clientPermissionState!==void 0&&e.uint32(80).int32(t.clientPermissionState),t.locationOverrideToken!==void 0&&e.uint32(90).string(t.locationOverrideToken),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=JA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.latitudeE7=i.int32();continue}case 2:{if(s!==16)break;o.longitudeE7=i.int32();continue}case 3:{if(s!==24)break;o.localTimestampMs=Ho(i.int64());continue}case 4:{if(s!==34)break;o.ipAddress=i.string();continue}case 5:{if(s!==42)break;o.timezone=i.string();continue}case 6:{if(s!==48)break;o.prefer24HourTime=i.bool();continue}case 7:{if(s!==56)break;o.locationRadiusMeters=i.int32();continue}case 8:{if(s!==64)break;o.isInitialLoad=i.bool();continue}case 9:{if(s!==72)break;o.browserPermissionGranted=i.bool();continue}case 10:{if(s!==80)break;o.clientPermissionState=i.int32();continue}case 11:{if(s!==90)break;o.locationOverrideToken=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function XA(){return{contentSettings:void 0,parentCurationMode:void 0,categorySettings:void 0,userEducationSettings:void 0}}a(XA,"createBaseClientInfo_KidsAppInfo");var Ry={encode(t,e=new O){return t.contentSettings!==void 0&&Dy.encode(t.contentSettings,e.uint32(10).fork()).join(),t.parentCurationMode!==void 0&&e.uint32(16).int32(t.parentCurationMode),t.categorySettings!==void 0&&By.encode(t.categorySettings,e.uint32(26).fork()).join(),t.userEducationSettings!==void 0&&Ly.encode(t.userEducationSettings,e.uint32(34).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=XA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.contentSettings=Dy.decode(i,i.uint32());continue}case 2:{if(s!==16)break;o.parentCurationMode=i.int32();continue}case 3:{if(s!==26)break;o.categorySettings=By.decode(i,i.uint32());continue}case 4:{if(s!==34)break;o.userEducationSettings=Ly.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function QA(){return{kidsNoSearchMode:void 0,ageUpMode:void 0,contentDensity:void 0}}a(QA,"createBaseClientInfo_KidsAppInfo_KidsContentSettings");var Dy={encode(t,e=new O){return t.kidsNoSearchMode!==void 0&&e.uint32(8).int32(t.kidsNoSearchMode),t.ageUpMode!==void 0&&e.uint32(16).int32(t.ageUpMode),t.contentDensity!==void 0&&e.uint32(24).int32(t.contentDensity),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=QA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.kidsNoSearchMode=i.int32();continue}case 2:{if(s!==16)break;o.ageUpMode=i.int32();continue}case 3:{if(s!==24)break;o.contentDensity=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function ZA(){return{enabledCategories:void 0}}a(ZA,"createBaseClientInfo_KidsAppInfo_KidsCategorySettings");var By={encode(t,e=new O){return t.enabledCategories!==void 0&&e.uint32(10).string(t.enabledCategories),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ZA();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.enabledCategories=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function ex(){return{hasSeenHomeChipBarUserEducation:void 0,hasSeenHomePivotBarUserEducation:void 0,hasSeenParentMuirUserEducation:void 0}}a(ex,"createBaseClientInfo_KidsAppInfo_KidsUserEducationSettings");var Ly={encode(t,e=new O){return t.hasSeenHomeChipBarUserEducation!==void 0&&e.uint32(8).bool(t.hasSeenHomeChipBarUserEducation),t.hasSeenHomePivotBarUserEducation!==void 0&&e.uint32(16).bool(t.hasSeenHomePivotBarUserEducation),t.hasSeenParentMuirUserEducation!==void 0&&e.uint32(24).bool(t.hasSeenParentMuirUserEducation),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ex();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.hasSeenHomeChipBarUserEducation=i.bool();continue}case 2:{if(s!==16)break;o.hasSeenHomePivotBarUserEducation=i.bool();continue}case 3:{if(s!==24)break;o.hasSeenParentMuirUserEducation=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function tx(){return{playBackMode:void 0,musicLocationMasterSwitch:void 0,musicActivityMasterSwitch:void 0,offlineMixtapeEnabled:void 0,autoOfflineEnabled:void 0,iosBackgroundRefreshStatus:void 0,smartDownloadsSongLimit:void 0,transitionedFromMixtapeToSmartDownloads:void 0,pwaInstallabilityStatus:void 0,webDisplayMode:void 0,musicTier:void 0,storeDigitalGoodsApiSupportStatus:void 0,smartDownloadsTimeSinceLastOptOutSec:void 0}}a(tx,"createBaseClientInfo_MusicAppInfo");var Vy={encode(t,e=new O){return t.playBackMode!==void 0&&e.uint32(8).int32(t.playBackMode),t.musicLocationMasterSwitch!==void 0&&e.uint32(16).int32(t.musicLocationMasterSwitch),t.musicActivityMasterSwitch!==void 0&&e.uint32(24).int32(t.musicActivityMasterSwitch),t.offlineMixtapeEnabled!==void 0&&e.uint32(32).bool(t.offlineMixtapeEnabled),t.autoOfflineEnabled!==void 0&&e.uint32(40).bool(t.autoOfflineEnabled),t.iosBackgroundRefreshStatus!==void 0&&e.uint32(48).int32(t.iosBackgroundRefreshStatus),t.smartDownloadsSongLimit!==void 0&&e.uint32(56).int32(t.smartDownloadsSongLimit),t.transitionedFromMixtapeToSmartDownloads!==void 0&&e.uint32(64).bool(t.transitionedFromMixtapeToSmartDownloads),t.pwaInstallabilityStatus!==void 0&&e.uint32(72).int32(t.pwaInstallabilityStatus),t.webDisplayMode!==void 0&&e.uint32(80).int32(t.webDisplayMode),t.musicTier!==void 0&&e.uint32(88).int32(t.musicTier),t.storeDigitalGoodsApiSupportStatus!==void 0&&e.uint32(96).int32(t.storeDigitalGoodsApiSupportStatus),t.smartDownloadsTimeSinceLastOptOutSec!==void 0&&e.uint32(104).int64(t.smartDownloadsTimeSinceLastOptOutSec),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=tx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.playBackMode=i.int32();continue}case 2:{if(s!==16)break;o.musicLocationMasterSwitch=i.int32();continue}case 3:{if(s!==24)break;o.musicActivityMasterSwitch=i.int32();continue}case 4:{if(s!==32)break;o.offlineMixtapeEnabled=i.bool();continue}case 5:{if(s!==40)break;o.autoOfflineEnabled=i.bool();continue}case 6:{if(s!==48)break;o.iosBackgroundRefreshStatus=i.int32();continue}case 7:{if(s!==56)break;o.smartDownloadsSongLimit=i.int32();continue}case 8:{if(s!==64)break;o.transitionedFromMixtapeToSmartDownloads=i.bool();continue}case 9:{if(s!==72)break;o.pwaInstallabilityStatus=i.int32();continue}case 10:{if(s!==80)break;o.webDisplayMode=i.int32();continue}case 11:{if(s!==88)break;o.musicTier=i.int32();continue}case 12:{if(s!==96)break;o.storeDigitalGoodsApiSupportStatus=i.int32();continue}case 13:{if(s!==104)break;o.smartDownloadsTimeSinceLastOptOutSec=Ho(i.int64());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function ix(){return{mdxImpactedSessionsServerEvents:void 0,enablePrivacyFilter:void 0,zylonLeftNav:void 0,certificationScope:void 0,livingRoomPoTokenId:void 0,jsEngineString:void 0,voiceCapability:void 0,systemIntegrator:void 0,androidBuildFingerprint:void 0,cobaltAppVersion:void 0,cobaltStarboardVersion:void 0,useStartPlaybackPreviewCommand:void 0,shouldShowPersistentSigninOnHome:void 0,androidPlayServicesVersion:void 0}}a(ix,"createBaseClientInfo_TvAppInfo");var Oy={encode(t,e=new O){return t.mdxImpactedSessionsServerEvents!==void 0&&e.uint32(26).string(t.mdxImpactedSessionsServerEvents),t.enablePrivacyFilter!==void 0&&e.uint32(48).bool(t.enablePrivacyFilter),t.zylonLeftNav!==void 0&&e.uint32(56).bool(t.zylonLeftNav),t.certificationScope!==void 0&&e.uint32(74).string(t.certificationScope),t.livingRoomPoTokenId!==void 0&&e.uint32(82).string(t.livingRoomPoTokenId),t.jsEngineString!==void 0&&e.uint32(98).string(t.jsEngineString),t.voiceCapability!==void 0&&Ny.encode(t.voiceCapability,e.uint32(106).fork()).join(),t.systemIntegrator!==void 0&&e.uint32(114).string(t.systemIntegrator),t.androidBuildFingerprint!==void 0&&e.uint32(146).string(t.androidBuildFingerprint),t.cobaltAppVersion!==void 0&&e.uint32(154).string(t.cobaltAppVersion),t.cobaltStarboardVersion!==void 0&&e.uint32(162).string(t.cobaltStarboardVersion),t.useStartPlaybackPreviewCommand!==void 0&&e.uint32(176).bool(t.useStartPlaybackPreviewCommand),t.shouldShowPersistentSigninOnHome!==void 0&&e.uint32(184).bool(t.shouldShowPersistentSigninOnHome),t.androidPlayServicesVersion!==void 0&&e.uint32(194).string(t.androidPlayServicesVersion),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ix();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 3:{if(s!==26)break;o.mdxImpactedSessionsServerEvents=i.string();continue}case 6:{if(s!==48)break;o.enablePrivacyFilter=i.bool();continue}case 7:{if(s!==56)break;o.zylonLeftNav=i.bool();continue}case 9:{if(s!==74)break;o.certificationScope=i.string();continue}case 10:{if(s!==82)break;o.livingRoomPoTokenId=i.string();continue}case 12:{if(s!==98)break;o.jsEngineString=i.string();continue}case 13:{if(s!==106)break;o.voiceCapability=Ny.decode(i,i.uint32());continue}case 14:{if(s!==114)break;o.systemIntegrator=i.string();continue}case 18:{if(s!==146)break;o.androidBuildFingerprint=i.string();continue}case 19:{if(s!==154)break;o.cobaltAppVersion=i.string();continue}case 20:{if(s!==162)break;o.cobaltStarboardVersion=i.string();continue}case 22:{if(s!==176)break;o.useStartPlaybackPreviewCommand=i.bool();continue}case 23:{if(s!==184)break;o.shouldShowPersistentSigninOnHome=i.bool();continue}case 24:{if(s!==194)break;o.androidPlayServicesVersion=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function nx(){return{hasSoftMicSupport:void 0,hasHardMicSupport:void 0}}a(nx,"createBaseClientInfo_TvAppInfo_VoiceCapability");var Ny={encode(t,e=new O){return t.hasSoftMicSupport!==void 0&&e.uint32(8).bool(t.hasSoftMicSupport),t.hasHardMicSupport!==void 0&&e.uint32(16).bool(t.hasHardMicSupport),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=nx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.hasSoftMicSupport=i.bool();continue}case 2:{if(s!==16)break;o.hasHardMicSupport=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function sx(){return{enableFilterMode:void 0,iosNotificationPermission:void 0,forceEnableEpg3:void 0}}a(sx,"createBaseClientInfo_UnpluggedAppInfo");var Fy={encode(t,e=new O){return t.enableFilterMode!==void 0&&e.uint32(16).bool(t.enableFilterMode),t.iosNotificationPermission!==void 0&&e.uint32(24).bool(t.iosNotificationPermission),t.forceEnableEpg3!==void 0&&e.uint32(56).bool(t.forceEnableEpg3),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=sx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==16)break;o.enableFilterMode=i.bool();continue}case 3:{if(s!==24)break;o.iosNotificationPermission=i.bool();continue}case 7:{if(s!==56)break;o.forceEnableEpg3=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function ox(){return{locationInfoStatus:void 0,ulrStatus:void 0,latitudeE7:void 0,longitudeE7:void 0,horizontalAccuracyMeters:void 0,locationFreshnessMs:void 0,locationPermissionAuthorizationStatus:void 0,locationOverrideToken:void 0,forceLocationPlayabilityTokenRefresh:void 0}}a(ox,"createBaseClientInfo_LocationInfo");var Uy={encode(t,e=new O){return t.locationInfoStatus!==void 0&&e.uint32(8).int32(t.locationInfoStatus),t.ulrStatus!==void 0&&Hy.encode(t.ulrStatus,e.uint32(18).fork()).join(),t.latitudeE7!==void 0&&e.uint32(26).string(t.latitudeE7),t.longitudeE7!==void 0&&e.uint32(34).string(t.longitudeE7),t.horizontalAccuracyMeters!==void 0&&e.uint32(42).string(t.horizontalAccuracyMeters),t.locationFreshnessMs!==void 0&&e.uint32(50).string(t.locationFreshnessMs),t.locationPermissionAuthorizationStatus!==void 0&&e.uint32(56).int32(t.locationPermissionAuthorizationStatus),t.locationOverrideToken!==void 0&&e.uint32(66).string(t.locationOverrideToken),t.forceLocationPlayabilityTokenRefresh!==void 0&&e.uint32(72).bool(t.forceLocationPlayabilityTokenRefresh),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ox();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.locationInfoStatus=i.int32();continue}case 2:{if(s!==18)break;o.ulrStatus=Hy.decode(i,i.uint32());continue}case 3:{if(s!==26)break;o.latitudeE7=i.string();continue}case 4:{if(s!==34)break;o.longitudeE7=i.string();continue}case 5:{if(s!==42)break;o.horizontalAccuracyMeters=i.string();continue}case 6:{if(s!==50)break;o.locationFreshnessMs=i.string();continue}case 7:{if(s!==56)break;o.locationPermissionAuthorizationStatus=i.int32();continue}case 8:{if(s!==66)break;o.locationOverrideToken=i.string();continue}case 9:{if(s!==72)break;o.forceLocationPlayabilityTokenRefresh=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function rx(){return{reportingEnabledSetting:void 0,historyEnabledSetting:void 0,isAllowed:void 0,isActive:void 0}}a(rx,"createBaseClientInfo_LocationInfo_UrlStatus");var Hy={encode(t,e=new O){return t.reportingEnabledSetting!==void 0&&e.uint32(8).int32(t.reportingEnabledSetting),t.historyEnabledSetting!==void 0&&e.uint32(16).int32(t.historyEnabledSetting),t.isAllowed!==void 0&&e.uint32(24).bool(t.isAllowed),t.isActive!==void 0&&e.uint32(32).bool(t.isActive),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=rx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.reportingEnabledSetting=i.int32();continue}case 2:{if(s!==16)break;o.historyEnabledSetting=i.int32();continue}case 3:{if(s!==24)break;o.isAllowed=i.bool();continue}case 4:{if(s!==32)break;o.isActive=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function ax(){return{isPartOfGroup:void 0,isGroup:void 0}}a(ax,"createBaseClientInfo_HomeGroupInfo");var Wy={encode(t,e=new O){return t.isPartOfGroup!==void 0&&e.uint32(8).bool(t.isPartOfGroup),t.isGroup!==void 0&&e.uint32(24).bool(t.isGroup),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ax();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.isPartOfGroup=i.bool();continue}case 3:{if(s!==24)break;o.isGroup=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Ho(t){let e=globalThis.Number(t.toString());if(e>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(e<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return e}a(Ho,"longToNumber");function lx(){return{challenge:void 0,webResponse:void 0,androidResponse:void 0,iosResponse:void 0,error:void 0,adblockReporting:void 0}}a(lx,"createBaseAttestationResponseData");var qy={encode(t,e=new O){return t.challenge!==void 0&&e.uint32(10).string(t.challenge),t.webResponse!==void 0&&e.uint32(18).string(t.webResponse),t.androidResponse!==void 0&&e.uint32(26).string(t.androidResponse),t.iosResponse!==void 0&&e.uint32(34).bytes(t.iosResponse),t.error!==void 0&&e.uint32(40).int32(t.error),t.adblockReporting!==void 0&&jy.encode(t.adblockReporting,e.uint32(50).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=lx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.challenge=i.string();continue}case 2:{if(s!==18)break;o.webResponse=i.string();continue}case 3:{if(s!==26)break;o.androidResponse=i.string();continue}case 4:{if(s!==34)break;o.iosResponse=i.bytes();continue}case 5:{if(s!==40)break;o.error=i.int32();continue}case 6:{if(s!==50)break;o.adblockReporting=jy.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function cx(){return{reportingStatus:void 0,broadSpectrumDetectionResult:void 0}}a(cx,"createBaseAttestationResponseData_AdblockReporting");var jy={encode(t,e=new O){return t.reportingStatus!==void 0&&e.uint32(8).uint64(t.reportingStatus),t.broadSpectrumDetectionResult!==void 0&&e.uint32(16).uint64(t.broadSpectrumDetectionResult),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=cx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.reportingStatus=Vl(i.uint64());continue}case 2:{if(s!==16)break;o.broadSpectrumDetectionResult=Vl(i.uint64());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Vl(t){let e=globalThis.Number(t.toString());if(e>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(e<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return e}a(Vl,"longToNumber");function ux(){return{thirdPartyDigest:void 0,useSsl:void 0,returnErrorDetail:void 0,ifNoneMatch:void 0,returnLogEntry:void 0,isPrefetch:void 0,internalExperimentFlags:[],returnDebugData:void 0,innertubez:void 0,traceProto:void 0,returnLogEntryJson:void 0,sherlogUsername:void 0,reauthRequestInfo:void 0,sessionInfo:void 0,returnLogEntryProto:void 0,externalPrequestContext:void 0,attestationResponseData:void 0,eats:void 0,requestQos:void 0}}a(ux,"createBaseRequestInfo");var Gy={encode(t,e=new O){t.thirdPartyDigest!==void 0&&e.uint32(50).string(t.thirdPartyDigest),t.useSsl!==void 0&&e.uint32(56).bool(t.useSsl),t.returnErrorDetail!==void 0&&e.uint32(72).bool(t.returnErrorDetail),t.ifNoneMatch!==void 0&&e.uint32(98).string(t.ifNoneMatch),t.returnLogEntry!==void 0&&e.uint32(104).bool(t.returnLogEntry),t.isPrefetch!==void 0&&e.uint32(112).bool(t.isPrefetch);for(let i of t.internalExperimentFlags)Xi.encode(i,e.uint32(122).fork()).join();return t.returnDebugData!==void 0&&e.uint32(128).bool(t.returnDebugData),t.innertubez!==void 0&&e.uint32(146).string(t.innertubez),t.traceProto!==void 0&&e.uint32(184).bool(t.traceProto),t.returnLogEntryJson!==void 0&&e.uint32(192).bool(t.returnLogEntryJson),t.sherlogUsername!==void 0&&e.uint32(202).string(t.sherlogUsername),t.reauthRequestInfo!==void 0&&zy.encode(t.reauthRequestInfo,e.uint32(234).fork()).join(),t.sessionInfo!==void 0&&Yy.encode(t.sessionInfo,e.uint32(242).fork()).join(),t.returnLogEntryProto!==void 0&&e.uint32(248).bool(t.returnLogEntryProto),t.externalPrequestContext!==void 0&&e.uint32(258).string(t.externalPrequestContext),t.attestationResponseData!==void 0&&qy.encode(t.attestationResponseData,e.uint32(274).fork()).join(),t.eats!==void 0&&e.uint32(282).bytes(t.eats),t.requestQos!==void 0&&Ky.encode(t.requestQos,e.uint32(290).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=ux();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 6:{if(s!==50)break;o.thirdPartyDigest=i.string();continue}case 7:{if(s!==56)break;o.useSsl=i.bool();continue}case 9:{if(s!==72)break;o.returnErrorDetail=i.bool();continue}case 12:{if(s!==98)break;o.ifNoneMatch=i.string();continue}case 13:{if(s!==104)break;o.returnLogEntry=i.bool();continue}case 14:{if(s!==112)break;o.isPrefetch=i.bool();continue}case 15:{if(s!==122)break;o.internalExperimentFlags.push(Xi.decode(i,i.uint32()));continue}case 16:{if(s!==128)break;o.returnDebugData=i.bool();continue}case 18:{if(s!==146)break;o.innertubez=i.string();continue}case 23:{if(s!==184)break;o.traceProto=i.bool();continue}case 24:{if(s!==192)break;o.returnLogEntryJson=i.bool();continue}case 25:{if(s!==202)break;o.sherlogUsername=i.string();continue}case 29:{if(s!==234)break;o.reauthRequestInfo=zy.decode(i,i.uint32());continue}case 30:{if(s!==242)break;o.sessionInfo=Yy.decode(i,i.uint32());continue}case 31:{if(s!==248)break;o.returnLogEntryProto=i.bool();continue}case 32:{if(s!==258)break;o.externalPrequestContext=i.string();continue}case 34:{if(s!==274)break;o.attestationResponseData=qy.decode(i,i.uint32());continue}case 35:{if(s!==282)break;o.eats=i.bytes();continue}case 36:{if(s!==290)break;o.requestQos=Ky.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function hx(){return{criticality:void 0}}a(hx,"createBaseRequestInfo_RequestQoS");var Ky={encode(t,e=new O){return t.criticality!==void 0&&e.uint32(8).int32(t.criticality),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=hx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.criticality=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function dx(){return{token:void 0}}a(dx,"createBaseRequestInfo_SessionInfo");var Yy={encode(t,e=new O){return t.token!==void 0&&e.uint32(10).string(t.token),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=dx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.token=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function _x(){return{encodedReauthProofToken:void 0}}a(_x,"createBaseRequestInfo_ReauthRequestInfo");var zy={encode(t,e=new O){return t.encodedReauthProofToken!==void 0&&e.uint32(10).string(t.encodedReauthProofToken),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=_x();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.encodedReauthProofToken=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function px(){return{developerKey:void 0,appName:void 0,appPublisher:void 0,embedUrl:void 0,appVersion:void 0,embeddedPlayerContext:void 0}}a(px,"createBaseThirdPartyInfo");var $y={encode(t,e=new O){return t.developerKey!==void 0&&e.uint32(10).string(t.developerKey),t.appName!==void 0&&e.uint32(18).string(t.appName),t.appPublisher!==void 0&&e.uint32(26).string(t.appPublisher),t.embedUrl!==void 0&&e.uint32(34).string(t.embedUrl),t.appVersion!==void 0&&e.uint32(50).string(t.appVersion),t.embeddedPlayerContext!==void 0&&Jy.encode(t.embeddedPlayerContext,e.uint32(58).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=px();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.developerKey=i.string();continue}case 2:{if(s!==18)break;o.appName=i.string();continue}case 3:{if(s!==26)break;o.appPublisher=i.string();continue}case 4:{if(s!==34)break;o.embedUrl=i.string();continue}case 6:{if(s!==50)break;o.appVersion=i.string();continue}case 7:{if(s!==58)break;o.embeddedPlayerContext=Jy.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function fx(){return{ancestorOrigins:void 0,embeddedPlayerEncryptedContext:void 0,ancestorOriginsSupported:void 0}}a(fx,"createBaseThirdPartyInfo_EmbeddedPlayerContext");var Jy={encode(t,e=new O){return t.ancestorOrigins!==void 0&&e.uint32(10).string(t.ancestorOrigins),t.embeddedPlayerEncryptedContext!==void 0&&e.uint32(18).string(t.embeddedPlayerEncryptedContext),t.ancestorOriginsSupported!==void 0&&e.uint32(24).bool(t.ancestorOriginsSupported),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=fx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.ancestorOrigins=i.string();continue}case 2:{if(s!==18)break;o.embeddedPlayerEncryptedContext=i.string();continue}case 3:{if(s!==24)break;o.ancestorOriginsSupported=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function mx(){return{onBehalfOfUser:void 0,enableSafetyMode:void 0,credentialTransferTokens:[],delegatePurchases:void 0,kidsParent:void 0,isIncognito:void 0,lockedSafetyMode:void 0,delegationContext:void 0,serializedDelegationContext:void 0}}a(mx,"createBaseUserInfo");var Xy={encode(t,e=new O){t.onBehalfOfUser!==void 0&&e.uint32(26).string(t.onBehalfOfUser),t.enableSafetyMode!==void 0&&e.uint32(56).bool(t.enableSafetyMode);for(let i of t.credentialTransferTokens)t1.encode(i,e.uint32(98).fork()).join();return t.delegatePurchases!==void 0&&Zy.encode(t.delegatePurchases,e.uint32(106).fork()).join(),t.kidsParent!==void 0&&Qy.encode(t.kidsParent,e.uint32(114).fork()).join(),t.isIncognito!==void 0&&e.uint32(120).bool(t.isIncognito),t.lockedSafetyMode!==void 0&&e.uint32(128).bool(t.lockedSafetyMode),t.delegationContext!==void 0&&e1.encode(t.delegationContext,e.uint32(138).fork()).join(),t.serializedDelegationContext!==void 0&&e.uint32(146).string(t.serializedDelegationContext),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=mx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 3:{if(s!==26)break;o.onBehalfOfUser=i.string();continue}case 7:{if(s!==56)break;o.enableSafetyMode=i.bool();continue}case 12:{if(s!==98)break;o.credentialTransferTokens.push(t1.decode(i,i.uint32()));continue}case 13:{if(s!==106)break;o.delegatePurchases=Zy.decode(i,i.uint32());continue}case 14:{if(s!==114)break;o.kidsParent=Qy.decode(i,i.uint32());continue}case 15:{if(s!==120)break;o.isIncognito=i.bool();continue}case 16:{if(s!==128)break;o.lockedSafetyMode=i.bool();continue}case 17:{if(s!==138)break;o.delegationContext=e1.decode(i,i.uint32());continue}case 18:{if(s!==146)break;o.serializedDelegationContext=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function vx(){return{}}a(vx,"createBaseUserInfo_KidsParent");var Qy={encode(t,e=new O){return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=vx();for(;i.pos<r;){let s=i.uint32();if(s>>>3,(s&7)===4||s===0)break;i.skip(s&7)}return o}};function bx(){return{}}a(bx,"createBaseUserInfo_DelegatePurchases");var Zy={encode(t,e=new O){return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=bx();for(;i.pos<r;){let s=i.uint32();if(s>>>3,(s&7)===4||s===0)break;i.skip(s&7)}return o}};function gx(){return{}}a(gx,"createBaseUserInfo_DelegationContext");var e1={encode(t,e=new O){return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=gx();for(;i.pos<r;){let s=i.uint32();if(s>>>3,(s&7)===4||s===0)break;i.skip(s&7)}return o}};function yx(){return{}}a(yx,"createBaseUserInfo_CredentialTransferToken");var t1={encode(t,e=new O){return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=yx();for(;i.pos<r;){let s=i.uint32();if(s>>>3,(s&7)===4||s===0)break;i.skip(s&7)}return o}};function wx(){return{client:void 0,user:void 0,capabilities:void 0,request:void 0,clickTracking:void 0,thirdParty:void 0,remoteClient:void 0,adSignalsInfo:void 0,experimentalData:void 0,clientScreenNonce:void 0,activePlayers:[]}}a(wx,"createBaseInnerTubeContext");var i1={encode(t,e=new O){t.client!==void 0&&qo.encode(t.client,e.uint32(10).fork()).join(),t.user!==void 0&&Xy.encode(t.user,e.uint32(26).fork()).join(),t.capabilities!==void 0&&Cy.encode(t.capabilities,e.uint32(34).fork()).join(),t.request!==void 0&&Gy.encode(t.request,e.uint32(42).fork()).join(),t.clickTracking!==void 0&&o1.encode(t.clickTracking,e.uint32(50).fork()).join(),t.thirdParty!==void 0&&$y.encode(t.thirdParty,e.uint32(58).fork()).join(),t.remoteClient!==void 0&&qo.encode(t.remoteClient,e.uint32(66).fork()).join(),t.adSignalsInfo!==void 0&&r1.encode(t.adSignalsInfo,e.uint32(74).fork()).join(),t.experimentalData!==void 0&&n1.encode(t.experimentalData,e.uint32(82).fork()).join(),t.clientScreenNonce!==void 0&&e.uint32(90).string(t.clientScreenNonce);for(let i of t.activePlayers)s1.encode(i,e.uint32(98).fork()).join();return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=wx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.client=qo.decode(i,i.uint32());continue}case 3:{if(s!==26)break;o.user=Xy.decode(i,i.uint32());continue}case 4:{if(s!==34)break;o.capabilities=Cy.decode(i,i.uint32());continue}case 5:{if(s!==42)break;o.request=Gy.decode(i,i.uint32());continue}case 6:{if(s!==50)break;o.clickTracking=o1.decode(i,i.uint32());continue}case 7:{if(s!==58)break;o.thirdParty=$y.decode(i,i.uint32());continue}case 8:{if(s!==66)break;o.remoteClient=qo.decode(i,i.uint32());continue}case 9:{if(s!==74)break;o.adSignalsInfo=r1.decode(i,i.uint32());continue}case 10:{if(s!==82)break;o.experimentalData=n1.decode(i,i.uint32());continue}case 11:{if(s!==90)break;o.clientScreenNonce=i.string();continue}case 12:{if(s!==98)break;o.activePlayers.push(s1.decode(i,i.uint32()));continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function kx(){return{params:[]}}a(kx,"createBaseInnerTubeContext_ExperimentalData");var n1={encode(t,e=new O){for(let i of t.params)Xi.encode(i,e.uint32(10).fork()).join();return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=kx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.params.push(Xi.decode(i,i.uint32()));continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Cx(){return{playerContextParams:void 0}}a(Cx,"createBaseInnerTubeContext_ActivePlayerInfo");var s1={encode(t,e=new O){return t.playerContextParams!==void 0&&e.uint32(10).bytes(t.playerContextParams),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Cx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.playerContextParams=i.bytes();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Tx(){return{clickTrackingParams:void 0}}a(Tx,"createBaseInnerTubeContext_ClickTrackingInfo");var o1={encode(t,e=new O){return t.clickTrackingParams!==void 0&&e.uint32(18).bytes(t.clickTrackingParams),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Tx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 2:{if(s!==18)break;o.clickTrackingParams=i.bytes();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Sx(){return{params:[],bid:void 0,mutsuId:void 0,consentBumpState:void 0,advertisingId:void 0,limitAdTracking:void 0,attributionOsSupportedVersion:void 0}}a(Sx,"createBaseInnerTubeContext_AdSignalsInfo");var r1={encode(t,e=new O){for(let i of t.params)Xi.encode(i,e.uint32(10).fork()).join();return t.bid!==void 0&&e.uint32(18).string(t.bid),t.mutsuId!==void 0&&e.uint32(26).string(t.mutsuId),t.consentBumpState!==void 0&&e.uint32(34).string(t.consentBumpState),t.advertisingId!==void 0&&e.uint32(58).string(t.advertisingId),t.limitAdTracking!==void 0&&e.uint32(72).bool(t.limitAdTracking),t.attributionOsSupportedVersion!==void 0&&e.uint32(82).string(t.attributionOsSupportedVersion),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Sx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.params.push(Xi.decode(i,i.uint32()));continue}case 2:{if(s!==18)break;o.bid=i.string();continue}case 3:{if(s!==26)break;o.mutsuId=i.string();continue}case 4:{if(s!==34)break;o.consentBumpState=i.string();continue}case 7:{if(s!==58)break;o.advertisingId=i.string();continue}case 9:{if(s!==72)break;o.limitAdTracking=i.bool();continue}case 10:{if(s!==82)break;o.attributionOsSupportedVersion=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Ix(){return{context:void 0,encryptedVideoId:void 0,title:void 0,description:void 0,privacy:void 0,tags:void 0,category:void 0,license:void 0,ageRestriction:void 0,videoStill:void 0,madeForKids:void 0,racy:void 0}}a(Ix,"createBaseMetadataUpdateRequest");var rR={encode(t,e=new O){return t.context!==void 0&&i1.encode(t.context,e.uint32(10).fork()).join(),t.encryptedVideoId!==void 0&&e.uint32(18).string(t.encryptedVideoId),t.title!==void 0&&a1.encode(t.title,e.uint32(26).fork()).join(),t.description!==void 0&&l1.encode(t.description,e.uint32(34).fork()).join(),t.privacy!==void 0&&c1.encode(t.privacy,e.uint32(42).fork()).join(),t.tags!==void 0&&u1.encode(t.tags,e.uint32(50).fork()).join(),t.category!==void 0&&h1.encode(t.category,e.uint32(58).fork()).join(),t.license!==void 0&&d1.encode(t.license,e.uint32(66).fork()).join(),t.ageRestriction!==void 0&&f1.encode(t.ageRestriction,e.uint32(90).fork()).join(),t.videoStill!==void 0&&m1.encode(t.videoStill,e.uint32(162).fork()).join(),t.madeForKids!==void 0&&_1.encode(t.madeForKids,e.uint32(546).fork()).join(),t.racy!==void 0&&p1.encode(t.racy,e.uint32(554).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Ix();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.context=i1.decode(i,i.uint32());continue}case 2:{if(s!==18)break;o.encryptedVideoId=i.string();continue}case 3:{if(s!==26)break;o.title=a1.decode(i,i.uint32());continue}case 4:{if(s!==34)break;o.description=l1.decode(i,i.uint32());continue}case 5:{if(s!==42)break;o.privacy=c1.decode(i,i.uint32());continue}case 6:{if(s!==50)break;o.tags=u1.decode(i,i.uint32());continue}case 7:{if(s!==58)break;o.category=h1.decode(i,i.uint32());continue}case 8:{if(s!==66)break;o.license=d1.decode(i,i.uint32());continue}case 11:{if(s!==90)break;o.ageRestriction=f1.decode(i,i.uint32());continue}case 20:{if(s!==162)break;o.videoStill=m1.decode(i,i.uint32());continue}case 68:{if(s!==546)break;o.madeForKids=_1.decode(i,i.uint32());continue}case 69:{if(s!==554)break;o.racy=p1.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Ex(){return{newTitle:void 0}}a(Ex,"createBaseMetadataUpdateRequest_MdeTitleUpdateRequest");var a1={encode(t,e=new O){return t.newTitle!==void 0&&e.uint32(10).string(t.newTitle),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Ex();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.newTitle=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Ax(){return{newDescription:void 0}}a(Ax,"createBaseMetadataUpdateRequest_MdeDescriptionUpdateRequest");var l1={encode(t,e=new O){return t.newDescription!==void 0&&e.uint32(10).string(t.newDescription),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Ax();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.newDescription=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function xx(){return{newPrivacy:void 0,clearPrivacyDraft:void 0}}a(xx,"createBaseMetadataUpdateRequest_MdePrivacyUpdateRequest");var c1={encode(t,e=new O){return t.newPrivacy!==void 0&&e.uint32(8).int32(t.newPrivacy),t.clearPrivacyDraft!==void 0&&e.uint32(16).bool(t.clearPrivacyDraft),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=xx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.newPrivacy=i.int32();continue}case 2:{if(s!==16)break;o.clearPrivacyDraft=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Px(){return{newTags:[]}}a(Px,"createBaseMetadataUpdateRequest_MdeTagsUpdateRequest");var u1={encode(t,e=new O){for(let i of t.newTags)e.uint32(10).string(i);return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Px();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.newTags.push(i.string());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Mx(){return{newCategoryId:void 0}}a(Mx,"createBaseMetadataUpdateRequest_MdeCategoryUpdateRequest");var h1={encode(t,e=new O){return t.newCategoryId!==void 0&&e.uint32(8).int32(t.newCategoryId),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Mx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.newCategoryId=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Rx(){return{newLicenseId:void 0}}a(Rx,"createBaseMetadataUpdateRequest_MdeLicenseUpdateRequest");var d1={encode(t,e=new O){return t.newLicenseId!==void 0&&e.uint32(10).string(t.newLicenseId),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Rx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.newLicenseId=i.string();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Dx(){return{operation:void 0,newMfk:void 0}}a(Dx,"createBaseMetadataUpdateRequest_MdeMadeForKidsUpdateRequestParams");var _1={encode(t,e=new O){return t.operation!==void 0&&e.uint32(8).int32(t.operation),t.newMfk!==void 0&&e.uint32(16).int32(t.newMfk),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Dx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.operation=i.int32();continue}case 2:{if(s!==16)break;o.newMfk=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Bx(){return{operation:void 0,newRacy:void 0}}a(Bx,"createBaseMetadataUpdateRequest_MdeRacyRequestParams");var p1={encode(t,e=new O){return t.operation!==void 0&&e.uint32(8).int32(t.operation),t.newRacy!==void 0&&e.uint32(16).int32(t.newRacy),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Bx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.operation=i.int32();continue}case 2:{if(s!==16)break;o.newRacy=i.int32();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Lx(){return{newIsAgeRestricted:void 0}}a(Lx,"createBaseMetadataUpdateRequest_MdeAgeRestrictionUpdateRequest");var f1={encode(t,e=new O){return t.newIsAgeRestricted!==void 0&&e.uint32(8).bool(t.newIsAgeRestricted),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Lx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.newIsAgeRestricted=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Vx(){return{operation:void 0,newStillId:void 0,image:void 0,testImage:void 0,experimentImage:[]}}a(Vx,"createBaseMetadataUpdateRequest_MdeVideoStillRequestParams");var m1={encode(t,e=new O){t.operation!==void 0&&e.uint32(8).int32(t.operation),t.newStillId!==void 0&&e.uint32(16).int32(t.newStillId),t.image!==void 0&&es.encode(t.image,e.uint32(26).fork()).join(),t.testImage!==void 0&&es.encode(t.testImage,e.uint32(34).fork()).join();for(let i of t.experimentImage)v1.encode(i,e.uint32(50).fork()).join();return e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Vx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==8)break;o.operation=i.int32();continue}case 2:{if(s!==16)break;o.newStillId=i.int32();continue}case 3:{if(s!==26)break;o.image=es.decode(i,i.uint32());continue}case 4:{if(s!==34)break;o.testImage=es.decode(i,i.uint32());continue}case 6:{if(s!==50)break;o.experimentImage.push(v1.decode(i,i.uint32()));continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Ox(){return{image:void 0}}a(Ox,"createBaseMetadataUpdateRequest_MdeVideoStillRequestParams_ThumbnailExperimentImageData");var v1={encode(t,e=new O){return t.image!==void 0&&es.encode(t.image,e.uint32(10).fork()).join(),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Ox();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.image=es.decode(i,i.uint32());continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Nx(){return{rawBytes:void 0,dataUri:void 0,frameTimestampUs:void 0,isVertical:void 0}}a(Nx,"createBaseMetadataUpdateRequest_MdeVideoStillRequestParams_CustomThumbnailImage");var es={encode(t,e=new O){return t.rawBytes!==void 0&&e.uint32(10).bytes(t.rawBytes),t.dataUri!==void 0&&e.uint32(18).string(t.dataUri),t.frameTimestampUs!==void 0&&e.uint32(32).int64(t.frameTimestampUs),t.isVertical!==void 0&&e.uint32(40).bool(t.isVertical),e},decode(t,e){let i=t instanceof E?t:new E(t),r=e===void 0?i.len:i.pos+e,o=Nx();for(;i.pos<r;){let s=i.uint32();switch(s>>>3){case 1:{if(s!==10)break;o.rawBytes=i.bytes();continue}case 2:{if(s!==18)break;o.dataUri=i.string();continue}case 4:{if(s!==32)break;o.frameTimestampUs=Fx(i.int64());continue}case 5:{if(s!==40)break;o.isVertical=i.bool();continue}}if((s&7)===4||s===0)break;i.skip(s&7)}return o}};function Fx(t){let e=globalThis.Number(t.toString());if(e>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(e<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return e}a(Fx,"longToNumber");var Gi,$s,Ux,Hx,Wx,qx=class{constructor(e){M(this,$s),M(this,Gi),P(this,Gi,e)}async updateVideoMetadata(e,i){var r;let o=h(this,Gi);if(!o.logged_in)throw new w("You must be signed in to perform this operation.");let s={context:{client:{osName:"Android",clientName:parseInt(he.CLIENT_NAME_IDS.ANDROID),clientVersion:he.CLIENTS.ANDROID.VERSION,androidSdkVersion:he.CLIENTS.ANDROID.SDK_VERSION,visitorData:o.context.client.visitorData,osVersion:"13",acceptLanguage:o.context.client.hl,acceptRegion:o.context.client.gl,deviceMake:"Google",deviceModel:"sdk_gphone64_x86_64",screenHeightPoints:840,screenWidthPoints:432,configInfo:{appInstallData:(r=o.context.client.configInfo)==null?void 0:r.appInstallData},timeZone:o.context.client.timeZone,chipset:"qcom;taro"},activePlayers:[]},encryptedVideoId:e};if(i.title&&(s.title={newTitle:i.title}),i.description&&(s.description={newDescription:i.description}),i.license&&(s.license={newLicenseId:i.license}),i.tags&&(s.tags={newTags:i.tags}),i.thumbnail&&(s.videoStill={operation:3,image:{rawBytes:i.thumbnail},experimentImage:[]}),Reflect.has(i,"category")&&(s.category={newCategoryId:i.category}),Reflect.has(i,"privacy"))switch(i.privacy){case"PUBLIC":s.privacy={newPrivacy:1};break;case"UNLISTED":s.privacy={newPrivacy:2};break;case"PRIVATE":s.privacy={newPrivacy:3};break;default:throw new Error("Invalid privacy setting")}Reflect.has(i,"made_for_kids")&&(s.madeForKids={operation:1,newMfk:i.made_for_kids?1:2}),Reflect.has(i,"age_restricted")&&(s.racy={operation:1,newRacy:i.age_restricted?1:2});let l=rR.encode(s);return await o.actions.execute("/video_manager/metadata_update",{protobuf:!0,serialized_data:l.finish()})}async upload(e,i={}){if(!h(this,Gi).logged_in)throw new w("You must be signed in to perform this operation.");let r=await F(this,$s,Ux).call(this),o=await F(this,$s,Hx).call(this,r.upload_url,e);if(o.status!=="STATUS_SUCCESS")throw new w("Could not process video.");return await F(this,$s,Wx).call(this,r,o,i)}};Gi=new WeakMap;$s=new WeakSet;Ux=a(async function(){let t=`innertube_android:${ve.shim.uuidv4()}:0:v=3,api=1,cf=3`,e={frontendUploadId:t,deviceDisplayName:"Pixel 6 Pro",fileId:`goog-edited-video://generated?videoFileUri=content://media/external/video/media/${ve.shim.uuidv4()}`,mp4MoovAtomRelocationStatus:"UNSUPPORTED",transcodeResult:"DISABLED",connectionType:"WIFI"},i=await h(this,Gi).http.fetch("/upload/youtubei",{baseURL:he.URLS.YT_UPLOAD,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","x-goog-upload-command":"start","x-goog-upload-protocol":"resumable"},body:JSON.stringify(e)});if(!i.ok)throw new w("Could not get initial upload data");return{frontend_upload_id:t,upload_id:i.headers.get("x-guploader-uploadid"),upload_url:i.headers.get("x-goog-upload-url"),scotty_resource_id:i.headers.get("x-goog-upload-header-scotty-resource-id"),chunk_granularity:i.headers.get("x-goog-upload-chunk-granularity")}},"#getInitialUploadData");Hx=a(async function(t,e){let i=await h(this,Gi).http.fetch_function(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","x-goog-upload-command":"upload, finalize","x-goog-upload-file-name":`file-${Date.now()}`,"x-goog-upload-offset":"0"},body:e});if(!i.ok)throw new w("Could not upload video");return await i.json()},"#uploadVideo");Wx=a(async function(t,e,i){return await h(this,Gi).actions.execute("/upload/createvideo",{resourceId:{scottyResourceId:{id:e.scottyResourceId}},frontendUploadId:t.frontend_upload_id,initialMetadata:{title:{newTitle:i.title},description:{newDescription:i.description,shouldSegment:!0},privacy:{newPrivacy:i.privacy||"PRIVATE"},draftState:{isDraft:!!i.is_draft}}})},"#setVideoMetadata");a(qx,"Studio");var jx=qx,aR={};Ne(aR,{AccountManager:()=>Kx,InteractionManager:()=>Jx,PlaylistManager:()=>zx});var ki,Gx=class{constructor(e){M(this,ki),P(this,ki,e)}async getInfo(e=!1){var i;if(!h(this,ki).session.logged_in)throw new w("You must be signed in to perform this operation.");if(!e&&h(this,ki).session.context.user.onBehalfOfUser)throw new w('Boolean argument must be true when "on_behalf_of_user" is specified.');if(e)return((i=(await new y({getAccountsListInnertubeEndpoint:{requestType:"ACCOUNTS_LIST_REQUEST_TYPE_CHANNEL_SWITCHER",callCircumstance:"SWITCHING_USERS_FULL"}}).call(h(this,ki),{client:"WEB",parse:!0})).actions_memo)==null?void 0:i.getType(Qc))||[];let o=await new y({getAccountsListInnertubeEndpoint:{}}).call(h(this,ki),{client:"TV"});return new D4(o)}async getSettings(){let i=await new y({browseEndpoint:{browseId:"SPaccount_overview"}}).call(h(this,ki));return new CE(h(this,ki),i)}};ki=new WeakMap;a(Gx,"AccountManager");var Kx=Gx,Me,fr,Ol,Yx=class{constructor(e){M(this,fr),M(this,Me),P(this,Me,e)}async create(e,i){if(se({title:e,video_ids:i}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");let o=await new y({createPlaylistServiceEndpoint:{title:e,videoIds:i}}).call(h(this,Me));return{success:o.success,status_code:o.status_code,playlist_id:o.data.playlistId,data:o.data}}async delete(e){if(se({playlist_id:e}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");let r=await new y({deletePlaylistServiceEndpoint:{sourcePlaylistId:e}}).call(h(this,Me));return{playlist_id:e,success:r.success,status_code:r.status_code,data:r.data}}async addToLibrary(e){if(se({playlist_id:e}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");return await new y({likeEndpoint:{status:"LIKE",target:e}}).call(h(this,Me))}async removeFromLibrary(e){if(se({playlist_id:e}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");return await new y({likeEndpoint:{status:"INDIFFERENT",target:e}}).call(h(this,Me))}async addVideos(e,i){if(se({playlist_id:e,video_ids:i}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");let o=await new y({playlistEditEndpoint:{playlistId:e,actions:i.map(s=>({action:"ACTION_ADD_VIDEO",addedVideoId:s}))}}).call(h(this,Me));return{playlist_id:e,action_result:o.data.actions}}async removeVideos(e,i,r=!1){if(se({playlist_id:e,video_ids:i}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");let o=await F(this,fr,Ol).call(this,e);if(!o.info.is_editable)throw new w("This playlist cannot be edited.",e);let s={playlistId:e,actions:[]},l=a(async d=>{let p=r?"set_video_id":"id";if(d.videos.filter(b=>i.includes(b.key(p).string())).forEach(b=>s.actions.push({action:"ACTION_REMOVE_VIDEO",setVideoId:b.key("set_video_id").string()})),s.actions.length<i.length){let b=await d.getContinuation();return l(b)}},"getSetVideoIds");if(await l(o),!s.actions.length)throw new w("Given video ids were not found in this playlist.",i);let u=await new y({playlistEditEndpoint:s}).call(h(this,Me));return{playlist_id:e,action_result:u.data.actions}}async moveVideo(e,i,r){if(se({playlist_id:e,moved_video_id:i,predecessor_video_id:r}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");let o=await F(this,fr,Ol).call(this,e);if(!o.info.is_editable)throw new w("This playlist cannot be edited.",e);let s={playlistId:e,actions:[]},l,c,u=a(async _=>{let b=_.videos.find(C=>i===C.key("id").string()),g=_.videos.find(C=>r===C.key("id").string());if(l=l||b?.key("set_video_id").string(),c=c||g?.key("set_video_id").string(),!l||!c){let C=await _.getContinuation();return u(C)}},"getSetVideoIds");await u(o),s.actions.push({action:"ACTION_MOVE_VIDEO_AFTER",setVideoId:l,movedSetVideoIdPredecessor:c});let p=await new y({playlistEditEndpoint:s}).call(h(this,Me));return{playlist_id:e,action_result:p.data.actions}}async setName(e,i){if(se({playlist_id:e,name:i}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");let r={playlist_id:e,actions:[]};r.actions.push({action:"ACTION_SET_PLAYLIST_NAME",playlistName:i});let s=await new y({playlistEditEndpoint:r}).call(h(this,Me));return{playlist_id:e,action_result:s.data.actions}}async setDescription(e,i){if(se({playlist_id:e,description:i}),!h(this,Me).session.logged_in)throw new w("You must be signed in to perform this operation.");let r={playlistId:e,actions:[]};r.actions.push({action:"ACTION_SET_PLAYLIST_DESCRIPTION",playlistDescription:i});let s=await new y({playlistEditEndpoint:r}).call(h(this,Me));return{playlist_id:e,action_result:s.data.actions}}};Me=new WeakMap;fr=new WeakSet;Ol=a(async function(t){t.startsWith("VL")||(t=`VL${t}`);let i=await new y({browseEndpoint:{browseId:t}}).call(h(this,Me),{parse:!0});return new Ta(h(this,Me),i,!0)},"#getPlaylist");a(Yx,"PlaylistManager");var zx=Yx,qe,$x=class{constructor(e){M(this,qe),P(this,qe,e)}async like(e){if(se({video_id:e}),!h(this,qe).session.logged_in)throw new Error("You must be signed in to perform this operation.");return new y({likeEndpoint:{status:"LIKE",target:e}}).call(h(this,qe),{client:"TV"})}async dislike(e){if(se({video_id:e}),!h(this,qe).session.logged_in)throw new Error("You must be signed in to perform this operation.");return new y({likeEndpoint:{status:"DISLIKE",target:e}}).call(h(this,qe),{client:"TV"})}async removeRating(e){if(se({video_id:e}),!h(this,qe).session.logged_in)throw new Error("You must be signed in to perform this operation.");return new y({likeEndpoint:{status:"INDIFFERENT",target:e}}).call(h(this,qe),{client:"TV"})}async subscribe(e){if(se({channel_id:e}),!h(this,qe).session.logged_in)throw new Error("You must be signed in to perform this operation.");return new y({subscribeEndpoint:{channelIds:[e],params:"EgIIAhgA"}}).call(h(this,qe))}async unsubscribe(e){if(se({channel_id:e}),!h(this,qe).session.logged_in)throw new Error("You must be signed in to perform this operation.");return new y({unsubscribeEndpoint:{channelIds:[e],params:"CgIIAhgA"}}).call(h(this,qe))}async comment(e,i){if(se({video_id:e,text:i}),!h(this,qe).session.logged_in)throw new Error("You must be signed in to perform this operation.");let r=z6.encode({videoId:e,params:{index:0},number:7}),o=encodeURIComponent(nt(r.finish()));return new y({createCommentEndpoint:{commentText:i,createCommentParams:o}}).call(h(this,qe))}async translate(e,i,r={}){se({text:e,target_language:i});let o=Hr(22,{text:e,target_language:i,...r}),l=await new y({performCommentActionEndpoint:{action:o}}).call(h(this,qe)),c=l.data.frameworkUpdates.entityBatchUpdate.mutations[0].payload.commentEntityPayload;return{success:l.success,status_code:l.status_code,translated_content:c.translatedContent.content,data:l.data}}async setNotificationPreferences(e,i){if(se({channel_id:e,type:i}),!h(this,qe).session.logged_in)throw new Error("You must be signed in to perform this operation.");let r={PERSONALIZED:1,ALL:2,NONE:3};if(!Object.keys(r).includes(i.toUpperCase()))throw new Error(`Invalid notification preference type: ${i}`);let o=G6.encode({channelId:e,prefId:{index:r[i.toUpperCase()]},number0:0,number1:4}),s=encodeURIComponent(nt(o.finish()));return new y({modifyChannelNotificationPreferenceEndpoint:{params:s}}).call(h(this,qe))}};qe=new WeakMap;a($x,"InteractionManager");var Jx=$x,ue,Xx=class Qx{constructor(e){M(this,ue),P(this,ue,e)}static async create(e={}){return new Qx(await sR.create(e))}async getInfo(e,i){var r,o,s,l,c;se({target:e});let u={videoId:e instanceof y?(r=e.payload)==null?void 0:r.videoId:e,playlistId:e instanceof y?(o=e.payload)==null?void 0:o.playlistId:void 0,playlistIndex:e instanceof y?(s=e.payload)==null?void 0:s.playlistIndex:void 0,params:e instanceof y?(l=e.payload)==null?void 0:l.params:void 0,racyCheckOk:!0,contentCheckOk:!0},d=new y({watchEndpoint:u}),p=new y({watchNextEndpoint:u}),_=h(this,ue),b={playbackContext:{contentPlaybackContext:{vis:0,splay:!1,lactMilliseconds:"-1",signatureTimestamp:(c=_.player)==null?void 0:c.signature_timestamp}},client:i?.client};i?.po_token?b.serviceIntegrityDimensions={poToken:i.po_token}:_.po_token&&(b.serviceIntegrityDimensions={poToken:_.po_token});let g=d.call(_.actions,b),C=p.call(_.actions),T=await Promise.all([g,C]),S=li(16);return new Pl(T,_.actions,S)}async getBasicInfo(e,i){var r;se({video_id:e});let o=new y({watchEndpoint:{videoId:e,racyCheckOk:!0,contentCheckOk:!0}}),s=h(this,ue),l={playbackContext:{contentPlaybackContext:{vis:0,splay:!1,lactMilliseconds:"-1",signatureTimestamp:(r=s.player)==null?void 0:r.signature_timestamp}},client:i?.client};i?.po_token?l.serviceIntegrityDimensions={poToken:i.po_token}:s.po_token&&(l.serviceIntegrityDimensions={poToken:s.po_token});let c=await o.call(s.actions,l),u=li(16);return new Pl([c],s.actions,u)}async getShortsVideoInfo(e,i){se({video_id:e});let r=new y({reelWatchEndpoint:{disablePlayerResponse:!1,params:"CAUwAg%3D%3D",videoId:e}}),o=h(this,ue).actions,s=r.call(o,{client:i}),l=X6.encode({shortId:e,params:{number:5},feature2:25,feature3:0}),c=encodeURIComponent(nt(l.finish())),u=o.execute("/reel/reel_watch_sequence",{sequenceParams:c}),d=await Promise.all([s,u]),p=li(16);return new uA([d[0]],o,p,d[1])}async search(e,i={}){se({query:e});let r={};if(r.filters={},i.prioritize&&(r.prioritize=H6[i.prioritize.toUpperCase()]),i.upload_date&&(r.filters.uploadDate=W6[i.upload_date.toUpperCase()]),i.type&&(r.filters.type=q6[i.type.toUpperCase()]),i.duration&&(r.filters.duration=j6[i.duration.toUpperCase()]),i.features)for(let l of i.features)switch(l){case"360":r.filters.features360=!0;break;case"3d":r.filters.features3d=!0;break;case"4k":r.filters.features4k=!0;break;case"creative_commons":r.filters.featuresCreativeCommons=!0;break;case"hd":r.filters.featuresHd=!0;break;case"hdr":r.filters.featuresHdr=!0;break;case"live":r.filters.featuresLive=!0;break;case"location":r.filters.featuresLocation=!0;break;case"purchased":r.filters.featuresPurchased=!0;break;case"subtitles":r.filters.featuresSubtitles=!0;break;case"vr180":r.filters.featuresVr180=!0;break;default:break}let s=await new y({searchEndpoint:{query:e,params:i?encodeURIComponent(nt(Aw.encode(r).finish())):void 0}}).call(h(this,ue).actions);return new yE(this.actions,s)}async getSearchSuggestions(e,i){let r=h(this,ue),o=new URL(`${st.YT_SUGGESTIONS}/complete/search`);o.searchParams.set("client","youtube"),o.searchParams.set("gs_ri","youtube"),o.searchParams.set("gs_id","0"),o.searchParams.set("cp","0"),o.searchParams.set("ds","yt"),o.searchParams.set("sugexp",z.WEB.SUGG_EXP_ID),o.searchParams.set("hl",r.context.client.hl),o.searchParams.set("gl",r.context.client.gl),o.searchParams.set("q",e),i&&o.searchParams.set("pq",i);let l=await(await r.http.fetch_function(o,{headers:{Cookie:r.cookie||""}})).text();return JSON.parse(l.replace("window.google.ac.h(","").slice(0,-1))[1].map(u=>u[0])}async getComments(e,i,r){se({video_id:e});let o={TOP_COMMENTS:0,NEWEST_FIRST:1},s=Y6.encode({ctx:{videoId:e},unkParam:6,params:{opts:{videoId:e,sortBy:o[i||"TOP_COMMENTS"],type:2,commentId:r||""},target:"comments-section"}}),l=encodeURIComponent(nt(s.finish())),u=await new y({continuationCommand:{request:"CONTINUATION_REQUEST_TYPE_WATCH_NEXT",token:l}}).call(h(this,ue).actions);return new Il(this.actions,u.data)}async getHomeFeed(){let i=await new y({browseEndpoint:{browseId:"FEwhat_to_watch"}}).call(h(this,ue).actions);return new Z4(this.actions,i)}async getGuide(){let e=await this.actions.execute("/guide");return new $4(e.data)}async getLibrary(){let i=await new y({browseEndpoint:{browseId:"FElibrary"}}).call(h(this,ue).actions);return new cE(this.actions,i)}async getHistory(){let i=await new y({browseEndpoint:{browseId:"FEhistory"}}).call(h(this,ue).actions);return new Dg(this.actions,i)}async getCourses(){let i=await new y({browseEndpoint:{browseId:"FEcourses_destination"}}).call(h(this,ue).actions,{parse:!0});return new Ge(this.actions,i)}async getSubscriptionsFeed(){let i=await new y({browseEndpoint:{browseId:"FEsubscriptions"}}).call(h(this,ue).actions,{parse:!0});return new Ge(this.actions,i)}async getChannelsFeed(){let i=await new y({browseEndpoint:{browseId:"FEchannels"}}).call(h(this,ue).actions,{parse:!0});return new Ge(this.actions,i)}async getChannel(e){var i,r;se({id:e});let s=await new y({browseEndpoint:{browseId:e}}).call(h(this,ue).actions,{parse:!0});return(r=(i=s.on_response_received_actions)==null?void 0:i[0])!=null&&r.is(pg)&&(s=await s.on_response_received_actions[0].endpoint.call(h(this,ue).actions,{parse:!0})),new H4(this.actions,s,!0)}async getNotifications(){let e=await this.actions.execute("/notification/get_notification_menu",{notificationsMenuRequestType:"NOTIFICATIONS_MENU_REQUEST_TYPE_INBOX"});return new bE(this.actions,e)}async getUnseenNotificationsCount(){var e,i,r,o;let s=await this.actions.execute("/notification/get_unseen_count");return((e=s.data)==null?void 0:e.unseenCount)||((o=(r=(i=s.data)==null?void 0:i.actions)==null?void 0:r[0].updateNotificationsUnseenCountAction)==null?void 0:o.unseenCount)||0}async getPlaylists(){let i=await new y({browseEndpoint:{browseId:"FEplaylist_aggregation"}}).call(h(this,ue).actions,{parse:!0});return new Ge(this.actions,i)}async getPlaylist(e){se({id:e}),e.startsWith("VL")||(e=`VL${e}`);let r=await new y({browseEndpoint:{browseId:e}}).call(h(this,ue).actions);return new Ta(this.actions,r)}async getHashtag(e){se({hashtag:e});let i=J6.encode({params:{hashtag:e,type:1}}),r=encodeURIComponent(nt(i.finish())),s=await new y({browseEndpoint:{browseId:"FEhashtag",params:r}}).call(h(this,ue).actions);return new iE(this.actions,s)}async getStreamingData(e,i={}){let o=(await this.getBasicInfo(e,i)).chooseFormat(i);return o.url=await o.decipher(h(this,ue).player),o}async download(e,i){return(await this.getBasicInfo(e,i)).download(i)}async resolveURL(e){let i=await this.actions.execute("/navigation/resolve_url",{url:e,parse:!0});if(!i.endpoint)throw new w("Failed to resolve URL. Expected a NavigationEndpoint but got undefined",i);return i.endpoint}async getPost(e,i){se({post_id:e,channel_id:i});let r=Z6.encode({f1:{ucid1:i,postId:e,ucid2:i}}),o=encodeURIComponent(nt(r.finish()).replace(/\+/g,"-").replace(/\//g,"_")),l=await new y({browseEndpoint:{browseId:"FEpost_detail",params:o}}).call(h(this,ue).actions,{parse:!0});return new Ge(this.actions,l)}async getPostComments(e,i,r){se({post_id:e,channel_id:i});let o={TOP_COMMENTS:0,NEWEST_FIRST:1},s=tP.encode({title:"posts",commentDataContainer:{title:"comments-section",commentData:{sortBy:o[r||"TOP_COMMENTS"],f0:2,f1:0,channelId:i,postId:e},f0:0}}),l=eP.encode({f0:{location:"FEcomment_post_detail_page_web_top_level",protoData:encodeURIComponent(nt(s.finish()).replace(/\+/g,"-").replace(/\//g,"_"))}}),c=encodeURIComponent(nt(l.finish())),d=await new y({continuationCommand:{request:"CONTINUATION_REQUEST_TYPE_BROWSE",token:c}}).call(h(this,ue).actions);return new Il(this.actions,d.data)}async getAttestationChallenge(e,i){let r={engagementType:e};return i&&(r.ids=i),this.actions.execute("/att/get",{parse:!0,...r})}call(e,i){return e.call(this.actions,i)}get music(){return new FA(h(this,ue))}get studio(){return new jx(h(this,ue))}get kids(){return new VA(h(this,ue))}get account(){return new Kx(h(this,ue).actions)}get playlist(){return new zx(h(this,ue).actions)}get interact(){return new Jx(h(this,ue).actions)}get actions(){return h(this,ue).actions}get session(){return h(this,ue)}};ue=new WeakMap;a(Xx,"Innertube");var lR=Xx,cR=lR,uR="Cache",mr,vr,Js,br,Zx=class{constructor(e=!1,i){M(this,Js),M(this,mr),M(this,vr),P(this,mr,i||""),P(this,vr,e)}get cache_dir(){return h(this,vr)?h(this,mr):""}async get(e){let i=await F(this,Js,br).call(this);if(i)return new Promise((r,o)=>{let s=i.transaction("kv-store","readonly").objectStore("kv-store").get(e);s.onerror=o,s.onsuccess=function(){var l;let c=(l=this.result)==null?void 0:l.v;c instanceof ArrayBuffer?r(c):ArrayBuffer.isView(c)?r(c.buffer):r(void 0)}})}async set(e,i){let r=await F(this,Js,br).call(this);if(r)return new Promise((o,s)=>{let l=r.transaction("kv-store","readwrite").objectStore("kv-store").put({k:e,v:i});l.onerror=s,l.onsuccess=()=>o()})}async remove(e){let i=await F(this,Js,br).call(this);if(i)return new Promise((r,o)=>{let s=i.transaction("kv-store","readwrite").objectStore("kv-store").delete(e);s.onerror=o,s.onsuccess=()=>r()})}};mr=new WeakMap;vr=new WeakMap;Js=new WeakSet;br=a(function(){let t=Reflect.get(globalThis,"indexedDB")||Reflect.get(globalThis,"webkitIndexedDB")||Reflect.get(globalThis,"mozIndexedDB")||Reflect.get(globalThis,"msIndexedDB");return t?new Promise((e,i)=>{let r=t.open("youtubei.js",1);r.onsuccess=function(){e(this.result)},r.onerror=function(o){i("indexedDB request error"),console.error(o)},r.onupgradeneeded=function(){let o=this.result.createObjectStore("kv-store",{keyPath:"k"});o.transaction.oncomplete=function(){e(this.db)}}}):wo(uR,"IndexedDB is not supported. No cache will be used.")},"#getBrowserDB");a(Zx,"Cache");var hR=Zx;ve.load({runtime:"browser",server:!1,Cache:hR,sha1Hash:CA,uuidv4(){var t;return(t=globalThis.crypto)!=null&&t.randomUUID()?globalThis.crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>{let i=parseInt(e);return(i^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>i/4).toString(16)})},eval:TA,fetch:globalThis.fetch,Request:globalThis.Request,Response:globalThis.Response,Headers:globalThis.Headers,FormData:globalThis.FormData,File:globalThis.File,ReadableStream:globalThis.ReadableStream,CustomEvent:globalThis.CustomEvent});var WW=cR;export{eR as Actions,Ji as AppendContinuationItemsAction,co as BinarySerializer,nR as ClientType,oR as Clients,he as Constants,g4 as Continuation,yl as ContinuationCommand,R1 as EventEmitter,jo as FormatUtils,LM as Generator,v4 as GridContinuation,v6 as HTTPClient,n6 as Helpers,lR as Innertube,f4 as ItemSectionContinuation,_P as JsAnalyzer,pP as JsExtractor,iP as JsHelpers,nP as JsMatchers,y4 as LiveChatContinuation,X as Log,aR as Managers,u6 as Misc,jM as Mixins,m4 as MusicPlaylistShelfContinuation,yg as MusicShelfContinuation,pg as NavigateAction,tR as OAuth2,v as Parser,ve as Platform,iR as Player,b4 as PlaylistPanelContinuation,ic as ProtoUtils,Yi as ReloadContinuationItemsCommand,fs as SectionListContinuation,sR as Session,OM as ShowMiniplayerCommand,bR as UniversalCache,i6 as Utils,qM as YT,$M as YTKids,KM as YTMusic,ql as YTNodes,JM as YTShorts,WW as default};