summaryrefslogtreecommitdiff
path: root/dot-config/spicetify/Extracted/Themed/xpui/xpui.js
diff options
context:
space:
mode:
Diffstat (limited to 'dot-config/spicetify/Extracted/Themed/xpui/xpui.js')
-rwxr-xr-xdot-config/spicetify/Extracted/Themed/xpui/xpui.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/dot-config/spicetify/Extracted/Themed/xpui/xpui.js b/dot-config/spicetify/Extracted/Themed/xpui/xpui.js
new file mode 100755
index 00000000..9a3a0e18
--- /dev/null
+++ b/dot-config/spicetify/Extracted/Themed/xpui/xpui.js
@@ -0,0 +1,2 @@
+(()=>{var e,t,n,i,r,s,a={88534:(e,t,n)=>{"use strict";n.d(t,{n:()=>a});var i=n(11283),r=n(88713),s=n(13274);const a=({icon:e,activeIcon:t,label:n,isActive:a,...o})=>(0,s.jsx)(r.Zp,{label:n,children:(0,s.jsx)(i.H,{"aria-label":`${n}, ${a?"selected":"unselected"}, button`,"aria-pressed":a,semanticColor:a?"textBrightAccent":"textSubdued",iconOnly:a?t:e,"aria-haspopup":"menu",size:"small",...o})})},80890:(e,t,n)=>{"use strict";n.d(t,{t:()=>v});var i=n(99754),r=n(18702),s=n(28760),a=n(14056),o=n(82901),l=n(70011),c=n(44054),u=n(65325),d=n(79474),m=n(20273),p=n(53603),h=n(95999),g=n(13274);const f=(0,d.memo)((function({onFeedbackReasonSelect:e}){const t=new Map([["not_relevant",a.Ru.get("ad-formats.ad-feedback.dislike.not-relevant")],["too_often",a.Ru.get("ad-formats.ad-feedback.dislike.too-often")],["unpleasant",a.Ru.get("ad-formats.ad-feedback.dislike.unpleasant-content")],["offensive",a.Ru.get("ad-formats.ad-feedback.dislike.offensive-content")],["do_not_like",a.Ru.get("ad-formats.ad-feedback.dislike.do-not-like")]]);return(0,g.jsx)(h.pZ,{value:"dislike-ad",children:(0,g.jsx)(m.W,{children:Array.from(t).map((([t,n])=>(0,g.jsx)(h.pZ,{value:n,children:(0,g.jsx)(p.D,{role:"menuitem","aria-label":n,onClick:()=>e(t,n),children:n})},t)))})})}));var b=n(88534);const v=({item:e})=>{const t=(0,i.wA)(),{logAdFeedback:n}=(0,o.L)(e),d=(0,i.d4)((t=>(0,c.N2)(t,e.id)));return(0,g.jsx)(u.b,{menu:(0,g.jsx)(f,{onFeedbackReasonSelect:(i,r)=>{e.id&&(t((0,l.NI)({adId:e.id,reason:r})),n(`dislike_${i}`))}}),children:(0,g.jsx)(b.n,{item:e,icon:r.P,activeIcon:s.X,label:a.Ru.get("ad-formats.ad-feedback.dislike"),isActive:d,"":"button-dislike-ad",onClick:()=>{if(e.id){if(d)return t((0,l.vA)({adId:e.id})),void n("cancel_dislike");t((0,l.NI)({adId:e.id})),n("dislike_menu")}}})})}},32063:(e,t,n)=>{"use strict";n.d(t,{T:()=>v});var i=n(99754),r=n(47449),s=n(85123),a=n(14056),o=n(82901),l=n(70011),c=n(44054),u=n(65325),d=n(79474),m=n(20273),p=n(53603),h=n(95999),g=n(13274);const f=(0,d.memo)((function({onFeedbackReasonSelect:e}){const t=new Map([["relevant",a.Ru.get("ad-formats.ad-feedback.like.relevant")],["interested_in_brand",a.Ru.get("ad-formats.ad-feedback.like.interested-in-brand")],["interested_in_product",a.Ru.get("ad-formats.ad-feedback.like.interested-in-product")],["enjoyable",a.Ru.get("ad-formats.ad-feedback.like.enjoyable-content")],["discovered_new",a.Ru.get("ad-formats.ad-feedback.like.discovered-new")]]);return(0,g.jsx)(h.pZ,{value:"like-ad",children:(0,g.jsx)(m.W,{children:Array.from(t).map((([t,n])=>(0,g.jsx)(h.pZ,{value:n,children:(0,g.jsx)(p.D,{role:"menuitem","aria-label":n,onClick:()=>e(t,n),children:n})},t)))})})}));var b=n(88534);const v=({item:e})=>{const t=(0,i.wA)(),{logAdFeedback:n}=(0,o.L)(e),d=(0,i.d4)((t=>(0,c.Tt)(t,e.id)));return(0,g.jsx)(u.b,{menu:(0,g.jsx)(f,{onFeedbackReasonSelect:(i,r)=>{e.id&&(t((0,l.F$)({adId:e.id,reason:r})),n(`like_${i}`))}}),children:(0,g.jsx)(b.n,{item:e,icon:r.G,activeIcon:s.q,label:a.Ru.get("ad-formats.ad-feedback.like"),isActive:d,"":"button-like-ad",onClick:()=>{if(e.id){if(d)return t((0,l.D$)({adId:e.id})),void n("cancel_like");t((0,l.F$)({adId:e.id})),n("like_menu")}}})})}},30323:(e,t,n)=>{"use strict";n.d(t,{Cp:()=>r,bT:()=>a,dY:()=>o,mr:()=>l});var i=n(79474);const r=(0,i.createContext)({adsAPI:null,homeAds:null}),s=()=>{const{adsAPI:e}=(0,i.useContext)(r);if(null===e)throw new Error("useAdsAPI must be used within a AdsAPIProvider");return e},a=()=>{const{home:e}=s(),t=(0,i.useContext)(r);if(!t.homeAds)throw new Error("useHomeAdsAPI must be used within a HomeAdsProvider");return{...e,...t.homeAds}},o=()=>s().inStreamApi,l=()=>o().getInStreamAd()},98756:(e,t,n)=>{"use strict";n.d(t,{o:()=>w});var i=n(79474),r=n(98764),s=n(98196),a=n(57797),o=n(69956),l=n(14056),c=n(94710),u=n(2394),d=n(75783),m=n(48761),p=n(78278),h=n(61080),g=n(30957),f=n(60516);const b="c5Ml9BbBuUEHjNkcSwZA";var v=n(13274);const y="70px",_=({adId:e,advertiser:t,tagline:n,displayImage:i,buttonMessage:r,cardOnClick:s,buttonOnClick:a,clickthroughUrl:o})=>(0,v.jsx)(g.default,{to:(0,f.H)(o),className:b,"":"leavebehind",children:(0,v.jsx)(u.v,{onClick:s,onClickHint:l.Ru.get("ad-formats.learnMore"),layout:"wide",variant:"tinted",id:e,size:"xl",title:(0,v.jsx)(d.d,{weight:"bold",variant:"ballad",lineClamp:1,"":"leavebehind-advertiser",children:t}),subtitle:(0,v.jsx)(m.j,{as:"div",lineClamp:2,"":"leavebehind-tagline",children:n}),media:(0,v.jsx)(p.C,{"":"leavebehind-image",src:i.src,alt:i.alt,imageHeight:y,imageWidth:y,size:"xl"}),trailing:(0,v.jsx)(h.$,{onClick:()=>{a&&a()},"":"leavebehind-button",colorSet:"invertedLight",size:"small","aria-label":l.Ru.get("ad-formats.learnMore"),children:r})})});var E=n(44366),x=n(55732),C=n(9997);const S="LiTVYPfVqFDCXyHlWrb8",A="UQjif4A_XK9YaXgFvqBO",w=({leavebehinds:e,seeAllButton:t,surface:n,uri:u})=>{const d=(0,c.vh)(),m=(0,E.w)(E.P),[p,h]=(0,i.useState)(void 0);(0,i.useEffect)((()=>{e&&e.length>0&&p!==e[0].requestId&&u&&(e.forEach(((e,t)=>{e.uri===u&&(e.trackingEvents?.viewed.forEach((async t=>{try{await m(t)}catch(i){const r=i;d.send((0,a.G)({error_type:"trackingURLFailure",error_message:r.message,http_error_code:422,surface:(0,x.Fh)(n),request_url:t,request_type:"leavebehindAds",lineitem_id:e.lineitemId,ad_content_origin:(0,C.Zl)(n)}))}})),d.send((0,o.x)({leavebehind_lineitem_id:e.lineitemId,leavebehind_request_id:e.requestId,event:"event_viewed",event_reason:`viewed_on_${(0,x.Fh)(n).toLowerCase()}`,surface:(0,x.Fh)(n),surface_position:t+1,uri:u})))})),h(e[0].requestId))}),[d,m,e,u,n,p]);const g=({eventReason:e,lineitemId:t,requestId:i,trackingEvents:r,surfacePosition:s})=>{((e,t)=>{t?.forEach((async t=>{try{await m(t)}catch(i){const r=i;d.send((0,a.G)({error_type:"trackingURLFailure",error_message:r.name,http_error_code:422,surface:(0,x.Fh)(n),request_url:t,request_type:"leavebehindAds",lineitem_id:e,ad_content_origin:(0,C.Zl)(n)}))}}))})(t,r),d.send((0,o.x)({leavebehind_lineitem_id:t,leavebehind_request_id:i,event:"event_clicked",event_reason:e,surface:(0,x.Fh)(n),surface_position:s,uri:u}))};return(0,v.jsxs)("section",{"":"leavebehinds-wrapper",children:[(0,v.jsxs)("div",{className:A,children:[(0,v.jsx)(r.E,{as:"h2",semanticColor:"textBase",variant:"titleSmall",paddingBottom:s.CJ,"":"leavebehinds-title",children:l.Ru.get("podcast-ads.recent_ads")}),t]}),(0,v.jsx)("div",{className:S,"":"leavebehinds-list-wrapper",children:e.map(((e,t)=>(0,v.jsx)(_,{...e,buttonOnClick:()=>{g({eventReason:"button_clicked",lineitemId:e.lineitemId,trackingEvents:e.trackingEvents?.clicked,requestId:e.requestId,surfacePosition:t+1})},cardOnClick:()=>{g({eventReason:"card_clicked",lineitemId:e.lineitemId,trackingEvents:e.trackingEvents?.clicked,requestId:e.requestId,surfacePosition:t+1})}},e.adId)))})]})}},84958:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var i=n(79474),r=n(57797),s=n(22215),a=n(94345),o=n(94710),l=n(19498),c=n(21361),u=n(55732),d=n(9997);const m=function(e){const[t,n]=(0,i.useState)(),[m,p]=(0,i.useState)(!1),h=(0,o.vh)(),g=(0,s.NC)(l.SAn,{loadingValue:!1});return{data:t,error:m,getLeavebehinds:(0,i.useCallback)((async()=>{try{const t=await a.b6(c.n.getInstance(),(0,u.Fh)(e.surface),e.uri,e.playlistName,g);n(t.body)}catch(t){const n=t;h.send((0,r.G)({error_type:"fetchAdsFailure",error_message:n.name,http_error_code:n.status,surface:(0,u.Fh)(e.surface),request_type:"leavebehindAds",ad_content_origin:(0,d.Zl)(e.surface)})),p(!0)}}),[h,e.playlistName,e.surface,e.uri,g])}}},9997:(e,t,n)=>{"use strict";n.d(t,{E9:()=>o,NI:()=>u,Qd:()=>a,Zl:()=>c,iT:()=>l,pU:()=>r,un:()=>s});var i=n(55732);const r=2,s=3,a=6,o=8,l=(e,t)=>{const n=e.leavebehindAds;let i=[];return n&&(i=n.map((n=>({adId:n.adId,advertiser:n.advertiser,tagline:n.tagline,displayImage:{src:n?.logoImage||n?.displayImage,alt:`${n.advertiser} logo`},buttonMessage:n.buttonMessage,clickthroughUrl:n.clickthroughUrl,trackingEvents:n.trackingEvents,requestId:e.requestId,lineitemId:n.lineitemId,uri:t})))),i};function c(e){switch(e){case i.ui.PODCAST_SCROLL_NPV:case i.ui.SHOW_PAGE:case i.ui.EPISODE_PAGE:case i.ui.PODCAST_SEE_ALL:return"podcast";case i.ui.MUSIC_NPV:case i.ui.PLAYLIST:case i.ui.MUSIC_SEE_ALL:return"music";case i.ui.UNKNOWN:return"unknown";case i.ui.UNRECOGNIZED:default:return"unrecognized"}}function u(e){switch(e){case i.ui.EPISODE_PAGE:case i.ui.PODCAST_SEE_ALL:case i.ui.PLAYLIST:case i.ui.MUSIC_SEE_ALL:case i.ui.SHOW_PAGE:return o;case i.ui.MUSIC_NPV:case i.ui.PODCAST_SCROLL_NPV:case i.ui.UNKNOWN:case i.ui.UNRECOGNIZED:default:return}}},97997:(e,t,n)=>{"use strict";n.d(t,{E:()=>c});var i=n(97500),r=n.n(i),s=n(38417),a=n(68811),o=n(41549),l=n(13274);const c=({backgroundColor:e,children:t,style:n})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.K,{backgroundColor:e}),(0,l.jsx)(a.a,{children:(0,l.jsx)("div",{className:r()(o.A.ActionBar,"contentSpacing"),style:n,"":"action-bar",children:t})})]})},38417:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});const i="main-actionBarBackground-background";var r=n(13274);const s=({backgroundColor:e})=>(0,r.jsx)("div",{className:i,style:{backgroundColor:e}})},5513:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var i=n(41549),r=n(13274);const s=({testId:e,children:t})=>(0,r.jsx)("div",{className:i.A.ActionBarRow,"":e??"action-bar-row",children:t})},72120:(e,t,n)=>{"use strict";n.d(t,{x:()=>C});var i=n(97500),r=n.n(i),s=n(98764),a=n(23689),o=n(58073),l=n(11283),c=n(66675),u=n(61080),d=n(14056),m=n(43491),p=n(59560);const h="lIp2JaiMRS6_yF05q5N9",g="uzQIGWrDxI1E09vQnrXk",f="s58sp4t3h1uU9n_42KqD",b="c0KyMkxeMCWQGE7cR8s_",v="I2hCY2G1sJIBaTtEfJt_",y="bXJ77rNIJ18Y0GfegQdr",_="y9bkifFKNExwjaoINLm9",E="Qsmn7PN8jFZ8tATBCnFs";var x=n(13274);const C=({title:e,description:t,id:n,visible:i,primaryButtonText:C,secondaryButtonText:S,checkboxText:A,onHide:w,onPrimaryButtonClick:I,onSecondaryButtonClick:T=w,onCheckboxClick:N,onCloseClick:R=T,showButtons:k=!0,children:O,placement:P="auto",hideArrow:j,className:L,popperOptions:D,zIndex:U,maxWidth:M,tippyClassName:B,tippyWrapperClassName:F,hideOnClickOutside:H=!0,useSecondaryStyling:V=!1,childRef:z,fadeOut:G=!1,renderInline:W=!0,descriptionId:K})=>(0,x.jsx)(m.W,{renderInline:W,visible:i,placement:P,hideArrow:j,popperOptions:D,className:B,tippyWrapperClassName:F,zIndex:U,maxWidth:M,onHide:H?w:()=>{},childRef:z,fadeOut:G,overlay:(0,x.jsxs)("div",{className:r()(h,L),"":`${n}-hook`,children:[(0,x.jsxs)("div",{className:g,children:[(0,x.jsx)(s.E,{as:"p",className:f,variant:"bodyMediumBold",children:e}),!k&&(0,x.jsx)(p.a,{size:"sm",className:E,onClick:e=>R?.(e),ariaLabel:d.Ru.get("close"),icon:a.M})]}),(0,x.jsx)(s.E,{as:"p",className:b,variant:"bodySmall",id:K,children:t}),k&&(0,x.jsxs)("div",{className:v,children:[(0,x.jsx)("div",{children:A&&(0,x.jsx)(o.c,{id:"dont.show.onboarding.npv",onChange:N,semanticColor:"essentialBase",className:y,children:(0,x.jsx)(s.E,{variant:"bodySmall",children:A()})})}),(0,x.jsxs)("div",{className:_,children:[S&&(0,x.jsx)(l.H,{onClick:T,size:"small",children:S()}),C&&(V?(0,x.jsx)(c.n,{onClick:I,size:"small",children:C()}):(0,x.jsx)(u.$,{colorSet:"invertedLight",onClick:I,size:"small",children:C()}))]})]})]}),children:O})},90730:(e,t,n)=>{"use strict";n.d(t,{k:()=>u});var i=n(79474),r=n(14056),s=n(22792),a=n(47530),o=n(36471),l=n(48956),c=n(13274);const u=({id:e,children:t,targetURI:n,fadeOut:u=!1})=>{const d=(0,i.useCallback)((()=>{window.open((0,a.rw)(n).href)}),[n]),m={getTitle:()=>r.Ru.get("action-trigger.available-in-app-only"),getDescription:()=>r.Ru.get("action-trigger.listen-mixed-media-episode"),primaryButtonText:()=>r.Ru.get("action-trigger.button.get-app"),secondaryButtonText:()=>r.Ru.get("action-trigger.button.not-now"),isCTA:!0,intentPrimaryButton:"download-app",onLogInteraction:(0,o.W)(),shouldHideOnScroll:!0,fadeOut:u};return(0,c.jsx)(s.U,{className:l.A.container,id:e,onPrimaryButtonClick:d,options:m,children:t})}},85212:(e,t,n)=>{"use strict";n.d(t,{D:()=>m,y:()=>p});var i=n(79474),r=n(99754),s=n(14056),a=n(22792),o=n(43491),l=n(51654),c=n(36471),u=n(48956),d=n(13274);const m=o.d,p=({id:e,options:t,children:n})=>{const o=(0,r.wA)(),p=(0,i.useCallback)((()=>{o((0,l.zL)())}),[o]),h=(0,c.W)(),g={isCTA:!0,placement:m.rightTop,...t,primaryButtonText:()=>s.Ru.get("login"),secondaryButtonText:()=>s.Ru.get("action-trigger.button.not-now"),onLogInteraction:h};return(0,d.jsx)(a.U,{className:u.A.container,id:e,onPrimaryButtonClick:p,options:g,children:n})}},82924:(e,t,n)=>{"use strict";n.d(t,{M:()=>j,t:()=>O});var i=n(79474),r=n(81887),s=n(16212),a=n(60923),o=n(97665),l=n(11283),c=n(22215),u=n(14056),d=n(88713),m=n(13274);const p=(0,i.memo)((function({size:e,onEnd:t}){return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:1.3*e,height:1.3*e,viewBox:"0 0 384 384",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(1.3*e-e)/2}px`},children:[(0,m.jsxs)("g",{id:"_R_G",children:[(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_4_G",transform:" translate(0, 0.006) translate(0, 0)",children:(0,m.jsx)("path",{id:"_R_G_L_4_G_D_0_P_0",fill: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),fillOpacity:"1",fillRule:"nonzero",d:" M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z "})})})})}),(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_3_G",children:(0,m.jsx)("path",{id:"_R_G_L_3_G_D_0_P_0",fill: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),fillOpacity:"1",fillRule:"nonzero",d:" M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z "})})})})}),(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_2_G",children:(0,m.jsx)("path",{id:"_R_G_L_2_G_D_0_P_0",stroke: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -162 C89.41,-162 162,-89.41 162,0 C162,89.41 89.41,162 0,162 C-89.41,162 -162,89.41 -162,0 C-162,-89.41 -89.41,-162 0,-162z "})})})})}),(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_1_G",children:(0,m.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",fill: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),fillOpacity:"1",fillRule:"nonzero",d:" M96 -7 C96,-7 96,7 96,7 C96,7 -96,7 -96,7 C-96,7 -96,-7 -96,-7 C-96,-7 96,-7 96,-7z M7 -96 C7,-96 7,96 7,96 C7,96 -7,96 -7,96 C-7,96 -7,-96 -7,-96 C-7,-96 7,-96 7,-96z "})})})})}),(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_0_G",transform:" rotate(-130) scale(1.03, 1.03)",children:(0,m.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",fill:"#1ed760",fillOpacity:"1",fillRule:"nonzero",d:" M-92.21 15.2 C-92.21,15.2 -27.04,91.53 -27.04,91.53 C-27.04,91.53 94.27,-50.53 94.27,-50.53 C94.27,-50.53 75.27,-66.67 75.27,-66.67 C75.27,-66.67 -27.04,53.15 -27.04,53.15 C-27.04,53.15 -75.83,-3.92 -75.83,-3.92 C-75.83,-3.92 -92.21,15.2 -92.21,15.2z M-162 0 C-162,-89.47 -89.47,-162 0,-162 C89.47,-162 162,-89.47 162,0 C162,89.47 89.47,162 0,162 C-89.47,162 -162,89.47 -162,0z "})})})})})]}),(0,m.jsx)("g",{id:"time_group"}),(0,m.jsxs)("defs",{children:[(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_D_0_P_0",fill:"freeze",attributeName:"fill",from: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),to: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),keyTimes:"0;0.9090909;0.9545455;1",values:"#b3b3b3;#1db954;#1ed760;#1ed760",keySplines:"0 0 0 1;0.328 0.103 0.661 1;0 0 0 0",calcMode:"spline",ref:e=>{e&&e.addEventListener("endEvent",t,{once:!0})}}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z ",to:"M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z ",keyTimes:"0;0.9545455;1",values:"M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ;M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ;M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ",keySplines:"0 0 0.34 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_T_0",fill:"freeze",attributeName:"transform",from:"1 1",to:"0.99 0.99",type:"scale",additive:"sum",keyTimes:"0;0.9545455;1",values:"1 1;0.99 0.99;0.99 0.99",keySplines:"0.692 0 0.64 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"0",keyTimes:"0;0.0454545;0.0454591;0.9545455;0.9545455;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_D_0_P_0",fill:"freeze",attributeName:"fill",from: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),to: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),keyTimes:"0;0.1818182;0.4545455;1",values:"#b3b3b3;#b3b3b3;#121212;#121212",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z ",to:"M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z ",keyTimes:"0;0.9545455;1",values:"M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z M6 -96 C6,-96 6,96 6,96 C6,96 -6,96 -6,96 C-6,96 -6,-96 -6,-96 C-6,-96 6,-96 6,-96z ;M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z M87.74 -37.48 C87.74,-37.48 70.28,60.99 70.28,60.99 C70.28,60.99 46.22,61 46.22,61 C46.22,61 62.59,-37.21 62.59,-37.21 C62.59,-37.21 87.74,-37.48 87.74,-37.48z ;M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z M87.74 -37.48 C87.74,-37.48 70.28,60.99 70.28,60.99 C70.28,60.99 46.22,61 46.22,61 C46.22,61 62.59,-37.21 62.59,-37.21 C62.59,-37.21 87.74,-37.48 87.74,-37.48z ",keySplines:"0.66 0 0.34 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"0",to:"130",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"0;130;130",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"0",keyTimes:"0;0.0454545;0.0454591;0.9545455;0.9545455;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"0",to:"130",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"0;130;130",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"1",to:"0",keyTimes:"0;0.0454545;0.0454546;1",values:"1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"0",to:"130",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"0;130;130",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"1",to:"0",keyTimes:"0;0.0454545;0.0454546;1",values:"1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G",fill:"freeze",attributeName:"opacity",from:"0",to:"1",keyTimes:"0;0.7727273;0.9545455;1",values:"0;0;1;1",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"0",to:"130",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"0;130;130",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"1",keyTimes:"0;0.7727273;0.7727318;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"0s",from:"0",to:"1",xlinkHref:"#time_group"})]})]})})),h=(0,i.memo)((function({size:e,onEnd:t}){return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:1.3*e,height:1.3*e,viewBox:"0 0 384 384",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(1.3*e-e)/2}px`},children:[(0,m.jsxs)("g",{id:"_R_G",children:[(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_4_G",transform:" translate(0, 0.006) translate(0, 0)",children:(0,m.jsx)("path",{id:"_R_G_L_4_G_D_0_P_0",fill:"#1ed760",fillOpacity:"1",fillRule:"nonzero",d:" M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z "})})})})}),(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_3_G",children:(0,m.jsx)("path",{id:"_R_G_L_3_G_D_0_P_0",fill:"#121212",fillOpacity:"1",fillRule:"nonzero",d:" M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z "})})})})}),(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_2_G",transform:" rotate(-130) scale(1.03, 1.03)",children:(0,m.jsx)("path",{id:"_R_G_L_2_G_D_0_P_0",fill:"#1ed760",fillOpacity:"1",fillRule:"nonzero",d:" M-92.21 15.2 C-92.21,15.2 -27.04,91.53 -27.04,91.53 C-27.04,91.53 94.27,-50.53 94.27,-50.53 C94.27,-50.53 75.27,-66.67 75.27,-66.67 C75.27,-66.67 -27.04,53.15 -27.04,53.15 C-27.04,53.15 -75.83,-3.92 -75.83,-3.92 C-75.83,-3.92 -92.21,15.2 -92.21,15.2z M-162 0 C-162,-89.47 -89.47,-162 0,-162 C89.47,-162 162,-89.47 162,0 C162,89.47 89.47,162 0,162 C-89.47,162 -162,89.47 -162,0z "})})})})}),(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_1_G",children:(0,m.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",fill: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),fillOpacity:"1",fillRule:"nonzero",d:" M96 -7 C96,-7 96,7 96,7 C96,7 -96,7 -96,7 C-96,7 -96,-7 -96,-7 C-96,-7 96,-7 96,-7z M7 -96 C7,-96 7,96 7,96 C7,96 -7,96 -7,96 C-7,96 -7,-96 -7,-96 C-7,-96 7,-96 7,-96z "})})})})}),(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_0_G",children:(0,m.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",stroke: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -162 C89.41,-162 162,-89.41 162,0 C162,89.41 89.41,162 0,162 C-89.41,162 -162,89.41 -162,0 C-162,-89.41 -89.41,-162 0,-162z "})})})})})]}),(0,m.jsx)("g",{id:"time_group"}),(0,m.jsxs)("defs",{children:[(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_D_0_P_0",fill:"freeze",attributeName:"fill",from:"#1ed760",to:"#1ed760",keyTimes:"0;0.9545455;1",values:"#1ed760;#b3b3b3;#b3b3b3",keySplines:"1 0 1 1;0 0 0 0",calcMode:"spline",ref:e=>{e&&e.addEventListener("endEvent",t,{once:!0})}}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z ",to:"M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z ",keyTimes:"0;0.9545455;1",values:"M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ;M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ;M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ",keySplines:"0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_T_0",fill:"freeze",attributeName:"transform",from:"0.99 0.99",to:"1 1",type:"scale",additive:"sum",keyTimes:"0;0.9545455;1",values:"0.99 0.99;1 1;1 1",keySplines:"0.66 0 0.34 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"0",keyTimes:"0;0.0454545;0.0454591;0.9545455;0.9545455;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_D_0_P_0",fill:"freeze",attributeName:"fill",from:"#121212",to:"#121212",keyTimes:"0;0.0454545;0.1818182;1",values:"#121212;#121212;#b3b3b3;#b3b3b3",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z ",to:"M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z ",keyTimes:"0;0.9545455;1",values:"M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z M87.74 -37.48 C87.74,-37.48 70.28,60.99 70.28,60.99 C70.28,60.99 46.22,61 46.22,61 C46.22,61 62.59,-37.21 62.59,-37.21 C62.59,-37.21 87.74,-37.48 87.74,-37.48z ;M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z M6 -96 C6,-96 6,96 6,96 C6,96 -6,96 -6,96 C-6,96 -6,-96 -6,-96 C-6,-96 6,-96 6,-96z ;M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z M6 -96 C6,-96 6,96 6,96 C6,96 -6,96 -6,96 C-6,96 -6,-96 -6,-96 C-6,-96 6,-96 6,-96z ",keySplines:"0.66 0 0.34 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"-230",to:"0",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"-230;0;0",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"0",keyTimes:"0;0.0454545;0.0454591;0.9545455;0.9545455;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"-230",to:"0",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"-230;0;0",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"1",to:"0",keyTimes:"0;0.0454545;0.0454546;1",values:"1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"-230",to:"0",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"-230;0;0",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"1",keyTimes:"0;0.9545455;0.95455;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"-230",to:"0",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"-230;0;0",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"1",keyTimes:"0;0.9545455;0.95455;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"0s",from:"0",to:"1",xlinkHref:"#time_group"})]})]})}));var g=n(59841);const f=(0,i.memo)((function({size:e,onEnd:t}){const n=e>16?2.35:2.5;return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:e*n,height:e*n,viewBox:"0 0 224 224",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(e*n-e)/2}px`},children:[(0,m.jsxs)("defs",{children:[(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G_D_0_P_0",fill:"freeze",attributeName:"stroke-width",from:30,to:0,keyTimes:"0;0.1219512;0.804878;1",values:"30;30;0;0",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline",ref:e=>{e&&e.addEventListener("endEvent",t,{once:!0})}}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G_D_0_P_0",fill:"freeze",attributeName:"rx",from:15,to:110,keyTimes:"0;0.1219512;0.804878;1",values:"15;15;110;110",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G_D_0_P_0",fill:"freeze",attributeName:"ry",from:15,to:110,keyTimes:"0;0.1219512;0.804878;1",values:"15;15;110;110",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.1219512;0.804878;1",values:"1;1;0;0",keySplines:"0.2 0 0.4 1;0.2 0 0.4 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.1219512;0.1219537;0.8292683;0.8292683;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G_D_0_P_0",fill:"freeze",attributeName:"stroke-width",from:30,to:0,keyTimes:"0;0.2926829;0.9756098;1",values:"30;30;0;0",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G_D_0_P_0",fill:"freeze",attributeName:"rx",from:15,to:110,keyTimes:"0;0.2926829;0.9756098;1",values:"15;15;110;110",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G_D_0_P_0",fill:"freeze",attributeName:"ry",from:15,to:110,keyTimes:"0;0.2926829;0.9756098;1",values:"15;15;110;110",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.2926829;0.9756098;1",values:"1;1;0;0",keySplines:"0.2 0 0.4 1;0.2 0 0.4 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G_M",fill:"freeze",attributeName:"opacity",from:0,to:1,keyTimes:"0;0.2926829;0.2926854;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_5_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.7804878;1",values:"1;0;0",keySplines:"0.6 0 0.7 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_5_G",fill:"freeze",keyTimes:"0;0.7804878;1",path:"M122.25 123.17 C200.25,137.25 197.5,23.92 197.5,23.92 C197.5,23.92 197.5,23.92 197.5,23.92 ",keyPoints:"0;1;1",keySplines:"0.95 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_5_G",fill:"freeze",attributeName:"transform",from:"0.6 0.6",to:"0.9 0.9",type:"scale",additive:"sum",keyTimes:"0;0.7804878;1",values:"0.6 0.6;0.9 0.9;0.9 0.9",keySplines:"0.8 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_5_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.2439024;0.2439049;0.804878;0.8048781;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_4_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.6585366;1",values:"1;0;0",keySplines:"0.6 0 1 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_4_G",fill:"freeze",keyTimes:"0;0.6585366;1",path:"M98 105.92 C19.75,106.25 32.25,37.42 32.25,37.42 C32.25,37.42 32.25,37.42 32.25,37.42 ",keyPoints:"0;1;1",keySplines:"0.95 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_4_G",fill:"freeze",attributeName:"transform",from:"0.6 0.6",to:"0.9 0.9",type:"scale",additive:"sum",keyTimes:"0;0.6585366;1",values:"0.6 0.6;0.9 0.9;0.9 0.9",keySplines:"0.8 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_4_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.2439024;0.2439049;0.6829268;0.6829269;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_3_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.7317073;1",values:"1;0;0",keySplines:"0.6 0 1 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_3_G",fill:"freeze",keyTimes:"0;0.7317073;1",path:"M112.5 123.17 C73.75,194.5 72,43.17 72,43.17 C72,43.17 72,43.17 72,43.17 ",keyPoints:"0;1;1",keySplines:"0.95 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_3_G",fill:"freeze",attributeName:"transform",from:"0.6 0.6",to:"0.9 0.9",type:"scale",additive:"sum",keyTimes:"0;0.7317073;1",values:"0.6 0.6;0.9 0.9;0.9 0.9",keySplines:"0.8 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_3_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.2439024;0.2439049;0.804878;0.8048781;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_2_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.804878;1",values:"1;0;0",keySplines:"0.6 0 1 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_2_G",fill:"freeze",keyTimes:"0;0.804878;1",path:"M112 134.92 C160.75,190.75 155.25,45.67 155.25,45.67 C155.25,45.67 155.25,45.67 155.25,45.67 ",keyPoints:"0;1;1",keySplines:"0.95 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_2_G",fill:"freeze",attributeName:"transform",from:"0.6 0.6",to:"0.9 0.9",type:"scale",additive:"sum",keyTimes:"0;0.804878;1",values:"0.6 0.6;0.9 0.9;0.9 0.9",keySplines:"0.8 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_2_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.2439024;0.2439049;0.8536585;0.8536586;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_0",fill:"freeze",attributeName:"fill",from:g.white,to:g.white,keyTimes:"0;0.1219512;0.2439024;1",values:"#ffffff;#ffffff;#1db954;#1db954",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M-6.18 -8.52 C-5.37,-8.78 -4.5,-8.82 -3.67,-8.63 C-2.84,-8.43 -2.07,-8.02 -1.46,-7.43 C-1.46,-7.43 -1.45,-7.43 -1.45,-7.43 C-1.06,-7.06 -0.54,-6.85 0,-6.85 C0.54,-6.85 1.06,-7.06 1.45,-7.43 C1.45,-7.43 1.46,-7.43 1.46,-7.43 C1.99,-7.94 2.63,-8.31 3.32,-8.53 C4.02,-8.75 4.76,-8.8 5.48,-8.69 C6.44,-8.53 7.34,-8.08 8.04,-7.41 C8.74,-6.73 9.22,-5.85 9.41,-4.9 C9.55,-4.2 9.53,-3.48 9.34,-2.79 C9.16,-2.11 8.83,-1.47 8.36,-0.93 C8.36,-0.93 0.4,8.56 0.4,8.56 C0.35,8.62 0.29,8.67 0.22,8.7 C0.15,8.73 0.08,8.75 0,8.75 C-0.07,8.75 -0.15,8.73 -0.22,8.7 C-0.29,8.67 -0.35,8.62 -0.39,8.56 C-0.39,8.56 -8.35,-0.92 -8.35,-0.92 C-8.35,-0.92 -8.36,-0.93 -8.36,-0.93 C-8.83,-1.47 -9.16,-2.11 -9.35,-2.79 C-9.53,-3.48 -9.55,-4.2 -9.41,-4.9 C-9.41,-4.9 -9.41,-4.9 -9.41,-4.9 C-9.25,-5.74 -8.86,-6.52 -8.29,-7.16 C-7.73,-7.79 -7,-8.27 -6.18,-8.52z ",to:"M0.03 0 C0.02,0 0.02,0 0.02,0 C0.01,0 0.01,0 0.01,-0.01 C0.01,-0.01 0.01,-0.01 0.01,-0.01 C0,-0.01 0,-0.01 0,-0.01 C0,-0.01 0,-0.01 -0.01,-0.01 C-0.01,-0.01 -0.01,-0.01 -0.01,-0.01 C-0.01,0 -0.01,0 -0.01,0 C-0.02,0 -0.02,0 -0.02,0 C-0.03,0 -0.03,0 -0.03,-0.01 C-0.04,-0.01 -0.04,-0.01 -0.04,-0.02 C-0.04,-0.02 -0.04,-0.02 -0.04,-0.02 C-0.04,-0.03 -0.04,-0.03 -0.03,-0.03 C-0.03,-0.03 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0.03,-0.03 0.03,-0.03 C0.03,-0.03 0.03,-0.03 0.03,-0.03 C0.04,-0.03 0.04,-0.03 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.01 0.04,-0.01 0.03,-0.01 C0.03,0 0.03,0 0.03,0z ",keyTimes:"0;0.1219512;0.2439024;1",values:"M-6.18 -8.52 C-5.37,-8.78 -4.5,-8.82 -3.67,-8.63 C-2.84,-8.43 -2.07,-8.02 -1.46,-7.43 C-1.46,-7.43 -1.45,-7.43 -1.45,-7.43 C-1.06,-7.06 -0.54,-6.85 0,-6.85 C0.54,-6.85 1.06,-7.06 1.45,-7.43 C1.45,-7.43 1.46,-7.43 1.46,-7.43 C1.99,-7.94 2.63,-8.31 3.32,-8.53 C4.02,-8.75 4.76,-8.8 5.48,-8.69 C6.44,-8.53 7.34,-8.08 8.04,-7.41 C8.74,-6.73 9.22,-5.85 9.41,-4.9 C9.55,-4.2 9.53,-3.48 9.34,-2.79 C9.16,-2.11 8.83,-1.47 8.36,-0.93 C8.36,-0.93 0.4,8.56 0.4,8.56 C0.35,8.62 0.29,8.67 0.22,8.7 C0.15,8.73 0.08,8.75 0,8.75 C-0.07,8.75 -0.15,8.73 -0.22,8.7 C-0.29,8.67 -0.35,8.62 -0.39,8.56 C-0.39,8.56 -8.35,-0.92 -8.35,-0.92 C-8.35,-0.92 -8.36,-0.93 -8.36,-0.93 C-8.83,-1.47 -9.16,-2.11 -9.35,-2.79 C-9.53,-3.48 -9.55,-4.2 -9.41,-4.9 C-9.41,-4.9 -9.41,-4.9 -9.41,-4.9 C-9.25,-5.74 -8.86,-6.52 -8.29,-7.16 C-7.73,-7.79 -7,-8.27 -6.18,-8.52z ;M-6.18 -8.52 C-5.37,-8.78 -4.5,-8.82 -3.67,-8.63 C-2.84,-8.43 -2.07,-8.02 -1.46,-7.43 C-1.46,-7.43 -1.45,-7.43 -1.45,-7.43 C-1.06,-7.06 -0.54,-6.85 0,-6.85 C0.54,-6.85 1.06,-7.06 1.45,-7.43 C1.45,-7.43 1.46,-7.43 1.46,-7.43 C1.99,-7.94 2.63,-8.31 3.32,-8.53 C4.02,-8.75 4.76,-8.8 5.48,-8.69 C6.44,-8.53 7.34,-8.08 8.04,-7.41 C8.74,-6.73 9.22,-5.85 9.41,-4.9 C9.55,-4.2 9.53,-3.48 9.34,-2.79 C9.16,-2.11 8.83,-1.47 8.36,-0.93 C8.36,-0.93 0.4,8.56 0.4,8.56 C0.35,8.62 0.29,8.67 0.22,8.7 C0.15,8.73 0.08,8.75 0,8.75 C-0.07,8.75 -0.15,8.73 -0.22,8.7 C-0.29,8.67 -0.35,8.62 -0.39,8.56 C-0.39,8.56 -8.35,-0.92 -8.35,-0.92 C-8.35,-0.92 -8.36,-0.93 -8.36,-0.93 C-8.83,-1.47 -9.16,-2.11 -9.35,-2.79 C-9.53,-3.48 -9.55,-4.2 -9.41,-4.9 C-9.41,-4.9 -9.41,-4.9 -9.41,-4.9 C-9.25,-5.74 -8.86,-6.52 -8.29,-7.16 C-7.73,-7.79 -7,-8.27 -6.18,-8.52z ;M0.03 0 C0.02,0 0.02,0 0.02,0 C0.01,0 0.01,0 0.01,-0.01 C0.01,-0.01 0.01,-0.01 0.01,-0.01 C0,-0.01 0,-0.01 0,-0.01 C0,-0.01 0,-0.01 -0.01,-0.01 C-0.01,-0.01 -0.01,-0.01 -0.01,-0.01 C-0.01,0 -0.01,0 -0.01,0 C-0.02,0 -0.02,0 -0.02,0 C-0.03,0 -0.03,0 -0.03,-0.01 C-0.04,-0.01 -0.04,-0.01 -0.04,-0.02 C-0.04,-0.02 -0.04,-0.02 -0.04,-0.02 C-0.04,-0.03 -0.04,-0.03 -0.03,-0.03 C-0.03,-0.03 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0.03,-0.03 0.03,-0.03 C0.03,-0.03 0.03,-0.03 0.03,-0.03 C0.04,-0.03 0.04,-0.03 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.01 0.04,-0.01 0.03,-0.01 C0.03,0 0.03,0 0.03,0z ;M0.03 0 C0.02,0 0.02,0 0.02,0 C0.01,0 0.01,0 0.01,-0.01 C0.01,-0.01 0.01,-0.01 0.01,-0.01 C0,-0.01 0,-0.01 0,-0.01 C0,-0.01 0,-0.01 -0.01,-0.01 C-0.01,-0.01 -0.01,-0.01 -0.01,-0.01 C-0.01,0 -0.01,0 -0.01,0 C-0.02,0 -0.02,0 -0.02,0 C-0.03,0 -0.03,0 -0.03,-0.01 C-0.04,-0.01 -0.04,-0.01 -0.04,-0.02 C-0.04,-0.02 -0.04,-0.02 -0.04,-0.02 C-0.04,-0.03 -0.04,-0.03 -0.03,-0.03 C-0.03,-0.03 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0.03,-0.03 0.03,-0.03 C0.03,-0.03 0.03,-0.03 0.03,-0.03 C0.04,-0.03 0.04,-0.03 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.01 0.04,-0.01 0.03,-0.01 C0.03,0 0.03,0 0.03,0z ",keySplines:"0.333 0 0.667 1;0.333 0 0.667 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_1",fill:"freeze",attributeName:"fill",from:g.white,to:g.white,keyTimes:"0;0.1219512;0.2439024;1",values:"#ffffff;#ffffff;#1db954;#1db954",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G",fill:"freeze",attributeName:"opacity",from:.7000000000000001,to:1,keyTimes:"0;0.1219512;1",values:"0.7000000000000001;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_1_T_0",fill:"freeze",attributeName:"transform",from:"1 1",to:"1 1",type:"scale",additive:"sum",keyTimes:"0;0.1219512;0.2439024;0.5121951;1",values:"1 1;0.8 0.8;1.25 1.25;1 1;1 1",keySplines:"0.333 0 0.667 1;0.333 0 0.667 1;0.333 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.2439024;0.2439025;1",values:"1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_0_G_D_1_P_0",fill:"freeze",attributeName:"stroke-width",from:2,to:1,keyTimes:"0;0.2439024;0.5121951;1",values:"2;2;1;1",keySplines:"0.333 0 0 1;0.333 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_0_G",fill:"freeze",attributeName:"transform",from:"4 4",to:"4 4",type:"scale",additive:"sum",keyTimes:"0;0.2439024;0.5121951;1",values:"4 4;4 4;4 4;4 4",keySplines:"0.333 0 0 1;0.333 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_1_T_0",fill:"freeze",attributeName:"transform",from:"1 1",to:"1 1",type:"scale",additive:"sum",keyTimes:"0;0.1219512;0.2439024;0.5121951;1",values:"1 1;0.8 0.8;1.25 1.25;1 1;1 1",keySplines:"0.333 0 0.667 1;0.333 0 0.667 1;0.333 0 0 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:0,to:1,keyTimes:"0;0.2439024;0.2439049;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"1s",from:0,to:1,xlinkHref:"#time_group"})]}),(0,m.jsxs)("g",{id:"_R_G",children:[(0,m.jsx)("g",{id:"_R_G_L_7_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_7_G",transform:" translate(112, 112) translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_7_G_D_0_P_0_G_0_T_0",children:(0,m.jsx)("ellipse",{id:"_R_G_L_7_G_D_0_P_0",stroke:g.greenLight,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:30,strokeOpacity:1,cx:0,cy:0})})})}),(0,m.jsx)("g",{id:"_R_G_L_6_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_6_G",transform:" translate(112, 112) translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_6_G_D_0_P_0_G_0_T_0",children:(0,m.jsx)("ellipse",{id:"_R_G_L_6_G_D_0_P_0",stroke:g.greenLight,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:30,strokeOpacity:1,cx:0,cy:0})})})}),(0,m.jsx)("g",{id:"_R_G_L_5_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_5_G",children:(0,m.jsx)("path",{id:"_R_G_L_5_G_D_0_P_0",fill:g.white,fillOpacity:1,fillRule:"nonzero",d:" M22.28 -19.53 C16.88,-24.89 8.3,-25.2 2.54,-20.44 C2.54,-20.44 1.5,-19.48 0,-19.48 C-1.54,-19.48 -2.54,-20.44 -2.54,-20.44 C-8.3,-25.2 -16.86,-24.86 -22.24,-19.53 C-28,-13.81 -28,-4.51 -22.24,1.21 C-22.24,1.21 -4.04,22.54 -4.04,22.54 C-1.91,25.03 1.91,25.03 4.04,22.54 C4.04,22.54 22.28,1.21 22.28,1.21 C28,-4.51 28.05,-13.81 22.28,-19.53z "})})}),(0,m.jsx)("g",{id:"_R_G_L_4_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_4_G",children:(0,m.jsx)("path",{id:"_R_G_L_4_G_D_0_P_0",fill:g.greenLight,fillOpacity:1,fillRule:"nonzero",d:" M22.28 -19.53 C16.88,-24.89 8.3,-25.2 2.54,-20.44 C2.54,-20.44 1.5,-19.48 0,-19.48 C-1.54,-19.48 -2.54,-20.44 -2.54,-20.44 C-8.3,-25.2 -16.86,-24.86 -22.24,-19.53 C-28,-13.81 -28,-4.51 -22.24,1.21 C-22.24,1.21 -4.04,22.54 -4.04,22.54 C-1.91,25.03 1.91,25.03 4.04,22.54 C4.04,22.54 22.28,1.21 22.28,1.21 C28,-4.51 28.05,-13.81 22.28,-19.53z "})})}),(0,m.jsx)("g",{id:"_R_G_L_3_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_3_G",children:(0,m.jsx)("path",{id:"_R_G_L_3_G_D_0_P_0",fill:g.white,fillOpacity:1,fillRule:"nonzero",d:" M22.28 -19.53 C16.88,-24.89 8.3,-25.2 2.54,-20.44 C2.54,-20.44 1.5,-19.48 0,-19.48 C-1.54,-19.48 -2.54,-20.44 -2.54,-20.44 C-8.3,-25.2 -16.86,-24.86 -22.24,-19.53 C-28,-13.81 -28,-4.51 -22.24,1.21 C-22.24,1.21 -4.04,22.54 -4.04,22.54 C-1.91,25.03 1.91,25.03 4.04,22.54 C4.04,22.54 22.28,1.21 22.28,1.21 C28,-4.51 28.05,-13.81 22.28,-19.53z "})})}),(0,m.jsx)("g",{id:"_R_G_L_2_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_2_G",children:(0,m.jsx)("path",{id:"_R_G_L_2_G_D_0_P_0",fill:g.greenLight,fillOpacity:1,fillRule:"nonzero",d:" M22.28 -19.53 C16.88,-24.89 8.3,-25.2 2.54,-20.44 C2.54,-20.44 1.5,-19.48 0,-19.48 C-1.54,-19.48 -2.54,-20.44 -2.54,-20.44 C-8.3,-25.2 -16.86,-24.86 -22.24,-19.53 C-28,-13.81 -28,-4.51 -22.24,1.21 C-22.24,1.21 -4.04,22.54 -4.04,22.54 C-1.91,25.03 1.91,25.03 4.04,22.54 C4.04,22.54 22.28,1.21 22.28,1.21 C28,-4.51 28.05,-13.81 22.28,-19.53z "})})}),(0,m.jsx)("g",{id:"_R_G_L_1_G_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_1_T_0",transform:" translate(112, 112)",children:(0,m.jsxs)("g",{id:"_R_G_L_1_G",transform:" scale(4, 4)",children:[(0,m.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",fill:g.white,fillOpacity:1,fillRule:"nonzero",d:" M-6.18 -8.52 C-5.37,-8.78 -4.5,-8.82 -3.67,-8.63 C-2.84,-8.43 -2.07,-8.02 -1.46,-7.43 C-1.46,-7.43 -1.45,-7.43 -1.45,-7.43 C-1.06,-7.06 -0.54,-6.85 0,-6.85 C0.54,-6.85 1.06,-7.06 1.45,-7.43 C1.45,-7.43 1.46,-7.43 1.46,-7.43 C1.99,-7.94 2.63,-8.31 3.32,-8.53 C4.02,-8.75 4.76,-8.8 5.48,-8.69 C6.44,-8.53 7.34,-8.08 8.04,-7.41 C8.74,-6.73 9.22,-5.85 9.41,-4.9 C9.55,-4.2 9.53,-3.48 9.34,-2.79 C9.16,-2.11 8.83,-1.47 8.36,-0.93 C8.36,-0.93 0.4,8.56 0.4,8.56 C0.35,8.62 0.29,8.67 0.22,8.7 C0.15,8.73 0.08,8.75 0,8.75 C-0.07,8.75 -0.15,8.73 -0.22,8.7 C-0.29,8.67 -0.35,8.62 -0.39,8.56 C-0.39,8.56 -8.35,-0.92 -8.35,-0.92 C-8.35,-0.92 -8.36,-0.93 -8.36,-0.93 C-8.83,-1.47 -9.16,-2.11 -9.35,-2.79 C-9.53,-3.48 -9.55,-4.2 -9.41,-4.9 C-9.41,-4.9 -9.41,-4.9 -9.41,-4.9 C-9.25,-5.74 -8.86,-6.52 -8.29,-7.16 C-7.73,-7.79 -7,-8.27 -6.18,-8.52z "}),(0,m.jsx)("path",{id:"_R_G_L_1_G_D_0_P_1",fill:g.white,fillOpacity:1,fillRule:"nonzero",d:" M-3.22 -10.57 C-4.4,-10.85 -5.63,-10.8 -6.79,-10.43 C-7.94,-10.06 -8.98,-9.39 -9.79,-8.49 C-10.59,-7.58 -11.14,-6.47 -11.37,-5.29 C-11.57,-4.29 -11.54,-3.26 -11.28,-2.28 C-11.02,-1.3 -10.54,-0.4 -9.88,0.37 C-9.88,0.37 -1.93,9.85 -1.93,9.85 C-1.69,10.13 -1.4,10.36 -1.06,10.51 C-0.73,10.67 -0.37,10.75 0,10.75 C0.37,10.75 0.73,10.67 1.06,10.51 C1.4,10.36 1.69,10.13 1.93,9.85 C1.93,9.85 9.88,0.37 9.88,0.37 C10.54,-0.4 11.02,-1.3 11.28,-2.28 C11.54,-3.26 11.57,-4.29 11.37,-5.28 C11.37,-5.28 11.37,-5.29 11.37,-5.29 C11.1,-6.64 10.42,-7.89 9.43,-8.85 C8.43,-9.81 7.17,-10.44 5.8,-10.66 C5.8,-10.66 5.8,-10.66 5.8,-10.66 C4.77,-10.83 3.72,-10.75 2.73,-10.44 C1.74,-10.13 0.83,-9.6 0.08,-8.88 C0.06,-8.86 0.03,-8.85 0,-8.85 C-0.03,-8.85 -0.06,-8.86 -0.08,-8.88 C-0.96,-9.72 -2.04,-10.3 -3.22,-10.57z "})]})})}),(0,m.jsx)("g",{id:"_R_G_L_0_G_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_1_T_0",transform:" translate(112, 112)",children:(0,m.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(0, 0)",children:[(0,m.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",fill:g.greenLight,fillOpacity:1,fillRule:"nonzero",d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "}),(0,m.jsx)("path",{id:"_R_G_L_0_G_D_1_P_0",stroke:g.greenLight,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:2,strokeOpacity:1,d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "})]})})})]}),(0,m.jsx)("g",{id:"time_group"})]})})),b=(0,i.memo)((function({size:e,onEnd:t}){const n=2.35;return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:e*n,height:e*n,viewBox:"0 0 224 224",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(e*n-e)/2}px`},children:[(0,m.jsxs)("defs",{children:[(0,m.jsx)("animate",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_0",fill:"freeze",attributeName:"stroke-width",from:1,to:2,keyTimes:"0;0.3225806;0.6451613;1",values:"1;1;2;2",keySplines:"0.6 0 0.7 1;0.6 0 0.7 1;0 0 0 0",calcMode:"spline",ref:e=>{e&&e.addEventListener("endEvent",t,{once:!0})}}),(0,m.jsx)("animate",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_1_G",fill:"freeze",attributeName:"opacity",from:0,to:.7000000000000001,keyTimes:"0;0.3225806;0.6451613;1",values:"0;0;0.7000000000000001;0.7000000000000001",keySplines:"0.6 0 0.7 1;0.6 0 0.7 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_T_0",fill:"freeze",keyTimes:"0;0.3225806;0.483871;0.6451613;0.9677419;1",path:"M112 140 C112,140 100,140 100,140 C100,140 124,140 124,140 C124,140 100,140 100,140 C100,140 112,140 112,140 C112,140 112,140 112,140 ",keyPoints:"0;0.17;0.5;0.83;1;1",keySplines:"0.8 0 0.8 1;0.8 0 0.8 1;0.8 0 0.8 1;0.2 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:0,to:0,type:"rotate",additive:"sum",keyTimes:"0;0.2580645;0.3870968;0.5483871;0.7096774;0.9677419;1",values:"0;3;-4;6;-6;0;0",keySplines:"0.6 0 0.667 1;0.333 0 0.667 1;0.333 0 0.667 1;0.333 0 0.667 1;0.6 0 0.667 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_0_G_D_1_P_0",fill:"freeze",attributeName:"stroke-width",from:1,to:2,keyTimes:"0;0.3225806;0.6451613;1",values:"1;1;2;2",keySplines:"0.3 0 0.4 1;0.3 0 0.4 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_0_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.3225806;0.6451613;1",values:"1;1;0;0",keySplines:"0.3 0 0.4 1;0.3 0 0.4 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateMotion",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_T_0",fill:"freeze",keyTimes:"0;0.3225806;0.483871;0.6451613;0.9677419;1",path:"M112 140 C112,140 100,140 100,140 C100,140 124,140 124,140 C124,140 100,140 100,140 C100,140 112,140 112,140 C112,140 112,140 112,140 ",keyPoints:"0;0.17;0.5;0.83;1;1",keySplines:"0.8 0 0.8 1;0.8 0 0.8 1;0.8 0 0.8 1;0.2 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animateTransform",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:0,to:0,type:"rotate",additive:"sum",keyTimes:"0;0.2580645;0.3870968;0.5483871;0.7096774;0.9677419;1",values:"0;3;-4;6;-6;0;0",keySplines:"0.6 0 0.667 1;0.333 0 0.667 1;0.333 0 0.667 1;0.333 0 0.667 1;0.6 0 0.667 1;0 0 0 0",calcMode:"spline"}),(0,m.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"1s",from:0,to:1,xlinkHref:"#time_group"})]}),(0,m.jsxs)("g",{id:"_R_G",children:[(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_1_G",transform:" translate(0, -28) scale(4, 4) translate(0, 0)",children:(0,m.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",stroke:g.white,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:1,strokeOpacity:1,d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "})})}),(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",children:(0,m.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(0.214, -27.999) scale(4, 4) translate(0, 0)",children:[(0,m.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",fill:g.greenLight,fillOpacity:1,fillRule:"nonzero",d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "}),(0,m.jsx)("path",{id:"_R_G_L_0_G_D_1_P_0",stroke:g.greenLight,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:1,strokeOpacity:1,d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "})]})})]}),(0,m.jsx)("g",{id:"time_group"})]})}));var v=n(3731),y=n(99025),_=n(87939),E=n(19498),x=n(72423),C=n(8309),S=n(34628),A=n(2530);const w=new(n(98198).l2);function I(e){const t=(0,i.useRef)([]);t.current=Array.isArray(e)?e:[e];return()=>{const e=t.current,n=function(e){return w.create(e,(()=>{const t=new Audio(e);return t.load(),t}))}(e[Math.floor(Math.random()*e.length)]);n.play()}}const T={helmet:"main-addButton-helmet",ZoomInAnimation:"main-addButton-zoomInAnimation"};function N(e,t){return(0,m.jsx)(x._,{src:t?(0,_.b)("images/mando_helmet_felix.png"):(0,_.b)("images/mando_helmet.png"),className:T.helmet,width:e,height:e,loading:"lazy"})}function R(e){const{surface:t,isViewingVariant:n,isPlayingVariant:i}=(0,S.h)(),r=(0,c.NC)(E.JKv,{loadingValue:E.WdJ.DISABLED}),s=r!==E.WdJ.DISABLED,a=r===E.WdJ.HELMET_AND_SOUND||r===E.WdJ.FELIX,o=r===E.WdJ.FELIX,l=I(function(e){return e?[(0,_.b)("sounds/mando_this_is_the_way_felix.mp3")]:[(0,_.b)("sounds/mando_this_is_the_way_103.mp3"),(0,_.b)("sounds/mando_this_is_the_way_107.mp3")]}(o));if(t===C.u.ALBUM||t===C.u.TRACK||t===C.u.PLAYLIST){const t=s&&n===A.K.MANDALORIAN,i=a&&t;return{content:t?N(e,o):null,playSound:i?l:()=>{}}}if(t===C.u.NOW_PLAYING){const t=s&&i===A.K.MANDALORIAN,n=a&&t;return{content:t?N(e,o):null,playSound:n?l:()=>{}}}return{content:null,playSound:()=>{}}}var k=n(44827);let O=function(e){return e.xs="small",e.sm="medium",e.md="large",e}({});var P=function(e){return e.none="none",e.positive="positive",e.undo="undo",e}(P||{});const j=i.memo((function({onClick:e,isAdded:t,size:n,disabled:g=!1,isEpisode:_=!1,isAudiobook:x=!1,className:C,condensedAll:S,placement:A}){const w=t?u.Ru.get("remove_from_your_library"):u.Ru.get("save_to_your_library"),I=(0,y.j)(),[T,N]=(0,i.useState)(P.none),j=(0,i.useCallback)((()=>N(P.none)),[N]);let L;switch(n){case O.xs:L=16;break;case O.sm:L=24;break;default:L=32}const{setState:D,Icon:U}=(0,v.Q)(t?k.t.CURATED:k.t.UNCURATED,k.A),{content:M,playSound:B}=R(L),F=(0,i.useCallback)((n=>{if(g)return;const{currentTarget:i,detail:r}=n;N(t?P.undo:P.positive),D(t?k.t.UNCURATED:k.t.CURATED),e(n),t||B(),r>0&&i&&i.blur()}),[g,t,D,e,B]),H=(0,c.NC)(E.N_Z,{loadingValue:!1});let V;M&&t?V=M:H||I||T===P.none||(V=_||x?T===P.positive?(0,m.jsx)(p,{size:L,onEnd:j}):(0,m.jsx)(h,{size:L,onEnd:j}):T===P.positive?(0,m.jsx)(f,{size:L,onEnd:j}):(0,m.jsx)(b,{size:L,onEnd:j}));return(0,m.jsx)(d.Zp,{label:w,placement:A,children:(0,m.jsx)(l.H,{semanticColor:t?"textBrightAccent":"textSubdued",iconOnly:H?U:()=>{if(V)return V;let e;return e=_||x?t?r.k:s.P:t?a.F:o.g,(0,m.jsx)(e,{size:n})},"aria-checked":t,"aria-label":w,onClick:F,"":"add-button",size:n,className:C,condensedAll:S,condensed:!0})})}))},37128:(e,t,n)=>{"use strict";n.d(t,{e:()=>k});var i=n(79474),r=n(97500),s=n.n(r),a=n(7452),o=n(79133),l=n.n(o),c=n(59841),u=n(43204),d=n(56029),m=n(13274);const p=({iconSize:e,placeholderText:t})=>t?(0,m.jsx)("svg",{width:(0,d.k)(e),height:(0,d.k)(e),fill:"currentColor",viewBox:"0 0 18 20",xmlns:"http://www.w3.org/2000/svg","":"user-icon",children:(0,m.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"central",children:t})}):(0,m.jsx)(u.v,{"aria-hidden":"true",size:e,"":"user-icon"});var h=n(50450);const g="main-avatar-avatar",f="main-avatar-image",b="main-avatar-withBadge",v="main-avatar-piled",y="main-avatar-piledIcon",_="main-avatar-placeholderWrapper",E="Q4hOdDPRDHPhfou2xbDg",x="main-avatar-placeholderTransparent",C={},S=[c.salmon135,c.electricSeafoam167,c.azure135,c.lavender135,c.pumpkin135,c.chocolate75],A=e=>{if(!C[e]){const t=function(e){let t,n=0;if(0===e.length)return n;for(let i=0,r=e.length;i<r;i++)t=e.charCodeAt(i),n=(n<<5)-n+t,n|=0;return n}(e),n=Math.abs(t)%S.length;C[e]=S[n]}return C[e]},w=e=>l()(e)[0].toUpperCase(),I=e=>{const t=A(e);return(e=>{const{r:t,g:n,b:i}=e.rgb;return(299*t+587*n+114*i)/1e3>=128})((0,h.j)(t))?c.black:c.white},T=({username:e,displayName:t,userIconSize:n,transparent:i,className:r})=>{const a=e&&t,o=a?(e=>({background:A(e),color:I(e)}))(e):{},l=a?{placeholderText:w(t)}:{};return(0,m.jsx)("div",{className:s()(_,r,{[E]:!a,[x]:i}),"":"placeholder-wrapper",style:o,children:(0,m.jsx)(p,{iconSize:n,...l})})};var N=n(72423);const R=.93328125,k=(0,i.memo)((function(e){const{label:t,images:n,width:i,className:r,imageClassName:o,withBadge:l,userIconSize:c,testID:u,piled:d,username:p,displayName:h,placeholderClassName:_,customPlaceholder:E,transparent:x}=e,C=(0,a.h)(n,{desiredSize:i}),S=E||(0,m.jsx)(T,{username:p,displayName:h,userIconSize:c,transparent:x,className:_});return(0,m.jsxs)("figure",{className:s()(g,{[b]:l},r),title:t,style:{width:d?i*R:i,height:i,...d&&{marginInlineStart:.03125*i}},"":u,children:[(0,m.jsx)("div",{className:s()({[v]:d}),style:{width:i,height:i,insetInlineStart:d?-.06671875000000005*i:0},children:C?(0,m.jsx)(N._,{loading:"eager",src:C,alt:t,className:s()(f,o),children:S}):S}),d&&(0,m.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"0",width:"0","aria-hidden":"true",children:(0,m.jsx)("defs",{children:(0,m.jsx)("clipPath",{id:"avatarClipPath",clipPathUnits:"objectBoundingBox",children:(0,m.jsx)("path",{className:y,d:"M 0.0666 0.7497 C 0.104 0.6744 0.125 0.5897 0.125 0.5 C 0.125 0.4103 0.104 0.3256 0.0666 0.2503 C 0.1531 0.1006 0.3148 0 0.5 0 C 0.7761 0 1 0.2239 1 0.5 C 1 0.7761 0.7761 1 0.5 1 C 0.3148 1 0.1531 0.8994 0.0666 0.7497 Z","transform-origin":"0.5 0.5"})})})})]})}))},59560:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});var i=n(79474),r=n(11283),s=n(88713),a=n(13274);const o=i.forwardRef((function({onClick:e,ariaLabel:t,standalone:n=!1,tabIndex:i=0,className:o="",icon:l,size:c="md",semanticColor:u,condensed:d,condensedAll:m,disableTooltip:p=!1,testId:h,disabled:g=!1,placement:f},b){const v=l,y="sm"===c||"md"===c||"lg"===c?c:void 0,_="small"===c||"medium"===c||"large"===c?c:void 0;return(0,a.jsx)(s.Zp,{label:t,disabled:p,placement:f,children:(0,a.jsx)(r.H,{"":h,className:o,onClick:e,"aria-label":t,"aria-hidden":n,tabIndex:i,ref:b,iconOnly:v,buttonSize:y,size:_,semanticColor:u,condensed:d,condensedAll:m,disabled:g})})}))},52995:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});var i=n(10072),r=n(13274);const s=({href:e,children:t,...n})=>(0,r.jsx)(i.N,{to:e,...n,children:t})},77611:(e,t,n)=>{"use strict";n.d(t,{I:()=>l});var i=n(79474),r=n(33037),s=n(81643),a=n(36471),o=n(13274);const l=i.memo((function({uri:e,size:t=s.M.md,className:n,onClick:l,canDownload:c,condensedAll:u}){const[d,m]=(0,r.A)(e),p=(0,a.W)(),h=(0,i.useCallback)((()=>{p({targetUri:e,intent:d?"unsave":"save",type:"click"}),m(!d)}),[p,e,d,m]);return(0,o.jsx)(s.f,{className:n,isFollowing:d,onFollow:h,onClick:l,uri:e,size:t,canDownload:c,condensedAll:u})}))},81643:(e,t,n)=>{"use strict";n.d(t,{M:()=>A,f:()=>I});var i=n(79474),r=n(97500),s=n.n(r),a=n(11283),o=n(11866),l=n(80245),c=n(14056),u=n(88713),d=n(67878),m=n(56333),p=n(93963),h=n(33712),g=n(81172),f=n(77564),b=n(38377),v=n(10132);var y=n(54387);const _="x-downloadButton-DownloadButton",E="x-downloadButton-button",x="x-downloadButton-cancelDownload",C="x-downloadButton-progress";var S=n(13274);let A=function(e){return e.xs="small",e.sm="medium",e.md="large",e}({});const w=e=>{const{currentTarget:t,detail:n}=e;n>0&&t&&t.blur()},I=({uri:e,isFollowing:t,onFollow:n,size:r=A.sm,className:I,onClick:T=(()=>{}),showUpsell:N=!0,canDownload:R=!0,condensedAll:k})=>{const[O,P]=(0,i.useState)(!1),{capability:j,availability:L,addDownload:D}=(0,h.$)(e,R),U=(0,p.V)(),M=(0,g.e)(e);((e,t)=>{const n=(0,v.i)(),r=(0,i.useRef)(!1);(0,i.useEffect)((()=>{e===f.kw.DOWNLOADING&&!1===r.current&&(r.current=!0,n.say(c.Ru.get("download.downloading",t.totalItems)))}),[n,e,t]);const s=(0,b.Z)(e);(0,i.useEffect)((()=>{s===f.kw.DOWNLOADING&&e===f.kw.YES&&(r.current=!1,n.say(c.Ru.get("download.complete")))}),[n,s,e])})(L,M);const B=(0,i.useCallback)((e=>{e.preventDefault(),j===f.vs.NO_PERMISSION?T(e,f.NV.NO_PERMISSION):(!1===t?(n(),P(!0)):D(),T(e,f.NV.ADD)),w(e)}),[D,j,t,T,n]),F=(0,i.useCallback)((t=>{t.preventDefault(),U(e),w(t),T(t,f.NV.REMOVE)}),[e,U,T]);if((0,i.useEffect)((()=>{!0===O&&!0===t&&(D(),P(!1))}),[t,O,D]),L===f.kw.YES)return(0,S.jsx)(u.Zp,{label:c.Ru.get("download.remove"),children:(0,S.jsx)(a.H,{className:I,onClick:F,iconOnly:o.F,semanticColor:"textBrightAccent",size:r,"aria-label":c.Ru.get("download.remove"),"aria-checked":!0,condensedAll:k,condensed:!0})});if(j===f.vs.NO_CAPABILITY||j===f.vs.NO_PERMISSION_HIDE)return null;if(j===f.vs.NO_PERMISSION)return N?(0,S.jsx)("div",{className:s()(_,I),children:(0,S.jsx)(m.y,{offset:[-2,20],action:"toggle",trigger:"click",content:(0,S.jsx)(d.z,{children:(0,S.jsx)("span",{children:c.Ru.get("download.upsell")})}),renderInline:!1,children:(0,S.jsx)("div",{children:(0,S.jsx)(u.Zp,{label:c.Ru.get("download.download"),children:(0,S.jsx)(a.H,{onClick:B,iconOnly:l.i,size:r,"aria-label":c.Ru.get("download.download"),"aria-checked":!1,condensedAll:k,condensed:!0})})})})}):null;if(L===f.kw.NO)return(0,S.jsx)(u.Zp,{label:c.Ru.get("download.download"),children:(0,S.jsx)(a.H,{className:I,onClick:B,iconOnly:l.i,size:r,"aria-label":c.Ru.get("download.download"),"aria-checked":!1,condensedAll:k,condensed:!0})});let H;switch(r){case A.xs:H=16;break;case A.sm:H=24;break;default:H=32}return(0,S.jsxs)("div",{className:s()(x,I),role:"switch","aria-checked":!0,children:[(0,S.jsx)(u.Zp,{label:c.Ru.get("download.cancel"),children:(0,S.jsx)("button",{style:{height:H,width:H},className:s()(E,I),onClick:F,"aria-label":c.Ru.get("download.cancel")})}),(0,S.jsx)("span",{className:s()(C),children:(0,S.jsx)(y.C,{"aria-valuetext":c.Ru.get("progress.downloading-tracks"),percentage:M.percentage,size:H})})]})}},38037:(e,t,n)=>{"use strict";n.d(t,{M:()=>s.M,e:()=>c});var i=n(79474),r=n(33037),s=n(81643),a=n(36471),o=n(13274);const l=i.memo((function({uri:e,size:t=s.M.md,className:n,onClick:l,showUpsell:c,canDownload:u}){const[d,m]=(0,r.A)(e),p=(0,a.W)(),h=(0,i.useCallback)((()=>{p({targetUri:e,intent:d?"remove-from-library":"add-to-library",type:"click"}),m(!d)}),[p,e,d,m]);return(0,o.jsx)(s.f,{className:n,isFollowing:d,onFollow:h,onClick:l,uri:e,size:t,showUpsell:c,canDownload:u})})),c=i.memo((function(e){return(0,o.jsx)(l,{...e})}))},798:(e,t,n)=>{"use strict";n.d(t,{O:()=>u});var i=n(11283),r=n(62359),s=n(14056),a=n(88713),o=n(11867),l=n(97247),c=n(13274);const u=({isDisliked:e=!1,onClick:t=(()=>{}),className:n,size:u="medium"})=>{const d=(0,l.y)();return(0,c.jsx)(a.Zp,{label:s.Ru.get("playback-control.ban"),children:(0,c.jsx)(i.H,{role:"switch","aria-label":s.Ru.get("playback-control.ban"),"aria-checked":e,className:n,onClick:t,iconOnly:r.V,size:d===o.E.MEDIUM?u:"small"})})}},70190:(e,t,n)=>{"use strict";n.d(t,{M:()=>c,e:()=>u});var i=n(79474),r=n(11283),s=n(18258),a=n(14056),o=n(88713),l=n(13274);let c=function(e){return e.xs="small",e.sm="medium",e.md="large",e}({});const u=i.forwardRef((function({onClick:e=(()=>{}),size:t=c.md,label:n=a.Ru.get("more"),ariaLabel:i,placement:u,className:d,condensedAll:m},p){return(0,l.jsx)(o.Zp,{label:n,placement:u,children:(0,l.jsx)(r.H,{onClick:e,iconOnly:s.x,size:t,"aria-label":i||n,"aria-haspopup":"menu",ref:p,"":"more-button",className:d,condensedAll:m,condensed:!0})})}))},9789:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var i=n(79474),r=n(82924),s=n(33037),a=n(36471),o=n(13274);const l=i.memo((function({uri:e,className:t,onClick:n,size:l=r.t.xs}){const[c,u]=(0,s.A)(e),d=(0,a.W)(),m=(0,i.useCallback)((t=>{t.preventDefault(),d({targetUri:e,intent:c?"remove-from-library":"add-to-library",type:"click"}),n&&n(!c),u(!c)}),[d,e,c,n,u]);return(0,o.jsx)(r.M,{className:t,size:l,onClick:m,isAdded:!!c,isEpisode:!0})}))},68295:(e,t,n)=>{"use strict";n.d(t,{b:()=>c});var i=n(79474),r=n(82924),s=n(36471),a=n(33037),o=n(33432),l=n(13274);const c=i.memo((function({uri:e,className:t,onClick:n,size:c=r.t.xs,placement:u}){const d=(0,o.i)(e),[m,p]=(0,a.A)(d),h=(0,s.W)(),g=(0,i.useCallback)((e=>{e.preventDefault(),h({targetUri:d,intent:m?"remove-from-library":"add-to-library",type:"click"}),n&&n(!m),p(!m)}),[m,h,d,n,p]);return(0,l.jsx)(r.M,{className:t,size:c,onClick:g,isAdded:m,placement:u})}))},83925:(e,t,n)=>{"use strict";n.d(t,{w:()=>m});var i=n(79474),r=n(97500),s=n.n(r),a=n(50325),o=n(14056),l=n(59560),c=n(97404);const u="pvGZ831aNzHTQMZ8CA_u";var d=n(13274);const m=(0,i.memo)((function({onClick:e=(()=>{}),size:t,className:n,uri:r,sharingInfo:m,interactionData:p,ariaLabel:h=o.Ru.get("mwp.list.item.share"),condensedAll:g,placement:f}){const{onCopyLink:b}=(0,c.L)({sharingInfo:m,uri:r,interactionData:p}),v=(0,i.useCallback)((()=>{b(),e()}),[e,b]);return(0,d.jsx)(l.a,{ariaLabel:h,size:t,onClick:v,className:s()(u,n),icon:a.C,condensedAll:g,placement:f,condensed:!0})}))},88080:(e,t,n)=>{"use strict";n.d(t,{a:()=>g});var i=n(45992),r=n(14056),s=n(12124),a=n(88291),o=n(50823),l=n(84387),c=n(36575),u=n(66956),d=n(93207),m=n(43067),p=n(19258),h=n(13274);const g=({name:e,uri:t,images:n,artists:g=[],sharingInfo:f,year:b,isHero:v=!1,onClick:y,testId:_,index:E,requestId:x,color:C,variant:S})=>{let A;const w=(0,o.J)(t),I=()=>g.map((e=>e.name)).join(r.Ru.getSeparator());return A=v?(0,h.jsx)(m.A,{index:E,onClick:y,headerText:e,featureIdentifier:"album",uri:t,playUri:w,ariaPauseLabel:r.Ru.get("tracklist.a11y.pause",e,I()),ariaPlayLabel:r.Ru.get("tracklist.a11y.play",e,I()),renderCardImage:()=>(0,h.jsx)(u.M,{isHero:!0,images:n,color:C,FallbackComponent:e=>(0,h.jsx)(i.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,t)=>(0,h.jsxs)(d.c,{isHero:!0,children:[(0,h.jsx)(p.t,{children:r.Ru.get("card.tag.album")}),g.map(((n,i)=>[i>0&&r.Ru.getSeparator(),(0,h.jsx)(s.m,{artist:n,index:i,logger:e,spec:t},n.uri)]))]}),testId:_,requestId:x}):(0,h.jsx)(c.Z,{variant:S,onClick:y,headerText:e,featureIdentifier:"album",uri:t,playUri:w,ariaPauseLabel:r.Ru.get("tracklist.a11y.pause",e,I()),index:E,ariaPlayLabel:r.Ru.get("tracklist.a11y.play",e,I()),renderCardImage:()=>(0,h.jsx)(u.M,{isHero:v,images:n,color:C,FallbackComponent:e=>(0,h.jsx)(i.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,t)=>(0,h.jsxs)(d.c,{children:[!!b&&(0,h.jsxs)("time",{dateTime:b.toString(),children:[b," • "]}),g.map(((n,i)=>[i>0&&r.Ru.getSeparator(),(0,h.jsx)(s.m,{artist:n,index:i,logger:e,spec:t},n.uri)]))]}),testId:_,requestId:x}),(0,h.jsx)(a.h,{menu:(0,h.jsx)(l.h,{uri:t,artistUri:g?.[0]?.uri,sharingInfo:f}),children:A})}},13650:(e,t,n)=>{"use strict";n.d(t,{R:()=>p});var i=n(79474),r=n(14056),s=n(88291),a=n(87344),o=n(84387),l=n(36575),c=n(66956),u=n(93207),d=n(62189),m=n(13274);const p=i.memo((function({images:e,name:t,uri:n,type:i,year:p,sharingInfo:h,latest:g,showType:f,onClick:b,delegatePlayback:v=!1,isPlaying:y,onPlay:_,index:E,navigationUrl:x,variant:C}){const S=g?r.Ru.get("artist.latest-release"):p;return(0,m.jsx)(s.h,{menu:(0,m.jsx)(o.h,{uri:n,sharingInfo:h}),children:(0,m.jsx)(l.Z,{variant:C,onClick:b,featureIdentifier:"album",headerText:t,uri:n,index:E,delegatePlayback:v,isPlaying:y,onPlay:_,navigationUrl:x,renderCardImage:()=>(0,m.jsx)(c.M,{images:e}),renderSubHeaderContent:()=>(0,m.jsx)(u.c,{children:(0,m.jsxs)(d.a,{children:[!!S&&(0,m.jsx)(d.t,{children:(0,m.jsx)("time",{dateTime:(p||"").toString(),children:S})}),f&&(0,m.jsx)(d.t,{children:(0,a.C)(i)})]})})})})}))},47376:(e,t,n)=>{"use strict";n.d(t,{a:()=>p});var i=n(41028),r=n(14056),s=n(88291),a=n(59416),o=n(36575),l=n(66956),c=n(93207),u=n(43067),d=n(19258),m=n(13274);const p=e=>{const{name:t,uri:n,images:p,isHero:h,onClick:g,testId:f,index:b,requestId:v,color:y,variant:_}=e;let E;return E=h?(0,m.jsx)(u.A,{index:b,onClick:g,headerText:t,featureIdentifier:"artist",uri:n,renderCardImage:()=>(0,m.jsx)(l.M,{isHero:h,isCircular:!0,images:p,color:y,FallbackComponent:e=>(0,m.jsx)(i.r,{size:"xxlarge",...e})}),renderSubHeaderContent:()=>(0,m.jsx)(c.c,{isHero:!0,children:(0,m.jsx)(d.t,{children:r.Ru.get("card.tag.artist")})}),testId:f,requestId:v}):(0,m.jsx)(o.Z,{variant:_,index:b,onClick:g,headerText:t,featureIdentifier:"artist",uri:n,renderCardImage:()=>(0,m.jsx)(l.M,{isHero:h,isCircular:!0,images:p,color:y,FallbackComponent:e=>(0,m.jsx)(i.r,{size:"xxlarge",...e})}),renderSubHeaderContent:()=>(0,m.jsx)(c.c,{children:(0,m.jsx)("span",{children:r.Ru.get("card.tag.artist")})}),testId:f,requestId:v}),(0,m.jsx)(s.h,{menu:(0,m.jsx)(a.t,{uri:n}),children:E})}},12124:(e,t,n)=>{"use strict";n.d(t,{m:()=>u});var i=n(79474),r=n(98764),s=n(88291),a=n(64420),o=n(59416),l=n(30957),c=n(13274);const u=({artist:e,index:t,logger:n,spec:u})=>{const d=(0,i.useCallback)((()=>{n&&u&&n.logInteraction(u.cardLinkFactory({position:t}).hitUiNavigate({destination:e.uri}))}),[n,u,t,e.uri]);return(0,a.s)(e)&&e.uri?(0,c.jsx)(s.h,{menu:(0,c.jsx)(o.t,{uri:e.uri}),children:(0,c.jsx)(l.default,{to:e.uri,dir:"auto",onClick:d,children:e.name})},e.uri):(0,c.jsxs)(r.E,{variant:"bodySmall",children:[e.name," "]})}},11620:(e,t,n)=>{"use strict";n.d(t,{M:()=>C});var i=n(97500),r=n.n(i),s=n(98764),a=n(34472),o=n(66167),l=n(14056),c=n(88291),u=n(15552),d=n(84749),m=n(20044),p=n(36575),h=n(66956),g=n(93207),f=n(43067),b=n(19258);const v="udGpsOceE80fzjUaGxkU",y="wMX24UZ671wvuRJkkUOC";var _=n(13274);const E=({isPreRelease:e,publishDate:t})=>e&&t?("string"==typeof t&&(t=new Date(t)),(0,_.jsx)(s.E,{variant:"bodySmall",semanticColor:"textSubdued",children:(0,_.jsx)("span",{children:l.Ru.get("web-player.prerelease.releases_on",{date:l.Ru.formatDate((0,u.ad)(t.toISOString()),(0,u.s7)({month:"long",day:"numeric",year:"numeric"}))})})})):null,x=({signifierText:e})=>e?(0,_.jsx)(s.E,{as:"div",variant:"bodySmall",semanticColor:"textBrightAccent",children:e}):null,C=({name:e,uri:t,images:n,authorName:i,isHero:u,onClick:C,testId:S,index:A,requestId:w,isLocked:I=!1,color:T,signifierText:N,isPreRelease:R=!1,publishDate:k,variant:O})=>{let P;return P=u?(0,_.jsx)(f.A,{index:A,onClick:C,headerText:e,featureIdentifier:"audiobook",uri:t,isPlayable:!1,dragMimeType:m.fl.AUDIOBOOKS,renderCardImage:()=>(0,_.jsx)(h.M,{isHero:!0,images:n,color:T,FallbackComponent:e=>(0,_.jsx)(a.l,{size:"xxlarge",...e})}),renderSubHeaderContent:()=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b.t,{children:l.Ru.get("card.tag.audiobook")}),(0,_.jsx)(s.E,{variant:"bodySmall",children:i})]}),getSignifierContent:()=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(E,{isPreRelease:R,publishDate:k}),(0,_.jsx)(x,{signifierText:N})]}),testId:S,requestId:w}):(0,_.jsx)(p.Z,{variant:O,index:A,onClick:C,headerText:e,featureIdentifier:"audiobook",uri:t,isPlayable:!1,dragMimeType:m.fl.AUDIOBOOKS,renderCardImage:()=>(0,_.jsx)(h.M,{images:n,color:T,FallbackComponent:e=>(0,_.jsx)(a.l,{size:"xxlarge",...e})}),renderSubHeaderContent:()=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(g.c,{lineClamp:N?1:2,children:[I&&(0,_.jsx)(o.y,{size:"small",className:v}),(0,_.jsx)(E,{isPreRelease:R,publishDate:k}),(0,_.jsx)(s.E,{as:"span",variant:"bodySmall",className:r()({[y]:R&&i}),children:i})]}),(0,_.jsx)(x,{signifierText:N})]}),testId:S,requestId:w}),(0,_.jsx)(c.h,{menu:(0,_.jsx)(d.p,{uri:t}),children:P})}},36575:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T,_:()=>w});var i=n(79474),r=n(97500),s=n.n(r),a=n(83648),o=n(74752),l=n(833),c=n(83455),u=n(38979),d=n(83856),m=n(14056),p=n(58291),h=n(12269),g=n(263),f=n(26271),b=n(67302),v=n(60786),y=n(2092),_=n(91303),E=n(36471),x=n(30957),C=n(30692),S=n(87775),A=n(13274);let w=function(e){return e.Default="default",e.Compact="compact",e.Big="big",e}({});const I=e=>e.delegateNavigation?(0,A.jsx)(A.Fragment,{children:e.children}):(0,A.jsx)(x.default,{className:S.A.cardTitleWrapper,to:e.to,search:e.search,pathname:e.pathname,children:e.children}),T=({onClick:e=(()=>{}),delegatePlayback:t=!1,delegateLogging:n=!1,delegateNavigation:r=!1,playInsteadOfNavigating:x=!1,isPlaying:T,onPlay:N=(()=>{}),onContextMenu:R=(()=>{}),onTouchStart:k=(()=>{}),onTouchEnd:O=(()=>{}),featureIdentifier:P,uri:j,renderCardImage:L,renderSubHeaderContent:D=(()=>null),isPlayable:U=!0,isDownloadable:M=!1,headerText:B,hasNewEpisodeIndicator:F,className:H,playUri:V=j,albumURI:z,testId:G,ariaPlayLabel:W,ariaPauseLabel:K,index:Y,navigationUrl:q,requestId:Q,dragMimeType:$,variant:Z=w.Default})=>{const X=Z!==w.Compact&&"function"==typeof D,J=Z===w.Compact?2:1,ee=(0,a.Zp)(),te=(0,E.W)(),ne=z?`?highlight=${j}`:"",{draggable:ie,onDragStart:re}=(0,y.P)({itemUris:[j],itemMimeTypes:$?[$]:[],dragLabelText:B}),{spec:se,logger:ae,UBIFragment:oe}=(0,b.r)(u.y,{data:{uri:j,position:Y,reason:Q??""}}),le=z||j,ce=(0,d.o_)(le,{parseUnknown:!0}),ue=(0,_.W)({type:"link",uri:le}),{isPlaying:de,togglePlay:me,isActive:pe}=(0,f.P)({uri:V},{featureIdentifier:P});let he=de;t&&"boolean"==typeof T&&(he=T);const ge=(0,i.useCallback)((()=>{let e=se.cardPlayButtonFactory().hitPause({itemToBePaused:j});he||(e=pe?se.cardPlayButtonFactory().hitResume({itemToBeResumed:j}):se.cardPlayButtonFactory().hitPlay({itemToBePlayed:j}));const i=ae.logInteraction(e);if(N(j,i),n||te({targetUri:j,intent:he?"pause":"play",type:"click"}),t){if("function"!=typeof N)throw Error("No delegate playback handler provided")}else me({loggingParams:i})}),[n,t,pe,he,ae,te,N,se,me,j]),fe=(0,i.useCallback)((()=>{te({targetUri:j,intent:"navigate",type:"click"});const e=se.hitUiNavigate({destination:q??j});ae.logInteraction(e)}),[ae,q,te,se,j]),be=(0,i.useCallback)((()=>{if(e(j),x)return void ge();if(r)return;let t;fe(),ce&&(t=ce.toURLPath(!0)+ne);let n=q??t;n=ue?(0,v.hF)(n||""):n,n&&ee(n)}),[e,j,x,r,fe,ce,q,ue,ge,ne,ee]);return(0,A.jsx)(oe,{spec:se,children:(0,A.jsx)(C.E,{uri:j,trigger:C.l.OnMouseDown,children:(0,A.jsx)(o.Z,{onContextMenu:R,onTouchStart:k,onTouchEnd:O,"":G,onDragStart:re,className:s()(S.A.cardContainer,S.A.draggable,H),id:`${j}-${Y}`,size:"md",variant:"naked",onClick:be,title:(0,A.jsx)(I,{delegateNavigation:r,to:z??j,search:ne,pathname:q,children:(0,A.jsxs)(l.Z,{variant:"ballad",lineClamp:J,title:B,className:S.A.cardTitle,onClick:be,dir:"auto",children:[F&&(0,A.jsx)(h.Tc,{className:S.A.newEpisodeIndicator}),B]})}),subtitle:X?(0,A.jsx)(c.j,{variant:"mesto",lineClamp:2,as:"div",dir:"auto",children:D(ae,se)}):void 0,draggable:ie,trailing:M&&(0,A.jsx)(p.M,{uri:j,className:S.A.DownloadStatusIndicator,size:"small"}),media:(0,A.jsxs)("div",{className:S.A.imageContainer,children:[L(),U&&(0,A.jsx)("div",{className:s()(S.A.PlayButtonContainer,{[S.A.PlayButtonContainerVisible]:he}),children:(0,A.jsx)(g.R,{isPlaying:he,onClick:ge,ariaPlayLabel:W??m.Ru.get("playlist.a11y.play",B),ariaPauseLabel:K??m.Ru.get("playlist.a11y.pause",B)})})]})})})})}},66956:(e,t,n)=>{"use strict";n.d(t,{M:()=>d});var i=n(97500),r=n.n(i),s=n(95231),a=n(72423),o=n(24577),l=n(92724),c=n(13274);const u=e=>(0,c.jsx)(s.e,{size:"xxlarge",...e}),d=e=>{const{children:t,isHero:n=!1,isCircular:i=!1,FallbackComponent:s=u,images:d=[],color:m,desiredSize:p=300,desiredLabel:h="standard",loadingMode:g="lazy"}=e,f=(0,o.g)(d,{desiredSize:p,desiredLabel:h}),b=f?.url,v={backgroundImage:b?`url(${f?.url})`:void 0,"--card-color":m};return(0,c.jsx)("div",{className:r()(l.A.imageWrapper,{[l.A.hero]:n,[l.A.circular]:i}),style:v,children:(0,c.jsxs)("div",{children:[(0,c.jsx)(a._,{className:r()(l.A.image,{[l.A.circular]:i}),src:f?.url,loading:g,testid:"card-image",fadeIn:!0,children:s&&(0,c.jsx)("div",{className:l.A.imagePlaceholder,children:(0,c.jsx)(s,{"aria-hidden":!0,"":"card-image-fallback"})})}),t]})})}},93207:(e,t,n)=>{"use strict";n.d(t,{c:()=>m});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764);const o="i6jA7UnVNDJFGlAgtutp",l="LaSOZAQLcR1DzFgdKrUx",c="JS9WYvoqyy3vUXqMt5Hv",u="qZH56jw74skju8uLzuF3";var d=n(13274);const m=i.memo((function({isHero:e,children:t,lineClamp:n=2}){return(0,d.jsx)(a.E,{as:"div",variant:"bodySmall",className:s()(o,{[u]:e,[l]:1===n,[c]:2===n}),semanticColor:"textSubdued",children:t})}))},62189:(e,t,n)=>{"use strict";n.d(t,{a:()=>c,t:()=>u});var i=n(97500),r=n.n(i);const s="SlbzF58tYfJdBqTpDBZE",a="VFWaXWtN61bTc_4UOexe",o="C3sIZDdL9EfwMJcSgl8t";var l=n(13274);const c=({children:e})=>(0,l.jsx)("span",{className:s,children:e}),u=e=>(0,l.jsx)("span",{className:r()(e.className,a,{[o]:e.noSeparator}),children:e.children})},12871:(e,t,n)=>{"use strict";n.d(t,{U:()=>R});var i=n(79474),r=n(60096),s=n(98764),a=n(14056),o=n(88291),l=n(63445),c=n(88713),u=n(12269),d=n(2092),m=n(32334),p=n(97374),h=n(15552),g=n(24577),f=n(47498),b=n(36575),v=n(66956),y=n(93207),_=n(62189),E=n(35022),x=n(58402);const C="GSY8YnDV4YNR_W53fPhi",S="dQYtZdjVyebpK221a_JU";var A=n(13274);const w=(0,i.memo)((function(e){const{src:t,description:n,...r}=e,[a,o]=(0,i.useState)("inherit");return(0,i.useEffect)((()=>{t&&async function(e){const{colorRaw:t}=await(0,x.extractColors)(e),{h:n,s:i,l:r}=t.hsl,s=`hsl(${360*n}, ${100*i}%, ${Math.min(100*r,30)}%)`;o(s)}(t)}),[t]),t?(0,A.jsx)("div",{className:C,style:{backgroundColor:a},"":"episode-fallback-image-container",children:(0,A.jsx)("div",{className:S,children:(0,A.jsx)(s.E,{as:"p",variant:"titleSmall",children:n})})}):(0,A.jsx)(E.L,{...r,size:"xxlarge"})}));var I=n(43067),T=n(19258);const N="Qb8_f8zfu_KeMGbDtEOO",R=({description:e,isExplicit:t,images:n,name:E,uri:x,durationMilliseconds:C,releaseDate:S,resume_point:R,showImages:k,sharingInfo:O,is19PlusOnly:P,isHero:j,onClick:L,testId:D,index:U,requestId:M,color:B,episodeShow:F,variant:H})=>{let V;const z=S?new Date(S):void 0,G=z&&!isNaN(z.getTime())&&!isNaN(C),W=(0,g.g)(k,{desiredSize:48}),K=(0,u.hD)(x,z?.toISOString(),R?.resume_position_ms,R?.fully_played),Y=F?.uri||"",{draggable:q,onDragStart:Q}=(0,d.P)({itemUris:[Y],dragLabelText:F?.name}),$=(0,i.useCallback)((()=>{L?.(Y)}),[L,Y]);return V=j?(0,A.jsx)(I.A,{index:U,onClick:L,headerText:E,featureIdentifier:"episode",uri:x,isPlayable:!0,isDownloadable:!0,hasNewEpisodeIndicator:K,renderCardImage:()=>(0,A.jsx)(v.M,{isHero:!0,images:n,color:B,FallbackComponent:t=>(0,A.jsx)(w,{...t,description:e,src:W&&W.url})}),renderSubHeaderContent:()=>(0,A.jsx)(y.c,{isHero:!0,children:(0,A.jsxs)(_.a,{children:[t&&!P&&(0,A.jsx)(_.t,{className:N,noSeparator:!0,children:(0,A.jsx)(m.g,{})}),P&&(0,A.jsx)(_.t,{className:N,noSeparator:!0,children:(0,A.jsx)(p.q,{size:16})}),(0,A.jsx)(_.t,{children:(0,A.jsx)(T.t,{children:a.Ru.get("card.tag.episode")})}),G&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(_.t,{children:(0,h.gD)(z)}),(0,A.jsx)(_.t,{children:a.Ru.get("episode.length",Math.ceil(C/6e4))})]}),F&&(0,A.jsx)(_.t,{children:(0,A.jsx)(c.Zp,{label:F?.name,showDelay:c.uF,children:(0,A.jsx)(s.E,{as:"span",children:(0,A.jsx)(o.h,{menu:(0,A.jsx)(l.H,{uri:Y}),children:(0,A.jsx)(r.N_,{draggable:q,to:Y,onDrag:Q,dir:"auto",onClick:$,children:F?.name})})})})})]})}),testId:D,requestId:M}):(0,A.jsx)(b.Z,{variant:H,index:U,onClick:L,headerText:E,featureIdentifier:"episode",uri:x,isPlayable:!0,isDownloadable:!0,hasNewEpisodeIndicator:K,renderCardImage:()=>(0,A.jsx)(v.M,{images:n,color:B,FallbackComponent:t=>(0,A.jsx)(w,{...t,description:e,src:W&&W.url})}),renderSubHeaderContent:()=>(0,A.jsxs)(y.c,{children:[t&&!P&&(0,A.jsx)(_.t,{className:N,noSeparator:!0,children:(0,A.jsx)(m.g,{})}),P&&(0,A.jsx)(_.t,{className:N,noSeparator:!0,children:(0,A.jsx)(p.q,{size:16})}),G&&(0,A.jsxs)(_.a,{children:[(0,A.jsx)(_.t,{children:(0,h.gD)(z)}),(0,A.jsx)(_.t,{children:a.Ru.get("episode.length",Math.ceil(C/6e4))})]})]}),testId:D,requestId:M}),(0,A.jsx)(o.h,{menu:(0,A.jsx)(f.b,{uri:x,sharingInfo:O}),children:V})}},43067:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var i=n(79474),r=n(97500),s=n.n(r),a=n(83648),o=n(38979),l=n(83856),c=n(263),u=n(26271),d=n(67302),m=n(60786),p=n(2092),h=n(91303),g=n(36471),f=n(58291),b=n(98764),v=n(98196),y=n(12269),_=n(10072);const E="XLAiqekZxk4Z7Nok9a58",x="A49BHvl5C1wTQ0ZGCq6V",C="Jiy7CZomKxCOUMtOMwF_";var S=n(13274);const A=i.memo((function({search:e,children:t,to:n,onClick:i,isHero:r,title:s,hasNewEpisodeIndicator:a=!1,navigationUrl:o,disableLink:l=!1}){const c=r?"titleMedium":"bodyMediumBold",u=(0,S.jsxs)(b.E,{as:"div",variant:c,className:x,paddingBottom:v.vw,semanticColor:"textBase",children:[a&&(0,S.jsx)(y.Tc,{className:C}),t]});return l?u:(0,S.jsx)(_.N,{to:n,onClick:i,title:s,className:E,dir:"auto",search:e,pathname:o,children:u})}));var w=n(93207);const I="mXNT9H2GU7lDW4cGx0q1",T="ouEZqTcvcvMfvezimm_J",N="pueeb339I8KrXZr0SDm1",R="cofBW8sjoBtMAmzDgqKt",k="Ykx_9AV9dI9vTLVV2b7h",O="NI1OxoVdokxENPAjoeOk",P="eUHZjKB8k8xrDIVk_cy9",j=e=>{const{onClick:t=(()=>{}),onContextMenu:n=(()=>{}),onTouchStart:r=(()=>{}),onTouchEnd:b=(()=>{}),delegatePlayback:v=!1,delegateLogging:y=!1,delegateNavigation:_=!1,playInsteadOfNavigating:E=!1,isPlaying:x,onPlay:C=(()=>{}),featureIdentifier:j,uri:L,renderCardImage:D,renderSubHeaderContent:U=(()=>null),isPlayable:M=!0,isDownloadable:B=!1,headerText:F,hasNewEpisodeIndicator:H=!1,className:V,playUri:z=L,albumURI:G,testId:W,ariaPlayLabel:K,ariaPauseLabel:Y,index:q,requestId:Q,dragMimeType:$,getSignifierContent:Z=(()=>null)}=e,X=(0,a.Zp)(),J=(0,g.W)(),ee=G?`?highlight=${L}`:"",te=G||L,ne=(0,h.W)({type:"link",uri:te}),{draggable:ie,onDragStart:re}=(0,p.P)({itemUris:[L],itemMimeTypes:$?[$]:[],dragLabelText:F}),se=(0,i.useCallback)((e=>{e.target===e.currentTarget&&re(e)}),[re]),{spec:ae,logger:oe,UBIFragment:le}=(0,d.r)(o.y,{data:{uri:L,position:q,reason:Q??""}}),{isPlaying:ce,isActive:ue,togglePlay:de}=(0,u.P)({uri:z},{featureIdentifier:j});let me=ce;v&&"boolean"==typeof x&&(me=x);const pe=(0,i.useCallback)((()=>{let e=ae.cardPlayButtonFactory().hitPause({itemToBePaused:L});me||(e=ue?ae.cardPlayButtonFactory().hitResume({itemToBeResumed:L}):ae.cardPlayButtonFactory().hitPlay({itemToBePlayed:L}));const t=oe.logInteraction(e);if(C(L,t),y||J({targetUri:L,intent:me?"pause":"play",type:"click"}),v){if("function"!=typeof C)throw Error("No delegate playback handler provided")}else de({loggingParams:t})}),[y,v,ue,me,oe,J,C,ae,de,L]),he=(0,i.useCallback)((()=>{J({targetUri:L,intent:"navigate",type:"click"});const e=ae.hitUiNavigate({destination:L});oe.logInteraction(e)}),[oe,J,ae,L]),ge=(0,i.useCallback)((()=>{if(t(L),E)return void pe();if(_)return;he();const e=(0,l.o_)(te).toURLPath(!0),n=ne?(0,m.hF)(`${e}${ee}`):`${e}${ee}`;X(n)}),[t,L,E,_,he,te,ne,ee,X,pe]);return(0,S.jsx)(le,{spec:ae,children:(0,S.jsx)("div",{className:s()(I,V),onContextMenu:n,onTouchStart:r,onTouchEnd:b,"":W,children:(0,S.jsxs)("div",{draggable:ie,onDragStart:se,className:N,children:[D(),(0,S.jsxs)("div",{className:R,children:[(0,S.jsx)(A,{to:G||L,search:ee,onClick:he,isHero:!0,title:F,hasNewEpisodeIndicator:H,children:F}),U?(0,S.jsx)(w.c,{isHero:!0,children:U(oe,ae)}):null,Z()]}),B&&(0,S.jsx)(f.M,{uri:L,className:k,size:"small"}),M&&(0,S.jsx)("div",{className:s()(O,{[P]:me}),children:(0,S.jsx)(c.R,{isPlaying:me,onClick:pe,ariaPlayLabel:K,ariaPauseLabel:Y})}),(0,S.jsx)("div",{onClick:ge,className:T,"":"herocard-click-handler"})]})})})}},19258:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});var i=n(98764);const r="hSL9Sb4ko4GNvUVuPQOw";var s=n(13274);const a=({semanticColor:e,children:t})=>t?(0,s.jsx)(i.E,{variant:"bodySmall",semanticColor:e,className:r,children:t}):null},99426:(e,t,n)=>{"use strict";n.d(t,{B:()=>E});var i=n(79474),r=n(95231),s=n(98764),a=n(14056),o=n(88291),l=n(98496),c=n(30957),u=n(8548),d=n(72728),m=n(16649),p=n(69494),h=n(36575),g=n(66956),f=n(93207),b=n(43067),v=n(19258),y=n(13274);const _=(e,t)=>(n,i)=>{i&&e.logInteraction(t.cardLinkFactory({position:0}).hitUiNavigate({destination:i}))},E=({name:e,uri:t,images:n,description:E,authorName:x,authorUri:C,isHero:S=!1,onClick:A=(()=>{}),testId:w,index:I,requestId:T,color:N,isPlayable:R,variant:k})=>{let O,P=(0,y.jsx)(p.W,{uri:t}),j=R,L=!1;const D=C||"",U=(0,i.useCallback)((()=>{A?.(D)}),[A,D]);return(0,m.c0)(t)&&(j=!0,P=(0,y.jsx)(d.gb,{}),L=!0),O=S?(0,y.jsx)(b.A,{index:I,onClick:A,headerText:e,featureIdentifier:"playlist",uri:t,isDownloadable:!0,playInsteadOfNavigating:L,renderCardImage:()=>(0,y.jsx)(g.M,{isHero:!0,images:n,color:N,FallbackComponent:e=>(0,y.jsx)(r.e,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,t)=>(0,y.jsxs)(f.c,{isHero:!0,children:[(0,y.jsx)(v.t,{children:a.Ru.get("card.tag.playlist")}),E?(0,y.jsx)(u.N,{source:E,LinkComponent:c.Link,onLinkClick:_(e,t)}):x&&C&&(0,y.jsx)(o.h,{menu:(0,y.jsx)(l.B,{uri:D}),children:(0,y.jsx)(s.E,{variant:"bodySmall",children:(0,y.jsx)(c.Link,{to:D,onClick:U,children:x})})})]}),testId:w,requestId:T,isPlayable:j}):(0,y.jsx)(h.Z,{variant:k,index:I,onClick:A,headerText:e,featureIdentifier:"playlist",uri:t,isDownloadable:!0,playInsteadOfNavigating:L,renderCardImage:()=>(0,y.jsx)(g.M,{images:n,color:N,FallbackComponent:e=>(0,y.jsx)(r.e,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,t)=>(0,y.jsx)(f.c,{children:E?(0,y.jsx)(u.N,{source:E,LinkComponent:c.Link,onLinkClick:_(e,t)}):x&&(0,y.jsx)("span",{children:a.Ru.get("search.playlist-by",x)})}),testId:w,requestId:T,isPlayable:j}),(0,y.jsx)(o.h,{menu:P,children:O})}},30428:(e,t,n)=>{"use strict";n.d(t,{a:()=>h});var i=n(79474),r=n(41028),s=n(14056),a=n(88291),o=n(98496),l=n(36575),c=n(66956),u=n(93207),d=n(43067),m=n(19258),p=n(13274);const h=i.memo((function({images:e,name:t,uri:n,onClick:h,isHero:g,testId:f,index:b,requestId:v,color:y,variant:_}){let E;const x=(0,i.useCallback)((()=>(0,p.jsx)(c.M,{isCircular:!0,isHero:g,images:e,color:y,FallbackComponent:e=>(0,p.jsx)(r.r,{size:"xxlarge",...e})})),[y,e,g]),C=(0,i.useCallback)((()=>(0,p.jsx)(u.c,{isHero:g,children:g?(0,p.jsx)(m.t,{children:s.Ru.get("card.tag.profile")}):s.Ru.get("card.tag.profile")})),[g]);return E=g?(0,p.jsx)(d.A,{index:b,onClick:h,headerText:t,featureIdentifier:"profile",uri:n,isPlayable:!1,renderCardImage:x,renderSubHeaderContent:C,testId:f,requestId:v}):(0,p.jsx)(l.Z,{variant:_,index:b,onClick:h,headerText:t,featureIdentifier:"profile",uri:n,isPlayable:!1,renderCardImage:x,renderSubHeaderContent:C,testId:f,requestId:v}),(0,p.jsx)(a.h,{menu:(0,p.jsx)(o.B,{uri:n}),children:E})}))},72412:(e,t,n)=>{"use strict";n.d(t,{o:()=>p});var i=n(14056),r=n(88291),s=n(66774),a=n(63445),o=n(36575),l=n(66956),c=n(93207),u=n(43067),d=n(19258),m=n(13274);const p=({images:e,name:t,uri:n,publisher:p,sharingInfo:h,mediaType:g,isHero:f=!1,onClick:b,testId:v,index:y,requestId:_,color:E,variant:x})=>{let C;const S=g===s.Q.MIXED?i.Ru.get("type.show"):i.Ru.get("card.tag.show");return C=f?(0,m.jsx)(u.A,{index:y,onClick:b,delegatePlayback:!0,headerText:t,featureIdentifier:"show",uri:n,isPlayable:!1,renderCardImage:()=>(0,m.jsx)(l.M,{isHero:!0,images:e,color:E}),renderSubHeaderContent:()=>(0,m.jsxs)(c.c,{isHero:!0,children:[(0,m.jsx)(d.t,{children:S}),p&&(0,m.jsx)("span",{children:p})]}),testId:v,requestId:_}):(0,m.jsx)(o.Z,{variant:x,onClick:b,isPlayable:!1,delegatePlayback:!0,headerText:t,featureIdentifier:"show",uri:n,index:y,renderCardImage:()=>(0,m.jsx)(l.M,{isHero:f,images:e,color:E}),renderSubHeaderContent:()=>(0,m.jsx)(c.c,{children:p&&(0,m.jsx)("span",{children:p})}),testId:v,requestId:_}),(0,m.jsx)(r.h,{menu:(0,m.jsx)(a.H,{uri:n,sharingInfo:h}),children:C})}},85406:(e,t,n)=>{"use strict";n.d(t,{u:()=>b});var i=n(79474),r=n(97500),s=n.n(r),a=n(36575),o=n(68035),l=n(10801);const c="B3NcOBJt_x6GdEDzdMX4",u="cwkCVR8XspK0RXEmmHqW",d="CFjzd1Z8fj7reHf6vhG8",m="oQ4jLC_wmDT4a46KRq9P";var p=n(87775),h=n(92724),g=n(13274);const f=(0,i.memo)((({isLoading:e})=>{const t=(0,o.h)("shimmer");return(0,g.jsx)("div",{ref:t,className:s()(h.A.imageWrapper,{[m]:e})})})),b=(0,i.memo)((({cardImage:e,isLoading:t,variant:n})=>(0,g.jsxs)("div",{className:s()(p.A.card,c),"aria-hidden":!0,"":"skeleton-card",children:[(0,g.jsx)("div",{className:s()(p.A.imageContainer,p.A.imageContainerSkeleton),children:e||(0,g.jsx)(f,{isLoading:t})}),(0,g.jsxs)("div",{className:p.A.cardMetadata,children:[(0,g.jsx)(l.Y,{as:"div",variant:"bodyMediumBold",className:u,charCount:15,isLoading:t}),n!==a._.Compact&&(0,g.jsx)(l.Y,{as:"div",variant:"bodySmall",className:d,charCount:10,isLoading:t})]})]})))},84610:(e,t,n)=>{"use strict";n.d(t,{w:()=>E});var i=n(14056),r=n(88291),s=n(18836),a=n(28078),o=n(15704),l=n(1704),c=n(32334),u=n(97374),d=n(26903),m=n(41955),p=n(36575),h=n(66956),g=n(93207),f=n(43067),b=n(19258);const v="UHjdTucjadSs9x3SjoAp",y="iHomw25Q7DDHLVQxfgNW";var _=n(13274);const E=({name:e,uri:t,images:n,album:E,artists:x,isExplicit:C,is19PlusOnly:S,isHero:A=!1,onClick:w,testId:I,index:T,requestId:N,isLyricsMatch:R,color:k,hasAssociatedVideo:O,variant:P})=>{let j;const{badges:L,hasBadges:D}=(0,d.b)({isExplicit:C,isMOGEFRestricted:S,hasAssociatedVideo:O});return j=A?(0,_.jsx)(f.A,{index:T,onClick:w,headerText:e,featureIdentifier:"track",uri:t,albumURI:E?.uri,renderCardImage:()=>(0,_.jsx)(h.M,{isHero:!0,images:n,color:k}),renderSubHeaderContent:()=>(0,_.jsxs)(g.c,{isHero:!0,children:[D&&(0,_.jsxs)(a.P,{children:[L.explicit&&(0,_.jsx)(c.g,{}),L.nineteen&&(0,_.jsx)(u.q,{className:v,size:16}),L.hasAssociatedVideo&&(0,_.jsx)(o.l,{})]}),(0,_.jsx)(b.t,{children:i.Ru.get("card.tag.track")}),(0,_.jsx)(s.l,{artists:x,className:y}),R&&(0,_.jsx)(l.G,{})]}),testId:I,requestId:N}):(0,_.jsx)(p.Z,{variant:P,index:T,onClick:w,headerText:e,featureIdentifier:"track",uri:t,albumURI:E?.uri,renderCardImage:()=>(0,_.jsx)(h.M,{images:n,color:k}),renderSubHeaderContent:()=>(0,_.jsxs)(g.c,{children:[C&&!S&&(0,_.jsx)(c.g,{className:v}),S&&(0,_.jsx)(u.q,{size:16,className:v}),(0,_.jsx)(s.l,{artists:x,className:y}),R&&(0,_.jsx)(l.G,{})]}),testId:I,requestId:N}),(0,_.jsx)(r.h,{menu:(0,_.jsx)(m.P,{uri:t,artists:x,albumUri:E?.uri}),children:j})}},46737:(e,t,n)=>{"use strict";n.d(t,{O:()=>B});var i=n(79474),r=n(97500),s=n.n(r),a=n(54015),o=n(37463),l=n(74752),c=n(833),u=n(83455),d=n(22259),m=n(22215),p=n(38979),h=n(14056),g=n(63492),f=n(65325),b=n(88291),v=n(75951),y=n(18836),_=n(32334),E=n(97374),x=n(87687),C=n(30232),S=n(52792),A=n(67302),w=n(9440),I=n(26903),T=n(19498);const N="ak6gYegwMkcNWd6xPIy5",R="cKtgEwzPvLoFLbM2op0D",k="IQ7JUMYnMWLk3LYDwvuA",O="d42g9OybmMicQKsRF86I",P="XVySLcfMggFYO3c9HYKs",j="DPmEbaBR_rtvwGSuWCXT",L="VhA41F8smbkebJG9jYiy",D="LtcBzRcDxuIVYfjr7yt1",U="iXKaEy6qo9NvVG87pXJl";var M=n(13274);const B=({className:e,title:t,trackUri:n,artists:r,album:B,contentRating:F,index:H,hoverBackgroundColor:V,contentAlign:z,size:G="md",referrerIdentifier:W})=>{const K=(0,x.K)(),[Y,q]=(0,i.useState)(!1),Q=(0,C.o)((e=>e?.item?.uri===n)),$=(0,m.NC)(T.b2),Z=(0,m.NC)(T.wl5),X=(0,m.NC)(T.ZoB),{spec:J,logger:ee}=(0,A.r)(p.y,{data:{position:H,uri:n,reason:"related-videos-card"}}),te=Q?(0,M.jsx)(a._,{size:"large",width:36}):(0,M.jsx)(o.A,{size:"large",width:36}),{badges:ne,hasBadges:ie}=(0,I.b)({contentRating:F?.label}),re=(0,i.useCallback)((()=>{const e=J.cardPlayButtonFactory().hitPlay({itemToBePlayed:n});return ee.logInteraction(e),$&&"home"===W||Z&&"now_playing_panel"===W||X?K.play({uri:n},{featureIdentifier:"song_videos",referrerIdentifier:W}):K.playAsNextInQueue([{uri:n,type:w.c.TRACK,uid:null,provider:""}])}),[X,$,Z,ee,K,W,J,n]),se=(0,S.t)(J);return(0,M.jsx)(b.h,{menu:(0,M.jsx)(v.o,{uri:n,albumUri:B?.uri,artists:[{name:r[0].profile.name,uri:r[0].uri}]}),children:(0,M.jsx)(l.Z,{contentAlign:z,className:s()(j,e),variant:"naked",id:n,size:G,hoverBackgroundColor:V,onMouseEnter:()=>{q(!0)},onMouseLeave:()=>{q(!1)},title:(0,M.jsx)(c.Z,{variant:"ballad",lineClamp:1,title:t,dir:"auto",children:t}),subtitle:(0,M.jsx)(u.j,{variant:"mesto",lineClamp:1,as:"div",dir:"auto",semanticColor:"textSubdued",children:(0,M.jsxs)("div",{className:L,children:[ie&&(0,M.jsxs)(M.Fragment,{children:[ne.explicit&&(0,M.jsx)(_.g,{className:U}),ne.nineteen&&(0,M.jsx)(E.q,{className:U})]}),(0,M.jsx)(y.l,{artists:r.map((e=>({uri:e.uri,name:e.profile.name}))),className:D})]})}),media:(0,M.jsxs)("div",{className:P,children:[(0,M.jsx)("div",{className:s()(R,{[k]:Y}),children:(0,M.jsx)("div",{className:s()(O),children:te})}),(0,M.jsx)(d._,{src:B?.coverArt?.sources[0].url,className:N})]}),onClick:re,trailing:Y&&(0,M.jsx)(f.b,{menu:(0,M.jsx)(v.o,{uri:n,albumUri:B?.uri,artists:[{name:r[0].profile.name,uri:r[0].uri}]}),children:(0,M.jsx)(g.e,{size:g.M.xs,label:h.Ru.get("more.label.context",t)})}),ref:se})})}},68104:(e,t,n)=>{"use strict";n.d(t,{F:()=>S});var i=n(79474),r=n(97500),s=n.n(r),a=n(23659),o=n(27500),l=n(7079),c=n(61252),u=n(74938);function d(){const e=(0,i.useRef)(0);return(0,i.useCallback)((t=>{const n=t.currentTarget,i=n.style.scrollBehavior;let r=!1;const s=n.scrollLeft,a=t.clientX;let o=0;function l(){cancelAnimationFrame(e.current),document.removeEventListener("wheel",c)}function c(){l(),n.style.scrollBehavior=i}function u(){n.scrollLeft+=o,o*=.95,Math.abs(o)>.5?e.current=requestAnimationFrame(u):c()}n.style.userSelect="none",n.style.scrollBehavior="auto",l();const d=e=>{const t=e.clientX-a;Math.abs(t)>10&&(r=!0);const i=n.scrollLeft;n.scrollLeft=s-t,o=n.scrollLeft-i};document.addEventListener("mousemove",d),document.addEventListener("mouseup",(()=>{const t=e=>{e.preventDefault(),e.stopImmediatePropagation()};!0===r&&(n.addEventListener("click",t,{once:!0,capture:!0}),setTimeout((()=>{n.removeEventListener("click",t,{capture:!0})}))),n.style.removeProperty("user-select"),document.removeEventListener("mousemove",d),l(),e.current=requestAnimationFrame(u),document.addEventListener("wheel",c,{once:!0})}),{once:!0})}),[])}const m="search-searchCategory-contentArea",p="search-searchCategory-catergoryGrid",h="MUloQuW1xQawwVs0mDp4",g="OlnSvEViCZ_vVdnc3mSQ",f="FjMPyh7lOujDVYQRvp0H",b="search-searchCategory-carousel",v="search-searchCategory-carouselButton",y="search-searchCategory-carouselButtonVisible";var _=n(13274),E=function(e){return e[e.LEFT=-1]="LEFT",e[e.RIGHT=1]="RIGHT",e}(E||{});function x(e,t,n){(0,c.MS)(e,t),function(e,t){const n=e.offsetLeft,i=e.offsetWidth,r=n+i,s=t.scrollLeft,a=t.offsetWidth;(s>0||(s+a)/2<=r)&&t.scroll({left:i/2+n-a/2})}(t,n)}function C(e,t){const n=e.querySelector('[tabindex="0"]')||e.firstElementChild;if(n&&n instanceof HTMLElement)if(t===E.RIGHT){if(document.activeElement===e||!n.nextElementSibling)return void x(n,e.querySelector("a[href], button")??e,e);n.nextElementSibling instanceof HTMLElement&&x(n,n.nextElementSibling,e)}else if(t===E.LEFT){if(document.activeElement===e||!n.previousElementSibling){const t=e.querySelectorAll("a[href], button");if(!t||!t.length)return;return void x(n,t[t.length-1]??e,e)}if(n.previousElementSibling instanceof HTMLElement)return void x(n,n.previousElementSibling,e)}}const S=e=>{const{children:t,className:n,showButtons:r=!0,ariaLabel:c,applyLightThemeControls:x=!1}=e,S=(0,i.useRef)(null),A=(0,i.useRef)(null),[w,I]=(0,i.useState)(!1),[T,N]=(0,i.useState)(!1),R=(0,i.useCallback)((()=>{if(!S.current||!A.current)return;const e=S.current,t=A.current,n=e.scrollWidth-e.clientWidth,i=Math.abs(e.scrollLeft),r=i<1?Math.floor(i):Math.ceil(i),s=t.offsetWidth>e.clientWidth;N(s&&0!==r),I(s&&r<n)}),[]);(0,u.w)({refOrElement:A,observeOnly:"width",onResize:R}),(0,u.w)({refOrElement:S,observeOnly:"width",onResize:R});const k=i.Children.toArray(t).length;(0,i.useLayoutEffect)(R,[k,R]);const O=(0,i.useCallback)((e=>{const t=e*(S.current.clientWidth/2);S.current.scrollBy({left:t}),R()}),[R]),P=(0,l.W)(),j=(0,i.useCallback)((e=>{"ArrowLeft"===e.key?(e.preventDefault(),C(S.current,P?E.RIGHT:E.LEFT)):"ArrowRight"===e.key&&(e.preventDefault(),C(S.current,P?E.LEFT:E.RIGHT))}),[P]),L=P?w:T,D=P?T:w,U=r&&(L||D),M=d(),B=function(){const e=(0,i.useRef)(!0),t=(0,i.useRef)(null),n=(0,i.useRef)(null);return(0,i.useCallback)((i=>{if(!i.deltaY)return;const r=i.currentTarget;e.current&&(e.current=!1,t.current=r.style.scrollBehavior,r.style.scrollBehavior="auto"),r.scrollLeft+=i.deltaY+i.deltaX,n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{e.current=!0,r.style.scrollBehavior=t.current??""}),100)}),[])}();return(0,_.jsxs)("div",{className:s()(m,n),children:[(0,_.jsx)("div",{ref:S,className:s()(p,{[g]:D&&!L,[h]:L&&!D,[f]:L&&D}),onScroll:R,onKeyDown:j,onMouseDown:M,onWheel:B,role:"list","aria-label":c,tabIndex:0,children:(0,_.jsx)("div",{ref:A,role:"presentation",children:t})}),U&&(0,_.jsxs)("div",{className:s()(b,{"encore-light-theme":x}),dir:"ltr",children:[(0,_.jsx)("button",{className:s()(v,{[y]:L}),tabIndex:-1,onClick:()=>O(E.LEFT),"aria-hidden":"true",children:(0,_.jsx)(a.g,{autoMirror:!1,semanticColor:"textBase",size:"small"})}),(0,_.jsx)("button",{className:s()(v,{[y]:D}),tabIndex:-1,onClick:()=>O(E.RIGHT),"aria-hidden":"true",children:(0,_.jsx)(o.V,{autoMirror:!1,semanticColor:"textBase",size:"small"})})]})]})}},45132:(e,t,n)=>{"use strict";n.d(t,{T:()=>d});var i=n(97500),r=n.n(i),s=n(98764),a=n(11283),o=n(61080),l=n(22269);const c={container:"main-confirmDialog-container",overlay:"main-confirmDialog-overlay",buttonContainer:"main-confirmDialog-buttonContainer",button:"main-confirmDialog-button"};var u=n(13274);function d({onClose:e=(()=>{}),onOutside:t,isOpen:n=!0,titleText:i,descriptionText:d,cancelText:m,confirmText:p,confirmLabel:h,onConfirm:g,allowHTML:f=!1,shouldCloseOnEsc:b=!0,shouldCloseOnOverlayClick:v=!0,shouldFocusAfterRender:y=!0,..._}){return(0,u.jsx)(l.A,{animated:!0,shouldCloseOnEsc:b,shouldCloseOnOverlayClick:v,overlayClassName:c.overlay,onRequestClose:t??e,contentLabel:_["aria-label"],isOpen:n,shouldFocusAfterRender:y,..._,children:(0,u.jsxs)("div",{className:r()("encore-light-theme",c.container),children:[(0,u.jsx)(s.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:i}),d&&(f?(0,u.jsx)(s.E,{as:"p",variant:"bodySmall",semanticColor:"textBase",dangerouslySetInnerHTML:{__html:d},"":"confirm-dialog-description"}):(0,u.jsx)(s.E,{as:"p",variant:"bodySmall",semanticColor:"textBase","":"confirm-dialog-description",children:d})),(0,u.jsxs)("div",{className:c.buttonContainer,children:[m&&(0,u.jsx)(a.H,{onClick:e,semanticColor:"textBase",className:c.button,children:m}),(0,u.jsx)(o.$,{"aria-label":h,autoFocus:!0,onClick:g,className:c.button,children:p})]})]})})}},93905:(e,t,n)=>{"use strict";n.d(t,{n:()=>y});var i=n(83856),r=n(14056),s=n(30957),a=n(33082),o=n(41982),l=n(57506),c=n(86412),u=n(54260),d=n(45640),m=n(61127),p=n(13274);const h=({item:e,onClick:t})=>(0,p.jsx)(p.Fragment,{children:e.artists.map(((n,a)=>{const o=(0,i.o_)(n.uri)?.toURLPath(!0);return(0,p.jsxs)("span",{children:[a>0?r.Ru.getSeparator():null,o?(0,p.jsx)(s.default,{to:o,"":`context-item-info-${e.type}`,dir:"auto",onClick:t,children:n.name}):(0,p.jsx)("span",{dir:"auto",children:n.name})]},a)}))}),g=({item:e,onClick:t})=>{const{show:n}=e,r=(0,i.o_)(n.uri)?.toURLPath(!0);return r?(0,p.jsx)(s.default,{to:r,"":"context-item-info-show",dir:"auto",onClick:t,children:n.name}):(0,p.jsx)("span",{dir:"auto",children:n.name})},f=({item:e,onClick:t})=>{const{book:n}=e,r=(0,i.o_)(n.uri)?.toURLPath(!0);return r?(0,p.jsx)(s.default,{to:r,"":"context-item-info-book",dir:"auto",onClick:t,children:n.name}):(0,p.jsx)("span",{dir:"auto",children:n.name})},b={"":"context-item-info-ad-subtitle"},v=({item:e,onClick:t})=>{const n=(0,m.iz)(e);return n.url?(0,p.jsx)("a",{...b,onClick:e=>{t?.(e,n.url||void 0)},href:n.url??void 0,rel:"noopener noreferrer",target:"_blank",dir:"auto",children:n.subtitle}):(0,p.jsx)("span",{dir:"auto",children:n.subtitle})},y=({item:e,onClick:t})=>(0,c.v)(e)||(0,u.v)(e)?(0,p.jsx)(h,{item:e,onClick:t}):(0,l.p)(e)?(0,p.jsx)(g,{item:e,onClick:t}):(0,o.d)(e)?(0,p.jsx)(f,{item:e,onClick:t}):(0,a.N)(e)?(0,p.jsx)(v,{item:e,onClick:t}):(0,d.d)(e)},76443:(e,t,n)=>{"use strict";n.d(t,{R:()=>h});var i=n(83856),r=n(30957),s=n(33082),a=n(41982),o=n(57506),l=n(86412),c=n(54260),u=n(45640),d=n(51820),m=n(24640),p=n(13274);const h=({item:e,children:t,onClick:n,adUrl:h})=>{const{isSongVideoPlayingVideo:g}=(0,d.k)(),{trackPageEnhancedEnabled:f,trackPageLinksNoLyricsEnabled:b}=(0,m.Zo)(),v=h??function(e,{isVideoPlaying:t=!1,renderTrackLink:n}){if((0,l.v)(e)){const r=n?e.uri:e.album.uri,s=t?e.artists[0].uri:r;return(0,i.o_)(s)?.toURLPath(!0)}if((0,o.p)(e)||(0,a.d)(e)||(0,c.v)(e))return(0,i.o_)(e?.uri)?.toURLPath(!0);(0,s.N)(e)||(0,u.k)(e)}(e,{isVideoPlaying:g,renderTrackLink:f||b});return(0,l.v)(e)&&e.isLocal?(0,p.jsx)(p.Fragment,{children:t}):(0,l.v)(e)||(0,o.p)(e)||(0,a.d)(e)||(0,c.v)(e)?void 0===v?(0,p.jsx)(p.Fragment,{children:t}):(0,p.jsx)(r.default,{"":"context-item-link",to:v,onClick:n,children:t}):(0,s.N)(e)?v?(0,p.jsx)("a",{"":"context-item-info-ad-title",onClick:e=>{n?.(e,v)},href:v,rel:"noopener noreferrer",target:"_blank",children:t}):(0,p.jsx)(p.Fragment,{children:t}):(0,u.d)(e)}},65325:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var i=n(87882),r=n(13274);const s=({children:e,...t})=>(0,r.jsx)(i.t,{...t,action:"toggle",trigger:"click",children:e})},87882:(e,t,n)=>{"use strict";n.d(t,{t:()=>f});var i=n(79474),r=n(23590),s=n(41318),a=n(13274);const o=({toggleContextMenu:e,children:t})=>(0,a.jsx)(a.Fragment,{children:i.cloneElement(t,{onClick:n=>{t.props.onClick?.(n),e(n)}})}),l=({openContextMenu:e,children:t})=>{const n=(0,s.Oj)();return(0,a.jsx)(a.Fragment,{children:i.cloneElement(t,{onFocus:n=>{document.documentElement.classList.contains("no-focus-outline")||(t.props.onFocus?.(n),e(n))},onBlur:e=>{t.props.onBlur?.(e),n({type:"close"})},onMouseEnter:n=>{t.props.onMouseEnter?.(n),e(n)},onMouseLeave:e=>{t.props.onMouseLeave?.(e),n({type:"close"})}})})},c=({openContextMenu:e,children:t})=>{const n=(0,s.Oj)(),{isTouching:r}=(0,s.fd)(),o=(0,i.useRef)();return(0,a.jsx)(a.Fragment,{children:i.cloneElement(t,{onContextMenu:n=>{t.props.onContextMenu?.(n),r||e(n),n.stopPropagation()},onTouchStart:e=>{o.current=Date.now(),t.props.onTouchStart?.(e),n({type:"touch",value:!0})},onTouchEnd:i=>{var r;t.props.onTouchEnd?.(i),(r=o.current)&&Date.now()-500>r&&(n({type:"touch",value:!1}),e(i)),document.body.hasAttribute("data-dragging-type")&&document.body.removeAttribute("data-dragging-type")}})})};var u=n(30668);const d=(0,i.forwardRef)((function({isOpen:e,handleContextMenu:t,trigger:n,children:r},s){return(0,u.d)(r)?(0,a.jsx)(a.Fragment,{children:r(e,t,s)}):"click"===n?(0,a.jsx)(o,{toggleContextMenu:t,children:r}):"right-click"===n?(0,a.jsx)(c,{openContextMenu:t,children:r}):"hover-or-focus"===n?(0,a.jsx)(l,{openContextMenu:t,children:r}):(0,a.jsx)(a.Fragment,{children:(0,i.cloneElement)(r,{ref:s})})}));function m(e){if(!e)return{x:0,y:0};if(function(e){return"touchend"===e.type||"touchstart"===e.type}(e))return{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(function(e){if("clientX"in e&&"clientY"in e)return 0!==e.clientX&&0!==e.clientY;return!1}(e))return{x:e.clientX,y:e.clientY};const t=e.target.getBoundingClientRect();return{x:t.x+t.width/2,y:t.y+t.height}}var p=n(51208),h=n(39927);const g=({children:e,menu:t,action:n="toggle",trigger:o="click",renderInline:l=!1,offset:c=[0,8],placement:u="bottom-start",preventScrollingWhileOpen:g=!0,onShow:f,onHide:b,onClickOutside:v,snapshotReferenceElementPositionWhileOpen:y=!1,autoUpdate:_=!0,interactive:E=!0})=>{const x=(0,s.Oj)(),C=(0,s.fd)(),S=(0,p.M)({action:n,menu:t}),A=(0,h.ZY)();(0,i.useEffect)((()=>{_&&x({type:"update",menu:t})}),[_,x,t]);const w=(0,i.useCallback)((()=>{x({type:"close"})}),[x]),I=(0,i.useMemo)((()=>C.triggerElement&&y?C.triggerElement.getBoundingClientRect():null),[C.isOpen]);return(0,a.jsx)(r.A,{onClickOutside:(e,t)=>{v?v(w,e,t):w()},placement:u,trigger:o,offset:c,preventScrollingWhileOpen:g,triggerRef:C.triggerElement??void 0,appendTo:!A||l?void 0:()=>A.body,isOpen:C.isOpen,position:m(C.event),menu:C.menu,onShow:f,onHide:(...e)=>{w(),b?.(...e)},getReferenceClientRect:I?()=>I:null,interactive:E,children:(0,a.jsx)(d,{isOpen:C.isOpen,handleContextMenu:S,trigger:o,children:e})})},f=e=>(0,a.jsx)(s.SF,{children:(0,a.jsx)(g,{...e})})},88291:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var i=n(87882),r=n(13274);const s=e=>(0,r.jsx)(i.t,{...e,action:"open",trigger:"right-click"})},20273:(e,t,n)=>{"use strict";n.d(t,{W:()=>g});var i=n(79474),r=n(97500),s=n.n(r),a=n(22215),o=n(41318),l=n(38076),c=n(81755),u=n(94300),d=n(82548),m=n(93423),p=n(16613),h=n(13274);const g=({children:e,onClose:t,getInitialFocusElement:n,onFocusVerticalItem:r,...g})=>{const f=(0,o.Oj)(),b=(0,i.useCallback)((()=>{t?.(),f({type:"close"})}),[f,t]),v=(0,i.useCallback)((e=>{f({type:"modifierKeyHeld",value:e.altKey||e.ctrlKey})}),[f]),y=(0,a.NC)(d.rW);return(0,h.jsx)(l.s,{onError:e=>(0,u.Jy)(e,"Menu"),children:(0,h.jsx)(m.R,{children:(0,h.jsx)(c.e,{className:s()("encore-dark-theme","encore-layout-themes",{"circular-sp-vietnamese":y},p.A.menu),onClose:b,onKeyDown:v,onKeyUp:v,getInitialFocusElement:n,onFocusVerticalItem:r,...g,children:[Spicetify.ContextMenuV2.renderItems(),e].flat()})})})}},29977:(e,t,n)=>{"use strict";n.d(t,{y:()=>c});var i=n(97500),r=n.n(i),s=n(19448),a=n(88682),o=n(16613),l=n(13274);const c=({children:e,divider:t})=>(0,l.jsx)(a.u,{className:o.A.menuItem,children:(0,l.jsx)(s.Z,{className:r()(o.A.menuHeading,"ellipsis-one-line",{[o.A.dividerBefore]:"before"===t,[o.A.dividerAfter]:"after"===t}),variant:"finaleBold",dir:"auto","aria-hidden":!0,children:e})})},53603:(e,t,n)=>{"use strict";n.d(t,{D:()=>h});var i=n(79474),r=n(97500),s=n.n(r),a=n(25949),o=n(19448),l=n(41318),c=n(16799),u=n(88682),d=n(82963),m=n(16613),p=n(13274);const h=({children:e,disabled:t,divider:n,onClick:r=(()=>{}),leadingIcon:h,trailingIcon:g,elementRef:f,CheckedIcon:b=a.i,autoClose:v=!0,innerClassName:y,..._})=>{const E=(0,l.Oj)(),x=(0,i.useRef)(null),C=(0,i.useCallback)((e=>{x.current=e,f&&f(e)}),[f]),{handleMouseEnter:S,handleMouseMove:A,handleMouseLeave:w,handleFocus:I}=(0,d.t)(x),T=(0,i.useCallback)((e=>{e.stopPropagation(),r(e),!t&&v&&E({type:"close"})}),[r,t,v,E]),N=(0,i.useCallback)((e=>{e.stopPropagation()}),[]);return(0,p.jsx)(u.u,{className:m.A.menuItem,children:(0,p.jsxs)(c.H,{className:s()(m.A.menuItemButton,{[m.A.disabled]:t,[m.A.dividerBefore]:"before"===n||"both"===n,[m.A.dividerAfter]:"after"===n||"both"===n}),"aria-disabled":t,onClick:T,onFocus:I,onMouseEnter:S,onMouseMove:A,onMouseLeave:w,onContextMenu:N,ref:C,..._,children:[h,(0,p.jsx)(o.Z,{variant:"mesto",dir:"auto",className:s()("ellipsis-one-line",m.A.menuItemLabel,y),children:e}),g,_["aria-checked"]&&b&&(0,p.jsx)(b,{iconSize:16})]})})}},97266:(e,t,n)=>{"use strict";n.d(t,{g:()=>f});var i=n(79474),r=n(65524),s=n(19448),a=n(55138),o=n(49768),l=n(97500),c=n.n(l),u=n(16799),d=n(88682),m=n(82963),p=n(16613),h=n(13274);const g=(0,i.forwardRef)((function({children:e,disabled:t=!1,onClick:n=(()=>{}),setIsOpen:r,onTouchStart:s,outerRef:a,divider:o},l){const{handleMouseEnter:g,handleMouseMove:f,handleMouseLeave:b,handleFocus:v}=(0,m.t)(a,r),y=(0,i.useCallback)((e=>{e.stopPropagation(),n(e)}),[n]),_=(0,i.useCallback)((e=>{e.stopPropagation()}),[]);return(0,h.jsx)(d.u,{className:p.A.menuItem,children:(0,h.jsx)(u.H,{className:c()(p.A.menuItemButton,{[p.A.disabled]:t,[p.A.dividerBefore]:"before"===o,[p.A.dividerAfter]:"after"===o}),onClick:y,onFocus:v,onMouseEnter:g,onMouseMove:f,onMouseLeave:b,onTouchStart:s,onContextMenu:_,ref:l,role:"menuitem",children:e})})})),f=({displayText:e,depth:t=1,children:n,divider:l,placement:c="right-start",onOpenChange:u,onClick:d,disabled:m,leadingIcon:f})=>{const[b,v]=(0,i.useState)(!1),y=(0,i.useRef)(null),_=(0,i.useCallback)((()=>{v((e=>!e))}),[]),E=(0,i.useRef)(u);return E.current=u,(0,i.useEffect)((()=>E.current?.(b)),[b]),(0,h.jsx)(r.Ay,{render:()=>(0,h.jsx)(o.Q,{className:p.A.menu,depth:t,children:n}),offset:[0,0],interactive:!0,visible:b,arrow:!1,animation:!1,placement:c,popperOptions:{modifiers:[{name:"preventOverflow",options:{boundary:document.body,altAxis:!0,padding:10}},{name:"flip",options:{boundary:document.body}}]},children:(0,h.jsxs)(g,{divider:l,setIsOpen:v,onTouchStart:_,ref:y,outerRef:y,onClick:d,disabled:m,children:[(0,h.jsxs)("div",{className:p.A.subMenuLeading,children:[f,(0,h.jsx)(s.Z,{variant:"mesto",dir:"auto",className:"ellipsis-one-line",children:e})]}),(0,h.jsx)("span",{children:(0,h.jsx)(a.J,{className:p.A.subMenuIcon,iconSize:16,"aria-hidden":"true"})})]})})}},23590:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,v:()=>c});var i=n(79474),r=n(65524),s=n(17724);var a=n(95999),o=n(87058);var l=n(13274);const c="context-menu",u=({menu:e,onClickOutside:t,children:n,trigger:u,offset:d,placement:m,isOpen:p,preventScrollingWhileOpen:h,triggerRef:g,position:f,getReferenceClientRect:b,onShow:v,onHide:y,appendTo:_,interactive:E=!0})=>{const x=(0,i.useRef)(null),C=(0,i.useRef)(null);((e,t)=>{(0,i.useEffect)((()=>{const n=e=>{t.current&&!t.current.contains(e.target)&&e.preventDefault()};if(e){const e={passive:!1};window.addEventListener("mousewheel",n,e),window.addEventListener("touchmove",n,e)}return()=>{window.removeEventListener("mousewheel",n),window.removeEventListener("touchmove",n)}}),[e,t])})(p&&h,x);const{updateAfterFirstLayout:S,cancel:A}=((e,t)=>{const n=(0,i.useRef)(0),r=(0,i.useCallback)((()=>{cancelAnimationFrame(n.current)}),[]),s=(0,i.useCallback)((()=>{e.current&&0!==e.current?.getBoundingClientRect().width?(t.current?.popperInstance?.update(),cancelAnimationFrame(n.current)):n.current=requestAnimationFrame(s)}),[e,t]);return(0,i.useEffect)((()=>()=>{cancelAnimationFrame(n.current)}),[s]),{updateAfterFirstLayout:s,cancel:r}})(x,C),w=(0,i.useCallback)((e=>{A(),e.reference.removeAttribute("data-context-menu-open"),y()}),[A,y]);(0,i.useEffect)((()=>{const e=C.current;if(!e||!e.reference||"click"===u)return()=>{};const t=e.reference,n=w.bind(void 0,e);return t.addEventListener("click",n),()=>{t.removeEventListener("click",n)}}),[x,C,w,u]);let I=null;b?I=b:"right-click"!==u&&g||(I=()=>({width:0,height:0,top:f?.y??0,bottom:f?.y??0,left:f?.x??0,right:f?.x??0,x:0,y:0,toJSON:()=>{}}));const T=(0,i.useMemo)((()=>{return(0,o.g)()?[(e=t,{name:"hideOnContextMenu",defaultValue:!0,fn:function(t){function n(n){e?e(t,n):t.hide()}const i=(0,s.e)(!1);return{onShow(){i?.addEventListener("contextmenu",n,{once:!0})},onHide(){i?.removeEventListener("contextmenu",n)}}}})]:[];var e}),[t]);return(0,l.jsxs)(l.Fragment,{children:[n,p&&(0,l.jsx)(r.Ay,{onCreate:e=>{C.current=e},onShow:e=>{S(),e.reference.setAttribute("data-context-menu-open","true"),v?.(e)},onHide:w,visible:p,plugins:T,render:t=>(0,l.jsx)((Spicetify.ContextMenuV2._context||(Spicetify.ContextMenuV2._context=i.createContext(null))).Provider,{value:{props:e?.props,trigger:u,target:g},children:(0,l.jsx)(a.pZ,{value:"contextmenu",children:(0,l.jsx)("div",{ref:x,id:c,"data-placement":t["data-placement"],"":"context-menu",children:p?e:null})})}),arrow:!0,popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:10,tether:!1}},{name:"arrow",options:{padding:10}}]},placement:m,onClickOutside:(e,n)=>{t?.(e,n)},interactive:E,offset:d,..._?{appendTo:_}:{},reference:g,getReferenceClientRect:I,aria:{expanded:"hover-or-focus"!==u&&"auto"}})]})}},41318:(e,t,n)=>{"use strict";n.d(t,{Oj:()=>c,SF:()=>d,fd:()=>o});var i=n(79474),r=n(13274);const s={isOpen:!1,modifierKeyHeld:!1,isTouching:!1,menu:null,event:null,triggerElement:null},a=(0,i.createContext)(s);function o(){const e=i.useContext(a);if(void 0===e)throw new Error("useContextMenuState must be used within a ContextMenuProvider");return e}const l=(0,i.createContext)((()=>{}));function c(){const e=i.useContext(l);if(void 0===e)throw new Error("useContextMenuDispatch must be used within a ContextMenuProvider");return e}function u(e,t){switch(t.type){case"open":return{...e,menu:t.menu,isOpen:!0,event:t.event,triggerElement:t.triggerElement};case"toggle":return{...e,isOpen:!e.isOpen,menu:e.isOpen?null:t.menu,event:t.event,triggerElement:t.triggerElement};case"modifierKeyHeld":return{...e,modifierKeyHeld:t.value};case"touch":return{...e,isTouching:t.value};case"close":return{...s};case"update":return{...e,menu:t.menu};default:throw new Error("Unknown action recieved!")}}const d=({children:e})=>{const[t,n]=(0,i.useReducer)(u,s);return(0,r.jsx)(l.Provider,{value:n,children:(0,r.jsx)(a.Provider,{value:t,children:e})})}},93423:(e,t,n)=>{"use strict";n.d(t,{P:()=>a,R:()=>l});var i=n(79474),r=n(23590);var s=n(13274);const a=(0,i.createContext)({registerCloseCallback:()=>{},closeToDepth:()=>{},isOnPathToSubmenu:()=>!1}),o=()=>()=>{},l=({children:e})=>{const t=(0,i.useRef)([]),n=(0,i.useRef)(),l=(o(),(0,i.useCallback)(((e,i)=>{t.current.push(e),n.current=i}),[])),c=(0,i.useCallback)((e=>{for(n.current=void 0;t.current.length>e;){const e=t.current.pop();e&&e(!1)}}),[]);return(0,s.jsx)(a.Provider,{value:{registerCloseCallback:l,closeToDepth:c,isOnPathToSubmenu:(e,t)=>{const i=document.getElementById(r.v),s=!t&&n.current?.x===e.x&&n.current?.y===e.y;if(!n.current||!i||s)return!1;const a=Array.from(i.querySelectorAll('[role="menu"]')).sort(((e,t)=>parseInt(e.getAttribute("data-depth")||"0",10)-parseInt(t.getAttribute("data-depth")||"0",10))).pop();if(!a)return!1;const o=a.getBoundingClientRect();let l=o.left;n.current.x>o.right&&(l=o.right);const c=n.current,u={x:l,y:o.top},d={x:l,y:o.bottom},m={x:u.x-c.x,y:u.y-c.y},p={x:d.x-c.x,y:d.y-c.y},h=(e,t)=>e.x*t.y-e.y*t.x,g=(h(e,p)-h(c,p))/h(m,p),f=-1*(h(e,m)-h(c,m))/h(m,p),b=g>0&&f>0&&g+f<1||Math.abs(e.x-c.x)+Math.abs(e.y-c.y)<=1;return b}},children:e})}},51208:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var i=n(79474),r=n(41318);const s=({action:e,menu:t})=>{const n=(0,r.Oj)();return(0,i.useCallback)(((i,r)=>{i.persist(),i.preventDefault(),n({type:e,event:i,triggerElement:i.currentTarget,menu:r||t})}),[t,n,e])}},70646:(e,t,n)=>{"use strict";n.d(t,{r:()=>m});var i=n(79474),r=n(99754),s=n(96244),a=n(14056),o=n(53603),l=n(95999),c=n(94524),u=n(13274);const d=({divider:e})=>{const t=(0,r.wA)(),n=(0,i.useCallback)((()=>{t((0,c.$c)())}),[t]);return(0,u.jsx)(o.D,{role:"menuitem",divider:e,onClick:n,leadingIcon:(0,u.jsx)(s.G,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("context-menu.about-recommendations")})},m=i.memo((function(e){return(0,u.jsx)(l.pZ,{value:"about-recommendations",children:(0,u.jsx)(d,{...e})})}))},28540:(e,t,n)=>{"use strict";n.d(t,{K:()=>C});var i=n(79474),r=n(31470),s=n(83856),a=n(14056),o=n(53603),l=n(3775);n(16990);const c=Spicetify.GraphQL.Definitions["queryAlbumTrackUris"]=new l.l("queryAlbumTrackUris","query","d7e0931e046b9f18a194f008ae9ebf856bf3f1d2bb07681ab29a11f060760cfb",null);var u=n(95999),d=n(15891),m=n(87687),p=n(82433),h=n(42529),g=n(14494),f=n(36471),b=n(65911),v=n(13274);const y=e=>({uri:e,uid:null}),_=({uris:e,divider:t,spec:n,logger:s})=>{const l=(0,f.W)(),c=(0,m.K)(),u=(0,i.useCallback)((()=>{l({intent:"add-to-queue",type:"click"}),c.addToQueue(e.map(y)),n&&s&&s.logInteraction(n.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:e.length}))}),[l,c,e,n,s]);return(0,v.jsx)(o.D,{role:"menuitem",divider:t,onClick:u,leadingIcon:(0,v.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.add-to-queue")})},E=({uris:e,spec:t,logger:n})=>{const s=(0,f.W)(),l=(0,m.K)(),{request:u}=(0,i.useContext)(d.j),p=(0,i.useCallback)((async()=>{s({intent:"add-to-queue",type:"click"}),t&&n&&n.logInteraction(t.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:e.length}));const i=await u(c,{uri:e[0],offset:0,limit:100});if("Album"!==i?.data?.albumUnion.__typename)return;const r=(i?.data.albumUnion.tracks.items||[]).map((e=>e.track.uri));l.addToQueue(r.map(y))}),[n,s,l,u,t,e]);return(0,v.jsx)(o.D,{role:"menuitem",onClick:p,leadingIcon:(0,v.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.add-to-queue")})},x=({uris:e,spec:t,logger:n})=>{const s=(0,f.W)(),l=(0,m.K)(),c=(0,i.useContext)(h.w),u=(0,i.useCallback)((async()=>{s({intent:"add-to-queue",type:"click"});const i=(await c.getContents(e[0],{limit:100})).items.filter((e=>!!e)).map((e=>e.uri));t&&n&&n.logInteraction(t.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:i.length})),l.addToQueue(i.map(y))}),[n,s,l,c,t,e]);return(0,v.jsx)(o.D,{role:"menuitem",onClick:u,leadingIcon:(0,v.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.add-to-queue")})},C=i.memo((function(e){const{uri:t}=(0,p.f)(),n=(0,b.U)(),i={...e,logger:(0,g.s)()};if(!t||n)return null;let r=(0,v.jsx)(_,{...i});return(0,s._T)(e.uris[0])?r=(0,v.jsx)(E,{...i}):(0,s.tb)(e.uris[0])&&(r=(0,v.jsx)(x,{...i})),(0,v.jsx)(u.pZ,{value:"add-to-queue",children:r})}))},41190:(e,t,n)=>{"use strict";n.d(t,{m:()=>g});var i=n(79474),r=n(53949),s=n(14056),a=n(53603),o=n(41318),l=n(90547),c=n(97404),u=n(95999),d=n(14494),m=n(74089),p=n(13274);const h=({uri:e,sharingInfo:t,displayText:n,divider:u,isPrivatePlaylist:h=!1,spec:g})=>{const{modifierKeyHeld:f}=(0,o.fd)(),{onCopyLink:b}=(0,c.L)({sharingInfo:t,uri:e,interactionData:{intent:"share",type:"click"}}),v=(0,d.s)(),{onCopyLink:y}=(0,l.J)({uri:e,permissionLevel:"VIEWER"}),_=(0,i.useCallback)((()=>{f?(0,m.l)(e):h?y():b(),v.logInteraction(g.copyLinkButtonFactory().hitCopyToClipboard())}),[f,h,v,g,e,y,b]);return(0,p.jsx)(a.D,{role:"menuitem",divider:u,onClick:_,leadingIcon:(0,p.jsx)(r._,{semanticColor:"textSubdued",size:"small"}),children:f?s.Ru.get("context-menu.copy-spotify-uri"):n})},g=i.memo((function(e){return(0,p.jsx)(u.pZ,{value:"copy-link",children:(0,p.jsx)(h,{...e})})}))},5108:(e,t,n)=>{"use strict";n.d(t,{j:()=>p});var i=n(79474),r=n(55129),s=n(14056),a=n(53603),o=n(95999),l=n(50014),c=n(14494),u=n(36471),d=n(13274);const m=({position:e,divider:t,onCreateCallback:n=(()=>{}),spec:o})=>{const m=(0,u.W)(),{createFolder:p}=(0,l.Z)(),h=(0,c.s)(),g=(0,i.useCallback)((async()=>{m({intent:"playlisting",type:"click"});const t=await p(s.Ru.get("playlist.default_folder_name"),e),i=o.createButtonFactory().hitCreateFolder();i&&h.logInteraction(i),n(t)}),[m,p,e,o,h,n]);return(0,d.jsx)(a.D,{role:"menuitem",divider:t,onClick:g,leadingIcon:(0,d.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.create-folder")})},p=i.memo((function(e){return(0,d.jsx)(o.pZ,{value:"create-folder",children:(0,d.jsx)(m,{...e})})}))},74062:(e,t,n)=>{"use strict";n.d(t,{u:()=>h});var i=n(79474),r=n(99754),s=n(74540),a=n(14056),o=n(53603),l=n(95999),c=n(14494),u=n(28244),d=n(36471),m=n(13274);const p=({uri:e,divider:t,spec:n})=>{const l=(0,d.W)(),p=(0,r.wA)(),h=(0,c.s)(),g=(0,i.useCallback)((()=>{l({intent:"playlisting",type:"click"}),p((0,u.O)(e)),n&&h.logInteraction(n.deleteButtonFactory().hitDeletePlaylist({playlistToBeDeleted:e}))}),[p,h,l,n,e]);return(0,m.jsx)(o.D,{role:"menuitem",divider:t,onClick:g,leadingIcon:(0,m.jsx)(s.P,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.delete")})},h=i.memo((function(e){return(0,m.jsx)(l.pZ,{value:"delete-playlist",children:(0,m.jsx)(p,{...e})})}))},1084:(e,t,n)=>{"use strict";n.d(t,{u:()=>U,d:()=>M});var i=n(79474),r=n(11866),s=n(80245),a=n(14056),o=n(53603),l=n(93963),c=n(97266),u=n(95999),d=n(33712),m=n(14494),p=n(7079),h=n(33037);var g=n(80964),f=n(28049),b=n(22215),v=n(30939),y=n(19498),_=n(85961),E=n(77564);const x=864e5,C=5e3;function S(e,t=!1){const n=(0,v.n)(),i=(0,b.NC)(y.z53,{loadingValue:!1}),r=(0,_.Q)(),s=n&&i&&r.getCapabilities().canRemoteDownload,a=(0,g.jE)(),{data:o}=(0,f.I)({queryKey:["useOfflineContextForDevices",e],queryFn:()=>r.getContextForDevices(e),gcTime:x,staleTime:0,refetchInterval:t&&C,enabled:s,placeholderData:()=>a.getQueriesData({queryKey:["useOfflineContextForDevices"]})?.find((([e,t])=>!!t))?.[1]?.map((e=>({...e,contextDownloadAvailability:E.kw.NO,contextDownloadPercentage:0})))});return s?o??[]:[]}var A=n(98764),w=n(87653),I=n(36125),T=n(45640),N=n(27742),R=n(13274);function k(e){switch(e){case E.kw.NO:return(0,R.jsx)(s.i,{size:"small",semanticColor:"textBase"});case E.kw.WAITING:case E.kw.DOWNLOADING:return(0,R.jsx)(A.E,{semanticColor:"textSubdued",children:(0,R.jsx)(w.C,{size:16})});case E.kw.YES:return(0,R.jsx)(r.F,{size:"small",semanticColor:"textBrightAccent"});default:return(0,T.k)(e),null}}const O=({name:e,deviceId:t,cacheId:n,type:r,deviceType:s,clientPlatform:c,contextDownloadAvailability:u,isLocal:d,uri:p,spec:h,addDownloadPrerequisites:f,localDownloadAvailability:b})=>{const v=(0,m.s)(),y=(0,_.Q)(),{enqueueSnackbar:x}=(0,N.d)(),C=function(){const e=(0,g.jE)();return(0,i.useCallback)((t=>e.invalidateQueries({queryKey:["useOfflineContextForDevices",t]})),[e])}(),S=(0,l.V)(),A=(0,I.t)(r),w=d?b:u,T=w!==E.kw.NO,O=w===E.kw.YES,P={remoteClientPlatform:c.toString(),remoteDeviceId:t,remoteDeviceType:s.toString()};return(0,R.jsx)(o.D,{onClick:async()=>{let i;T?(S(p,d?void 0:{deviceId:t,cacheId:n,deviceName:e,clientPlatform:c,deviceType:s}),i=O?d?h.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:p}):h.remoteDeviceDownloadButtonFactory().hitRemoveDownloadFromRemoteDevice({itemToRemoveFromDownloads:p,...P}):d?h.downloadButtonFactory().hitStopDownload({itemToStopDownload:p}):h.remoteDeviceDownloadButtonFactory().hitStopDownloadToRemoteDevice({itemToStopDownload:p,...P})):(f(),y.addDownload(p,{deviceId:t,cacheId:n}),i=d?h.downloadButtonFactory().hitDownload({itemToDownload:p}):h.remoteDeviceDownloadButtonFactory().hitDownloadToRemoteDevice({itemToDownload:p,...P}),x(a.Ru.get("web-player.remote-downloads.feedback.downloading-to-remote-device",e))),C(p),v.logInteraction(i)},"aria-checked":T,role:"menuitemcheckbox",leadingIcon:(0,R.jsx)(A,{iconSize:16,semanticColor:"textSubdued"}),trailingIcon:k(w),CheckedIcon:null,children:d?a.Ru.get("web-player.remote-downloads.context-menu.this-computer"):e})},P=({uri:e,divider:t,addToLibrary:n=!0,showUri:r,canDownload:o,spec:l})=>{const g=(0,m.s)(),[f,b]=(0,i.useState)(!1),v=S(e,f),y=(0,p.W)(),_=function(e,t=!0,n){const[r,s]=(0,h.A)(e),[a,o]=(0,h.A)(n);return(0,i.useCallback)((()=>{!r&&t?s(!0):!t&&n&&(a||o(!0))}),[t,r,a,s,o,n])}(e,n,r),{availability:E}=(0,d.$)(e,o),x=(0,i.useMemo)((()=>l.downloadToDeviceSubmenuFactory()),[l]);return(0,R.jsx)(c.g,{displayText:a.Ru.get("contextmenu.download"),depth:1,placement:y?"left-start":"right-start",divider:t,onOpenChange:e=>{b(e),e&&g.logImpression(x.impression())},leadingIcon:(0,R.jsx)(s.i,{semanticColor:"textSubdued",size:"small"}),children:(0,R.jsx)(u.pZ,{value:"download",children:v.map((t=>(0,R.jsx)(O,{uri:e,spec:x,addDownloadPrerequisites:_,localDownloadAvailability:E,...t},t.cacheId)))})})};var j=n(36471);const L=({uri:e,divider:t,addToLibrary:n=!0,showUri:c,canDownload:u,spec:p})=>{const g=(0,j.W)(),f=(0,m.s)(),[b,v]=(0,h.A)(e),[y,_]=(0,h.A)(c),{capability:x,availability:C,addDownload:S}=(0,d.$)(e,u),A=(0,l.V)(),w=(0,i.useCallback)((()=>{if(x===E.vs.NO_PERMISSION)return;let t;g({targetUri:e,intent:C!==E.kw.NO?"remove-from-download":"download",type:"click"}),C!==E.kw.NO?(A(e),t=p.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e})):(!b&&n?v(!0):!n&&c&&(y||_(!0)),S(),t=p.downloadButtonFactory().hitDownload({itemToDownload:e})),f.logInteraction(t)}),[x,C,S,A,b,f,g,v,p,e,n,c,y,_]);return x===E.vs.NO_CAPABILITY||x===E.vs.NO_PERMISSION_HIDE?null:(0,R.jsx)(o.D,{divider:t,onClick:w,role:"menuitemcheckbox",disabled:x===E.vs.NO_PERMISSION,leadingIcon:C!==E.kw.NO?(0,R.jsx)(r.F,{semanticColor:"textBrightAccent",size:"small"}):(0,R.jsx)(s.i,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.download")})},D=e=>{const t=S(e.uri).some((({isLocal:e})=>!e))?P:L;return(0,R.jsx)(t,{...e})},U=i.memo((function(e){return(0,R.jsx)(u.pZ,{value:"download-episode",children:(0,R.jsx)(D,{...e})})})),M=i.memo((function(e){return(0,R.jsx)(u.pZ,{value:"download-playlist",children:(0,R.jsx)(D,{...e})})}))},48134:(e,t,n)=>{"use strict";n.d(t,{T:()=>p});var i=n(79474),r=n(70201),s=n(14056),a=n(53603),o=n(95999),l=n(14494),c=n(36471),u=n(28275),d=n(13274);const m=({uri:e,name:t,description:n,image:o,divider:m,spec:p})=>{const h=(0,c.W)(),g=(0,i.useContext)(u.$$),f=(0,l.s)(),b=(0,i.useCallback)((()=>{h({intent:"playlisting",type:"click"}),g({type:"open",playlistDetails:{name:t,description:n,image:o,uri:e}}),p&&f.logInteraction(p.editButtonFactory({uri:e}).hitUiReveal())}),[n,g,o,f,t,h,p,e]);return(0,d.jsx)(a.D,{role:"menuitem",divider:m,onClick:b,leadingIcon:(0,d.jsx)(r.G,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.edit-details")})},p=i.memo((function(e){return(0,d.jsx)(o.pZ,{value:"edit-details",children:(0,d.jsx)(m,{...e})})}))},88482:(e,t,n)=>{"use strict";n.d(t,{ET:()=>x,T5:()=>E,jK:()=>C});var i=n(79474),r=n(99754),s=n(43702),a=n(23689),o=n(16212),l=n(81887),c=n(53855),u=n(14056),d=n(53603),m=n(95999),p=n(66615),h=n(33037),g=n(67302),f=n(28244),b=n(36471),v=n(30939),y=n(13274);const _=i.memo((function({uri:e,divider:t,saveSuccess:n,removeSuccess:s,removeLabel:a,saveLabel:o,useDialog:l=!1,initialState:u=!1,leadingIconAdd:m,leadingIconRemove:_}){const E=(0,r.wA)(),x=(0,b.W)(),C=!(0,v.n)(),[S,A]=(0,h.A)(e,u),w=(0,p.t)(),{spec:I,logger:T}=(0,g.r)(c.F,{data:{uri:e}}),N=(0,i.useCallback)((()=>{const t=I.followButtonFactory();l&&S?E((0,f.aw)(e)):(x({targetUri:e,intent:S?"remove-from-library":"add-to-library",type:"click"}),A(!S),S?(T.logInteraction(t.hitUnfollow({itemToBeUnfollowed:e})),s&&E(s(e))):(T.logInteraction(t.hitFollow({itemToBeFollowed:e})),n&&E(n(e))))}),[I,l,S,E,e,x,A,T,s,n]);return(0,y.jsx)(d.D,{role:"menuitem",divider:t,disabled:C&&!w?.getCapabilities().canModifyOffline,onClick:N,leadingIcon:S?_:m,children:S?a:o})})),E=i.memo((function({uri:e,divider:t,useDialog:n,initialState:i=!1}){return(0,y.jsx)(m.pZ,{value:"follow-artist",children:(0,y.jsx)(_,{uri:e,divider:t,removeLabel:u.Ru.get("unfollow"),saveLabel:u.Ru.get("follow"),useDialog:n,initialState:i,leadingIconAdd:(0,y.jsx)(s.h,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,y.jsx)(a.M,{semanticColor:"textBrightAccent",size:"small"})})})})),x=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1}){return(0,y.jsx)(m.pZ,{value:"follow-playlist",children:(0,y.jsx)(_,{uri:e,divider:t,removeLabel:u.Ru.get("contextmenu.remove-from-library"),saveLabel:u.Ru.get("contextmenu.add-to-library"),useDialog:n,initialState:i,leadingIconAdd:(0,y.jsx)(o.P,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,y.jsx)(l.k,{semanticColor:"textBrightAccent",size:"small"})})})})),C=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1}){return(0,y.jsx)(m.pZ,{value:"follow-show",children:(0,y.jsx)(_,{uri:e,divider:t,removeLabel:u.Ru.get("unfollow"),saveLabel:u.Ru.get("follow"),useDialog:n,initialState:i,leadingIconAdd:(0,y.jsx)(s.h,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,y.jsx)(a.M,{semanticColor:"textBrightAccent",size:"small"})})})}))},89594:(e,t,n)=>{"use strict";n.d(t,{Jn:()=>h,V9:()=>g,du:()=>f,fe:()=>b});var i=n(41028),r=n(45992),s=n(35022),a=n(34472),o=n(83856),l=n(14056),c=n(53603),u=n(60786),d=n(91303),m=n(13274);const p=({uri:e,queryParams:t="",displayText:n,divider:i,leadingIcon:r})=>{const s=(0,d.W)({type:"link",uri:e}),a=(0,o.o_)(e),l=`${(0,o.o_)(a)?.toURLPath(!0)||""}${t}`,p=s?(0,u.hF)(l):l;return(0,m.jsx)(c.D,{role:"menuitem",divider:i,to:p,leadingIcon:r,children:n})},h=({uri:e,contextUri:t,divider:n,displayText:r=l.Ru.get("contextmenu.go-to-artist"),hideLeadingIcon:s=!1})=>e!==t?(0,m.jsx)(p,{divider:n,uri:e,displayText:r,leadingIcon:!s&&(0,m.jsx)(i.r,{semanticColor:"textSubdued",size:"small"})}):null,g=({uri:e,contextUri:t,highlightedUri:n,divider:i})=>e!==t?(0,m.jsx)(p,{divider:i,uri:e,displayText:l.Ru.get("contextmenu.go-to-album"),queryParams:`?highlight=${n}`,leadingIcon:(0,m.jsx)(r.I,{semanticColor:"textSubdued",size:"small"})}):null,f=({uri:e,contextUri:t,divider:n})=>e!==t?(0,m.jsx)(p,{divider:n,uri:e,displayText:l.Ru.get("context-menu.episode-page-link"),leadingIcon:(0,m.jsx)(s.L,{semanticColor:"textSubdued",size:"small"})}):null,b=({uri:e,contextUri:t,divider:n})=>e!==t?(0,m.jsx)(p,{divider:n,uri:e,displayText:l.Ru.get("contextmenu.go-to-audiobook"),leadingIcon:(0,m.jsx)(a.l,{semanticColor:"textSubdued",size:"small"})}):null},12198:(e,t,n)=>{"use strict";n.d(t,{z:()=>A});var i=n(79474),r=n(83648),s=n(98764),a=n(54176),o=n(83856),l=n(14056),c=n(53603),u=n(97500),d=n.n(u),m=n(88682),p=n(16613),h=n(13274);const g=({children:e,disabled:t,className:n})=>(0,h.jsx)(m.u,{className:p.A.menuItem,children:(0,h.jsx)("div",{role:"menuitem","aria-disabled":t,className:d()(p.A.menuItemStatic,n),children:e})});var f=n(30939),b=n(95999),v=n(88724);var y=n(47131),_=n(14494),E=n(36471),x=n(87571);const C="aDmzyffYDLrlNO5zDfIA",S=({uri:e,displayText:t,divider:n,spec:u})=>{const d=(0,r.Zp)(),m=!(0,f.n)(),p=(0,E.W)(),b=(0,y.A9)(),S=(0,x.p)(),A=(0,_.s)(),w=(0,i.useCallback)((async()=>{p({targetUri:e,intent:"go-to-radio",type:"click"});const t=await((e,t)=>e.build().withHost(v.mz).withPath(`/seed_to_playlist/${t}`).withQueryParameters({"response-format":"json"}).withoutMarket().withEndpointIdentifier("/seed_to_playlist/{uri}").send())(b,e),[n]=t.body.mediaItems,i=(0,o.o_)(n.uri).toURLPath(!0);u&&A.logInteraction(u.navigateButtonFactory({identifier:"go-to-radio"}).hitUiNavigate({destination:i})),d(i)}),[p,e,u,b,d,A]);if(!S){const e=l.Ru.get("contextmenu.go-to-radio-dsa");return(0,h.jsxs)(g,{disabled:!0,className:C,children:[(0,h.jsx)(s.E,{variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:t}),(0,h.jsx)(s.E,{variant:"marginal",semanticColor:"textSubdued",as:"p",children:e})]})}return(0,h.jsx)(c.D,{role:"menuitem",divider:n,disabled:m,onClick:w,leadingIcon:(0,h.jsx)(a.v,{semanticColor:"textSubdued",size:"small"}),children:t})},A=i.memo((function(e){return(0,h.jsx)(b.pZ,{value:"go-to-radio",children:(0,h.jsx)(S,{...e})})}))},86722:(e,t,n)=>{"use strict";n.d(t,{w:()=>g});var i=n(79474),r=n(16212),s=n(42340),a=n(22215),o=n(14056),l=n(53603),c=n(13326),u=n(19498),d=n(95999),m=n(14494),p=n(13274);const h=({uri:e,divider:t,spec:n})=>{const{add:a,remove:u,useContains:d}=(0,c.p)("ignoreinrecs"),[h]=d(e),g=(0,m.s)(),f=(0,i.useCallback)((()=>{let t;h?(u(e),t=n.excludeRecommendationsButtonFactory().hitIncludeInRecommendations({contextToBeIncluded:e})):(a(e),t=n.excludeRecommendationsButtonFactory().hitExcludeFromRecommendations({contextToBeExcluded:e})),g.logInteraction(t)}),[h,g,u,e,n,a]);return(0,p.jsx)(l.D,{role:"menuitem",divider:t,onClick:f,leadingIcon:h?(0,p.jsx)(r.P,{semanticColor:"textSubdued",size:"small"}):(0,p.jsx)(s.f,{semanticColor:"textSubdued",size:"small"}),children:h?o.Ru.get("contextmenu.include-in-recommendations"):o.Ru.get("contextmenu.exclude-from-recommendations")})},g=i.memo((function(e){return(0,a.NC)(u.rVs)?(0,p.jsx)(d.pZ,{value:"toggle-ignore-in-recommendations",children:(0,p.jsx)(h,{...e})}):null}))},54850:(e,t,n)=>{"use strict";n.d(t,{n:()=>g});var i=n(79474),r=n(43702),s=n(14056),a=n(53603),o=n(87465),l=n(90547),c=n(30939),u=n(19498),d=n(95999),m=n(14494),p=n(13274);const h=({uri:e,divider:t,spec:n})=>{const{onCopyLink:i}=(0,l.J)({uri:e,permissionLevel:"CONTRIBUTOR"}),o=!(0,c.n)(),u=(0,m.s)();return(0,p.jsx)(a.D,{role:"menuitem",divider:t,onClick:()=>{if(i(),u&&n){const e=n.inviteCollaboratorsButtonFactory().hitCopyToClipboard();e&&u.logInteraction(e)}},disabled:o,leadingIcon:(0,p.jsx)(r.h,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.invite-collaborators")})},g=i.memo((function(e){return(0,p.jsx)(o.u,{property:u.G6N,renderNewExperience:()=>(0,p.jsx)(d.pZ,{value:"leave-playlist",children:(0,p.jsx)(h,{...e})}),renderOldExperience:()=>null})}))},350:(e,t,n)=>{"use strict";n.d(t,{_:()=>g});var i=n(79474),r=n(99754),s=n(49214),a=n(14056),o=n(53603),l=n(87465),c=n(19498),u=n(95999),d=n(14494),m=n(28244),p=n(13274);const h=({uri:e,divider:t,spec:n})=>{const l=(0,r.wA)(),c=(0,d.s)(),u=(0,i.useCallback)((()=>{l((0,m.aP)(e)),c.logInteraction(n.leavePlaylistButtonFactory().hitLeavePlaylist({playlist:e}))}),[l,c,n,e]);return(0,p.jsx)(o.D,{role:"menuitem",divider:t,onClick:u,leadingIcon:(0,p.jsx)(s.r,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.leave-playlist")})},g=i.memo((function(e){return(0,p.jsx)(l.u,{property:c.G6N,renderNewExperience:()=>(0,p.jsx)(u.pZ,{value:"leave-playlist",children:(0,p.jsx)(h,{...e})}),renderOldExperience:()=>null})}))},47204:(e,t,n)=>{"use strict";n.d(t,{x:()=>g});var i=n(79474),r=n(99278),s=n(53603),a=n(28012),o=n(95999),l=n(87687),c=n(10551),u=n(14494),d=n(36471),m=n(45917),p=n(13274);const h=({uri:e,divider:t,spec:n,type:o})=>{const h=(0,d.W)(),g=(0,i.useContext)(a.wv),f=(0,l.K)().getState(),b=(0,m.LK)(o),v=(0,u.s)(),y=(0,i.useCallback)((()=>{h({intent:"share",type:"click"}),v.logInteraction(n.shareEmbedButtonFactory({uri:e}).hitUiReveal());const t=f?.item?.uri,i=(0,c.s)(f);g({type:"open",uri:e,currentTrackUri:t,currentPosition:i,entityType:o})}),[h,v,n,e,f,o,g]);return(0,p.jsx)(s.D,{role:"menuitem",divider:t,onClick:y,leadingIcon:(0,p.jsx)(r.D,{semanticColor:"textSubdued",size:"small"}),children:b})},g=i.memo((function(e){return(0,p.jsx)(o.pZ,{value:"ewg-open",children:(0,p.jsx)(h,{...e})})}))},80430:(e,t,n)=>{"use strict";n.d(t,{q:()=>_});var i=n(79474),r=n(99754),s=n(3074),a=n.n(s),o=n(85786),l=n(78408),c=n(14056),u=n(53603),d=n(95999),m=n(87058),p=n(14494),h=n(94710),g=n(36471),f=n(33560),b=n(13274);function v(){let e=a().create().hex;return e=e.replace(/-/g,""),e.substr(0,16)}const y=i.memo((function({uri:e,context:t,divider:n,spec:r}){const s=(0,h.vh)(),a=(0,g.W)(),d=(0,p.s)(),m=(0,i.useCallback)((()=>{const n=`${e}${t?`?context=${encodeURIComponent(t)}`:""}`;a({targetUri:n,intent:"open-in-app",type:"click"}),d.logInteraction(r.openInDesktopButtonFactory().hitOpenApp({destination:e,app:"desktop"})),s.send((0,l.N)({link:window.location.href,entity_uri:n,source:"open-in-app",deeplink_session_id:v()})),window.open(n)}),[e,t,a,d,r,s]);return(0,b.jsx)(u.D,{role:"menuitem",divider:n,onClick:m,leadingIcon:(0,b.jsx)(o.D,{semanticColor:"textSubdued",size:"small"}),children:c.Ru.get("contextmenu.open_desktop_app")})})),_=i.memo((function(e){const{isPWA:t,isDesktop:n}=(0,r.d4)((e=>e.platform)),i=(0,r.d4)(f.q);return t||n||i||(0,m.g)()?null:(0,b.jsx)(d.pZ,{value:"open-in-app",children:(0,b.jsx)(y,{...e})})}))},89374:(e,t,n)=>{"use strict";n.d(t,{k:()=>y});var i=n(79474),r=n(43410),s=n(672),a=n(14056),o=n(53603),l=n(95999),c=n(9544),u=n(82031),d=n(16323),m=n(14494),p=n(9440),h=n(45640),g=n(16649),f=n(13274);const b=(e,t,n)=>{switch(t){case p.c.FOLDER:return e?a.Ru.get("contextmenu.unpin-folder"):a.Ru.get("contextmenu.pin-folder");case p.c.PLAYLIST:case p.c.LIKED_SONGS:case p.c.YOUR_EPISODES:case p.c.LOCAL_FILES:return(0,g.c0)(n)?e?a.Ru.get("contextmenu.unpin-dj"):a.Ru.get("contextmenu.pin-dj"):e?a.Ru.get("contextmenu.unpin-playlist"):a.Ru.get("contextmenu.pin-playlist");case p.c.ALBUM:return e?a.Ru.get("contextmenu.unpin-album"):a.Ru.get("contextmenu.pin-album");case p.c.ARTIST:return e?a.Ru.get("contextmenu.unpin-artist"):a.Ru.get("contextmenu.pin-artist");case p.c.SHOW:return e?a.Ru.get("contextmenu.unpin-show"):a.Ru.get("contextmenu.pin-show");case p.c.AUDIOBOOK:return e?a.Ru.get("contextmenu.unpin-audiobook"):a.Ru.get("contextmenu.pin-audiobook");case p.c.PRE_RELEASE_ALBUM:return e?a.Ru.get("contextmenu.unpin-prerelease-album"):a.Ru.get("contextmenu.pin-prerelease-album");case p.c.PRE_RELEASE_BOOK:return e?a.Ru.get("contextmenu.unpin-prerelease-audiobook"):a.Ru.get("contextmenu.pin-prerelease-audiobook");default:return(0,h.k)(t),""}},v=({uri:e,canPin:t,isPinned:n,type:a,divider:l,spec:p})=>{const h=(0,m.s)(),g=(0,i.useContext)(d.Z),v=(0,i.useCallback)((()=>{t===c.oT.NO_IN_FOLDER?g.getEvents().emit(u.UV.UPDATE_PIN_ERROR,{reason:u.uL.NO_PIN_IN_FOLDER,uri:e}):n?(g.unpin(e),p&&h.logInteraction(p.pinButtonFactory().hitUnpinItem({itemToUnpin:e}))):(g.pin(e),p&&h.logInteraction(p.pinButtonFactory().hitPinItem({itemToPin:e})))}),[t,g,e,n,h,p]);return(0,f.jsx)(o.D,{role:"menuitem",divider:l,onClick:v,leadingIcon:n?(0,f.jsx)(r.H,{semanticColor:"textBrightAccent",size:"small"}):(0,f.jsx)(s.z,{semanticColor:"textSubdued",size:"small"}),children:b(n,a,e)})},y=i.memo((function(e){return(0,f.jsx)(l.pZ,{value:"pin-action",children:(0,f.jsx)(v,{...e})})}))},41694:(e,t,n)=>{"use strict";n.d(t,{U:()=>b});var i=n(79474),r=n(96538),s=n(66167),a=n(14056),o=n(53603),l=n(87465),c=n(19498),u=n(95999),d=n(58452),m=n(50014),p=n(14494),h=n(36471),g=n(13274);const f=({uri:e,divider:t,isPrivate:n,spec:l})=>{const c=(0,h.W)(),{setPrivateState:u}=(0,d.x)(e),{setPublishedState:f}=(0,m.Z)(),b=(0,p.s)(),v=(0,i.useCallback)((()=>{if(c({intent:"playlisting",type:"click"}),n||f(e,!1),u(!n),l){let t;t=n?l.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPublic({playlistToBeMadePublic:e}):l.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPrivate({playlistToBeMadePrivate:e}),b.logInteraction(t)}}),[n,b,c,u,f,l,e]);return(0,g.jsx)(o.D,{role:"menuitem",divider:t,onClick:v,leadingIcon:n?(0,g.jsx)(r.d,{semanticColor:"textSubdued",size:"small"}):(0,g.jsx)(s.y,{semanticColor:"textSubdued",size:"small"}),children:n?a.Ru.get("contextmenu.make-playlist-public"):a.Ru.get("contextmenu.make-playlist-private")})},b=i.memo((function(e){return(0,g.jsx)(l.u,{property:c.G6N,renderNewExperience:()=>(0,g.jsx)(u.pZ,{value:"toggle-private",children:(0,g.jsx)(f,{...e})}),renderOldExperience:()=>null})}))},56094:(e,t,n)=>{"use strict";n.d(t,{_:()=>h});var i=n(79474),r=n(56736),s=n(14056),a=n(53603),o=n(95999),l=n(50014),c=n(14494),u=n(27742),d=n(36471),m=n(13274);const p=({uri:e,divider:t,isPublished:n,spec:o})=>{const p=(0,d.W)(),{setPublishedState:h}=(0,l.Z)(),{enqueueSnackbar:g}=(0,u.d)(),f=(0,c.s)(),b=(0,i.useCallback)((()=>{if(p({intent:"playlisting",type:"click"}),h(e,!n),o){let t;t=n?o.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPrivate({playlistToBeMadePrivate:e}):o.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPublic({playlistToBeMadePublic:e}),f.logInteraction(t)}g(n?s.Ru.get("feedback.playlist-unpublish"):s.Ru.get("feedback.playlist-publish"))}),[g,n,f,p,h,o,e]);return(0,m.jsx)(a.D,{role:"menuitem",divider:t,onClick:b,disabled:void 0===n,leadingIcon:(0,m.jsx)(r.T,{semanticColor:"textSubdued",size:"small"}),children:n?s.Ru.get("contextmenu.make-secret"):s.Ru.get("contextmenu.make-public")})},h=i.memo((function(e){return(0,m.jsx)(o.pZ,{value:"toggle-published",children:(0,m.jsx)(p,{...e})})}))},43936:(e,t,n)=>{"use strict";n.d(t,{R:()=>p});var i=n(79474),r=n(99754),s=n(28736),a=n(87357),o=n(53855),l=n(53603),c=n(30939),u=n(67302),d=n(28244),m=n(13274);const p=i.memo((function({uri:e,rateLabel:t,metadata:n}){const p=!(0,c.n)(),h=(0,r.wA)(),{spec:g,logger:f}=(0,u.r)(o.F,{data:{uri:e}}),b=(0,i.useCallback)((async()=>{const t=g.rateButtonFactory();f.logInteraction(t.hitUiReveal()),h((0,d.eH)(e,n))}),[h,f,n,g,e]),v=n?.rating?.rating;return(0,m.jsx)(l.D,{role:"menuitem",disabled:p,onClick:b,leadingIcon:v?(0,m.jsx)(s.j,{size:"small",semanticColor:"textSubdued"}):(0,m.jsx)(a.a,{size:"small",semanticColor:"textSubdued"}),children:t})}))},75664:(e,t,n)=>{"use strict";n.d(t,{D:()=>g});var i=n(79474),r=n(30332),s=n(83856),a=n(14056),o=n(53603),l=n(95999),c=n(42529),u=n(17980),d=n(58452),m=n(36471),p=n(13274);const h=e=>{const t=(0,i.useContext)(c.w),{removeItems:n}=(0,d.x)(e.playlistUri),{uris:s,uids:l,divider:h,playlistUri:g,removePlaylistItems:f=n,canBeRemoved:b}=e,v=(0,m.W)(),y=(0,u.J)(g),{hasUidsGeneratedFromIndicies:_}=t.getCapabilities(),E=(0,i.useCallback)((()=>{v({targetUri:g,intent:"playlisting",type:"click"});const e=s.map(((e,t)=>({uri:e,uid:l[t]||""})));f(e)}),[v,g,f,l,s]);return _&&!l.every((e=>Number.isInteger(Number(e))))?null:b||y?.canRemove?(0,p.jsx)(o.D,{role:"menuitem",divider:h,onClick:E,leadingIcon:(0,p.jsx)(r.x,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.remove-from-playlist")}):null},g=i.memo((function(e){return(0,s.tb)(e.playlistUri)?(0,p.jsx)(l.pZ,{value:"remove-from-playlist",children:(0,p.jsx)(h,{...e})}):null}))},20090:(e,t,n)=>{"use strict";n.d(t,{c:()=>h});var i=n(79474),r=n(30332),s=n(83856),a=n(14056),o=n(53603),l=n(95999),c=n(87687),u=n(14494),d=n(36471),m=n(13274);const p=({uids:e,uris:t,contextUri:n,divider:l,spec:p})=>{const h=(0,d.W)(),g=(0,c.K)(),f=(0,u.s)(),b=(0,i.useMemo)((()=>e.map(((e,n)=>({uid:e,uri:t[n]})))),[e,t]),v=(0,i.useCallback)((()=>{h({intent:"remove-from-queue",type:"click"}),f.logInteraction(p.removeFromQueueButtonFactory().hitRemoveItemsFromQueue({numberOfItemsToRemoveFromQueue:t.length})),g.removeFromQueue(b)}),[h,f,p,t.length,g,b]);return n&&"queue"===(0,s.o_)(n)?.id?(0,m.jsx)(o.D,{role:"menuitem",divider:l,onClick:v,leadingIcon:(0,m.jsx)(r.x,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.remove-from-queue")}):null},h=i.memo((function(e){return(0,m.jsx)(l.pZ,{value:"remove-from-queue",children:(0,m.jsx)(p,{...e})})}))},31452:(e,t,n)=>{"use strict";n.d(t,{P:()=>y});var i=n(79474),r=n(71157),s=n(83856),a=n(51845),o=n(14056),l=n(53603),c=n(30939),u=n(83227),d=n(65495),m=n(95999),p=n(918),h=n(26271),g=n(70974),f=n(14494),b=n(13274);const v=({uri:e,currentUserUri:t,canReportUser:n,divider:m,spec:v})=>{const[y,_]=(0,i.useState)(!1),E=(0,i.useContext)(u.M),x=(0,f.s)(),C=!(0,c.n)();(0,i.useEffect)((()=>{(0,s.tb)(e)&&E.canReportPlaylist(e,t).then(_),(0,s.ec)(e)&&_(!0),(0,s.AP)(e)&&_(!!n),((0,s.WB)(e)||(0,a.gH)(e))&&_(!0)}),[e,t,n,E]);const{openURLWithSessionTransfer:S}=(0,p.L)(),{isActive:A}=(0,h.P)({uri:e},{featureIdentifier:"context_menu"}),[w]=(0,g.S)(1e3,(t=>t.item?.uri===e)),I=(0,i.useCallback)((async()=>{if(!y)return;const t=await E.getReportURL(e,A?w:null);S(t),v&&x.logInteraction(v.reportButtonFactory().hitUiNavigate({destination:e}))}),[y,E,e,A,w,S,v,x]);return E.isURIReportable(e)&&e!==t?(0,b.jsx)(l.D,{role:"link",divider:m,disabled:!y||C,onClick:I,leadingIcon:(0,b.jsx)(r.Y,{semanticColor:"textSubdued",size:"small"}),trailingIcon:(0,b.jsx)(d.p,{size:"small"}),children:o.Ru.get("contextmenu.report")}):null},y=i.memo((function(e){return(0,b.jsx)(m.pZ,{value:"report",children:(0,b.jsx)(v,{...e})})}))},81642:(e,t,n)=>{"use strict";n.d(t,{N7:()=>y,TR:()=>v,tt:()=>E,zD:()=>_});var i=n(79474),r=n(99754),s=n(81887),a=n(16212),o=n(14056),l=n(53603),c=n(30939),u=n(95999),d=n(66615),m=n(33037),p=n(14494),h=n(28244),g=n(36471),f=n(13274);const b=i.memo((function({uri:e,divider:t,removeLabel:n,saveLabel:o,useDialog:u=!1,initialState:b=!1,spec:v}){const y=(0,r.wA)(),_=(0,g.W)(),E=!(0,c.n)(),[x,C]=(0,m.A)(e,b),S=(0,d.t)(),A=(0,p.s)(),w=(0,i.useCallback)((()=>{u&&x?y((0,h.aw)(e)):(_({targetUri:e,intent:x?"remove-from-library":"add-to-library",type:"click"}),C(!x),x?A.logInteraction(v.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e})):A.logInteraction(v.saveButtonFactory().hitLike({itemToBeLiked:e})))}),[u,x,y,e,_,C,A,v]);return(0,f.jsx)(l.D,{role:"menuitem",divider:t,disabled:E&&!S?.getCapabilities().canModifyOffline,onClick:w,leadingIcon:x?(0,f.jsx)(s.k,{semanticColor:"textBrightAccent",size:"small"}):(0,f.jsx)(a.P,{semanticColor:"textSubdued",size:"small"}),children:x?n:o})})),v=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1,spec:r}){return(0,f.jsx)(u.pZ,{value:"save-track",children:(0,f.jsx)(b,{uri:e,divider:t,removeLabel:o.Ru.get("remove_from_your_liked_songs"),saveLabel:o.Ru.get("save_to_your_liked_songs"),useDialog:n,initialState:i,spec:r})})})),y=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1,spec:r}){return(0,f.jsx)(u.pZ,{value:"save-episode",children:(0,f.jsx)(b,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-your-episodes"),saveLabel:o.Ru.get("contextmenu.save-to-your-episodes"),useDialog:n,initialState:i,spec:r})})})),_=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1,spec:r}){return(0,f.jsx)(u.pZ,{value:"save-album",children:(0,f.jsx)(b,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-library"),saveLabel:o.Ru.get("contextmenu.add-to-library"),useDialog:n,initialState:i,spec:r})})})),E=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1,spec:r}){return(0,f.jsx)(u.pZ,{value:"save-book",children:(0,f.jsx)(b,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-library"),saveLabel:o.Ru.get("contextmenu.add-to-library"),useDialog:n,initialState:i,spec:r})})}))},96526:(e,t,n)=>{"use strict";n.d(t,{i:()=>f});var i=n(79474),r=n(90942),s=n(37179),a=n(22215),o=n(14056),l=n(53603),c=n(19498),u=n(95999),d=n(14494),m=n(9751),p=n(27742),h=n(13274);const g=({spec:e,divider:t})=>{const[n,u]=(0,m.J)(),{enqueueSnackbar:g}=(0,p.d)(),f=e.canvasVideosFactory(),b=(0,d.s)(),v=(0,i.useCallback)((()=>{b.logInteraction(f.toggleCanvasVideosFactory().hitToggleState(n?{stateBeforeToggle:"show_canvas_video",stateAfterToggle:"show_static_artwork"}:{stateBeforeToggle:"show_static_artwork",stateAfterToggle:"show_canvas_video"})),n?(u(!1),g(o.Ru.get("contextmenu.looping-visuals-hide.feedback"))):(u(!0),g(o.Ru.get("contextmenu.looping-visuals-show.feedback")))}),[f,n,g,u,b]);return(0,a.NC)(c.yJ8)!==c.NtL.CONTROL?(0,h.jsx)(l.D,{role:"menuitem",onClick:v,divider:t,leadingIcon:n?(0,h.jsx)(r.d,{semanticColor:"textSubdued",size:"small"}):(0,h.jsx)(s.C,{semanticColor:"textSubdued",size:"small"}),children:n?o.Ru.get("contextmenu.looping-visuals-hide"):o.Ru.get("contextmenu.looping-visuals-show")}):null},f=i.memo((function(e){return(0,h.jsx)(u.pZ,{value:"add-to-existing",children:(0,h.jsx)(g,{...e})})}))},63758:(e,t,n)=>{"use strict";n.d(t,{I:()=>m});var i=n(79474),r=n(99754),s=n(96858),a=n(28244),o=n(53603),l=n(95999),c=n(36471),u=n(13274);const d=({uri:e,displayText:t,divider:n,ubiLogger:l,contextMenuSpec:d})=>{const m=(0,r.wA)(),p=(0,c.W)(),h=(0,i.useMemo)((()=>d.showCreditsFactory()),[d]),g=(0,i.useCallback)((async()=>{l.logInteraction(h.hitUiReveal()),p({targetUri:e,intent:"show-credits",type:"click"}),m((0,a.P0)(!0,e))}),[e,m,p,l,h]);return(0,u.jsx)(o.D,{role:"menuitem",divider:n,onClick:g,leadingIcon:(0,u.jsx)(s.L,{semanticColor:"textSubdued",size:"small"}),children:t})},m=i.memo((function(e){return(0,u.jsx)(l.pZ,{value:"show-credits",children:(0,u.jsx)(d,{...e})})}))},56631:(e,t,n)=>{"use strict";n.d(t,{y:()=>F});var i=n(79474),r=n(33117),s=n(14056),a=n(95999),o=n(58325),l=n(82372),c=n(97500),u=n.n(c),d=n(97266),m=n(41318),p=n(7079),h=n(69640),g=n(47583),f=n(53603),b=n(65742),v=n(66615),y=n(50014),_=n(14494),E=n(13274);const x=(e,t)=>{const{addPlaylists:n,movePlaylists:r,containsPlaylists:s}=(0,y.Z)(),a=(0,v.t)(),o=(0,b.l)(),l=(0,_.s)();return(0,i.useCallback)((async i=>{const[c]=await s([e]);let u;c?(r({uri:e},i),u=t.moveToFolderSubmenuFactory().addToFolderButtonFactory().hitSort(),o.contains("ylpin",[e]).then((([t])=>{t&&a.unpin(e)}))):(n([e],i),u=t.moveToFolderSubmenuFactory().addToFolderButtonFactory().hitFollow({itemToBeFollowed:e})),u&&l.logInteraction(u)}),[s,e,l,r,t,o,a,n])},C=({uri:e,folder:t,spec:n,children:i,divider:r})=>{const s=x(e,n);return(0,E.jsx)(f.D,{role:"menuitem",onClick:()=>s({after:t}),divider:r,children:i??t.name})},S=i.memo((function(e){return(0,E.jsx)(a.pZ,{value:"add-to-existing",children:(0,E.jsx)(C,{...e})})}));var A=n(88064);function w(e){const{item:t,filter:n}=e,i=(0,E.jsx)(g.M,{searchWords:[n],textToHighlight:t.displayTitle});return(0,E.jsxs)(S,{...e,children:[(0,E.jsx)("div",{dir:"auto",className:A.A.addToPlaylistTitle,children:i}),t.displaySubtitle?(0,E.jsxs)("div",{dir:"auto",className:A.A.addToPlaylistSubtitle,children:[(0,E.jsx)(r.h,{size:"small"}),(0,E.jsx)(g.M,{searchWords:[n],textToHighlight:t.displaySubtitle})]}):null]})}var I=n(16799),T=n(88682),N=n(39950),R=n(19080);const k=()=>(0,E.jsx)(T.u,{className:R.A.filterPlaylistSearch,children:(0,E.jsx)(I.H,{role:"menuitem",as:"div",children:(0,E.jsx)(N.S,{alwaysExpanded:!0,placeholder:s.Ru.get("contextmenu.find-folder")})})});var O=n(57503),P=n(6127),j=n(3351);const L=({uri:e,children:t,divider:n,spec:r})=>{const s=(0,j.g)(),a=(0,_.s)(),o=(0,i.useCallback)((()=>{s.move({uri:e},{before:"start"});const t=r.moveToFolderSubmenuFactory().removeFromFoldersFactory().hitSort();a.logInteraction(t)}),[a,s,r,e]);return(0,E.jsx)(f.D,{role:"menuitem",onClick:o,divider:n,children:t})},D=i.memo((function(e){return(0,E.jsx)(a.pZ,{value:"move-to-root",children:(0,E.jsx)(L,{...e})})}));var U=n(5108),M=n(33973);const B=({uriToBeAdded:e,folder:t,items:n,displayText:r,depth:a,spec:o,leadingIcon:c})=>{const g=(0,p.W)(),f=(0,m.Oj)(),b=x(e,o),{filter:v}=(0,i.useContext)(l.g),y=1===a,_=(0,i.useMemo)((()=>0===v.length?n:(0,O.G)(v,n,!0)),[v,n]),C=(0,i.useMemo)((()=>t?.items.find((t=>t.uri===e))),[t?.items,e]),A=(0,i.useCallback)(((e=t)=>{e&&!y&&(b({after:e}),f({type:"close"}))}),[b,f,t,y]);return(0,E.jsx)(d.g,{displayText:r,depth:a,placement:g?"left-start":"right-start",onClick:()=>A(),leadingIcon:c,children:t&&(0,E.jsxs)("div",{className:u()({[M.A.filterPlaylistSearchContainer]:y}),style:{"--context-menu-submenu-length":n.filter((t=>(0,h.sA)(t)&&t.uri!==e)).length+(C?0:1)},children:[y&&(0,E.jsx)(k,{}),(0,E.jsx)(U.j,{position:y?{before:"start"}:{after:t},onCreateCallback:A,divider:!C&&y?void 0:"after",spec:o}),!C&&y&&(0,E.jsx)(D,{uri:e,spec:o,divider:"after",children:s.Ru.get("contextmenu.remove-from-folders")}),_.map((t=>(0,h.sA)(t)&&t.uri!==e?(0,P.A)(t)?(0,E.jsx)(w,{uri:e,folder:t,item:t,filter:v??"",spec:o},t.uri):(e=>e.items.some((e=>(0,h.sA)(e))))(t)?(0,E.jsx)(B,{folder:t,uriToBeAdded:e,items:t.items,displayText:t.name,depth:a+1,spec:o},t.uri):(0,E.jsx)(S,{folder:t,uri:e,spec:o},t.uri):null))]})})},F=i.memo((function({uriToBeAdded:e,isInLibrary:t,spec:n}){const c=(0,o.u)();return(0,E.jsx)(a.pZ,{value:"add-to-folder",children:(0,E.jsx)(i.Suspense,{fallback:null,children:(0,E.jsx)(l.s,{uri:"spotify:internal:foldersubmenufolders",children:(0,E.jsx)(B,{uriToBeAdded:e,folder:c??null,items:c?.items||[],displayText:t?s.Ru.get("contextmenu.move-playlist-to-folder"):s.Ru.get("contextmenu.add-playlist-to-folder"),depth:1,spec:n,leadingIcon:(0,E.jsx)(r.h,{semanticColor:"textSubdued",size:"small"})})})})})}))},41894:(e,t,n)=>{"use strict";n.d(t,{o:()=>K});var i=n(79474),r=n(55129),s=n(83856),a=n(14056),o=n(53603),l=n(95999),c=n(42529),u=n(58325),d=n(97500),m=n.n(d),p=n(22215),h=n(97266),g=n(82372),f=n(7079),b=n(19498),v=n(69640),y=n(33117),_=n(47583),E=n(99754),x=n(68420),C=n(41078);function S(e){return e.isLoaded&&!e.isOwnedBySelf&&e.canAdd}var A=n(14494),w=n(87240),I=n(13274);const T=({uris:e,playlist:t,disabled:n,divider:r,spec:a,children:l})=>{const u=i.useContext(c.w),d=(0,E.wA)(),m=(0,A.s)(),p=(0,i.useCallback)((async()=>{let n=e;if((0,s.tb)(e[0])){n=(await u.getContents(e[0])).items.filter(w.P).map((e=>e.uri))}if(1===e.length){const n=a?.addToOtherPlaylistFactory().hitAddToPlaylist({playlist:t.uri,itemToBeAdded:e[0]});n&&m.logInteraction(n)}d((0,C.io)(t.uri,n))}),[m,a,e,d,t.uri,u]);return(0,I.jsx)(o.D,{role:"menuitem",divider:r,onClick:p,disabled:n,trailingIcon:S({isLoaded:t.isLoaded,isOwnedBySelf:t.isOwnedBySelf,canAdd:t.canAdd})?(0,I.jsx)(x.B,{size:"small"}):null,children:l??t.name})},N=i.memo((function(e){return(0,I.jsx)(l.pZ,{value:"add-to-existing",children:(0,I.jsx)(T,{...e})})}));var R=n(88064);function k(e){const{item:t,filter:n}=e,i=(0,I.jsx)(_.M,{searchWords:[n],textToHighlight:t.displayTitle});return(0,I.jsx)(N,{...e,children:(0,I.jsxs)("div",{children:[(0,I.jsx)("div",{dir:"auto",className:R.A.addToPlaylistTitle,children:i}),t.displaySubtitle?(0,I.jsxs)("div",{dir:"auto",className:R.A.addToPlaylistSubtitle,children:[(0,I.jsx)(y.h,{size:"small"}),(0,I.jsx)(_.M,{searchWords:[n],textToHighlight:t.displaySubtitle})]}):null]})})}var O=n(16799),P=n(88682),j=n(39950),L=n(19080);const D=()=>(0,I.jsx)(P.u,{className:L.A.filterPlaylistSearch,children:(0,I.jsx)(O.H,{role:"menuitem",as:"div",children:(0,I.jsx)(j.S,{alwaysExpanded:!0,placeholder:a.Ru.get("contextmenu.find-playlist")})})});var U=n(57503),M=n(6127),B=n(4428);const F=({uris:e,reference:t,displayText:n,divider:a,spec:l})=>{const{createPlaylistFromAlbum:u,createPlaylistFromTracks:d,createPlaylistFromPlaylist:m}=(0,B.A)(),p=i.useContext(c.w),h=(0,A.s)(),g=(0,i.useCallback)((async()=>{let n;const i=null!==t?{after:t}:{before:"start"};if(n=(0,s._T)(e[0])?await u(e[0],i):(0,s.tb)(e[0])?await m(e[0],i):await d(e,i),1===e.length){const t=l.addToPlaylistButtonFactory().hitAddToPlaylist({playlist:n??"",itemToBeAdded:e[0]});t&&h.logInteraction(t)}}),[h,l,e,u,t,m,d]);return(0,s.tb)(e[0])&&!p.getCapabilities().canFetchAllTracks?null:(0,I.jsx)(o.D,{role:"menuitem",divider:a,onClick:g,leadingIcon:(0,I.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),children:n})},H=i.memo((function(e){return(0,I.jsx)(l.pZ,{value:"new-playlist",children:(0,I.jsx)(F,{...e})})}));var V=n(33973);const z=({uris:e,reference:t,items:n,displayText:r,depth:s,spec:o,leadingIcon:l})=>{const c=(0,f.W)(),{filter:u}=(0,i.useContext)(g.g),d=1===s,y=(0,p.NC)(b.N_Z,{loadingValue:!1}),_=(0,i.useMemo)((()=>0===u.length?n:(0,U.G)(u,n)),[u,n]);return(0,I.jsx)(h.g,{displayText:r,depth:s,placement:c?"left-start":"right-start",leadingIcon:l,children:(0,I.jsxs)("div",{className:m()({[V.A.filterPlaylistSearchContainer]:d}),style:{"--context-menu-submenu-length":n.filter((e=>(0,v.sA)(e)||(0,v.Af)(e)&&e.canAdd)).length},children:[d&&(0,I.jsx)(D,{}),(0,I.jsx)(H,{divider:"after",uris:e,reference:t,displayText:y?a.Ru.get("web-player.aligned-curation.contextmenu.new-playlist"):a.Ru.get("contextmenu.create-playlist"),spec:o}),_.map((t=>(0,v.sA)(t)?(0,I.jsx)(z,{reference:t,uris:e,items:t.items,displayText:t.name,depth:s+1,spec:o},t.uri):(0,v.Af)(t)&&t.canAdd?(0,M.A)(t)?(0,I.jsx)(k,{uris:e,playlist:t,item:t,filter:u??"",spec:o},t.uri):(0,I.jsx)(N,{uris:e,playlist:t,spec:o},t.uri):null))]})})},G=e=>(0,I.jsx)(g.s,{uri:`spotify:internal:foldersubmenu:${e.reference?.uri??"root"}`,children:(0,I.jsx)(z,{...e})}),W=i.memo((function({uris:e,isSmartRecommendation:t,isPlaylist:n,spec:d,isEmpty:m}){const p=i.useContext(c.w);let h=a.Ru.get("contextmenu.add-to-playlist");t?h=a.Ru.get("contextmenu.add-to-another-playlist"):n&&(h=a.Ru.get("contextmenu.add-playlist-to-other-playlist"));const g=(0,u.u)();return(0,s.tb)(e[0])&&!p.getCapabilities().canFetchAllTracks?null:m?(0,I.jsx)(o.D,{role:"menuitem",leadingIcon:(0,I.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),disabled:!0,children:h}):(0,I.jsx)(l.pZ,{value:"add-to-playlist",children:(0,I.jsx)(i.Suspense,{fallback:null,children:(0,I.jsx)(G,{uris:e,items:g?.items||[],reference:null,displayText:h,depth:1,spec:d,leadingIcon:(0,I.jsx)(r.u,{semanticColor:"textSubdued",size:"small"})})})})})),K=e=>(0,I.jsx)(W,{...e})},84387:(e,t,n)=>{"use strict";n.d(t,{h:()=>_});var i=n(79474),r=n(14056),s=n(20273),a=n(95999),o=n(9544),l=n(64495),c=n(9440),u=n(28540),d=n(41190),m=n(12198),p=n(47204),h=n(80430),g=n(89374),f=n(81642),b=n(41894),v=n(64645),y=n(13274);const _=i.memo((function({uri:e,sharingInfo:t,canPin:n=o.oT.NO,isPinned:i=!1,useDialogForUnfollow:_=!1,isInLibrary:E}){const{spec:x}=(0,l.o)(e);return(0,y.jsx)(a.pZ,{value:"album",children:(0,y.jsxs)(s.W,{children:[(0,y.jsx)(f.zD,{uri:e,useDialog:_,initialState:E,spec:x}),(0,y.jsx)(u.K,{spec:x,uris:[e]}),(0,y.jsx)(m.z,{spec:x,divider:"after",uri:e,displayText:r.Ru.get("contextmenu.go-to-artist-radio")}),n!==o.oT.NO&&(0,y.jsx)(g.k,{uri:e,canPin:n,isPinned:i,type:c.c.ALBUM,spec:x}),(0,y.jsx)(b.o,{spec:x,uris:[e]}),(0,y.jsxs)(v.h,{divider:"before",children:[(0,y.jsx)(d.m,{uri:e,spec:x,sharingInfo:t,displayText:r.Ru.get("context-menu.copy-album-link")}),(0,y.jsx)(p.x,{spec:x,uri:e,type:c.c.ALBUM})]}),(0,y.jsx)(h.q,{spec:x,divider:"before",uri:e})]})})}))},59416:(e,t,n)=>{"use strict";n.d(t,{t:()=>N});var i=n(79474),r=n(14056),s=n(20273),a=n(95999),o=n(9544),l=n(64495),c=n(9440),u=n(97416),d=n(49214),m=n(22215),p=n(53603),h=n(27742),g=n(36471),f=n(13326),b=n(19498),v=n(13274);const y=({uri:e,divider:t})=>{const n=(0,g.W)(),{add:s,remove:a,useContains:o}=(0,f.p)("artistban"),[l]=o(e),{enqueueSnackbar:c}=(0,h.d)(),m=(0,i.useCallback)((async()=>{n({targetUri:e,intent:l?"ban":"unban",type:"click"}),l?await a(e):(await s(e),c(r.Ru.get("feedback.ban-artist")))}),[n,e,l,a,s,c]),b=l?r.Ru.get("context-menu.unban-artist"):r.Ru.get("context-menu.ban-artist");return(0,v.jsx)(p.D,{role:"menuitem",divider:t,disabled:void 0===l,onClick:m,leadingIcon:l?(0,v.jsx)(u.V,{semanticColor:"essentialNegative",size:"small"}):(0,v.jsx)(d.r,{semanticColor:"textSubdued",size:"small"}),children:b})},_=i.memo((e=>(0,m.NC)(b.wEf,{loadingValue:!1})?(0,v.jsx)(a.pZ,{value:"ban-artist",children:(0,v.jsx)(y,{...e})}):null));var E=n(41190),x=n(88482),C=n(12198),S=n(47204),A=n(80430),w=n(89374),I=n(31452),T=n(64645);const N=i.memo((function({uri:e,sharingInfo:t,canPin:n=o.oT.NO,isPinned:i=!1,useDialogForUnfollow:u=!1,isInLibrary:d}){const{spec:m}=(0,l.o)(e);return(0,v.jsx)(a.pZ,{value:"artist",children:(0,v.jsxs)(s.W,{children:[(0,v.jsx)(x.T5,{uri:e,useDialog:u,initialState:d}),(0,v.jsx)(_,{uri:e}),n!==o.oT.NO&&(0,v.jsx)(w.k,{uri:e,canPin:n,isPinned:i,type:c.c.ARTIST,spec:m}),(0,v.jsx)(C.z,{uri:e,displayText:r.Ru.get("contextmenu.go-to-artist-radio"),spec:m}),(0,v.jsx)(I.P,{spec:m,uri:e}),(0,v.jsxs)(T.h,{children:[(0,v.jsx)(E.m,{spec:m,uri:e,sharingInfo:t,displayText:r.Ru.get("contextmenu.share.copy-artist-link")}),(0,v.jsx)(S.x,{spec:m,uri:e,type:c.c.ARTIST})]}),(0,v.jsx)(A.q,{spec:m,divider:"before",uri:e})]})})}))},84749:(e,t,n)=>{"use strict";n.d(t,{p:()=>A});var i=n(79474),r=n(22215),s=n(14056),a=n(20273),o=n(95999),l=n(9544),c=n(50895),u=n(64495),d=n(9440),m=n(19498),p=n(41190),h=n(89594),g=n(47204),f=n(80430),b=n(89374),v=n(43936),y=n(75664),_=n(31452),E=n(81642),x=n(41894),C=n(64645),S=n(13274);const A=i.memo((function({uri:e,uid:t,contextUri:n,sharingInfo:i,canPin:A=l.oT.NO,isPinned:w=!1,useDialogForUnfollow:I=!1,isInLibrary:T,includeGoToAudiobook:N,canBeRemovedFromPlaylist:R,isPreRelease:k=!1}){const O=(0,r.NC)(m.McC,{loadingValue:!1}),{spec:P}=(0,u.o)(e),j=(0,r.NC)(m.y4c,{loadingValue:!1}),L=(0,r.NC)(m.skl),{data:D}=(0,c.W)(e);return(0,S.jsx)(o.pZ,{value:"show",children:(0,S.jsxs)(a.W,{children:[O&&!k&&(0,S.jsx)(x.o,{spec:P,uris:[e]}),O&&t&&(0,S.jsx)(y.D,{uris:[e],uids:[t],playlistUri:n||"",canBeRemoved:R}),(0,S.jsx)(E.tt,{uri:e,useDialog:I,initialState:T,spec:P,divider:"after"}),N&&(0,S.jsx)(h.fe,{uri:e,contextUri:n,divider:"after"}),L&&!k&&(0,S.jsx)(v.R,{uri:e,rateLabel:s.Ru.get("web-player.audiobooks.rating.rateThisAudiobook"),metadata:D}),A!==l.oT.NO&&(0,S.jsx)(b.k,{uri:e,canPin:A,isPinned:w,type:d.c.AUDIOBOOK,spec:P}),k?(0,S.jsx)(p.m,{spec:P,uri:e,sharingInfo:i,displayText:s.Ru.get("context-menu.copy-book-link")}):(0,S.jsxs)(C.h,{children:[(0,S.jsx)(p.m,{spec:P,uri:e,sharingInfo:i,displayText:s.Ru.get("context-menu.copy-book-link")}),(0,S.jsx)(g.x,{spec:P,uri:e,type:d.c.AUDIOBOOK})]}),j&&(0,S.jsx)(_.P,{spec:P,uri:e}),(0,S.jsx)(f.q,{spec:P,divider:"before",uri:e})]})})}))},96567:(e,t,n)=>{"use strict";n.d(t,{r:()=>p});var i=n(79474),r=n(22215),s=n(20273),a=n(19498),o=n(95999),l=n(64495),c=n(28540),u=n(20090),d=n(31452),m=n(13274);const p=i.memo((function({uri:e,removeFromQueueData:t}){const{spec:n}=(0,l.o)(e),i=(0,r.NC)(a.pCm,{loadingValue:!1});return(0,m.jsx)(o.pZ,{value:"chapter",children:(0,m.jsxs)(s.W,{children:[(0,m.jsx)(c.K,{spec:n,uris:[e]}),t&&(0,m.jsx)(u.c,{spec:n,uids:t.uid?[t.uid]:[],uris:[e],contextUri:t.contextUri}),i&&(0,m.jsx)(d.P,{spec:n,uri:e})]})})}))},47498:(e,t,n)=>{"use strict";n.d(t,{b:()=>P});var i=n(79474),r=n(22215),s=n(14056),a=n(20273),o=n(19498),l=n(95999),c=n(39841),u=n(51326),d=n(64495),m=n(9440),p=n(28540),h=n(41190),g=n(1084),f=n(89594),b=n(81887),v=n(25949),y=n(53603),_=n(16323),E=n(13274);const x=({uri:e,isPlayed:t,onChange:n=(()=>{}),divider:r})=>{const a=(0,i.useContext)(_.Z),o=(0,i.useCallback)((()=>{t?a.markAsUnPlayed(e):a.markAsPlayed(e),n(!t)}),[a,n,t,e]);return a.getCapabilities()?.canMarkEpisodesAsDone?(0,E.jsx)(y.D,{role:"menuitem",divider:r,onClick:o,testid:"mark-as-played-or-unplayed","data-test-state":t?"played":"unplayed",leadingIcon:t?(0,E.jsx)(b.k,{semanticColor:"textBrightAccent",size:"small"}):(0,E.jsx)(v.i,{semanticColor:"textSubdued",size:"small"}),children:t?s.Ru.get("contextmenu.mark-as-unplayed"):s.Ru.get("contextmenu.mark-as-played")}):null},C=i.memo((function(e){return(0,E.jsx)(l.pZ,{value:"mark-as-played",children:(0,E.jsx)(x,{...e})})}));var S=n(47204),A=n(80430),w=n(75664),I=n(20090),T=n(31452),N=n(81642),R=n(41894),k=n(96567),O=n(64645);const P=i.memo((function({uri:e,isPlayed:t=null,contextUri:n,uid:i,sharingInfo:b,onMarkAsPlayed:v=(()=>{}),canBeRemovedFromPlaylist:y,provider:_}){const x=(0,c.d)(e),{spec:P}=(0,d.o)(e),j=(0,r.NC)(o.qht,{loadingValue:!1});if(void 0===x?.episodeOrChapter)return null;const L=x.episodeOrChapter;if((0,u.Gr)(L))return(0,E.jsx)(k.r,{uri:e});const D=!(L.podcastSubscription.isPaywalled&&!L.podcastSubscription.isUserSubscribed),U="autoplay"===_;return x?.episodeOrChapter?(0,E.jsx)(l.pZ,{value:"episode",children:(0,E.jsxs)(a.W,{children:[(0,E.jsx)(R.o,{spec:P,uris:[e]}),i&&(0,E.jsx)(w.D,{uris:[e],uids:[i],playlistUri:n||"",canBeRemoved:y}),(0,E.jsx)(N.N7,{uri:e,spec:P}),(0,E.jsx)(p.K,{spec:P,uris:[e]}),i&&!U&&(0,E.jsx)(I.c,{spec:P,uids:[i],uris:[e],contextUri:n}),(0,E.jsx)(g.u,{spec:P,uri:e,canDownload:D}),(0,E.jsx)(f.du,{uri:e,contextUri:n}),null!==t&&(0,E.jsx)(C,{uri:e,isPlayed:t,onChange:v}),(0,E.jsxs)(O.h,{divider:"before",children:[(0,E.jsx)(h.m,{spec:P,uri:e,sharingInfo:b,displayText:s.Ru.get("context-menu.copy-episode-link")}),(0,E.jsx)(S.x,{spec:P,uri:e,type:m.c.EPISODE})]}),j&&(0,E.jsx)(T.P,{spec:P,uri:e}),(0,E.jsx)(A.q,{divider:"before",uri:e,spec:P,context:n})]})}):null}))},47263:(e,t,n)=>{"use strict";n.d(t,{h:()=>d});var i=n(79474),r=n(14056),s=n(20273),a=n(95999),o=n(64495),l=n(41190),c=n(64645),u=n(13274);const d=i.memo((function({uri:e}){const{spec:t}=(0,o.o)(e);return(0,u.jsx)(a.pZ,{value:"generic",children:(0,u.jsx)(s.W,{children:(0,u.jsx)(c.h,{divider:"before",children:(0,u.jsx)(l.m,{spec:t,uri:e,displayText:r.Ru.get("context-menu.copy-generic-link")})})})})}))},63759:(e,t,n)=>{"use strict";n.d(t,{I:()=>h});var i=n(79474),r=n(41028),s=n(14056),a=n(97266),o=n(89594),l=n(3775),c=n(16990);const u=Spicetify.GraphQL.Definitions["queryTrackArtists"]=new l.l("queryTrackArtists","query","47fe6e7ca333272699906da2964bfa38336c2aa28303489997404a82bd46e056",null);var d=n(7079),m=n(95999),p=n(13274);const h=i.memo((function({trackUri:e,contextUri:t}){let n=[];const i=(l={uri:e},(0,c.I)(u,l,h));var l,h;"Track"===i.data?.trackUnion.__typename&&(n=i.data.trackUnion.artists.items.map((e=>({uri:e.uri,name:e.profile.name}))));const g=(0,d.W)();return(0,p.jsx)(a.g,{displayText:s.Ru.get("contextmenu.go-to-artist"),depth:1,placement:g?"left-start":"right-start",leadingIcon:(0,p.jsx)(r.r,{semanticColor:"textSubdued",size:"small"}),children:(0,p.jsx)(m.pZ,{value:"go-to-artist",children:n.map((({uri:e,name:n})=>(0,p.jsx)(o.Jn,{displayText:n,uri:e,contextUri:t,hideLeadingIcon:!0},e)))})})}))},16975:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var i=n(79474),r=n(20273),s=n(95999),a=n(64495),o=n(28540),l=n(75664),c=n(20090),u=n(81642),d=n(41894),m=n(13274);const p=i.memo((function({uri:e,uid:t,contextUri:n,canBeRemovedFromPlaylist:i}){const{spec:p}=(0,a.o)(e);return(0,m.jsx)(s.pZ,{value:"local-file",children:(0,m.jsxs)(r.W,{children:[(0,m.jsx)(d.o,{spec:p,uris:[e]}),t&&(0,m.jsx)(l.D,{uris:[e],uids:[t],playlistUri:n||"",canBeRemoved:i}),(0,m.jsx)(u.TR,{uri:e,spec:p}),(0,m.jsx)(o.K,{spec:p,uris:[e]}),t&&(0,m.jsx)(c.c,{spec:p,uids:[t],uris:[e],contextUri:n})]})})}))},69494:(e,t,n)=>{"use strict";n.d(t,{W:()=>U});var i=n(79474),r=n(14056),s=n(20273),a=n(95999),o=n(9544),l=n(33037),c=n(17980),u=n(96710),d=n(64495),m=n(9440),p=n(20490),h=n(43554),g=n(16649),f=n(70646),b=n(28540),v=n(41190),y=n(74062),_=n(1084),E=n(48134),x=n(88482),C=n(86722),S=n(54850),A=n(350),w=n(47204),I=n(80430),T=n(89374),N=n(41694),R=n(56094),k=n(31452),O=n(56631),P=n(41894),j=n(64645),L=n(13274);const D=i.memo((function({uri:e,isPublished:t,canPin:n=o.oT.NO,isPinned:i=!1}){const h=(0,c.J)(e,{decorateFormatListData:!0}),[g]=(0,l.A)(e),{spec:D}=(0,d.o)(e),U=!!h?.permissions?.isPrivate,M=(0,u.v)(e)??h?.isPublished??t,B=h?.hasSpotifyAudiobooks;return h?.permissions&&!h.permissions.canView&&g?h&&(0,L.jsx)(a.pZ,{value:"playlist",children:(0,L.jsx)(s.W,{children:(0,L.jsx)(x.ET,{uri:e})})}):h&&(0,L.jsx)(a.pZ,{value:"playlist",children:(0,L.jsxs)(s.W,{children:[!h.isOwnedBySelf&&(0,L.jsx)(x.ET,{uri:e}),!B&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(b.K,{spec:D,uris:[e]}),(0,L.jsx)(p._,{uri:e,spec:D})]}),g&&!U&&(0,L.jsx)(R._,{spec:D,divider:"both",uri:e,isPublished:M}),h.isOwnedBySelf&&(0,L.jsx)(E.T,{spec:D,uri:e,name:h.name,description:h.description,image:h.images[0]}),!h.isOwnedBySelf&&(0,L.jsx)(k.P,{spec:D,uri:e}),h.isOwnedBySelf&&(0,L.jsx)(y.u,{spec:D,uri:e}),!B&&(0,L.jsx)(_.d,{spec:D,uri:e}),h.permissions?.canAdministratePermissions&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(N.U,{spec:D,divider:"before",uri:e,isPrivate:U}),!B&&(0,L.jsx)(S.n,{uri:e,spec:D})]}),h.permissions?.canCancelMembership&&(0,L.jsx)(A._,{spec:D,divider:"before",uri:e}),(0,L.jsx)(C.w,{spec:D,uri:e}),(0,L.jsx)(O.y,{uriToBeAdded:e,isInLibrary:g,spec:D}),!B&&(0,L.jsx)(P.o,{spec:D,uris:[e],isPlaylist:!0,isEmpty:0===h.totalLength}),n!==o.oT.NO&&(0,L.jsx)(T.k,{uri:e,canPin:n,isPinned:i,type:m.c.PLAYLIST,spec:D}),(h.isOwnedBySelf||!U)&&(0,L.jsxs)(j.h,{divider:"before",children:[(0,L.jsx)(v.m,{spec:D,uri:e,displayText:r.Ru.get("contextmenu.share.copy-playlist-link"),isPrivatePlaylist:U}),!h.hasSpotifyAudiobooks&&(0,L.jsx)(w.x,{spec:D,uri:e,type:m.c.PLAYLIST})]}),!!h?.formatListData&&(0,L.jsx)(f.r,{divider:"before"}),(0,L.jsx)(I.q,{spec:D,divider:"before",uri:e})]})})})),U=e=>(0,g.c0)(e.uri)?(0,L.jsx)(h.g,{}):(0,L.jsx)(D,{...e})},64645:(e,t,n)=>{"use strict";n.d(t,{h:()=>u});var i=n(79474),r=n(50325),s=n(14056),a=n(97266),o=n(7079),l=n(95999),c=n(13274);const u=i.memo((function({children:e,divider:t}){const n=(0,o.W)();return(0,c.jsx)(l.pZ,{value:"share",children:(0,c.jsx)(a.g,{divider:t,displayText:s.Ru.get("contextmenu.share"),placement:n?"left-start":"right-start",leadingIcon:(0,c.jsx)(r.C,{semanticColor:"textSubdued",size:"small"}),children:e})})}))},63445:(e,t,n)=>{"use strict";n.d(t,{H:()=>S});var i=n(79474),r=n(22215),s=n(14056),a=n(20273),o=n(19498),l=n(95999),c=n(9544),u=n(50895),d=n(51326),m=n(64495),p=n(9440),h=n(41190),g=n(88482),f=n(47204),b=n(80430),v=n(89374),y=n(43936),_=n(31452),E=n(84749),x=n(64645),C=n(13274);const S=i.memo((function({uri:e,sharingInfo:t,canPin:n=c.oT.NO,isPinned:i=!1,useDialogForUnfollow:S,isInLibrary:A}){const{spec:w}=(0,m.o)(e),I=(0,r.NC)(o.yt8,{loadingValue:!1}),T=(0,r.NC)(o.skl),{data:N}=(0,u.W)(e);return N&&(0,d.Go)(N)?(0,C.jsx)(E.p,{uri:e,sharingInfo:t,useDialogForUnfollow:!0,isInLibrary:A}):(0,C.jsx)(l.pZ,{value:"show",children:(0,C.jsxs)(a.W,{children:[(0,C.jsx)(g.jK,{uri:e,useDialog:S,initialState:A}),T&&(0,C.jsx)(y.R,{uri:e,rateLabel:s.Ru.get("web-player.show.rating.rateShow"),metadata:N}),n!==c.oT.NO&&(0,C.jsx)(v.k,{uri:e,canPin:n,isPinned:i,type:p.c.SHOW,spec:w}),(0,C.jsxs)(x.h,{children:[(0,C.jsx)(h.m,{spec:w,uri:e,sharingInfo:t,displayText:s.Ru.get("context-menu.copy-show-link")}),(0,C.jsx)(f.x,{spec:w,uri:e,type:p.c.SHOW})]}),I&&(0,C.jsx)(_.P,{spec:w,uri:e}),(0,C.jsx)(b.q,{spec:w,divider:"before",uri:e})]})})}))},41955:(e,t,n)=>{"use strict";n.d(t,{P:()=>M});var i=n(79474),r=n(48321),s=n(14056),a=n(20273),o=n(95999),l=n(64495),c=n(67302),u=n(9440),d=n(20490),m=n(70646),p=n(41504),h=n(83856),g=n(53603),f=n(17980),b=n(52843),v=n(13274);const y=({uri:e,uid:t,contextUri:n,spec:r,logger:a,divider:o})=>{const l=(0,i.useCallback)((()=>{let t;n&&(0,h.tb)(n)?t=r.addRecommendationFactory().hitAddToPlaylist({playlist:n??"",itemToBeAdded:e}):n&&(0,h.Z0)(n)&&(t=r.addRecommendationFactory().hitLike({itemToBeLiked:e})),t&&a.logInteraction(t)}),[n,a,r,e]),{addRecommendation:c}=(0,b.t)({uri:e,uid:t,contextUri:n,onAddRecommendation:l});return(0,v.jsx)(g.D,{role:"menuitem",divider:o,onClick:c,leadingIcon:(0,v.jsx)(p.v,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.add-recommendation-to-this-playlist")})},_=e=>{const t=(0,f.J)(e.contextUri);return t?.canAdd?(0,v.jsx)(y,{...e}):null},E=e=>e.contextUri&&(0,h.tb)(e.contextUri)?(0,v.jsx)(_,{...e}):e.contextUri&&(0,h.Z0)(e.contextUri)?(0,v.jsx)(y,{...e}):null;var x=n(28540),C=n(41190),S=n(89594),A=n(12198),w=n(47204),I=n(80430),T=n(75664),N=n(20090),R=n(30332);const k=({uri:e,uid:t,contextUri:n,spec:r,logger:a,divider:o})=>{const l=(0,i.useCallback)((()=>{a.logInteraction(r.removeRecommendationFactory().hitRemoveRecommendation({contextUri:n??"",recommendedItemUri:e}))}),[n,a,r,e]),{removeRecommendation:c}=(0,b.t)({uri:e,uid:t,contextUri:n,onRemoveRecommendation:l});return(0,v.jsx)(g.D,{role:"menuitem",divider:o,onClick:c,leadingIcon:(0,v.jsx)(R.x,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.remove-recommendation")})};var O=n(81642),P=n(96526),j=n(63758),L=n(41894),D=n(63759),U=n(64645);const M=i.memo((function({uri:e,uid:t,artists:n=[],albumUri:i,contextUri:p,sharingInfo:h,removePlaylistItems:g,isSmartRecommendation:f,entityContextUri:b=p,canBeRemovedFromPlaylist:y,provider:_,canSwitchVisuals:R=!1}){const{spec:M,logger:B,UBIFragment:F}=(0,c.r)(r.w,{data:{uri:e}}),{spec:H}=(0,l.o)(e),V="autoplay"===_||f;return(0,v.jsx)(F,{spec:M,children:(0,v.jsx)(o.pZ,{value:"track","":"track-menu",children:(0,v.jsxs)(a.W,{children:[f&&b?(0,v.jsx)(E,{uri:e,uid:t,contextUri:b,spec:M,logger:B}):null,f&&b?(0,v.jsx)(k,{uri:e,uid:t,contextUri:b,spec:M,logger:B,divider:"after"}):null,(0,v.jsx)(L.o,{spec:H,uris:[e],isSmartRecommendation:f}),t&&!V?(0,v.jsx)(T.D,{uris:[e],uids:[t],playlistUri:p||"",removePlaylistItems:g,canBeRemoved:y}):null,(0,v.jsx)(O.TR,{uri:e,spec:H}),(0,v.jsx)(x.K,{spec:H,uris:[e]}),t&&(0,v.jsx)(N.c,{spec:H,uids:[t],uris:[e],contextUri:p}),(0,v.jsx)(d._,{contextUri:b,uri:e,spec:H}),(0,v.jsx)(A.z,{spec:H,uri:e,displayText:s.Ru.get("contextmenu.go-to-song-radio"),divider:"before"}),n.length>1?(0,v.jsx)(D.I,{trackUri:e,contextUri:p}):(0,v.jsx)(S.Jn,{uri:n?.[0]?.uri,contextUri:p}),(0,v.jsx)(S.V9,{uri:i,contextUri:p,highlightedUri:e}),(0,v.jsx)(j.I,{uri:e,displayText:s.Ru.get("contextmenu.show-credits"),ubiLogger:B,contextMenuSpec:M}),R&&(0,v.jsx)(P.i,{spec:H}),(0,v.jsxs)(U.h,{divider:"before",children:[(0,v.jsx)(C.m,{spec:H,uri:e,sharingInfo:h,displayText:s.Ru.get("context-menu.copy-track-link")}),(0,v.jsx)(w.x,{spec:H,uri:e,type:u.c.TRACK})]}),V&&(0,v.jsx)(m.r,{divider:"before"}),(0,v.jsx)(I.q,{spec:H,divider:"before",uri:e,context:p})]})})})}))},98496:(e,t,n)=>{"use strict";n.d(t,{B:()=>G});var i=n(79474),r=n(99754),s=n(14056),a=n(20273),o=n(87465),l=n(19498),c=n(31350),u=n(95999),d=n(70682),m=n(96660),p=n(64495),h=n(42340),g=n(28244),f=n(53603),b=n(40823),v=n(70786),y=n(50042),_=n(42947),E=n(13274);function x({userUri:e}){const{currentSession:t}=(0,y.D)(),n=(0,v.g)(),a=(0,r.wA)(),o=(0,i.useCallback)((()=>{const n=(0,_.Bj)(t?.sessionMembers??[],e);n&&a((0,g.A9)(b.EL.REMOVE_PARTICIPANT,void 0,n))}),[t?.sessionMembers,a,e]),l=(0,_.kt)(n,e);return t?.active&&e&&l?(0,E.jsx)(f.D,{role:"menuitem",onClick:o,leadingIcon:(0,E.jsx)(h.f,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("web-player.social-connect.kick-users.remove-the-user")}):(0,E.jsx)(E.Fragment,{})}var C=n(62359),S=n(30939),A=n(34310),w=n(21361),I=n(47131),T=n(27742),N=n(36471);const R=({currentUserUri:e,uri:t,name:n,divider:a})=>{const o=(0,N.W)(),l=!(0,S.n)(),{isBlocked:c,blockUser:u,unblockUser:m}=function(e,t,n){const[a,o]=(0,i.useState)(!1),l=(0,r.wA)(),c=(0,A.a)(),u=(0,I.A9)(),{enqueueSnackbar:m}=(0,T.d)();return(0,i.useEffect)((()=>{e&&(0,d.zP)(u,{currentUserUri:e,uri:t}).then((e=>{if(c()){if(200!==e.status)throw new Error("Invalid response from socialgraph");o(e.body?.[0]?.is_dismissed||!1)}}))}),[e,t,c,u]),{isBlocked:a,blockUser:()=>{e&&l((0,g.zj)(t,n))},unblockUser:async()=>{e&&(await(0,d.kV)(w.n.getInstance(),{currentUserUri:e,uri:t}),m(s.Ru.get("feedback.unblock-user")))}}}(e,t,n),p=(0,i.useCallback)((async()=>{o({targetUri:t,intent:c?"unblock":"block",type:"click"}),c?await m():await u()}),[o,t,u,m,c]);if(!e||e===t)return null;const h=c?s.Ru.get("contextmenu.unblock"):s.Ru.get("contextmenu.block");return(0,E.jsx)(f.D,{role:"menuitem",divider:a,disabled:l,onClick:p,leadingIcon:(0,E.jsx)(C.V,{semanticColor:"textSubdued",size:"small"}),children:h})},k=i.memo((function(e){return(0,E.jsx)(u.pZ,{value:"block-user",children:(0,E.jsx)(R,{...e})})}));var O=n(41190),P=n(70201);const j=i.memo((function({onClick:e,divider:t,canEdit:n}){return e&&n?(0,E.jsx)(u.pZ,{value:"edit-profile",children:(0,E.jsx)(f.D,{role:"menuitem",divider:t,onClick:e,leadingIcon:(0,E.jsx)(P.G,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.edit-profile")})}):null}));var L=n(23689),D=n(43702),U=n(53855),M=n(12206),B=n(67302);const F=()=>{},H=({uri:e,divider:t,onRemoveCallback:n=F})=>{const{spec:a,logger:o}=(0,B.r)(U.F,{data:{uri:e}}),l=(0,N.W)(),u=!(0,S.n)(),d=(0,r.d4)(c.Ht).user,[m,p]=(0,M.Y)(e),h=(0,i.useCallback)((()=>{const t=a.followButtonFactory();l({targetUri:e,intent:m?"unfollow":"follow",type:"click"}),m?(p(!1),o.logInteraction(t.hitUnfollow({itemToBeUnfollowed:e})),n(e)):(p(!0),o.logInteraction(t.hitFollow({itemToBeFollowed:e})))}),[m,o,l,n,p,a,e]);if(d&&d.uri===e)return null;const g=m?s.Ru.get("contextmenu.unfollow"):s.Ru.get("contextmenu.follow");return(0,E.jsx)(f.D,{role:"menuitem",testid:"follow-user-context-menu-item",divider:t,disabled:u,onClick:h,leadingIcon:m?(0,E.jsx)(L.M,{semanticColor:"textBrightAccent",size:"small"}):(0,E.jsx)(D.h,{semanticColor:"textSubdued",size:"small"}),children:g})},V=i.memo((function(e){return(0,E.jsx)(u.pZ,{value:"follow-user",children:(0,E.jsx)(H,{...e})})}));var z=n(31452);const G=i.memo((function({uri:e,onEditProfileCallback:t}){const{user:n}=(0,r.d4)(c.Ht),{spec:i}=(0,p.o)(e),{data:h,loading:g}=(0,m.Z)(d.E$,[{uri:e}]);return g?null:h?(0,E.jsx)(u.pZ,{value:"user",children:(0,E.jsxs)(a.W,{children:[(0,E.jsx)(V,{uri:e}),(0,E.jsx)(x,{userUri:e}),(0,E.jsx)(o.u,{property:l.NAP,renderNewExperience:()=>(0,E.jsx)(k,{uri:h.uri,name:h.name,currentUserUri:n?.uri})}),(0,E.jsx)(j,{onClick:t,canEdit:!(e!==n?.uri||h.edit_image_disabled&&h.edit_name_disabled)}),(0,E.jsx)(z.P,{spec:i,uri:e,canReportUser:!h.report_abuse_disabled,currentUserUri:n?.uri}),(0,E.jsx)(O.m,{spec:i,uri:e,displayText:s.Ru.get("contextmenu.share.copy-profile-link")})]})}):null}))},75951:(e,t,n)=>{"use strict";n.d(t,{o:()=>N});var i=n(79474),r=n(48321),s=n(14056),a=n(20273),o=n(95999),l=n(30232),c=n(64495),u=n(67302),d=n(9440),m=n(20490),p=n(33432),h=n(28540),g=n(41190),f=n(89594),b=n(12198),v=n(47204),y=n(80430),_=n(75664),E=n(20090),x=n(81642),C=n(96526),S=n(63758),A=n(41894),w=n(63759),I=n(64645),T=n(13274);const N=i.memo((function({uri:e,uid:t,artists:n=[],albumUri:i,contextUri:N,sharingInfo:R,removePlaylistItems:k,canBeRemovedFromPlaylist:O}){const P=(0,l.o)((e=>e),((e,t)=>e?.item?.uri===t?.item?.uri)),j=P?.item?.uri,L=(0,p.i)(e),D=j===e,{spec:U,logger:M,UBIFragment:B}=(0,u.r)(r.w,{data:{uri:L}}),{spec:F}=(0,c.o)(e);return(0,T.jsx)(B,{spec:U,children:(0,T.jsx)(o.pZ,{value:"track","":"track-menu",children:(0,T.jsxs)(a.W,{children:[D&&(0,T.jsx)(A.o,{spec:F,uris:[L]}),D&&t&&(0,T.jsx)(_.D,{uris:[L],uids:[t],playlistUri:N||"",removePlaylistItems:k,canBeRemoved:O}),D&&(0,T.jsx)(x.TR,{uri:L,spec:F}),(0,T.jsx)(h.K,{spec:F,uris:[e]}),t&&(0,T.jsx)(E.c,{spec:F,uids:[t],uris:[e],contextUri:N}),(0,T.jsx)(m._,{uri:e,contextUri:N,spec:F}),D&&(0,T.jsx)(b.z,{spec:F,uri:L,displayText:s.Ru.get("contextmenu.go-to-song-radio"),divider:"before"}),n.length>1?(0,T.jsx)(w.I,{trackUri:e,contextUri:N}):(0,T.jsx)(f.Jn,{uri:n?.[0]?.uri,contextUri:N}),(0,T.jsx)(f.V9,{uri:i,contextUri:N,highlightedUri:L}),(0,T.jsx)(S.I,{uri:L,displayText:s.Ru.get("contextmenu.show-credits"),ubiLogger:M,contextMenuSpec:U}),(0,T.jsx)(C.i,{spec:F}),(0,T.jsxs)(I.h,{divider:"before",children:[(0,T.jsx)(g.m,{spec:F,uri:e,sharingInfo:R,displayText:s.Ru.get("context-menu.copy-track-link")}),(0,T.jsx)(v.x,{spec:F,uri:e,type:d.c.TRACK})]}),(0,T.jsx)(y.q,{spec:F,divider:"before",uri:e,context:N})]})})})}))},54084:(e,t,n)=>{"use strict";n.d(t,{G:()=>w});var i=n(97500),r=n.n(i),s=n(14056),a=n(61681),o=n(9440),l=n(98764);const c="YNXLVjlRXPfM4xObTojA",u="CVRy4NtxZYSle8dJ1E67",d="holKDGFNEFSz85czBeSv",m="gqidZhN1lgoZDfI_7E6w",p="_IQ8dgA5pEr_V8PfUkWa",h="xNkPMA_OvAxcFTdfyroI";var g=n(13274);const f=({value:e,label:t,hasDivider:n=!1})=>(0,g.jsxs)("div",{className:d,"aria-hidden":"true",children:[(0,g.jsx)(l.E,{variant:"titleSmall",className:r()({[p]:n}),children:e}),(0,g.jsx)(l.E,{variant:"marginal",semanticColor:"textSubdued",children:t})]});var b=n(79474),v=n(97075);const y=1e3,_=60*y,E=60*_,x=24*E;var C=n(48610);const S={days:0,hours:0,minutes:0,seconds:0};function A(e){return e>0?function(e){const t=Math.abs(e);return{days:Math.floor(t/x),hours:Math.floor(t%x/E),minutes:Math.floor(t%E/_),seconds:Math.floor(t%_/y)}}(e):S}const w=({targetDate:e,className:t,onComplete:n,images:i,imageTitle:l})=>{const{days:d,hours:p,minutes:y,seconds:_}=((e,t)=>{const n=(0,b.useRef)(t);n.current=t;const[i,r]=(0,b.useState)((()=>A((0,C.u)(e))));return(0,v.$)((t=>{const i=(0,C.u)(e),s=A(i);r(s),i<=0&&(t(),n.current?.())}),1e3),i})(e,n),E=void 0!==i&&i.length>0&&l,x=s.Ru.get("web-player.prerelease.countdown_label",{days:d,hours:p,minutes:y,seconds:_});return(0,g.jsxs)("div",{className:r()(c,t,{[u]:E}),role:"timer",children:[(0,g.jsx)("span",{className:h,children:x}),E&&(0,g.jsx)(a.b,{images:i,type:o.c.ALBUM,shape:a.u.ROUNDED_CORNERS,className:m,title:l}),(0,g.jsx)(f,{value:d,label:s.Ru.get("web-player.prerelease.days",d),hasDivider:!0}),(0,g.jsx)(f,{value:p,label:s.Ru.get("web-player.prerelease.hours",p),hasDivider:!0}),(0,g.jsx)(f,{value:y,label:s.Ru.get("web-player.prerelease.minutes",y),hasDivider:!0}),(0,g.jsx)(f,{value:_,label:s.Ru.get("web-player.prerelease.seconds",_)})]})}},17066:(e,t,n)=>{"use strict";n.d(t,{N:()=>p});var i=n(79474),r=n(97500),s=n.n(r),a=n(8955),o=n(72423);const l="cover-art",c="cover-art-auto-height",u="cover-art-icon",d="cover-art-image";var m=n(13274);const p=(0,i.memo)((function({imgSrc:e,className:t,onClick:n,type:i,width:r,height:p,loading:h="lazy"}){const g=s()(l,t,{[c]:!p});return(0,m.jsxs)("div",{className:g,style:{width:r||"auto",height:p||"auto"},onClick:n,"aria-hidden":"true",children:[(0,m.jsx)("div",{className:u,children:(0,m.jsx)(a.s,{type:i})}),(0,m.jsx)(o._,{testid:"cover-art-image",loading:h,src:e,className:d})]})}))},61412:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(79474),r=n(97500),s=n.n(r),a=n(83856),o=n(51184),l=n(13274);const c="div";class u extends i.Component{constructor(e){super(e),this.state={isDropTargetActive:!1},this.enterEventCount=0,this.leaveEventCount=0}componentDidMount(){document.body.addEventListener("dragend",this.handleDragEnd)}shouldComponentUpdate(e,t){return t.isDropTargetActive!==this.state.isDropTargetActive||e.children!==this.props.children||e.onDragEnter!==this.props.onDragEnter||e.onDragLeave!==this.props.onDragLeave||e.onDrop!==this.props.onDrop||e.types.length!==this.props.types.length||e.types.some(((e,t)=>e!==this.props.types[t]))}componentWillUnmount(){document.body.removeEventListener("dragend",this.handleDragEnd)}handleDragOver=e=>{this.getMatchingMimeTypes(e).length>0&&(e.preventDefault(),e.dataTransfer.dropEffect="copy")};handleDragEnter=e=>{this.enterEventCount&&!e.relatedTarget||(this.enterEventCount++,1===this.enterEventCount&&this.getMatchingMimeTypes(e).length>0&&(this.props.onDragEnter?.(e),this.setState({isDropTargetActive:!0})))};handleDragLeave=e=>{this.leaveEventCount++,this.leaveEventCount===this.enterEventCount&&this.getMatchingMimeTypes(e).length>0&&(this.enterEventCount=0,this.leaveEventCount=0,this.props.onDragLeave?.(e),this.setState({isDropTargetActive:!1}))};handleDragEnd=()=>{this.enterEventCount=0,this.leaveEventCount=0};handleDrop=e=>{if(0===this.getMatchingMimeTypes(e).length)return;const{onDragLeave:t,onDrop:n}=this.props,i=this.getMatchingDropData(e);this.enterEventCount=0,this.leaveEventCount=0;const r=e.defaultPrevented;e.preventDefault(),t?.(e),r||n(e,i),this.setState({isDropTargetActive:!1})};getMatchingMimeTypes(e){const t=this.props.types;return Array.from(e.dataTransfer.types).filter((e=>t.includes(e)))}getMatchingDropData(e){const t=this.getMatchingMimeTypes(e),n={};t.forEach((t=>{const i=e.dataTransfer.getData(t),r=0===t.indexOf("text/x-spotify"),s=r?i.split("\n"):[i];n[t]=s.map((e=>{if(r){const t=(0,a.o_)(e);if(t)return t.toURI()}return e})).filter((e=>!!e))}));const i=e.dataTransfer.getData("text/plain");return n.all=i?i.split("\n").map((e=>{const t=(0,a.o_)(e);return t?t.toURI():e})):[],n}render(){const{types:e=[],as:t=c,testId:n,className:i=""}=this.props,r=t,a=e.filter(Boolean).map((e=>`GlueDropTarget--${e.replace("text/x-spotify-","")}`));return(0,l.jsx)(r,{className:s()("GlueDropTarget",a,{"GlueDropTarget--active":this.state.isDropTargetActive},i),onDragOver:this.handleDragOver,onDragEnter:this.handleDragEnter,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop,onContextMenu:this.props.onContextMenu,"":n,children:this.props.children})}}const d=e=>{const{supportsDragAndDrop:t}=(0,o._)();if(!t){const t=e.as??c;return(0,l.jsx)(t,{children:e.children})}return(0,l.jsx)(u,{...e})}},64647:(e,t,n)=>{"use strict";n.d(t,{Q:()=>g});var i=n(10397),r=n(14056),s=n(73604),a=n(30232),o=n(33082),l=n(57506),c=n(86412),u=n(79474),d=n(4485),m=n(9776);var p=n(13274);function h(e){return e.includes("Spotify")?e:`Spotify – ${e}`}const g=({children:e,usePlayingItem:t})=>{let n=h(e);(e=>{const{mainLandmarkRef:t}=(0,m.JT)(),n=(0,d.J)(),i=n.location?.state?.preventMoveFocus,r=(0,u.useRef)(n.length<2);r.current=n.length<2,(0,u.useLayoutEffect)((()=>{const n=t.current;!i&&!r.current&&n&&e&&(n.setAttribute("aria-label",e),n.focus({preventScroll:!0}))}),[e,t,i])})(e);const{isPlaying:g}=(0,s.GK)(),f=(0,a.o)((e=>e?.item));return f&&(g||t)&&((0,c.v)(f)?n=[f.name,f.artists.map((e=>e.name)).join(r.Ru.getSeparator())].join(" • "):(0,l.p)(f)?n=[f.name,f.show.name].join(" • "):(0,o.N)(f)&&(n=h(r.Ru.get("ad-formats.advertisement")))),(0,p.jsx)(i.mg,{defaultTitle:"Spotify",defer:!1,children:(0,p.jsx)("title",{children:n})})}},58291:(e,t,n)=>{"use strict";n.d(t,{M:()=>f});var i=n(79474),r=n(97500),s=n.n(r),a=n(11866),o=n(14056),l=n(33712),c=n(81172),u=n(77564),d=n(56029),m=n(87653),p=n(54387);const h="hcxPtZcvjM07S6ydT685";var g=n(13274);const f=i.memo((function({uri:e,className:t,size:n="small",as:i="div"}){const{availability:r}=(0,l.$)(e),f=(0,c.e)(e);return r===u.kw.NO?null:(0,g.jsx)(i,{className:s()(h,t),children:r===u.kw.DOWNLOADING?(0,g.jsx)(p.C,{percentage:f.percentage,size:(0,d.k)(n)}):r===u.kw.WAITING?(0,g.jsx)(m.C,{size:(0,d.k)(n)}):r===u.kw.YES?(0,g.jsx)(a.F,{size:n,title:o.Ru.get("shared.library.filter.downloaded")}):null})}))},87653:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(79474),r=n(13274);const s=(0,i.memo)((function({size:e}){const t=2e3,n=20*Math.PI,i=n-.8*n,s=Math.floor(Date.now()%t*360/t);return(0,r.jsx)("svg",{height:e,role:"img",width:e,viewBox:"0 0 24 24",children:(0,r.jsx)("circle",{strokeDasharray:`${n} ${n}`,strokeDashoffset:i,stroke:"currentColor",strokeWidth:"2",fill:"transparent",r:10,cx:"12",cy:"12",children:(0,r.jsx)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${s} 12 12`,to:`${360+s} 12 12`,dur:"2000ms",repeatCount:"indefinite"})})})}))},7141:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});var i=n(97500),r=n.n(i),s=n(33657);const a="main-dropDown-dropDown",o="main-dropDown-isSafari";var l=n(13274);const c=({value:e,id:t,children:n,disabled:i,onSelect:c,className:u,dir:d})=>(0,l.jsx)("span",{className:u,children:(0,l.jsx)("select",{className:r()(a,{[o]:(0,s.n)()}),value:e?.toString(),id:t,disabled:i,onBlur:()=>{},onChange:e=>{c(e.target.value)},dir:d,children:n})})},52786:(e,t,n)=>{"use strict";n.d(t,{a:()=>v});var i=n(97500),r=n.n(i),s=n(31595),a=n(70201),o=n(98764),l=n(22215),c=n(14056),u=n(19498);const d="main-editImage-buttonContainer",m="main-editImageButton-image",p="main-editImageButton-overlay",h="main-editImageButton-rounded",g="main-editImageButton-icon",f="main-editImageButton-copy";var b=n(13274);const v=function({overlay:e=!1,rounded:t=!1,onClick:n}){const i=(0,l.NC)(u.vvY),v=i?"Create your own cover art":c.Ru.get("choose_photo"),y=i?(0,b.jsx)(s.S,{size:"xlarge","aria-hidden":"true"}):(0,b.jsx)(a.G,{size:"xlarge","aria-hidden":"true"});return(0,b.jsx)("div",{className:d,children:(0,b.jsx)("button",{"":"edit-image-button",className:r()(m,{[h]:t,[p]:e}),"aria-haspopup":"true",onClick:n,type:"button",children:(0,b.jsxs)("div",{className:r()(g,"icon"),children:[y,(0,b.jsx)(o.E,{variant:"bodyMedium",className:f,children:v})]})})})}},45917:(e,t,n)=>{"use strict";n.d(t,{kS:()=>be,LK:()=>ge});var i=n(79474),r=n(97500),s=n.n(r),a=n(49906),o=n(98764),l=n(23689),c=n(11283),u=n(11120),d=n(66569),m=n(91520),p=n(58073),h=n(61080),g=n(83856),f=n(14056);const b=[1,60,3600],v=[3600,60,1],y={seconds:NaN,humanString:"-:--"};function _(e){if(!isFinite(e))return y.humanString;let t=Math.round(e);return v.reduce(((e,n,i)=>{const r=0===e.length?1:2;if(t>=n||e.length>0||i===b.length-2){const i=Math.floor(t/n);t-=i*n,e.push(i.toString().padStart(r,"0"))}return e}),[]).join(":")}function E(e){let t=NaN;if("number"==typeof e)t=Math.round(e);else if("string"==typeof e){const n=e.split(":");n.length<=b.length&&(t=n.reverse().reduce(((e,t,n)=>e+=function(e){const t=parseInt(e,10);return t>=0?t:NaN}(t)*b[n]),0))}return isNaN(t)?y:{seconds:t,humanString:_(t)}}var x=n(95999),C=n(74841),S=n(765),A=n(51326),w=n(9440),I=n(74089);var T=n(28012),N=n(36471),R=n(7141),k=n(22269);const O="main-embedWidgetGenerator-container",P="main-embedWidgetGenerator-contentCode",j="main-embedWidgetGenerator-visible",L="main-embedWidgetGenerator-code",D="main-embedWidgetGenerator-timestampInput",U="main-embedWidgetGenerator-content",M="main-embedWidgetGenerator-contentHeader",B="main-embedWidgetGenerator-contentFooter",F="main-embedWidgetGenerator-contentIframe",H="main-embedWidgetGenerator-copyWrapper",V="main-embedWidgetGenerator-copyBtn",z="main-embedWidgetGenerator-darkControl",G="main-embedWidgetGenerator-widthField",W="main-embedWidgetGenerator-tooltipInitiator",K="main-embedWidgetGenerator-tooltip",Y="main-embedWidgetGenerator-transControl",q="main-embedWidgetGenerator-header",Q="main-embedWidgetGenerator-closeBtn",$="main-embedWidgetGenerator-theme",Z="main-embedWidgetGenerator-themeDescription",X="main-embedWidgetGenerator-themeRadio",J="main-embedWidgetGenerator-active",ee="main-embedWidgetGenerator-terms",te="main-embedWidgetGenerator-dimensionsContainer",ne="main-embedWidgetGenerator-dimensionLabel",ie="main-embedWidgetGenerator-dimensionField",re="main-embedWidgetGenerator-crossSep",se="main-embedWidgetGenerator-startAt",ae="main-embedWidgetGenerator-loadingIndicator";var oe=n(13274);const le=352,ce="100%",ue={frameBorder:0,allowFullScreen:!0,allow:["autoplay","clipboard-write","encrypted-media","fullscreen","picture-in-picture"].join("; "),loading:"lazy"};let de=function(e){return e[e.PODCAST_AUDIO=0]="PODCAST_AUDIO",e[e.PODCAST_VIDEO=1]="PODCAST_VIDEO",e[e.TRACK=2]="TRACK",e[e.PLAYLIST=3]="PLAYLIST",e[e.ARTIST=4]="ARTIST",e[e.ALBUM=5]="ALBUM",e}({});const me={disallow:{timestamp:!0,theme:!1,width:!1},defaults:{theme:"1",height:le,width:ce},theme:[["1",null],["0","#282828"]],height:[[le,"normal"],[152,"compact"]],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}},pe={[de.PODCAST_AUDIO]:{disallow:{timestamp:!1,theme:!1,width:!1},defaults:{theme:"1",height:le,width:ce},theme:[["1",null],["0","#282828"]],height:[[le,"normal"],[152,"compact"]],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}},[de.PODCAST_VIDEO]:{disallow:{timestamp:!1,theme:!1,width:!0},defaults:{theme:"1",height:351,width:624},theme:[["1",null],["0","#282828"]],height:[[351,"normal"],[279,"compact"]],constraints:{width:{min:400,max:700,minPercentage:40,maxPercentage:100}}},[de.TRACK]:me,[de.PLAYLIST]:me,[de.ARTIST]:me,[de.ALBUM]:me},he={disallow:{timestamp:!0,theme:!0,width:!0},defaults:{theme:"1",height:le,width:ce},theme:[],height:[],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}};const ge=e=>{switch(e){case w.c.SHOW:return f.Ru.get("ewg.title.show");case w.c.AUDIOBOOK:return f.Ru.get("ewg.title.audiobook");case w.c.EPISODE:return f.Ru.get("ewg.title.episode");case w.c.TRACK:return f.Ru.get("ewg.title.track");case w.c.ALBUM:return f.Ru.get("ewg.title.album");case w.c.ARTIST:return f.Ru.get("ewg.title.artist");case w.c.PLAYLISTV2:case w.c.PLAYLIST:return f.Ru.get("ewg.title.playlist");default:return f.Ru.get("ewg.title")}},fe=({uri:e,currentTrackUri:t,currentPosition:n,isOpen:r,entityType:b})=>{const v=(0,i.useMemo)((()=>(0,g.o_)(e)),[e]),y=t===e,_=ge(b),[x,ce]=(0,i.useState)(null),[me,fe]=(0,i.useState)(null),[be,ve]=(0,i.useState)(null),[ye,_e]=(0,i.useState)(null),[Ee,xe]=(0,i.useState)(!1),[Ce,Se]=(0,i.useState)(!1),[Ae,we]=(0,i.useState)(y?n??0:0),[Ie,Te]=(0,i.useState)(!0),[Ne,Re]=(0,i.useState)(!1),[ke,Oe]=(0,i.useState)(f.Ru.get("ewg.copy")),Pe=null!==x?pe[x]:he,je=(0,S.L)(),Le=(0,C.L)(e,"#FFF"),De=(0,N.W)(),Ue=(0,i.useRef)(null),Me=(0,i.useRef)(null),Be=(0,i.useContext)(T.wv),Fe=(0,i.useCallback)((()=>{Be({type:"close"})}),[Be]),He=()=>{if(!Me?.current)return;const e=Me.current.value;if(x){const[t,n]=function(e,t){const{width:n}=pe[e].constraints,i=parseInt(t.replace(/px|%$/,""),10);if(Number.isFinite(i)){if(-1!==t.indexOf("%")){const e=Math.max(n.minPercentage,Math.min(n.maxPercentage,Math.round(i)));return[`${e}%`,`${e}%`]}const e=Math.max(n.min,Math.min(n.max,Math.round(i)));return[`${e}px`,e.toString()]}return["100%","100%"]}(x,e);Me.current.value=t,_e(n)}},Ve=()=>{if(Ue?.current){const e=E(Ue.current.value);Ue.current.value=e.humanString,e.seconds!==Ae&&(Te(!0),we(e.seconds))}};(0,i.useEffect)((()=>{if(x===de.PODCAST_VIDEO&&be){const e=parseInt(be,10);_e(351===e?624..toString():496..toString())}}),[be,x]),(0,i.useEffect)((()=>{(async()=>{const t=v?.type;if(t===g.NQ.EPISODE){const t=await je.getEpisodeOrChapter(e);return t.type===w.c.EPISODE&&t.mediaTypes?.includes(A.Cx.Video)?ce(de.PODCAST_VIDEO):ce(de.PODCAST_AUDIO)}if(t===g.NQ.SHOW){const t=b===w.c.SHOW?await je.getContents(e,{offset:0,limit:1}):await je.getBookContents(e,{offset:0,limit:1,doRefreshSubscription:!1});if(t.items.length>0&&null!==t.items[0]){const e=await je.getEpisodeOrChapter(t.items[0].uri);return e.type===w.c.EPISODE&&e.mediaTypes?.includes(A.Cx.Video)?ce(de.PODCAST_VIDEO):ce(de.PODCAST_AUDIO)}}t===g.NQ.TRACK?ce(de.TRACK):t===g.NQ.ARTIST?ce(de.ARTIST):t===g.NQ.ALBUM?ce(de.ALBUM):ce(de.PLAYLIST)})()}),[b,je,e,v]),(0,i.useEffect)((()=>{ve(Pe.defaults.height.toString()),fe(Pe.defaults.theme),_e(Pe.defaults.width.toString())}),[Pe]);const ze=x===de.PODCAST_VIDEO,Ge=null!==x?function(e,t,n,i,r){const s=(0,g.o_)(e);if(!s)return null;const a=s.toURLPath(),o=new URL(`https://open.spotify.com/embed/${a}${r?"/video":""}`);return o.searchParams.set("utm_source","generator"),t&&"1"!==t&&o.searchParams.set("theme",t),n&&void 0!==i&&o.searchParams.set("t",i.toString()),o}(e,me,Ce,Ae,ze):null,We=Ge&&Pe!==he&&be&&ye?(0,oe.jsx)("iframe",{onLoad:()=>{Te(!1)},style:{borderRadius:"12px"},src:Ge?.toString(),width:ye,height:be,...ue},Ge?.toString()):null,Ke=We?(a.renderToStaticMarkup(We)||"").replace(/src=".*?"/,`src="${Ge?.toString()}"`):"";return(0,oe.jsxs)(k.A,{isOpen:r,contentLabel:_,children:[(0,oe.jsxs)("div",{className:s()(O),children:[(0,oe.jsxs)("div",{className:q,children:[(0,oe.jsx)(o.E,{as:"h1",variant:"titleSmall",children:_}),(0,oe.jsx)("button",{className:Q,onClick:()=>{Fe(),De({type:"click",intent:"close"})},children:(0,oe.jsx)(l.M,{size:"small","aria-label":f.Ru.get("close")})})]}),(0,oe.jsxs)("div",{className:U,children:[(0,oe.jsxs)("div",{className:M,children:[(0,oe.jsxs)("div",{className:$,style:{visibility:Pe.disallow.theme?"hidden":"visible"},children:[(0,oe.jsxs)("p",{className:Z,children:[f.Ru.get("ewg.color"),":"]}),Pe.theme.map((([e,t])=>{return(0,oe.jsx)("button",{style:{backgroundColor:null===t?Le:t},className:s()(X,{[J]:me===e}),onClick:(n=e,()=>{me!==n&&(Te(!0),fe(n))})},e);var n}))]}),(0,oe.jsxs)("div",{className:te,children:[(0,oe.jsxs)("div",{className:ne,children:[f.Ru.get("ewg.size"),":"]}),(0,oe.jsxs)("div",{className:ie,children:[be&&(0,oe.jsx)(R.C,{id:"ewg-height",value:be,onSelect:ve,children:Pe.height.map((([e,t])=>(0,oe.jsxs)("option",{value:e,children:["normal"===t?f.Ru.get("ewg.size.normal"):f.Ru.get("ewg.size.compact")," ","(",e,"px)"]},e)))}),Pe.disallow.width?null:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("span",{className:re,children:"×"}),(0,oe.jsxs)("div",{className:G,children:[(0,oe.jsx)("input",{className:z,type:"text",ref:Me,defaultValue:Pe.defaults.width,onKeyUp:e=>{"Enter"===e.key&&He()},onBlur:He}),(0,oe.jsx)(c.H,{"aria-label":f.Ru.get("ewg.help"),"aria-describedby":"ewg-help-text",size:"small",iconOnly:u.N,className:W,onMouseOver:()=>xe(!0),onMouseLeave:()=>xe(!1)}),(0,oe.jsx)("div",{onFocus:()=>xe(!0),onMouseOver:()=>xe(!0),onMouseLeave:()=>xe(!1),className:s()(K,{[j]:Ee}),children:(0,oe.jsx)(d.m,{id:"ewg-help-text",children:f.Ru.get("ewg.help-text")})})]})]})]})]})]}),(0,oe.jsxs)("div",{className:F,style:{height:le,maxHeight:"calc(100vh - 402px)"},children:[Ie&&(0,oe.jsx)("div",{className:ae,children:(0,oe.jsx)(m.I,{})}),We]}),(0,oe.jsx)("small",{className:ee,dangerouslySetInnerHTML:{__html:f.Ru.get("ewg.terms",{devTerms:"https://developer.spotify.com/terms/",platfRules:"https://www.spotify.com/platform-rules/"})}}),(0,oe.jsxs)("div",{className:B,children:[(0,oe.jsxs)("div",{className:se,style:{visibility:Pe.disallow.timestamp?"hidden":"visible"},children:[(0,oe.jsx)(p.c,{className:z,checked:Ce,type:"checkbox",id:"ewg-timestamp",onChange:e=>{const t=e.currentTarget.checked;Ce!==t&&(Te(!0),Se(t),De({type:"click",intent:"toggle",itemIdSuffix:`timestamp/${t}`}))},"":"timestamp-checkbox"}),(0,oe.jsx)("label",{htmlFor:"ewg-timestamp",children:f.Ru.get("ewg.start-at")}),(0,oe.jsx)("input",{className:s()(Y,D),disabled:!Ce,type:"text",defaultValue:E(Math.floor(Ae/1e3).toString()).humanString,ref:Ue,onBlur:Ve,onKeyUp:e=>{"Enter"===e.key&&Ve()}})]}),(0,oe.jsxs)("div",{className:H,children:[(0,oe.jsx)(p.c,{className:z,checked:Ne,type:"checkbox",id:"ewg-showcode",onChange:e=>{const t=e.currentTarget.checked;Re(t),De({type:"click",intent:"show-more",itemIdSuffix:`showcode/${t}`})}}),(0,oe.jsx)("label",{htmlFor:"ewg-showcode",children:f.Ru.get("ewg.showcode")}),(0,oe.jsx)(h.$,{className:V,size:"small",onClick:()=>{(0,I.l)(Ke),De({type:"click",intent:"copy"}),Oe(f.Ru.get("ewg.copied")),setTimeout((()=>Oe(f.Ru.get("ewg.copy"))),5e3)},children:ke})]})]})]})]}),(0,oe.jsx)("section",{className:s()(P,{[j]:Ne}),children:(0,oe.jsx)("pre",{className:L,"":"iframe-code",children:Ke})})]})},be=()=>{const e=(0,i.useContext)(T.Fx);return e.uri?(0,oe.jsx)(x.pZ,{value:"embed-widget-generator",children:(0,oe.jsx)(fe,{...e})}):null}},28012:(e,t,n)=>{"use strict";n.d(t,{Fx:()=>o,id:()=>c,wv:()=>a});var i=n(79474),r=n(13274);const s={isOpen:!1,uri:""},a=(0,i.createContext)(void 0),o=(0,i.createContext)(s);function l(e,t){switch(t.type){case"open":return{...e,uri:t.uri,currentTrackUri:t.currentTrackUri,currentPosition:t.currentPosition,entityType:t.entityType,isOpen:!0};case"close":return{...s,isOpen:!1};default:throw new Error("Unknown action received!")}}const c=({children:e})=>{const[t,n]=(0,i.useReducer)(l,s);return(0,r.jsx)(a.Provider,{value:n,children:(0,r.jsx)(o.Provider,{value:t,children:e})})}},90495:(e,t,n)=>{"use strict";n.d(t,{p:()=>A});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(61080),l=n(48145);const c="(min-width: 0px)",u="(min-width: 0px) and (max-width: 767px)",d="(min-width: 768px)",m="(min-width: 768px) and (max-width: 1023px)",p="(min-width: 1024px)",h="(min-width: 1024px) and (max-width: 1279px)",g="(min-width: 1280px)",f="(min-width: 1280px) and (max-width: 1919px)",b="(min-width: 1920px)";var v=n(52995);const y="FvfvGU3jvHRskUU9v9_8",_="Q9AlbZn2EGzy3MTWXa8X",E="mxmxS0y8LiwSs5nueKPT",x="GXxVAveNFStY3pBI_NO4",C="eHcXC2s97InYP7rMNT0H";var S=n(13274);const A=(0,i.memo)((function(e){const{children:t,message:n,title:i,linkTitle:r,linkTo:A,onClick:w,renderInline:I=!1}=e,{isXSOnly:T,isSMOnly:N}={isXS:(0,l.U)(c),isXSOnly:(0,l.U)(u),isSM:(0,l.U)(d),isSMOnly:(0,l.U)(m),isMD:(0,l.U)(p),isMDOnly:(0,l.U)(h),isLG:(0,l.U)(g),isLGOnly:(0,l.U)(f),isXL:(0,l.U)(b)},R=T||N;return(0,S.jsxs)("section",{className:s()(y,{[_]:I}),children:[t,(0,S.jsx)(a.E,{as:"h1",variant:R?"titleSmall":"titleMedium",className:x,children:i}),(0,S.jsx)(a.E,{variant:R?"bodySmall":"bodyMedium",className:C,children:n}),r&&(A||w)&&(0,S.jsx)(o.$,{colorSet:"invertedLight",className:E,href:A,onClick:w,component:v.v,children:r})]})}))},5745:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(79474),r=n(52503),s=n(13274);const a=(0,i.memo)((function({children:e}){return(0,s.jsx)("span",{className:r.A.detailsText,children:e})}))},29117:(e,t,n)=>{"use strict";n.d(t,{z:()=>f,K:()=>g});var i=n(79474),r=n(97500),s=n.n(r),a=n(41615),o=n(82729),l=n(7452);const c={small:"(max-width: 1023px)",medium:"(max-width: 1279px)",large:"(max-width: 1599px)",xlarge:"(min-width: 1600px)"},u=()=>Object.keys(c).find((e=>window.matchMedia(c[e]).matches));var d=n(97247),m=n(47929),p=n(52503),h=n(13274);let g=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.SMALL=1]="SMALL",e[e.LARGE=2]="LARGE",e[e.XLARGE=3]="XLARGE",e}({});const f=({children:e,backgroundColor:t,backgroundImages:n,size:r=g.DEFAULT})=>{const c=(0,i.useRef)(null),f=(0,d.y)(),b=(0,i.useRef)(null),{imageUrl:v}=function(e,t){const[n,r]=(0,i.useState)({imageUrl:""}),[s,a]=(0,i.useState)(u());return(0,o.s)((()=>{a(u())})),(0,i.useLayoutEffect)((()=>{const n=t?.current?t.current.clientWidth:null;if(e&&e.length){const t=(0,l.h)(e,{desiredSize:n??void 0});r({imageUrl:t??""})}else r({imageUrl:""})}),[t,e,s]),n}(n,c),y=(0,i.useCallback)((e=>{const t=e.target,n=t.scrollTop/t.offsetHeight;n>parseInt(p.A.BACKGROUND_HEIGHT_PERCENTAGE,10)/100||requestAnimationFrame((()=>{b.current?.style.setProperty("--scroll",n.toString())}))}),[]);return(0,m.g)(y,{disabled:!v||navigator.hardwareConcurrency<=4}),(0,h.jsxs)("div",{ref:c,className:s()("contentSpacing",p.A.container,{[p.A.nonWrapped]:!v,[p.A.withBackgroundImage]:v,[p.A.smallHeader]:r===g.SMALL,[p.A.largeHeader]:r===g.LARGE,[p.A.xlargeHeader]:r===g.XLARGE}),children:[!v&&(0,h.jsx)("div",{className:p.A.backgroundColor,style:{backgroundColor:t}}),!v&&(0,h.jsx)("div",{className:s()(p.A.backgroundColor,p.A.overlay)}),v&&(0,a.createPortal)((0,h.jsxs)("div",{ref:b,children:[(0,h.jsx)("div",{"":"background-image",className:s()(p.A.background,p.A.gradient),style:{backgroundImage:`url(${v})`}}),(0,h.jsx)("div",{className:s()(p.A.background,p.A.overlay),style:{"--bgColor":t}})]}),document.querySelector(".under-main-view")),(0,h.jsx)(d.o.Provider,{value:f,children:e})]})}},42976:(e,t,n)=>{"use strict";n.d(t,{K:()=>u});var i=n(79474),r=n(97500),s=n.n(r),a=n(2092),o=n(40292),l=n(52503),c=n(13274);const u=(0,i.memo)((function({dragUri:e,dragMimeType:t,onContextMenu:n,onTouchStart:i,onTouchEnd:r,onClick:u,ariaLabel:d,...m}){const{draggable:p,onDragStart:h}=(0,a.P)({itemUris:e?[e]:[],itemMimeTypes:t?[t]:[],dragLabelText:m.name}),g={className:s()(l.A.imageContainer,l.A.imageContainerNew,{[l.A.imageContainerClickable]:!!u}),draggable:p&&!!e,onDragStart:h,onContextMenu:n,onTouchStart:i,onTouchEnd:r,children:(0,c.jsx)(o.b,{...m})};return u?(0,c.jsx)("button",{...g,"aria-label":d,onClick:u}):(0,c.jsx)("div",{...g})}))},61623:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var i=n(97500),r=n.n(i),s=n(52503),a=n(13274);const o=({children:e})=>(0,a.jsx)("div",{className:r()(s.A.imageContainer,s.A.imageContainerNew),children:e})},65594:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,e:()=>l});var i=n(14056),r=n(85212),s=n(13274);const a="entityHeaderAdd",o={placement:r.D.bottomLeft,zIndex:1,getTitle:({triggerAction:e})=>((e||{}).type,i.Ru.get("action-trigger.save-library")),getDescription:({triggerAction:e})=>((e||{}).type,i.Ru.get("action-trigger.logged-out-continue"))},l=({children:e})=>(0,s.jsx)(r.y,{id:a,options:o,"":"login-trigger",children:e})},6950:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var i=n(79474),r=n(52503),s=n(13274);const a=(0,i.memo)((function({children:e}){return(0,s.jsx)("div",{className:r.A.headerText,children:e})}))},27699:(e,t,n)=>{"use strict";n.d(t,{h:()=>d});var i=n(79474),r=n(97500),s=n.n(r),a=n(59313),o=n(42360),l=n(86082),c=n(52503),u=n(13274);const d=(0,i.forwardRef)((({children:e},t)=>{const n=(0,o.v7)(),{ref:r,inView:d}=(0,a.Wx)({initialInView:!0,rootMargin:"0px 100%",root:n.current}),m=s()(c.A.topbarContent,{[c.A.topbarContentFadeIn]:!d}),p=(0,i.useCallback)((e=>{r(e),t&&("function"==typeof t?t(e):t.current=e)}),[r,t]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{ref:p}),(0,u.jsx)(l.g,{className:m,children:e})]})}))},39517:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var i=n(98764),r=n(2092),s=n(52503),a=n(13274);const o=({text:e,dragUri:t,dragLabel:n})=>{const{draggable:o,onDragStart:l}=(0,r.P)({itemUris:t?[t]:[],dragLabelText:n});return(0,a.jsx)(i.E,{as:"span",variant:"titleSmall",className:s.A.topbarTitle,draggable:o&&!(!t||!n),onDragStart:l,children:e})}},40292:(e,t,n)=>{"use strict";n.d(t,{b:()=>h,u:()=>p});var i=n(79474),r=n(97500),s=n.n(r),a=n(2092),o=n(63),l=n(72423),c=n(8955),u=n(52503),d=n(13274);const m=({type:e,className:t})=>(0,d.jsx)("div",{className:s()(u.A.image,u.A.imagePlaceholder,t),children:(0,d.jsx)(c.s,{type:e})});let p=function(e){return e[e.ROUNDED_CORNERS=0]="ROUNDED_CORNERS",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e[e.WITH_WAVES=3]="WITH_WAVES",e}({});const h=i.memo(i.forwardRef((function({name:e,images:t,placeholderType:n,renderImage:i,className:r,shape:c=p.SQUARE,loading:h="lazy",dragUri:g,onContextMenu:f},b){const[v,y,_]=(0,o.P)(t),{draggable:E,onDragStart:x}=(0,a.P)({itemUris:g?[g]:[],dragLabelText:e});return(0,d.jsx)("div",{ref:b,onContextMenu:f,className:s()(u.A.image,r,{[u.A.wavesBackground]:c===p.WITH_WAVES}),draggable:E&&!(!g||!e),onDragStart:x,children:i?(0,d.jsx)("div",{className:s()(u.A.image,u.A.shadow,{[u.A.roundedCorners]:c===p.ROUNDED_CORNERS,[u.A.circle]:c===p.CIRCLE}),children:i()}):(0,d.jsx)(l._,{loading:h,src:v,alt:e,className:s()(u.A.image,u.A.shadow,{[u.A.roundedCorners]:c===p.ROUNDED_CORNERS,[u.A.circle]:c===p.CIRCLE}),srcSet:y||void 0,sizes:_,children:(0,d.jsx)(m,{type:n,className:s()(u.A.image,u.A.shadow,{[u.A.roundedCorners]:c===p.ROUNDED_CORNERS,[u.A.circle]:c===p.CIRCLE})})})})})))},96343:(e,t,n)=>{"use strict";n.d(t,{t:()=>K});var i=n(79474),r=n(97500),s=n.n(r),a=n(99754),o=n(98764),l=n(83856),c=n(14056),u=n(88713),d=n(66118),m=n(62180);const p=36e5,h=864e5;var g=n(72345);const f="poz9gZKE7xqFwgk231J4";function b(e,t){return e-e%t}var v=n(13274);const y=({durationMs:e,className:t})=>{const n=e>h;let i;var r;i=n?h:b(r=e,r>36e6?p:r>18e6?18e5:r>36e5?9e5:r>18e5?3e5:6e4);const{hours:a,minutes:o}=(0,m.S)(i);if(0===a&&0===o)return null;let l=(0,g.j)({h:a,m:o,s:0});return l=n?c.Ru.get("time.over",l):c.Ru.get("time.estimated",l),(0,v.jsx)("span",{className:s()(f,t),children:l})};var _=n(7452),E=n(90700),x=n(15552),C=n(85786),S=n(22215),A=n(37128),w=n(88291),I=n(64420),T=n(19498),N=n(11867),R=n(97247),k=n(59416),O=n(98496),P=n(30957),j=n(52503);function L(e){return e.displayName||e.name||""}const D=e=>{let t=null;return(0,l.ec)(e)&&(t=(0,v.jsx)(k.t,{uri:e})),(0,l.AP)(e)&&(t=(0,v.jsx)(O.B,{uri:e})),t},U=({creator:e,onClick:t,position:n=0})=>{const r=(0,i.useCallback)((i=>{t?.(i,{position:n,creator:e})}),[e,t,n]);return(0,I.s)(e)?(0,v.jsx)(w.h,{menu:D(e.uri),children:(0,v.jsx)(o.E,{variant:"bodySmallBold",children:(0,v.jsx)(P.Link,{"":"creator-link",to:e.uri,onClick:r,children:L(e)})})}):(0,v.jsx)(o.E,{variant:"bodySmall",children:L(e)})},M=({creator:e,onClick:t,isSmallIcon:n})=>{const[i,r]=c.Ru.get("playlist.header.made-for","USER").split("USER");return(0,v.jsxs)("div",{className:s()(j.A.metaDataText,j.A.creatorWrapper,{[j.A.smallMadeForIcon]:n}),children:[(0,v.jsx)(C.D,{semanticColor:"textBrightAccent"}),(0,v.jsx)(o.E,{variant:"bodySmall",children:i}),(0,v.jsx)(U,{creator:e,onClick:t}),r&&(0,v.jsx)(o.E,{variant:"bodySmall",children:r})]})},B=({creator:e,onClick:t,isSmallIcon:n})=>(0,v.jsxs)("div",{className:s()(j.A.metaDataText,j.A.creatorWrapper),children:[e.images.length>0&&(0,v.jsx)(A.e,{label:L(e),images:e.images.map((e=>({url:e.url,width:e.width||null,height:e.height||null}))),width:n?20:24,userIconSize:n?"xsmall":"small"}),(0,v.jsx)(U,{creator:e,onClick:t})]}),F=({creators:e,onPiledCreatorsClick:t,isSmallIcon:n})=>{const i=(0,v.jsx)("div",{className:j.A.piled,children:e.slice(0,3).map(((e,t)=>(0,v.jsx)(A.e,{label:L(e),images:e.images.map((e=>({url:e.url,width:e.width||null,height:e.height||null}))),width:n?20:24,userIconSize:n?"xsmall":"small",piled:t>0},e.uri)))});let r=c.Ru.get("playlist.header.creator-and-others",L(e[0]),e.length-1);return 2===e.length&&(r=c.Ru.get("playlist.header.creator-and-co-creator",L(e[0]),L(e[1]))),t?(0,v.jsxs)("button",{className:s()(j.A.metaDataText,j.A.creatorWrapper,j.A.creatorButton),onClick:t,children:[i,r]}):(0,v.jsxs)("div",{className:s()(j.A.metaDataText,j.A.creatorWrapper),children:[i,r]})},H=({creators:e,onCreatorClick:t})=>(0,v.jsx)(v.Fragment,{children:e.map(((e,n)=>(0,v.jsxs)(i.Fragment,{children:[0!==n&&(0,v.jsx)("span",{className:j.A.divider}),(0,v.jsx)(U,{creator:e,onClick:t,position:n})]},e.id)))}),V=({creators:e,onPiledCreatorsClick:t,onCreatorClick:n})=>{const i=(0,S.NC)(T.G6N),r=(0,R.y)(),s=r===(N.E.SMALL||r===N.E.XSMALL);if(1===e.length){const[t]=e;return t.isMadeFor?(0,v.jsx)(M,{creator:t,onClick:n,isSmallIcon:s}):(0,v.jsx)(B,{creator:t,onClick:n,isSmallIcon:s})}return e.length>0&&e.every((e=>(0,l.AP)(e.uri)))&&i?(0,v.jsx)(F,{creators:e,onPiledCreatorsClick:t,isSmallIcon:s}):(0,v.jsx)(H,{creators:e,onCreatorClick:n})};var z=n(31350);function G(e,t,n,i,r,s){if(0===e)return null;let a;return a=!t||n||i?!n||i||t?!i||t||n?c.Ru.get("tracklist-header.items-counter",e):c.Ru.get("tracklist-header.audiobooks-counter",e):c.Ru.get("tracklist-header.episodes-counter",e):c.Ru.get("tracklist-header.songs-counter",e),(0,v.jsxs)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:[a,r>0?c.Ru.getSeparator():null,s?(0,v.jsx)(y,{durationMs:r}):(0,v.jsx)(d.d,{durationMs:r})]})}const W=function({to:e,children:t,onClick:n=(()=>{})}){const r=(0,i.useCallback)((t=>{n(t,e)}),[n,e]);return(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:e?(0,v.jsx)(P.Link,{to:e,onClick:r,children:t}):t})},K=e=>{const{author:t,creators:n,onPiledCreatorsClick:r,onCreatorClick:d,releaseDate:m,releaseDatePrecision:p,totalItems:h=0,totalFollowers:g=0,onTotalFollowersClick:f,totalFollowing:b=0,onTotalFollowingClick:y,totalLikes:C=0,publicPlaylists:S=0,privatePlaylists:A=0,newEntries:w=0,durationMilliseconds:I=0,isEstimatedDuration:T=!1,daylistNextUpdate:N,userUri:R,albumType:k,isTrack:O,album:L,timeZone:D,hasTracks:U=!1,hasEpisodes:M=!1,hasAudiobooks:B=!1,theyFollowUs:F=!1,playcount:H,isPreRelease:K}=e,Y=(0,a.d4)(z.Ht),q=Y.overrides?.locale||c.Ru.getLocaleForTranslation(),Q=void 0!==m&&(0,x.ad)(m).getTime()>(new Date).getTime();return(0,v.jsxs)("div",{className:j.A.metaData,children:[t&&(0,v.jsx)(o.E,{className:j.A.metaDataAuthor,variant:K?"bodySmallBold":"titleSmall","":"entityAuthor",children:t}),n&&(0,v.jsx)(i.Suspense,{fallback:null,children:(0,v.jsx)(V,{creators:n,onPiledCreatorsClick:r,onCreatorClick:d})}),k&&(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:k}),S>0&&(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:c.Ru.get("user.public-playlists",S)}),A>0&&(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:c.Ru.get("user.private-playlists",A)}),L&&(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:(0,v.jsx)(P.Link,{to:L.uri,children:L.name})}),m&&(0,v.jsx)(u.Zp,{label:(0,x.rh)((0,x.ad)(m),q,{month:"long",day:"numeric",year:"numeric"},p),disabled:Q,children:(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:Q?c.Ru.get("web-player.prerelease.releases_on",{date:c.Ru.formatDate((0,x.ad)(m),(0,x.s7)({month:"long",day:"numeric",year:"numeric",timeZone:D},p))}):(0,x.ad)(m).getUTCFullYear()})}),C>0&&(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:c.Ru.get("likes",C)}),g>0&&(0,v.jsx)(W,{to:R?(0,l.Qj)((0,E.v)(R),["followers"]).toURI():null,onClick:f,children:c.Ru.get("user.followers",g)}),b>0&&(0,v.jsx)(W,{to:R?(0,l.Qj)((0,E.v)(R),["following"]).toURI():null,onClick:y,children:c.Ru.get("user.following",b)}),F&&(0,v.jsx)(o.E,{variant:"bodySmall",semanticColor:"textSubdued",className:s()(j.A.metaDataText,j.A.theyFollowUs),children:c.Ru.get("user.they_follow_us")}),G(h,U,M,B,I,T),N&&(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:c.Ru.get("web-player.playlist.daylist.next-update",c.Ru.formatDate((0,x.ad)(N),{timeStyle:"short"}))}),O&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,children:(0,_.f)(I)}),H&&H>0?(0,v.jsx)(o.E,{variant:"bodySmall",className:j.A.metaDataText,"":"playcount",children:c.Ru.formatNumber(H)}):null]}),w>0&&(0,v.jsx)(o.E,{variant:"bodySmall",className:s()(j.A.metaDataText,j.A.newEntriesIndicator),children:c.Ru.get("chart.new-entries",w)})]})}},36919:(e,t,n)=>{"use strict";n.d(t,{B:()=>a});var i=n(98764),r=n(52503),s=n(13274);const a=({children:e})=>(0,s.jsx)(i.E,{variant:"bodySmall",className:r.A.pretitle,children:e})},19038:(e,t,n)=>{"use strict";n.d(t,{g:()=>o});var i=n(98764),r=n(11867),s=n(97247),a=n(13274);const o=({children:e,className:t})=>{const n=(0,s.y)()===r.E.SMALL?"bodyMediumBold":"titleSmall";return(0,a.jsx)(i.E,{variant:n,"":"entityAuthor",className:t,children:e})}},46545:(e,t,n)=>{"use strict";n.d(t,{mm:()=>C,Cl:()=>x,tw:()=>E});var i=n(79474),r=n(97500),s=n.n(r),a=n(20176),o=n(98678),l=n(98764),c=n(74938),u=n(13274);const d=(0,i.memo)((function(e){const{children:t,scale:n,variant:r="headlineLarge",...s}=e,a=(0,i.useRef)(null),[d,m]=(0,i.useState)(!1),p=(0,o.YQ)((()=>{a.current&&(()=>{if(!a.current)return;m(!1);let e=!1;for(let t=0;t<n.fontSizes.length;t++){const i=n.fontSizes[t];a.current.style.fontSize=i,a.current.style.whiteSpace="normal";const r=a.current.getBoundingClientRect().height;a.current.style.whiteSpace="nowrap";const s=a.current.getBoundingClientRect().height;if(e=t===n.fontSizes.length-1,r===s)break}a.current.style.whiteSpace=e?"normal":"nowrap",m(!0)})()}),200,{leading:!0,maxWait:200});return(0,c.w)({refOrElement:a,onResize:p}),(0,i.useLayoutEffect)((()=>{p()}),[p,n]),(0,u.jsx)(l.E,{as:"h1",ref:a,style:{visibility:d?"visible":"hidden",width:"100%"},variant:r,semanticColor:"textBase",dir:"auto",...s,children:t})}));var m=n(2092),p=n(11867),h=n(97247),g=n(52503);const f=a.H0.fontSize,b=a.A7.fontSize,v=a.nk.fontSize,y=a.et.fontSize,_={fontSizes:[b,"4.5rem","3rem",f]},E={fontSizes:[f,y]},x={fontSizes:[v,f]},C=(0,i.memo)((function(e){const{ariaLabel:t,children:n,className:i,canEdit:r,onClick:a,editTitle:o,onContextMenu:l,onTouchStart:c,onTouchEnd:f,dragUri:b="",dragMimeType:v,dragLabel:y,scaleAtMinWidth:E=_}=e,{draggable:x,onDragStart:C}=(0,m.P)({itemUris:[b],itemMimeTypes:v?[v]:[],dragLabelText:y}),S=(0,h.y)()===p.E.SMALL?E:_;return(0,u.jsx)("span",{dir:"auto",className:s()(i,g.A.title),onContextMenu:l,onTouchStart:c,onTouchEnd:f,draggable:x&&!(!b||!y),onDragStart:C,"":"entityTitle",children:r?(0,u.jsx)("button",{"aria-label":t,className:s()(g.A.titleButton),onClick:a,title:o,children:(0,u.jsx)("span",{className:g.A.titleInner,children:(0,u.jsx)(d,{scale:S,children:n})})}):(0,u.jsx)(d,{scale:S,children:n})})}))},31825:(e,t,n)=>{"use strict";n.d(t,{R:()=>me});var i=n(79474),r=n(97500),s=n.n(r),a=n(83648),o=n(60096),l=n(98196),c=n(98764),u=n(95231),d=n(83856),m=n(14056),p=n(12269),h=n(263),g=n(36457);var f=n(61681),b=n(94009),v=n(11867),y=n(9440),_=n(83278),E=n(75024),x=n(36300),C=n(82924),S=n(38037),A=n(63492),w=n(9789),I=n(83925),T=n(65325),N=n(47498),R=n(16265),k=n(35789),O=n(11437),P=n(77564),j=n(67302),L=n(48327),D=n(73274),U=n(13274);const M={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},B=i.memo((function({episodeUri:e,showUri:t,sharingInfo:n,canDownload:r,requestId:a,onMarkAsPlayed:o,onMoreButtonClick:l,name:c,fullyPlayed:u,index:d}){const p=(0,O.T)(e),{spec:h,logger:g}=(0,j.r)(x.d,{data:{uri:e,reason:a||"",position:d}}),f=(0,R.v)(e),b=(0,i.useMemo)((()=>(0,U.jsx)(L.g,{size:"medium",uri:e})),[e]),v=(0,i.useMemo)((()=>(0,U.jsx)(S.e,{uri:e,size:S.M.sm,className:s()({[D.A.visibleAction]:(0,k.X)(p)}),onClick:(t,n)=>{n===P.NV.ADD?g.logInteraction(h.downloadButtonFactory().hitDownload({itemToDownload:e})):P.NV.REMOVE&&g.logInteraction(h.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},canDownload:r})),[e,p,h,g,r]),y=(0,i.useMemo)((()=>(0,U.jsx)(I.w,{uri:e,sharingInfo:n,interactionData:M,onClick:()=>{g.logInteraction(h.copyLinkFactory().hitShare({entityToBeShared:e,shareId:n?.shareId||""}))}})),[e,n,h,g]),_=(0,i.useMemo)((()=>(0,U.jsx)(w.b,{uri:e,size:C.t.sm,className:D.A.visibleAction,onClick:t=>{t?g.logInteraction(h.saveToLibraryButtonFactory().hitLike({itemToBeLiked:e})):g.logInteraction(h.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:e}))}})),[e,h,g]),E=(0,i.useMemo)((()=>(0,U.jsx)(T.b,{menu:(0,U.jsx)(N.b,{uri:e,showUri:t,isPlayed:u,onMarkAsPlayed:o}),children:(0,U.jsx)(A.e,{size:A.M.sm,label:m.Ru.get("more.label.context",c),onClick:l})})),[e,u,c,o,l,t]);return(0,U.jsxs)(U.Fragment,{children:[y,v,f?b:_,E]})}));var F=n(66768),H=n(15704);const V="TT1tIewS2iI8Uz8kLuQB",z="Mn93NeoqnZzVnPIP83_9",G="show-episodeBlock-title",W="show-episodeBlock-titleLink",K="show-episodeBlock-actions",Y="show-episodeBlock-titleContainer",q="q80ZFqNlDZCC7OTfUPj8",Q="show-episodeBlock-metadata",$="YhOAZFuFU1oI_YQSof4z",Z="DKIjGP8CcZyjr2O2HNST",X="A7qeQBIk3sqr7bYadWA8",J="_IJaGA3ZdVU0NiTxbGsI",ee="show-episodeBlock-imageContainer",te="show-episodeBlock-showImage",ne="show-episodeBlock-description",ie="hFCGY5gjCjN10WzV2VQ4",re="gk0rZwqBxJjSeiWV5lgV",se="te8hrsPnSvx9SUkzV0ME",ae="show-episodeBlock-header",oe="acjrpluRnLumVxPt2QG9",le="show-episodeBlock-descriptionContainer",ce="DyuLxip2Kl8P7H8fW62u",ue="vak8N953oXaq9F7jZDsD",de="WBxE9PQe96PpkE9RuTo5",me=i.memo(i.forwardRef((function({uri:e,name:t,showName:n,showUri:r,size:x,description:C,durationMs:S,images:A,badges:w,fullyPlayed:I,releaseDate:T,resumePositionMs:N,isCurrentlyPlaying:R,isPlaying:k,onContextMenu:O,onTouchStart:P,onTouchEnd:j,handlePlaybackClick:L,handleDragStart:D,handleClick:M,position:me,index:pe,isPlayable:he,isPaywalled:ge,isUserSubscribed:fe,episodeSharingInfo:be,playButtonWrapper:ve=null,highlightText:ye=(e=>e),onMarkAsPlayed:_e,contentInformation:Ee,requestId:xe,onMoreButtonClick:Ce,status:Se,variant:Ae="default",mediaTypes:we},Ie){const Te=(0,a.Zp)(),Ne=R&&k,Re=(0,d.o_)(e).toURLPath(!0),ke=(0,d.o_)(r)?.toURLPath(!0),Oe=function({episodeUri:e}){const[t,n]=(0,i.useState)([]),r=(0,g.o)();return(0,i.useEffect)((()=>{let t=!0;return async function(){const i=await r.getArtists(e);t&&n(i)}(),()=>{t=!1}}),[e,r]),t}({episodeUri:e}),Pe=(0,p.hD)(e,T,N,I),je=we?.includes(_.C.Video)??!1,Le=(0,i.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),Te(Re),M&&M(e)}),[Te,Re,M]),De=(0,i.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),ke&&Te(ke)}),[ke,Te]),Ue=ge&&!fe,Me=(0,i.useCallback)((e=>{e.stopPropagation(),Ue||L(e)}),[L,Ue]),Be=Ue||he,Fe=m.Ru.get("tracklist.a11y.play",t,n),He=m.Ru.get("tracklist.a11y.pause",t,n),Ve=(0,U.jsx)(h.R,{size:"small",version:"next-best-episode"===Ae?h.H.primary:h.H.secondary,onClick:Me,isPlaying:Ne,disabled:!Be,locked:Ue,ariaPlayLabel:Fe,ariaPauseLabel:He}),ze=ve?ve(Ve):Ve;return(0,U.jsxs)("div",{ref:Ie,className:s()(V,{[z]:R,[re]:x===v.E.MEDIUM,[se]:x===v.E.LARGE,[J]:x===v.E.XSMALL,[de]:"next-best-episode"===Ae}),"":`episode-${pe}`,draggable:!!D,onDragStart:D,onClick:Le,onContextMenu:O,onTouchStart:P,onTouchEnd:j,children:[Se&&(0,U.jsx)(c.E,{className:oe,paddingBottom:l.vw,children:Se}),Ee&&(0,U.jsx)(F.g,{className:ue,cardHeaderText:Ee.cardHeaderText,buttonText:Ee.buttonText,buttonTarget:Ee.buttonTarget}),"default"===Ae&&(0,U.jsx)("div",{className:ee,children:(0,U.jsx)(f.b,{className:te,type:y.c.EPISODE,size:(e=>{switch(e){case v.E.LARGE:return b.Qe.SIZE_112;case v.E.MEDIUM:return b.Qe.SIZE_64;default:return b.Qe.SIZE_48}})(x),title:t,shape:f.u.ROUNDED_CORNERS,images:A})}),(0,U.jsxs)("div",{className:ae,children:[(0,U.jsxs)("div",{className:Y,children:[(0,U.jsx)(o.N_,{className:W,to:Re,onClick:Le,children:(0,U.jsxs)(c.E,{as:"div",variant:"bodyMediumBold",className:G,"":"episodeTitle",children:[Pe&&(0,U.jsx)(p.Tc,{}),ye(t)]})}),Oe.length>0&&(0,U.jsxs)("div",{className:$,children:[(0,U.jsx)(u.e,{size:"small",className:X}),(0,U.jsx)(c.E,{as:"p",variant:"bodySmall",className:Z,children:ye(Oe.join(m.Ru.getSeparator()))})]})]}),(0,U.jsxs)("div",{className:q,children:[je&&(0,U.jsx)(c.E,{variant:"bodySmall",semanticColor:"textSubdued",children:(0,U.jsx)(H.T,{})}),n&&ke&&(0,U.jsx)(o.N_,{className:W,to:ke,onClick:De,children:(0,U.jsx)(c.E,{variant:"bodySmall",semanticColor:"textSubdued",children:ye(n)})})]})]}),(0,U.jsx)("div",{className:le,children:(0,U.jsx)(c.E,{as:"p",variant:"bodySmall",className:ne,children:ye(C??"")})}),(0,U.jsxs)("div",{className:Q,children:[(0,U.jsx)("div",{className:ie,children:w}),(0,U.jsx)(E.j,{isPlaying:Ne,fullyPlayed:I,durationMs:S,releaseDate:T,resumePositionMs:N,position:R?me:void 0})]}),(0,U.jsx)("div",{onClick:e=>{e.stopPropagation()},className:K,children:(0,U.jsx)(B,{episodeUri:e,showUri:r??"",sharingInfo:be,canDownload:!ge||ge&&fe,requestId:xe,index:pe,name:t,fullyPlayed:I,onMarkAsPlayed:_e,onMoreButtonClick:Ce})}),(0,U.jsx)("div",{className:ce,children:ze})]})})))},66768:(e,t,n)=>{"use strict";n.d(t,{g:()=>b});var i=n(79474),r=n(97500),s=n.n(r),a=n(25766),o=n(98764),l=n(61080),c=n(22215),u=n(83856),d=n(19498),m=n(52995);const p="rFwxt8s8DYY8p1O7tYZW",h="sA2HogGQNi8R_zpCWei5",g="H92pPTuqDR5DcoTtjcb3";var f=n(13274);const b=({cardHeaderText:e,buttonText:t,buttonTarget:n,className:r})=>{const b=(0,c.NC)(d._Nj),v=(0,i.useCallback)((e=>{e.stopPropagation()}),[]),y=(0,u.o_)(n).toURLPath(!0);return b?(0,f.jsxs)("div",{className:s()(p,r),onClick:v,children:[(0,f.jsxs)("div",{className:h,children:[(0,f.jsx)(a.p,{className:g,size:"small",semanticColor:"textBase"}),(0,f.jsx)(o.E,{as:"span",variant:"bodyMediumBold",semanticColor:"textBase",children:e})]}),(0,f.jsx)(l.$,{size:"small",colorSet:"invertedLight",component:m.v,href:y,children:t})]}):null}},53311:(e,t,n)=>{"use strict";n.d(t,{k:()=>z});var i=n(79474),r=n(97500),s=n.n(r),a=n(83648),o=n(98764),l=n(98196),c=n(75783),u=n(48761),d=n(88395),m=n(2394),p=n(83856),h=n(14056),g=n(12269),f=n(263),b=n(61681),v=n(94009),y=n(11867),_=n(9440),E=n(83278),x=n(75024),C=n(66768),S=n(36300),A=n(38037),w=n(63492),I=n(9789),T=n(83925),N=n(65325),R=n(47498),k=n(16265),O=n(35789),P=n(11437),j=n(77564),L=n(67302),D=n(48327),U=n(73274),M=n(13274);const B={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},F=i.memo((function({episodeUri:e,showUri:t,sharingInfo:n,size:r,canDownload:a,requestId:o,onMarkAsPlayed:l,onMoreButtonClick:c,name:u,fullyPlayed:d,index:m}){const p=(0,P.T)(e),{spec:g,logger:f}=(0,L.r)(S.d,{data:{uri:e,reason:o||"",position:m}}),b=r===y.E.LARGE?"medium":"small",v=(0,i.useMemo)((()=>(0,M.jsx)(A.e,{uri:e,size:b,className:s()({[U.A.visibleAction]:(0,O.X)(p)}),onClick:(t,n)=>{n===j.NV.ADD?f.logInteraction(g.downloadButtonFactory().hitDownload({itemToDownload:e})):j.NV.REMOVE&&f.logInteraction(g.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},canDownload:a})),[e,p,g,f,b,a]),_=(0,i.useMemo)((()=>(0,M.jsx)(T.w,{uri:e,sharingInfo:n,interactionData:B,size:b,onClick:()=>{f.logInteraction(g.copyLinkFactory().hitShare({entityToBeShared:e,shareId:n?.shareId||""}))}})),[e,n,g,f,b]),E=(0,i.useMemo)((()=>(0,M.jsx)(I.b,{uri:e,size:b,className:U.A.visibleAction,onClick:t=>{t?f.logInteraction(g.saveToLibraryButtonFactory().hitLike({itemToBeLiked:e})):f.logInteraction(g.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:e}))}})),[e,g,f,b]),x=(0,k.v)(e),C=(0,i.useMemo)((()=>(0,M.jsx)(D.g,{size:b,uri:e,className:U.A.visibleAction})),[e,b]),F=(0,i.useMemo)((()=>(0,M.jsx)(N.b,{menu:(0,M.jsx)(R.b,{uri:e,showUri:t,isPlayed:d,onMarkAsPlayed:l}),children:(0,M.jsx)(w.e,{size:b,label:h.Ru.get("more.label.context",u),onClick:c})})),[e,d,u,l,c,t,b]);return(0,M.jsxs)(M.Fragment,{children:[x?C:E,v,_,F]})}));var H=n(30957),V=n(15704);const z=i.memo(i.forwardRef((function({uri:e,name:t,showName:n,showUri:r,size:S,description:A,durationMs:w,images:I,badges:T,fullyPlayed:N,releaseDate:R,resumePositionMs:k,isCurrentlyPlaying:O,isPlaying:P,onContextMenu:j,onTouchStart:L,onTouchEnd:D,handlePlaybackClick:B,draggable:z,handleDragStart:G,handleClick:W,position:K,index:Y,isPlayable:q,isPaywalled:Q,isUserSubscribed:$,episodeSharingInfo:Z,playButtonWrapper:X=null,highlightText:J=(e=>e),onMarkAsPlayed:ee,contentInformation:te,requestId:ne,mediaTypes:ie,onMoreButtonClick:re,status:se,variant:ae="default"},oe){const le=(0,a.Zp)(),ce=O&&P,ue=S===y.E.LARGE,de=(0,p.o_)(e).toURLPath(!0),me=(0,p.o_)(r)?.toURLPath(!0),pe=(0,g.hD)(e,R,k,N),he=Q&&!$,ge=ie?.includes(E.C.Video)??!1,fe=T?.props.children.filter((e=>!1!==e))||[],be=he||q,ve=h.Ru.get("tracklist.a11y.play",t,n),ye=h.Ru.get("tracklist.a11y.pause",t,n),_e=(0,i.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),le(de),W&&W(e)}),[le,de,W]),Ee=(0,i.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),me&&le(me)}),[me,le]),xe=(0,i.useCallback)((e=>{e.stopPropagation(),he||B(e)}),[B,he]),Ce=(0,M.jsx)(f.R,{size:"small",version:"next-best-episode"===ae?f.H.primary:f.H.secondary,onClick:xe,isPlaying:ce,disabled:!be,locked:he,ariaPlayLabel:ve,ariaPauseLabel:ye}),Se=X?X(Ce):Ce,Ae=(0,M.jsx)(M.Fragment,{children:se&&(0,M.jsx)(o.E,{variant:"bodySmall",semanticColor:"textSubdued",paddingBottom:l.vw,children:se})}),we=(0,M.jsxs)(c.d,{className:U.A.title,href:de,onClick:_e,lineClamp:2,children:[pe&&(0,M.jsx)(g.Tc,{}),J(t)]}),Ie=(0,M.jsxs)(u.j,{lineClamp:2,paddingBottom:ue?l.v4:void 0,children:[ge&&(0,M.jsx)(V.T,{className:U.A.videoLabel}),n&&me&&(0,M.jsx)(H.Link,{to:me,onClick:Ee,children:(0,M.jsx)(o.E,{variant:"bodySmall",semanticColor:"textSubdued",children:J(n)})})]}),Te=(0,M.jsxs)("div",{className:U.A.showDetailsWithProgress,children:[(0,M.jsx)(d.v,{lineClamp:2,paddingBottom:ue?l.vw:void 0,children:J(A??"")}),(0,M.jsxs)("div",{className:U.A.metadata,children:[fe.length>0&&(0,M.jsx)("div",{className:U.A.badges,children:T}),(0,M.jsx)(x.j,{isPlaying:ce,fullyPlayed:N,durationMs:w,releaseDate:R,resumePositionMs:k,position:O?K:void 0})]})]}),Ne=(0,M.jsxs)("div",{className:U.A.footer,children:[(0,M.jsx)("div",{onClick:e=>{e.stopPropagation()},className:U.A.actions,children:(0,M.jsx)(F,{episodeUri:e,showUri:r??"",sharingInfo:Z,size:S,canDownload:!Q||Q&&$,requestId:ne,index:Y,name:t,fullyPlayed:N,onMarkAsPlayed:ee,onMoreButtonClick:re})}),(0,M.jsx)("div",{children:Se})]}),Re="default"===ae&&(0,M.jsx)("div",{className:U.A.imageContainer,children:(0,M.jsx)(b.b,{className:s()(U.A.showImage,{[U.A.largeImage]:ue}),type:_.c.EPISODE,size:(e=>{switch(e){case y.E.LARGE:return v.Qe.SIZE_112;case y.E.MEDIUM:return v.Qe.SIZE_64;default:return v.Qe.SIZE_48}})(S),title:t,shape:b.u.ROUNDED_CORNERS,images:I})});return(0,M.jsxs)("div",{className:s()(U.A.episodeBlock,{[U.A.isActive]:O,[U.A.nextBestEpisode]:"next-best-episode"===ae}),"":`episode-${Y}`,draggable:z&&!!G,onDragStart:G,onClick:_e,onContextMenu:j,onTouchStart:L,onTouchEnd:D,children:[te&&(0,M.jsx)(C.g,{className:U.A.contentInformationBanner,cardHeaderText:te.cardHeaderText,buttonText:te.buttonText,buttonTarget:te.buttonTarget}),(0,M.jsx)(m.v,{size:"xxl",ref:oe,media:Re,title:we,id:`episode-${Y}`,subtitle:n&&me?Ie:Te,pretitle:Ae,body:n&&me?Te:void 0,variant:"naked",footer:Ne,hoverBackgroundColor:"backgroundHighlight",layout:ue?"wide":"regular",horizontalGap:ue?l.lT:l.CJ,verticalGap:l.v4,paddingBlockStart:l.CD,paddingBlockEnd:l.CD})]})})))},38076:(e,t,n)=>{"use strict";n.d(t,{s:()=>c});var i=n(45579),r=n(79474),s=n(4485),a=n(13274);const o=({error:e,resetErrorBoundary:t})=>{const n=(0,s.J)();return(0,r.useEffect)((()=>{const e=n.listen((()=>{t()}));return()=>{e()}}),[n,t]),null},l=({fallback:e,children:t})=>(0,a.jsx)(r.Suspense,{fallback:e,children:t}),c=({FallbackComponent:e=o,suspenseFallback:t,children:n,onError:r})=>{const s=t??null;return(0,a.jsx)(l,{fallback:s,children:(0,a.jsx)(i.tH,{FallbackComponent:e,onError:r,children:n})})}},5689:(e,t,n)=>{"use strict";n.d(t,{x:()=>p});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(61080),l=n(22269);const c="KIbfbFDao0SHpZsKoKZD",u="yZh70k8am9QCTKmucbwo";var d=n(13274);const m=()=>window.location.reload(),p=(0,i.memo)((function({headingMessage:e,message:t,onDismissDialog:n=m,isOpen:i=!1,buttonLabel:r,animated:p,isRemoteConfigInitialized:h=!0}){const g=h?l.A:l.h;return(0,d.jsx)(g,{isOpen:i,shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:e,animated:p,children:(0,d.jsxs)("div",{className:s()(c,"encore-light-theme"),children:[(0,d.jsx)(a.E,{variant:"titleSmall",as:"h1",children:e}),(0,d.jsx)(a.E,{as:"p",variant:"bodyMedium",children:t}),(0,d.jsx)("div",{className:u,children:(0,d.jsx)(o.$,{onClick:n,autoFocus:!0,children:r})})]})})}))},87668:(e,t,n)=>{"use strict";n.d(t,{N:()=>_});var i=n(79474),r=n(98764),s=n(14056),a=n(73068),o=n(13274);const l=i.memo((function({text:e,onTimeStampClick:t,children:n,className:s,enableTimestamps:l=!1}){const c=(0,i.useMemo)((()=>(0,o.jsx)(a.q,{html:e,onTimeStampClick:t,enableTimestamps:l})),[e,l,t]);return(0,o.jsxs)(r.E,{as:"div",variant:"bodyMedium",className:s,children:[c,n]})})),c="show-show-moreButton",u=(0,i.memo)((function({text:e,onTimeStampClick:t,onToggle:n,className:i,enableTimestamps:a}){return(0,o.jsx)(l,{className:i,text:e,onTimeStampClick:t,enableTimestamps:a,children:(0,o.jsx)("button",{"aria-expanded":!1,className:c,onClick:n,children:(0,o.jsxs)(r.E,{variant:"bodyMediumBold",children:["… ",s.Ru.get("show_more")]})})})})),d=(e,t,n)=>{const i=s.Ru.get("show_more").length,r=e.length+i+6;return n<=1&&r<t},m=(0,i.memo)((function({paragraphs:e,clickHandler:t,maxCharactersPerLine:n,maxLines:i,toggleExpandedState:r,className:a,enableTimestamps:c}){let m=!1,p=0;const h=e.map(((h,g)=>{const f=Math.round(h.length/n);if(p+=f>0?f:1,m)return null;const b=i-(p-f);if(!(g+1===e.length&&(d(h,n,b)||f<=b))&&p>=i){m=!0;const e=((e,t,n)=>{const i=s.Ru.get("show_more").length;if(d(e,t,n))return e;const r=t*n-i-6;return e.slice(0,r)})(h,n,b);return(0,o.jsx)(u,{text:e,onTimeStampClick:t,onToggle:r,className:a,enableTimestamps:c},g)}return(0,o.jsx)(l,{className:a,text:h,onTimeStampClick:t,enableTimestamps:c},g)})).filter((e=>null!==e)).map(((e,t,n)=>t+1===n.length?e:[e," "])).flat();return(0,o.jsx)(o.Fragment,{children:h})}));var p=n(82729);const h="TQXhY8PT8v1vogxO85c_",g="RKzJftL6TOVUXkXOPykT",f="mCKPqUiNNAO6GM3nRBXe",b=(e,t)=>({...e,...t}),v=(e="")=>e.split(/[ \u00a0]{2}/).filter(Boolean),y=(e="")=>e.replace("<p>","").split(/(?:<\/p>)/).filter(Boolean),_=(0,i.memo)((function({content:e,htmlContent:t,maxLines:n=2,className:c,onTimeStampClick:u=(()=>{}),onExpanded:d,enableTimestamps:_=!1,enableAutomaticLinkification:E=!1,isOpen:x=null}){const[C,S]=(0,i.useReducer)(b,(e=>({isOpen:e,contentWidth:0}))(x)),{isOpen:A,contentWidth:w}=C,I=(0,i.useRef)(null),T=(0,i.useRef)(!0),N=(0,i.useCallback)((()=>{S({isOpen:!A}),d&&d(!A)}),[A,d]);(0,i.useEffect)((()=>{S({isOpen:x})}),[e,x]),(0,i.useEffect)((()=>{null!==C.isOpen&&(T.current?T.current=!1:I.current?.querySelector("button[aria-expanded]")?.focus())}),[C.isOpen]);const R=w?w/7.8:Number.MAX_VALUE,k=(0,i.useCallback)((e=>{e&&(I.current=e,S({contentWidth:e.clientWidth}))}),[]),O=(0,i.useMemo)((()=>t?y(t).map((e=>(0,o.jsx)(a.q,{html:e,onTimeStampClick:u,enableTimestamps:_,enableAutomaticLinkification:E},e))):((e,t,n)=>v(e).map(((e,i)=>(0,o.jsx)(l,{className:g,text:e,onTimeStampClick:t,enableTimestamps:n},i))))(e,u,_)),[e,_,E,t,u]),P=(0,i.useMemo)((()=>t?y(t):v(e)),[e,t]);return(0,p.s)((()=>{I.current&&S({contentWidth:I.current.clientWidth})})),(0,o.jsx)("div",{className:c,children:(0,o.jsxs)("div",{ref:k,className:h,children:[A&&(0,o.jsxs)(o.Fragment,{children:[O,(0,o.jsx)("button",{"aria-expanded":!0,className:f,onClick:N,children:(0,o.jsx)(r.E,{variant:"bodyMediumBold",children:s.Ru.get("show_less")})})]}),!A&&(0,o.jsx)(m,{className:g,paragraphs:P,clickHandler:u,enableTimestamps:_,maxCharactersPerLine:R,maxLines:n,toggleExpandedState:N})]})})}))},39950:(e,t,n)=>{"use strict";n.d(t,{S:()=>I});var i=n(79474),r=n(97500),s=n.n(r),a=n(98678),o=n(26013),l=n(23689),c=n(14056),u=n(88713),d=n(40858),m=n(48901),p=n(55188);var h=n(82372);const g="x-filterBox-filterInputContainer",f="x-filterBox-expandedOrHasFilter",b="x-filterBox-expandButton",v="x-filterBox-filterInput",y="x-filterBox-fullWidth",_="x-filterBox-overlay",E="x-filterBox-expandRight",x="x-filterBox-searchIconContainer",C="x-filterBox-searchIcon",S="x-filterBox-clearButton";var A=n(13274);const w=e=>(0,m.x)(d.W.FILTER,e),I=i.memo((function({alwaysExpanded:e=!1,placeholder:t,filterBoxApiRef:n,outerRef:r,onFilter:m,onClear:I,onActivate:T,clearOnEscapeInElementRef:N,debounceFilterChangeTimeout:R=200,expandDirection:k="left",fullWidth:O=!1,useExpandCallback:P=w}){const{filter:j,setFilter:L}=(0,i.useContext)(h.g),[D,U]=(0,i.useState)(e||!!j),[M,B]=(0,i.useState)(j),F=(0,i.useRef)(null),H=(0,i.useRef)(null),V=r??F;!function(e){const t=(0,i.useContext)(p.A);(0,i.useEffect)((()=>(t.enableMenuItem(e),()=>{t.disableMenuItem(e)})),[t,e])}(d.D.FILTER);const z=(0,a.YQ)(((e,t=!1)=>{m&&!t&&m(e),L(e)}),R,{leading:!1,trailing:!0,maxWait:1e3}),G=(0,i.useCallback)((()=>{I?.(),B(""),z("",!0)}),[I,z]);(0,i.useImperativeHandle)(n,(()=>({clearFilter:G})));const W=(0,i.useCallback)((()=>{!1!==T?.()&&(U(!0),V.current?.focus())}),[U,V,T]);P(W);const K=(0,i.useCallback)((e=>{const t=e.currentTarget.value;B(t),z(t)}),[z,B]),Y=(0,i.useCallback)((()=>{M||e||U(!1)}),[M,e,U]),q=(0,i.useCallback)((t=>{"Escape"===t.key&&(M?(t.stopPropagation(),G()):e||(U(!1),H.current?.focus()))}),[e,G,M]);return(0,i.useEffect)((()=>{const e=e=>{"Escape"===e.key&&N?.current?.contains(e.target)&&G()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[G,N]),(0,A.jsx)(u.Zp,{label:t,disabled:D||!t,children:(0,A.jsxs)("div",{className:s()(g,{[f]:D}),role:"search",children:[(0,A.jsx)("input",{ref:V,className:s()(v,{[y]:O}),role:"searchbox",maxLength:80,autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,placeholder:t,onChange:K,onKeyDown:q,onBlur:Y,value:M,"aria-hidden":!D,tabIndex:D?void 0:-1}),(0,A.jsxs)("div",{className:_,children:[(0,A.jsx)("span",{className:x,children:(0,A.jsx)(o.C,{size:"small",className:C,"aria-hidden":!0})}),M&&(0,A.jsx)("button",{className:S,onClick:e=>{e.stopPropagation(),G(),V.current?.focus()},"aria-label":c.Ru.get("search.a11y.clear-input"),children:(0,A.jsx)(l.M,{size:"small"})})]}),(0,A.jsx)("button",{className:s()(b,{[E]:"right"===k}),onClick:W,"":"expand-button","aria-hidden":D,tabIndex:D?-1:void 0,"aria-label":t,ref:H,children:(0,A.jsx)(o.C,{size:"small",className:C})})]})})}))},26902:(e,t,n)=>{"use strict";n.d(t,{s:()=>g});var i=n(79474),r=n(97500),s=n.n(r),a=n(3498),o=n(81579),l=n(61252),c=n(68104);const u="IVnoxrO3iL_tz5ULI8g_";var d=n(13274);const m={marginBlockEnd:0,willChange:"transform, opacity"},p=({filterId:e=null,isPrimaryFilter:t,isPlaceholder:n,resetFilterIds:r,toggleFilterId:o,className:l,innerRef:c,onFilterClick:p,index:h=0,...g})=>{const f=g.selected,b=(0,i.useCallback)((()=>{if(!e)return r(),void p(null,!1,h);p(e,!!f,h),o(e)}),[e,r,o,p,f,h]),v=(0,i.useCallback)((e=>{e.detail>1||n||b()}),[n,b]);return(0,d.jsx)(a.v,{...g,className:s()(l,{[u]:n}),onClick:v,selectedColorSet:"invertedLight",secondary:f&&!t,style:m,ref:c,tabIndex:-1})},h=({filterId:e=null,isPlaceholder:t,resetFilterIds:n,toggleFilterId:r,className:a,innerRef:l,onFilterClick:c,index:p=0,...h})=>{const g=h.selected,f=(0,i.useCallback)((()=>{if(!e)return n(),void c(null,!1,p);c(e,!!g,p),r(e)}),[e,n,r,c,g,p]),b=(0,i.useCallback)((e=>{e.detail>1||t||f()}),[t,f]);return(0,d.jsx)(o.m,{...h,"aria-label":h["aria-label"],className:s()(a,{[u]:t}),onClick:b,style:m,ref:l,tabIndex:-1})},g=(0,i.memo)((function({placeholderFilters:e=[],availableFilters:t,selectedFilters:n,toggleFilterId:r,resetFilterIds:s,onFilterClick:a,ariaLabel:o,clearBtnAriaLabel:u,className:m,applyLightThemeControls:g=!1}){const f=!(n||t),b=f?e:[...n??[],...t??[]],v=(0,i.useRef)(null),y=(0,i.useCallback)((()=>{(0,l.MS)(v.current,v.current?.nextElementSibling instanceof HTMLElement?v.current?.nextElementSibling:null),s()}),[s]);return 0===b.length?null:(0,d.jsxs)(c.F,{className:m,ariaLabel:o,applyLightThemeControls:g,children:[!!n?.length&&(0,d.jsx)(h,{resetFilterIds:y,toggleFilterId:r,onFilterClick:a,"aria-label":u??o,innerRef:v}),b.map(((e,t)=>{const i=n?.includes(e),o=0===t;return(0,d.jsx)(p,{filterId:e.id,isPrimaryFilter:o,isPlaceholder:f,onFilterClick:a,resetFilterIds:s,toggleFilterId:r,selected:i,index:t,children:e.getName()},e.id)}))]})}))},28413:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var i=n(79474),r=n(66675),s=n(14056),a=n(13274);const o=(0,i.memo)((function({isFollowing:e,onClick:t,disabled:n=!1,buttonText:i,size:o="small",className:l}){const c=e?s.Ru.get("following"):s.Ru.get("follow");return(0,a.jsx)(r.n,{onClick:t,disabled:n,size:o,className:l,children:i||c})}))},22792:(e,t,n)=>{"use strict";n.d(t,{U:()=>p,h:()=>m});var i=n(79474),r=n(97500),s=n.n(r),a=n(22215),o=n(47929),l=n(47530);var c=n(19498),u=n(72120),d=n(13274);const m=function(e){let t=e,n=[];return{addListener:e=>{n.push(e)},removeListener:e=>{n=n.filter((t=>t!==e))},get:()=>t,set:e=>{t=e(t),n.forEach((e=>{e(t)}))}}}({triggerId:null,triggerAction:null}),p=({id:e,children:t,childRef:n,options:{placement:r,isCTA:p,intentPrimaryButton:h="login",getDescription:g,getTitle:f,hideArrow:b,shouldHideOnOutsideClick:v=(()=>!0),shouldHideOnScroll:y=!1,fadeOut:_=!1,popperOptions:E,zIndex:x,maxWidth:C,tippyClassName:S,primaryButtonText:A,secondaryButtonText:w,checkboxText:I,useSecondaryStyling:T,onLogInteraction:N,tippyWrapperClassName:R,renderInline:k},onPrimaryButtonClick:O=(()=>{}),onSecondaryButtonClick:P,onCheckboxClick:j,className:L,onHide:D,onShow:U})=>{const M=p?"tooltip-with-cta":"tooltip-without-cta",[{triggerId:B,triggerAction:F},H]=function(e){const t=(0,i.useState)()[1];return(0,i.useEffect)((()=>(e.addListener(t),()=>{e.removeListener(t)})),[e,t]),[e.get(),e.set]}(m),V=Boolean(B&&B===e),z=(0,a.NC)(c.rWU),G=(0,i.useCallback)((e=>{e.stopPropagation();const t=(0,l.cX)((0,l.KY)(void 0,!0),"spotify_web_player").toString();N?.({itemIdSuffix:M,intent:h,type:"click",targetUri:t}),H((e=>({...e,triggerAction:null,triggerId:null}))),O()}),[O,N,H,M,h]),W=(0,i.useCallback)((e=>t=>{t.stopPropagation&&t.stopPropagation(),N?.({intent:"close-upsell",type:"click",itemIdSuffix:`${M}/${e}`}),H((e=>({...e,triggerAction:null,triggerId:null})))}),[N,H,M]);(0,i.useEffect)((()=>{D&&U&&(V?U():D())}),[D,U,V]);const K=(0,i.useRef)(!1);(0,i.useEffect)((()=>{!K.current&&V&&(N?.({intent:"open-upsell",type:"view",itemIdSuffix:M}),K.current=!0),K.current&&!V&&(K.current=!1)}),[N,M,V]);const Y=(0,i.useCallback)((()=>{y&&V&&H((e=>({...e,triggerAction:null,triggerId:null})))}),[H,y,V]);(0,o.g)(Y);const q=f({triggerAction:F}),Q=g({triggerAction:F}),$=v({triggerAction:F});return(0,d.jsx)(u.x,{placement:r,className:s()(L,{"circular-sp-vietnamese":z}),tippyClassName:S,tippyWrapperClassName:R,popperOptions:E,zIndex:x,maxWidth:C,title:q,description:Q,hideArrow:b,id:e,visible:V,showButtons:p,hideOnClickOutside:$,onHide:W("backdrop"),onSecondaryButtonClick:P??W("close-button"),onPrimaryButtonClick:G,primaryButtonText:A,secondaryButtonText:w,onCheckboxClick:j,checkboxText:I,useSecondaryStyling:T,childRef:n,fadeOut:_,renderInline:k,children:t})}},22269:(e,t,n)=>{"use strict";n.d(t,{h:()=>u,A:()=>d});var i=n(97500),r=n.n(i),s=n(28803),a=n.n(s),o=n(22215),l=n(19498),c=n(13274);const u=e=>{const{isOpen:t,contentLabel:n,children:i,className:s,overlayClassName:o,animated:l,animation:u,shouldFocusAfterRender:d=!0,isCircularSPVietnameseEnabled:m=!1,...p}=e;let h=0;return l?h=300:u?.closeTimeoutMs&&(h=u.closeTimeoutMs),(0,c.jsx)(a(),{className:{base:r()("GenericModal",{"circular-sp-vietnamese":m,"GenericModal--animated":l},[u?.modal?.base,s]),afterOpen:r()("",{"GenericModal--afterOpen":l},[u?.modal?.afterOpen]),beforeClose:r()("",{"GenericModal--beforeClose":l},[u?.modal?.beforeClose])},overlayClassName:{base:r()("GenericModal__overlay",{"GenericModal__overlay--animated":l},[u?.overlay?.base,o]),afterOpen:r()("",{"GenericModal__overlay--afterOpen":l},[u?.overlay?.afterOpen]),beforeClose:r()("",{"GenericModal__overlay--beforeClose":l},[u?.overlay?.beforeClose])},bodyOpenClassName:"GenericModal__Body--open",isOpen:t,...h?{closeTimeoutMS:h}:{},shouldFocusAfterRender:d,preventScroll:!0,ariaHideApp:!1,contentLabel:n,...p,children:i})},d=e=>{const t=(0,o.NC)(l.rWU);return(0,c.jsx)(u,{...e,isCircularSPVietnameseEnabled:t})}},73068:(e,t,n)=>{"use strict";n.d(t,{q:()=>E});var i=n(79474),r=n(97500),s=n.n(r),a=n(61428),o=n.n(a),l=n(98764),c=n(76933);const u=/(\((?:[0-9]{1,3}:){1,2}[0-9]{2}\))/g;var d=n(30957),m=n(13274);const p=/((?:(?:https?:\/\/)|www\.)(?:(?:(?:[a-z\u00a1-\uffff0-9][-_]*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?:[/?#][^\s"]*)?)/gi,h=/^https?:\/\//;function g(e){return"string"==typeof e?(0,m.jsx)(m.Fragment,{children:e.split(p).map(((e,t)=>t%2?(0,m.jsx)(d.Link,{to:`${h.test(e)?"":"https://"}${e}`,children:e},t):e))}):e}const f="playlist-playlist-heading",b="playlist-playlist-playlistDescription",v="playlist-playlist-list",y="playlist-playlist-listItem",_="playlist-playlist-paragraph",E=i.memo((function({html:e,onTimeStampClick:t,enableTimestamps:n=!1,enableAutomaticLinkification:r=!1,semanticColor:a="textSubdued",className:l,asTextContent:c=!1}){const d=(0,i.useMemo)((()=>{const i=n?e.split(u).map((e=>e.match(u)?`(<time>${e.replace("(","").replace(")","")}</time>)`:e)).join(""):e;let s;try{s=o()(i,{transform:x(t,a,r,c),dangerouslySetChildren:[]})}catch{s=e}return s}),[n,r,e,t,a,c]);return(0,m.jsx)("div",{className:s()(b,l),children:d})}));function x(e=(()=>{}),t,n,r){let s=0;const a={_:(e,t,a)=>{const o=void 0===t?e:a;return(0,m.jsx)(i.Fragment,{children:n&&!r?g(o):o},"fragment"+s++)}};if(r)return a;return{...a,p:e=>(0,m.jsx)(l.E,{as:"p",variant:"bodyMedium",semanticColor:t,className:_,children:n?g(e.children):e.children}),a:t=>t.href?.startsWith("#t=")?(0,m.jsx)(c.D,{onClick:e,children:t.children}):t.href?(0,m.jsx)(d.Link,{to:t.href,children:t.children}):(0,m.jsx)(m.Fragment,{children:t.children}),ul:e=>(0,m.jsx)("ul",{className:v,children:e.children}),ol:e=>(0,m.jsx)("ol",{className:v,children:e.children}),li:e=>(0,m.jsx)(l.E,{as:"li",variant:"bodyMedium",semanticColor:t,className:y,children:n?g(e.children):e.children}),br:()=>(0,m.jsx)("br",{}),h1:e=>(0,m.jsx)(l.E,{as:"h1",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h2:e=>(0,m.jsx)(l.E,{as:"h2",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h3:e=>(0,m.jsx)(l.E,{as:"h3",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h4:e=>(0,m.jsx)(l.E,{as:"h4",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h5:e=>(0,m.jsx)(l.E,{as:"h5",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h6:e=>(0,m.jsx)(l.E,{as:"h6",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),time:t=>(0,m.jsx)(c.D,{onClick:e,children:t.children})}}},38011:(e,t,n)=>{"use strict";n.d(t,{f:()=>c});var i=n(11120),r=n(88713);const s="x-settings-tooltip",a="x-settings-tooltipIconWrapper",o="x-settings-tooltipIcon";var l=n(13274);const c=({message:e,placement:t="top",messageClassName:n})=>(0,l.jsx)("div",{className:s,children:(0,l.jsx)(r.Zp,{showDelay:0,label:e,placement:t,labelClassName:n,children:(0,l.jsx)("div",{className:a,children:(0,l.jsx)(i.N,{size:"small",tabIndex:0,"aria-describedby":r.WO,className:o})})})})},47583:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});var i=n(89438),r=n.n(i);const s={highlightedText:"main-contextMenu-highlightedText"};var a=n(13274);function o({searchWords:e,textToHighlight:t,...n}){return 0===e.length||e.every((e=>!e))?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(r(),{highlightClassName:s.highlightedText,searchWords:e,textToHighlight:t,autoEscape:!0,...n})}},12604:(e,t,n)=>{"use strict";n.d(t,{y:()=>f});var i=n(79474),r=n(97500),s=n.n(r),a=n(22215),o=n(68035),l=n(10801),c=n(92929);const u="zUf7jtv9GPOKC1jYO5TO",d="T8QLel3PoQTgJUpGYj7Q";var m=n(13274);const p=(0,i.memo)((({isLoading:e})=>{const t=(0,o.h)("shimmer");return(0,m.jsx)("div",{className:c.A.imageContainer,children:(0,m.jsx)("div",{ref:t,className:s()(c.A.imageWrapper,{[d]:e})})})})),h=(0,i.memo)((({isLoading:e})=>(0,m.jsx)("div",{className:s()(c.A.shortcut,u),"":"skeleton-shortcut",children:(0,m.jsxs)("div",{className:c.A.draggable,children:[(0,m.jsx)(p,{isLoading:e}),(0,m.jsx)("div",{className:s()(c.A.main,c.A.skeletonShortcut),children:(0,m.jsx)(l.Y,{as:"p",variant:"bodyMediumBold",className:c.A.name,isLoading:e})})]})})));var g=n(19498);const f=(0,i.memo)((({withTitle:e})=>{const t=(0,a.NC)(g._SF)?8:6,n=t%4==0;return(0,m.jsxs)("section",{className:c.A.shortcuts,children:[e&&(0,m.jsx)("div",{className:c.A.title,children:(0,m.jsx)(l.Y,{as:"h2",variant:"titleMedium",charCount:25,isLoading:!0})}),(0,m.jsx)("div",{className:s()(c.A.grid,{[c.A.gridOf4Columns]:n}),children:[...new Array(t).keys()].slice(0,8).map(((e,t)=>(0,m.jsx)(h,{isLoading:!0},t)))})]})}))},42338:(e,t,n)=>{"use strict";n.d(t,{$X:()=>g,cU:()=>m,wI:()=>h});var i=n(79474),r=n(59841),s=n(54712),a=n(17072),o=n(78053),l=n(15891),c=n(24577),u=n(30323),d=n(13274);const m=e=>{const t=(0,c.g)(e.images);return{uri:e.uri,imageUrl:t?.url}},p=(0,i.createContext)({fetchMultipleColors:()=>{},resetColor:()=>{},setColorFromUri:()=>{},clearColor:()=>{}}),h=({children:e})=>{const t=(0,s.as)(),{request:n}=(0,i.useContext)(l.j),[c,m]=(0,i.useState)({}),[h,g]=(0,i.useState)(r.gray30),{extractedHomeAdColor:[f]}=(0,u.bT)(),b=(0,i.useCallback)((()=>{t((0,s.Mo)(f?.colorRaw||h))}),[h,t,f]),v=(0,i.useCallback)((()=>{t((0,s.Hf)())}),[t]),y=(0,i.useCallback)((e=>{const n=c[e];t((0,s.Mo)(n||r.gray30))}),[t,c]),_=(0,i.useCallback)((async e=>{const t={};(await(0,o.j)(n,e.map((e=>e.imageUrl||"")))).forEach((({colorRaw:n},i)=>{const r=n.toCSS(a.a.HEX);t[e[i].uri]=r,0===i&&g(r)})),m(t)}),[n]);return(0,d.jsx)(p.Provider,{value:{setColorFromUri:y,resetColor:b,fetchMultipleColors:_,clearColor:v},children:e})};function g(){const e=(0,i.useContext)(p);if(null===e)throw new Error("Trying to use 'ShortcutsColorContext' without 'ShortcutsColorProvider'!");return e}},88713:(e,t,n)=>{"use strict";n.d(t,{Zp:()=>b,uF:()=>f,WO:()=>g});var i=n(79474),r=n(97500),s=n.n(r),a=n(29439),o=n(41318),l=n(39927);const c="main-contextMenu-tippy",u="main-contextMenu-tippyEnter",d="main-contextMenu-tippyEnterActive";var m=n(13274);const p=({children:e,className:t,showDelay:n=200})=>{const[r,p]=i.useState(!1),h=(0,o.Oj)(),g=(0,l.ZY)(),f=(0,i.useRef)(!0);return(0,i.useEffect)((()=>(f.current=!0,()=>{f.current=!1}))),(0,i.useEffect)((()=>{const e=setTimeout((()=>{f.current&&(p(!0),g?.addEventListener("click",t,{once:!0}))}),n);function t(){f.current&&(p(!1),h({type:"close"}),clearTimeout(e))}return()=>{g?.removeEventListener("click",t),clearTimeout(e)}}),[g,n,h]),(0,m.jsx)(a.A,{in:r,timeout:200,unmountOnExit:!0,classNames:{enter:u,enterActive:d},children:(0,m.jsx)("div",{className:s()(c,t),children:e})})};var h=n(56333);const g="hover-or-focus-tooltip",f=1e3,b=({label:e,children:t,renderInline:n,showDelay:i,disabled:r,placement:s="top",labelClassName:a})=>(0,m.jsx)(h.y,{action:"open",trigger:"hover-or-focus",placement:s,interactive:!1,content:r?null:(0,m.jsx)(p,{showDelay:i,className:a,children:(0,m.jsx)("span",{id:g,role:"tooltip",children:e})}),renderInline:n,children:t})},80007:(e,t,n)=>{"use strict";n.d(t,{M:()=>d});var i=n(97500),r=n.n(i),s=n(55263),a=n(98764);const o="artist-artistVerifiedBadge-wrapper",l="artist-artistVerifiedBadge-badge",c="artist-artistVerifiedBadge-fillColor";var u=n(13274);const d=({text:e,iconSize:t="medium",className:n})=>(0,u.jsxs)("span",{className:r()(o,n),children:[(0,u.jsx)("div",{className:`${l} ${c}`}),(0,u.jsx)(s.O,{semanticColor:"textAnnouncement",className:l,size:t}),e?(0,u.jsx)(a.E,{variant:"bodySmall",children:e}):null]})},63393:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(13274);const r=({className:e,name:t})=>(0,i.jsx)("svg",{height:16,role:"img",width:16,viewBox:"0 0 24 24",className:e,name:t,"aria-hidden":"true",children:(0,i.jsx)("circle",{cx:"50%",cy:"50%",r:"6",fill:"currentColor"})})},41298:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var i=n(14056);const r="main-loadingIndicator-circle",s="main-loadingIndicator-loadingIcon";var a=n(13274);const o=()=>(0,a.jsxs)("div",{className:s,children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"12px",width:"56px",x:"0px",y:"0px",viewBox:"0 0 1 100",xmlSpace:"preserve","":"loadingIcon",children:[(0,a.jsx)("circle",{className:r,cx:"-140",cy:"50",r:"32"}),(0,a.jsx)("circle",{className:r,cx:"0",cy:"50",r:"32"}),(0,a.jsx)("circle",{className:r,cx:"140",cy:"50",r:"32"})]}),(0,a.jsx)("span",{className:"hidden-visually",children:i.Ru.get("page.loading")})]})},36706:(e,t,n)=>{"use strict";n.d(t,{K:()=>a});var i=n(14056),r=n(35291),s=n(13274);const a=e=>(0,s.jsx)(r.v,{...e,text:i.Ru.get("paid")})},80551:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var i=n(4663),r=n(13274);const s=({iconSize:e,className:t})=>(0,r.jsx)("div",{className:t,children:(0,r.jsx)(i.E,{size:e,"aria-hidden":!0})})},4320:(e,t,n)=>{"use strict";n.d(t,{u:()=>c,i:()=>l});var i=n(79474),r=n(31151);const s="main-imagePicker-fileInput";var a=n(13274);const o={accept:"image/.jpg, image/.jpeg, image/.png"};let l=function(e){return e.FILE_TOO_BIG="FILE_TOO_BIG",e.IMAGE_TOO_SMALL="IMAGE_TOO_SMALL",e}({});const c=function({onChange:e,onError:t,isOpen:n=!1,minImageWidth:c=0,minImageHeight:u=0,maxFileSizeMB:d=1/0,...m}){const p=i.useRef(null),h={...o,...m};(0,i.useEffect)((()=>{p.current&&n&&p.current.click()}),[p,n]);const g=1048576*d;return(0,a.jsx)("input",{...h,type:"file","":"image-file-picker",ref:p,className:s,onChange:async function(n){const i=n.target,[s]=Array.from(i.files||[]),a=await async function(e){const t=await(0,r.j)(e),[n,i]=await(0,r.v)(t);return{imageFile:e,imageDataUrl:t,imageWidth:n,imageHeight:i}}(s);try{await async function(e){if(e.imageWidth<c||e.imageHeight<u)throw l.IMAGE_TOO_SMALL;if(e.imageFile.size>g)throw l.FILE_TOO_BIG}(a),e(a)}catch(e){if("string"!=typeof e||!Object.values(l).includes(e))throw e;t(e)}}})}},59392:(e,t,n)=>{"use strict";n.d(t,{z:()=>m});var i=n(97500),r=n.n(i),s=n(98764),a=n(38074);const o="pIZVZOfjnJGth1BcoA1E",l="ZBBTIITnUdwh05dCI0tm",c="sz8Nwj2lvhOZxDwYWRQr",u="jjPsW7vuG9xH9qhEGL3I";var d=n(13274);const m=({message:e,isErrorMessage:t=!1})=>e?(0,d.jsx)("div",{role:"alert",children:(0,d.jsx)("div",{className:r()(o,{[l]:t}),children:(0,d.jsxs)(s.E,{as:"p",variant:"marginal",className:c,children:[(0,d.jsx)(a.b,{size:"small",className:u,"aria-hidden":"true"}),e]})})}):null},83525:(e,t,n)=>{"use strict";n.d(t,{R:()=>s});var i=n(30957),r=n(13274);const s=({uri:e,enabled:t,className:n,children:s,onClick:a})=>t?(0,r.jsx)(i.default,{to:e,className:n,onClick:a,children:s}):(0,r.jsx)(r.Fragment,{children:s})},10072:(e,t,n)=>{"use strict";n.d(t,{N:()=>m});var i=n(79474),r=n(60096),s=n(83856),a=n(42360),o=n(87687),l=n(60786),c=n(34285),u=n(36471),d=n(13274);const m=(0,i.memo)((0,i.forwardRef)((function(e,t){const{to:n,pageId:m,onClick:h,children:g,draggable:f=!1,state:b,search:v,pathname:y,tabIndex:_,stopPropagation:E=!1,...x}=e,C=(0,u.W)(),S=(0,o.K)(),A=(0,i.useContext)(a.ql),w=y||(0,s.o_)(n,{parseUnknown:!0}),I=p(w)?w.toURLPath(!0):w,T=(0,s.o_)(I,{parseUnknown:!0}),N=(0,c.W)({uri:T?.toURI(),type:"link"}),R={onClick:(0,i.useCallback)((e=>{C({intent:"navigate",type:"click",targetUri:n}),E&&e.stopPropagation(),h&&h(e,(0,s.o_)(n,{parseUnknown:!0})?.toURI())}),[C,n,E,h]),draggable:f,...x},k={pageId:m,...b,referrer:e.referrer||A||S.getReferrer()};if(w){let e,n;e=p(w)?N?(0,l.hF)(w.toURLPath(!0)):w.toURLPath(!0):N?(0,l.hF)(w):w;const i=e.split("?");return i.length>1&&(e=i[0],n=i[1]),(0,d.jsx)(r.N_,{...R,ref:t,to:{pathname:e,search:v??n},state:k,tabIndex:_,children:g})}const O=v?`${n}${v}`:n;return(0,d.jsx)("a",{...R,ref:t,href:O,target:"_blank",rel:"noopener nofollow",tabIndex:_,children:g})})));function p(e){return!!e&&"string"!=typeof e}},82089:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var i=n(79474),r=n(97500),s=n.n(r),a=n(13380),o=n(98764),l=n(38074),c=n(14056),u=n(41298);function d(e,t){switch(t.type){case"LOADING":return{...e,loading:!0};case"ERROR":return{...e,loading:!1,error:!0};default:return e}}var m=n(30939);const p="main-loadingPage-container";var h=n(13274);const g=({loading:e=!0})=>(0,h.jsx)("div",{className:s()(p,"contentSpacing"),children:e?(0,h.jsx)(u.m,{}):null}),f=e=>{const{hasError:t,errorMessage:n,loadOffline:r=!1,timeoutInMs:u}=e,f=(0,m.n)(),[b,v,y]=function(e,t,n=3e4){const[r,s]=(0,i.useReducer)(d,{loading:!1,error:e});return(0,i.useEffect)((()=>{if(e)return s({type:"ERROR"}),()=>{};const t=setTimeout((()=>{s({type:"LOADING"})}),200);return()=>{clearTimeout(t)}}),[e]),(0,i.useEffect)((()=>{let e;return t&&(e=window.setTimeout((()=>{s({type:"ERROR"})}),n)),()=>{clearTimeout(e)}}),[r.loading,t,n]),[r.loading,t,r.error]}(t,f,u),[_,E]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{const e=setTimeout((()=>{E(!0)}),1e3);return()=>{clearTimeout(e)}}),[]),v||r?y?(0,h.jsxs)("div",{className:s()(p,"contentSpacing"),children:[(0,h.jsx)(l.b,{size:"xxlarge","aria-hidden":"true"}),(0,h.jsx)(o.E,{as:"p",variant:"titleMedium",children:n}),(0,h.jsx)(o.E,{as:"p",variant:"bodyMedium",children:c.Ru.get("error.not_found.body")})]}):_?(0,h.jsx)(g,{loading:b}):(0,h.jsx)("div",{"":"loading-page"}):(0,h.jsxs)("div",{className:s()(p,"contentSpacing"),children:[(0,h.jsx)(a.P,{size:"xxlarge","aria-hidden":"true"}),(0,h.jsx)(o.E,{as:"p",variant:"titleMedium",children:c.Ru.get("offline.feedback-text")})]})}},25103:(e,t,n)=>{"use strict";n.d(t,{h:()=>d});var i=n(79474),r=n(82031),s=n(7125),a=n(33541),o=n(44602),l=n(22792),c=n(13892),u=n(13274);const d=({children:e,action:t,uri:n})=>{const d=(0,s.V)(),m=(0,o.L)();let p;const h=()=>{const e={triggerId:c.d,triggerAction:{type:t}};l.h.set((t=>({...t,...e}))),m.storeAction(a.j8,{operation:r.tS.ADD,uris:[n]})};try{p=i.Children.only(e)}catch(t){return(0,u.jsx)(u.Fragment,{children:e})}return d?i.cloneElement(p,{onClick:h}):(0,u.jsx)(u.Fragment,{children:e})}},22920:(e,t,n)=>{"use strict";n.d(t,{r:()=>b});var i=n(79474),r=n(97500),s=n.n(r),a=n(48145);var o=n(7079),l=n(99025),c=n(74938);const u="main-trackInfo-overlay",d="main-trackInfo-equalGradientWidth",m="EOLjmX4qyDsRvnxBK0JO",p="main-trackInfo-rightToLeft",h="main-trackInfo-contentContainer",g="main-trackInfo-contentWrapper";var f=n(13274);const b=({children:e,title:t,speed:n=.2,pauseAtEndEdgeDurationMs:r=1200,initialMouseIntDelayMs:b=200,startAnimationOnMount:v=!0,startAnimationOnMountDelayMs:y=1e3,iterationCount:_="single",iterationCountOnTouchDevices:E="infinite",scrollMethod:x="transform",equalGradientWidth:C})=>{const S=(0,i.useRef)(null),A=(0,i.useRef)(null),w=(0,i.useRef)(null),I=(0,i.useRef)(0),T=(0,i.useRef)("scrolling"),N=(0,o.W)()?"rtl":"ltr",R=(0,i.useRef)("ltr"),k=(0,i.useRef)(_),O=(0,l.j)(),P=(0,a.U)("(any-pointer: coarse)"),j=(0,i.useRef)({initialMouseInteraction:null,animationOnMount:null}),L=(0,i.useCallback)((()=>w.current&&S.current?w.current.clientWidth-S.current.clientWidth:0),[]),D=(0,i.useCallback)((()=>"rtl"===R.current?1:-1),[R]),U=(0,i.useCallback)((()=>{const e=L();return e>0&&N!==R.current?0+-1*D()*e:0}),[L,N,D]),M=(0,i.useCallback)((()=>{w.current?.style.setProperty("--trans-x",`${U()}px`)}),[U]),B=(0,i.useCallback)((e=>{S.current?.classList.toggle(m,e)}),[]),F=(0,i.useCallback)((()=>{if(O)return;if(I.current)return;let e=!1,t=0,i=1,s=!1;const a=o=>{const l=L();if(l<=0)return;let c=!0,u=t;if(e){if(s)B(!1),o>s+r&&(s=!1);else if("paused"===T.current);else{u+=i*(60*(o-e)/1e3)*n,u>l?(i*=-1,s=o,u=l):u<0&&(i*=-1,s=o,u=0,c="infinite"===k.current)}if(u!==t&&B(!0),t=u,"transform"===x){const e=D()*t+U();w.current?.style.setProperty("--trans-x",`${e}px`),A.current.scrollLeft=0}else"scroll"===x&&(A.current.scrollLeft=t)}e=o,I.current=0,c&&(I.current=requestAnimationFrame(a))};T.current="scrolling",a(0)}),[O,L,x,r,n,B,D,U]),H=(0,i.useCallback)((()=>I.current),[]),V=(0,i.useCallback)((()=>{T.current="paused"}),[]),z=(0,i.useCallback)((()=>{T.current="scrolling"}),[]),G=(0,i.useCallback)((()=>{cancelAnimationFrame(I.current),T.current="paused",I.current=0;const e=L();B(e>0)}),[L,B]),W=(0,i.useCallback)((()=>{Object.values(j.current).forEach((e=>e&&clearTimeout(e)))}),[]),K=(0,i.useCallback)((e=>{H()?V():"focus"!==e&&(j.current.initialMouseInteraction=setTimeout(F,b))}),[F,V,b,H]),Y=(0,i.useCallback)((()=>{j.current.initialMouseInteraction&&clearTimeout(j.current.initialMouseInteraction),H()&&z()}),[z,H]);return(0,i.useEffect)((()=>{v&&(j.current.animationOnMount&&clearTimeout(j.current.animationOnMount),j.current.animationOnMount=setTimeout(F,y))}),[F,y,v]),(0,i.useEffect)((()=>()=>{G(),W(),M()}),[G,W,M]),(0,i.useEffect)((()=>{const e=w.current?.children[0];e&&(R.current=getComputedStyle(e).direction,"rtl"===R.current&&S.current?.classList.add(p)),M()}),[N,U,M]),(0,c.w)({onResize:()=>{G(),M()},refOrElement:S,observeOnly:"width"}),(0,i.useEffect)((()=>{P&&(k.current=E)}),[P,E]),(0,f.jsx)("div",{ref:S,className:s()(u,C&&d),onMouseOver:()=>K("mouse"),onFocus:()=>K("focus"),onMouseOut:Y,onBlur:Y,title:O&&t?t:void 0,children:(0,f.jsx)("div",{ref:A,className:h,children:(0,f.jsx)("div",{ref:w,className:s()(g,C&&d),children:e})})})}},610:(e,t,n)=>{"use strict";n.d(t,{M:()=>d});var i=n(79474),r=n(97500),s=n.n(r),a=n(22215);var o=n(19498);const l="JCoroLSoJO7iJzBU1n2W",c="aOxbsZDBlepfQptv_EfI";var u=n(13274);const d=({children:e,isOpen:t,onRequestClose:n,className:r,animated:d=!1,shouldCloseOnEsc:m=!0,shouldCloseOnBackdropClick:p=!0,...h})=>{const g=(0,i.useRef)(null);var f;!function(e,t,n){(0,i.useEffect)((()=>{const i=t.current,r=t=>{t.preventDefault(),e&&n&&n()};return i?.addEventListener("cancel",r),()=>{i?.removeEventListener("cancel",r)}}),[t,n,e])}(m,g,n),f=g,(0,i.useEffect)((()=>{const e=f.current;return()=>{e?.close()}}),[f]);const b=(0,a.NC)(o.rWU);return(0,i.useEffect)((()=>{t?g.current?.showModal():g.current?.close()}),[t]),(0,u.jsx)("dialog",{ref:g,className:s()(l,r,{"circular-sp-vietnamese":b,[c]:d}),onClick:e=>{const t=e.target;t instanceof HTMLElement&&"DIALOG"===t.nodeName&&p&&n?.()},...h,children:e})}},12269:(e,t,n)=>{"use strict";n.d(t,{Ih:()=>f,Tc:()=>g,hD:()=>h});var i=n(79474),r=n(97500),s=n.n(r),a=n(83856),o=n(14056),l=n(88713);const c="atZHmMpyVJ8qoM6YbYdA",u="lokp6OWWTWj_WazpVjAR";var d=n(13274);const m=6048e5,p=3e5;function h(e,t,n,i=!1){const r=(0,a.gH)(e),s=function(e){const t=new Date;return!!e&&Math.floor(t.getTime()-Date.parse(e))<m}(t),o=function(e,t){return!!e||!!t&&t>p}(i,n);return r&&s&&!o}const g=i.memo((function({className:e,label:t}){const n=t||o.Ru.get("type.newEpisode");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Zp,{label:n,children:(0,d.jsx)("span",{className:s()(c,e),"aria-label":n})}),t]})})),f=i.memo((function({isMusicAndTalk:e,className:t}){const n=e?o.Ru.get("type.newEpisode"):o.Ru.get("type.newPodcastEpisode");return(0,d.jsx)(g,{label:n,className:s()(u,t)})}))},87465:(e,t,n)=>{"use strict";n.d(t,{u:()=>o});var i=n(79474),r=n(22215),s=n(13274);const a=({renderOldExperience:e=(()=>null),renderNewExperience:t=(()=>null),forceNewExperience:n,property:i})=>(0,r.NC)(i)||n?t():e(),o=({suspenseFallback:e=null,renderNewExperience:t,renderOldExperience:n,forceNewExperience:r=!1,property:o})=>(0,s.jsx)(i.Suspense,{fallback:e,children:(0,s.jsx)(a,{renderNewExperience:t,renderOldExperience:n,forceNewExperience:r,property:o})})},68811:(e,t,n)=>{"use strict";n.d(t,{a:()=>l});var i=n(79474),r=n(44728),s=(n(73789),n(66060)),a=n(87058);var o=n(13274);r.ae.plugin(r.lW);const l=(0,i.memo)((function({className:e,children:t,options:n,style:r,onInstanceCreated:l}){const c=function(){const[e,t]=(0,i.useState)("mouse");return(0,i.useEffect)((()=>{const e=e=>{t(e.pointerType)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}}),[]),e}(),u=(0,i.useRef)(null),[d,m]=(0,s.d)({defer:!1,options:{update:{elementEvents:[],...n?.update},scrollbars:{theme:"os-theme-spotify",autoHide:"mouse"===c?"leave":"never",autoHideDelay:800,clickScroll:!0,autoHideSuspend:!1,...n?.scrollbars},...n},events:{initialized:l}});return(0,i.useEffect)((()=>{u.current&&d(u.current)}),[d]),function(e,t){(0,i.useEffect)((()=>{const n=t()?.elements();if(!n)return()=>{};const i=n.scrollbarVertical.track,r=n.scrollbarHorizontal.track,s=(0,a.g)(),o=t=>{("pen"===e||s)&&t.stopImmediatePropagation()};return i.addEventListener("pointerleave",o),r.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerleave",o),r.removeEventListener("pointerleave",o)}}),[t,e])}(c,m),(0,o.jsx)("div",{"data-overlayscrollbars-initialize":!0,style:r,ref:u,className:e,children:t})}))},13430:(e,t,n)=>{"use strict";n.d(t,{o:()=>b});var i=n(79474),r=n(83648),s=n(84516),a=n(26013),o=n(49253),l=n(38074),c=n(61080),u=n(88137),d=n(14056),m=n(52792),p=n(67302);const h="main-pageErrorTemplate-errorBody";var g=n(13274);const f={"/":s.H,"/search":a.C,"/collection":o.M},b=i.memo((function(){const e=(0,r.zy)(),t=(n=e.pathname,f[n]||l.b);var n;const{spec:s,logger:a}=(0,p.r)(u.W,{data:{uri:e.pathname}}),o=(0,m.t)(s),b=(0,i.useCallback)((()=>{const e=s.reloadPageButtonFactory().hitRefreshContent();a.logInteraction(e),window.location.reload()}),[s,a]);return(0,g.jsxs)("div",{className:h,ref:o,children:[(0,g.jsx)(t,{width:46,height:46}),(0,g.jsx)("h1",{children:d.Ru.get("error-dialog.generic.header")}),(0,g.jsx)("p",{children:d.Ru.get("error-dialog.generic.body")}),(0,g.jsx)(c.$,{onClick:b,children:d.Ru.get("fatal-error.button-label")})]})}))},82115:(e,t,n)=>{"use strict";n.d(t,{u:()=>b});var i=n(79474),r=n(12652),s=n(42784),a=n(11283),o=n(12909),l=n(61080),c=n(14056),u=n(84346),d=n(42490),m=n(918),p=n(65911);const h="wTtSN5qCRogLw_ONPzid",g="Zp4roOZZCr2D0jkQgTwW";var f=n(13274);const b=function({title:e,placement:t,arrow:n,children:b}){const v=(0,p.U)(),{openURLWithSessionTransfer:y}=(0,m.L)(),[_,E]=(0,i.useState)(!1),x=(0,i.useCallback)((()=>{E(!1),y(d.M0,"_blank")}),[y]);return v?(0,f.jsx)(r.W,{onShow:()=>E(!0),onHide:()=>E(!1),placement:t,overlay:_&&(0,f.jsx)(u.s,{children:(0,f.jsx)("div",{children:(0,f.jsxs)(s.A,{role:"alertdialog",popoverTitle:e,arrow:n,colorSet:"announcement",className:h,children:[c.Ru.get("pick-and-shuffle.upsell.message"),(0,f.jsxs)("div",{className:g,children:[(0,f.jsx)(a.H,{buttonSize:o.$.sm,onClick:()=>E(!1),children:c.Ru.get("pick-and-shuffle.upsell.dismiss")}),(0,f.jsx)(l.$,{buttonSize:o.$.sm,onClick:x,colorSet:"invertedLight",children:c.Ru.get("pick-and-shuffle.upsell.explore-premium")})]})]})})}),children:b}):b}},21708:(e,t,n)=>{"use strict";n.d(t,{H4:()=>i});n(79474),n(97500),n(14056),n(83699),n(88713);n(13274);let i=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({})},263:(e,t,n)=>{"use strict";n.d(t,{H:()=>h,R:()=>g});var i=n(79474),r=n(37463),s=n(43505),a=n(54015),o=n(61080),l=n(11283),c=n(14056),u=n(88713),d=n(83699);const m="ix_8kg3iUb9VS5SmTnBY";var p=n(13274);let h=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({});const g=i.memo((0,i.forwardRef)((function(e,t){const{onClick:n,isPlaying:i,locked:g,version:f=h.primary,size:b="medium",disabled:v=!1,children:y,ariaPauseLabel:_,ariaPlayLabel:E,isLoading:x,condensedAll:C=!1,...S}=e,A=e=>{const{currentTarget:t,detail:r}=e;n(e),i||(0,d.aX)(e,"play/resume"),r>0&&t&&t.blur()};let w=c.Ru.get("play"),I=r.A;g?(w=c.Ru.get("mwp.header.content.unavailable"),I=s.u):i?(w=_??c.Ru.get("pause"),I=a._):w=E??w;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.Zp,{label:w,showDelay:u.uF,children:(0,p.jsx)("div",{className:m,children:(()=>{const e={iconOnly:I,size:b,onClick:A,disabled:v||x,"aria-label":w,ref:t,"":"play-button",...S};switch(f){case h.secondary:return(0,p.jsx)(o.$,{...e,colorSet:"invertedLight"});case h.transparent:return(0,p.jsx)(l.H,{...e,semanticColor:"textBase",condensedAll:C});default:return(0,p.jsx)(o.$,{...e})}})()})}),y]})})))},92585:(e,t,n)=>{"use strict";n.d(t,{D:()=>f});var i=n(79474),r=n(97500),s=n.n(r),a=n(263),o=n(22215),l=n(19498),c=n(8309),u=n(34628),d=n(2530);const m="a7Y8huZIZOVb02vySpQo";function p(){const{surface:e,isViewingVariant:t}=(0,u.h)(),n=(0,o.NC)(l.cOL,{loadingValue:!1});if(e===c.u.PLAYLIST){return{buttonClassName:n&&t===d.K.FC_24?m:null}}return{buttonClassName:null}}var h=n(36471),g=n(13274);const f=i.memo((function({uri:e,ariaPlayLabel:t,ariaPauseLabel:n,onClick:i,isPlaying:r,size:o,locked:l,...c}){const u=(0,h.W)(),{buttonClassName:d}=p();return(0,g.jsx)(a.R,{ariaPlayLabel:t,ariaPauseLabel:n,isPlaying:r,onClick:t=>{l||u({targetUri:e,intent:r?"pause":"play",type:"click",itemIdSuffix:"button"}),i(t)},size:o,locked:l,className:s()(d),...c})}))},54745:(e,t,n)=>{"use strict";n.d(t,{x:()=>d});var i=n(79474),r=n(37463),s=n(43505),a=n(54015),o=n(14056),l=n(88713),c=n(83699),u=n(13274);const d=i.forwardRef((function({className:e,iconClassName:t,isPlaying:n,isLocked:i,onClick:d=(()=>{}),playAriaLabel:m=o.Ru.get("play")},p){let h=(0,u.jsx)(r.A,{className:t});i?h=(0,u.jsx)(s.u,{size:"large"}):n&&(h=(0,u.jsx)(a._,{className:t}));let g=o.Ru.get("play");return g=i?o.Ru.get("mwp.header.content.unavailable"):n?o.Ru.get("pause"):m,(0,u.jsx)(l.Zp,{label:g,children:(0,u.jsx)("button",{onClick:e=>{d(e,n?"pause":"play"),n||(0,c.aX)(e,"play/resume")},className:e,"aria-label":g,ref:p,children:h})})}))},28275:(e,t,n)=>{"use strict";n.d(t,{$$:()=>o,NV:()=>s,Pj:()=>u,iE:()=>l});var i=n(79474),r=n(13274);let s=function(e){return e.TITLE="title",e.DESCRIPTION="description",e.NONE="NONE",e}({});const a={isOpen:!1,isImagePickerOpen:!1,playlistDetails:{uri:"",name:"",description:"",image:void 0},focusedElement:s.NONE},o=(0,i.createContext)(void 0),l=(0,i.createContext)(a);function c(e,t){switch(t.type){case"open":return{...e,isOpen:!0,playlistDetails:t.playlistDetails,focusedElement:t.focusedElement||s.NONE};case"close":return{...a};case"openWithImagePicker":return{...e,isOpen:!0,isImagePickerOpen:!0,playlistDetails:t.playlistDetails,focusedElement:s.NONE};default:throw new Error("Unknown action received!")}}const u=({children:e})=>{const[t,n]=(0,i.useReducer)(c,a);return(0,r.jsx)(o.Provider,{value:n,children:(0,r.jsx)(l.Provider,{value:t,children:e})})}},43491:(e,t,n)=>{"use strict";n.d(t,{W:()=>d,d:()=>u});var i=n(79474),r=n(49761),s=n(97500),a=n.n(s),o=n(39927);const l="main-contextMenu-tippyWrapper";var c=n(13274);const u={top:"top",topRight:"top-end",topLeft:"top-start",left:"left",leftTop:"left-start",leftBottom:"left-end",bottom:"bottom",bottomLeft:"bottom-start",bottomRight:"bottom-end",right:"right",rightTop:"right-start",rightBottom:"right-end",auto:"auto"},d=({visible:e,overlay:t,placement:n,children:s,childRef:u,maxWidth:d=336,hideArrow:m=!1,className:p="",tippyWrapperClassName:h,popperOptions:g={},onHide:f,zIndex:b,fadeOut:v=!1,useLazyMounting:y=!1,renderInline:_=!0,theme:E="activation",triggerTarget:x,offset:C=[0,14],aria:S,animation:A=!0})=>{const[w,I]=(0,i.useState)(!1),T=(0,i.useMemo)((()=>({onMount:()=>I(!0),onHidden:()=>I(!1)})),[]),N=(0,i.useCallback)(((e,t)=>f?.(t)),[f]),R=(0,o.ZY)();return e||v?(0,c.jsx)(i.Suspense,{fallback:s??null,children:(0,c.jsx)(r.Ay,{animation:!!A&&"shift-toward-subtle",maxWidth:d,aria:S,visible:e,theme:E,placement:n||"auto",interactive:!0,arrow:!m,content:w||!y?t:"",className:p,onClickOutside:N,popperOptions:g,zIndex:b,offset:C,reference:u,triggerTarget:x,...y&&T,appendTo:!R||_?void 0:()=>R.body,children:(0,c.jsx)("div",{className:a()(l,h),children:s})})}):(0,c.jsx)(c.Fragment,{children:s})}},25642:(e,t,n)=>{"use strict";n.d(t,{z:()=>W});var i=n(79474),r=n(98764),s=n(22215),a=n(14056),o=n(13411),l=n(19498),c=n(95999),u=n(26271),d=n(35814),m=n(88291),p=n(15704),h=n(13480),g=n(32334),f=n(97374),b=n(11437),v=n(67302),y=n(35828),_=n(26903),E=n(47469),x=n(41791),C=n(7283),S=n(41955),A=n(30957),w=n(28078),I=n(16482),T=n(53206),N=n(64652),R=n(43418),k=n(49798),O=n(91058),P=n(96042),j=n(9138),L=n(87358),D=n(77962),U=n(92758),M=n(38276),B=n(92633),F=n(18039),H=n(13274);const V=i.memo((function({uri:e,name:t,totalMilliseconds:n,artists:i,isPlayable:r,contentRating:s,imageUrl:o,albumUri:l,contextUri:u,index:V,playcount:z,usePlayContextItem:G,hasAssociatedVideo:W}){const{spec:K}=(0,v.r)(d.i,{data:{position:V,reason:"",uri:e}}),{isActive:Y,isPlaying:q,triggerPlay:Q,togglePlay:$}=G({uri:e,index:V}),Z=(0,b.T)(e),X=(0,C.g)(e,r),{badges:J,hasBadges:ee}=(0,_.b)({downloadAvailability:Z,contentRating:s,hasAssociatedVideo:W}),te=s===y.x7.NineteenPlus,ne=i.map((e=>e.name)).join(a.Ru.getSeparator()),ie=(0,x.c)();return(0,H.jsx)(c.pZ,{value:"row",index:V,children:(0,H.jsx)(m.h,{menu:(0,H.jsx)(S.P,{uri:e,contextUri:u,albumUri:l,artists:i}),children:(0,H.jsxs)(B.w,{uri:e,onTriggerPlay:(e,t)=>{Q({loggingParams:t})},isActive:Y,contextUri:u,isPlayable:X,ageRestricted:te,dragMetadata:{name:t,createdBy:ne},index:V,ariaRowIndex:V,spec:K,children:[(0,H.jsx)(L.y,{ariaColIndex:0,children:(0,H.jsx)(R.$,{uri:e,playAriaLabel:a.Ru.get("tracklist.a11y.play",t,ne),isPlaying:q,isActive:Y,onClick:(e,t)=>{$({loggingParams:t})},spec:K,children:(0,H.jsx)(O.a,{children:V+1})})}),(0,H.jsxs)(D.U,{ariaColIndex:1,children:[(0,H.jsx)(T.e,{src:o}),(0,H.jsxs)(N.l,{children:[ie?(0,H.jsx)(A.Link,{to:e,className:F.A.rowTitle,"":"internal-track-link",children:(0,H.jsx)(M.p,{titleText:t,children:t})}):(0,H.jsx)(M.p,{titleText:t,children:t}),ee&&(0,H.jsxs)(w.P,{children:[J.download&&(0,H.jsx)(h._,{}),J.explicit&&(0,H.jsx)(g.g,{}),J.nineteen&&(0,H.jsx)(f.q,{className:F.A.nineteen,size:16}),J.hasAssociatedVideo&&(0,H.jsx)(p.l,{separator:""})]})]})]}),(0,H.jsx)(U.o,{ariaColIndex:2,children:(0,H.jsx)(P.Y,{playcount:z})}),(0,H.jsxs)(j.l,{ariaColIndex:3,children:[(0,H.jsx)(E.d,{uri:e,spec:K}),(0,H.jsx)(I.P,{duration:n}),(0,H.jsx)(k.Y,{menu:(0,H.jsx)(S.P,{uri:e,albumUri:l,contextUri:u,artists:i}),label:a.Ru.get("more.label.track",t,ne),spec:K})]})]})})})}),((e,t)=>e.uri===t.uri));var z=n(94544);const G="artist-popularTrackList-seeMore",W=({uri:e,nrTracks:t,initialTracks:n})=>{const{usePlayContextItem:d}=(0,u.P)({uri:e},{featureIdentifier:"artist"}),m=(0,s.NC)(l.LX5),[p,h]=(0,i.useState)(!1),g=(0,i.useCallback)((()=>{h(!p)}),[p]),f=(0,i.useCallback)((({uri:e,contextUri:t,totalMilliseconds:n,name:i,artists:r,contentRating:s,isPlayable:a,playcount:o,imageUrl:l,albumUri:c,hasAssociatedVideo:u},p)=>(0,H.jsx)(V,{index:p,uri:e,contextUri:t,totalMilliseconds:n,name:i,artists:r,isPlayable:a,contentRating:s,playcount:o||0,imageUrl:l,albumUri:c,usePlayContextItem:d,hasAssociatedVideo:u&&m},e)),[d,m]),b=(0,i.useCallback)((e=>({uri:e.uri})),[]),v=(0,i.useMemo)((()=>[o.$.INDEX,o.$.TITLE_AND_ARTIST,o.$.PLAYS,o.$.DURATION]),[]);return(0,H.jsxs)(c.pZ,{value:"artist-popular-tracks-list",children:[(0,H.jsx)(z.S4,{ariaLabel:a.Ru.get("tracklist.popular-tracks"),renderRow:f,nrTracks:Math.min(t,p?10:5),tracks:n,resolveItem:b,columns:v}),t>5?(0,H.jsx)("button",{"aria-expanded":p,className:G,onClick:g,children:(0,H.jsx)(r.E,{as:"div",variant:"bodySmallBold",children:p?a.Ru.get("artist-page.tracks.showless"):a.Ru.get("artist-page.tracks.seemore")})}):null]})}},11497:(e,t,n)=>{"use strict";n.d(t,{v:()=>m});var i=n(66675),r=n(81887),s=n(61080),a=n(16212),o=n(14056),l=n(98652),c=n(39658),u=n(25103),d=n(13274);const m=({uri:e,isBook:t=!1})=>{const{isPreSaved:n,addPresave:m,removePresave:p}=(0,l.w)({uri:e,isBook:t});return n?(0,d.jsx)(i.n,{onClick:p,iconTrailing:r.k,children:o.Ru.get("web-player.prerelease.presaved")}):(0,d.jsx)(u.h,{uri:e,action:c.no.SAVE_PRERELEASE,children:(0,d.jsx)(s.$,{disabled:void 0===n,onClick:m,iconTrailing:a.P,children:o.Ru.get("web-player.prerelease.presave")})})}},30692:(e,t,n)=>{"use strict";n.d(t,{E:()=>E,l:()=>y});var i=n(79474),r=n(22215),s=n(45640),a=n(83856),o=n(80499),l=n(77670),c=n(92665),u=n(49622),d=n(98477),m=n(43568);const p=e=>{const t=(0,u.U)(e,d.RB),{metadataOptions:n,contentsOptions:i}=(0,m.$)(t,"");return(0,c.r)(e,n,i)},h=({children:e,callback:t,hoverDelayMs:n=200})=>{const r=(0,i.useRef)();return i.cloneElement(e,{onMouseEnter:i=>{r.current=setTimeout(t,n),e.props.onMouseEnter?.(i)},onMouseLeave:t=>{clearTimeout(r.current),e.props.onMouseLeave?.(t)}})},g=({children:e,callback:t,...n})=>i.cloneElement(e,{onMouseDown:n=>{t(),e.props.onMouseDown?.(n)},...n}),f=({children:e,callback:t})=>{const n=(0,i.useRef)(t);return(0,i.useEffect)((()=>{n.current()}),[]),e};var b=n(19498),v=n(13274);let y=function(e){return e[e.OnMouseDown=0]="OnMouseDown",e[e.OnHover=1]="OnHover",e[e.OnRender=2]="OnRender",e}({});const _=e=>{const t=(e=>{const t=(0,a.o_)(e);switch(t?.type){case a.NQ.ALBUM:return o.w;case a.NQ.PLAYLIST:case a.NQ.PLAYLIST_V2:return p;case a.NQ.ARTIST:return l.R;default:return()=>()=>{}}})(e.uri)(e.uri);switch(e.trigger){case y.OnMouseDown:return(0,v.jsx)(g,{callback:t,children:e.children});case y.OnHover:return(0,v.jsx)(h,{callback:t,hoverDelayMs:e.hoverDelayMs,children:e.children});case y.OnRender:return(0,v.jsx)(f,{callback:t,children:e.children});default:return(0,s.d)(e)}},E=({uri:e,trigger:t,children:n,...s})=>{const a=(0,r.NC)(b.JhO,{loadingValue:!1}),o=i.cloneElement(n,s);return a?(0,v.jsx)(i.Fragment,{children:(0,v.jsx)(_,{uri:e,trigger:t,children:o})},e):o}},60832:(e,t,n)=>{"use strict";n.d(t,{z2:()=>J});var i=n(79474),r=n(97500),s=n.n(r),a=n(88713),o=n(33519),l=n(54551),c=n(33657),u=n(98678),d=n(39927);function m(e,t,n){const i=e.current;if(null===i)return 0;const r=i.getBoundingClientRect();return"vertical"===n?1-Math.max(0,Math.min((t.clientY-r.top)/r.height,1)):Math.max(0,Math.min((t.clientX-r.left)/r.width,1))}var p=n(22215),h=n(19498),g=n(87939);const f=20,b=[{name:"dark",frames:f},{name:"normal",frames:f},{name:"dark",frames:f},{name:"normal",frames:f},{name:"dark",frames:320},{name:"dark",frames:80,isStartOfFlashlightEnter:!0},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"flashlight-on",frames:f},{name:"dark",frames:40},{name:"flashlight-on",isInfinite:!0},{name:"dark",frames:f,isStartOfExit:!0},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"normal",isInfinite:!0,isEndOfExit:!0}],v=200;function y(e,t){const n=document.createElement("canvas"),i=n.getContext("2d");if(null===i)return null;const r=Math.sqrt(e**2+t**2),s=v;return n.width=r/1.5+2*s,n.height=r+2*s,i.translate(s,s),{canvas:n,context:i,width:n.width-2*s,height:n.height-2*s,padding:s}}function _(e,t,n,i,r=0){const s=i/2*Math.PI/180,a=n/Math.cos(s),o=Math.sin(s)*a*2;e.beginPath(),e.moveTo((t-o)/2,r),e.lineTo(t/2,r+n),e.lineTo((t-o)/2+o,r),e.closePath()}function E(e,t){const n=function(e,t){const n=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,g.b)("images/stranger-things-nether-bottom-left.png"),e}),[]),r=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,g.b)("images/stranger-things-nether-bottom-right.png"),e}),[]);return function(i){if(r){const n=e-r.naturalWidth,s=t-r.naturalHeight;i.drawImage(r,0,0,r.naturalWidth,r.naturalHeight,n,s,r.naturalWidth,r.naturalHeight)}if(n){const e=0,r=t-n.naturalHeight;i.drawImage(n,0,0,n.naturalWidth,n.naturalHeight,e,r,n.naturalWidth,n.naturalHeight)}}}(e,t),[r,s]=(0,i.useState)(x(e,t)),[a,o]=(0,i.useState)(C(e,t));return(0,i.useEffect)((()=>{s(x(e,t)),o(C(e,t))}),[e,t]),(i,s,o,l)=>{if(!r||!a)return;const c=o/100,u=s.left+s.width*c,d=s.top+s.height/2;let m=0;m=c>.5?(c-.5)/.5*-60:60-c/.5*60;const p=r.width,h=r.height,g=-r.width/2,f=-r.height,v=p,y=h;i.save(),i.fillStyle="rgba(0, 0, 0, 0.85)",i.fillRect(0,0,e,t);const _=i.createLinearGradient(e/2,0,e/2,t);_.addColorStop(0,"rgba(57, 139, 216, 0.3)"),_.addColorStop(1,"rgba(0, 29, 62, 0.15)"),i.fillStyle=_,i.fillRect(0,0,e,t),"flashlight-on"===b[l].name?(i.save(),i.translate(u,d),i.rotate(m*Math.PI/180),i.globalCompositeOperation="destination-out",i.drawImage(r,0,0,p,h,g,f+100,v,y),i.restore(),n(i),i.save(),i.translate(u,d),i.rotate(m*Math.PI/180),i.globalCompositeOperation="source-over",i.drawImage(a,0,0,p,h,g,f+100,v,y),i.restore()):n(i),i.restore()}}function x(e,t){const n=y(e,t);if(!n)return null;const{canvas:i,context:r,width:s,height:a,padding:o}=n,l=r.createLinearGradient(s/2,0,s/2,a);l.addColorStop(0,"rgba(0, 0, 0, 1)"),l.addColorStop(1,"rgba(0, 0, 0, 0)");const c=r.createLinearGradient(s/2,0,s/2,a);return c.addColorStop(.7,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),r.save(),r.fillStyle="rgba(0, 0, 0, 1)",_(r,s,a,30,120),r.filter="blur(10px)",r.fill(),r.restore(),r.globalCompositeOperation="destination-out",r.fillStyle=c,r.fillRect(-o,-o,s+2*o,a+2*o),r.globalCompositeOperation="source-over",r.fillStyle="rgba(0, 0, 0, 1)",_(r,s,a,5,40),r.filter="blur(30px)",r.fill(),r.fillStyle="rgba(0, 0, 0, 1)",_(r,s,a,30,80),r.filter="blur(40px)",r.fill(),r.restore(),r.globalCompositeOperation="destination-out",r.fillStyle=l,r.fillRect(-o,-o,s+2*o,a+2*o),i}function C(e,t){const n=y(e,t);if(!n)return null;const{canvas:i,context:r,width:s,height:a,padding:o}=n;r.save(),r.fillStyle="rgba(80, 170, 255, 0.6)",_(r,s,a,30,120),r.filter="blur(10px)",r.fill(),r.restore();const l=r.createLinearGradient(s/2,0,s/2,a);l.addColorStop(.7,"rgba(0, 0, 0, 1)"),l.addColorStop(1,"rgba(0, 0, 0, 0)"),r.globalCompositeOperation="destination-out",r.fillStyle=l,r.fillRect(-o,-o,s+2*o,a+2*o),r.globalCompositeOperation="source-over",r.fillStyle="rgba(80, 170, 255, 0.8)",_(r,s,a,5,40),r.filter="blur(30px)",r.fill(),r.fillStyle="rgba(80, 170, 255, 0.4)",_(r,s,a,30,150),r.filter="blur(40px)",r.fill(),r.restore(),r.save(),r.translate(s/2,a-140),r.scale(1,10),r.fillStyle="rgba(198, 238, 251, 0.2)",r.filter="blur(24px)",r.beginPath(),r.arc(0,0,22,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 0.2)",r.filter="blur(18px)",r.beginPath(),r.arc(0,0,20,0,2*Math.PI),r.fill(),r.restore(),r.save(),r.translate(s/2,a-70),r.scale(1,5),r.fillStyle="rgba(198, 238, 251, 0.1)",r.filter="blur(14px)",r.beginPath(),r.arc(0,0,18,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 0.1)",r.filter="blur(8px)",r.beginPath(),r.arc(0,0,20,0,2*Math.PI),r.fill(),r.restore(),r.fillStyle="rgba(100, 190, 255, 1)",r.filter="blur(22px)",r.beginPath(),r.arc(s/2,a+100,20,0,2*Math.PI),r.fill(),r.fillStyle="rgba(198, 238, 251, 1)",r.filter="blur(4px)",r.beginPath(),r.arc(s/2,a+100,14,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 1)",r.filter="blur(1px)",r.beginPath(),r.arc(s/2,a+100,12,0,2*Math.PI),r.fill();const c=r.createLinearGradient(s/2,0,s/2,a);return c.addColorStop(0,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),r.globalCompositeOperation="destination-out",r.fillStyle=c,r.fillRect(-o,-o,s+2*o,a+2*o),r.globalCompositeOperation="source-over",i}const S=100,A=[{size:6,alpha:.5},{size:6,alpha:.4},{size:12,alpha:.3},{size:12,alpha:.3},{size:12,alpha:.3},{size:14,alpha:.2},{size:20,alpha:.2},{size:30,alpha:.2},{size:40,alpha:.1}],w=64,I=8,T=2;function N(e,t){const n=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,g.b)("images/stranger-things-spores.png"),e}),[]),[r,s]=(0,i.useState)(R(e,t));return(0,i.useEffect)((()=>{r?function(e,t,n){e.forEach((e=>{e.x=Math.random()*t,e.y=Math.random()*n}))}(r,e,t):s(R(e,t))}),[e,t,r]),function(i){null!==n&&r.forEach((r=>{r.x-=r.directionX*r.velocityX,r.y-=r.directionY*r.velocityY,r.y>t+10?(r.x=Math.random()*e,r.y=-10):r.x<-10&&(r.x=e+10,r.y=Math.random()*t);const s=r.spriteSheetX,a=r.spriteSheetY,o=w,l=w,c=r.x-r.size/2,u=r.y-r.size/2,d=r.size,m=r.size;i.save(),i.globalAlpha*=r.alpha,i.drawImage(n,s,a,o,l,c,u,d,m),i.restore()}))}}function R(e,t){const n=[];for(let i=0;i<S;i++){const i=Math.floor(Math.random()*A.length),r=Math.floor(Math.random()*I),s=Math.floor(Math.random()*T),a=A[i].size,o=A[i].alpha;n.push({alpha:o,size:a,spriteSheetX:r*w,spriteSheetY:s*w,x:Math.random()*e,y:Math.random()*t,directionX:Math.random()>.5?1:-1,directionY:Math.random()>.5?1:-1,velocityX:a/300,velocityY:a/400})}return n}class k{_subscribers=[];_active=!1;unsubscribeToActivity(e){const t=this._subscribers.findIndex((t=>t.fn===e));-1!==t&&(clearTimeout(this._subscribers[t].inactiveTimeout),this._subscribers.splice(t,1))}subscribeToActivity(e,t){this._subscribers.push({fn:t,msInactive:e,isActive:!1})}enableActivityMonitor(){window.addEventListener("mousemove",this._onActivity),window.addEventListener("mouseup",this._onActivity),window.addEventListener("keydown",this._onActivity),window.addEventListener("scroll",this._onActivity,!0)}disableActivityMonitor(){window.removeEventListener("mousemove",this._onActivity),window.removeEventListener("mouseup",this._onActivity),window.removeEventListener("keydown",this._onActivity),window.removeEventListener("scroll",this._onActivity,!0),this._subscribers.forEach((e=>clearTimeout(e.inactiveTimeout))),this._subscribers=[]}_onActivity=()=>{this._subscribers.forEach((e=>{this._active||(this._active=!0,e.fn(this._active)),clearTimeout(e.inactiveTimeout),e.inactiveTimeout=setTimeout((()=>{this._active=!1,e.fn(this._active)}),e.msInactive)}))}}class O{frame=0;lastPhaseFrame=0;phase=0;animationFrameRequestId=null;flickerTimerId=null;isPlaying=!0;start(){this.lastPhaseFrame=this.frame,this.phase=0;const e=()=>setTimeout((()=>{this.flickerTimerId=e(),this.isPlaying&&b[this.phase].isInfinite&&this.setPhase(b.findIndex((e=>e.isStartOfFlashlightEnter)))}),15e3*Math.random()+5e3);this.flickerTimerId=e()}stop(){const e=b.findIndex((e=>e.isStartOfExit));this.phase<e&&this.setPhase(e),null!==this.flickerTimerId&&clearTimeout(this.flickerTimerId)}setPhase(e){this.lastPhaseFrame=this.frame,this.phase=e}}const P="TNGv07zrye9gB_3ukweR";var j=n(13274);const L=e=>{const{getPercentage:t,isDragging:n=!1,isPlayingStrangerThings:r=!1,progressBar:s}=e,a=(0,i.useMemo)((()=>new k),[]),o=(0,i.useMemo)((()=>new O),[]),l=(0,i.useRef)(null),[c,u]=(0,i.useState)(null),[d,m]=(0,i.useState)(window.innerHeight),[p,h]=(0,i.useState)(window.innerWidth),[g,f]=(0,i.useState)(!1),[v,y]=(0,i.useState)(!1),_=N(p,d),x=E(p,d),C=(0,i.useCallback)((e=>{!n&&r&&(e?o.stop():(o.start(),y(!0)))}),[n,r,o]),S=(0,i.useCallback)((()=>{r&&(o.setPhase(b.findIndex((e=>e.isStartOfFlashlightEnter))),y(!0))}),[r,o]),A=(0,i.useCallback)((()=>{o.stop()}),[o]),w=(0,i.useCallback)((()=>{if(!v)return void f(!0);f(!1);const e=window.innerHeight,t=window.innerWidth;h(t),m(e)}),[v]),I=(0,i.useCallback)((()=>{if(!l.current)return;const{frame:e,lastPhaseFrame:n,phase:i}=o;if(o.frame=e+1,b[i].isEndOfExit)y(!1);else{if(b[i].isInfinite||e-n===b[i].frames&&o.setPhase(i+1),l.current.width=p,l.current.height=d,"normal"!==b[i].name){const e=l.current.getContext("2d");if(!e||!c)return;const n=t();x(e,c,n,i),_(e)}o.animationFrameRequestId=requestAnimationFrame(I)}}),[d,p,x,_,t,c,o]);return(0,i.useEffect)((()=>{window.addEventListener("resize",w);const e=a;return e.enableActivityMonitor(),e.subscribeToActivity(5e3,C),()=>{window.removeEventListener("resize",w),e.disableActivityMonitor(),e.unsubscribeToActivity(C)}}),[a,C,w]),(0,i.useEffect)((()=>{r||o.stop()}),[r,o]),(0,i.useEffect)((()=>{n?S():n||A()}),[n,S,A]),(0,i.useEffect)((()=>{v?(g&&w(),o.animationFrameRequestId=requestAnimationFrame(I)):o.animationFrameRequestId&&cancelAnimationFrame(o.animationFrameRequestId)}),[v,I,w,g,o]),(0,i.useEffect)((()=>{s.current&&u(s.current.getBoundingClientRect())}),[p,d,s]),v?(0,j.jsx)("canvas",{className:P,ref:l,width:p,height:d}):null},D=e=>(0,p.NC)(h.c3z,{loadingValue:!1})&&e.isPlayingStrangerThings?(0,j.jsx)(L,{...e}):null;var U=n(16454);const M="playback-progressbar",B="playback-progressbar-isInteractive",F="progress-bar",H="x-progressBar-progressBarBg",V="x-progressBar-sliderArea",z="oShi2lRbnhFkEr2LlUqC",G="ZqlJ1uWjMeen9ye7Y7GC",W="x-progressBar-fillColor",K="VI_bMRxDl9fS6qksct7W",Y="sW0M_K97doEB3B4Ts58i",q="progress-bar--isDragging",Q="progress-bar__slider",$="DlESgEm0QGtHnESM1mnR",Z="iA1oALYKD8NxtvpRUsT_",X="hMaF66LFzK4KCraLsIXS",J=({value:e,max:t,step:n,labelText:r,isInteractive:p=!0,forceActiveStyles:h=!1,onDragStart:g,onDragMove:f,onDragEnd:b,onStepForward:v,onStepBackward:y,saberConfig:_=null,isPlayingStrangerThings:E=!1,isAttackOnTitanEasterEggActive:x,customPlaybackHandle:C,customPlaybackHandleType:S,direction:A="horizontal",enableAnimation:w,updateFrequency:I,offFrequencyUpdate:T,...N})=>{const R=(0,i.useRef)(null),{isDragging:k,onMouseDown:O}=(({progressBarRef:e,onDragStart:t,onDragMove:n,onDragEnd:r,direction:s="horizontal"})=>{const[a,o]=(0,i.useState)(!1),l=(0,i.useRef)(!1),c=(0,d.ZY)(),p=(0,i.useRef)(t),h=(0,i.useRef)(n),g=(0,i.useRef)(r);p.current=t,h.current=n,g.current=r;const f=(0,u.YQ)((t=>{h.current(m(e,t,s)),l.current=!0}),20,{leading:!0,maxWait:20});return{isDragging:a,onMouseDown:(0,i.useCallback)((t=>{const n=t=>{o(!1),f.cancel(),g.current(m(e,t,s),{wasDraggedBeforeReleased:l.current}),c?.removeEventListener("pointermove",f),l.current=!1};0===t.button&&(p.current(m(e,t,s)),o(!0),c?.addEventListener("pointermove",f),c?.addEventListener("pointerup",n,{once:!0}),l.current=!1)}),[f,e,s,c])}})({progressBarRef:R,onDragStart:g,onDragMove:f,onDragEnd:b,direction:A}),P=p?100*Math.max(0,Math.min(1,e/t)):0,L=h||k,J=p&&null!==_,ee=p&&!(0,c.n)(),te=(({onStepForward:e,onStepBackward:t,value:n})=>(0,u.YQ)((i=>{parseFloat(i.target.value)>n?e?.():t?.()}),100,{trailing:!1,leading:!0,maxWait:200}))({onStepForward:v,onStepBackward:y,value:e}),ne=(0,i.useCallback)((()=>P),[P]),ie=(0,i.useRef)(document.visibilityState),re=document.visibilityState,se=k||T||"hidden"===re||"hidden"===ie.current||0===e;ie.current=re;const ae=w?z:"";return(0,j.jsxs)("div",{className:s()(M,{[B]:p,[G]:se}),"":N["data-testid"],children:[(0,j.jsx)(U.o,{disabled:!p,type:"range",min:0,max:t,value:e,step:n,onChange:te,"aria-valuetext":N["aria-valuetext"],children:r}),(0,j.jsxs)("div",{className:s()(F,{[K]:null!==_,[q]:L}),style:{...J?_:null,"--progress-bar-transform":`${P}%`,"--progress-bar-duration":`${Number(I)}ms`,...x?{"--fg-color":o.q,"--is-active-fg-color":o.q}:null},onPointerDown:O,"":"progress-bar",children:[J?(0,j.jsx)("div",{className:Y,"":"progress-bar-saber-overlay"}):null,(0,j.jsxs)("div",{ref:R,className:H,"":"progress-bar-background",children:[(0,j.jsx)("div",{className:V,children:(0,j.jsx)("div",{className:s()(W,ae)})}),C?(0,j.jsx)(a.Zp,{label:C.name,showDelay:2250,children:(0,j.jsx)("div",{className:s()($,ae),children:(0,j.jsx)("img",{className:s()(Z,{[X]:S===l.I.TURTLE}),src:C.url,alt:C.name})})}):(0,j.jsx)("div",{className:s()(Q,ae)})]}),ee&&(0,j.jsx)("div",{style:{width:"100%"},children:(0,j.jsx)(D,{getPercentage:ne,progressBar:R,isPlayingStrangerThings:E,isDragging:k})})]})]})}},54387:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var i=n(79474);const r="main-progressRing-circleShadow",s="main-progressRing-circleColor";var a=n(13274);const o=20*Math.PI,l=i.memo((function({percentage:e,size:t,ariaValueText:n},i){const l=o-e/100*o;return(0,a.jsxs)("svg",{height:t,width:t,viewBox:"0 0 24 24",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e),...n?{"aria-valuetext":n}:{},...i,children:[(0,a.jsx)("circle",{className:r,r:"10",cx:"12",cy:"12"}),(0,a.jsx)("circle",{"":"circleColor",className:s,strokeDasharray:`${o} ${o}`,strokeDashoffset:`${l}`,r:"10",cx:"12",cy:"12"}),(0,a.jsx)("rect",{width:"6",height:"6",fill:"white",x:"9",y:"9"})]})}))},68355:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});var i=n(79474),r=n(14056),s=n(45132),a=n(13274);const o=i.memo((function({onClose:e,onRemove:t,isOpen:n,tracks:i,title:o}){return(0,a.jsx)(s.T,{"aria-label":o,titleText:o,onConfirm:n=>{t(i),e(n)},onClose:e,confirmText:r.Ru.get("remove"),descriptionText:r.Ru.get("playlist.remove_multiple_description"),cancelText:r.Ru.get("playlist.delete-cancel"),isOpen:n})}))},28580:(e,t,n)=>{"use strict";n.d(t,{Ad:()=>a,O_:()=>s,wK:()=>o});var i=n(79474),r=n(13274);const s=(0,i.createContext)({ids:[],setIds:()=>{},dropOriginUri:void 0,setDropOriginUri:()=>{},sectionId:0,setSectionId:()=>{},draggingIsInProgress:!1,setDraggingIsInProgress:()=>{}}),a=({children:e})=>{const[t,n]=(0,i.useState)([]),[a,o]=(0,i.useState)(void 0),[l,c]=(0,i.useState)(0),[u,d]=(0,i.useState)(!1);return(0,r.jsx)(s.Provider,{value:{ids:t,setIds:n,dropOriginUri:a,setDropOriginUri:o,sectionId:l,setSectionId:c,draggingIsInProgress:u,setDraggingIsInProgress:d},children:e})};function o(){return(0,i.useContext)(s).ids}},9776:(e,t,n)=>{"use strict";n.d(t,{JT:()=>o,ZC:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({children:e,mainLandmarkRef:t,lyricsCinemaRef:n,leftSidebarRef:i,rightSidebarRef:a,nowPlayingBarRef:o})=>(0,r.jsx)(s.Provider,{value:{mainLandmarkRef:t,lyricsCinemaRef:n,leftSidebarRef:i,rightSidebarRef:a,nowPlayingBarRef:o},children:e}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("GlobalElementRefsContext used without being initialized.");return e}},71210:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,g:()=>u});var i=n(79474),r=n(98678),s=n(42360),a=n(43364),o=n(63265);const l=30;function c(){const e=parseInt(o.A.TRACKLIST_HEADER_HEIGHT,10),t=a.uC+e;u((0,s.v7)(),t,30)}function u(e,t=l,n=l,s=l,a=200){const o=(0,r.YQ)((t=>{if(!e.current)return;const n=t<0?-1:1,i=100*t*t;e.current.scrollTop=e.current.scrollTop+n*i}),50,{leading:!0,trailing:!1,maxWait:50}),c=(0,i.useCallback)((()=>{if(!e.current)return;let i=0,r=0,l=null,c=Date.now(),u=0;const d=e.current.getBoundingClientRect(),m=()=>{l&&window.cancelAnimationFrame(l),l=null,o.cancel()},p=()=>{o(u),l=window.requestAnimationFrame(p)},h=e=>{i=e.clientY,r=e.clientX,u=(()=>{const{top:e,right:o,bottom:l,left:u}=d;if(!(r>=u&&r<=o))return 0;const m=e,p=e+t+s,h=l-n-s,g=l;let f=0;const b=i>=m&&i<=p,v=i>=h&&i<=g,y=Date.now()-c;if(b&&y>a)if(i<p-s)f=-1;else{const e=m+t;f=(i-e)/(p-e)-1}else v&&y>a&&(f=i>g-s?1:(i-h)/(g-n-h));return b||v||(c=Date.now()),f})(),0!==u?l??=window.requestAnimationFrame(p):m()},g=()=>{m(),document.removeEventListener("dragover",h)};document.addEventListener("dragend",g,{once:!0}),document.addEventListener("drop",g,{once:!0}),document.addEventListener("pointerup",g,{once:!0}),document.addEventListener("dragover",h)}),[s,n,t,a,e,o]);(0,i.useEffect)((()=>(document.addEventListener("dragstart",c),()=>{document.removeEventListener("dragstart",c)})),[c])}},82372:(e,t,n)=>{"use strict";n.d(t,{g:()=>o,s:()=>l});var i=n(79474),r=n(83608),s=n(13274);const a=(0,r.vt)((e=>({lastFilterState:"",lastFilteredUri:"",setLastState:(t,n)=>{e({lastFilterState:t,lastFilteredUri:n})}}))),o=(0,i.createContext)({setFilter:()=>{throw new Error("setFilter must be used within a FilterProvider")},filter:""}),l=({uri:e,children:t})=>{const{lastFilterState:n,lastFilteredUri:r,setLastState:l}=a.getState(),[c,u]=(0,i.useState)(r===e?n:""),d=(0,i.useCallback)((t=>{u(t),l(t,e)}),[l,e]),m=(0,i.useMemo)((()=>({filter:c,setFilter:d})),[c,d]);return(0,s.jsx)(o.Provider,{value:m,children:t})}},49622:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,U:()=>l});var i=n(79474),r=n(82052),s=n(13274);const a=e=>Boolean(e);function o({uri:e,children:t,defaultState:n,sortContext:o,localStorageKey:l="sortedState",validator:c=a}){const[u={},d]=(0,r.x)(l,{}),m=(0,i.useRef)(u);(0,i.useEffect)((()=>{m.current=u}));const p=(0,i.useCallback)((t=>{if(JSON.stringify(t)===JSON.stringify(n)){const t={...m.current};delete t[e],d(t)}else d({...m.current,[e]:t})}),[n,d,e]),h=(0,i.useMemo)((()=>{const t=u[e];return{sortState:c(t)?t:n,setSortState:p}}),[u,e,c,n,p]);return(0,s.jsx)(o.Provider,{value:h,children:t})}const l=(e,t,n="sortedState",i=a)=>{const[s={}]=(0,r.x)(n,{}),o=s[e];return i(o)?o:t}},61284:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SeeAll:()=>d,default:()=>m});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(14056),l=n(30957);const c="search-recentSearches-seeAll";var u=n(13274);const d=(0,i.memo)((function(e){const{link:t,pageId:n,className:i,label:r,state:d,pathname:m,onClick:p}=e;return(0,u.jsx)(l.default,{to:t,className:s()(c,i),pageId:n,state:d,pathname:m,"":e["data-testid"],onClick:p,children:(0,u.jsx)(a.E,{variant:"bodySmallBold",children:r||o.Ru.get("search.see-all")})})})),m=d},67447:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var i=n(64658),r=n(96642),s=n(79474),a=n(65329),o=n(67302);var l=n(13274);const c=({index:e,id:t,...n})=>{const{seeAllUri:c}=n,{onClickShelfTitle:u,onClickShelfSeeAll:d,spec:m}=(({seeAllUri:e,index:t,id:n})=>{const{spec:i,logger:r}=(0,o.r)(a.f,{data:{identifier:n,position:t,uri:e??""}}),l=(0,s.useCallback)((()=>{const e=i.swipeUiReveal();r.logInteraction(e)}),[r,i]),c=(0,s.useCallback)((e=>{const t=i.shelfHeaderFactory().shelfCarouselControlsFactory(),n="next"===e?t.shelfCarouselControlsNextFactory():t.shelfCarouselControlsPreviousFactory();r.logInteraction(n.hitUiReveal())}),[r,i]);return{onClickShelfTitle:(0,s.useCallback)((()=>{const t=i.shelfHeaderFactory().shelfHeaderTitleFactory().hitUiNavigate({destination:e??""});r.logInteraction(t)}),[r,e,i]),onClickShelfSeeAll:(0,s.useCallback)((()=>{const t=i.shelfHeaderFactory().shelfHeaderSeeAllFactory().hitUiNavigate({destination:e??""});r.logInteraction(t)}),[r,e,i]),onSwipe:l,onClickCarouselControls:c,spec:i}})({seeAllUri:c,index:e,id:t});return(0,l.jsx)(i.r,{spec:m,children:(0,l.jsx)(r.$,{...n,onClickShelfTitle:u,onClickShelfSeeAll:d})})}},96642:(e,t,n)=>{"use strict";n.d(t,{$:()=>A});var i=n(79474),r=n(97500),s=n.n(r),a=n(38076),o=n(30980),l=n(65132),c=n(94300),u=n(75783),d=n(98764),m=n(2394),p=n(78278),h=n(14056),g=n(10072);const f="wPxPHYvMnLIjAdubiOBB",b="VFhWb3KBXEqkAi9XtTEQ",v="_HnlZlDZv0UbjotlEX6P";var y=n(13274);const _=(0,i.lazy)((()=>Promise.resolve().then(n.bind(n,61284)))),E=i.memo((function({pretitle:e,title:t,media:n,titleVariant:r="titleMedium",seeAllUri:a,pageId:o,hasMoreElements:l,seeAllLabel:c=h.Ru.get("shelf.see-all"),className:E,seeAllProps:x,onClickTitle:C,onClickSeeAll:S}){return(0,y.jsx)(m.v,{"":"list-row-shelf-header",id:"header-only",pretitle:(0,y.jsx)(u.d,{variant:"mesto",semanticColor:"textSubdued",children:e}),className:s()(f,E),title:(0,y.jsx)(u.d,{semanticColor:"textBase",children:l?(0,y.jsx)(g.N,{"":"see-all-link",to:a||"",pageId:o,onClick:C,..."boolean"==typeof l?void 0:l,children:t}):(0,y.jsx)(d.E,{variant:r,semanticColor:"textBase",tabIndex:-1,children:t})}),media:(0,y.jsx)(p.C,{className:v,src:n,circle:!0}),trailing:l&&(0,y.jsx)(i.Suspense,{fallback:!0,children:(0,y.jsx)(_,{link:a||"",className:b,pageId:o,onClick:S,label:c,..."boolean"==typeof l?void 0:l,...x})})})}));var x=n(52458),C=n(6021);const S=i.memo((function({title:e,tagline:t,children:n,seeAllUri:r,showAll:a,className:c="",total:u,testId:d="component",pageId:m,seeAllLabel:p,alwaysShowSeeAll:h=!1,showSeeAll:g=!0,onClickShelfTitle:f,onClickShelfSeeAll:b,elementRef:v,renderSubHeader:_,listRowHeaderProps:S,forceTitleClickNavigation:A,rowGap:w,colGap:I,withEncoreCards:T=!0,fullPage:N=!1}){const[R,k]=(0,i.useState)(0),[O,P]=(0,i.useState)(1),j=(0,l.R)(),L=(0,i.useCallback)((({columnCount:e})=>{if(k(e),a)P(1/0);else{const t=j.getMaxRowCount?.(e)??1,n=Math.max(1,Math.min(Math.floor((u??1/0)/e),t));P(n)}}),[u,a,j]),D=(0,i.useCallback)((({columnCount:e})=>{const t=e*O;return(0,y.jsx)(y.Fragment,{children:a?n:Array.isArray(n)&&n.flat().filter(((e,n)=>n<t))})}),[a,n,O]);if(Array.isArray(n)&&0===n.length)return null;const U=!!g&&((u&&u>R||h)&&!!r&&!a);return(0,y.jsxs)("section",{ref:v,className:s()(c,C.A.shelf,"Shelf",{[C.A.withEncoreCards]:T,[C.A.fullPage]:N}),"":`${d}-shelf`,"aria-label":e,children:[e&&(0,y.jsx)("div",{className:C.A.header,children:S?(0,y.jsx)(E,{seeAllUri:r,seeAllLabel:p,pageId:m,hasMoreElements:U,onClickTitle:f,onClickSeeAll:b,...S}):(0,y.jsx)(x.U,{title:e,tagline:t,seeAllUri:r,seeAllLabel:p,pageId:m,hasMoreElements:U,onClickTitle:f,onClickSeeAll:b,forceTitleClickNavigation:A,titleVariant:N?"titleMedium":void 0})}),_&&(0,y.jsx)("div",{className:C.A.subHeader,children:_()}),(0,y.jsx)(o.E,{className:s()(C.A.shelfGrid,{[C.A.singleRow]:!a}),render:D,onLayoutChange:L,rowGap:w,colGap:I,rowCount:O})]})}));S.displayName="BaseShelf";const A=e=>(0,y.jsx)(a.s,{onError:e=>{(0,c.Jy)(e,"Shelf")},children:(0,y.jsx)(S,{...e})})},52458:(e,t,n)=>{"use strict";n.d(t,{U:()=>m});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(14056),l=n(61284),c=n(10072),u=n(6021),d=n(13274);const m=i.memo((function({title:e,titleVariant:t="titleSmall",tagline:n,seeAllUri:i,pageId:r,hasMoreElements:m,seeAllLabel:p=o.Ru.get("shelf.see-all"),className:h,seeAllProps:g,onClickTitle:f,onClickSeeAll:b,forceTitleClickNavigation:v}){return(0,d.jsxs)("div",{className:s()(u.A.topRow,h),children:[(0,d.jsxs)("div",{className:u.A.titleWrapper,children:[m||v?(0,d.jsx)(a.E,{as:"h2",variant:t,semanticColor:"textBase",children:(0,d.jsx)(c.N,{"":"see-all-link",to:i||"",pageId:r,className:u.A.title,onClick:f,..."boolean"==typeof m?void 0:m,children:e})}):(0,d.jsx)(a.E,{as:"h2",variant:t,semanticColor:"textBase",className:u.A.title,tabIndex:-1,children:e}),n&&(0,d.jsx)(a.E,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",children:n})]}),m&&(0,d.jsx)(l.default,{link:i||"",className:u.A.seeAll,pageId:r,onClick:b,label:p,..."boolean"==typeof m?void 0:m,...g})]})}))},5566:(e,t,n)=>{"use strict";n.d(t,{_:()=>d});var i=n(79474),r=n(97500),s=n.n(r),a=n(98196),o=n(30980),l=n(10801),c=n(6021),u=n(13274);const d=(0,i.memo)((({children:e,isLoading:t,showAll:n,withTitle:r})=>{const d=(0,i.useCallback)((({columnCount:t})=>(0,u.jsx)(u.Fragment,{children:n?e:Array.isArray(e)&&e.filter(((e,n)=>n<t))})),[e,n]);return Array.isArray(e)&&0===e.length?null:(0,u.jsxs)("section",{className:c.A.skeletonShelf,"":"skeleton-shelf",children:[r&&(0,u.jsx)("div",{className:c.A.header,children:(0,u.jsx)("div",{className:c.A.topRow,children:(0,u.jsx)("div",{className:c.A.titleWrapper,children:(0,u.jsx)(l.Y,{as:"span",charCount:25,className:c.A.title,isLoading:t})})})}),(0,u.jsx)(o.E,{className:s()(c.A.shelfGrid,{[c.A.singleRow]:!n}),rowGap:a.CJ,colGap:a.CJ,render:d,rowCount:1})]})}))},10801:(e,t,n)=>{"use strict";n.d(t,{Y:()=>u});var i=n(97500),r=n.n(i),s=n(98764),a=n(68035);const o="dxnMpEuxRQ5Ml60ftDcz",l="jFPYamKaGvZv7JA45KCu";var c=n(13274);const u=({as:e,variant:t,className:n,charCount:i,isLoading:u})=>{const d=(0,a.h)("shimmer");return(0,c.jsx)(s.E,{ref:d,as:e,variant:t,className:r()(o,n,{[l]:u}),style:{width:i?`${i}ch`:void 0},tabIndex:-1,"aria-hidden":!0})}},95063:(e,t,n)=>{"use strict";n.d(t,{g:()=>k});var i=n(79474),r=n(3074),s=n.n(r),a=n(55138),o=n(3265),l=n(98764),c=n(22215),u=n(12714),d=n(67302),m=n(82548),p=n(25317),h=n(12210),g=n(20273),f=n(29977),b=n(53603),v=n(14056),y=n(96729),_=n(627),E=n(13274);const x=({onSelect:e})=>{const{viewMode:t,setViewMode:n}=(0,_.a)();return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(f.y,{children:v.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as")}),y.i.map((({value:i,icon:r,text:s},a)=>(0,E.jsx)(b.D,{role:"menuitemradio","aria-checked":t===i,divider:a===y.i.length-1?"after":void 0,autoClose:!1,leadingIcon:r(),onClick:()=>{n(i),e?.(i)},children:s()},i)))]})};var C=n(13411);const S=({heading:e,selected:t,onSelect:n,options:i,enableViewModeMenu:r=!1,onSelectViewMode:s,sortOrder:a,...o})=>{let l;a&&(a===C.H.ASC||a===C.H.SECONDARY_ASC?l=p.U:a!==C.H.DESC&&a!==C.H.SECONDARY_DESC||(l=h.R));return(0,E.jsxs)(g.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),...o,children:[e?(0,E.jsx)(f.y,{children:e}):null,i.map((({key:e,value:i},r)=>(0,E.jsx)(b.D,{role:"menuitemradio","aria-checked":e===t.key,CheckedIcon:l,onClick:()=>n(e,r),children:i},e))),r&&(0,E.jsx)(x,{onSelect:s})]})};var A=n(70746),w=n(65325);const I="x-sortBox-sortDropdown",T="cvTLPmjt6T7M85EKcB8w",N="SbDHY3fVADNJ4l9qOLQ2",R=({isOpen:e,className:t})=>e?(0,E.jsx)(a.J,{size:"small","aria-hidden":"true",className:t}):(0,E.jsx)(o.y,{size:"small","aria-hidden":"true",className:t}),k=({heading:e,options:t,selected:n,onSelect:r,sortOrder:a,variant:o="bodySmall",semanticColor:p,disabled:h,onClick:g,ariaLabel:f,enableViewModeMenu:b=!1})=>{const v=(0,c.NC)(m.mA)&&b,{viewMode:_}=(0,A.a)();n||(n=t?.[0]);const x=y.i.find((({value:e})=>e===_))||y.i[0],C=(0,i.useMemo)((()=>`sortboxlist-${s().create().hex}`),[]),{spec:k,logger:O}=(0,d.r)(u.d,{});return(0,E.jsx)(w.b,{menu:(0,E.jsx)(S,{selected:n,options:t,onSelect:(e,t)=>{r(e,t);const n=k.sortBySectionFactory().sortOptionFactory({identifier:e}).hitSort();O.logInteraction(n)},sortOrder:a,heading:e,enableViewModeMenu:v,onSelectViewMode:e=>{const t=k.viewAsSectionFactory().viewOptionFactory({identifier:e}).hitUiElementToggle();O.logInteraction(t)},id:C}),children:(e,t,i)=>(0,E.jsxs)("button",{className:I,onClick:e=>{h||(g?.(e),t(e))},ref:i,type:"button","aria-label":f,role:"combobox","aria-controls":C,"aria-expanded":e,children:[(0,E.jsx)(l.E,{semanticColor:p,variant:o,className:T,children:n?.value||(v?x.text():"")}),v?x.icon():(0,E.jsx)(R,{isOpen:e,className:N})]})})}},60178:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});const i="liKqY2CEkAKTwX2SfNCu",r="fwTMCeAaUoWDj9WcQbgy",s="bEEDwYBSsninmQ7a4QK9";var a=n(97500),o=n.n(a),l=n(21820),c=n(13274);const u=({className:e,noLink:t=!1,customLink:n="/",hasText:a=!1})=>{const u=(0,c.jsxs)("svg",{viewBox:"0 0 167.5 167.5",className:o()(s),children:[(0,c.jsx)("title",{children:"Spotify"}),(0,c.jsx)("path",{fill:"currentColor",d:"M83.7 0C37.5 0 0 37.5 0 83.7c0 46.3 37.5 83.7 83.7 83.7 46.3 0 83.7-37.5 83.7-83.7S130 0 83.7 0zM122 120.8c-1.4 2.5-4.6 3.2-7 1.7-19.8-12-44.5-14.7-73.7-8-2.8.5-5.6-1.2-6.2-4-.2-2.8 1.5-5.6 4-6.2 32-7.3 59.6-4.2 81.6 9.3 2.6 1.5 3.4 4.7 1.8 7.2zM132.5 98c-2 3-6 4-9 2.2-22.5-14-56.8-18-83.4-9.8-3.2 1-7-1-8-4.3s1-7 4.6-8c30.4-9 68.2-4.5 94 11 3 2 4 6 2 9zm1-23.8c-27-16-71.6-17.5-97.4-9.7-4 1.3-8.2-1-9.5-5.2-1.3-4 1-8.5 5.2-9.8 29.6-9 78.8-7.2 109.8 11.2 3.7 2.2 5 7 2.7 10.7-2 3.8-7 5-10.6 2.8z"})]}),d=(0,c.jsxs)("svg",{viewBox:"0 0 1134 340",className:o()(r),children:[(0,c.jsx)("title",{children:"Spotify"}),(0,c.jsx)("path",{fill:"currentColor",d:"M8 171c0 92 76 168 168 168s168-76 168-168S268 4 176 4 8 79 8 171zm230 78c-39-24-89-30-147-17-14 2-16-18-4-20 64-15 118-8 162 19 11 7 0 24-11 18zm17-45c-45-28-114-36-167-20-17 5-23-21-7-25 61-18 136-9 188 23 14 9 0 31-14 22zM80 133c-17 6-28-23-9-30 59-18 159-15 221 22 17 9 1 37-17 27-54-32-144-35-195-19zm379 91c-17 0-33-6-47-20-1 0-1 1-1 1l-16 19c-1 1-1 2 0 3 18 16 40 24 64 24 34 0 55-19 55-47 0-24-15-37-50-46-29-7-34-12-34-22s10-16 23-16 25 5 39 15c0 0 1 1 2 1s1-1 1-1l14-20c1-1 1-1 0-2-16-13-35-20-56-20-31 0-53 19-53 46 0 29 20 38 52 46 28 6 32 12 32 22 0 11-10 17-25 17zm95-77v-13c0-1-1-2-2-2h-26c-1 0-2 1-2 2v147c0 1 1 2 2 2h26c1 0 2-1 2-2v-46c10 11 21 16 36 16 27 0 54-21 54-61s-27-60-54-60c-15 0-26 5-36 17zm30 78c-18 0-31-15-31-35s13-34 31-34 30 14 30 34-12 35-30 35zm68-34c0 34 27 60 62 60s62-27 62-61-26-60-61-60-63 27-63 61zm30-1c0-20 13-34 32-34s33 15 33 35-13 34-32 34-33-15-33-35zm140-58v-29c0-1 0-2-1-2h-26c-1 0-2 1-2 2v29h-13c-1 0-2 1-2 2v22c0 1 1 2 2 2h13v58c0 23 11 35 34 35 9 0 18-2 25-6 1 0 1-1 1-2v-21c0-1 0-2-1-2h-2c-5 3-11 4-16 4-8 0-12-4-12-12v-54h30c1 0 2-1 2-2v-22c0-1-1-2-2-2h-30zm129-3c0-11 4-15 13-15 5 0 10 0 15 2h1s1-1 1-2V93c0-1 0-2-1-2-5-2-12-3-22-3-24 0-36 14-36 39v5h-13c-1 0-2 1-2 2v22c0 1 1 2 2 2h13v89c0 1 1 2 2 2h26c1 0 1-1 1-2v-89h25l37 89c-4 9-8 11-14 11-5 0-10-1-15-4h-1l-1 1-9 19c0 1 0 3 1 3 9 5 17 7 27 7 19 0 30-9 39-33l45-116v-2c0-1-1-1-2-1h-27c-1 0-1 1-1 2l-28 78-30-78c0-1-1-2-2-2h-44v-3zm-83 3c-1 0-2 1-2 2v113c0 1 1 2 2 2h26c1 0 1-1 1-2V134c0-1 0-2-1-2h-26zm-6-33c0 10 9 19 19 19s18-9 18-19-8-18-18-18-19 8-19 18zm245 69c10 0 19-8 19-18s-9-18-19-18-18 8-18 18 8 18 18 18zm0-34c9 0 17 7 17 16s-8 16-17 16-16-7-16-16 7-16 16-16zm4 18c3-1 5-3 5-6 0-4-4-6-8-6h-8v19h4v-6h4l4 6h5zm-3-9c2 0 4 1 4 3s-2 3-4 3h-4v-6h4z"})]}),m=a?d:u;return t?(0,c.jsx)("div",{className:o()(i,e),children:m}):n.startsWith("https://")?(0,c.jsx)("a",{href:n,className:o()(i,e),children:m}):(0,c.jsx)(l.k,{to:n,className:o()(i,e),children:m})}},75257:(e,t,n)=>{"use strict";n.d(t,{l:()=>d});var i=n(97500),r=n.n(i);const s="x-toggle-wrapper",a="x-toggle-indicator",o="JCFCfOY_6UEZZSOO2xrl",l="x-toggle-indicatorWrapper",c="x-toggle-input";var u=n(13274);const d=({value:e,disabled:t,onSelected:n,id:i,className:d,condensed:m=!1,inputRef:p})=>(0,u.jsxs)("label",{className:r()(s,d),children:[(0,u.jsx)("input",{id:i,className:c,type:"checkbox",disabled:t,checked:e,onChange:e=>{const t=e.target.checked;n(t)},ref:p}),(0,u.jsx)("span",{className:r()(l,{[o]:m}),children:(0,u.jsx)("span",{className:r()(a,{[o]:m})})})]})},67878:(e,t,n)=>{"use strict";n.d(t,{z:()=>d});var i=n(79474),r=n(97500),s=n.n(r),a=n(22492),o=n(68172);const l="qSTDtICR1fiIGRni1cwy",c="CUSHxAzlZWmBNuM0o1Vq";var u=n(13274);const d=({children:e,className:t,arrowClassName:n,disableAutoFocus:r})=>{const d=(0,i.useRef)(null);return(0,o.s)(),(0,a.i)({ref:r?{current:null}:d,preventScroll:!0}),(0,u.jsxs)("div",{...r&&{tabIndex:-1},ref:d,onClick:e=>{e.stopPropagation()},onContextMenu:e=>{e.stopPropagation()},className:s()(l,t),children:[e,(0,u.jsx)("div",{"data-popper-arrow":"",className:s()(c,n)})]})}},56333:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var i=n(87882),r=n(13274);const s=({children:e,content:t,...n})=>(0,r.jsx)(i.t,{renderInline:!0,preventScrollingWhileOpen:!1,placement:"top-start",menu:t,...n,children:e})},86082:(e,t,n)=>{"use strict";n.d(t,{g:()=>u});var i=n(79474),r=n(97500),s=n.n(r),a=n(41615),o=n(10988),l=n(62415),c=n(13274);const u=({children:e,className:t=""})=>{const{elementRef:n}=i.useContext(o.J),r=s()(l.A.topbarContent,t);return n?(0,a.createPortal)((0,c.jsx)("div",{"":"topbar-content",className:r,children:e}),n):null}},10988:(e,t,n)=>{"use strict";n.d(t,{J:()=>s,X:()=>a});var i=n(79474),r=n(13274);const s=i.createContext({}),a=({children:e})=>{const[t,n]=i.useState();return(0,r.jsx)(s.Provider,{value:{elementRef:t,setElementRef:n},children:e})}},47304:(e,t,n)=>{"use strict";n.d(t,{N:()=>h});var i=n(97500),r=n.n(i),s=n(79474),a=n(3498),o=n(30957);const l="nLNTsyonBwoRIzAv1AME",c="E4I5I7G2CfW32hLWZaqE",u="w4ZoklZWkrsyrVA34vI8";var d=n(13274);const m=({title:e,uri:t,className:n,onClick:i,position:l})=>{const m=(0,s.useCallback)((e=>{i?.(e,{uri:t,position:l})}),[i,l,t]);return(0,d.jsx)(o.Link,{"aria-label":e,className:r()(c,u,n),to:t,onClick:m,children:(0,d.jsx)(a.v,{as:"span",children:e})})};function p(e){return!!e.uri&&!!e.title}const h=({topics:e,className:t,onClick:n})=>(0,d.jsx)("div",{className:r()(l,t),children:e.filter(p).map(((e,t)=>{const i=`${e.uri}-${t}`;return(0,d.jsx)(m,{title:e.title,uri:e.uri,position:t,onClick:n},i)}))})},90661:(e,t,n)=>{"use strict";n.d(t,{S1:()=>o,z1:()=>l});var i=n(79474),r=n(13274);const s=[0,()=>{}],a=(0,i.createContext)(s),o=({children:e})=>{const t=(0,i.useState)(0);return(0,r.jsx)(a.Provider,{value:t,children:e})},l=()=>{const e=(0,i.useContext)(a);if(!e)throw Error("useNrValidItemsContext must be used within a NrValidItemsProvider");return e}},35289:(e,t,n)=>{"use strict";n.d(t,{k:()=>o,m:()=>a});var i=n(79474),r=n(42529),s=n(13274);const a=(0,i.createContext)({toggleSelected:()=>!1,isSelected:()=>!1,getSelected:()=>[],clearSelected:()=>{},selectAll:()=>{},pushPopSelected:()=>{}});function o({resolveItem:e,getItems:t,nrTracks:n,children:o}){const l=(0,i.useRef)([{index:0,range:[]}]),c=(0,i.useContext)(r.w),{canMoveMultipleItems:u}=c.getCapabilities(),d=(0,i.useRef)({}),[m,p]=(0,i.useState)(0),h=e=>{d.current=e(d.current),p((e=>e+1))},g=e=>t(e,e,{cachedOnly:!0})[0],f=()=>{Object.keys(d.current).length>0&&h((()=>({}))),l.current=[{index:0,range:[]}]},b=t=>{const n=g(t);if(!n)return!1;const{uid:i=t.toString()}=e(n,t);return Boolean(n&&d.current[i])},v=t=>{b(t)?(t=>{const n=g(t),{uid:i=t.toString()}=e(n,t);h((e=>(delete e[i],{...e}))),l.current.length>1&&l.current.pop()})(t):(t=>{const n=g(t);if(!n)return;const{uri:i,uid:r=t.toString(),type:s}=e(n,t);i&&r&&(h((e=>({...e,[r]:{uid:r,uri:i,index:t,type:s}}))),l.current.push({index:t,range:[]}))})(t)};return(0,s.jsx)(a.Provider,{value:{toggleSelected:(t,n,i)=>{u&&(n||i)||f(),u&&n?(t=>{const n={...d.current},i=l.current[l.current.length-1];i.range.forEach((e=>{delete n[e]})),i.range=[];const r=Math.min(i.index,t),s=Math.max(i.index,t);for(let t=r;t<=s;t++){const r=g(t);if(!r)continue;const{uri:s,uid:a=t.toString(),type:o}=e(r,t);s&&a&&(n[a]={uid:a,uri:s,index:t,type:o},i.range.push(t))}h((()=>n))})(t):v(t)},isSelected:b,getSelected:()=>Object.values(d.current).sort(((e,t)=>e.index-t.index)),clearSelected:f,selectAll:()=>{const i=t(0,n,{cachedOnly:!0}),r={},s=Array.from(Array(n).keys());for(let t=0;t<=n;t++){const n=i[t];if(!n)continue;const{uri:s,uid:a=t.toString(),type:o}=e(n,t);s&&a&&(r[a]={uid:a,uri:s,index:t,type:o})}h((()=>r)),l.current=[{index:0,range:s}]},pushPopSelected:(e,t)=>{u||f();const n=e+t,i=b(e),r=b(n);r?v(e):i&&!r?v(n):i||r||(v(n),v(e))}},children:o})}},94544:(e,t,n)=>{"use strict";n.d(t,{FL:()=>ge,S4:()=>_e});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(79474),r=n(97500),s=n.n(r),a=n(15945),o=n(14056),l=n(5587),c=n(11390),u=n(24032),d=n(42360),m=n(74938),p=n(24290),h=n(17092),g=n(72460),f=n(82372);const b=e=>{const{filter:t}=(0,i.useContext)(f.g),n=(0,i.useRef)(!1);(0,i.useEffect)((()=>{n.current=!0;const e=setTimeout((()=>{n.current=!1}),1e3);return()=>{clearTimeout(e)}}),[t]),(0,i.useEffect)((()=>{""===t&&n.current&&e()}))};var v=n(83856),y=n(98678),_=n(24369),E=n(73893),x=n(77692),C=n(18696);const S=["meta+c"],A=["meta+shift+c"];const w=["meta+x"];var I=n(40858),T=n(48901),N=n(35289),R=n(18039);const k=(e,t,n,r)=>{const{clearSelected:s,selectAll:a,getSelected:o}=(0,i.useContext)(N.m),l=(0,i.useCallback)((()=>{if(!e.current)return;const i=document.querySelector(`.${R.A.trackList}`),r=i?.isEqualNode(e.current)||!1,s=document.activeElement?.closest(`.${R.A.trackList}`);(s?.isEqualNode(e.current)||!1||r&&!s)&&(t?n().then((()=>{a()})):a())}),[e,t,n,a]),c=(0,i.useCallback)((async(e,t)=>{const n=o().map((({uri:e})=>t?e:(0,v.o_)(e)?.toURL())).join("\n");n.length&&await e(n)}),[o]),u=(0,i.useCallback)((t=>{if(e.current?.contains(document.activeElement)){const e=o();if(0===e.length)return;r(e,(()=>{s()}),t)}}),[s,o,r,e]);return function(e){const t=(0,i.useContext)(E.A),n=(0,y.YQ)((()=>{e((e=>t.copy(e)))}),50,{leading:!0,trailing:!1});(0,_.f)(w,n),(0,C.x)(x.W.CUT,n)}((0,i.useCallback)((async e=>{await c(e,!1),u(!0)}),[c,u])),function(e){const t=(0,i.useContext)(E.A),n=(0,y.YQ)((()=>{e((e=>t.copy(e)),!1)}),50,{leading:!0,trailing:!1}),r=(0,y.YQ)((()=>{e((e=>t.copy(e)),!0)}),50,{leading:!0,trailing:!1});(0,_.f)(S,n),(0,_.f)(A,r),(0,C.x)(x.W.COPY,n),(0,C.x)(x.W.COPY_ADVANCED,r)}(c),(0,T.x)(I.W.SELECT_ALL,l),(0,T.x)(I.W.DELETE,(()=>u())),{handleDelete:u}};var O=n(59313),P=n(3265),j=n(55138),L=n(22215),D=n(96470),U=n(88291),M=n(20273),B=n(33085),F=n(13411),H=n(53603),V=n(13274);const z=i.memo((function({name:e,visible:t,columnType:n,onClick:i}){return(0,V.jsx)(H.D,{role:"menuitemcheckbox",autoClose:!1,onClick:i,"aria-checked":t,"data-column":n,children:e})})),G=()=>{const e=(0,i.useContext)(B._),t=(0,i.useMemo)((()=>({[F.$.INDEX]:"#",[F.$.TITLE_AND_ARTIST]:o.Ru.get("tracklist.header.title"),[F.$.TITLE]:o.Ru.get("tracklist.header.title"),[F.$.PLAYS]:o.Ru.get("tracklist.header.plays"),[F.$.ADDED_AT]:o.Ru.get("tracklist.header.date-added"),[F.$.ADDED_BY]:o.Ru.get("tracklist.header.added-by"),[F.$.DURATION]:o.Ru.get("tracklist.header.duration"),[F.$.ALBUM]:o.Ru.get("tracklist.header.album"),[F.$.RELEASE_DATE]:o.Ru.get("tracklist.header.release-date"),[F.$.EVENT_DATE]:o.Ru.get("tracklist.header.event"),[F.$.EVENT_INFO]:o.Ru.get("tracklist.header.event"),[F.$.ACTIONS]:o.Ru.get("tracklist.header.actions"),[F.$.ALBUM_OR_PODCAST]:o.Ru.get("tracklist.header.album-or-podcast"),[F.$.ALBUM_OR_SHOW]:o.Ru.get("music_and_talk.album_or_show"),[F.$.CONCERT_DATE]:o.Ru.get("tracklist.header.date"),[F.$.CONCERT_VENUE]:o.Ru.get("tracklist.header.venue"),[F.$.ARTIST]:o.Ru.get("card.tag.artist"),[F.$.ADD]:null,[F.$.TITLE_AND_AUTHOR]:o.Ru.get("tracklist.header.title"),[F.$.AUTHOR]:o.Ru.get("shared.library.sort-by.author")})),[]);return e?(0,V.jsx)(M.W,{children:e.columns.filter((e=>e.toggleable)).map(((n,i)=>(0,V.jsx)(z,{columnType:n.columnType,name:t[n.columnType]??n.columnType,visible:n.visible,onClick:()=>{n.toggleable&&e?.toggleVisible(n.columnType)}},`column-visibility-action-${i}`)))}):null};var W=n(18645),K=n(19498),Y=n(43364),q=n(98764),Q=n(98986),$=n(88713);const Z=({className:e,children:t,onSort:n,as:i="div",columnIndex:r})=>(0,V.jsxs)(i,{className:s()(R.A.column,e),onClick:()=>n(F.$.TITLE,r),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:o.Ru.get("tracklist.header.title")}),t]}),X=({className:e,children:t,as:n="div"})=>(0,V.jsxs)(n,{className:s()(R.A.column,e),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:s()("standalone-ellipsis-one-line",e),children:o.Ru.get("tracklist.header.event")}),t]});var J=n(9138),ee=n(87358),te=n(82052),ne=n(7079),ie=n(63265);const re=parseInt(ie.A.MINMIMUM_COLUMN_WIDTH,10),se=(e,t,n)=>!e&&(t>re||n),ae=({index:e,tracklistRef:t,hasIndex:n,columnPersistenceKey:r})=>{const s=(0,i.useRef)(null),a=(0,ne.W)(),[o,l]=(0,te.x)("column-widths",{}),c=(0,i.useCallback)((e=>{const i=e.reduce(((e,t,i)=>((!n||i>0)&&(e+=t),e)),0);e.filter(Boolean).forEach(((e,r)=>{n&&0===r||t.current.style.setProperty(`--col${r}`,100*e/i+"fr")}))}),[n,t]);(0,i.useEffect)((()=>{if(!r)return;const e=o[r];Array.isArray(e)&&c(e)}),[o,c,r]);const u=(0,i.useCallback)((n=>{const i=n.target;let u=n.clientX;t.current?.classList.add(R.A.columnResizing);const d=n=>{const r=n.clientX-u;if(0===r)return;u=n.clientX;const s=a?-1:1,o=i.closest('[role="columnheader"]');let l=o,c=e,d=(l?.clientWidth??0)+s*r,m=!!l&&"none"===getComputedStyle(l).display;for(;l&&!se(m,d,s*r>0);)m||c--,l=l.previousElementSibling,d=(l?.clientWidth??0)+s*r,m=!!l&&"none"===getComputedStyle(l).display;let p=o?.nextElementSibling,h=e+1,g=(p?.clientWidth??0)-s*r,f=!!p&&"none"===getComputedStyle(p).display;for(;p&&!se(f,g,s*r<0);)f||h++,p=p.nextElementSibling,g=(p?.clientWidth??0)-s*r,f=!!p&&"none"===getComputedStyle(p).display;l&&p&&(t.current.style.setProperty(`--col${c}`,`${Math.max(d,re)}px`),t.current.style.setProperty(`--col${h}`,`${Math.max(g,re)}px`))};document.addEventListener("mouseup",(()=>{t.current?.classList.remove(R.A.columnResizing),(()=>{if(!s.current)return;const e=s.current.closest('[role="row"]'),t=Array.from(e.children).map((e=>e.clientWidth));r?l({...o,[r]:t}):c(t)})(),document.removeEventListener("mousemove",d)}),{once:!0}),document.addEventListener("mousemove",d)}),[o,e,a,l,c,r,t]);return(0,V.jsx)("div",{ref:s,onMouseDown:u,className:R.A.resizeHandle})};var oe=n(71781);const le=()=>{},ce={[F.$.INDEX]:()=>(0,V.jsx)(V.Fragment,{children:"#"}),[F.$.TITLE_AND_ARTIST]:({className:e,children:t,onSort:n,as:i="div",alternativeText:r,columnIndex:a})=>(0,V.jsxs)(i,{className:s()(R.A.column,e),onClick:()=>n(F.$.TITLE_AND_ARTIST,a),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:r||o.Ru.get("tracklist.header.title")}),t]}),[F.$.TITLE]:Z,[F.$.PLAYS]:()=>(0,V.jsx)(q.E,{variant:"bodySmall",className:R.A.playsHeader,children:o.Ru.get("tracklist.header.plays")}),[F.$.ADDED_BY]:({className:e,children:t,onSort:n,as:i="div",columnIndex:r})=>(0,V.jsxs)(i,{className:s()(R.A.column,e),onClick:()=>n(F.$.ADDED_BY,r),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:o.Ru.get("tracklist.header.added-by")}),t]}),[F.$.ADDED_AT]:({className:e,children:t,onSort:n,as:i="div",columnIndex:r})=>(0,V.jsxs)(i,{className:s()(R.A.column,e),onClick:()=>n(F.$.ADDED_AT,r),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:o.Ru.get("tracklist.header.date-added")}),t]}),[F.$.RELEASE_DATE]:({className:e,children:t,as:n="div"})=>(0,V.jsxs)(n,{className:s()(R.A.column,e),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:s()("standalone-ellipsis-one-line",e),children:o.Ru.get("tracklist.header.release-date")}),t]}),[F.$.DURATION]:({className:e,children:t,onSort:n,as:i="div",columnIndex:r})=>(0,V.jsx)($.Zp,{label:o.Ru.get("tracklist.header.duration"),children:(0,V.jsxs)(i,{"aria-label":o.Ru.get("tracklist.header.duration"),className:s()(R.A.column,R.A.durationHeader,e),onClick:()=>n(F.$.DURATION,r),children:[t,(0,V.jsx)(Q.t,{size:"small"})]})}),[F.$.EVENT_DATE]:X,[F.$.EVENT_INFO]:X,[F.$.CONCERT_DATE]:({className:e,children:t,as:n="div"})=>(0,V.jsxs)(n,{className:s()(R.A.column,e),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:s()("standalone-ellipsis-one-line",e),children:o.Ru.get("tracklist.header.date")}),t]}),[F.$.CONCERT_VENUE]:({className:e,children:t,as:n="div"})=>(0,V.jsxs)(n,{className:s()(R.A.column,e),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:s()("standalone-ellipsis-one-line",e),children:o.Ru.get("tracklist.header.venue")}),t]}),[F.$.ACTIONS]:({className:e})=>(0,V.jsx)("div",{"aria-label":o.Ru.get("tracklist.header.actions"),className:s()(R.A.column,R.A.actionsHeader,e)}),[F.$.ALBUM]:({className:e,children:t,onSort:n,as:i="div",columnIndex:r})=>(0,V.jsxs)(i,{className:s()(R.A.column,e),onClick:()=>n(F.$.ALBUM,r),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:o.Ru.get("tracklist.header.album")}),t]}),[F.$.ALBUM_OR_PODCAST]:({className:e,children:t,onSort:n,as:i="div",columnIndex:r})=>(0,V.jsxs)(i,{className:s()(R.A.column,e),onClick:()=>n(F.$.ALBUM_OR_PODCAST,r),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:s()("standalone-ellipsis-one-line",e),children:o.Ru.get("tracklist.header.album-or-podcast")}),t]}),[F.$.ALBUM_OR_SHOW]:({className:e,children:t,onSort:n,as:i="div",columnIndex:r})=>(0,V.jsxs)(i,{className:s()(R.A.column,e),onClick:()=>n(F.$.ALBUM_OR_SHOW,r),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:s()("standalone-ellipsis-one-line",e),children:o.Ru.get("music_and_talk.album_or_show")}),t]}),[F.$.ARTIST]:({className:e,children:t,onSort:n,as:i="div",columnIndex:r})=>(0,V.jsxs)(i,{className:s()(R.A.column,e),onClick:()=>n(F.$.ARTIST,r),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:o.Ru.get("card.tag.artist")}),t]}),[F.$.TITLE_AND_AUTHOR]:Z,[F.$.AUTHOR]:({className:e,children:t,as:n="div"})=>(0,V.jsxs)(n,{className:s()(R.A.column,e),children:[(0,V.jsx)(q.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:o.Ru.get("shared.library.sort-by.author")}),t]}),get[F.$.ADD](){throw Error("Add has no corresponding column header component")}},ue=(e,t,n,i,r,a)=>(l,c,u)=>{const d=(0,L.NC)(K.xkq),m=((e,t,n)=>t.column!==F.$.TITLE&&t.column!==F.$.ARTIST||e!==F.$.TITLE_AND_ARTIST?n.has(e)?t.column!==e?F.H.NONE:t.order:F.H.NONE:t.order)(l,t,e),p=ce[l],h=e.has(l),g=h?n:le,f=(0,W.rP)(m),b=(0,W.T4)(m);let v;f&&(v="ascending"),b&&(v="descending"),m===F.H.NONE&&(v="none");const y=(0,W.kj)(l,t)?o.Ru.get("card.tag.artist"):void 0,_=(0,oe.y)(c,l,u),E=(0,V.jsxs)(p,{className:s()({[R.A.sortable]:h}),onSort:g,alternativeText:y,as:h?"button":"div",columnIndex:c,children:[b&&(0,V.jsx)(P.y,{size:"small",semanticColor:"textBrightAccent",className:R.A.arrow,"aria-hidden":"true"}),f&&(0,V.jsx)(j.J,{size:"small",className:R.A.arrow,semanticColor:"textBrightAccent","aria-hidden":"true"})]}),x=_!==ee.y&&_!==J.l;return(0,V.jsxs)(_,{role:"columnheader",ariaColIndex:c,ariaSort:v,children:[(0,V.jsx)("div",{"":"column-header-context-menu",children:E}),x&&d&&(0,V.jsx)(ae,{index:c,tracklistRef:i,hasIndex:r,columnPersistenceKey:a})]},l)},de=parseInt(ie.A.TRACKLIST_HEADER_HEIGHT,10),me=({columns:e,sortableColumns:t,onSort:n,sortState:i,tracklistRef:r,top:a=Y.uC,columnPersistenceKey:o})=>{const l=(0,d.v7)(),c=(0,L.NC)(K.Lkd),u=isNaN(de)?100:de,{ref:m,inView:p}=(0,O.Wx)({threshold:[1],root:l.current,rootMargin:`-${a+1}px 100000px ${u}px 100000px`,initialInView:!0}),h=e.some((e=>e===F.$.INDEX)),g=(0,V.jsx)(D.$,{rowIndex:0,className:s()(R.A.trackListHeaderRow,R.A.trackListRowGrid),children:e.map(ue(t,i,n,r,h,o))});return(0,V.jsx)("div",{className:s()(R.A.trackListHeader,{[R.A.trackListHeaderStuck]:!p}),ref:m,style:{top:a},children:c?(0,V.jsx)(U.h,{menu:(0,V.jsx)(G,{}),children:(0,V.jsx)("div",{children:g})}):g})},pe={column:null,order:F.H.NONE},he=20,ge=56,fe=(e,t,n)=>{const i=t?1:0;return e<504?Math.min(2+i,n):e<728?Math.min(3+i,n):e<984?Math.min(4+i,n):e<1208?Math.min(5+i,n):Math.min(6+i,n)};function be({resolveItem:e,tracks:t,nrTracks:n,fetchTracks:r,limit:s=100,onNrValidItemsChange:a,...o}){const{getItems:l,nrValidItems:u,invalidateCache:d,cacheAll:m,hasItems:p}=(0,c.E)({nrItems:n,fetch:r,limit:s,initialItems:t});return(0,i.useLayoutEffect)((()=>{a?.(u)}),[u,a]),(0,V.jsx)(N.k,{resolveItem:e,getItems:l,nrTracks:u,children:(0,V.jsx)(ye,{...o,resolveItem:e,getItems:l,nrTracks:u,invalidateCache:d,cacheAll:m,hasItems:p})})}const ve=(e,t)=>(e?32:ge)+(t?8:0);function ye({nrTracks:e,renderRow:t,sortableColumns:n=new Set,sortState:r=pe,onSort:c=(()=>{}),onRemove:f=(()=>{}),canFetchAllTracks:v=!1,rowPlaceholder:y=p.nd,hasHeaderRow:_=!1,columns:E,outerRef:x,outerDomRef:C,ariaLabel:S,testID:A="track-list",resolveItem:w,headerTop:I,getItems:T,invalidateCache:O,cacheAll:P,hasItems:j,isConcertPlaylist:L,isQueuePanelTracklist:D,isCompactMode:U=!1,columnPersistenceKey:M,className:B}){const H=(0,d.v7)(),{getSelected:z}=(0,i.useContext)(N.m),G=(0,i.useRef)(null),W=(0,i.useRef)({firstIndex:-1,lastIndex:-1}),[K,Y]=(0,i.useState)(E.length),q=C??G,Q=E.includes(F.$.INDEX),$=o.Ru.getLocaleForTranslation()===a.h.ar,Z=ve(U,$),{handleDelete:X}=k(q,v,P,f),J=(0,i.useCallback)((()=>{if(!q.current)return;const e=q.current.offsetWidth,t=fe(e,Q,E.length);Y(t)}),[E,Q,q]);(0,m.w)({refOrElement:q,observeOnly:"width",onResize:J}),(0,i.useLayoutEffect)((()=>{J()}),[J]),(0,h.g)(q);const ee=(0,i.useCallback)((e=>{H.current&&(H.current.scrollTop=e*Z)}),[H,Z]),te=(0,i.useCallback)((t=>{if(v&&t.length>0){const n=[];P().then((()=>{T(0,e).forEach(((e,i)=>{if(e){const{uri:r,uid:s}=w(e,i);t.some((e=>e.uid===s||e.uri===r))&&n.push(i)}})),n.length>0&&ee(Math.min(...n))})).catch((e=>{console.error(e)}))}}),[P,v,T,e,w,ee]),ne=(0,i.useCallback)((()=>{const e=z();te(e.map((({uid:e})=>({uid:e}))))}),[z,te]);b(ne);const ie=(0,i.useCallback)((()=>W.current),[]);(0,i.useImperativeHandle)(x,(()=>({update:()=>O(),getRows:()=>T(0,e,{cachedOnly:!0}),scrollToItem:e=>te([e]),getSelected:z,scrollToIndex:ee,getVisibleTrackWindow:ie})));const re=(0,g.d)((()=>X())),se=(0,i.useCallback)(((e,t)=>(0,V.jsx)(y,{height:e},t)),[y]);return(0,V.jsxs)(l.f,{"aria-rowcount":e+Number(_),"aria-colcount":K,"aria-label":S,ref:q,className:s()(B,{[R.A.trackList]:!L,[R.A.indexable]:Q,[R.A.delayedVisibility]:!j,[R.A.concertTrackList]:L,[R.A.queuePanelTracklist]:D,[R.A.trackListCompactMode]:U}),onKeyDown:re,"":A,children:[_&&(0,V.jsx)(me,{columns:E,sortableColumns:n,sortState:r,onSort:c,top:I,tracklistRef:q,columnPersistenceKey:M}),(0,V.jsx)(u.L,{renderRows:(e,n)=>{Math.max(n-e+1,0)>0&&(W.current={firstIndex:e,lastIndex:n});return T(e,n).map(((n,i)=>n?t(n,e+i):se(`${Z}px`,`${e+i}`)))},nrRows:e,rowHeight:Z,scrollNodeRef:H,nrRowsOverscan:he,renderPlaceholder:se})]})}const _e=i.memo(be)},92633:(e,t,n)=>{"use strict";n.d(t,{Y:()=>S,w:()=>A});var i=n(79474),r=n(97500),s=n.n(r),a=n(99754),o=n(98678),l=n(86892),c=n(83856),u=n(14056),d=n(96470),m=n(38959),p=n(73956),h=n(14494),g=n(42624),f=n(27742),b=n(36471),v=n(31350),y=n(42476),_=n(88745),E=n(35289),x=n(18039),C=n(13274);let S=function(e){return e[e.None=0]="None",e[e.Before=1]="Before",e[e.After=2]="After",e}({});const A=({children:e,uri:t,index:n,ariaRowIndex:r,dragMetadata:A,draggable:w=!0,contextUri:I,isPlayable:T,ageRestricted:N,showUnplayableAsEnabled:R=!1,onTriggerPlay:k,onTriggerPaywall:O,isActive:P,onMove:j,onContextMenu:L,onInsert:D,allowedDropTypes:U=[],initialSelectedState:M=!1,spec:B,canRemovePlaylistItems:F,removePlaylistItems:H,isLocked:V,onDoubleClick:z,className:G,isCompactMode:W=!1})=>{const{toggleSelected:K,isSelected:Y,getSelected:q,clearSelected:Q}=(0,i.useContext)(E.m),$=(0,_.q)({index:n,contextUri:I,onContextMenu:L,canRemovePlaylistItems:F,removePlaylistItems:H}),Z=(0,a.wA)(),X=(0,a.d4)(v.Bi),J=(0,i.useRef)(null);let ee;const{name:te,createdBy:ne,sectionId:ie=0}=A,[re,se]=(0,i.useState)(S.None),{enqueueSnackbar:ae}=(0,f.d)();(0,i.useEffect)((()=>{M&&J.current&&(K(n,!1,!1),(0,m.Ai)(J.current))}),[]);const oe=(0,l.U0)((e=>e.find((e=>U?.includes(e)))),[U]),{draggable:le,onDragStart:ce}=(0,y.R)({index:n,contextUri:I,sectionId:ie,label:`${te} • ${ne}`}),ue=(0,i.useCallback)((e=>{if(oe(Array.from(e.dataTransfer.types))&&J.current){e.preventDefault();const{top:t,height:n}=J.current.getBoundingClientRect(),i=e.clientY<t+n/2;e.dataTransfer.dropEffect="copy",i&&re!==S.Before&&se(S.Before),i||re===S.After||se(S.After)}}),[re,oe]),de=(0,i.useCallback)((()=>{se(S.None)}),[]),me=(0,i.useCallback)((e=>{if(U.length>0){e.preventDefault();const t=e.dataTransfer.getData("text/x-spotify-context"),i=parseInt(e.dataTransfer.getData("text/x-spotify-section"),10)||0,r=q();if(j&&t===I&&ie===i&&r.length>0)j(r,n,re,{section:i,origin:i});else if(D){let r=[];U.forEach((t=>{const n=e.dataTransfer.getData(t);n&&(r=r.concat(n.split("\n").map((e=>{const t=(0,c.o_)(e);return t?t.toURI():e}))))})),r.length>0&&D(r,n,re,t,{section:ie,origin:i})}}se(S.None),Q()}),[U,j,D,I,n,re,q,Q,ie]),pe=(0,b.W)(),he=(0,h.s)(),ge=(0,o.YQ)((e=>{if(!(e.target instanceof Node))return;if(!e.currentTarget.contains(e.target))return;pe({intent:"play",type:"double-click"});const n=B?he.logInteraction(B.doubleHitPlay({itemToBePlayed:t})):void 0;k(e,n)}),p.d,{leading:!0,trailing:!1}),fe=(0,i.useCallback)((e=>{B&&O&&he.logInteraction(B.doubleHitShowPaywall({paywalledItem:t})),O?.(e)}),[he,O,B,t]),be=(0,i.useCallback)((()=>{ae(u.Ru.get("feedback.unable-to-play"))}),[ae]),ve=(0,i.useCallback)((()=>Z((0,g.Tf)(t))),[t,Z]);V?ee=fe:T?ee=ge:(N&&!X&&(ee=ve),ee=z||be);const ye=Y(n),_e=ye&&Y(n-1),Ee=ye&&Y(n+1);return(0,C.jsx)(d.$,{rowIndex:r,"aria-selected":ye,children:(0,C.jsx)("div",{"":"tracklist-row",className:s()(x.A.trackListRow,x.A.trackListRowGrid,G,{[x.A.active]:P,[x.A.disabled]:!T,[x.A.showDisabledAsEnabled]:R,[x.A.selected]:ye,[x.A.isPreviousRowSelected]:_e,[x.A.isNextRowSelected]:Ee,[x.A.dropTargetBefore]:re===S.Before,[x.A.dropTargetAfter]:re===S.After,[x.A.rowCompactMode]:W}),onDoubleClick:ee,draggable:le&&w,onDragStart:ce,onDragOver:ue,onDragLeave:de,onDrop:me,ref:J,...$,children:e})})}},33085:(e,t,n)=>{"use strict";n.d(t,{_:()=>o,a:()=>l});var i=n(79474),r=n(13411),s=n(13274);const a={[r.$.ACTIONS]:!1,[r.$.ADD]:!1,[r.$.ADDED_BY]:!1,[r.$.ALBUM_OR_PODCAST]:!1,[r.$.ALBUM_OR_SHOW]:!1,[r.$.ARTIST]:!1,[r.$.CONCERT_DATE]:!1,[r.$.CONCERT_VENUE]:!1,[r.$.EVENT_DATE]:!1,[r.$.EVENT_INFO]:!1,[r.$.PLAYS]:!0,[r.$.RELEASE_DATE]:!1,[r.$.INDEX]:!1,[r.$.TITLE]:!1,[r.$.TITLE_AND_ARTIST]:!1,[r.$.ALBUM]:!0,[r.$.ADDED_AT]:!0,[r.$.DURATION]:!0,[r.$.TITLE_AND_AUTHOR]:!1,[r.$.AUTHOR]:!1},o=(0,i.createContext)(null),l=({columns:e,children:t})=>{const n=e=>({columnType:e,visible:!0,toggleable:a[e]}),[r,l]=(0,i.useState)((()=>e.map(n)));(0,i.useEffect)((()=>{l(e.map(n))}),[e]);const c=(0,i.useCallback)((e=>{l(r.map((t=>t.columnType===e?{...t,visible:!t.visible}:t)))}),[r]),u=(0,i.useMemo)((()=>r.filter((e=>e.visible)).map((e=>e.columnType))),[r]);return(0,s.jsx)(o.Provider,{value:{columns:r,visibleColumnTypes:u,toggleVisible:c},children:t})}},82390:(e,t,n)=>{"use strict";n.d(t,{g:()=>b});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(83856),l=n(88291),c=n(88713),u=n(2092),d=n(14494),m=n(84387),p=n(63445),h=n(10072),g=n(18039),f=n(13274);const b=({children:e,uri:t,name:n,nonInteractive:r=!1,creatorUri:b,spec:v})=>{let y=null;const{draggable:_,onDragStart:E}=(0,u.P)({itemUris:[t],dragLabelText:n}),x=(0,d.s)(),C=(0,i.useCallback)((()=>{v&&x.logInteraction(v.albumLinkFactory({uri:t}).hitUiNavigate({destination:t}))}),[x,v,t]);return r?(0,f.jsx)("span",{className:s()("standalone-ellipsis-one-line",g.A.text),children:e}):((0,o._T)(t)&&(y=(0,f.jsx)(m.h,{uri:t,artistUri:b})),(0,o.WB)(t)&&(y=(0,f.jsx)(p.H,{uri:t})),(0,f.jsx)(l.h,{menu:y,children:(0,f.jsx)("span",{children:(0,f.jsx)(c.Zp,{label:n,showDelay:c.uF,children:(0,f.jsx)(a.E,{variant:"bodySmall",children:(0,f.jsx)(h.N,{draggable:_,onDragStart:E,className:s()("standalone-ellipsis-one-line"),to:t,dir:"auto",onClick:C,children:e})})})})}))}},22783:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var i=n(79474),r=n(88291),s=n(2092),a=n(64420),o=n(59416),l=n(10072),c=n(13274);const u=({children:e,uri:t,name:n,onClick:u,index:d})=>{const{draggable:m,onDragStart:p}=(0,s.P)({itemUris:[t],dragLabelText:n}),h=(0,i.useCallback)((()=>{u?.(t,d)}),[u,t,d]);return(0,a.s)({uri:t})?(0,c.jsx)(r.h,{menu:(0,c.jsx)(o.t,{uri:t}),children:(0,c.jsx)(l.N,{draggable:m,to:t,onDragStart:p,dir:"auto",onClick:h,children:e})}):(0,c.jsx)(c.Fragment,{children:e})}},18836:(e,t,n)=>{"use strict";n.d(t,{l:()=>u});var i=n(79474),r=n(98764),s=n(14056),a=n(88713),o=n(14494),l=n(22783),c=n(13274);const u=({artists:e,spec:t,className:n})=>{const u=(0,o.s)(),d=(0,i.useCallback)(((e,n)=>{t&&u.logInteraction(t.artistLinkFactory({position:n??0,uri:e}).hitUiNavigate({destination:e}))}),[u,t]);if(!e||0===e.length)return null;const m=e.map((({name:e})=>e)).join(s.Ru.getSeparator());return(0,c.jsx)(a.Zp,{label:m,showDelay:a.uF,children:(0,c.jsx)(r.E,{as:"span",variant:"bodySmall",className:n,children:e.map((({uri:e,name:t},n)=>(0,c.jsxs)(i.Fragment,{children:[n>0&&s.Ru.getSeparator(),(0,c.jsx)(l.y,{name:t,uri:e,onClick:d,index:n,children:t},e)]},e)))})})}},28078:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var i=n(98764),r=n(18039),s=n(13274);const a=({children:e})=>e?(0,s.jsx)(i.E,{variant:"bodyMedium",className:r.A.rowBadges,semanticColor:"textSubdued",children:e}):null},16482:(e,t,n)=>{"use strict";n.d(t,{P:()=>u});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(7452),l=n(18039),c=n(13274);const u=(0,i.memo)((function({duration:e,className:t,dataTestId:n}){return(0,c.jsx)(a.E,{"":n,as:"div",variant:"bodySmall",className:s()(t,l.A.rowDuration),semanticColor:"textSubdued",children:e?(0,o.f)(e):"-:--"})}))},53206:(e,t,n)=>{"use strict";n.d(t,{e:()=>m});var i=n(97500),r=n.n(i),s=n(72423),a=n(32824),o=n(31176),l=n(35022),c=n(18039),u=n(13274);const d=({isVideo:e,isEpisode:t})=>{let n=a.v;return e?n=o.B:t&&(n=l.L),(0,u.jsx)("div",{className:r()(c.A.rowImage,c.A.rowImageFallback),style:{borderRadius:4},children:(0,u.jsx)(n,{size:"small"})})},m=({src:e,isVideo:t=!1,isEpisode:n=!1})=>e?(0,u.jsx)(s._,{className:r()(c.A.rowImage,{[c.A.rowImageVideo]:t}),draggable:!1,src:e,loading:"eager",width:"40",height:"40",radius:4,children:(0,u.jsx)(d,{isVideo:t,isEpisode:n})}):(0,u.jsx)(d,{isVideo:t,isEpisode:n})},64652:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var i=n(97500),r=n.n(i),s=n(18039),a=n(13274);const o=({children:e,className:t})=>(0,a.jsx)("div",{className:r()(s.A.rowMainContent,t),children:e})},66014:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var i=n(18039),r=n(13274);const s=({children:e})=>(0,r.jsx)("div",{className:i.A.rowMainContentCompact,children:e})},43418:(e,t,n)=>{"use strict";n.d(t,{$:()=>h});var i=n(79474),r=n(97500),s=n.n(r),a=n(98678),o=n(1523),l=n(73956),c=n(14494),u=n(36471),d=n(54745),m=n(18039),p=n(13274);const h=i.forwardRef((function({className:e="",children:t,onClick:n,isPlaying:i,isActive:r,isLocked:h=!1,playAriaLabel:g,uri:f,spec:b},v){const y=(0,u.W)(),_=(0,c.s)(),E=(0,a.YQ)((e=>{const{currentTarget:t,detail:s}=e;let a;if(e.stopPropagation(),s>0&&t&&t.blur(),y({intent:i?"pause":"play",type:"click"}),b&&!h){const e=b.playbackButtonFactory();let t;t=r&&i?e.hitPause({itemToBePaused:f}):r&&!i?e.hitResume({itemToBeResumed:f}):e.hitPlay({itemToBePlayed:f}),a=_.logInteraction(t)}else b&&_.logInteraction(b.playbackButtonFactory().hitShowPaywall({paywalledItem:f}));n(e,a)}),l.d,{leading:!0,trailing:!1});return(0,p.jsxs)("div",{className:s()(m.A.rowMarker,e),children:[i?(0,p.jsx)(o.J,{className:m.A.playingIcon,animated:!0}):t,(0,p.jsx)(d.x,{className:m.A.rowPlayPauseButton,iconClassName:m.A.rowPlayPauseIcon,onClick:E,isPlaying:i,isLocked:h,playAriaLabel:g,ref:v})]})}))},49798:(e,t,n)=>{"use strict";n.d(t,{Y:()=>c});var i=n(79474),r=n(65325),s=n(14494),a=n(63492),o=n(18039),l=n(13274);const c=({menu:e,label:t,spec:n})=>{const c=(0,s.s)(),u=(0,i.useCallback)((()=>{n&&c.logInteraction(n.contextButtonFactory().hitUiReveal())}),[c,n]);return(0,l.jsx)(r.b,{menu:e,onShow:u,children:(0,l.jsx)(a.e,{className:o.A.rowMoreButton,size:a.M.xs,label:t})})}},91058:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var i=n(98764),r=n(18039),s=n(13274);const a=({children:e})=>e?"number"==typeof e?(0,s.jsx)(i.E,{variant:"bodyMedium",className:r.A.number,children:e}):(0,s.jsx)("span",{className:r.A.icon,children:e}):null},24290:(e,t,n)=>{"use strict";n.d(t,{Bz:()=>g,nd:()=>p,qq:()=>h});var i=n(79474),r=n(97500),s=n.n(r),a=n(18039),o=n(13274);const l=i.memo((function(){return(0,o.jsx)("div",{className:s()(a.A.placeholder,a.A.rowSectionVariable,a.A.placeholderVariable)})})),c=i.memo((function(){return(0,o.jsx)("div",{className:s()(a.A.placeholder,a.A.rowSectionEnd,a.A.placeholderEnd)})})),u=i.memo((function(){return(0,o.jsx)("div",{className:s()(a.A.placeholder,a.A.rowSectionIndex,a.A.placeholderIndex)})})),d=i.memo((function(){return(0,o.jsx)("div",{className:s()(a.A.placeholder,a.A.rowSectionStart,a.A.placeholderStartWithCoverImage)})})),m=i.memo((function(){return(0,o.jsx)("div",{className:s()(a.A.placeholder,a.A.rowSectionStart,a.A.placeholderStart)})})),p=i.memo((function({height:e}){return(0,o.jsxs)("div",{className:a.A.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(u,{}),(0,o.jsx)(d,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(c,{})]})})),h=i.memo((function({height:e}){return(0,o.jsxs)("div",{className:a.A.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(d,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(c,{})]})})),g=i.memo((function({height:e}){return(0,o.jsxs)("div",{className:a.A.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(u,{}),(0,o.jsx)(m,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(c,{})]})}))},96042:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var i=n(79474),r=n(98764),s=n(14056),a=n(18039),o=n(13274);const l=(0,i.memo)((function({playcount:e}){return e<1?null:(0,o.jsx)(r.E,{as:"div",variant:"bodySmall",className:a.A.rowPlayCount,children:s.Ru.formatNumber(e)})}))},9138:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var i=n(52612),r=n(22325),s=n(18039),a=n(13274);const o=({children:e,ariaColIndex:t,ariaSort:n,role:o="gridcell"})=>"columnheader"===o?(0,a.jsx)(r.A,{columnIndex:t,ariaSort:n,className:s.A.rowSectionEnd,children:e}):(0,a.jsx)(i.T,{columnIndex:t,className:s.A.rowSectionEnd,children:e})},87358:(e,t,n)=>{"use strict";n.d(t,{y:()=>o});var i=n(52612),r=n(22325),s=n(18039),a=n(13274);const o=({children:e,ariaColIndex:t,ariaSort:n,role:o="gridcell"})=>"columnheader"===o?(0,a.jsx)(r.A,{columnIndex:t,ariaSort:n,className:s.A.rowSectionIndex,children:e}):(0,a.jsx)(i.T,{columnIndex:t,className:s.A.rowSectionIndex,children:e})},77962:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var i=n(52612),r=n(22325),s=n(18039),a=n(13274);const o=({children:e,ariaColIndex:t,ariaSort:n,role:o="gridcell"})=>"columnheader"===o?(0,a.jsx)(r.A,{columnIndex:t,ariaSort:n,className:s.A.rowSectionStart,children:e}):(0,a.jsx)(i.T,{columnIndex:t,className:s.A.rowSectionStart,children:e})},92758:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var i=n(52612),r=n(22325),s=n(18039),a=n(13274);const o=({children:e,ariaColIndex:t,ariaSort:n,role:o="gridcell"})=>"columnheader"===o?(0,a.jsx)(r.A,{columnIndex:t,ariaSort:n,className:s.A.rowSectionVariable,children:e}):(0,a.jsx)(i.T,{columnIndex:t,className:s.A.rowSectionVariable,children:e})},20502:(e,t,n)=>{"use strict";n.d(t,{p:()=>l});var i=n(97500),r=n.n(i),s=n(98764),a=n(18039),o=n(13274);const l=({children:e})=>(0,o.jsx)(s.E,{className:r()(a.A.rowSubTitle,"standalone-ellipsis-one-line"),variant:"bodySmall",semanticColor:"textSubdued",children:e})},64606:(e,t,n)=>{"use strict";n.d(t,{Y:()=>s});var i=n(98764),r=n(13274);const s=({children:e})=>(0,r.jsx)(i.E,{className:"standalone-ellipsis-one-line",variant:"bodySmall",semanticColor:"textSubdued",children:e})},38276:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var i=n(97500),r=n.n(i),s=n(98764),a=n(88713),o=n(18039),l=n(13274);const c=({titleText:e,children:t})=>{const n=(0,l.jsx)(s.E,{variant:"bodyMedium",semanticColor:"textBase",dir:"auto",className:r()(o.A.rowTitle,"standalone-ellipsis-one-line"),as:"div",children:t});return(0,l.jsx)(a.Zp,{label:e,showDelay:a.uF,children:n})}},98477:(e,t,n)=>{"use strict";n.d(t,{RB:()=>u,cL:()=>d,dh:()=>c,gc:()=>o,sn:()=>m,ws:()=>l});var i=n(79474),r=n(49622),s=n(13411),a=n(13274);const o=[s.$.ADDED_AT,s.$.TITLE_AND_ARTIST,s.$.TITLE,s.$.ARTIST,s.$.ALBUM],l=[s.$.INDEX,s.$.TITLE_AND_ARTIST,s.$.TITLE,s.$.ARTIST,s.$.ALBUM,s.$.DURATION],c=[s.$.INDEX,s.$.TITLE_AND_AUTHOR,s.$.TITLE,s.$.ADDED_AT],u={column:null,order:s.H.NONE},d=(0,i.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a TracksSortProvider")},sortState:u}),m=i.memo((function({uri:e,children:t}){return(0,a.jsx)(r.E,{uri:e,defaultState:u,sortContext:d,children:t})}))},24885:(e,t,n)=>{"use strict";n.d(t,{E:()=>p});var i=n(79474),r=n(98764),s=n(14056),a=n(88713),o=n(14494),l=n(47583),c=n(22783),u=n(18039),d=n(13274);const m=({name:e,uri:t,nonInteractive:n,children:i,onClick:r,index:s})=>n?(0,d.jsx)("span",{className:u.A.text,children:i}):(0,d.jsx)(c.y,{name:e,uri:t,onClick:r,index:s,children:i},t),p=({artists:e,filter:t,nonInteractive:n=!1,spec:c})=>{const u=(0,o.s)(),p=(0,i.useCallback)(((e,t)=>{c&&u.logInteraction(c.artistLinkFactory({position:t??0,uri:e}).hitUiNavigate({destination:e}))}),[u,c]),h=e.map((({name:e})=>e)).join(s.Ru.getSeparator());return(0,d.jsx)(a.Zp,{label:h,showDelay:a.uF,children:(0,d.jsx)(r.E,{as:"div",variant:"bodySmall",children:e.map((({uri:e,name:r},a)=>(0,d.jsxs)(i.Fragment,{children:[a>0&&s.Ru.getSeparator(),(0,d.jsx)(m,{uri:e,name:r,nonInteractive:n,onClick:p,index:a,children:(0,d.jsx)(l.M,{searchWords:[t??""],textToHighlight:r})},e)]},e)))})})}},88745:(e,t,n)=>{"use strict";n.d(t,{q:()=>A});var i=n(79474),r=n(51208),s=n(61252),a=n(83856),o=n(20273),l=n(95999),c=n(64495),u=n(28540),d=n(75664),m=n(20090),p=n(81887),h=n(16212),g=n(14056),f=n(53603),b=n(16323),v=n(36471),y=n(13274);const _=({trackUris:e})=>{const t=(0,i.useContext)(b.Z),[n,r]=(0,i.useState)((()=>{let n=null;for(const i of e){const e=t.containsSync(i);if(!0===e)n=!0;else if(!1===e)return!1}return n})),s=(0,v.W)();(0,i.useEffect)((()=>{t.contains(...e).then((e=>r(e.every(Boolean))))}),[t,e]);const a=(0,i.useCallback)((async()=>{n?await t.remove({uris:e}):await t.add({uris:e}),s({intent:n?"remove-from-library":"add-to-library",type:"click"})}),[n,t,s,e]);return(0,y.jsx)(f.D,{role:"menuitem",onClick:a,disabled:null===n,leadingIcon:n?(0,y.jsx)(p.k,{semanticColor:"textBrightAccent",size:"small"}):(0,y.jsx)(h.P,{semanticColor:"textSubdued",size:"small"}),children:n?g.Ru.get("remove_from_your_liked_songs"):g.Ru.get("save_to_your_liked_songs")})},E=i.memo((function(e){return(0,y.jsx)(l.pZ,{value:"save-multiple-track",children:(0,y.jsx)(_,{...e})})}));var x=n(41894);const C=i.memo((function({uris:e,uids:t,contextUri:n,removePlaylistItems:i,canRemovePlaylistItems:r}){const{spec:s}=(0,c.o)(e[0]);return(0,y.jsx)(l.pZ,{value:"multi-select",children:(0,y.jsxs)(o.W,{children:[(0,y.jsx)(u.K,{spec:s,uris:e}),(0,y.jsx)(m.c,{spec:s,uids:t,uris:e,contextUri:n}),(0,y.jsx)(E,{trackUris:e.filter((e=>(0,a.U_)(e)||(0,a.Pk)(e)))}),n&&(0,a.tb)(n)?(0,y.jsx)(d.D,{uris:e,uids:t,playlistUri:n||"",removePlaylistItems:i,canBeRemoved:r}):null,(0,y.jsx)(x.o,{spec:s,uris:e})]})})}));var S=n(35289);function A({index:e,contextUri:t,onContextMenu:n,canRemovePlaylistItems:a,removePlaylistItems:o,isTreeGrid:l=!1}){const c=(0,i.useRef)(n);c.current=n;const u=(0,i.useContext)(S.m),{pushPopSelected:d,toggleSelected:m,isSelected:p,getSelected:h}=u,g=(0,r.M)({action:"open"});return{onClick:(0,i.useCallback)((t=>{m(e,t.shiftKey,t.ctrlKey||t.metaKey)}),[m,e]),onContextMenu:(0,i.useCallback)((n=>{const i=p(e);if(i||m(e,n.shiftKey,n.ctrlKey||n.metaKey),!c.current)return;const r=h().map((({uri:e})=>e)),s=h().map((({uid:e})=>e));r.length>1&&i?g(n,(0,y.jsx)(C,{uris:r,uids:s,contextUri:t,removePlaylistItems:o,canRemovePlaylistItems:a})):c.current?.(n)}),[p,e,h,m,g,t,a,o]),onKeyDown:(0,i.useCallback)((t=>{if(!(t.target instanceof Node))return;const n=!t.currentTarget.contains(t.target),i=!t.currentTarget.querySelector(s.nu)?.contains(t.target);if(!l&&n||l&&i)return;const r="ArrowUp"===t.key?-1:1;["ArrowUp","ArrowDown"].includes(t.key)&&(t.shiftKey?d(e,r):m(e+r,!1,!1))}),[l,d,e,m])}}},91330:(e,t,n)=>{"use strict";n.d(t,{d:()=>B});var i=n(79474),r=n(94246),s=n(35814),a=n(14056),o=n(87882),l=n(64606),c=n(76816),u=n(13411),d=n(71781),m=n(15704),p=n(13480),h=n(32334),g=n(97374),f=n(95999),b=n(11437),v=n(67302),y=n(26903),_=n(47469),E=n(41791),x=n(7283),C=n(41955),S=n(30957),A=n(18836),w=n(28078),I=n(16482),T=n(64652),N=n(66014),R=n(43418),k=n(49798),O=n(91058),P=n(96042),j=n(20502),L=n(38276),D=n(92633),U=n(18039),M=n(13274);const B=i.memo((function({uri:e,name:t,isPlayable:n,duration_ms:i,artists:B,isExplicit:F,isMOGEFRestricted:H,index:V,trackNumber:z,playcount:G,shouldHighLight:W=!1,contextUri:K,uid:Y,usePlayContextItem:q,isReleased:Q=!0,isCompactMode:$=!1,hasAssociatedVideo:Z=!1}){const{spec:X}=(0,v.r)(s.i,{data:{position:V,reason:"",uri:e}}),J=(0,c.w)(),ee=(0,b.T)(e),te=(0,x.g)(e,n),{badges:ne,hasBadges:ie}=(0,y.b)({downloadAvailability:ee,isExplicit:F,isMOGEFRestricted:H,hasAssociatedVideo:Z}),re=B.map((e=>e.name)).join(a.Ru.getSeparator()),se=e=>e.map((e=>({...e,key:e.uri}))),{isActive:ae,isPlaying:oe,triggerPlay:le,togglePlay:ce}=q({uid:Y,uri:e,index:V}),ue=(0,E.c)();return(0,M.jsx)(f.pZ,{value:"row",index:V,children:(0,M.jsx)(o.t,{trigger:"right-click",action:"open",menu:Q&&(0,M.jsx)(C.P,{uri:e,albumUri:K,artists:se(B),contextUri:K}),preventScrollingWhileOpen:Q,children:(0,M.jsx)(D.w,{uri:e,contextUri:K,isPlayable:te,index:V,isActive:ae,onTriggerPlay:(e,t)=>{le({loggingParams:t})},ageRestricted:H,ariaRowIndex:V+1,dragMetadata:{name:t,createdBy:re},initialSelectedState:W,spec:X,draggable:Q,isCompactMode:$,children:J.map(((n,s)=>{const o=(0,d.y)(s,n,J);switch(n){case u.$.INDEX:return(0,M.jsx)(o,{ariaColIndex:s,children:(0,M.jsx)(R.$,{uri:e,playAriaLabel:a.Ru.get("tracklist.a11y.play",t,re),onClick:(e,t)=>{ce({loggingParams:t})},isPlaying:oe,isActive:ae,spec:X,isLocked:!Q,children:(0,M.jsx)(O.a,{children:z})})},s);case u.$.TITLE_AND_ARTIST:return(0,M.jsx)(o,{ariaColIndex:s,children:(0,M.jsxs)(T.l,{children:[ue&&Q?(0,M.jsx)(S.Link,{to:e,className:U.A.rowTitle,"":"internal-track-link",children:(0,M.jsx)(L.p,{titleText:t,children:t})}):(0,M.jsx)(L.p,{titleText:t,children:t}),ie&&(0,M.jsxs)(w.P,{children:[ne.download&&(0,M.jsx)(p._,{}),ne.explicit&&(0,M.jsx)(h.g,{}),ne.nineteen&&(0,M.jsx)(g.q,{className:U.A.nineteen,size:16}),ne.hasAssociatedVideo&&(0,M.jsx)(m.l,{})]}),(0,M.jsx)(j.p,{children:(0,M.jsx)(A.l,{artists:B.map((e=>({uri:e.uri,name:e.name}))),spec:X})})]})},s);case u.$.TITLE:return(0,M.jsx)(o,{ariaColIndex:s,children:(0,M.jsxs)(N.q,{children:[ue&&Q?(0,M.jsx)(S.Link,{to:e,className:U.A.rowTitle,"":"internal-track-link",children:(0,M.jsx)(L.p,{titleText:t,children:t})}):(0,M.jsx)(L.p,{titleText:t,children:t}),ie&&(0,M.jsxs)(w.P,{children:[ne.download&&(0,M.jsx)(p._,{}),ne.explicit&&(0,M.jsx)(h.g,{}),ne.nineteen&&(0,M.jsx)(g.q,{className:U.A.nineteen,size:16}),ne.hasAssociatedVideo&&(0,M.jsx)(m.l,{separator:""})]})]})},s);case u.$.ARTIST:return(0,M.jsx)(o,{ariaColIndex:s,children:(0,M.jsx)(l.Y,{children:(0,M.jsx)(A.l,{artists:B.map((e=>({uri:e.uri,name:e.name}))),spec:X})})},s);case u.$.PLAYS:return(0,M.jsx)(o,{ariaColIndex:s,children:(0,M.jsx)(P.Y,{playcount:G})},s);case u.$.DURATION:return(0,M.jsxs)(o,{ariaColIndex:s,children:[Q&&(0,M.jsx)(_.d,{uri:e,spec:X}),(0,M.jsx)(I.P,{duration:i}),Q?(0,M.jsx)(k.Y,{menu:(0,M.jsx)(C.P,{uri:e,albumUri:K,artists:se(B)}),label:a.Ru.get("more.label.track",t,re),spec:X}):(0,M.jsx)(r.In,{size:"small"})]},s);default:return null}}))})})})}),((e,t)=>e.uri===t.uri&&e.isCompactMode===t.isCompactMode))},93209:(e,t,n)=>{"use strict";n.d(t,{W:()=>Oe});var i=n(79474),r=n(99754),s=n(83648),a=n(31176),o=n(35022),l=n(34472),c=n(32824),u=n(56896),d=n(35814),m=n(83856),p=n(14056),h=n(28244),g=n(88291),f=n(84749),b=n(36706),v=n(64606),y=n(76816),_=n(15704),E=n(13480),x=n(32334),C=n(97374),S=n(95999),A=n(11437),w=n(26271),I=n(14494),T=n(67302),N=n(9440),R=n(66774),k=n(45640),O=n(26903),P=n(24577),j=n(47469),L=n(27742),D=n(41791),U=n(7283),M=n(47498),B=n(16975),F=n(41955),H=n(90226),V=n(47583),z=n(30957),G=n(82372),W=n(24885),K=n(98764),Y=n(37128),q=n(98496),Q=n(18039),$=n(13274);const Z=({uri:e,imageUrl:t,name:n,showAvatar:r,spec:s,isCompactMode:a=!1})=>{const o=(0,I.s)(),l=(0,i.useCallback)((()=>{s&&o.logInteraction(s.addedByLinkFactory({position:0,uri:e}).hitUiNavigate({destination:e}))}),[o,s,e]);return(0,$.jsx)(g.h,{menu:(0,$.jsx)(q.B,{uri:e}),children:(0,$.jsxs)(z.Link,{className:Q.A.addedBy,to:e,onClick:l,children:[r&&(0,$.jsx)(Y.e,{images:[{url:t,width:null,height:null}],label:n,width:a?16:24,userIconSize:"small"}),(0,$.jsx)(K.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:n})]})})};var X=n(82390),J=n(28078),ee=n(15552);const te=({concertsCount:e="1",concertDate:t,concertURI:n,index:i,spec:r})=>{const s=(0,I.s)(),a=()=>{const e=r.eventLinkFactory({position:i,uri:n,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:n});s.logInteraction(e)},o=p.Ru.formatDate((0,ee.ad)(t),{month:"short",day:"numeric"});return"1"===e?(0,$.jsx)(K.E,{className:Q.A.eventDate,variant:"bodySmall",semanticColor:"textSubdued",children:(0,$.jsx)(z.Link,{to:n,onClick:a,children:o})}):(0,$.jsx)(K.E,{className:Q.A.eventDate,variant:"bodySmall",semanticColor:"textSubdued",children:(0,$.jsx)(z.Link,{to:n,onClick:a,children:p.Ru.get("concerts_near_you.date",e,o)})})},ne=({dateAdded:e,prefix:t})=>{let n=e.getTime()>0&&p.Ru.formatRelativeDate(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"});return n&&t&&(n=`${t} ${n}`),(0,$.jsx)(K.E,{variant:"bodySmall",semanticColor:"textSubdued",children:n})};var ie=n(16482),re=n(98950),se=n(36471);const ae=({eventDate:e,ticketingSiteURL:t})=>{const n=(0,se.W)(),i=p.Ru.formatDate((0,ee.ad)(e),{year:"numeric",month:"short",day:"numeric"}),r=p.Ru.get("tracklist.livestream");return(0,ee.ad)(e)<new Date?(0,$.jsx)(K.E,{className:Q.A.eventDate,variant:"bodySmall",semanticColor:"textSubdued",children:`${r} • ${i}`}):(0,$.jsx)(K.E,{className:Q.A.eventDate,variant:"bodySmall",semanticColor:"textSubdued",children:(0,$.jsxs)("a",{href:t,onClick:()=>{n({targetUri:t,intent:"navigate",type:"click"})},children:[(0,$.jsx)(re.T,{className:Q.A.eventTicketIcon,height:19}),`${r} • ${i}`]})})},oe=({concertsCount:e="1",concertVenue:t,concertURI:n,index:i,spec:r})=>{const s=(0,I.s)(),a="1"===e?t:p.Ru.get("concerts_near_you.multiple_locations");return(0,$.jsx)(K.E,{className:Q.A.eventVenue,variant:"bodySmall",semanticColor:"textSubdued",children:(0,$.jsx)(z.default,{to:n,onClick:()=>{const e=r.eventLinkFactory({position:i,uri:n,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:n});s.logInteraction(e)},children:a})})},le=({uri:e,imageUrl:t,displayName:n,username:i,piled:r,onClick:s})=>{const a=(0,$.jsx)(Y.e,{images:[{url:t,width:null,height:null}],label:n,width:24,userIconSize:"small",piled:r,displayName:n,username:i,className:Q.A.facepileAvatar});return e?(0,$.jsx)(g.h,{menu:(0,$.jsx)(q.B,{uri:e}),children:(0,$.jsx)(z.Link,{className:Q.A.facepile,to:e,onClick:s,children:a})}):(0,$.jsx)("span",{className:Q.A.facepile,children:a})},ce=({users:e,spec:t})=>{const n=(0,I.s)();return(0,$.jsx)(i.Fragment,{children:e.slice(0,5).map(((e,i)=>(0,$.jsx)(le,{uri:e.uri,imageUrl:(0,P.g)(e.images)?.url||"",displayName:e.displayName,username:e.username,piled:i>0,onClick:()=>{if(!t||!e.uri)return;const r=t.addedByLinkFactory({position:i,uri:e.uri}).hitUiNavigate({destination:e.uri});n.logInteraction(r)}},e.uri||e.displayName)))})};var ue=n(97500),de=n.n(ue),me=n(62328),pe=n(21361),he=n(93656),ge=n(87687),fe=n(30232),be=n(798);const ve=({isDisliked:e,feedbackPath:t,feedbackUri:n,deleteFeedbackPath:r,spec:s,onClick:a,name:o,contextUri:l})=>{const c=(0,I.s)(),u=(0,ge.K)(),{enqueueSnackbar:d}=(0,me.dh)(),{uri:m}=(0,fe.o)((e=>({uri:e?.item?.uri})),((e,t)=>e?.uri===t?.uri)),h=(0,i.useCallback)((async()=>{n&&(await he.F(pe.n.getInstance(),r,n),a?.(),s&&l&&c.logInteraction(s.addRecommendationButtonFactory().hitAddToPlaylist({playlist:l,itemToBeAdded:n})))}),[r,n,a,c,l,s]),g=(0,i.useCallback)((async()=>{n&&(await he.i(pe.n.getInstance(),t,n),m===n&&u.skipToNext(),a?.(),d(p.Ru.get("feedback.hide-song",o)),s&&l&&c.logInteraction(s.removeRecommendationButtonFactory().hitRemoveRecommendation({recommendedItemUri:n,contextUri:l})))}),[n,t,m,a,d,o,s,l,u,c]);return(0,$.jsx)(be.O,{className:de()(Q.A.rowFeedbackButton,Q.A.rowFeedback),onClick:e?h:g,isDisliked:e,size:"small"})};var ye=n(53206),_e=n(64652),Ee=n(66014),xe=n(43418),Ce=n(49798),Se=n(91058);const Ae=({releaseDate:e})=>(0,$.jsx)(K.E,{variant:"bodySmall",children:(0,ee.gD)((0,ee.ad)(e))});var we=n(20502),Ie=n(38276),Te=n(92633),Ne=n(13411),Re=n(71781);const ke=e=>e?.type===N.c.SHOW,Oe=i.memo((function({uri:e,uid:t,name:n,duration_ms:N,artists:K,albumOrShow:Y,isMOGEFRestricted:q,isExplicit:ee,isPlayable:re,isLocal:se=!1,isPaywalled:le,isUserSubscribed:ue,index:de,playIndex:me=null,isMixedMedia:pe,addedBy:he,hasDecoratedAddedBy:ge,dateAdded:fe,release_date:be,type:Oe,imgUrl:Pe,contextUri:je,onMove:Le,onInsert:De,usePlayContextItem:Ue,allowedDropTypes:Me,feedbackPath:Be,feedbackUri:Fe,deleteFeedbackPath:He,isDisliked:Ve,ticketingSiteURL:ze="",eventDate:Ge,concertsCount:We,concertDate:Ke,concertURI:Ye="",concertVenue:qe,isConcert:Qe,isBlend:$e=!1,canRemove:Ze,onFeedbackClick:Xe,playlistName:Je,authorName:et,isOutOfMarket:tt,consumptionCapExplanation:nt,isOwnedBySelf:it=!1,isCompactMode:rt=!1,hasAssociatedVideo:st=!1}){const at=(0,I.s)(),{spec:ot}=(0,T.r)(d.i,{data:{position:de,reason:"",uri:e}}),lt=(0,r.wA)(),ct=(0,s.Zp)(),{filter:ut}=(0,i.useContext)(G.g),dt=(0,A.T)(e),mt=(0,U.g)(e,re,se,tt),pt=(0,y.w)(),{enqueueSnackbar:ht}=(0,L.d)(),gt="episode"===Oe,ft="audiobook"===Oe,bt="track"!==Oe&&ke(Y)&&Y.mediaType===R.Q.VIDEO,vt=le&&!ue,yt=ft&&vt,{badges:_t,hasBadges:Et}=(0,O.b)({downloadAvailability:dt,isExplicit:ee,isMOGEFRestricted:q,isPaywalled:le,hasAssociatedVideo:st}),xt=(0,D.c)(),Ct=()=>{const e=ot.eventLinkFactory({position:de,uri:Ye,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:Ye});at.logInteraction(e)};let St=de+1;pe&&(St=bt?(0,$.jsx)(a.B,{"":"video-icon",size:"small","aria-hidden":"true"}):gt?(0,$.jsx)(o.L,{"":"podcast-icon",size:"small","aria-hidden":"true"}):ft?(0,$.jsx)(l.l,{"":"audiobook-icon",size:"small","aria-hidden":"true"}):(0,$.jsx)(c.v,{"":"track-icon",size:"small","aria-hidden":"true"}));let At=(0,$.jsx)(F.P,{uri:e,uid:t,albumUri:Y?.uri,artists:K,contextUri:je,canBeRemovedFromPlaylist:Ze});gt?At=(0,$.jsx)(M.b,{uri:e,uid:t,showUri:Y?.uri,contextUri:je,canBeRemovedFromPlaylist:Ze}):se?At=(0,$.jsx)(B.A,{uri:e,uid:t,contextUri:je,canBeRemovedFromPlaylist:Ze}):ft&&(At=(0,$.jsx)(f.p,{uri:e,uid:t,contextUri:je,includeGoToAudiobook:!0,canBeRemovedFromPlaylist:Ze}));let wt=K?.map((e=>e.name)).join(p.Ru.getSeparator())||"";gt&&ke(Y)?wt=Y.publisher:ft&&(wt=et||"");const It=he?.[0],Tt=(0,P.g)(It?.images,{desiredWidth:24,desiredLabel:"small"}),Nt=(0,w.P)({uri:e},{featureIdentifier:"playlist"}),Rt=Ue({uid:t,uri:e,index:me??de}),{isActive:kt,isPlaying:Ot,triggerPlay:Pt,togglePlay:jt}=ft?Nt:Rt,Lt=()=>(0,$.jsx)(Ie.p,{titleText:n,children:(0,$.jsx)(V.M,{searchWords:[ut],textToHighlight:n})}),Dt=(0,i.useCallback)(((e,t)=>{ft&&nt?lt((0,h._3)(nt)):Pt({loggingParams:t})}),[nt,lt,ft,Pt]),Ut=(0,i.useCallback)(((t,n)=>{ft&&nt?lt((0,h._3)(nt)):yt?ct((0,m.o_)(e).toURLPath(!0)):jt({loggingParams:n})}),[nt,lt,ft,ct,jt,yt,e]);return(0,$.jsx)(S.pZ,{value:"row",index:de,children:(0,$.jsx)(H.f,{renderInline:!1,enabled:!0,showUri:Y?.uri,children:(t,i)=>(0,$.jsx)(g.h,{menu:At,children:(0,$.jsx)(Te.w,{uri:e,contextUri:je,index:de,onTriggerPlay:Dt,isCompactMode:rt,onTriggerPaywall:t=>{yt?ct((0,m.o_)(e).toURLPath(!0)):i(t)},onDoubleClick:()=>{ft?ct((0,m.o_)(e).toURLPath(!0)):ht(p.Ru.get("feedback.unable-to-play"))},isLocked:vt,isActive:kt,ariaRowIndex:de+1,isPlayable:mt,ageRestricted:q,dragMetadata:{name:n,createdBy:wt},onMove:Le,onInsert:De,allowedDropTypes:Me,spec:ot,canRemovePlaylistItems:Ze,children:pt.map(((t,i)=>{const r=(0,Re.y)(i,t,pt);return(0,$.jsx)(r,{ariaColIndex:i,children:(()=>{switch(t){case Ne.$.INDEX:return(0,$.jsx)($.Fragment,{children:(0,$.jsx)(H.f,{showUri:Y?.uri??"",renderInline:!1,enabled:vt,children:(0,$.jsx)(xe.$,{uri:e,playAriaLabel:p.Ru.get("tracklist.a11y.play",n,wt),onClick:Ut,isPlaying:Ot,isActive:kt,isLocked:vt,spec:ot,children:(0,$.jsx)(Se.a,{children:St})})})});case Ne.$.TITLE_AND_ARTIST:case Ne.$.TITLE_AND_AUTHOR:return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ye.e,{src:Pe,isVideo:bt,isEpisode:gt}),(0,$.jsxs)(_e.l,{children:[xt||ft?(0,$.jsx)(z.Link,{to:e,className:Q.A.rowTitle,"":"internal-track-link",children:Lt()}):Lt(),Et&&(0,$.jsxs)(J.P,{children:[_t.download&&(0,$.jsx)(E._,{}),_t.explicit&&(0,$.jsx)(x.g,{}),_t.paid&&(0,$.jsx)(b.K,{}),_t.nineteen&&(0,$.jsx)(C.q,{className:Q.A.nineteen,size:16}),_t.hasAssociatedVideo&&(0,$.jsx)(_.l,{})]}),(0,$.jsxs)(we.p,{children:[!gt&&!bt&&K&&(0,$.jsx)(W.E,{nonInteractive:se,artists:K,filter:ut,spec:ot}),(gt||ft)&&!bt&&wt]})]})]});case Ne.$.TITLE:return(0,$.jsxs)(Ee.q,{children:[xt||ft?(0,$.jsx)(z.Link,{to:e,className:Q.A.rowTitle,"":"internal-track-link",children:Lt()}):Lt(),Et&&(0,$.jsxs)(J.P,{children:[_t.download&&(0,$.jsx)(E._,{}),_t.explicit&&(0,$.jsx)(x.g,{}),_t.paid&&(0,$.jsx)(b.K,{}),_t.nineteen&&(0,$.jsx)(C.q,{className:Q.A.nineteen,size:16}),_t.hasAssociatedVideo&&(0,$.jsx)(_.l,{separator:""})]})]});case Ne.$.ARTIST:case Ne.$.AUTHOR:return(0,$.jsxs)(v.Y,{children:[!gt&&!bt&&K&&(0,$.jsx)(W.E,{nonInteractive:se,artists:K,filter:ut,spec:ot}),(gt||ft)&&!bt&&wt]});case Ne.$.ALBUM_OR_PODCAST:case Ne.$.ALBUM:return Y?(0,$.jsx)(X.g,{nonInteractive:se,uri:Y.uri,name:Y.name,creatorUri:K?.[0]?.uri,spec:ot,children:(0,$.jsx)(V.M,{searchWords:[ut],textToHighlight:Y.name})}):null;case Ne.$.ADDED_BY:return(0,$.jsx)($.Fragment,{children:$e?(0,$.jsx)(ce,{users:he,spec:ot}):(0,$.jsx)(Z,{name:It?.displayName||It?.username||"",isCompactMode:rt,uri:It?.uri||"",imageUrl:Tt?.url||"",showAvatar:ge,spec:ot})});case Ne.$.RELEASE_DATE:return(0,$.jsx)($.Fragment,{children:gt&&(0,$.jsx)(Ae,{releaseDate:be})});case Ne.$.EVENT_DATE:return(0,$.jsx)($.Fragment,{children:Ge&&ze?(0,$.jsx)(S.pZ,{value:"ticket-link",children:(0,$.jsx)(ae,{eventDate:Ge,ticketingSiteURL:ze})}):null});case Ne.$.CONCERT_DATE:return(0,$.jsx)($.Fragment,{children:Ke?(0,$.jsx)(S.pZ,{value:"ticket-link",children:(0,$.jsx)(te,{concertsCount:We,concertDate:Ke,concertURI:Ye,index:de,spec:ot})}):null});case Ne.$.EVENT_INFO:case Ne.$.CONCERT_VENUE:return(0,$.jsx)($.Fragment,{children:qe&&Ye?(0,$.jsx)(S.pZ,{value:"ticket-link",children:(0,$.jsx)(oe,{concertsCount:We,concertVenue:qe,concertURI:Ye,index:de,spec:ot})}):null});case Ne.$.ADDED_AT:return(0,$.jsx)($.Fragment,{children:fe?(0,$.jsx)(ne,{dateAdded:new Date(fe)}):null});case Ne.$.DURATION:return(0,$.jsxs)($.Fragment,{children:[Be&&He&&(0,$.jsx)(ve,{isDisliked:Ve,feedbackPath:Be,deleteFeedbackPath:He,feedbackUri:Fe||e,onClick:Xe,name:Je,contextUri:je}),!bt&&!tt&&(0,$.jsx)(j.d,{uri:e,spec:ot,type:Oe,isOwnedBySelf:it}),Qe&&(0,$.jsx)(z.Link,{to:Ye,onClick:Ct,children:(0,$.jsx)(u.l,{className:Q.A.eventTicketIcon,height:19})}),(0,$.jsx)(ie.P,{duration:N}),(0,$.jsx)(Ce.Y,{menu:At,label:p.Ru.get("more.label.track",n,wt),spec:ot})]});case Ne.$.ACTIONS:case Ne.$.ADD:case Ne.$.ALBUM_OR_SHOW:case Ne.$.PLAYS:return null;default:(0,k.d)(t)}return null})()},`column-${i}`)}))})})})})}),((e,t)=>e.uri===t.uri&&e.allowedDropTypes.length===t.allowedDropTypes.length&&e.isPlayable===t.isPlayable&&e.isMixedMedia===t.isMixedMedia&&e.consumptionCapExplanation===t.consumptionCapExplanation&&e.isCompactMode===t.isCompactMode))},15704:(e,t,n)=>{"use strict";n.d(t,{T:()=>g,l:()=>h});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(31176),l=n(22215),c=n(14056),u=n(19498);const d="nOw3c5b4tD945Qcv8oV4";var m=n(13274);const p=(0,i.memo)((({separator:e="•",iconSize:t="small",className:n,variant:i="bodySmall"})=>(0,m.jsxs)(a.E,{as:"span",className:s()(d,n),children:[(0,m.jsx)(o.B,{size:t}),(0,m.jsx)(a.E,{as:"span",variant:i,children:c.Ru.get("card.tag.video")}),(0,m.jsx)(a.E,{as:"span",variant:i,children:e})]}))),h=(0,i.memo)((({separator:e})=>(0,l.NC)(u.LX5)?(0,m.jsx)(p,{separator:e}):null)),g=(0,i.memo)((({separator:e,...t})=>(0,m.jsx)(p,{separator:e,...t})))},5587:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});var i=n(79474),r=n(44104),s=n(38959);var a=n(13274);const o=i.forwardRef((function({children:e,className:t,onKeyDown:n=(()=>{}),isFluid:o=!1,...l},c){const u=(0,i.useRef)(null);(e=>{const t=(0,i.useRef)(null);(0,i.useEffect)((()=>{const n=e.current;if(!n)return()=>{};const i=e=>{const n=e.target;if(n instanceof HTMLElement){const e=parseInt(n.closest("[aria-rowindex]")?.getAttribute("aria-rowindex")??"",10),i=parseInt(n.closest("[aria-colindex]")?.getAttribute("aria-colindex")??"",10);t.current={target:n,rowIndex:e,colIndex:i}}};return n.addEventListener("focusout",i),()=>{n.removeEventListener("focusout",i)}}),[e]),(0,i.useEffect)((()=>{if(t.current&&e.current){const{target:n,rowIndex:i,colIndex:r}=t.current,a=e.current?.contains(n);!a&&Number.isInteger(i)&&Number.isInteger(r)&&(0,s.oe)(e.current,i,r),t.current=null}}))})(u),(0,i.useImperativeHandle)(c,(()=>u.current));const d=(0,i.useCallback)((e=>{u.current?.contains(e.target)&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||e.preventDefault(),"ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===e.key&&(0,s.YR)(u.current,r.O.UP,o),"ArrowDown"===e.key&&(0,s.YR)(u.current,r.O.DOWN,o),"ArrowLeft"===e.key&&(0,s.YR)(u.current,r.O.LEFT,o),"ArrowRight"===e.key&&(0,s.YR)(u.current,r.O.RIGHT,o),n(e))}),[n,o]);return(0,a.jsx)("div",{ref:u,role:"grid","aria-rowcount":l["aria-rowcount"],"aria-colcount":l["aria-colcount"],"aria-label":l["aria-label"],className:t,onKeyDown:d,tabIndex:0,"":l["data-testid"],children:e})}))},52612:(e,t,n)=>{"use strict";n.d(t,{T:()=>o});var i=n(79474),r=n(14288),s=n(34888),a=n(13274);const o=({children:e,columnIndex:t,className:n,...o})=>{const l=(0,i.useRef)(null);return(0,r.g)(l),(0,s.l)(l),(0,a.jsx)("div",{ref:l,className:n,role:"gridcell","aria-colindex":t+1,...o,children:e})}},22325:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(79474),r=n(14288),s=n(34888),a=n(13274);const o=({children:e,ariaSort:t,columnIndex:n,className:o})=>{const l=(0,i.useRef)(null);return(0,r.g)(l),(0,s.l)(l),(0,a.jsx)("div",{ref:l,className:o,role:"columnheader","aria-colindex":n+1,...t?{"aria-sort":t}:{},tabIndex:-1,children:e})}},96470:(e,t,n)=>{"use strict";n.d(t,{$:()=>a});var i=n(79474),r=n(38959),s=n(13274);const a=({children:e,rowIndex:t,className:n,"aria-selected":a})=>{const o=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const e=o.current,t=e=>{const t=e.currentTarget;t.contains(document.activeElement)||(0,r.Ai)(t)};return e&&e.addEventListener("click",t),()=>{e&&e.removeEventListener("click",t)}}),[]),(0,s.jsx)("div",{ref:o,className:n,role:"row","aria-rowindex":t+1,"aria-selected":a,children:e})}},34888:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});var i=n(79474);const r=e=>{(0,i.useEffect)((()=>{if(!e.current)return;let t=e.current.parentElement;do{if(!t)return;t.getAttribute("role")||t.setAttribute("role","presentation"),t=t.parentElement}while("grid"!==t?.getAttribute("role"))}),[e])}},30132:(e,t,n)=>{"use strict";n.d(t,{$:()=>d});var i=n(79474),r=n(44104),s=n(61252),a=n(24289);function o(e,t,n=!0,i=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,s.fk)(e))return;const a=e.querySelector('[tabindex="0"]');t===r.O.UP&&(0,s.MS)(a,l(e,a,r.O.UP,n,i)),t===r.O.DOWN&&(0,s.MS)(a,l(e,a,r.O.DOWN,n,i))}function l(e,t,n,i,a){const o=t.closest('li[role="listitem"]');if(!o)return t;let l=o,c=t;const u=Array.from(e.querySelectorAll('li[role="listitem"]')),d=u.indexOf(o);if(d<0)return t;if(n===r.O.UP){if(document.activeElement===e){if(l=u[u.length-1],a){const e=l?.querySelectorAll(s.nu);c=e[e.length-1]}else c=l?.querySelector(s.nu);return c??t}if(a){const e=Array.from(o.querySelectorAll(s.nu)),n=e.indexOf(t)-1;if(n>=0)return e[n]}let n=d-1;const r=()=>!c&&(!i&&n>=0||i&&d!==n);do{l=u[n];if(i&&!l&&(n=u.length-1,l=u[n]),a){const e=l?.querySelectorAll(s.nu);c=e?e[e.length-1]:null}else c=l?.querySelector(s.nu);n-=1}while(r())}else if(n===r.O.DOWN){if(document.activeElement===e)return l=u[0],c=l?.querySelector(s.nu),c??t;if(a){const e=Array.from(o.querySelectorAll(s.nu)),n=e.indexOf(t)+1;if(n<e.length)return e[n]}let n=d+1;const r=()=>{const e=!i&&n<=u.length;return!c&&(e||i&&d!==n)};do{l=u[n];i&&!l&&(n=0,l=u[n]),c=l?.querySelector(s.nu),n+=1}while(r())}return c||t}var c=n(62882),u=n(13274);const d=(0,i.forwardRef)((({onKeyDown:e,children:t,circular:n=!0,allowsMultipleInteractiveChildrenInItem:l=!1,...d},m)=>{const p=(0,a.N)(m);(0,c.R)(p);const h=(0,i.useCallback)((t=>{p.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),document.documentElement.classList.remove("no-focus-outline")),"ArrowUp"===t.key&&o(p.current,r.O.UP,n,l),"ArrowDown"===t.key&&o(p.current,r.O.DOWN,n,l),e?.(t))}),[n,l,p,e]),g=(0,i.useCallback)((e=>{if(!p.current)return;const t=e.target,n=p.current.querySelector('[tabindex="0"]');t.closest('li[role="listitem"]')&&t!==n&&(0,s.MS)(n,t,{preventScroll:!0})}),[p]);return(0,u.jsx)("ul",{role:"list",ref:p,onKeyDown:h,onFocus:g,tabIndex:0,...d,children:t})}))},68529:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var i=n(79474),r=n(14288),s=n(13274);const a=({children:e,innerRef:t,...n})=>{const a=(0,i.useRef)(null),o=t??a;return(0,r.g)(o),(0,s.jsx)("li",{ref:o,role:"listitem",...n,children:e})}},80314:(e,t,n)=>{"use strict";n.d(t,{R:()=>p});var i=n(79474),r=n(44104),s=n(61252),a=n(24289);function o(e,t,n=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,s.fk)(e))return;const i=e.querySelector('[tabindex="0"]');t===r.O.UP&&(0,s.MS)(i,l(e,i,r.O.UP,n)),t===r.O.DOWN&&(0,s.MS)(i,l(e,i,r.O.DOWN,n)),t===r.O.RIGHT&&(0,s.MS)(i,c(i,r.O.RIGHT,n)),t===r.O.LEFT&&(0,s.MS)(i,c(i,r.O.LEFT,n)),t===r.O.HOME&&(0,s.MS)(i,u(r.O.HOME,n)??i),t===r.O.END&&(0,s.MS)(i,u(r.O.END,n)??i)}function l(e,t,n,i=!1){const a=t.closest('li[role="row"]');if(!a)return t;let o=a;const l=Array.from(e.querySelectorAll('li[role="row"]')),u=Array.from(a.querySelectorAll(s.nu)),d=l.indexOf(a);if(d<0)return t;const m=(i&&t!==u[0]||!i&&t!==a)&&!(t instanceof HTMLLIElement);if(n===r.O.UP){if(document.activeElement===e){o=l[l.length-1];return(i?o.querySelector(s.nu):o)??t}if(m)return c(t,r.O.LEFT,i);let n=d-1;if(-1===n)return t;o=l[n],n-=1}else if(n===r.O.DOWN){if(document.activeElement===e){o=l[0];return(i?o.querySelector(s.nu):o)??t}if(m)return c(t,r.O.RIGHT,i);let n=d+1;if(n===l.length)return t;o=l[n],n+=1}return(i?o.querySelector(s.nu):o)??t}function c(e,t,n=!1){const i=e.closest('li[role="row"]');if(!i)return e;let a=e;const o=Array.from(i.querySelectorAll(s.nu)),l=o.indexOf(e);let c=0;if(t===r.O.RIGHT&&l-1!==o.length)c=l+1;else{if(t===r.O.LEFT&&-1===l)return i;if(t===r.O.LEFT&&0!==l)c=l-1;else if(t===r.O.LEFT&&0===l){return(n?i.querySelector(s.nu):i)??i}}return a=o.at(c),a??e}function u(e,t=!1){const{currentFocus:n,listEl:i}=function(){const e=document.activeElement,t=e?.closest("ul");return((0,r.I)(e)||e instanceof HTMLLIElement)&&t?{currentFocus:e,listEl:t}:{currentFocus:null,listEl:null}}();if(null===n||null===i)return null;const a=n.closest('li[role="row"]');if(!a)return n;const o=Array.from(i.querySelectorAll('li[role="row"]')),l=Array.from(a.querySelectorAll(s.nu));if(o.indexOf(a)<0)return n;const c=t&&n===l[0]||!t&&n===a;if(e===r.O.HOME){if(c){return(t?o[0].querySelector(s.nu):o[0])??n}return(t?l[1]:l[0])??n}if(e===r.O.END){if(c){return(t?o[o.length-1].querySelector(s.nu):o[o.length-1])??n}return l[l.length-1]??n}return n}var d=n(62882),m=n(13274);const p=(0,i.forwardRef)((({onKeyDown:e,children:t,firstInteractiveIsWrapper:n=!1,...l},c)=>{const u=(0,a.N)(c);(0,d.R)(u);const p=(0,i.useCallback)((t=>{u.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"Home"!==t.key&&"End"!==t.key||t.preventDefault(),"ArrowUp"!==t.key&&"ArrowDown"!==t.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===t.key&&o(u.current,r.O.UP,n),"ArrowDown"===t.key&&o(u.current,r.O.DOWN,n),"ArrowRight"===t.key&&o(u.current,r.O.RIGHT,n),"ArrowLeft"===t.key&&o(u.current,r.O.LEFT,n),"Home"===t.key&&o(u.current,r.O.HOME,n),"End"===t.key&&o(u.current,r.O.END,n),e?.(t))}),[n,u,e]),h=(0,i.useCallback)((e=>{if(!u.current)return;const t=e.target,n=u.current.querySelector('[tabindex="0"]');t.closest('li[role="row"]')&&t!==n&&(0,s.MS)(n,t,{preventScroll:!0})}),[u]);return(0,m.jsx)("ul",{role:"treegrid",ref:u,onKeyDown:p,onFocus:h,tabIndex:0,...l,children:t})}))},71673:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var i=n(79474),r=n(14288),s=n(13274);const a=({children:e,innerRef:t,reRunOnDOMUpdate:n=!1,...a})=>{const o=(0,i.useRef)(null),l=t??o;return(0,r.g)(l,n),(0,s.jsx)("li",{ref:l,"aria-expanded":"true","aria-level":1,role:"row",...a,children:e})}},16454:(e,t,n)=>{"use strict";n.d(t,{o:()=>r});var i=n(13274);function r({children:e,...t}){return(0,i.jsxs)("label",{className:"hidden-visually",children:[e,(0,i.jsx)("input",{...t})]})}},90226:(e,t,n)=>{"use strict";n.d(t,{f:()=>y});var i=n(98764),r=n(61080),s=n(11283),a=n(14056),o=n(41318),l=n(30668),c=n(67878),u=n(56333),d=n(79474),m=n(765);const p="a_fhw77sDAmUWT0DjcLz",h="IVCTj3T2ms7JvLUiF4hZ",g="_vX7nRSblUeXv4DTYkKu",f="ST9Bhw7AdmFCTZDIKw3n";var b=n(13274);const v=({showUri:e})=>{const t=(0,o.Oj)(),n=function(e){const t=(0,m.L)(),[n,i]=(0,d.useState)(null);return(0,d.useEffect)((()=>{!async function(){try{const n=await t.getAccessInfo(e);i(n)}catch(e){console.error(e),i(void 0)}}()}),[t,e]),n}(e);return null===n?null:n?.basic?(e=>{const n=e.title,s=e.body;return(0,b.jsxs)("div",{className:p,children:[(0,b.jsx)(i.E,{as:"div",variant:"bodyMediumBold",className:h,children:n}),(0,b.jsx)(i.E,{as:"div",variant:"bodySmall",className:g,children:s}),(0,b.jsx)("div",{className:f,children:(0,b.jsx)(r.$,{size:"small",colorSet:"invertedLight",onClick:()=>{t({type:"close"})},children:e.cta})})]})})(n.basic):n?.upsellLink?(e=>{const n=e.title,o=e.body;return(0,b.jsxs)("div",{className:p,children:[(0,b.jsx)(i.E,{as:"div",variant:"bodyMediumBold",className:h,children:n}),(0,b.jsx)(i.E,{as:"div",variant:"bodySmall",className:g,children:o}),(0,b.jsxs)("div",{className:f,children:[(0,b.jsx)(s.H,{size:"small",semanticColor:"textBase",onClick:()=>{t({type:"close"})},children:a.Ru.get("close")}),(0,b.jsx)(r.$,{size:"small",colorSet:"invertedLight",href:e.url,children:e.cta})]})]})})(n.upsellLink):(()=>{const e=a.Ru.get("paywalls.modal-heading"),n=(0,b.jsxs)(b.Fragment,{children:[a.Ru.get("paywalls.modal-body-p1"),(0,b.jsx)("br",{}),(0,b.jsx)("br",{}),a.Ru.get("paywalls.modal-body-p2"),(0,b.jsx)("br",{}),(0,b.jsx)("br",{}),a.Ru.get("paywalls.modal-body-p3")]});return(0,b.jsxs)("div",{className:p,children:[(0,b.jsx)(i.E,{as:"div",variant:"bodyMediumBold",className:h,children:e}),(0,b.jsx)(i.E,{as:"div",variant:"bodySmall",className:g,children:n}),(0,b.jsx)("div",{className:f,children:(0,b.jsx)(s.H,{size:"small",semanticColor:"textBase",onClick:()=>{t({type:"close"})},children:a.Ru.get("close")})})]})})()},y=({children:e,enabled:t,showUri:n,renderInline:i=!0})=>t&&n?(0,b.jsx)(u.y,{trigger:"click",action:"toggle",offset:[-2,20],renderInline:i,content:(0,b.jsx)(c.z,{children:(0,b.jsx)(v,{showUri:n})}),children:e}):(0,l.d)(e)?e(!1,(()=>{}),{current:null}):e},79862:(e,t,n)=>{"use strict";n.d(t,{F:()=>k});var i=n(79474),r=n(22215),s=n(19498),a=n(95999),o=n(9440),l=n(24290),c=n(76816),u=n(91330),d=n(97500),m=n.n(d),p=n(45992),h=n(14056),g=n(98764),f=n(18039),b=n(13274);const v=({children:e})=>(0,b.jsx)(g.E,{dir:"auto",className:m()(f.A.rowTitle,f.A.discTitle,"standalone-ellipsis-one-line"),as:"div",variant:"bodyMediumBold",children:e});var y=n(64652),_=n(91058),E=n(87358),x=n(77962);const C=({discNumber:e})=>(0,b.jsxs)("div",{className:m()(f.A.trackListRowGrid,f.A.discRow),children:[(0,b.jsx)(E.y,{ariaColIndex:0,children:(0,b.jsx)("div",{className:f.A.rowMarker,children:(0,b.jsx)(_.a,{children:(0,b.jsx)(p.I,{size:"small"})})})}),(0,b.jsx)(x.U,{ariaColIndex:1,children:(0,b.jsx)(y.l,{children:(0,b.jsx)(v,{children:h.Ru.get("tracklist.disc-sperator.title",e)})})})]});var S=n(94544),A=n(86892),w=n(15891),I=n(63565),T=n(76998),N=n(8468);const R=(e,t)=>{const{request:n}=(0,i.useContext)(w.j),r=(0,A.lB)((()=>t),[t]),s=(0,i.useMemo)((()=>function(e){return(0,N.Y)(e)?e.items.reduce(((e,t)=>(e.push(t.discNumber-1),e.concat(Array(t.nrTracks??0).fill(t.discNumber)))),[]):null}(r)),[r]);return(0,i.useCallback)((async(t,i)=>{const a=await n(I.xt,{uri:e,offset:null!==s?t-s[t]:t,limit:i});return(0,T.TI)(a?.data,r)}),[r,s,n,e])},k=i.memo((function({ariaLabel:e,nrTracks:t,discs:n,albumUri:d,highlightUri:m,scrollToIndex:p,usePlayContextItem:h,hasHeaderRow:g=!0,initalTracks:f,isCompactMode:v=!1}){const y=(0,r.NC)(s.LX5),_=R(d,n),E=(0,i.useRef)(null),x=(0,i.useRef)(!1),[A,w]=(0,i.useState)(null);(0,i.useEffect)((()=>{E.current&&(A?E.current.scrollToIndex(A):p&&E.current.scrollToIndex(p))}),[A,p]);const I=(0,i.useCallback)((async(e,t)=>{const n=await _(e,t);if(m&&!A){const e=n.items?.findIndex((e=>e.type===o.c.TRACK&&e?.uri===m));w(e||-1)}return n}),[_,m,A]),T=(0,c.w)(),N=(0,i.useCallback)((e=>({uri:e.type===o.c.TRACK?e.linkedUri??e.uri:""})),[]),k=(0,i.useCallback)(((e,t)=>{if("AlbumDisc"===e.type)return(0,b.jsx)(C,{discNumber:e.discNumber},`${t}-${e.discNumber}`);const n=e.linkedUri??e.uri,i=e.playcount?parseInt(e.playcount,10):0,r=!(x.current||!m||m!==e.uri&&m!==n);r&&(x.current=!0);const s=e.hasAssociatedVideo;return(0,b.jsx)(u.d,{index:t,trackNumber:e.trackNumber,contextUri:d,uri:n,uid:e.uid,duration_ms:e.duration.milliseconds,name:e.name,isPlayable:e.isPlayable,artists:e.artists,isExplicit:e.isExplicit,isMOGEFRestricted:e.is19PlusOnly,playcount:i,shouldHighLight:r,usePlayContextItem:h,isCompactMode:v,hasAssociatedVideo:s&&y},t+e.uri)}),[m,d,h,v,y]);return(0,b.jsx)(a.pZ,{value:"album-tracklist",children:(0,b.jsx)(S.S4,{ariaLabel:e,hasHeaderRow:g,rowPlaceholder:l.Bz,columns:T,renderRow:k,resolveItem:N,nrTracks:t,fetchTracks:I,limit:300,outerRef:E,tracks:f,isCompactMode:v,columnPersistenceKey:"album-tracklist"},d)})}))},67207:(e,t,n)=>{"use strict";n.d(t,{g:()=>ct});var i=n(79474),r=n(11283),s=n(17337),a=n(14056),o=n(88713),l=n(53886),c=n(3731),u=n(42787),d=n(16117);var m=n(9544),p=n(67302),h=n(24577),g=n(62328),f=n(8856);function b(){const e=(0,f.h)();return{closeSnackbar:(0,i.useCallback)((t=>{t instanceof RegExp?e.current.forEach((e=>{t.test(`${e}`)&&(0,g.mk)(e)})):(0,g.mk)(t)}),[e]),closeSnackbarWithKeyPrefix:(0,i.useCallback)((t=>{e.current.forEach((e=>{`${e}`.startsWith(t)&&(0,g.mk)(e)}))}),[e])}}var v=n(33432),y=n(9440),_=n(84332),E=n(23861),x=n(51552),C=n(67222),S=n(25658),A=n(93134),w=n(3030),I=n(13274);var T=n(27742);function N(){const{enqueueSnackbar:e}=(0,T.d)();return(0,i.useCallback)((()=>{e("Something went wrong")}),[e])}var R=n(44827),k=n(87882),O=n(97500),P=n.n(O),j=n(61080),L=n(22215),D=n(76478),U=n(41318),M=n(93423);var B=n(38076),F=n(83856);let H=function(e){return e.ADD="add",e.REMOVE="remove",e}({});var V=n(42529),z=n(90129);var G=n(84346),W=n(94300),K=n(52792),Y=n(82548),q=n(82372),Q=n(39950),$=n(14494);const Z=({spec:e})=>{const t=(0,$.s)();return(0,I.jsx)(Q.S,{placeholder:a.Ru.get("web-player.aligned-curation.search-placeholder"),fullWidth:!0,alwaysExpanded:!0,onFilter:()=>{t.logInteraction(e.textFilterInputFieldFactory().keyStrokeFilter())},onClear:()=>{t.logInteraction(e.textFilterClearButtonFactory().hitClearFilter())},onActivate:()=>(t.logInteraction(e.textFilterInputFieldFactory().hitFocusInputField()),!0)})};var X=n(80964),J=n(98678);var ee=n(81755),te=n(49768),ne=n(24032),ie=n(86316),re=n(68811),se=n(80959),ae=n(86892),oe=n(11390);var le=n(81887),ce=n(2394),ue=n(75783),de=n(50718),me=n(61681),pe=n(94009),he=n(4254),ge=n(47583),fe=n(82963),be=n(16799),ve=n(88682);const ye="DquSH3YjnaIIXMZiOvwA",_e="cnJ6YaknIWRMDw3dnmMW",Ee="XixSU8ZwGqTebpHgzKQ6",xe="Sgz3pjuXbCc1XOotX1Pn",Ce="qISxXDflO0j7RZURLAdK",Se="EzJYnyBsM_CeBFaheU9o",Ae="Ag3Wh5j_CDv9I3pyKUti",we="X5mwWAw7ijxPvQOoabzQ",Ie="_fXgQSvNv1uUeA96LmFb",Te="rGZ6_xipMRzzUqX45tXU",Ne="ovCS4AiOf70DjkuziQNg",Re="kU3__q1yYBoYAn9HeS68",ke="LAdTOeZ2QwKXGF4XAXZ8",Oe="GDbY_Uz53APNwtpujCCQ",Pe="iWcofSXjs9MuRfHzkuI9",je="jFkiGjErQ20kJyxKC0AR",Le="RHoNK4qVATbstzJZm5G8",De="_iJX4yzDZzSHy_g9vp3G",Ue="v8g3JwlNkChF4Ph5BDA9",Me="XvgFwKtvocRdadc47KE9",Be="aSq_W0q0xVhSsAVDHdip",Fe=({onClick:e=(()=>{}),...t})=>{const n=(0,i.useRef)(null),{handleMouseEnter:r,handleMouseMove:s,handleMouseLeave:a,handleFocus:o}=(0,fe.t)(n),l=(0,i.useCallback)((t=>{t.stopPropagation(),e(t)}),[e]),c=(0,i.useCallback)((e=>{e.stopPropagation()}),[]);return(0,I.jsx)(ve.u,{children:(0,I.jsx)(be.H,{className:Me,onClick:l,onFocus:o,onMouseEnter:r,onMouseMove:s,onMouseLeave:a,onContextMenu:c,ref:n,as:"button",role:"menuitem",...t})})},He=({selected:e})=>e?(0,I.jsx)(le.k,{semanticColor:"textBrightAccent",size:"small"}):(0,I.jsx)("span",{className:Ae}),Ve=i.memo((function({index:e,playlist:t,filter:n,isSelected:r,onSelect:s,...a}){const o=(0,i.useContext)(V.w),l=t.type===y.c.PLAYLIST&&t.isLoading;(0,i.useEffect)((()=>{l&&o.resync(t.uri)}),[o,t.uri,l]);const c=(0,he._)();return(0,I.jsx)(Fe,{role:"menuitemcheckbox","aria-checked":r(t),onClick:n=>{n.preventDefault(),n.stopPropagation(),s(t,e)},onKeyDown:n=>{" "===n.key&&(n.preventDefault(),n.stopPropagation(),s(t,e))},...a,children:(0,I.jsx)(ce.v,{id:t.uri,className:Re,title:(0,I.jsx)(ue.d,{lineClamp:1,className:Oe,dir:"auto",children:(0,I.jsx)(ge.M,{searchWords:[n],textToHighlight:t.name})}),media:(0,I.jsx)(me.b,{fadeIn:!0,images:c("images"in t?t.images:[],24),shape:me.u.ROUNDED_CORNERS,size:pe.Qe.SIZE_24,iconSize:"xsmall",type:t.type,title:t.name,className:ke,color:t.color,loadingMode:"eager"}),trailing:(0,I.jsxs)("div",{className:Pe,children:[(0,I.jsx)(de.g,{pinned:t.pinned,size:"small"}),(0,I.jsx)(He,{selected:r(t)})]}),variant:"naked",size:"md",hoverAnimationDuration:"0ms"},t.uri)})}));var ze=n(27500),Ge=n(7079),We=n(65524);const Ke=(0,i.forwardRef)((function({children:e,setIsOpen:t,onTouchStart:n,onClick:r=(()=>{}),outerRef:s,...a},o){const{handleMouseEnter:l,handleMouseMove:c,handleMouseLeave:u,handleFocus:d}=(0,fe.t)(s,t),m=(0,i.useCallback)((e=>{e.stopPropagation(),r(e)}),[r]),p=(0,i.useCallback)((e=>{e.stopPropagation()}),[]);return(0,I.jsx)(ve.u,{children:(0,I.jsx)(be.H,{className:Me,onClick:m,onFocus:d,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onTouchStart:n,onContextMenu:p,ref:o,role:"menuitem",as:"button",...a,children:e})})})),Ye=({component:e,placement:t="right-start",children:n,onClick:r,...s})=>{const[a,o]=(0,i.useState)(!1),l=(0,i.useRef)(null),c=(0,i.useCallback)((()=>{o((e=>!e))}),[]),u=document.getElementById("curation-sheet-list");return(0,I.jsx)(We.Ay,{render:()=>a?n:null,interactive:!0,visible:a,arrow:!1,animation:!1,appendTo:u||void 0,placement:t,offset:[0,0],popperOptions:{modifiers:[{name:"preventOverflow",options:{boundary:document.body,altAxis:!0,padding:10}},{name:"flip",options:{boundary:document.body}}]},children:(0,I.jsx)(Ke,{setIsOpen:o,onTouchStart:c,ref:l,outerRef:l,onClick:r,...s,children:e})})},qe=function({folder:e,filter:t}){return(0,I.jsx)(ce.v,{id:e.uri,className:Re,title:(0,I.jsx)(ue.d,{lineClamp:1,className:Oe,dir:"auto",children:(0,I.jsx)(ge.M,{searchWords:[t],textToHighlight:e.name})}),media:(0,I.jsx)(me.b,{shape:me.u.ROUNDED_CORNERS,size:pe.Qe.SIZE_24,iconSize:"xsmall",type:e.type,title:e.name,loadingMode:"eager",className:ke}),trailing:(0,I.jsxs)("div",{className:Pe,children:[(0,I.jsx)(de.g,{pinned:e.pinned,size:"small"}),(0,I.jsx)(ze.V,{size:"small",className:Be,semanticColor:"textSubdued"})]}),variant:"naked",size:"md",hoverAnimationDuration:"0ms"},e.uri)},Qe=i.memo((function({folder:e,filter:t,id:n,children:i,...r}){const s=(0,Ge.W)();return(0,I.jsx)(Ye,{component:(0,I.jsx)(qe,{folder:e,filter:t}),placement:s?"left-start":"right-start","aria-controls":n,...r,children:i})}));var $e=n(98764);const Ze=({title:e,className:t})=>e?(0,I.jsx)("div",{className:P()(xe,t),children:(0,I.jsx)($e.E,{variant:"marginalBold",className:Se,children:e})}):null;var Xe=n(83648),Je=n(55129),et=n(4428);const tt=i.memo((function({hideCurationSheet:e,uri:t,folderUri:n,saveChanges:r,onCreate:s,...o}){const{createPlaylistFromTracks:l}=(0,et.A)(),c=(0,Xe.Zp)(),u=(0,i.useCallback)((async()=>{const i=n?{after:{uri:n}}:{before:"start"};r();let a=null;try{a=await l([t],i);const n=(0,F.o_)(a);n&&c(n.toURLPath(!0)),e()}finally{s(a)}}),[l,n,e,c,s,r,t]);return(0,I.jsx)(Fe,{role:"menuitem",onClick:u,...o,children:(0,I.jsx)(ce.v,{id:"new-playlist",title:a.Ru.get("web-player.aligned-curation.button.new-playlist"),media:(0,I.jsx)(Je.u,{size:"small"}),variant:"naked",size:"md",hoverAnimationDuration:"0ms"})})}));var nt=n(68529);const it=({height:e,...t})=>(0,I.jsx)(nt.c,{className:Ne,style:{height:e},...t}),rt=i.memo((function e({title:t,folderUri:n,uri:r,changes:s,saveChanges:o,toggleChange:l,hideCurationSheet:c,depth:d=0,filter:m="",id:p,spec:h}){const g=(0,u.Q)(),f=(0,$.s)(),b=(0,L.NC)(Y.rW),v=(0,i.useRef)(null),_=(0,i.useRef)(null),E=(0,se.y)(v),x=(0,X.jE)(),C=0===d,S=(0,i.useMemo)((()=>h.curationContextListFactory({uri:n??""})),[n,h]),A=C?18e5:3e5,{hasItems:w,getItems:T,nrValidItems:N,getPageQueriesData:R,invalidateCache:k}=function({id:e,params:t,fetch:n,limit:r,getPageQueryOptions:s}){const a=(0,ae.lB)((()=>t),[t]),o=(0,ae.lB)((()=>["react-query-items-cache",e,a]),[e,r,a]),l=(0,i.useCallback)(((e,t)=>[...o,{offset:e,limit:t}]),[o]),c=(0,X.jE)(),u=(0,i.useCallback)((async(e,t)=>{const i=s?.(a,e,t),r=i?.gcTime,o=i?.staleTime;return void 0!==i||void 0!==o||void 0!==r?c.fetchQuery({...i,queryKey:l(e,t),queryFn:()=>n(a,e,t),staleTime:o,gcTime:r}):n(a,e,t)}),[n,s,l,a,c]),{invalidateCache:d,...m}=(0,oe.E)({nrItems:r,fetch:u,limit:r});return{...m,invalidateCache:(0,i.useCallback)((()=>{c.invalidateQueries({queryKey:o}),d()}),[d,c,o]),getPageQueriesData:(0,i.useCallback)((e=>c.getQueriesData({...e,queryKey:o,predicate:t=>{const n=t.queryKey,i=n?.[2],r=n?.[3];return e?.predicate?.(i,r)??!0}})),[o,c])}}({id:"curation-list",params:{curatedItemUri:r,folderUri:n,textFilter:m},fetch:(0,i.useCallback)(((e,t,n)=>g.getCurationContexts({...e,offset:t,limit:n})),[g]),limit:50,getPageQueryOptions:(0,i.useCallback)(((e,t,n)=>0===t?{staleTime:0,cacheTime:A}:void 0),[A])});(0,ie.L)((0,J.YQ)(k,200,{leading:!0,trailing:!0,maxWait:1e3}));const O=w&&!m?N:R({predicate:e=>e.folderUri===n&&!e.textFilter}).sort((([e],[t])=>(x.getQueryState(t)?.dataUpdatedAt??0)-(x.getQueryState(e)?.dataUpdatedAt??0))).at(0)?.[1]?.totalLength;let j;w?j=N+1:void 0!==O&&(j=O+1);const D=(0,i.useCallback)((e=>s.has(e.uri)?!e.hasCuratedItems:!!e.hasCuratedItems),[s]),U=(0,i.useCallback)(((e,t)=>{const n=S.curationContextItemFactory({uri:e.uri,position:t});l(e.uri,{type:e.hasCuratedItems?H.REMOVE:H.ADD,name:e.name,image:"images"in e&&e.images.at(0)?.url||""}),f.logInteraction(D(e)?n.hitDeselectEntityInList({entityToBeDeselected:e.uri}):n.hitSelectEntityInList({entityToBeSelected:e.uri}))}),[D,S,f,l]),M=(0,i.useCallback)((e=>{f.logInteraction(S.createPlaylistButtonFactory({uri:e??""}).hitCreatePlaylist())}),[S,f]),B=(0,i.useCallback)(((e,t,n,i)=>(0,I.jsx)(it,{height:e,"aria-posinset":i,"aria-setsize":n},t)),[]),V=(0,i.useCallback)(((t,n)=>T(t,n).map(((n,i)=>{const a=t+i,u=a+2;if(!n)return B("48px",a,j,u);const p=`curation-folder-submenu-${(0,F.o_)(n.uri)?.id}`;return n.type===y.c.FOLDER?(0,I.jsx)(Qe,{folder:n,filter:m,id:p,"aria-setsize":j,"aria-posinset":u,children:(0,I.jsx)(e,{title:n.name,folderUri:n.uri,uri:r,toggleChange:l,changes:s,saveChanges:o,hideCurationSheet:c,depth:d+1,id:p,spec:h})},`${n.uri}`):(0,I.jsx)(Ve,{index:a,playlist:n,filter:m,isSelected:D,onSelect:U,"aria-setsize":j,"aria-posinset":u},`${n.uri}`)}))),[T,B,j,r,l,s,o,c,d,m,h,D,U]);(0,i.useLayoutEffect)((()=>{C||void 0===O||function(e){const t=e?.closest("[data-tippy-root]");if(t&&"_tippy"in t){const e=t._tippy;e?.popperInstance?.forceUpdate()}}(_.current)}),[C,O]);const z=C?ee.e:te.Q;return(0,I.jsxs)(z,{"aria-label":a.Ru.get("web-player.aligned-curation.add-to-playlist-menu"),depth:d,className:P()(je,{"circular-sp-vietnamese":b,[ye]:!C,[_e]:!C}),id:p,ref:C?null:_,children:[(0,I.jsx)(Ze,{title:t,className:Ce}),(0,I.jsx)(tt,{hideCurationSheet:c,uri:r,folderUri:n,saveChanges:o,onCreate:M,className:P()(Me,Le,{[Ue]:E,[De]:0!==O}),"aria-setsize":j,"aria-posinset":1}),(0,I.jsx)(re.a,{onInstanceCreated:e=>{v.current=e.elements().viewport},className:Ie,style:{height:48*(O??(C?7:1))+"px"},children:(0,I.jsx)("div",{className:Te,children:(0,I.jsx)(ne.L,{renderRows:V,nrRows:N,rowHeight:48,scrollNodeRef:v,renderPlaceholder:B})})})]})})),st=({uri:e,onChangesSaved:t,onHasChanges:n,onHide:s})=>{const{changes:o,toggleChange:l,saveChanges:c}=((e,t)=>{const n=(0,u.Q)(),r=(0,i.useContext)(V.w),s=(0,z.W)(),o=N(),[l,c]=(0,i.useState)(new Map),d=(0,i.useCallback)(((e,t)=>{c((n=>{const i=new Map(n);return i.has(e)?i.delete(e):i.set(e,t),i}))}),[c]),m=(0,i.useCallback)((async(e,t)=>{let n=a.Ru.get("web-player.aligned-curation.feedback.changes-saved"),i=!1;if(1===e.length&&0===t.length){const t=l.get(e[0]);if(n=a.Ru.get("web-player.aligned-curation.feedback.added",t?.name),i=t?.image,!i&&(0,F.nu)(e[0])){const t=await Promise.race([r.getMetadata(e[0]).then((({images:e})=>e)),new Promise((e=>setTimeout((()=>e([])),1e3)))]);i=(0,h.g)(t,{desiredSize:24})?.url}}else if(0===e.length&&1===t.length){const e=l.get(t[0]);n=a.Ru.get("web-player.aligned-curation.feedback.removed",e?.name),i=e?.image}s({message:n,imageSrc:i})}),[l,s,r]),p=(0,i.useCallback)((async()=>{if(0===l.size)return;const i=[],r=[];for(const[e,t]of l)t.type===H.ADD?i.push(e):t.type===H.REMOVE&&r.push(e);try{const s=await(n?.curateItems(e,i,r));m(i,r),t?.(s,e,l)}catch{o()}}),[l,n,e,m,t,o]);return{changes:l,toggleChange:d,saveChanges:p}})(e,t),d=(0,L.NC)(Y.rW),{setFilter:g,filter:f}=(0,i.useContext)(q.g);(0,i.useEffect)((()=>()=>g("")),[g]),(0,i.useEffect)((()=>{n?.(o.size>0)}),[o,n]);const{spec:b,logger:v}=(0,p.r)(D.c,{data:{uri:e}}),y=(0,K.t)(b),_=(0,i.useMemo)((()=>b.filterContainerFactory()),[b]),E=(0,i.useMemo)((()=>b.doneButtonFactory()),[b]),x=(0,i.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),o.size&&(c(),s(),v.logInteraction(E.hitUiHide()),Array.from(o).forEach((([t,n])=>{const i=t===m.BP||t===m.Xn,r=n.type===H.ADD;let s;s=i?r?E.hitLike({itemToBeLiked:e}):E.hitRemoveLike({itemNoLongerLiked:e}):r?E.hitAddToPlaylist({playlist:t,itemToBeAdded:e}):E.hitRemoveItemFromPlaylist({itemToBeRemovedFromPlaylist:e}),v.logInteraction(s)})))}),[o,E,v,s,c,e]);return(0,I.jsx)(G.s,{focusTrapOptions:{allowOutsideClick:!0},children:(0,I.jsxs)("form",{className:P()({"circular-sp-vietnamese":d},ye),onClick:e=>{e.stopPropagation()},onSubmit:x,onKeyDownCapture:e=>{"Enter"===e.key&&e.metaKey&&x(e)},ref:y,children:[(0,I.jsx)(Ze,{title:a.Ru.get("web-player.aligned-curation.title")}),(0,I.jsx)("div",{className:Ee,children:(0,I.jsx)(Z,{spec:_})}),(0,I.jsx)(M.R,{children:(0,I.jsx)(rt,{uri:e,toggleChange:l,changes:o,saveChanges:c,hideCurationSheet:s,depth:0,filter:f,id:"curation-sheet-list",spec:b})}),(0,I.jsxs)("div",{className:we,children:[(0,I.jsx)(r.H,{type:"button",semanticColor:"textSubdued",size:"small",onClick:()=>{s(),v.logInteraction(b.cancelButtonFactory().hitUiHide())},condensed:!0,children:a.Ru.get("web-player.aligned-curation.button.cancel")}),0===o.size?null:(0,I.jsx)(j.$,{type:"submit",colorSet:"invertedLight",size:"small",children:a.Ru.get("web-player.aligned-curation.button.done")})]})]})})},at=i.memo((function({...e}){return(0,I.jsx)(B.s,{onError:e=>{(0,W.Jy)(e,"CurationSheet")},children:(0,I.jsx)(q.s,{uri:"spotify:internal:aligned-curation",children:(0,I.jsx)(st,{...e})})})})),ot=e=>{const t=(0,U.Oj)();return(()=>{const e=(0,U.Oj)();(0,i.useEffect)((()=>{const t=t=>{"Escape"===t.key&&e({type:"close"})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[e])})(),(0,I.jsx)(at,{...e,onHide:()=>t({type:"close"})})},lt=({uri:e,placement:t,onChangesSaved:n,onShow:r,children:s})=>{const a=(0,i.useRef)(!1),o=(0,i.useCallback)((e=>{a.current=e}),[]),l=(0,i.useCallback)((e=>{a.current||e()}),[]);return(0,I.jsx)(k.t,{menu:(0,I.jsx)(ot,{uri:e,onChangesSaved:n,onHasChanges:o}),onClickOutside:l,onShow:r,snapshotReferenceElementPositionWhileOpen:!0,autoUpdate:!1,placement:t,children:s})},ct=(0,i.memo)((function({uri:e,size:t="small",className:n,condensed:g=!0,labelPlacement:f,menuPlacement:T}){const k=(0,v.i)(e),O=(0,i.useRef)(k);O.current=k;const P=(0,i.useRef)(null),j=(0,i.useCallback)((()=>{P.current=k}),[k]),{isCurated:L,curateDefault:D,defaultCurationContextUri:U}=function(e,t=!1){const n=(0,u.Q)(),r=(0,i.useCallback)((()=>n.isCuratedSync(e)||t),[t,n,e]),[s,a]=(0,i.useState)(r),o=(0,i.useCallback)((()=>n.curateDefault(e)),[n,e]);return(0,i.useEffect)((()=>{a(r)}),[r]),(0,i.useEffect)((()=>{const t=n.getEvents(),i=t=>{t.data.uri===e&&a(t.data.isCurated)};return t.addListener(d.oq.UPDATE_CURATED_ITEM,i,{uri:e}),()=>{t.removeListener(d.oq.UPDATE_CURATED_ITEM,i,{uri:e})}}),[n,e]),{isCurated:s,curateDefault:o,defaultCurationContextUri:n.getDefaultCurationContextUri(e)}}(k),M=function(){const{enqueueCustomSnackbar:e}=(0,w.i)(),{closeSnackbarWithKeyPrefix:t}=b();return(0,i.useCallback)(Spicetify.Snackbar.enqueueImageSnackbar=(({onChangeCurationClick:n,message:i,imageSrc:r})=>(t("default-curation"),e((0,I.jsx)(_.O,{children:(0,I.jsx)(S.P,{leading:(0,I.jsx)(x.w,{src:r,type:y.c.PLAYLIST,title:i}),center:(0,I.jsx)(C.z,{children:i}),trailing:(0,I.jsx)(E.M,{ctaText:a.Ru.get("web-player.aligned-curation.feedback.change-button"),onCtaClick:n})})}),{autoHideDuration:A.r,keyPrefix:"default-curation"}))),[t,e])}(),{closeSnackbarWithKeyPrefix:B}=b(),F=N(),{setState:H,Icon:V}=(0,c.Q)(L?R.t.CURATED:R.t.UNCURATED,R.A),{spec:z,logger:G}=(0,p.r)(s.S,{}),W=(0,i.useCallback)((async(t,n)=>{t.preventDefault();const i=function(e){if(e===m.BP)return(0,l.zK)();if(m.Xn)return(0,l.dB)();return null}(U);H(R.t.CURATED);const r=U===m.BP||U===m.Xn;G.logInteraction(r?z.hitLike({itemToBeLiked:e}):z.hitAddToPlaylist({playlist:U,itemToBeAdded:e}));try{await D();const t=i?.name?a.Ru.get("web-player.aligned-curation.feedback.added",i?.name):a.Ru.get("web-player.aligned-curation.feedback.added-to-library");M({onChangeCurationClick:t=>{n?.(t),G.logInteraction(z.defaultCurationSnackbarFactory().changeCurationContextButtonFactory({uri:e}).hitUiReveal())},message:t,imageSrc:(0,h.g)(i?.images,{desiredSize:24})?.url})}catch{F()}}),[U,H,G,z,e,D,M,F]),K=(0,i.useCallback)(((e,t)=>{t===O.current&&!1===e&&H(R.t.UNCURATED)}),[H]),Y=function(e,t){if(e)return a.Ru.get("web-player.aligned-curation.tooltips.add-to-playlist");if(t===m.BP)return a.Ru.get("web-player.aligned-curation.tooltips.add-to-liked-songs");if(t===m.Xn)return a.Ru.get("web-player.aligned-curation.tooltips.add-to-your-episodes");return a.Ru.get("web-player.aligned-curation.tooltips.add-to-your-library")}(L,U);return(0,I.jsx)(lt,{uri:k,placement:T,onChangesSaved:K,onShow:j,children:(e,i,s)=>(0,I.jsx)(o.Zp,{label:Y,placement:f,children:(0,I.jsx)(r.H,{size:t,className:n,"aria-checked":L,"aria-label":Y,condensed:g,iconOnly:V,semanticColor:L?"textBrightAccent":void 0,ref:s,onClick:t=>{e&&P.current&&P.current!==k&&(P.current=k,i(t)),L?(i(t),G.logInteraction(z.hitUiReveal()),B("default-curation")):W(t,i)}})})})}))},47469:(e,t,n)=>{"use strict";n.d(t,{d:()=>h});var i=n(97500),r=n.n(i),s=n(79474),a=n(14494),o=n(9789),l=n(68295),c=n(18039),u=n(13274);const d=({uri:e,type:t,spec:n})=>{const i=(0,a.s)(),r=(0,s.useCallback)((t=>{if(!n)return;const r=t?n.heartButtonFactory().hitLike({itemToBeLiked:e}):n.heartButtonFactory().hitRemoveLike({itemNoLongerLiked:e});i.logInteraction(r)}),[n,i,e]);return"episode"===t?(0,u.jsx)(o.b,{uri:e,className:c.A.rowHeartButton,onClick:r}):(0,u.jsx)(l.b,{uri:e,className:c.A.rowHeartButton,onClick:r})};var m=n(58522),p=n(67207);const h=({uri:e,spec:t,type:n,isOwnedBySelf:i})=>(0,m.v)(e)?(0,u.jsx)(p.g,{uri:e,className:r()(c.A.curationButton,{[c.A.ownedBySelf]:i})}):(0,u.jsx)(d,{uri:e,type:n,spec:t})},90129:(e,t,n)=>{"use strict";n.d(t,{W:()=>d});var i=n(79474),r=n(9440),s=n(84332),a=n(51552),o=n(67222),l=n(25658),c=n(3030),u=n(13274);function d(){const{enqueueCustomSnackbar:e}=(0,c.i)();Spicetify.Snackbar.enqueueCustomSnackbar=e;return(0,i.useCallback)(Spicetify.Snackbar.enqueueImageSnackbar=(({message:t,imageSrc:n})=>{e((0,u.jsx)(s.O,{children:(0,u.jsx)(l.P,{leading:!1===n?void 0:(0,u.jsx)(a.w,{src:n,type:r.c.PLAYLIST,title:t}),center:(0,u.jsx)(o.z,{children:t})})}),{identifier:t})}),[e])}},41624:(e,t,n)=>{"use strict";n.d(t,{y:()=>G});var i=n(79474),r=n(23689),s=n(98764),a=n(14286),o=n(14056),l=n(37128),c=n(97500),u=n.n(c),d=n(23659),m=n(27500),p=n(72423),h=n(82729);const g="od_kF1rLZbir8kM_F607",f="qyKJPLjz8o4jnbk92JOn",b="zsVdTdACMZA_MWB3HlEW",v="nsakAYOtgZOAcEO4ObrM",y="uJjmxe0T11dUVeW6Biz8",_="F1K3uW1jqwG0wxFHO5gl",E="Ii9XdJaXIuKbmR1zC4Rt";var x=n(13274);const C=i.memo((function(e){const{images:t,initialSelected:n=0}=e,[r,s]=(0,i.useState)(n),[a,l]=(0,i.useState)(0),c=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const e=c.current;e&&l(e.clientWidth)}),[]),(0,h.s)((()=>{const e=c.current;e&&l(e.clientWidth)})),0===t.length?null:(0,x.jsxs)("div",{className:g,children:[t.length>1&&(0,x.jsxs)(x.Fragment,{children:[0!==r&&(0,x.jsx)("button",{type:"button","aria-label":o.Ru.get("gallery.prev"),onClick:()=>s(r-1),className:u()(f,b),children:(0,x.jsx)(d.g,{})}),r!==t.length-1&&(0,x.jsx)("button",{type:"button","aria-label":o.Ru.get("gallery.next"),onClick:()=>s(r+1),className:u()(f,v),children:(0,x.jsx)(m.V,{})})]}),(0,x.jsx)("ul",{className:y,ref:c,dir:"auto",children:t.map(((e,t)=>(0,x.jsx)("li",{"aria-hidden":r!==t,className:_,style:{transform:`translateX(-${r*a}px)`},children:(0,x.jsx)(p._,{loading:"lazy",src:e.url,width:e.width,height:e.height,className:E})},t)))})]})}));var S=n(22269),A=n(30957),w=n(68811),I=n(8548),T=n(52792),N=n(67302),R=n(35828),k=n(27977),O=n(88113),P=n(95949),j=n(1471),L=n(65495);const D="DVWIV41y6daOMjQKR8Zj",U="oORVTPvg6eTQflVKKgw8",M="muHL0_3HjlqTZDoapgc9";function B(e){switch(e){case R.EK.Facebook:return(0,x.jsx)(k.G,{className:U});case R.EK.Twitter:return(0,x.jsx)(O.f,{className:U});case R.EK.Instagram:return(0,x.jsx)(P.Y,{className:U});case R.EK.Wikipedia:return(0,x.jsx)(L.p,{className:U});case R.EK.Soundbetter:return(0,x.jsx)(j.S,{className:U});case R.EK.Other:default:return null}}function F(e){if(e.name===R.EK.Soundbetter){const t=new URL(e.url);return t.searchParams.append("utm_source","open.spotify.com"),t.searchParams.append("utm_medium","referral"),t.searchParams.append("utm_campaign","hireme_link_spotify"),t.href}return e.url}function H(e){switch(e){case R.EK.Facebook:return"Facebook";case R.EK.Twitter:return"Twitter";case R.EK.Instagram:return"Instagram";case R.EK.Wikipedia:return"Wikipedia";case R.EK.Soundbetter:return"Hire Me on SoundBetter";case R.EK.Other:default:return"Other"}}const V=({links:e})=>0===e.length?null:(0,x.jsx)("div",{className:D,children:e.map((e=>(0,x.jsxs)("a",{rel:"noopener noreferrer",target:"_blank",href:F(e),className:M,children:[B(e.name),(0,x.jsx)(s.E,{variant:"bodySmall",children:H(e.name)})]},e.url)))});var z=n(27769);const G=i.memo((function(e){const{artistUri:t,name:n,bio:c="",bioSource:u=null,images:d=[],avatarImages:m=[],worldRank:p,monthlyListeners:h,topCities:g,followers:f,externalLinks:b=[],isOpen:v,closeModal:y}=e,{spec:_}=(0,N.r)(a._,{data:{identifier:"",uri:t}}),E=(0,i.useCallback)((()=>{_.closeButtonFactory().hitUiHide(),y()}),[y,_]),k=(0,T.t)(_);return(0,x.jsxs)(S.A,{contentLabel:n,className:z.A.modal,isOpen:v,onRequestClose:E,animation:{modal:{base:z.A.modalBase,afterOpen:z.A.modalAfterOpen,beforeClose:z.A.modalBeforeClose}},animated:!0,children:[(0,x.jsx)("button",{type:"button","aria-label":o.Ru.get("close"),onClick:E,className:z.A.close,children:(0,x.jsx)(r.M,{size:"small"})}),(0,x.jsxs)(w.a,{className:z.A.scrollbars,children:[(0,x.jsx)(C,{images:d}),(0,x.jsx)("div",{className:z.A.content,ref:k,children:(0,x.jsxs)("div",{className:z.A.columnContainer,children:[(0,x.jsxs)("div",{className:z.A.statsContainer,children:[p>0?(0,x.jsxs)("div",{className:z.A.rank,children:[(0,x.jsxs)(s.E,{as:"div",variant:"titleSmall",children:["#",p]}),(0,x.jsx)(s.E,{as:"div",variant:"marginal",children:o.Ru.get("artist-page.world_rank")})]}):null,"number"==typeof f?(0,x.jsxs)("div",{className:z.A.stats,children:[(0,x.jsx)(s.E,{as:"div",variant:"titleMedium",semanticColor:"textBase",children:o.Ru.formatNumber(f)}),(0,x.jsx)(s.E,{as:"div",variant:"bodySmall",children:o.Ru.get("followers")})]}):null,"number"==typeof h?(0,x.jsxs)("div",{className:z.A.stats,children:[(0,x.jsx)(s.E,{as:"div",variant:"titleMedium",semanticColor:"textBase",children:o.Ru.formatNumber(h)}),(0,x.jsx)(s.E,{as:"div",variant:"bodySmall",children:o.Ru.get("monthly_listeners")})]}):null,g&&g.length?g.map((({city:e,numberOfListeners:t,country:n},i)=>(0,x.jsxs)("div",{className:z.A.cityBlock,children:[(0,x.jsx)(s.E,{as:"div",variant:"bodySmallBold",semanticColor:"textBase",children:o.Ru.get("artist-page.where-people-listen-from",e||"",n||"")}),(0,x.jsx)(s.E,{as:"div",variant:"bodySmall",children:o.Ru.get("artist-page.how-many-listeners",t||0)})]},i))):null,(0,x.jsx)(i.Suspense,{fallback:null,children:(0,x.jsx)(V,{links:b})})]}),(0,x.jsx)("div",{className:z.A.bioContainer,children:c?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.E,{as:"div",variant:"bodyMedium",className:z.A.bio,dir:"auto",children:(0,x.jsx)(I.y,{source:c,LinkComponent:A.Link,onLinkClick:E})}),u===R.B3.Autobiography&&(0,x.jsxs)("div",{className:z.A.postedBy,children:[(0,x.jsx)(l.e,{images:m,label:n,width:32,userIconSize:"small",className:z.A.postedByAvatar}),(0,x.jsx)(s.E,{as:"div",variant:"bodySmall",children:o.Ru.get("acq.artist.about.attribution",{artist:n})})]})]}):null})]})})]})]})}))},99139:(e,t,n)=>{"use strict";n.d(t,{C:()=>s,U:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("useBuddyFeedContext() must be used within a BuddyFeedContext.Provider");return e}},53933:(e,t,n)=>{"use strict";n.d(t,{A:()=>xe});var i=n(79474),r=n(99754),s=n(66675),a=n(23276),o=n(23689),l=n(61080),c=n(22215),u=n(14056),d=n(19498),m=n(31350),p=n(14494),h=n(98678),g=n(26013),f=n(98764),b=n(21361),v=n(39944);const y="LUZuAtOgmXbneOoxnP8P",_="dIOLAcD26GH01pNjZHBL",E="r4ZTDlEunjDS3sz3L2zK",x="Tro85cCjPA7ZHyzR1zAE",C="ha09EFavr4tw3Rcf14Wt",S="e7m85731K8PcdAPpY0_T",A="IFRpxU2fT2MFYfqhTXIg",w="ihYHUpb9FuqRKkywvHIQ",I="q9rlL6VTsRm59YxuIceC";var T=n(13274);const N="ArrowUp",R="ArrowDown",k="Escape",O=[k,R,N,"Tab"],P=e=>{const{placeholder:t,onSelectLocation:n,onCancel:r,spec:s}=e,a=(0,i.useRef)(null),l=(0,i.useRef)(null),c=(0,i.useRef)(null),d=(0,i.useRef)(-1),[m,y]=(0,i.useState)(""),[_]=(0,h.d7)(m,300),P=_.trim(),[j,L]=(0,i.useState)(),[D,U]=(0,i.useState)(!1),M=(0,p.s)(),B=(0,i.useMemo)((()=>s?.changeLocationFormFactory()),[s]),F=(0,i.useMemo)((()=>s?.locationsResponseFactory()),[s]),H=(0,i.useMemo)((()=>B?.changeLocationInputFactory()),[B]),V=(0,i.useMemo)((()=>B?.changeLocationClearFactory()),[B]);(0,i.useEffect)((()=>{if(U(!1),P.length<=1)return void L(void 0);let e=!0;return(0,v.kr)(b.n.getInstance(),P).then((t=>{e&&L(t.body.results)}),(()=>{e&&(L(void 0),U(!0))})),()=>{e=!1}}),[H,M,P]),(0,i.useEffect)((()=>{const e=e=>{a.current?.contains(e.target)||r()};return document?.addEventListener("click",e,!0),()=>{document?.removeEventListener("click",e,!0)}}),[r]);return(0,T.jsxs)("div",{ref:a,className:E,"data-interaction-context":"location-selector",onKeyDown:e=>{const t=e.key;if(!O.includes(t))return;e.preventDefault();const n=j?.length??0;let i=d.current;switch(t){case k:return void r();case N:i=Math.max(d.current-1,-1);break;case R:case"Tab":i=Math.min(d.current+1,n-1);break;default:return}if(i<0)l.current?.focus();else{const e=c.current?.childNodes[i]?.firstChild;e instanceof HTMLButtonElement&&e.focus()}d.current=i},children:[(0,T.jsxs)("div",{className:x,children:[(0,T.jsx)(g.C,{size:"small"}),(0,T.jsx)("input",{className:C,type:"search",id:"change-location-input",placeholder:t,value:m,onChange:e=>{const t=e.target.value;y(t),d.current=-1,H&&(t.trim().length<1&&M.logInteraction(H.keyStrokeUiHide()),M.logInteraction(H.keyStrokeTextEdit({fieldToBeChanged:"loction"})))},ref:l,"aria-label":t,autoFocus:!0}),m.length>0&&(0,T.jsx)("button",{className:S,"aria-label":u.Ru.get("search.a11y.clear-input"),onClick:()=>{y(""),V&&M.logInteraction(V.hitTextClear())},children:(0,T.jsx)(o.M,{size:"small"})})]}),D&&(0,T.jsx)(f.E,{as:"p",variant:"bodyMedium",className:A,children:u.Ru.get("concert.error.general_error_title")}),0===j?.length&&(0,T.jsx)(f.E,{as:"p",variant:"bodyMedium",className:A,children:u.Ru.get("concert.error.no_locations_found_subtitle")}),(0,T.jsx)("ol",{className:w,ref:c,children:j?.map(((e,t)=>(0,T.jsx)("li",{children:(0,T.jsx)("button",{className:I,tabIndex:t+1,onClick:()=>((e,t)=>{if(n(e),!F)return;const i=F.locationResultFactory({identifier:e.location||e.geonameId?.toString(10)||"",position:t}).hitUiHide();M.logInteraction(i)})(e,t),children:(0,T.jsx)(f.E,{variant:"bodyMedium",children:e.location})})},e.geonameId)))})]})};var j=n(11283),L=n(27500),D=n(23659),U=n(13149),M=n(12667),B=n(22269),F=n(7079),H=n(82052);const V=["Escape","ArrowDown","ArrowUp","Tab"],z=e=>V.includes(e);var G=n(3775),W=n(16990);const K=Spicetify.GraphQL.Definitions["searchConcertLocations"]=new G.l("searchConcertLocations","query","f8aa801b7fc3ed8e179c496e386da6bbda87cca911dc9b45fdba9a885ff68a9c",null),Y="pdkMNbSQl8Yi5tl0iOF9",q="lbKmnVjXCdZ3kRBxjKQZ",Q="VAJ54U4IyPKmKRWXweMn",$="r3oh3bOf2I7DZQEND5Uz",Z="XwomR4z9c60ph1tYBcdm",X="bQATTxDxEbS7xXRsr_Mt",J="wFdZQwoko8rVRTLeFG5G",ee="jcDbJiJUoAVWZ7h1Rhhy",te="UkSUgC7NQnYbptBJEAM9",ne="xfncDja0wZotJaVS3aq9",ie="gJedMi0s8_RQ4d2aWYzI",re=({onCancel:e,onChange:t,onBack:n,title:r,children:s})=>{const[a,l]=(0,H.x)("recent-locations",[]),[c,d]=(0,i.useState)(""),m=(0,F.W)(),p=(0,i.useRef)(null),h=(0,i.useRef)(null),b=(0,i.useRef)(-1),{data:v}=(y={query:c},(0,W.I)(K,y,_));var y,_;const E=(e=>"items"in(e?.concertLocations??{}))(v)?v.concertLocations.items:[];return(0,T.jsx)("div",{onKeyDown:e=>{const t=e.key;if(!z(t))return;e.preventDefault();const n=((e,t,n)=>{switch(n){case"ArrowDown":case"Tab":return Math.min(e+1,t);case"ArrowUp":return Math.max(e-1,-1);default:return e}})(b?.current??-1,E.length,t),i=p.current?.childNodes[n]?.firstChild;n>=0&&i instanceof HTMLButtonElement&&i.focus(),-1===n&&h.current?.focus(),b.current=n},"data-interaction-context":"location-selector",children:(0,T.jsx)(B.A,{isOpen:!0,onRequestClose:e,children:(0,T.jsxs)("section",{className:Y,children:[n&&(0,T.jsx)("div",{className:$,children:(0,T.jsx)(j.H,{iconOnly:m?L.V:D.g,size:"small",onClick:n,"aria-label":u.Ru.get("navbar.go-back")})}),(0,T.jsx)("div",{className:Q,children:(0,T.jsx)(j.H,{iconOnly:o.M,size:"small",onClick:e,"aria-label":u.Ru.get("close")})}),(0,T.jsxs)("div",{className:q,children:[(0,T.jsxs)("div",{className:Z,children:[(0,T.jsx)(f.E,{as:"h3",variant:"bodyMediumBold",children:r??u.Ru.get("concert.location.search.header")}),(0,T.jsx)(U.E,{iconLeading:(0,T.jsx)(g.C,{}),children:(0,T.jsx)(M.Z,{placeholder:u.Ru.get("concert.location.search.placeholder"),onChange:e=>d(e.currentTarget.value),value:c,ref:h,autoFocus:!0})})]}),!c&&(0,T.jsx)(T.Fragment,{children:s}),c&&v?.concertLocations&&0===E.length&&(0,T.jsx)(f.E,{as:"p",variant:"bodyMedium",children:u.Ru.get("concert.error.no_locations_found_subtitle")}),c&&(0,T.jsx)("ol",{className:X,ref:p,children:E.map(((e,n)=>(0,T.jsx)("li",{children:(0,T.jsx)("button",{tabIndex:n+1,className:ne,onClick:()=>{const n={geonameId:Number(e.geonameId),name:e.name,geohash:e.geoHash};a.find((e=>e.geonameId===n.geonameId))||l([...a,n]),t(n)},children:e.name})},e.geonameId)))}),!!a?.length&&!c&&(0,T.jsxs)("div",{className:J,children:[(0,T.jsx)("div",{className:ee,children:(0,T.jsx)(f.E,{as:"h3",variant:"bodyMediumBold",children:u.Ru.get("concert.location.search.recent")})}),(0,T.jsx)("ol",{children:a.map(((e,n)=>(0,T.jsxs)("li",{className:te,children:[(0,T.jsx)("button",{tabIndex:n+1,className:ne,onClick:()=>t({geonameId:Number(e.geonameId),name:e.name,geohash:e.geohash}),children:(0,T.jsx)("div",{className:ie,children:e.name})}),(0,T.jsx)(j.H,{"aria-label":u.Ru.get("remove"),iconOnly:o.M,size:"small",onClick:t=>{t.stopPropagation(),l(a.filter((t=>t.geonameId!==e.geonameId)))}})]},e.geonameId)))})]})]})]})})})};var se=n(19448),ae=n(94710);const oe=Spicetify.GraphQL.Definitions["saveLocation"]=new G.l("saveLocation","mutation","5502351e9f201ae29014ca55d3b24b755ba261a1a9eb35fb498cb4c7df419353",null),le="WZzy7tMC5xlIMwoZ32JU",ce="LkdC_QJiLoD0OTOWnkJV",ue="WqruN54NvYqlA2XlTJ0Z",de="GS4yLEr0XMj8kw2iMAd8",me="prICvcudVq_SL6dqkZBw",pe="YLM_DWbpYGBpvqtDEhum",he="h8jjXJERT64OZi2sHCbi",ge=(e,t)=>e(oe,{geonameId:t}),fe=({onCancel:e,onSave:t,location:n,storeConcertLocation:r=ge})=>{const[s,c]=(0,i.useState)(!1),[d,m]=(0,i.useState)(!1),{getGraphQLLoader:p}=(0,ae.mv)(),h=p();return(0,T.jsx)("div",{onKeyDown:t=>{const n=t.key;z(n)&&"Escape"===n&&e()},"data-interaction-context":"location-selector",children:(0,T.jsx)(B.A,{isOpen:!0,onRequestClose:e,children:(0,T.jsxs)("section",{className:le,children:[(0,T.jsx)("div",{className:ue,children:(0,T.jsx)(j.H,{iconOnly:o.M,size:"medium",onClick:e,"aria-label":u.Ru.get("close")})}),(0,T.jsxs)("div",{className:ce,children:[(0,T.jsx)("div",{className:de,children:(0,T.jsx)(se.Z,{variant:"celloCanon",children:u.Ru.get("concerts.location.change.confirm",n.name)})}),(0,T.jsx)("div",{className:me,children:(0,T.jsx)(a.t,{size:"xlarge"})}),(0,T.jsx)("div",{className:pe,children:(0,T.jsx)(se.Z,{semanticColor:"textSubdued",children:u.Ru.get("concerts.location.change.info")})}),(0,T.jsx)(l.$,{onClick:async()=>{c(!0),m(!1);try{const i=await r(h,String(n.geonameId));if(e=i?.data?.storeUserLocation,void 0===e||!("success"in e)||!0!==e.success)throw Error();t()}catch{m(!0),c(!1)}var e},disabled:s,children:u.Ru.get("concerts.location.change.button")}),d&&(0,T.jsx)("div",{className:he,children:(0,T.jsx)(se.Z,{semanticColor:"textWarning",children:u.Ru.get("concerts.location.change.error")})})]})]})})})},be=Spicetify.GraphQL.Definitions["userLocation"]=new G.l("userLocation","query","079939378ca79b67c6d047be9152ea940d21f10bbfa2f5d4cf4d8320d87774c2",null),ve=(e,t)=>(0,W.I)(be,e,t),ye="Hj5kpRfIocJic5jcxsW_",_e="aJduGcVsoCwJvV1jVqjl",Ee=({onClick:e})=>{const{data:t}=ve({});return t?(0,T.jsxs)("div",{className:ye,children:[(0,T.jsxs)("div",{className:_e,children:[(0,T.jsx)(a.t,{size:"small"}),(0,T.jsxs)("div",{children:[(0,T.jsx)(se.Z,{as:"div",semanticColor:"textPositive",variant:"ballad",children:t.me?.profile?.location?.name}),(0,T.jsx)(se.Z,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("concerts.location.preferred")})]}),(0,T.jsx)(s.n,{onClick:e,size:"small",children:u.Ru.get("concerts.location.change")})]}),(0,T.jsx)(se.Z,{semanticColor:"textSubdued",variant:"finale",children:u.Ru.get("concerts.location.preferred.info")})]}):null},xe=e=>{const{isAnonymous:t}=(0,r.d4)(m.Ht),{data:n,invalidate:h}=ve({}),g=n?.me?.profile?.location,[f,b]=(0,i.useState)(),{handleLocationChange:v,locationStr:E,headerSpec:x}=e,[C,S]=(0,i.useState)(e.isDialogDefaultOpen??!1),[A,w]=(0,i.useState)(e.dialog??"browse"),[I,N]=(0,i.useState)();(0,i.useEffect)((()=>{f||b(g?.name)}),[g?.name,b,f]);const R=(0,i.useMemo)((()=>x?.changeLocationButtonFactory()),[x]),k=(0,i.useMemo)((()=>x?.changeLocationUiFactory({identifier:E})),[x,E]),O=(0,p.s)(),j=(0,c.NC)(d.b3k),L=()=>{S(!1),w(e.dialog??"browse"),N(void 0)},D=e=>{v(e),L()},U=void 0!==f&&e.locationStr!==u.Ru.get("concerts.default_location")&&f!==e.locationStr;return f!==g?.name&&e.locationStr===g?.name&&b(g.name),(0,T.jsxs)("div",{className:y,children:[U?(0,T.jsxs)("div",{className:_,children:[g&&(0,T.jsx)(s.n,{size:"small",iconOnly:o.M,"aria-label":u.Ru.get("close"),onClick:()=>v({geonameId:Number(g.geonameId),name:g.name})}),(0,T.jsx)(l.$,{size:"small",iconTrailing:o.M,onClick:()=>S(!0),children:E})]}):(0,T.jsx)(s.n,{iconLeading:a.t,onClick:()=>{R&&!C&&O.logInteraction(R.hitUiReveal()),S(!C)},size:"small",children:E}),C&&!j&&(0,T.jsx)(P,{placeholder:u.Ru.get("concerts.input.search_placeholder"),onSelectLocation:e=>{v(e),S(!1)},onCancel:()=>S(!1),spec:k}),C&&j&&"browse"===A&&(0,T.jsx)(re,{title:u.Ru.get("concert.location.search.header"),onChange:D,onCancel:L,spec:k,children:!t&&(0,T.jsx)(Ee,{onClick:()=>w("preferred")})}),C&&j&&"preferred"===A&&(0,T.jsx)(re,{title:u.Ru.get("concerts.location.preferred"),onChange:e=>{w("confirm"),N(e)},onCancel:L,onBack:e.dialog?void 0:()=>w("browse"),spec:k}),C&&j&&"confirm"===A&&I&&(0,T.jsx)(fe,{location:I,onCancel:L,onSave:async()=>{b(void 0),await h(),D(I)}})]})}},7826:(e,t,n)=>{"use strict";n.d(t,{I:()=>b});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(83856),l=n(30957),c=n(14494),u=n(52792),d=n(14485),m=n(50761),p=n(91630),h=n(13274);function g(e){return e.name?e.name:""}const f=({children:e,uri:t,condensed:n,spec:r,index:a})=>{const d=(0,c.s)(),m=(0,o.o_)(t),g=null!==m&&(0,o.ly)(m)?m.id:"",f=(0,i.useMemo)((()=>r.tourElementFactory({identifier:g,uri:t,position:a||0,reason:""})),[r,t,g,a]),b=(0,u.t)(f);return(0,h.jsx)(l.default,{to:t,className:s()(p.A.item,{[p.A.condensed]:n}),onClick:()=>{d.logInteraction(f.hitUiNavigate({destination:t}))},ref:b,children:e})},b=i.memo((function({concert:e,spec:t,index:n,condensed:i,elevatedDate:r,titleVariant:o="bodyMediumBold"}){const{venue:l,uri:c}=e,u=(0,d.l4)(e.date.isoString);return(0,h.jsxs)(f,{uri:c,condensed:i,spec:t,index:n,children:[(0,h.jsxs)("time",{className:s()(p.A.date,{[p.A.condensed]:i,[p.A.elevated]:r}),dateTime:(0,d.WB)(u),children:[(0,h.jsx)(a.E,{as:"h5",variant:"bodySmallBold",className:p.A.dateMonth,children:(0,d.tj)(u)}),(0,h.jsx)(a.E,{as:"h1",variant:"titleSmall",className:p.A.dateDay,children:(0,d.Py)(u)})]}),(0,h.jsxs)("div",{className:p.A.info,children:[(0,h.jsx)(a.E,{as:"h3",variant:o,semanticColor:"textBase",className:s()(p.A.title,{[p.A.condensed]:i}),children:l.location?.name}),(0,h.jsx)(a.E,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",className:p.A.eventName,children:(0,m.i3)(e)}),(0,h.jsxs)(a.E,{as:"span",semanticColor:"textSubdued",variant:"bodySmall",className:s()(p.A.timeAndVenue,{[p.A.condensed]:i}),children:[(0,h.jsx)("time",{className:p.A.time,children:(0,d.MW)(u)}),g(l)]})]})]})}))},52688:(e,t,n)=>{"use strict";n.d(t,{G:()=>E,v:()=>x});var i=n(88080),r=n(47376),s=n(11620),a=n(12871),o=n(99426),l=n(30428),c=n(72412),u=n(84610),d=n(86357),m=n(35828),p=n(80734),h=n(26472),g=n(70968),f=n(81660),b=n(49990),v=n(45640),y=n(13161),_=n(13274);function E(e,t){return x(e.content)?function(e,t){if("GenericError"===e.__typename||"NotFound"===e.__typename||"RestrictedContent"===e.__typename||"DiscoveryFeed"===e.__typename)return null;const n=`${t}-${e.uri}`,E=(0,y.f0)(e),x=(0,y.Uk)(e);switch(e.__typename){case"Album":return(0,_.jsx)(i.a,{uri:e.uri,name:e.name,images:E,color:x,sharingInfo:null,artists:(0,p.K)(e.artists),index:t},n);case"Artist":return(0,_.jsx)(r.a,{uri:e.uri,name:e.profile.name,images:E,color:x,index:t},n);case"Audiobook":return(0,_.jsx)(s.M,{uri:e.uri,name:e.name,images:E,color:x,authorName:e.authors?.[0]?.name??"",index:t,signifierText:e.accessInfo?.signifier?.text??void 0},n);case"Chapter":{if("Audiobook"!==e.audiobookV2.data.__typename)return null;const i=e.audiobookV2.data;return(0,_.jsx)(s.M,{uri:i.uri,name:i.name,images:E,color:x,authorName:i.authors?.[0]?.name??"",index:t,signifierText:i.accessInfo?.signifier?.text??void 0},n)}case"Episode":return(0,_.jsx)(a.U,{uri:e.uri,name:e.name,images:E,color:x,showImages:(0,y.o8)(e),description:e.description??"",durationMilliseconds:e.duration.totalMilliseconds,releaseDate:(0,g.JO)(e.releaseDate),resume_point:{resume_position_ms:e.playedState.playPositionMilliseconds,fully_played:e.playedState.state===m._w.Completed},isExplicit:(0,h.V)(e.contentRating),is19PlusOnly:(0,h.r)(e.contentRating),sharingInfo:null,index:t},n);case"Playlist":{let i="";return"User"===e.ownerV2.data.__typename&&(i=e.ownerV2.data.name),(0,_.jsx)(o.B,{uri:e.uri,name:e.name,images:E,color:x,description:e.description,authorName:i,index:t,isPlayable:!(0,d.p)(e?.attributes)},n)}case"Podcast":return(0,_.jsx)(c.o,{uri:e.uri,name:e.name,images:E,color:x,publisher:e.publisher?.name??"",sharingInfo:null,mediaType:(0,f.w)(e.mediaType),index:t},n);case"Track":return(0,_.jsx)(u.w,{uri:e.uri,name:e.name,images:E,color:x,artists:(0,b.S)(e.artists),album:e.albumOfTrack?{uri:e.albumOfTrack.uri,name:e.albumOfTrack.name}:null,isExplicit:(0,h.V)(e.contentRating),is19PlusOnly:(0,h.r)(e.contentRating),sharingInfo:null,index:t},n);case"User":return(0,_.jsx)(l.a,{uri:e.uri,name:e.name,images:E,color:x,index:t},n);default:return(0,v.k)(e),null}}(e.content.data,t):null}function x(e){switch(e.__typename){case"AlbumResponseWrapper":case"ArtistResponseWrapper":case"EpisodeOrChapterResponseWrapper":case"PlaylistResponseWrapper":case"PodcastOrAudiobookResponseWrapper":case"TrackResponseWrapper":case"UserResponseWrapper":case"DiscoveryFeedResponseWrapper":return!0;case"PromotionResponseWrapper":case"UnknownType":return!1;default:return(0,v.k)(e),!1}}},17713:(e,t,n)=>{"use strict";n.d(t,{$:()=>xe,P:()=>Ee});var i=n(79474),r=n(97500),s=n.n(r),a=n(22215),o=n(38076),l=n(74938),c=n(86357),u=n(94300),d=n(9440),m=n(42338),p=n(95231),h=n(45992),g=n(41028),f=n(35022),b=n(83856),v=n(14056),y=n(88291),_=n(11866),E=n(55758),x=n(11437),C=n(77564),S=n(70974),A=n(73604),w=n(92929),I=n(13274);const T=(0,i.memo)((function({item:e}){const t=(0,x.T)(e.uri),n=e.duration_ms??0,{isPlaying:i,isActive:r}=(0,A.te)(e.uri),[s]=(0,S.S)(1e4,(t=>t.item?.uri===e.uri)),a=e.resume_point?.resume_position_ms??0,o=i||r?s:a,l=Math.round(100/(n/o)),c=t===C.kw.YES,u=n&&o>0;return c||u?(0,I.jsxs)("div",{className:w.A.episodeExtraContent,children:[c?(0,I.jsx)(_.F,{size:"small",semanticColor:"textBrightAccent",className:w.A.iconDownloaded}):null,u?(0,I.jsx)(E.z,{className:w.A.episodeProgressBar,value:l,semanticColor:"essentialBase"}):null]}):null}));var N=n(83648),R=n(98764),k=n(56405),O=n(12269),P=n(263),j=n(1523),L=n(3273),D=n(26271),U=n(67302),M=n(60786),B=n(30323),F=n(2092),H=n(34285),V=n(36471),z=n(54712),G=n(10072);const W=i.memo((function({index:e,item:t,image:n,showPlayButton:r,extraContent:a,size:o,playInsteadOfNavigating:l=!1,onContextMenu:c=(()=>{}),onTouchStart:u=(()=>{}),onTouchEnd:d=(()=>{})}){const p=(0,N.Zp)(),h=(0,V.W)(),{setColorFromUri:g,resetColor:f,clearColor:v}=(0,m.$X)(),y=(0,O.hD)(t.uri,t.release_date,t.resume_point?.resume_position_ms,t.resume_point?.fully_played),{spec:_,logger:E}=(0,U.r)(k.X,{data:{position:e,uri:t.uri}}),{isPlaying:x,isActive:C,togglePlay:S}=(0,D.P)({uri:t.uri},{featureIdentifier:"home",referrerIdentifier:"home"}),A=(0,b.o_)(t.uri),T=(0,H.W)({type:"link",uri:t.uri}),W=(0,i.useCallback)((()=>{h({targetUri:t.uri,intent:x?"pause":"play",type:"click"});const e=_.playButtonFactory();let n;n=x?e.hitPause({itemToBePaused:t.uri}):C?e.hitResume({itemToBeResumed:t.uri}):e.hitPlay({itemToBePlayed:t.uri});const i=E.logInteraction(n);S({loggingParams:i})}),[C,x,t.uri,E,h,_,S]),K=(0,i.useCallback)((()=>{h({targetUri:t.uri,intent:"navigate",type:"click"});const e=_.hitUiNavigate({destination:t.uri});E.logInteraction(e)}),[t.uri,E,h,_]),Y=(0,i.useCallback)((()=>{if(l)return void W();let e;K(),A&&(e=A.toURLPath(!0));const t=T?(0,M.hF)(e||""):e;t&&p(t)}),[l,K,A,T,W,p]),q=(0,i.useCallback)((()=>{g(t.uri)}),[t.uri,g]),{extractedHomeAdColor:[Q]}=(0,B.bT)(),$=(0,z.as)(),Z=(0,L.A)((()=>Q?$((0,z.Mo)(Q.colorRaw)):v()));(0,i.useEffect)((()=>Z),[Z]);const{draggable:X,onDragStart:J}=(0,F.P)({itemUris:[t.uri],dragLabelText:t.name});return(0,I.jsx)("div",{className:w.A.shortcut,onContextMenu:c,onTouchStart:u,onTouchEnd:d,onMouseEnter:q,onMouseLeave:f,children:(0,I.jsxs)("div",{className:w.A.draggable,draggable:X,onDragStart:J,children:[n,(0,I.jsxs)("div",{className:w.A.main,children:[(0,I.jsxs)("div",{className:w.A.content,children:[(0,I.jsx)("div",{className:w.A.nameContainer,children:(0,I.jsx)(G.N,{to:t.uri,onClick:K,title:t.name,children:(0,I.jsx)(R.E,{as:"p",variant:"small"===o?"bodySmallBold":"bodyMediumBold",className:s()(w.A.name),children:t.name})})}),a||null]}),(0,I.jsxs)("div",{className:w.A.trailingIndicator,children:[(r||x)&&(0,I.jsxs)("div",{className:w.A.PlayButtonContainer,children:[x&&(0,I.jsx)(j.J,{className:w.A.equaliser,animated:!0}),r&&(0,I.jsx)(P.R,{className:w.A.playButton,isPlaying:x,onClick:W,size:"small"===o?"small":"medium"})]}),y&&!x&&(0,I.jsx)(O.Tc,{className:w.A.shortcutNewEpisodeIndicator})]})]}),(0,I.jsx)("div",{onClick:Y,className:w.A.shortcutLink})]})})}));var K=n(72423),Y=n(24577);const q=(0,i.memo)((function({images:e=[],fallbackIcon:t=p.e}){const n=(0,Y.g)(e);return(0,I.jsx)("div",{className:w.A.imageContainer,children:(0,I.jsx)("div",{className:w.A.imageWrapper,children:(0,I.jsx)(K._,{className:w.A.image,src:n?.url,loading:"lazy",testid:"shortcut-image",children:(0,I.jsx)(t,{"aria-hidden":!0})})})})}));var Q=n(72728),$=n(16649),Z=n(84387),X=n(59416),J=n(47498),ee=n(69494),te=n(63445);const ne=i.memo((function(e){return(0,b.Z0)(e.item.uri)?(0,I.jsx)(W,{...e,image:(0,I.jsx)(q,{images:e.item.images,fallbackIcon:p.e}),showPlayButton:e.showPlayButton}):(0,$.c0)(e.item.uri)?(0,I.jsx)(y.h,{menu:(0,I.jsx)(Q.gb,{}),children:(0,I.jsx)(W,{...e,image:(0,I.jsx)(q,{images:e.item.images,fallbackIcon:p.e}),playInsteadOfNavigating:!0})}):(0,I.jsx)(y.h,{menu:(0,I.jsx)(ee.W,{uri:e.item.uri}),children:(0,I.jsx)(W,{...e,image:(0,I.jsx)(q,{images:e.item.images,fallbackIcon:p.e})})})})),ie=i.memo((function(e){return(0,I.jsx)(y.h,{menu:(0,I.jsx)(Z.h,{uri:e.item.uri}),children:(0,I.jsx)(W,{...e,image:(0,I.jsx)(q,{images:e.item.images,fallbackIcon:h.I})})})})),re=i.memo((function(e){return(0,I.jsx)(y.h,{menu:(0,I.jsx)(X.t,{uri:e.item.uri}),children:(0,I.jsx)(W,{...e,image:(0,I.jsx)(q,{images:e.item.images,fallbackIcon:g.r})})})})),se=i.memo((function(e){return(0,I.jsx)(y.h,{menu:(0,I.jsx)(te.H,{uri:e.item.uri}),children:(0,I.jsx)(W,{...e,image:(0,I.jsx)(q,{images:e.item.images,fallbackIcon:f.L}),showPlayButton:!1})})})),ae=i.memo((function(e){const t=e.item.podcast?.images??e.item.images;return(0,I.jsx)(y.h,{menu:(0,I.jsx)(J.b,{uri:e.item.uri}),children:(0,I.jsx)(W,{...e,showPlayButton:!0,image:(0,I.jsx)(q,{images:t,fallbackIcon:f.L}),extraContent:(0,I.jsx)(T,{...e})})})}));var oe=n(80551),le=n(67628);const ce="J6UEDIqMSJhYlwGoeUZB",ue="ZjFf4lVC48DSryAjP9qB",de=i.memo((function(e){const t=(0,le.u)(),n={...e.item,...t};return(0,I.jsx)(W,{...e,item:n,image:(0,I.jsx)(q,{images:e.item.images,fallbackIcon:()=>(0,I.jsx)("div",{className:ce,children:(0,I.jsx)(oe.P,{iconSize:"large",className:ue})})})})}));var me=n(30939),pe=n(19498),he=n(52458);const ge=e=>{if(null!==e&&"object"==typeof e){const{type:t}=e;return t===d.c.YOUR_EPISODES}return!1},fe=i.memo((function({title:e,tagline:t,items:n}){const{fetchMultipleColors:r}=(0,m.$X)(),o=!(0,me.n)(),u=e??(()=>{const e=(new Date).getHours();let t=v.Ru.get("home.evening");return e>=5&&e<12?t=v.Ru.get("home.morning"):e>=12&&e<18&&(t=v.Ru.get("home.afternoon")),t})(),d=(0,a.NC)(pe.kSk),p=(0,a.NC)(pe._SF);(0,i.useEffect)((()=>{const e=n?.map(m.cU)||[];r(e)}),[n,r]);const[h,g]=(0,i.useState)("small"),f=(0,i.useRef)(null);if((0,l.w)({onResize:({width:e})=>{e<1141&&"small"!==h?g("small"):e>=1141&&"large"!==h&&g("large")},refOrElement:f}),o||!n?.length)return null;const y=n.filter(((e,t)=>ge(e)||!e.error)).filter(((e,t)=>t<(p?8:6))),_=y.length%4==0;return(0,I.jsxs)("section",{className:w.A.shortcuts,"aria-label":u,ref:f,children:[!d&&(0,I.jsx)(he.U,{title:u,tagline:t,titleVariant:"titleMedium"}),(0,I.jsx)("div",{className:s()(w.A.grid,{[w.A.gridOf4Columns]:_}),children:y.map(((e,t)=>{if(ge(e))return(0,I.jsx)(de,{index:t,item:e,showPlayButton:!0,shouldSetBackgroundColor:0===t,size:h},`${t}-${e.uri}`);const n=function(e){const t=((0,b.o_)(e)||{}).type;switch(t){case b.NQ.ARTIST:return re;case b.NQ.ALBUM:case b.NQ.COLLECTION_ALBUM:return ie;case b.NQ.PLAYLIST:case b.NQ.PLAYLIST_V2:return ne;case b.NQ.SHOW:return se;case b.NQ.EPISODE:return ae;case b.NQ.COLLECTION:return ne;default:return console.warn(`Unable to resolve entity shortcut from ${e} of type "${t||"unknown"}"`),se}}(e.uri);return(0,I.jsx)(n,{index:t,item:e,showPlayButton:!(0,c.p)(e.formatListAttributes),shouldSetBackgroundColor:0===t,size:h},`${t}-${e.uri}`)}))})]})})),be=e=>(0,I.jsx)(o.s,{onError:e=>{(0,u.Jy)(e,"HomeShortcutsGrid")},children:(0,I.jsx)(fe,{...e})});var ve=n(82052),ye=n(64658),_e=n(13161);const Ee="home-shortcuts-override";const xe=({spec:e,greeting:t,section:n})=>{const i=n.sectionItems.items.map(_e.b1);let r=function(){const[e]=(0,ve.x)(Ee,[]);return e}().concat(i);return r.length<8&&r.length%2!=0&&(r=r.slice(0,r.length-1)),(0,I.jsx)(ye.r,{spec:e.shortcutsFactory(),children:(0,I.jsx)(be,{items:r,title:t??void 0})})}},2001:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});var i=n(79474),r=n(85406),s=n(5566),a=n(13274);const o=(0,i.memo)((({cardCount:e,showAll:t,withTitle:n})=>(0,a.jsx)(s._,{isLoading:!0,withTitle:n,showAll:t??!1,children:[...new Array(e).keys()].map(((e,t)=>(0,a.jsx)(r.u,{isLoading:!0},t)))})))},59875:(e,t,n)=>{"use strict";n.d(t,{JI:()=>c,ZZ:()=>d,iL:()=>u});var i=n(79474),r=n(45640),s=n(13274);function a(e,t){switch(t.type){case"OPEN":return{...e,isOpen:!0};case"CLOSE":return{...e,isOpen:!1};default:(0,r.d)(t)}}const o=(0,i.createContext)(void 0),l=(0,i.createContext)((()=>{})),c=({children:e})=>{const[t,n]=(0,i.useReducer)(a,{isOpen:!1});return(0,s.jsx)(l.Provider,{value:n,children:(0,s.jsx)(o.Provider,{value:t,children:e})})};function u(){const e=(0,i.useContext)(o);if(void 0===e)throw new Error("useLanguageSelectionModalState must be used within a LanguageSelectionModalContextProvider");return e}function d(){const e=(0,i.useContext)(l);if(void 0===e)throw new Error("useLanguageSelectionModalDispatch must be used within a LanguageSelectionModalDispatchContextProvider");return e}},24608:(e,t,n)=>{"use strict";n.d(t,{b:()=>C});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(79474),r=n(14056),s=n(18645),a=n(68355),o=n(82372),l=n(98477),c=n(76816),u=n(13411),d=n(95999),m=n(16323),p=n(14494),h=n(87240),g=n(24577),f=n(90661),b=n(93209),v=n(94544),y=n(85960),_=n(13274);const E=new Set(l.gc),x=new Set([]),C=i.memo((function({nrTracks:e,collectionUri:t,initialItems:n,uri:C,sortable:S=!0,scrollToUri:A,usePlayContextItem:w,outerDomRef:I,spec:T,isCompactMode:N=!1,tagFilter:R}){const k=(0,i.useContext)(m.Z),O=(0,i.useRef)(null),{filter:P}=(0,i.useContext)(o.g),j=(0,i.useRef)((()=>{})),[L,D]=(0,i.useState)([]),{sortState:U,setSortState:M}=(0,i.useContext)(l.cL),B=(0,p.s)(),F=(0,c.w)(),H=(0,i.useCallback)(((e,t)=>{e===u.$.ADDED_AT?M({column:u.$.ADDED_AT,order:U.order===u.H.ASC?u.H.DESC:u.H.ASC}):M((0,s.So)(e,U)),T&&B.logInteraction(T.columnHeaderFactory({identifier:e,position:t||0}).hitSort())}),[B,M,U,T]);(0,i.useEffect)((()=>{O.current&&A&&O.current.scrollToItem({uri:A})}),[A]);const V=(0,i.useCallback)((e=>{const t=e.map((e=>e.uri));j.current(),k?.remove({uris:t})}),[k]),z=(0,i.useCallback)(((e,t)=>{j.current=t,e.length>1?D(e):V(e)}),[V]),[,G]=(0,f.z1)(),W=(0,i.useCallback)((async(e,t)=>{const n=await(k?.getTracks({offset:e,limit:t,uri:C,sort:(0,y.c)(U),filters:[P??null,R??null].filter(h.P)})),i=n?.totalLength??0;return{items:n?.items??[],totalLength:i}}),[P,R,k,U,C]),K=(0,i.useCallback)(((e,n)=>{const i=(0,g.g)(e.album?.images,{desiredSize:40,desiredLabel:"small"});return(0,_.jsx)(b.W,{index:n,contextUri:t,uri:e.uri,isPlayable:e.isPlayable,duration_ms:e.duration.milliseconds,name:e.name,artists:e.artists,albumOrShow:e.album,isExplicit:e.isExplicit,isMixedMedia:!1,isPaywalled:!1,isUserSubscribed:!1,isLocal:e.isLocal,addedBy:[],dateAdded:e.addedAt,hasDecoratedAddedBy:!1,release_date:"",isMOGEFRestricted:e.is19PlusOnly,type:e.type,imgUrl:i?.url||"",onMove:()=>{},onInsert:()=>{},usePlayContextItem:w,allowedDropTypes:[],isDisliked:!1,playlistName:r.Ru.get("sidebar.liked_songs"),isOwnedBySelf:!0,isCompactMode:N,hasAssociatedVideo:e.hasAssociatedVideo},n+e.uri)}),[t,w,N]),Y=(0,i.useCallback)((e=>({uri:e.uri,uid:e.uri})),[]);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(d.pZ,{value:"liked-songs-tracklist",children:(0,_.jsx)(v.S4,{ariaLabel:r.Ru.get("sidebar.liked_songs"),hasHeaderRow:!0,columns:F,sortableColumns:k?.getCapabilities().canSortTracksAndEpisodes&&S?E:x,sortState:U,onSort:H,renderRow:K,resolveItem:Y,onRemove:z,nrTracks:e,fetchTracks:W,limit:50,canFetchAllTracks:k?.getCapabilities().canFetchAllItems,outerRef:O,outerDomRef:I,tracks:n,onNrValidItemsChange:G,isCompactMode:N,columnPersistenceKey:"liked-songs-tracklist"},t)}),(0,_.jsx)(a.F,{title:r.Ru.get("remove_from_your_liked_songs"),isOpen:L.length>0,tracks:L,onClose:e=>{e.stopPropagation(),D([])},onRemove:V})]})}))},8264:(e,t,n)=>{"use strict";n.d(t,{x:()=>w});var i=n(79474),r=n(99754),s=n(98764),a=n(14056),o=n(62163);var l=n(70974);const c={start:0,end:1,text:""};var u=n(58123),d=n(30232),m=n(94710);var p=n(97500),h=n.n(p),g=n(59313);const f="nw6rbs8R08fpPn7RWW2w",b="EhKgYshvOwpSrTv399Mw",v="aeO5D7ulxy19q4qNBrkk",y="SruqsAzX8rUtY2isUZDF",_="vapgYYF2HMEeLJuOWGq5",E="BXlQFspJp_jq9SKhUSP3",x="Zg6tXwNaAAopLykLK7Cw",C="LomBcMvfM8AEmZGquAdj";var S=n(13274);const A=i.memo((function({onObserve:e,text:t,lineNumber:n,activeLineIndex:r,isTimeSynced:s,translationText:a,onClick:o,onActiveLineChange:l,windowIsVisible:c}){const{ref:u,inView:d}=(0,g.Wx)({threshold:0}),m=(0,i.useRef)(!1);(0,i.useEffect)((()=>{m.current||d&&c&&(e(t),m.current=!0)}),[d,e,t,c]);const p=(0,i.useRef)(),C=(0,i.useRef)(!0);(0,i.useEffect)((()=>{l(p,C.current),C.current=!1}),[r,l]);const A=(0,i.useCallback)((e=>{u(e),p.current=e||void 0}),[u]);return(0,S.jsxs)("div",{dir:"auto",className:h()(f,{[_]:!!o,[b]:r===n,[v]:r>n,[y]:!s}),"":"fullscreen-lyric",ref:A,onClick:o,children:[(0,S.jsx)("div",{className:E,children:t}),a&&(0,S.jsx)("div",{className:x,children:a})]})})),w=i.memo((function({trackUri:e,data:t,format:n,onLineClick:p,onActiveLineChange:h,isSnippet:g}){const{provider:f,providerLyricsId:b,providerDisplayName:v,syncType:y,isTimeSynced:_}=t,E=(0,r.d4)(o.s),{lyricWithEmptyLines:x,activeLineIndex:w,hasSkipped:I,shouldAnimateScroll:T}=((e,t,n)=>{const r=(0,i.useRef)(0),{lyrics:s=[],isTimeSynced:a,alternatives:o}=t,u=(0,i.useRef)(0),[d]=(0,l.f)(500,(t=>t?.item?.uri===e)),m=n?o?.find((({language:e})=>e.substring(0,2)===n.substring(0,2)))?.lines:null,p=(0,i.useMemo)((()=>[...new Array(2).fill(c),...s].map(((e,t)=>({...e,lineNumber:t,translationText:m?.[t-2]})))),[s,m]),h=a?p.findIndex((({start:e,end:t})=>d>=e&&d<t)):-1,g=u.current;u.current=h;const f=Math.abs(h-g)<=4,b=Math.abs(d-r.current)>2e3;return r.current=d,{lyricWithEmptyLines:p,activeLineIndex:h,prevActiveLineIndex:g,lineIndexDiff:h-g,shouldAnimateScroll:f,hasSkipped:b}})(e,t,E),N=function(e){const{trackUri:t,format:n,provider:r,providerLyricsId:s,syncType:a,isSnippet:o}=e,[l,c]=(0,i.useState)(!1),[p,h]=(0,i.useState)(0),[g,f]=(0,i.useState)(!1),b=(0,d.o)((e=>e?.playbackId??void 0)),v=(0,i.useMemo)((()=>(0,u.W)({lyrics_format:n,track_uri:t,provider:r,provider_lyrics_id:s,sync_type:a,playback_id:b,is_snippet:o})),[n,t,r,s,a,b,o]);(0,i.useEffect)((()=>{c(!1),h(0),f(!1);const e=setTimeout((()=>{f(!0)}),1500);return()=>{clearTimeout(e)}}),[v]);const y=(0,m.vh)();return(0,i.useEffect)((()=>{l||p>=140&&g&&(y.send(v),c(!0))}),[p,l,v,y,g]),(0,i.useCallback)((e=>{e.length>1&&h((t=>t+e.length))}),[h])}({trackUri:e,format:n,provider:f,providerLyricsId:b,syncType:y,isSnippet:g}),R=function(){const[e,t]=(0,i.useState)(document.visibilityState);return(0,i.useEffect)((()=>{const e=()=>t(document.visibilityState);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}),[]),e}();return(0,S.jsxs)(S.Fragment,{children:[x.map((({text:e,lineNumber:t,translationText:n})=>(0,S.jsx)(A,{text:e,translationText:n,lineNumber:t,activeLineIndex:w,isTimeSynced:_,onObserve:N,onClick:p&&(e=>p(e,x[t].start)),onActiveLineChange:(e,n)=>h({lineRef:e,firstUpdate:n,isFirstLine:_&&0===t,isActiveLine:_&&w===t,activeLineIndex:w,hasSkipped:I,shouldAnimateScroll:T}),windowIsVisible:"visible"===R},t))),!g&&v&&(0,S.jsx)("div",{className:C,children:(0,S.jsx)(s.E,{as:"p",variant:"bodySmall",dir:"auto",children:a.Ru.get("web-player.lyrics.providedBy",v)})})]})}))},97751:(e,t,n)=>{"use strict";n.d(t,{A:()=>xe});var i=n(97500),r=n.n(i),s=n(99754),a=n(59841),o=n(22215),l=n(51173),c=n(83856),u=n(41298),d=n(10840),m=n(79474),p=n(98764),h=n(61080),g=n(14056),f=n(42490),b=n(918),v=n(52792);const y="hS_lrRHiW4BSWL8WcE8Q",_="O7ooKKJG0MArEwDgD6IV",E="XZ1MeB_1byeFy7W6Eg6u",x="lq_cmE3Xcg5QJhvbBnPR",C="zPI8TW58LMxEQDIq_GdA";var S=n(13274);const A=({spec:e,logger:t})=>{const{openURLWithSessionTransfer:n}=(0,b.L)(),i=(0,m.useCallback)((()=>{const i=`${f.M0}&ref=lyrics`;n(i,"_blank"),t.logInteraction(e.lyricsUpsellFactory().lyricsUpsellButtonFactory().hitNavigateToExternalUri({destination:i}))}),[n,e,t]),r=(0,v.t)(e.lyricsUpsellFactory());return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:y}),(0,S.jsx)("div",{className:_,children:(0,S.jsxs)("div",{className:C,ref:r,children:[(0,S.jsx)(p.E,{semanticColor:"textBase",variant:"titleLarge",className:x,children:g.Ru.get("web-player.lyrics.upsell.title")}),(0,S.jsx)(h.$,{className:E,size:"small",onClick:i,colorSet:"invertedLight",children:g.Ru.get("web-player.lyrics.upsell.button")})]})})]})};var w=n(79130),I=n(19498),T=n(15343),N=n(17072),R=n(79864),k=n(30232),O=n(67302),P=n(64647),j=n(1264),L=n(56864),D=n(42360),U=n(87687),M=n(8264);const B="gqaWFmQeKNYnYD5gRv3x",F="_Wna90no0o0dta47Heiw",H="GML6YUVCeJvRhGznLnqm",V=({trackUri:e,data:t,format:n,spec:i,logger:r,isSnippet:s})=>{const a=(0,U.K)(),o=(0,D.v7)(),{isTimeSynced:l}=t,c=(0,m.useCallback)(((e,t)=>{if(i&&r){const e=i.lyricsLineFactory().hitSeekToTime({msToSeekTo:t});r.logInteraction(e)}e.currentTarget.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),a.seekTo(t);const n=a.getState();n&&!n.isPaused||a.resume()}),[r,a,i]),u=(0,m.useCallback)((({lineRef:e,firstUpdate:t,isFirstLine:n,isActiveLine:i,activeLineIndex:r,hasSkipped:s,shouldAnimateScroll:a})=>{if(e.current&&o.current&&(i||n&&r<0)){const n=e.current.getBoundingClientRect().top,i=o.current.getBoundingClientRect().height,r=i/4,l=n>=r&&n<=i-r;if(!l&&!(t||s))return;const c="visible"===document.visibilityState&&a&&l?"smooth":"auto";e.current?.scrollIntoView({behavior:c,block:"center",inline:"center"})}}),[o]);return(0,S.jsx)("div",{className:B,children:(0,S.jsxs)("div",{className:F,children:[!s&&!l&&(0,S.jsx)(p.E,{as:"p",variant:"bodySmall",className:H,dir:"auto",children:g.Ru.get("web-player.lyrics.unsynced")}),(0,S.jsx)(M.x,{trackUri:e,data:t,format:n,onLineClick:l?c:void 0,onActiveLineChange:u,isSnippet:s},e)]})})};var z=n(45640);const G="e7eFLioNSG5PAi1qVFT4",W="vkO5F4KbLk8mbjZoy1Lf",K=(0,m.memo)((function({version:e}){const{getMessage:t}=(()=>{const e=[g.Ru.get("web-player.lyrics.noLyrics0"),g.Ru.get("web-player.lyrics.noLyrics1"),g.Ru.get("web-player.lyrics.noLyrics2"),g.Ru.get("web-player.lyrics.noLyrics3")];return{getMessage:t=>{let n;switch(t){case"ad":n=g.Ru.get("web-player.lyrics.ad");break;case"error":n=g.Ru.get("web-player.lyrics.error");break;case"unavailable":n=e[Math.floor(Math.random()*e.length)];break;default:(0,z.k)(t),n=""}return n}}})();return(0,S.jsx)("div",{className:G,children:(0,S.jsx)("span",{className:W,children:t(e)})})}));var Y=n(59088),q=n(78983),Q=n(5064),$=n(64593),Z=n(55138),X=n(3265),J=n(65325),ee=n(20273),te=n(29977),ne=n(53603),ie=n(10229),re=n(68830);const se="na1tzIwfHqXPiMw_7NOd",ae="lVJJcrObmZtZsWaq8H3A",oe=[{volume:ie.Y9.SING_ALONG_OFF,icon:(0,S.jsx)(Y.X,{size:"small"}),get label(){return g.Ru.get("singalong.off")}},{volume:ie.Y9.HIGH,icon:(0,S.jsx)(q.C,{size:"small"}),get label(){return g.Ru.get("singalong.more-vocal")}},{volume:ie.Y9.LOW,icon:(0,S.jsx)(Q.D,{size:"small"}),get label(){return g.Ru.get("singalong.less-vocal")}}],le=m.memo((function({currentTrackUri:e}){const{isSupported:t,volume:n,setVocalVolume:i}=(e=>{const t=(0,re.S)(),[n,i]=(0,m.useState)(ie.Y9.SING_ALONG_OFF),{isSupported:r}=t.getCapabilities();return(0,m.useEffect)((()=>{t.setStatus(ie.nW.DISABLED).then((()=>{i(ie.Y9.SING_ALONG_OFF)}))}),[e,t]),(0,m.useEffect)((()=>()=>{t.setStatus(ie.nW.DISABLED)}),[t]),{isSupported:r,volume:n,setVocalVolume:(0,m.useCallback)((async e=>{e===ie.Y9.SING_ALONG_OFF?await t.setStatus(ie.nW.DISABLED):await t.setStatus(ie.nW.ENABLED),await t.setVocalVolume(e),i(e)}),[t])}})(e),s=(0,m.useCallback)((e=>{t&&i(e.volume)}),[t,i]);if(!t)return null;const a=oe.find((e=>e.volume===n)),o=a?.volume===ie.Y9.SING_ALONG_OFF;return(0,S.jsx)(J.b,{menu:(0,S.jsxs)(ee.W,{children:[(0,S.jsx)(te.y,{children:g.Ru.get("singalong.title")}),oe.map((e=>(0,S.jsx)(ne.D,{role:"menuitemradio","aria-checked":n===e.volume,"aria-label":e.label,onClick:()=>s(e),leadingIcon:e.icon,children:e.label},e.volume)))]}),children:(e,t,n)=>(0,S.jsxs)("button",{onClick:t,ref:n,type:"button",className:r()(se,{[ae]:o}),children:[o?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)($.q,{size:"small"}),(0,S.jsx)(p.E,{variant:"bodySmall",children:g.Ru.get("singalong.button")})]}):(0,S.jsxs)(S.Fragment,{children:[a.icon,(0,S.jsx)(p.E,{variant:"bodySmall",children:a.label})]}),e?(0,S.jsx)(Z.J,{size:"small"}):(0,S.jsx)(X.y,{size:"small"})]})})})),ce="FUYNhisXTCmbzt9IDxnT",ue="VznvlkEh9fhk1AKhhZwe",de="iSeDDdAUlWo8OJbCKDLw",me="rSXzEXBdsRTaK6qSBHYg",pe="UdJMosuRv5_ySWnmSPZH",he="zEwFftu1Dw68QKaKj_EE",ge="o4GE4jG5_QICak2JK_bn",fe=(0,S.jsx)("div",{className:he,children:(0,S.jsx)(u.m,{})}),be=(0,S.jsx)(K,{version:"error"}),ve=(0,S.jsx)(K,{version:"ad"}),ye=(0,S.jsx)(K,{version:"unavailable"}),_e={active:a.white,inactive:a.black,passed:a.black,background:a.gray20,messaging:a.white},Ee=(e,t)=>{switch(t){case I.bYw.CONTROL:default:return e;case I.bYw.EMPTY_LYRICS:return{...e,lyrics:[]};case I.bYw.TRUNCATED_LYRICS:return{...e,lyrics:e.lyrics.slice(0,5)}}},xe=({format:e})=>{const t=(0,L.X)(),n=(0,R.v)((e=>e.activeDevice?.isLocal)),i=(0,k.o)((e=>e?.item),((e,t)=>e?.uri===t?.uri)),a=i?.uri||"",{spec:u,logger:m}=(0,O.r)(l.V,{data:{uri:a}}),{data:p,loading:h,error:g}=(0,j.I)(a,i?.images),f=(0,o.NC)(I.bOR),b=(0,o.NC)(I.JSO,{loadingValue:I.bYw.CONTROL});let v=!1,y=_e;p?.hasLyrics&&(f&&(v=p.showUpsell),b!==I.bYw.TRUNCATED_LYRICS&&b!==I.bYw.EMPTY_LYRICS||(v=!0),y={active:p.colors.activeText,inactive:p.colors.text,passed:T.Q.fromCSS(p.colors.activeText,.7).toCSS(N.a.RGBA),background:p.colors.background,messaging:p.colors.text}),(0,w.z)(y.background,_e.background);const _=(0,k.o)((e=>e?.nextItems?.[0]),((e,t)=>e?.uri===t?.uri));(0,j.I)(_?.uri,_?.images);let E=fe,x=!1;if(a)if((0,c.AI)(a))E=ve;else if(g)E=be;else if(h)E=fe;else if(p)if(p.hasLyrics){const i=n??!1;x=t&&p.hasVocalRemoval&&i,E=(0,S.jsx)(V,{trackUri:a,data:Ee(p,b),format:e,spec:u,logger:m,isSnippet:v})}else E=ye;const C=(0,s.d4)((e=>e.ads.leaderboard.isEnabled)),D={"--lyrics-color-active":y.active,"--lyrics-color-inactive":y.inactive,"--lyrics-color-passed":y.passed,"--lyrics-color-background":y.background,"--lyrics-color-messaging":y.messaging,"--show-gradient-over-lyrics":v?"block":void 0};return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(P.Q,{usePlayingItem:!0,children:"Spotify"}),(0,S.jsxs)("div",{className:r()(ce,{[ue]:C}),style:D,children:[(0,S.jsx)("div",{className:ge}),E,(0,S.jsxs)("div",{className:de,children:[(0,S.jsx)("div",{className:me,children:"cinema"!==e&&(0,S.jsx)(d.R,{})}),(0,S.jsx)("div",{className:pe,children:x?(0,S.jsx)(le,{currentTrackUri:a}):null})]}),v&&(0,S.jsx)(A,{spec:u,logger:m})]})]})}},10840:(e,t,n)=>{"use strict";n.d(t,{R:()=>O});var i=n(79474),r=n(97500),s=n.n(r),a=n(99754),o=n(79124),l=n(25949),c=n(98764),u=n(3265),d=n(22215),m=n(14056),p=n(65325),h=n(20273),g=n(53603),f=n(1264),b=n(30710),v=n(62163),y=n(30232),_=n(82548);const E="ZEIqEgvTSLMYDUyg4fwD",x="JCMG2XpPpmwVFJCmRsv8",C="G5xyHz2quLjuzQhFHUb4",S="qYiwqn2o_ph2NxiAfCpG",A="aENlvMWeYBOLGGB34Tpl",w="GdrYdqKUxEn8rN8JLnFW",I="AH1Gz87FuBEFAIF3XbA4";var T=n(13274);const N=e=>{try{if(e){const t=new Intl.DisplayNames([e],{type:"language"}).of(e);return t?t.charAt(0).toUpperCase()+t.slice(1):e}return""}catch(t){return e||""}},R=()=>{const e=(0,a.wA)(),t=(0,y.o)((e=>e?.item),((e,t)=>e?.uri===t?.uri)),{data:n}=(0,f.I)(t?.uri||"",t?.images),r=(0,a.d4)(v.s),l=(0,i.useCallback)((()=>{e(r?(0,b.gL)(""):(0,b.gL)(navigator.language))}),[e,r]);return n?.hasLyrics&&(n.alternatives||[]).length>0?(0,T.jsx)("button",{className:E,onClick:l,children:(0,T.jsx)("div",{className:s()(S,{[C]:r}),children:(0,T.jsx)(o.H,{fill:"white",size:"small"})})}):null},k=()=>{const e=(0,a.wA)(),t=(0,y.o)((e=>e?.item),((e,t)=>e?.uri===t?.uri)),{data:n}=(0,f.I)(t?.uri||"",t?.images),r=(0,a.d4)(v.s),[d,_]=(0,i.useState)(!1),R=n?.hasLyrics&&(n.alternatives||[]).length>0,k=r&&n?.hasLyrics&&(n.alternatives||[]).find((e=>e.language.substring(0,2)===r.substring(0,2)));if(!R)return null;const O=(0,T.jsx)(h.W,{children:[{language:""},...n.alternatives||[]].map((({language:t})=>{let n=m.Ru.get("web-player.lyrics.translation.none");return t&&(n=N(t)),(0,T.jsx)(g.D,{trailingIcon:t===r?(0,T.jsx)(l.i,{size:"small",semanticColor:"textBrightAccent"}):null,role:"menuitem",onClick:()=>{e((0,b.gL)(t))},children:n},t)}))});return(0,T.jsx)("div",{className:E,children:(0,T.jsx)(p.b,{renderInline:!0,menu:O,onShow:()=>_(!0),onHide:()=>_(!1),children:(0,T.jsxs)("div",{className:s()(x,{[C]:k}),children:[(0,T.jsx)("div",{className:S,children:k?(0,T.jsx)(o.H,{fill:"black",size:"small"}):(0,T.jsx)(o.H,{size:"small"})}),(0,T.jsxs)("div",{className:I,children:[(0,T.jsx)(c.E,{variant:"bodySmallBold",children:r?k?m.Ru.get("web-player.lyrics.translating.to",N(r)):m.Ru.get("web-player.lyrics.translation.not_available",N(r)):m.Ru.get("web-player.lyrics.translate")}),(0,T.jsx)(u.y,{className:s()(A,{[w]:d}),size:"small"})]})]})})})},O=()=>{switch((0,d.NC)(_.Tc,{loadingValue:_.LZ.CONTROL})){case _.LZ.CONTROL:default:return null;case _.LZ.SYSTEM_LANGUAGE:return(0,T.jsx)(R,{});case _.LZ.ALL_LANGUAGES:return(0,T.jsx)(k,{})}}},48763:(e,t,n)=>{"use strict";n.d(t,{q:()=>v});var i=n(62201),r=n(14056),s=n(96642),a=n(95999),o=n(67302),l=n(79474),c=n(8548),u=n(14494),d=n(52792),m=n(36575),p=n(66956),h=n(93207),g=n(13274);const f=({merchId:e,spec:t,uri:n,url:i,images:r,description:s,merchName:a="",testId:o,index:f,merchVariant:b,variant:v})=>{const y=(0,u.s)(),_=(0,l.useMemo)((()=>t.merchCardFactory({identifier:e,uri:n,position:f})),[e,n,t,f]),E=()=>{window.open(i,"_blank");const e=_.hitNavigateToExternalUri({destination:i});y.logInteraction(e)},x=(0,d.t)(_);return(0,g.jsx)("div",{ref:x,children:(0,g.jsx)(m.Z,{variant:v,delegateNavigation:!0,index:f,onClick:E,headerText:a,featureIdentifier:"playlist",requestId:b,uri:n,isPlayable:!1,renderCardImage:()=>(0,g.jsx)(p.M,{images:r}),renderSubHeaderContent:()=>(0,g.jsx)(h.c,{children:s?(0,g.jsx)(c.N,{source:s,onLinkClick:E}):a&&(0,g.jsxs)("span",{children:["Description: ",a]})}),testId:o})})};var b=n(70075);const v=({id:e,merchItems:t,merchVariant:n,uri:l})=>{const{spec:c}=(0,o.r)(i.k,{data:{identifier:e,uri:l,position:0,reason:n}});return(0,g.jsx)(a.pZ,{value:"shelf/offers","":"merch-shelf",children:(0,g.jsx)(s.$,{total:t.length,title:r.Ru.get("web-player.merch.title"),className:b.A.shelfSpace,seeAllLabel:r.Ru.get("web-player.merch.seeAllUri"),children:t.map(((e,t)=>e.url&&e.name?(0,g.jsx)(a.pZ,{value:"card",index:t,children:(0,g.jsx)(f,{index:t,url:e.url,uri:e.uri,merchName:e.name,description:e.description||"",images:e.image?.sources||[],merchVariant:n,merchId:e.uri,spec:c},e.url)},e.url):null))})})}},16368:(e,t,n)=>{"use strict";n.d(t,{b:()=>a});var i=n(17066),r=n(7452),s=n(13274);const a=({item:e,size:t,maxSize:n=t,desiredLabel:a="",className:o})=>{const l=(0,r.h)(e?.images??void 0,{desiredSize:n,desiredLabel:a});return(0,s.jsx)("div",{className:o,children:(0,s.jsx)(i.N,{loading:"eager",imgSrc:l,width:t,height:t,type:e?.type})})}},78005:(e,t,n)=>{"use strict";n.d(t,{l:()=>N});var i=n(97500),r=n.n(i),s=n(27902),a=n(14056),o=n(65656),l=n(79474),c=n(31176),u=n(98764),d=n(11283),m=n(22215),p=n(73358),h=n(10098),g=n(2281),f=n(60181),b=n(19498),v=n(87687),y=n(30232),_=n(39730),E=n(67302),x=n(63842),C=n(27246),S=n(58276),A=n(13274);const w=(0,l.memo)((()=>(0,A.jsx)(c.B,{size:"xsmall"}))),I=(0,l.memo)((({size:e="xsmall",className:t,separator:n="•",variant:i="marginal"})=>{const r=(0,v.K)(),s=a.Ru.get("npv.song-videos.switch-to-video"),{signals:o,uri:I}=(0,y.o)((e=>({signals:e?.signals,uri:e?.item?.uri}))),{videoPlayerMode:T}=(0,x.d)(),{spec:N,logger:R}=(0,E.r)(p.p6,{data:{identifier:T===C.K.cinema?p.gw.CINEMA:p.gw.DESKTOP}}),k=N.musicVideoLabelFactory({uri:I||""}),{isActive:O,panelSend:P}=(0,h.AI)(f.Z.NowPlayingView),j=(0,h.Ev)(g.$S.NPV_BUTTON_CLICK),L=(0,l.useCallback)((()=>{R.logInteraction(k.hitPlay({itemToBePlayed:I||""})),r.sendSignal(_.L.SWITCH_TO_VIDEO),!O&&j&&P(g.$S.NPV_BUTTON_CLICK)}),[j,O,R,P,r,k,I]),D=(0,m.NC)(b.LX5);return null!==o&&null!==I&&o?.includes(_.L.SWITCH_TO_VIDEO)&&D?(0,A.jsxs)("div",{className:S.A.npbSwitchButtonContainer,children:[(0,A.jsx)(d.Q,{onClick:L,iconLeading:"xsmall"===e?w:c.B,size:"small",style:{padding:"0",transform:"none"},className:t,"aria-label":s,as:"div",tabIndex:-1,children:(0,A.jsx)(u.E,{as:"span",variant:i,children:a.Ru.get("card.tag.video")})}),(0,A.jsx)(u.E,{as:"span",variant:i,children:n})]}):null}));var T=n(36753);const N=({item:e,className:t,enableVideoButton:n=!1,size:i="small",variant:l})=>(0,A.jsxs)("div",{className:r()(t,{[T.A.xsmallBadges]:"xsmall"===i}),children:[(0,o.N)(e)&&(0,A.jsx)(s.R,{semanticColor:"textPositive",title:a.Ru.get("web-player.smart-shuffle.icon-hover-label"),size:i,"":"enhance-badge"}),n&&(0,A.jsx)(I,{size:i,variant:l})]})},54047:(e,t,n)=>{"use strict";n.d(t,{d:()=>de});var i=n(97500),r=n.n(i),s=n(78005),a=n(79474),o=n(25766),l=n(98764),c=n(22215),u=n(14056),d=n(88713),m=n(19065),p=n(19498),h=n(3775),g=n(16990);const f=Spicetify.GraphQL.Definitions["episodeSponsoredContent"]=new h.l("episodeSponsoredContent","query","a5c1fe722b60c29ad247ea3df57ace52043382a7f080d525f58745db78a42618",null);var b=n(36753),v=n(13274);const y=({item:e})=>{const t=(0,c.NC)(p.USK),n=(0,a.useRef)(null),i=(0,m.K)({ref:n}),r=(s=e.metadata?.["podcast.contains_sponsored_content"],"false"!==s&&("true"===s||void 0));var s;const h=t&&void 0===r&&"episode"===e.type,{data:y}=(_=e,E={enabled:h,gcTime:36e5,staleTime:18e5},(0,g.I)(f,_,E));var _,E;const x="Episode"===y?.episodeUnionV2.__typename&&y?.episodeUnionV2.containsSponsoredContent;return(r??x)&&t?(0,v.jsx)(d.Zp,{label:u.Ru.get("playback-info.dsa-promotional-content"),disabled:!i,children:(0,v.jsxs)("div",{className:b.A.pretitle,children:[(0,v.jsx)("div",{children:(0,v.jsx)(o.p,{size:"xsmall"})}),(0,v.jsx)(l.E,{variant:"marginal",semanticColor:"textSubdued",ref:n,className:b.A.ellipsis,children:u.Ru.get("playback-info.dsa-promotional-content")})]})}):null};var _=n(22496),E=n(94018),x=n(22920),C=n(90381),S=n(74157),A=n(33082),w=n(41982),I=n(57506),T=n(86412),N=n(54260),R=n(45640),k=n(84847),O=n(31200),P=n(56715),j=n(57442);const L=()=>{const e=(0,P.H)(),{isPuffinPanelActive:t,togglePuffin:n}=(0,O.c)(),i=(0,a.useCallback)((()=>{t||n()}),[t,n]);return e.bitrateLevel===j.Yn.HIFI||e.bitrateLevel===j.Yn.HIFI24?(0,v.jsx)("button",{className:b.A.qualityLabel,onClick:i,children:"Lossless"}):null};var D=n(83856),U=n(93905),M=n(88291),B=n(84749),F=n(20044),H=n(2092);const V=({item:e,onClick:t})=>{const{book:n}=e,i=(0,D.o_)(n.uri)?.toURLPath(!0),{draggable:r,onDragStart:s}=(0,H.P)({itemUris:[n.uri],itemMimeTypes:[F.fl.AUDIOBOOKS],dragLabelText:e.book.name});return i?(0,v.jsx)(M.h,{menu:(0,v.jsx)(B.p,{uri:n.uri}),children:(0,v.jsx)("span",{draggable:r,onDragStart:s,children:(0,v.jsx)(U.n,{item:e,onClick:t})})}):(0,v.jsx)("span",{dir:"auto",children:n.name})};var z=n(63445);const G=({item:e,onClick:t})=>{const{show:n}=e,i=(0,D.o_)(n.uri)?.toURLPath(!0),{draggable:r,onDragStart:s}=(0,H.P)({itemUris:[n.uri],dragLabelText:n.name});return i?(0,v.jsx)(M.h,{menu:(0,v.jsx)(z.H,{uri:n.uri}),children:(0,v.jsx)("span",{draggable:r,onDragStart:s,children:(0,v.jsx)(U.n,{item:e,onClick:t})})}):(0,v.jsx)("span",{dir:"auto",children:n.name})};var W=n(59416),K=n(30957);const Y=({item:e,onClick:t})=>{const{draggable:n,onDragStart:i}=(0,H.P)();return(0,v.jsx)(v.Fragment,{children:e.artists.map(((e,r)=>{const s=(0,D.o_)(e.uri)?.toURLPath(!0);return(0,v.jsxs)("span",{children:[r>0?u.Ru.getSeparator():null,s?(0,v.jsx)(M.h,{menu:(0,v.jsx)(W.t,{uri:e.uri}),children:(0,v.jsx)(K.default,{to:s,"":"context-item-info-artist",dir:"auto",draggable:n,onDragStart:t=>{i(t,{itemUris:[e.uri],dragLabelText:e.name})},onClick:t,children:e.name})}):(0,v.jsx)("span",{dir:"auto",children:e.name})]},r)}))})},q=({item:e,onClick:t})=>{const{draggable:n,onDragStart:i}=(0,H.P)();return(0,v.jsx)(v.Fragment,{children:e.artists.map(((e,r)=>{const s=(0,D.o_)(e.uri)?.toURLPath(!0);return(0,v.jsxs)("span",{children:[r>0?u.Ru.getSeparator():null,s?(0,v.jsx)(M.h,{menu:(0,v.jsx)(W.t,{uri:e.uri}),children:(0,v.jsx)(K.default,{to:s,"":"context-item-info-artist",dir:"auto",draggable:n,onClick:t,onDragStart:t=>{i(t,{itemUris:[e.uri],dragLabelText:e.name})},children:e.name})}):(0,v.jsx)("span",{dir:"auto",children:e.name})]},r)}))})},Q=(0,a.lazy)((()=>n.e(1798).then(n.bind(n,91798)))),$=(0,a.lazy)((()=>n.e(7462).then(n.bind(n,67462)))),Z=({item:e,referrer:t,onClick:n,typeVariant:i="marginal"})=>{const s=(0,E.w)(e);let o=null;const c=(0,_.XX)(e),u=(0,A.N)(e)?c?.title:e.name,d=(0,C.j)(),m=(0,S.v)();if((0,T.v)(e))o=(0,v.jsx)(Y,{item:e,onClick:n});else if((0,I.p)(e))o=(0,v.jsx)(G,{item:e,onClick:n});else if((0,w.d)(e))o=(0,v.jsx)(V,{item:e,onClick:n});else if((0,A.N)(e)){if(t===k.G.NPV)return null;o=(0,v.jsx)(a.Suspense,{fallback:!0,children:s?(0,v.jsx)($,{item:e,surface:"NPB",variant:"marginal"}):(0,v.jsx)(Q,{item:e,onClick:n})})}else(0,N.v)(e)?o=(0,v.jsx)(q,{item:e,onClick:n}):(0,R.d)(e);return(0,v.jsxs)("div",{className:r()(b.A.subtitle,b.A.subtitleWithGap),children:[(0,v.jsx)(x.r,{title:u,children:(0,v.jsx)(l.E,{"":"context-item-info-subtitles",as:"div",variant:i,className:b.A.subtitle,semanticColor:"textSubdued",children:o})},e.uri),d&&m&&t===k.G.NPB&&(0,v.jsx)(L,{})]})};var X=n(99754),J=n(67593),ee=n(74484),te=n(76443);const ne=({item:e,onClick:t,isNowPlayingView:n=!1})=>{const i=(0,X.wA)(),{title:r,url:s}=(0,_.XX)(e),a=n?J.V.AD_NPV:J.V.NPB;return(0,v.jsx)(te.R,{item:e,adUrl:s,onClick:e=>(t?.(e,s??void 0),i((0,ee.q5)(J.c.ADVERTISER_TITLE,a))),children:r})};var ie=n(17252);const re=({item:e,context:t,onClick:n})=>(0,v.jsx)(M.h,{menu:(0,v.jsx)(ie.W,{context:t,item:e}),children:(0,v.jsx)(te.R,{item:e,onClick:n,children:e.name})});var se=n(44060);const ae=({item:e,context:t,onClick:n})=>{const{draggable:i,onDragStart:r}=(0,H.P)({itemUris:[e.uri],dragLabelText:(0,se.r)(e)});return(0,v.jsx)(M.h,{menu:(0,v.jsx)(ie.W,{context:t,item:e}),children:(0,v.jsx)("span",{draggable:i,onDragStart:r,children:(0,v.jsx)(te.R,{item:e,onClick:n,children:e.name})})})},oe=({item:e,context:t,onClick:n})=>{const{draggable:i,onDragStart:r}=(0,H.P)();return(0,v.jsx)(M.h,{menu:(0,v.jsx)(ie.W,{context:t,item:e}),children:(0,v.jsx)("span",{draggable:i,onDragStart:t=>{r(t,{itemUris:[e.uri],dragLabelText:(0,se.r)(e)})},children:(0,v.jsx)(te.R,{item:e,onClick:n,children:e.name})})})},le=({item:e,context:t,onClick:n})=>{const{draggable:i,onDragStart:r}=(0,H.P)();return(0,v.jsx)(M.h,{menu:(0,v.jsx)(ie.W,{context:t,item:e}),children:(0,v.jsx)("span",{draggable:i,onDragStart:t=>{r(t,{itemUris:[e.uri],dragLabelText:(0,se.r)(e)})},children:(0,v.jsx)(te.R,{item:e,onClick:n,children:e.name})})})},ce=(0,a.lazy)((()=>n.e(8792).then(n.bind(n,58792)))),ue=({context:e,item:t,onClick:n,typeVariant:i="bodySmall",isNowPlayingView:r=!1})=>{const s=(0,E.w)(t);let o=null;const c=(0,_.XX)(t),u=(0,A.N)(t)?c?.title:t.name;return(0,I.p)(t)?o=(0,v.jsx)(ae,{onClick:n,item:t,context:e}):(0,T.v)(t)?o=(0,v.jsx)(oe,{onClick:n,item:t,context:e}):(0,w.d)(t)?o=(0,v.jsx)(re,{onClick:n,item:t,context:e}):(0,A.N)(t)?o=(0,v.jsx)(a.Suspense,{fallback:!0,children:s?(0,v.jsx)(ce,{item:t,surface:"NPB",variant:"bodySmall"}):(0,v.jsx)(ne,{onClick:n,item:t,isNowPlayingView:r})}):(0,N.v)(t)?o=(0,v.jsx)(le,{onClick:n,item:t,context:e}):(0,R.d)(t),(0,v.jsx)("div",{className:b.A.title,children:(0,v.jsx)(x.r,{title:u,children:(0,v.jsx)(l.E,{"":"context-item-info-title",as:"div",variant:i,className:b.A.title,dir:"auto",children:o})},t.uri)})},de=({context:e,item:t,referrer:n,className:i,titleTypeVariant:a,subtitleTypeVariant:o,onTitleClick:l,onSubtitleClick:c,enableVideoButton:u=!1,size:d="small"})=>(0,v.jsxs)("div",{className:r()(i,b.A.container),children:[n!==k.G.NPV&&(0,v.jsx)(y,{item:t}),(0,v.jsx)(ue,{context:e,item:t,onClick:(e,t)=>l?.(t),typeVariant:a,isNowPlayingView:n===k.G.NPV}),(0,v.jsx)(s.l,{className:b.A.badges,item:t,enableVideoButton:u,size:d}),(0,v.jsx)(Z,{item:t,onClick:(e,t)=>c?.(t),typeVariant:o,referrer:n})]})},84847:(e,t,n)=>{"use strict";n.d(t,{G:()=>i});let i=function(e){return e.NPV="npv",e.NPB="npb",e}({})},17252:(e,t,n)=>{"use strict";n.d(t,{W:()=>f});var i=n(96567),r=n(47498),s=n(16975),a=n(41955),o=n(75951),l=n(41982),c=n(57506),u=n(86412),d=n(54260),m=n(65656),p=n(51820),h=n(16649),g=n(13274);const f=({context:e,item:t,canSwitchVisuals:n=!1})=>{const{isSongVideo:f}=(0,p.k)(),b=f?o.o:a.P;return(0,u.v)(t)?t.isLocal?(0,g.jsx)(s.A,{uid:t.uid??"",uri:t.uri,contextUri:e.uri}):(0,g.jsx)(b,{uid:t.uid??"",uri:t.uri,albumUri:t.album.uri,artists:t.artists,contextUri:e.uri??"",isSmartRecommendation:(0,m.N)(t),provider:t.provider,canSwitchVisuals:n}):(0,c.p)(t)?(0,g.jsx)(r.b,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??""}):(0,l.d)(t)?(0,g.jsx)(i.r,{uri:t.uri}):(0,h.bJ)(e,t)?null:(0,d.v)(t)?(0,g.jsx)(a.P,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??"",provider:t.provider}):null}},6038:(e,t,n)=>{"use strict";n.d(t,{R:()=>d});var i=n(79474),r=n(99754),s=n(83856),a=n(41078),o=n(61412),l=n(2092),c=n(36471),u=n(13274);const d=({uri:e,owner:t,children:n})=>{const d=(0,r.wA)(),m=(0,c.W)(),p=(0,r.d4)((e=>e.session.user?.id)),h=(0,s.tb)(e),g=(0,i.useCallback)(((t,n)=>{const i=[...n[l.O[s.NQ.ALBUM]]||[],...n[l.O[s.NQ.TRACK]]||[],...n[l.O[s.NQ.LOCAL_TRACK]]||[],...n[l.O[s.NQ.EPISODE]]||[]];i.length>0&&(d((0,a.io)(e,i)),m({targetUri:e,intent:"add",type:"drop"}))}),[d,m,e]);return h&&t===p?(0,u.jsx)(o.A,{types:[l.O[s.NQ.ALBUM],l.O[s.NQ.TRACK],l.O[s.NQ.EPISODE],l.O[s.NQ.LOCAL]],onDrop:g,testId:"cover-drop-target",children:n}):(0,u.jsx)(u.Fragment,{children:n})}},85031:(e,t,n)=>{"use strict";n.d(t,{x:()=>E});var i=n(97500),r=n.n(i),s=n(98678),a=n(37463),o=n(54015),l=n(61080),c=n(14056),u=n(88713),d=n(87465),m=n(83699),p=n(36471),h=n(19498),g=n(87687),f=n(30232),b=n(37693),v=n(56029);const y="main-playPauseButton-button";var _=n(13274);const E=({iconSize:e="small",onClick:t,className:n})=>{const i=(0,g.K)(),E=(0,p.W)(),{hasContext:x,isPaused:C,canPause:S,canResume:A}=(0,f.o)((e=>({hasContext:e?.hasContext,isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),b.a),w=(0,s.YQ)((e=>{E({type:"click",intent:C?"play":"pause"}),C&&A?(t?.("resume"),i.resume(),(0,m.aX)(e,"play/resume")):!C&&S&&(t?.("pause"),i.pause())}),100,{leading:!0,trailing:!1}),I=C?c.Ru.get("playback-control.play"):c.Ru.get("playback-control.pause"),T={"--button-size":2*(0,v.k)(e)+"px"},N={small:"small",medium:"medium",large:"large"},R=!x||(C?!A:!S);return(0,_.jsx)(u.Zp,{label:I,children:(0,_.jsx)(d.u,{property:h.kvg,renderOldExperience:()=>(0,_.jsx)("button",{style:T,className:r()(y,n),onClick:w,disabled:R,"aria-label":I,"":"control-button-playpause",children:C?(0,_.jsx)(a.A,{size:e}):(0,_.jsx)(o._,{size:e})}),renderNewExperience:()=>(0,_.jsx)(l.$,{iconOnly:C?a.A:o._,className:n,size:N[e]||"small",disabled:R,"aria-label":I,"":"control-button-playpause",onClick:w,colorSet:"invertedLight"})})})}},53159:(e,t,n)=>{"use strict";n.d(t,{s:()=>C});var i=n(97500),r=n.n(i),s=n(34319),a=n(5716),o=n(11283),l=n(14056),c=n(88713),u=n(87465),d=n(36471),m=n(19498),p=n(95799),h=n(30232),g=n(38996),f=n(56029);const b="main-repeatButton-button",v="main-repeatButton-active",y="vW9NFcNIj8useE43Vx9G";var _=n(13274);function E(e,t,n){return t&&n?(e+1)%3:t?(e+1)%2:n?1===e?2:(e+2)%4:g.p.REPEAT_NONE}const x={[g.p.REPEAT_NONE]:{get label(){return l.Ru.get("playback-control.disable-repeat")},intent:"repeat-off",ariaChecked:"false"},[g.p.REPEAT_CONTEXT]:{get label(){return l.Ru.get("playback-control.enable-repeat")},intent:"repeat-all",ariaChecked:"true"},[g.p.REPEAT_TRACK]:{get label(){return l.Ru.get("playback-control.enable-repeat-one")},intent:"repeat-single",ariaChecked:"mixed"}},C=({iconSize:e="small",onClick:t})=>{const n=(0,d.W)(),{setRepeat:i,repeat:l}=(0,p.V)(),[C,S]=(0,h.o)((e=>[e?.restrictions.canToggleRepeatContext??!1,e?.restrictions.canToggleRepeatTrack??!1])),A=!C&&!S,w=()=>{const e=E(l,C,S);n({type:"click",intent:x[e].intent}),t?.(e),i(e)},I={"--button-size":2*(0,f.k)(e)+"px"},T=x[E(l,C,S)].label,N=l!==g.p.REPEAT_NONE;return(0,_.jsx)(c.Zp,{label:T,children:(0,_.jsx)(u.u,{property:m.kvg,renderOldExperience:()=>(0,_.jsx)("button",{style:I,className:r()(b,{[v]:N}),onClick:w,disabled:A,role:"checkbox","aria-checked":x[l].ariaChecked,"aria-label":T,"":"control-button-repeat",children:l===g.p.REPEAT_TRACK?(0,_.jsx)(s.I,{size:e}):(0,_.jsx)(a.B,{size:e})}),renderNewExperience:()=>(0,_.jsx)(o.H,{className:r()({[y]:N}),iconOnly:l===g.p.REPEAT_TRACK?s.I:a.B,size:"small",disabled:A,"aria-label":T,"":"control-button-repeat",onClick:w,role:"checkbox","aria-checked":x[l].ariaChecked,semanticColor:N?"textBrightAccent":void 0})})})}},57827:(e,t,n)=>{"use strict";n.d(t,{h:()=>g});var i=n(96259),r=n(11283),s=n(14056),a=n(88713),o=n(87465),l=n(36471),c=n(19498),u=n(87687),d=n(30232),m=n(56029);const p="main-seekBackButton-button";var h=n(13274);const g=({iconSize:e="small",onClick:t})=>{const n=(0,l.W)(),g=(0,u.K)(),f=(0,d.o)((e=>e?.restrictions.canSeek??!1)),b=()=>{n({type:"click",intent:"skip-back-15"}),t?.(-15e3),g.seekBackward(15e3)},v={"--button-size":2*(0,m.k)(e)+"px"};return(0,h.jsx)(a.Zp,{label:s.Ru.get("playback-control.skip-backward-15"),children:(0,h.jsx)(o.u,{property:c.kvg,renderOldExperience:()=>(0,h.jsx)("button",{style:v,className:p,onClick:b,disabled:!f,"aria-label":s.Ru.get("playback-control.skip-backward-15"),"":"control-button-seek-back-15",children:(0,h.jsx)(i.e,{size:e})}),renderNewExperience:()=>(0,h.jsx)(r.H,{iconOnly:i.e,size:"small",onClick:b,disabled:!f,"aria-label":s.Ru.get("playback-control.skip-backward-15"),"":"control-button-seek-back-15"})})})}},6963:(e,t,n)=>{"use strict";n.d(t,{v:()=>g});var i=n(34139),r=n(11283),s=n(14056),a=n(88713),o=n(87465),l=n(36471),c=n(19498),u=n(87687),d=n(30232),m=n(56029);const p="main-seekForwardButton-button";var h=n(13274);const g=({iconSize:e="small",onClick:t})=>{const n=(0,l.W)(),g=(0,u.K)(),f=(0,d.o)((e=>e?.restrictions.canSeek??!1)),b=()=>{n({type:"click",intent:"skip-forward-15"}),t?.(15e3),g.seekForward(15e3)},v={"--button-size":2*(0,m.k)(e)+"px"};return(0,h.jsx)(a.Zp,{label:s.Ru.get("playback-control.skip-forward-15"),children:(0,h.jsx)(o.u,{property:c.kvg,renderOldExperience:()=>(0,h.jsx)("button",{style:v,className:p,onClick:b,disabled:!f,"aria-label":s.Ru.get("playback-control.skip-forward-15"),"":"control-button-seek-forward-15",children:(0,h.jsx)(i.A,{size:e})}),renderNewExperience:()=>(0,h.jsx)(r.H,{iconOnly:i.A,size:"small",onClick:b,disabled:!f,"aria-label":s.Ru.get("playback-control.skip-forward-15"),"":"control-button-seek-forward-15"})})})}},46782:(e,t,n)=>{"use strict";n.d(t,{u:()=>y});var i=n(97500),r=n.n(i),s=n(69018),a=n(11283),o=n(14056),l=n(88713),c=n(87465),u=n(82115),d=n(36471),m=n(19498),p=n(95799),h=n(56029);const g="main-shuffleButton-button",f="main-shuffleButton-active",b="fZjbVIqD8Xc3auRZOxu5";var v=n(13274);const y=({iconSize:e="small",onClick:t})=>{const n=(0,d.W)(),{shuffle:i,setShuffle:y,canToggleShuffle:_}=(0,p.V)(),E=()=>{const e=!i;n({type:"click",intent:"shuffle"}),t?.(e),y(e)},x=i?o.Ru.get("playback-control.disable-shuffle"):o.Ru.get("playback-control.enable-shuffle"),C={"--button-size":2*(0,h.k)(e)+"px"};return(0,v.jsx)(u.u,{placement:"top",arrow:"bottom",title:o.Ru.get("pick-and-shuffle.upsell.title.shuffle-button"),children:(0,v.jsx)(l.Zp,{label:x,children:(0,v.jsx)(c.u,{property:m.kvg,renderOldExperience:()=>(0,v.jsx)("button",{style:C,className:r()(g,{[f]:i}),onClick:E,disabled:!_,role:"switch","aria-checked":i?"true":"false","aria-label":x,"":"control-button-shuffle",children:(0,v.jsx)(s.p,{size:e})}),renderNewExperience:()=>(0,v.jsx)(a.H,{className:r()({[b]:i}),iconOnly:s.p,size:"small",onClick:E,disabled:!_,role:"switch","aria-checked":i?"true":"false","aria-label":x,"":"control-button-shuffle",semanticColor:i?"textBrightAccent":void 0})})})})}},633:(e,t,n)=>{"use strict";n.d(t,{d:()=>b});var i=n(98678),r=n(37385),s=n(11283),a=n(14056),o=n(88713),l=n(87465),c=n(83699),u=n(36471),d=n(19498),m=n(87687),p=n(30232),h=n(56029);const g="main-skipBackButton-button";var f=n(13274);const b=({iconSize:e="small",onClick:t})=>{const n=(0,m.K)(),b=(0,u.W)(),v=(0,p.o)((e=>(e?.restrictions.canSkipPrevious||e?.restrictions.canSeek)??!1)),y=(0,i.YQ)((e=>{b({type:"click",intent:"previous"}),t?.(),n.skipToPrevious(),(0,c.aX)(e,"skip-back")}),100,{leading:!0,trailing:!1}),_={"--button-size":2*(0,h.k)(e)+"px"};return(0,f.jsx)(o.Zp,{label:a.Ru.get("playback-control.skip-back"),children:(0,f.jsx)(l.u,{property:d.kvg,renderOldExperience:()=>(0,f.jsx)("button",{style:_,className:g,onClick:y,disabled:!v,"aria-label":a.Ru.get("playback-control.skip-back"),"":"control-button-skip-back",children:(0,f.jsx)(r.A,{size:e})}),renderNewExperience:()=>(0,f.jsx)(s.H,{iconOnly:r.A,size:"small",disabled:!v,"aria-label":a.Ru.get("playback-control.skip-back"),"":"control-button-skip-back",onClick:y})})})}},51915:(e,t,n)=>{"use strict";n.d(t,{$:()=>b});var i=n(98678),r=n(60065),s=n(11283),a=n(14056),o=n(88713),l=n(87465),c=n(83699),u=n(36471),d=n(19498),m=n(87687),p=n(30232),h=n(56029);const g="main-skipForwardButton-button";var f=n(13274);const b=({iconSize:e="small",onClick:t})=>{const n=(0,m.K)(),b=(0,u.W)(),v=(0,p.o)((e=>e?.restrictions.canSkipNext??null)),y=(0,i.YQ)((e=>{b({type:"click",intent:"next"}),t?.(),n.skipToNext(),(0,c.aX)(e,"skip-forward")}),100,{leading:!0,trailing:!1}),_={"--button-size":2*(0,h.k)(e)+"px"};return(0,f.jsx)(o.Zp,{label:a.Ru.get("playback-control.skip-forward"),children:(0,f.jsx)(l.u,{property:d.kvg,renderOldExperience:()=>(0,f.jsx)("button",{style:_,className:g,onClick:y,disabled:!v,"aria-label":a.Ru.get("playback-control.skip-forward"),"":"control-button-skip-forward",children:(0,f.jsx)(r.s,{size:e})}),renderNewExperience:()=>(0,f.jsx)(s.H,{iconOnly:r.s,size:"small",disabled:!v,"aria-label":a.Ru.get("playback-control.skip-forward"),"":"control-button-skip-forward",onClick:y})})})}},41876:(e,t,n)=>{"use strict";n.d(t,{w:()=>te});var i=n(14056),r=n(87882),s=n(88713),a=n(36471),o=n(79864),l=n(85445),c=n(83636),u=n(53825),d=n(32814),m=n(21520),p=n(20344),h=n(20826),g=n(8559),f=n(28222),b=n(29745),v=n(11312),y=n(10971),_=n(71642),E=n(60845),x=n(31804),C=n(28487),S=n(60155),A=n(2286),w=n(89951),I=n(3796),T=n(81437),N=n(64682),R=n(89259),k=n(64480),O=n(86873),P=n(69862),j=n(60496),L=n(42893),D=n(29296),U=n(87579),M=n(81566),B=n(72561);const F="INvB6IvAqjjvyfm0ezDi";var H=n(13274);const V={.5:c.D4,.6:u.k,.7:d.l,.8:m.W9,.9:p.l,1:h.P,1.1:g.g,1.2:f.Dx,1.3:b.A,1.4:v.l,1.5:y.in,1.6:_.h,1.7:E.e,1.8:x.B,1.9:C.T,2:S.c,2.1:A.F,2.2:w.W,2.3:I.Z,2.4:T.U,2.5:N.X,2.6:R.m,2.7:k.n,2.8:O.Y,2.9:P.X,3:j.f,3.1:L.y,3.2:D.T,3.3:U.Q,3.4:M.l,3.5:B.i},z=({speed:e,iconSize:t=20})=>{const n=V[e];return n?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(n,{className:F,iconSize:t,style:{width:`${t}px`,height:`${t}px`}}),(0,H.jsx)("span",{className:"hidden-visually",children:`${e}x`})]}):(0,H.jsx)("span",{children:`${e}x`})};var G=n(79474),W=n(20273),K=n(29977),Y=n(53603);const q=[.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5],Q=(e=1)=>{const t=q,[n]=t.slice().sort(((t,n)=>Math.abs(t-e)-Math.abs(n-e)));return n},$="Is0ZfXiIyRoHd9y1OWtv",Z=function({selectedSpeed:e,setSelectedSpeed:t}){const n=(0,a.W)(),r=q,s=(0,G.useRef)(null),o=(0,G.useCallback)((e=>{null!==e&&(s.current=e)}),[]);return(0,G.useEffect)((()=>{s?.current&&s.current.scrollIntoView({block:"center"})}),[s]),(0,H.jsxs)(W.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,H.jsx)(K.y,{children:i.Ru.get("playback-control.playback-speed")}),(0,H.jsx)("div",{className:$,children:r.map((r=>(0,H.jsx)(Y.D,{elementRef:r===e?o:void 0,onClick:()=>{t(r),n({type:"click",intent:"choose-speed",itemIdSuffix:`option-${r}x`})},"":`playback-speed-option-${r}`,role:"menuitemradio","aria-label":i.Ru.get("playback-control.playback-speed-button-a11y",r),"aria-checked":r===e,children:`${r}x`},r)))})]})};var X=n(82052),J=n(95799);const ee="Ww5ppB6W74laf1c0H_pR",te=({iconSize:e=20,onClick:t})=>{const{speed:n,setSpeed:c,canChangeSpeed:u}=function(){const{speed:e,setSpeed:t,canChangeSpeed:n}=(0,J.V)(),[i,r]=(0,X.x)("playbackSpeed",1),s=(0,G.useMemo)((()=>Q(i??q)),[i]);return{speed:(0,G.useMemo)((()=>Boolean(e)?Q(e):s),[e,s]),setSpeed:(0,G.useCallback)((e=>{r(e),t(e)}),[r,t]),canChangeSpeed:n}}(),d=(0,a.W)(),m=(0,o.v)((({connectionStatus:e})=>e===l.zP.NOT_CONNECTED)),p={"--button-size":2*e+"px"};return u?(0,H.jsx)(r.t,{renderInline:!0,placement:"top-start",menu:(0,H.jsx)(Z,{selectedSpeed:n,setSelectedSpeed:e=>{t?.(e),c(e)}}),children:(t,r,a)=>(0,H.jsx)(s.Zp,{label:i.Ru.get("playback-control.change-playback-speed"),children:(0,H.jsx)("button",{style:p,ref:a,className:ee,onClick:e=>{r(e),d({type:"click",intent:"choose-speed"})},"aria-label":i.Ru.get("playback-control.change-playback-speed"),disabled:!m,"":"control-button-playback-speed",children:(0,H.jsx)(z,{speed:n,iconSize:e})})})}):null}},9421:(e,t,n)=>{"use strict";n.d(t,{M:()=>w,V:()=>A});var i=n(79474),r=n(97500),s=n.n(r),a=n(98678),o=n(14056),l=n(88713),c=n(60832),u=n(13855),d=n(56029);const m="volume-bar",p="RyUTmsGCr7jM4YTwqq8p",h="volume-bar__slider-container",g="DLZvnBAg9muHrwjSyIus",f="ekolz0hXwCXtCyFNmvqb",b="volume-bar__icon-button",v="aDDQP2meKLCk46Bn7Zz1";var y=n(59088),_=n(5064),E=n(37862),x=n(78983),C=n(13274);const S=({volume:e=1,iconSize:t="small",...n})=>{const i={size:t,role:"presentation",...n};return 0===e?(0,C.jsx)(y.X,{"aria-label":o.Ru.get("playback-control.a11y.volume-off"),...i}):e<1/3?(0,C.jsx)(_.D,{"aria-label":o.Ru.get("playback-control.a11y.volume-low"),...i}):e<2/3?(0,C.jsx)(E.z,{"aria-label":o.Ru.get("playback-control.a11y.volume-medium"),...i}):(0,C.jsx)(x.C,{"aria-label":o.Ru.get("playback-control.a11y.volume-high"),...i})};let A=function(e){return e[e.SHOW_SLIDER_ALWAYS=0]="SHOW_SLIDER_ALWAYS",e[e.SHOW_SLIDER_ON_HOVER=1]="SHOW_SLIDER_ON_HOVER",e}({});const w=({iconSize:e="small",onVolumeBarClick:t,onVolumeBarDrag:n,onToggleMuteClick:r,className:y,mode:_=A.SHOW_SLIDER_ALWAYS,sliderSize:E,sliderDirection:x="horizontal"})=>{const{volume:w,setVolume:I,raiseVolume:T,lowerVolume:N}=(0,u.n)(),R=-1!==w,k=Math.min(1,Math.max(0,w)),[O,P]=(0,i.useState)({isDragging:!1,isHoveringButton:!1,toggleVolumeLevel:null,dragPosition:0,shouldDragValueBeUsed:!1}),{shouldDragValueBeUsed:j,dragPosition:L,isHoveringButton:D,toggleVolumeLevel:U,isDragging:M}=O;let B=j?L:k;R||(B=1);const F=(0,a.YQ)((e=>{const t=Math.min(1,Math.max(0,e));I(t)}),25,{maxWait:50,leading:!0}),H=()=>{P((e=>({...e,isHoveringButton:!0})))},V=()=>{P((e=>({...e,isHoveringButton:!1})))},z=0===w?o.Ru.get("playback-control.unmute"):o.Ru.get("playback-control.mute"),G={"--button-size":2*(0,d.k)(e)+"px","--slider-width":E?`${E}px`:"100%"};return(0,C.jsxs)("div",{style:G,className:s()(m,y,{[v]:!R,[p]:"vertical"===x,[g]:_===A.SHOW_SLIDER_ON_HOVER}),"":"volume-bar",dir:"ltr",onWheel:e=>{if(!R)return;const t=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX,n=Math.max(-120,Math.min(120,e?.nativeEvent?.wheelDelta||t))/1200,i=Math.max(0,Math.min(1,B+n));I(i)},children:[(0,C.jsx)(l.Zp,{label:z,children:(0,C.jsx)("button",{className:s()(b,"control-button"),onClick:()=>{0===B?(r?.("not_muted"),F(U??.7)):(P((e=>({...e,toggleVolumeLevel:B}))),r?.("muted"),F(0))},disabled:!R,"aria-label":0===w?o.Ru.get("playback-control.unmute"):o.Ru.get("playback-control.mute"),onMouseEnter:H,onMouseLeave:V,"aria-describedby":"volume-icon","":"volume-bar-toggle-mute-button",children:(0,C.jsx)(S,{id:"volume-icon",iconSize:e,volume:B})})}),(0,C.jsx)("div",{className:s()(h,{[f]:"vertical"===x}),onMouseEnter:H,onMouseLeave:V,children:(0,C.jsx)(c.z2,{labelText:o.Ru.get("playback-control.a11y.volume-slider-button"),value:B,max:1,step:.1,onDragStart:e=>{P((t=>({...t,isDragging:!0,dragPosition:e,shouldDragValueBeUsed:!0})))},onDragMove:e=>{P((t=>({...t,dragPosition:e,shouldDragValueBeUsed:!0}))),M&&(n?.(e),F(e))},onDragEnd:e=>{P((e=>({...e,shouldDragValueBeUsed:!1,dragPosition:0,isDragging:!1}))),t?.(e),F(e)},onStepBackward:N,onStepForward:T,forceActiveStyles:D,direction:x})})]})}},45559:(e,t,n)=>{"use strict";n.d(t,{h:()=>_});var i=n(22215),r=n(86984),s=n(67593),a=n(88291),o=n(91746),l=n(26774),c=n(84378),u=n(6038),d=n(24594),m=n(2092),p=n(19498),h=n(57506),g=n(86412),f=n(67302),b=n(9440);const v="main-nowPlayingView-coverArt";var y=n(13274);const _=({context:e,item:t,index:n})=>{const{spec:_,logger:E}=(0,f.r)(r.J,{}),{draggable:x,onDragStart:C}=(0,m.P)(),S=(0,i.NC)(p.yJ8)!==p.NtL.CONTROL;return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(a.h,{menu:(0,y.jsx)(l.W,{context:e,item:t,canSwitchVisuals:S}),children:(0,y.jsx)("div",{draggable:x&&((0,g.v)(t)||(0,h.p)(t)),onDragStart:e=>{C(e,{itemUris:[t.uri],dragLabelText:(0,d.r)(t)})},children:(0,y.jsx)(u.R,{uri:e.uri,owner:e.metadata?.context_owner,children:(0,y.jsx)(c.e,{context:t.type===b.c.TRACK?t.album:e,item:t,index:n,isVisible:!0,onClick:()=>{E.logInteraction(_.coverArtFactory({uri:t.uri}).hitUiNavigate({destination:t.type===b.c.TRACK?t.album.uri:t.uri}))},adEventReason:s.c.COVER_ART,children:(0,y.jsx)(o.b,{className:v,item:t,maxSize:384,desiredLabel:"xlarge"})})})})})})}},957:(e,t,n)=>{"use strict";n.d(t,{w:()=>p,X:()=>m});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(88713);const l="main-nowPlayingView-section",c="main-nowPlayingView-sectionHeader",u="main-nowPlayingView-sectionHeaderText";var d=n(13274);const m=({action:e,children:t,className:n,icon:i,tooltipLabel:r})=>(0,d.jsxs)(a.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",className:s()(c,n),children:[i,(0,d.jsx)(o.Zp,{label:r,children:(0,d.jsx)("div",{className:u,children:t})}),e]}),p=(0,i.forwardRef)((({children:e,className:t,style:n,testId:i},r)=>{const a={};return i&&(a["data-testid"]=i),(0,d.jsx)("div",{ref:r,className:s()(l,t),style:n,...a,children:e})}))},46856:(e,t,n)=>{"use strict";n.d(t,{F:()=>l});var i=n(79474),r=n(10098),s=n(63842),a=n(27246),o=n(13274);const l=()=>{const{setVideoPlayerUIFlag:e}=(0,s.d)(),t=(0,r.XB)();return(0,i.useEffect)((()=>(e(a.n.npv,!0),()=>{e(a.n.npv,!1)})),[t,e]),(0,o.jsx)("div",{id:"VideoPlayerNpv_ReactPortal"})}},51765:(e,t,n)=>{"use strict";n.d(t,{_:()=>d,s:()=>u});var i=n(79474),r=n(97500),s=n.n(r),a=n(99275),o=n(54754),l=n(10392),c=n(13274);const u=(0,i.createContext)(null),d=({label:e,style:t,focusTransferId:n,children:r})=>{const d=(0,i.useRef)(null),{animatedStyles:m,animatedClassNames:p}=(0,o.O)();return(0,a.X)(n??null,d),(0,c.jsx)(u.Provider,{value:d,children:(0,c.jsx)("aside",{"aria-label":e,className:s()(l.A.container,p),style:Object.assign({},t,m),id:"Desktop_PanelContainer_Id",ref:d,tabIndex:-1,children:r})})}},89063:(e,t,n)=>{"use strict";n.d(t,{w:()=>m});var i=n(79474),r=n(97500),s=n.n(r),a=n(68811),o=n(42360),l=n(80959),c=n(10392),u=n(13274);const d=({fixedHeader:e,scrollNodeRef:t,children:n})=>{const i=(0,l.y)(t);return(0,u.jsx)("div",{className:c.A.contentContainer,children:(0,u.jsxs)("div",{className:s()(c.A.content),children:[(0,u.jsx)("div",{className:s()(c.A.fixedHeader,{[c.A.shadow]:i}),children:e}),n]})})},m=i.forwardRef((({children:e,className:t,fixedHeader:n},r)=>{const l=(0,i.useRef)(null),m=(0,u.jsx)(o.bi.Provider,{value:{scrollNodeRef:l},children:(0,u.jsx)(a.a,{className:c.A.scrollBarContainer,onInstanceCreated:e=>{l.current=e.elements().viewport},children:(0,u.jsx)("div",{className:c.A.contentContainer,children:(0,u.jsx)("div",{ref:r,className:s()(c.A.content,c.A.contentPadding,t),children:e})})})});return n?(0,u.jsx)(d,{fixedHeader:n,scrollNodeRef:l,children:m}):m}))},46593:(e,t,n)=>{"use strict";n.d(t,{a:()=>O});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(23659),l=n(23689),c=n(86984),u=n(83856),d=n(14056),m=n(59560),p=n(88291),h=n(84387),g=n(59416),f=n(47498),b=n(69494),v=n(41955),y=n(88713),_=n(30957),E=n(22920),x=n(10098),C=n(2092),S=n(33082),A=n(67302),w=n(2281),I=n(10392),T=n(13274);const N={[u.NQ.PLAYLIST]:b.W,[u.NQ.PLAYLIST_V2]:b.W,[u.NQ.ALBUM]:h.h,[u.NQ.TRACK]:v.P,[u.NQ.ARTIST]:g.t,[u.NQ.EPISODE]:f.b},R=({link:e,title:t,item:n,panelLinkRef:i,variant:r,semanticColor:s})=>{const{spec:o,logger:l}=(0,A.r)(c.J,{}),d=(0,T.jsx)(E.r,{children:(0,T.jsx)(a.E,{as:"h1",variant:r,semanticColor:s,children:t||""})},t||""),m=(0,u.o_)(e);let h,g=!1,f=[];const b=m&&N[m.type];if(b){const e=m.toURI();h=(0,T.jsx)(b,{uri:e}),g=!(!e||!t),f=g?[e]:[]}const v=(0,x.XB)().split("_").join(" "),{draggable:y,onDragStart:S}=(0,C.P)({itemUris:f,dragLabelText:t??""});return(0,T.jsx)(p.h,{menu:h,children:(0,T.jsx)("div",{className:I.A.titleContainer,children:e&&t?(0,T.jsx)(_.default,{ref:i,"aria-label":`${v} link`,draggable:y&&g,onDragStart:g?S:void 0,to:e,search:n?`?uid=${n.uid}&uri=${n.uri}`:void 0,className:I.A.link,onClick:()=>{l.logInteraction(o.contextLinkFactory().hitUiNavigate({destination:e||""}))},children:d}):d})})},k=w.$S.PANEL_CLOSE_CLICK_OR_COLLAPSE,O=({link:e,title:t,titleSlot:n,actions:r,onClose:a,className:c,panelLinkRef:u,preventDefaultClose:p=!1,onBack:h,item:g,titleVariant:f="bodyMediumBold",titleSemanticColor:b="textBase"})=>{const v=(0,x._Y)(),_=(0,x.Ev)(k),E=(0,i.useCallback)((()=>{a?.(),p||v(k)}),[a,p,v]),C=null!==g&&(0,S.N)(g);return(0,T.jsx)(i.Suspense,{fallback:null,children:(0,T.jsxs)("div",{className:s()(I.A.header,c),children:[h&&(0,T.jsx)("span",{className:I.A.actions,children:(0,T.jsx)(y.Zp,{label:d.Ru.get("desktop.login.Back"),children:(0,T.jsx)(m.a,{ariaLabel:d.Ru.get("desktop.login.Back"),className:I.A.closeButton,size:"sm",onClick:h,icon:o.g})})}),n||(0,T.jsx)(R,{title:t,panelLinkRef:u,item:g,link:e,variant:f,semanticColor:b}),(0,T.jsxs)("span",{className:s()(I.A.actions,I.A.closeContainer),children:[r,!C&&(0,T.jsx)("div",{"":"PanelHeader_CloseButton",children:(0,T.jsx)(y.Zp,{label:d.Ru.get("close"),children:(0,T.jsx)(m.a,{ariaLabel:d.Ru.get("close"),className:I.A.closeButton,size:"sm",onClick:E,icon:l.M,disabled:!_})})})]})]})})}},12363:(e,t,n)=>{"use strict";n.d(t,{MQ:()=>f,pF:()=>g,wk:()=>h});var i=n(79474),r=n(97191),s=n(99754),a=n(22215),o=n(60181),l=n(86900),c=n(587),u=n(30939),d=n(19498),m=n(74681),p=n(13274);const h=(0,i.createContext)(null),g=({playerAPI:e,children:t})=>{const n=(0,a.NC)(d.eWj),o=(0,a.NC)(d.VUN),g=(0,c.qg)(),f=(0,m.E)(),b=(0,s.Pj)(),v=!(0,u.n)(),y=(0,i.useMemo)((()=>{const t={isAutoToggleNPVEnabled:f,isQueueOnRightPanelEnabled:n,isDevicePickerSidePanelEnabled:o};return(0,l.BV)(e,g,b,t,v)}),[e,g,b,v,f,n,o]),[_,E]=(0,i.useState)(y.initialState),x=(0,i.useMemo)((()=>(0,r.U4)(y).start()),[y]),C=(0,i.useCallback)((e=>{(e.changed??!0)&&E(e)}),[]);return(0,i.useEffect)((()=>{const e=x.subscribe(C);return()=>e.unsubscribe()}),[x]),(0,p.jsx)(h.Provider,{value:[_,x,y],children:t})};function f(e){switch(e){case o.Z.BuddyFeed:return l.$S.BUDDY_FEED_BUTTON_CLICK;case o.Z.NowPlayingView:return l.$S.NPV_BUTTON_CLICK;case o.Z.PuffinActivation:case o.Z.Puffin:return l.$S.PUFFIN_BUTTON_CLICK;case o.Z.Queue:return l.$S.QUEUE_BUTTON_CLICK;case o.Z.DevicePicker:return l.$S.DEVICE_PICKER_BUTTON_CLICK;case o.Z.Disabled:default:return l.$S.PANEL_CLOSE_CLICK_OR_COLLAPSE}}},14452:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var i=n(7012);function r(){const[e]=(0,i.s)();return e.value}},7012:(e,t,n)=>{"use strict";n.d(t,{s:()=>s});var i=n(79474),r=n(12363);function s(){const e=(0,i.useContext)(r.wk);if(!e)throw new Error("usePanelStateMachine() must be used within a PanelStateMachineContextProvider");return e}},68895:(e,t,n)=>{"use strict";n.d(t,{B:()=>o});var i=n(79474),r=n(59841),s=n(85786),a=n(13274);const o=i.memo((({fadeIn:e=!0})=>{const t={background:`linear-gradient(180deg, #202124 0%, ${r.gray7} 21.35%)`,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},n={width:"117px",height:"117px",maxWidth:"50vw",maxHeight:"50vh",color:r.greenLight,aspectRatio:"1 / 1",animation:e?"300ms ease-out forwards fadein":"none",opacity:e?0:1};return(0,a.jsxs)("div",{style:t,children:[e&&(0,a.jsx)("style",{children:"@keyframes fadein {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}"}),(0,a.jsx)(s.D,{style:n})]})}))},92789:(e,t,n)=>{"use strict";n.d(t,{S:()=>c,K:()=>u});var i=n(79474),r=n(39927);const s={BREAKPOINT_VERTICAL_MEDIUM:"170px",BREAKPOINT_VERTICAL_SMALL:"132px",BREAKPOINT_HORIZONTAL_SMALL:"299px"};function a(e,t=s){const n=function(e,t){if(!e)return"DEFAULT";if(e<=parseInt(t.BREAKPOINT_VERTICAL_SMALL,10))return"SMALL";if(e<=parseInt(t.BREAKPOINT_VERTICAL_MEDIUM,10))return"MEDIUM";return"DEFAULT"}(e?.innerHeight,t),i=function(e,t){if(!e)return"DEFAULT";if(e<=parseInt(t.BREAKPOINT_HORIZONTAL_SMALL,10))return"SMALL";return"DEFAULT"}(e?.innerWidth,t);return{horizontal:i,vertical:n}}var o=n(13274);const l=(0,i.createContext)({horizontal:"DEFAULT",vertical:"DEFAULT"}),c=({children:e})=>{const t=(0,r.ox)(),[n,s]=(0,i.useState)((()=>a(t)));return(0,i.useEffect)((()=>{const e=()=>{const{vertical:e,horizontal:i}=a(t);e===n.vertical&&i===n.horizontal||s({vertical:e,horizontal:i})};return t?.addEventListener("resize",e),()=>{t?.removeEventListener("resize",e)}}),[n.horizontal,n.vertical,t]),(0,o.jsx)(l.Provider,{value:n,children:e})},u=()=>{const e=(0,i.useContext)(l);if(void 0===e)throw new Error("usePiPMiniPlayerSize must be used within a PiPSizeProvider");return e}},94710:(e,t,n)=>{"use strict";n.d(t,{mv:()=>s,rP:()=>r,vh:()=>a});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e}function a(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e.getEventSender()}},51624:(e,t,n)=>{"use strict";n.d(t,{I:()=>u,c:()=>d});var i=n(79474),r=n(22215);const s=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e)+e));var a=n(82052),o=n(30232),l=n(45640),c=n(19498);let u=function(e){return e.STANDARD="standard",e.TURTLE="turtle",e.MEOW="meow",e.BLOB="blob",e.FROG="froge",e}({});const d=()=>{const e=(0,r.NC)(c.meE,{loadingValue:!1}),[t,d]=(0,a.x)("playback-handle-type",u.STANDARD),[m,p]=(0,i.useState)([]),[h,g]=(0,i.useState)(m[s(0,m.length)]),f=(0,i.useCallback)((()=>{g(m[s(0,m.length)])}),[m]),b=(0,o.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri||e?.uid===t?.uid));return(0,i.useEffect)((()=>{if(e&&t!==u.STANDARD){(async()=>{let e=[];switch(t){case u.TURTLE:e=await n.e(9109).then(n.t.bind(n,74677,19));break;case u.MEOW:e=await n.e(9109).then(n.t.bind(n,11067,19));break;case u.BLOB:e=await n.e(9109).then(n.t.bind(n,85244,19));break;case u.FROG:e=await n.e(9109).then(n.t.bind(n,13320,19));break;default:(0,l.k)(t)}p(e)})()}else p([])}),[e,t]),(0,i.useEffect)((()=>{f()}),[f,b]),{icon:h,playbackHandleType:t,setPlaybackHandleType:d}}},54551:(e,t,n)=>{"use strict";n.d(t,{I:()=>i.I,c:()=>i.c});var i=n(51624)},30797:(e,t,n)=>{"use strict";n.d(t,{VV:()=>a,cM:()=>o,nI:()=>c});var i=n(79474),r=n(13274);const s={isOpen:!1,uri:null},a=(0,i.createContext)(void 0),o=(0,i.createContext)(s);function l(e,t){switch(t.type){case"open":return{...e,isOpen:!0,uri:t.uri};case"close":return{...s};default:throw new Error("Unknown action received!")}}const c=({children:e})=>{const[t,n]=(0,i.useReducer)(l,s);return(0,r.jsx)(a.Provider,{value:n,children:(0,r.jsx)(o.Provider,{value:t,children:e})})}},40534:(e,t,n)=>{"use strict";n.d(t,{R:()=>s});var i=n(79474),r=n(81392);const s=()=>{const[e,t]=(0,i.useState)(!1),n=(0,r.K)(r.X.CollaborativePlaylists);return(0,i.useEffect)((()=>{n&&t(!0)}),[n,t]),{toggleActivationVisible:e,setToggleActivationVisible:t}}},12975:(e,t,n)=>{"use strict";n.d(t,{GM:()=>c,Mj:()=>a,qS:()=>s,vB:()=>u});var i=n(79474),r=n(13274);const s=(e,t)=>({type:"OPEN",name:e,handle:t}),a=e=>({type:"CLOSE",name:e});function o(e,t){switch(t.type){case"OPEN":{const{name:n,handle:i}=t;return e.map.has(n)?e:(e.map.set(n,i),{...e,map:e.map})}case"CLOSE":{const{name:n}=t;return e.map.delete(n)?{...e,map:e.map}:e}}return e}const l=(0,i.createContext)(null),c=({children:e})=>{const t={map:new Map},[n,s]=(0,i.useReducer)(o,t);return(0,r.jsx)(l.Provider,{value:[n,s],children:e})};function u(){const e=(0,i.useContext)(l);if(null===e)throw new Error("Trying to use 'PopupWindowContext' without 'PopupWindowProvider'!");return e}},30578:(e,t,n)=>{"use strict";n.d(t,{p:()=>b});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(98196),l=n(11283),c=n(61080),u=n(14056),d=n(22269);const m="jAjrv_00X1qyxaEHmJCb",p="YVnLJCNcdaEeIGBQYqJS",h="pxocyhWhrvAeBiSlfjbd",g="aOt09fJWpST6CG8xfHuo";var f=n(13274);const b=i.memo((function({onClose:e,onConfirm:t,isOpen:n,itemCount:r}){const b=(0,i.useCallback)((n=>{t(),e(n)}),[t,e]),v=u.Ru.get("queue.confirm-title",r);return(0,f.jsx)(d.A,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:e,contentLabel:v,isOpen:n,children:(0,f.jsxs)("div",{className:m,children:[(0,f.jsx)(a.E,{as:"h2",variant:"bodyMediumBold",className:p,children:v}),(0,f.jsx)(a.E,{as:"p",variant:"bodySmall",className:h,paddingBottom:o.lT,children:u.Ru.get("queue.confirm-message")}),(0,f.jsxs)("div",{className:s()("encore-light-theme",g),children:[(0,f.jsx)(l.H,{onClick:e,children:u.Ru.get("queue.cancel-button")}),(0,f.jsx)(c.$,{onClick:b,children:u.Ru.get("queue.confirm-button")})]})]})})}))},61648:(e,t,n)=>{"use strict";n.d(t,{H:()=>l});var i=n(58396),r=n(98764),s=n(14056),a=n(2426),o=n(13274);const l=()=>(0,o.jsxs)("div",{className:a.A.emptyContainer,children:[(0,o.jsx)(i.q,{size:"xxlarge","aria-hidden":"true"}),(0,o.jsxs)("div",{className:a.A.titleContainer,children:[(0,o.jsx)(r.E,{as:"h1",variant:"titleMedium",semanticColor:"textBase",children:s.Ru.get("history.empty-title")}),(0,o.jsx)("p",{children:s.Ru.get("history.empty-description")})]})]})},54723:(e,t,n)=>{"use strict";n.d(t,{K:()=>u});var i=n(90876),r=n(98764),s=n(61080),a=n(14056),o=n(30957),l=n(2426),c=n(13274);const u=()=>(0,c.jsxs)("div",{className:l.A.emptyContainer,children:[(0,c.jsx)(i.j,{size:"xxlarge","aria-hidden":"true"}),(0,c.jsxs)("div",{className:l.A.titleContainer,children:[(0,c.jsx)(r.E,{as:"h1",variant:"titleMedium",semanticColor:"textBase",children:a.Ru.get("queue.empty-title")}),(0,c.jsx)("p",{children:a.Ru.get("queue.empty-description")})]}),(0,c.jsx)(o.default,{to:"/search",children:(0,c.jsx)(s.$,{colorSet:"invertedLight",children:a.Ru.get("queue.fine-something")})})]})},78885:(e,t,n)=>{"use strict";n.d(t,{$y:()=>l,Nf:()=>u,Qc:()=>c});var i=n(79474),r=n(45640);function s(e,t){switch(t.type){case"OPEN":return{...e,isOpen:!0};case"CLOSE":return{...e,isOpen:!1};default:(0,r.d)(t)}}var a=n(13274);const o=(0,i.createContext)(void 0),l=({children:e})=>{const t=(0,i.useReducer)(s,{isOpen:!1});return(0,a.jsx)(o.Provider,{value:t,children:e})},c=()=>{const e=(0,i.useContext)(o);if(!e)throw new Error("useSearchModalState must be used within SearchModalProvider");const[t]=e;return t},u=()=>{const e=(0,i.useContext)(o);if(!e)throw new Error("useSearchModalDispatch must be used within SearchModalProvider");const[,t]=e;return t}},39205:(e,t,n)=>{"use strict";n.d(t,{o:()=>k});var i=n(79474),r=n(99754),s=n(83648),a=n(98678),o=n(702),l=n(83856),c=n(42360),u=n(67302),d=n(74484),m=n(40858),p=n(48901),h=n(10508),g=n(97500),f=n.n(g),b=n(59841),v=n(98764),y=n(26013),_=n(23689),E=n(14056);const x="main-topBar-searchBar",C="x-searchInput-searchInputSearchIcon",S="x-searchInput-searchInputInput",A="ovi95fYvIJ3N3nJxcqY3",w="aTNG01R8uEHt_AdZOcNm",I="x-searchInput-searchInputIconContainer",T="oL_QO4urQFvjTy5NwIyF";var N=n(13274);const R=({onSearch:e,handleSubmit:t,handleChange:n,handleKeyDown:i,handleFocus:r,handleClear:s,onClick:a,inputRef:o,value:l})=>(0,N.jsxs)("div",{className:f()(x,{[A]:!e}),children:[(0,N.jsx)("form",{onSubmit:t,role:"search",children:(0,N.jsx)(v.E,{variant:"bodySmall",as:"input",style:{color:b.black},ref:o,className:f()(S),value:l,maxLength:800,autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,onChange:n,onKeyDown:i,placeholder:e?E.Ru.get("search.search-for-label"):E.Ru.get("navbar.search"),onFocus:r,"":"search-input",onClick:a})}),(0,N.jsxs)("div",{className:I,children:[(0,N.jsx)("span",{className:C,children:(0,N.jsx)(y.C,{className:T,"aria-hidden":!0,size:"small"})}),l&&(0,N.jsx)("button",{className:w,onClick:s,"aria-label":E.Ru.get("search.a11y.clear-input"),children:(0,N.jsx)(_.M,{className:T,size:"small"})})]})]}),k=i.memo((function({isSearchChipsEnabled:e=!1,onSearch:t=!0,onClick:n}){const g=(0,s.zy)(),f=(0,s.Zp)(),b=(0,i.useRef)(null),v=(0,i.useRef)(null),y=(0,r.wA)(),[{category:_,query:E},x]=(0,h.o)(),[C,S]=(0,i.useState)(E),A=!!_,w=(0,c.v7)(),I=g.pathname.startsWith("/recent-searches"),T=A||I,{spec:k,logger:O}=(0,u.r)(o.F,{}),P=(0,a.YQ)(((t,n,i)=>{let r;if(i){const{interactionId:e}=O.logInteraction(i);r=e}e?x(t,_,!1,r):x(t,null,n,r),w.current&&(w.current.scrollTop=0)}),200),j=(0,i.useCallback)(((e=!1)=>{b.current!==document.activeElement&&(v.current=document.activeElement,b.current&&b.current.focus()),e&&b.current?.select()}),[b]);(0,p.x)(m.W.SHOW_SEARCH,(()=>j(!0)));const L=g.pathname.startsWith("/search"),D=g?.state?.fromBrowse||!1;(0,i.useEffect)((()=>{!T&&t&&L&&!D&&(e&&E||j())}),[E,j,g.key,t,L,T,e,D]),(0,i.useEffect)((()=>{L||S("")}),[L,E]);return(0,N.jsx)(R,{inputRef:b,onClick:n,onSearch:t,value:C,handleSubmit:e=>{e.preventDefault(),C&&O.logInteraction(k.keyStrokeSearch());const t=(0,l.o_)(C,{parseUnknown:!0});if(t?.type===l.NQ.AD){const e=(0,l.cE)(t.id);if(t.id===e)return;y((0,d.gt)(t.id))}else t?f(t.toURLPath(!0),{state:{preventMoveFocus:!0,redirectToHome:(0,l.cr)(t)}}):C||f("/search",{state:{preventMoveFocus:!0}});C&&w.current?.querySelector("h1, h2, h3, h4")?.focus()},handleChange:e=>{const t=e.currentTarget.value,n=k.keyStrokeChangeSearchQuery({searchQueryString:t});S(t),P(t,T,n)},handleKeyDown:e=>{if("Escape"===e.key)if(C){const e=k.hitTextClear();S(""),P("",T,e)}else b.current&&b.current.blur(),v.current instanceof HTMLElement&&v.current.focus()},handleFocus:()=>{e||!T&&t||P(C,T,null)},handleClear:()=>{b.current&&b.current.focus();const e=k.hitTextClear();S(""),P("",T,e)}})}))},64395:(e,t,n)=>{"use strict";n.d(t,{j4:()=>o,tY:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useSettingsAPI must be used within a SettingsProvider");return e}},55211:(e,t,n)=>{"use strict";n.d(t,{B:()=>P,q:()=>L});var i=n(79474),r=n(99754),s=n(22215),a=n(36300),o=n(83856),l=n(42624),c=n(90730),u=n(88291),d=n(47498),m=n(31825),p=n(53311),h=n(90226),g=n(22792),f=n(36706),b=n(2092),v=n(36471),y=n(7125),_=n(85711),E=n(32334),x=n(97374),C=n(95999),S=n(97247),A=n(70974),w=n(52792),I=n(67302),T=n(35828),N=n(26903),R=n(41791),k=n(19498),O=n(13274);function P(e){return{uri:e.uri,name:e.name,trailer:e.trailer,showTypes:e.showTypes}}const j=e=>`activation-trigger-mme-${e}`,L=i.memo((function({index:e=-1,showMetadata:t,episode:n,usePlayContextItem:L,status:D,variant:U}){const M=(0,R.c)(),B=n.playedState.playPositionMilliseconds,F=n.uri,H=(0,i.useRef)(null),[V,z]=(0,i.useState)(n.playedState.state===T._w.Completed),{draggable:G,onDragStart:W}=(0,b.P)(),K=(0,y.V)(),Y=(0,S.y)(),q=(0,v.W)(),Q=(0,r.wA)(),{UBIFragment:$,spec:Z,logger:X}=(0,I.r)(a.d,{data:{uri:F,reason:n.requestId||"",position:e}}),J=(0,w.t)(Z),{isActive:ee,isPlaying:te,togglePlay:ne}=L({uri:F}),[ie]=(0,A.S)(1e4,(e=>e?.item?.uri===F));(0,i.useEffect)((()=>{te&&(H.current=ie)}),[te,ie]),(0,i.useEffect)((()=>{!te&&H.current&&n.duration.milliseconds<=H.current&&z(!0)}),[te,n.duration.milliseconds]);const re=(0,i.useCallback)((e=>{e||(H.current=0),z(e)}),[]),se=e=>{if(e.target!==e.currentTarget)return;const i=`${n.name} • ${t.name}`;W(e,{itemUris:[F],dragLabelText:i,contextUri:t.uri})},ae=P(t),oe=(0,_.C)({...n,coverArt:{sources:n.coverArt}},ae),le=(0,i.useCallback)((()=>{if(n.episodeType===T.I_.Episode&&M)g.h.set((()=>({triggerId:j(n.uri),triggerAction:null})));else if(K)oe();else{let e;e=te?Z.playButtonFactory().hitPause({itemToBePaused:F}):ee?Z.playButtonFactory().hitResume({itemToBeResumed:F}):Z.playButtonFactory().hitPlay({itemToBePlayed:F});const t=X.logInteraction(e);q({targetUri:F,intent:te?"pause":"play",type:"click"}),ne({loggingParams:t})}}),[ee,oe,q,ne,F,te,K,n,M,X,Z]),ce=(0,i.useCallback)((()=>{X.logInteraction(Z.hitUiNavigate({destination:F})),q({type:"click",targetUri:F,intent:"navigate"})}),[F,q,X,Z]),ue=n.podcastSubscription?.isPaywalled??!1,de=n.podcastSubscription?.isUserSubscribed??!1,me=ue&&!de,pe=ue&&K,{badges:he}=(0,N.b)({contentRating:n.contentRating?.label,isPaywalled:ue}),ge=(0,i.useCallback)((()=>Q((0,l.Tf)(t.uri))),[t.uri,Q]),fe=(0,i.useCallback)((e=>{let i=e;return(me||pe)&&(i=(0,O.jsx)(h.f,{enabled:!0,showUri:t.uri,children:i})),!n.playability.playable&&he.nineteen&&(i=(0,O.jsx)("div",{onClick:e=>{e.stopPropagation(),ge()},children:e})),i=(0,O.jsx)(c.k,{id:j(F),targetURI:(0,o.o_)(F),children:i}),i}),[F,me,pe,t.uri,he.nineteen,n.playability.playable,ge]),be=(0,s.NC)(k.cKd,{loadingValue:!1});return(0,O.jsx)($,{spec:Z,children:(0,O.jsx)(C.pZ,{value:"row",index:e,children:(0,O.jsx)(u.h,{onShow:()=>{X.logInteraction(Z.secondaryHitUiReveal())},menu:(0,O.jsx)(d.b,{uri:F,showUri:t.uri,sharingInfo:n.sharingInfo,isPlayed:V,onMarkAsPlayed:re}),children:be?(0,O.jsx)(p.k,{ref:J,requestId:n.requestId,index:e,uri:F,size:Y,images:n.coverArt||[],name:n.name,showName:t.name,description:n.description,isPlayable:n.playability.playable||me,fullyPlayed:V,durationMs:n.duration.milliseconds,releaseDate:n.releaseDate?.isoString||"",resumePositionMs:H.current??B,draggable:G,handleDragStart:se,handlePlaybackClick:le,handleClick:ce,isCurrentlyPlaying:ee,isPaywalled:ue,isUserSubscribed:de,isPlaying:te,position:te?ie:void 0,episodeSharingInfo:n.sharingInfo,onMarkAsPlayed:re,contentInformation:n.contentInformation,showUri:t.uri,mediaTypes:n.mediaTypes??void 0,badges:(0,O.jsxs)(O.Fragment,{children:[he.explicit&&(0,O.jsx)(E.g,{}),he.paid&&(0,O.jsx)(f.K,{}),he.nineteen&&(0,O.jsx)(x.q,{size:16})]}),playButtonWrapper:fe,onMoreButtonClick:()=>{X.logInteraction(Z.moreButtonFactory().hitUiReveal())},status:D,variant:U}):(0,O.jsx)(m.R,{ref:J,requestId:n.requestId,index:e,uri:F,size:Y,images:n.coverArt||[],name:n.name,showName:t.name,description:n.description,isPlayable:n.playability.playable||me,fullyPlayed:V,durationMs:n.duration.milliseconds,releaseDate:n.releaseDate?.isoString||"",resumePositionMs:H.current??B,handleDragStart:se,handlePlaybackClick:le,handleClick:ce,isCurrentlyPlaying:ee,isPaywalled:ue,isUserSubscribed:de,isPlaying:te,position:te?ie:void 0,episodeSharingInfo:n.sharingInfo,onMarkAsPlayed:re,contentInformation:n.contentInformation,badges:(0,O.jsxs)(O.Fragment,{children:[he.explicit&&(0,O.jsx)(E.g,{}),he.paid&&(0,O.jsx)(f.K,{}),he.nineteen&&(0,O.jsx)(x.q,{size:16})]}),playButtonWrapper:fe,onMoreButtonClick:()=>{X.logInteraction(Z.moreButtonFactory().hitUiReveal())},showUri:t.uri,mediaTypes:n.mediaTypes??void 0,status:D,variant:U})})})})}))},24407:(e,t,n)=>{"use strict";n.d(t,{u:()=>ee,Y:()=>te});var i=n(79474),r=n(97500),s=n.n(r),a=n(99754),o=n(11283),l=n(21268),c=n(14056),u=n(65325),d=n(88713),m=n(98764),p=n(69018),h=n(17900),g=n(20273),f=n(53603),b=n(88682),v=n(10910),y=n(19293);const _="zNnlcxsmnV1RiWXSd4IA",E="a3sk2brhAAMoZderfRfg";var x=n(13274);const C=({icon:e,name:t,isActive:n,onClick:i,isDsaRestricted:r})=>{const s=n?"textBrightAccent":void 0;return(0,x.jsx)(f.D,{role:"menuitemradio",leadingIcon:(0,x.jsx)(e,{iconSize:16,semanticColor:s}),onClick:i,"aria-checked":n,disabled:r,children:(0,x.jsx)(m.E,{variant:"bodySmall",semanticColor:s,children:t})})},S=({shuffleMode:e,onClick:t,spec:n,logger:r,isDsaRestricted:s})=>{const l=(0,a.wA)(),u=(0,i.useCallback)((()=>{l(y.cI.actions.open())}),[l]),d=(0,i.useCallback)((()=>{t(v.j.ON,(e=>{n&&(e?r.logInteraction(n?.toggleShuffleButtonFactory().hitShuffleDisable()):r.logInteraction(n?.toggleShuffleButtonFactory().hitShuffleEnable()))}))}),[r,t,n]),f=(0,i.useCallback)((()=>{const e=e=>{n&&(e?r.logInteraction(n?.toggleSmartShuffleButtonFactory().hitSelectShuffleMode({previousMode:"smart_shuffle",selectedMode:"linear"})):r.logInteraction(n?.toggleSmartShuffleButtonFactory().hitSelectShuffleMode({previousMode:"linear",selectedMode:"smart_shuffle"})))};s||t(v.j.SMART_SHUFFLE,e)}),[s,r,t,n]),S=s?c.Ru.get("web-player.smart-shuffle.dsa-message"):c.Ru.get("web-player.smart-shuffle.menu-text");return(0,x.jsxs)(g.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,x.jsx)(C,{icon:p.p,name:c.Ru.get("web-player.smart-shuffle.shuffle"),isActive:e===v.j.ON,onClick:d}),(0,x.jsx)(C,{icon:h.k,name:c.Ru.get("web-player.smart-shuffle.smart-shuffle"),isActive:e===v.j.SMART_SHUFFLE,onClick:f,isDsaRestricted:s}),(0,x.jsx)(m.E,{className:_,variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:S}),!s&&(0,x.jsx)(b.u,{children:(0,x.jsx)(o.H,{role:"menuitem",className:E,semanticColor:"textSubdued",onClick:u,size:"small",children:c.Ru.get("web-player.smart-shuffle.menu-button")})})]})},A={[v.j.OFF]:{icon:p.p,label:e=>e?c.Ru.get("web-player.smart-shuffle.button-enable-shuffle-specific",e):c.Ru.get("web-player.smart-shuffle.button-enable-shuffle-generic")},[v.j.ON]:{icon:p.p,semanticColor:"textBrightAccent",label:(e,t)=>e?t?c.Ru.get("web-player.smart-shuffle.button-enable-smart-shuffle-specific",e):c.Ru.get("web-player.smart-shuffle.button-disable-shuffle-specific",e):t?c.Ru.get("web-player.smart-shuffle.button-enable-smart-shuffle-generic"):c.Ru.get("web-player.smart-shuffle.button-disable-shuffle-generic")},[v.j.SMART_SHUFFLE]:{icon:h.k,semanticColor:"textBrightAccent",label:e=>e?c.Ru.get("web-player.smart-shuffle.button-disable-smart-shuffle-specific",e):c.Ru.get("web-player.smart-shuffle.button-disable-smart-shuffle-generic")}};var w=n(42784),I=n(12652),T=n(73787),N=n(22215),R=n(47929),k=n(82548);const O={bottomEnd:T.dw.topStart,top:T.dw.bottom},P=({placement:e,onHide:t,label:n})=>{(0,R.g)(t);const i=(0,N.NC)(k.rW);return(0,x.jsx)("div",{className:s()({"circular-sp-vietnamese":i}),children:(0,x.jsx)(w.A,{arrow:O[e],colorSet:"announcement",onClose:t,children:n})})},j=e=>{const{placement:t,visible:n,children:i}=e;return(0,x.jsx)(I.W,{placement:t,withPortal:!0,overlay:n&&(0,x.jsx)(P,{...e}),children:i})};var L=n(82052),D=n(14494),U=n(67302),M=n(87571),B=n(27742),F=n(80964),H=n(28049),V=n(34627),z=n(18321),G=n(30232),W=n(23974),K=n(73604),Y=n(98678);const q=e=>["use-shuffle",e,"shuffle-mode"];var Q=n(30939);const $=e=>{const t=(e=>{const t=(0,V.U)(),n=!(0,Q.n)();let i=(0,H.I)({queryKey:["use-shuffle",e,"can-smart-shuffle"],queryFn:()=>t.getAvailableShuffleModes(e),staleTime:36e5,gcTime:72e5}).data;return n&&(i=[v.j.OFF,v.j.ON]),i})(e),[n,r]=function(e){const t=(0,V.U)(),n=(0,F.jE)(),r=(0,i.useRef)(null),{isActive:s}=(0,K.l_)(e),a=(0,G.o)(W.l),[o]=(0,Y.d7)(a,1e3),l=(0,H.I)({queryKey:q(e),queryFn:async()=>await t.getShuffle(e),staleTime:0,gcTime:72e5}).data;(0,i.useEffect)((()=>{n.invalidateQueries({queryKey:q(e)})}),[e,o,n]);const c=(0,i.useCallback)((i=>{const s=q(e);if(r.current&&clearTimeout(r.current),i!==v.j.SMART_SHUFFLE)return t.setShuffle(e,i);n.setQueryData(s,v.j.SMART_SHUFFLE),r.current=setTimeout((()=>t.setShuffle(e,i)),1e3)}),[e,n,t]);return(0,i.useEffect)((()=>{const i=t.getEvents(),r=q(e),a=({data:t})=>{t.contextURI===e&&n.setQueryData(r,t.shuffleMode)};i.addListener(z.S.UPDATE,a);const o=({data:t})=>{t.contextURI!==e||s||n.invalidateQueries({queryKey:r})};i.addListener(z.S.UPDATE_COMPLETE,o);const l=()=>{n.invalidateQueries({queryKey:r})};return i.addListener(z.S.UPDATE_ERROR,l),()=>{i.removeListener(z.S.UPDATE,a),i.removeListener(z.S.UPDATE_COMPLETE,o),i.removeListener(z.S.UPDATE_ERROR,l)}}),[e,s,o,n,t]),[l??v.j.OFF,c]}(e),s=(0,M.p)(),a=(0,i.useCallback)((()=>{if(!t)return;const e=void 0!==n?t.indexOf(n):-1;let i=t[(e+1)%t.length];return s||i!==v.j.SMART_SHUFFLE||(i=t[(e+2)%t.length]),r(i),i}),[t,n,s,r]);return{shuffleMode:n,availableShuffleModes:t,setShuffleMode:r,cycleShuffleMode:a,isDsaRestricted:!s}};var Z=n(76267);const X="E1ikFpkPVaoLplbQdrTP",J="nozebc1PGSbzmePU25qY",ee=({label:e,shuffleModeConfig:t,size:n="large",onClick:r,disabled:a=!1,activationVisible:l=!1,shuffleIsOn:c,focusOnRender:u=!1,offsetDotDistance:m=!0,withPadding:p=!1})=>{const h=(0,i.useRef)(null);return(0,i.useEffect)((()=>{u&&h.current?.focus()}),[u]),(0,x.jsx)(d.Zp,{label:e,children:(0,x.jsx)(o.H,{onClick:a?void 0:r,iconOnly:t.icon,semanticColor:t.semanticColor,size:n,"aria-describedby":l?"smartShuffleActivationDescription":void 0,"aria-label":e,"aria-disabled":a,condensedAll:!p,className:s()({[X]:c,[J]:m}),ref:h})})},te=({entityName:e,contextUri:t,activationPlacement:n,size:r,isActive:s=!1,offsetDotDistance:o=!0,withPadding:d=!1,disabled:m=!1,shuffleContext:p,withActivation:h=!0})=>{const{shuffleMode:g,availableShuffleModes:f,setShuffleMode:b,cycleShuffleMode:y,isDsaRestricted:_}=$(t),{spec:E}=(0,U.r)(l.a,{data:{uri:t}}),C=(0,i.useMemo)((()=>E.menuShuffleButtonFactory()),[E]),w=(0,D.s)(),{enqueueSnackbar:I}=(0,B.d)(),[T,N]=(0,i.useState)(!1),{isOpen:R}=(0,a.d4)((e=>e.ui.introducingSmartShuffleModal)),k=g??v.j.OFF,O=A[k],P=f?.includes(v.j.SMART_SHUFFLE),[F,H,V,z]=(0,Z.Z)(f,p,h,k),G=(0,i.useCallback)((e=>{e===v.j.SMART_SHUFFLE?I(s?c.Ru.get("web-player.smart-shuffle.enabled-smart-shuffle"):c.Ru.get("web-player.smart-shuffle.enabled-smart-shuffle-not-active-playlist")):g===v.j.SMART_SHUFFLE&&I(c.Ru.get("web-player.smart-shuffle.disabled-smart-shuffle"))}),[g,I,s]),W=()=>{z(!1),H(!1)},K=(0,i.useCallback)((e=>e===v.j.SMART_SHUFFLE?"smart_shuffle":e===v.j.ON?"shuffle":"linear"),[]),[Y,q]=(0,L.x)("smart-shuffle-menu",0),Q=(0,M.p)(),X=Y>=3||!P,J=O.label?.(e,!!P&&Q),te={label:J,shuffleModeConfig:O,size:r,activationVisible:F,shuffleIsOn:k!==v.j.OFF,offsetDotDistance:o,withPadding:d,disabled:m};return X?(0,x.jsx)(j,{visible:V,onHide:W,placement:n,label:c.Ru.get("web-player.smart-shuffle.activation-text"),children:(0,x.jsx)(ee,{...te,onClick:()=>{const e=g,t=y();W(),G(t),P?w.logInteraction(E.regularShuffleButtonFactory().hitSelectShuffleMode({previousMode:K(e),selectedMode:K(t)})):w.logInteraction(t===v.j.ON?E.regularShuffleButtonFactory().hitShuffleEnable():E.regularShuffleButtonFactory().hitShuffleDisable())},focusOnRender:T})}):(0,x.jsx)(j,{visible:F,onHide:W,placement:n,label:c.Ru.get("web-player.smart-shuffle.activation-message"),children:(0,x.jsx)(u.b,{menu:(0,x.jsx)(S,{shuffleMode:k,onClick:(e,t)=>{const n=e===k?v.j.OFF:e;b(n),G(n),t(n===v.j.OFF)},spec:C,logger:w,isDsaRestricted:_}),onHide:()=>{Y+1===3&&(N(!0),w.logImpression(E.tristateOnboardingTooltipFactory().impression())),q(Y+1)},onShow:()=>{W(),w.logInteraction(E.menuShuffleButtonFactory().hitUiReveal())},onClickOutside:e=>{R||e()},children:(e,t)=>(0,x.jsx)(ee,{...te,onClick:e=>{t(e)}})})})}},49778:(e,t,n)=>{"use strict";n.d(t,{n:()=>x,J2:()=>y,B2:()=>E});var i=n(79474),r=n(62328);function s(e){const{timeout:t,style:n={},mode:i}=e;return{duration:"object"==typeof t?t[i]||0:t,easing:n.transitionTimingFunction,delay:n.transitionDelay}}const a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o=e=>`${Math.round(e)}ms`;function l(e=["all"],t){const{duration:n=300,easing:i=a.easeInOut,delay:r=0}=t||{};return(Array.isArray(e)?e:[e]).map((e=>{const t="string"==typeof n?n:o(n),s="string"==typeof r?r:o(r);return`${e} ${t} ${i} ${s}`})).join(",")}var c=n(13274);const u={entering:{opacity:1},entered:{opacity:1}},d=(0,i.forwardRef)(((e,t)=>{const{children:n,in:a,timeout:o=0,style:d,onEnter:m,onEntered:p,onExit:h,onExited:g,...f}=e,b=(0,i.useRef)(null),v=(y=[b,n.ref,t],(0,i.useMemo)((()=>y.every((e=>null==e))?null:e=>{y.forEach((t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)}))}),y));var y;return(0,c.jsx)(r.eB,{appear:!0,in:a,nodeRef:b,onEnter:(e,t)=>{const n=s({style:d,timeout:o,mode:"enter"});e.style.transition=l("opacity",n),m&&m(e,t)},onEntered:p,onExit:e=>{const t=s({style:d,timeout:o,mode:"exit"});e.style.transition=l("opacity",t),h&&h(e)},onExited:g,timeout:o,...f,children:(e,t)=>(0,i.cloneElement)(n,{style:{opacity:0,visibility:"exited"!==e||a?void 0:"hidden",...u[e],...d,...n.props.style},ref:v,...t})})})),m=(0,i.forwardRef)((({id:e,style:t,children:n},i)=>{const{closeSnackbar:s}=(0,r.dh)();return(0,c.jsx)("div",{ref:i,role:"status",id:e?String(e):void 0,style:t,onClick:()=>{s(e)},children:n})}));var p=n(84332),h=n(67222),g=n(25658);function f({message:e}){return(0,c.jsx)(p.O,{children:(0,c.jsx)(g.P,{center:(0,c.jsx)(h.z,{children:e})})})}const b=(0,i.forwardRef)((({message:e,id:t,style:n},i)=>(0,c.jsx)(m,{id:t,style:n,ref:i,children:(0,c.jsx)(f,{message:e})}))),v={snackbarContainer:"SmJ9PevS7h5IWNQ3K9z3",snackbar:"yrSYBVErq__9yOFyugns"},y=(0,i.createContext)({current:[]}),_=(0,i.createContext)((()=>{})),E=()=>(0,i.useContext)(_);function x({children:e,domRootRef:t}){const n=(0,i.useRef)([]),[s,a]=(0,i.useState)(null);return(0,c.jsx)(r.n,{maxSnack:3,domRoot:s??t?.current??void 0,anchorOrigin:{vertical:"bottom",horizontal:"center"},classes:{containerRoot:v.snackbarContainer,root:v.snackbar},TransitionComponent:d,Components:{default:b,headless:m},preventDuplicate:!0,disableWindowBlurListener:!0,onEnter:(e,t,i)=>{n.current.push(i)},onExit:(e,t)=>{n.current=n.current.filter((e=>e!==t))},children:(0,c.jsx)(y.Provider,{value:n,children:(0,c.jsx)(_.Provider,{value:a,children:e})})})}},23861:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var i=n(11283),r=n(13274);function s({ctaText:e,onCtaClick:t}){return(0,r.jsx)(i.H,{semanticColor:"textBrightAccent",onClick:t,condensedAll:!0,size:"small","aria-hidden":"true",children:e})}},51552:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var i=n(61681),r=n(94009),s=n(4254);const a={snackbarImage:"XTygmcBFgNjoo0ckBBll"};var o=n(13274);function l({src:e,title:t,type:n}){const l=(0,s.dZ)();return(0,o.jsx)(i.b,{fadeIn:!0,images:e?[{url:l(e,24)}]:[],title:t,type:n,size:r.Qe.SIZE_24,shape:i.u.ROUNDED_CORNERS,iconSize:"xsmall",className:a.snackbarImage})}},67222:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var i=n(98764),r=n(13274);function s({children:e}){return(0,r.jsx)(i.E,{variant:"bodyMedium",semanticColor:"textBase",children:e})}},25658:(e,t,n)=>{"use strict";n.d(t,{P:()=>l});const i="TcJ5lUfQ25AJNoCrWO5Z",r="xaCo5LWfBMxqfWjUA3o2",s="r4Hbxvv02KfOVeZ_v335",a="Hkw5_oNxFTDAuh5Bdw6Q";var o=n(13274);const l=({leading:e,center:t,trailing:n})=>(0,o.jsxs)("div",{className:i,children:[e?(0,o.jsx)("div",{className:r,children:e}):null,(0,o.jsx)("div",{className:s,children:t}),n?(0,o.jsx)("div",{className:a,children:n}):null]})},84332:(e,t,n)=>{"use strict";n.d(t,{O:()=>l});var i=n(97500),r=n.n(i),s=n(74266);const a="RQREWe_yBdtc_g6eC3wQ";var o=n(13274);const l=({children:e})=>(0,o.jsx)(s.a,{variant:"elevated",className:r()("encore-light-theme","encore-layout-themes",a),children:e})},94859:(e,t,n)=>{"use strict";n.d(t,{g:()=>h});var i=n(79474),r=n(97500),s=n.n(r),a=n(98764),o=n(14056),l=n(37128);const c="w0kwPDoelauN3C9dVoVe",u="xzLZD9uD3b4u9wecXAJY",d="DaFhhSm73r7rNpomErhI";var m=n(13274);const p=({children:e})=>(0,m.jsx)(m.Fragment,{children:e}),h=(0,i.forwardRef)((function({users:e,maxSlots:t=3,size:n,withoutOverflowBadge:i=!1,dropShadow:r=!1,AvatarWrapper:h=p},g){const f=Math.max(2,t),b=e.length>f?e.length-f+1:0,v=e.slice(0,f),{userIconSize:y,width:_,smallFontSize:E,largeFontSize:x}=(e=>{switch(e){case"xxlarge":return{userIconSize:"xlarge",width:64,smallFontSize:24,largeFontSize:32};case"xlarge":return{userIconSize:"large",width:48,smallFontSize:18,largeFontSize:24};case"large":return{userIconSize:"medium",width:32,smallFontSize:12,largeFontSize:16};case"medium":default:return{userIconSize:"small",width:24,smallFontSize:9,largeFontSize:12};case"small":return{userIconSize:"xsmall",width:16,smallFontSize:7,largeFontSize:9}}})(n),C=b>9?E:x,S=(0,m.jsx)("span",{className:s()(u,"encore-inverted-light-set"),style:{width:_,height:_},role:"presentation",children:(0,m.jsx)(a.E,{variant:"bodyMediumBold",style:{fontSize:C},semanticColor:"textBase",children:`+${b}`})});return(0,m.jsx)("div",{className:s()(c),ref:g,children:v.map(((e,t)=>!i&&b>0&&t===f-1?(0,m.jsx)(h,{index:t,children:(0,m.jsx)(l.e,{images:[],userIconSize:y,label:o.Ru.get("web-player.social-connect.facepile.and-others",b),width:_,piled:!0,customPlaceholder:S})},"others"):(0,m.jsx)(h,{index:t,user:e,children:(0,m.jsx)(l.e,{images:e.images,userIconSize:y,label:e.displayName,displayName:e.displayName,username:e.username,width:_,piled:t>0,imageClassName:r?d:void 0})},e.displayName)))})}))},92979:(e,t,n)=>{"use strict";n.d(t,{$:()=>p});var i=n(79474),r=n(99754),s=n(61080),a=n(53822),o=n(14056),l=n(28244),c=n(40823),u=n(73420),d=n(8876),m=n(13274);const p=()=>{const e=(0,r.wA)(),t=(0,u.Y)(),{logStartJam:n}=(0,d.O)(),p=(0,i.useCallback)((async()=>{try{n(),await t()}catch(t){e((0,l.A9)(c.EL.ERROR))}}),[t,e,n]);return(0,m.jsx)(s.$,{iconLeading:a.V,size:"small",onClick:p,children:o.Ru.get("web-player.social-connect.menu-action.title")})}},68584:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var i=n(79474),r=n(14851),s=n(14056),a=n(74089),o=n(94710),l=n(27742);const c=()=>{const{enqueueSnackbar:e}=(0,l.d)(),t=(0,o.vh)();return(0,i.useCallback)((async n=>{try{if(!n)return;await(0,a.l)(n.shareableUrl);const i=(0,r.c)({share_id:n?.shareId,entity_uri:n?.spotifyUri,share_url:n?.shareableUrl});t.send(i),e(s.Ru.get("web-player.social-connect.invitation-modal.success-toast-message"))}catch(e){TypeError}}),[e,t])}},8876:(e,t,n)=>{"use strict";n.d(t,{O:()=>c});var i=n(79474),r=n(12995),s=n(82433),a=n(67302),o=n(10654),l=n(13274);const c=()=>{const{spec:e,logger:t,UBIFragment:n}=(0,a.r)(r.J,{}),{uri:c}=(0,s.f)(),u=(0,i.useCallback)(((n,i)=>{const r=e.inviteButtonFactory().hitShare({entityToBeShared:n,shareId:i});t.logInteraction(r)}),[t,e]),d=(0,i.useCallback)((()=>{const n=e.endButtonFactory().hitUiReveal();t.logInteraction(n)}),[t,e]),m=(0,i.useCallback)((()=>{const n=e.leaveButtonFactory().hitUiReveal();t.logInteraction(n)}),[t,e]),p=(0,i.useCallback)((()=>{const n=e.facepileButtonFactory().hitUiNavigate({destination:o.S.PARTICIPANTS_PAGE});t.logInteraction(n)}),[t,e]),h=(0,i.useCallback)((t=>(0,l.jsx)(n,{spec:e,...t})),[n,e]);return{logInviteClick:u,logEndClick:d,logLeaveClick:m,logFacePileClick:p,logStartJam:(0,i.useCallback)((()=>{const n=e.createJamButtonFactory().hitUiNavigate({destination:c??""});t.logInteraction(n)}),[t,e,c]),UBIFragmentWithSpec:h}}},36596:(e,t,n)=>{"use strict";n.d(t,{Z:()=>J});var i=n(94300),r=n(38076),s=n(79474),a=n(99754),o=n(98764),l=n(22215),c=n(14056),u=n(75257),d=n(19498),m=n(50042),p=n(66675),h=n(28244),g=n(40823),f=n(13274);const b=({onClick:e})=>{const t=(0,a.wA)(),n=(0,s.useCallback)((()=>{e(),t((0,h.A9)(g.EL.END_SESSION))}),[t,e]);return(0,f.jsx)(p.n,{size:"small",onClick:n,children:c.Ru.get("web-player.social-connect.end-session.end-session-button")})},v=({onClick:e})=>(0,f.jsx)(p.n,{size:"small",onClick:async t=>{e(t)},children:c.Ru.get("web-player.social-connect.invite-button")}),y=({onClick:e})=>{const t=(0,a.wA)(),n=(0,s.useCallback)((()=>{e(),t((0,h.A9)(g.EL.LEAVE_SESSION))}),[t,e]);return(0,f.jsx)(p.n,{size:"small",onClick:n,children:c.Ru.get("web-player.social-connect.leave-session.leave-session-button")})};var _=n(83648),E=n(49073),x=n(10654),C=n(94859),S=n(61862);const A="E6U6SyOECK4IENpzZw2R",w="rirXgOjB8QWiJWDk5hSD",I=({currentSession:e,username:t,onClick:n})=>{const{sessionMembers:i}=e,r=(0,_.Zp)(),a=(0,l.NC)(d.eWj),{setQueueView:u}=(0,E.m)(),m=i.length+2>3?i.length-3:0,h=(0,S.t)(e,t,{userFirst:!0}),g=(0,s.useCallback)((()=>{n&&n(),a?u(E.p.PARTICIPANT_LIST):r(x.S.PARTICIPANTS_PAGE)}),[a,r,n,u]);return(0,f.jsxs)(p.n,{size:"small",className:A,onClick:g,"aria-label":c.Ru.get("web-player.social-connect.participant-list.title"),children:[(0,f.jsx)(C.g,{users:h,maxSlots:3,withoutOverflowBadge:!0}),m>0&&(0,f.jsx)(o.E,{variant:"bodySmallBold",semanticColor:"textBase",className:w,children:`+${m}`})]})};var T=n(68584),N=n(8876),R=n(97500),k=n.n(R),O=n(18891),P=n(74266),j=n(11283),L=n(23689),D=n(61080),U=n(53949);const M="_GA0LJ6qjoKBsWLq34XF",B="s_iKX8Su0w1W5b9yObSm",F="aQ5ntWUtU9bcqS9fS9aC",H="SxLR9RMcR2XyJCZuxYqv",V="vtk1i3JMLWObMppMQ0gH",z="x8qh9EgeC3AdLO0C54Og",G="Dm9gGjGoA7yNxClwSV24",W="MPtthrsnd9PdsCTssJqk",K=({onClose:e,onCopyLink:t,inviteUrl:n})=>(0,f.jsxs)(P.a,{className:M,padding:"0",children:[(0,f.jsxs)("div",{className:B,children:[(0,f.jsxs)("div",{className:H,children:[(0,f.jsx)(o.E,{variant:"bodySmallBold",children:c.Ru.get("web-player.social-connect.invitation.qr-code.title")}),(0,f.jsx)(o.E,{variant:"bodySmall",semanticColor:"textSubdued",children:c.Ru.get("web-player.social-connect.invitation.qr-code.description")})]}),(0,f.jsx)(j.H,{semanticColor:"textSubdued",iconOnly:L.M,size:"small",onClick:e,condensedAll:!0,"aria-label":c.Ru.get("web-player.social-connect.invitation-modal.button-tertiary")})]}),(0,f.jsx)("div",{className:V}),(0,f.jsxs)("div",{className:k()(B,F,z),children:[(0,f.jsx)(D.$,{iconLeading:U._,colorSet:"invertedLight",size:"small",onClick:t,className:G,children:c.Ru.get("web-player.social-connect.invitation-modal.button-primary")}),(0,f.jsx)("div",{className:W,children:(0,f.jsx)(O.Ay,{value:n,size:100})})]})]}),Y="CyBimvsotsoxqwtiZeAn",q="_GKa4bilkTYbQLgcLogI",Q="uXHR7rkHhuz9kVPNWwYW",$="KFGFA5pPG0hgIB97pZfI",Z=({id:e,label:t,value:n,onChange:i})=>(0,f.jsxs)("label",{htmlFor:e,className:$,children:[(0,f.jsx)(o.E,{variant:"bodySmall",semanticColor:"textSubdued",children:t}),(0,f.jsx)(u.l,{id:e,value:n,onSelected:i,condensed:!0})]}),X=({className:e,emptyStateComponent:t})=>{const{currentSession:n,setQueueOnlyMode:i,setParticipantVolumeControl:r}=(0,m.D)(),u=(0,a.d4)((({session:e})=>e.user?.id)),p=n?.joinSessionShortLink,{logFacePileClick:h,logInviteClick:g,logEndClick:_,logLeaveClick:E,UBIFragmentWithSpec:x}=(0,N.O)(),C=(0,T.Z)(),S=(0,l.NC)(d.eWj),[A,w]=(0,s.useState)(!0),R=(0,s.useCallback)((()=>{h()}),[h]),k=(0,s.useCallback)((async()=>{n?.joinSessionShortLink&&await C(n.joinSessionShortLink),g(p?.spotifyUri??"",p?.shareId??"")}),[C,n?.joinSessionShortLink,p?.shareId,p?.spotifyUri,g]),O=(0,s.useCallback)((async()=>{S?w((e=>!e)):k()}),[k,S]),P=(0,s.useCallback)((()=>{_()}),[_]),j=(0,s.useCallback)((()=>{E()}),[E]);if(!n?.active)return t?(0,f.jsx)(f.Fragment,{children:t}):null;const L=n.sessionMembers.find((e=>e.id===n.sessionOwnerId));return(0,f.jsx)(x,{children:(0,f.jsxs)("div",{className:e,children:[(0,f.jsx)("div",{className:Y,children:(0,f.jsx)(o.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",children:c.Ru.get("web-player.social-connect.session-info.title",{host:L?.displayName??""})})}),(0,f.jsxs)("div",{className:q,children:[(0,f.jsxs)("div",{className:Q,children:[(0,f.jsx)(I,{currentSession:n,username:u,onClick:R}),(0,f.jsx)(v,{onClick:O}),n.isSessionOwner?(0,f.jsx)(b,{onClick:P}):(0,f.jsx)(y,{onClick:j})]}),A&&(0,f.jsx)(K,{onClose:()=>w(!1),onCopyLink:k,inviteUrl:p?.shareableUrl??""}),n.isSessionOwner&&(0,f.jsxs)("div",{children:[(0,f.jsx)(Z,{id:"queueOnlyMode",label:c.Ru.get("web-player.social-connect.controls.queue-only-mode"),value:!n.queueOnlyMode,onChange:e=>i(!e)}),"UNAVAILABLE"!==n.participantVolumeControl&&(0,f.jsx)(Z,{id:"participantVolumeControl",label:c.Ru.get("web-player.social-connect.controls.participant-volume-control"),value:"ENABLED"===n.participantVolumeControl,onChange:e=>r(e)})]})]})]})})},J=e=>(0,f.jsx)(r.s,{onError:e=>{(0,i.Jy)(e,"JamQueueHeader")},suspenseFallback:e.emptyStateComponent,children:(0,f.jsx)(X,{...e})})},80120:(e,t,n)=>{"use strict";n.d(t,{N:()=>s,z:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(void 0),a=({value:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t})},6929:(e,t,n)=>{"use strict";n.d(t,{U:()=>m,o:()=>p});var i=n(79474),r=n(9714),s=n(21255),a=n(45640);const o=(e,t)=>{if(e.state?.navigationalRoot)return e.state?.navigationalRoot;if(e.state?.referrer&&e.state?.referrer!==t?.state?.referrer)switch(e.state.referrer){case"buddy_feed":return s.g.BUDDY_FEED;case"now_playing_bar":return s.g.NOW_PLAYING_BAR;case"user_profile":return s.g.PROFILE;case"playlists_sidebar":return s.g.PLAYLISTS_SIDEBAR;case"deeplink":return s.g.DEEP_LINK;case"home":return s.g.HOME;case"search":return s.g.SEARCH;case"your_library":return s.g.COLLECTION;case"now_playing_panel":return s.g.NOW_PLAYING_PANEL;case"whats_new_panel":return s.g.WHATS_NEW_PANEL;case"voice":case"other":case"PlayerHarmony_UnknownReferrer":case"PlayerOverture_UnknownReferrer":case"PlayerStub_UnknownReferrer":case"PlayerCore_UnknownReferrer":case"infinite-playback":break;default:(0,a.k)(e.state.referrer)}return t?.state?.navigationalRoot};class l{locationKeys=[];constructor(e,t){this.history=e,this.ubiLogger=t,this.unsubscribe=this.listen()}listen(){return this.onLocationChange(this.history.location),this.history.listen(this.onLocationChange)}onLocationChange=e=>{const t=this.location;if(e!==t){if(e.state={...e.state,navigationalRoot:o(e,t)},e.key){this.locationKeys.includes(e.key)||(this.locationKeys=[...this.locationKeys,e.key]);const n=this.locationKeys.indexOf(e.key),i=t?.key?this.locationKeys.indexOf(t.key):-1;this.direction=n>i?r.$.FORWARD:r.$.BACK}this.location=e}};getNavigationReason(e){const{location:t,action:n}=this.history;return this.pageView?"POP"===n?this.direction:t.state?.navigationReason:e===s.g.DEEP_LINK?r.$.DEEP_LINK:r.$.CLIENT_STARTED}reportPageView=e=>{const{location:t,action:n}=this.history;this.onLocationChange(t);if(e.pageId&&e.pageId===this.pageView?.pageId&&e.entityUri===this.pageView?.entityUri||t.pathname===this.pageView?.pathname)return;const i=e?.navigationalRoot??t.state?.navigationalRoot??s.g.DEEP_LINK,a="POP"!==n?t.state?.interactionId??this.ubiLogger.getInteractionId(e.entityUri):void 0;this.pageView={pageId:e.pageId,entityUri:e.entityUri,navigationalRoot:i,navigationReason:this.getNavigationReason(i),pathname:t.pathname,interactionId:a},t.state={...t.state,navigationalRoot:i};const o={navigationalRoot:this.pageView.navigationalRoot??s.g.UNKNOWN,pageId:this.pageView.pageId??"UNKNOWN",entityUri:this.pageView.entityUri??"UNKNOWN"};this.pageView.interactionId?this.ubiLogger.logNavigation({...o,interactionId:this.pageView.interactionId}):this.ubiLogger.logNavigation({...o,navigationReason:this.pageView.navigationReason??r.$.UNKNOWN})}}var c=n(14494),u=n(4485),d=n(13274);const m=(0,i.createContext)(void 0),p=({children:e})=>{const t=(0,u.J)(),n=(0,c.s)(),r=(0,i.useMemo)((()=>new l(t,n)),[t,n]);return(0,i.useEffect)((()=>()=>r.unsubscribe()),[r]),(0,d.jsx)(m.Provider,{value:r,children:e})}},96729:(e,t,n)=>{"use strict";n.d(t,{i:()=>c,p:()=>l});var i=n(41764),r=n(30190),s=n(14056),a=n(80482),o=n(13274);const l=[a.I.COMPACT,a.I.LIST],c=[{value:a.I.COMPACT,text:()=>s.Ru.get("web-player.your-library-x.sort-and-view-picker.compact"),icon:()=>(0,o.jsx)(i.d,{size:"small"})},{value:a.I.LIST,text:()=>s.Ru.get("web-player.your-library-x.sort-and-view-picker.list"),icon:()=>(0,o.jsx)(r.N,{size:"small"})}]},43554:(e,t,n)=>{"use strict";n.d(t,{g:()=>o});var i=n(79474),r=n(20273),s=n(70646),a=n(13274);const o=i.memo((()=>(0,a.jsx)(r.W,{children:(0,a.jsx)(s.r,{divider:"before"})})))},4736:(e,t,n)=>{"use strict";n.d(t,{r:()=>h,c:()=>g});var i=n(79474),r=n(97500),s=n.n(r),a=n(22215),o=n(14056),l=n(72120),c=n(82052),u=n(82548),d=n(61948);const m="FT7SGxbdTRfWBMTUYheP";var p=n(13274);const h="yourdj.ylx.tooltipshown",g=({children:e,onTooltipShown:t,api:n,parentRef:r})=>{const[g,f]=(0,i.useState)(!1),[b,v]=(0,i.useState)(!1),y=(0,a.NC)(u.rW);(0,i.useImperativeHandle)(n,(()=>({visible:g,hide:()=>{f(!1)}})));const{isPlaying:_}=(0,d.I)(),E=(0,i.useRef)(null),x=(0,i.useMemo)((()=>new IntersectionObserver((([e])=>v(e.isIntersecting)))),[]);(0,i.useEffect)((()=>(r?.current&&x.observe(r.current),()=>x.disconnect())),[x,r]);const[C,S]=(0,c.x)(h,!1),A=(0,i.useCallback)((e=>{C||(t?.(e),S(!0),f(!0))}),[C,t,S]),w=(0,i.useCallback)((()=>{E.current&&clearTimeout(E?.current)}),[]);return(0,i.useEffect)((()=>_||!b?(f(!1),w):(C||(E.current=setTimeout((()=>{A("dj_in_ylx")}),2e3)),w)),[C,A,_,b,w]),(0,p.jsx)(l.x,{title:o.Ru.get("ylx.clicktoplay"),description:o.Ru.get("web-player.your-dj.ylx.tooltip.description"),visible:g,id:h,showButtons:!1,hideOnClickOutside:!1,onSecondaryButtonClick:()=>f(!1),placement:"right",renderInline:!1,tippyWrapperClassName:m,className:s()({"circular-sp-vietnamese":y}),children:e})}},8646:(e,t,n)=>{"use strict";n.d(t,{b:()=>a});var i=n(80551),r=n(15054),s=n(13274);const a=()=>(0,s.jsx)("div",{className:r.A.coverContainer,children:(0,s.jsx)(i.P,{iconSize:"xxlarge",className:r.A.coverIcon})})},50718:(e,t,n)=>{"use strict";n.d(t,{g:()=>o});var i=n(43410),r=n(14056),s=n(38552),a=n(13274);const o=({pinned:e,size:t="xsmall"})=>e?(0,a.jsx)(i.H,{semanticColor:"textBrightAccent",size:t,title:r.Ru.get("web-player.your-library-x.pinned"),className:s.A.icon}):null},2092:(e,t,n)=>{"use strict";n.d(t,{O:()=>d.O9,P:()=>g});var i=n(79474),r=n(49906),s=n(98764),a=n(83856),o=n(28580),l=n(87240);const c="main-dragAndDrop-dndImageShelter",u="main-dragAndDrop-dndImage";var d=n(20044),m=n(51184),p=n(13274);const h=({text:e})=>(0,p.jsx)(s.E,{variant:"bodyMedium",dir:"auto",children:e}),g=e=>{const{setIds:t,setDropOriginUri:n,setSectionId:s}=(0,i.useContext)(o.O_),{supportsDragAndDrop:g}=(0,m._)();return{draggable:g,onDragStart:(i,o)=>{if(!g)return;const{itemUris:m=[],itemMimeTypes:f=[],dragLabelText:b="",contextUri:v="",sectionId:y=0,dropOriginUri:_="",itemIds:E}={...e,...o};i.defaultPrevented||t(E??m),n(_),s(y),window.addEventListener("click",(()=>{document.body.removeAttribute("data-dragging-type")}),{once:!0});const x=m.map((e=>(0,a.o_)(e))).filter(l.P),C=x.map((e=>e?.toURL()));if(0===x.length||i.metaKey)return void i.preventDefault();i.dataTransfer.setData("text/x-spotify-context",v),i.dataTransfer.setData("text/uri-list",C.join("\n")),i.dataTransfer.setData("text/plain",C.join("\n")),i.dataTransfer.setData("text/x-spotify-section",`${y||0}`);const S={};x.forEach(((e,t)=>{const n=f[t]??d.O9[e.type];n&&(S[n]??=[],S[n].push(e.toURI()))})),document.body.setAttribute("data-dragging-type",Object.keys(S).join(" ")),Object.entries(S).forEach((([e,t])=>{i.dataTransfer.setData(e,t.join("\n"))})),E?.length===m.length&&i.dataTransfer.setData(d.fl.UIDS,E.join("\n"));const A=(0,r.renderToString)((0,p.jsx)(h,{text:b}));if("function"==typeof i.dataTransfer.setDragImage){const e=function(e){const t=document.createElement("p");t.className=u,t.innerHTML=e;const n=document.createElement("div");return n.className=c,document.body.appendChild(t),document.body.appendChild(n),{element:t,remove(){requestAnimationFrame((()=>{t.parentNode&&t.parentNode.removeChild(t),n.parentNode&&n.parentNode.removeChild(n)}))}}}(A);i.dataTransfer.setDragImage(e.element,0,0),e.remove()}}}}},19065:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var i=n(79474),r=n(74938);const s=({ref:e})=>{const[t,n]=(0,i.useState)(!1);return(0,r.w)({refOrElement:e,observeOnMount:!0,onResize:()=>{e.current&&n(e.current?.offsetWidth<e.current?.scrollWidth||e.current?.offsetHeight<e.current?.scrollHeight)}}),t}},34285:(e,t,n)=>{"use strict";n.d(t,{W:()=>c});var i=n(99754),r=n(83856),s=n(14056),a=n(9440),o=n(50783),l=n(56593);const c=({type:e,uri:t})=>{const n=(0,i.d4)(l.MU),c=(0,i.d4)(l.NR);if(void 0===t)return!1;const u=s.Ru.getLocaleForURLPath(),d=t===a.c.HOME?t:(0,r.o_)(t)?.type;return(0,o.p)({localeFeatureFlag:n,entityFeatureFlag:c,urlLocale:u,entity:d,type:e})}},28758:(e,t,n)=>{"use strict";var i=n(75978),r=n(48088),s=n(93527),a=n(22215),o=n(71507),l=n(55797),c=n(91864),u=n(14056),d=n(40858),m=n(77582),p=n(33237);const h={version:"1.1.64.510",date:new Date(2021,6,20)};function g(){if((0,p.My)()!==m.m.Desktop)return!0;const e=function(){const e=window.navigator.userAgent.match(p.aS);return e?.groups?.version??null}();if(!e)return!0;const t=function(e){const t=h.version.split(".")[2],[,n,i]=e.split(".");if("1"!==n)return new Date;const r=parseInt(t,10),s=parseInt(i,10);if(isNaN(s))return new Date;const a=s-r,o=new Date(h.date.getTime());return o.setDate(o.getDate()+14*a),o}(e);return n=t,((new Date).getTime()-n.getTime())/864e5<30;var n}var f=n(871),b=(n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271),n(83407),n(8297),n(42555),n(19760),n(22168),n(90553));n(33541);n(74089);n(70964);var v=n(88724);v.I_;var y=n(7829);new RegExp(String.raw`hm://collection/([^/]*)/[^/]*/json`);n(82536);n(70869);var _=n(81375);n(43183),n(9908);_.W;n(9244);var E=n(64936);E.XO;n(32618),n(73656);var x=n(9856),C=n.n(x);var S=n(99028);n(31237),n(31473);var A=n(75958),w=n(55525);var I=n(3991);const T="playback";var N=n(68248);var R=n(33657);let k=null;var O=n(94300),P=(n(87512),n(14255)),j=n(83856),L=n(34074),D=n(38996),U=(n(48450),n(57442)),M=n(9440),B=n(45640);new RegExp(String.raw`^q[0-9]+$`);var F=n(67922);P.JW;n(14763),n(98198),n(93314);n(76663),n(46724);var H=n(68102);M.c.UNKNOWN,M.c.ALBUM,M.c.ARTIST;n(68877);var V=n(63192);n(23387);var z=n(17989),G=n(82548);var W=n(21361),K=(n(21386),n(86833));n(36264);n(6960),n(76756);var Y=n(64295),q=(n(76448),n(85445));Y.a;Y.a;n(33197),n(16117),n(49566);var Q=n(3775),$=n(16990);new Q.l("isCurated","query","e4ed1f91a2cc5415befedb85acf8671dc1a4bf3ca1a5b945a6386101a22e28a6",null);var Z=n(4968),X=n(82031),J=n(54361);n(95338);Z.s;Z.s;n(6016);var ee=n(35828);new Q.l("applyCurations","mutation","05b739a3a73091c213385233b9d3ed8a857c2ca29d2eebadb3d04ed12e288697",null),new Q.l("editablePlaylists","query","317a12338fc3f58215cc25053634cb016160572a428abe4c624fa4ac5b7185eb",null);n(9544);var te=n(4370),ne=(n(67768),n(92026));n(89857),n(99614);var ie=n(17393);n(78787);new Q.l("fetchLibraryAlbums","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("areAlbumsInLibrary","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("fetchLibraryArtists","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("areArtistsInLibrary","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("fetchLibraryTracks","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("areTracksInLibrary","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("fetchLibraryShows","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("areShowsInLibrary","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("fetchLibraryAudiobooks","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("fetchLibraryEpisodes","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null),new Q.l("areEpisodesInLibrary","query","beaad62a3d5556d70764cebb98b588e44a0c06ade6136f6972aaca4e91f93807",null);n(16238);var re=n(9344);new RegExp(String.raw`hm://collection/(collection|listenlater|show|artist)/.+/json`);re.w;re.w;n(21052);new Q.l("addToLibrary","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),new Q.l("removeFromLibrary","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),new Q.l("pinLibraryItem","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),new Q.l("unpinLibraryItem","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null);var se=n(87240);new Q.l("libraryV3","query","cb996f38c4e0f98c53e46546e0b58f1ed34ab6c31cd00d17698af6ce2ac0f3af",null);n(8689);n(70968),n(80734);n(86357);new Set(["Writable"]);n(66774);var ae=n(49114);n(81660),n(26472);n(49990);const oe={items:[],totalLength:0,unfilteredTotalLength:0,offset:0,limit:0};new Set([M.c.TRACK,M.c.ALBUM,M.c.ARTIST,M.c.SHOW,M.c.EPISODE,M.c.AUDIOBOOK]);n(96972);var le=n(45482),ce=n(77564),ue=n(65687);n(39104);var de=n(60351),me=function(e){return e.UNSPECIFIED="UNSPECIFIED",e.REQUESTED="REQUESTED",e.PENDING="PENDING",e.DOWNLOADING="DOWNLOADING",e.DOWNLOADED="DOWNLOADED",e.FAILURE="FAILURE",e}(me||{});(0,de.g)(me);n(41164);n(98739),n(51055),n(39361),n(20370);new Q.l("addToPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null),new Q.l("removeFromPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null),new Q.l("moveItemsInPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null);var pe=n(34840);new RegExp(String.raw`hm://playlist/v2/playlist/(?<base62Id>.+)`);pe.N;n(84689);n(72877),n(27631),n(36458);new Q.l("fetchPlaylist","query","91d4c2bc3e0cd1bc672281c4f1f59f43ff55ba726ca04a45810d99bd091f3f0e",null),new Q.l("fetchPlaylistMetadata","query","91d4c2bc3e0cd1bc672281c4f1f59f43ff55ba726ca04a45810d99bd091f3f0e",null),new Q.l("fetchPlaylistContents","query","91d4c2bc3e0cd1bc672281c4f1f59f43ff55ba726ca04a45810d99bd091f3f0e",null);n(36651);var he=n(48475);n(42232);n(69640),n(32625),n(90539);var ge=n(26831),fe=(n(40501),n(39718));new RegExp(String.raw`hm://playlist/v2/user/.+/rootlist`),new RegExp(String.raw`hm://playlist/v2/playlist/.+`);fe.D;var be=n(36657);n(28495);new Uint8Array;var ve=n(70682);n(70048);n(33925);var ye=n(83275);new Q.l("fetchEntitiesForRecentlyPlayed","query","8e4eb5eafa2837eca337dc11321ac285a01f9a056a7ac83f77a66f9998b06a73",null);ye.K5;var _e=n(25936),Ee=n(94745),xe=n(8333);(0,Ee.Tw)(xe.pn).addMiddleware(xe.m4).addMiddleware(_e.li).addMiddleware(xe.If).addMiddleware(xe.u0),new Q.l("queryShowAccessInfo","query","74d14af2761a0be5676474e9bc44ff369022b63312ebe769fa85e63a840dc799",null),new Q.l("queryShowMetadataV2","query","5fb034a236a3e8301e9eca0e23def3341ed66c891ea2d4fea374c091dc4b4a6a",null);var Ce=n(51326);new Q.l("queryBookChapters","query","9879e364e7cee8e656be5f003ac7956b45c5cc7dea1fd3c8039e6b5b2e1f40b4",null),new Q.l("getEpisodeOrChapter","query","9697538fe993af785c10725a40bb9265a20b998ccd2383bd6f586e01303824e9",null),new Q.l("queryPodcastEpisodes","query","108deda91e2701403d95dc39bdade6741c2331be85737b804a00de22cc0acabf",null);n(6366),n(61391),n(67433);var Se=n(69632);n(10910),n(18321),n(6370),n(13213),n(23974),n(34980);n(10229);new Q.l("smartShuffle","query","3384085be84fbf2f855b024f99bc06cded1c0fd71af3a8fb8abb84e9656faba2",null);n(68096);var Ae=n(33831);n(31530),n(2532),n(78014),n(43950),n(48516);n(62288),n(91166),n(37938),n(17359),n(80884);n(67296),n(38743);new Q.l("profileAttributes","query","53bcb064f6cd18c23f752bc324a791194d20df612d8e1239c735144ab0399ced",null);var we=n(53007);n(2418);var Ie=n(19498);n(90542),n(6024);function Te(e){return e.container===m.m.Desktop}var Ne=n(17724),Re=n(32593);class ke{constructor(e){this.spotifyTransport=e}async getDialog(e){const t=await((e,t)=>e.build().withMethod("GET").withHost(v.d).withPath(`/dialog/${t}`).withEndpointIdentifier("/dialog/${uri}").withoutMarket().send())(this.spotifyTransport,e),{r:n,g:i,b:r}=this.getColorRGB(t.body.color);return{backgroundColor:`rgb(${n}, ${i}, ${r})`,providerUrl:t.body.provider_url}}getColorRGB(e){return{r:e>>>16&255,g:e>>>8&255,b:e>>>0&255}}}const Oe=(e,t)=>{let n=[];return{storeAction:i=>{n=i(n),e.setItem(t,JSON.stringify(n))},pullAction:()=>{const i=e.getItem(t);if(e.removeItem(t),n=[],i)try{return JSON.parse(i)}catch(e){return null}return null}}};var Pe=n(9525);var je=n(80559),Le=n(14431);function De(e){return(new TextEncoder).encode(e)}const Ue=async function(e){const t=De(e),n=await globalThis.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((e=>e.toString(16).padStart(2,"0"))).join("")};class Me{static encode=De;static hash=Ue}var Be=n(78408),Fe=n(83015);const He=e=>{const t=e.pathname.split("/"),n=t.pop(),i=t.pop();if(i&&n)return(0,j.o_)(`spotify:${i}:${n}`)?.toURI()};var Ve=n(3074),ze=n.n(Ve);function Ge(){return ze().create().hex.replace(/-/g,"").substr(0,16)}var We=n(3367),Ke=n(10454);const Ye=[{regExp:/^\/$/,pageIdentifier:"/home"},{regExp:/^\/genre/,pageIdentifier:"/genre"},{regExp:/^\/view/,pageIdentifier:"/view"},{regExp:/^\/browse/,pageIdentifier:"/browse"},{regExp:/^\/search/,pageIdentifier:"/search"},{regExp:/^\/upsell/,pageIdentifier:"/upsell"},{regExp:/^\/collection/,pageIdentifier:"/collection"},{regExp:/^\/artist/,pageIdentifier:"/artist"},{regExp:/^\/playlist/,pageIdentifier:"/playlist"},{regExp:/^\/album/,pageIdentifier:"/album"},{regExp:/^\/episode/,pageIdentifier:"/episode"},{regExp:/^\/show/,pageIdentifier:"/show"},{regExp:/^\/user/,pageIdentifier:"/user"},{regExp:/^\/track/,pageIdentifier:"/track"},{regExp:/^\/concerts/,pageIdentifier:"/concerts"},{regExp:/^\/concert\//,pageIdentifier:"/concert"},{regExp:/^\/made-for-you/,pageIdentifier:"/made-for-you"}],qe=(e="")=>{const t=Ye.find((({regExp:t})=>t.test(e)));return t?.pageIdentifier??"unknown"};const Qe={setup(e=document){e.documentElement.classList.add("no-focus-outline"),e.addEventListener("keydown",(t=>{"Tab"===t.key&&e.documentElement.classList.remove("no-focus-outline")}),!0),e.addEventListener("mousedown",(()=>{e.documentElement.classList.add("no-focus-outline")}),!0)}},$e=e=>e.searchParams.has("si")||"1"===e.searchParams.get("go")||"1"===e.searchParams.get("wta_deep_link"),Ze=e=>$e(e),Xe="PWA_DISPLAY_MODE_CHANGED";var Je=n(99676),et=n(28244),tt=n(10397),nt=n(99754),it=n(41318),rt=n(38076),st=n(30797),at=n(79474),ot=n(14494);class lt{constructor(e,t,n){this.currentState=e,this.desktopUBILogger=n,this.sessionDebounceTime=t,lt.checkIfForeground(this.currentState)&&(this.startTime=Date.now())}reportFocusChanged(e){this.reportWindowStateChanged({...this.currentState,focused:e})}reportPiPFocusChanged(e){this.reportWindowStateChanged({...this.currentState,pipFocused:e})}reportVisibilityChanged(e){this.reportWindowStateChanged({...this.currentState,visible:e})}reportWindowStateChanged(e){if(this.currentState===e)return;const t=lt.checkIfForeground(this.currentState),n=lt.checkIfForeground(e);n&&!t?this.startSession():t&&!n&&this.endSession(),this.currentState=e}startSession(){this.startTime=void 0;const e=Date.now();this.timerId=setTimeout((()=>{this.startTime=e,this.desktopUBILogger.logClientGainedFocus()}),this.sessionDebounceTime)}endSession(){this.startTime?this.desktopUBILogger.logClientLostFocus():clearTimeout(this.timerId)}static checkIfForeground(e){return e.visible&&e.focused}registerMainWindowCallbacks(e,t){e.addEventListener("visibilitychange",(()=>{const t=!e.hidden;this.reportVisibilityChanged(t)})),t.addEventListener("blur",(()=>{this.reportFocusChanged(!1)})),t.addEventListener("focus",(()=>{this.reportFocusChanged(!0)}))}registerPiPWindowCallbacks(e){e.addEventListener("blur",(()=>{this.reportPiPFocusChanged(!1)})),e.addEventListener("focus",(()=>{this.reportPiPFocusChanged(!0)}))}}var ct=n(13274);const ut=(0,at.createContext)(void 0),dt=({children:e})=>{const t=(0,ot.s)(),n=(0,a.NC)(Ie.m18),i=(0,at.useMemo)((()=>new lt({visible:!document.hidden,focused:document.hasFocus(),pipFocused:!1},n,t)),[t,n]);return(0,ct.jsx)(ut.Provider,{value:i,children:e})},mt=()=>(0,at.useContext)(ut);var pt=n(6929),ht=n(54712),gt=n(73347),ft=n(51977),bt=n(80964),vt=n(28330),yt=n(66565),_t=n(13781);const Et=()=>(0,V.v8)("sp_key"),xt=e=>{const t=(0,_t.V)(),n=(()=>{const e=Et();return setInterval((()=>{e!==Et()&&window.location.reload()}),5e3)})();t.on(c.TransportEvent.LOGGED_OUT,(()=>{clearInterval(n),e()}))};const Ct=864e5,St=Spicetify.ReactComponent.PlatformProvider=({platform:e,children:t})=>{const n=(0,a.NC)(Ie.QMQ),i=(0,p.Ek)()?"always":void 0,r=new gt.E({defaultOptions:{queries:{gcTime:0,networkMode:i},mutations:{networkMode:i}}});if((0,at.useEffect)((()=>{var e;xt((()=>{(0,yt.k)()})),e=()=>{console.log("Detected hard reload. Deleting persisted cache."),(0,yt.k)()},window.addEventListener("keydown",(t=>{const n=(t.ctrlKey||t.metaKey)&&t.shiftKey&&"R"===t.key.toUpperCase(),i=t.ctrlKey&&"F5"===t.key.toUpperCase();(n||i)&&e()}))}),[]),(0,at.useEffect)((()=>{n||(0,yt.k)()}),[n]),n){const n=(0,yt.Z)(),i=e.getSession(),s=["v1",e.username,i.locale,i.market];return(0,ct.jsx)(vt.t,{client:r,persistOptions:{persister:n,buster:s.join(":"),maxAge:Ct,hydrateOptions:{defaultOptions:{queries:{gcTime:Ct}}},dehydrateOptions:{shouldDehydrateQuery:e=>!!e.meta?.persist&&(0,ft.XS)(e)}},children:t})}return(0,ct.jsx)(bt.Ht,{client:r,children:t})};var At=n(39927),wt=n(4254),It=n(63237),Tt=n(28012);const Nt="main-appShell-container",Rt="main-appShell-sideBar",kt="main-appShell-navItems",Ot="main-appShell-mainContent",Pt="main-appShell-topBar",jt="main-appShell-cards",Lt="main-appShell-cardsHeader",Dt="main-appShell-cardsWrapper",Ut="main-appShell-card",Mt="main-appShell-playbackBar",Bt=(0,at.memo)((function(){return(0,ct.jsxs)("div",{className:Nt,children:[(0,ct.jsx)("div",{className:Rt,children:(0,ct.jsxs)("svg",{className:kt,width:"232",height:"704",viewBox:"0 0 232 704",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("path",{fill:"#000",d:"M0 0h227v704H0z"}),(0,ct.jsx)("path",{d:"M29.887 130.123A8.47 8.47 0 0032.5 124a8.5 8.5 0 10-8.5 8.5 8.454 8.454 0 005.125-1.73l4.401 5.153.76-.649-4.399-5.151zM24 131.5c-4.136 0-7.5-3.364-7.5-7.5s3.364-7.5 7.5-7.5 7.5 3.364 7.5 7.5-3.364 7.5-7.5 7.5zM29.16 158.597l-.913.406 7.797 17.513.914-.406-7.798-17.513zM18.5 176.5h1v-18h-1v18zm6 0h1v-18h-1v18z",fill:"#757575"}),(0,ct.jsx)("path",{fill:"#404040",d:"M53 162h122v11H53zM64 258h95v11H64z"}),(0,ct.jsx)("path",{fill:"#fff",d:"M16 248h32v32H16z"}),(0,ct.jsx)("path",{d:"M38 263h-5v-5h-2v5h-5v2h5v5h2v-5h5v-2z",fill:"#000"}),(0,ct.jsx)("path",{fill:"url(#paint0_linear)",d:"M16 292h32v32H16z"}),(0,ct.jsx)("path",{d:"M37.797 302.727a4.057 4.057 0 00-5.488-.253.558.558 0 01-.31.112.531.531 0 01-.31-.112 4.054 4.054 0 00-5.488.253 4.05 4.05 0 00-1.194 2.883c0 1.089.424 2.113 1.168 2.855l4.462 5.223a1.791 1.791 0 002.726 0l4.435-5.195a4.052 4.052 0 001.195-2.883 4.057 4.057 0 00-1.196-2.883z",fill:"#fff"}),(0,ct.jsx)("path",{fill:"#404040",d:"M64 303h79v11H64z"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 353h142v11H16zM16 395h53v11H16zM16 437h98v11H16zM16 479h143v11H16zM16 521h97v11H16z",opacity:"0.6"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 218h71v11H16z"}),(0,ct.jsx)("path",{d:"M25.501 73.078L34 77.984V91h-6v-7h-5v7h-6V78.024l8.501-4.946zm-.002-1.156L16 77.449V92h8v-7h3v7h8V77.407l-9.501-5.485z",fill:"#616161"}),(0,ct.jsx)("path",{fill:"#404040",d:"M53 78h122v11H53zM53 120h122v11H53z"}),(0,ct.jsx)("defs",{children:(0,ct.jsxs)("linearGradient",{id:"paint0_linear",x1:"0",y1:"308",x2:"32",y2:"340",gradientUnits:"userSpaceOnUse",children:[(0,ct.jsx)("stop",{stopColor:"#450AF5"}),(0,ct.jsx)("stop",{offset:"1",stopColor:"#C4EFD9"})]})})]})}),(0,ct.jsxs)("div",{className:Ot,children:[(0,ct.jsx)("div",{className:Pt,children:(0,ct.jsxs)("svg",{width:"125",height:"95",viewBox:"0 0 125 95",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{x:"0",y:"31",width:"125",height:"32",rx:"16",fill:"#282828"}),(0,ct.jsx)("path",{d:"M992 59c6.627 0 12-5.373 12-12s-5.373-12-12-12-12 5.373-12 12 5.373 12 12 12z",fill:"#404040"}),(0,ct.jsx)("path",{fill:"#404040",d:"M1014 42h66v11h-66z"})]})}),(0,ct.jsxs)("div",{children:[(0,ct.jsxs)("div",{className:jt,children:[(0,ct.jsxs)("div",{className:Lt,children:[(0,ct.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,ct.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,ct.jsxs)("div",{className:Dt,children:[(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]}),(0,ct.jsxs)("div",{className:jt,children:[(0,ct.jsxs)("div",{className:Lt,children:[(0,ct.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,ct.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,ct.jsxs)("div",{className:Dt,children:[(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]}),(0,ct.jsxs)("div",{className:jt,children:[(0,ct.jsxs)("div",{className:Lt,children:[(0,ct.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,ct.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,ct.jsxs)("div",{className:Dt,children:[(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,ct.jsxs)("svg",{className:Ut,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,ct.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]})]})]}),(0,ct.jsxs)("div",{className:Mt,children:[(0,ct.jsx)("div",{children:(0,ct.jsx)("svg",{width:"175",height:"40",viewBox:"0 0 175 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{fill:"#404040",d:"M53 5h122v11H53zM53 23h101v11H53zM0 0h40v40H0z"})})}),(0,ct.jsx)("div",{children:(0,ct.jsxs)("svg",{width:"216",height:"48",viewBox:"0 0 216 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("path",{d:"M12.5 22.8l.7-.8c-1.1-1.3-2.7-2-4.3-2v1c1.3 0 2.6.6 3.5 1.6l.1.2zm7.5 4.7c-1.2 0-2.3-.5-3.2-1.3l-.6.8c1 1 2.4 1.5 3.8 1.5V30l3.5-2-3.5-2v1.5zm0-6V23l3.5-2-3.5-2v1.5c-1.6 0-3.2.7-4.2 2l-3.4 3.9c-.9 1-2.2 1.6-3.5 1.6v1c1.6 0 3.2-.7 4.2-2l3.4-3.9c.9-1 2.2-1.6 3.5-1.6zM61 18.5l-8 4.619V19h-2v10h2v-4.119l8 4.619v-11zM163 20v4.119l-8-4.619v11l8-4.619V30h2V20h-2zM197.5 21h4.5v1.5l3.5-2-3.5-2V20h-4.5c-2.5 0-4.5 2-4.5 4.5 0 .6.1 1.2.4 1.8l.9-.5c-.2-.4-.3-.8-.3-1.3 0-1.9 1.6-3.5 3.5-3.5zm9.1 1.7l-.9.5c.2.4.3.8.3 1.3 0 1.9-1.6 3.5-3.5 3.5H198v-1.5l-3.5 2 3.5 2V29h4.5c2.5 0 4.5-2 4.5-4.5 0-.6-.1-1.2-.4-1.8z",fill:"#fff"}),(0,ct.jsx)("circle",{cx:"108",cy:"24",r:"20",fill:"#fff"}),(0,ct.jsx)("path",{d:"M100 16h16v16h-16V16z",fill:"#fff"}),(0,ct.jsx)("path",{d:"M104.018 30l10.392-6-10.392-6v12z",fill:"#000"})]})}),(0,ct.jsx)("div",{children:(0,ct.jsx)("svg",{width:"99",height:"16",viewBox:"0 0 99 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ct.jsx)("path",{d:"M1 2v5l4.33-2.5L1 2zm0 12h14v-1H1v1zm0-4h14V9H1v1zm7-5v1h7V5H8zM92.945 1.379l-.652.763A7.968 7.968 0 0194.863 8a7.972 7.972 0 01-2.57 5.858l.651.763a8.966 8.966 0 00.001-13.242zm-2.272 2.66l-.651.763a4.484 4.484 0 01-.001 6.397l.651.763a5.48 5.48 0 001.691-3.961c0-1.557-.65-2.962-1.69-3.962zM80 5v6h2.804L88 14V2l-5.196 3H80zm7-1.268v8.536L83.072 10H81V6h2.072L87 3.732zM40 2.5v8c0 .55.45 1 1 1h5v-1h-5v-8h5v-1h-5c-.55 0-1 .45-1 1zM43 14c0 .275.225.5.5.5H46v-1h-2.5c-.275 0-.5.225-.5.5zM55 1.5h-6c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-11c0-.55-.45-1-1-1zm0 12h-6v-11h6v11zm-3-8A.75.75 0 1052 4a.75.75 0 000 1.5zm0 6a2 2 0 100-4 2 2 0 000 4zm0-3c.551 0 1 .449 1 1 0 .551-.449 1-1 1-.551 0-1-.449-1-1 0-.551.449-1 1-1z",fill:"#fff"})})})]})]})}));var Ft=n(5689);const Ht=at.memo((function(){return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Ft.x,{isOpen:!0,isRemoteConfigInitialized:!1,headingMessage:u.Ru.get("error-dialog.generic.header"),message:u.Ru.get("error-dialog.generic.body"),buttonLabel:u.Ru.get("fatal-error.button-label")}),(0,ct.jsx)(Bt,{})]})}));var Vt=n(42338),zt=n(87687);const Gt=()=>{const e=(0,zt.K)(),t=(0,nt.Pj)();return(0,at.useEffect)((()=>navigator&&navigator.mediaSession?(navigator.mediaSession.setActionHandler("previoustrack",(()=>{t.getState().ui.watchFeedViewState.isOpen||e.skipToPrevious()})),navigator.mediaSession.setActionHandler("nexttrack",(()=>{t.getState().ui.watchFeedViewState.isOpen||e.skipToNext()})),navigator.mediaSession.setActionHandler("play",(()=>{t.getState().ui.watchFeedViewState.isOpen||e.resume()})),navigator.mediaSession.setActionHandler("pause",(()=>{t.getState().ui.watchFeedViewState.isOpen||e.pause()})),()=>{navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null),navigator.mediaSession.setActionHandler("play",null),navigator.mediaSession.setActionHandler("pause",null)}):()=>{}),[e,t]),null};var Wt=n(13114),Kt=n(27246),Yt=n(19645),qt=n(33082),Qt=n(41982),$t=n(57506),Zt=n(86412),Xt=n(54260);function Jt(e){return e?.map((({url:e,width:t,height:n})=>({src:e,sizes:`${t}x${n}`})))??[]}function en(e){window.navigator.mediaSession&&(window.navigator.mediaSession.metadata=function(e){return(0,Zt.v)(e)?new window.MediaMetadata({title:e.name,artist:e.artists.map((e=>e.name)).join(u.Ru.getSeparator()),album:e.album.name,artwork:Jt(e.images)}):(0,$t.p)(e)?new window.MediaMetadata({title:e.name,artist:"",album:e.show.name,artwork:Jt(e.images)}):(0,Qt.d)(e)?new window.MediaMetadata({title:e.name,artist:"",album:e.book.name,artwork:Jt(e.images)}):(0,qt.N)(e)?new window.MediaMetadata({title:u.Ru.get("ad-formats.advertisement"),artist:"",album:"",artwork:Jt(e.images)}):(0,Xt.v)(e)||void 0===e?new window.MediaMetadata({title:"",artist:"",album:"",artwork:[]}):(0,B.d)(e)}(e))}const tn=()=>((0,Yt.p)(P.gd.UPDATE,(({data:e})=>en(e?.item??void 0))),null),nn=()=>{const e=(0,nt.d4)(Wt.c)===Kt.K.pip;return!(0,p.Ek)()||e?(0,ct.jsx)(tn,{}):null};var rn=n(96131),sn=n(83989),an=n(2e4),on=n(16687);function ln(e=""){const t=`https://open.spotify.com${e}`;let n="";const i=/^\/\w+\/([a-zA-Z0-9]+)[/\w+]*/.exec(e);i&&(n=i[1]);let r=e,s=e;const a=e.match(/^\/search\/(.*)\/(.*)/);return/^\/genre\//.test(e)||/^\/view\//.test(e)?s="/browse/genres":"/"===e?(s="/browse",r="/browse/featured"):"/browse/charts"===e?s="/charts":"/collection/tracks"===e?s="/collection/songs":"/search"===e?s="/search":a?(s="podcasts"===a[2]?"/search/shows":`/search/${a[2]}`,r=`/search/${a[2]}`):e.match(/\/search\/(?<query>.*)/)?(s="/search",r="/search/results"):"/download"===e?s="/upsell":"/queue"===e?s="/nowplaying/queue":/^\/artist\/[a-zA-Z0-9]+\/related/.test(e)?(r=(0,j.IT)(n).toString(),s="/artist/related"):/^\/artist\/[a-zA-Z0-9]+\/about/.test(e)?(r=(0,j.IT)(n).toString(),s="/artist/about"):/^\/artist\/[a-zA-Z0-9]+\/concerts/.test(e)?(r=(0,j.IT)(n).toString(),s="/artist/concerts"):(0,j.ec)(t)?(r=(0,j.IT)(n).toString(),s="/artist"):(0,j.tb)(t)?(r=(0,j.Ps)(n).toString(),s="/playlist"):(0,j._T)(t)?(r=(0,j.Q0)(n).toString(),s="/album"):(0,j.gH)(t)?(r=(0,j.iM)(n).toString(),s="/episode"):(0,j.WB)(t)?(r=(0,j.Mc)(n).toString(),s="/shows"):(0,j.AP)(t)?(r=(0,j.Qj)(n).toString(),s="/profile"):(0,j.U_)(t)&&(r=(0,j.tR)(n).toString(),s="/track"),{viewUri:r,mappedPageId:s}}var cn=n(83648);const un=()=>"undefined"==typeof window||void 0===window.gtag||void 0===window.google_tag_manager,dn=(e,t,n)=>{un()||window.gtag("event",t,{event_category:e,event_label:n})},mn="#login";class pn extends at.Component{constructor(e){super(e);const{eventSender:t,location:n,isAnonymous:i}=this.props;t.send(fn(n.pathname,i))}shouldComponentUpdate(e){const{eventSender:t,navigationType:n,location:i,isAnonymous:r}=e,{location:s}=this.props,a=i.hash===mn||s.hash===mn;var o;return(0,rn.j)(i,s)||n===sn.rc.Replace||a||(o=i.pathname,un()||window.gtag("pageview",{pathname:o}),t.send(function(e,t=!1){const{viewUri:n,mappedPageId:i}=ln(e),r={page:i,type:"exit",view_uri:n};return t?(0,on.s)(r):(0,an.x)(r)}(s.pathname,r)),t.send(fn(i.pathname,r))),!1}render(){return null}}const hn=(0,nt.Ng)((function(e,t){return{...t,isAnonymous:e.session.isAnonymous}}))((gn=pn,e=>{const t=(0,cn.zy)(),n=(0,cn.Zp)(),i=(0,cn.wQ)(),r=(0,cn.g)();return(0,ct.jsx)(gn,{...e,navigate:n,navigationType:i,location:t,params:r})}));var gn;function fn(e,t=!1){const{viewUri:n,mappedPageId:i}=ln(e),r={page:i,type:"enter",view_uri:n};return t?(0,on.s)(r):(0,an.x)(r)}var bn=n(28275),vn=n(74704),yn=n(30323);const _n=({fetchHomeAd:e,setHomeAd:t,adsSlotConfig:n,fetchRef:i})=>({fetchAndSetHomeAd:(0,at.useMemo)((()=>e&&n?.hpto?async()=>{const n=e();i.current=n;try{t(n);const e=await n;i.current===n&&t(e)}catch(e){console.error("Failed to fetch home ad",e);i.current===n&&t(void 0)}}:void 0),[i,e,t,n])});function En(e){const[t,n]=(0,at.useState)(!1);return(0,at.useEffect)((()=>n(!1)),[e]),{dismissed:t,dismiss(){n(!0)}}}const xn=at.useState;const Cn=()=>({allowSwitchingBetweenHomeAdsAndHpto:(0,a.NC)(Ie.htx)});var Sn=n(91200);function An({fetchHomeAd:e,adsSlotConfig:t,enableLegacyHptoContainerLoader:n}){const{homeAd:i,setHomeAd:r}=function(){const[e,t]=xn();return{homeAd:e,setHomeAd:t}}(),{fetchAndSetHomeAd:s}=(a={fetchHomeAd:e,setHomeAd:r,adsSlotConfig:t},{..._n({...a,fetchRef:(0,at.useRef)()})});var a;return function({enableLegacyHptoContainerLoader:e}={}){const{allowSwitchingBetweenHomeAdsAndHpto:t}=Cn(),n=(0,nt.wA)();(0,at.useEffect)((()=>{!t&&e&&n((0,Sn.T)())}),[e,t,n])}({enableLegacyHptoContainerLoader:n}),{setHomeAd:r,fetchAndSetHomeAd:s,homeAd:i,imageUrlToExtractHomeAdColorFrom:(0,at.useState)(),extractedHomeAdColor:(0,at.useState)(),...En(i)}}const wn=({instance:e,children:t})=>{const{adsSlotConfig:n}=function({getAdsSlotConfig:e}){const[t,n]=(0,at.useState)();return(0,at.useEffect)((function(){e?.().then(n)}),[e]),{adsSlotConfig:t}}({getAdsSlotConfig:e?.config.getAdsSlotConfig}),i=An({adsSlotConfig:n,...e?.home});return(0,ct.jsx)(yn.Cp.Provider,{value:{adsAPI:e||null,homeAds:i},children:t})};var In=n(2281),Tn=n(44602),Nn=n(73893),Rn=n(65742),kn=n(55188),On=n(26481),Pn=n(18811);const jn=({instance:e,children:t})=>(0,ct.jsx)(Pn.q.Provider,{value:e,children:t});var Ln=n(26229),Dn=n(89477),Un=n(12555);const Mn=({instance:e,children:t})=>(0,ct.jsx)(Un.b.Provider,{value:e,children:t});var Bn=n(68602);const Fn=({instance:e,children:t})=>(0,ct.jsx)(Bn.y.Provider,{value:e,children:t});var Hn=n(12258);const Vn=({instance:e,children:t})=>(0,ct.jsx)(Hn.h.Provider,{value:e,children:t});var zn=n(75477),Gn=n(83227);const Wn=({instance:e,children:t})=>(0,ct.jsx)(Gn.M.Provider,{value:e,children:t});var Kn=n(36457);const Yn=(0,at.createContext)(null),qn=({instance:e,children:t})=>(0,ct.jsx)(Yn.Provider,{value:e,children:t}),Qn=()=>{const e=(0,at.useContext)(Yn);if(null===e)throw new Error("useVideoAPI must be used within a VideoAPIProvider");return e};var $n=n(47131);const Zn=(0,at.createContext)(null);const Xn=({instance:e,children:t})=>(0,ct.jsx)(Zn.Provider,{value:e,children:t});var Jn=n(23241);const ei=({instance:e,children:t})=>(0,ct.jsx)(Jn.c.Provider,{value:e,children:t});var ti=n(99226);const ni=({instance:e,children:t})=>(0,ct.jsx)(ti.n.Provider,{value:e,children:t});var ii=n(36307);const ri=({instance:e,children:t})=>(0,ct.jsx)(ii.A.Provider,{value:e,children:t});var si=n(42787);const ai=({instance:e,children:t})=>(0,ct.jsx)(si.B.Provider,{value:e,children:t}),oi=(0,at.createContext)(null);const li=({instance:e,children:t})=>(0,ct.jsx)(oi.Provider,{value:e,children:t});var ci=n(15891);const ui=({request:e,children:t})=>(0,ct.jsx)(ci.j.Provider,{value:{request:e},children:t}),di=(0,at.createContext)(null),mi=({instance:e,children:t})=>(0,ct.jsx)(di.Provider,{value:e,children:t});var pi=n(16323);const hi=({instance:e,children:t})=>(0,ct.jsx)(pi.Z.Provider,{value:e,children:t});var gi=n(76922);const fi=({instance:e,children:t})=>(0,ct.jsx)(gi._.Provider,{value:e,children:t});var bi=n(587),vi=n(85961);const yi=({instance:e,children:t})=>(0,ct.jsx)(vi.R.Provider,{value:e,children:t});var _i=n(5679);const Ei=({instance:e,children:t})=>(0,ct.jsx)(_i.T.Provider,{value:e,children:t});var xi=n(95230);const Ci=({instance:e,children:t})=>(0,ct.jsx)(xi.M.Provider,{value:e,children:t}),Si=({instance:e,children:t})=>(0,ct.jsx)(zt.T.Provider,{value:e,children:t});var Ai=n(6193),wi=n(42529);const Ii=({instance:e,children:t})=>(0,ct.jsx)(wi.w.Provider,{value:e,children:t});var Ti=n(14411);const Ni=({instance:e,children:t})=>(0,ct.jsx)(Ti.S.Provider,{value:e,children:t});var Ri=n(18346);const ki=({instance:e,children:t})=>(0,ct.jsx)(Ri.q.Provider,{value:e,children:t});var Oi=n(67299);const Pi=({instance:e,children:t})=>(0,ct.jsx)(Oi.h.Provider,{value:e,children:t});var ji=n(66772);const Li=({instance:e,children:t})=>(0,ct.jsx)(ji.b.Provider,{value:e,children:t});var Di=n(63843);const Ui=function(e){const{instance:t,children:n}=e;return(0,ct.jsx)(Di.J.Provider,{value:t,children:n})};var Mi=n(34627);const Bi=({instance:e,children:t})=>(0,ct.jsx)(Mi.t.Provider,{value:e,children:t});var Fi=n(68830),Hi=n(70786);const Vi=({instance:e,children:t=!1})=>(0,ct.jsx)(Hi.N.Provider,{value:e,children:t});var zi=n(56307),Gi=n(75891);const Wi=({instance:e,children:t})=>(0,ct.jsx)(Gi.J.Provider,{value:e,children:t}),Ki=(0,at.createContext)(null);const Yi=({instance:e,children:t})=>(0,ct.jsx)(Ki.Provider,{value:e,children:t}),qi=({children:e,providers:t})=>{if(void 0===e)throw new Error("MultiProvider requires children!");return t.reduceRight(((e,t)=>(0,at.cloneElement)(t,void 0,e)),(0,ct.jsx)(at.Fragment,{children:e}))};var Qi=n(99139),$i=n(35187),Zi=n(64395),Xi=n(94710);const Ji=({instance:e,children:t})=>(0,ct.jsx)(Xi.rP.Provider,{value:e,children:t}),er=Spicetify.ReactComponent.PlatformProvider=({platform:e,children:t})=>{const n=[(0,ct.jsx)(Ji,{instance:e}),(0,ct.jsx)($i.D,{}),(0,ct.jsx)(bi.Sx,{instance:e.getLocalStorageAPI()}),(0,ct.jsx)(mi,{instance:e.getIndexedDbAPI()}),(0,ct.jsx)(Tn.P,{instance:e.getActionStoreAPI()}),(0,ct.jsx)(ni,{instance:e.getAuthorizationAPI()}),(0,ct.jsx)(Nn.g,{instance:e.getClipboardAPI()}),(0,ct.jsx)(ri,{instance:e.getConnectAPI()}),(0,ct.jsx)(Vi,{instance:e.getSocialConnectAPI()}),(0,ct.jsx)(kn.U,{instance:e.getControlMessageAPI()}),(0,ct.jsx)(jn,{instance:e.getFacebookAPI()}),(0,ct.jsx)(Ln.x,{instance:e.getFollowAPI()}),(0,ct.jsx)(ui,{request:e.getGraphQLLoader()}),(0,ct.jsx)(hi,{instance:e.getLibraryAPI()}),(0,ct.jsx)(ai,{instance:e.getCurationAPI()}),(0,ct.jsx)(fi,{instance:e.getLocalFilesAPI()}),(0,ct.jsx)(yi,{instance:e.getOfflineAPI()}),(0,ct.jsx)(Dn.J,{platformData:e.getPlatformData()}),(0,ct.jsx)(Si,{instance:e.getPlayerAPI()}),(0,ct.jsx)(Bi,{instance:e.getShuffleAPI()}),(0,ct.jsx)(Ei,{instance:e.getPlaybackAPI()}),(0,ct.jsx)(Fn,{instance:e.getPlayHistoryAPI()}),(0,ct.jsx)(Ii,{instance:e.getPlaylistAPI()}),(0,ct.jsx)(Vn,{instance:e.getPrivateSessionAPI()}),(0,ct.jsx)(Pi,{instance:e.getPubSubAPI()}),(0,ct.jsx)(Li,{instance:e.getRecentlyPlayedAPI()}),(0,ct.jsx)(zn.P,{configuration:e.getRemoteConfiguration()}),(0,ct.jsx)(Wn,{instance:e.getReportAPI()}),(0,ct.jsx)(Ni,{instance:e.getRootlistAPI()}),(0,ct.jsx)(Kn.k,{instance:e.getSegmentsAPI()}),(0,ct.jsx)(Ui,{instance:e.getShowAPI()}),(0,ct.jsx)(Xn,{instance:e.getAudiobooksPremiumConsumptionCapObserverAPI()}),(0,ct.jsx)(Mn,{instance:e.getUpdateAPI()}),(0,ct.jsx)(Yi,{instance:e.getUserAPI()}),(0,ct.jsx)(ki,{instance:e.getProductStateAPI()}),(0,ct.jsx)(qn,{instance:e.getVideoAPI()}),(0,ct.jsx)(wn,{instance:e.getAdManagers()}),(0,ct.jsx)(Ai.s,{instance:e.getPlaylistPermissionsAPI()}),(0,ct.jsx)(Fi.A,{instance:e.getSingAlongAPI()}),(0,ct.jsx)(zi.a,{value:null}),(0,ct.jsx)(ot.V,{instance:e.getUBILogger()}),(0,ct.jsx)(Rn.Z,{instance:e.getCollectionPlatformAPI()}),(0,ct.jsx)(On.m,{instance:e.getEqualizerAPI()}),(0,ct.jsx)(Qi.U.Provider,{value:e.getBuddyFeedAPI()}),(0,ct.jsx)(In.pF,{playerAPI:e.getPlayerAPI()}),(0,ct.jsx)(Zi.tY,{instance:e.getSettingsAPI()}),(0,ct.jsx)($n.UD,{instance:e.getRequestBuilder()}),(0,ct.jsx)(ei,{instance:e.getAudioOutputDevicesAPI()}),(0,ct.jsx)(li,{instance:e.getExternalAccessoryAPI()}),(0,ct.jsx)(Ci,{instance:e.getPlaybackFiltersAPI()}),(0,ct.jsx)(Wi,{instance:e.getUrlDispenserServiceClient()}),(0,ct.jsx)(vn.K,{})];return(0,ct.jsx)(qi,{providers:n,children:t})};var tr=n(12975);const nr=({history:e,children:t})=>{const[n,i]=(0,at.useState)((()=>({location:e.location,action:e.action})));return(0,at.useLayoutEffect)((()=>{e.listen(((e,t)=>i({location:e,action:t})))}),[e]),(0,ct.jsx)(cn.Ix,{location:n.location,navigationType:n.action,navigator:e,children:t})};var ir=n(82089),rr=n(151);let sr=function(e){return e.LOGGING_CATEGORY="l2l",e.LOGGING_CATEGORY_MWP="l2l-mwp",e}({});function ar({isPremiumUser:e,locationSearch:t,navigate:n,logNavigation:i,showDialog:r}){const s=!!(a=t)&&"1"===new URLSearchParams(a).get(sr.LOGGING_CATEGORY);var a;s&&(i(s),function(e,t){if(!e)return;const n=new URLSearchParams(e);n.delete(sr.LOGGING_CATEGORY),t({search:n.toString()},{replace:!0})}(t,n),s&&!e&&r())}var or=n(52415),lr=n(64062);const cr="sp_s2l";var ur=function(e){return e.LOGGING_CATEGORY="s2l",e.LOGGING_CATEGORY_MWP="s2l-mwp",e}(ur||{});const dr=(e,{os:t="",country:n=""})=>{const i={category:"in_app_message",action:"display",label:"download",destination_url:"open.spotify.com",os:t,country:n,context:window.location.search};return e?(0,lr.r)(i):(0,or._)(i)};function mr({locationSearch:e,navigate:t,logDialog:n,showDialog:i}){(function(e){if(!e)return!1;const t=new URLSearchParams(e);return Boolean(t.get(ur.LOGGING_CATEGORY))})(e)&&(n(),function(e,t){if(!e)return;const n=new URLSearchParams(e);n.delete(ur.LOGGING_CATEGORY),t({search:n.toString()},{replace:!0})}(e,t),i())}function pr(){const e=(0,V.v8)(cr);return e?JSON.parse(decodeURIComponent(e)):null}var hr=n(97500),gr=n.n(hr),fr=n(98764),br=n(61080),vr=n(42490),yr=n(60178);const _r="QSYXf8dYOffYgwkMd5eC",Er="wSIDh56L1NbjcQQJ5Vkj",xr="AMqcnfR0iNvTMp3AZpze",Cr="SoFH2YPXp1wuOt2fe2tg",Sr=({errorName:e})=>{const t={cdmerror:{logoLink:vr.S5,header:u.Ru.get("error-page.header.cdmerror"),subtext:u.Ru.get("error-page.subtext.cdmerror"),cta:{title:u.Ru.get("error-page.cta.cdmerror"),url:"https://support.spotify.com/article/web-player-help/?utm_source=open&utm_campaign=drm_error&utm_medium=web"}},max_subscriptions_reached:{header:u.Ru.get("error-page.header.max_subscriptions_reached"),subtext:u.Ru.get("error-page.subtext.max_subscriptions_reached")},artist_videos_not_supported:{header:u.Ru.get("error-page.header.expression_not_supported"),subtext:"",cta:{title:u.Ru.get("error-page.not-found.home"),url:"https://open.spotify.com"}}}[e]||{},n=(0,a.NC)(Ie.rWU);return(0,ct.jsxs)("div",{className:gr()(_r,{"circular-sp-vietnamese":n}),"":"error-page",children:[t.logoLink?(0,ct.jsx)(yr.A,{className:Er,customLink:t.logoLink}):(0,ct.jsx)(yr.A,{className:Er,noLink:!0}),(0,ct.jsxs)("div",{className:xr,children:[t.header&&(0,ct.jsx)(fr.E,{as:"h1",variant:"titleLarge",semanticColor:"textBase",dir:"auto",children:t.header}),t.subtext&&(0,ct.jsx)(fr.E,{as:"h2",variant:"bodyMedium",semanticColor:"textBase",dir:"auto",children:t.subtext})]}),t.cta&&(0,ct.jsx)(br.$,{onClick:()=>{t?.cta?.url&&(window.location.href=t.cta.url)},className:Cr,colorSet:"brightAccent",children:t.cta.title})]})},Ar=Sr;var wr=n(68421);function Ir(){const e=(0,a.NC)(Ie.g3o),t=(0,nt.wA)();return(0,at.useEffect)((()=>{e&&t((0,wr.$h)("dev"))}),[e,t]),null}function Tr(){const e=(0,a.NC)(Ie.SqX),t=(0,nt.wA)();return(0,at.useEffect)((()=>{t((0,wr.ab)(e))}),[e,t]),null}function Nr(){return(0,ct.jsxs)(at.Suspense,{fallback:null,children:[(0,ct.jsx)(Ir,{}),(0,ct.jsx)(Tr,{})]})}var Rr=n(59346),kr=(n(56885),n(58123)),Or=n(4691),Pr=n(25736),jr=n(1264),Lr=n(63842),Dr=n(46697);const Ur=e=>{e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()},Mr=()=>{document.fullscreenElement&&document.exitFullscreen?document.exitFullscreen():document.mozFullScreen&&document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitIsFullScreen&&document.webkitExitFullscreen&&document.webkitExitFullscreen()},Br=()=>!!(document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen);var Fr=n(30232),Hr=n(64658),Vr=n(37693);const zr=at.createContext(null),Gr=({children:e})=>{const t=(0,at.useRef)(null);return(0,ct.jsx)(zr.Provider,{value:t,children:e})};var Wr=n(21727),Kr=n(73358),Yr=n(60832),qr=n(33519),Qr=n(54551),$r=n(36471),Zr=n(70974),Xr=n(58445),Jr=n(67302),es=n(7452);const ts=["spotify:playlist:37i9dQZF1DXc3KPAjGyPdm"];var ns=n(43364),is=n(82052);const rs="main-playbackBarRemainingTime-container",ss=({position:e,duration:t,isPreview:n,semanticColor:i="textSubdued",isFullscreenMode:r=!1})=>{const[s,a]=(0,is.x)(ns.fC,!1),o=(0,at.useCallback)((()=>{n||a(!s)}),[s,a,n]);return(0,ct.jsx)(fr.E,{as:"div","":"playback-duration","data-test-position":e,variant:r?"bodyMedium":"marginal",className:rs,onClick:o,semanticColor:i,children:s?`-${(0,es.f)(t-e)}`:(0,es.f)(t)})};var as=n(87939);const os=[{name:"Anakin",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"7px","--core-color":"white","--edge-glow-color":"rgb(55, 132, 214)","--blur-glow-color":"#2e77d0","--blur-radius":"16px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,as.b)("images/sw_saber_anakin.png")})`,"--saber-hilt-overlap":"5px"}},{name:"Luke",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(135, 220, 90)","--blur-glow-color":"#1ed760","--blur-radius":"16px","--spread-radius":"4px","--saber-hilt-url":`url(${(0,as.b)("images/sw_saber_luke.png")})`,"--saber-hilt-overlap":"5px"}},{name:"Vader",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"10px","--core-color":"white","--edge-glow-color":"rgb(229, 17, 21)","--blur-glow-color":"#cd1a2b","--blur-radius":"20px","--spread-radius":"14px","--saber-hilt-url":`url(${(0,as.b)("images/sw_saber_vader.png")})`,"--saber-hilt-overlap":"6px"}},{name:"Rey",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"8px","--core-color":"white","--edge-glow-color":"rgb(249, 164, 11)","--blur-glow-color":"rgb(253, 175, 33)","--blur-radius":"20px","--spread-radius":"5px","--saber-hilt-url":`url(${(0,as.b)("images/sw_saber_rey.png")})`,"--saber-hilt-overlap":"3px"}},{name:"Leia",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(55, 132, 214)","--blur-glow-color":"#2e77d0","--blur-radius":"16px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,as.b)("images/sw_saber_leia.png")})`,"--saber-hilt-overlap":"2px"}},{name:"Mace",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(90, 22, 167)","--blur-glow-color":"rgb(172, 57, 193)","--blur-radius":"20px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,as.b)("images/sw_saber_mace.png")})`,"--saber-hilt-overlap":"1px"}},{name:"Ahsoka",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"6px","--core-color":"white","--edge-glow-color":"rgb(255,255,255)","--blur-glow-color":"rgb(255,255,255)","--blur-radius":"20px","--spread-radius":"5px","--saber-hilt-url":`url(${(0,as.b)("images/sw_saber_ahsoka1.png")})`,"--saber-hilt-overlap":"-9px","--saber-hilt-width":"100px","--saber-hilt-height":"36px"}}],ls=["spotify:playlist:37i9dQZF1DXaUaRhCgtpCo","spotify:playlist:69BOXIItwwyxTgdz6flzvU","spotify:playlist:37i9dQZF1DWUgUvAPAFxdh"],cs=["official_star_wars","kirbysayshi","hansencc"],us=/Star Wars/i,ds="THX1138",ms=ds.length;function ps({onChange:e}){const t=function(){const[e,t]=(0,at.useState)([]),[n,i]=(0,at.useState)(!1);return(0,at.useEffect)((()=>{const r=r=>{for(e.push(r.key);e.length>ms;)e.shift();e.join("")===ds&&i(!n),t([...e])};return window.addEventListener("keypress",r),()=>{window.removeEventListener("keypress",r)}}),[e,n]),(0,Fr.o)((e=>{const t=e?.context.uri??"",n=e?.context?.metadata?.context_owner??"",i=e?.item??void 0;return!!ls.includes(t)||!!cs.includes(n)||!!(0,Zt.v)(i)&&(us.test(i.name)||us.test(i.album.name))}))||n}(),{next:n,config:i}=function(e){const[t,n]=(0,at.useState)(0);return{next:()=>{n((t+1)%os.length)},config:e?os[t]:null}}(t),r=(0,at.useRef)(e);return r.current=e,(0,at.useEffect)((()=>{r.current(i?.vars??null)}),[i]),i?(0,ct.jsx)("div",{className:"saber-hilt",children:(0,ct.jsx)("button",{"":"saber-hilt-button","aria-label":u.Ru.get("playback-control.a11y.lightsaber-hilt-button",i?.name),className:"saber-hilt__btn",style:i.vars,onClick:n})}):null}const hs=1e3,gs=({isPreview:e,isFullscreenMode:t=!1})=>{const n=(0,a.NC)(Ie.O14),[i,r]=(0,at.useState)(null),s=(0,$r.W)(),o=(0,zt.K)(),l=(0,Fr.o)((e=>e),((e,t)=>e?.duration===t?.duration&&e?.hasContext===t?.hasContext&&e?.restrictions?.canSeek===t?.restrictions?.canSeek)),{seekBackward:c,seekForward:d,seekOffsetMs:m}=(0,Xr.p)(),{videoPlayerMode:p}=(0,Lr.d)(),{spec:h,logger:g}=(0,Jr.r)(Pr.kD,{data:{identifier:p===Kt.K.cinema?Pr.gw.CINEMA:Pr.gw.DESKTOP}}),f=l?.duration??0,b=l?.hasContext??!1,v=l?.restrictions?.canSeek??!1,[y,_,E]=(0,Zr.S)(hs),[x,C]=(0,at.useState)(null),S=null!==x?x:y,A=null!==x?x:y+(n&&!E?hs:0),w=e=>{C(e*f)},I=(S>0||f>0)&&"true"!==l?.item?.metadata?.is_narration,T=(0,es.f)(I?S:NaN),N=(0,es.f)(I?f:NaN),R=(0,nt.d4)((e=>!!e?.ui?.fullscreenMode?.isOpen)),k=(0,Fr.o)((e=>{const t=e?.context.uri??"";return ts.includes(t)})),O=(0,qr.O)(),P=(0,a.NC)(Ie.meE,{loadingValue:!1}),{icon:j,playbackHandleType:L}=(0,Qr.c)();return t!==R?null:(0,ct.jsxs)("div",{className:"playback-bar",children:[(0,ct.jsx)(fr.E,{"":"playback-position",as:"div",variant:t?"bodyMedium":"marginal",className:"playback-bar__progress-time-elapsed",semanticColor:t?"textBase":"textSubdued",children:T}),b?(0,ct.jsx)(ps,{onChange:e=>{r(e)}}):null,(0,ct.jsx)(Yr.z2,{labelText:u.Ru.get("playback-control.a11y.seek-slider-button"),value:A,updateFrequency:hs,offFrequencyUpdate:E,max:f,step:m,"aria-valuetext":u.Ru.get("download.progress-global",T,N),isInteractive:b&&I,onDragStart:w,onDragMove:w,onDragEnd:(e,{wasDraggedBeforeReleased:t})=>{if(C(null),s({intent:"seek",type:"click"}),!v)return;const n=e*f;_(n),o.seekTo(n),t?g.logInteraction(h.progressBarFactory().dragSeekToTime({msToSeekTo:n})):g.logInteraction(h.progressBarFactory().hitSeekToTime({msToSeekTo:n}))},onStepBackward:()=>{if(!v)return;const e=c();_(Math.max(0,Math.min(f,y-e)))},onStepForward:()=>{if(!v)return;const e=d();_(Math.max(0,Math.min(f,y+e)))},saberConfig:i,isPlayingStrangerThings:k,isAttackOnTitanEasterEggActive:O,"":"playback-progressbar",customPlaybackHandle:P?j:void 0,customPlaybackHandleType:L,enableAnimation:n}),(0,ct.jsx)(ss,{position:S,duration:I?f:NaN,isPreview:e,semanticColor:t?"textBase":"textSubdued",isFullscreenMode:t})]})};var fs=n(4958);function bs(){const e=(0,Fr.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri));return(0,$t.p)(e)||(0,Qt.d)(e)?"audio"===e.mediaType||"mixed"===e.mediaType:!!(0,qt.N)(e)&&e.isPodcastAd}var vs=n(57654),ys=n(44518),_s=n(88713);const Es="Psc33HXPyazZYAAr1tgz",xs="VGJz_GOARJ6j02JICvW6",Cs="VpNHGG5ZhoxQ8AqW709S",Ss="P7395UzhjxLUlLZvj5fb",As=function(e){const{children:t,active:n=!1,focus:i=!0,label:r,onClick:s,noBackground:a=!1}=e;return(0,ct.jsx)(_s.Zp,{label:r,children:(0,ct.jsx)("button",{className:gr()(Es,{[Ss]:n,[xs]:a,[Cs]:i}),onClick:s,"aria-label":r,children:t})})};var ws=n(65325),Is=n(31793),Ts=n(82433);const Ns=z.S.SUBTITLE_LANGUAGES_CHANGED;var Rs=n(20273),ks=n(29977),Os=n(53603),Ps=n(95999);const js=({languages:e=[],activeLanguage:t,onSelectLanguage:n,onClose:i})=>{const r=(0,a.NC)(Ie.bFi);return(0,ct.jsx)(Ps.pZ,{value:"subtitles",children:(0,ct.jsxs)(Rs.W,{onClose:i,getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,ct.jsx)(ks.y,{divider:"after",children:u.Ru.get("subtitles-picker.heading")}),(0,ct.jsx)(Os.D,{onClick:()=>{n(null)},"aria-checked":!t,role:"menuitemradio",children:u.Ru.get("subtitles-picker.option_off")}),e.map((e=>(0,ct.jsxs)(Os.D,{onClick:()=>{n(e)},role:"menuitemradio","aria-checked":"string"==typeof t&&e.toLowerCase()===t.toLowerCase(),children:[Ls(e)," ",r?`(${u.Ru.get("subtitles-picker.autogenerated")})`:null]},e)))]})})};function Ls(e){const[t]=e.toLowerCase().split("-");let n="";switch(t){case"zh":n=u.Ru.get("subtitles-picker.option_zh");break;case"cs":n=u.Ru.get("subtitles-picker.option_cs");break;case"nl":n=u.Ru.get("subtitles-picker.option_nl");break;case"en":n=u.Ru.get("subtitles-picker.option_en");break;case"fi":n=u.Ru.get("subtitles-picker.option_fi");break;case"fr":n=u.Ru.get("subtitles-picker.option_fr");break;case"de":n=u.Ru.get("subtitles-picker.option_de");break;case"el":n=u.Ru.get("subtitles-picker.option_el");break;case"hu":n=u.Ru.get("subtitles-picker.option_hu");break;case"id":n=u.Ru.get("subtitles-picker.option_id");break;case"it":n=u.Ru.get("subtitles-picker.option_it");break;case"ja":n=u.Ru.get("subtitles-picker.option_ja");break;case"ms":n=u.Ru.get("subtitles-picker.option_ms");break;case"pl":n=u.Ru.get("subtitles-picker.option_pl");break;case"pt":n=u.Ru.get("subtitles-picker.option_pt");break;case"es":n=u.Ru.get("subtitles-picker.option_es");break;case"sv":n=u.Ru.get("subtitles-picker.option_sv");break;case"tr":n=u.Ru.get("subtitles-picker.option_tr");break;case"vi":n=u.Ru.get("subtitles-picker.option_vi");break;default:n=e}return e.endsWith("-x-cc")&&(n+=" [CC]"),n}const Ds=e=>(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(js,{...e})}),Us=at.memo((function({renderInline:e=!1,noBackground:t,iconSize:n="small"}){const{isSupported:i,availableLanguages:r,preferredLanguage:s,setPreferredLanguage:a}=function(){const e=Qn(),t=e.getCapabilities(),{videoPlayerMode:n}=(0,Lr.d)(),{uri:i}=(0,Ts.f)(),{spec:r,logger:s}=(0,Jr.r)(Is.E,{data:{uri:i??"",identifier:n}}),[a,o]=(0,at.useState)([]),[l,c]=(0,at.useState)(null);return(0,at.useEffect)((()=>{(async()=>{o(await e.getSubtitleLanguages())})();const t=e.getEvents(),n=({data:e})=>o(e);return t.addListener(Ns,n),()=>{t.removeListener(Ns,n)}}),[e,o]),(0,at.useEffect)((()=>{(async()=>{c(await e.getPreferredSubtitleLanguage())})()}),[e,c]),{isSupported:t.hasSubtitleSupport,availableLanguages:a,preferredLanguage:l,setPreferredLanguage:async t=>{e.setPreferredSubtitleLanguage(t),c(t),t?s.logInteraction(r.subtitlesButtonFactory().hitUiReveal()):s.logInteraction(r.subtitlesButtonFactory().hitUiHide())}}}();return i&&0!==r.length?(0,ct.jsx)(ws.b,{renderInline:e,menu:(0,ct.jsx)(Ds,{onSelectLanguage:a,languages:r,activeLanguage:s}),children:(0,ct.jsx)(As,{noBackground:t,active:null!==s,label:u.Ru.get("subtitles-picker.heading"),children:(0,ct.jsx)(ys.j,{size:n})})}):null}));var Ms=n(84346),Bs=n(19437);const Fs="ylcmjHXKpwmez5_bBVgt",Hs="kChcaF3yz3SoL5dZPwEr",Vs="npv-nowPlayingBar-container",zs="npv-nowPlayingBar-controls",Gs="npv-nowPlayingBar-section",Ws="npv-nowPlayingBar-left",Ks="npv-nowPlayingBar-center",Ys="npv-nowPlayingBar-right",qs="npv-exitFullScreenButton-button",Qs="Lgyj1e9c3lrdgVGlMIyV",$s=(0,at.memo)((function({iconSize:e="small",onClick:t}){return(0,ct.jsx)("button",{className:qs,onClick:()=>{t?.(),Mr()},"aria-label":u.Ru.get("npv.exit-full-screen"),title:u.Ru.get("npv.exit-full-screen"),children:(0,ct.jsx)(Bs.b,{size:e})})}));var Zs=n(64593),Xs=n(11283);const Js="main-genericButton-button",ea="main-genericButton-buttonActive",ta="main-genericButton-buttonActiveDot",na=(0,at.forwardRef)(((e,t)=>{const n=e.isActive??!1,i=gr()(Js,{[ea]:n||e.isActiveNoIndicator,[ta]:n},e.className);return(0,ct.jsx)(_s.Zp,{label:e.label,children:(0,ct.jsx)(Xs.H,{ref:t,style:e.style,"aria-label":e.label,size:"small",className:i,disabled:e.disabled,iconOnly:e.icon,onClick:e.onToggle,"":e.testId,"data-active":n.toString(),"aria-pressed":n,"data-restore-focus-key":e.restoreFocusKey})})})),ia=()=>(0,ct.jsx)(Zs.q,{iconSize:24}),ra=({onClick:e,enabled:t})=>{const n=(0,at.useCallback)((()=>{e?.(!t)}),[e,t]);return(0,ct.jsx)(na,{className:Qs,isActive:t,onToggle:n,label:u.Ru.get("web-player.lyrics.title"),testId:"fullscreen-mode-overlay-lyrics-button",icon:ia})},sa=(0,at.memo)(ra);var aa=n(82924),oa=n(9789),la=n(68295);const ca=({item:e,onClick:t})=>(0,Zt.v)(e)?(0,ct.jsx)(la.b,{uri:e.uri,size:aa.t.sm,onClick:t}):(0,$t.p)(e)?(0,ct.jsx)(oa.b,{uri:e.uri,size:aa.t.sm,onClick:t}):null;var ua=n(69018),da=n(53886),ma=n(31350),pa=n(75653),ha=n(16649);const ga=e=>(0,j.o_)(e)?.toURLPath(!0)??"",fa=e=>{const{user:t}=(0,nt.d4)(ma.Ht),{item:n,context:i}=(0,Fr.o)((e=>({item:e?.item,context:e?.context})),((e,t)=>e.item?.uri===t.item?.uri));if(!n||!i)return{title:null,link:null};const r=(0,da.Iu)();if(i.uri===r.uri||i.uri===pa.bV)return{title:r.name,link:ga(pa.bV)};if((0,qt.N)(n)&&!e)return{title:u.Ru.get("ad-formats.advertisement"),link:null};if("queue"===n.provider&&!e)return{title:u.Ru.get("playback-control.queue"),link:ga("spotify:app:queue")};const s=(0,da.$R)(t?.id);if(i.uri===s?.uri)return{title:s?.name,link:ga(s?.uri)};const a=(0,da.n5)(t?.id);return i.uri===a?.uri?{title:a?.name,link:ga(a?.uri)}:(0,ha.HS)(i)?{title:[n.metadata?.station_title,n.metadata?.station_subtitle].filter(Boolean).join(" • "),link:null}:{title:i.metadata?.context_description??n?.name??"",link:ga(i.uri)??ga(n.uri)??""}};var ba=n(95799),va=n(8595),ya=n(24407);const _a=({size:e})=>{const t=(0,Fr.o)((e=>e?.context),((e,t)=>e?.uri===t?.uri)),{title:n}=fa(!0),{canToggleShuffle:i}=(0,ba.V)();return(0,va.O)(t)?(0,ct.jsx)(ya.Y,{size:e,contextUri:t.uri,entityName:n??"",isActive:!0,activationPlacement:"top",offsetDotDistance:!1,withPadding:!0,disabled:!i,withActivation:!1}):(0,ct.jsx)(ya.u,{size:e,shuffleModeConfig:{icon:ua.p},shuffleIsOn:!1,disabled:!0,withPadding:!0})};var Ea=n(50623);const xa=({renderDisabled:e=(()=>null),renderEnabled:t})=>(0,Ea.XR)(!0)?t():e(),Ca=e=>(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(xa,{...e})}),Sa=({isVisible:e,onClick:t,item:n,isLyricsAvailable:i,isLyricsEnabled:r,onLyricsButtonClick:s})=>{const a=bs(),o=(0,zi.f)(),l=(0,Kr.p6)({parentAbsoluteLocation:o||void 0,data:{identifier:Pr.gw.FULLSCREEN}}),c=(0,Pr.kD)({parentAbsoluteLocation:o||void 0,data:{identifier:Pr.gw.FULLSCREEN}}),u=(0,Wr.h9)({parentAbsoluteLocation:o||void 0,data:{identifier:Pr.gw.FULLSCREEN}}),d=(0,ot.s)(),[m]=(0,Zr.S)(1e3,(e=>e.item?.uri===n?.uri)),p=(0,at.useCallback)((e=>{if(n)if(e){const e=l.likeButtonFactory({uri:n.uri}).hitLike({itemToBeLiked:n.uri});d.logInteraction(e)}else{const e=l.likeButtonFactory({uri:n.uri}).hitRemoveLike({itemNoLongerLiked:n.uri});d.logInteraction(e)}}),[n,l,d]),h=(0,at.useCallback)((e=>{if(!n)return;const t=c.speedControlButtonFactory().hitSetPlaybackSpeed({currentlyPlayedItem:n.uri,playbackSpeed:e});d.logInteraction(t)}),[n,d,c]),g=(0,at.useCallback)((e=>{if(e){const e=c.shuffleButtonFactory().hitShuffleEnable();d.logInteraction(e)}else{const e=c.shuffleButtonFactory().hitShuffleDisable();d.logInteraction(e)}}),[d,c]),f=(0,at.useCallback)((e=>{const t=c.seekBackButtonFactory().hitSeekByTime({msSeekedOffset:e});d.logInteraction(t)}),[d,c]),b=(0,at.useCallback)((e=>{const t=c.seekForwardButtonFactory().hitSeekByTime({msSeekedOffset:e});d.logInteraction(t)}),[d,c]),v=(0,at.useCallback)((e=>{if(n)if("pause"===e){const e=c.playPauseButtonFactory().hitPause({itemToBePaused:n.uri});d.logInteraction(e)}else if("resume"===e){const e=c.playPauseButtonFactory().hitResume({itemToBeResumed:n.uri});d.logInteraction(e)}}),[n,d,c]),y=(0,at.useCallback)((e=>{const t=c.repeatButtonFactory().hitRepeatEnable(),n=c.repeatButtonFactory().hitRepeatOneEnable(),i=c.repeatButtonFactory().hitRepeatDisable();switch(e){case D.p.REPEAT_CONTEXT:d.logInteraction(t);break;case D.p.REPEAT_NONE:d.logInteraction(i);break;case D.p.REPEAT_TRACK:d.logInteraction(n);break;default:throw(0,B.k)(e)}}),[d,c]),_=(0,at.useCallback)((()=>{if(!n)return;const e=c.previousButtonFactory().hitSkipToPrevious({itemToBeSkipped:n.uri,positionMs:m,totalContentMs:n.duration.milliseconds||0});d.logInteraction(e)}),[n,d,c,m]),E=(0,at.useCallback)((()=>{if(!n)return;const e=c.previousButtonFactory().hitSkipToPrevious({itemToBeSkipped:n.uri,positionMs:m,totalContentMs:n.duration.milliseconds||0});d.logInteraction(e)}),[n,d,c,m]),x=(0,at.useCallback)((e=>{const t=u.volumeBarFactory().hitSetVolume({newVolumePercentage:e});d.logInteraction(t)}),[d,u]),C=(0,at.useCallback)((e=>{const t=u.volumeBarFactory().dragSetVolume({newVolumePercentage:e});d.logInteraction(t)}),[d,u]),S=(0,at.useCallback)((e=>{if("muted"===e){const e=u.volumeMuteButtonFactory().hitMutePlayback();d.logInteraction(e)}else if("not_muted"===e){const e=u.volumeMuteButtonFactory().hitUnmutePlayback();d.logInteraction(e)}}),[d,u]),A=(0,at.useCallback)((()=>{const e=u.fullscreenButtonFactory().hitUiHide();d.logInteraction(e)}),[d,u]);return(0,ct.jsx)(Ms.s,{active:e,focusTrapOptions:{initialFocus:!1},children:(0,ct.jsx)("div",{className:gr()(Fs,{[Hs]:e}),onClick:t,children:(0,ct.jsxs)("div",{className:Vs,"":"fullscreen-mode-controls",children:[(0,ct.jsx)(gs,{isPreview:!1,isFullscreenMode:!0}),(0,ct.jsxs)("div",{className:zs,children:[(0,ct.jsx)("div",{className:gr()(Gs,Ws),children:n&&(0,ct.jsx)(ca,{item:n,onClick:p})}),(0,ct.jsxs)("div",{className:gr()(Gs,Ks),children:[a&&(0,ct.jsx)(fs.w0,{iconSize:24,onClick:h}),!a&&(0,ct.jsx)(Ca,{renderEnabled:()=>(0,ct.jsx)(_a,{size:"medium"}),renderDisabled:()=>(0,ct.jsx)(fs.uP,{iconSize:"medium",onClick:g})}),a&&(0,ct.jsx)(fs.hC,{iconSize:"medium",onClick:f}),(0,ct.jsx)(fs.dQ,{iconSize:"medium",onClick:_}),(0,ct.jsx)(fs.xJ,{iconSize:"large",onClick:v}),(0,ct.jsx)(fs.$K,{iconSize:"medium",onClick:E}),a&&(0,ct.jsx)(fs.v3,{iconSize:"medium",onClick:b}),!a&&(0,ct.jsx)(fs.s_,{iconSize:"medium",onClick:y})]}),(0,ct.jsxs)("div",{className:gr()(Gs,Ys),children:[(0,ct.jsx)(Us,{iconSize:"medium",renderInline:!0,noBackground:!0}),!a&&i&&(0,ct.jsx)(sa,{enabled:r,onClick:s}),(0,ct.jsx)(vs.M,{onVolumeBarClick:x,onVolumeBarDrag:C,onToggleMuteClick:S}),(0,ct.jsx)($s,{iconSize:"medium",onClick:A})]})]})]})})})},Aa=Spicetify.GraphQL.Definitions["queryFullscreenMode"]=new Q.l("queryFullscreenMode","query","5aa77fcd9a5b65f829d8dee4000703ff1a7ff68e813c60999c0b2dce754240e2",null),wa=()=>{const e=(0,a.NC)(Ie.WYm,{loadingValue:!1});return(0,Fr.o)(Se.A3)||e};function Ia(e){return(0,Zt.v)(e)?{uri:e.uri,name:e.name,creatorName:e.artists[0]?.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,$t.p)(e)?{uri:e.uri,name:e.name,creatorName:e.show.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,Qt.d)(e)?{uri:e.uri,name:e.name,creatorName:e.book.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,qt.N)(e)?{uri:e.uri,name:e.title??"",creatorName:e.advertiser??"",coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,Xt.v)(e)||void 0===e?void 0:(0,B.d)(e)}function Ta(e){const t=e?.context.metadata?.context_description,n=e?.context.uri||void 0,i=e?.positionAsOfTimestamp??void 0,r=e?.timestamp,s=e?.isPaused,a=e?.restrictions.canPause,o=e?.restrictions.canResume;return{contextName:t,contextUri:n,position:i,timestamp:r,isPaused:s,canPause:a,canResume:o}}const Na=e=>{const{request:t}=(0,at.useContext)(ci.j),[n,i]=(0,at.useState)(void 0);return(0,at.useEffect)((()=>{let n=!0;return e&&async function(e,t){return e(Aa,{artistUri:t}).then((e=>{if("Artist"===e?.data?.artistUnion.__typename)return e.data.artistUnion.visuals.headerImage?.sources[0]?.url})).catch((()=>{}))}(t,e).then((e=>{n&&i(e)})),()=>{n=!1}}),[e,t]),n};var Ra=n(98678);const ka=at.lazy((async()=>{const{ArtistNpv:e}=await n.e(4151).then(n.bind(n,21251));return{default:e}})),Oa=at.memo((function(){const e="/lyrics"===(0,cn.zy)().pathname,[t,n]=(0,at.useState)(e),i=(0,zt.K)(),r=(0,$r.W)(),s=(0,Fr.o)((e=>e),((e,t)=>(0,Vr.a)(e?.restrictions,t?.restrictions)&&e?.item?.uri===t?.item?.uri&&e?.isPaused===t?.isPaused)),a=s?.item??void 0,o=s?.nextItems??[],l=s?.playbackId??void 0,c=(0,Zt.v)(a)?a.artists[0]?.uri:void 0,u=a?.images,d=Na(c);let m=(0,Dr.z)(u?.[0]?.url);(()=>{const e=(0,nt.wA)();(0,at.useEffect)((()=>{const t=()=>{Br()||e((0,et.rF)())};return window.addEventListener("fullscreenchange",t),document.addEventListener("fullscreenchange",t),window.addEventListener("fullscreenChange",t),document.addEventListener("fullscreenChange",t),window.addEventListener("webkitfullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),window.addEventListener("mozfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),()=>{window.removeEventListener("fullscreenchange",t),document.removeEventListener("fullscreenchange",t),window.removeEventListener("fullscreenChange",t),document.removeEventListener("fullscreenChange",t),window.removeEventListener("mozfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),window.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t)}}),[e]),(0,at.useEffect)((()=>{const e=e=>{"Escape"===e.key&&Mr()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[e])})();const p=(0,ot.s)(),h=(0,Or.A)({data:{identifier:"full-screen",uri:a?.uri||""}}),g=(0,Pr.kD)({parentAbsoluteLocation:h.getAbsoluteLocation(),data:{identifier:Pr.gw.FULLSCREEN}}),{position:f,contextName:b,contextUri:v,isPaused:y,canResume:_,canPause:E,timestamp:x}=Ta(s),{isOverlayVisible:C,showOverlay:S}=(()=>{const[e,t]=(0,at.useState)(!1),n=(0,at.useRef)(null),i=(0,Ra.YQ)((()=>{null!==n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{t(!1)}),2500),t(!0)}),100,{leading:!0});return(0,at.useEffect)((()=>()=>{null!==n.current&&clearTimeout(n.current)}),[]),{isOverlayVisible:e,showOverlay:i}})(),A=function(e){const t=Ia(e);return(0,Zt.v)(e)||(0,$t.p)(e)||(0,Qt.d)(e)||(0,qt.N)(e)?{...t,duration:e.duration.milliseconds,mediaType:(n=e.mediaType,"video"===n||"mixed"===n?"video":"audio")}:(0,Xt.v)(e)||void 0===e?void 0:(0,B.d)(e);var n}(a),w=Ia(o.length>0?o[0]:void 0),I=(0,Se.A3)(s),T=(0,at.useCallback)((e=>{if(e.target===e.currentTarget)if(r({type:"click",intent:y?"play":"pause"}),y&&_){const e=g.playPauseButtonFactory().hitResume({itemToBeResumed:a?.uri||""});p.logInteraction(e),i.resume()}else if(!y&&E){const e=g.playPauseButtonFactory().hitPause({itemToBePaused:a?.uri||""});p.logInteraction(e),i.pause()}}),[E,_,y,a?.uri,p,g,r,i]),N=(0,at.useCallback)((e=>{n(e)}),[n]),{data:R,loading:k}=(0,jr.I)(A?.uri,u),O=!!R?.hasLyrics,P=R?.hasLyrics?R.providerLyricsId:void 0;m=O?R.colors.background:m;const j=(0,at.useMemo)((()=>function(e,t,n){if(e&&n&&n.hasLyrics)return{status:t?"loading":"success",content:{provider:n.provider,syncType:n.syncType,lines:n.lyrics.map((e=>({timestamp:Number(e.start),text:e.text})))}}}(t,k,R)),[t,k,R]),L=(0,Xi.vh)(),D=(0,at.useCallback)(((e,t,n)=>L.send((0,kr.W)({lyrics_format:"fullscreen",track_uri:e,provider:t,provider_lyrics_id:P,sync_type:n,playback_id:l}))),[l,P,L]);return(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)("div",{onPointerMove:S,onFocus:S,children:(0,ct.jsx)(Hr.r,{spec:h,children:(0,ct.jsx)(ka,{currentTrack:A,position:f??0,timestamp:x??0,nextTrack:w,backgroundColor:m,backgroundImageUrl:d,contextName:b,contextUri:v,playbackIsPaused:y,contextMetadataVisible:!I||C,trackMetadataVisible:!I||C,lyrics:j,onLyricsReport:D,controlsVisible:!1,progressBarVisible:!I||C,CustomProgressBar:void 0,CustomPlaybackControls:(0,ct.jsx)(Sa,{isVisible:C,onClick:T,item:a,isLyricsAvailable:O,isLyricsEnabled:t,onLyricsButtonClick:N})})})})})})),Pa=at.memo((function({videoRef:e}){const t=(0,at.useContext)(zr),n=wa(),{setVideoPlayerUIFlag:i}=(0,Lr.d)(),r=(0,nt.wA)(),s=(0,nt.d4)((e=>e.ui.fullscreenMode.isOpen));return(0,at.useEffect)((()=>{if(!n)return i(Kt.n.fullscreen,!1),r((0,et.DH)()),void Mr();const e=Br();!s&&e&&(i(Kt.n.fullscreen,!1),r((0,et.DH)()),Mr())}),[i,n,s,r]),(0,ct.jsxs)("div",{ref:t,children:[(0,ct.jsx)("div",{ref:e}),n&&s?(0,ct.jsx)(Oa,{}):null]})})),ja="SHOW_BILLBOARD_AD_VIEW",La="HIDE_BILLBOARD_AD_VIEW",Da="MINIMIZE_BILLBOARD_AD_VIEW",Ua="CLICK_BILLBOARD_AD_VIEW",Ma="IMAGE_LOADED_BILLBOARD_AD_VIEW",Ba="ERROR_BILLBOARD_AD_VIEW",Fa="MANAGER_MINIMIZE_BILLBOARD_AD_VIEW",Ha="FINISH_BILLBOARD_AD_VIEW",Va=()=>({type:Ha}),za=()=>({type:La});var Ga=n(22269);const Wa=({fill:e="#fff",width:t=32,height:n=32})=>(0,ct.jsxs)("svg",{width:t,height:n,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:[(0,ct.jsx)("title",{children:u.Ru.get("close")}),(0,ct.jsx)("path",{d:"M31.098 29.794L16.955 15.65 31.097 1.51 29.683.093 15.54 14.237 1.4.094-.016 1.508 14.126 15.65-.016 29.795l1.414 1.414L15.54 17.065l14.144 14.143",fill:e,fillRule:"evenodd"})]}),Ka="I0UigpTrBFkGuoWMpQcq",Ya="jxzPm9gLS9LiyU5veW3H",qa="bYPDBcU3uU79vGF1pQBg",Qa="pWvyF1E7_RN2INjZfCUd",$a="E4UTzaVPMhPYyLm1z_eb",Za="ReyA3uE3K7oEz7PTTnAn",Xa="vSC7et_G7LUWnvTARtHq",Ja="xFb8C_XRObIFocIOPuTj";const eo=(0,nt.Ng)((e=>({isOpen:e.ads.billboard?.isOpen??!1,imageLoaded:e.ads.billboard?.imageLoaded??!1,isMinimized:e.ads.billboard?.isMinimized??!1,companionSrc:e.ads.billboard?.data.companionSrc,disclaimer:e.ads.billboard?.data.disclaimer,mediaSrc:e.ads.billboard?.data.mediaSrc,clickUrl:e.ads.billboard?.data.clickUrl,isPreview:e.ads.billboard?.data.isPreview})),(e=>({hide:()=>e({type:Da}),adClick:()=>e({type:Ua}),onImageLoaded:()=>e({type:Ma}),onError:()=>e({type:Ba})})))((({companionSrc:e,clickUrl:t,mediaSrc:n,adClick:i,hide:r,isOpen:s,imageLoaded:a,onImageLoaded:o,onError:l,isMinimized:c,isPreview:d})=>{const m=()=>{i(),r()},p=(0,cn.Zp)(),h=(0,Fr.o)((e=>e?.context.uri));return(0,at.useEffect)((()=>{s&&function(e,t,n){const i=new Image;i.addEventListener("load",t),i.addEventListener("error",n),i.src=e}(n,o,l)}),[s,n,o,l,d,h,p]),s&&a?c?(0,ct.jsx)("div",{"":"billboard-minimized",className:Za,children:e&&(0,ct.jsx)("a",{draggable:!1,className:Xa,href:t,onClick:i,children:(0,ct.jsx)("img",{draggable:!1,className:Ja,alt:u.Ru.get("ad-formats.advertisement"),src:e})})}):(0,ct.jsx)(Ga.A,{isOpen:s,shouldCloseOnEsc:!1,onRequestClose:r,contentLabel:u.Ru.get("ad-formats.advertisement"),children:(0,ct.jsxs)("div",{id:"view-billboard-ad",className:gr()(Ka,{ready:s}),children:[(0,ct.jsx)("a",{draggable:!1,tabIndex:-1,className:Ya,href:t,onClick:m,children:u.Ru.get("ad-formats.advertisement")}),(0,ct.jsx)("button",{"aria-label":u.Ru.get("ad-formats.dismissAd"),className:qa,onClick:r,children:(0,ct.jsx)(Wa,{width:18,height:18,fill:"currentColor"})}),(0,ct.jsx)("a",{draggable:!1,"":"billboard-image-link",className:Qa,href:t,onClick:m,children:(0,ct.jsx)("img",{draggable:!1,className:$a,alt:u.Ru.get("ad-formats.advertisement"),src:n})})]})}):null})),to="SET_LEADERBOARD_ELEMENT",no="NAVIGATION_CHANGE_LEADERBOARD_AD",io="SET_LEADERBOARD_ENABLED",ro="SET_LEADERBOARD_DISABLED",so=()=>({type:ro});var ao=n(49764);const oo="main-leaderboardComponent-container",lo=()=>{const e=(0,nt.wA)(),t=(0,nt.d4)((e=>e.ads.leaderboard.isEnabled)),n=(0,nt.d4)(ao.V0),i=(0,a.NC)(Ie.TId),r=(0,cn.zy)();(0,at.useEffect)((()=>{e({type:no})}),[e,r.pathname]);const s=(0,at.useCallback)((t=>{null!==t&&e({type:to,element:t})}),[e]);return!t||n&&i?null:(0,ct.jsx)("div",{children:(0,ct.jsx)("div",{"":"test-ref-div",className:oo,ref:s})})};var co=n(23689),uo=n(94018),mo=n(60516);const po="L30NtFiBvBcyDh05qn_u",ho=({onMinimizeButtonClick:e})=>(0,ct.jsx)("div",{className:gr()(po),children:(0,ct.jsx)(br.$,{"aria-label":u.Ru.get("ad-formats.dismissAd"),colorSet:"overMedia",iconOnly:Bs.b,onClick:e,size:"small"})}),go="kXSXn_Z7IEMg4aBcxMxv",fo="jiQC5HCfeb1xWySe1ohl",bo="aR68x7OIyGWzTgdtxZ6f",vo="CjNrWN36pkl9Lp6zxCxZ",yo="s_lztNXw0tC6osoQothn",_o="jjbJ5Q9ZsVfTztsPORcH",Eo="qzozxI4yeNGBWgbzmCa2",xo="UyHglighrJl18cZ6Rywg",Co=({advertiser:e,isMinimized:t,onMinimizeButtonClick:n,onVideoTakeoverClick:i,refCallback:r,href:s,isVerticalVideo:o=!1})=>{const l=gr()(go,{[fo]:o}),c=gr()(vo,{[yo]:o}),d=(0,a.NC)(Ie.okt,{loadingValue:!1})?".VTO__modal-slot":".Root__modal-slot";return(0,ct.jsx)(Ga.A,{className:c,animation:{overlay:{base:_o,beforeClose:xo,afterOpen:Eo},closeTimeoutMs:300},isOpen:!t,parentSelector:()=>document.querySelector(d),shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:u.Ru.get("ad-formats.advertisement"),children:(0,ct.jsxs)("div",{className:l,children:[(0,ct.jsx)("a",{"aria-label":u.Ru.get("ad-formats.video-ad-overlay.cta-button",{advertiser:e}),className:bo,"":"new-ads-npv-video-takeover-link",href:s,onClick:i,ref:r,target:"_blank"}),(0,ct.jsx)(ho,{onMinimizeButtonClick:n})]})})};var So=n(78776),Ao=n(36689);const wo="fFoN1cMJLIJo0k_vgNyw",Io="Lk23rM5uSl5mgEXroOPH",To="yJ2Sz652eyijqIrRrwpJ",No="ZPVxrOnQOQc_5KDCNgcI",Ro="f14LfcDx_wvogzdXzoq9",ko="QMMTQfEw3AIHFf4dTRp3",Oo="Hj1B5D7WgG4aZkU8meAp",Po="nPKDEvIoCzySBR24pZiN",jo="dqP_KBPyAygbxKtY3k3w",Lo=({setOuterContainer:e,npbVideoAdRef:t})=>{const n=(0,nt.wA)(),i=(0,Fr.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri)),r=(0,qt.N)(i)?i.url??void 0:void 0,s=((0,qt.N)(i)?i.advertiser:void 0)||"Advertiser",o=(0,nt.d4)((e=>e?.ads?.vto?.isMinimized)),l=(0,qt.N)(i)&&"portrait"===i.videoOrientation,c=(0,at.useRef)(),d=(0,cn.zy)(),m=(0,uo.w)(i),p=(0,a.NC)(Ie.GEz);(0,at.useEffect)((()=>{c.current?n((0,So.iB)()):c.current=!0}),[n,d.pathname]);const[h,g]=(0,at.useState)(null);return(0,at.useEffect)((()=>(n((0,So.MW)()),()=>{n((0,So.Oc)())})),[n]),(0,at.useEffect)((()=>{o?setTimeout((()=>{null!==h&&e(t.current)}),200):null!==h&&e(h)}),[e,t,o,h]),m&&p?(0,ct.jsx)(Co,{advertiser:s,href:r?(0,mo.H)(r):void 0,isMinimized:o,isVerticalVideo:l,onVideoTakeoverClick:()=>{n((0,So.i2)(Ao.ee.CLICKED,Ao.Wh.VIDEO_TAKEOVER,Ao.Lv.VIDEO_PLAYER))},onMinimizeButtonClick:()=>{n((0,So.Oc)()),n((0,So.i2)(Ao.ee.COLLAPSED,Ao.Wh.MINIMIZE_BUTTON,Ao.Lv.VIDEO_PLAYER))},refCallback:e=>g(e)}):(0,ct.jsx)(Ga.A,{className:Oo,animation:{overlay:{base:ko,beforeClose:jo,afterOpen:Po},closeTimeoutMs:300},isOpen:!o,parentSelector:()=>document.querySelector(".Root__modal-slot"),shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:u.Ru.get("ad-formats.advertisement"),children:(0,ct.jsxs)("div",{className:wo,children:[(0,ct.jsxs)("div",{className:To,children:[(0,ct.jsx)(fr.E,{semanticColor:"textBase",variant:"bodySmallBold",className:No,children:u.Ru.get("ad-formats.advertisement")}),(0,ct.jsx)("button",{"aria-label":u.Ru.get("ad-formats.dismissAd"),className:Ro,onClick:()=>{n((0,So.Oc)()),n((0,So.i2)(Ao.ee.COLLAPSED,Ao.Wh.MINIMIZE_BUTTON,Ao.Lv.VIDEO_PLAYER))},children:(0,ct.jsx)(co.M,{semanticColor:"textBase",size:"small"})})]}),(0,ct.jsx)("a",{"":"video-takeover-link",href:r?(0,mo.H)(r):void 0,onClick:()=>{n((0,So.i2)(Ao.ee.CLICKED,Ao.Wh.VIDEO_TAKEOVER,Ao.Lv.VIDEO_PLAYER))},ref:e=>g(e),className:Io})]})})},Do=({setOuterContainer:e,npbVideoAdRef:t})=>(0,nt.d4)((e=>e?.ads?.vto?.isHidden))?null:(0,ct.jsx)(Lo,{setOuterContainer:e,npbVideoAdRef:t});var Uo=n(79864);var Mo=n(64933);const Bo=e=>{const t=(()=>{const[e]=(0,at.useState)((()=>{const e=document.createElement("div");return e.classList.add("VideoPlayer__container"),e}));return e})();if((0,at.useLayoutEffect)((()=>{null!==e&&null!==t&&e.insertBefore(t,e.firstChild)}),[e,t]),t&&t.firstChild instanceof HTMLVideoElement){const e=t.firstChild;return`${e.videoWidth}/${e.videoHeight}`}return"16/9"};var Fo=n(10098),Ho=n(60181),Vo=n(14693);function zo(){const e=(0,nt.wA)(),t=(0,Fo.XB)();return{enterPipVideoMode:(0,at.useCallback)((()=>{e((0,Vo.R2)(Kt.K.pip))}),[e]),leavePipVideoMode:(0,at.useCallback)((()=>{t===Ho.Z.NowPlayingView&&e((0,Vo.R2)(Kt.K.npv))}),[e,t])}}const Go=z.S.PICTURE_IN_PICTURE_CHANGED;function Wo(e,t){(0,at.useLayoutEffect)((()=>{t.current&&e(t.current)}),[t,e])}var Ko=n(41615),Yo=n(9776);function qo(){const[e,t]=(0,at.useState)(!1),n=(0,at.useRef)(null),i=(0,Ra.YQ)((()=>{n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{t(!1)}),1500),t(!0)}),100,{maxWait:100,leading:!0}),r=(0,at.useCallback)((e=>{t(e),i.cancel()}),[i]);return(0,at.useEffect)((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{isControlsVisible:e,setIsControlsVisible:r,handleKeepViewVisible:i}}var Qo=n(85886),$o=n(62294),Zo=n(34608),Xo=n(43720),Jo=n(91172),el=n(99025),tl=n(45541),nl=n(90713);const il="/lyrics";function rl({referrer:e,onChange:t}){const n=(0,cn.zy)(),i=(0,cn.Zp)(),r=n.pathname.startsWith(il),{setVideoPlayerUIFlag:s}=(0,Lr.d)(),a=()=>{r||(s(Kt.n.cinema,!1),i(il,{state:{referrer:e}}),t?.(il))},o=()=>{r&&(i(-1),t?.(null))};return{isActive:r,showLyrics:a,hideLyrics:o,toggleLyrics:()=>{r?o():a()}}}const sl="MBzbwWcyfbqSftBtnn3g",al=({noBackground:e,iconSize:t="small"})=>{const{setVideoPlayerUIFlag:n,videoPlayerUIFlags:i,videoPlayerMode:r}=(0,Lr.d)(),s=r===Kt.K.cinema,{uri:o}=(0,Ts.f)(),{hideLyrics:l}=rl({referrer:"cinema-mode-toggle"}),c=(0,a.NC)(Ie.Au4),{spec:d,logger:m}=(0,Jr.r)(Is.E,{data:{uri:o??"",identifier:Kt.K.cinema}});if(!c||r===Kt.K.fullscreen)return null;return(0,ct.jsx)("div",{className:gr()({[sl]:s}),children:(0,ct.jsx)(As,{noBackground:e,active:s,label:s?u.Ru.get("video-player.default-view"):u.Ru.get("video-player.cinema-mode"),onClick:()=>{s?m.logInteraction(d.cinemaModeButtonFactory().hitUiHide()):m.logInteraction(d.cinemaModeButtonFactory().hitUiReveal()),l(),n(Kt.n.cinema,!i.cinema)},children:s?(0,ct.jsx)(tl.Q,{size:t}):(0,ct.jsx)(nl.C,{size:t})})})};var ol=n(12278),ll=n(88040),cl=n(88120);const ul="fuONPgUcYO2bf15HunlX",dl=({noBackground:e,iconSize:t="small",uri:n})=>{const i=(0,nt.d4)(cl.c),r=i===Kt.K.pip,{enterPipVideoMode:s,leavePipVideoMode:a}=zo(),{item:o}=(0,ll.L)()??{},{isActive:l}=(0,Jo.D)({item:o}),c=(0,Fr.o)(Se.A3),{spec:d,logger:m}=(0,Jr.r)(Is.E,{data:{uri:n,identifier:i}}),p=(0,ol.u)({parentAbsoluteLocation:d.pipButtonContainerFactory().getAbsoluteLocation()});if(!c)return null;let h=u.Ru.get("video-player.default-view");return r||(h=l?u.Ru.get("miniplayer.close"):u.Ru.get("miniplayer.open-in")),(0,ct.jsx)("div",{className:gr()({[ul]:r}),children:(0,ct.jsx)(As,{noBackground:e,active:r,label:h,onClick:()=>{Br()&&Mr(),r?(a(),m.logInteraction(p.pipButtonFactory({uri:n}).hitUiHide())):(s(),p.pipButtonFactory({uri:n}).hitUiReveal())},children:(0,ct.jsx)(Qo.F,{size:t})})})},ml="aHe1QDDI5hmYWAKf4MoR",pl="DtWKCk0YYDlZT11U1niL",hl="RTSxo7zS2ozOeg4gnC2c",gl="ZcIaDrsIojjWZ_Xf_6iN",fl="pLL2Ok4QckLG8GAWriCB",bl=[{transform:"scale(1)",opacity:0},{transform:"scale(1.3)",opacity:1},{transform:"scale(1.6)",opacity:0}],vl=[{transform:"scale(1)",opacity:1},{transform:"scale(1)",opacity:1}],yl={duration:500,easing:"ease-out"},_l=function({visible:e,className:t,darkOverlayOnHover:n=!1,animatePlayPauseButtonOnClick:i=!0}){const{videoPlayerMode:r}=(0,Lr.d)(),s=(0,nt.wA)(),a=wa(),o=Qn(),l=(0,at.useContext)(zr),c=r===Kt.K.cinema,d=(0,el.j)(),m=(0,nt.d4)((e=>e.platform.isDesktop)),{item:p}=(0,ll.L)()??{},h=p?.uri??"",{isActive:g,onClick:f,showButton:b}=(0,Jo.D)({item:p}),v=o.getCapabilities().hasPipSupport,y=(0,zt.K)(),_=(0,Fr.o)((e=>e),((e,t)=>(0,Vr.a)(e?.restrictions,t?.restrictions)&&e?.item?.uri===t?.item?.uri&&e?.isPaused===t?.isPaused)),{isPaused:E,canResume:x,canPause:C}=Ta(_),{spec:S,logger:A,UBIFragment:w}=(0,Jr.r)(Is.E,{data:{uri:h,identifier:Kt.K.npv}}),I=(0,at.useRef)(null),T=(0,at.useRef)(null),N=(0,at.useCallback)((()=>{let e=null;E&&x?(y.resume(),A.logInteraction(S.playButtonFactory().hitPlay({itemToBePlayed:h})),e=I):!E&&C&&(y.pause(),A.logInteraction(S.playButtonFactory().hitPause({itemToBePaused:h})),e=T),i&&e?.current?.animate&&e.current.animate(d?vl:bl,yl)}),[C,x,E,A,y,S,h,i,d]),R=(0,at.useMemo)((()=>c?null:b?(0,ct.jsx)(As,{label:g?u.Ru.get("miniplayer.close"):u.Ru.get("miniplayer.open-in"),onClick:f,active:g,children:(0,ct.jsx)(Qo.F,{size:"small"})}):m&&v?(0,ct.jsx)(dl,{uri:h}):null),[g,c,m,v,f,b,h]);return(0,ct.jsxs)(w,{spec:S,children:[(0,ct.jsxs)("div",{className:gr()(ml,t,{[fl]:e}),children:[(0,ct.jsx)(Us,{renderInline:!0}),(0,ct.jsx)(al,{}),R,a&&(0,ct.jsx)(As,{label:u.Ru.get("npv.full-screen"),onClick:()=>{l?.current&&(Ur(l.current),s((0,et.f)()))},children:(0,ct.jsx)($o.L,{size:"small"})})]}),n&&(0,ct.jsx)("div",{tabIndex:-1,className:gr()(pl,{[fl]:e})}),(0,ct.jsxs)("div",{className:hl,tabIndex:-1,onClick:N,onKeyDown:()=>{},"aria-label":E?u.Ru.get("play"):u.Ru.get("pause"),role:"button",children:[(0,ct.jsx)("div",{className:gl,ref:I,children:(0,ct.jsx)(Zo.x,{size:"xlarge",width:48})}),(0,ct.jsx)("div",{className:gl,ref:T,children:(0,ct.jsx)(Xo.B,{size:"xlarge",width:48})})]})]})},El="kJKEEG391Pf_PLzwG2Vm",xl="gVnOoWHXwLnTNK2RRIKg",Cl=({cinemaModeRef:e,setVideoContainer:t})=>{const n=(0,at.useRef)(null),{nowPlayingBarRef:i}=(0,Yo.JT)(),{videoPlayerUIFlags:r,setVideoPlayerUIFlag:s}=(0,Mo.d)();Wo(t,n);const{isControlsVisible:a,handleKeepViewVisible:o}=qo();return(0,at.useEffect)((()=>{const e=e=>{"Escape"===e.key&&s(Kt.n.cinema,!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[s,r.cinema]),e.current?i.current?(0,Ko.createPortal)((0,ct.jsxs)("div",{ref:n,className:El,onMouseMove:o,onFocus:o,"":"video-player-cinema",children:[(0,ct.jsx)(Ms.s,{containerElements:[e.current,i.current],active:!0,focusTrapOptions:{allowOutsideClick:!0}}),(0,ct.jsx)(_l,{visible:a,className:xl})]}),e.current):(console.error("No ref found for nowPlayingBar!"),null):(console.error("No container found for cinema video!"),null)};var Sl=n(65790);const Al=({setVideoContainer:e})=>{const t=(0,at.useRef)(null);Wo(e,t);const n=window.documentPictureInPicture?.window,i=n?.document.getElementById("document-pip-main-container"),r=Qn();return(0,at.useEffect)((()=>(n&&r.setWindow(n),()=>{r.setWindow(window)})),[n,r]),i?(0,Ko.createPortal)((0,ct.jsx)("div",{ref:t,"":"video-player-document-pip",className:Sl.A.videoPlayerContainer}),i):(0,ct.jsx)(ct.Fragment,{})},wl=at.memo((function({setVideoContainer:e,fullscreenModeRef:t}){const n=(0,at.useRef)(null);return Wo(e,n),t.current?(0,Ko.createPortal)((0,ct.jsx)("div",{"":"video-player-fullscreen",className:gr()("VideoFullscreenMode"),children:(0,ct.jsx)("div",{className:"VideoFullscreenMode__video-container",ref:n})}),t.current):(console.error("No container found for fullscreen video!"),null)}));var Il=n(42360);const Tl="_2r290M0vbnbQGfhLbvq",Nl=({setVideoContainer:e})=>{const t=(0,at.useRef)(null),n=(0,Il.v7)();Wo(e,t);const i=(0,at.useRef)(!0);(0,at.useEffect)((()=>(i.current=!0,()=>{i.current=!1})));const r=document.getElementById("VideoPlayerNpb_ReactPortal");return null===r?null:(0,Ko.createPortal)((0,ct.jsx)("div",{ref:t,hidden:!1,className:Tl,style:{position:"relative"},onMouseDown:e=>{t.current&&n.current&&(e.stopPropagation(),e.preventDefault())},"":"video-player-npb"}),r)};var Rl=n(67593),kl=n(74484);const Ol="H2mo30Z5kNiGZbZ9U2Nu",Pl="ZOXaRqMrEfQv7u8LG7IQ",jl="TbZ7pNOfpFK2FmnFuQcW",Ll="BRt_JFU0qTnWIGCaWWJY",Dl=({isVerticalVideo:e,visible:t})=>{const n=(0,nt.wA)(),i=gr()(jl,{[Ll]:t}),r=gr()(Ol,{[Pl]:e});return(0,ct.jsx)("div",{className:r,children:(0,ct.jsx)("div",{className:i,children:(0,ct.jsx)(br.$,{"aria-label":u.Ru.get("npv.full-screen"),colorSet:"overMedia",iconOnly:$o.L,onClick:e=>{e.stopPropagation(),e.preventDefault(),n((0,So.MW)()),n((0,So.i2)(Ao.ee.EXPANDED))},size:"small"})})})},Ul="ouiL5cH1WduxtprQ0Iig",Ml=({isControlsVisible:e,item:t})=>{const n=(0,nt.wA)(),i="portrait"===t.videoOrientation,r=(0,qt.N)(t)?t.url??void 0:void 0;return r?(0,ct.jsx)("a",{style:{zIndex:2},href:r,onClick:()=>{n((0,kl.q5)(Rl.c.VIDEO_PLAYER,Rl.V.AD_NPV))},"":"video-player-ad-wrapper",children:(0,ct.jsx)(Dl,{visible:e,isVerticalVideo:i})}):(0,ct.jsx)(Dl,{visible:e,isVerticalVideo:i})},Bl=({setVideoContainer:e,isPlayingAd:t=!1})=>{const n=(0,at.useRef)(null),i=(0,Il.v7)(),r=(0,Fr.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri));Wo(e,n);const s=(0,at.useRef)(!0);(0,at.useEffect)((()=>(s.current=!0,()=>{s.current=!1})));const{isControlsVisible:a,setIsControlsVisible:o,handleKeepViewVisible:l}=qo(),c=document.getElementById("VideoPlayerNpv_ReactPortal");return null===c?null:(0,Ko.createPortal)((0,ct.jsx)("div",{ref:n,hidden:!1,className:Ul,style:{position:"relative"},onMouseLeave:()=>{o(!1)},onMouseDown:e=>{n.current&&i.current&&(e.stopPropagation(),e.preventDefault())},onMouseMove:l,onFocus:l,"":"video-player-npv",children:t?(0,ct.jsx)(Ml,{isControlsVisible:a,item:r}):(0,ct.jsx)(_l,{visible:a,darkOverlayOnHover:!0})}),c)},Fl=({setVideoContainer:e,videoContainerRef:t})=>(Wo(e,t),(0,ct.jsx)("div",{ref:t,style:{display:"none"}})),Hl=({npbVideoAdRef:e,cinemaModeRef:t,fullscreenModeRef:n})=>{const i=(0,nt.wA)(),{videoPlayerMode:r}=(0,Mo.d)(),s=(0,at.useRef)(null),a=(0,at.useRef)(),[o,l]=(0,at.useState)(null),c=(0,nt.d4)((e=>e.platform.isDesktop)),{isPlayingVideo:u,isPlayingAd:d,playbackId:m}=(0,Fr.o)((e=>{const t=e?.item??void 0;return{isPlayingVideo:(0,Se.A3)(e),isPlayingAd:(0,qt.N)(t),playbackId:e?.playbackId}})),p=(0,nt.d4)((e=>e?.ads?.vto?.isMinimized));if(Bo(o),(()=>{const{isPlayingVideo:e,contextUri:t}=(0,Fr.o)((e=>({isPlayingVideo:(0,Se.A3)(e),contextUri:e?.context.uri}))),{setVideoPlayerUIFlag:n}=(0,Lr.d)(),i=(0,Uo.v)((({connectionStatus:e})=>e===q.zP.CONNECTED||e===q.zP.CONNECTING));(0,at.useEffect)((()=>{const t=e&&!i;n(Kt.n.videoAvailable,t)}),[e,i,n,t])})(),(()=>{const e=(0,Fr.o)(Se.A3),{setVideoPlayerUIFlag:t}=(0,Lr.d)();(0,at.useEffect)((()=>{const e=()=>{t(Kt.n.fullscreen,Br())};return window.addEventListener("fullscreenchange",e),document.addEventListener("fullscreenchange",e),window.addEventListener("fullscreenChange",e),document.addEventListener("fullscreenChange",e),window.addEventListener("webkitfullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),window.addEventListener("mozfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),()=>{window.removeEventListener("fullscreenchange",e),document.removeEventListener("fullscreenchange",e),window.removeEventListener("fullscreenChange",e),document.removeEventListener("fullscreenChange",e),window.removeEventListener("mozfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),window.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e)}}),[e,t])})(),(()=>{const e=Qn(),{videoPlayerMode:t}=(0,Mo.d)(),{leavePipVideoMode:n}=zo(),i=t===Kt.K.pip;(0,at.useEffect)((()=>{const t=e.getEvents(),r=({data:e})=>{!e&&i&&n()};return t.addListener(Go,r),()=>{t.removeListener(Go,r)}}),[e,i,n]),(0,at.useEffect)((()=>{const t=document.pictureInPictureElement;i&&!t&&e.setPip?.(!0),!i&&t&&e.setPip?.(!1)}),[e,i])})(),function(){const e=Qn(),{videoPlayerMode:t}=(0,Lr.d)(),[n,i]=(0,at.useState)(!document.hidden),[r,s]=(0,at.useState)(!1);(0,at.useEffect)((()=>{const e="visibilitychange",t=()=>{i(!document.hidden)};return document.addEventListener(e,t),()=>{document.removeEventListener(e,t)}}),[e,i]),(0,at.useEffect)((()=>{const i=!(t===Kt.K.pip||t===Kt.K.documentPip||t!==Kt.K.none&&n),a=e.getCapabilities().hasMinimizeBitrateSupport&&i;r!==a&&(e.setMinimizeBitrate(a),s(a))}),[e,t,n,r,s])}(),u&&d&&a.current!==m&&(i((0,So.MW)()),a.current=m),c&&u&&d&&r!==Kt.K.pip&&!p)return(0,ct.jsx)(Do,{npbVideoAdRef:e,setOuterContainer:l});switch(r){case Kt.K.fullscreen:return(0,ct.jsx)(rt.s,{children:(0,ct.jsx)("div",{ref:s,children:(0,ct.jsx)(wl,{fullscreenModeRef:n,setVideoContainer:l})})});case Kt.K.cinema:return(0,ct.jsx)(rt.s,{children:(0,ct.jsx)("div",{ref:s,children:(0,ct.jsx)(Cl,{cinemaModeRef:t,setVideoContainer:l})})});case Kt.K.npv:return(0,ct.jsx)(rt.s,{children:(0,ct.jsx)("div",{ref:s,children:(0,ct.jsx)(Bl,{isPlayingAd:d,setVideoContainer:l})})});case Kt.K.documentPip:return(0,ct.jsx)(rt.s,{children:(0,ct.jsx)("div",{ref:s,children:(0,ct.jsx)(Al,{setVideoContainer:l})})});case Kt.K.nowPlayingBar:return(0,ct.jsx)(rt.s,{children:(0,ct.jsx)("div",{ref:s,children:(0,ct.jsx)(Nl,{setVideoContainer:l})})});case Kt.K.none:default:return(0,ct.jsx)("div",{ref:s,children:(0,ct.jsx)(Fl,{videoContainerRef:s,setVideoContainer:l})})}};var Vl=n(55342);const zl=({children:e})=>(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(Vl.M,{children:e})});var Gl=n(66535),Wl=n(29439);const Kl="WuHfzknUICVJtLZJU_30",Yl="FL2TkYu6_lxeXmfUTwx4",ql="Q63kq6vgG3LPQAi93zXP",Ql="BLcZj2U0cGry7c3uk5qQ",$l="wCeOtCjqvDK0rflTnpuK",Zl="dz7vC5O_M9gcvqxCqOnc",Xl="zqGag8YfKcWwtZEqvghN",Jl=e=>{const{allowHTML:t,isError:n,message:i,onClose:r,isNotice:s,isNotSupported:a,isCookie:o,render:l=null}=e,c=l?l():i;(0,at.useEffect)((()=>{const e=({key:e})=>{"Escape"===e&&r()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[r]);const d=(0,at.useCallback)((e=>{e.preventDefault(),window.location.reload()}),[]),m=(0,at.useMemo)((()=>({__html:i??""})),[i]);return(0,ct.jsx)(Gl.A,{children:(null!==i||null!==l)&&(0,ct.jsx)(Wl.A,{classNames:"feedbackBar-animation",timeout:{enter:250,exit:200},children:(0,ct.jsxs)("div",{className:gr()(Kl,{[Yl]:n,[Ql]:s,[ql]:a,[$l]:o}),"aria-live":"polite",children:[(0,ct.jsxs)("div",{className:Zl,children:[t?(0,ct.jsx)("span",{dangerouslySetInnerHTML:m}):c," ",n&&(0,ct.jsx)("a",{draggable:!1,className:Xl,"aria-label":u.Ru.get("error.reload"),onClick:d,children:u.Ru.get("error.reload")})]}),(0,ct.jsx)(Xs.H,{size:"small",iconOnly:co.M,onClick:r,"aria-label":"Close",semanticColor:"textBase"})]})})})};var ec=n(51654),tc=n(33560);const nc="dz_h98rH9nZCwfPdnKgr",ic="rAfV2jB_HMM9Xtr0Rqvn",rc="XkXPpDRWozMF6G8_GlLQ",sc=at.memo((function(e){const{handleClick:t}=e,n=(0,nt.d4)(tc.q),i=u.Ru.get("pta.bottom-bar.title"),r=u.Ru.get("fta.bottom-bar.subtitle"),s=u.Ru.get("fta.sign-up-free");return(0,ct.jsxs)("div",{className:nc,onClick:t,"":"signup-bar",children:[(0,ct.jsxs)("div",{className:ic,children:[(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmallBold",children:i}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMedium",dangerouslySetInnerHTML:{__html:n?u.Ru.get("fta.bottom-bar.subtitle-two"):r}})]}),(0,ct.jsx)(br.$,{colorSet:"invertedLight",onClick:t,className:rc,children:n?u.Ru.get("mwp.d2p.modal.cta"):s})]})}));var ac=n(1876),oc=n(50042),lc=n(55327),cc=n(22354);var uc=n(94859),dc=n(61862);const mc="UWuPbrFbZar0lIcBFH31",pc="wFkvSGFYuw6rhfwWWYWC",hc=()=>{const{currentSession:e}=(0,oc.D)(),t=(0,nt.d4)((({session:e})=>e.user?.id)),{logJamNameClick:n}=(()=>{const{spec:e,logger:t}=(0,Jr.r)(cc.V,{});return{logJamNameClick:(0,at.useCallback)((()=>{const n=e.jamNameFactory().hitUiNavigate({destination:(0,j.K7)().toURI()});t.logInteraction(n)}),[t,e])}})(),{openQueue:i}=(0,lc.R)(),r=(0,at.useCallback)((()=>{n(),i()}),[n,i]);if(!e?.active)return null;const s=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId)),a=(0,dc.t)(e,t,{userFirst:!0});return(0,ct.jsxs)("div",{className:mc,children:[(0,ct.jsx)(uc.g,{users:a,dropShadow:!0}),(0,ct.jsx)(ac.Y,{className:pc,onClick:r,semanticColor:"textBase",tabIndex:0,standalone:!0,children:(0,ct.jsx)(fr.E,{variant:"bodySmallBold",children:u.Ru.get("web-player.social-connect.session-info.title",{host:s?.displayName??""})})})]})};var gc=n(68970),fc=n(90532),bc=n(83486),vc=n(17015),yc=n(2789);const _c=()=>{const e=(0,nt.d4)((e=>e.platform.isDesktop)),t=(0,fc.b)(),n=t?.terminalType===gc.FI.HEADPHONES,{isPlayingRemotely:i,remoteDeviceName:r,isConnected:s}=(0,Uo.v)((e=>{const t=(0,bc.V)(e);return{isPlayingRemotely:t.isPlayingRemotely,remoteDeviceName:t.remoteDevice?.name,isConnected:"connected"===t.connectionStatus}}),Vr.a),a=(0,at.useMemo)((()=>e?u.Ru.get("web-player.connect.device-picker.this-computer"):u.Ru.get("web-player.connect.device-picker.this-web-browser")),[e]),o=(0,at.useMemo)((()=>{if(t)return e?u.Ru.get("web-player.connect.device-picker.from-this-computer",{device_name:t.name}):u.Ru.get("web-player.connect.device-picker.from-this-web-browser",{device_name:t.name})}),[e,t]);return r&&i&&s?{deviceName:r,playingFrom:r}:n?t?.transportType===gc.Yg.BLUETOOTH?{deviceName:t.name,playingFrom:a,formattedDeviceName:o}:{deviceName:"Wired Connection",playingFrom:a}:{deviceName:a,playingFrom:a}},Ec=(0,at.createContext)(null),xc=()=>{const e=(0,Fo.Ev)(In.$S.DEVICE_PICKER_BUTTON_CLICK),{isActive:t,panelSend:n}=(0,Fo.AI)(Ho.Z.DevicePicker),i=(0,at.useCallback)((e=>n({type:In.$S.DEVICE_PICKER_BUTTON_CLICK,...!t&&{interactionId:e}})),[n,t]);return(0,at.useMemo)((()=>({togglePanel:i,isActive:t,canTogglePanel:e})),[i,t,e])},Cc=()=>{const e=(0,at.useContext)(Ec),{togglePanel:t,isActive:n}=xc();if((0,a.NC)(Ie.VUN))return{isPickerOpen:n,triggerRef:{current:null},toggleDevicePicker(e){t(e)}};if(null===e)throw new Error("Trying to use 'DevicePickerTriggerContext' without 'DevicePickerTriggerContextProvider'!");return e},Sc="gqYYMz8DkhaT3e44LcHQ",Ac="VX33mI2V_jRA7hRBI9_0",wc=()=>{const{deviceName:e,formattedDeviceName:t}=_c(),{spec:n,logger:i}=(0,Jr.r)(yc.s,{}),{triggerRef:r,toggleDevicePicker:s,isPickerOpen:a}=Cc(),o=(0,at.useCallback)((()=>{const e=n.activeDeviceButtonFactory(),{interactionId:t}=i.logInteraction(a?e.hitUiHide():e.hitUiReveal());s(t)}),[a,i,n,s]);return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(vc.C,{size:"small",className:Ac,role:"presentation",semanticColor:"essentialBase","":"bt-icon"}),(0,ct.jsx)(ac.Y,{component:"button",onClick:o,ref:r,className:Sc,children:(0,ct.jsx)(fr.E,{variant:"bodySmallBold","aria-live":"polite",semanticColor:"textBase",children:t??e})})]})};var Ic=n(14205);const Tc=({remoteDeviceName:e,remoteDeviceType:t,connectionStatus:n,omitConnectionStateText:i=!1})=>{const{spec:r,logger:s}=(0,Jr.r)(yc.s,{}),{triggerRef:a,toggleDevicePicker:o,isPickerOpen:l}=Cc(),c=(0,Ic.$A)(t,n),d=n===q.zP.CONNECTED?u.Ru.get("web-player.connect.bar.connected-state",{device_name:e}):u.Ru.get("web-player.connect.bar.connecting-state",{device_name:e});return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(c,{size:"small",className:Ac,role:"presentation",semanticColor:"essentialBase"}),(0,ct.jsx)(ac.Y,{component:"button",onClick:()=>{const e=r.activeDeviceButtonFactory(),{interactionId:t}=s.logInteraction(l?e.hitUiHide():e.hitUiReveal());o(t)},ref:a,className:Sc,children:(0,ct.jsx)(fr.E,{variant:"bodySmallBold","aria-live":"polite",semanticColor:"textBase",children:i&&n===q.zP.CONNECTED?e:d})})]})},Nc="nQSM_BrSHJ4Cp3XSuLOF",Rc=()=>(0,ct.jsxs)("svg",{width:"1",height:"16",viewBox:"0 0 1 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"separator",className:Nc,children:[(0,ct.jsx)("g",{id:"separator",clipPath:"url(#clip0_491_88335)",children:(0,ct.jsx)("rect",{id:"Rectangle 111112858",width:"1",height:"16",rx:"0.5",fill:"var(--essential-base)"})}),(0,ct.jsx)("defs",{children:(0,ct.jsx)("clipPath",{id:"clip0_491_88335",children:(0,ct.jsx)("rect",{width:"1",height:"16",fill:"white"})})})]}),kc="main-connectBar-connectBar",Oc="main-connectBar-connected",Pc="main-connectBar-connecting",jc=function(){const{isPlayingRemotely:e,connectionStatus:t,remoteDeviceName:n,remoteDeviceType:i}=(0,Uo.v)((e=>{const t=(0,bc.V)(e);return{isPlayingRemotely:t.isPlayingRemotely,connectionStatus:t.connectionStatus,remoteDeviceName:t.remoteDevice?.name,remoteDeviceType:t.remoteDevice?.type}}),Vr.a),{currentSession:r}=(0,oc.D)(),s=Boolean(r?.active),o=(0,fc.b)(),l=o?.terminalType===gc.FI.HEADPHONES&&o.transportType===gc.Yg.BLUETOOTH,c=e&&n&&i,u=(0,a.NC)(Ie.VUN)&&!e&&l;if(!c&&!s&&!u)return null;const d=t===q.zP.CONNECTED||s||u,m=t===q.zP.CONNECTING&&!s&&!u;return(0,ct.jsxs)("div",{className:gr()(kc,{"encore-bright-accent-set":d,[Oc]:d,[Pc]:m}),children:[s&&(0,ct.jsx)(hc,{}),s&&(c||u)&&(0,ct.jsx)(Rc,{}),c&&(0,ct.jsx)(Tc,{connectionStatus:t,remoteDeviceName:n,remoteDeviceType:i,omitConnectionStateText:s}),u&&(0,ct.jsx)(wc,{})]})},Lc=()=>(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(jc,{})});var Dc=n(8309),Uc=n(88958),Mc=n(65911);const Bc=({className:e="",disabledClassName:t="",onClick:n})=>{const i=wa(),r=(0,at.useContext)(zr),s=(0,Fr.o)((e=>e?.hasContext??!1)),a=(0,nt.wA)(),o=!s,l=(0,at.useCallback)((async()=>{r?.current&&(n?.(!0),a((0,et.f)()),Ur(r.current))}),[a,r,n]),c=gr()(e,{[t]:o});return i?(0,ct.jsx)(na,{onToggle:l,className:c,icon:$o.L,label:u.Ru.get("npv.full-screen"),disabled:o,testId:"fullscreen-mode-button"}):null},Fc=(0,at.memo)(Bc);var Hc=n(90942),Vc=n(40823),zc=n(88255),Gc=n(30710),Wc=n(62163);const Kc={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",lyricsCinemaVisible:"sgQuNaOh5Eu6vnzh3eoh",nonDisplayedArea:"KJNUWtMTBWtQrmsas64b",Container:"F3qS5Fne4ECzEWyFeJ5S",Controls:"dS_1_x4lBrx_vX9AMg6Q",Content:"mC8gFZzy9ZRO5c61MeuO"};function Yc(){const e=(0,nt.d4)(Wc.u),t=(0,nt.wA)(),{setYlxSidebarState:n}=(0,zc.$)(),{mainLandmarkRef:i,lyricsCinemaRef:r}=(0,Yo.JT)(),{isActive:s,panelSend:a}=(0,Fo.AI)(Ho.Z.NowPlayingView);return{mode:e,setMode:(0,at.useCallback)((e=>{e===Vc.YU.cinema&&s?(r.current?.classList.add(Kc.lyricsCinemaVisible),i.current?.classList.add(Kc.nonDisplayedArea),n(zc.fX.COLLAPSED),a(In.$S.NPV_BUTTON_CLICK)):(r.current?.classList.remove(Kc.lyricsCinemaVisible),i.current?.classList.remove(Kc.nonDisplayedArea),s||a(In.$S.NPV_BUTTON_CLICK)),t((0,Gc.gh)(e))}),[t,a,s,r,i,n])}}var qc=n(61428),Qc=n.n(qc),$c=n(22792);const Zc="Cffu0OWzcoGaMWSXoGsq",Xc="L5PLOiBhdFNjs4FEu8ln",Jc=Date.now()-6912e5,eu=at.memo((function({children:e}){const[t,n]=(0,at.useState)(!1),[i,r]=(0,is.x)("npv-onboarding-dismissed-time",Jc),[s,a]=(0,is.x)("npv-onboarding-never-show-again",!1),o=(0,at.useCallback)((()=>{$c.h.set((()=>({triggerId:null,triggerAction:null}))),r(Date.now()),a(t)}),[t,r,a]),l=(0,at.useCallback)((e=>{const t=e.currentTarget.checked;n(t)}),[]),c=Qc()(u.Ru.get("web-player.now-playing-view.onboarding.description"),{transform:{b:e=>(0,ct.jsx)(fr.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:e.children})}});return(0,ct.jsx)($c.U,{id:"npv-onboarding",className:Zc,options:{isCTA:!0,getTitle:()=>u.Ru.get("web-player.now-playing-view.onboarding.title"),getDescription:()=>c,primaryButtonText:()=>u.Ru.get("web-player.now-playing-view.onboarding.dismiss"),checkboxText:()=>u.Ru.get("web-player.now-playing-view.onboarding.do-not-show-again"),placement:"top-end",tippyWrapperClassName:Xc,shouldHideOnOutsideClick:()=>!1},onPrimaryButtonClick:o,onCheckboxClick:l,children:e})})),tu=In.$S.NPV_BUTTON_CLICK,nu=({onClick:e})=>{const{isActive:t,panelSend:n}=(0,Fo.AI)(Ho.Z.NowPlayingView),i=(0,Fo.Ev)(tu),{mode:r,setMode:s}=Yc(),{item:a}=(0,Fr.o)((e=>({item:e?.item})),((e,t)=>e.item?.uri===t.item?.uri)),o=!a||!i;return(0,ct.jsx)(eu,{children:(0,ct.jsx)(na,{isActive:t,disabled:o,onToggle:()=>{e?.(!t),n(tu),r===Vc.YU.cinema&&s(Vc.YU.npv)},icon:Hc.d,label:u.Ru.get("web-player.now-playing-view.label"),testId:"control-button-npv",restoreFocusKey:Ho.Z.NowPlayingView})})};var iu=n(81228);const ru=at.memo((function(e){const{onClick:t}=e,n=(0,cn.zy)(),i=(0,Fr.o)((e=>e?.item?.uri)),r="/lyrics"===n.pathname;return(0,iu.f)(i).hasLyrics||r?(0,ct.jsx)(na,{className:e.className,isActive:r,onToggle:t,label:u.Ru.get("web-player.lyrics.title"),testId:"lyrics-button",icon:Zs.q}):null})),su=({onClick:e,className:t})=>{const{isAnonymous:n}=(0,nt.d4)(ma.Ht),{toggleLyrics:i}=rl({onChange:e,referrer:"now_playing_bar"}),r=(0,Fr.o)((e=>!!e?.item?.metadata?.["segment.index"]));return n||r?null:(0,ct.jsx)(ru,{onClick:i,className:t})};var au=n(90876),ou=n(66615),lu=n(3351),cu=n(61412),uu=n(20044),du=n(41078);const mu=({uri:e,to:t,children:n,onDrop:i,onNavigate:r,className:s})=>{const[a,o]=(0,at.useState)(!1),l=(0,at.useRef)(null),c=(0,cn.Zp)(),u=(0,nt.wA)(),d=(0,ou.t)(),m=(0,lu.g)(),p=(0,zt.K)(),h=function(e){const t=(0,j.o_)(e),n=(0,nt.d4)(ma.F6);switch(t?.type){case j.NQ.PLAYLIST:case j.NQ.PLAYLIST_V2:{let e;if((0,j.iw)(t)&&(e=t.username),n&&e===n)return[uu.Ay[j.NQ.TRACK],uu.Ay[j.NQ.LOCAL],uu.Ay[j.NQ.ALBUM]];break}case j.NQ.COLLECTION:return[uu.Ay[j.NQ.TRACK],uu.Ay[j.NQ.ALBUM],uu.Ay[j.NQ.ARTIST],uu.Ay[j.NQ.PLAYLIST],uu.Ay[j.NQ.PLAYLIST_V2],uu.Ay[j.NQ.SHOW]];case j.NQ.QUEUE:return[uu.Ay[j.NQ.TRACK],uu.Ay[j.NQ.LOCAL],uu.Ay[j.NQ.EPISODE]];default:return[]}return[]}(e),g=!!h.length;return(0,at.useEffect)((()=>(a?l.current=window.setTimeout((()=>{(0,j.U_)(e)||(r?.(),c(t||(0,j.o_)(e).toURLPath(!0)))}),1e3):!a&&l.current&&clearTimeout(l.current),()=>{l.current&&clearTimeout(l.current)})),[a,e,t,r,c]),g?(0,ct.jsx)(cu.A,{types:h,onDrop:t=>{const n=(0,j.o_)(e),r=Array.from(t.dataTransfer.types).find((e=>h.includes(e))),s=r&&t.dataTransfer.getData(r),a=s&&s.split("\n")[0],o=(0,j.o_)(a);if(o&&n)switch(i?.(o.toURI()),n.type){case j.NQ.PLAYLIST:case j.NQ.PLAYLIST_V2:u((0,du.io)(e,[o.toURI()]));break;case j.NQ.COLLECTION:(0,j._T)(o)||(0,j.ec)(o)||(0,j.U_)(o)?d.add({uris:[o.toURI()]}):(0,j.tb)(o)?m.add([o.toURI()],{before:"start"}):(0,j.WB)(o)&&d.add({uris:[o.toURI()]});break;case j.NQ.QUEUE:p.addToQueue([{uri:o.toURI(),uid:null}])}},onDragEnter:()=>{o(!0)},onDragLeave:()=>{o(!1)},className:s,children:n}):(0,ct.jsx)("div",{children:n})};function pu({style:e,active:t,disabled:n,intent:i,label:r,labelActive:s,icon:a,iconActive:o,className:l,onClick:c}){const[u,d]=(0,at.useState)(!1),m=(0,$r.W)(),p=t&&s?s:r,h=t&&o?o:a;return(0,ct.jsx)(na,{style:e,className:l,isActive:t,disabled:n,onToggle:e=>{c?.(),u||e.target.blur(),d(!1),i&&m({type:"click",intent:i,targetUri:""})},onKeyDown:({key:e})=>{"enter"===e.toLowerCase()&&d(!0)},label:p,icon:h,testId:`control-button-${i}`})}var hu=n(4485),gu=n(47895);const fu=()=>{const{isAnonymous:e}=(0,nt.d4)(ma.Ht),{isYourDJContext:t}=(0,gu.CV)(),{videoPlayerMode:n}=(0,Lr.d)();return e||t||"cinema"===n?{isVisible:!1}:{isVisible:!0,isEnabled:!0}},bu=({onClick:e})=>{const{isEnabled:t,isVisible:n}=fu(),i=(0,cn.zy)(),r=(0,hu.J)(),s=(0,cn.Zp)(),a=(0,at.useMemo)((()=>"/queue"===i.pathname||"/history"===i.pathname),[i.pathname]),o=(0,at.useCallback)((()=>{const t=r.entries?.slice(0,r.index+1)?.reverse()?.findIndex((({pathname:e})=>"/queue"!==e&&"/history"!==e));e({mode:"main",route:null}),s(-1===t?"/":t>=0?-t:-1)}),[s,r,e]),l=(0,at.useCallback)((()=>{e({mode:"main",route:"/queue"}),s("/queue",{state:{referrer:"now_playing_bar"}})}),[e,s]),c=(0,at.useCallback)((()=>{t&&(a?o():l())}),[t,a,o,l]);return n?(0,ct.jsx)(mu,{uri:"spotify:queue",children:(0,ct.jsx)(pu,{intent:"queue",icon:au.j,label:u.Ru.get("playback-control.queue"),onClick:c,active:a,disabled:!t})}):null},vu=In.$S.QUEUE_BUTTON_CLICK,yu=({onClick:e})=>{const{isEnabled:t,isVisible:n}=fu(),i=(0,Fo.Ev)(vu),{isActive:r}=(0,Fo.AI)(Ho.Z.Queue),{toggleQueue:s}=(0,lc.R)(),a=(0,at.useCallback)((()=>{t&&(e({mode:"panel",aboutToShow:!r}),s())}),[t,e,r,s]);return n?(0,ct.jsx)(mu,{uri:"spotify:queue",children:(0,ct.jsx)(na,{icon:au.j,label:u.Ru.get("playback-control.queue"),onToggle:a,isActive:r,disabled:!t||!i,testId:"control-button-queue",restoreFocusKey:Ho.Z.Queue})}):null},_u=({onClick:e})=>(0,a.NC)(Ie.eWj)?(0,ct.jsx)(yu,{onClick:e}):(0,ct.jsx)(bu,{onClick:e});var Eu=n(74157),xu=n(87465),Cu=n(43491),Su=n(91151);function Au(e,t,n){let i;return i=t===q.zP.CONNECTING?e.connectingButtonFactory():t===q.zP.CONNECTED?e.connectedButtonFactory():e.notConnectedButtonFactory(),n?i.hitUiHide():i.hitUiReveal()}var wu=n(51441),Iu=n(52792);let Tu=function(e){return e[e.CONNECT_TO_DEVICE=0]="CONNECT_TO_DEVICE",e[e.UNSUPPORTED_DJ_NARRATION=1]="UNSUPPORTED_DJ_NARRATION",e}({});const Nu=e=>e?.connectionStatus===q.zP.NOT_CONNECTED,Ru=e=>!!e?.devices.length&&e.devices.some((e=>e.isLocalNetwork&&!e.isDisabled&&(e=>{switch(e.type){case q.bq.AUDIO_DONGLE:case q.bq.AVR:case q.bq.CAST_AUDIO:case q.bq.CAST_VIDEO:case q.bq.GAME_CONSOLE:case q.bq.SPEAKER:case q.bq.STB:case q.bq.TV:return!0;default:return!1}})(e))),ku="oS5b2oKYN9E28TQ0vzh7",Ou="hnNnS6kEPDJtQfUOzSN7",Pu=({onClose:e,onMouseEnter:t,onMouseLeave:n,nudgeType:i,message:r})=>{const{spec:s,logger:a}=(0,Jr.r)(wu.w,{});let o;i===Tu.CONNECT_TO_DEVICE?o=s.connectFromDevicePickerNudgeFactory():i===Tu.UNSUPPORTED_DJ_NARRATION&&(o=s.djVoiceUnsupportedNudgeFactory());const l=(0,Iu.t)(o);return(0,ct.jsxs)("div",{className:ku,onMouseEnter:t,onMouseLeave:n,ref:l,onClick:()=>{o&&(e=>e instanceof wu.Y.ConnectFromDevicePickerNudgeEventFactory)(o)&&a.logInteraction(o.hitNoAction())},children:[(0,ct.jsx)(fr.E,{id:"nudgeBody",as:"p",variant:"bodyMedium",semanticColor:"textBase",children:r}),(0,ct.jsx)(Xs.H,{iconOnly:co.M,size:"small",semanticColor:"textBase",onClick:t=>{t.stopPropagation(),o&&a.logInteraction(o.closeButtonFactory().hitUiHide()),e()},"aria-label":u.Ru.get("close"),className:Ou})]})},ju=()=>{const e=(0,at.useRef)(),t=(0,at.useRef)(!1),n=(0,at.useRef)(!1),i=(0,nt.wA)(),r=(0,at.useCallback)((()=>{n.current&&clearTimeout(e.current),i((0,et.Yp)())}),[i]),s=(0,at.useCallback)((()=>{n.current=!1,t.current||r()}),[r]),a=(0,at.useCallback)((t=>{e.current=window.setTimeout(s,(e=>Math.min(Math.max(200*e,4e3),1e4))(t)),i((0,et.dK)()),n.current=!0}),[i,s]),o=(0,at.useCallback)((e=>{t.current=e,e||n.current||r()}),[r]);return(0,at.useMemo)((()=>({hideNudge:r,showNudge:a,setShouldKeepShowingNudge:o})),[r,a,o])};var Lu=n(24369),Du=n(28157),Uu=n(53098),Mu=n(8856);const Bu=new Date(0).toISOString(),Fu=["shift+alt+f10"],Hu=e=>{const t=(0,at.useRef)(),n=(0,at.useRef)(),i=(0,at.useRef)(!1),r=(0,at.useRef)(!1),s=(0,nt.Pj)(),a=(0,zt.K)(),o=(0,ii.L)(),l=(0,Mu.h)(),[c,u]=(0,is.x)("connect-nudge-triggered-at",Bu);(0,Lu.f)(Fu,(async()=>{const{platform:{isDeveloperMode:e}}=s.getState();if(e){const e=new Date;e.setHours(e.getHours()-8),u(e.toISOString())}}));const d=(0,at.useCallback)((e=>{const t=a.getState(),n=o.getState(),i=new Date(c);i.setHours(i.getHours()+8);const r=i<=new Date;switch(e){case Tu.CONNECT_TO_DEVICE:return r&&Nu(n)&&!(0,Se.A3)(t)&&Ru(n);case Tu.UNSUPPORTED_DJ_NARRATION:return!Nu(n)&&(0,Se.yc)(t,"spotify:playlist:37i9dQZF1EYkqdzj48dyYq")!==Uu.i.NOT_ACTIVE&&(s=n?.activeDevice??void 0,!Boolean(s?.supportsDJNarration));default:return!1}var s}),[a,o,c]),m=(0,at.useCallback)((()=>{const e=s.getState();return document.hasFocus()&&!(({ui:e,ads:t},n)=>e.blockUserDialog.isOpen||e.connectDevicePicker.isOpen||e.deleteFolderDialog.isOpen||e.deletePlaylistDialog.isOpen||e.fullscreenMode.isOpen||e.improvedSignupPromptDialog.isOpen||e.keyboardShortcutsHelpModal.isOpen||e.leavePlaylistDialog.isOpen||e.loginToListenDialog.isOpen||e.offlineDeviceLimitReachedDialog.isOpen||e.playbackNotSupportedErrorDialog.isOpen||e.premiumDialog.isOpen||e.signupToListenDialog.isOpen||e.connectNudge.isOpen||!0===t.billboard?.isOpen&&!t.billboard.isMinimized||!1===t.vto?.isHidden&&!1===t.vto?.isMinimized||n)(e,l.current.length>0)}),[l,s]),p=(0,at.useCallback)((t=>{if(m()){let n,i=0,r=!1;for(;!r&&i<t.length;){const e=t[i];r=d(e),n=r?e:void 0,i++}if(void 0!==n&&(e(n),n===Tu.CONNECT_TO_DEVICE)){const e=(new Date).toISOString();u(e)}}}),[m,e,d,u]),h=(0,at.useCallback)((e=>{e.data.action===P.Ik.PLAY?i.current=!0:e.data.action===P.Ik.RESUME&&(r.current=!0)}),[]);(0,Yt.p)(P.gd.ACTION,h);const g=(0,at.useCallback)((e=>{i.current&&(0,Se.uW)(e.data)===Uu.i.PLAYING?(t.current=e.data?.context.uri,p([Tu.UNSUPPORTED_DJ_NARRATION,Tu.CONNECT_TO_DEVICE]),t.current=void 0,i.current=!1):r.current&&!1===e.data?.isPaused&&(t.current=e.data?.context.uri,p([Tu.CONNECT_TO_DEVICE]),t.current=void 0,r.current=!1)}),[p]);(0,Yt.p)(P.gd.UPDATE,g);const f=(0,at.useCallback)((e=>{const t=e.data?.activeDevice;t&&!t.isLocal&&n.current!==t.connectStateId&&(n.current=t.connectStateId,p([Tu.UNSUPPORTED_DJ_NARRATION]))}),[p]);(0,Du.W)(Y.P.UPDATE,f)},Vu=({children:e,triggerRef:t})=>{const[n,i]=(0,at.useState)(""),[r,s]=(0,at.useState)(void 0),{showNudge:a,hideNudge:o,setShouldKeepShowingNudge:l}=ju(),c=(0,at.useCallback)((e=>{const t=(e=>{switch(e){case Tu.CONNECT_TO_DEVICE:return u.Ru.get("web-player.connect.nudge.listen-to-speaker");case Tu.UNSUPPORTED_DJ_NARRATION:return u.Ru.get("web-player.connect.nudge.dj-voice-unavailable");default:return""}})(e);i(t),s(e),a(t.length)}),[a]);Hu(c);const d=(0,nt.d4)((e=>e.ui.connectNudge.isOpen)),m=(0,nt.d4)((e=>e.ui.connectDevicePicker.isOpen));return(0,at.useEffect)((()=>{m&&o()}),[m,o]),(0,ct.jsx)(Cu.W,{placement:"top",visible:d,overlay:(0,ct.jsx)(Pu,{onClose:o,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),message:n,nudgeType:r}),childRef:t,popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:24,tether:!1}}]},onHide:()=>{},fadeOut:!0,useLazyMounting:!0,children:e})},zu="DMWoYmJsYdFjGQbeGH9Q",Gu="wff4Xp9vQFpx18x9Bb_S",Wu="tP4heMeFAePYaWK7l2Kd",Ku="UYKUvqBDvaGU1DVMROXP",Yu="zXVFptGLwJ7Ss396ADNn",qu="cK7qggtY22OBs0bw4PUh",Qu="device-picker-icon-button",$u=(0,at.forwardRef)((({isPickerOpen:e,onLogInteraction:t,onClick:n,showIndicatorTriangle:i=!1},r)=>{const s=(0,at.useRef)(null),{spec:a,logger:o}=(0,Jr.r)(Su.p,{}),l=(0,nt.d4)((e=>e.ui.connectNudge.isOpen)),{remoteDeviceType:c,remoteDeviceIsGroup:d,connectionStatus:m}=(0,Uo.v)((e=>{const t=(0,bc.V)(e);return{remoteDeviceType:t.remoteDevice?.type,remoteDeviceIsGroup:t.remoteDevice?.isGroup,connectionStatus:t.connectionStatus}}),Vr.a),p=(0,Ic.tf)(c,d),h={"encore-bright-accent-set":m===q.zP.CONNECTED,[Yu]:m===q.zP.CONNECTED,[Ku]:m===q.zP.CONNECTING};return(0,ct.jsx)(Vu,{triggerRef:s,children:(0,ct.jsx)(_s.Zp,{label:u.Ru.get("playback-control.connect-picker"),disabled:e||l,children:(0,ct.jsxs)("div",{className:Gu,ref:s,children:[i&&(0,ct.jsx)("div",{className:gr()(Wu,h),"":"indicator"}),(0,ct.jsx)("button",{className:gr()("control-button",{"control-button--active":m===q.zP.CONNECTED},zu),onClick:i=>{const{interactionId:r}=o.logInteraction(Au(a,m,e));t?.(r),n?.(i)},ref:r,"aria-label":u.Ru.get("playback-control.connect-picker"),"aria-expanded":e,id:Qu,children:(0,ct.jsx)(p,{className:gr()({[qu]:m===q.zP.CONNECTING}),size:"small",role:"presentation"})})]})})})}));var Zu=n(19655),Xu=n(67878);const Ju={id:"",connectStateId:"",name:"",type:q.bq.COMPUTER,isGroup:!1,isLocal:!0,isActive:!0,isConnecting:!1,isDisabled:!1,volume:0,hifiSupport:{fullySupported:!1,deviceSupported:!1,userEligible:!1},supportsLogout:!1},ed=()=>{const{activeDevice:e,devices:t}=(0,Uo.v)((e=>({activeDevice:e.activeDevice,devices:e.devices})));return{currentDevice:e??Ju,devices:t}};function td(e){return window.cast&&e!==window.cast.framework.CastState.NO_DEVICES_AVAILABLE}var nd=n(73604),id=n(68811),rd=n(30132),sd=n(38011),ad=n(22920),od=n(7079);const ld=(0,at.createContext)({rowWithMenuOpenIdentifier:null,setRowWithMenuOpenIdentifier:()=>{}}),cd=({children:e})=>{const[t,n]=(0,at.useState)(null);return(0,ct.jsx)(ld.Provider,{value:{rowWithMenuOpenIdentifier:t,setRowWithMenuOpenIdentifier:n},children:e})},ud=e=>e instanceof Zu.BA.ContainerViewEventFactory.DeviceListEventFactory.RemoteDeviceEventFactory||e instanceof Zu.BA.ContainerViewEventFactory.DeviceListEventFactory.DisabledDeviceEventFactory||e instanceof Zu.BA.ContainerViewEventFactory.OffNetworkDeviceListEventFactory.RemoteDeviceEventFactory||e instanceof Zu.BA.ContainerViewEventFactory.OffNetworkDeviceListEventFactory.DisabledDeviceEventFactory||e instanceof Zu.BA.ContainerViewEventFactory.OnNetworkDeviceListEventFactory.RemoteDeviceEventFactory;var dd=n(63492),md=n(50421),pd=n(41735),hd=n(62359),gd=n(25949),fd=n(4778);const bd="mFr6W9mwg0p_c7eJlhc_",vd="lpPBKkIGJcyWu59iOpsS",yd=({deviceId:e,connectStateDeviceId:t,allowForgetDevice:n,incarnation:i})=>{const r=(0,ii.L)(),s=(0,ot.s)(),{spec:a}=(0,Jr.r)(fd.d,{}),o=(0,Iu.t)(a),l=a.forgetDeviceButtonFactory(),c=(0,Iu.t)(l),d=a.deviceIncarnationContainerFactory(),m=(0,Iu.t)(d);return n||i?(0,ct.jsx)("span",{ref:o,className:vd,children:(0,ct.jsxs)(Rs.W,{children:[n&&(0,ct.jsx)(Os.D,{role:"menuitem",leadingIcon:(0,ct.jsx)(hd.V,{size:"small"}),onClick:()=>{s.logInteraction(l.hitLogoutFromRemoteDevice({remoteDeviceId:t})),r.logout(e)},elementRef:c,children:u.Ru.get("web-player.connect.context-menu.forget-device")}),i&&(0,ct.jsxs)("div",{ref:m,children:[(0,ct.jsx)(ks.y,{children:u.Ru.get("web-player.connect.context-menu.incarnation-title")}),i.available.map((n=>{const{icon:a,text:o}=(e=>{switch(e){case"connect":return{icon:(0,ct.jsx)(md.E,{size:"small"}),text:u.Ru.get("web-player.connect.context-menu.incarnation-connect")};case"cast":return{icon:(0,ct.jsx)(pd.m,{size:"small"}),text:u.Ru.get("web-player.connect.context-menu.incarnation-cast")};default:return{}}})(n);return(0,ct.jsx)(Os.D,{role:"menuitemradio",leadingIcon:a,onClick:()=>{let a;switch(n){case"cast":a=d.googleCastButtonFactory();break;case"connect":a=d.spotifyConnectButtonFactory()}i.preferred!==n?(a&&s.logInteraction(a.hitChangeRemoteDeviceIncarnation({remoteDeviceId:t})),r.setPreferredIncarnation(e,n)):a&&s.logInteraction(a.hitNoAction())},"aria-checked":i.preferred===n,CheckedIcon:gd.i,children:o},n)}))]})]})}):null},_d=({title:e,deviceId:t,connectStateDeviceId:n,allowForgetDevice:i,incarnation:r,className:s,onHide:a,onShow:o,spec:l})=>{const[c,d]=(0,at.useState)(!1),m=l.contextMenuButtonFactory({identifier:n}),p=(0,ot.s)(),h=(0,Iu.t)(m);return(0,ct.jsx)(ws.b,{renderInline:!0,menu:(0,ct.jsx)(Hr.r,{spec:m,children:(0,ct.jsx)(yd,{deviceId:t,connectStateDeviceId:n,allowForgetDevice:i,incarnation:r})}),onShow:()=>{d(!0),o?.()},onHide:()=>{d(!1),a?.()},offset:[0,-8],children:(0,ct.jsx)(dd.e,{ref:h,size:dd.M.xs,label:u.Ru.get("more.label.context",e),className:gr()(bd,s),onClick:e=>{e.stopPropagation(),p.logInteraction(c?m.hitUiHide():m.hitUiReveal())}})})},Ed="main-devicePicker-tooltip",xd="main-devicePicker-tooltipContent",Cd="MZZKWxJgpZdyX3kEqgVk",Sd="l6OcBOr8WqpAei2v3T50",Ad="eJvD_4f5SD7yaH4Mq_nc",wd="XdJAEkP3WXzUL5URB0ZX",Id="Bxb4yN4IpWCHbJDIIoAD",Td="m97VJWoSNAnJwkBDsiZg",Nd="jd5BgldghOe68KEXK_hS",Rd="gc2T8wnuWczDDGzJ3uWY",kd="hWE9oKnGY9N3YUZrry_c",Od="_iSFa0Kl_AlpaG8l_VLJ",Pd="n7lpLbjlkn69nQ1BhwZg",jd="ZtZC7H7E6gtj5tlwNsn8",Ld="main-devicePicker-section",Dd="main-devicePicker-heading",Ud="main-devicePicker-sectionHeading",Md="in_2k_hGN2eFVVu1sDur",Bd="hI_HIhbNifqISMRk6xfh",Fd="main-devicePicker-header",Hd="BIRS4ztlrxxl4_FH24Yn",Vd="mjprSb2e1tKJpqwvgFSh",zd="ZvsBIT5pDqFAda_ilPeJ",Gd="main-devicePicker-nowPlayingActiveIcon",Wd="ajXfdFS_TUChA63kTlhA",Kd="XaZWrewfHM1YUmghUpMQ",Yd="main-devicePicker-headingContent",qd="vz5TaAerMmRrJGJtWIAw",Qd="main-devicePicker-headingTitle",$d="main-devicePicker-headingSubtitle",Zd="pkGZOxD6iLgSVCGTPxXn",Xd="d0PEpGug7fpNx6FALPxV",Jd="main-devicePicker-troubleshootingList",em="main-devicePicker-troubleshooting",tm="main-devicePicker-troubleshootingItemIcon",nm="main-devicePicker-troubleshootingItemSubtitle",im="qmaOpgYPMncTetZzlw3T",rm="It1L8Ea9SuMjm2_44q5V",sm="g4EIVDYwOM26eyJI2t_P",am="WkA7K654a3WXw5C6ed7g",om="efJDqiDUHmkwgbM3zV6D",lm=(0,at.forwardRef)((function({deviceId:e,connectStateDeviceId:t,Icon:n,TechIcon:i,title:r,subtitle:s,helpTooltip:a,canLogout:o,isDisabled:l,incarnation:c,onClick:u,spec:d},m){const{rowWithMenuOpenIdentifier:p,setRowWithMenuOpenIdentifier:h}=(0,at.useContext)(ld),g=(0,Ic.HJ)(c),f=o||g,{toggleDevicePicker:b}=Cc(),v=(0,od.W)();return(0,ct.jsxs)("li",{className:Ad,ref:m,children:[(0,ct.jsx)("button",{className:gr()(Vd,wd,{[Id]:p===e}),onClick:()=>{l||(u&&u(),b())},"aria-disabled":l,"aria-label":s?`${r} ${s}`:r,"":"device-picker-row-flyout",children:(0,ct.jsxs)("div",{className:gr()(Dd,Kd),children:[(0,ct.jsx)(n,{iconSize:32,semanticColor:l?void 0:"textBase",className:Gd,"":"main-icon",role:"presentation"}),(0,ct.jsxs)("div",{className:gr()(Xd,f&&qd),children:[(0,ct.jsx)("div",{className:$d,children:(0,ct.jsx)("div",{className:Qd,children:(0,ct.jsx)(ad.r,{equalGradientWidth:!0,title:r,children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:l?void 0:"textBase",className:zd,children:r})},`picker-row-title-${e}`)})}),(0,ct.jsxs)("div",{className:$d,children:[i&&(0,ct.jsx)(i,{iconSize:16,semanticColor:"textSubdued",className:Zd,"":"sub-icon",role:"presentation"}),s&&(0,ct.jsx)("div",{className:Qd,children:(0,ct.jsx)(ad.r,{equalGradientWidth:!0,title:s,children:(0,ct.jsx)(fr.E,{variant:"marginal",semanticColor:l?void 0:"textSubdued",className:zd,children:s})},`picker-row-subtitle-${e}`)}),a&&(0,ct.jsx)("div",{className:am,children:(0,ct.jsx)(sd.f,{message:a,placement:v?"right":"left",messageClassName:om})})]})]})]})}),f&&ud(d)&&(0,ct.jsx)("span",{className:Td,children:(0,ct.jsx)(_d,{title:r,deviceId:e,connectStateDeviceId:t,allowForgetDevice:o,incarnation:g?c:void 0,onShow:()=>{h(e)},onHide:()=>{h(null)},spec:d})})]})}));var cm=n(2394),um=n(75783),dm=n(48761),mm=n(68529),pm=n(88291);const hm="AWblt0YATqa_XQaPUDMc",gm="sX7AwqoSzMeT9qhlEViU",fm="jIlVu16bmijzUKG6u5VW",bm="ZkuPLR9bss2N7f7thixx",vm="QSZFk1XCj76mVplNmiV1",ym="O0wmxPM0kfA59paiHqR9",_m=(0,at.forwardRef)((function({deviceId:e,connectStateDeviceId:t,Icon:n,TechIcon:i,title:r,subtitle:s,canLogout:a,isDisabled:o,incarnation:l,onClick:c,spec:d},m){const p=(0,Fo._Y)(),h=(0,Ic.HJ)(l),g=a||h,{rowWithMenuOpenIdentifier:f,setRowWithMenuOpenIdentifier:b}=(0,at.useContext)(ld),v=(0,Ra.YQ)((()=>{o||(c?.(),p(In.$S.PANEL_CLOSE_CLICK_OR_COLLAPSE))}),1e3,{leading:!0,trailing:!1}),y=(0,at.useCallback)((e=>{"Enter"===e.key&&v()}),[v]),_=(0,ct.jsx)(yd,{deviceId:e,connectStateDeviceId:t,allowForgetDevice:a,incarnation:h?l:void 0});return(0,ct.jsx)(pm.h,{menu:_,children:(0,ct.jsx)(mm.c,{onKeyDown:y,onClick:v,className:gr()(bm,{[ym]:f===e}),children:(0,ct.jsx)(cm.v,{id:e,ref:m,"":"device-picker-row-sidepanel",media:(0,ct.jsx)(n,{semanticColor:o?"textSubdued":"textBase","":"main-icon",role:"presentation"}),onClick:()=>{},onClickHint:u.Ru.get("web-player.connect.device-picker.connect-to-device"),title:(0,ct.jsx)("span",{className:hm,children:(0,ct.jsx)(_s.Zp,{label:r,renderInline:!0,children:(0,ct.jsx)(um.d,{"":"list-row-title",lineClamp:1,semanticColor:o?"textSubdued":"textBase",dir:"auto",children:r})})}),subtitle:(0,ct.jsxs)("div",{className:gm,children:[i&&(0,ct.jsx)(i,{className:fm,semanticColor:"textSubdued","":"sub-icon",role:"presentation",size:"small"}),s&&(0,ct.jsx)(dm.j,{semanticColor:"textSubdued",lineClamp:1,children:s})]}),trailing:g&&ud(d)&&(0,ct.jsx)(_d,{title:r,deviceId:e,connectStateDeviceId:t,allowForgetDevice:a,incarnation:h?l:void 0,spec:d,className:gr()(vm),onShow:()=>{b(e)},onHide:()=>{b(null)}})})})})})),Em=({position:e,deviceId:t,connectStateDeviceId:n,deviceName:i,deviceType:r,deviceModelName:s,isGroup:o,disabledReason:l,canLogout:c,spec:u})=>{const d=(0,Ic.tf)(r,o),{helpText:m,tooltip:p}=(0,Ic.uY)(l,(0,Ic.p2)(r,s)),h=u.disabledDeviceFactory({identifier:n,position:e,reason:l??"null"}),g=(0,Iu.t)(h),f=(0,a.NC)(Ie.VUN)?_m:lm;return(0,ct.jsx)(f,{deviceId:t,connectStateDeviceId:n,ref:g,isDisabled:!0,Icon:d,title:i,subtitle:m,canLogout:c,spec:h,helpTooltip:p})},xm="CAST_STATE_CHANGED",Cm="TOGGLE_CAST",Sm="SET_CONNECTING_CAST_DEVICE_ID",Am="RESET_CONNECTING_CAST_DEVICE_ID",wm=e=>({type:xm,castState:e}),Im=({isDisabled:e=!1,spec:t})=>{const n=(0,nt.wA)(),i=t.containerViewFactory().deviceListFactory().castPlaceholderFactory(),r=(0,Iu.t)(i),s=(0,Ic.$A)(q.bq.CAST_AUDIO,"disconnected"),o=(0,ot.s)(),l=(0,a.NC)(Ie.VUN)?_m:lm;return(0,ct.jsx)(l,{deviceId:"cast-placeholder",connectStateDeviceId:"cast-placeholder",ref:r,Icon:s,title:u.Ru.get("web-player.connect.device-picker.google-cast-devices"),supportsHiFi:!1,onClick:()=>{o.logInteraction(i.hitUiReveal()),n({type:Cm})},isDisabled:e,spec:i})},Tm=({deviceId:e,connectStateDeviceId:t,deviceName:n,supportsHiFi:i,spec:r})=>{const s=(0,ot.s)(),o=r.localDeviceFactory(),l=(0,Ic.tf)(q.bq.COMPUTER,!1),c=(0,ii.L)(),u=(0,a.NC)(Ie.VUN)?_m:lm;return(0,ct.jsx)(u,{deviceId:e,connectStateDeviceId:t,Icon:l,title:n,supportsHiFi:i,onClick:()=>{const{interactionId:t,pageInstanceId:n}=s.logInteraction(o.hitPullPlaybackToLocalDevice());c.transferPlayback(e,{interactionId:t,pageInstanceId:n})},spec:o})},Nm=()=>{const[e,t]=(0,is.x)("connect-picker-recent-transfers",{});return{registerTransferAttempt:(0,at.useCallback)((n=>{t({...e,[n]:(new Date).getTime()})}),[e,t]),recentTransfersMap:e}},Rm=({position:e,deviceId:t,connectStateDeviceId:n,deviceName:i,deviceType:r,isGroup:s,supportsHiFi:o,canLogout:l,incarnation:c,spec:d})=>{const m=(0,ot.s)(),p=d.remoteDeviceFactory({identifier:n,position:e}),h=(0,Ic.tf)(r,s);let g,f;(0,Ic.Mp)(r)&&(g=(0,Ic.$A)(r,"disconnected"),f=u.Ru.get("web-player.connect.device-picker.google-cast"));const{registerTransferAttempt:b}=Nm(),v=(0,ii.L)(),y=(0,Iu.t)(p),_=(0,a.NC)(Ie.VUN)?_m:lm;return(0,ct.jsx)(_,{deviceId:t,connectStateDeviceId:n,ref:y,Icon:h,TechIcon:g,title:i,subtitle:f,supportsHiFi:o,canLogout:l,incarnation:c,onClick:()=>{const{interactionId:e,pageInstanceId:i}=m.logInteraction(p.hitConnectToRemoteDevice({remoteDeviceId:n}));v.transferPlayback(t,{interactionId:e,pageInstanceId:i}),b(n)},spec:p})},km="device-picker-section-heading",Om="device-picker-troubleshooting-list",Pm=()=>(0,Fr.o)((e=>(e?.restrictions?.disallowTransferringPlaybackReasons?.length??0)>0)),jm=({devices:e,areWebPlayerCastDevicesAvailable:t=!1,networkHeadingID:n="",spec:i})=>{const r=(0,p.Ek)(),s=Pm(),o=i.containerViewFactory().deviceListFactory(),l=(0,Iu.t)(o),c=(0,a.NC)(Ie.VUN),d=(e,t)=>{const n=r?u.Ru.get("web-player.connect.device-picker.this-computer"):u.Ru.get("web-player.connect.device-picker.this-web-browser");return e.isDisabled?(0,ct.jsx)(Em,{position:e.isLocal?0:t+1,deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:e.isLocal?n:e.name,deviceType:e.isLocal?q.bq.COMPUTER:e.type,deviceModelName:e.modelDisplayName,isGroup:e.isGroup,disabledReason:e.disabledReason,canLogout:!e.isLocalNetwork&&e.supportsLogout,spec:o},e.id):e.isLocal&&(e=>e instanceof Zu.BA.ContainerViewEventFactory.DeviceListEventFactory||e instanceof Zu.BA.ContainerViewEventFactory.OnNetworkDeviceListEventFactory)(o)?(0,ct.jsx)(Tm,{deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:n,supportsHiFi:e.hifiSupport.fullySupported,spec:o},e.id):(0,ct.jsx)(Rm,{position:t+1,deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:e.name,deviceType:e.type,isGroup:e.isGroup,supportsHiFi:e.hifiSupport.fullySupported,canLogout:!e.isLocalNetwork&&e.supportsLogout,incarnation:e.incarnation,spec:o},e.id)};return c?(0,ct.jsxs)(rd.$,{circular:!1,ref:l,"aria-labelledby":`${km} ${n}`,"":`devices-list-${n}`,allowsMultipleInteractiveChildrenInItem:!0,children:[e.map(((e,t)=>d(e,t))),t&&(0,ct.jsx)(Im,{isDisabled:s,spec:i})]}):(0,ct.jsxs)("ul",{"aria-labelledby":`${km} ${n}`,"":`devices-list-${n}`,ref:l,children:[e.map(((e,t)=>d(e,t))),t&&(0,ct.jsx)(Im,{isDisabled:s,spec:i})]})},Lm="local-network-heading",Dm="other-networks-heading",Um=({localNetworkDevices:e,otherNetworksDevices:t,spec:n})=>(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(fr.E,{as:"h3",variant:"bodySmall",semanticColor:"textSubdued",className:Md,id:Lm,children:e.length>0?u.Ru.get("web-player.connect.device-picker.on-this-network"):u.Ru.get("web-player.connect.device-picker.no-devices-local-network")}),e.length>0&&(0,ct.jsx)(jm,{devices:e,networkHeadingID:Lm,spec:n}),t.length>0&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(fr.E,{as:"h3",variant:"bodySmall",semanticColor:"textSubdued",className:gr()(Md,Bd),id:Dm,children:u.Ru.get("web-player.connect.device-picker.on-other-networks")}),(0,ct.jsx)(jm,{devices:t,networkHeadingID:Dm,spec:n})]})]});var Mm=n(15945);const Bm=[Mm.h.en,Mm.h.enGB],Fm=()=>{const e=u.Ru.getLocaleForTranslation();return Bm.includes(e)};var Hm=n(34340);const Vm=({url:e,linkText:t,handleClick:n,elementRef:i})=>(0,ct.jsxs)("a",{className:gr()(Dd,Vd,im),href:e,style:{textDecoration:"none"},target:"_blank",onClick:n,ref:i,children:[(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMedium",semanticColor:"textBase",className:sm,children:t}),(0,ct.jsx)(Hm.H,{size:"small","":"icon-external-link",semanticColor:"textSubdued",className:rm,role:"presentation",autoMirror:!0,"aria-hidden":"true"})]}),zm=({url:e,linkText:t,handleClick:n,elementRef:i})=>(0,ct.jsx)("a",{className:gr()(bm),href:e,target:"_blank",ref:i,onClick:n,children:(0,ct.jsx)(cm.v,{title:t,id:t,isRedundantOnClick:!0,onClick:()=>{},"":"list-row-external-link",trailing:(0,ct.jsx)(Hm.H,{size:"small","":"icon-external-link",semanticColor:"textSubdued",role:"presentation",autoMirror:!0,"aria-hidden":"true"})})}),Gm=({spec:e})=>{const t=`https://www.spotify.com/connect${`?utm_campaign=connect&utm_medium=${(0,p.Ek)()?"app":"web"}&utm_source=desktop`}`,n=e.containerViewFactory().externalConnectHubLinkFactory(),i=(0,Iu.t)(n),r=(0,ot.s)(),s=(0,a.NC)(Ie.VUN)?zm:Vm;return(0,ct.jsx)(s,{url:t,linkText:u.Ru.get("web-player.connect.device-picker.connect-hub-external-link"),elementRef:i,handleClick:()=>{r.logInteraction(n.hitNavigateToExternalUri({destination:t}))}})},Wm="https://support.spotify.com/article/spotify-connect/",Km=({spec:e})=>{const t=e.containerViewFactory().externalHelpLinkFactory(),n=(0,Iu.t)(t),i=(0,ot.s)(),r=(0,a.NC)(Ie.VUN)?zm:Vm;return(0,ct.jsx)(r,{url:Wm,linkText:u.Ru.get("web-player.connect.device-picker.help-external-link"),elementRef:n,handleClick:()=>{i.logInteraction(t.hitNavigateToExternalUri({destination:Wm}))}})},Ym=({devices:e,areWebPlayerCastDevicesAvailable:t,spec:n})=>{const i=(0,p.Ek)(),r=Pm(),s=Fm(),o=!i&&r?e.map((e=>({...e,isDisabled:!0}))):e,{recentTransfersMap:l}=Nm(),c=function(e,t){const n=[],i=e.find((e=>e.isLocal));i&&n.push(i);const r=e.filter((e=>!e.isLocal)),{usedDevices:s,unusedDevices:a}=function(e,t){const n=[],i=[];for(const r of e)t[r.connectStateId]?n.push({device:r,timestamp:t[r.connectStateId]}):i.push(r);return{usedDevices:n,unusedDevices:i}}(r,t);s.sort(((e,t)=>t.timestamp-e.timestamp));for(const e of s)n.push(e.device);const o=n.concat(function(e){return e.sort(((e,t)=>e.isLocal?-1:t.isLocal?1:e.name.toLowerCase().localeCompare(t.name.toLowerCase())))}(a));return o}(o,l),u=c.filter((e=>e.isLocalNetwork)),d=c.filter((e=>!e.isLocalNetwork)),{rowWithMenuOpenIdentifier:m}=(0,at.useContext)(ld),h=(0,a.NC)(Ie.VUN),g=(0,ct.jsxs)("div",{className:gr()(Pd,h&&jd),children:[(0,ct.jsx)("div",{children:i&&d.length>0?(0,ct.jsx)(Um,{localNetworkDevices:u,otherNetworksDevices:d,spec:n}):(0,ct.jsx)(jm,{devices:c,areWebPlayerCastDevicesAvailable:t,spec:n})}),(0,ct.jsxs)("div",{className:gr()(Wd),children:[(0,ct.jsx)(Km,{spec:n}),s&&(0,ct.jsx)(Gm,{spec:n})]})]});return h?g:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(id.a,{className:gr()(Nd,Sd,{[kd]:!!m}),children:g}),(0,ct.jsx)("div",{className:Od})]})},qm=({foundDevices:e})=>{const t=e?u.Ru.get("web-player.connect.device-picker.select-another-device"):u.Ru.get("web-player.connect.device-picker.no-devices-found");return(0,ct.jsx)("span",{className:Ud,id:km,"":km,children:(0,ct.jsx)(fr.E,{as:"h2",variant:"bodyMediumBold",semanticColor:"textBase",children:t})})};var Qm=n(71158),$m=n(11559),Zm=n(51042),Xm=n(80245);const Jm=({title:e,subtitle:t,Icon:n})=>(0,ct.jsxs)("li",{className:Dd,children:[(0,ct.jsx)(n,{size:"medium",semanticColor:"textSubdued",className:tm,role:"presentation"}),(0,ct.jsxs)("div",{className:Yd,children:[(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBase",children:e}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",className:nm,children:t})]})]}),ep=(0,at.forwardRef)((function({Icon:e,title:t,subtitle:n},i){return(0,ct.jsx)(mm.c,{className:bm,children:(0,ct.jsx)(cm.v,{id:t,ref:i,"":"device-picker-row-sidepanel",media:(0,ct.jsx)(e,{semanticColor:"textSubdued"}),title:(0,ct.jsx)("span",{className:hm,children:(0,ct.jsx)(_s.Zp,{label:t,renderInline:!0,children:(0,ct.jsx)(um.d,{"":"list-row-title",lineClamp:1,semanticColor:"textBase",dir:"auto",children:t})})}),subtitle:(0,ct.jsx)("div",{className:gm,children:(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:n})})})})}));var tp=n(64463),np=n(56029);const ip=({size:e="medium",className:t})=>{const n=(0,el.j)(),i=(0,np.k)(e);return(0,ct.jsx)(ct.Fragment,{children:n?(0,ct.jsx)(tp.A,{size:e,semanticColor:"textBrightAccent",className:t,"":"now-playing-active"}):(0,ct.jsx)("img",{className:t,width:i,height:i,alt:"","aria-hidden":"true",src:(0,as.b)("images/device-picker-equaliser-animation.webp"),"":"animated-now-playing"})})},rp="device-picker-header",sp=({isLocalDevice:e,deviceName:t,deviceType:n,isGroup:i,canLogout:r,incarnation:s,isPlaying:a,deviceId:o,connectStateDeviceId:l,spec:c})=>{const d=(0,p.Ek)(),m=(0,Ic.HJ)(s),h=r||m;let g;if(a)g=(0,ct.jsx)(ip,{size:"large",className:Gd});else{const e=(0,Ic.tf)(n,i);g=(0,ct.jsx)(e,{size:"large",semanticColor:"textBrightAccent",className:Gd,"":"device-icon",role:"presentation"})}const f=(0,ct.jsx)("div",{className:Qd,children:(0,ct.jsx)(ad.r,{equalGradientWidth:!0,title:u.Ru.get("web-player.connect.device-picker.current-device"),children:(0,ct.jsx)(fr.E,{as:"h3",variant:"bodyMediumBold",semanticColor:"textBase",children:u.Ru.get("web-player.connect.device-picker.current-device")})},`picker-header-title-${t}`)});let b,v;e?b=d?u.Ru.get("web-player.connect.device-picker.this-computer"):u.Ru.get("web-player.connect.device-picker.this-web-browser"):(b=t,v=(0,Ic.$A)(n,"connected"));const y=(0,ct.jsxs)("div",{className:$d,children:[v&&(0,ct.jsx)(v,{iconSize:16,semanticColor:"textBrightAccent",className:Zd,"":"tech-icon"}),(0,ct.jsx)("div",{className:Qd,children:(0,ct.jsx)(ad.r,{equalGradientWidth:!0,title:b,children:(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMedium",semanticColor:"textBrightAccent",children:b})},`picker-header-subtitle-${t}`)})]});return(0,ct.jsxs)("div",{className:gr()(Dd,Fd),id:rp,"aria-labelledby":rp,children:[g,(0,ct.jsxs)("div",{className:gr()(Yd,h&&qd),children:[f,y]}),h&&(0,ct.jsx)(_d,{title:b,deviceId:o,connectStateDeviceId:l,allowForgetDevice:r,incarnation:m?s:void 0,className:Hd,spec:c.containerViewFactory().headerFactory().activeDeviceFactory()})]})},ap=({isDesktop:e,spec:t})=>{const n=Fm(),i=t.containerViewFactory().noDevicesViewFactory(),r=(0,Iu.t)(i),s=(0,a.NC)(Ie.VUN),o=s?ep:Jm;return(0,ct.jsxs)("div",{ref:r,className:gr()(Jd,{[jd]:s,[Pd]:s}),"":Om,children:[(0,ct.jsxs)("ul",{"aria-labelledby":`${rp} ${km}`,className:em,children:[(0,ct.jsx)(o,{Icon:Qm.T,title:u.Ru.get("web-player.connect.device-picker.check-wifi"),subtitle:u.Ru.get("web-player.connect.device-picker.check-wifi-subtitle")}),(0,ct.jsx)(o,{Icon:$m.g,title:u.Ru.get("web-player.connect.device-picker.play-from-another"),subtitle:u.Ru.get("web-player.connect.device-picker.play-from-another-subtitle")}),e?(0,ct.jsx)(o,{Icon:Zm.H,title:u.Ru.get("web-player.connect.device-picker.restart-speaker"),subtitle:u.Ru.get("web-player.connect.device-picker.restart-speaker-subtitle")}):(0,ct.jsx)(o,{Icon:Xm.i,title:u.Ru.get("web-player.connect.device-picker.switch-to-app"),subtitle:u.Ru.get("web-player.connect.device-picker.switch-to-app-subtitle")})]}),(0,ct.jsxs)("div",{className:gr()({[Sd]:!s}),"aria-describedby":Om,children:[(0,ct.jsx)(Km,{spec:t}),n&&(0,ct.jsx)(Gm,{spec:t})]})]})},op=({devices:e,areWebPlayerCastDevicesAvailable:t,spec:n})=>{const i=Boolean(e.find((e=>!e.isLocal))),r=e.filter((e=>!e.isActive&&e.name.length>0)),s=i||t,o=(0,p.Ek)(),l=(0,a.NC)(Ie.VUN);return(0,ct.jsxs)("div",{className:gr()(Ld,l&&jd),children:[(0,ct.jsx)(qm,{foundDevices:s}),s?(0,ct.jsx)(cd,{children:(0,ct.jsx)(Ym,{devices:r,areWebPlayerCastDevicesAvailable:t,spec:n})}):(0,ct.jsx)(ap,{isDesktop:o,spec:n})]})},lp=({tooltipTriggerId:e})=>{const t=(0,bc.l)(),{toggleDevicePicker:n}=Cc(),i=(0,Zu.pG)({data:{identifier:Zu.gw.FLYOUT}});(0,at.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[n]);const{devices:r,currentDevice:s}=ed(),a=td((0,nt.d4)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE))),{isPlaying:o}=(0,nd.GK)();return(0,ct.jsx)(Xu.z,{className:gr()(Ed,t&&Rd),arrowClassName:Cd,disableAutoFocus:!0,children:(0,ct.jsxs)("div",{"aria-labelledby":e,className:xd,children:[(0,ct.jsx)(sp,{deviceId:s.id,connectStateDeviceId:s.connectStateId,isLocalDevice:s.isLocal,deviceName:s.name,deviceType:s.type,isGroup:s.isGroup,supportsHiFi:s.hifiSupport.fullySupported,canLogout:!s.isLocalNetwork&&s.supportsLogout,incarnation:s.incarnation,isPlaying:o,spec:i}),(0,ct.jsx)(op,{devices:r,areWebPlayerCastDevicesAvailable:a,spec:i})]})})},cp=()=>{const{triggerRef:e,toggleDevicePicker:t,isPickerOpen:n}=Cc(),i=(0,at.useRef)(null),r=(0,at.useCallback)((()=>{t()}),[t]),s=[i.current,e.current].filter(se.P);return(0,ct.jsx)(Cu.W,{animation:!1,overlay:(0,ct.jsx)(lp,{tooltipTriggerId:Qu}),visible:n,onHide:r,offset:[0,12],placement:"top",theme:"device-picker",useLazyMounting:!0,renderInline:!0,triggerTarget:s,aria:{expanded:!1},popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:10,tether:!1}}]},children:(0,ct.jsx)($u,{ref:i,isPickerOpen:n,onLogInteraction:e=>{t(e)}})})};var up=n(77473);function dp(){const e=(0,Jn.V)(),t=function(){const e=(0,at.useContext)(oi);if(null===e)throw new Error("Trying to use 'ExternalAccessoryContext' without 'ExternalAccessoryProvider'!");return e}(),[n,i]=(0,at.useState)(null),r=(0,at.useCallback)((async()=>{const n=e.getDefaultDevice();if(null===n)return void i(null);const r=await t.lookup(n.name);i({audioDevice:n,externalAccessory:r})}),[e,t]);return(0,up.k)(K.B.DEVICE_CONNECTED,r),(0,at.useEffect)((()=>{r()}),[r]),n}const mp=()=>{const{remoteDeviceType:e,remoteDeviceIsGroup:t,connectionStatus:n}=(0,Uo.v)((e=>{const t=(0,bc.V)(e);return{remoteDeviceType:t.remoteDevice?.type,remoteDeviceIsGroup:t.remoteDevice?.isGroup,connectionStatus:t.connectionStatus}}),Vr.a),i=dp(),r=(0,at.useRef)(null),{canTogglePanel:s,isActive:a,togglePanel:o}=xc(),{spec:l,logger:c}=(0,Jr.r)(Su.p,{}),{interactionId:d}=c.logInteraction(Au(l,n,a)),m=(0,at.useCallback)((()=>o(d)),[d,o]),p=(0,at.useMemo)((()=>(0,Ic.tf)(e,t,i)),[i,t,e]);return(0,ct.jsx)(Vu,{triggerRef:r,children:(0,ct.jsx)(na,{isActive:a,disabled:!s,onToggle:m,label:u.Ru.get("playback-control.connect-picker"),icon:p,ref:r})})};var pp=n(49405),hp=n(12720),gp=n(99275),fp=n(12652),bp=n(42784),vp=n(3979);var yp=n(31200);const _p=({variant:e})=>(0,ct.jsx)(fr.E,{variant:e,semanticColor:"textBase",children:"Spotify"}),Ep="EWud4wqSpfeOyGOtgLBm",xp="rTTeJudTczo2EAep5Bpp",Cp=({children:e})=>(0,ct.jsxs)("div",{className:Ep,children:[(0,ct.jsx)(_p,{variant:"bodyMediumBold"}),e]}),Sp=({onHide:e})=>{const t=(0,Fo._Y)();return(0,ct.jsx)(Cp,{children:(0,ct.jsxs)("div",{className:xp,children:[(0,ct.jsx)(fr.E,{variant:"bodyMedium",children:"Enhance these headphones?"}),(0,ct.jsx)(Xs.H,{semanticColor:"textBrightAccent",onClick:()=>{t(In.$S.PUFFIN_START_ACTIVATION)},condensedAll:!0,size:"small",children:"Set up"}),(0,ct.jsx)(Xs.H,{semanticColor:"textSubdued",onClick:e,condensedAll:!0,size:"small",children:"Not now"})]})})},Ap=()=>{const{deviceFilterState:{audioDevice:e}}=(0,vp.j)();if(!e)return null;const t=e.transportType===gc.Yg.BLUETOOTH?e.name:"Wired Connection";return(0,ct.jsx)(Cp,{children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",children:`Optimized for ${t}`})})},wp=({hasDevice:e})=>(0,bc.l)()?(0,ct.jsx)(Cp,{children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",children:"Your enhanced listening"})}):e?(0,ct.jsx)(Cp,{children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",children:"Enhance your headphones"})}):(0,ct.jsx)(Cp,{children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",children:"Control your Lossless listening"})}),Ip=({state:e,hasDevice:t,onHide:n})=>{switch(e){case"detection":return(0,ct.jsx)(Sp,{onHide:n});case"initial":return(0,ct.jsx)(wp,{hasDevice:t});case"filters_applied":return(0,ct.jsx)(Ap,{});default:(0,B.k)(e)}return null},Tp="NqXZfzXIt7FuFwi8TLsK",Np=({children:e})=>{const{isPuffinPanelActive:t}=(0,yp.c)(),[n,i]=(0,at.useState)("none"),[r,s]=(0,is.x)("onboarding-dismissed:puffin",!1),{deviceFilterState:a,isHeadphoneDevice:o}=(0,vp.j)(),l=(0,at.useRef)(a.audioDevice),c=(0,xi.N)().getSavedDevices().length>0;(0,at.useEffect)((()=>{if(l.current?.id!==a.audioDevice?.id){if(l.current=a.audioDevice,t||a.audioDevice?.terminalType!==gc.FI.HEADPHONES)return;r&&!a.isOnboarded?i("detection"):(a.currentState.externalizationEnabled||a.currentState.specificEnabled)&&i("filters_applied")}}),[a,r,t,l]);const u=(0,at.useCallback)((()=>{i("none")}),[]);return(0,at.useEffect)((()=>{const e=setTimeout(u,5e3);return()=>clearTimeout(e)}),[u,n]),(0,at.useEffect)((()=>{c||r||i("initial")}),[c,r,i]),(0,at.useEffect)((()=>{!t&&o||(u(),s(!0))}),[u,t,s,o]),(0,ct.jsx)(fp.W,{placement:"topStart",hideCloseButton:!0,overlay:"none"!==n&&(0,ct.jsx)(bp.A,{role:"alertdialog",arrow:"bottomEnd",colorSet:"invertedLight",className:Tp,onClose:u,children:(0,ct.jsx)(Ip,{state:n,hasDevice:o,onHide:u})}),children:e})},Rp=In.$S.PUFFIN_BUTTON_CLICK,kp=In.$S.DEVICE_PICKER_BUTTON_CLICK,Op=()=>{const{togglePuffin:e,isPuffinPanelActive:t}=(0,yp.c)(),{isActive:n,panelSend:i}=(0,Fo.AI)(Ho.Z.DevicePicker),r=(0,Fo.Ev)(Rp),s=(0,a.NC)(Ie.VUN),{remoteDeviceType:o,remoteDeviceisGroup:l}=(0,Uo.v)((e=>{const t=(0,bc.V)(e);return{remoteDeviceType:t.remoteDevice?.type,remoteDeviceisGroup:t.remoteDevice?.isGroup}}),Vr.a),c=dp(),u=c?.audioDevice.terminalType===gc.FI.HEADPHONES,d=(()=>{const{deviceFilterState:e}=(0,vp.j)();return e.currentState.externalizationEnabled||e.currentState.specificEnabled})(),m=s?n:t,p=d||u,h=(0,at.useMemo)((()=>d?pp.C:s?(0,Ic.tf)(o,l,c):hp.r),[c,d,s,l,o]);return(0,ct.jsx)(Np,{children:(0,ct.jsx)(na,{isActive:m,isActiveNoIndicator:p,onToggle:s?()=>{const e=n;i(kp),e||(0,gp.I)("DEVICE-PICKER")}:e,label:s?"Connect to a device":"Enhanced listening",icon:h,disabled:!r,restoreFocusKey:t?Ho.Z.Puffin:Ho.Z.DevicePicker})})},Pp=()=>{const{isAnonymous:e}=(0,nt.d4)(ma.Ht),t=(0,Eu.v)();return e?null:(0,ct.jsx)(xu.u,{property:Ie.VUN,renderNewExperience:()=>t?(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(Op,{})}):(0,ct.jsx)(mp,{}),renderOldExperience:()=>(0,ct.jsxs)(ct.Fragment,{children:[t&&(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(Op,{})}),(0,ct.jsx)(cp,{})]})})};var jp=n(72728),Lp=n(89426);const Dp=({onClick:e})=>{const{item:t}=(0,Lp.L)()??{},{isActive:n,onClick:i,showButton:r}=(0,Jo.D)({item:t,onClick:e});return t&&r?(0,ct.jsx)(na,{isActive:n,onToggle:i,label:n?u.Ru.get("miniplayer.close"):u.Ru.get("miniplayer.open"),icon:Qo.F,testId:"pip-toggle-button"}):null};var Up=n(9421);const Mp="main-nowPlayingBar-extraControls",Bp="main-nowPlayingBar-lyricsButton",Fp="main-nowPlayingBar-volumeBar",Hp=()=>{const e=(0,a.NC)(Ie.yux),{setVideoPlayerUIFlag:t,videoPlayerMode:n}=(0,Lr.d)(),{spec:i,logger:r,UBIFragment:s}=(0,Jr.r)(Wr.h9,{data:{identifier:n===Kt.K.cinema?Wr.gw.CINEMA:Wr.gw.DESKTOP}}),o=(0,Ra.YQ)((e=>{r.logInteraction(i.volumeBarFactory().dragSetVolume({newVolumePercentage:Math.floor(100*e)}))}),500,{leading:!1,trailing:!0}),l=(0,at.useCallback)((e=>{e&&t(Kt.n.cinema,!1)}),[t]);return(0,ct.jsx)(s,{spec:i,children:(0,ct.jsxs)("div",{className:Mp,children:[(0,ct.jsx)(jp.mA,{onClick:()=>{r.logInteraction(i.djJumpButtonFactory().hitRefreshContent())}}),(0,ct.jsx)(nu,{onClick:e=>{e?r.logInteraction(i.npvButtonFactory().hitUiReveal()):r.logInteraction(i.npvButtonFactory().hitUiHide())}}),!e&&(0,ct.jsx)(su,{className:Bp,onClick:e=>{e?r.logInteraction(i.lyricsButtonFactory().hitUiNavigate({destination:e})):r.logInteraction(i.lyricsButtonFactory().hitUiNavigateBack())}}),(0,ct.jsx)(_u,{onClick:e=>{"main"===e.mode?e.route?r.logInteraction(i.queueButtonFactory().hitUiNavigate({destination:e.route})):r.logInteraction(i.queueButtonFactory().hitUiNavigateBack()):e.aboutToShow?r.logInteraction(i.queueButtonFactory().hitUiReveal()):r.logInteraction(i.queueButtonFactory().hitUiHide())}}),(0,ct.jsx)(Pp,{}),(0,ct.jsx)(Up.M,{className:Fp,onVolumeBarClick:e=>{r.logInteraction(i.volumeBarFactory().hitSetVolume({newVolumePercentage:Math.floor(100*e)}))},onToggleMuteClick:e=>{"muted"===e?r.logInteraction(i.volumeMuteButtonFactory().hitMutePlayback()):"not_muted"===e&&r.logInteraction(i.volumeMuteButtonFactory().hitUnmutePlayback())},onVolumeBarDrag:o}),(0,ct.jsx)(Dp,{onClick:l}),(0,ct.jsx)(Fc,{className:"control-button",disabledClassName:"control-button--disabled",onClick:e=>{e&&r.logInteraction(i.fullscreenButtonFactory().hitUiReveal())}})]})})};var Vp=n(61127),zp=n(84378),Gp=n(17066);const Wp="yyrJTUPMeLS8qs1a0YJr",Kp=({logoUrl:e})=>e?(0,ct.jsx)("div",{className:Wp,"":"context-ad-logo",children:(0,ct.jsx)(Gp.N,{loading:"eager",imgSrc:e,width:56,height:56,type:M.c.AD})}):null,Yp=({item:e,context:t,index:n})=>{const{logoImage:i}=(0,Vp.iz)(e);return(0,ct.jsx)(zp.e,{item:e,context:t,index:n,"aria-label":u.Ru.get("ad-formats.advertisement"),adEventReason:Rl.c.AD_LOGO,isVisible:!1,children:(0,ct.jsx)(Kp,{logoUrl:i})})};var qp=n(33037);const Qp=at.memo((function({uri:e,className:t,onClick:n,size:i=aa.t.xs}){const[r,s]=(0,qp.A)(e),a=(0,$r.W)(),o=(0,at.useCallback)((t=>{t.preventDefault(),a({targetUri:e,intent:r?"remove-from-library":"add-to-library",type:"click"}),n&&n(!r),s(!r)}),[a,e,r,n,s]);return(0,ct.jsx)(aa.M,{className:t,size:i,onClick:o,isAdded:!!r,isAudiobook:!0})}));var $p=n(98652);const Zp=({uri:e,isBook:t=!1,size:n=aa.t.xs,className:i,onClick:r})=>{const{isPreSaved:s,addPresave:a,removePresave:o}=(0,$p.w)({uri:e,isBook:t}),l=(0,at.useCallback)((()=>{s?o():a(),r?.(!s)}),[s,r,o,a]);return(0,ct.jsx)(aa.M,{className:i,size:n,onClick:l,isAdded:!!s,isAudiobook:!0})};var Xp=n(48327),Jp=n(16265),eh=n(27906),th=n(65656),nh=n(54047),ih=n(84847),rh=n(2092),sh=n(16368),ah=n(17252),oh=n(6038),lh=n(44060);function ch(e){return(0,Zt.v)(e)||(0,$t.p)(e)}const uh="main-nowPlayingWidget-nowPlaying",dh="main-coverSlotCollapsed-navAltContainer",mh="main-nowPlayingWidget-coverArt",ph="main-nowPlayingWidget-trackInfo",hh="HD9s7U5E1RLSWKpXmrqx",gh=({onClick:e})=>{const t=(0,Lp.L)(),{draggable:n,onDragStart:i}=(0,rh.P)(),{isActive:r,panelSend:s}=(0,Fo.AI)(Ho.Z.NowPlayingView);if(null===t)return null;const{context:a,item:o}=t,l=In.$S.NPV_BUTTON_CLICK;return(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(ah.W,{context:a,item:o}),children:(0,ct.jsx)("div",{draggable:n&&ch(o),onDragStart:e=>{i(e,{itemUris:[o.uri],dragLabelText:(0,lh.r)(o)})},children:(0,ct.jsx)(oh.R,{uri:a.uri,owner:a.metadata?.context_owner,children:(0,ct.jsx)("button",{type:"button","":"cover-art-button",className:hh,"aria-label":u.Ru.get("web-player.now-playing-view.label"),onClick:()=>{s(l),e?.(r)},children:(0,ct.jsx)(sh.b,{item:o,size:56,maxSize:56,className:mh})})})})})};var fh=n(38723),bh=n(1860);const vh="main-coverSlotCollapsed-container",yh="main-coverSlotCollapsed-expandButton",_h=In.$S.NPV_BUTTON_CLICK,Eh=({children:e,className:t})=>{const n=(0,Fo.Ev)(_h),{isActive:i}=(0,Fo.AI)(Ho.Z.NowPlayingView),r=(0,Fo._Y)(),s=(0,at.useMemo)((()=>i?{label:u.Ru.get("npb.collapseCoverArt"),Icon:bh.r}:{label:u.Ru.get("npb.expandCoverArt"),Icon:fh.o}),[i]);return(0,ct.jsxs)("div",{"":"CoverSlotCollapsed__container",className:gr()(vh,t),children:[e,(0,ct.jsx)(_s.Zp,{label:s.label,children:(0,ct.jsx)("button",{className:gr()(yh),disabled:!n,onClick:()=>{r(_h)},"aria-label":u.Ru.get("web-player.now-playing-view.label"),"aria-pressed":i,children:(0,ct.jsx)(s.Icon,{iconSize:16})})})]})};var xh=n(798),Ch=n(93656),Sh=n(27742);const Ah=({context:e,item:t,className:n,onClick:i=(()=>{})})=>{const r=(0,at.useContext)(wi.w),s=(0,zt.K)(),a=e.metadata?.["dislike-endpoint"]??null,{enqueueSnackbar:o}=(0,Sh.d)(),l=e.metadata?.[L.W.CONTEXT_DESCRIPTION]??"",c=(0,at.useCallback)((async()=>{a&&(await Ch.i(W.n.getInstance(),a,t.uri),e.uri&&await r.resync(e.uri),s.skipToNext(),o(u.Ru.get("feedback.hide-song",l)),i?.())}),[a,t.uri,e.uri,s,o,l,i,r]);if(!(0,Zt.v)(t))return null;return"1"===e.metadata?.["dislike-feedback-available"]&&null!==a?(0,ct.jsx)(xh.O,{className:gr()(n,{"control-button":!n,"control-button-feedback":!n}),isDisliked:!1,onClick:c}):null};var wh=n(60204),Ih=n(10132);var Th=n(71132),Nh=n(24640);const Rh=({context:e,item:t,onLike:n})=>{const i=(0,Th.X)(),r=(0,Jp.v)(t);if(i&&(0,th.N)(t))return(0,ct.jsx)(eh.o,{contextUri:t.metadata?.context_uri??e.uri,id:t.uid??void 0,uri:t.uri,isActive:!0});if(r)return(0,ct.jsx)(Xp.g,{uri:t.uri,condensed:!1});if((0,Zt.v)(t))return t.isLocal?null:(0,ct.jsx)(la.b,{uri:t.uri,className:"control-button control-button-heart",onClick:n});if((0,$t.p)(t))return(0,ct.jsx)(oa.b,{uri:t.uri,className:"control-button control-button-heart",onClick:n});if((0,Qt.d)(t)){return"trailer"===t?.metadata?.type&&"true"===t?.metadata?.is_pre_release?(0,ct.jsx)(Zp,{uri:t.book.uri,isBook:!0,className:"control-button control-button-heart",onClick:n}):(0,ct.jsx)(Qp,{uri:t.book.uri,className:"control-button control-button-heart",onClick:n})}return(0,qt.N)(t)||(0,Xt.v)(t)?null:(0,B.d)(t)},kh=({state:{item:e,context:t,index:n}})=>{!function(e){const t=(0,Ih.i)(),n=(0,wh.X)(e);(0,at.useEffect)((()=>{n&&t.say(n)}),[n,t])}(e);const{videoPlayerMode:i,setVideoPlayerUIFlag:r}=(0,Lr.d)(),{spec:s,logger:o}=(0,Jr.r)(Kr.p6,{data:{identifier:i===Kt.K.cinema?Kr.gw.CINEMA:Kr.gw.DESKTOP}}),l=(0,wh.P)(e),c=(0,a.NC)(Ie.WAA),u=(0,uo.w)(e);(0,at.useEffect)((()=>{r(Kt.n.nowPlayingBar,c)}),[c,r]);const d=i===Kt.K.nowPlayingBar&&c,m=(0,Nh.xF)(e.uri);return(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsxs)("div",{"":"now-playing-widget",className:uh,role:"contentinfo","aria-label":l,children:[u?(0,ct.jsx)(Yp,{item:e,context:t,index:n}):(0,ct.jsxs)(Eh,{className:dh,children:[!d&&(0,ct.jsx)(gh,{onClick:t=>{t?o.logInteraction(s.coverartFactory({uri:e.uri}).hitUiReveal()):o.logInteraction(s.coverartFactory({uri:e.uri}).hitUiHide())}}),c&&(0,ct.jsx)("div",{id:"VideoPlayerNpb_ReactPortal"})]}),(0,ct.jsx)(nh.d,{context:t,className:ph,item:e,size:"xsmall",enableVideoButton:!0,onTitleClick:t=>{o.logInteraction(s.titleFactory({uri:e.uri}).hitUiNavigate({destination:t||""})),e.type===M.c.TRACK&&m({categoryAndAction:Nh.Mu.NowPlayingBar,destinationUrl:(0,j.o_)(t)?.toURL()})},onSubtitleClick:t=>{o.logInteraction(s.subtitleFactory({uri:e.uri}).hitUiNavigate({destination:t||""}))},referrer:ih.G.NPB}),(0,ct.jsx)(Ah,{context:t,item:e,onClick:()=>{o.logInteraction(s.hideButtonFactory().hitRemoveRecommendation({recommendedItemUri:e.uri,contextUri:t.uri}))}}),(0,ct.jsx)(Hr.r,{spec:s,children:(0,ct.jsx)(Rh,{item:e,onLike:t=>{o.logInteraction(t?s.likeButtonFactory({uri:e.uri}).hitLike({itemToBeLiked:e.uri}):s.likeButtonFactory({uri:e.uri}).hitRemoveLike({itemNoLongerLiked:e.uri}))},context:t})})]})})},Oh=()=>{const e=(0,Lp.L)();return null===e?(0,ct.jsx)("div",{className:gr()("now-playing")}):(0,ct.jsx)(kh,{state:e})};var Ph=n(97075);const jh="aguQsGoZR9wZeawKGdDh",Lh="ieqOSqJb6kk3bG5XDOHk",Dh=({paused:e,fromSeconds:t})=>{const[n,i]=(0,at.useState)(t);return(0,Ph.$)((t=>{i((n=>e?n:n>0?n-1:(t(),n)))}),1e3),(0,ct.jsxs)("div",{className:jh,children:[u.Ru.get("ad-formats.skippable_ads.skip_countdown"),(0,ct.jsx)("span",{className:Lh,children:n})]})},Uh=e=>{const t=e?.item??void 0;return(0,qt.N)(t)},Mh=e=>{const t=e?.item??void 0;return(0,qt.N)(t)&&"video"===t.mediaType},Bh=e=>{const t=e?.item??void 0;return(0,qt.N)(t)&&"audio"===t.mediaType},Fh=({children:e})=>{const t=(0,Fr.o)((e=>e),((e,t)=>(0,Vr.a)(e?.restrictions,t?.restrictions)&&e?.item?.uri===t?.item?.uri&&e?.isPaused===t?.isPaused)),n=t?.restrictions.disallowSkippingNextReasons.includes("ad_disallow"),i=t?.isPaused??!1,r=Bh(t),s=Mh(t),a=(0,nt.d4)((e=>r?e?.ads?.audio?.info?.skippableAdDelaySeconds:s?e?.ads?.vto?.info?.skippableAdDelaySeconds:void 0));return n&&a?(0,ct.jsx)(Dh,{paused:!!i,fromSeconds:a}):(0,ct.jsx)(ct.Fragment,{children:e})};var Hh=n(80890),Vh=n(32063),zh=n(85031),Gh=n(57827),Wh=n(6963),Kh=n(633),Yh=n(51915),qh=n(41876);const Qh=(0,at.memo)((function({item:e}){const t=e.isPodcastAd;return(0,ct.jsxs)("div",{"":"ad-controls",className:"player-controls__buttons player-controls__buttons--new-icons",children:[(0,ct.jsxs)("div",{className:"player-controls__left",children:[t&&(0,ct.jsx)(qh.w,{}),(0,ct.jsx)(Vh.T,{item:e}),t?(0,ct.jsx)(Gh.h,{}):(0,ct.jsx)(Kh.d,{})]}),(0,ct.jsx)(zh.x,{}),(0,ct.jsxs)("div",{className:"player-controls__right",children:[t?(0,ct.jsx)(Wh.v,{}):(0,ct.jsx)(Fh,{children:(0,ct.jsx)(Yh.$,{})}),(0,ct.jsx)(Hh.t,{item:e})]})]})}));var $h=n(10551),Zh=n(53159),Xh=n(46782);const Jh=(0,at.memo)((function({isPreview:e}){const t=(0,zt.K)(),{videoPlayerMode:n}=(0,Lr.d)(),{spec:i,logger:r}=(0,Jr.r)(Pr.kD,{data:{identifier:n===Kt.K.cinema?Pr.gw.CINEMA:Pr.gw.DESKTOP}}),s=(0,Fr.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri)),a=(0,uo.w)(s),o=bs();return(0,ct.jsxs)("div",{className:"player-controls","":"player-controls",dir:"ltr","aria-label":u.Ru.get("playback-control.a11y.landmark-label"),children:[a?(0,ct.jsx)(Qh,{item:s}):(0,ct.jsxs)("div",{className:"player-controls__buttons player-controls__buttons--new-icons","":"general-controls",children:[(0,ct.jsxs)("div",{className:"player-controls__left",children:[o&&(0,ct.jsx)(qh.w,{onClick:e=>{const n=t.getState();n?.item&&r.logInteraction(i.speedControlButtonFactory().hitSetPlaybackSpeed({currentlyPlayedItem:n.item.uri,playbackSpeed:e}))}})," ",!o&&(0,ct.jsx)(Ca,{renderEnabled:()=>(0,ct.jsx)(Hr.r,{spec:i,children:(0,ct.jsx)(_a,{size:"small"})}),renderDisabled:()=>(0,ct.jsx)(Xh.u,{onClick:e=>{r.logInteraction(e?i.shuffleButtonFactory().hitShuffleEnable():i.shuffleButtonFactory().hitShuffleDisable())}})}),o&&(0,ct.jsx)(Gh.h,{onClick:e=>{r.logInteraction(i.seekBackButtonFactory().hitSeekByTime({msSeekedOffset:e}))}}),(0,ct.jsx)(Kh.d,{onClick:()=>{const e=t.getState();e&&r.logInteraction(i.previousButtonFactory().hitSkipToPrevious({itemToBeSkipped:e.item?.uri||"",positionMs:(0,$h.s)(e)??-1,totalContentMs:e.duration??-1}))}})]}),(0,ct.jsx)(zh.x,{onClick:e=>{const n=t.getState();n?.item&&("resume"===e?r.logInteraction(i?.playPauseButtonFactory().hitResume({itemToBeResumed:n.item.uri})):"pause"===e&&r.logInteraction(i?.playPauseButtonFactory().hitPause({itemToBePaused:n.item.uri})))}}),(0,ct.jsxs)("div",{className:"player-controls__right",children:[(0,ct.jsx)(Fh,{children:(0,ct.jsx)(Yh.$,{onClick:()=>{const e=t.getState();e?.item&&r.logInteraction(i.nextButtonFactory().hitSkipToNext({itemToBeSkipped:e.item.uri,positionMs:(0,$h.s)(e)??-1,totalContentMs:e.duration??-1}))}})}),o&&(0,ct.jsx)(Wh.v,{onClick:e=>{r.logInteraction(i.seekForwardButtonFactory().hitSeekByTime({msSeekedOffset:e}))}}),!o&&(0,ct.jsx)(Zh.s,{onClick:e=>{const t={[D.p.REPEAT_NONE]:i.repeatButtonFactory().hitRepeatDisable(),[D.p.REPEAT_TRACK]:i.repeatButtonFactory().hitRepeatOneEnable(),[D.p.REPEAT_CONTEXT]:i.repeatButtonFactory().hitRepeatEnable()};r.logInteraction(t[e])}})]})]}),(0,ct.jsx)(gs,{isPreview:e})]})})),eg="main-nowPlayingBar-container",tg="main-nowPlayingBar-nowPlayingBar",ng="MWD1i_CSJ5N9wRBDpZmX",ig="k3NVrHXkbfflNdAxpT1_",rg="m8UPWsNtWbdkvBNvqgBN",sg="aepuRyT82biv_XmkH1eS",ag="main-nowPlayingBar-left",og="main-nowPlayingBar-center",lg="main-nowPlayingBar-right",cg=()=>{const{isAnonymous:e}=(0,nt.d4)(ma.Ht),t=(0,nt.wA)(),n=(0,$r.W)(),i=(0,Fr.o)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.item?.uri===t?.item?.uri)),r=(0,Fr.o)((e=>(0,qt.N)(e?.item??void 0))),s=(0,zt.K)(),a=(0,Mc.U)();(0,at.useEffect)((()=>{s.setForcedShuffle(a)}),[a,s]);const o=(0,at.useCallback)((e=>{e.stopPropagation(),t((0,ec.Ai)()),n({intent:"signup",type:"click"})}),[t,n]),l=()=>(0,ct.jsx)(Il.ql.Provider,{value:"now_playing_bar",children:(0,ct.jsxs)("div",{className:e?ng:tg,children:[(0,ct.jsx)("div",{className:ag,children:(0,ct.jsx)(Oh,{})}),(0,ct.jsx)("div",{className:og,children:(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(Jh,{isPreview:e})})}),(0,ct.jsx)("div",{className:lg,children:(0,ct.jsx)(Hp,{})})]})});return(0,ct.jsx)(Uc.P,{surface:Dc.u.NOW_PLAYING,children:(0,ct.jsx)(Ps.pZ,{value:"now-playing-bar",children:(0,ct.jsxs)("footer",{className:eg,"":"now-playing-bar","data-testadtype":"ad-type-"+(r?"ad":"none"),children:[e?(0,ct.jsx)(Ps.pZ,{value:"preview-bar",children:(0,ct.jsx)(sc,{handleClick:o})}):null,e?(0,ct.jsx)(Wl.A,{in:i?.hasContext??!1,timeout:200,classNames:{enter:ig,enterActive:rg,enterDone:sg},children:l()}):l(),(0,ct.jsx)(Lc,{})]})})})};var ug=n(13430),dg=n(84098),mg=n(57449),pg=n(73075),hg=n.n(pg),gg=n(16454);var fg=function(e){return e[e.DOWN=-1]="DOWN",e[e.NONE=0]="NONE",e[e.UP=1]="UP",e}(fg||{});const bg=10,vg=({cssCustomProperty:e,min:t,max:n,collapseEvents:i,collapsible:r=!!i,ranges:s=("number"==typeof t&&"number"==typeof n?[[t,n]]:[]),value:a,initialValue:o,onCSSPropertyChange:l,label:c,placement:u,elementRef:d,decreaseSizeKeyboardCombination:m,increaseSizeKeyboardCombination:p,afterResizing:h,canDragOpen:g=!0,isClosed:f,contentId:b})=>{const[v,y]=(0,at.useState)(!1),[_,E]=(0,at.useState)(0===o||0===a),x=(0,at.useRef)(_),C=(0,at.useRef)(!1),S=(0,at.useRef)(l);S.current=l;const[A,w]=(0,at.useState)((()=>o??parseInt(getComputedStyle(document.documentElement).getPropertyValue(e),10))),I=(0,at.useRef)(0);I.current=A;const T=(0,od.W)(),N=(0,at.useCallback)(((e,t=fg.NONE)=>{let n=s;if(r&&(n=Object.assign([],s,{0:[0,s[0][1]]}),e<.1*s[0][0]))return 0;if(n.some((([t,n])=>t<=e&&e<=n)))return e;switch(t){case fg.NONE:{const[t,n]=s.slice().sort((([t,n],[i,r])=>Math.min(Math.abs(t-e),Math.abs(n-e))-Math.min(Math.abs(i-e),Math.abs(r-e))))[0],i=e<t?t:n;if(i!==I.current){const e=b?document.getElementById(b):null;e?.classList?.remove("disableTransitions"),setTimeout((()=>{e?.classList?.add("disableTransitions")}),ns.cp)}return i}case fg.UP:{const t=s.find((([t],n)=>(s[n-1]?.[1]??0)<e&&e<t)),n=t?.[0];return n?Math.ceil(n/bg)*bg:e}case fg.DOWN:{const t=s.find((([t,n],i)=>{const r=s[i+1]?.[0]??1/0;return n<e&&e<r})),n=t?.[1];return n?Math.floor(n/bg)*bg:e}default:return(0,B.k)(t),e}}),[r,s,b]),R=(0,at.useCallback)((e=>{if(!d.current)return null;const t=d.current.getBoundingClientRect();return"inline-start"===u?T?e-t.left:t.right-e:"inline-end"===u?T?t.right-e:e-t.left:null}),[u,d,T]),k=(0,at.useRef)(null),O=(0,at.useCallback)((t=>{t!==k.current&&(document.documentElement.style.setProperty(e,`${t}px`),k.current=t)}),[e]),P=(0,at.useCallback)(((e,t=!1)=>{if(null==e)return;const n=0!==e||v?N(e):0;E(0===n),O(n),w(n),t||S.current?.(n)}),[N,O,v]);(0,at.useEffect)((()=>{x.current!==_&&(v?_?i?.onCollapse?.(!0):i?.onExpand?.(!0):C.current&&(_&&i?.onCollapse?.(!1),C.current=!1),x.current=_)}),[_,i,v]);const j=(0,Ra.YQ)(P,50,{leading:!0,maxWait:100});if((0,at.useEffect)((()=>{void 0!==a&&j(a)}),[a,j]),(0,at.useLayoutEffect)((()=>{void 0!==o&&P(o,!0)}),[o,P]),Number.isNaN(A)){const e=(s[0][1]-s[0][0])/2;console.error(`[LayoutResizer] css property value is not a number. Defaulting to ${e}`),P(e)}const L=(0,at.useCallback)((e=>{u.startsWith("inline")?j(R(e.clientX)):j(R(e.clientY))}),[u,j,R]),D=(0,at.useCallback)((()=>{const e=b?document.getElementById(b):null;if(e?.classList.remove("disableTransitions"),d.current?.clientWidth){const e=d.current.clientWidth;r&&t&&e<t&&e>0&&(d.current?.clientWidth&&d.current.clientWidth>=.8*t||_?(E(!1),P(t)):(E(!0),P(0),C.current=!0))}}),[r,b,d,_,t,P]),U=(0,at.useCallback)(((e,t)=>{setTimeout(D,200),h?.(e,t)}),[D,h]),M=(0,at.useCallback)((()=>{const e=b?document.getElementById(b):null;e?.classList.add("disableTransitions");const t=I.current;y(!0),document.addEventListener("pointerup",(()=>{y(!1),document.removeEventListener("pointermove",L),e?.classList.remove("disableTransitions"),U(t,I.current)}),{once:!0}),document.addEventListener("pointermove",L)}),[b,L,U]);(0,at.useEffect)((()=>(m&&hg().bind(m,(()=>{P(N(A-bg,-1))})),p&&hg().bind(p,(()=>{P(N(A+bg,1))})),()=>{m&&hg().unbind(m),p&&hg().unbind(p)})),[m,N,p,A,P]);const F=s[0][0],H=s[s.length-1][1];return(0,ct.jsxs)(ct.Fragment,{children:[v&&(0,ct.jsx)("div",{className:"LayoutResizer__resize-overlay"}),(0,ct.jsxs)("div",{"":"LayoutResizer__resize-bar",onPointerDown:M,className:gr()("LayoutResizer__resize-bar",{"LayoutResizer__resize-bar--resizing":v,"LayoutResizer__inline-start":"inline-start"===u,"LayoutResizer__inline-end":"inline-end"===u,"LayoutResizer__block-start":"block-start"===u,"LayoutResizer__block-end":"block-end"===u,LayoutResizer__collapsible:r,LayoutResizer__collapsed:_||f,LayoutResizer__disabled:_&&!g||!r&&f}),onDoubleClick:()=>{const e=s.findIndex((([e])=>e===A)),t=s.findIndex((([e,t])=>t===A));if(-1!==t){const e=s.at(t+1);e?P(e[0]):r&&i?.onCollapse?.(!1)}else if(-1!==e){const t=s.at(e-1);t&&P(t[1])}else _&&i?.onExpand?.(!1)},children:[r&&(0,ct.jsx)("div",{className:"LayoutResizer__closed-handle"}),(0,ct.jsx)(gg.o,{className:"LayoutResizer__input",type:"range",min:F,max:H,onChange:function(e){if(v)return;const t=I.current;let n=parseInt(e.target.value,10);n=N(n,Math.sign(n-A)),j(n),U(t,n)},value:a??A,step:bg,children:c})]})]})};var yg=n(5342),_g=n(57055);const Eg=({elementRef:e})=>{const{spec:t,logger:n}=(0,Jr.r)(dg.j,{data:{identifier:"yourlibraryx"}}),i=(0,zc.vW)(),{isGridView:r}=(0,yg.t)(),{size:s,setSize:a,minMaxRanges:o}=(0,_g.y)(),l=(0,od.W)();let c="default";i===zc.fX.COLLAPSED?c="collapsed":i===zc.fX.EXPANDED&&(c=r?"expanded_grid":"expanded_list");const d=(0,at.useCallback)(((e,i)=>{e!==i&&n.logInteraction(t.sidebarFactory({uri:"",identifier:c}).dragUiResize({startSizePx:e,endSizePx:i}))}),[n,c,t]);return(0,ct.jsx)(vg,{elementRef:e,placement:"inline-end",label:u.Ru.get("resize.sidebar"),cssCustomProperty:"--left-sidebar-width",onCSSPropertyChange:e=>{a(e)},initialValue:s,ranges:o,decreaseSizeKeyboardCombination:l?mg.gO.NPV_SIDEBAR_DECREASE_WIDTH:mg.gO.YLX_SIDEBAR_DECREASE_WIDTH,increaseSizeKeyboardCombination:l?mg.gO.NPV_SIDEBAR_INCREASE_WIDTH:mg.gO.YLX_SIDEBAR_INCREASE_WIDTH,afterResizing:d,contentId:"Desktop_LeftSidebar_Id"})},xg={},Cg=e=>null===e.match(/\/search\/(\w+|\W+){1,}/gi)?e:"search-result",Sg=({scrollNodeRef:e,children:t,scrollNodeChildRef:n})=>{const i=(0,at.useRef)(""),r=(0,cn.zy)(),s=(0,cn.wQ)(),a=(0,at.useCallback)((()=>{if(!e.current)return()=>{};const t=Cg(r.pathname),n=xg[t];let i;if(n&&"POP"===s){const t=Date.now(),r=()=>{!e.current||Date.now()>t+3e3?clearInterval(i):e.current.scrollHeight>=n+e.current.offsetHeight&&(e.current.scrollTop=n,clearInterval(i))};i=setInterval(r,50),r()}else e.current.scrollTop=0;return()=>{clearInterval(i)}}),[r.pathname,s,e]);(0,at.useMemo)((()=>{if(!e.current)return;const t=Cg(i.current);xg[t]=e.current.scrollTop,i.current=r.pathname}),[r.pathname,e]),(0,at.useLayoutEffect)((()=>a()),[r.pathname,a,e]);const o=(0,at.useMemo)((()=>({scrollNodeRef:e,scrollNodeChildRef:n})),[e,n]);return(0,ct.jsx)(Il.bi.Provider,{value:o,children:t})};var Ag=n(9901);const wg={isRightSidebarVisible:!0,isNavBarVisible:!0,isNowPlayingBarVisible:!0,isTopBarVisible:!0,isMainViewExpanded:!1},Ig=(e,t)=>{switch(t.type){case"resetMainView":return{...e,isRightSidebarVisible:!0,isNavBarVisible:!0,isNowPlayingBarVisible:!0,isTopBarVisible:!0,isMainViewExpanded:!1};case"collapseMainView":return{...e,isRightSidebarVisible:!1,isNavBarVisible:!1,isNowPlayingBarVisible:!1,isTopBarVisible:!1,isMainViewExpanded:!0};default:return e}},Tg=({children:e})=>{const[t,n]=(0,at.useReducer)(Ig,wg),i=(0,at.useMemo)((()=>({...t,resetMainView:()=>n({type:"resetMainView"}),collapseMainView:()=>n({type:"collapseMainView"})})),[t,n]);return(0,ct.jsx)(Il.oH.Provider,{value:i,children:e})},Ng=e=>{const t=(0,At.ZY)()??document;(0,at.useEffect)((()=>{if(!e)return;const n=e=>{const t=e.target;["INPUT","TEXTAREA"].includes(t.tagName)||e.preventDefault()};return t.addEventListener("contextmenu",n),()=>{t.removeEventListener("contextmenu",n)}}),[t,e])};var Rg=n(59875);function kg(e){const{backgroundColor:t}=(0,ht.oI)();return t||e}var Og=n(11867),Pg=n(97247),jg=n(46150),Lg=n(6333),Dg=n(12669),Ug=n(98258),Mg=n(90923);const Bg="main-topBar-buddyFeed",Fg="main-globalNav-buddyFeed",Hg=({onClick:e,tooltipLabel:t,ariaLabel:n,className:i,disabled:r,testId:s,children:a,restoreFocusKey:o})=>(0,Mg.A)()?(0,ct.jsx)(_s.Zp,{label:t,children:(0,ct.jsx)(Xs.H,{"aria-label":n,onClick:e,size:"small",condensedAll:!0,"":s,className:gr()(Fg,i),"data-restore-focus-key":o,children:a})}):(0,ct.jsx)(_s.Zp,{label:t,children:(0,ct.jsx)("div",{children:(0,ct.jsx)("button",{"aria-label":n,className:gr()((0,Ug.AC)("overMedia"),Bg,i),onClick:e,disabled:r,"data-restore-focus-key":o,children:a})})});var Vg=n(28049);const zg=async(e,t)=>{const n=W.n.getInstance();await n.build().withHost(v.dv).withJsonContentType().withoutMarket().withMethod("POST").withBody({notification_ids:e,state:t}).withPath("/UpdateNotificationState").send()},Gg=()=>{const{data:e}=(0,Vg.I)({queryKey:["notification-unread-status"],queryFn:async()=>await(async()=>{const e=W.n.getInstance();return(await e.build().withHost(v.dv).withJsonContentType().withoutMarket().withMethod("POST").withPath("/GetUserHasUnreadNotification").send()).body})(),staleTime:6e5,refetchInterval:e=>!e.state.data?.userHasUnreadNotification&&108e5});return e?.userHasUnreadNotification??!1};var Wg=n(59313),Kg=n(16799),Yg=n(88682),qg=n(16579);const Qg=()=>{const{data:e,isLoading:t,fetchNextPage:n,hasNextPage:i}=(0,qg.q)({queryKey:["notifications"],queryFn:async({pageParam:e})=>await(async e=>{const t=W.n.getInstance();return(await t.build().withHost(v.dv).withJsonContentType().withoutMarket().withMethod("POST").withBody({check_further_unread:!0,cursor:e}).withPath("/GetNotifications").send()).body})(e),initialPageParam:void 0,getPreviousPageParam:e=>e.reverse_cursor,getNextPageParam:e=>e.forward_cursor,gcTime:18e5,staleTime:6e5});return{notifications:e?.pages.map((e=>e.notifications)).flat()??[],isLoading:t,hasNextPage:i,fetchNextPage:n}};let $g=function(e){return e.UNKNOWN_STATE="UNKNOWN_STATE",e.UNREAD="UNREAD",e.READ="READ",e.CLICKED="CLICKED",e[e.UNRECOGNIZED=NaN]="UNRECOGNIZED",e}({}),Zg=function(e){return e.bass="bass",e.forte="forte",e.brio="brio",e.alto="alto",e.canon="canon",e.cello="cello",e.ballad="ballad",e.ballad_bold="ballad_bold",e.viola="viola",e.viola_bold="viola_bold",e.mesto="mesto",e.mesto_bold="mesto_bold",e.metronome="metronome",e.finale="finale",e.finale_bold="finale_bold",e.minuet="minuet",e.minuet_bold="minuet_bold",e[e.UNRECOGNIZED=NaN]="UNRECOGNIZED",e}({});const Xg="osmUo7ie6cDWRNwHq1le",Jg="KROerAKSuwZBbse9iJT_",ef="X0f9yl0vfdlQU4bX4p2Q",tf="ELJKm9oK4ojPrEohxqWu",nf="GRIcLOxMVgF_nrfnY4Uv",rf="ECeOpd1vpoOavSRlnAvd",sf="eUqphQq1C_Rpj86v0C76",af="q_y6r1A1e8D5uNZ_Menz",of="jG4F9TThOut3mIchASGW",lf="SuKZtj8PyNFy4RV6GSem",cf="SO8ZVeRnaa3OYx4hD5WZ",uf="FSi_NkGvBacIY9AQ3Enf",df="RRTp4ESOekxPGhzyjzt5",mf="KFhPNPSqzSZjHtAi0Kqz",pf="O84I6j6mdxtM8lakjPzR",hf="WATiQKibA4mYnP3g6KaM",gf="uMb3SCMkyWe4a1PJ56T6",ff="y77CgOUQOe6c5bjVe4GX",bf="QeUrkqvHAbXSveKN2wCu",vf=()=>(0,ct.jsx)("div",{className:gr()(ef,tf,nf),children:(0,ct.jsx)(fr.E,{semanticColor:"textSubdued",variant:"marginal",children:u.Ru.get("web-player.notification-center.empty-state")})});var yf=n(28072);const _f=({lastItemRef:e})=>(0,ct.jsx)("div",{className:gr()(ef,tf),ref:e,children:(0,ct.jsx)(yf.a3,{semanticColor:"textSubdued"})});var Ef=n(37128),xf=n(61681),Cf=n(94009);const Sf=({primaryImages:e})=>(0,ct.jsx)("div",{className:of,children:e.length>1?(0,ct.jsx)("div",{className:uf,children:e.map(((t,n)=>(0,ct.jsx)("div",{className:df,style:{zIndex:e.length-n},children:(0,ct.jsx)(Ef.e,{imageClassName:sf,placeholderClassName:sf,label:"notificationAvatar",width:32,images:[{url:t.image_url}],userIconSize:"medium",username:t.displayName,displayName:t.displayName})},n)))}):(0,ct.jsx)(Ef.e,{images:e.map((e=>({url:e.image_url}))),userIconSize:"large",label:"notificationAvatar",width:48,username:e[0]?.displayName,displayName:e[0]?.displayName})}),Af=({primaryImage:e,secondaryImage:t})=>(0,ct.jsxs)("div",{className:of,children:[(0,ct.jsx)(xf.b,{className:lf,images:[{url:e.image_url}],iconSize:"medium",size:Cf.Qe.SIZE_40,type:M.c.PLAYLIST,title:e.displayName}),(0,ct.jsx)(Ef.e,{className:cf,imageClassName:sf,placeholderClassName:sf,label:"notificationAvatar",width:24,images:[{url:t.image_url}],userIconSize:"small",username:t.displayName,displayName:t.displayName})]});var wf=n(56386),If=n.n(wf),Tf=n(19065),Nf=n(45916);const Rf=e=>{switch(e){case Zg.bass:return"headlineLarge";case Zg.forte:return"headlineMedium";case Zg.brio:return"titleLarge";case Zg.alto:return"titleMedium";case Zg.canon:return"titleSmall";case Zg.cello:case Zg.ballad:return"bodyMedium";case Zg.ballad_bold:return"bodyMediumBold";case Zg.viola:return"bodySmall";case Zg.viola_bold:return"bodySmallBold";case Zg.mesto:return"bodySmall";case Zg.mesto_bold:return"bodySmallBold";case Zg.metronome:return"bodyMediumBold";case Zg.finale:return"marginal";case Zg.finale_bold:return"marginalBold";case Zg.minuet:return"bodySmall";case Zg.minuet_bold:return"bodySmallBold";case Zg.UNRECOGNIZED:default:return"bodySmall"}},kf=({title:e,timestamp:t})=>{let n=0;const i=(0,at.useRef)(null),r=(0,Tf.K)({ref:i}),s=(0,at.useMemo)((()=>(0,Nf.Z)(Date.parse(t)).replace(/\s+/g,"")),[t]);return(0,ct.jsxs)("div",{className:mf,children:[(0,ct.jsx)(fr.E,{variant:Rf(e.text?.font_style),style:{color:e.text?.text_color,"--timestamp-text":`'${s}'`},className:hf,ref:i,children:If()(e.text?.text,/(\$\d+)/g,((t,i)=>{const r=(0,ct.jsx)(fr.E,{variant:Rf(e.text_values[n].font_style),style:{color:e.text_values[n].text_color},children:e.text_values[n].text},i);return n++,r}))}),r&&(0,ct.jsx)(fr.E,{variant:"marginal",semanticColor:"textSubdued",className:pf,children:s})]})},Of=()=>(0,ct.jsx)("div",{className:bf}),Pf=({notification:e,markAsRead:t})=>{const{ref:n,inView:i}=(0,Wg.Wx)();return(0,at.useEffect)((()=>{i&&e.state===$g.UNREAD&&t(e.notification_id)}),[i,t,e.notification_id,e.state]),(0,ct.jsxs)("div",{className:af,ref:n,children:[(0,ct.jsx)(Sf,{primaryImages:e.primary_images}),(0,ct.jsx)(kf,{title:e.title,timestamp:e.event_timestamp}),e.state===$g.UNREAD&&(0,ct.jsx)("div",{className:ff,children:(0,ct.jsx)(Of,{})})]})},jf=({notification:e,markAsRead:t})=>{const{ref:n,inView:i}=(0,Wg.Wx)();return(0,at.useEffect)((()=>{i&&e.state===$g.UNREAD&&t(e.notification_id)}),[i,t,e.notification_id,e.state]),(0,ct.jsxs)("div",{className:af,ref:n,children:[(0,ct.jsx)(Af,{primaryImage:e.primary_image,secondaryImage:e.secondary_image}),(0,ct.jsx)(kf,{title:e.title,timestamp:e.event_timestamp}),e.state===$g.UNREAD&&(0,ct.jsx)("div",{className:ff,children:(0,ct.jsx)(Of,{})})]})},Lf=({notifications:e,fetchNextPage:t,hasNextPage:n})=>{const i=(0,cn.Zp)(),r=(0,it.Oj)(),{ref:s,inView:a}=(0,Wg.Wx)();(0,at.useEffect)((()=>{a&&t()}),[t,a]);const o=(0,at.useCallback)((async e=>{zg([e],$g.CLICKED)}),[]),l=(0,at.useCallback)((async e=>{zg([e],$g.CLICKED)}),[]),c=(0,at.useCallback)((e=>{const t=(0,j.o_)(e.single_notification?.action?.uri??e.double_notification?.action?.uri).toURLPath(!0);i(t),r({type:"close"})}),[r,i]),u=(0,at.useCallback)((()=>e.map(((e,t)=>{const n=e.single_notification?.notification_id??e.double_notification?.notification_id;return(0,ct.jsx)(Yg.u,{children:(0,ct.jsx)(Kg.H,{role:"menuitem",className:gr()(ef,rf),onClick:()=>{l(n),c(e)},children:(i=e,Object.prototype.hasOwnProperty.call(i,"single_notification")?(0,ct.jsx)(Pf,{notification:e.single_notification,markAsRead:o}):(0,ct.jsx)(jf,{notification:e.double_notification,markAsRead:o}))})},t);var i}))),[l,o,c,e]);return(0,ct.jsx)(Rs.W,{className:Jg,children:e.length>0?(0,ct.jsxs)(ct.Fragment,{children:[u(),n&&(0,ct.jsx)(_f,{lastItemRef:s})]}):(0,ct.jsx)(vf,{})})},Df=()=>{const{notifications:e,isLoading:t,hasNextPage:n,fetchNextPage:i}=Qg();return t?(0,ct.jsx)(Rs.W,{className:Jg,children:(0,ct.jsx)(_f,{})}):(0,ct.jsx)(Lf,{notifications:e,hasNextPage:n,fetchNextPage:i})},Uf=()=>{const e=Gg();return(0,ct.jsx)(ws.b,{placement:"bottom-end",menu:(0,ct.jsx)(Df,{}),children:(0,ct.jsx)("div",{children:(0,ct.jsxs)(Hg,{tooltipLabel:u.Ru.get("web-player.notification-center.button-label"),ariaLabel:u.Ru.get("web-player.notification-center.button-label"),children:[(0,ct.jsx)(Dg.k,{className:Xg,size:"small"}),e&&(0,ct.jsx)("div",{className:gf,children:(0,ct.jsx)(Of,{})})]})})})};var Mf=n(48145),Bf=n(918);const Ff="sp_pfhp",Hf="pfhp",Vf=()=>{const e=(0,V.v8)(Ff),t=(()=>{const e=new URLSearchParams(window.location.search),t=e.get(Hf);return t&&(e.delete(Hf),window.history.replaceState(null,"",`${window.location.origin}${window.location.pathname}?${e}`)),t})();return t&&t!==e?((0,V.n0)({name:Ff,value:t,days:30}),t):e},zf=()=>{if("undefined"==typeof window)return!1;return"2c2ccb58-8a92-4713-a1c0-8b43b3090b49"===Vf()};var Gf=n(87058),Wf=n(93742),Kf=n(68420),Yf=n(30939);const qf=In.$S.BUDDY_FEED_BUTTON_CLICK,Qf=()=>{const e=(0,Fo.Ev)(qf),{isActive:t,panelSend:n}=(0,Fo.AI)(Ho.Z.BuddyFeed),{isSupported:i}=(0,Qi.C)().getCapabilities(),r=(0,Yf.n)(),s=(0,at.useCallback)((()=>{const e=t;n(qf),e||(0,gp.I)("BUDDY-FEED")}),[t,n]);return i?(0,ct.jsx)(Hg,{tooltipLabel:r?u.Ru.get("buddy-feed.friend-activity"):u.Ru.get("offline.feedback-text"),ariaLabel:u.Ru.get("buddy-feed.friend-activity"),disabled:!e,onClick:s,testId:"friend-activity-button",restoreFocusKey:Ho.Z.BuddyFeed,children:t?(0,ct.jsx)(Wf.F,{size:"small",semanticColor:"textBase"}):(0,ct.jsx)(Kf.B,{size:"small"})}):null};var $f=n(7125);const Zf=()=>{const e=(0,$f.V)();return(0,a.NC)(Ie.f7J)&&!e};var Xf=n(95891),Jf=n(71657),eb=n(10233),tb=n(26360),nb=n(63393);const ib=Spicetify.GraphQL.Definitions["queryWhatsNewFeed"]=new Q.l("queryWhatsNewFeed","query","4c3281ff1c1c0b67f56e4a77568d6b143da7cf1260266ed5d5147a5e49481493",null),rb=Spicetify.GraphQL.Definitions["whatsNewFeedNewItems"]=new Q.l("whatsNewFeedNewItems","query","4c3281ff1c1c0b67f56e4a77568d6b143da7cf1260266ed5d5147a5e49481493",null),sb=Spicetify.GraphQL.Definitions["SetItemsStateInWhatsNewFeed"]=new Q.l("SetItemsStateInWhatsNewFeed","mutation","4c3281ff1c1c0b67f56e4a77568d6b143da7cf1260266ed5d5147a5e49481493",null),ab="agh_IHo91VhyFTnp5BzM",ob="XVC0Gr8G4SXM0a98jbqC",lb="K8ygfuFNcx2tNcNv09JH";function cb(){const{name:e}=ib;return[e]}const ub=()=>{const e=(0,cn.Zp)(),t=(0,cn.zy)(),n=(0,hu.J)(),i="/content-feed"===t.pathname,r=i,[s,a]=(0,at.useState)(!1),{request:o}=(0,at.useContext)(ci.j),l=(0,bt.jE)(),{spec:c,logger:d}=(0,Jr.r)(eb.q,{});(0,at.useEffect)((()=>{let e=!1;const t=setInterval((async()=>{let t;try{t=await(0,tb.c)(o,rb,{})}catch{return}if(t?.errors)return;const n=t?.data?.whatsNewFeedHasNewItems||!1;if(n&&!e){const e=c.notificationsBellToggleFactory().notificationsIndicatorFactory().impression();d.logImpression(e),a(!0),l.invalidateQueries({queryKey:cb()})}e=n}),144e5);return()=>{clearInterval(t)}}),[d,l,o,c]);const m=()=>(0,ct.jsxs)("div",{className:ab,"":"notification-dot",children:[(0,ct.jsx)("span",{className:ob,children:u.Ru.get("new_releases")}),(0,ct.jsx)(nb.Z,{className:lb})]}),p=(0,at.useCallback)((()=>{i?(d.logInteraction(c.notificationsBellToggleFactory().hitUiNavigateBack()),n.length>1?n.goBack():e("/")):(a(!1),d.logInteraction(c.notificationsBellToggleFactory().hitUiNavigate({destination:"spotify:app:content-feed"})),e("/content-feed"))}),[i,d,c,n,e]);return(0,ct.jsxs)(Hg,{tooltipLabel:u.Ru.get("web-player.whats-new-feed.button-label"),ariaLabel:u.Ru.get("web-player.whats-new-feed.button-label"),testId:"whats-new-feed-button",onClick:p,children:[r?(0,ct.jsx)(Xf.c,{size:"small",semanticColor:"textBase"}):(0,ct.jsx)(Jf.a,{size:"small"}),s&&(0,ct.jsx)(m,{})]})};var db=n(23464),mb=n(13507),pb=n(55541);const hb=(e,t)=>{const n=(0,nt.wA)(),i=(()=>{const e=(0,$f.V)(),t=(0,mb.l)(),n=(0,a.NC)(Ie.d5A),i=!!(0,cn.RQ)({path:"/search",end:!1}),r=!!(0,cn.RQ)({path:"/collection",end:!1}),s=!!(0,cn.RQ)({path:"/collection/tracks"});return!(n||e||r&&!s||i)&&t})(),{openURLWithSessionTransfer:r}=(0,Bf.L)(),s=(0,pb.D)("loggedin_upgrade_button");return{shouldShowUpgradeButton:i,onUpgradeClick:(0,at.useCallback)((()=>{t.logInteraction(e.hitNavigateToExternalUri({destination:s(vr.M0)})),r(s(vr.M0),"_blank"),n((0,db.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[n,r,s,t,e])}};var gb=n(82274),fb=n(55154),bb=n(22653),vb=n(72653);const yb="YyUcY0HTiYikUOwhh29d",_b=(e,t)=>{if(!t)return null;const n=((e,t)=>{const[n=1,i=0,r=0,s=0]=e.split("."),[a=1,o=0,l=0,c=0]=t.split("."),u=1e9*Number(n)+1e6*Number(i)+1e4*Number(r)+Number(s);return 1e9*Number(a)+1e6*Number(o)+1e4*Number(l)+Number(c)-u})(e,t);return n>=2e4?"negative":n>=1e3?"warning":n>=500?"announcement":null},Eb=()=>{const e=(0,gb.k)(),t=(0,at.useContext)(Un.b),n=(0,at.useCallback)((()=>{t.prepareUpdate()}),[t]),i=(0,at.useCallback)((()=>{t.applyUpdate()}),[t]),[r,s]=(0,at.useState)(null),a=e?.version;if((0,at.useEffect)((()=>{t.getVersionInfo().then((e=>{const t=e.containerVersion.split(".");5===t.length&&t.pop(),s(t.join("."))}))}),[t]),e?.state===fb.D.UPDATE_NONE)return null;if(!r||!a)return null;const o=_b(r,a);if(!o)return null;switch(e?.state){case fb.D.UPDATE_AVAILABLE:return(0,ct.jsx)(_s.Zp,{label:u.Ru.get("release-notifier.update-available",a),children:(0,ct.jsx)(br.$,{size:"small",colorSet:o,onClick:n,className:yb,children:a})});case fb.D.UPDATE_PROCESSING:return(0,ct.jsx)(_s.Zp,{label:u.Ru.get("release-notifier.update-processing",a),children:(0,ct.jsx)(br.$,{size:"small",colorSet:o,disabled:!0,onClick:i,className:yb,children:a})});case fb.D.UPDATE_READY:return(0,ct.jsx)(_s.Zp,{label:u.Ru.get("release-notifier.update-ready",a),children:(0,ct.jsx)(br.$,{size:"small",colorSet:o,onClick:i,className:yb,children:a})});default:return null}},xb=()=>{const{settings:e}=(0,vb.t0)();return(0,bb.Q)(e.values)?(0,ct.jsx)(Eb,{}):null},Cb=()=>(0,ct.jsx)(xb,{});var Sb=n(41764),Ab=n(59841),wb=n(9530),Ib=n(38774),Tb=n(13961),Nb=n(65495),Rb=n(80707),kb=n(79938);function Ob(e,t){return t?(0,kb.r)(e):(0,Rb._)(e)}const Pb=({divider:e,visible:t})=>{const n=(0,Xi.vh)(),i=(0,$f.V)(),r=(0,at.useCallback)((()=>{n.send(Ob({category:"masthead",action:"click",label:"download-link",destination_url:vr.Kw,context:window.location.href,os:(0,S.f)(),variant:"a"},i))}),[n,i]);return t?(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",href:vr.Kw,onClick:r,target:"_blank",trailingIcon:(0,ct.jsx)(Nb.p,{size:"small"}),children:u.Ru.get("download.download")}):null},jb=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,nt.wA)(),r=(0,at.useCallback)((()=>{t.logInteraction(n.goToUpgradePlanPageRowFactory().hitNavigateToExternalUri({destination:vr.BW})),i((0,db.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[i,t,n]);return(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",trailingIcon:(0,ct.jsx)(Nb.p,{size:"small"}),onClick:r,href:vr.BW,target:"_blank",children:u.Ru.get("navbar.premium")})},Lb=({divider:e,visible:t})=>{const n=(0,Xi.vh)(),i=(0,$f.V)(),r=(0,at.useCallback)((()=>{n.send(Ob({category:"masthead",action:"click",label:"support-link",destination_url:vr.nw,context:window.location.href,os:(0,S.f)(),variant:"a"},i))}),[n,i]);return t?(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",href:vr.nw,onClick:r,target:"_blank",trailingIcon:(0,ct.jsx)(Nb.p,{size:"small"}),children:u.Ru.get("user.support")}):null},Db="8px",Ub="main-userWidget-box",Mb="main-userWidget-boxCondensed",Bb="main-userWidget-box",Fb="main-userWidget-dropDownMenu",Hb="main-avatar-avatar",Vb="NqzueDshzvgXEygqOGPG",zb="main-userWidget-screenReaderOnly",Gb="main-userWidget-notificationDot",Wb="tU7KjNh_lnoniCY_3zHQ",Kb="kD6L2BtiukbMHbIwCNef",Yb="main-userWidget-unableToUpdate",qb="main-userWidget-notificationIndicator",Qb="FZ4y0Q61kFpjJzUjCvSa",$b="main-userWidget-setupPlan",Zb="main-userWidget-hasAvatar",Xb=()=>{const e=(0,nt.d4)((e=>e.platform.isDesktop)),{spec:t,logger:n}=(0,Jr.r)(Tb.d,{});return(0,at.useEffect)((()=>{n.logImpression(t.impression())}),[n,t]),e?null:(0,ct.jsx)("div",{className:Fb,children:(0,ct.jsxs)(Rs.W,{children:[(0,ct.jsx)(jb,{ubiSpec:t,ubiLogger:n}),(0,ct.jsx)(Lb,{visible:!0}),(0,ct.jsx)(Pb,{visible:!0})]})})};function Jb(e){if(null===e)return null;const t=e["multiuserplan-member-type"],n=parseInt(e["multiuserplan-current-size"]||"1",10);switch(t){case"FAMILY_MANAGER":return{plan:"family",currentSize:n};case"DUO_MANAGER":return{plan:"duo",currentSize:n};default:return null}}const ev=`${vr.xD}?utm_source=spotify&utm_medium=menu&utm_campaign=your_account`,tv=({divider:e,ubiLogger:t,ubiSpec:n})=>{const{openURLWithSessionTransfer:i}=(0,Bf.L)();return(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",trailingIcon:(0,ct.jsx)(Nb.p,{size:"small"}),onClick:()=>{t.logInteraction(n.goToAccountPageRowFactory().hitUiNavigate({destination:ev})),i(ev)},children:u.Ru.get("user.account")})};var nv=n(97266),iv=n(46070);const rv=()=>{const{settings:e}=(0,vb.t0)(),t=(0,bb.Q)(e.values),{show:n}=(0,iv.j)();return t?(0,ct.jsxs)(nv.g,{displayText:"Debug Tools",children:[(0,ct.jsx)(Os.D,{role:"menuitem",onClick:()=>n(),children:"Debug Window"}),!1,(0,ct.jsx)(Os.D,{role:"menuitem",to:"/debug/locales",children:"Locales"})]}):null},sv=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,nt.wA)(),r=(0,at.useCallback)((()=>{t.logInteraction(n.logOutRowFactory().hitLogout()),i((0,Re.wH)())}),[i,t,n]);return(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",onClick:r,"":"user-widget-dropdown-logout",children:u.Ru.get("user.log-out")})},av=({divider:e,planAttributes:t,ubiSpec:n,ubiLogger:i})=>{const{openURLWithSessionTransfer:r}=(0,Bf.L)(),s="duo"===t.plan?"https://www.spotify.com/account/duo/":"https://www.spotify.com/account/family/";return(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",trailingIcon:(0,ct.jsx)(Nb.p,{size:"small"}),onClick:()=>{i.logInteraction(n.goToPlanManagementFactory().hitNavigateToExternalUri({destination:s})),r(s)},children:(0,ct.jsxs)("span",{className:$b,children:["duo"===t.plan?u.Ru.get("user.setup-duo"):u.Ru.get("user.setup-family"),t.currentSize<=1&&(0,ct.jsx)(nb.Z,{className:Gb,name:"dot-icon"})]})})};var ov=n(48832);const lv=({visible:e,divider:t,ubiSpec:n,ubiLogger:i})=>{const{isPrivateSession:r,setPrivateSession:s}=(0,ov.H)(),a=(0,at.useCallback)((()=>{i.logInteraction(n.togglePrivateSessionRowFactory().hitSetSettingField()),s(!r)}),[s,r,i,n]);return e?(0,ct.jsx)(Os.D,{divider:t,role:"menuitemcheckbox","aria-checked":r,onClick:a,children:u.Ru.get("user.private-session")}):null},cv="/preferences",uv=({divider:e,ubiLogger:t,ubiSpec:n})=>(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",to:cv,onClick:()=>{t.logInteraction(n.goToSettingsRowFactory().hitUiNavigate({destination:cv}))},children:u.Ru.get("user.settings")}),dv=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,gb.k)(),r=(0,at.useContext)(Un.b),s=(0,at.useCallback)((()=>{t.logInteraction(n.updateClientRowFactory().hitUiHide()),r.applyUpdate()}),[r,t,n]);return i?.state!==fb.D.UPDATE_READY?null:(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",onClick:s,trailingIcon:(0,ct.jsx)(nb.Z,{className:Gb}),"":"user-widget-update-available",children:u.Ru.get("user.update-client")})},mv=({divider:e})=>{const t=(0,nt.wA)(),n=(0,at.useCallback)((e=>{e.preventDefault(),t((0,et.as)())}),[t]);return(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",trailingIcon:(0,ct.jsx)(nb.Z,{className:Yb}),onClick:n,href:"",target:"_blank",children:u.Ru.get("user.unable-to-update")})},pv=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,nt.wA)(),r=(0,pb.D)("loggedin_upgrade_menu"),s=(0,at.useCallback)((()=>{t.logInteraction(n.goToUpgradePlanPageRowFactory().hitNavigateToExternalUri({destination:vr.BW})),i((0,db.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[i,t,n]);return(0,nt.d4)((e=>(0,ma.Yb)(e)))?(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",trailingIcon:(0,ct.jsx)(Nb.p,{size:"small"}),onClick:s,href:r(vr.BW),target:"_blank",children:u.Ru.get("upgrade.tooltip.title")}):null},hv=({divider:e,ubiSpec:t,ubiLogger:n})=>{const i=(0,nt.d4)((e=>e.session.user?.uri)),r=(0,zt.K)();if(!i)return null;const s=(0,j.o_)(i).toURLPath(!0);return(0,ct.jsx)(Os.D,{divider:e,role:"menuitem",to:s,onClick:()=>{n.logInteraction(t.goToUserProfileRowFactory().hitUiNavigate({destination:s})),r.setReferrer("user_profile")},children:u.Ru.get("card.tag.profile")})},gv=()=>{const e=(0,nt.d4)((e=>e.platform.isDesktop)),{spec:t,logger:n}=(0,Jr.r)(Tb.d,{});(0,at.useEffect)((()=>{n.logImpression(t.impression())}),[n,t]);const i=(0,Ib.k)(),r=Jb(i.data);return(0,ct.jsx)("div",{"":"user-widget-menu",className:Fb,children:(0,ct.jsxs)(Rs.W,{children:[(0,ct.jsx)(tv,{ubiSpec:t,ubiLogger:n}),r&&(0,ct.jsx)(av,{planAttributes:r,ubiSpec:t,ubiLogger:n}),(0,ct.jsx)(hv,{ubiSpec:t,ubiLogger:n}),(0,ct.jsx)(pv,{ubiSpec:t,ubiLogger:n}),(0,ct.jsx)(Lb,{visible:zf()}),(0,ct.jsx)(Pb,{visible:!e&&zf()}),(0,ct.jsx)(lv,{visible:e,ubiSpec:t,ubiLogger:n}),(0,ct.jsx)(uv,{divider:"after",ubiSpec:t,ubiLogger:n}),i?.data?.["client-deprecated"]&&(0,ct.jsx)(mv,{}),(0,ct.jsx)(dv,{ubiSpec:t,ubiLogger:n})," ",e&&(0,ct.jsx)(rv,{}),(0,ct.jsx)(sv,{ubiSpec:t,ubiLogger:n})]})})},fv=e=>{const t=(0,nt.d4)((e=>e.session.user)),n=(0,gb.k)(),i=Jb((0,Ib.k)().data),r=!!i&&i.currentSize<=1,s=(0,Mg.A)();if(!t&&zf())return(0,ct.jsx)(ws.b,{offset:[0,parseInt(Db,10)],placement:"bottom-end",menu:(0,ct.jsx)(Xb,{}),children:(e,t,n)=>(0,ct.jsx)("button",{className:gr()(Ub),type:"button",onClick:t,ref:n,"":"unauth-user-widget-link",children:e?(0,ct.jsx)(co.M,{size:"small","aria-hidden":"true"}):(0,ct.jsx)(Sb.d,{size:"small","aria-hidden":"true"})})});if(!t)return null;const a=t.display_name||t.id,o=t.display_name?.charAt(0).toUpperCase(),l=t?.images.length||!t.display_name,c=(0,wb.nj)(t?.avatarBackgroundColor||0),d=()=>(0,ct.jsxs)("div",{className:s?Qb:qb,children:[(0,ct.jsx)("span",{className:zb,children:u.Ru.get("user.update-available")}),(0,ct.jsx)(nb.Z,{className:gr()(Gb,{[Wb]:!l,[Kb]:s})})]}),m=s?"var(--background-elevated-base)":"var(--background-base)",p={backgroundColor:l?m:`#${c}`,color:Ab.black,lineHeight:s?"32px":"24px"},h=s?Bb:gr()((0,Ug.AC)("overMedia"),Mb),g=l?(0,ct.jsx)(Ef.e,{label:a,width:s&&t?.images.length?32:24,images:t?.images,userIconSize:"small",testID:"user-widget-avatar",transparent:!0,className:gr()({[Zb]:t?.images.length})}):(0,ct.jsx)(fr.E,{variant:"bodySmallBold","":"username-first-letter",style:p,className:s?Hb:Vb,children:o});return(0,ct.jsx)(ws.b,{offset:[0,parseInt(Db,10)],placement:"bottom-end",menu:(0,ct.jsx)(gv,{}),children:(t,i,s)=>(0,ct.jsx)(_s.Zp,{label:a,children:(0,ct.jsxs)(Xs.H,{className:h,onClick:t=>{e.onClick?.(t),i(t)},style:{backgroundColor:m},ref:s,condensedAll:!0,"aria-label":a,"":"user-widget-link",semanticColor:"textBase",children:[g,(n?.state===fb.D.UPDATE_READY||r)&&(0,ct.jsx)(d,{})]})})})};var bv=n(12909),vv=n(38074),yv=n(72345),_v=n(74161),Ev=n(62180),xv=n(56333);const Cv="400ms",Sv="main-topBarStatusIndicator-TopBarStatusIndicatorContainer",Av="main-actionButtons-button",wv="main-noConnection-isError",Iv="main-noConnection-isNotice",Tv="main-topBarStatusIndicator-hasTooltip",Nv="main-topBarStatusIndicator-tooltipIsError",Rv="main-topBarStatusIndicator-enter",kv="main-topBarStatusIndicator-enterActive",Ov="main-topBarStatusIndicator-exitActive",Pv="main-topBarStatusIndicator-tooltipEnter",jv="main-topBarStatusIndicator-notMinimized",Lv="main-topBarStatusIndicator-tooltipEnterActive";let Dv=function(e){return e.ERROR="ERROR",e.NOTICE="NOTICE",e}({});const Uv=(0,at.memo)((function(e){const{children:t,feedbackType:n,tooltip:i,itemId:r,display:s=!0,minimized:a=!1,spec:o}=e,l=(0,at.useRef)(null),c=(0,$r.W)(),u=(0,ot.s)();return(0,ct.jsx)(Wl.A,{in:s,timeout:parseInt(Cv,10),unmountOnExit:!0,onEnter:e=>{a||e.classList.add(Pv)},onEntered:e=>{a||e.classList.add(Lv)},onExited:e=>{a||e.classList.remove(Lv)},classNames:{enter:Rv,enterActive:kv,exitActive:Ov},children:(0,ct.jsx)(Ps.pZ,{value:r,children:(0,ct.jsx)("div",{className:gr()(Sv,{[jv]:!a}),children:(0,ct.jsx)(xv.y,{offset:[-2,20],action:"toggle",trigger:"click",content:(0,ct.jsx)(Xu.z,{className:gr()({[Nv]:n===Dv.ERROR}),children:(0,ct.jsx)("div",{children:i})}),renderInline:!1,children:(0,ct.jsx)("button",{className:gr()(Av,{[Tv]:i,[wv]:n===Dv.ERROR,[Iv]:n===Dv.NOTICE}),onClick:()=>{c({intent:"toggle",type:"click"}),o&&u.logInteraction(o.hitUiReveal())},ref:l,"":r,children:t})})})})})})),Mv="P8EYxpJkrSRcmY5CFfgZ",Bv="oMR8tk4wMj9_exGQeapz",Fv="qq3uDmbXwv31FKawHDIg",Hv="B64o12iyKiKF4s8uuClS";function Vv(e){if(null===e)return null;const t=Math.abs(Date.now()-e.getTime());if(t<1e3)return null;const{hours:n,minutes:i,seconds:r}=(0,Ev.S)(t),s=(0,yv.j)({h:n,m:i,s:r});return u.Ru.get("authorization-status.retrying",s)}const zv=({retryAt:e})=>{const t=(0,ti.O)(),[n,i]=(0,at.useState)(Vv(e)),r=(0,it.Oj)();return(0,at.useEffect)((()=>{const t=window.setInterval((()=>{i(Vv(e))}),500);return()=>{window.clearInterval(t)}}),[e,i]),(0,ct.jsxs)("div",{className:Mv,children:[(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMediumBold",children:u.Ru.get("authorization-status.title")}),(0,ct.jsx)("span",{className:Bv,children:n??u.Ru.get("authorization-status.reconnecting")}),(0,ct.jsxs)("div",{className:Fv,children:[(0,ct.jsx)(Xs.H,{semanticColor:"textBase",buttonSize:bv.$.sm,onClick:()=>{r({type:"close"})},children:u.Ru.get("authorization-status.dismiss")}),(0,ct.jsx)(br.$,{className:Hv,buttonSize:bv.$.sm,onClick:()=>t.tryAuthorize(),children:u.Ru.get("authorization-status.retry")})]})]})},Gv=({minimized:e,spec:t})=>{const n=(0,Yf.n)(),{isAuthorized:i,retryAt:r}=(0,_v.Y)();return(0,a.NC)(Ie.ueo)?(0,ct.jsxs)(Uv,{feedbackType:Dv.ERROR,minimized:e,display:n&&!i,spec:t,tooltip:(0,ct.jsx)(zv,{retryAt:r}),itemId:"authorization-status-indicator",children:[(0,ct.jsx)(vv.b,{size:"small"}),u.Ru.get("authorization-status.badge")]}):null};var Wv=n(25766),Kv=n(61938),Yv=n(87571),qv=n(19293);const Qv="PYPe3hJJmzsQV6XoN3Cl",$v="mqsHTSdyZwgRvD2Kylc1",Zv=()=>{const e=(0,ot.s)(),{spec:t}=(0,Jr.r)(Kv.V,{}),n=(0,it.Oj)(),i=(0,nt.wA)(),r=(0,at.useCallback)((()=>{n({type:"close"}),i(qv.r8.actions.open()),e.logInteraction(t.learnMoreButtonFactory().hitUiReveal())}),[i,e,n,t]);return(0,ct.jsxs)(fr.E,{className:Qv,variant:"bodySmall",children:[u.Ru.get("topBar.dsa-indicator"),(0,ct.jsx)(Xs.H,{className:$v,onClick:r,condensedAll:!0,size:"small",semanticColor:"textBase",children:u.Ru.get("topBar.dsa-cta")})]})},Xv=({spec:e})=>{const t=(0,Yv.p)();return(0,ct.jsx)(Hr.r,{spec:e,children:(0,ct.jsx)(Uv,{feedbackType:Dv.NOTICE,minimized:!0,display:!t,tooltip:(0,ct.jsx)(Zv,{}),itemId:"dsa-mode-status-indicator",spec:e,children:(0,ct.jsx)(Wv.p,{size:"small"})})})};var Jv=n(13380);const ey=({minimized:e,spec:t})=>{const n=!(0,Yf.n)();return(0,ct.jsxs)(Uv,{feedbackType:Dv.NOTICE,minimized:e,display:n,spec:t,tooltip:u.Ru.get("offline.callout-disconnected"),itemId:"offline-status-indicator",children:[(0,ct.jsx)(Jv.P,{size:"small"}),u.Ru.get("offline.badge")]})};var ty=n(66167);const ny=({minimized:e,spec:t})=>{const{isPrivateSession:n}=(0,ov.H)();return(0,ct.jsxs)(Uv,{feedbackType:Dv.NOTICE,minimized:e,display:n,tooltip:u.Ru.get("private-session.badge"),spec:t,itemId:"private-session-indicator",children:[(0,ct.jsx)(ty.y,{size:"small"}),u.Ru.get("private-session.badge")]})},iy=at.memo((function(e){const t=(0,Mf.U)("(max-width: 1023px)"),n=(0,at.useMemo)((()=>e.spec?.privateSessionButtonFactory()),[e.spec]),i=(0,at.useMemo)((()=>e.spec?.offlineButtonFactory()),[e.spec]),r=(0,at.useMemo)((()=>e.spec?.authorizationButtonFactory()),[e.spec]),s=(0,at.useMemo)((()=>e.spec?.dsaModeButtonFactory()),[e.spec]);return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(ny,{spec:n,minimized:t}),(0,ct.jsx)(ey,{spec:i,minimized:t}),(0,ct.jsx)(Gv,{spec:r,minimized:t}),(0,ct.jsx)(Xv,{spec:s})]})}));var ry=n(74938),sy=n(52995),ay=n(41116),oy=n(92731);function ly(e,t){switch(t.type){case"installed":return{...e,installed:!0};case"before-install":return{...e,deferredPrompt:t.prompt,canBeInstalled:!0};default:return e}}const cy=at.memo((({logger:e,spec:t})=>{const n=(0,nt.wA)(),i=(0,Xi.vh)(),r=(0,$f.V)(),{enqueueSnackbar:s}=(0,Sh.d)(),[a,o]=(0,at.useReducer)(ly,{deferredPrompt:void 0,installed:!1,canBeInstalled:!1});(0,at.useEffect)((()=>{const e=()=>{o({type:"installed"}),s(u.Ru.get("pwa.confirm"));const e={action_type:"unknown",action_intent:"pwa-installed",target_uri:"/pwa-install-confirmation",item_id:"pwa",view_uri:"/unknown",page:"/page"};i.send(r?(0,oy.o)(e):(0,ay.x)(e))},t=e=>{e.preventDefault(),o({type:"before-install",prompt:e})};return window.addEventListener("beforeinstallprompt",t),window.addEventListener("appinstalled",e),()=>{window.removeEventListener("beforeinstallprompt",t),window.removeEventListener("appinstalled",e)}}),[n,s,i,r]);const l=(0,at.useCallback)((n=>{if(n.preventDefault(),t&&e){const n=t.installPwaButtonFactory().hitInstallApp({appName:"pwa"});e.logInteraction(n)}a.deferredPrompt&&a.deferredPrompt.prompt()}),[t,e,a.deferredPrompt]),{canBeInstalled:c,installed:d}=a;return!c||d?null:(0,ct.jsx)(br.$,{colorSet:"overMedia",size:"small",onClick:l,iconLeading:Xm.i,children:(0,ct.jsx)(fr.E,{variant:"bodySmallBold",className:"ellipsis-one-line",children:u.Ru.get("pwa.download-app")})})})),uy=at.memo((({shouldCalloutPWA:e,spec:t,logger:n})=>{const i=(0,at.useCallback)((()=>{if(!t||!n)return;const e=t.installAppButtonFactory().hitNavigateToExternalUri({destination:"/download"});n.logInteraction(e)}),[n,t]),[r,s]=(0,at.useState)(!1),a=(0,at.useRef)(null);if((0,ry.w)({onResize:({width:e})=>{a.current?.scrollWidth&&e<a.current?.scrollWidth?s(!0):s(!1)},refOrElement:a}),!e){const e=(0,ct.jsx)(br.$,{colorSet:"overMedia",size:"small",href:"/download",iconLeading:Xm.i,onClick:i,component:sy.v,children:(0,ct.jsx)(fr.E,{variant:"bodySmallBold",className:"ellipsis-one-line",ref:a,children:u.Ru.get("navbar.install-app")})});return r?(0,ct.jsx)(_s.Zp,{label:u.Ru.get("navbar.install-app"),children:e}):e}return(0,ct.jsx)(cy,{logger:n,spec:t})}));var dy=n(47930),my=n(55521),py=n(39658),hy=n(85212),gy=n(13892);const fy={isCTA:!1,placement:hy.D.bottomLeft,shouldHideOnOutsideClick:({triggerAction:e})=>!e||e.type!==dy.Gs,getTitle:({triggerAction:e})=>e?.type===py.no.SAVE_PRERELEASE?u.Ru.get("action-trigger.log-in-or-sign-up"):u.Ru.get("action-trigger.logged-out"),getDescription:({triggerAction:e})=>{switch(e?.type){case my.gK.ADD_TO_QUEUE:return u.Ru.get("action-trigger.logged-out-queue");case py.$k.START_RADIO:return u.Ru.get("action-trigger.logged-out-radio");case py.no.SAVE_TRACK:return u.Ru.get("action-trigger.log-in-like-action");case py.no.SAVE_ALBUM:return u.Ru.get("action-trigger.save-album");case py.no.SAVE_PRERELEASE:return u.Ru.get("web-player.prerelease.album_anonymous_presave");case py.tf.FOLLOW_USER:return u.Ru.get("action-trigger.log-in-follow-profile");case dy.Gs:return"track"===e?.entityType?u.Ru.get("action-trigger.logged-out-full-track"):u.Ru.get("action-trigger.logged-out-synced");default:return u.Ru.get("action-trigger.logged-out-continue")}}},by=({children:e})=>(0,ct.jsx)(hy.y,{id:gy.d,options:fy,children:e});var vy=n(60786),yy=n(50783),_y=n(79522),Ey=n(12275);const xy=({...e})=>{const t=(0,cn.Zp)(),{spec:n,logger:i}=(0,Jr.r)(Lg.x,{}),r=(0,at.useMemo)((()=>n.upgradeButtonFactory()),[n]),s=(0,Iu.t)(r),a=(0,at.useCallback)((()=>{i.logInteraction(r.hitUiNavigate({destination:"spotify:app:premium"}))}),[i,r]),o=u.Ru.getLocaleForURLPath(),l=(0,nt.d4)(Ey.MU),c=(0,nt.d4)(Ey.NR),d=(0,yy.p)({localeFeatureFlag:l,entityFeatureFlag:c,urlLocale:o,entity:M.c.PREMIUM,type:"link"})?(0,vy.hF)("/premium"):"/premium";return(0,ct.jsx)(br.$,{...e,style:{flexShrink:0},ref:s,size:"small",onClick:(0,_y.X)()?()=>{a(),t(d)}:e.onClick,"aria-label":u.Ru.get("upgrade.tooltip.title"),title:u.Ru.get("upgrade.tooltip.title"),colorSet:"invertedLight","":"upgrade-button",children:u.Ru.get("upgrade.button")})};var Cy=n(62415);const Sy=(0,at.forwardRef)((({className:e},t)=>{const n=(0,$r.W)(),i=(0,nt.wA)(),r=Zf(),s=(0,nt.d4)(tc.q),o=(0,Yf.n)(),l=(0,$f.V)(),c=(0,a.NC)(Ie.y2l),d=(0,Mg.A)(),{spec:m,logger:p}=(0,Jr.r)(Lg.x,{}),h=(0,Mf.U)("(max-width: 849px)"),g=zf()&&l&&h,f=(0,at.useCallback)((()=>{i((0,ec.Ai)()),n({intent:"signup",type:"click"})}),[i,n]),b=(0,at.useCallback)((()=>{i((0,ec.zL)()),n({intent:"login",type:"click"})}),[i,n]),{openURLWithSessionTransfer:v}=(0,Bf.L)(),y=e=>{v(e,"_blank")},_=(0,at.useMemo)((()=>m.upgradeButtonFactory()),[m]),{shouldShowUpgradeButton:E,onUpgradeClick:x}=hb(_,p),C=(0,Mf.U)("(min-width: 1024px)"),{isDesktop:S,isPWA:A,shouldCalloutPWA:w}=(0,nt.d4)((e=>e.platform)),I=(0,at.useCallback)((()=>{p.logInteraction(m.profileButtonFactory().hitUiReveal())}),[p,m]);return(0,ct.jsxs)("div",{className:gr()(e,Cy.A.topbarContentRight),ref:t,children:[(0,ct.jsx)(iy,{spec:m}),l&&zf()&&!h?(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Xs.H,{condensed:!0,onClick:()=>y(`${vr.M0}&ref=web_loggedout_premium_button`),className:Cy.A.topNavBarLinks,children:u.Ru.get("navbar.premium")}),(0,ct.jsx)(Xs.H,{condensed:!0,onClick:()=>y(vr.nw),className:Cy.A.topNavBarLinks,children:u.Ru.get("user.support")}),(0,ct.jsx)(Xs.H,{condensed:!0,onClick:()=>y(vr.Kw),className:Cy.A.topNavBarLinks,children:u.Ru.get("download.download")}),(0,ct.jsx)("div",{className:Cy.A.topNavBarSeparator})]}):(0,ct.jsx)(ct.Fragment,{}),(0,ct.jsx)(Cb,{}),E&&C&&(0,ct.jsx)(xy,{onClick:x,className:Cy.A.UpgradeButton}),!l&&!s&&!S&&!A&&!(0,Gf.g)()&&(0,ct.jsx)(uy,{shouldCalloutPWA:w,logger:p,spec:m}),l&&(0,ct.jsxs)("div",{className:Cy.A.loginButtons,children:[(0,ct.jsx)(Xs.H,{className:Cy.A.signupButton,onClick:f,"":"signup-button",children:u.Ru.get("sign_up")}),(0,ct.jsx)(by,{children:(0,ct.jsx)(br.$,{colorSet:"invertedLight",onClick:b,"":"login-button",children:u.Ru.get("login")})})]}),(0,ct.jsxs)("div",{className:gr()({[Cy.A.globalNavBar]:d},Cy.A.topBarRightButtonContainer),children:[!l&&c&&(0,ct.jsx)(Uf,{}),r&&o&&(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(ub,{})}),!l&&(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(Qf,{})})]}),(!l||g)&&(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(fv,{onClick:I})})]})}));var Ay=n(10988);const wy=()=>{const e=(0,at.useRef)(null),{setElementRef:t}=(0,at.useContext)(Ay.J);return(0,at.useEffect)((()=>{t&&e.current&&t(e.current)}),[t]),(0,ct.jsx)("div",{"":"topbar-content-wrapper",className:Cy.A.topbarContentWrapper,ref:e})};var Iy=n(23659),Ty=n(27500);const Ny=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ry=({responsive:e,className:t})=>{const{spec:n,logger:i}=(0,Jr.r)(Lg.x,{}),{isNavBarVisible:r}=(()=>{const e=(0,at.useContext)(Il.oH);if(null===e)throw new Error("Trying to use 'VisibilityContext' without 'VisibilityProvider'!");return e})(),s=(0,cn.Zp)(),[a,o]=(()=>{const[e,t]=(0,nt.d4)((e=>[e.ui.history.canGoBack,e.ui.history.canGoForward]),Ny);return[e,t]})(),l=(0,Mg.A)(),c=(0,at.useCallback)((()=>{i.logInteraction(n.backButtonFactory().hitUiNavigateBack()),s(-1)}),[i,s,n]),d=(0,at.useCallback)((()=>{i.logInteraction(n.forwardButtonFactory().hitUiNavigateForwardInHistory()),s(1)}),[i,s,n]);return l?(0,ct.jsxs)("div",{className:gr()(t,Cy.A.globalNavBarHistoryButtonsContainer,{[Cy.A.fullscreenHistoryButtons]:!r}),children:[(0,ct.jsx)(_s.Zp,{label:u.Ru.get("navbar.go-back"),children:(0,ct.jsx)(Xs.H,{size:"medium",iconOnly:Iy.g,condensed:!0,"":"top-bar-back-button","aria-label":u.Ru.get("navbar.go-back"),disabled:!a,onClick:c,className:Cy.A.globalNavBarHistoryButton})}),(0,ct.jsx)(_s.Zp,{label:u.Ru.get("navbar.go-forward"),children:(0,ct.jsx)(Xs.H,{size:"medium",iconOnly:Ty.V,condensed:!0,"":"top-bar-forward-button","aria-label":u.Ru.get("navbar.go-forward"),disabled:!o,onClick:d,className:Cy.A.globalNavBarHistoryButton})})]}):(0,ct.jsxs)("div",{className:gr()(t,Cy.A.historyButtons,{[Cy.A.fullscreenHistoryButtons]:!r}),children:[(0,ct.jsx)(_s.Zp,{label:u.Ru.get("navbar.go-back"),children:(0,ct.jsx)("button",{"":"top-bar-back-button","aria-label":u.Ru.get("navbar.go-back"),disabled:!a,className:`${Cy.A.button}`,onClick:c,children:(0,ct.jsx)(Iy.g,{className:Cy.A.icon,size:"small"})})}),(0,ct.jsx)(_s.Zp,{label:u.Ru.get("navbar.go-forward"),children:(0,ct.jsx)("button",{"":"top-bar-forward-button","aria-label":u.Ru.get("navbar.go-forward"),disabled:!o,className:gr()(Cy.A.button,!1===e?Cy.A.forward:Cy.A.responsiveForward),onClick:d,children:(0,ct.jsx)(Ty.V,{className:Cy.A.icon,size:"small"})})})]})};function ky(e,t=1,n=0){if(n>t)return 1;let i=(e-n)/(t-n);return Number.isNaN(i)&&(i=1),Math.min(Math.max(i,0),1)}const Oy=()=>"/"===(0,cn.zy)().pathname,Py=["/","/home/","/content-feed/","/lyrics","/search","/search/:query","/search/:query/:category","/recent-searches","/section/:id","/genre/:id","/user/:username/:subpage","/user/:username/top/artists","/user/:username/top/tracks","/preferences","/artist/:id/featuring","/artist/:id/playlists","/artist/:id/appears-on","/artist/:id/discovered-on","/artist/:id/related"],jy={[Og.E.SMALL]:0,[Og.E.MEDIUM]:600,[Og.E.LARGE]:1024},Ly=()=>{const e=(0,Mg.A)(),t=kg(),n=(0,$f.V)(),i=Oy(),r=(()=>{const e=(0,Mg.A)(),t=(0,cn.zy)();return!e||Py.every((e=>null===(0,sn.B6)(e,t.pathname)))})(),s=(0,at.useRef)(null),{breakpoint:a}=(0,jg.x)(jy,s),o=0===(0,cn.zy)().pathname.indexOf("/artist"),l=void 0!==t;return r?(0,ct.jsx)(Pg.o.Provider,{value:a,children:(0,ct.jsxs)("header",{"":"topbar","aria-label":u.Ru.get("topBar.label"),className:gr()(Cy.A.container,{[Cy.A.withBackgroundBlur]:i,[Cy.A.loggedOut]:n&&!o}),children:[(0,ct.jsx)("div",{ref:s,className:Cy.A.background,style:{backgroundColor:t},children:l&&(0,ct.jsx)("div",{className:Cy.A.overlay})}),!e&&(0,ct.jsx)(Ry,{}),(0,ct.jsx)(wy,{}),!e&&(0,ct.jsx)(Sy,{})]})}):null};var Dy=n(2690),Uy=n(89018),My=n(71210);const By={[Og.E.SMALL]:0,[Og.E.MEDIUM]:600,[Og.E.LARGE]:1024},Fy=(0,at.forwardRef)((({children:e},t)=>{(0,My.$)();const n=(0,at.useRef)(null),i=(0,at.useRef)((0,Dy.D)(document.documentElement,"--content-spacing",0,"px")),r=(0,at.useRef)((0,Dy.D)(document.documentElement,"--content-max-width",1/0,"px")),s=(0,at.useCallback)((e=>null!==e&&n.current?Math.min(e,r.current)-2*i.current:null),[]);(0,at.useImperativeHandle)(t,(()=>n.current),[n]);const{breakpoint:a}=(0,jg.x)(By,n);return(0,ct.jsx)(Uy.L,{containerRef:n,postProcessWidth:s,children:(0,ct.jsx)("main",{ref:n,tabIndex:-1,children:(0,ct.jsx)(Pg.o.Provider,{value:a,children:e})})})}));var Hy=n(7564);function Vy(e){return e.sort(((e,t)=>t.timestamp-e.timestamp))}function zy(e,t){return t.some((t=>t.user.uri===e.user.uri))?t:Vy([...t,e])}function Gy(e,t){return t.filter((t=>t.user.uri!==e))}var Wy=n(29969),Ky=n(32247);function Yy(){const e=(0,Qi.C)(),t=(0,bt.jE)(),n=["friend-activity"],{subscribeToFriend:i,unSubscribeFromFriend:r}=function(e){const t=(0,Qi.C)(),n=(0,at.useRef)({}),i=(0,at.useRef)(e);i.current=e;const r=(0,at.useCallback)((e=>{const r=(0,j.o_)(e)?.username,s=t.subscribeToBuddyActivity(r,(e=>{e&&i.current(e)}));return n.current[e]=s,s}),[t]),s=(0,at.useCallback)((e=>{n.current[e]?.cancel(),delete n.current[e]}),[]);return(0,at.useEffect)((()=>{const e=n.current;return()=>{Object.values(e).forEach((e=>{e.cancel()}))}}),[]),{subscribeToFriend:r,unSubscribeFromFriend:s}}((e=>{t.setQueryData(n,((t=[])=>function(e,t){return Vy(t.map((t=>t.user.uri===e.user.uri?e:t)))}(e,t)))})),s=(0,Vg.I)({queryKey:n,queryFn:()=>Hy.xA(W.n.getInstance()).then((e=>(e.body.friends.forEach((e=>i(e.user.uri))),Vy(e.body.friends)))),staleTime:6e5,gcTime:36e5,refetchInterval:864e5,refetchOnWindowFocus:!1,refetchOnMount:"always",refetchOnReconnect:!0});return(0,Ky.N)(Wy.mc.OPERATION_COMPLETE,(async s=>{const a=s.data.uris;if(s.data.operation!==Wy.JK.FOLLOW_USER){if(s.data.operation===Wy.JK.UNFOLLOW_USER)for(const e of a)r(e),t.setQueryData(n,((t=[])=>Gy(e,t)))}else for(const r of a){const s=(await e.fetchFriendActivity([r]))[0];t.setQueryData(n,((e=[])=>zy(s,e))),i(r)}})),s}const qy=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(7564)]).then(n.bind(n,97927))));function Qy(){const{data:e,error:t,isLoading:n}=Yy();return!(0,Yf.n)()||n||t?null:(0,ct.jsx)(qy,{friends:e??[]})}var $y=n(77104),Zy=n(86984),Xy=n(26774),Jy=n(51765),e_=n(89063),t_=n(46593);const n_={context:null,item:null},i_=()=>(0,ct.jsx)(ct.Fragment,{}),r_=()=>(0,ct.jsx)(ct.Fragment,{});var s_=n(41791),a_=n(39841),o_=n(33350),l_=n(71375),c_=n(19277),u_=n(1523);const d_=({title:e,isActive:t,isPlaying:n,timestamp:i,onClick:r})=>{const s=(0,at.useCallback)((()=>{r(i)}),[r,i]);return(0,ct.jsx)(cm.v,{variant:"naked",id:e,hoverBackgroundColor:"backgroundTintedHighlight",activeBackgroundColor:"backgroundTintedBase",title:(0,ct.jsxs)(fr.E,{variant:"bodyMedium",semanticColor:t?"textBrightAccent":"textBase",className:"standalone-ellipsis-one-line",children:[n&&t&&(0,ct.jsx)(u_.J,{animated:t})," ",e]}),subtitle:(0,es.f)(i),onClick:s})};function m_(e,t){if(!e)return null;const n=(0,$h.s)(e);return null===n?null:t.findIndex((e=>(e.seekStart?.milliseconds??0)<=n&&(e.seekStop?.milliseconds??1/0)>=n))}const p_=12e5,h_=6e5,g_=Spicetify.GraphQL.Definitions["queryNpvEpisodeChapters"]=new Q.l("queryNpvEpisodeChapters","query","367f0e93a0d219ae6f5874bcc460201db0a43467ae94f16298931a704ac62ea6",null);var f_=n(957);const b_="Xh1TBgSrJAYVdjRM8zFV",v_="XtrKVBpPjO52Dsuh7Sl3",y_="Ebrqn7sM1CfWaEig2gQW",__=(0,at.memo)((({chapters:e,episodeUri:t,nextOffset:n,limit:i,isPlaying:r})=>{const s=(0,zt.K)(),{logger:a,spec:o}=(0,Jr.r)(l_.U,{}),{chapters:l,fetchNextPage:c}=(({uri:e,startOffset:t=0,pageSize:n,autoFetchOnMount:i=!0})=>{const{request:r}=(0,at.useContext)(ci.j),{data:s,isLoading:a,error:o,fetchNextPage:l}=(0,qg.q)({queryKey:["npv","episode-chapters",e,{startOffset:t,limit:n}],queryFn:({pageParam:t})=>(0,tb.c)(r,g_,function(e,t,n){return{offset:t,limit:n,uri:e}}(e,t,n)),staleTime:h_,gcTime:p_,enabled:i,initialPageParam:t,getNextPageParam:e=>{if("Episode"!==e?.data?.episodeUnionV2.__typename)return;const t=e.data.episodeUnionV2.displaySegments;return t?.displaySegments.pagingInfo.nextOffset&&t.displaySegments.pagingInfo.nextOffset>0?t.displaySegments.pagingInfo.nextOffset:void 0}}),c=(0,at.useCallback)((async()=>{await l()}),[l]);return{chapters:(0,at.useMemo)((()=>s?.pages.flatMap((e=>"Episode"===e?.data?.episodeUnionV2.__typename&&e.data.episodeUnionV2.displaySegments?.displaySegments.items?e.data.episodeUnionV2.displaySegments.displaySegments.items:[]))??[]),[s?.pages]),error:o,loading:a,fetchNextPage:c}})({uri:t,pageSize:i??10,startOffset:n??e.length,autoFetchOnMount:!1}),d=(0,at.useMemo)((()=>(l.length>0?[...e,...l]:e).filter(E_)),[e,l]),m=(e=>{const t=(0,zt.K)(),[n,i]=(0,at.useState)((()=>m_(t.getState(),e)));return(0,Ph.$)((()=>{const r=m_(t.getState(),e);r!==n&&i(r)}),500),n})(d),p=(0,at.useCallback)((e=>{s.seekTo(e),a.logInteraction(o.chapterRowFactory().hitSeekToTime({msToSeekTo:e})),s.getState()?.isPaused&&(s.resume(),a.logInteraction(o.chapterRowFactory().hitResume({itemToBeResumed:t})))}),[t,a,s,o]);return d.length?(0,ct.jsxs)(f_.w,{className:b_,children:[(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.now-playing-view.chapters")}),(0,ct.jsx)(c_._,{onReachBottom:c,triggerOnInitialLoad:!1,className:v_,children:(0,ct.jsx)(rd.$,{"aria-label":u.Ru.get("web-player.now-playing-view.chapters"),className:y_,children:d.map(((e,t)=>{if(!e.title||"number"!=typeof e.seekStart?.milliseconds)return null;const n=t===m;return(0,ct.jsx)(mm.c,{children:(0,ct.jsx)(d_,{onClick:p,timestamp:e.seekStart.milliseconds,title:e.title,isActive:n,isPlaying:r})},e.seekStart.milliseconds)}))})})]}):null}));function E_(e){return"TalkDisplaySegment"===e.__typename}const x_=Spicetify.GraphQL.Definitions["queryNpvEpisode"]=new Q.l("queryNpvEpisode","query","d336450eff069941d44152a5aa1488b6df0fbd8ee5830548f3f16926955e1ffd",null),C_=e=>"Episode"===e?.__typename,S_=e=>"__typename"in e&&"Podcast"===e.__typename,A_=e=>!!e&&"__typename"in e&&"Episode"===e.__typename;var w_=n(46317),I_=n(27778),T_=n(79124),N_=n(47498),R_=n(26271),k_=n(98196),O_=n(65179),P_=n(30957),j_=n(54745),L_=n(32334),D_=n(97374),U_=n(26903);const M_="YdLiRQVNwEQzUNR44QuY",B_="VVxt7MTKoKdOCVIWYfHn",F_="c21KEAgelRvfiGswmHy9",H_=({images:e,contentRating:t,contextTitle:n,contextUri:i,menu:r,position:s=0,title:a,type:o,uri:l,usePlayContextItem:c})=>{const d=(0,cn.Zp)(),{draggable:m,onDragStart:p}=(0,rh.P)(),h=(0,j.o_)(l)?.toURLPath(!0),g=i&&(0,j.o_)(i)?.toURLPath(!0),f=(0,Pg.y)(),{badges:b}=(0,U_.b)({contentRating:t}),{isPlaying:v,togglePlay:y}=c({uri:l}),{spec:_,logger:E}=(0,Jr.r)(O_.G,{data:{uri:l,position:s}}),x=(0,at.useCallback)((e=>{if(e.stopPropagation(),e.preventDefault(),h){const e=_.hitUiNavigate({destination:h});E.logInteraction(e),d(h)}}),[E,d,_,h]),C=(0,at.useCallback)((e=>{if(e.stopPropagation(),e.preventDefault(),h){const e=_.trackContainerFactory().trackInformationFactory().nameLinkFactory().hitUiNavigate({destination:h});E.logInteraction(e),d(h)}}),[E,d,_,h]),S=(0,at.useCallback)((e=>{if(e.stopPropagation(),e.preventDefault(),g){const e=_.trackContainerFactory().trackInformationFactory().contextLinkFactory({uri:i}).hitUiNavigate({destination:g});E.logInteraction(e),d(g)}}),[i,g,E,d,_]),A=(0,at.useCallback)((e=>{e.stopPropagation();const t=_.trackContainerFactory().coverArtFactory().hitPlay({itemToBePlayed:l});E.logInteraction(t),y()}),[E,_,y,l]),w=(0,at.useMemo)((()=>(0,ct.jsx)(_s.Zp,{label:a,children:(0,ct.jsx)(um.d,{lineClamp:f===Og.E.MEDIUM?1:2,children:h?(0,ct.jsx)(P_.default,{to:h,onClick:C,children:a}):a})})),[f,C,a,h]),I=(0,at.useMemo)((()=>(0,ct.jsxs)(dm.j,{lineClamp:1,children:[b.explicit&&(0,ct.jsx)(L_.g,{}),b.nineteen&&(0,ct.jsx)(D_.q,{}),o,g&&n&&(0,ct.jsxs)(ct.Fragment,{children:[" • ",(0,ct.jsx)(_s.Zp,{label:n,children:(0,ct.jsx)(P_.default,{to:g,onClick:S,children:(0,ct.jsx)(fr.E,{semanticColor:"textSubdued",children:n})})})]})]})),[b.explicit,b.nineteen,n,g,S,o]);return(0,ct.jsx)(pm.h,{menu:r,children:(0,ct.jsx)(cm.v,{activeBackgroundColor:"backgroundTintedPress",className:F_,draggable:m,hoverBackgroundColor:"backgroundTintedHighlight",id:l,layout:"regular",onClick:x,onDragStart:e=>{if(e.target!==e.currentTarget)return;p(e,{itemUris:[l],dragLabelText:`${a}${n?` • ${n}`:""}`,contextUri:i})},variant:"naked",title:w,subtitle:f===Og.E.MEDIUM&&I,body:f!==Og.E.MEDIUM&&I,paddingInlineStart:k_.v4,paddingInlineEnd:k_.v4,media:(0,ct.jsxs)("div",{className:M_,children:[(0,ct.jsx)(j_.x,{className:B_,isPlaying:v,isLocked:!1,onClick:A,playAriaLabel:u.Ru.get("tracklist.a11y.play",a,n)}),(0,ct.jsx)(xf.b,{type:M.c.EPISODE,title:a,shape:xf.u.ROUNDED_CORNERS,size:Cf.Qe.SIZE_48,images:e})]})})})},V_=({episode:e,position:t})=>{const n=e.podcastV2.data,i=S_(n)?n.uri:void 0,r=S_(n)?n.name:void 0,{usePlayContextItem:s}=(0,R_.P)({uri:i??e.uri},{featureIdentifier:"episode_ai_dubbing"});return(0,ct.jsx)(H_,{contentRating:e.contentRating?.label,contextTitle:r,contextUri:i,images:e.coverArt?.sources,menu:(0,ct.jsx)(N_.b,{uri:e.uri}),position:t,title:e.name,type:u.Ru.get("card.tag.episode"),uri:e.uri,usePlayContextItem:s},e.uri)},z_=e=>(0,ct.jsx)(fr.E,{...e,as:"div",variant:"bodySmall"});var G_=n(69647);const W_="KJEbbXyTy0gbIalPPwjP",K_=e=>(0,ct.jsx)(G_.B,{className:W_,...e}),Y_="dmEFRgvLS6M2o8rmoX6v",q_=({description:e,episodes:t,title:n,...i})=>(0,ct.jsxs)(f_.w,{...i,className:Y_,children:[(0,ct.jsx)(f_.X,{icon:(0,ct.jsx)(T_.H,{size:"small"}),tooltipLabel:n,children:n}),(0,ct.jsx)(z_,{children:e}),(0,ct.jsx)(K_,{children:t.map(((e,t)=>(0,ct.jsx)(V_,{episode:e,position:t},e.uri)))})]});function Q_({episode:e}){const t=(e=>e.aiDubbedEpisodes?.items?e.aiDubbedEpisodes.items.map((e=>e.data)).filter((t=>A_(t)&&t.uri!==e.uri)):[])(e),{spec:n}=(0,Jr.r)(w_.y,{});if(t.length<=0)return null;const i=(0,u.wB)(t[0]?.language?.code),r=t.length>1&&u.Ru.get("web-player.now-playing-view.dubbed-episodes.title-multiple")||i&&u.Ru.get("web-player.now-playing-view.dubbed-episodes.title-single-with-language",{language:(0,I_.kX)(i)})||u.Ru.get("web-player.now-playing-view.dubbed-episodes.title-single"),s=t.length>1?u.Ru.get("web-player.now-playing-view.dubbed-episodes.description-multiple"):u.Ru.get("web-player.now-playing-view.dubbed-episodes.description-single");return(0,ct.jsx)(Hr.r,{spec:n.episodeListFactory(),children:(0,ct.jsx)(q_,{description:s,episodes:t,title:r})})}var $_=n(38459);function Z_({episode:e}){const t=(e=>C_(e)&&e.originalEpisode&&A_(e.originalEpisode?.data)?e.originalEpisode.data:void 0)(e),{spec:n}=(0,Jr.r)($_.I,{});if(!t)return null;const i=(0,u.wB)(t.language?.code),r=i?u.Ru.get("web-player.now-playing-view.original-episode.title-with-language",{language:(0,I_.kX)(i)}):u.Ru.get("web-player.now-playing-view.original-episode.title"),s=i?u.Ru.get("web-player.now-playing-view.original-episode.description-with-language",{language:(0,I_.kX)(i)}):u.Ru.get("web-player.now-playing-view.original-episode.description");return(0,ct.jsx)(Hr.r,{spec:n,children:(0,ct.jsx)(q_,{description:s,episodes:[t],title:r})})}var X_=n(21660),J_=n(90730);const eE="YC6K2bFUeJkdE4cCvbD3",tE="vHQbygDcvOQ4Ls0W6vb1",nE="Ku9l84_lLCFE3crS1Y8B",iE="TortsxZeDfI28luc5Dac",rE="XHpZHlxCiVHe8qTVVskT",sE="lu9_R5Kw07YEWlq8eKs9",aE="RypbYIkqqlUkhxg_RwYm",oE=(0,at.memo)((function({transcriptSections:e,onTimeStampClick:t,episodeUri:n}){const{spec:i,logger:r}=(0,Jr.r)(X_.c,{data:{uri:n}}),{isPlaying:s}=(0,R_.P)({uri:n},{featureIdentifier:"episode"}),a=i.timestampLinkFactory();return(0,ct.jsx)(ct.Fragment,{children:(0,ct.jsxs)("div",{className:tE,children:[(0,ct.jsx)("div",{className:iE,children:(0,ct.jsx)(fr.E,{as:"p",variant:"marginal",semanticColor:"textSubdued",children:u.Ru.get("web-player.episode.transcript.disclaimer")})}),e.map(((e,i)=>{const o=`transcript-section-${i}`;return(0,ct.jsxs)("div",{className:nE,children:[(0,ct.jsx)("button",{className:rE,onClick:()=>{t(e.startMs,o),r.logInteraction(s?a.hitSeekToTime({msToSeekTo:e.startMs}):a.hitPlay({itemToBePlayed:n}))},children:(0,ct.jsx)(J_.k,{id:o,targetURI:(0,j.o_)(n),fadeOut:!0,children:(0,ct.jsx)(fr.E,{variant:"marginalBold",semanticColor:"textSubdued",className:sE,children:(0,es.f)(e.startMs)})})}),e.content.map(((e,t)=>(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textBase",className:aE,dir:"auto",children:e},`transcript-text-${t}`)))]},o)}))]})})}));var lE=n(77355),cE=n(87480);const uE=e=>{const[t,n]=(0,at.useState)(0);function i(i){const r=e.current?.querySelectorAll('button:not([disabled]), [href], input, select, textarea, a,[tabindex]:not([tabindex="-1"])');if(!r)return;r.forEach((e=>{e.setAttribute("tabindex","-1")})),r&&r[0].setAttribute("tabindex","0");let s=t;if(r&&r.length>0)switch(i.key){case"Tab":document.activeElement&&n(0);break;case"ArrowUp":0===s?(i.preventDefault(),s=r.length-1):s-=1,r[s].focus(),n(s);break;case"ArrowDown":i.preventDefault(),s===r.length-1?s=0:s+=1,r[s].focus(),n(s)}}at.useEffect((()=>{const t=e.current;return t?.addEventListener("keydown",i),()=>{t?.removeEventListener("keydown",i)}}))},dE=(e,t)=>{let n=0;if(0===e.length)return 0;for(let i=0;i<e.length&&!(t<e[i].startMs);i++)n+=e[i].numChars;return n},mE=e=>{const t=["transcript",{uri:e}],{data:n,isLoading:i,isError:r}=(0,Vg.I)({queryKey:t,queryFn:async()=>{if(e&&(0,j.gH)(e))return(async e=>{const t=(0,j.o_)(e).id,n=W.n.getInstance(),i=await n.build().withHost(v.ao).withPath(`/episode/${encodeURIComponent(t)}`).withEndpointIdentifier("/episode/{episodeId}").withoutMarket().withoutGlobalHeaders().withQueryParameters({format:"json"}).send();if(200!==i.status)throw new Error("failed to get read-along transcript");return i.body})(e)},gcTime:18e5,staleTime:6e5});return{data:n,loading:i,error:r}},pE="wYBEXo9heVZe_zkteOJ6",hE="EjaYcQIBa_uJkc86qrpQ",gE="QER3MDmhErzCc5bKcklD",fE="fAKKlaCbuHm_cDfnO3UW",bE="AHOmz0JPJhoOloFpM8s2",vE="d8y50Fa8LDK2Fuc92EaA",yE="XBYrBviGypqaAfM1BWxM",_E="G4fVEUX2caQTFPB7mA89",EE="ATHbG3rw7VRat_Knu9EO",xE="LsAbtB5dQLMOgNkK6uNl",CE="nng8b1skt_Yh69A8uReL",SE=e=>{switch(e){case Og.E.SMALL:return"titleSmall";case Og.E.LARGE:return"titleMedium";case Og.E.XLARGE:return"titleLarge";default:return"titleSmall"}},AE=({readAlongSection:e,readAlongIndex:t,index:n,activeIndex:i,onActiveSectionChange:r,breakpoint:s})=>{const a=(0,at.useRef)(!0),o=(0,at.useRef)(null);return(0,at.useEffect)((()=>{n===i&&r?(a.current&&r({sectionRef:o}),a.current=!1):a.current=!0}),[i,n,r]),void 0===e.text?.sentence?.text?null:(0,ct.jsx)("div",{ref:o,className:gr()(fE,{[bE]:n<i},s?.toLowerCase()),children:(0,ct.jsx)(fr.E,{as:"p",className:hE,variant:s?SE(s):"titleSmall",children:t>0?(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("span",{className:_E,children:e.text.sentence.text.substring(0,t)}),(0,ct.jsx)("span",{children:e.text.sentence.text.substring(t)})]}):e.text.sentence.text})})},wE={[Og.E.SMALL]:0,[Og.E.LARGE]:792,[Og.E.XLARGE]:1448},IE=({startMs:e,onTimestampClick:t})=>(0,ct.jsx)("button",{className:vE,onClick:()=>{t(e)},children:(0,ct.jsx)(fr.E,{className:yE,variant:"bodyMedium",children:(0,es.f)(e)})}),TE=({hidden:e,onClick:t})=>(0,ct.jsx)("div",{className:gr()(EE,{[xE]:e}),children:(0,ct.jsx)(br.$,{colorSet:"invertedLight",size:"small",onClick:t,iconLeading:lE.Q,"aria-label":u.Ru.get("web-player.read-along-transcript.sync.button"),children:u.Ru.get("web-player.read-along-transcript.sync.button")})}),NE=({episodeURI:e,mode:t})=>{const{data:n,loading:i,error:r}=mE(e),{spec:s,logger:a}=(0,Jr.r)(cE.c,{data:{uri:e}}),o=n?.section??[],l=s.timestampLinkFactory(),[c,u]=(0,at.useState)(!0),[d,m]=(0,at.useState)(!1),p=(0,zt.K)(),h=(0,Fr.o)((e=>e?.isPaused??void 0)),g=(0,at.useRef)(null),f=(0,at.useRef)(!1),b=(0,at.useRef)(null),v=(0,at.useRef)(null),y=(0,at.useRef)(null);uE(y);const{breakpoint:_}=(0,jg.x)(wE,v),{highlightedSentenceIndex:E,shouldAnimateScroll:x,readAlongIndex:C}=((e,t)=>{const n=(0,at.useRef)(0),[i]=(0,Zr.f)(100,(t=>t?.item?.uri===e));let r=t.findIndex((e=>e.text?.sentence?.text)),s=0;for(let e=0;e<t.length;e++){const n=t[e];if(i>=n.startMs&&(e===t.length-1||i<t[e+1].startMs)){r=e,n.text?.sentence&&(s=dE(n.text.sentence.highlight,i));break}}const a=Math.abs(n.current-(r??0))<=3;return n.current=r??0,{shouldAnimateScroll:a,highlightedSentenceIndex:r,readAlongIndex:s}})(e,o),S=(0,at.useCallback)((()=>{if(!v.current||!g.current)return;const e=g.current?.offsetTop-v.current?.offsetTop-24;void 0!==e&&(v.current?.scrollTo({top:e,behavior:x?"smooth":"auto"}),m(!1))}),[x]),A=(0,at.useCallback)((()=>{if(!v.current||!g.current)return;const e=g.current?.offsetTop-v.current?.offsetTop-24,t=g.current?.clientHeight;if(void 0===e)return;const n=e>=v.current.scrollTop&&e+t<=v.current.scrollTop+v.current.clientHeight;m(!n),u(n)}),[]),w=(0,at.useCallback)((t=>{p.seekTo(t).then((()=>setTimeout((()=>u(!0)),300))),h?(p.resume(),a.logInteraction(l.hitPlay({itemToBePlayed:e}))):a.logInteraction(l.hitSeekToTime({msToSeekTo:t}))}),[p,a,l,e,h]),I=(0,at.useCallback)((()=>{f.current=!0,b.current&&clearTimeout(b.current),b.current=setTimeout((()=>{f.current=!1}),500),A()}),[A]),T=(0,at.useCallback)((()=>{A(),f.current||c&&S()}),[c,A,S]);return i||r||0===o.length?null:(0,ct.jsx)(ct.Fragment,{children:(0,ct.jsxs)(Pg.o.Provider,{value:_,children:[(0,ct.jsx)("div",{className:gr()(pE,{[gE]:t===Vc.aY.npv}),ref:v,onWheel:I,children:(0,ct.jsx)("div",{className:CE,ref:y,children:(0,ct.jsx)("div",{children:o.map(((e,t)=>e.title?(0,ct.jsx)(IE,{onTimestampClick:w,startMs:e.startMs},t):(0,ct.jsx)(AE,{index:t,activeIndex:E,readAlongSection:e,readAlongIndex:E===t?C:0,onActiveSectionChange:({sectionRef:e})=>{g.current=e.current,T()},breakpoint:_},t)))})})}),(0,ct.jsx)(TE,{hidden:!!h||!d,onClick:()=>{a.logInteraction(s.syncButtonFactory().hitQuickScroll()),u(!0),S()}})]})})},RE=({mode:e})=>{const t=(0,Fr.o)((e=>e?.item),((e,t)=>e?.uri===t?.uri));return t?.uri&&(0,j.gH)(t.uri)?(0,ct.jsx)(NE,{mode:e,episodeURI:t.uri}):null};var kE=n(15343),OE=n(17072);let PE=function(e){return e.SET_TRANSCRIPT_UI_FLAG="SET_TRANSCRIPT_UI_FLAG",e}({});var jE=n(96956);const LE=e=>e.ui?.transcript?.mode??Vc.aY.none,DE=e=>e.ui?.transcript?.uiFlags??jE.aj,UE="_nDkCIVgkWayq3tqiIuW",ME=({episode:e})=>{const{transcriptMode:t}=(()=>{const e=(0,nt.wA)(),t=(0,nt.d4)(DE);return{transcriptMode:(0,nt.d4)(LE),setTranscriptUIFlag:(0,at.useCallback)(((t,n)=>{e({type:PE.SET_TRANSCRIPT_UI_FLAG,key:t,value:n})}),[e]),transcriptUIFlags:t}})(),{data:n}=mE(e.uri),i=n?.colourData,r={"--transcript-color-background":i?kE.Q.fromInt(i.background).toCSS(OE.a.HEX):Ab.gray50,"--transcript-color-text":kE.Q.fromInt(i?.text??0).toCSS(OE.a.HEX),"--transcript-color-highlightText":kE.Q.fromInt(i?.highlightText??-1).toCSS(OE.a.HEX)},{spec:s}=(0,Jr.r)(cE.c,{data:{uri:e.uri}}),a=(0,Iu.t)(s);return(0,ct.jsxs)(f_.w,{className:UE,style:r,ref:a,children:[(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.read-along-transcript.now-playing-view.read-along")}),t===Vc.aY.npv&&(0,ct.jsx)(ct.Fragment,{children:(0,ct.jsx)(RE,{mode:Vc.aY.npv})})]})};function BE(e){return!!(0,Kn.o)().getCapabilities().isSupported&&function(e){const t=e.metadata?.["parent_episode.uri"];return!!t&&(0,j.gH)(t)}(e)}var FE=n(35022),HE=n(32824),VE=n(67211),zE=n(13982),GE=n(39566),WE=n(73956);const KE="_QEMUk5U16U3CQn0wvbD",YE="mbkl2P60JUhDqc9qGvp9",qE="Xh6dG3pzi2SS7v4cvZzG",QE="sOdoW26RUwggLToa7xDt",$E="B_TcBcc1BM2yLgvXbh66",ZE="tRnhyUQiKOxA3z8mUD_U",XE="_shxqlkLuB52H1iCh_OQ",JE="hAwePVlxumRNpdOSpwyV";const ex=at.forwardRef((function({className:e="",segment:t,onClickPlay:n,isPlaying:i},r){const{label:s,Icon:a}=(0,at.useMemo)((()=>function(e){if("TALK"===e.type)return{Icon:FE.L,label:u.Ru.get("playlist.a11y.play",e.title)};const t=e.track.artists?.map((e=>e.name)).join(u.Ru.getSeparator())||"";return{Icon:HE.v,label:u.Ru.get("tracklist.a11y.play",e.track.name,t)}}(t)),[t]),o=(0,at.useCallback)((()=>{n()}),[n]);return(0,ct.jsxs)("div",{className:gr()(XE,e),children:[i?(0,ct.jsx)(u_.J,{className:ZE,animated:!0}):(0,ct.jsx)("span",{className:ZE,children:(0,ct.jsx)(a,{iconSize:16,"aria-hidden":"true"})}),(0,ct.jsx)(j_.x,{className:$E,iconClassName:JE,onClick:o,isPlaying:i,isLocked:!1,playAriaLabel:s,ref:r})]})})),tx=({children:e,onTriggerPlay:t,episodeUri:n,index:i})=>{const{spec:r,logger:s}=(0,Jr.r)(VE.f,{}),a=(0,$r.W)(),o=(0,Ra.YQ)((()=>{a({intent:"play",type:"double-click"});const e=s.logInteraction(r.segmentItemFactory({uri:n,position:i||0}).doubleHitPlay({itemToBePlayed:n}));t(e)}),WE.d,{leading:!0,trailing:!1});return(0,ct.jsx)("div",{className:QE,onDoubleClick:o,children:e})},nx=({segment:e,episodeUri:t,index:n})=>{const{spec:i,logger:r}=(0,Jr.r)(VE.f,{}),{isActive:s,isPlaying:a,onClick:o}=(0,GE.L)({episodeUri:t,start:e.start,stop:e.stop}),l={uri:t},c=function(e){const t=[{url:e.track.album.image}];return{type:M.c.TRACK,uri:e.uri,uid:null,provider:null,images:t,name:e.track.name,mediaType:"audio",duration:{milliseconds:0},album:{type:M.c.ALBUM,uri:e.track.album.uri,name:e.track.album.name,images:t},artists:e.track.artists.map((e=>({type:M.c.ARTIST,name:e.name,uri:e.uri})))}}(e),u=i.segmentItemFactory({uri:t,position:n||0}).playbackButtonFactory(),d=(0,at.useCallback)((()=>{o({}),s&&a?r.logInteraction(u.hitPause({itemToBePaused:t})):s&&!a?r.logInteraction(u.hitResume({itemToBeResumed:t})):r.logInteraction(u.hitPlay({itemToBePlayed:t}))}),[t,s,a,r,o,u]);return(0,ct.jsxs)(tx,{onTriggerPlay:o,episodeUri:t,children:[(0,ct.jsx)(ex,{segment:e,isActive:s,isPlaying:a,onClickPlay:()=>{d()}}),(0,ct.jsx)(zE.d,{context:l,item:c,titleTypeVariant:"bodyMedium",subtitleTypeVariant:"bodySmall",onTitleClick:e=>{r.logInteraction(i.segmentItemFactory({uri:t,position:n||0}).albumLinkFactory({uri:l.uri}).hitUiNavigate({destination:e||""}))},onSubtitleClick:e=>{r.logInteraction(i.segmentItemFactory({uri:t,position:n||0}).artistLinkFactory({uri:e||"",position:0}).hitUiNavigate({destination:e||""}))}})]})},ix=({segment:e,episodeUri:t,index:n})=>{const{spec:i,logger:r}=(0,Jr.r)(VE.f,{}),{isActive:s,isPlaying:a,onClick:o}=(0,GE.L)({episodeUri:t,start:e.start,stop:e.stop}),l=function(e){const t=[];return{type:M.c.UNKNOWN,uri:e.uri,uid:null,provider:null,images:t,name:e.title,mediaType:"audio",duration:{milliseconds:0},album:{type:M.c.ALBUM,uri:e.show.uri,name:e.show.name,images:t},artists:[]}}(e),c=i.segmentItemFactory({uri:t,position:n||0}).playbackButtonFactory(),u=(0,at.useCallback)((()=>{o({}),s&&a?r.logInteraction(c.hitPause({itemToBePaused:t})):s&&!a?r.logInteraction(c.hitResume({itemToBeResumed:t})):r.logInteraction(c.hitPlay({itemToBePlayed:t}))}),[t,s,a,r,o,c]);return(0,ct.jsxs)(tx,{onTriggerPlay:o,episodeUri:t,children:[(0,ct.jsx)(ex,{segment:e,isActive:s,isPlaying:a,onClickPlay:()=>{u()}}),(0,ct.jsx)(ad.r,{children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBase",children:l.name})},l.name)]})},rx=({item:e})=>{const t=e.metadata?.["parent_episode.uri"],n=function(e){const t=(0,Kn.o)();return(0,at.useCallback)((async(n,i)=>{if(!e)return[];try{return await t.getSegments(e,n,i)}catch(e){return[]}}),[e,t])}(t),[i,r]=(0,at.useState)([]),s=(0,at.useRef)(!1),a=(0,at.useRef)(0),o=(0,at.useCallback)((()=>{const e=a.current;null!==e&&(s.current||(s.current=!0,n(e,10).then((e=>{r((t=>{const n=t.concat(e);return a.current=n.length+1,n})),s.current=!1}))))}),[n]);return(0,at.useEffect)((()=>{r([])}),[e.uri]),t?(0,ct.jsxs)(f_.w,{className:KE,children:[(0,ct.jsx)(f_.X,{className:YE,children:u.Ru.get("music_and_talk.in_this_episode")}),(0,ct.jsx)("div",{className:qE,children:(0,ct.jsx)(c_._,{onReachBottom:o,triggerOnInitialLoad:!0,children:i.map(((e,n)=>"MUSIC"===e.type?(0,ct.jsx)(nx,{segment:e,episodeUri:t},`${e.uri}-${n}`):(0,ct.jsx)(ix,{segment:e,episodeUri:t},`${e.uri}-${n}`)))})})]}):null};var sx=n(82654),ax=n(91746),ox=n(95666),lx=n(34472);const cx="main-nowPlayingView-queue",ux="main-nowPlayingView-queueItem",dx="main-nowPlayingView-playNextButton",mx="main-nowPlayingView-playNextIcon",px="main-nowPlayingView-playNext",hx="main-nowPlayingView-openQueue",gx="main-nowPlayingView-playNextButtonIcon",fx="main-nowPlayingView-queueItemEntityImage";const bx=at.forwardRef((function({className:e="",item:t,onClickPlay:n},i){const r=(0,zt.K)(),{label:s,Icon:a}=(0,at.useMemo)((()=>function(e){if((0,$t.p)(e))return{Icon:FE.L,label:u.Ru.get("tracklist.a11y.play",e.name,e.show.name)};if((0,Qt.d)(e))return{Icon:lx.l,label:u.Ru.get("tracklist.a11y.play",e.name,e.book.name)};if((0,Zt.v)(e)||(0,Xt.v)(e)){const t=e.artists?.map((e=>e.name)).join(u.Ru.getSeparator())||"";return{Icon:HE.v,label:u.Ru.get("tracklist.a11y.play",e.name,t)}}return{Icon:HE.v,label:u.Ru.get("play")}}(t)),[t]),o=(0,at.useCallback)((()=>(n(),r.skipToNext({uri:t.uri,uid:t.uid}))),[r,t,n]);return(0,ct.jsxs)("div",{className:gr()(px,e),"":"play-next-button",children:[(0,ct.jsx)("span",{className:mx,children:(0,ct.jsx)(a,{size:"small","aria-hidden":"true"})}),(0,ct.jsx)(j_.x,{className:dx,iconClassName:gx,onClick:o,isPlaying:!1,isLocked:!1,playAriaLabel:s,ref:i})]})}));var vx=n(24594),yx=n(42397),_x=n(66675);const Ex=({children:e,...t})=>(0,ct.jsx)(xx,{size:"small",...t,$_css:Ab.white70,children:e});var xx=(0,yx.Ay)(_x.n).withConfig({displayName:"ButtonSecondary___StyledEncoreButtonSecondary",componentId:"sc-13xoveo-0"})((e=>({borderColor:e.$_css})));const Cx="/search",Sx="/queue",Ax=()=>(0,ct.jsxs)(f_.w,{className:cx,children:[(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.your-dj.npv.queue.title")}),(0,ct.jsx)(fr.E,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("web-player.your-dj.npv.queue.description")})]}),wx=({isContextAd:e})=>{const{nextUp:t,queued:n}=(0,ox.w)(),i=(0,zt.K)(),r=(0,cn.Zp)(),s=(0,Fo._Y)(),o=(0,a.NC)(Ie.eWj),l=(0,ll.L)(),{spec:c,logger:d}=(0,Jr.r)(sx._,{}),m=(0,Iu.t)(c),p=()=>(0,ct.jsxs)(f_.w,{className:cx,ref:m,children:[(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.now-playing-view.empty-queue")}),(0,ct.jsx)(P_.default,{to:Cx,children:(0,ct.jsx)(Ex,{onClick:()=>{const e=c.searchButtonFactory().hitUiNavigate({destination:Cx});d.logInteraction(e)},children:u.Ru.get("web-player.now-playing-view.empty-queue-cta")})})]}),h=(0,at.useCallback)((()=>{const e=c.openQueueButtonFactory().hitUiNavigate({destination:Sx});d.logInteraction(e),o?s(In.$S.QUEUE_BUTTON_CLICK):r(Sx)}),[r,s,o,c,d]),g=n[0]||t[0],{draggable:f,onDragStart:b}=(0,rh.P)(),v=(0,at.useCallback)((e=>{e.target===e.currentTarget&&g.uri&&b(e,{itemUris:[g.uri],dragLabelText:(0,vx.r)(g)})}),[g,b]);if(l?.context?.uri&&(0,ha.HS)(l.context))return(0,ct.jsx)(Ax,{});if(!l||!g)return(0,ct.jsx)(p,{});const{context:y}=l;return(0,ct.jsxs)(f_.w,{className:cx,ref:m,children:[(0,ct.jsx)(f_.X,{action:(0,ct.jsx)(Xs.H,{size:"small",condensed:!0,onClick:h,className:hx,semanticColor:"textSubdued",children:u.Ru.get("web-player.now-playing-view.open-queue")}),children:u.Ru.get("queue.next-in-queue")}),(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Xy.W,{context:y,item:g}),children:(0,ct.jsxs)("div",{className:ux,draggable:f&&ch(g),onDragStart:v,children:[!e&&(0,ct.jsx)(bx,{item:g,onClickPlay:()=>{const e=i.getState();if(!e)return;const t=c.playButtonFactory({uri:g.uri}).hitSkipToNext({itemToBeSkipped:e.item?.uri||"",positionMs:(0,$h.s)(e)??-1,totalContentMs:e.duration??-1});d.logInteraction(t)}}),(0,ct.jsx)(ax.b,{item:g,size:46,desiredLabel:"small",className:fx}),(0,ct.jsx)(zE.d,{context:y,item:g,titleTypeVariant:"bodyMedium",subtitleTypeVariant:"bodySmall",onTitleClick:()=>{const e=c.titleFactory({uri:g.uri}).hitUiNavigate({destination:g.uri});d.logInteraction(e)},onSubtitleClick:()=>{const e=c.artistFactory({uri:g.uri}).hitUiNavigate({destination:g.uri});d.logInteraction(e)}})]})})]})},Ix=e=>(0,$f.V)()?null:(0,ct.jsx)(wx,{...e});var Tx=n(24251),Nx=n(63445),Rx=n(28413),kx=n(8548);const Ox="_mPIDSVjofNyCLhlaXuL",Px="WbtcAaLN1SQCr16tuZXv",jx="mqlmYaGITrdEQC40rEOI",Lx="KEb8GSQPHsSmLCes_O07",Dx="Lkuf447h9WU9AaYHTsu7",Ux="VU8VpmUxiLG5anxsH03k",Mx="JO8KMTdQoJAPhSpBlaqE",Bx="oKZq5I1c9_xWl3NWP1SU",Fx=({coverArt:e,description:t,name:n,publisher:i,uri:r})=>{const s=(0,Pg.y)(),{draggable:a,onDragStart:o}=(0,rh.P)({itemUris:[r],dragLabelText:n}),[l,c]=(0,qp.A)(r),d=!(0,Yf.n)(),m=(0,cn.Zp)(),{spec:p,logger:h,UBIFragment:g}=(0,Jr.r)(Tx.M,{}),f=(0,at.useRef)(null),b=(0,at.useCallback)((()=>{const e=p.artworkFactory().hitUiNavigate({destination:r});h.logInteraction(e)}),[h,p,r]),v=(0,at.useCallback)((()=>{const e=p.titleFactory().hitUiNavigate({destination:r});h.logInteraction(e)}),[h,p,r]),y=(0,at.useCallback)((()=>{const e=p.podcastDescriptionFactory().hitUiNavigate({destination:r});h.logInteraction(e),m((0,j.o_)(r).toURLPath(!0))}),[h,m,p,r]),_=(0,at.useCallback)((()=>{const e=p.followButtonFactory().hitFollow({itemToBeFollowed:r}),t=p.followButtonFactory().hitUnfollow({itemToBeUnfollowed:r});h.logInteraction(l?t:e),c(!l)}),[l,h,c,p,r]);return(0,ct.jsxs)(f_.w,{className:Ox,children:[(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.now-playing-view.podcast-about.title")}),(0,ct.jsx)("div",{children:(0,ct.jsx)("button",{type:"button","":"description-button",className:Px,onClick:y,children:(0,ct.jsx)(fr.E,{as:"div",ref:f,variant:"bodySmall",className:jx,children:(0,ct.jsx)(kx.N,{source:t})})})}),(0,ct.jsxs)("div",{className:gr()(Lx,{[Dx]:s!==Og.E.MEDIUM}),children:[(0,ct.jsx)(g,{spec:p,children:(0,ct.jsx)(cm.v,{contentAlign:!0,id:"aboutPodcastNPV",className:Mx,media:(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Nx.H,{uri:r}),children:(0,ct.jsx)(P_.default,{draggable:a,onDragStart:o,to:r,onClick:b,children:(0,ct.jsx)(xf.b,{className:Bx,type:M.c.SHOW,title:n,images:e?.sources,size:Cf.Qe.SIZE_48})})}),title:(0,ct.jsx)(um.d,{lineClamp:1,children:(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Nx.H,{uri:r}),children:(0,ct.jsx)(P_.default,{draggable:a,onDragStart:o,to:r,onClick:v,children:n})})}),subtitle:(0,ct.jsx)(dm.j,{lineClamp:1,variant:"mesto",children:i})})}),(0,ct.jsx)(Rx.W,{isFollowing:l,onClick:_,disabled:d,className:Ux})]})]})};var Hx=n(10801);const Vx="f6_Fu_ei4TIJWR0wzvTk",zx="TLmzadNIdvV8sYzTuXRg",Gx="MT9De6UrCVQ8Qo6o3ikA",Wx=at.memo((()=>(0,ct.jsx)("div",{className:Vx,"aria-hidden":!0,children:(0,ct.jsxs)("div",{className:zx,children:[(0,ct.jsx)(Hx.Y,{as:"div",variant:"bodyMediumBold",className:Gx,charCount:8,isLoading:!0}),[20,50,25].map(((e,t)=>(0,ct.jsx)(Hx.Y,{as:"div",variant:"bodySmall",className:Gx,charCount:e,isLoading:!0},t)))]})})));var Kx=n(47304);const Yx="m3pzWNRu8xGY36YIaCY1",qx=({topics:e,logTopicNavigation:t})=>!e||e.length<1?null:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.now-playing-view.discover-more")}),(0,ct.jsx)(Kx.N,{topics:e,onClick:t,className:Yx})]}),Qx=({item:e,spec:t})=>{const n=(0,at.useCallback)((()=>{}),[]),i=(0,Fr.o)((e=>e?.isPaused??void 0)),r=(0,zt.K)(),{isPlaying:s,isActive:o}=(0,nd.te)(e.uri),l=(0,a.NC)(Ie.cgF),c=(0,a.NC)(Ie.xEc),d=(0,a.NC)(Ie.h0Y),m=(0,a.NC)(Ie.r1q),p=(0,$r.W)(),h=(0,s_.c)(),g=(0,a_.d)(e.uri)?.episodeOrChapter,f=BE(e),b=(0,at.useCallback)(((t,n,a,l)=>{let c="play";!s||0!==t&&n||(c="pause"),p({intent:c,targetUri:e.uri,type:"click",itemIdSuffix:t>0?"podcast-description-timestamp":"button"}),g&&h?$c.h.set((()=>({triggerId:a||"activation-trigger-mme",triggerAction:null}))):o&&!n?i?(l?.("resume"),r.resume()):(l?.("pause"),r.pause()):r.seekTo(t)}),[s,p,e.uri,g,h,o,i,r]),v=(0,at.useCallback)(((e,t)=>{b(e,!0,t)}),[b]),{loading:y,error:_,data:E}=(x={uri:e.uri,includeChapters:d,includeAIDubbedEpisodes:m,numberOfChapters:10},C={staleTime:h_,gcTime:p_},(0,$.I)(x_,x,C));var x,C;const[S,A]=(0,at.useState)(null),w=(0,at.useCallback)((async e=>{const t=await(0,o_.Q)(e);A(t)}),[]);if((0,at.useEffect)((()=>{g&&!(0,Ce.Gr)(g)&&g.transcript&&g.transcript.length>0&&w(g.transcript[0].cdnUrl)}),[w,g]),y&&e.uri&&!_)return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Wx,{}),(0,ct.jsx)(Wx,{})]});const I=(T=E?.episodeUnionV2,C_(T)?T:void 0);var T;const N=(e=>{return C_(e)&&(t=e.podcastV2.data,"Podcast"===t?.__typename)?e.podcastV2.data:void 0;var t})(E?.episodeUnionV2);if(!e.uri||!I||y||_)return null;const{chapters:R,nextOffset:k,limit:O}=function(e){if("DisplaySegments"===e.displaySegments?.__typename)return{chapters:e.displaySegments.displaySegments.items,nextOffset:e.displaySegments.displaySegments.pagingInfo.nextOffset,limit:e.displaySegments.displaySegments.pagingInfo.limit};return{chapters:[],nextOffset:0,limit:0}}(I),P=R.length>0;return(0,ct.jsxs)(Hr.r,{spec:t,children:[m&&!I.originalEpisode&&(0,ct.jsx)(Q_,{episode:I}),m&&(0,ct.jsx)(Z_,{episode:I}),P&&!f&&(0,ct.jsx)(__,{chapters:R,episodeUri:e.uri,nextOffset:k,limit:O,isPlaying:s}),c&&N&&(0,ct.jsx)(Fx,{coverArt:N.coverArt||void 0,description:N.htmlDescription||"",name:N.name,publisher:N.publisher?.name,uri:N.uri}),g&&g.type===M.c.EPISODE&&g.transcript&&g.transcript.length>0&&(l?(0,ct.jsx)(ME,{episode:e}):(0,ct.jsxs)(f_.w,{className:eE,children:[(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.now-playing-view.transcript")}),S&&(0,ct.jsx)(oE,{transcriptSections:S||[],onTimeStampClick:v,episodeUri:e.uri})]})),f&&(0,ct.jsx)(rx,{item:e}),(0,ct.jsx)(qx,{topics:N?.topics.items??[],logTopicNavigation:n}),(0,ct.jsx)(Ix,{})]})},$x=({item:e,spec:t})=>(0,Yf.n)()?(0,ct.jsx)(Qx,{item:e,spec:t}):(0,ct.jsx)(ct.Fragment,{});const Zx=()=>(0,ct.jsx)(ct.Fragment,{}),Xx=Spicetify.GraphQL.Definitions["queryNpvArtist"]=new Q.l("queryNpvArtist","query","4ec4ae302c609a517cab6b8868f601cd3457c751c570ab12e988723cc036284f",null);var Jx=n(41028),eC=n(88962),tC=n(80007),nC=n(91303),iC=n(24577);const rC="main-nowPlayingView-aboutArtist",sC="main-nowPlayingView-aboutArtistContent",aC="main-nowPlayingView-aboutArtistButton",oC="main-nowPlayingView-aboutArtistHasImage",lC="main-nowPlayingView-aboutArtistBio",cC="main-nowPlayingView-aboutArtistTextContent",uC="main-nowPlayingView-aboutArtistPlaceholderWrapper",dC=new Set(["spotify:artist:5UUG83KSlqPhrBssrducWV"]),mC=({artistUri:e,artist:t,visuals:n,stats:i,externalLinks:r=[]})=>{const s=(0,nt.wA)(),{gallery:o,avatarImage:l}=n,{monthlyListeners:c}=i,d=(0,j.o_)(e).toURLPath(!0),m=(0,nC.W)({uri:e,type:"locale"})?(0,vy.hF)(d):d,{spec:p,logger:h}=(0,Jr.r)(eC.p,{}),g=(0,a.NC)(Ie.lVm,{loadingValue:!1}),f=(0,Iu.t)(p,g),b=(0,cn.Zp)(),v=(0,at.useCallback)((()=>{if(t&&e){const a=p.hitUiReveal();h.logInteraction(a),s((0,et.p5)({artistUri:e,artist:t,stats:i,visuals:n,externalLinks:r})),b(m)}}),[p,h,m,s,b,e,t,i,n,r]);if(dC.has(e)||!t.biography?.text)return null;const y=[];o.items.forEach((e=>{const t=e.sources.map(ne.m),n=(0,iC.g)(t,{desiredLabel:"large",desiredSize:600});n&&y.push(n)}));const _=y.find((e=>(e.width||0)>=(e.height||0))),E=[];l?.sources.forEach((e=>{const t=(0,ne.m)(e);t&&E.push(t)}));const x=_&&{backgroundImage:`linear-gradient(${Ab.opacityBlack60} 0%, ${Ab.opacityBlack70} 100%), url(${_.url})`},C=t.verified&&!_&&E.length>0||!t.verified&&!_;return(0,ct.jsx)(f_.w,{className:rC,ref:f,children:(0,ct.jsx)("button",{type:"button","aria-label":t.name,className:gr()(aC,{[oC]:!!x}),onClick:v,style:x,"":"npv-artist-bio-button",children:(0,ct.jsxs)("div",{className:gr()(sC),children:[t.verified&&(0,ct.jsx)(tC.M,{text:u.Ru.get("artist.verified")}),C&&(0,ct.jsx)(Ef.e,{images:E,label:t.name,width:80,userIconSize:"large",testID:"npv-artist-bio-avatar",customPlaceholder:(0,ct.jsx)("div",{className:uC,"":"npv-artist-bio-placeholder-wrapper",children:(0,ct.jsx)(Jx.r,{size:"large"})})}),(0,ct.jsxs)("div",{className:cC,children:[(0,ct.jsx)(fr.E,{as:"div",variant:"bodyMedium",children:!!c&&u.Ru.get("artist.monthly-listeners-count",c)}),(0,ct.jsx)("div",{children:(0,ct.jsx)(fr.E,{as:"span",variant:"bodySmall",className:lC,children:(0,ct.jsx)(kx.N,{source:t.biography.text})})})]})]})})})};var pC=n(60096);const hC="main-nowPlayingView-aboutArtistV2",gC="main-nowPlayingView-aboutArtistV2Button",fC="main-nowPlayingView-aboutArtistV2Title",bC="main-nowPlayingView-aboutArtistV2HasImage",vC="main-nowPlayingView-aboutArtistV2ImageContainer",yC="main-nowPlayingView-aboutArtistV2Image",_C="main-nowPlayingView-aboutArtistV2TextContent",EC="main-nowPlayingView-aboutArtistV2Name",xC="main-nowPlayingView-aboutArtistV2Listeners",CC="main-nowPlayingView-aboutArtistV2ListenersCount",SC="main-nowPlayingView-aboutArtistV2FollowButton",AC="main-nowPlayingView-aboutArtistV2Bio",wC="main-nowPlayingView-aboutArtistV2PlaceholderWrapper",IC="main-nowPlayingView-aboutArtistV2Avatar",TC=new Set(["spotify:artist:5UUG83KSlqPhrBssrducWV"]),NC=({artistUri:e,artist:t,visuals:n,stats:i,externalLinks:r=[]})=>{const s=(0,nt.wA)(),{gallery:a,avatarImage:o}=n,{monthlyListeners:l}=i,c=(0,j.o_)(e).toURLPath(!0),d=(0,nC.W)({uri:e,type:"locale"})?(0,vy.hF)(c):c,[m,p]=(0,qp.A)(e),{spec:h,logger:g}=(0,Jr.r)(eC.p,{}),f=(0,at.useCallback)((()=>{if(t&&e){const a=h.hitUiReveal();g.logInteraction(a),s((0,et.p5)({artistUri:e,artist:t,stats:i,visuals:n,externalLinks:r}))}}),[h,g,s,e,t,i,n,r]),b=(0,at.useCallback)((t=>{t.stopPropagation();const n=h.artistNameFactory().hitUiNavigate({destination:e});g.logInteraction(n)}),[h,e,g]),v=(0,at.useCallback)((async t=>{t.preventDefault(),t.stopPropagation();const n=h.followButtonFactory().hitFollow({itemToBeFollowed:e}),i=h.followButtonFactory().hitUnfollow({itemToBeUnfollowed:e});g.logInteraction(m?i:n);try{await p(!m)}catch{}}),[e,m,g,p,h]),y=(0,at.useCallback)((e=>{if("Enter"===e.key)return v(e)}),[v]);if(TC.has(e)||!t.biography?.text)return null;const _=[];a.items.forEach((e=>{const t=e.sources.map(ne.m),n=(0,iC.g)(t,{desiredLabel:"large",desiredSize:600});n&&_.push(n)}));const E=_.find((e=>(e.width||0)>=(e.height||0))),x=[];o?.sources.forEach((e=>{const t=(0,ne.m)(e);t&&x.push(t)}));const C=E&&{backgroundImage:`linear-gradient(${Ab.opacityBlack50} 0%, ${Ab.opacityBlack0} 50%), url(${E.url})`},S=!E&&x.length>0,A=!E&&0===x.length;return(0,ct.jsx)(f_.w,{className:hC,children:(0,ct.jsxs)("button",{type:"button","aria-label":t.name,className:gr()(gC),onClick:f,tabIndex:0,"":"npv-artist-bio-button",children:[(0,ct.jsxs)("div",{className:gr()(vC,{[yC]:E}),style:C,children:[(0,ct.jsx)("div",{className:gr()(fC,{[bC]:E}),children:(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.now-playing-view.artist-about.title")})}),A&&(0,ct.jsx)("div",{className:gr()(wC),"":"npv-artist-bio-placeholder-wrapper",children:(0,ct.jsx)(Jx.r,{size:"xxlarge"})}),S&&(0,ct.jsx)(Ef.e,{images:x,label:t.name,width:80,userIconSize:"large",testID:"npv-artist-bio-avatar",className:IC})]}),(0,ct.jsxs)("div",{className:_C,children:[(0,ct.jsx)("div",{className:EC,children:(0,ct.jsx)(pC.N_,{to:d,onClick:b,"":"npv-artist-link",children:(0,ct.jsx)(fr.E,{as:"span",variant:"bodyMediumBold",dir:"auto",children:t.name})})}),(0,ct.jsxs)("div",{className:xC,children:[(0,ct.jsx)(fr.E,{as:"div",variant:"bodyMedium",className:CC,children:!!l&&u.Ru.get("artist.monthly-listeners-count",l)}),(0,ct.jsx)(_x.n,{as:"div",size:"small",className:SC,onClick:v,onKeyDown:y,tabIndex:0,children:m?u.Ru.get("unfollow"):u.Ru.get("follow")})]}),(0,ct.jsx)(fr.E,{as:"span",variant:"bodySmall",className:AC,children:(0,ct.jsx)(kx.N,{LinkComponent:pC.N_,source:t.biography.text,onLinkClick:e=>{e.stopPropagation()}})})]})]})})};var RC=n(99261);const kC=({artistUri:e,spec:t,logger:n})=>{const[i,r]=(0,qp.A)(e),s=(0,at.useCallback)((async()=>{if(!t||!n)return;const s=t.hitFollow({itemToBeFollowed:e}),a=t.hitUnfollow({itemToBeUnfollowed:e});n.logInteraction(i?a:s);try{await r(!i)}catch{}}),[e,i,n,r,t]),a=i?u.Ru.get("unfollow"):u.Ru.get("follow");return(0,ct.jsx)(Rx.W,{isFollowing:i,onClick:s,buttonText:a})},OC=({artistName:e,roles:t,spec:n,logger:i,linkable:r=!1})=>{const s=t[0].artistUri,a=t.map((e=>e.role)).join(u.Ru.getSeparator()),o=(0,j.o_)(s).toURLPath(!0),l=(0,nC.W)({uri:s,type:"locale"})?(0,vy.hF)(o):o,c=(0,at.useCallback)((e=>{if(e.stopPropagation(),!n||!i)return;const t=n.artistNameFactory().hitUiNavigate({destination:s});i.logInteraction(t)}),[n,s,i]);return(0,ct.jsx)(cm.v,{title:r?(0,ct.jsx)(P_.default,{to:l,onClick:c,"":"artist-row-credits-link",children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",children:e})}):(0,ct.jsx)(fr.E,{variant:"bodyMedium",children:e}),size:"sm",paddingInlineStart:"0",paddingInlineEnd:"0",subtitle:(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",style:{textTransform:"capitalize"},"":"artist-row-role",children:a}),"":"credits-artist-row",variant:"naked",id:s,trailing:r&&(0,ct.jsx)(kC,{artistUri:s,spec:n?.followToggleButtonFactory(),logger:i})},e)};let PC=function(e){return e.MainArtist="main artist",e.FeaturedArtist="featured artist",e.Remixer="remixer",e.Actor="actor",e.Composer="composer",e.Orchestra="orchestra",e.Writer="writer",e.Producer="producer",e.Performer="performer",e.Lyricist="lyricist",e.Conductor="conductor",e.Author="author",e.Editor="editor",e.Arranger="arranger",e.EnsembleOrchestra="ensemble orchestra",e}({});const jC=(0,at.memo)((({data:e,limit:t})=>{const{spec:n,logger:i}=(0,Jr.r)(RC.D,{}),r=e.reduce(((e,t)=>{const{artistName:n}=t,i=e.get(n)??[];return i.push(t),e.set(n,i),e}),new Map),s=Array.from(r,(([e,t],r)=>(0,ct.jsx)(OC,{artistName:e,roles:t.sort(((e,t)=>e.role.toLowerCase()===PC.MainArtist?-1:t.role.toLowerCase()===PC.MainArtist?1:0)),spec:n.creditsRowFactory({position:r}),logger:i,linkable:t.filter((e=>e.isArtistUriLinkable)).length>0},e))).slice(0,t);return(0,ct.jsx)(ct.Fragment,{children:s})})),LC="main-nowPlayingView-credits",DC="main-nowPlayingView-creditsShowAll",UC=({data:e,trackUri:t})=>{const n=(0,nt.wA)(),i=(0,a.NC)(Ie.QIZ),{spec:r,logger:s}=(0,Jr.r)(RC.D,{}),o=(0,at.useCallback)((()=>{s.logInteraction(r.showAllButtonFactory().hitUiReveal()),n((0,et.P0)(!0,t))}),[n,s,r,t]),l=(0,Iu.t)(r,i);return 0===e.length?null:(0,ct.jsxs)(f_.w,{className:LC,ref:l,children:[(0,ct.jsx)(f_.X,{action:(0,ct.jsx)(Xs.H,{size:"small",condensed:!0,onClick:o,className:DC,semanticColor:"textSubdued",children:u.Ru.get("web-player.now-playing-view.show-all")}),children:u.Ru.get("web-player.now-playing-view.credits")}),(0,ct.jsx)(jC,{data:e,limit:3})]})};var MC=n(17170),BC=n(8264);const FC="main-nowPlayingView-sectionHeaderSpacing",HC="main-nowPlayingView-lyricsTitle",VC="main-nowPlayingView-lyricsControls",zC="main-nowPlayingView-lyricsGradient",GC="main-nowPlayingView-lyricsContent",WC=()=>{const{spec:e,logger:t}=(0,Jr.r)(MC.X,{}),{setMode:n}=Yc();return(0,ct.jsxs)("div",{className:VC,children:[(0,ct.jsx)(As,{label:u.Ru.get("web-player.now-playing-view.lyrics.cinema-mode"),onClick:()=>{n(Vc.YU.cinema),t.logInteraction(e.cinemaModeButtonFactory().hitUiReveal()),t.logImpression(e.cinemaModeButtonFactory().impression())},children:(0,ct.jsx)(nl.C,{size:"small"})}),(0,ct.jsx)(As,{label:u.Ru.get("web-player.now-playing-view.close.lyrics"),onClick:()=>{n(Vc.YU.none),t.logInteraction(e.closeLyricsButtonFactory().hitUiHide())},children:(0,ct.jsx)(co.M,{size:"small"})})]})},KC=({item:e})=>{const{spec:t,logger:n}=(0,Jr.r)(MC.X,{}),i=(0,at.useRef)(null),{mode:r,setMode:s}=Yc(),a=(0,at.useRef)(null),o=(0,at.useRef)(0),{data:l}=(0,jr.I)(e.uri,e?.images),c=(0,Fr.o)((e=>e?.nextItems?.[0]),((e,t)=>e?.uri===t?.uri));(0,jr.I)(c?.uri,c?.images);const d=(0,at.useCallback)((()=>{o.current=Date.now()}),[]),m=(0,at.useCallback)((({lineRef:e,isActiveLine:t,shouldAnimateScroll:n,activeLineIndex:r,isFirstLine:s})=>{if(!i.current||!a.current)return;let l;if(e.current&&t?l=e.current?.offsetTop-a.current?.offsetTop-16:s&&r<0&&(l=0),void 0===l)return;const c=a.current?.scrollTop,u=Math.abs(c-l),d=i.current.clientHeight,m=Date.now()-o.current<2e3,p=o.current>0&&u>1*d;if(m||p)return;o.current=0;const h="visible"===document.visibilityState&&n?"smooth":"auto";a.current?.scrollTo({top:l,behavior:h})}),[]);if((0,at.useLayoutEffect)((()=>{o.current=0,a.current?.scrollTo({top:0,behavior:"auto"})}),[e.uri]),!l?.hasLyrics)return null;if(r===Vc.YU.npv){const t=l?.hasLyrics&&!l.isTimeSynced,n={"--lyrics-color-active":t?Ab.white:l.colors.activeText,"--lyrics-color-inactive":l.colors.text,"--lyrics-color-passed":kE.Q.fromCSS(l.colors.activeText,.7).toCSS(OE.a.RGBA),"--lyrics-color-background":l.colors.background};return(0,ct.jsxs)(f_.w,{className:gr()(FC,zC),style:n,ref:i,children:[(0,ct.jsx)(f_.X,{action:(0,ct.jsx)(WC,{}),className:HC,children:u.Ru.get("web-player.lyrics.title")}),(0,ct.jsxs)("div",{className:GC,ref:a,onWheel:d,onScroll:d,children:[t&&(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",dir:"auto",style:{color:l.colors.text},children:u.Ru.get("web-player.lyrics.unsynced")}),(0,ct.jsx)(BC.x,{trackUri:e.uri,data:l,format:"card",onActiveLineChange:m})]})]})}return(0,ct.jsx)(f_.w,{className:FC,children:(0,ct.jsx)(f_.X,{action:(0,ct.jsx)(Ex,{onClick:()=>{s(Vc.YU.npv),n.logInteraction(t.showLyricsButtonFactory().hitUiReveal()),n.logImpression(t.showLyricsButtonFactory().impression())},children:u.Ru.get("web-player.now-playing-view.show.lyrics")}),className:HC,children:u.Ru.get("web-player.lyrics.title")})})};var YC=n(94087);const qC="main-nowPlayingView-merch",QC=({artistId:e,merch:t})=>!t||t.length<1?null:(0,ct.jsxs)(f_.w,{className:qC,children:[(0,ct.jsx)(f_.X,{children:u.Ru.get("web-player.now-playing-view.npv-merch")}),(0,ct.jsx)(YC.ArtistOffers,{items:t,artistId:e,merchVariant:G.Ol.VARIANTA,variant:"bodyMedium"})]});var $C=n(14040),ZC=n(15138),XC=n(37672);const JC="main-nowPlayingView-artistOnTour",eS="main-nowPlayingView-artistOnTourItem",tS="main-nowPlayingView-artistOnTourShowAll",nS=({artistId:e,data:t,variant:n="bodyMedium"})=>{const i=(0,XC.Dh)(e),r=(0,cn.Zp)(),{spec:s,logger:a}=(0,Jr.r)($C.N,{data:{identifier:e,uri:i,position:0,reason:"NPV - On Tour"}}),o=(0,Iu.t)(s),l={items:t.items.map((e=>({...e,artists:{items:e.artistsV2.items.flatMap((e=>"Artist"===e.data.__typename?e.data:[]))}}))),totalCount:t.totalCount};return l.items.length?(0,ct.jsxs)(f_.w,{className:JC,ref:o,children:[(0,ct.jsx)(f_.X,{action:l.items.length!==l.totalCount&&(0,ct.jsx)(Xs.H,{size:"small",condensed:!0,className:tS,onClick:()=>{(()=>{const e=s.seeAllButtonFactory({uri:i}).hitUiNavigate({destination:`${i}:concerts`});a.logInteraction(e);const t=(0,j.o_)(`${i}:concerts`).toURLPath(!0);r(t)})()},semanticColor:"textSubdued",children:u.Ru.get("web-player.now-playing-view.show-all")}),children:u.Ru.get("web-player.now-playing-view.on-tour")}),l.items.map(((e,t)=>(0,ct.jsx)("div",{className:eS,children:(0,ct.jsx)(ZC.I,{concert:e,index:t,spec:s,condensed:!0,elevatedDate:!0,titleVariant:n})},e.uri)))]}):null};var iS=n(65329),rS=n(46737);const sS="TIoJv8dV373UyvBWRDav",aS="xn9l3L0D_ZzL886N4J_5",oS="P8bNOGKtEtIZXnWEw61V",lS="PpQWFsG9yJRfPFiERSti",cS="chgeyo_c9jfrfuEJg5sk",uS="MLbUPrgOa58_qsGikfRG",dS="l7B1SCkbYm9oU2tO9mOW",mS="kT3XHoiG64bhNORLJv09",pS=16,hS=({relatedVideos:e,contextUri:t})=>{const n=u.Ru.get("npv.related-videos.title"),i=u.Ru.get("npv.related-videos.prev"),r=u.Ru.get("npv.related-videos.next"),{spec:s,logger:a}=(0,Jr.r)(Is.E,{data:{uri:t,identifier:Kt.K.npv}}),o=(0,iS.f)({data:{identifier:"related-videos",position:0,uri:t},parentAbsoluteLocation:s.getAbsoluteLocation()}),l=(0,at.useRef)(null),[c,d]=(0,at.useState)(0),[m,p]=(0,at.useState)(0),[h,g]=(0,at.useState)("auto"),f=(0,Pg.y)(),b=(0,od.W)();(0,at.useLayoutEffect)((()=>{const e=l.current;e&&p(e.clientWidth)}),[]),(0,ry.w)({onResize:e=>{p(e.width),f===Og.E.MEDIUM&&d(0)},refOrElement:l});const v=f===Og.E.MEDIUM?2:1,y=Math.ceil(e.length/v)-1,_=f===Og.E.MEDIUM?(m-pS*v)/v:85*m/100,E=v*_+pS*v,x=(0,at.useCallback)((()=>{const t=c*E;return c===y&&t>0&&2===v?e.length%2==0?t+pS*v:t-_+pS:t}),[c,_,E,y,e.length,v]),C=(0,at.useMemo)((()=>{const t=2===e.length&&2===v?_+8:_,n=x();return{pointerEvents:h,"--video-flex-basis":`${t}px`,transform:`translateX(-${n}px)`}}),[e.length,v,_,x,h]);(0,at.useEffect)((()=>{const e=l?.current,t=()=>{g("auto")};return e?.addEventListener("transitionend",t),()=>{e?.removeEventListener("transitionend",t)}}),[]);const S=(0,at.useCallback)((e=>{g("none"),d(c+e),e>0&&b||e<0&&!b?a.logInteraction(o.shelfHeaderFactory().shelfCarouselControlsFactory().shelfCarouselControlsPreviousFactory().hitUiReveal()):(e<0&&b||e>0&&!b)&&a.logInteraction(o.shelfHeaderFactory().shelfCarouselControlsFactory().shelfCarouselControlsNextFactory().hitUiReveal())}),[c,b,a,o]),A=(0,Iu.t)(o);return(0,ct.jsx)(f_.w,{className:sS,ref:A,children:(0,ct.jsxs)(Hr.r,{spec:s,children:[(0,ct.jsx)(f_.X,{children:n}),(0,ct.jsxs)("div",{className:aS,style:{"--container-gap":"16px"},children:[0!==c&&(0,ct.jsx)("button",{type:"button","aria-label":i,onClick:()=>S(-1),className:gr()(oS,lS),children:b?(0,ct.jsx)(Ty.V,{}):(0,ct.jsx)(Iy.g,{})}),c<y&&(0,ct.jsx)("button",{type:"button","aria-label":r,onClick:()=>S(1),className:gr()(oS,cS),children:b?(0,ct.jsx)(Iy.g,{}):(0,ct.jsx)(Ty.V,{})}),(0,ct.jsx)("ul",{ref:l,className:uS,dir:"auto",style:C,children:e.map((({trackOfVideo:e},t,n)=>{if("Track"!==e.data.__typename)return null;const{uri:i,name:r,albumOfTrack:s,artists:a,contentRating:l}=e.data;return(0,ct.jsx)("li",{className:1===n.length?mS:dS,children:(0,ct.jsx)(Hr.r,{spec:o,children:(0,ct.jsx)(rS.O,{title:r,trackUri:i,artists:a.items,album:s,contentRating:l,referrerIdentifier:"now_playing_panel",index:t,hoverBackgroundColor:"backgroundTintedHighlight",contentAlign:!0,size:"sm"})})},i)}))})]})]})})},gS=({item:e,spec:t})=>{const n=(0,a.NC)(Ie.LX5),i=(0,a.NC)(Ie.IA_),{loading:r,error:s,data:o}=(l={artistUri:e.artists[0].uri,trackUri:e.uri,enableCredits:i,enableRelatedVideos:n},c={gcTime:p_,staleTime:h_},(0,$.I)(Xx,l,c));var l,c;const u=(0,a.NC)(Ie.yux),d=BE(e),m=(0,a.NC)(Ie.Tzx)?NC:mC;if(r&&e.uri&&!s)return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Wx,{}),(0,ct.jsx)(Wx,{}),(0,ct.jsx)(Wx,{})]});if(!e.uri||"Artist"!==o?.artistUnion.__typename||"Track"!==o?.trackUnion.__typename||r||s)return null;const{profile:p,stats:h,visuals:g,profile:{externalLinks:f}}=o.artistUnion,{credits:b}=o.trackUnion;return(0,ct.jsxs)(ct.Fragment,{children:[u&&(0,ct.jsx)(KC,{item:e}),(0,ct.jsxs)(Hr.r,{spec:t,children:[o.trackUnion.relatedVideos&&"RelatedVideoPage"===o.trackUnion.relatedVideos.__typename&&o.trackUnion.relatedVideos.items.length>0&&(0,ct.jsx)(hS,{contextUri:e.uri,relatedVideos:o.trackUnion.relatedVideos.items}),(0,ct.jsx)(m,{artistUri:o.artistUnion.uri,artist:p,stats:h,visuals:g,externalLinks:f.items}),i&&b&&(0,ct.jsx)(UC,{data:b,trackUri:e.uri}),(0,ct.jsx)(nS,{artistId:o.artistUnion.id,data:o.artistUnion.goods.events.concerts}),(0,ct.jsx)(QC,{artistId:o.artistUnion.id,artistUri:o.artistUnion.uri,merch:o.trackUnion.merch.items}),d&&(0,ct.jsx)(rx,{item:e})]})]})},fS=({item:e,spec:t})=>(0,Yf.n)()&&e.artists[0].uri?(0,ct.jsx)(gS,{item:e,spec:t}):(0,ct.jsx)(ct.Fragment,{}),bS=({item:e,spec:t})=>(0,Zt.v)(e)&&!e.isLocal?(0,ct.jsx)(fS,{item:e,spec:t}):(0,Zt.v)(e)&&e.isLocal?(0,ct.jsx)(Zx,{}):(0,$t.p)(e)?(0,ct.jsx)($x,{item:e,spec:t}):(0,Qt.d)(e)?(0,ct.jsx)(r_,{}):(0,qt.N)(e)?(0,ct.jsx)(i_,{}):null;var vS=n(31176),yS=n(95231),_S=n(39730),ES=n(58276);const xS=(0,at.memo)((()=>(0,ct.jsx)(vS.B,{size:"small"}))),CS=(0,at.memo)((()=>(0,ct.jsx)(yS.e,{size:"small"}))),SS=({className:e})=>{const t=u.Ru.get("npv.song-videos.switch-to-video"),n=u.Ru.get("npv.song-videos.switch-to-audio"),i=u.Ru.get("page.loading"),[r,s]=(0,at.useState)(!1),o=(0,zt.K)(),{signals:l,loading:c,uri:d}=(0,Fr.o)((e=>({signals:e?.signals,loading:e?.isBuffering&&!e.isPaused,uri:e?.item?.uri}))),{spec:m,logger:p}=(0,Jr.r)(Is.E,{data:{uri:d??"",identifier:Kt.K.npv}}),h=(0,at.useCallback)((()=>{r?(o.sendSignal(_S.L.SWITCH_TO_AUDIO),p.logInteraction(m.toggleAudioVideoButtonFactory({identifier:"switch_to_audio"}).hitPlay({itemToBePlayed:d??""}))):(o.sendSignal(_S.L.SWITCH_TO_VIDEO),p.logInteraction(m.toggleAudioVideoButtonFactory({identifier:"switch_to_video"}).hitPlay({itemToBePlayed:d??""}))),s((e=>!e))}),[r,o,p,m,d]);(0,at.useEffect)((()=>{o.canSendSignal(_S.L.SWITCH_TO_VIDEO)?s(!1):o.canSendSignal(_S.L.SWITCH_TO_AUDIO)&&s(!0)}),[o,l]);const g=(0,Iu.t)(m.toggleAudioVideoButtonFactory({identifier:r?"switch_to_audio":"switch_to_video"})),f=(0,a.NC)(Ie.KkE,{loadingValue:!1}),b=r?n:t;return f?(0,ct.jsx)(at.Suspense,{fallback:!0,children:(0,ct.jsxs)("div",{className:gr()(ES.A.container,e),ref:g,children:[(0,ct.jsxs)("div",{"aria-label":i,className:gr()(ES.A.button,ES.A.loading,{[ES.A.loadingVisible]:r&&c}),"aria-hidden":!0,children:[(0,ct.jsx)("div",{className:ES.A.spinner}),(0,ct.jsx)(fr.E,{as:"span",variant:"bodySmall",children:i})]}),(0,ct.jsxs)("button",{"aria-label":b,className:gr()(ES.A.button,ES.A.switch,{[ES.A.hidden]:r&&c}),onClick:h,disabled:c,children:[r?(0,ct.jsx)(CS,{}):(0,ct.jsx)(xS,{}),(0,ct.jsx)(fr.E,{as:"span",variant:"bodySmallBold",children:b})]})]})}):null};var AS=n(51820);const wS="main-nowPlayingView-nowPlayingWidget",IS="T5_sYfKJ2efL3n3dFNuN",TS="main-nowPlayingView-nowPlayingGrid",NS="main-nowPlayingView-contextItemInfo",RS="hhFdIYRyHsqlCHy7T_8A",kS="GcHVbLWw6KOwa2xndYQM",OS="main-nowPlayingView-coverArtContainer",PS="ylBRlfNqGnzVa4kjUQGP",jS="E08D6ucrHuPJYzzGO7HG",LS="S6W0kreMgaIXYWSEYHya",DS="hCImOEZCJwYaSy2r1Xgx",US="hjyiWzPtKHn_5kCe9vyg",MS="main-nowPlayingView-trackInfo",BS="eEiwEPDfVRD0HKjYM_dq",FS=({item:e,spec:t})=>{const n=(0,ot.s)(),i=(0,at.useCallback)((i=>{const r=i?t.heartButtonFactory().hitLike({itemToBeLiked:e.uri}):t.heartButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});n.logInteraction(r)}),[e.uri,n,t]),r=(0,Jp.v)(e),s=(0,Pg.y)();return r?(0,ct.jsx)(Xp.g,{uri:e.uri,size:s===Og.E.MEDIUM?"medium":"small",className:RS}):(0,Zt.v)(e)&&!e.isLocal?(0,ct.jsx)(la.b,{uri:e.uri,size:s===Og.E.MEDIUM?aa.t.sm:aa.t.xs,onClick:i,className:RS}):(0,$t.p)(e)?(0,ct.jsx)(oa.b,{uri:e.uri,size:s===Og.E.MEDIUM?aa.t.sm:aa.t.xs,onClick:i,className:RS}):null},HS=({context:e,item:t})=>{const{spec:n,logger:i}=(0,Jr.r)(Zy.J,{}),{spec:r}=(0,Jr.r)(Kr.p6,{data:{identifier:Kr.gw.DESKTOP}}),s=(0,Th.X)();return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Ah,{context:e,item:t,className:gr()(IS),onClick:()=>{i.logInteraction(r.hideButtonFactory().hitRemoveRecommendation({recommendedItemUri:t.uri,contextUri:e.uri}))}}),s&&(0,th.N)(t)?(0,ct.jsx)(Hr.r,{spec:n,children:(0,ct.jsx)(eh.o,{contextUri:t.metadata?.context_uri??e.uri,id:t.uid??void 0,uri:t.uri,isActive:!0})}):(0,ct.jsx)(FS,{item:t,spec:n})]})};var VS=n(45559);const zS=Spicetify.GraphQL.Definitions["canvas"]=new Q.l("canvas","query","1b1e1915481c99f4349af88268c6b49a2b601cf0db7bca8749b5dd75088486fc",null),GS=e=>{const t=(0,Fr.o)((e=>e?.item?.type===M.c.TRACK&&e?.item?.metadata?.["canvas.fileId"]?{uri:e?.item?.metadata?.["canvas.canvasUri"],type:e?.item?.metadata?.["canvas.type"],fileId:e?.item?.metadata?.["canvas.fileId"]}:null),Vr.a),n=((e,t)=>{const{request:n}=(0,at.useContext)(ci.j),{name:i,sha256Hash:r}=zS,s={uri:e},{data:a,isLoading:o,error:l}=(0,Vg.I)({enabled:t,queryKey:[i,s,r],gcTime:36e5,staleTime:6e5,queryFn:()=>new Promise(((e,t)=>{(0,tb.c)(n,zS,s).then((t=>"Track"!==t?.data?.trackUnion.__typename?e(null):e({uri:t?.data?.trackUnion?.canvas?.uri,type:t?.data?.trackUnion?.canvas?.type,fileId:t?.data?.trackUnion?.canvas?.fileId}))).catch(t)})),meta:{persist:!0}});return{data:a,isLoading:o,error:l}})(e,!t),i=t||n?.data;return i?{canvas:i,loading:!t&&!!n?.isLoading,error:t?null:n?.error}:null};var WS=n(9751),KS=n(61965);const YS="Z_lhw3kk_krs5GqxYAPn",qS=()=>{const{setVideoPlayerUIFlag:e}=(0,Lr.d)(),{close:t}=(0,KS.H)(),n=(0,at.useCallback)((()=>{e(Kt.n.documentPip,!1),t()}),[t,e]);return(0,ct.jsx)("div",{children:(0,ct.jsxs)("div",{className:YS,children:[(0,ct.jsx)(fr.E,{variant:"bodySmall",children:u.Ru.get("web-player.now-playing-view.video.playing-in-pip")}),(0,ct.jsx)(_x.n,{onClick:n,size:"small",children:u.Ru.get("web-player.now-playing-view.video.return-playback")})]})})},QS=()=>{const{remoteDeviceName:e,connectionStatus:t}=(0,Uo.v)((e=>{const t=(0,bc.V)(e);return{remoteDeviceName:t.remoteDevice?.name,connectionStatus:t.connectionStatus}}),Vr.a);let n="";return e&&t===q.zP.CONNECTING?n=u.Ru.get("web-player.connect.bar.connecting-state",{device_name:e}):e&&t===q.zP.CONNECTED&&(n=u.Ru.get("web-player.connect.bar.connected-state",{device_name:e})),(0,ct.jsx)("div",{children:(0,ct.jsx)("div",{className:YS,children:(0,ct.jsx)(fr.E,{variant:"bodySmall",children:n})})})};var $S=n(77458);const ZS="eE_GTFbVOesrDJsMsoJF",XS=({uri:e})=>{const t=(0,at.useContext)(Jy.s),n=GS(e),i=(0,a.NC)(Ie.yJ8)===Ie.NtL.CANVAS_PLAY_ON_HOVER;return n?.canvas&&t?(0,ct.jsx)($S.Gg,{fileId:n.canvas.fileId,canvasType:n.canvas.type,canvasUri:n.canvas.uri,playerContainerClass:"canvasVideoContainerNPV",className:ZS,playbackType:i?$S.RT.LoopOnHover:$S.RT.LoopOnPlayback,mouseHoverRef:t}):null};var JS=n(46856);const eA=(0,at.lazy)((()=>n.e(4511).then(n.bind(n,24511)))),tA=(0,at.lazy)((()=>n.e(8839).then(n.bind(n,8839))));let nA=function(e){return e[e.NONE=0]="NONE",e[e.COVER_ART=1]="COVER_ART",e[e.VIDEO_OVER_PIP_PLACEHOLDER=2]="VIDEO_OVER_PIP_PLACEHOLDER",e[e.VIDEO_OVER_CONNECT_PLACEHOLDER=3]="VIDEO_OVER_CONNECT_PLACEHOLDER",e[e.CANVAS=4]="CANVAS",e}({});const iA=()=>{const e=(0,ll.L)(),t=(0,bc.l)(),{videoPlayerMode:n}=(0,Lr.d)(),i=(0,el.j)(),r=GS(e?.item?.uri??""),s=(0,a.NC)(Ie.yJ8),o=(0,WS.g)(),l=!!r?.canvas&&!!r.canvas.fileId,c=!i&&o&&s!==Ie.NtL.CONTROL&&l,{isSongVideo:u,isSongVideoPlayingVideo:d}=(0,AS.k)(),m=(0,nt.d4)((e=>e.ads?.vto));if(!e)return nA.NONE;const{item:p}=e;return n===Kt.K.documentPip||n===Kt.K.pip?nA.VIDEO_OVER_PIP_PLACEHOLDER:p?.type===M.c.AD&&m?.isMinimized&&"audio"!==p?.mediaType?nA.NONE:p?.type!==M.c.EPISODE||"video"!==p?.mediaType&&"mixed"!==p?.mediaType?u&&d?t?nA.VIDEO_OVER_CONNECT_PLACEHOLDER:nA.NONE:c?nA.CANVAS:nA.COVER_ART:t?nA.VIDEO_OVER_CONNECT_PLACEHOLDER:nA.NONE},rA=({hideContextItemInfo:e=!1})=>{const t=(0,ll.L)(),n=iA(),{draggable:i,onDragStart:r}=(0,rh.P)(),{spec:s,logger:a}=(0,Jr.r)(Zy.J,{}),{isSongVideo:o}=(0,AS.k)(),l=n===nA.CANVAS,c=n===nA.COVER_ART,u=(0,Nh.xF)(t?.item.uri||""),d=(0,at.useRef)(null),m=(0,at.useRef)(null),p=(0,at.useRef)(null),h=!(0,el.j)(),[g,f]=(0,at.useState)(null);if(h&&l&&d.current&&p.current&&(f(p.current),setTimeout((()=>{f(null)}),600)),d.current=c,m.current=l,p.current=t,null===t)return null;const{context:b,item:v,index:y}=t,_="isPodcastAd"in v&&v.isPodcastAd&&v.metadata?.["podcast_ads.buttonMessage"]&&v.metadata?.["podcast_ads.tagline"];return(0,ct.jsxs)("div",{className:gr()(wS,{[kS]:h}),children:[(0,ct.jsxs)("div",{className:TS,children:[(0,ct.jsxs)("div",{className:gr()(OS,{[US]:l,[DS]:c}),children:[(0,ct.jsx)("div",{className:PS,children:(0,ct.jsx)(VS.h,{context:g?.context||b,item:g?.item||v,index:y})}),n===nA.VIDEO_OVER_PIP_PLACEHOLDER&&(0,ct.jsx)(qS,{}),n===nA.VIDEO_OVER_CONNECT_PLACEHOLDER&&(0,ct.jsx)(QS,{}),(0,ct.jsx)("div",{className:gr()(jS,{[LS]:!l}),children:(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Xy.W,{context:b,item:v,canSwitchVisuals:!0}),children:(0,ct.jsx)("div",{draggable:i,onDragStart:e=>{r(e,{itemUris:[v.uri],dragLabelText:(0,vx.r)(v)})},children:l&&(0,ct.jsx)(XS,{uri:v.uri})})})}),(0,ct.jsx)(JS.F,{})]}),o&&(0,ct.jsx)(SS,{className:l?BS:""}),e?null:(0,ct.jsxs)("div",{className:NS,children:[(0,ct.jsx)(zE.d,{className:gr()(MS),context:b,item:v,titleTypeVariant:"titleSmall",subtitleTypeVariant:"bodyMedium",onTitleClick:e=>{a.logInteraction(s.titleFactory({uri:v.uri}).hitUiNavigate({destination:e||""})),v.type===M.c.TRACK&&u({categoryAndAction:Nh.Mu.NowPlayingView,destinationUrl:(0,j.o_)(e)?.toURL()})},onSubtitleClick:e=>{a.logInteraction(s.artistFactory({uri:v.uri}).hitUiNavigate({destination:e||""}))},referrer:ih.G.NPV}),(0,qt.N)(v)?_?null:(0,ct.jsx)(at.Suspense,{fallback:!0,children:(0,ct.jsx)(eA,{item:v,onCtaClick:e=>{a.logInteraction(s.titleFactory({uri:v.uri}).hitUiNavigate({destination:e||""}))}})}):(0,ct.jsx)(HS,{context:b,item:v})]})]}),_&&(0,ct.jsx)(at.Suspense,{fallback:!0,children:(0,ct.jsx)(tA,{item:v,onCtaClick:e=>{a.logInteraction(s.titleFactory({uri:v.uri}).hitUiNavigate({destination:e||""}))}})})]})},sA="QjkE7lL6vDkJZovRnCjA",aA="IkRGajTjItEFQkRMeH6v",oA="f2UE9n5nZcbgZrGYTU3r",lA="nw2W4ZMdICuBo08Tzxg9",cA=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(4435)]).then(n.bind(n,44435))));function uA(e){return(0,Zt.v)(e)||(0,Xt.v)(e)||(0,$t.p)(e)||(0,Qt.d)(e)?e.name:(0,qt.N)(e)?"":(0,B.d)(e)}const dA=at.memo((({item:e,spec:t})=>{const{ref:n,breakpoint:i}=(0,jg.x)({[Og.E.XSMALL]:0,[Og.E.SMALL]:280,[Og.E.MEDIUM]:320});return(0,ct.jsx)("div",{className:lA,"":"NPV_Panel_OpenDiv",ref:n,children:e&&(0,ct.jsxs)(Pg.o.Provider,{value:i,children:[(0,ct.jsx)(rA,{}),(0,ct.jsx)(bS,{item:e,spec:t}),!(0,$t.p)(e)&&(0,ct.jsx)(Ix,{})]})})})),mA=({context:e,item:t,spec:n,currentPanel:i})=>{const r=(0,Il.v7)();(0,at.useEffect)((()=>{r.current&&(r.current.scrollTop=0)}),[t?.uri,r]);return i===Ho.Z.NowPlayingView?(0,ha.bJ)(e,t)?(0,ct.jsx)(jp.IT,{spec:n}):(0,ct.jsx)(dA,{currentPanel:i,context:e,item:t,spec:n}):(0,ct.jsx)("div",{"":"NPV_Panel_ClosedDiv"})},pA=({context:e,item:t,spec:n,currentPanel:i})=>(0,ct.jsx)(mA,{currentPanel:i,context:e,item:t,spec:n}),hA=()=>iA()!==nA.CANVAS,gA=({item:e})=>{const t=(0,at.useRef)(null),n=(0,ll.L)(),{title:i,link:r}=fa(),{spec:s,logger:a}=(0,Jr.r)(Zy.J,{}),o=(0,at.useCallback)((()=>{const e=s.closeButtonFactory().hitUiHide();a.logInteraction(e)}),[s,a]);(0,at.useEffect)((()=>{null!==t.current&&t.current.focus()}),[]);const l=gr()(sA);return(0,ct.jsx)(t_.a,{title:i,link:r,actions:n&&n.context&&(0,ct.jsx)(ws.b,{menu:(0,ct.jsx)(Xy.W,{context:n.context,item:e,canSwitchVisuals:!0}),children:(0,ct.jsx)(dd.e,{size:dd.M.xs,label:u.Ru.get("more.label.context",e?uA(e):""),onClick:()=>{a.logInteraction(s.contextMenuButtonFactory().hitUiReveal())}})}),panelLinkRef:t,panel:Ho.Z.NowPlayingView,onClose:o,item:e,className:l})},fA=({item:e})=>{const t=!hA();return(0,at.useMemo)((()=>t?(0,ct.jsx)(gA,{item:e}):null),[e,t])},bA=({item:e})=>{const t=(0,uo.w)(e),n=hA();return(0,at.useMemo)((()=>!t&&n?(0,ct.jsx)(gA,{item:e}):null),[e,n,t])},vA=({currentPanel:e})=>{const{context:t,item:n,index:i}=(0,ll.L)()||{context:null,item:null,index:null},{spec:r,UBIFragment:s}=(0,Jr.r)($y.t,{data:{uri:n?n.uri:""}}),o=(0,uo.w)(n),l=(0,Iu.t)(r),c=(()=>{const{item:e}=(0,ll.L)()||n_,{isYourDJNarrator:t}=(0,gu.CV)(),n=(0,a.NC)(Ie.yon),i=(0,Dr.z)(e?.images?.[0]?.url,Ab.gray30,"colorDark");return t?b.Ym:n?i:void 0})(),d={"--background-base":c,"--section-background-base":c?"var(--background-tinted-base)":"var(--background-elevated-base)"};return(0,ct.jsx)(Uc.P,{surface:Dc.u.NOW_PLAYING,children:(0,ct.jsx)(Il.ql.Provider,{value:"now_playing_panel",children:(0,ct.jsx)(Jy._,{label:u.Ru.get("web-player.now-playing-view.label"),style:d,itemUri:n?.uri?n.uri:"","":"now-playing-view-container",children:(0,ct.jsx)(s,{spec:r,children:(0,ct.jsx)(e_.w,{className:gr()(aA,{[oA]:void 0!==c}),fixedHeader:(0,ct.jsx)(bA,{item:n}),ref:l,children:o?(0,ct.jsx)(cA,{item:n,context:t,index:i,currentPanel:e}):(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(fA,{item:n}),(0,ct.jsx)(pA,{spec:r,currentPanel:e,context:t,item:n})]})})})})})})};var yA=n(12363),_A=n(50145),EA=n(58829),xA=n(733),CA=n(47052),SA=n(49073),AA=n(68584),wA=n(42947),IA=n(98496);const TA="AjjTyUrCO3pZ365KtTXW",NA="pGtUoenc5OobLi8CscJ6",RA="cArVcLcQ85q_9QSLGYGX",kA="lDtXv1VCrs0PHHSuH5uO",OA="ukjUoaLSzKyRcwoOQw9V",PA="yQwBNeetmAr0a0OTR8t3",jA="fzB4RXxTp0rlpNQlSuu9",LA=({sessionMember:e,showRemoveButton:t,onClickMember:n,onClickRemove:i,index:r})=>{const{currentSession:s}=(0,oc.D)(),{displayName:a,images:o,username:l,uri:c}=(0,dc.c)(e);return(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(IA.B,{uri:c}),children:(0,ct.jsx)(cm.v,{id:`${r}`,variant:"naked",className:OA,title:(0,ct.jsx)(um.d,{lineClamp:1,children:a}),media:(0,ct.jsx)("div",{role:"button",onClick:n,onKeyDown:n,tabIndex:-1,children:(0,ct.jsx)(Ef.e,{images:o,userIconSize:"medium",width:48,displayName:a,username:l,label:a})}),subtitle:s?.sessionOwnerId===e.id?u.Ru.get("web-player.social-connect.participant-list.host"):u.Ru.get("web-player.social-connect.participant-list.guest"),onClick:n,trailing:t&&(0,ct.jsx)(_x.n,{size:"small",className:PA,onClick:i,"aria-label":u.Ru.get("web-player.social-connect.participant-list.remove-guest-accessible-label",{displayName:a}),children:u.Ru.get("web-player.social-connect.participant-list.remove-guest")})})})};var DA=n(84840);const UA=()=>{const{spec:e,logger:t,UBIFragment:n}=(0,Jr.r)(DA.I,{});return{logUserClick:(0,at.useCallback)(((n,i)=>{t.logInteraction(e.participantListFactory().participantListRowFactory({position:n}).userLinkFactory().hitUiNavigate({destination:i}))}),[t,e]),logRemoveClick:(0,at.useCallback)((n=>{t.logInteraction(e.participantListFactory().participantListRowFactory({position:n}).removeButtonFactory().hitUiReveal())}),[t,e]),UBIFragmentWithSpec:(0,at.useCallback)((t=>(0,ct.jsx)(n,{spec:e,...t})),[n,e])}},MA=()=>{const e=(0,Hi.g)(),t=(0,nt.wA)(),n=(0,cn.Zp)(),i=(0,AA.Z)(),{currentSession:r,kickAllParticipants:s}=(0,oc.D)(),{setQueueView:a}=(0,SA.m)(),{logUserClick:o,logRemoveClick:l}=UA(),c=(0,at.useCallback)((()=>{r?.joinSessionShortLink&&i(r?.joinSessionShortLink)}),[i,r?.joinSessionShortLink]),d=(0,at.useCallback)(((e,n)=>{l(e),t((0,et.A9)(Vc.EL.REMOVE_PARTICIPANT,void 0,n))}),[t,l]),m=(0,at.useCallback)(((e,t)=>{const i=(0,j.Qj)(t.username);o(e,i.toURI()),n(i.toURLPath(!0))}),[o,n]),p=(0,at.useCallback)((()=>{s(r?.sessionId)}),[r?.sessionId,s]),h=(0,wA.T4)(e);return r&&h?(0,ct.jsxs)("div",{className:TA,children:[(0,ct.jsx)(fr.E,{variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("web-player.social-connect.participant-list.title")}),(0,ct.jsxs)("div",{className:NA,children:[(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:u.Ru.get("web-player.social-connect.participant-list.subtitle")}),(0,ct.jsx)(_x.n,{size:"small",onClick:c,className:RA,children:u.Ru.get("web-player.social-connect.invite-button")})]}),(0,ct.jsx)("div",{className:kA,children:r.sessionMembers.map(((t,n)=>(0,ct.jsx)(LA,{index:n,sessionMember:t,showRemoveButton:(0,wA.kt)(e,(0,j.Qj)(t.username).toURI()),onClickRemove:()=>d(n,t),onClickMember:()=>m(n,t)},n)))}),r.isSessionOwner&&r.sessionMembers.length>1&&(0,ct.jsx)(br.$,{colorSet:"invertedLight",size:"small",onClick:p,children:u.Ru.get("web-player.social-connect.participant-list.remove-all-guests")}),(0,ct.jsx)(fr.E,{variant:"marginal",semanticColor:"textSubdued",className:jA,children:u.Ru.get("web-player.social-connect.participant-list.visibility-info")})]}):(a(SA.p.QUEUE),null)};var BA=n(63508),FA=n(7018),HA=n(80314),VA=n(17092),zA=n(72460),GA=n(35289);const WA="PddBvUOS0_6f9B21fVGF",KA=({ariaLabel:e,onRemoveItems:t,nrItems:n,columnCount:i,children:r})=>{const s=(0,at.useRef)(null);(0,VA.g)(s);const a=(0,zA.d)(t);return(0,ct.jsx)(HA.R,{firstInteractiveIsWrapper:!0,"aria-label":e,"aria-rowcount":n,"aria-colcount":i,className:WA,ref:s,onKeyDown:a,children:r})},YA=({items:e,renderRow:t,...n})=>{const i=(0,at.useCallback)(((t,n)=>e.slice(t,n+1)),[e]);return(0,ct.jsx)(GA.k,{resolveItem:qA,getItems:i,nrTracks:e.length,children:(0,ct.jsx)(KA,{nrItems:e.length,...n,children:e.map(t)})})};function qA(e){return{uri:e.uri,uid:e.uid??void 0,type:e.type}}function QA(e,t){return e.uid??`${e.uri}:${t}`}var $A=n(35814),ZA=n(71673),XA=n(59904),JA=n(88745),ew=n(62166),tw=n(263);const nw="VXFYm2GnsH4zc3EPikNi",iw="yvjS3DPkDIHgMUZxL972",rw="Os6nTuXambdCB8H81QRT",sw="RDIVOZoeGMohQ8MeJjUH",aw="Cj0QJuDauCo39643t0Q8",ow="evQ_5Znk6OXYHBzLCSoN",lw="nCwi6jOC9FEKO5tKAQKW",cw="DP0qcvnv6ToERKYhb9Xk",uw="yIYdkVZJzDlj1lqOmV1M",dw="kh6wYYPvgRPBhA2wj3AS",mw="qp7Sys7hJSZHLzw4K_yF",pw="fIabFr0bD1PUqwipmTjQ",hw=({title:e,type:t,images:n,onTogglePlay:i,isPlaying:r,ariaPauseLabel:s,ariaPlayLabel:a})=>{const o=(0,wt._)(),l=t===M.c.ARTIST||t===M.c.USER?xf.u.CIRCLE:xf.u.ROUNDED_CORNERS;return(0,ct.jsxs)("div",{className:dw,children:[(0,ct.jsx)(xf.b,{fadeIn:!0,images:o(n??[],48),shape:l,size:Cf.Qe.SIZE_48,iconSize:"medium",type:t,title:e,loadingMode:"eager"}),(0,ct.jsx)("span",{className:gr()(mw,aw),children:(0,ct.jsx)(tw.R,{onClick:i,version:tw.H.transparent,isPlaying:r,ariaPauseLabel:s,ariaPlayLabel:a,condensedAll:!0})})]})};var gw=n(83525);const fw=({title:e,isActive:t,uri:n,type:i})=>{const{trackPageEnhancedEnabled:r,trackPageLinksNoLyricsEnabled:s}=(0,Nh.Zo)(),a=i===M.c.TRACK&&(r||s);return(0,ct.jsx)(_s.Zp,{showDelay:_s.uF,label:e,children:(0,ct.jsx)(gw.R,{enabled:a,uri:n,children:(0,ct.jsx)(um.d,{lineClamp:1,semanticColor:t?"textBrightAccent":"textBase",dir:"auto",children:e})})})},bw=({menu:e,labelName:t})=>(0,ct.jsx)(ws.b,{menu:e,children:(0,ct.jsx)(dd.e,{className:aw,label:u.Ru.get("more.label.context",t),size:"small"})}),vw=({queuedBy:e})=>{if(!e)return null;const t=(0,iC.g)(e.images,{desiredSize:24});return(0,ct.jsx)(_s.Zp,{label:u.Ru.get("queue.queued-by",e.name),children:(0,ct.jsx)("div",{children:(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(IA.B,{uri:e.uri}),children:(0,ct.jsx)(P_.default,{to:e.uri,children:(0,ct.jsx)(Ef.e,{images:t?[t]:[],userIconSize:"small",width:24,displayName:e.name,username:e.username,label:""})})})})})},yw=({queuedBy:e,menu:t,moreButtonLabelName:n})=>(0,ct.jsxs)("div",{className:sw,children:[t&&n&&(0,ct.jsx)(bw,{menu:t,labelName:n}),(0,ct.jsx)(vw,{queuedBy:e})]});var _w=n(96537),Ew=n(42476);const xw="spotify:app:queue";const Cw=()=>(0,ct.jsx)("div",{className:nw}),Sw=({id:e,uid:t,uri:n,contextUri:i,index:r,dragLabel:s,type:a,title:o,subtitle:l,images:c,onDrop:u,allowedDropMimeTypes:d,menu:m,moreButtonLabelName:p,usePlayContextItem:h,section:g,queuedBy:f,ariaPauseLabel:b,ariaPlayLabel:v,onContextMenu:y})=>{const{className:_,dropPosition:E,draggable:x,...C}=function({uid:e,uri:t,index:n,dragLabel:i,allowedMimeTypes:r=[],onDrop:s,sectionId:a}){const{draggable:o,onDragStart:l}=(0,Ew.R)({index:n,contextUri:xw,sectionId:a,label:i??"",isEnabled:!!i}),c=(0,_w.A)({id:e??void 0,uri:t,allowedMimeTypesByDropPosition:{[XA.Nz.BEFORE]:r,[XA.Nz.AFTER]:r},onDrop:s});return(0,at.useMemo)((()=>({...c,draggable:o,onDragStart:l})),[o,c,l])}({uid:t,uri:n,index:r,dragLabel:s,onDrop:u,allowedMimeTypes:d,sectionId:g}),{isSelected:S}=(0,at.useContext)(GA.m),{onClick:A,onContextMenu:w,onKeyDown:I}=(0,JA.q)({index:r,contextUri:i,onContextMenu:y,canRemovePlaylistItems:!1,removePlaylistItems:void 0,isTreeGrid:!0}),T=(0,ot.s)(),{spec:N}=(0,Jr.r)($A.i,{data:{position:r,reason:"",uri:n}}),{isActive:R,isPlaying:k,togglePlay:O,triggerPlay:P}=h({uri:n,uid:t??void 0}),j=(0,at.useCallback)((()=>{const e=(0,ew.$I)({spec:N.playbackButtonFactory(),logger:T,uri:n,isActive:R,isPlaying:k});O({loggingParams:e})}),[R,k,T,N,O,n]),L=(0,at.useCallback)((()=>{const e=T.logInteraction(N.doubleHitPlay({itemToBePlayed:n}));P({loggingParams:e})}),[T,N,P,n]),D=(0,at.useCallback)((e=>{if("Enter"===e.key&&e.target instanceof Element&&e.currentTarget.querySelector(':scope > [role="button"]')===e.target){const e=T.logInteraction(N.playbackButtonFactory().hitPlay({itemToBePlayed:n}));P({loggingParams:e})}I(e)}),[T,I,N,P,n]),U=(0,at.useCallback)((e=>{const t=e.currentTarget.querySelector('[role="button"]');t instanceof HTMLElement&&t.focus(),A(e)}),[A]),M=(0,ct.jsx)(hw,{type:a,onTogglePlay:j,isPlaying:k,title:o,images:c,ariaPauseLabel:b,ariaPlayLabel:v}),B=(0,ct.jsx)(yw,{queuedBy:f,menu:m,moreButtonLabelName:p}),F=S(r),H=F&&S(r-1),V=F&&S(r+1),z=(0,ct.jsx)(cm.v,{id:e,media:M,title:(0,ct.jsx)(fw,{isActive:R,title:o,uri:n,type:a}),subtitle:l,className:gr()(rw,_,{[ow]:H,[lw]:V}),variant:S(r)?"tinted":void 0,trailing:B,onDoubleClick:L,hoverAnimationDuration:"0ms",padding:k_.v4,onClick:()=>{},onContextMenu:w}),G=(0,ct.jsx)(ZA.W,{className:gr()(_),draggable:x&&!!s,"aria-posinset":r,onKeyDown:D,...C,onClick:U,children:z});return(0,ct.jsxs)(ct.Fragment,{children:[E===XA.Nz.BEFORE&&(0,ct.jsx)(Cw,{}),G,E===XA.Nz.AFTER&&(0,ct.jsx)(Cw,{})]})},Aw=e=>{const t=(0,ct.jsx)(Sw,{...e});return e.menu?(0,ct.jsx)(pm.h,{menu:e.menu,children:t}):t},ww=({ad:e,index:t,...n})=>{const{uid:i,uri:r,type:s,title:a,advertiser:o,images:l}=e,c=QA(e,t),d=o??a??u.Ru.get("ad-formats.advertisement");return(0,ct.jsx)(Aw,{uid:i,uri:r,id:c,index:t,type:s,title:d,images:l,subtitle:null,...n})};var Iw=n(84749),Tw=n(96567),Nw=n(27902),Rw=n(15704),kw=n(13480),Ow=n(11437);const Pw="iFEXaIHbvw1bGP0fFu9g",jw=({type:e})=>{const t=function(e){switch(e){case M.c.TRACK:return u.Ru.get("web-player.queue-history.item-type.track");case M.c.EPISODE:return u.Ru.get("web-player.queue-history.item-type.episode");case M.c.CHAPTER:return u.Ru.get("web-player.queue-history.item-type.chapter");case M.c.AD:case M.c.UNKNOWN:return null;default:return(0,B.k)(e),null}}(e);return t&&(0,ct.jsx)(fr.E,{semanticColor:"textSubdued",variant:"bodySmall",children:t})};const Lw=({item:e,subtitle:t,tooltipText:n,showTypeLabel:i})=>{const r=(e=>{const t=(0,Ow.T)(e.uri),n=(0,Zt.v)(e)||(0,$t.p)(e)||(0,Qt.d)(e),i=at.Children.toArray([(0,th.N)(e)&&(0,ct.jsx)(Nw.R,{title:u.Ru.get("web-player.smart-shuffle.icon-hover-label"),"aria-label":u.Ru.get("web-player.smart-shuffle.icon-hover-label"),semanticColor:"textBrightAccent",size:"small"}),t===ce.kw.YES&&(0,ct.jsx)(kw._,{}),n&&e.isExplicit&&!e.is19PlusOnly&&(0,ct.jsx)(L_.g,{}),n&&e.is19PlusOnly&&(0,ct.jsx)(D_.q,{size:16}),(0,Zt.v)(e)&&(e.hasAssociatedVideo||"video"===e.mediaType)&&(0,ct.jsx)(Rw.l,{})]);return i.length?(0,ct.jsx)("span",{className:Pw,children:i}):null})(e);return(0,ct.jsx)(dm.j,{dir:"auto",children:(0,ct.jsxs)(fr.E,{semanticColor:"textSubdued",variant:"bodySmall",className:cw,children:[r?(0,ct.jsx)("span",{className:pw,children:r}):null,(0,ct.jsx)(_s.Zp,{label:n,showDelay:_s.uF,children:(0,ct.jsxs)("span",{className:uw,children:[i&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(jw,{type:e.type})," •"," "]}),t]})})]})})};var Dw=n(64298);function Uw(e){let{uri:t}=(0,Ts.f)();return e===Dw.$.NextInQueue?t="spotify:app:queue:NextInQueue":e===Dw.$.NextUp&&(t="spotify:app:queue:NextUp"),t??""}const Mw=({chapter:e,index:t,showTypeLabel:n,...i})=>{const{uid:r,uri:s,type:a,name:o,images:l,book:c}=e,d=QA(e,t),m=Uw(i.section),p=(0,ct.jsx)(Tw.r,{uri:s,removeFromQueueData:{uid:r??void 0,contextUri:m}}),h=(0,ct.jsx)(Lw,{item:e,tooltipText:c.name,showTypeLabel:n,subtitle:(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Iw.p,{uri:c.uri}),children:(0,ct.jsx)(P_.default,{to:c.uri,stopPropagation:!0,children:c.name})})});return(0,ct.jsx)(Aw,{uid:r,uri:s,contextUri:m,id:d,index:t,type:a,title:o,subtitle:h,images:l,dragLabel:o,menu:p,moreButtonLabelName:o,ariaPauseLabel:u.Ru.get("playlist.a11y.pause",o),ariaPlayLabel:u.Ru.get("playlist.a11y.play",o),...i})},Bw=({episode:e,index:t,showTypeLabel:n,...i})=>{const{uid:r,uri:s,type:a,name:o,images:l,show:c}=e,d=QA(e,t),m=Uw(i.section),p=(0,ct.jsx)(N_.b,{uri:s,uid:r??void 0,showUri:e.show.uri,contextUri:m,provider:e.provider}),h=(0,ct.jsx)(Lw,{item:e,tooltipText:c.name,showTypeLabel:n,subtitle:(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Nx.H,{uri:c.uri}),children:(0,ct.jsx)(P_.default,{to:c.uri,stopPropagation:!0,children:c.name})})});return(0,ct.jsx)(Aw,{uid:r,uri:s,contextUri:m,id:d,index:t,type:a,title:o,subtitle:h,images:l,dragLabel:o,menu:p,moreButtonLabelName:o,ariaPauseLabel:u.Ru.get("tracklist.a11y.pause",o,c.name),ariaPlayLabel:u.Ru.get("tracklist.a11y.play",o,c.name),...i})};var Fw=n(59416),Hw=n(16975),Vw=n(41955);const zw=({track:e,index:t,showTypeLabel:n,...i})=>{const{uid:r,uri:s,type:a,name:o,album:l}=e,c=QA(e,t),d=Uw(i.section),{uri:m}=(0,Ts.f)(),p=e.isLocal?(0,ct.jsx)(Hw.A,{uri:s,uid:r??void 0,contextUri:d}):(0,ct.jsx)(Vw.P,{uri:s,uid:r??void 0,albumUri:l.uri,artists:e.artists,contextUri:d,entityContextUri:m??void 0,isSmartRecommendation:(0,th.N)(e),provider:e.provider}),h=e.artists.map((({name:e})=>e)).join(u.Ru.getSeparator()),g=e.artists?(0,ct.jsx)(Lw,{item:e,tooltipText:h,showTypeLabel:n,subtitle:(0,ct.jsx)(ct.Fragment,{children:e.artists.map(((e,t)=>(0,ct.jsxs)(at.Fragment,{children:[t>0&&u.Ru.getSeparator(),(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Fw.t,{uri:e.uri}),children:(0,ct.jsx)(P_.default,{to:e.uri,stopPropagation:!0,children:e.name})})]},t)))})}):null;return(0,ct.jsx)(Aw,{uid:r,uri:s,contextUri:d,id:c,index:t,type:a,title:o,images:l.images,dragLabel:o,menu:p,moreButtonLabelName:o,subtitle:g,ariaPauseLabel:u.Ru.get("tracklist.a11y.pause",o,h),ariaPlayLabel:u.Ru.get("tracklist.a11y.play",o,h),...i})};var Gw=n(79392),Ww=n(48129),Kw=n(9714),Yw=n(91292);const qw=(0,at.createContext)(null),Qw=({children:e})=>{const{uri:t}=(0,Yw.H)(),{spec:n,UBIFragment:i}=(0,Jr.r)(Ww.i,{data:{identifier:Kw.$h.NOWPLAYING_QUEUE,uri:t??""}}),r=(0,at.useMemo)((()=>n.nowPlayingSectionFactory()),[n]),s=(0,at.useMemo)((()=>n.nextInQueueSectionFactory()),[n]),a=(0,at.useMemo)((()=>n.nextFromSectionFactory()),[n]),o=(0,at.useMemo)((()=>({queueSpec:n,nowPlayingSectionSpec:r,nextInQueueSectionSpec:s,nextFromSectionSpec:a})),[n,r,s,a]);return(0,ct.jsx)(qw.Provider,{value:o,children:(0,ct.jsx)(i,{spec:n,children:e})})};var $w=n(69330);const Zw=()=>{const e=(0,at.useContext)(qw);if(!e)throw Error("useQueueUBI must be used within a QueuePanelUBIProvider!");const{queued:t}=(0,Yw.H)(),n=(0,ot.s)(),{queueSpec:i,nowPlayingSectionSpec:r,nextInQueueSectionSpec:s,nextFromSectionSpec:a}=e;return{logClearQueue:(0,at.useCallback)((()=>{const e=s.clearQueueButtonFactory().hitRemoveItemsFromQueue({numberOfItemsToRemoveFromQueue:t.length});n.logInteraction(e)}),[n,s,t.length]),logAddToQueue:(0,at.useCallback)(((e,t)=>{let i;switch(e){case Dw.$.NowPlaying:i=r;break;case Dw.$.NextInQueue:i=s;break;case Dw.$.NextUp:i=a;break;default:return}const o=1===t.length?i.dragAddItemToQueue({itemToAddToQueue:t[0]}):i.dragAddItemsToQueue({numberOfItemsToAddToQueue:t.length});n.logInteraction(o)}),[n,a,s,r]),logSort:(0,at.useCallback)((e=>{let t;switch(e){case Dw.$.NextInQueue:t=s;break;case Dw.$.NextUp:t=a;break;case Dw.$.NowPlaying:default:return}const i=t.dragSort();n.logInteraction(i)}),[n,a,s]),logQueuePanelTabChange:(0,at.useCallback)((e=>{if(e!==$w.p.PARTICIPANT_LIST){const t=i.queueHistoryTabFactory({identifier:e===$w.p.QUEUE?"queue":"recently_played"}).hitUiReveal();n.logInteraction(t)}}),[n,i]),logQueueContextLinkNavigate:(0,at.useCallback)((e=>{const t=a.queueContextLinkFactory().hitUiNavigate({destination:e??""});n.logInteraction(t)}),[n,a])}};const Xw=(0,at.memo)((function({item:e,...t}){const n=function(e,t){const n=(0,zt.K)(),{request:i}=(0,at.useContext)(ci.j),{logAddToQueue:r,logSort:s}=Zw();return(0,at.useCallback)((async(a,o,l)=>{const{contextUri:c,sectionId:u,itemIds:d}=l??{},m=t===Dw.$.NowPlaying,p=xw===c&&!m,h=a[uu.fl.ALBUMS]?.at(0),g=Object.values(a).flat();let f=[];if(h){const{trackUris:e}=await(0,Gw.s)(h,0,i);f=e.map((e=>({uri:e,uid:null})))}else f=p&&d?.length?d.map((e=>({uri:"",uid:e}))):Object.values(a).flat().map((e=>({uri:e,uid:null})))??[];const b=p&&u===Dw.$.NowPlaying;let v;v=o===XA.Nz.BEFORE?{before:{uri:e.uri,uid:e.uid??null}}:{after:{uri:e.uri,uid:e.uid??null}},p&&!b?(t&&s(t),n.reorderQueue(f,v)):(t&&r(t,g),m?n.addToQueue(f):n.insertIntoQueue(f,v))}),[e.uid,e.uri,r,s,n,i,t])}(e,t.section);switch(e.type){case M.c.TRACK:return(0,ct.jsx)(zw,{track:e,onDrop:n,...t});case M.c.EPISODE:return(0,ct.jsx)(Bw,{episode:e,onDrop:n,...t});case M.c.CHAPTER:return(0,ct.jsx)(Mw,{chapter:e,onDrop:n,...t});case M.c.AD:return(0,ct.jsx)(ww,{ad:e,onDrop:n,...t});case M.c.UNKNOWN:return null;default:return(0,B.k)(e),null}})),Jw=(0,at.memo)((function({item:e,...t}){const{usePlayContextItem:n}=(0,R_.P)({uri:e.uri,pages:[{items:[e]}]},{featureIdentifier:"history"});return(0,ct.jsx)(Xw,{item:e,...t,usePlayContextItem:n})})),eI=({items:e})=>{const t=(0,at.useCallback)(((e,t)=>(0,ct.jsx)(Jw,{item:e,index:t},QA(e,t))),[]);return(0,ct.jsx)(YA,{items:e,ariaLabel:u.Ru.get("view.recently-played"),renderRow:t,columnCount:3})};var tI=n(61648);const nI=()=>{const{isLoading:e,data:t}=(0,FA.a)();return e?null:t?.items.length?(0,ct.jsx)(eI,{items:t.items}):(0,ct.jsx)(tI.H,{})};var iI=n(77173);const rI=(e,t)=>!t?.didQueueChangeSignificantly,sI=(e,t,n)=>{rI(0,n?.current)?(0,iI.oz)({onUpdate:t=>{e.style.opacity=t.toString()}}):e.style.opacity="1"},aI=(e,t,n,i)=>{rI(0,i?.current)?(0,iI.oz)({onUpdate:t=>{e.style.opacity=(1-Number(t)).toString()},onComplete:n}):n()},oI=({hideEnteringElements:e,animateEnteringElements:t,animateExitingElements:n,animateFlippedElements:i})=>{e(),n(),i(),t()};var lI=n(8741);function cI(e){const t=(0,at.useRef)(e);return(0,at.useMemo)((()=>{const n=new Map,i=dI(t.current,n),r=dI(e,n),s=(0,lI.I)(i,r),a=s>16||s>=Math.max(uI(e),uI(t.current));return t.current=e,a}),[e])}function uI(e){return Number(!!e?.current)+(e?.queued.length??0)+(e?.nextUp.length??0)}function dI({current:e,nextUp:t=[],queued:n=[]},i){let r="";return[[e],t,n].forEach((e=>{e.forEach((e=>{e?.uid&&(i.has(e.uid)||i.set(e.uid,String.fromCharCode(65+i.size)),r+=i.get(e.uid))})),e.length&&(r+=" ")})),r}function mI(){const e=(0,el.j)(),t=(0,a.NC)(Ie.J9c);return!e&&t}const pI=({current:e,queued:t,nextUp:n,children:i})=>{const r=(0,at.useMemo)((()=>[e,...t,...n].filter(se.P).map(QA).join("")),[e,n,t]),s={didQueueChangeSignificantly:cI({current:e,nextUp:n,queued:t})};return(0,ct.jsx)(iI.ZI,{flipKey:r,handleEnterUpdateDelete:oI,decisionData:s,children:i})},hI=({children:e,...t})=>mI()?(0,ct.jsx)(pI,{...t,children:e}):(0,ct.jsx)("div",{children:e}),gI=(e,t)=>{const n=(0,R_.P)({uri:e??""},{featureIdentifier:"queue"}),i=(0,at.useMemo)((()=>function(e,t){return n=>{const i=(0,zt.K)(),r=t===Dw.$.NowPlaying,{playbackStatus:s,isActive:a,isPlaying:o}=(0,nd.gC)((e=>r&&n.uri?(0,Se.Ok)(e,n.uri):Uu.i.NOT_ACTIVE)),l=e(n),c=(0,at.useCallback)((e=>{const{uri:t,uid:r}=n;l.triggerPlay(e,t?async()=>i.skipToNext({uri:t,uid:r??null}):void 0)}),[l,i,n]),u=(0,at.useCallback)((e=>{l.togglePlay(e,(()=>{if(a)return o?i.pause():i.resume();const{uri:e,uid:t}=n;return i.skipToNext(e?{uri:e,uid:t??null}:void 0)}))}),[l,a,n,i,o]);return{playbackStatus:s,isActive:a,isPlaying:o,triggerPlay:c,togglePlay:u}}}(n.usePlayContextItem,t)),[n.usePlayContextItem,t]);return{...n,usePlayContextItem:i}};const fI=({children:e,...t})=>mI()?(0,ct.jsx)(iI.lf,{shouldFlip:rI,...t,children:e}):(0,ct.jsx)(ct.Fragment,{children:e}),bI=[uu.fl.TRACKS,uu.fl.LOCAL_TRACKS,uu.fl.EPISODES,uu.fl.CHAPTERS,uu.fl.ALBUMS],vI=({uri:e,items:t,ariaLabel:n,section:i,showTypeLabel:r,decoratedQueuedByUsersByUsername:s})=>{const a=(0,zt.K)(),o=(0,at.useCallback)((e=>{a.removeFromQueue(e)}),[a]),{usePlayContextItem:l}=gI(e,i),c=(0,at.useCallback)(((e,t)=>{const n=QA(e,t);return(0,ct.jsx)(fI,{flipId:e.metadata?.original_uid??n,onAppear:sI,onExit:aI,translate:!0,children:(0,ct.jsx)("div",{className:iw,children:(0,ct.jsx)(Xw,{item:e,index:t,usePlayContextItem:l,section:i,allowedDropMimeTypes:bI,showTypeLabel:r,queuedBy:s?.[e.metadata?.queued_by??""]})})},n)}),[s,i,r,l]);return(0,ct.jsx)(YA,{items:t,renderRow:c,columnCount:3,ariaLabel:n,onRemoveItems:o})};var yI=n(30578);const _I="u842BXnznGeq38O3DUTQ",EI="NWVZ_rxlezZ8xTHlMg4Y",xI="Oae51evvT5DrqTupCiZ2",CI="LFdMliaHVgrpBcqNKHU3",SI="IeeqYq0Ozrndd6STmrRk",AI="NljerwmGshDHsI7rIvWl",wI=({nrQueuedItems:e})=>{const t=(0,zt.K)(),{logClearQueue:n}=Zw(),[i,r]=(0,at.useState)(!1),s=(0,at.useCallback)((()=>{r(!1)}),[]),a=(0,at.useCallback)((()=>{n(),t.clearQueue(),r(!1)}),[n,t]),o=(0,at.useCallback)((()=>{r(!0)}),[]);return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Xs.H,{size:"small",onClick:o,className:SI,condensed:!0,children:u.Ru.get("queue.clear-queue")}),(0,ct.jsx)(yI.p,{itemCount:e,isOpen:i,onClose:s,onConfirm:a})]})},II=({queueSection:e,title:t,trailingButton:n})=>{const i=(0,at.useRef)(null),r=(0,Tf.K)({ref:i});return(0,ct.jsx)(fI,{flipId:`section-header-${e}`,onAppear:sI,onExit:aI,translate:!0,children:(0,ct.jsxs)("div",{className:CI,children:[(0,ct.jsx)(_s.Zp,{label:t,disabled:!r,children:(0,ct.jsx)(fr.E,{as:"h2",variant:"bodyMediumBold",semanticColor:"textBase",className:AI,ref:i,children:t})}),n]})})};var TI=n(36596),NI=n(68083),RI=n(40091),kI=n(35430);const OI=Spicetify.GraphQL.Definitions["decorateQueuedByUsers"]=new Q.l("decorateQueuedByUsers","query","1b71b9895bad207fdac0df7ebad17c790260519f853a069ee05f20e51c08636e",null);function PI(e){const{currentSession:t}=(0,oc.D)(),n=Array.from(new Set(e.map((e=>e?.metadata?.queued_by||null)).filter(se.P))).sort().map((e=>(0,j.Qj)(e).toURI())),{data:i}=(r={userUris:n},s={gcTime:36e5,staleTime:18e5,enabled:!!n.length,placeholderData:kI.rX},(0,$.I)(OI,r,s));var r,s;const a=(0,at.useMemo)((()=>Object.fromEntries(i?.users?.map((e=>{return"User"===e.__typename?[e.username,(t=e,{type:M.c.USER,...t,images:t.avatar?.sources??[]})]:null;var t})).filter(se.P)??[])),[i]);return t?.active?a:{}}var jI=n(54723);const LI=()=>{const e=(0,Yw.H)(),{uri:t,description:n,current:i,nextUp:r,queued:s,isEmpty:a,hasQueuedTracks:o,hasNextTracks:l}=e,{logQueueContextLinkNavigate:c}=Zw(),d=PI([i,...r,...s]),m=(0,at.useMemo)((()=>new Set([i,...s,...r].filter(se.P).map((({type:e})=>e))).size>1),[i,r,s]),{currentSession:p}=(0,oc.D)(),h=(0,RI.y)();return(0,Nh.oQ)(Nh.VW.QueuePanel),a?(0,ct.jsx)(jI.K,{}):(0,ct.jsxs)(hI,{...e,children:[(0,ct.jsx)(TI.Z,{className:xI}),(0,ct.jsxs)("div",{className:_I,children:[i&&t&&(0,ct.jsxs)("div",{className:EI,children:[(0,ct.jsx)(II,{queueSection:Dw.$.NowPlaying,title:u.Ru.get("queue.now-playing")}),(0,ct.jsx)(vI,{ariaLabel:u.Ru.get("queue.now-playing"),uri:t,items:i?[i]:[],section:Dw.$.NowPlaying,showTypeLabel:m,decoratedQueuedByUsersByUsername:d})]}),!p?.active&&h&&(0,ct.jsx)(NI.p,{localStorageKey:"dismissStartJamButtonFromQueue"}),o&&t&&(0,ct.jsxs)("div",{className:EI,children:[(0,ct.jsx)(II,{queueSection:Dw.$.NextInQueue,title:u.Ru.get("queue.next-in-queue"),trailingButton:(0,ct.jsx)(wI,{nrQueuedItems:s.length})}),(0,ct.jsx)(vI,{ariaLabel:u.Ru.get("queue.next-in-queue"),uri:t,items:s,section:Dw.$.NextInQueue,showTypeLabel:m,decoratedQueuedByUsersByUsername:d})]}),l&&t&&(0,ct.jsxs)("div",{className:EI,children:[(0,ct.jsx)(II,{queueSection:Dw.$.NextUp,title:n&&!(0,Yw.K)(i)?(0,ct.jsxs)(ct.Fragment,{children:[u.Ru.get("queue.next-from")," ",(0,ct.jsx)(P_.default,{to:t,onClick:()=>{c(t)},children:n})]}):u.Ru.get("queue.next-up")},n),(0,ct.jsx)(vI,{ariaLabel:u.Ru.get("queue.next-up"),uri:t,items:r,section:Dw.$.NextUp,showTypeLabel:m})]})]})]})},DI="BZj_r1yzmmragvivUCrw",UI="hpzTKCoO0rllEslIOMPo",MI="TeBVsFnI9PMHYL9ynJx9",BI="ZDR7q1cqU2yaYjemuy9Z",FI="OLB2ghxc09Kz8k_93eIu",HI=()=>{const{currentQueueView:e,setQueueView:t}=(0,$w.m)(),n=(0,BA.y)(),{logQueuePanelTabChange:i}=Zw(),r=(0,at.useMemo)((()=>n?{titleSlot:e!==$w.p.PARTICIPANT_LIST?(0,ct.jsx)(_A.t,{currentTab:e,onTabChange:e=>{e===(0,xA.c)($w.p.HISTORY)?(i($w.p.HISTORY),t($w.p.HISTORY)):(i($w.p.QUEUE),t($w.p.QUEUE))},className:MI,children:(0,ct.jsxs)(EA.w,{"aria-label":"",className:BI,children:[(0,ct.jsx)(xA.V,{"aria-selected":e===$w.p.QUEUE,label:u.Ru.get("playback-control.queue"),value:$w.p.QUEUE}),(0,ct.jsx)(xA.V,{"aria-selected":e===$w.p.HISTORY,label:u.Ru.get("view.recently-played"),value:$w.p.HISTORY})]})}):(0,ct.jsx)(Xs.H,{iconLeading:Iy.g,onClick:()=>t($w.p.QUEUE),size:"small",condensed:!0,className:FI,children:u.Ru.get("web-player.social-connect.participant-list.back-to-queue")})}:{title:u.Ru.get("playback-control.queue")}),[n,i,t,e]);return(0,ct.jsx)(Jy._,{label:u.Ru.get("playback-control.queue"),focusTransferId:"QUEUE-HISTORY-PANEL",children:(0,ct.jsx)(e_.w,{fixedHeader:(0,ct.jsx)(t_.a,{className:DI,panel:Ho.Z.Queue,...r}),children:(0,ct.jsx)("div",{className:UI,children:e!==$w.p.PARTICIPANT_LIST?(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(CA.K,{value:"queue",children:e===$w.p.QUEUE&&(0,ct.jsx)(LI,{})}),(0,ct.jsx)(CA.K,{value:"history",children:e===$w.p.HISTORY&&(0,ct.jsx)(nI,{})})]}):(0,ct.jsx)(MA,{})})})})},VI=(0,at.memo)((function(){return(0,ct.jsx)(Qw,{children:(0,ct.jsx)(HI,{})})}));var zI=n(3498),GI=n(56715),WI=n(87980);let KI=function(e){return e.INFO="INFO",e.ERROR="ERROR",e}({});function YI(e){return e.type===KI.ERROR}function qI(e){return e.type===KI.INFO}const QI="TagT0yz2_HaomJAyrOMt",$I=({card:{type:e,id:t,title:n,text:i}})=>(0,ct.jsx)(cm.v,{id:t,className:QI,variant:"tinted",leading:e===KI.ERROR?(0,ct.jsx)(WI.Z,{size:"small",semanticColor:"textWarning"}):null,title:n,body:(0,ct.jsx)(kx.y,{LinkComponent:P_.default,source:i,splitter:/\|/g,semanticColor:"textSubdued"})});var ZI=n(29433),XI=n(81887),JI=n(11120);const eT="meFagfHOyIABVkyjrLW2",tT="bDxrAHtivqsWjq5P3zcK",nT="H57fABDcHNmhfpukMqam",iT="wwRfoIhkgiHhfHyluH34",rT="SKCb8zWWttHQDTYn1r8m";let sT=function(e){return e[e.PASSING=0]="PASSING",e[e.NEEDS_ATTENTION=1]="NEEDS_ATTENTION",e[e.UNKNOWN=2]="UNKNOWN",e}({});const aT=({metric:e,label:t,severity:n})=>(0,ct.jsxs)("div",{className:gr()(eT,{[iT]:n===sT.UNKNOWN}),children:[(()=>{switch(n){case sT.PASSING:return(0,ct.jsx)(XI.k,{size:"large",className:tT,semanticColor:"textBase"});case sT.NEEDS_ATTENTION:return(0,ct.jsx)(WI.Z,{size:"large",className:nT,semanticColor:"textWarning"});case sT.UNKNOWN:return(0,ct.jsx)(JI.N,{size:"large",className:nT,semanticColor:"textBase"});default:return null}})(),(0,ct.jsxs)("div",{className:rT,children:[(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMedium",semanticColor:"textBase",children:e}),(0,ct.jsx)(fr.E,{as:"p",semanticColor:"textSubdued",variant:"bodySmall",children:t})]})]}),oT=()=>{const{hifiCompatibleDevice:e,playingVia:t,internetBandwidth:n}=(0,GI.H)();return(0,ct.jsxs)("div",{children:[(0,ct.jsx)(aT,{metric:u.Ru.get("hifi.hifiCompatibleDevice"),label:e?u.Ru.get("hifi.yes"):u.Ru.get("hifi.no"),severity:e?sT.PASSING:sT.NEEDS_ATTENTION}),(0,ct.jsx)(aT,{metric:u.Ru.get("hifi.playingVia"),label:(()=>{const{channel:e}=t;switch(e){case ZI.wA.Downloads:return u.Ru.get("local-files.source.downloads");case ZI.wA.Internet:return u.Ru.get("hifi.networkConnection");case ZI.wA.Spotify_Connect:return u.Ru.get("spotify-connect");default:return""}})(),severity:t.channelIsHiFi?sT.PASSING:sT.NEEDS_ATTENTION}),(0,ct.jsx)(aT,{metric:u.Ru.get("hifi.internetBandwidth"),label:(()=>{switch(n){case ZI.t2.Good:return u.Ru.get("hifi.good");case ZI.t2.Poor:return u.Ru.get("hifi.poor");case ZI.t2.Unknown:default:return u.Ru.get("hifi.unknown")}})(),severity:(()=>{switch(n){case ZI.t2.Good:return sT.PASSING;case ZI.t2.Poor:return sT.NEEDS_ATTENTION;case ZI.t2.Unknown:default:return sT.UNKNOWN}})()})]})},lT={[ZI.K3.Listen_Offline]:()=>({type:"info",title:"Listen in Lossless, offline",message:"Download your music in Lossless to listen in our highest quality while you’re offline. Update download quality in Settings."}),[ZI.K3.Connect_Explanation]:()=>({type:"info",title:"Make listening easier with Connect",message:"The best way to listen in Lossless is with Spotify Connect. Just play a song, then tap the button at the bottom of the screen to select a device and control your music straight from the app."}),[ZI.K3.Bluetooth_Degrades_Lossless]:()=>({type:"info",title:"Using Bluetooth will affect Lossless listening",message:"Most Bluetooth devices can play music quality better than Very High, but don’t fully support lossless sound. Lossless is best enjoyed over Spotify Connect speakers and/or wired devices."}),[ZI.K3.Opt_Out_Of_Downgrade]:()=>({type:"error",title:"Change your settings for a smoother listening experience",message:"You’ve disabled the auto-adjust quality feature in Settings. This means you might experience interruptions in your listening experience when you have poor internet bandwidth. You can turn this feature on in Settings."}),[ZI.K3.Poor_Bandwidth_Interferes]:()=>({type:"error",title:"Check your connection",message:"Looks like your internet bandwidth is having a hard time supporting Lossless right now. Try checking your connection or switching to a different network."}),[ZI.K3.Default_To_Very_High]:()=>({type:"error",title:"Change your settings to stream Lossless",message:"Nothing is worse than when a song skips. That’s why we automatically adjust you from Lossless to a lower audio quality if your bandwidth is poor. You can turn off the auto-adjust quality feature in Settings."}),[ZI.K3.Need_To_Redownload]:()=>({type:"error",title:"Re-download your songs to play them in Lossless",message:"The songs you’ve downloaded aren’t currently in Lossless. If you want to listen to them in Lossless, you’ll need to re-download them. Just remember, Lossless song files are big and can take up a lot of storage. You can change the audio quality of your downloads in Settings."}),[ZI.K3.Lossless_Unavailable]:()=>({type:"error",title:"Not available in Lossless",message:"We’re sorry, this track isn’t in Lossless yet."}),[ZI.K3.Update_Setting]:()=>({type:"error",title:"Change your audio quality settings to stream in Lossless",message:"You set your Settings to play music in Very high or less. To change this, go to Settings and select Lossless."})},cT=e=>{switch(e){case U.Yn.HIFI24:return{title:"Lossless",titleFull:"Lossless 24-bit",bitrateLabel:"Up to 2,117 kbps",bitrateDetails:["Up to 15.9 MB/min","Up to 24-bit/44.1 kHz • FLAC"]};case U.Yn.HIFI:return{title:"Lossless",titleFull:"Lossless 16-bit",bitrateLabel:"Up to 1,411 kbps",bitrateDetails:["Up to 10.6 MB/min","Up to 16-bit/44.1 kHz • FLAC"]};case U.Yn.VERY_HIGH:return{title:"Very High",bitrateLabel:"320 kbps",bitrateDetails:["Up to 320 kbps • 2 MB/min"]};case U.Yn.HIGH:return{title:"High",bitrateLabel:"160 kbps",bitrateDetails:["Up to 160 kbps • 1 MB/min"]};case U.Yn.NORMAL:return{title:"Normal",bitrateLabel:"96 kbps",bitrateDetails:["Up to 96 kbps • 0.6 MB/min"]};case U.Yn.LOW:return{title:"Low",bitrateLabel:"24 kpbs",bitrateDetails:["Up to 24 kbps • 0.2 MB/min"]};case U.Yn.UNKNOWN:default:return{title:"Unknown",bitrateLabel:null}}},uT="Xq5xnpTOsoPxFR95BkTU",dT="N7OMJte9T4Lv7DDX16ky",mT="NJATxQbY2o4sl0BHxU3T",pT=({children:e,className:t,...n})=>(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(t_.a,{panel:Ho.Z.Puffin,className:gr()(dT,t),...n}),e]});let hT=function(e){return e.Overview="overview",e.ActivationIntro="activationIntro",e.ActivationDetection="activationDetection",e.ActivationSignifiers="activationSignifiers",e.Error="error",e.ManualSelection="manualSelection",e.AirpodsSelection="airpodsSelection",e.AudioQualitySettings="audioQualitySettings",e.AudioQualityDetails="audioQualityDetails",e.DiscoverHifi="discoverHifi",e}({}),gT=function(e){return e.GetStarted="getStarted",e.OnError="onError",e.SelectManually="selectManually",e.Continue="continue",e.Close="close",e.Activate="activate",e.SetupNewDevice="setupNewDevice",e.NotFound="notFound",e.Settings="settings",e.OnboardHifi="onboardHifi",e.Details="details",e.Airpods="airpods",e}({});const fT={[hT.Overview]:{[gT.GetStarted]:hT.ActivationIntro,[gT.OnError]:hT.Error,[gT.SelectManually]:hT.ManualSelection,[gT.Settings]:hT.AudioQualitySettings,[gT.OnboardHifi]:hT.DiscoverHifi,[gT.Details]:hT.AudioQualityDetails},[hT.ActivationIntro]:{[gT.Close]:hT.Overview,[gT.OnError]:hT.Error,[gT.Continue]:hT.ActivationDetection,[gT.Activate]:hT.Overview},[hT.ActivationDetection]:{[gT.SelectManually]:hT.ManualSelection,[gT.Airpods]:hT.AirpodsSelection,[gT.Close]:hT.Overview,[gT.OnError]:hT.Error,[gT.Continue]:hT.ActivationSignifiers},[hT.ActivationSignifiers]:{[gT.Close]:hT.Overview,[gT.OnError]:hT.Error,[gT.Activate]:hT.Overview},[hT.ManualSelection]:{[gT.Continue]:hT.ActivationSignifiers,[gT.Close]:hT.Overview,[gT.OnError]:hT.Error,[gT.NotFound]:hT.Error},[hT.AirpodsSelection]:{[gT.Continue]:hT.ActivationSignifiers,[gT.Close]:hT.Overview,[gT.OnError]:hT.Error,[gT.NotFound]:hT.Error},[hT.DiscoverHifi]:{[gT.Continue]:hT.Overview},[hT.AudioQualitySettings]:{},[hT.AudioQualityDetails]:{},[hT.Error]:{}},bT=(0,at.createContext)({currentView:hT.Overview,viewTransitions:fT,setCurrentView:()=>{},toPreviousView:()=>{},viewOptions:null}),vT=({children:e})=>{const t=(0,Fo.XB)(),[n,i]=(0,at.useState)((()=>(e=>[{view:e===Ho.Z.PuffinActivation?hT.ActivationDetection:hT.Overview,options:{}}])(t))),r=(0,at.useCallback)(((e,t)=>{e===hT.Overview?i([{view:e,options:t??{}}]):i((n=>[...n,{view:e,options:t??{}}]))}),[]),s=(0,at.useCallback)((()=>{i((e=>e.slice(0,-1)))}),[]);if(0===n.length)throw new Error("Puffin view state stack should never be empty");const{view:a,options:o}=n.at(-1);return(0,ct.jsx)(bT.Provider,{value:{currentView:a,viewOptions:o,setCurrentView:r,toPreviousView:s,viewTransitions:fT},children:e})},yT="qMaFDVQQmaISMsPv0U2G",_T="CQswwQrGh_V_7HZvIYdV",ET="xLt3LoPc1ngk_OEJoxoy",xT=()=>{const{toPreviousView:e}=(0,at.useContext)(bT),t=(0,GI.H)(),n=cT(t.bitrateLevel),i=(()=>{const{flags:e}=(0,GI.H)(),t=[];return e.forEach((e=>{if(lT[e]){const{type:n,message:i,title:r}=lT[e]();"info"===n?t.push({id:e,text:i,title:r,type:KI.INFO}):t.push({id:e,text:i,title:r??"",type:KI.ERROR})}})),t})(),r=i.some(YI),s=i.filter(r?YI:qI);return(0,ct.jsx)(pT,{onBack:e,children:(0,ct.jsxs)("div",{className:yT,children:[(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:"File streaming quality"}),(0,ct.jsx)(fr.E,{variant:"titleMedium",semanticColor:"textBrightAccent",children:n.titleFull||n.title}),(0,ct.jsx)("div",{className:_T,children:n.bitrateDetails?.map(((e,t)=>(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textBrightAccent",children:e},`bitrate-details-${t}`)))}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textBrightAccent"}),(0,ct.jsx)("div",{className:ET,children:(0,ct.jsx)(oT,{})}),s.map((e=>(0,ct.jsx)($I,{card:e},e.id)))]})})};var CT=n(75257);const ST=({subtitles:e})=>(0,ct.jsx)(ct.Fragment,{children:e.map(((e,t)=>(0,ct.jsx)(fr.E,{semanticColor:"textSubdued",variant:"bodySmall",children:e},`subtitle-${t}`)))}),AT="yBIuz1wIV3CyRacOwXyO",wT="k_jPgesB17n6Hh6VnSdL",IT="yufpxn5NeaZzerlZWxyY",TT="AzeKzsaxTtvIb3Rj0Yp_",NT="rvA7MkEQz2pHA2ZtuOi1",RT=({title:e,isLossless:t})=>(0,ct.jsxs)("div",{className:wT,children:[(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBase",children:e}),t&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBase",children:"•"}),(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBrightAccent",children:"Highest"})]})]});var kT=n(97779),OT=n(78828),PT=n(18378),jT=n(9623);const LT=({onClick:e,quality:t,playQuality:n,maxQuality:i})=>{const{title:r,subtitles:s}=(e=>{switch(e){case kT.a1.HIFI:return{title:"Lossless",subtitles:["Up to 2117 kbps • 15.9 MB/min","24-bit/44.1kHz • FLAC"]};case kT.a1.VERY_HIGH:return{title:"Very High",subtitles:["320 kbps • 2 MB/min"]};case kT.a1.HIGH:return{title:"High",subtitles:["160 kbps • 1 MB/min"]};case kT.a1.MEDIUM:return{title:"Normal",subtitles:["96 kbps • 0.6 MB/min"]};case kT.a1.LOW:return{title:"Low data",subtitles:["24 kbps • 0.2 MB/min"]};default:return{title:null,subtitles:null}}})(t);if(null===r||null===s)return null;const a=n===t,o=t===kT.a1.HIFI,l=null===i||t<=i;return(0,ct.jsx)(cm.v,{id:"title",variant:"naked",verticalGap:"2px","aria-disabled":!l,onClick:e,title:(0,ct.jsx)(RT,{title:r,isLossless:o}),subtitle:(0,ct.jsx)(ST,{subtitles:s}),trailing:a?(0,ct.jsx)(gd.i,{semanticColor:"textBrightAccent"}):void 0})},DT=()=>{const{toPreviousView:e}=(0,at.useContext)(bT),t=(0,bc.l)(),{playingFrom:n}=_c(),i=(0,OT.t)(),[{data:r},{mutate:s}]=(0,jT.K)(i.quality.streamingQuality),[{data:a},{mutate:o}]=(0,jT.K)(i.quality.autoAdjustQuality),[{data:l},{mutate:c}]=(0,jT.K)(i.quality.remoteQuality),u=(0,PT.x)();if(void 0===u||void 0===a||void 0===r)return null;let d=r,m=s,p=null;return t&&l&&(d=l.streamingQuality,p=l.maxSupportedQuality,m=e=>c({...l,streamingQuality:e})),(0,ct.jsxs)(pT,{onBack:e,children:[(0,ct.jsxs)("div",{className:NT,children:[(0,ct.jsx)(fr.E,{variant:"titleSmall",semanticColor:"textBase",children:"Streaming quality"}),(0,ct.jsx)(fr.E,{semanticColor:"textSubdued",variant:"bodySmall",children:n})]}),(0,ct.jsx)("div",{className:AT,children:u.sort(((e,t)=>e.quality-t.quality)).map(((e,t)=>(0,ct.jsx)(LT,{quality:e.quality,playQuality:d,maxQuality:p,onClick:()=>m(e.quality)},t)))}),(0,ct.jsx)(fr.E,{children:"Lossless audio will play when available. 24-bit lossless available on limited songs."}),(0,ct.jsxs)("div",{className:IT,children:[(0,ct.jsx)(fr.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:"Listening Preferences"}),(0,ct.jsx)(cm.v,{className:TT,variant:"naked",size:"sm",id:"auto-adjust-quality",horizontalGap:"0px",title:(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBase",children:"Auto adjust quality"}),trailing:(0,ct.jsx)(CT.l,{id:"desktop.settings.automatic-downgrade",value:a,onSelected:o,condensed:!0})}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:"Recommended setting: On"}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:"We adjust your audio quality when your internet bandwidth is poor. Turning this off may cause interruptions to your listening."})]})]})},UT=()=>(0,is.x)("onboarding-dismissed:hifi",!1),MT="UxZdDYEyLTJdUVpcSnlV",BT="KXFkGj2bdr7rfC0HRdTi",FT="TqkE5hxy46SuLhy0G9cy",HT="YKL9qmE1RkxVGwMWO0BA",VT="h5AweT1mqDOSIZgfCish",zT="m9h5qSziGER706uY2RLQ",GT="hgN38CBl0wgc1seJdwV1",WT="xg5jMOqKDEckYRUdLhd_",KT="ylnh7SyD5oExDYYaJntU",YT="roi2AXSegdwgxetjZCoR",qT="BesfnZjOMC7EyA1hspnm",QT="SVskamipP2YH1djc_0Jk",$T=({icon:e,text:t,highlighted:n,condensed:i=!1})=>(0,ct.jsxs)("div",{className:YT,children:[(0,ct.jsx)(e,{size:i?"xsmall":"small",semanticColor:"textBase",className:gr()({[qT]:n})}),(0,ct.jsx)(fr.E,{variant:i?"marginalBold":"bodySmallBold",semanticColor:"textBase",className:gr()({[qT]:n}),children:t})]});var ZT=n(77880);const XT=({path:e})=>(0,ct.jsx)("div",{className:FT,children:(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(ZT.o,{loop:!0,autoplay:!0,path:e,className:HT,style:{width:"auto",height:"100%"}})})});var JT=n(72423);const eN=({imageUrl:e})=>{const t=(0,wt.dZ)(),{max:n}=(0,Fo.Zf)();return(0,ct.jsx)("div",{className:FT,children:(0,ct.jsx)(JT._,{className:VT,src:t(e,n),loading:"eager"})})},tN={[Og.E.SMALL]:{titleVariant:"bodyMediumBold",subtitleVariant:"marginal",textGap:0,buttonGap:12},[Og.E.MEDIUM]:{titleVariant:"titleSmall",subtitleVariant:"bodySmall",textGap:4,buttonGap:24},[Og.E.LARGE]:{titleVariant:"titleMedium",subtitleVariant:"bodyMedium",textGap:8,buttonGap:32}},nN=({title:e,subtitle:t,footer:n,lottiePath:i,isLossless:r=!1,imageUrl:s})=>{const a=(0,Pg.y)(),{titleVariant:o,subtitleVariant:l,textGap:c,buttonGap:u}=(0,at.useMemo)((()=>{let e=Og.E.MEDIUM;switch(a){case Og.E.XSMALL:case Og.E.SMALL:e=Og.E.SMALL;break;case Og.E.LARGE:case Og.E.XLARGE:e=Og.E.LARGE;case Og.E.MEDIUM:}return tN[e]}),[a]);return(0,ct.jsxs)("div",{className:MT,children:[i&&(0,ct.jsx)(XT,{path:i}),s&&(0,ct.jsx)(eN,{imageUrl:s}),(0,ct.jsxs)("div",{className:BT,style:{"--intro-button-gap":`${u}px`,"--intro-title-gap":`${c}px`,"--sticky-bottom-margin":r?"32px":"16px"},children:[(0,ct.jsxs)("div",{className:zT,children:[(0,ct.jsx)($T,{icon:r?lE.Q:pp.C,text:r?"Lossless":"Headphone Enhancements",highlighted:!0,condensed:a===Og.E.SMALL}),(0,ct.jsx)(fr.E,{variant:o,semanticColor:"textBase",children:e}),t&&(0,ct.jsx)(fr.E,{variant:l,semanticColor:"textSubdued",children:t})]}),(0,ct.jsx)("div",{className:QT,children:n})]})]})},iN=({nrSteps:e,atStep:t})=>(0,ct.jsx)("div",{className:GT,children:Array.from({length:e}).map(((e,n)=>(0,ct.jsx)("div",{className:gr()(WT,{[KT]:t===n})},n)))}),rN=({variant:e,text:t,onClick:n,condensed:i=!1})=>{const r=(0,Pg.y)();return"tertiary"===e?(0,ct.jsx)(Xs.H,{semanticColor:"textSubdued",size:r===Og.E.LARGE?"medium":"small",onClick:n,condensed:i,children:t}):(0,ct.jsx)(br.$,{colorSet:"invertedLight",size:r===Og.E.LARGE?"medium":"small",onClick:n,children:t})},sN=[{get title(){return"Lossless music in more places than ever"},get subtitle(){return"Stream wirelessly in up to 16-bit or 24-bit on compatible devices through Spotify Connect."},get buttonLabel(){return"Next"},get imageUrl(){return"spotify:image:ab671fcc00009256c4d947fba90f6244343446ee"}},{get title(){return"Quality made clear"},get subtitle(){return"Look for the Lossless label to signal when you’re streaming in up to 16-bit or 24-bit."},get buttonLabel(){return"Next"},get imageUrl(){return"spotify:image:ab671fcc0000925660dbbbd7b502f65ac905f0cf"}},{get title(){return"You’re in control"},get subtitle(){return"Not getting Lossless? Check out our streaming pro tips and troubleshoot with a tap."},get buttonLabel(){return"Next"},get imageUrl(){return"spotify:image:ab671fcc000092564a451c0c1fba3acf8fed995f"}},{get title(){return"Get ready for Lossless"},get subtitle(){return"You can adjust the audio quality for streaming and Downloads in Settings."},get buttonLabel(){return"Done"},get imageUrl(){return"spotify:image:ab671fcc000092562f3465b95599cdb50e47604e"}}],aN=()=>{const[e,t]=(0,at.useState)(0),[n,i]=UT(),{setCurrentView:r,toPreviousView:s,viewTransitions:a}=(0,at.useContext)(bT),o=a[hT.DiscoverHifi],{title:l,subtitle:c,buttonLabel:u,imageUrl:d}=sN[e];return(0,ct.jsxs)(pT,{titleSlot:(0,ct.jsx)(_p,{variant:"bodySmallBold"}),onBack:s,onClose:()=>r(o[gT.Continue]),preventDefaultClose:!0,children:[(0,ct.jsx)(nN,{isLossless:!0,title:l,subtitle:c,imageUrl:d,footer:(0,ct.jsx)(rN,{variant:"primary",text:u,onClick:()=>{3===e?(i(!0),r(o[gT.Continue])):t((e=>e+1))}})}),(0,ct.jsx)(iN,{nrSteps:4,atStep:e})]})};var oN=n(41298);const lN=()=>{const{setCurrentView:e,viewTransitions:t}=(0,at.useContext)(bT),{deviceFilterState:n,isHeadphoneDevice:i,isLoading:r}=(0,vp.j)(),s=t[hT.ActivationDetection];(0,at.useLayoutEffect)((()=>{i&&n.audioDevice?.transportType!==gc.Yg.BLUETOOTH&&e(hT.ManualSelection)}),[n.audioDevice?.transportType,i,e]);const a=(0,at.useMemo)((()=>n.headphoneDevice?.deviceName?.toLowerCase().includes("airpods")??!1),[n.headphoneDevice]);return(0,ct.jsx)(nN,{title:`Are you using ${n.headphoneDevice?.deviceName}?`,lottiePath:"https://puffin.spotifycdn.com/puffin_shot_2.json",footer:r||!n.headphoneDevice?(0,ct.jsx)(oN.m,{}):(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(rN,{variant:"primary",text:"Yes, enhance",onClick:()=>{e(a?s.airpods:s.continue)}}),(0,ct.jsx)(rN,{variant:"tertiary",text:"No, find headphones",onClick:()=>{e(s.selectManually)},condensed:!0})]})})};var cN=n(3588);const uN=()=>{const e=(0,xi.N)();return{setCurrentDevice:(0,at.useCallback)((t=>{e.setCurrentDevice(t)}),[e]),removeCurrentDevice:(0,at.useCallback)((()=>{e.removeCurrentDevice()}),[e])}},dN=({onClick:e})=>{const{deviceFilterState:t}=(0,vp.j)(),{setCurrentDevice:n}=uN(),i=(0,Xi.vh)(),{setCurrentView:r}=(0,at.useContext)(bT),s=(0,at.useCallback)((async()=>{n(t.headphoneDevice);try{await t.setFilterState({specificEnabled:!!t.toggleTuneHeadphones,externalizationEnabled:!!t.toggleTuneStudio})}catch{return void r(hT.Error)}((e,t)=>{e.send((0,cN.d)({has_tuner:!!t.toggleTuneHeadphones,filter_brand:t.headphoneDevice?.brand??null,filter_model:t.headphoneDevice?.model??null,was_predicted:!!t.predictedState,headphone_name_over_bluetooth:t.audioDevice?.transportType===gc.Yg.BLUETOOTH?t.audioDevice.name:null,external_accessory_mapping_predicted_brand:t.predictedState?.predictedBrand??null,external_accessory_mapping_predicted_model:t.predictedState?.predictedModel??null}))})(i,t),e()}),[t,i,e,n,r]);return(0,ct.jsx)(rN,{variant:"primary",text:"Done",onClick:s})},mN=({text:e,onClick:t})=>(0,ct.jsx)(rN,{variant:"primary",text:e,onClick:async()=>{t()}}),pN=()=>{const{deviceFilterState:e,isLoading:t}=(0,vp.j)(),{setCurrentView:n,viewTransitions:i}=(0,at.useContext)(bT),r=i[hT.ActivationIntro];return(0,ct.jsx)(nN,{title:"Ready to get more out of your headphones?",lottiePath:"https://puffin.spotifycdn.com/puffin_setupflow.json",footer:t||!e.headphoneDevice?(0,ct.jsx)(oN.m,{}):(0,ct.jsx)(ct.Fragment,{children:e.toggleTuneHeadphones?(0,ct.jsx)(mN,{text:"Get started",onClick:()=>{n(r.continue)}}):(0,ct.jsx)(dN,{onClick:()=>{n(r.activate)}})})})},hN=()=>{const{setCurrentView:e,viewTransitions:t}=(0,at.useContext)(bT),n=t[hT.ActivationSignifiers];return(0,ct.jsx)(nN,{title:"Success! Your headphones are ready.",subtitle:"Look for the sparkles to know when your headphone enhancements are at work.",imageUrl:"spotify:image:ab671fcc00009256c05ddd13f1c9939b04c8cd56",footer:(0,ct.jsx)(dN,{onClick:()=>{e(n.activate)}})})},gN="gaHyKsxwiyCh1yZbAPGu",fN="UdGQGXIUZX8XSGzT_vjV",bN="tPVta1L63yHDp2xTlCsV",vN="Z5JRUt7Q9Fs7sIOxMyZO",yN=({number:e,message:t})=>(0,ct.jsxs)("div",{className:bN,children:[(0,ct.jsx)("div",{className:vN,children:(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textBase",children:e})}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:t})]}),_N=()=>{const{setCurrentView:e}=(0,at.useContext)(bT);return(0,ct.jsxs)("div",{className:gN,children:[(0,ct.jsx)(fr.E,{variant:"titleSmall",semanticColor:"textBase",children:"We can’t detect your headphones"}),(0,ct.jsxs)("div",{className:fN,children:[(0,ct.jsx)(yN,{number:1,message:"Make sure Bluetooth is turned on."}),(0,ct.jsx)(yN,{number:2,message:"Make sure your headphones are connected. Try restarting them."}),(0,ct.jsx)(yN,{number:3,message:"Make sure that only one set of headphones are connected."}),(0,ct.jsx)(yN,{number:4,message:"Using speakers or another device? Externalize and Optimize are only available for headphones."})]}),(0,ct.jsx)(Xs.H,{semanticColor:"textSubdued",onClick:()=>{e(hT.Overview)},children:"Still not working"})]})};var EN=n(45132);const xN=({title:e,description:t,confirmButtonText:n="OK",cancelButtonText:i="Cancel",onConfirm:r})=>{const{setCurrentView:s}=(0,at.useContext)(bT),a=(0,Fo._Y)(),[o,l]=(0,at.useState)(!1),c=(0,at.useRef)(!1);return{dialog:o?(0,ct.jsx)(EN.T,{onClose:()=>l(!1),onConfirm:()=>{r(),c.current?a(In.$S.PUFFIN_BUTTON_CLICK):s(hT.Overview)},titleText:e,"aria-label":e,descriptionText:t,cancelText:i,confirmText:n}):null,triggerDialog:(e=!1)=>{c.current=e,l(!0)}}},CN=()=>xN({title:"Cancel setup?",description:"You won’t get the best possible sound for your headphones.",confirmButtonText:"Cancel setup",cancelButtonText:"Continue setup",onConfirm:()=>{}}),SN=({type:e})=>{const{isHeadphoneDevice:t}=(0,vp.j)(),{triggerDialog:n,dialog:i}=CN();return(0,ct.jsx)(pT,{titleSlot:(0,ct.jsx)(_p,{variant:"bodySmallBold"}),onClose:()=>n(!0),onBack:()=>n(!1),preventDefaultClose:!0,children:t?(0,ct.jsxs)(ct.Fragment,{children:[i,"intro"===e&&(0,ct.jsx)(pN,{}),"detection"===e&&(0,ct.jsx)(lN,{}),"signifiers"===e&&(0,ct.jsx)(hN,{})]}):(0,ct.jsx)(_N,{})})},AN="QHqVFDnSvA0HvBE6X5Ji",wN="NNAfew5cs1pJOizGgvAY",IN=({resetErrorBoundary:e})=>{const{toPreviousView:t,setCurrentView:n}=(0,at.useContext)(bT);return(0,ct.jsx)(pT,{onBack:()=>{t()},children:(0,ct.jsxs)("div",{className:AN,children:[(0,ct.jsx)(vv.b,{size:"xlarge",semanticColor:"textBase"}),(0,ct.jsxs)("div",{className:wN,children:[(0,ct.jsx)(fr.E,{variant:"titleSmall",semanticColor:"textBase",children:"Something went wrong"}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:"We couldn’t turn on your headphone tools."})]}),(0,ct.jsx)(br.$,{colorSet:"invertedLight",size:"medium",onClick:()=>{e?.(),n(hT.Overview)},children:"Retry"})]})})},TN=({resetErrorBoundary:e})=>(0,ct.jsx)(IN,{resetErrorBoundary:e});var NN=n(39950),RN=n(82372);const kN=({device:e,onClick:t,isAirpodDevice:n})=>{const i=n?`${e.model} (${e.releaseYear})`:e.model,r=n?`Models ${e.modelNumbers.join(u.Ru.getSeparator())}`:e.brand;return(0,ct.jsx)(cm.v,{variant:"naked",size:"md",id:e.id,title:(0,ct.jsx)(um.d,{onClick:()=>{t(e)},children:i}),subtitle:r,trailing:(0,ct.jsx)(Ty.V,{size:"small",semanticColor:"textSubdued"}),isRedundantOnClick:!0,onClick:()=>{t(e)},hoverAnimationDuration:"0s"},e.id)},ON="hPzDNLh2VHVetpMYUWhh",PN="OWzwomCJ96sclkARJ4MT",jN="Jc9RuyGp3QnYtesoDSOF",LN="ixg1HpUqNVD6i3sodyVM",DN="D7_plcRuh6XZ4e92bHRf",UN="Df8qBgxamgAzXiwF9WjI",MN="ldOw2XsBvAI5g3JI6zWk",BN="xCjuBeXCCAIL4i_xHXFD",FN=({search:e})=>(0,ct.jsxs)("div",{className:BN,children:[(0,ct.jsx)(fr.E,{semanticColor:"textBase",variant:"titleSmall",children:`Couldn’t find “${e}”`}),(0,ct.jsx)(fr.E,{semanticColor:"textSubdued",variant:"bodySmall",children:"Try searching again using a different spelling or keyword."})]}),HN={id:"unknown_device",brand:"",model:"",deviceName:"Generic",modelNumbers:[],releaseYear:""},VN=({devices:e,transitions:t,setCurrentView:n,isAirpodsList:i=!1})=>{const{filter:r,setFilter:s}=(0,at.useContext)(RN.g),{setCurrentDevice:a}=uN(),o=(0,at.useCallback)((e=>{a(e),n(t.continue),s("")}),[a,n,s,t.continue]),l=e.filter((e=>e.deviceName.toLowerCase().includes(r.toLowerCase())));return(0,ct.jsxs)("div",{className:UN,children:[l.map((e=>(0,ct.jsx)(kN,{device:e,onClick:o,isAirpodDevice:i},e.id))),0===l.length&&(0,ct.jsx)(FN,{search:r}),(0,ct.jsx)("div",{className:DN,children:(0,ct.jsx)(_x.n,{size:"small",onClick:()=>{o(HN)},children:"Headphones not listed"})})]})},zN=()=>{const e=(0,xi.N)(),{data:t,isLoading:n,isError:i}=(0,Vg.I)({queryKey:["puffin-devices"],queryFn:async()=>await e.getDevices(),gcTime:18e5,staleTime:6e5});return{data:t??null,loading:n,error:i}},GN=()=>{const{setCurrentView:e,toPreviousView:t,viewTransitions:n}=(0,at.useContext)(bT),i=n[hT.AirpodsSelection],{data:r}=zN(),s=(0,at.useMemo)((()=>r?.filter((e=>"apple"===e.brand.toLowerCase()&&e.model.toLowerCase().includes("airpods")))),[r]);return(0,ct.jsx)(pT,{onBack:()=>{t()},children:(0,ct.jsxs)(RN.s,{uri:"spotify:internal:bettersound",children:[(0,ct.jsxs)("div",{className:PN,children:[(0,ct.jsx)("div",{className:jN}),(0,ct.jsxs)("div",{className:LN,children:[(0,ct.jsx)(fr.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:"Find your AirPods model"}),(0,ct.jsx)(fr.E,{variant:"bodySmall",children:"You need to select an exact match for Optimize to work correctly."})]}),(0,ct.jsx)(NN.S,{placeholder:"Search AirPods model",alwaysExpanded:!0,fullWidth:!0,debounceFilterChangeTimeout:0})]}),s?(0,ct.jsx)("div",{className:ON,children:(0,ct.jsx)(VN,{devices:s,transitions:i,setCurrentView:e,isAirpodsList:!0})}):(0,ct.jsx)("div",{className:MN,children:(0,ct.jsx)(oN.m,{})})]})})},WN=()=>{const{setCurrentView:e,toPreviousView:t,viewTransitions:n,viewOptions:i}=(0,at.useContext)(bT),r=n[hT.ManualSelection],{data:s}=zN(),{triggerDialog:a,dialog:o}=CN();return(0,ct.jsxs)(pT,{onBack:()=>{i?.showDialogOnBack?a():t()},titleSlot:(0,ct.jsx)(_p,{variant:"bodySmallBold"}),children:[o,(0,ct.jsxs)(RN.s,{uri:"spotify:internal:bettersound",children:[(0,ct.jsxs)("div",{className:PN,children:[(0,ct.jsx)("div",{className:jN}),(0,ct.jsxs)("div",{className:LN,children:[(0,ct.jsx)(fr.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:"Search by headphone brand or model"}),(0,ct.jsx)(fr.E,{variant:"bodySmall",children:"Some enhancements will only work with a device from the list below."})]}),(0,ct.jsx)(NN.S,{placeholder:"Search for brand or model",alwaysExpanded:!0,fullWidth:!0,debounceFilterChangeTimeout:0})]}),s?(0,ct.jsx)("div",{className:ON,children:(0,ct.jsx)(VN,{devices:s,transitions:r,setCurrentView:e})}):(0,ct.jsx)("div",{className:MN,children:(0,ct.jsx)(oN.m,{})})]})]})};var KN=n(90381);const YN=()=>{const{deviceName:e}=_c();return(0,ct.jsx)(fr.E,{variant:"titleSmall",semanticColor:"textBase",children:e})};var qN=n(74266);const QN="UcDa2y41UOzWUqXjcx_B",$N="rR61D1vJxNsSk_XQNMX4",ZN="m7gWknJdcwkdw8mcSQvg",XN=({quality:e,onClick:t})=>{const n=cT(e),i=[U.Yn.VERY_HIGH,U.Yn.HIGH,U.Yn.NORMAL,U.Yn.LOW];e===U.Yn.HIFI24?i.unshift(U.Yn.HIFI24):i.unshift(U.Yn.HIFI);const r=e===U.Yn.UNKNOWN?"textBase":"textBrightAccent";return(0,ct.jsxs)(qN.a,{as:"button",variant:"tinted",className:QN,onClick:t,children:[(0,ct.jsx)(cm.v,{id:"quality",size:"lg",pretitle:"File streaming quality",titleGap:k_.v4,title:(0,ct.jsx)(fr.E,{variant:"titleSmall",semanticColor:r,children:n.titleFull||n.title}),paddingInlineStart:"0px",paddingInlineEnd:"0px",variant:"naked"}),(0,ct.jsx)("div",{children:i.map(((t,n)=>{const i=cT(t),r=t===e,s=r?"textBrightAccent":"textSubdued";return(0,ct.jsx)(cm.v,{id:i.title,size:"sm",paddingInlineStart:"0px",paddingInlineEnd:"0px",media:(0,ct.jsx)("div",{className:gr()($N,{[ZN]:r})}),title:(0,ct.jsx)(fr.E,{semanticColor:s,children:i.title}),trailing:(0,ct.jsx)(fr.E,{semanticColor:s,children:i.bitrateLabel}),variant:"naked"},n)}))})]})},JN="k4f1o0jOMnxv6OS8dC7p",eR=({title:e,subtitle:t,buttonLabel:n,onClick:i})=>(0,ct.jsx)(cm.v,{variant:"naked",size:"lg",id:"getStarted",className:JN,title:e,subtitle:t,paddingBlockStart:"16px",paddingBlockEnd:"16px",footer:(0,ct.jsx)(_x.n,{size:"small",onClick:i,children:(0,ct.jsx)(fr.E,{variant:"bodySmallBold",children:n})})}),tR=()=>{const{setCurrentView:e,viewTransitions:t}=(0,at.useContext)(bT),n=t[hT.Overview],i=(0,KN.j)(),{bitrateLevel:r}=(0,GI.H)(),[s]=UT();return i?(0,ct.jsxs)(ct.Fragment,{children:[!s&&(0,ct.jsx)(eR,{title:"Lose yourself in Lossless audio",subtitle:"Stream in up to 24-bit on any compatible device.",buttonLabel:"Take a tour",onClick:()=>e(n.onboardHifi)}),(0,ct.jsx)(XN,{quality:r,onClick:()=>{e(n.details)}})]}):null};var nR=n(30332);const iR=()=>{const{removeCurrentDevice:e}=uN(),{triggerDialog:t,dialog:n}=xN({title:"Forget sound settings?",description:"By confirming, you'll loose the settings for this device",onConfirm:e});return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(cm.v,{id:"qualitySetting",variant:"naked",title:"Reset headphone tools",leading:(0,ct.jsx)(nR.x,{size:"small"}),onClick:()=>t(!1),padding:"0px 12px"}),n]})};var rR=n(82621);const sR=({onClick:e})=>{const{playingFrom:t}=_c(),n=(0,OT.t)(),[{data:i}]=(0,jT.K)(n.quality.streamingQuality);return void 0===i?null:(0,ct.jsx)(cm.v,{id:"qualitySetting",variant:"naked",title:u.Ru.get("desktop.settings.streamingQuality"),leading:(0,ct.jsx)(rR.s,{size:"small"}),subtitle:t,onClick:e,padding:"0px 12px"})},aR=({isPlayingRemotely:e})=>{const{deviceFilterState:t}=(0,vp.j)(),{setCurrentView:n,viewTransitions:i}=(0,at.useContext)(bT),r=i[hT.Overview],s=(0,KN.j)(),a=t.isOnboarded,o=!e&&a;return(0,ct.jsxs)("div",{children:[s&&(0,ct.jsx)(ct.Fragment,{children:(0,ct.jsx)(sR,{onClick:()=>{n(r.settings)}})}),o&&(0,ct.jsx)(iR,{})]})},oR=({isError:e})=>e?(0,ct.jsx)(cm.v,{id:"filterError",variant:"tinted",paddingBlockStart:"12px",paddingBlockEnd:"12px",paddingInlineStart:"16px",paddingInlineEnd:"16px",leading:(0,ct.jsx)(vv.b,{semanticColor:"textSubdued",size:"small"}),title:"Sorry, this is unavailable. Try reconnecting your headphones."}):null,lR="XdRXn03t5BJZ3PT5elBo",cR="mVvvhBvCvKpGkXj2iBOE",uR="XuO5zqsxmXxWGN4ewmbR",dR="akOXhXhi7WpVAH3Hpggp",mR=({currentDeviceState:e})=>{const t=(0,at.useCallback)((()=>{e.toggleTuneHeadphones?.()}),[e]),n=(0,at.useCallback)((()=>{e.toggleTuneStudio?.()}),[e]),i=null!==e.toggleTuneHeadphones,r=e.contentRestrictions.externalizationRestricted,s=!!e.headphoneDevice&&!r;return(0,ct.jsxs)("div",{className:cR,children:[(i||e.contentRestrictions.specificRestricted)&&(0,ct.jsx)(cm.v,{variant:"naked",size:"md",id:"headphones",className:uR,disabled:e.contentRestrictions.specificRestricted,title:(0,ct.jsx)(um.d,{className:dR,children:"Optimize"}),subtitle:"Fine-tune your headphones",trailing:(0,ct.jsx)(CT.l,{id:"headphoneTunes",onSelected:t,disabled:e.contentRestrictions.specificRestricted,value:e.currentState.specificEnabled,condensed:!0})}),(0,ct.jsx)(cm.v,{variant:"naked",size:"md",id:"studio",className:uR,title:(0,ct.jsx)(um.d,{className:dR,children:"Externalize"}),subtitle:r?"Unavailable for this content":"Broaden your sound",disabled:!s,trailing:(0,ct.jsx)(CT.l,{id:"externalization",onSelected:n,disabled:!s,value:e.currentState.externalizationEnabled,condensed:!0})})]})},pR=()=>{const{setCurrentView:e,viewTransitions:t}=(0,at.useContext)(bT),n=t[hT.Overview],{deviceFilterState:i}=(0,vp.j)(),r=i.isOnboarded;return(0,ct.jsx)(cm.v,{id:"listeningWith",variant:"tinted",pretitle:"Model",horizontalGap:"0px",paddingBlockStart:"12px",paddingBlockEnd:"12px",paddingInlineStart:"16px",paddingInlineEnd:"16px",trailing:(0,ct.jsx)(_x.n,{size:"small",onClick:()=>{e(n.selectManually)},children:(0,ct.jsx)(fr.E,{variant:"bodySmallBold",children:"Change model"})}),footer:r&&(0,ct.jsx)(mR,{currentDeviceState:i}),title:i.headphoneDevice?.deviceName??"Select your headphone model"})},hR=()=>{const{setCurrentView:e,viewTransitions:t}=(0,at.useContext)(bT),n=t[hT.Overview],{deviceFilterState:i,isHeadphoneDevice:r,isError:s,isLoading:a}=(0,vp.j)(),o=i.isOnboarded,l=r&&!o,c=(0,at.useCallback)((()=>{i.headphoneDevice?e(n.getStarted):e(n.selectManually,{showDialogOnBack:!0})}),[i.headphoneDevice,e,n.getStarted,n.selectManually]);return r?s||a?(0,ct.jsx)(oR,{isError:s}):(0,ct.jsxs)(ct.Fragment,{children:[o&&(0,ct.jsx)(pR,{}),l&&(0,ct.jsx)(eR,{title:"Enhance your headphones",subtitle:"Use innovative technology to improve your headphones’ performance. ",buttonLabel:"Set up",onClick:c})]}):null},gR=In.$S.DEVICE_PICKER_BUTTON_CLICK,fR=()=>{const e=(0,bc.l)(),{panelSend:t}=(0,Fo.AI)(Ho.Z.DevicePicker),n=(0,KN.j)(),i=(0,Eu.v)(),r=!e&&i,s=(0,a.NC)(Ie.VUN),o=(0,at.useCallback)((()=>{t(gR)}),[t]);return(0,ct.jsx)(pT,{onBack:s?o:void 0,children:(0,ct.jsxs)("div",{className:lR,children:[(0,ct.jsx)(YN,{}),r&&(0,ct.jsx)(hR,{}),n&&(0,ct.jsx)(tR,{}),(0,ct.jsx)(aR,{isPlayingRemotely:e})]})})},bR=()=>{const{currentView:e}=(0,at.useContext)(bT);switch(e){case hT.ActivationIntro:return(0,ct.jsx)(SN,{type:"intro"});case hT.ActivationDetection:return(0,ct.jsx)(SN,{type:"detection"});case hT.ActivationSignifiers:return(0,ct.jsx)(SN,{type:"signifiers"});case hT.Error:return(0,ct.jsx)(IN,{});case hT.ManualSelection:return(0,ct.jsx)(WN,{});case hT.AirpodsSelection:return(0,ct.jsx)(GN,{});case hT.Overview:return(0,ct.jsx)(fR,{});case hT.AudioQualitySettings:return(0,ct.jsx)(DT,{});case hT.AudioQualityDetails:return(0,ct.jsx)(xT,{});case hT.DiscoverHifi:return(0,ct.jsx)(aN,{});default:return(0,B.k)(e),null}},vR=()=>{const{currentView:e}=(0,at.useContext)(bT),t=(0,Fo._Y)(),n=[hT.ActivationIntro,hT.ActivationDetection,hT.ActivationSignifiers,hT.DiscoverHifi,hT.ManualSelection,hT.AirpodsSelection].includes(e),i=[hT.ActivationIntro,hT.ActivationDetection,hT.ActivationSignifiers,hT.ManualSelection].includes(e);(0,at.useEffect)((()=>{t(i?In.$S.PUFFIN_START_ACTIVATION:In.$S.PUFFIN_FINISH_ACTIVATION)}),[t,i]);const r=(0,at.useRef)(null),{breakpoint:s}=(0,jg.c)({[Og.E.SMALL]:0,[Og.E.MEDIUM]:448,[Og.E.LARGE]:780},r);return(0,ct.jsx)(e_.w,{className:gr()({[mT]:n}),ref:r,children:(0,ct.jsx)(Pg.o.Provider,{value:s,children:(0,ct.jsxs)("div",{className:uT,children:[(0,ct.jsx)(bR,{}),false]})})})},yR=()=>(0,ct.jsx)(Jy._,{label:"Puffin",focusTransferId:"PUFFIN",children:(0,ct.jsx)(rt.s,{FallbackComponent:TN,children:(0,ct.jsx)(vT,{children:(0,ct.jsx)(vR,{})})})});var _R=n(34586);const ER=({legacyCastPlaceholder:e}={legacyCastPlaceholder:!1})=>{const t=(0,Xi.vh)(),n=(0,nt.d4)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE)),i=(0,Uo.v)((e=>e.devices));return(0,at.useCallback)((r=>{i.forEach((e=>{t.send((0,_R.f)({discovered_device_id:e.connectStateId,discovered_device_name:e.name,discovered_device_type:e.type,discovered_device_brand_display_name:e.brandDisplayName??null,discovered_device_model:e.modelDisplayName??null,discovered_device_license:e.license??null,discovered_device_state:e.currentState??null,discovered_device_is_active:e.isActive,discovered_device_disabled:e.isDisabled,discovered_device_is_zeroconf:e.isZeroconf??null,discovered_device_is_local:e.isLocalNetwork??null,discovered_device_is_webapp:e.isWebApp??null,discovered_device_supports_hifi:e.hifiSupport.deviceSupported,interaction_id:r,is_logging_device:e.isLocal}))})),(e?function(e){return e===window.cast?.framework.CastState.NOT_CONNECTED}(n):td(n))&&t.send((0,_R.f)({discovered_device_name:"Google Cast Devices Available",discovered_device_brand_display_name:"Google",interaction_id:r}))}),[i,n,t,e])},xR="Bjx5Gw7p3JoiF4qI6eMQ",CR="zPok5evkaZ8D7YaupgR3",SR=()=>{const{deviceFilterState:e,isHeadphoneDevice:t}=(0,vp.j)(),n=(0,KN.j)(),i=(0,Eu.v)(),r=(0,GI.H)(),s=e.currentState.externalizationEnabled||e.currentState.specificEnabled,a=r.bitrateLevel===U.Yn.HIFI||r.bitrateLevel===U.Yn.HIFI24;return(0,ct.jsxs)("div",{className:xR,children:[i&&s&&t&&(0,ct.jsx)("div",{className:CR,children:(0,ct.jsx)(pp.C,{size:"small",semanticColor:"textBrightAccent"})}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textBrightAccent",children:n&&a&&"Lossless"})]})},AR="G1CP8Uu3Gf2cihYJI6Da",wR="nNGIZKkKfoCorRv2f452",IR="XFbGPr_IwzKGEhcDpxkS",TR="KYkSwfV1FCtD15TMChbH",NR="v7CrgRsPeGhw_wa_21pQ",RR="v_d7zRnXAkuJt1lE8tzS",kR=({onClick:e})=>{const{deviceName:t,formattedDeviceName:n}=_c();return(0,ct.jsx)("div",{className:RR,children:(0,ct.jsx)(_s.Zp,{label:n??t,children:(0,ct.jsx)(dm.j,{lineClamp:1,onClick:e,children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBase",children:n??t})})})})},OR=({deviceType:e,isGroup:t,isLocalDevice:n,isPlaying:i})=>{const r=dp();let s;if(i)s=(0,ct.jsx)(ip,{});else{const i=(0,Ic.tf)(e,t,n?r:null);s=(0,ct.jsx)(i,{semanticColor:"textBrightAccent","":"device-icon",role:"presentation"})}return(0,ct.jsxs)("div",{className:IR,children:[(0,ct.jsx)("div",{className:TR,children:s}),(0,ct.jsx)(um.d,{variant:"celloCanon",semanticColor:"textBase",lineClamp:1,children:u.Ru.get("web-player.connect.device-picker.current-device")})]})},PR=({spec:e})=>{const{currentDevice:t}=ed(),{id:n,connectStateId:i,isLocalNetwork:r,supportsLogout:s}=t,a=(0,od.W)(),o=!r&&s,l=o,c=(0,Eu.v)(),u=(0,KN.j)(),{deviceName:d,formattedDeviceName:m}=_c(),p=a?Iy.g:Ty.V;return(0,ct.jsx)("div",{className:NR,children:c||u?(0,ct.jsx)(p,{"aria-label":m??d,size:"small",autoMirror:!1}):l&&(0,ct.jsx)(_d,{title:m??d,deviceId:n,connectStateDeviceId:i,allowForgetDevice:o,spec:e.containerViewFactory().headerFactory().activeDeviceFactory()})})};var jR=n(92979);const LR="device-picker-header",DR=({isPlaying:e,spec:t})=>{const{currentDevice:n}=ed(),{id:i,connectStateId:r,type:s,isLocal:a,isLocalNetwork:o,isGroup:l,incarnation:c,supportsLogout:d}=n,m=(0,Eu.v)(),p=(0,KN.j)(),{togglePuffin:h}=(0,yp.c)(),{currentSession:g}=(0,oc.D)(),f=(0,RI.y)(),b=!g?.active&&f,v=(0,Ic.HJ)(c),y=!o&&d,_=y||v,E=(0,ct.jsx)(yd,{deviceId:i,connectStateDeviceId:r,allowForgetDevice:y,incarnation:v?c:void 0}),x=(0,ct.jsx)(cm.v,{className:wR,id:LR,variant:"naked",title:(0,ct.jsx)(OR,{deviceType:s,isGroup:l,isLocalDevice:a,isPlaying:e}),subtitle:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(kR,{onClick:m||p?h:void 0}),(m||p)&&(0,ct.jsx)(SR,{})]}),trailing:(0,ct.jsx)(PR,{spec:t}),"aria-labelledby":LR,onClick:m||p?h:void 0,onClickHint:u.Ru.get("web-player.connect.device-picker.current-device"),body:b&&(0,ct.jsx)("hr",{className:AR}),footer:b&&(0,ct.jsx)(jR.$,{})});return _?(0,ct.jsx)(pm.h,{menu:E,children:x}):x},UR="vvwf9j2P69E4172N2SoA",MR="h0XG5HZ9x0lYV7JNwhoA",BR=()=>{const e=(0,Zu.pG)({data:{identifier:Zu.gw.SIDEPANEL}}),t=ER(),{devices:n}=ed(),{isPlaying:i}=(0,nd.GK)(),[r]=(0,Fo.sV)(),s=(0,at.useRef)(t),a=(0,at.useRef)(r.context.devicePicker?.interactionId);s.current=t,a.current=r.context.devicePicker?.interactionId;const o=td((0,nt.d4)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE)));return(0,at.useEffect)((()=>()=>{s.current(a.current)}),[a]),(0,ct.jsx)(Jy._,{label:u.Ru.get("playback-control.connect-picker"),focusTransferId:"DEVICE-PICKER",children:(0,ct.jsxs)(e_.w,{className:MR,fixedHeader:(0,ct.jsx)(t_.a,{title:u.Ru.get("playback-control.connect-picker"),className:UR,panel:Ho.Z.DevicePicker}),children:[(0,ct.jsx)(DR,{isPlaying:i,spec:e}),(0,ct.jsx)(op,{devices:n,areWebPlayerCastDevicesAvailable:o,spec:e})]})})};var FR=n(93536),HR=n(86900);var VR=n(14452);const zR=()=>{const e=(0,VR.X)(),t=(0,FR._)();(()=>{const e=(0,FR._)(),t=(0,zt.K)(),n=(0,at.useRef)(null),i=(0,at.useRef)(null);(0,Yt.p)(P.gd.UPDATE,(({data:t})=>{const r=t?.item?.uri??null;n.current!==r&&(n.current=r,e({type:HR.$S.PLAYBACK_AUTOPLAY,playerState:t})),t?.context?.uri!==i.current&&(i.current=t?.context?.uri??null,e({type:HR.$S.PLAYBACK_AUTOPLAY_CONTEXT_CHANGED}))})),(0,Yt.p)(P.gd.ACTION,(({data:n})=>{n.action===P.Ik.PLAY&&e({type:HR.$S.PLAY_CLICK,action:n,playerState:t.getState()})}))})();let n=null,i=e;switch(e){case Ho.Z.BuddyFeed:n=(0,ct.jsx)(Qy,{});break;case Ho.Z.Queue:n=(0,ct.jsx)(VI,{});break;case Ho.Z.PuffinActivation:case Ho.Z.Puffin:n=(0,ct.jsx)(yR,{}),i="puffin";break;case Ho.Z.DevicePicker:n=(0,ct.jsx)(BR,{});break;case Ho.Z.NowPlayingView:n=(0,ct.jsx)(vA,{currentPanel:e});break;default:n=null}return(0,ct.jsx)(rt.s,{onError:e=>{(0,O.Jy)(e,"PanelSection"),t((0,yA.MQ)(Ho.Z.Disabled))},children:n},i)};var GR=n(10840);const WR=()=>{const{spec:e,logger:t}=(0,Jr.r)(MC.X,{}),n=(0,nt.wA)(),{setMode:i}=Yc();return(0,at.useEffect)((()=>{const e=e=>{"Escape"===e.key&&i(Vc.YU.npv)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[n,i]),(0,ct.jsxs)("div",{className:Kc.Controls,children:[(0,ct.jsx)(GR.R,{}),(0,ct.jsx)(As,{focus:!0,label:u.Ru.get("web-player.now-playing-view.minimize.lyrics"),onClick:()=>{i(Vc.YU.npv),t.logInteraction(e.minimizeCinemaModeButtonFactory().hitUiHide()),t.logImpression(e.minimizeCinemaModeButtonFactory().impression())},children:(0,ct.jsx)(tl.Q,{size:"small"})}),(0,ct.jsx)(As,{focus:!0,label:u.Ru.get("web-player.now-playing-view.close.lyrics"),onClick:()=>{i(Vc.YU.none),t.logInteraction(e.closeLyricsButtonFactory().hitUiHide())},children:(0,ct.jsx)(co.M,{size:"small"})})]})};var KR=n(97751);const YR=()=>{const{mode:e,setMode:t}=Yc(),{lyricsCinemaRef:n}=(0,Yo.JT)();!function(){const{pathname:e}=(0,cn.zy)(),{mode:t,setMode:n}=Yc();(0,at.useEffect)((()=>{t===Vc.YU.cinema&&n(Vc.YU.npv)}),[e])}();const{item:i}=(0,Fr.o)((e=>({item:e?.item?.type})));return e!==Vc.YU.cinema?null:(i&&i===M.c.TRACK||t(Vc.YU.npv),n.current?(0,Ko.createPortal)((0,ct.jsxs)("div",{className:Kc.Container,children:[(0,ct.jsx)(WR,{}),(0,ct.jsx)(id.a,{className:Kc.Content,children:(0,ct.jsx)(KR.A,{format:"cinema"})})]}),n.current):(console.error("No container found for cinema video!"),null))},qR=()=>(0,ct.jsx)(rt.s,{children:(0,ct.jsx)(YR,{})});var QR=n(82858);const $R=[/bot/i,/crawler/i,/spider/i,/slurp/i,/facebookexternalhit/i,/google-structured-data-testing-tool/i,/whatsapp/i,/telegrambot/i,/chrome-lighthouse/i,/google page speed insights/i],ZR=()=>{const[e,t]=(0,at.useState)(!1),{pathname:n}=location,i=(0,nt.d4)(tc.JJ),r=(0,$f.V)(),[s,a]=(0,at.useState)(null);return(0,at.useEffect)((()=>{var e;a((e=window.navigator.userAgent,$R.some((t=>t.test(e)))))}),[]),(0,at.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),1100);return()=>{t(!1),clearTimeout(e)}}),[n]),e&&null!==s?(0,ct.jsx)(ct.Fragment,{children:(0,ct.jsx)(QR.t5,{language:u.Ru.getLocaleForSmartling(),market:i.toLowerCase(),excludePlanLinks:s,children:(0,ct.jsx)(QR.wi,{hideWebPlayerLink:!0,hideLegalLinks:r})})}):(0,ct.jsx)(ct.Fragment,{})};var XR=n(28580);const JR=Date.now()-6912e5,ek=()=>{const e=function(){const[e,t]=(0,at.useState)(!1),n=(0,Fo.XB)(),i=(0,at.useRef)(Ho.Z.Disabled);return(0,at.useEffect)((()=>{n!==Ho.Z.NowPlayingView&&i.current===Ho.Z.NowPlayingView?t(!0):t(!1),i.current=n}),[n]),e}(),t=!(0,Yf.n)(),[n,i]=(0,is.x)("npv-onboarding-dismissed",!1),[r]=(0,is.x)("npv-onboarding-dismissed-time",JR),[s]=(0,is.x)("npv-onboarding-never-show-again",!1),a=(Date.now()-r)/36e5<24,o=(0,at.useMemo)((()=>!s&&(!t&&((!n||!a)&&!!e))),[a,e,n,s,t]);(0,at.useEffect)((()=>{let e=null;return o&&(e=setTimeout((()=>{$c.h.set((()=>({triggerId:"npv-onboarding",triggerAction:null}))),i(!0)}),500)),()=>{null!==e&&clearTimeout(e)}}),[i,o])};var tk=n(47929),nk=n(79130);const ik="main-home-homeHeader",rk="B9yNi5FlwGJt0nMEM5HS",sk="t7wxxKMe3KK9hcr93xna",ak=()=>{const{homeAd:e,dismissed:t}=(0,yn.bT)(),n=e&&!t,i=(0,nt.d4)(ao.t$);return n||i},ok=(0,at.memo)((()=>{const e=kg(Ab.gray30),t=!(0,Yf.n)(),n=ak();return(0,ct.jsx)("div",{className:gr()(ik,{[sk]:t,[rk]:n}),style:{backgroundColor:e}})})),lk=(0,at.memo)((({extractedHomeAdColor:e})=>(function(e){const{extractedHomeAdColor:[,t]}=(0,yn.bT)();(0,at.useEffect)((()=>t(e)),[e,t]),(0,at.useEffect)((()=>()=>t(void 0)),[t]),(0,nk.z)(e.colorRaw)}(e),(0,ct.jsx)(ok,{})))),ck=(0,at.memo)((function(){const{imageUrlToExtractHomeAdColorFrom:[e]}=(0,yn.bT)(),t=(0,Dr.r)(e);return t?(0,ct.jsx)(lk,{extractedHomeAdColor:t}):(0,ct.jsx)(ok,{})})),uk="Root__top-container",dk="Root__top-container--has-notice-bar";var mk=n(52503);const pk=parseInt(mk.A.MINIMUM_HEADER_HEIGHT,10);function hk({children:e}){const t=(0,nt.d4)((e=>e.ui.unsupportedBrowser.isOpen)),n=(0,Fo.XB)(),i=(0,Fo.Ev)(In.$S.NPV_BUTTON_CLICK),r=Oy(),s="/home"===(0,cn.zy)().pathname,o=ak(),l=kg(),c=(0,a.NC)(Ie.CI6),u="/lyrics"===(0,cn.zy)().pathname,d=(0,at.useRef)(-1),m=(0,at.useRef)(null),p=(0,at.useCallback)((e=>{const t=e.target.scrollTop;let n;n=r||s?((e,t)=>ky(e,t?350:80,10))(t,o):void 0===l?ky(t,ns.uC):u?0:ky(t,pk,140+ns.uC),Number(d.current).toPrecision(2)!==Number(n).toPrecision(2)&&requestAnimationFrame((()=>{m.current&&m.current.style.setProperty("--top-bar-opacity",`${Number(n).toPrecision(2)}`)})),d.current=n}),[l,r,s,u,o]);return(0,tk.g)(p,{executeOnceOnStart:!0}),(0,ct.jsx)("div",{className:gr()(uk,{[dk]:t}),ref:m,"data-right-sidebar-hidden":!(n!==Ho.Z.Disabled||c&&i)||void 0,children:e})}const gk="Root__main-view-overlay",fk=(0,at.forwardRef)((function({children:e},t){return(0,ct.jsx)("div",{ref:t,className:gk,children:e})})),bk="Root__nav-bar",vk="xg4ZfkcKSYG4yL2shjNU";function yk({children:e}){const{leftSidebarRef:t}=(0,Yo.JT)(),n=(0,a.NC)(Ie.jJQ);return(0,ct.jsx)("div",{id:"Desktop_LeftSidebar_Id",ref:t,className:gr()(bk,{[vk]:n}),children:e})}var _k=n(62793),Ek=n(84516),xk=n(63598),Ck=n(26013),Sk=n(34703),Ak=n(38490),wk=n(21820),Ik=n(72120);const Tk="oxXPl82EiU4cLdDbPcfg",Nk=({children:e})=>{const[t,n]=(0,is.x)("search-callout-seen",!1),i=(0,cn.zy)(),r=(0,at.useCallback)((()=>{n(!0)}),[n]);return(0,at.useEffect)((()=>{i.pathname.startsWith("/search")&&r()}),[i,r]),(0,ct.jsx)(Ik.x,{title:u.Ru.get("navbar.search.callout-title"),description:u.Ru.get("navbar.search.callout-description"),id:"searchCallout",visible:!t,onHide:r,onPrimaryButtonClick:()=>{},showButtons:!1,hideOnClickOutside:!1,placement:"left-start",tippyClassName:Tk,children:e})},Rk=({children:e})=>(0,a.NC)(Ie.FAj)===Ie.z3X.CALLOUT?(0,ct.jsx)(Nk,{children:e}):(0,ct.jsx)(ct.Fragment,{children:e}),kk=({children:e})=>{const t=e??null;return(0,ct.jsx)(at.Suspense,{fallback:t,children:(0,ct.jsx)(Rk,{children:e})})},Ok="main-yourLibraryX-navItems",Pk="Le6_wTBS83okYw756nWl",jk="BQ7wNkJFinJvGx2WCnwc",Lk="main-yourLibraryX-navItem",Dk="main-yourLibraryX-navLink",Uk="QbaKKdcHNA2x3_YJvpYu",Mk="pWhMZyrpf79r8EKV7KMe",Bk="main-yourLibraryX-navLinkActive",Fk=()=>{const{spec:e,logger:t}=(0,Jr.r)(Ak.P,{}),n=(0,zc.sy)(),i=(0,cn.zy)(),r=!(0,Yf.n)(),s=(0,Il.v7)(),a=(0,s_.c)(),o=(0,$f.V)(),l="/"===i.pathname||"/home"===i.pathname;return(0,ct.jsxs)(ct.Fragment,{children:[a&&o&&(0,ct.jsx)("div",{className:Pk,children:(0,ct.jsx)(P_.default,{to:"/",className:jk,children:(0,ct.jsx)(_k.G,{height:"24"})})}),(0,ct.jsxs)("ul",{className:Ok,children:[(0,ct.jsx)("li",{className:gr()(Lk,"InvalidDropTarget"),children:(0,ct.jsx)(_s.Zp,{label:n?u.Ru.get("view.web-player-home"):null,disabled:!n,placement:"right",children:(0,ct.jsxs)(wk.k,{to:"/",referrer:"home",className:gr()("link-subtle",Dk,{[Bk]:l}),"aria-label":u.Ru.get("view.web-player-home"),onClick:()=>{const n=e.homeButtonFactory().hitUiNavigate({destination:"spotify:app:home"});l?s.current?.scrollTo({top:0,behavior:"smooth"}):t.logInteraction(n)},children:[(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Ek.H,{className:gr()("home-icon",Uk),"aria-hidden":"true"}),(0,ct.jsx)(xk.x,{className:gr()("home-active-icon",Uk),"aria-hidden":"true"})]}),!n&&(0,ct.jsx)(fr.E,{variant:"bodyMediumBold",children:u.Ru.get("view.web-player-home")})]})})}),(0,ct.jsx)("li",{className:gr()(Lk,"InvalidDropTarget"),children:(0,ct.jsx)(_s.Zp,{label:r?u.Ru.get("offline.feedback-text"):u.Ru.get("navbar.search"),disabled:!r&&!n,placement:n?"right":"top",children:(0,ct.jsxs)(wk.k,{to:"/search",referrer:"search",className:gr()("link-subtle",Dk,{[Bk]:i.pathname.startsWith("/search")||"search"===i.state?.pageId,[Mk]:r}),onClick:n=>{const s=e.searchButtonFactory().hitUiNavigate({destination:"spotify:app:search"});r&&n.preventDefault(),i.pathname.startsWith("/search")||t.logInteraction(s)},"aria-label":u.Ru.get("navbar.search"),children:[(0,ct.jsx)(Ck.C,{className:gr()("search-icon",Uk),"aria-hidden":"true"}),(0,ct.jsx)(Sk.g,{className:gr()("search-active-icon",Uk),"aria-hidden":"true"}),!n&&(0,ct.jsx)(kk,{children:(0,ct.jsx)(fr.E,{variant:"bodyMediumBold",children:u.Ru.get("navbar.search")})})]})})})]})]})},Hk="main-yourLibraryX-entryPoints",Vk="main-yourLibraryX-library",zk=(0,at.lazy)((async()=>{const{YourLibraryX:e}=await Promise.all([n.e(4151),n.e(3654),n.e(6457)]).then(n.bind(n,3654));return{default:e}})),Gk=()=>{const e=(0,Mg.A)();return(0,ct.jsxs)(ct.Fragment,{children:[!e&&(0,ct.jsx)("div",{className:Hk,children:(0,ct.jsx)(Fk,{})}),(0,ct.jsx)("div",{className:gr()(Hk,Vk),children:(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(zk,{})})})]})},Wk="main-navBar-mainNav";function Kk(){return(0,ct.jsx)("nav",{className:Wk,"aria-label":u.Ru.get("sidebar.a11y.landmark-label"),children:(0,ct.jsx)(Ps.pZ,{value:"nav-bar",children:(0,ct.jsx)(Gk,{})})})}const Yk="Root__main-view";function qk({children:e}){return(0,ct.jsx)("div",{className:Yk,children:e})}const Qk="JkjJ8UlBui5vclUi1vZF",$k=({children:e})=>(0,ct.jsx)("div",{className:Qk,children:e}),Zk="Root__right-sidebar";function Xk({children:e}){const{rightSidebarRef:t}=(0,Yo.JT)();return(0,ct.jsx)("div",{ref:t,className:Zk,children:e})}const Jk="Root__now-playing-bar";function eO({children:e}){const{nowPlayingBarRef:t}=(0,Yo.JT)();return(0,ct.jsx)("div",{ref:t,className:Jk,children:e})}const tO="pip-mini-player",nO={OS_MACOS:"spotify__os--is-macos",OS_WINDOWS:"spotify__os--is-windows",CONTAINER_DESKTOP:"spotify__container--is-desktop",CONTAINER_WEB:"spotify__container--is-web"};function iO(e,t,n){!function(e,t){e.querySelector("html")?.classList.remove(...t)}(n,Object.values(nO));const i=function(e,t){const n=["no-focus-outline"];return t===we.f.macOS?n.push(nO.OS_MACOS):t===we.f.Windows&&n.push(nO.OS_WINDOWS),e===m.m.Desktop?n.push(nO.CONTAINER_DESKTOP):e===m.m.Web&&n.push(nO.CONTAINER_WEB),n}(e,t);!function(e,t){t.forEach((t=>{e.querySelector("html")?.classList.add(t)}))}(n,i)}const rO=e=>{const t=Array.from(document.getElementsByTagName("script")).filter((e=>e.src?.includes("xpui.js")))?.[0]?.src.replace(/\/[^/]+$/,"")??"";return{scripts:[`${t}/${tO}.js`,`${t}/vendor~${tO}.js`],styles:[`${t}/${tO}.css`,`${t}/vendor~${tO}.css`]}},sO=e=>{const t=(0,Xi.mv)();(0,at.useLayoutEffect)((()=>{if(!e)return;const{pipResources:n}=(0,A.C)("config"),{scripts:i,styles:r}=rO();e.document.body.style.margin="0",e.document.body.style.padding="0",iO(t.container,t.operatingSystem,e.document),Qe.setup(e.document),i.map((t=>((e,t)=>{const n=document.createElement("script");n.setAttribute("src",e),t.document.head.appendChild(n)})(t,e))),r.map((t=>((e,t)=>{const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),t.document.body.prepend(n)})(t,e)))}),[e,t])},aO=(0,at.lazy)((()=>new Promise((e=>{const t=Promise.all([n.e(4151),n.e(3667)]).then(n.bind(n,73477)).then((e=>({default:e.PiPMiniPlayer}))),i=new Promise((e=>{setTimeout(e,300)}));Promise.all([t,i]).then((t=>{e(t[0])}))})))),oO=at.memo((()=>{const e=(0,nt.d4)((e=>e.platform.isDeveloperMode));return Ng(!e),null}));var lO=n(68895),cO=n(92789);const uO=at.memo((()=>{const{capabilities:{isEnabled:e},isOpen:t,close:n}=(0,KS.H)(),i=(0,at.useCallback)(n,[n]),r=window.documentPictureInPicture?.window??null;var s,a;sO(r),s=r,a=window,(0,at.useEffect)((()=>{s&&a&&["lang","dir"].forEach((e=>{const t=a.document.documentElement.getAttribute(e);null!==t&&s.document.documentElement.setAttribute(e,t)}))}),[s,a]),(0,at.useEffect)((()=>{}),[]);const o=mt();if((0,at.useEffect)((()=>{r&&o?.registerPiPWindowCallbacks(r)}),[o,r]),!e||!t||!r)return null;const l=r;return(0,Ko.createPortal)((0,ct.jsx)(rt.s,{onError:i,children:(0,ct.jsxs)(At.IF,{handle:l,children:[(0,ct.jsx)(oO,{}),(0,ct.jsx)(cO.S,{children:(0,ct.jsx)(at.Suspense,{fallback:(0,ct.jsx)(lO.B,{}),children:(0,ct.jsx)(aO,{})})})]})}),r.document.body)}));var dO=n(10066),mO=n(53086),pO=n(60957),hO=n(37766);class gO extends hO.V{}const fO=640;class bO{_events=new gO;graphicsRef=null;currentImageUrl=null;getCapabilities(){return{isEnabled:!0,supportsVideo:!1,supportsAds:!1,supportsConnect:!1,supportsOffline:!1}}getEvents(){return this._events}async open(e){const t=this.getOrCreateGraphics();await this.updateGraphicsFromPlayerState(t,e);const n=this.getPictureInPictureElement();return n===t.video||(await this.requestPictureInPicture(t,(()=>{this.close()})),this._events.emitSync("visibility_change",!0)),n??null}async updateGraphicsFromPlayerState(e,t){const n=this.getImageURLFromPlayerState(t);null!==n?await this.drawImage(e,n):this.close()}close(){this.getPictureInPictureElement()&&document.exitPictureInPicture(),this.disposeGraphics(),this._events.emitSync("visibility_change",!1)}isAllowed(e,t,n){const i=e?.hasContext??!1,r=e?.item?.type===M.c.EPISODE&&"audio"!==e?.item.mediaType;return!!i&&(!!(n??!0)&&!r)}getCurrentState(){return this.getPictureInPictureElement()?"open":"closed"}syncWithPlayerState(e){const t=e?.hasContext??!1,n=e?.isPaused??!1,i=this.getPictureInPictureElement();!t||n?i?.pause():i?.play();const r=this.getOrCreateGraphics();this.updateGraphicsFromPlayerState(r,e)}getOrCreateGraphics(){return this.graphicsRef??=this.createGraphics(),this.graphicsRef}disposeGraphics(){this.graphicsRef=null,this.currentImageUrl=null}createGraphics(){const e=document.createElement("canvas");e.width=fO,e.height=fO;const t=e.getContext("2d"),n=document.createElement("video");return n.srcObject=e.captureStream(),n.muted=!0,{context:t,video:n}}async drawImage({context:e,video:t},n){if(this.currentImageUrl===n)return;this.currentImageUrl=n;const i=new Image;i.crossOrigin="anonymous",i.src=(0,pO.m)({imageUriOrUrl:n,desiredMosaicSize:fO}),await i.decode(),e.drawImage(i,0,0,fO,fO),await t.play()}getImageURLFromPlayerState(e){const t=e?.item?.images??[];return(0,es.h)(t,{desiredSize:fO})??null}async requestPictureInPicture({video:e},t){try{await e.requestPictureInPicture(),e.addEventListener("leavepictureinpicture",t,{once:!0})}catch(e){(0,mO.vV)(e)}}getPictureInPictureElement(){if(document.pictureInPictureElement)return document.pictureInPictureElement}static isSupported(){return!1}}var vO=n(33482);class yO{#e=new gO;#t=null;#n;constructor(e=!1){this.#n=e}getCapabilities(){return{isEnabled:!0,supportsVideo:!0,supportsAds:!0,supportsConnect:!0,supportsOffline:this.#n}}getEvents(){return this.#e}async open(e){if(!yO.isSupported())return null;const t=this.getDocumentPictureInPictureElement()?.window;if(t){if(t===this.#t)return this.#t;t.close()}const{width:n,height:i}=this.getInitialWindowSize(e?.item),r=await this.createWindow(n,i);return void 0===r?(this.close(),null):(this.#t=r,this.#t.addEventListener("pagehide",(()=>{this.close()}),{once:!0}),this.#e.emitSync("visibility_change",!0),this.#t)}close(){this.#t&&(this.#t.close(),this.#t=null),this.#e.emitSync("visibility_change",!1)}isAllowed(e,t,n){return!(!(e?.hasContext??!1)&&t===q.zP.NOT_CONNECTED)}getCurrentState(){return this.#t?"open":"closed"}syncWithPlayerState(e){}getInitialWindowSize(e){let t=300,n=300;if(e){(0,$t.p)(e)&&("video"===e.mediaType||"mixed"===e.mediaType)&&(t=425,n=300)}return{width:t,height:n}}async createWindow(e,t){return await(this.getDocumentPictureInPictureElement()?.requestWindow({width:e,height:t}))}getDocumentPictureInPictureElement(){return window.documentPictureInPicture}static isSupported(){return"documentPictureInPicture"in window&&((0,vO.Ek)()||(e="chrome",t=119,C().getParser(navigator.userAgent).satisfies({[e]:`>=${t}`})??!1));var e,t}}class _O{getCapabilities(){return{isEnabled:!1,supportsVideo:!1,supportsAds:!1,supportsConnect:!1,supportsOffline:!1}}getEvents(){return new gO}open(){return Promise.resolve(void 0)}close(){}isAllowed(e,t,n){return!1}getCurrentState(){return"closed"}syncWithPlayerState(){}}const EO=()=>{const e=(0,zn.g)(),[t]=(0,at.useState)((()=>{if(navigator.webdriver)return new _O;if(yO.isSupported()){if(e.localConfiguration.getValue(Ie.Tb_)){return new yO(!0)}}return bO.isSupported()?new bO:new _O}));return t};var xO=n(86316);var CO=n(49778);function SO(){if(AO())try{navigator.mediaSession.setActionHandler("enterpictureinpicture",null)}catch(e){}}function AO(){return"mediaSession"in navigator}const wO=at.memo((({pipInstance:e})=>((e=>{const{connectionStatus:t,isActiveDeviceLocal:n}=(0,Uo.v)((e=>({connectionStatus:e.connectionStatus,isActiveDeviceLocal:e.activeDevice?.isLocal})),Vr.a),i=(0,Fr.o)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.item?.uri===t?.item?.uri)),r=(0,at.useRef)(i);r.current=i;const s=(0,at.useMemo)((()=>e.isAllowed(i,t,n)),[t,n,e,i]);(0,at.useEffect)((()=>{if(AO()){try{s?navigator.mediaSession.setActionHandler("enterpictureinpicture",(t=>{e.open(r.current)})):SO()}catch(e){}return()=>{SO()}}}),[e,s])})(e),null)));var IO=n(45917),TO=n(41624);const NO=()=>{const e=(0,nt.wA)(),{data:t}=(0,nt.d4)((e=>e.ui.artistAboutDialog));if(!t)return null;const{artist:n,artistUri:i,visuals:r,stats:s,externalLinks:a}=t,{gallery:o}=r,{monthlyListeners:l,worldRank:c,followers:u,topCities:d}=s,m=[];return o.items.forEach((e=>{const t=e.sources.map(ne.m),n=(0,iC.g)(t,{desiredLabel:"large",desiredSize:600});n&&m.push(n)})),(0,ct.jsx)(TO.y,{artistUri:i,name:n.name,bio:n.biography?.text,bioSource:n.biography?.type,worldRank:c||0,isOpen:!0,closeModal:()=>{e((0,et.lM)())},images:m,externalLinks:a,topCities:d?.items,followers:u,monthlyListeners:l})};var RO=n(27375);const kO=({uri:e,onConfirm:t,onCancel:n,remoteDeviceInfo:i})=>{const r=(0,ot.s)(),s=(0,at.useMemo)((()=>(0,RO.c)()),[]);(0,at.useEffect)((()=>{r.logImpression(s.impression())}),[r,s]);const a=(0,nt.wA)();return(0,ct.jsx)(EN.T,{"aria-label":u.Ru.get("web-player.download.remove-download-confirmation-dialog.title"),titleText:u.Ru.get("web-player.download.remove-download-confirmation-dialog.title"),descriptionText:i?u.Ru.get("web-player.download.remove-download-confirmation-dialog.message-remote",i.deviceName):u.Ru.get("web-player.download.remove-download-confirmation-dialog.message"),onConfirm:()=>{t(),a((0,et.Kf)()),r.logInteraction(i?s.confirmRemoveDownloadButtonFactory().hitRemoveDownloadFromRemoteDevice({itemToRemoveFromDownloads:e,remoteDeviceId:i.deviceId,remoteDeviceType:i.deviceType.toString(),remoteClientPlatform:i.clientPlatform.toString()}):s.confirmRemoveDownloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},onClose:()=>{n(),a((0,et.Kf)()),r.logInteraction(s.cancelButtonFactory().hitUiHide())},confirmText:u.Ru.get("web-player.download.remove-download-confirmation-dialog.confirm-button-text"),confirmLabel:u.Ru.get("web-player.download.remove-download-confirmation-dialog.confirm-button-label"),cancelText:u.Ru.get("web-player.download.remove-download-confirmation-dialog.cancel-button-text"),allowHTML:!0})};var OO=n(96538),PO=n(43505);var jO=n(10072),LO=n(55138),DO=n(3265);var UO=n(34137),MO=n(49214);const BO=({onChangePermission:e,onRemoveMember:t,onLeave:n,member:i,capabilities:r})=>(0,ct.jsxs)(Rs.W,{children:[r.canAdministratePermissions&&"VIEWER"===i.permissionLevel&&(0,ct.jsx)(Os.D,{role:"menuitemradio","aria-checked":!1,onClick:()=>e("CONTRIBUTOR"),leadingIcon:(0,ct.jsx)(UO.u,{size:"small"}),children:(0,ct.jsx)(fr.E,{variant:"bodySmall",children:u.Ru.get("contextmenu.make-collaborator")})}),r.canAdministratePermissions&&"CONTRIBUTOR"===i.permissionLevel&&(0,ct.jsx)(Os.D,{role:"menuitemradio","aria-checked":!1,onClick:()=>e("VIEWER"),leadingIcon:(0,ct.jsx)(UO.u,{size:"small"}),children:(0,ct.jsx)(fr.E,{variant:"bodySmall",children:u.Ru.get("contextmenu.make-listener")})}),r.canAdministratePermissions&&(0,ct.jsx)(Os.D,{role:"menuitemradio","aria-checked":!1,onClick:()=>t(),leadingIcon:(0,ct.jsx)(MO.r,{size:"small"}),children:(0,ct.jsx)(fr.E,{variant:"bodySmall",children:u.Ru.get("contextmenu.remove-user-from-playlist")})}),r.canCancelMembership&&(0,ct.jsx)(Os.D,{role:"menuitemradio","aria-checked":!1,onClick:()=>n(),leadingIcon:(0,ct.jsx)(MO.r,{size:"small"}),children:(0,ct.jsx)(fr.E,{variant:"bodySmall",children:u.Ru.get("contextmenu.leave-playlist")})})]}),FO="uv2sbcK86mvObEP6I6hA",HO="biDFn_kFEWlTdVmGaI4c",VO="EW1t5mbo9hvxGC_ptS6k",zO="qEJiFwRQbUiOdb9xXQIa",GO="SexldtxY9c9V6RANcuod",WO="zW45u2gfu8HHBqbm745Z",KO="vxjT7DTxVfyAxy3WcErT",YO="llgv1BhpY3BwLUvcQ3Hx",qO="aCyb8gmETLFf6lQmJs2v",QO="ZKrl2b1JEsPzkUo5X9hG",$O="gaPaX1jusmGCAKSG5L7N",ZO="Nhe2Q_5EbptALoVW3V4K",XO="s9rTnCluVsYXlqj5OdMg",JO="FJrwM8ylEu9MfQEclH24",eP="olUpKnRVm_c2P5yQwddx",tP=({uri:e,member:t,capabilities:n,isCurrentUser:i})=>{const r=(0,nt.wA)(),[s,a]=(0,at.useState)(!1),{changeMemberPermission:o,removeMember:l}=(e=>{const t=(0,Ai.a)(),n=(0,at.useCallback)((async(n,i)=>{await t.setMemberPermission(e,n,i)}),[t,e]),i=(0,at.useCallback)((async n=>{await t.removeMember(e,n)}),[t,e]),r=(0,at.useCallback)((async n=>{await t.setBasePermission(e,n)}),[t,e]);return{uri:e,changeMemberPermission:n,removeMember:i,changeBasePermission:r}})(e),c=(0,at.useCallback)((e=>{t.user&&(o(t.user.username,e),a(!0))}),[o,t.user]),d=(0,at.useCallback)((()=>{t.user&&(l(t.user.username),a(!0))}),[t.user,l]),m=(0,at.useCallback)((()=>{r((0,et.aP)(e))}),[r,e]),p=!t.isOwner&&(n?.canAdministratePermissions||n?.canCancelMembership&&i);let h="CONTRIBUTOR"===t.permissionLevel?u.Ru.get("permissions.collaborator"):u.Ru.get("permissions.listener");return t.isOwner&&(h=u.Ru.get("permissions.creator")),p&&n?(0,ct.jsx)(ws.b,{renderInline:!0,menu:(0,ct.jsx)(BO,{onChangePermission:c,onRemoveMember:d,onLeave:m,capabilities:n,member:t}),children:(e,t,n)=>(0,ct.jsxs)("button",{className:gr()(XO,JO,{[eP]:s}),onClick:t,ref:n,type:"button","":"permissions-menu",children:[(0,ct.jsx)(fr.E,{variant:"bodySmall",children:h}),e?(0,ct.jsx)(LO.J,{size:"small"}):(0,ct.jsx)(DO.y,{size:"small"})]})}):(0,ct.jsx)(fr.E,{variant:"bodySmall",className:XO,children:h})},nP=({member:e,playlistUri:t,username:n,capabilities:i,onClose:r})=>{if(!e.user)return null;const s=n===e.user.username,a=s&&e.user.displayName?u.Ru.get("permissions.current-user-name",e.user.displayName):e.user.displayName;return(0,ct.jsxs)("div",{className:YO,children:[(0,ct.jsxs)("div",{className:qO,children:[(0,ct.jsx)(Ef.e,{label:e.user.displayName,images:e.user.images.map((e=>({url:e.url,width:e.width||null,height:e.height||null}))),width:32,userIconSize:"small"}),(0,ct.jsxs)("div",{className:QO,children:[(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(IA.B,{uri:e.user.uri}),children:(0,ct.jsx)(jO.N,{title:a??e.user.username,to:e.user.uri,dir:"auto",onClick:r,children:(0,ct.jsx)(fr.E,{variant:"bodySmallBold",children:a})})}),e.songsAdded>0&&(0,ct.jsx)(fr.E,{className:$O,variant:"marginal",children:u.Ru.get("permissions.songs-added",e.songsAdded)})]})]}),(0,ct.jsx)(tP,{uri:t,member:e,capabilities:i,isCurrentUser:s})]},e.user.uri)};const iP=({isPublicPlaylist:e})=>(0,ct.jsx)("div",{className:GO,children:e?(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(OO.d,{size:"small"}),(0,ct.jsx)(fr.E,{className:WO,variant:"marginal",children:u.Ru.get("permissions.public-playlist")})]}):(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(PO.u,{size:"small"}),(0,ct.jsx)(fr.E,{className:WO,variant:"marginal",children:u.Ru.get("permissions.private-playlist")})]})}),rP=({isOpen:e,uri:t,onClose:n})=>{const i=function(e){const t=(0,Ai.a)(),[n,i]=(0,at.useState)(null),r=(0,at.useCallback)(((e,t)=>{i(e||!t?null:t)}),[]);return(0,at.useEffect)((()=>t.subscribeToMembers(e,r)),[t,e,r]),n}(t),r=(0,nt.d4)((({session:e})=>e?.user?.id))||null;return i?(0,ct.jsx)(Ga.A,{isOpen:e,onRequestClose:n,contentLabel:u.Ru.get("permissions.modal-label"),children:(0,ct.jsxs)("div",{"":"playlist-permissions-modal",className:FO,children:[(0,ct.jsxs)("div",{className:HO,children:[(0,ct.jsxs)("div",{className:VO,children:[(0,ct.jsx)(iP,{isPublicPlaylist:(s=i.basePermissionLevel,"VIEWER"===s||"CONTRIBUTOR"===s)}),(0,ct.jsx)("button",{className:KO,onClick:n,children:(0,ct.jsx)(co.M,{size:"small","aria-label":u.Ru.get("close")})})]}),(0,ct.jsx)(fr.E,{as:"h1",variant:"titleMedium",children:u.Ru.get("permissions.shared-with")})]}),(0,ct.jsx)(id.a,{className:ZO,children:(0,ct.jsx)("div",{className:zO,children:(0,ct.jsx)("div",{children:i.members&&i.members.map((e=>(0,ct.jsx)(nP,{playlistUri:t,member:e,username:r,capabilities:i.capabilities,onClose:n},e.user?.username)))})})})]})}):null;var s},sP=()=>{const e=(0,a.NC)(Ie.G6N),{isOpen:t,uri:n}=(0,at.useContext)(st.cM),i=(0,at.useContext)(st.VV),r=(0,at.useCallback)((()=>{i({type:"close"})}),[i]);return e&&t&&n?(0,ct.jsx)(rP,{isOpen:t,onClose:r,uri:n}):null};var aP=n(97739),oP=n(79119),lP=n(76576),cP=n(48061);const uP=({size:e=60,className:t})=>(0,ct.jsx)("img",{className:t,src:(0,as.b)("images/group-session-logo.svg"),height:e,width:e,alt:u.Ru.get("web-player.social-connect.group-session-logo-alt")}),dP="jav_0ddRdU3yOojQAq8w",mP="ldkgyfJfn34VlQ2thtaB",pP="cHxs16ZqqJIr8OAcIG1h",hP="tIfl33R3uqA7AyIa0OHf",gP="OEOcqiDA2mrxdAcZOXdj",fP=({imageElement:e,title:t,subtitle:n,confirmButtonText:i,confirmButtonIcon:r,onConfirm:s,cancelButtonText:a,onCancel:o,disabled:l,footerText:c})=>(0,ct.jsxs)("div",{className:dP,children:[e,(0,ct.jsxs)("div",{className:mP,children:["string"==typeof t?(0,ct.jsx)(fr.E,{as:"h3",variant:"titleMedium",semanticColor:"textBase",className:pP,children:t}):t,"string"==typeof n?(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBase",children:n}):n]}),(0,ct.jsxs)("div",{className:hP,children:[(0,ct.jsx)(br.$,{onClick:s,disabled:l,iconTrailing:r,children:i}),a&&(0,ct.jsx)(Xs.H,{semanticColor:"textSubdued",onClick:o,disabled:l,children:a})]}),c&&(0,ct.jsx)("div",{className:gP,children:(0,ct.jsx)(fr.E,{variant:"marginal",semanticColor:"textSubdued",children:c})})]}),bP=({setContentLabel:e})=>{const{createSession:t,currentSession:n,deleteSession:i}=(0,oc.D)(),r=(0,nt.wA)(),s=(0,Xi.vh)(),a=(0,AA.Z)(),o=(0,at.useCallback)((async()=>{await t()}),[t]);(0,at.useEffect)((()=>{o()}),[o]);const l=(0,lP.c)(),c=(0,at.useCallback)((async()=>{const e=n?.joinSessionUri;if(!e){const e=await t();if(!e?.joinSessionUri)return;s.send((0,aP.q)({session_id:e.sessionId,device_type:l.deviceType,tech_type:l.techType,session_uri:e.joinSessionUri,session_type:cP.dF.REMOTE}))}n?.joinSessionShortLink&&a(n?.joinSessionShortLink),r((0,et.cQ)())}),[n?.joinSessionUri,n?.joinSessionShortLink,r,t,s,l.deviceType,l.techType,a]),d=(0,at.useCallback)((async()=>{if(n){await i()&&s.send((0,oP.c)({session_id:n.sessionId,end_reason:cP.Mm.INVITATION_MODAL_CANCEL_BUTTON}))}r((0,et.cQ)())}),[n,i,r,s]),m=u.Ru.get("web-player.social-connect.invitation-modal.title");return(0,at.useEffect)((()=>{e(m)}),[m,e]),(0,ct.jsx)(fP,{imageElement:(0,ct.jsx)(uP,{}),title:m,subtitle:u.Ru.get("web-player.social-connect.invitation-modal.subtitle"),confirmButtonText:u.Ru.get("web-player.social-connect.invitation-modal.button-primary"),onConfirm:c,cancelButtonText:u.Ru.get("web-player.social-connect.invitation-modal.button-tertiary"),onCancel:d})};var vP=n(4825);const yP=(e,t)=>{switch(e){case Vc.EL.SESSION_ENDED:return{title:u.Ru.get("web-player.social-connect.session-ended.title"),description:u.Ru.get("web-player.social-connect.session-ended.sub-title"),confirmText:u.Ru.get("web-player.social-connect.session-ended.confirmation-button"),ubiIdentifier:vP.gw.SESSION_ENDED};case Vc.EL.ERROR:return{title:u.Ru.get("web-player.social-connect.generic-error.title"),description:u.Ru.get("web-player.social-connect.generic-error.sub-title"),confirmText:u.Ru.get("web-player.social-connect.generic-error.confirmation-button"),ubiIdentifier:vP.gw.ERROR};case Vc.EL.MOBILE_ONLY:return{title:u.Ru.get("web-player.social-connect.mobile-only.title"),description:u.Ru.get("web-player.social-connect.mobile-only.description"),confirmText:u.Ru.get("web-player.social-connect.mobile-only.confirmation-button"),ubiIdentifier:vP.gw.MOBILE_ONLY};case Vc.EL.END_SESSION:return{title:u.Ru.get("web-player.social-connect.end-session.title"),description:u.Ru.get("web-player.social-connect.end-session.sub-title"),confirmText:u.Ru.get("web-player.social-connect.end-session.confirm"),cancelText:u.Ru.get("web-player.social-connect.end-session.cancel")};case Vc.EL.LEAVE_SESSION:return{title:u.Ru.get("web-player.social-connect.leave-session.title"),description:u.Ru.get("web-player.social-connect.leave-session.sub-title"),confirmText:u.Ru.get("web-player.social-connect.leave-session.leave-session-button"),cancelText:u.Ru.get("web-player.social-connect.leave-session.cancel")};case Vc.EL.REMOVE_PARTICIPANT:return{title:u.Ru.get("web-player.social-connect.participant-list.remove-guest-dialog",{displayName:t}),description:"",confirmText:u.Ru.get("web-player.social-connect.participant-list.remove-guest"),cancelText:u.Ru.get("web-player.social-connect.participant-list.remove-guest-cancel")};default:return(0,B.k)(e),{confirmText:"",description:"",title:""}}};var _P=n(65842);const EP=({isOpen:e})=>{const t=(0,nt.wA)(),{currentSession:n,deleteSession:i}=(0,oc.D)(),{logEndJam:r}=(()=>{const{spec:e,logger:t}=(0,Jr.r)(_P.Z,{});return{logEndJam:(0,at.useCallback)((()=>{t.logInteraction(e.endButtonFactory().hitStopHostingSocialListeningSession())}),[t,e])}})(),s=(0,Xi.vh)(),{title:a,description:o,confirmText:l,cancelText:c}=yP(Vc.EL.END_SESSION),u=(0,at.useCallback)((async()=>{r(),await i(),s.send((0,oP.c)({session_id:n?.sessionId,end_reason:cP.Mm.QUEUE_END_SESSION_BUTTON})),t((0,et.cQ)())}),[n?.sessionId,i,t,s,r]),d=(0,at.useCallback)((()=>{t((0,et.cQ)())}),[t]);return(0,ct.jsx)(EN.T,{isOpen:e,onClose:d,onConfirm:u,titleText:a,"aria-label":a,descriptionText:o,confirmText:l,confirmLabel:l,cancelText:c})},xP=({isOpen:e,dialogType:t})=>{const n=(0,nt.wA)(),{title:i,description:r,confirmText:s,ubiIdentifier:a}=yP(t),{spec:o,logger:l}=(0,Jr.r)(vP.Fh,{data:{identifier:a}}),c=(0,at.useCallback)((()=>{n((0,et.cQ)())}),[n]);return(0,at.useEffect)((()=>{e&&l.logImpression(o.impression())}),[e,l,o]),(0,ct.jsx)(EN.T,{isOpen:e,onClose:c,onConfirm:c,titleText:i,"aria-label":i,descriptionText:r,confirmText:s,confirmLabel:s})};var CP=n(20704);const SP=({isOpen:e})=>{const t=(0,nt.wA)(),{currentSession:n,leaveSession:i}=(0,oc.D)(),{logLeaveJam:r}=(()=>{const{spec:e,logger:t}=(0,Jr.r)(CP.Q,{});return{logLeaveJam:(0,at.useCallback)((()=>{t.logInteraction(e.leaveButtonFactory().hitLeaveSocialListeningSession())}),[t,e])}})(),s=(0,Xi.vh)(),{title:a,description:o,confirmText:l,cancelText:c}=yP(Vc.EL.LEAVE_SESSION),u=(0,at.useCallback)((async()=>{r(),await i(),s.send((0,oP.c)({session_id:n?.sessionId,end_reason:cP.Mm.QUEUE_LEAVE_SESSION_BUTTON})),t((0,et.cQ)())}),[n?.sessionId,t,s,i,r]),d=(0,at.useCallback)((()=>{t((0,et.cQ)())}),[t]);return(0,ct.jsx)(EN.T,{isOpen:e,onClose:d,onConfirm:u,titleText:a,"aria-label":a,descriptionText:o,confirmText:l,confirmLabel:l,cancelText:c})};var AP=n(32226);const wP=()=>{const{spec:e,logger:t}=(0,Jr.r)(AP.T,{});return{logRemoveClick:(0,at.useCallback)(((n,i)=>{t.logInteraction(e.buttonRowFactory().removeButtonFactory().hitRemoveParticipant({participantId:n,sessionId:i}))}),[t,e])}},IP=({isOpen:e})=>{const t=(0,nt.wA)(),{logRemoveClick:n}=wP(),{currentSession:i,removeSessionMember:r}=(0,oc.D)(),{memberToRemove:s}=(0,nt.d4)((e=>e.ui.jamModalState)),a=s?.id??"",o=s?.displayName??"",l=i?.sessionId??"",{title:c,description:u,confirmText:d,cancelText:m}=yP(Vc.EL.REMOVE_PARTICIPANT,o),p=(0,at.useCallback)((()=>{n(a,l),a&&(r(a),t((0,et.cQ)()))}),[n,a,l,r,t]),h=(0,at.useCallback)((()=>{t((0,et.cQ)())}),[t]);return(0,ct.jsx)(EN.T,{isOpen:e,onClose:h,onConfirm:p,titleText:c,"aria-label":c,descriptionText:u,confirmText:d,confirmLabel:d,cancelText:m})},TP=({isOpen:e,dialogType:t})=>{switch(t){case Vc.EL.LEAVE_SESSION:return(0,ct.jsx)(SP,{isOpen:e});case Vc.EL.END_SESSION:return(0,ct.jsx)(EP,{isOpen:e});case Vc.EL.REMOVE_PARTICIPANT:return(0,ct.jsx)(IP,{isOpen:e});case Vc.EL.SESSION_ENDED:case Vc.EL.MOBILE_ONLY:case Vc.EL.ERROR:return(0,ct.jsx)(xP,{isOpen:e,dialogType:t});default:return null}};var NP=n(64898),RP=n(85786),kP=n(62186),OP=n(63275),PP=n(49564),jP=n(36125);const LP="H3UvfEgDtYPH0EL3aLwZ",DP="LPVfHXRjItuJaNEQdlTT",UP="DD2yyz7nKDIMIXhFOAkl",MP="NQtJIrT4cCneGvSC152a",BP="xIKQXbFbxYFpBJfoOTFw",FP="Bs13fjYCTb2TKzoO13sA",HP="N6Pa7PkejWH5KojTMbfU",VP="Uz7GyGSJMC1Cz7Cz0G6t",zP="hN61FwfX0b6x78GshoG3";function GP(){const{isLocalDevice:e,deviceName:t}=(0,Uo.v)((({activeDevice:e})=>({isLocalDevice:e?.isLocal??!0,deviceName:e?.name??""})),((e,t)=>e.deviceName===t.deviceName&&e.isLocalDevice===t.isLocalDevice));return function(e,t){const n=(0,vO.Ek)();return e?n?u.Ru.get("web-player.social-connect.join-modal.device-name.this-computer"):u.Ru.get("web-player.social-connect.join-modal.device-name.this-browser"):t}(e,t)}const WP=()=>(0,ct.jsxs)("div",{className:zP,children:[(0,ct.jsx)(RP.D,{size:"xsmall",semanticColor:"textBase"}),(0,ct.jsx)(fr.E,{variant:"marginalBold",semanticColor:"textBase",children:u.Ru.get("navbar.premium")})]}),KP=({value:e,icon:t,title:n,subtitle:i,selected:r,onSelect:s,formWidth:a,setFormWidth:o})=>{const l=(0,at.useRef)(null);return(0,at.useLayoutEffect)((()=>{if(l.current){const e=l.current.getBoundingClientRect().width;e>a&&o(Math.min(490,e+96+8))}}),[a,o]),(0,ct.jsxs)("div",{className:MP,children:[(0,ct.jsxs)("label",{className:BP,htmlFor:e,children:[t,(0,ct.jsxs)("div",{className:FP,style:{"--device-form-label-width":a-96+8+"px"},ref:l,children:[(0,ct.jsx)(fr.E,{variant:r?"bodyMediumBold":"bodyMedium",semanticColor:r?"textBrightAccent":"textBase",className:VP,children:n}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:r?"textBrightAccent":"textSubdued",className:VP,children:i})]})]}),(0,ct.jsx)(kP.M,{value:e,id:e,className:HP,name:"session-type-radio",checked:r,onChange:()=>{s(e)}})]})},YP=({sessionType:e,setSessionType:t,hostName:n})=>{const i=GP(),r=(0,Uo.v)((({activeDevice:e})=>e?.type??q.bq.COMPUTER)),s=(0,jP.t)(r),a=(0,mb.l)(),[o,l]=(0,at.useState)(0);return(0,ct.jsxs)(OP.g,{className:UP,style:{"--device-form-width":`${o}px`},children:[(0,ct.jsx)(KP,{value:cP.dF.REMOTE,icon:(0,ct.jsx)(s,{semanticColor:e===cP.dF.REMOTE?"textBrightAccent":"textBase"}),title:u.Ru.get("web-player.social-connect.join-modal.continue-on-this-device",{device:i}),subtitle:u.Ru.get("web-player.social-connect.join-modal.continue-on-this-device-subtitle"),onSelect:t,selected:e===cP.dF.REMOTE,formWidth:o,setFormWidth:l}),a&&(0,ct.jsx)(WP,{}),(0,ct.jsx)(KP,{value:cP.dF.IN_PERSON,icon:(0,ct.jsx)(PP.H,{semanticColor:e===cP.dF.IN_PERSON?"textBrightAccent":"textBase"}),title:u.Ru.get("web-player.social-connect.join-modal.play-from-host-speaker",{host:n}),subtitle:u.Ru.get("web-player.social-connect.join-modal.play-from-host-speaker-subtitle"),onSelect:t,selected:e===cP.dF.IN_PERSON,formWidth:o,setFormWidth:l})]})},qP="V8Nnr6rCPzkQv7MCvvKM",QP="A8jOuTXM1E0dlFYJlV39",$P="D0L83_9SDaOFBzZT8EKO",ZP=()=>(0,ct.jsx)("div",{className:dP,children:(0,ct.jsxs)("div",{className:qP,children:[(0,ct.jsx)(Hx.Y,{as:"h3",variant:"titleSmall",className:$P,charCount:16,isLoading:!0}),[[20,50,25],[40,28,35]].map(((e,t)=>(0,ct.jsx)("div",{className:QP,children:e.map(((e,t)=>(0,ct.jsx)(Hx.Y,{as:"div",variant:"bodySmall",className:$P,charCount:e,isLoading:!0},`${e}-${t}`)))},`skeleton-section-${t}`)))]})});var XP=n(5215);var JP=n(91144);let ej=function(e){return e.NONE="NONE",e.JOINING="JOINING",e.JOINED="JOINED",e.FAILED="FAILED",e}({});const tj=({joinToken:e,setContentLabel:t})=>{const n=(0,nt.wA)(),{getSessionInfo:i,joinSession:r}=(0,oc.D)(),{openURLWithSessionTransfer:s}=(0,Bf.L)(),{logJoin:a}=(()=>{const{spec:e,logger:t}=(0,Jr.r)(XP.U,{});return{logJoin:(0,at.useCallback)((()=>{const n=e.joinButtonFactory().hitJoinSocialListeningSession();t.logInteraction(n)}),[t,e])}})(),o=(0,Xi.vh)(),[l,c]=(0,at.useState)(null),[d,m]=(0,at.useState)(cP.dF.REMOTE),p=(0,JP.C)(),h=p===Ae.l.FREE&&d===cP.dF.REMOTE;(0,at.useEffect)((()=>{i(e).then((e=>{if(e){c(e);const n=e.sessionMembers.find((t=>t.id===e.sessionOwnerId));t(u.Ru.get("web-player.social-connect.join-modal.title",{host:n?.displayName??""}))}else n((0,et.A9)(Vc.EL.SESSION_ENDED))}))}),[n,i,e,t]);const[g,f]=(0,at.useState)(ej.NONE),b=(0,at.useCallback)((async()=>{f(ej.JOINING),a();try{const t=await r(e,d);t&&(f(ej.JOINED),o.send((0,NP.X)({session_id:l?.sessionId,join_type:cP.JO.DEEPLINKING,join_url:t.joinSessionUri,participation_mode:d})),p!==Ae.l.FREE&&n((0,et.cQ)()))}catch(e){f(ej.FAILED),e instanceof Error&&o.send((0,NP.X)({session_id:l?.sessionId,error_category:e.name,error_data:e.message})),n((0,et.A9)(Vc.EL.ERROR))}}),[n,o,p,r,e,a,l?.sessionId,d]),v=(0,at.useCallback)((()=>{s(`${vr.M0}&ref=jam`,"_blank"),n((0,et.cQ)())}),[n,s]),y=(0,at.useCallback)((()=>{n((0,et.cQ)())}),[n]);if(!l)return(0,ct.jsx)(ZP,{});const _=l.sessionMembers.find((e=>e.id===l.sessionOwnerId)),E=l.sessionMembers.map(dc.c);return g===ej.JOINED&&p===Ae.l.FREE?(0,ct.jsx)(fP,{imageElement:(0,ct.jsx)(uc.g,{users:E,size:"xlarge",maxSlots:3}),title:(0,ct.jsx)(fr.E,{as:"h3",variant:"titleMedium",semanticColor:"textBase",children:u.Ru.get("web-player.social-connect.join-modal.success.title",{host:(0,ct.jsx)("span",{className:LP,children:_?.displayName??""})})}),subtitle:(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",className:DP,children:u.Ru.get("web-player.social-connect.join-modal.success.subtitle")}),confirmButtonText:u.Ru.get("web-player.social-connect.generic-error.confirmation-button"),onConfirm:()=>{n((0,et.cQ)())}}):(0,ct.jsx)(fP,{imageElement:(0,ct.jsx)(uc.g,{users:E,size:"xlarge",maxSlots:3}),title:(0,ct.jsx)(fr.E,{as:"h3",variant:"titleMedium",semanticColor:"textBase",children:u.Ru.get("web-player.social-connect.join-modal.title",{host:(0,ct.jsx)("span",{className:LP,children:_?.displayName??""})})}),subtitle:(0,ct.jsx)(YP,{sessionType:d,setSessionType:m,hostName:_?.displayName??""}),confirmButtonText:h?u.Ru.get("web-player.social-connect.premium-upsell.confirmation-button"):u.Ru.get("web-player.social-connect.join-modal.button-primary"),confirmButtonIcon:h?Hm.H:void 0,onConfirm:h?v:b,cancelButtonText:u.Ru.get("web-player.social-connect.join-modal.button-tertiary"),onCancel:y,disabled:g===ej.JOINING,footerText:u.Ru.get("web-player.social-connect.join-modal.privacy-notice")})};var nj=n(47530),ij=n(58701);const rj=({joinToken:e})=>{const t=(0,nt.wA)(),{logGetAppClick:n}=(()=>{const{spec:e,logger:t}=(0,Jr.r)(ij.e,{});return{logGetAppClick:(0,at.useCallback)((()=>{const n=e.downloadButtonFactory().hitNavigateToExternalUri({destination:(0,nj.rw)().href});t.logInteraction(n)}),[t,e])}})(),{getSessionInfo:i}=(0,oc.D)(),[r,s]=(0,at.useState)(null),[a,o]=(0,at.useState)([]);(0,at.useEffect)((()=>{i(e).then((e=>{if(e){const t=e?.sessionOwnerId,n=e?.sessionMembers.find((e=>e.id===t)),i=e?.sessionMembers.map(dc.c)??[];if(o(i),!n)return;s(n.displayName)}else t((0,et.A9)(Vc.EL.SESSION_ENDED))}))}),[i,e,t]);const l=(0,at.useCallback)((()=>{t((0,et.cQ)())}),[t]),c=(0,at.useCallback)((()=>{n();const i=(0,j.MZ)(e);window.open((0,nj.rw)(i).href),t((0,et.cQ)())}),[t,e,n]);return(0,ct.jsx)(fP,{imageElement:(0,ct.jsx)(uc.g,{users:a,size:"xlarge",maxSlots:3}),title:(0,ct.jsx)(fr.E,{as:"h3",variant:"titleMedium",semanticColor:"textBase",children:u.Ru.get("web-player.social-connect.redirect-modal.title",{host:r??""})}),subtitle:u.Ru.get("web-player.social-connect.redirect-modal.sub-title"),confirmButtonText:u.Ru.get("web-player.social-connect.redirect-modal.confirmation-button"),onConfirm:c,cancelButtonText:u.Ru.get("web-player.social-connect.redirect-modal.cancel-button"),onCancel:l})},sj=()=>{const e=(0,nt.wA)(),{isOpen:t,modalType:n,joinToken:i}=(0,nt.d4)((e=>e.ui.jamModalState)),[r,s]=(0,at.useState)(null),[a,o]=(0,at.useState)(void 0);return(0,at.useEffect)((()=>{switch(o(void 0),n){case Vc.EL.INVITE:s((0,ct.jsx)(bP,{setContentLabel:o}));break;case Vc.EL.JOIN:if(!i)throw new Error("trying to open JoinModal without providing a joinToken!");s((0,ct.jsx)(tj,{joinToken:i,setContentLabel:o}));break;case Vc.EL.REDIRECT:if(!i)throw new Error("trying to open RedirectModal without providing a joinToken!");s((0,ct.jsx)(rj,{joinToken:i}));break;case Vc.EL.LEAVE_SESSION:case Vc.EL.END_SESSION:case Vc.EL.REMOVE_PARTICIPANT:case Vc.EL.SESSION_ENDED:case Vc.EL.MOBILE_ONLY:case Vc.EL.ERROR:s((0,ct.jsx)(TP,{isOpen:t,dialogType:n}));break;default:s(null)}}),[t,n,i]),n?(e=>e===Vc.EL.LEAVE_SESSION||e===Vc.EL.END_SESSION||e===Vc.EL.REMOVE_PARTICIPANT||e===Vc.EL.SESSION_ENDED||e===Vc.EL.MOBILE_ONLY||e===Vc.EL.ERROR)(n)?r:(0,ct.jsx)(Ga.A,{isOpen:t,onRequestClose:()=>e((0,et.cQ)()),shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,animated:!0,contentLabel:a,children:r}):null};class aj extends at.PureComponent{handleRequestClose(){this.props.closeModal()}render(){const{isOpen:e,closeModal:t}=this.props;return(0,ct.jsx)(Ft.x,{animated:!0,headingMessage:u.Ru.get("offline-error.device-limit-reached.header"),message:u.Ru.get("offline-error.device-limit-reached.message"),buttonLabel:u.Ru.get("close"),isOpen:e,onDismissDialog:t})}}const oj=(0,nt.Ng)((e=>({isOpen:e.ui.offlineDeviceLimitReachedDialog.isOpen})),(e=>({closeModal:()=>e((0,et.kC)())})))(aj);class lj extends at.PureComponent{constructor(e){super(e),this.handleRequestClose=this.handleRequestClose.bind(this),this.browserName=C().getParser(window.navigator.userAgent).getBrowserName()}handleRequestClose(){this.props.closeModal()}render(){const{isOpen:e,closeModal:t}=this.props;return(0,ct.jsx)(Ft.x,{headingMessage:u.Ru.get("fatal-error.header"),onDismissDialog:t,buttonLabel:u.Ru.get("close"),message:u.Ru.get("browser_upgrade_notice",this.browserName),isOpen:e})}}const cj=(0,nt.Ng)((e=>({isOpen:e.ui.playbackNotSupportedErrorDialog.isOpen})),(e=>({closeModal:()=>e((0,et.e$)())})))(lj);var uj=n(74841);const dj="CMgJZD0JMx_Yz1tlE7hd",mj="SVnAziPF2z_cgAGrp6He",pj="miG_SXrw265mkozdEHrJ",hj="RWLySPhsOTyK2EsAGUgx",gj="X_vuuyeQDD6IWI4aIE6k",fj="VdyeU78LKQdX8Dclnfxr",bj="Z12I3N4OnNvzRSNKOeUn",vj="IDHZCFcj1ynmYu6Sm5SR",yj="UmY163JiUcgJt2MKNyGW",_j="SYKOtPBDhPSs6zGwbk6A",Ej={[Og.E.XSMALL]:bj,[Og.E.SMALL]:bj,[Og.E.MEDIUM]:vj,[Og.E.LARGE]:yj,[Og.E.XLARGE]:yj},xj=({image:e,title:t,description:n,primaryButton:i,secondaryButton:r,renderExtraInfo:s,style:a,className:o,size:l=Og.E.SMALL})=>{const c="string"==typeof t?(0,ct.jsx)("h2",{className:hj,children:t}):(0,ct.jsx)("div",{className:hj,children:t});let u,d;return n&&(u="string"==typeof n?(0,ct.jsx)("p",{className:gj,children:n}):(0,ct.jsx)("div",{className:gj,children:n})),r&&(d=(0,ct.jsx)("div",{className:_j,children:r})),(0,ct.jsxs)("div",{className:gr()(`${mj} ${Ej[l]}`,o),style:a,"":"dialog-root",children:[e&&(0,ct.jsx)("div",{className:fj,children:(0,ct.jsx)(JT._,{loading:"lazy",src:e})}),(0,ct.jsxs)("div",{className:pj,children:[c,u,i,d,s&&s()]})]})};var Cj=n(19448),Sj=function(e){return e[e.SIGNUP=0]="SIGNUP",e[e.LOGIN=1]="LOGIN",e[e.DOWNLOAD=2]="DOWNLOAD",e}(Sj||{});const Aj=(0,at.memo)((function({image:e,mediaType:t,backgroundColor:n,onSignupClick:i,onLoginClick:r,onDownloadClick:s,downloadLink:a}){const o=e=>t=>{switch(t.preventDefault(),e){case Sj.DOWNLOAD:s&&s(),window.open(a,"_top","noopener");break;case Sj.SIGNUP:i&&i(),(0,Le.ie)();break;case Sj.LOGIN:r&&r(),(0,Le.PW)()}},l=(0,Gf.g)(),c="audio"===t?u.Ru.get("fta.wall.start-listening"):u.Ru.get("fta.wall.start-watching"),d=(0,ct.jsx)(br.$,{onClick:o(Sj.SIGNUP),children:u.Ru.get("mwp.cta.sign.up.free")}),m=!l&&a?(0,ct.jsx)(_x.n,{"":"upsell-download-app-button",onClick:o(Sj.DOWNLOAD),children:u.Ru.get("mwp.cta.download.app")}):void 0,p=(0,Pg.y)();return(0,ct.jsx)(xj,{image:e,title:c,primaryButton:d,secondaryButton:m,size:p,style:n?{backgroundColor:n}:{},renderExtraInfo:()=>(0,ct.jsxs)("p",{className:dj,onKeyDown:()=>o(Sj.LOGIN),role:"presentation",children:[(0,ct.jsx)(Cj.Z,{as:"span",variant:"mesto",children:u.Ru.get("already_have_account")}),(0,ct.jsx)(Cj.Z,{as:"a",href:"#",onClick:o(Sj.LOGIN),children:u.Ru.get("login")})]})})})),wj="anllJYN1jeYGGE1iAJUJ",Ij="YQRQdqiQ_iT0eo0owsJL",Tj="ftlV6Ixmq4wkKMg7hJ1v",Nj={[Og.E.SMALL]:0,[Og.E.MEDIUM]:600,[Og.E.LARGE]:1024},Rj=()=>{const e=(0,nj.mb)();return e.searchParams.set("referrer","dwp"),e},kj=({image:e,mediaType:t,backgroundColor:n,onClose:i})=>{const r=(0,$r.W)(),s=e=>()=>{r({intent:e,type:"click"})},{ref:a,breakpoint:o}=(0,jg.x)(Nj);return(0,at.useEffect)((()=>{const e=e=>{"Escape"===e.key&&(i(),r({intent:"close-upsell",type:"key-escape"}))};return r({intent:"open-upsell",type:"impression"}),window.addEventListener("keyup",e,!1),()=>window.removeEventListener("keyup",e)}),[r,i]),(0,ct.jsx)(Pg.o.Provider,{value:o,children:(0,ct.jsx)("div",{className:`dialog ${Tj}`,role:"presentation",ref:a,onClick:e=>{/dialog/.test(e.target.className)&&(r({intent:"close-upsell",type:"click",itemIdSuffix:"backdrop"}),i())},children:(0,ct.jsxs)("div",{className:wj,style:{backgroundColor:n},children:[(0,ct.jsx)(Aj,{image:e,mediaType:t,onDownloadClick:s("download-app"),onLoginClick:s("login"),onSignupClick:s("signup"),downloadLink:Rj().toString()}),(0,ct.jsx)("div",{className:Ij,children:(0,ct.jsx)(Xs.H,{onClick:()=>{r({intent:"close-upsell",type:"click",itemIdSuffix:"close-button"}),i()},children:u.Ru.get("close")})})]})})})},Oj=at.memo((function({uri:e}){const t=(0,nt.wA)(),n=(0,as.b)("images/focused_stroy_play.png"),[i,r]=(0,uj.h)(e,"#9BF0E1",n);return(0,ct.jsx)(Ps.pZ,{value:"signup-modal",children:(0,ct.jsx)(kj,{image:i,mediaType:(0,j.WB)(e??"")?"mixed":"audio",onClose:()=>{t((0,et.BU)())},backgroundColor:r})})}));var Pj=n(22259),jj=n(74275),Lj=n(63399);function Dj({children:e,ctaUrl:t,spec:n}){const i=(0,nt.wA)(),r=(0,ot.s)(),s=(0,at.useCallback)((()=>{i((0,et.us)()),r.logInteraction(n.consumptionCapModalFactory().topUpButtonFactory().hitUiHide())}),[i,r,n]),a=(0,at.useCallback)((()=>{r.logInteraction(n.consumptionCapModalFactory().topUpButtonFactory().hitNavigateToExternalUri({destination:t}))}),[t,r,n]);return t?(0,ct.jsx)(br.$,{as:"a",href:t,target:"_blank",colorSet:"invertedLight",iconTrailing:Nb.p,onClick:a,children:e}):(0,ct.jsx)(br.$,{colorSet:"invertedLight",onClick:s,children:e})}function Uj({children:e,onClick:t}){return e?(0,ct.jsx)(Xs.H,{onClick:t,semanticColor:"textSubdued",children:e}):null}const Mj="NxTiDyoRCvpiMZga0txl",Bj="uEd5tll92zN6mh4YiQ6E",Fj="YQEvA2GajE9nCaNVxwuq",Hj="F12mp8xs0gc5ri9361Ap",Vj=()=>{const e=(0,nt.wA)(),{spec:t,logger:n}=(0,Jr.r)(jj.M,{}),{consumptionCapExplanation:i,isOpen:r}=(0,nt.d4)((e=>e.ui.bookConsumptionCapModal)),s=(0,at.useCallback)((()=>{e((0,et.us)()),n.logInteraction(t.consumptionCapModalFactory().dismissButtonFactory().hitUiHide())}),[e,n,t]),a=(0,at.useCallback)((({data:t})=>{t.consumptionCapExplanation?e((0,et._3)(t.consumptionCapExplanation)):e((0,et.us)())}),[e]);return(0,Lj.V)({callback:a}),(0,ct.jsx)(Ga.A,{animated:!0,shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,onRequestClose:s,contentLabel:i.title,isOpen:r,children:(0,ct.jsxs)("div",{className:Mj,children:[(0,ct.jsx)(Pj._,{className:Bj,src:(0,as.b)("images/top-up.png"),alt:"",imageWidth:"200px",imageHeight:"196px"}),(0,ct.jsxs)("div",{className:Fj,children:[(0,ct.jsx)(fr.E,{as:"h2",variant:"titleMedium",semanticColor:"textBase",children:i.title}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",semanticColor:"textBase",children:i.body}),(0,ct.jsxs)("div",{className:Hj,children:[(0,ct.jsx)(Dj,{ctaUrl:i.ctaUrl,spec:t,children:i.cta}),(0,ct.jsx)(Uj,{onClick:s,children:i.dismiss})]})]})]})})},zj=["yellow184","brownYellow135","orange100","red100","pink100","violetPink100","solidWhite200","yellowGreen155","green135","greenBlue100","blue100","blueViolet75","violet100","solidBlack0"],Gj=zj.concat(["blue55","blue100","blue135","blueViolet135","blueViolet155","brownYellow100","brownYellow155","greenBlue55","greenBlue135","greenBlue155","orange55","orange155","pink55","pink100","pink135","pink155","red100","red155","violet55","violet100","violet155","yellowGreen100"]),{blue100:Wj,blue135:Kj,blue55:Yj,blueViolet135:qj,blueViolet155:Qj,brownYellow100:$j,brownYellow155:Zj,greenBlue135:Xj,greenBlue155:Jj,greenBlue55:eL,orange155:tL,orange55:nL,pink100:iL,pink135:rL,pink155:sL,pink55:aL,red100:oL,red155:lL,violet100:cL,violet155:uL,violet55:dL,yellowGreen100:mL}=Ab,pL=[[tL,iL,nL],[uL,Wj,aL],[Jj,Wj,eL],[sL,$j,Yj],[lL,oL,dL],[rL,Qj,$j],[rL,Zj,oL],[qj,Jj,mL],[Xj,sL,Wj],[Kj,lL,cL]],hL={uri:"",name:"",isExporting:!1,coverArtData:{gradientColors:pL[0],imageSrc:"",imageScale:1,text:"",fontSize:44}},gL=(0,at.createContext)({state:hL,setState:()=>{}}),fL=({uri:e,name:t,children:n})=>{const[i,r]=(0,at.useState)(hL);return(0,at.useEffect)((()=>{r((n=>({...n,coverArtData:{...n.coverArtData,text:t},uri:e,name:t})))}),[t,e]),(0,ct.jsx)(gL.Provider,{value:{state:i,setState:r},children:n})};function bL(){const{state:e,setState:t}=(0,at.useContext)(gL);return{state:e,setCoverArtData:(0,at.useCallback)((e=>{t((t=>({...t,coverArtData:{...t.coverArtData,...e}})))}),[t])}}const vL="FsIncm0KExVFifC75avn",yL=(e,t,n,i)=>void 0!==i?`rgba(${e},${t},${n},${i})`:`rgb(${e},${t},${n})`,_L=e=>[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)],EL=1280,xL=()=>{const{state:{coverArtData:e}}=(0,at.useContext)(gL),t=(0,at.useRef)(null);return(0,at.useEffect)((()=>{const n=t.current;if(n){const t=n.getContext("2d"),i=e.gradientColors.flatMap(_L);(()=>{const[e,n,r,s,a,o,l,c,u]=i,d=t.createLinearGradient(0,0,EL,0);d.addColorStop(0,yL(e,n,r)),d.addColorStop(1,yL(s,a,o)),t.fillStyle=d,t.fillRect(0,0,EL,EL);const m=t.createLinearGradient(0,0,0,EL);m.addColorStop(0,yL(l,c,u,0)),m.addColorStop(1,yL(l,c,u)),t.fillStyle=m,t.fillRect(0,0,EL,EL)})()}}),[e.gradientColors]),(0,ct.jsx)("canvas",{width:EL,height:EL,className:vL,ref:t,id:"cover-canvas"})},CL="TheSJUuheGZeuRIblJ_t",SL="FmYBYArX3c4Ygck_PkWy",AL="HKHBFC7Vb1LUnBHMcg4E",wL=()=>{const{state:{coverArtData:{imageSrc:e,imageScale:t}}}=(0,at.useContext)(gL),[n,i]=(0,at.useState)("fullHeight");return(0,at.useEffect)((()=>{if(!e)return;(async()=>{const t=await(n=e,new Promise(((e,t)=>{const i=new Image;i.onload=()=>e(i),i.onerror=e=>t(e),i.src=n})));var n;i((e=>e.width/e.height>1?"fullHeight":"fullWidth")(t))})()}),[e]),e?(0,ct.jsx)("div",{className:CL,children:(0,ct.jsx)("img",{src:e,alt:u.Ru.get("web-player.create-cover-art.image-alt"),className:gr()(SL,{[AL]:"fullWidth"===n}),style:{transform:`scale(${t})`},id:"cover-base-image"},e)}):null},IL="VJM2XyKYDKxuv8nIrA2H",TL="JKSXxot3Ajemt2eBpX2x",NL=()=>{const{state:{coverArtData:{text:e,fontSize:t}}}=(0,at.useContext)(gL);return(0,ct.jsx)("div",{className:IL,id:"text-container",children:(0,ct.jsx)(fr.E,{as:"p",className:TL,style:{fontSize:t,lineHeight:`${t}px`},children:e})})},RL="XX7i5Sor8cDePVmxLeUO",kL=()=>(0,ct.jsxs)("div",{className:RL,id:"cover-preview",children:[(0,ct.jsx)(xL,{}),(0,ct.jsx)(wL,{}),(0,ct.jsx)(NL,{})]});var OL=n(44239),PL=n(35906),jL=n(72746),LL=n(34959),DL=n(9869),UL=n(67429),ML=n(29159),BL=n(40221),FL=n(44527),HL=n(67105),VL=n(94683),zL=n(39907);const GL="kzLj8Z5C3S3a4X7_YteX",WL="wms9RlBu8gBBYUlJw6hg",KL=({backgroundColor:e,onClick:t,selected:n,...i})=>(0,ct.jsx)(Xs.H,{className:gr()(GL,{[WL]:n}),style:{backgroundColor:e},onClick:t,condensedAll:!0,...i}),YL="obTWUazUo_3PxUU4z5xw",qL=({onSelect:e})=>(0,ct.jsx)("div",{className:YL,"":"color-options",children:Object.values(zj).map((t=>(0,ct.jsx)(KL,{onClick:()=>e(Ab[t]),"aria-label":u.Ru.get("web-player.create-cover-art.gradient-color-add-color",t),backgroundColor:Ab[t]},t)))}),QL="bB8ILwbJ_V5cF8mfu7ft",$L=()=>{const{state:{coverArtData:{gradientColors:e}},setCoverArtData:t}=bL(),[n,i]=(0,at.useState)(0),[r,s]=(0,at.useState)(0);return(0,ct.jsxs)("div",{children:[(0,ct.jsxs)("div",{className:QL,children:[e.map(((e,t)=>{return(0,ct.jsx)(KL,{onClick:()=>i(t),"aria-label":u.Ru.get("web-player.create-cover-art.gradient-color-selection",(r=e,Gj.find((e=>{const t=Ab[e];return r===t})))),backgroundColor:e,selected:t===n},t);var r})),(0,ct.jsx)(Xs.H,{iconOnly:zL.H,"aria-label":u.Ru.get("web-player.create-cover-art.gradient-color-refresh-colors"),onClick:()=>{const e=(r+1)%pL.length;s(e),t({gradientColors:pL[e]})}})]}),(0,ct.jsx)(qL,{onSelect:i=>{const r=Object.assign([],e,{[n]:i});t({gradientColors:r})}})]})};var ZL=function(e){return e.CONTAINS_NEW_LINE="CONTAINS_NEW_LINE",e.CONTAINS_HTML="CONTAINS_HTML",e.SAVE_WARNING="SAVE_WARNING",e.OFFLINE_WARNING="OFFLINE_WARNING",e.FILE_TOO_BIG="FILE_TOO_BIG",e.IMAGE_TOO_SMALL="IMAGE_TOO_SMALL",e.IMAGE_FILE_UPLOAD_FAILED="IMAGE_FILE_UPLOAD_FAILED",e.NAME_REQUIRED="NAME_REQUIRED",e.UPDATE_DETAILS_FAILED="UPDATE_DETAILS_FAILED",e.IMAGE_INVALID_JPG="IMAGE_INVALID_JPG",e}(ZL||{});const XL={type:"info",code:ZL.CONTAINS_NEW_LINE,get message(){return u.Ru.get("playlist.edit-details.error.description-breaks")}},JL={type:"info",code:ZL.CONTAINS_HTML,get message(){return u.Ru.get("playlist.edit-details.error.invalid-html")}},eD={type:"info",code:ZL.SAVE_WARNING,get message(){return u.Ru.get("playlist.edit-details.error.unsaved-changes")}},tD={type:"info",code:ZL.OFFLINE_WARNING,get message(){return u.Ru.get("playlist.edit-details.error.no-internet")}},nD={type:"error",code:ZL.FILE_TOO_BIG,get message(){return u.Ru.get("playlist.edit-details.error.file-size-exceeded",10)}},iD={type:"error",code:ZL.IMAGE_TOO_SMALL,get message(){return u.Ru.get("playlist.edit-details.error.too-small",300,300)}},rD={type:"error",code:ZL.IMAGE_FILE_UPLOAD_FAILED,get message(){return u.Ru.get("playlist.edit-details.error.file-upload-failed")}},sD={type:"error",code:ZL.NAME_REQUIRED,get message(){return u.Ru.get("playlist.edit-details.error.missing-name")}},aD={type:"error",code:ZL.UPDATE_DETAILS_FAILED,get message(){return u.Ru.get("playlist.edit-details.error.failed-to-save")}},oD="jbPS9ioWM3oe1vjWNnj8",lD=()=>{const e=(0,at.useRef)(null),{state:{coverArtData:{imageSrc:t,imageScale:n}},setCoverArtData:i}=bL(),r=(0,at.useCallback)((e=>{const t=new FileReader;t.onload=e=>{const t=e?.target?.result;"string"==typeof t&&i({imageSrc:t})};const n=e.target.files||[];n[0]&&(n[0].size>10485760||t.readAsDataURL(n[0]),e.target.value="")}),[i]),s=(0,at.useCallback)((e=>{i({imageScale:2*e})}),[i]),a=(0,at.useCallback)((e=>{i({imageScale:e})}),[i]);return(0,ct.jsxs)("div",{className:oD,children:[(0,ct.jsx)("input",{ref:e,type:"file",onChange:r,hidden:!0,"":"image-file-picker-cover-art",accept:"image/png, image/jpeg"}),(0,ct.jsxs)("div",{children:[(0,ct.jsx)(_x.n,{onClick:()=>{e.current?.click()},children:t?u.Ru.get("web-player.create-cover-art.background-change.image"):u.Ru.get("web-player.create-cover-art.background-choose.image")}),t?(0,ct.jsx)(Xs.H,{iconOnly:nR.x,"aria-label":u.Ru.get("web-player.create-cover-art.background-remove.image"),onClick:()=>i({imageSrc:""})}):null]}),(0,ct.jsx)(fr.E,{as:"p",children:u.Ru.get("image-upload.legal-disclaimer")}),t?(0,ct.jsx)(Yr.z2,{labelText:u.Ru.get("web-player.create-cover-art.image-scale"),value:n,max:2,step:.1,onDragStart:s,onDragMove:s,onDragEnd:s,onStepBackward:()=>a(Math.max(0,n-.1)),onStepForward:()=>a(Math.min(2,n+.1))}):null]})};var cD=n(16732),uD=n(92895),dD=n(63134),mD=n(98249),pD=n(88402);const hD="SBd2XCrfeyZ8wrJcbeuB",gD="IV3J50cojLwJZd3TP63g",fD=[12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100],bD=()=>{const{state:{coverArtData:{text:e,fontSize:t}},setCoverArtData:n}=bL(),[i,r]=(0,at.useState)(!1);return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(OP.g,{label:u.Ru.get("web-player.create-cover-art.section-text"),children:(0,ct.jsx)(cD.h,{value:e,onChange:e=>{e.target instanceof HTMLTextAreaElement&&n({text:e.target.value})}})}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmallBold",paddingBottom:"var(--encore-spacing-tighter-2,8px)",children:u.Ru.get("web-player.create-cover-art.section-text-size")}),(0,ct.jsx)(uD.u,{onShow:()=>r(!0),onHide:()=>r(!1),className:hD,overlay:i&&(0,ct.jsx)(dD.Q,{onBlur:()=>r(!1),className:gD,children:fD.map((e=>(0,ct.jsx)(mD.Q,{as:"li",role:"option",onClick:()=>n({fontSize:e}),selected:e===t,"aria-selected":e===t,children:e},e)))}),children:(0,ct.jsx)(pD.m,{"aria-label":u.Ru.get("web-player.create-cover-art.section-text-size-selection",{fontSize:t}),children:t})})]})},vD="cIoamHeKI0rCEg1RyLKw",yD=({type:e,name:t,activeIcon:n,icon:i,content:r,onClick:s,isOpen:a})=>(0,ct.jsxs)(OL.A,{children:[(0,ct.jsx)(PL.J,{onClick:()=>s(e),isExpanded:a,children:(0,ct.jsx)(jL.v,{icon:a?n:i,children:(0,ct.jsx)(fr.E,{children:t})})},e),(0,ct.jsx)(LL.u,{isExpanded:a,children:r})]}),_D=()=>{const[e,t]=(0,at.useState)(""),n=(0,at.useCallback)((n=>{t(n===e?"":n)}),[e]);return(0,ct.jsxs)(DL.n,{className:vD,children:[(0,ct.jsx)(yD,{type:"Background",name:u.Ru.get("web-player.create-cover-art.section-background"),icon:UL.M,activeIcon:ML.M,content:(0,ct.jsx)($L,{}),onClick:n,isOpen:"Background"===e}),(0,ct.jsx)(yD,{type:"Image",name:u.Ru.get("web-player.create-cover-art.section-image"),icon:BL.Q,activeIcon:FL.Y,content:(0,ct.jsx)(lD,{}),onClick:n,isOpen:"Image"===e}),(0,ct.jsx)(yD,{type:"Text",name:u.Ru.get("web-player.create-cover-art.section-text"),icon:HL.A,activeIcon:VL.W,content:(0,ct.jsx)(bD,{}),onClick:n,isOpen:"Text"===e})]})};var ED=n(58452),xD=n(31151);const CD="chpnrv_mTqZjkPByUvsQ",SD=()=>{const{state:e}=(0,at.useContext)(gL),{handleOnSave:t}=(()=>{const{state:e}=(0,at.useContext)(gL),t=(0,nt.wA)(),{uploadImage:n,updateDetails:i}=(0,ED.x)(e.uri);return{handleOnSave:(0,at.useCallback)((async()=>{const r=document.getElementById("cover-preview"),s=document.getElementById("cover-canvas"),a=s?.cloneNode(!0);if(!(r&&s instanceof HTMLCanvasElement&&a instanceof HTMLCanvasElement))return;r.appendChild(a),a.style.zIndex="1";const o=a.getContext("2d");if(o?.drawImage(s,0,0),!o)return;const l=s.width/s.clientWidth,c=document.getElementById("cover-base-image");if(c instanceof HTMLImageElement){const e=c.getBoundingClientRect().width*l,t=c.getBoundingClientRect().height*l,n=e===a.width?0:(e-a.width)/2*-1,i=t===a.height?0:(t-a.height)/2*-1;o.drawImage(c,n,i,e,t)}const u=document.getElementById("text-container"),d=u?.children[0],m=u?.innerText;if(u instanceof HTMLElement&&d instanceof HTMLElement&&m){o.font=`${getComputedStyle(d).fontWeight}\n ${parseInt(getComputedStyle(d).fontSize,10)*l}px ${getComputedStyle(d).fontFamily}`,o.fillStyle=getComputedStyle(d).color,o.textBaseline="top",o.textAlign="left";const e=(d.getBoundingClientRect().x-u.getBoundingClientRect().x)*l,t=(d.getBoundingClientRect().y-u.getBoundingClientRect().y)*l;m.split("\n").forEach(((n,i)=>{o.fillText(n,e,t+i*parseInt(getComputedStyle(d).lineHeight,10)*l)}))}a.toBlob((async t=>{try{if(!t)return;const r=new File([t],"cover-art.png"),s=await(0,xD.j)(r),[a,o]=await(0,xD.v)(s),l={imageFile:r,imageDataUrl:s,imageWidth:a,imageHeight:o};try{const t=n(l.imageFile),r={name:e.name};r.imageUploadToken=await t,await i(r)}catch(e){}}catch(e){}})),t(qv.I3.actions.close())}),[t,e.name,i,n])}})(),n=(0,nt.wA)(),i=(0,at.useCallback)((()=>{n(qv.I3.actions.close())}),[n]);return(0,ct.jsxs)("div",{className:CD,children:[(0,ct.jsx)(Xs.H,{onClick:i,children:u.Ru.get("web-player.create-cover-art.cancel")}),(0,ct.jsx)(br.$,{onClick:t,disabled:e.isExporting,children:u.Ru.get("web-player.create-cover-art.save")})]})},AD="YFemDENgp3FhN7JLysrg",wD=()=>{const e=(0,nt.wA)(),t=(0,at.useCallback)((()=>{e(qv.I3.actions.close())}),[e]);return(0,ct.jsxs)("div",{className:AD,children:[(0,ct.jsx)(fr.E,{variant:"titleSmall",as:"h2",semanticColor:"textBase",children:u.Ru.get("web-player.create-cover-art.header-title")}),(0,ct.jsx)(Xs.H,{condensedAll:!0,onClick:t,iconOnly:co.M,"aria-label":u.Ru.get("web-player.create-cover-art.close")})]})},ID="lELkQYDlQ0e3m2N6c05j",TD="Yo8no9ytbGQi5874D2OY",ND=({uri:e,name:t})=>{const n=(0,nt.wA)(),i=(0,at.useCallback)((()=>{n(qv.I3.actions.close())}),[n]);return(0,ct.jsx)(Ga.A,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,isOpen:!0,onRequestClose:i,contentLabel:"Create cover art",children:(0,ct.jsx)(fL,{uri:e,name:t,children:(0,ct.jsxs)("div",{className:gr()(ID),children:[(0,ct.jsx)(wD,{}),(0,ct.jsxs)("div",{className:TD,children:[(0,ct.jsx)(kL,{}),(0,ct.jsx)(_D,{})]}),(0,ct.jsx)(SD,{})]})})})};var RD=n(48901);const kD=(0,at.lazy)((async()=>{const{DebugWindowContents:e}=await Promise.all([n.e(4151),n.e(5747),n.e(983)]).then(n.bind(n,31018));return{default:e}})),OD=()=>{const{handle:e,show:t}=(0,iv.j)();return(0,RD.x)(d.W.SHOW_DEBUG_WINDOW,(()=>{t()})),null!==e?(0,Ko.createPortal)((0,ct.jsx)(At.IF,{handle:e,children:(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(kD,{})})}),e.document.body):null};var PD=n(75439),jD=n(44894),LD=n(78885);const DD="search-modal-listbox",UD="TQb3mB9R6qGsxvPnCurA",MD="NG1F0VTHk73cEJ8TNfOn",BD="QWeCmvys_7VINTbfUmGB",FD=(0,at.memo)((function(e){const{value:t,onChange:n,onKeyPress:i,hasResults:r,activeResultId:s}=e;return(0,ct.jsxs)("div",{className:UD,children:[(0,ct.jsx)(Ck.C,{className:MD,"aria-hidden":!0}),(0,ct.jsx)(fr.E,{as:"input",variant:"bodyMedium",className:BD,value:t,onKeyDown:i,onChange:n,placeholder:u.Ru.get("web-player.search-modal.placeholder"),autoFocus:!0,role:"combobox","aria-expanded":r,"aria-controls":DD,"aria-owns":DD,"aria-activedescendant":s})]})})),HD={SearchModalInstructions:"NU8xwWC0RWBRh_PBJdJe",hidden:"KOpaRxg8Q8z9XEMKrRp4",key:"c4hmXDjs2Dv8n3VCLz1g"},VD=({canOpen:e,canPlay:t,canSelect:n})=>e||t||n?(0,ct.jsxs)("div",{className:HD.SearchModalInstructions,children:[(0,ct.jsx)(YD,{isActive:n,children:(0,ct.jsx)(zD,{})}),(0,ct.jsx)(YD,{isActive:e,children:(0,ct.jsx)(GD,{})}),(0,ct.jsx)(YD,{isActive:t,children:(0,ct.jsx)(WD,{})})]}):null;function zD(){return u.Ru.get("web-player.search-modal.instructions.navigate",{keys:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(KD,{children:"↑"}),(0,ct.jsx)(KD,{children:"↓"})]})})}function GD(){return u.Ru.get("web-player.search-modal.instructions.open",{keys:(0,ct.jsx)(KD,{children:"Enter"})})}function WD(){return u.Ru.get("web-player.search-modal.instructions.play",{keys:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(KD,{children:"Shift"}),(0,ct.jsx)(KD,{children:"Enter"})]})})}function KD({children:e}){return(0,ct.jsx)(fr.E,{as:"kbd",variant:"bodySmall",className:HD.key,semanticColor:"textBase",children:e})}function YD({children:e,isActive:t}){return(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",className:gr()({[HD.hidden]:!t}),children:e})}const qD=Spicetify.GraphQL.Definitions["searchModalResults"]=new Q.l("searchModalResults","query","34f48bca447d3420a9310ea259bfd4b89d2f7a3608c461d5c121d6232379fb22",null),QD=(0,at.memo)((function(e){const{query:t,onResults:n,numberOfResults:i}=e,r=(0,Yf.n)(),{data:s,error:a,loading:o}=(l={limit:i,numberOfTopResults:i,offset:0,searchTerm:t,includeAudiobooks:!0},c={gcTime:18e5,staleTime:3e5,enabled:t.trim().length>0&&r},(0,$.I)(qD,l,c));var l,c;return(0,at.useEffect)((()=>{const e=s?.searchV2?.topResultsV2?.itemsV2??[],i=[];for(let t=0;t<e.length;t++){const{item:n,matchedFields:r}=e[t];if("UnknownTypeWrapper"!==n.__typename&&"PreReleaseResponseWrapper"!==n.__typename&&n.data)switch(n.data.__typename){case"Genre":i.push({...n.data,uri:$D(n.data.uri),matchedFields:r});break;case"Album":case"Artist":case"Track":case"Playlist":case"User":case"Episode":case"Podcast":case"Audiobook":i.push({...n.data,matchedFields:r});break;case"NotFound":case"RestrictedContent":case"GenericError":break;default:(0,B.k)(n.data)}}n({query:t,error:!!a,loading:o,results:i})}),[s,a,o,n,t]),null}));function $D(e){return(0,j.o_)(e)?e:`spotify:genre:${e}`}var ZD=n(84387),XD=n(47263),JD=n(69494),eU=n(66956);const tU="XUU9nKfSDuNkadzFz_OQ",nU=({children:e})=>(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",className:tU,children:e}),iU=e=>`search-modal-result-${e}`,rU="ssvI7dCe2ZiLKChmS8tG",sU="mvQT8XMnLMFMikaUfHqO",aU="hEPIW_7QH4X3m4QrRPsP",oU="bFrnKMII6LDDL6NbaYnZ",lU="dJtLqNpbjiE4oggCyFSQ",cU="mx8mS84MYJW_9iHyXNJu",uU=e=>{const{position:t,uri:n,title:i,image:r,color:s,subtitle:a,isSelected:o,onClick:l,tag:c,label:u,menu:d}=e,m=(0,at.useRef)(null);(0,at.useEffect)((()=>{o&&m.current?.scrollIntoView({behavior:"auto",block:"nearest"})}),[o]);const{isActive:p}=(0,nd.l_)(n),h=(0,at.useCallback)((()=>{l({uri:n,position:t})}),[l,t,n]),g={"--position":t};return(0,ct.jsx)(pm.h,{menu:d,children:(0,ct.jsxs)(P_.Link,{ref:m,to:n,className:gr()(rU,{[sU]:o}),role:"option","aria-selected":o,onClick:h,id:iU(n),style:g,tabIndex:-1,children:[(0,ct.jsx)("span",{className:"hidden-visually",children:u}),(0,ct.jsx)("div",{className:oU,"aria-hidden":!0,children:(0,ct.jsx)(eU.M,{images:[{url:r,width:40,height:40}],color:s,isCircular:(0,j.ec)(n)})}),(0,ct.jsxs)("div",{className:lU,"aria-hidden":!0,children:[(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMedium",className:aU,semanticColor:p?"textBrightAccent":"textBase",children:i}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",className:aU,semanticColor:"textSubdued",children:a})]}),(0,ct.jsx)("div",{className:cU,"aria-hidden":!0,children:(0,ct.jsx)(nU,{children:c})})]})})},dU=e=>{const{results:t,onClick:n,selectedIndex:i}=e;return(0,ct.jsx)(ct.Fragment,{children:t.map(((e,t)=>(0,ct.jsx)(at.Fragment,{children:mU(e,t,n,i===t)},t)))})};function mU(e,t,n,i){switch(e.__typename){case"Album":{const r=e.artists.items.map((e=>e.profile.name)).join(u.Ru.getSeparator());return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.name,image:e.coverArt?.sources?.[0]?.url??"",color:(0,te.m)(e.coverArt?.extractedColors),subtitle:r,uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.album"),label:u.Ru.get("web-player.search-modal.a11y.contentbyartist",{item:e.name,creator:r,type:u.Ru.get("web-player.search-modal.result.album")}),menu:(0,ct.jsx)(ZD.h,{uri:e.uri})})}case"Artist":return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.profile.name,image:e.visuals.avatarImage?.sources?.[0]?.url??"",color:(0,te.m)(e.visuals.avatarImage?.extractedColors),subtitle:"",uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.artist"),label:u.Ru.get("web-player.search-modal.a11y.label",{item:e.profile.name,type:u.Ru.get("web-player.search-modal.result.artist")}),menu:(0,ct.jsx)(Fw.t,{uri:e.uri})});case"Track":{const r=e.artists.items.map((e=>e.profile.name)).join(u.Ru.getSeparator());let s=r;if(e.matchedFields.includes(ee.tC.Lyrics)){s=`${s} · ${u.Ru.get("web-player.search-modal.lyrics-match")}`}return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.name,image:e.albumOfTrack?.coverArt?.sources?.[0]?.url??"",color:(0,te.m)(e.albumOfTrack?.coverArt?.extractedColors),subtitle:s,uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.track"),label:u.Ru.get("web-player.search-modal.a11y.contentbyartist",{item:e.name,creator:r,type:u.Ru.get("web-player.search-modal.result.track")}),menu:(0,ct.jsx)(Vw.P,{uri:e.uri})})}case"Playlist":{const r="User"===e.ownerV2.data?.__typename?e.ownerV2.data.name:"",s=e.images.items.find((e=>e.sources));return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.name,image:s?.sources?.[0].url??"",color:(0,te.m)(s?.extractedColors),subtitle:r,uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.playlist"),label:u.Ru.get("web-player.search-modal.a11y.contentbyartist",{item:e.name,creator:r,type:u.Ru.get("web-player.search-modal.result.playlist")}),menu:(0,ct.jsx)(JD.W,{uri:e.uri})})}case"User":return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.name,image:e.avatar?.sources?.[0]?.url??"",color:(0,te.m)(e.avatar?.extractedColors),subtitle:"",uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.user"),label:u.Ru.get("web-player.search-modal.a11y.label",{item:e.name,type:u.Ru.get("web-player.search-modal.result.user")}),menu:(0,ct.jsx)(IA.B,{uri:e.uri})});case"Genre":return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.name,image:e.image?.sources?.[0]?.url??"",color:(0,te.m)(e.image?.extractedColors),subtitle:"",uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.genre"),label:u.Ru.get("web-player.search-modal.a11y.label",{item:e.name,type:u.Ru.get("web-player.search-modal.result.genre")}),menu:(0,ct.jsx)(XD.h,{uri:e.uri})});case"Episode":{const r="Podcast"===e.podcastV2.data.__typename&&e.podcastV2.data.name||void 0,s=[e.releaseDate?.isoString?u.Ru.formatDate(new Date(e.releaseDate.isoString)):void 0,r].filter(Boolean).join(" • "),a=r?u.Ru.get("web-player.search-modal.a11y.contentbyartist",{item:e.name,creator:r,type:u.Ru.get("web-player.search-modal.result.episode")}):e.name;return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.name,image:e.coverArt?.sources?.[0]?.url??"",color:(0,te.m)(e.coverArt?.extractedColors),subtitle:s,uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.episode"),label:a,menu:(0,ct.jsx)(N_.b,{uri:e.uri})})}case"Podcast":return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.name,image:e.coverArt?.sources?.[0]?.url??"",color:(0,te.m)(e.coverArt?.extractedColors),subtitle:e.publisher?.name??"",uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.podcast"),label:u.Ru.get("web-player.search-modal.a11y.label",{item:e.name,type:u.Ru.get("web-player.search-modal.result.podcast")}),menu:(0,ct.jsx)(Nx.H,{uri:e.uri})});case"Audiobook":return(0,ct.jsx)(uU,{isSelected:i,position:t,onClick:n,title:e.name,image:e.coverArt?.sources?.[0]?.url??"",color:(0,te.m)(e.coverArt?.extractedColors),subtitle:e.publisher?.name??"",uri:e.uri,tag:u.Ru.get("web-player.search-modal.result.audiobook"),label:u.Ru.get("web-player.search-modal.a11y.label",{item:e.name,type:u.Ru.get("web-player.search-modal.result.audiobook")}),menu:(0,ct.jsx)(Iw.p,{uri:e.uri})});default:return(0,B.d)(e)}}const pU="N9tnwm0XDrt_eGJd2D2A",hU="zZMsUUWG29PYcwWPXhOV",gU="_kfmGT75UTPoF_D2afwa",fU="SUOB9gChfkiToLTPl9Bc",bU="Bn7PjpLWU6TcPCoeP98S",vU="QVqrI1qDRcHQgBn2uuWd",yU="mXdNvIO9PYnBFoyoMyUO",_U="Xf30G8NSPQ3pex0iD4zB",EU="ixdB7tx1aniI9zfMECIi",xU={modal:{base:yU,afterOpen:_U,beforeClose:EU},overlay:{base:yU,afterOpen:_U,beforeClose:EU}},CU=()=>{const e=(0,cn.Zp)(),t=(0,LD.Nf)(),{spec:n,logger:i,UBIFragment:r}=(0,Jr.r)(jD.I,{}),s=(0,Iu.t)(n),[a,o]=(0,at.useState)(""),[l,c]=(0,at.useState)([]),[d,m]=(0,at.useState)(0),[p,h]=(0,at.useState)(!1),g=!(0,Yf.n)(),f=(0,at.useMemo)((()=>(0,j.o_)(a,{parseUnknown:!0})),[a]),b=f&&f.type!==j.NQ.AD,v=(0,at.useCallback)((e=>{const t=e.target.value;t!==a&&(o(t),m(0),i.logInteraction(n.inputFactory().keyStrokeChangeSearchQuery({searchQueryString:t})))}),[i,a,n]),y=(0,at.useCallback)((()=>{o(""),t({type:"CLOSE"})}),[t]),_=(0,at.useCallback)((({uri:e,position:t})=>{i.logInteraction(n.searchResultFactory({position:t}).hitUiNavigate({destination:e})),y()}),[y,i,n]),E=(0,zt.K)(),x=(0,at.useCallback)((t=>{const n=t.key;if("ArrowUp"===n)m((e=>Math.max(e-1,0))),t.preventDefault();else if("ArrowDown"===n)m((e=>Math.min(e+1,l.length-1))),t.preventDefault();else if("Enter"===n){if(b)return e(f.toURLPath(!0)),void y();const n=l[d];if(n){const i=(0,j.o_)(n.uri);if(t.shiftKey)AU(i?.type)&&E.play({uri:n.uri},{featureIdentifier:"quick_search",referrerIdentifier:"PlayerStub_UnknownReferrer"});else{const t=i?.toURLPath(!0);t&&(e(t),_({uri:n.uri,position:d}))}}t.preventDefault()}}),[b,y,_,e,E,f,l,d]),C=(0,at.useCallback)((e=>{h(e.loading),e.query===a&&c(e.results)}),[a]),S=l.length>0,A=l[d],w=A?iU(A.uri):void 0,I=(0,j.o_)(A?.uri),T=AU(I?.type);return(0,ct.jsxs)(r,{spec:n,children:[(0,ct.jsx)(QD,{query:b?"":a,numberOfResults:30,onResults:C}),(0,ct.jsxs)("div",{className:pU,ref:s,children:[(0,ct.jsx)("div",{className:gr()(hU,{[gU]:l.length}),children:(0,ct.jsx)(FD,{value:a,onChange:v,onKeyPress:x,hasResults:S,activeResultId:w})}),(0,ct.jsx)(VD,{canSelect:S&&!b,canPlay:T,canOpen:S||!!b}),a&&!b&&S&&(0,ct.jsx)("div",{className:fU,id:DD,role:"listbox",children:(0,ct.jsx)(dU,{results:l,onClick:_,selectedIndex:d})}),!p&&a&&!S&&(0,ct.jsxs)("div",{className:bU,onClick:y,children:[(0,ct.jsx)(fr.E,{className:vU,as:"h1",variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("search.empty-results-title",a)}),g&&(0,ct.jsx)(fr.E,{as:"p",semanticColor:"textBase",children:u.Ru.get("web-player.search-modal.offline")})]})]})]})},SU=()=>{const{isOpen:e}=(0,LD.Qc)(),t=(0,LD.Nf)(),n=(0,at.useCallback)((()=>{t({type:"CLOSE"})}),[t]);return e?(0,ct.jsx)(Ga.A,{contentLabel:u.Ru.get("web-player.search-modal.title"),isOpen:e,onRequestClose:n,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,animation:xU,children:(0,ct.jsx)(CU,{})}):null};function AU(e){switch(e){case"album":case"artist":case"track":case"playlist":case"playlist-v2":case"episode":case"show":return!0;default:return!1}}const wU=()=>{const e=(0,nt.wA)(),{isOpen:t}=(0,nt.d4)((e=>e.ui.personalizedRecommendationsErrorModal));return(0,ct.jsx)(Ft.x,{headingMessage:u.Ru.get("error-dialog.generic.header"),message:u.Ru.get("web-player.settings.personalized-recommendations.error-modal-message"),buttonLabel:u.Ru.get("web-player.settings.personalized-recommendations.error-modal-button"),onDismissDialog:()=>{e(qv.bL.actions.close())},animated:!0,isOpen:t})};var IU=n(610);const TU="t1hN4Ju87afc5N5fDTnm",NU="kq4vSktBwa0pcc1zklAo",RU="KSUTPJtu2PnuTb_RoGQX",kU=({onClose:e,handleRemove:t,primaryButtonText:n,secondaryButtonText:i,primaryButtonLabel:r=n})=>(0,ct.jsxs)("div",{className:RU,children:[(0,ct.jsx)(Xs.H,{onClick:e,semanticColor:"textSubdued","aria-label":"Cancel",children:i}),(0,ct.jsx)(br.$,{"aria-label":r,autofocus:"true",onClick:t,children:n})]}),OU=({onClose:e,primaryButtonText:t,secondaryButtonText:n})=>(0,ct.jsxs)("div",{className:RU,children:[(0,ct.jsx)(Xs.H,{onClick:e,semanticColor:"textSubdued",as:"a",href:vr.nw,children:n}),(0,ct.jsx)(br.$,{autofocus:"true",onClick:e,children:t})]}),PU=()=>{const e=(0,nt.wA)(),{enqueueSnackbar:t}=(0,Sh.d)(),n=(0,vi.Q)(),[i,r]=(0,at.useState)(null),s=(0,at.useCallback)((()=>{e((0,et.MB)())}),[e]),a=(0,at.useCallback)((async()=>{try{await n.removeAllDownloads(),s(),t(u.Ru.get("desktop.settings.storage.downloads.success"))}catch(e){r(e instanceof Error?e:new Error("Error when deleting all downloads."))}}),[n,s,t]);return(0,ct.jsx)(IU.M,{animated:!0,className:NU,onRequestClose:s,"aria-describedby":"remove-downloads-dialog-heading",isOpen:!0,children:(0,ct.jsxs)("div",{className:gr()("encore-light-theme",TU),children:[(0,ct.jsx)(fr.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase","aria-live":"polite",id:"remove-downloads-dialog-heading",children:i?u.Ru.get("error.generic"):u.Ru.get("desktop.settings.storage.downloads.dialog.heading")}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",paddingBottom:k_.CD,semanticColor:"textSubdued","aria-live":"polite",children:i?u.Ru.get("desktop.settings.storage.downloads.dialog.error"):u.Ru.get("desktop.settings.storage.downloads.dialog.text")}),i?(0,ct.jsx)(OU,{onClose:s,primaryButtonText:u.Ru.get("desktop.settings.storage.close"),secondaryButtonText:u.Ru.get("desktop.settings.storage.help")}):(0,ct.jsx)(kU,{onClose:s,handleRemove:a,primaryButtonLabel:u.Ru.get("desktop.settings.storage.downloads.button"),primaryButtonText:u.Ru.get("desktop.settings.storage.downloads.remove"),secondaryButtonText:u.Ru.get("desktop.settings.storage.cancel")})]})})},jU=()=>{const e=(0,nt.wA)(),{enqueueSnackbar:t}=(0,Sh.d)(),n=(0,vi.Q)(),[i,r]=(0,at.useState)(null),s=(0,at.useCallback)((()=>{e((0,et.QK)())}),[e]),a=(0,at.useCallback)((async()=>{try{await n.removeCache(),s(),t(u.Ru.get("desktop.settings.storage.cache.success"))}catch(e){r(e instanceof Error?e:new Error("Error when clearing cache."))}}),[t,n,s]);return(0,ct.jsx)(IU.M,{animated:!0,className:NU,onRequestClose:s,"aria-describedby":"clear-cache-dialog-heading",isOpen:!0,children:(0,ct.jsxs)("div",{className:gr()("encore-light-theme",TU),children:[(0,ct.jsx)(fr.E,{id:"clear-cache-dialog-heading",as:"h2",variant:"titleSmall",semanticColor:"textBase","aria-live":"polite",children:i?u.Ru.get("error.generic"):u.Ru.get("desktop.settings.storage.cache.dialog.heading")}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",paddingBottom:k_.CD,semanticColor:"textSubdued","aria-live":"polite",children:i?u.Ru.get("desktop.settings.storage.cache.dialog.error"):u.Ru.get("desktop.settings.storage.cache.dialog.text")}),i?(0,ct.jsx)(OU,{onClose:s,primaryButtonText:u.Ru.get("desktop.settings.storage.close"),secondaryButtonText:u.Ru.get("desktop.settings.storage.help")}):(0,ct.jsx)(kU,{onClose:s,handleRemove:a,primaryButtonText:u.Ru.get("desktop.settings.storage.cache.button"),secondaryButtonText:u.Ru.get("desktop.settings.storage.cancel")})]})})};var LU=n(17900);const DU="KmvydY9aOuhL7pSuUhCP",UU="yfp_lJM0XpzDc1TJz6Qc",MU="rqMR6HWbOuHuIQEMFrRv",BU=()=>{const e=(0,nt.wA)(),{isOpen:t}=(0,nt.d4)((e=>e.ui.introducingSmartShuffleModal)),n=()=>{e(qv.cI.actions.close())};return(0,ct.jsx)(Ga.A,{isOpen:t,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:n,contentLabel:u.Ru.get("web-player.smart-shuffle.introduction-modal-title"),overlayClassName:MU,children:(0,ct.jsxs)("div",{className:DU,children:[(0,ct.jsx)(LU.k,{size:"xxlarge",semanticColor:"textBrightAccent"}),(0,ct.jsxs)("div",{className:UU,children:[(0,ct.jsx)(fr.E,{variant:"titleMedium",semanticColor:"textBase",children:u.Ru.get("web-player.smart-shuffle.introduction-modal-title")}),(0,ct.jsx)(fr.E,{variant:"bodyMedium",semanticColor:"textBase",children:u.Ru.get("web-player.smart-shuffle.introduction-modal-description")})]}),(0,ct.jsx)(br.$,{onClick:n,children:u.Ru.get("web-player.smart-shuffle.introduction-modal-ok-button")})]})})};var FU=n(96217),HU=n(90129);var VU=n(8819);const zU={get DEFAULT_PLAYBACK_STUCK(){return u.Ru.get("feedback.cant-play-track")},get FORCED_OFFLINE_MODE(){return u.Ru.get("feedback.track-not-available-forced-offline")},get CANT_OFFLINE_SYNC_PLAYLIST_IN_OFFLINE_MODE(){return u.Ru.get("feedback.cant-offline-sync-playlist-in-offline-mode")},get ARTIST_BANNED_BY_USER(){return u.Ru.get("feedback.artist-banned-by-user")},get TRACK_BANNED_BY_USER(){return u.Ru.get("feedback.track-banned-by-user")},get REGION_RESTRICTED(){return u.Ru.get("feedback.track-not-available-in-region")},get DEFAULT_PLAYER_ERROR(){return u.Ru.get("feedback.track-not-available")},get NETWORK_ERROR(){return u.Ru.get("feedback.video-playback-network-error")},get PREMIUM_RESTRICTED(){return u.Ru.get("feedback.track-exclusive-premium")},get CANT_SKIP_ADS(){return u.Ru.get("feedback.cant-skip-ads")},get CANT_PLAY_DURING_ADS(){return u.Ru.get("feedback.cant-play-during-ads")},get SKIP_ADS_TO_HEAR_SONG(){return u.Ru.get("feedback.skip-ads-to-hear-song")},get SKIP_AFTER_DELAY(){return u.Ru.get("feedback.skip-ads-after-delay")},get CAPPING_REACHED(){return u.Ru.get("capping.upsell-title")},get VIDEO_GEORESTRICTED(){return u.Ru.get("feedback.video-georestricted")},get VIDEO_UNSUPPORTED_CLIENT_VERSION(){return u.Ru.get("feedback.video-unsupported-client-version")},get VIDEO_UNSUPPORTED_PLATFORM_VERSION(){return u.Ru.get("feedback.video-unsupported-platform-version")},get VIDEO_COUNTRY_RESTRICTED(){return u.Ru.get("feedback.video-country-restricted")},get VIDEO_UNAVAILABLE(){return u.Ru.get("feedback.video-unavailable")},get VIDEO_CATALOGUE_RESTRICTED(){return u.Ru.get("feedback.video-catalogue-restricted")},get VIDEO_PLAYBACK_ERROR(){return u.Ru.get("feedback.video-playback-error")},get VIDEO_UNSUPPORTED_KEY_SYSTEM(){return u.Ru.get("feedback.video-unsupported-key-system")},get EXPLICIT_CONTENT_FILTERED(){return u.Ru.get("feedback.explicit-content-filtered")},get INTERRUPT_PLAYBACK_RESTRICTED(){return u.Ru.get("feedback.play-after-ad")}};function GU(e){const t=e?.item??void 0;return(0,qt.N)(t)&&t.isSkippableAd}function WU(e,t){switch(t.code){case F.Z9.PLAYBACK_STUCK:return zU.DEFAULT_PLAYBACK_STUCK;case F.Z9.ONE_TRACK_UNPLAYABLE:case F.Z9.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED:case F.Z9.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED:return(n=t.reasons).includes(F.K7.NOT_AVAILABLE_IN_CURRENT_REGION)?zU.REGION_RESTRICTED:n.includes(F.K7.NOT_AVAILABLE_IN_NON_PREMIUM)?zU.PREMIUM_RESTRICTED:n.includes(F.K7.NOT_AVAILABLE_OFFLINE)?zU.FORCED_OFFLINE_MODE:n.includes(F.K7.USER_CAPPING_REACHED)?zU.CAPPING_REACHED:n.includes(F.K7.BANNED_BY_USER_ARTIST)?zU.ARTIST_BANNED_BY_USER:n.includes(F.K7.BANNED_BY_USER_TRACK)?zU.TRACK_BANNED_BY_USER:n.includes(F.K7.EXPLICIT_CONTENT_FILTERED)?zU.EXPLICIT_CONTENT_FILTERED:zU.DEFAULT_PLAYER_ERROR;case F.Z9.INTERRUPT_PLAYBACK_RESTRICTED:return zU.INTERRUPT_PLAYBACK_RESTRICTED;case F.Z9.VIDEO_GEORESTRICTED:return zU.VIDEO_GEORESTRICTED;case F.Z9.VIDEO_UNSUPPORTED_CLIENT_VERSION:return zU.VIDEO_UNSUPPORTED_CLIENT_VERSION;case F.Z9.VIDEO_UNSUPPORTED_PLATFORM_VERSION:return zU.VIDEO_UNSUPPORTED_PLATFORM_VERSION;case F.Z9.VIDEO_COUNTRY_RESTRICTED:return zU.VIDEO_COUNTRY_RESTRICTED;case F.Z9.VIDEO_UNAVAILABLE:return zU.VIDEO_UNAVAILABLE;case F.Z9.VIDEO_CATALOGUE_RESTRICTED:return zU.VIDEO_CATALOGUE_RESTRICTED;case F.Z9.VIDEO_PLAYBACK_ERROR:return zU.VIDEO_PLAYBACK_ERROR;case F.Z9.VIDEO_UNSUPPORTED_KEY_SYSTEM:return zU.VIDEO_UNSUPPORTED_KEY_SYSTEM;case F.Z9.PAUSE_RESTRICTED:return t.reasons.some((e=>[F.K7.ALREADY_PAUSED,F.K7.NOT_PLAYING_LOCALLY].includes(e)))?null:zU.DEFAULT_PLAYER_ERROR;case F.Z9.RESUME_RESTRICTED:return t.reasons.includes(F.K7.NOT_PAUSED)?null:zU.DEFAULT_PLAYER_ERROR;case F.Z9.PLAY_RESTRICTED:return t.reasons.includes(F.K7.AD_DISALLOW)?GU(e)?zU.SKIP_ADS_TO_HEAR_SONG:zU.CANT_SKIP_ADS:null;case F.Z9.SKIP_TO_NEXT_RESTRICTED:return t.reasons.includes(F.K7.AD_DISALLOW)?GU(e)?zU.SKIP_AFTER_DELAY:zU.CANT_PLAY_DURING_ADS:null;case F.Z9.TIMEOUT:return zU.NETWORK_ERROR;case F.Z9.SKIP_TO_PREV_RESTRICTED:return t.reasons.includes(F.K7.THROTTLED)?null:zU.DEFAULT_PLAYER_ERROR;default:return zU.DEFAULT_PLAYER_ERROR}var n}var KU=n(53896),YU=n(3976),qU=n(5405);const QU=()=>(function(){const e=(0,zt.K)(),{currentSession:t}=(0,oc.D)(),{enqueueSnackbar:n}=(0,Sh.d)();(0,Yt.p)(P.gd.ERROR,(({data:i})=>{const r=e.getState(),s=WU(r,i);null!==s&&(t?.active&&i.code===F.Z9.STOP_RESTRICTED||(0,Qt.d)(r?.item??void 0)||n(s))}))}(),function(){const{enqueueSnackbar:e}=(0,Sh.d)(),t=(0,Yf.n)();(0,Yt.p)(P.gd.QUEUE_ACTION_COMPLETE,(({data:n})=>{n.action===P.UC.ADD&&(n.error?t?(dn("feedback_banner","error","error.generic"),e(u.Ru.get("error.generic"))):e(u.Ru.get("offline.feedback-text")):e(u.Ru.get("queue.added-to-queue")))}))}(),function(){const{enqueueSnackbar:e}=(0,Sh.d)(),t=(0,HU.W)(),n=(0,at.useContext)(wi.w),i=(0,Yf.n)();(0,FU.e)(J.Lj.OPERATION_COMPLETE,(async({data:r})=>{if(r.operation===J.sP.ADD&&!r.silent)if(r.error)i?(dn("feedback_banner","error","error.generic"),e(u.Ru.get("error.generic"))):e(u.Ru.get("offline.feedback-text"));else try{const{name:e,images:i}=await n.getMetadata(r.uri),s=(0,iC.g)(i,{desiredSize:24});t({message:u.Ru.get("feedback.added-to-playlist-specific",e),imageSrc:s?.url})}catch{e(u.Ru.get("feedback.added-to-playlist-generic"))}}))}(),function(){const e=(0,Ai.a)().getEvents(),t=(0,Yf.n)(),{enqueueSnackbar:n}=(0,Sh.d)(),i=(0,nt.d4)((e=>e.session?.user?.id));(0,at.useEffect)((()=>{const r=({data:e})=>{let r;if(e.error)t?(dn("feedback_banner","error","error.generic"),n(u.Ru.get("error.generic"))):n(u.Ru.get("offline.feedback-text"));else switch(e.operation){case he.mA.SET_BASE_PERMISSION:return r="VIEWER"===e.permissionLevel?u.Ru.get("feedback.playlist-made-public"):u.Ru.get("feedback.playlist-made-private"),void n(r);case he.mA.SET_MEMBER_PERMISSION:return r="VIEWER"===e.permissionLevel?u.Ru.get("feedback.member-made-listener"):u.Ru.get("feedback.member-made-contributor"),void n(r);case he.mA.REMOVE_MEMBER:return r=i===e.username?u.Ru.get("feedback.left-playlist"):u.Ru.get("feedback.removed-member"),void n(r)}};return e.addListener(he.GV.OPERATION_COMPLETE,r),()=>{e.removeListener(he.GV.OPERATION_COMPLETE,r)}}),[i,n,t,e])}(),function(){const e=(0,at.useContext)(Ti.S).getEvents(),t=(0,Yf.n)(),{enqueueSnackbar:n}=(0,Sh.d)();(0,at.useEffect)((()=>{const i=({data:e})=>{if(!e.silent)if(e.error)t?(dn("feedback_banner","error","error.generic"),n(u.Ru.get("error.generic"))):n(u.Ru.get("offline.feedback-text"));else switch(e.operation){case ge.ut.ADD:return void n(u.Ru.get("web-player.aligned-curation.feedback.added-to-library"));case ge.ut.REMOVE:return void n(u.Ru.get("web-player.aligned-curation.feedback.removed-from-library"));case ge.ut.MOVE:return void(e.showAddConfirmation&&n(u.Ru.get("web-player.aligned-curation.feedback.added-to-library")))}};return e.addListener(ge.tD.OPERATION_COMPLETE,i),()=>{e.removeListener(ge.tD.OPERATION_COMPLETE,i)}}),[n,t,e])}(),function(){const{enqueueSnackbar:e}=(0,Sh.d)(),t=(0,HU.W)(),n=(0,Yf.n)();(0,VU.l)(X.UV.OPERATION_COMPLETE,(async i=>{if(i.data.silent)return;if(i.data.error)return void(n?(dn("feedback_banner","error","error.generic"),e(u.Ru.get("error.generic"))):e(u.Ru.get("offline.feedback-text")));const[r]=i.data.uris,s=(0,j.o_)(r)?.type;if(s!==j.NQ.TRACK&&s!==j.NQ.LOCAL_TRACK)if(s!==j.NQ.EPISODE)e(i.data.operation===X.tS.ADD?u.Ru.get("web-player.aligned-curation.feedback.added-to-library"):u.Ru.get("web-player.aligned-curation.feedback.removed-from-library"));else{const e=(0,da.dB)();if(!e)return;const n=i.data.operation===X.tS.ADD?u.Ru.get("web-player.aligned-curation.feedback.added",e.name):u.Ru.get("web-player.aligned-curation.feedback.removed",e.name);t({message:n,imageSrc:(0,iC.g)(e.images,{desiredSize:24})?.url})}else{const e=(0,da.zK)();if(!e)return;const n=i.data.operation===X.tS.ADD?u.Ru.get("web-player.aligned-curation.feedback.added",e.name):u.Ru.get("web-player.aligned-curation.feedback.removed",e.name);t({message:n,imageSrc:(0,iC.g)(e.images,{desiredSize:24})?.url})}}))}(),function(){const e=(0,Rn.l)(),{enqueueSnackbar:t}=(0,Sh.d)();(0,at.useEffect)((()=>{const n=e.getEvents(),i=({data:e})=>{"client"===e.source&&"ignoreinrecs"===e.set&&t(u.Ru.get("feedback.exclude-playlist-from-recommendations"))},r=({data:e})=>{"client"===e.source&&"ignoreinrecs"===e.set&&t(u.Ru.get("feedback.include-playlist-in-recommendations"))};return n.addListener(y.ar.ADDED,i),n.addListener(y.ar.REMOVED,r),()=>{n.removeListener(y.ar.ADDED,i),n.removeListener(y.ar.REMOVED,r)}}),[t,e])}(),(()=>{const{currentSession:e}=(0,oc.D)(),{enqueueSnackbar:t}=(0,Sh.d)(),n=(0,at.useRef)([]),i=(0,at.useRef)([]),r=(0,Ra.YQ)((e=>{if(e.isSessionOwner){switch(n.current.length){case 0:break;case 1:t(u.Ru.get("web-player.social-connect.toast.one-person-joined",{user:n.current[0]??""})),n.current=[];break;case 2:t(u.Ru.get("web-player.social-connect.toast.two-people-joined",{firstUser:n.current[0]??"",secondUser:n.current[1]??""})),n.current=[];break;default:t(u.Ru.get("web-player.social-connect.toast.multiple-people-joined",{user:n.current[n.current.length-1]??"",userCount:n.current.length-1})),n.current=[]}switch(i.current.length){case 0:break;case 1:t(u.Ru.get("web-player.social-connect.toast.one-person-left",{user:i.current[0]??""})),i.current=[];break;case 2:t(u.Ru.get("web-player.social-connect.toast.two-people-left",{firstUser:i.current[0]??"",secondUser:i.current[1]??""})),i.current=[];break;default:t(u.Ru.get("web-player.social-connect.toast.multiple-people-left",{user:i.current[i.current.length-1]??"",userCount:i.current.length-1})),i.current=[]}}}),3e3,{leading:!0,trailing:!0}),s=(0,at.useCallback)((({data:e})=>{null===e.isSessionOwner||e.isSessionOwner||t(u.Ru.get("web-player.social-connect.toast.ended",{user:e.hostDisplayName??""}))}),[t]),a=(0,at.useCallback)((({data:e})=>{n.current=e.users?[...n.current,...e.users]:n.current,r(e)}),[r]),o=(0,at.useCallback)((({data:e})=>{i.current=e.users?[...i.current,...e.users]:i.current,r(e)}),[r]),l=(0,at.useCallback)((({data:n})=>{e&&(e?.queueOnlyMode!==n?.queueOnlyMode&&(!1===n?.queueOnlyMode?t(e.isSessionOwner?u.Ru.get("web-player.social-connect.toast.queue-only-mode.host.disabled"):u.Ru.get("web-player.social-connect.toast.queue-only-mode.guest.disabled")):!0===n?.queueOnlyMode&&t(e.isSessionOwner?u.Ru.get("web-player.social-connect.toast.queue-only-mode.host.enabled"):u.Ru.get("web-player.social-connect.toast.queue-only-mode.guest.enabled"))),e?.participantVolumeControl!==n?.participantVolumeControl&&("ENABLED"===n?.participantVolumeControl?t(u.Ru.get("web-player.social-connect.toast.participant-volume-control.enabled")):"DISABLED"===n?.participantVolumeControl&&t(e.isSessionOwner?u.Ru.get("web-player.social-connect.toast.participant-volume-control.host.disabled"):u.Ru.get("web-player.social-connect.toast.participant-volume-control.guest.disabled"))))}),[e,t]),c=(0,at.useCallback)((({data:e})=>{e===qU.RG.PERMISSIONS_RESTRICTED_GENERIC&&t(u.Ru.get("web-player.social-connect.toast.queue-only-mode.guest.warning"))}),[t]);(0,YU.J)(KU.K.SESSION_ENDED,s),(0,YU.J)(KU.K.JOINED,a),(0,YU.J)(KU.K.LEFT,o),(0,YU.J)(KU.K.UPDATE,l),(0,YU.J)(KU.K.SESSION_MESSAGE,c)})(),null);function $U(e,t){if(e){const n=(0,j.o_)(e,{parseUnknown:!0});if(n){t(n.toURLPath(!0))}else{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()}}}const ZU=(e,t)=>n=>{switch(n.action){case"DISMISS":default:return void e();case"URL":{const{url:i=""}=n;return $U(i,t),void e()}case"EXTERNAL_URL":{const{url:e=""}=n;return void $U(e,t)}}};var XU=n(54480),JU=n(99047),eM=n(98555),tM=n(10075);function nM(e){return"/"===e?"spotify:home":/^\/collection/.test(e)?"spotify:collection":/^\/artist/.test(e)?e.replace("/artist/","spotify:artist:"):/^\/album/.test(e)?e.replace("/album/","spotify:album:"):/^\/playlist/.test(e)?e.replace("/playlist/","spotify:playlist:"):/^\/genre/.test(e)?e.replace("/genre/","spotify:genre:"):/^\/search/.test(e)?"spotify:search":""}function iM(e){return Mh(e)}const rM="prod",sM="web-modal",aM={pattern:"app:start",type:"CLIENT_EVENT"},oM={pattern:"app:deprecation:start",type:"CLIENT_EVENT"},lM={pattern:"app:deprecation:click",type:"CLIENT_EVENT"},cM={pattern:"context:start",type:"CLIENT_EVENT"},uM={pattern:"jammable:context:start",type:"CLIENT_EVENT"};let dM=null;function mM(){return dM}const pM=(e,t,n)=>i=>r=>s=>{const a=r(s),o=i.getState(),{dispatch:l}=i,{isAnonymous:c}=(0,ma.Ht)(o),d=t.getState(),m=t.getEvents();let p=!1,h="";function g(e){e&&l((0,wr.vx)(e))}function f(e,t){const n=new le.P("quicksilver_message");let i=t;if(t)return n.setItem(e,t),t;const r=n.getItem(e);return r instanceof eM.m||r instanceof tM.Y||(i=r),i}if(c)return a;switch(s.type){case et.gK.INITIALISE_QUICKSILVER:!function(e){dM=(0,XU.ns)((0,_t.V)().toPublic(),{actions:["DISMISS","URL","EXTERNAL_URL"],app:{platform:"WebPlayer",clientId:"65b708073fc0480ea92a077233ca87bd"},enableLogs:!1,formats:[sM],locale:u.Ru.getLocaleForTranslation(),env:rM,triggerTypes:["URI","CLIENT_EVENT"]}),dM.start(),dM.on(XU.qY.CONNECTED,(()=>{e((0,wr.rI)())}))}(l),m.addListener(P.gd.ACTION,(e=>{p||e.data.action!==P.Ik.PLAY||(p=!0,l((0,wr.V$)())),function(e,t){if(e.data.action!==P.Ik.PLAY)return;const n=(0,j.o_)(e.data.context.uri);n&&((0,j.tb)(n)||(0,j._T)(n)||(0,j.ec)(n))&&t((0,wr.Su)())}(e,l)}));break;case et.gK.TRIGGER_CLICK_DEPRECATION_MESSAGE:dM&&!iM(d)&&(h=nM(e.location.pathname),dM.requestMessage({appUri:h,trigger:lM}).then((e=>f(oM.pattern,e))).then(g));break;case wr.QN.TRIGGER_APP_START_IN_APP_MESSAGE:dM&&!iM(d)&&(dM.requestMessage({appUri:"spotify:home",trigger:aM}).then(g),o.session.productState?.["client-deprecated"]&&dM.requestMessage({appUri:"spotify:home",trigger:oM}).then((e=>f(oM.pattern,e))).then(g));break;case wr.QN.TRIGGER_CONTEXT_START_IN_APP_MESSAGE:dM&&!iM(d)&&dM.requestMessage({appUri:"spotify:home",trigger:cM}).then(g);break;case wr.QN.TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE:if(n.getEnabled()===Ae._.ENABLED&&n.getJamExperience()!==Ae.l.NONE&&dM&&!iM(d)){const t=(0,j.o_)(e.location.pathname)?.toURI()??"spotify:home";dM.requestMessage({appUri:t,trigger:uM}).then(g)}break;case et.gK.UPDATE_UI_HISTORY_STATE:h=nM(e.location.pathname),dM&&!iM(d)&&h&&dM.requestMessage({appUri:h,trigger:{pattern:h,type:"URI"}}).then(g);break;case ja:l((0,wr.yv)());break;case wr.QN.PREVIEW_IN_APP_MESSAGE:dM&&s.creativeId&&dM.previewMessage({appUri:s.appUri||"spotify:home",creativeId:s.creativeId}).then(g);break;case wr.QN.SET_IN_APP_MESSAGING_ENV:dM&&dM.setEnv(s.env);break;case JU.tQ:dM&&dM.stop()}return a};function hM(e,t,n,i){if(e&&""===e.innerHTML){const r=function(e,t,n){const i=mM();if(i){const r=i.createIframe(e,n);return r.setAttribute("data-testid","inAppMessageIframe"),r.style.borderRadius="5px",r.style.margin="auto",r.style.opacity="0",r.style.transition="opacity 150ms linear",r.addEventListener("load",(()=>{const{contentWindow:e,contentDocument:n}=r;e&&function(e){e&&e.focus()}(e),n&&(Qe.setup(n),function(e,t){const n=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),i=n[0],r=n[n.length-1];e.addEventListener("keydown",(e=>{"Tab"===e.key&&e.target===r&&(e.preventDefault(),i.focus()),e.shiftKey&&"Tab"===e.key&&r.focus(),"Escape"!==e.key&&27!==e.keyCode||t()}),!0)}(n,t)),r.style.opacity="1"})),r}return null}(t,n,i);r&&e.appendChild(r)}}function gM({message:e}){const t=(0,at.useRef)(null);return function(e,t){const n=(0,nt.wA)(),i=(0,cn.Zp)(),r=(0,at.useCallback)((()=>{n((0,wr.yv)())}),[n]);(0,at.useEffect)((()=>{const n=t.current;return hM(n,e,r,ZU(r,i)),()=>{!function(e){e&&(e.innerHTML="")}(n)}}),[e,r,n,t,i])}(e,t),(0,ct.jsx)("div",{"":"inAppMessageContainer",ref:t})}function fM(){return(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(bM,{})})}function bM(){const e=(0,a.NC)(Ie.e6f),{message:t,dismissMessage:n}=function(){const e=(0,nt.wA)();return{message:(0,nt.d4)((e=>e.inAppMessaging?.message)),dismissMessage:(0,at.useCallback)((()=>{e((0,wr.yv)())}),[e])}}(),i=!!t&&t.format===sM;return e?(0,ct.jsx)(Ga.A,{animated:!0,contentLabel:"In-App Message Modal",isOpen:i,onRequestClose:n,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!1,children:i&&!!t&&(0,ct.jsx)(gM,{message:t})}):null}var vM=n(94524);const yM="tJeH2W2to1A7d9tWBRoi",_M="oNjdJbGQ9ypf7KR0nYJW",EM="ibrRlYShsgThsh8VNS8Q",xM="Yl9jzsnP8e_5i9me3h7H",CM="vxBybZOmHdDF_nmLE4sa",SM=(0,at.memo)((function(){const e=(0,nt.wA)(),{isOpen:t}=(0,nt.d4)((e=>e.aboutRecs)),n=(0,at.useCallback)((()=>{e((0,vM.oK)())}),[e]),i=`https://about-recommendations.spotify.com/?bg=${Ab.gray20.substr(1)}&hideHeader=true`;return(0,ct.jsx)(Ga.A,{animated:!0,isOpen:t,onRequestClose:n,contentLabel:u.Ru.get("context-menu.about-recommendations"),children:(0,ct.jsxs)("div",{className:yM,children:[(0,ct.jsx)(fr.E,{as:"h1",variant:"titleMedium",semanticColor:"textBase",className:_M,children:u.Ru.get("context-menu.about-recommendations")}),(0,ct.jsx)("div",{className:EM,children:(0,ct.jsx)("iframe",{className:xM,title:u.Ru.get("context-menu.about-recommendations"),src:i})}),(0,ct.jsx)("button",{"aria-label":u.Ru.get("close_button_action"),className:CM,onClick:n,children:(0,ct.jsx)(co.M,{size:"medium"})})]})})})),AM=({className:e})=>(0,ct.jsxs)("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:[(0,ct.jsx)("rect",{width:"14.933",height:"14.933",x:"0.533",y:"0.533",fill:"#E22134",rx:"7.467"}),(0,ct.jsx)("path",{fill:"#fff",d:"M6.143 12V4.437h-1.28c-.15.79-.907 1.387-1.995 1.419v1.003h1.813V12h1.462zm5.092-5.13c0 .82-.65 1.343-1.386 1.343-.758 0-1.387-.512-1.387-1.344 0-.81.64-1.333 1.387-1.333.736 0 1.386.533 1.386 1.333zm-4 4.874c.384.245 1.12.416 1.75.416 2.56 0 3.893-1.61 3.893-4.341 0-2.4-1.397-3.542-2.997-3.542-1.611 0-2.859 1.088-2.859 2.635 0 1.59 1.227 2.539 2.603 2.539.853 0 1.514-.363 1.802-.843-.074 1.397-.96 2.261-2.453 2.261-.512 0-1.067-.16-1.355-.32l-.384 1.195z"}),(0,ct.jsx)("rect",{width:"14.933",height:"14.933",x:"0.533",y:"0.533",stroke:"#fff",strokeWidth:"1.067",rx:"7.467"})]});function wM(e,t,n,i){if(n<=0||i<=0||i>1)return{height:-1,width:-1,parentHeight:e,parentWidth:t};const r=e*t,s=1/i*n,a=Math.sqrt(r/s);return{height:a,width:a*n,parentHeight:e,parentWidth:t}}const IM="dzS9k6yn4XzF3jWcS3W2",TM="ezHLQVkVclgu_n15ybG6",NM="gQ3lUcmizympex29IHL7",RM="VDUUJg30Ewzy9OP54arn",kM={[Og.E.SMALL]:1,[Og.E.MEDIUM]:.72,[Og.E.LARGE]:1.82},OM={[Og.E.SMALL]:0,[Og.E.MEDIUM]:600,[Og.E.LARGE]:1024},PM=({image:e,onConfirm:t,backgroundColor:n})=>{const i=(e=>Object.keys(OM).reverse().find((t=>e>=OM[t]?t:null)))(window.innerWidth),{width:r,height:s,parentHeight:a}=function(e,t){const[n,i]=(0,at.useState)((()=>wM(window.innerHeight,window.innerWidth,e,t))),r=(0,at.useRef)(),s=(0,at.useCallback)((()=>{i(wM(window.innerHeight,window.innerWidth,e,t))}),[e,t]);return(0,at.useEffect)((()=>(r.current||(i(wM(window.innerHeight,window.innerWidth,e,t)),window.addEventListener("resize",s),r.current=!0),()=>{r.current&&(i(wM(window.innerHeight,window.innerWidth,e,t)),window.removeEventListener("resize",s),r.current=!1)})),[e,t,s]),n}(kM[i],.3333333333333333),o=n?{backgroundColor:n}:{},l=((e,t,n,i)=>e===Og.E.SMALL?{width:"100vw",height:"100vh"}:e===Og.E.MEDIUM&&i<750||e===Og.E.LARGE&&i<520?{width:"inherit",height:"inherit"}:{width:`${Math.ceil(t)}px`,height:`${Math.ceil(n)}px`})(i,r,s,a),c=(0,ct.jsxs)("span",{children:[(0,ct.jsx)("span",{className:TM,children:u.Ru.get("age.restriction.explicitContent")}),(0,ct.jsx)(AM,{className:NM})]}),d=(0,ct.jsx)(br.$,{colorSet:"invertedLight",onClick:t,children:u.Ru.get("age.restriction.continue")});return(0,ct.jsx)(xj,{className:gr()(IM,{[RM]:1===kM[i]}),style:{...l,...o},image:e,title:u.Ru.get("age.restriction.confirmAge"),description:c,primaryButton:d,size:i})};var jM=n(42624);const LM="J2uBhFKAVeDnSUb6Diq_",DM="dlCbZFZLaxVOGbVUleiV",UM=()=>{const e=(0,nt.wA)(),{image:t,backgroundColor:n,providerUrl:i}=(0,nt.d4)((({ageRestriction:e})=>({image:"",backgroundColor:e.dialog.backgroundColor,providerUrl:e.dialog.providerUrl})),((e,t)=>e.image===t.image&&e.backgroundColor===t.backgroundColor&&e.providerUrl===t.providerUrl));return(0,ct.jsxs)("div",{className:LM,children:[(0,ct.jsx)(PM,{image:t,onConfirm:()=>{window.location.assign(i)},backgroundColor:n}),(0,ct.jsx)("div",{className:DM,children:(0,ct.jsx)(Xs.H,{onClick:()=>{e((0,jM.Rb)())},children:u.Ru.get("close")})})]})},MM=()=>{const e=(0,nt.wA)(),t=(0,nt.d4)((({ageRestriction:e})=>e.isOpen));return(0,ct.jsx)(Ga.A,{animated:!0,onRequestClose:()=>{e((0,jM.Rb)())},contentLabel:u.Ru.get("age.restriction.confirmAge"),isOpen:t,children:(0,ct.jsx)(UM,{})})},BM="main-keyboardShortcutsHelpModal-container",FM="gPDYH11Cr1B2ZtS9z0P8",HM="IIQWD0tGOaagAN9uP_4h",VM="LdrQgiV3Kav0IR6Oqsej",zM=(0,at.memo)((function(){const e=(0,nt.wA)(),{user:t}=(0,nt.d4)(ma.Ht),{name:n,uri:i,isOpen:r}=(0,nt.d4)((({ui:e})=>e.blockUserDialog)),{enqueueSnackbar:s}=(0,Sh.d)(),a=(0,$n.A9)(),o=(0,at.useCallback)((async()=>{if(t&&i)try{await(0,ve.rn)(a,{currentUserUri:t?.uri,uri:i}),e((0,et.xF)()),s(u.Ru.get("feedback.block-user"))}catch(t){throw e((0,et.xF)()),t}}),[t,i,a,e,s]),l=(0,at.useCallback)((()=>{e((0,et.xF)())}),[e]),c=(0,at.useCallback)((()=>{e((0,et.xF)())}),[e]);return(0,ct.jsx)(Ga.A,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:c,contentLabel:u.Ru.get("block-user.dialog.title",n),isOpen:r,children:(0,ct.jsxs)("div",{className:BM,children:[(0,ct.jsx)(fr.E,{as:"h2",variant:"bodyMediumBold",className:FM,children:u.Ru.get("block-user.dialog.title",n)}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",className:HM,paddingBottom:k_.lT,children:u.Ru.get("block-user.dialog.description",n)}),(0,ct.jsxs)("div",{className:gr()("encore-light-theme",VM),children:[(0,ct.jsx)(Xs.H,{buttonSize:Xs.H.md,onClick:l,children:u.Ru.get("block-user.dialog.cancel")}),(0,ct.jsx)(br.$,{onClick:o,buttonSize:br.$.md,children:u.Ru.get("block-user.dialog.block")})]})]})})}));var GM=n(50014);const WM=(0,at.memo)((function(){const e=(0,nt.wA)(),t=(0,$r.W)(),{removeFolder:n}=(0,GM.Z)(),i=(0,cn.Zp)(),r=(0,cn.zy)(),{uri:s,onDeleteCallback:a}=(0,nt.d4)((({ui:e})=>e.deleteFolderDialog)),o=(0,at.useCallback)((()=>{e((0,et.c$)())}),[e]),l=(0,at.useCallback)((()=>{s&&(t({targetUri:s,intent:"delete-folder",type:"click",itemIdSuffix:"delete"}),n(s),o(),(0,j.o_)(s)?.toURLPath().endsWith(r.pathname)&&i("/",{replace:!0}),a&&a())}),[s,t,n,o,r.pathname,a,i]);return(0,ct.jsx)(EN.T,{"aria-label":u.Ru.get("folder.delete-header"),titleText:u.Ru.get("folder.delete-header"),onConfirm:l,onClose:o,confirmText:u.Ru.get("contextmenu.delete"),confirmLabel:u.Ru.get("folder.delete-header"),cancelText:u.Ru.get("queue.cancel-button")})}));var KM=n(17980);const YM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},qM=/[&<>"']/g,QM=RegExp(qM.source);const $M=Object.values(YM);RegExp(`${$M.join("|")}`,"g"),RegExp(`${$M.join("|")}`);const ZM=(0,at.memo)((function({uri:e}){const t=(0,cn.Zp)(),n=(0,cn.zy)(),i=(0,nt.wA)(),r=(0,$r.W)(),[,s]=(0,qp.A)(e),a=(0,KM.J)(e),o=(0,at.useCallback)((()=>{r({targetUri:e,intent:"delete-playlist",type:"click",itemIdSuffix:"delete"}),s(!1),i((0,et._P)()),(0,j.B2)(e,n.pathname)&&t("/",{replace:!0})}),[r,e,s,i,n.pathname,t]),l=(0,at.useCallback)((()=>{i((0,et._P)())}),[i]);return a&&(0,ct.jsx)(EN.T,{"aria-label":u.Ru.get("playlist.delete",a.name),titleText:u.Ru.get("playlist.delete-title",a.name),descriptionText:u.Ru.get("playlist.delete-description",(c=a.name,c&&QM.test(c)?c.replace(qM,(e=>e in YM?YM[e]:e)):c)),onConfirm:o,onClose:l,confirmText:u.Ru.get("contextmenu.delete"),confirmLabel:u.Ru.get("playlist.delete",a.name),cancelText:u.Ru.get("queue.cancel-button"),allowHTML:!0});var c})),XM=()=>{const e=(0,nt.d4)((e=>e.ui.deletePlaylistDialog.uri));return e?(0,ct.jsx)(ZM,{uri:e}):null},JM=(0,at.lazy)((async()=>{const{AboutSpotifyModal:e}=await n.e(8493).then(n.bind(n,92453));return{default:e}})),eB=(0,at.lazy)((async()=>await n.e(8493).then(n.bind(n,94473))));function tB(){return(0,ct.jsxs)(at.Suspense,{fallback:null,children:[(0,ct.jsx)(JM,{}),(0,ct.jsx)(eB,{})]})}var nB=n(42551);const iB="main-duplicateTrackModal-container",rB="main-duplicateTrackModal-title",sB="main-duplicateTrackModal-description",aB="main-duplicateTrackModal-buttonContainer",oB=(0,nB.Mz)((e=>e.duplicateTracks),(e=>{const t=!!e.uri;return{...e,onlyOneTrack:t,uris:t&&e.uri?[e.uri]:e.uris}})),lB=(0,at.memo)((function(){const e=(0,nt.wA)(),t=(0,at.useContext)(wi.w),{isOpen:n,playlistName:i,playlistUri:r,uris:s=[],onlyOneTrack:a,position:o={after:"end"},newUris:l=[]}=(0,nt.d4)(oB),c=l?.length,d=!a&&c,m=(0,at.useCallback)((()=>{d&&t.add(r,l,o),e((0,du.Qo)())}),[t,d,l,o,r,e]),p=(0,at.useCallback)((()=>{t.add(r,s,o),e((0,du.Qo)())}),[t,s,o,r,e]),h=(0,at.useCallback)((()=>{e((0,du.Qo)())}),[e]);let g;return g=d?u.Ru.get("duplicate.tracks.someAlreadyAddedDescription",i):a?u.Ru.get("duplicate.tracks.oneAlreadyAdded",i):u.Ru.get("duplicate.tracks.allAlreadyAdded",i),(0,ct.jsx)(Ga.A,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:h,contentLabel:u.Ru.get("duplicate.tracks.alreadyAdded"),isOpen:n,children:(0,ct.jsxs)("div",{className:iB,children:[(0,ct.jsx)(fr.E,{as:"h2",variant:"bodyMediumBold",className:rB,children:d?u.Ru.get("duplicate.tracks.someAlreadyAdded"):u.Ru.get("duplicate.tracks.alreadyAdded")}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",className:sB,paddingBottom:k_.lT,children:g}),(0,ct.jsxs)("div",{className:gr()("encore-light-theme",aB),children:[(0,ct.jsx)(Xs.H,{onClick:p,children:d?u.Ru.get("duplicate.tracks.addAll"):u.Ru.get("duplicate.tracks.addAnyway")}),(0,ct.jsx)(br.$,{onClick:m,children:d?u.Ru.get("duplicate.tracks.addNewOnes"):u.Ru.get("duplicate.tracks.dontAdd")})]})]})})}));var cB=n(88757),uB=n(4428),dB=n(80156),mB=n(51716),pB=n(26976);const hB={BROWSER_EDGE:"spotify__browser--is-edge",BROWSER_SAFARI:"spotify__browser--is-safari",OS_MACOS:"spotify__os--is-macos",OS_WINDOWS:"spotify__os--is-windows",OS_LINUX:"spotify__os--is-linux",OS_CHROMEOS:"spotify__os--is-chromeos",CONTAINER_DESKTOP:"spotify__container--is-desktop",CONTAINER_PWA:"spotify__container--is-pwa",CONTAINER_WEB:"spotify__container--is-web"};function gB(e,t){var n;n=Object.values(hB),document.documentElement.classList.remove(...n);const i=[];(0,pB.k)()?i.push(hB.BROWSER_EDGE):(0,R.n)()&&i.push(hB.BROWSER_SAFARI),t===we.f.macOS?i.push(hB.OS_MACOS):t===we.f.Windows?i.push(hB.OS_WINDOWS):t===we.f.Linux?i.push(hB.OS_LINUX):t===we.f.ChromeOS&&i.push(hB.OS_CHROMEOS),e===m.m.Desktop?i.push(hB.CONTAINER_DESKTOP):e===m.m.PWA?i.push(hB.CONTAINER_PWA):e===m.m.Web&&i.push(hB.CONTAINER_WEB),function(e){e.forEach((e=>{document.documentElement.classList.add(e)}))}(i)}const fB=()=>{const e=(0,cn.Zp)(),t=(0,nt.wA)(),n=(0,cn.zy)(),i=(0,nt.d4)((e=>e.ui.history.canGoBack)),r=(0,nt.d4)((e=>e.ui.history.canGoForward)),{createPlaylist:s}=(0,uB.A)(),{createFolder:a}=(0,GM.Z)(),{openURL:o,openURLWithSessionTransfer:l}=(0,Bf.L)(),{spec:c,logger:m}=(0,Jr.r)(cB.r,{data:{uri:(0,j.o_)(n.pathname)?.toURI()??""},parentAbsoluteLocation:{locations:[]}});return(0,RD.x)(d.W.CREATE_NEW_PLAYLIST,(async()=>{await s()})),(0,RD.x)(d.W.CREATE_NEW_FOLDER,(async()=>{await a(u.Ru.get("playlist.default_folder_name"),{before:"start"})})),(0,RD.x)(d.W.BROWSE_BACKWARD,(()=>{i&&e(-1)})),(0,RD.x)(d.W.BROWSE_FORWARD,(()=>{r&&e(1)})),(0,RD.x)(d.W.LOGOUT,(()=>{t((0,Re.wH)())})),(0,RD.x)(d.W.SHOW_ABOUT,(()=>{t((0,dB.Uu)())})),(0,RD.x)(d.W.SHOW_PREFERENCES,(()=>{e("/preferences")})),(0,RD.x)(d.W.SHOW_SEARCH,(()=>{/\/search(\/.*|)$/.test(n.pathname)||e("/search",{state:{preventMoveFocus:!0}})})),(0,RD.x)(d.W.SHOW_ACCOUNT,(()=>{l("https://spotify.com/account/overview/")})),(0,RD.x)(d.W.SHOW_COMMUNITY,(()=>{l("https://community.spotify.com/")})),(0,RD.x)(d.W.SHOW_HELP,(()=>{l("https://support.spotify.com/")})),(0,RD.x)(d.W.SHOW_LICENSES,(()=>{t((0,mB.FS)())})),(0,RD.x)(d.W.SHOW_LICENSING_INFORMATION,(()=>{o("https://www.spotify.com/int/legal/licensing-info/")})),(0,RD.x)(d.W.SHOW_SCTA_INFORMATION,(()=>{o("https://www.spotify.com/int/legal/specified-commercial-transactions")})),(0,RD.x)(d.W.ENTER_FULLSCREEN,(()=>{m.logInteraction(c.fullscreenButtonFactory().hitUiReveal()),t((0,et.Kk)())})),(0,RD.x)(d.W.LEAVE_FULLSCREEN,(()=>{m.logInteraction(c.fullscreenButtonFactory().hitUiHide()),t((0,et.DH)())})),(0,RD.x)(d.W.SET_PLATFORM_EMULATION_AUTO,(()=>{gB((0,p.My)(),(0,S.D)())})),(0,RD.x)(d.W.SET_PLATFORM_EMULATION_MACOS,(()=>{gB((0,p.My)(),we.f.macOS)})),(0,RD.x)(d.W.SET_PLATFORM_EMULATION_WINDOWS,(()=>{gB((0,p.My)(),we.f.Windows)})),(0,RD.x)(d.W.SET_PLATFORM_EMULATION_LINUX,(()=>{gB((0,p.My)(),we.f.Linux)})),null},bB="main-keyboardShortcutsHelpModal-container",vB="main-keyboardShortcutsHelpModal-header",yB="main-keyboardShortcutsHelpModal-closeBtn",_B="main-keyboardShortcutsHelpModal-sectionsContainer",EB="main-keyboardShortcutsHelpModal-sections",xB="main-keyboardShortcutsHelpModal-sectionHeading",CB="main-keyboardShortcutsHelpModal-sectionItem",SB="main-keyboardShortcutsHelpModal-sectionItemName",AB="main-keyboardShortcutsHelpModal-key",wB=e=>{switch(e){case"mod":return"macOS"===C().getParser(window.navigator.userAgent).getOSName()?"⌘":"Ctrl";case"command":return"⌘";case"alt":return"macOS"===C().getParser(window.navigator.userAgent).getOSName()?"⌥":"Alt";case"shift":case"ctrl":case"space":return e[0].toUpperCase()+e.slice(1);case"up":return"↑";case"right":return"→";case"down":return"↓";case"left":return"←";default:return e.toUpperCase()}},IB=(0,at.memo)((function({children:e}){return(0,ct.jsx)(fr.E,{as:"kbd",variant:"bodyMedium",className:AB,children:wB(e)})})),TB=({combinations:e})=>(0,ct.jsx)(ct.Fragment,{children:e.map(((t,n)=>{const i=t.split("+");return(0,ct.jsxs)(at.Fragment,{children:[i.map((e=>(0,ct.jsx)(IB,{children:e},e))),n<e.length-1&&(0,ct.jsxs)(fr.E,{variant:"bodyMedium",children:[" ",u.Ru.get("keyboard.shortcuts.or")," "]})]},t)}))}),NB=({shortcuts:e,sectionTitle:t})=>(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(fr.E,{as:"h2",className:xB,variant:"titleSmall",children:t}),(0,ct.jsx)("ul",{children:e.map((e=>e.enabled?(0,ct.jsxs)("li",{className:CB,children:[(0,ct.jsx)(fr.E,{variant:"bodyMedium",className:SB,children:e.description}),(0,ct.jsx)(TB,{combinations:mg.gO[e.action]})]},e.action):null))})]}),RB=(0,at.memo)((function(){const e=(0,mg.dr)(),t=(0,nt.wA)(),n=(0,nt.d4)((e=>e.ui.keyboardShortcutsHelpModal.isOpen)),i=(0,at.useCallback)((()=>{t((0,et.wi)(!1))}),[t]),r=e.employee.filter((e=>e.enabled));return(0,ct.jsx)(Ga.A,{isOpen:n,onRequestClose:i,contentLabel:u.Ru.get("keyboard.shortcuts.help.heading"),children:(0,ct.jsxs)("div",{className:bB,children:[(0,ct.jsxs)("div",{className:vB,children:[(0,ct.jsx)(fr.E,{as:"h1",variant:"titleMedium",children:u.Ru.get("keyboard.shortcuts.help.heading")}),(0,ct.jsx)("button",{"aria-label":u.Ru.get("close"),className:yB,onClick:i,children:(0,ct.jsx)(Wa,{width:18,height:18,fill:"currentColor"})}),(0,ct.jsxs)(fr.E,{variant:"bodyMedium",as:"p",children:[u.Ru.get("keyboard.shortcuts.help.subheading.press")," ",(0,ct.jsx)(TB,{combinations:mg.gO.OPEN_HELP})," ",u.Ru.get("keyboard.shortcuts.help.subheading.toToggle")]})]}),(0,ct.jsx)("div",{className:_B,children:(0,ct.jsxs)("div",{className:EB,tabIndex:0,children:[(0,ct.jsx)(NB,{shortcuts:e.basic,sectionTitle:u.Ru.get("keyboard.shortcuts.section.basic")}),(0,ct.jsx)(NB,{shortcuts:e.playback,sectionTitle:u.Ru.get("keyboard.shortcuts.section.playback")}),(0,ct.jsx)(NB,{shortcuts:e.navigation,sectionTitle:u.Ru.get("keyboard.shortcuts.section.navigation")}),(0,ct.jsx)(NB,{shortcuts:e.layout,sectionTitle:u.Ru.get("keyboard.shortcuts.section.layout")}),r.length>0?(0,ct.jsx)(NB,{shortcuts:r,sectionTitle:"Employee"}):null]})})]})})})),kB="ABD0FGjBGqGZG33bP7Lc",OB="iV_SwHyMafiGlMDhlcB5",PB="gMEKhUL8rKx7DhSDUVk7",jB="Z0v7BXnINL5FxFXjQIzE",LB=at.memo((function({playlistUri:e}){const t=(0,nt.wA)(),n=(0,cn.Zp)(),i=(0,$r.W)(),[r,s]=(0,qp.A)(e),a=(0,nt.d4)(ma.Ht).user,o=(0,KM.J)(e),{removeMember:l}=(0,ED.x)(e),c=o?.permissions?.isPrivate,d=o?.canAdd,m=(0,at.useCallback)((()=>{a?.id&&(i({intent:"playlisting",type:"click"}),r&&c&&s(!1),l(a?.id),t((0,et.mE)()),n("/"))}),[a?.id,i,r,c,l,t,n,s]),p=(0,at.useCallback)((()=>{t((0,et.mE)())}),[t]),h=u.Ru.get("leave-playlist.dialog.leave");let g=u.Ru.get("leave-playlist.dialog.private-description");return c||(g=d?u.Ru.get("leave-playlist.dialog.public-contributor-description"):u.Ru.get("leave-playlist.dialog.public-listener-description")),(0,ct.jsx)(Ga.A,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:p,contentLabel:h,isOpen:!0,children:(0,ct.jsxs)("div",{className:kB,children:[(0,ct.jsx)(fr.E,{as:"h2",variant:"bodyMediumBold",className:OB,children:u.Ru.get("leave-playlist.dialog.title")}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",className:PB,paddingBottom:k_.lT,children:g}),(0,ct.jsxs)("div",{className:gr()("encore-light-theme",jB),children:[(0,ct.jsx)(Xs.H,{onClick:p,children:u.Ru.get("leave-playlist.dialog.cancel")}),(0,ct.jsx)(br.$,{onClick:m,children:h})]})]})})})),DB=at.memo((function(){const{isOpen:e,playlistUri:t}=(0,nt.d4)((e=>e.ui.leavePlaylistDialog));return t&&e?(0,ct.jsx)(LB,{playlistUri:t}):null})),UB=e=>(0,ct.jsx)("img",{alt:"Zara Larsson",src:(0,as.b)("images/zara-larsson-singles.png"),...e});var MB=n(85747);const BB="m7yI2BjDd8Jfq4bwU_IT",FB="A0uXWh53dpxhad3t59v_",HB="jN93nx_3NxRM0qYmOmjB",VB="x_mFp6qsLw0AgSON4gdy",zB="aS3WvPBqyZdP1S28pn6r",GB="FvaVPD0bBm4QOZEKRYOm",WB="nRjGqzP1Yyg9utpJtFEG",KB="lljaf1wMpxMQY1AVr1sf",YB="Mhj98HFd0jXE916R2Ggz",qB="TicfIwifH276e2046RzG",QB="ONMHZOOfFwfCPGr5rKNp",$B="ZQ94gWpWwDhhvQ7bRv9S",ZB="DNkhD0rW2qSWeBj4HBIZ",XB=at.memo((function(){const e=(0,nt.wA)(),t=(0,nt.d4)((e=>e.ui.loginToListenDialog.isOpen)),n=(0,$r.W)();n({intent:"navigate",type:"view"});const i=(0,at.useCallback)((()=>{n({intent:"close",type:"click"}),e((0,et.k0)())}),[e,n]),r=(0,at.useCallback)((t=>{n({intent:"upgrade-to-premium",type:"click"}),e((0,et.k0)()),t?window.open(vr.BW,"_blank"):window.open(vr.zd,"_blank")}),[e,n]);return(0,ct.jsx)(xu.u,{property:Ie.StW,renderOldExperience:()=>(0,ct.jsx)(Ga.A,{animated:!0,isOpen:t,className:WB,overlayClassName:KB,contentLabel:u.Ru.get("mwp.d2p.modal.title"),onRequestClose:i,children:(0,ct.jsxs)("div",{className:BB,children:[(0,ct.jsx)("div",{className:GB,children:(0,ct.jsx)(UB,{className:FB})}),(0,ct.jsxs)("div",{className:`${GB}`,children:[(0,ct.jsx)("div",{className:HB,children:(0,ct.jsx)(MB.T,{color:"var(--spice-text)",height:"23"})}),(0,ct.jsx)(fr.E,{as:"h1",variant:"titleMedium",children:u.Ru.get("mwp.d2p.modal.title")}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMedium",children:u.Ru.get("mwp.d2p.modal.description")}),(0,ct.jsx)(br.$,{onClick:r.bind(null,!0),className:`${VB}`,children:u.Ru.get("mwp.d2p.modal.cta")}),(0,ct.jsx)(Xs.H,{onClick:i,className:`${VB} ${zB}`,children:u.Ru.get("mwp.d2p.modal.dismiss")})]})]})}),renderNewExperience:()=>(0,ct.jsx)(Ga.A,{animated:!0,isOpen:t,className:WB,overlayClassName:KB,contentLabel:u.Ru.get("mwp.d2p.modal.title"),onRequestClose:i,children:(0,ct.jsxs)("div",{className:`${BB} ${YB}`,children:[(0,ct.jsx)("div",{className:`${GB} ${ZB}`,children:(0,ct.jsx)("img",{alt:u.Ru.get("midyear.cta"),src:(0,as.b)("images/mid-year.png")})}),(0,ct.jsxs)("div",{className:`${GB}`,children:[(0,ct.jsx)(fr.E,{as:"h1",variant:"titleMedium",children:u.Ru.get("midyear.title")}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMedium",children:u.Ru.get("midyear.intro")}),(0,ct.jsx)(br.$,{onClick:r.bind(null,!1),className:`${VB} ${qB}`,children:u.Ru.get("midyear.cta")}),(0,ct.jsx)(Xs.H,{onClick:i,className:`${VB} ${zB} ${QB}`,children:u.Ru.get("mwp.d2p.modal.dismiss")}),(0,ct.jsx)(fr.E,{as:"p",className:$B,variant:"marginal",dangerouslySetInnerHTML:{__html:u.Ru.get("midyear.terms",{help_link:"https://www.spotify.com/legal/premium-promotional-offer-terms/"})}})]})]})})})})),JB=at.memo((function(){return(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(XB,{})})}));var eF=n(59492),tF=n(91265),nF=n(88052),iF=n(33396);const rF="Gq0nmqrHqipmGwpzAmPM",sF="SlF1l98yxyaNXDn4clyB",aF=()=>{const e=(0,nt.wA)(),t=(0,cn.Zp)(),n=(0,ot.s)(),i=(0,iF.j)(),{isOpen:r}=(0,nt.d4)((e=>e.ui.learnMorePersonalizedRecommendationsModal)),s=()=>{e(qv.r8.actions.close()),n.logInteraction(i.cancelButtonFactory().hitUiHide())};return(0,ct.jsx)(Ga.A,{isOpen:r,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:s,contentLabel:u.Ru.get("web-player.settings.personalized-recommendations-turned-off.modal-header"),animated:!0,children:(0,ct.jsx)(eF.Q,{className:rF,dialogTitle:u.Ru.get("web-player.settings.personalized-recommendations-turned-off.modal-header"),"aria-label":u.Ru.get("web-player.settings.personalized-recommendations-turned-off.modal-header"),body:(0,ct.jsxs)("div",{className:sF,children:[(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:u.Ru.get("web-player.settings.personalized-recommendations-turned-off.modal-body")}),(0,ct.jsx)(fr.E,{variant:"bodySmallBold",semanticColor:"textBase",as:"h2",children:u.Ru.get("web-player.settings.personalized-recommendations-turned-off.modal-body-missing-features-intro")}),(0,ct.jsxs)(tF.b,{as:"ul",children:[(0,ct.jsx)(nF.K,{condensed:!0,semanticColor:"textSubdued",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-missing-features-1")}),(0,ct.jsx)(nF.K,{condensed:!0,semanticColor:"textSubdued",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-missing-features-2")}),(0,ct.jsx)(nF.K,{condensed:!0,semanticColor:"textSubdued",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-missing-features-3")})]}),(0,ct.jsx)(fr.E,{variant:"bodySmallBold",semanticColor:"textBase",as:"h2",children:u.Ru.get("web-player.settings.personalized-recommendations-turned-off.modal-body-persistent-features-intro")}),(0,ct.jsx)(tF.b,{condensed:!0,as:"ul",children:(0,ct.jsx)(nF.K,{condensed:!0,semanticColor:"textSubdued",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-persistent-features-1")})})]}),footer:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Xs.H,{onClick:s,size:"small",condensed:!0,children:u.Ru.get("web-player.settings.personalized-recommendations.modal-cancel")}),(0,ct.jsx)(br.$,{onClick:()=>{t("/preferences?highlight=dsa"),e(qv.r8.actions.close()),n.logInteraction(i.goToSettingsButtonFactory().hitUiNavigate({destination:"/preferences"}))},size:"small",colorSet:"invertedLight",children:u.Ru.get("web-player.settings.personalized-recommendations-turned-off.modal-confirm")})]}),legal:(0,ct.jsx)(fr.E,{variant:"marginal",semanticColor:"textBase",as:"p",children:u.Ru.get("web-player.settings.personalized-recommendations-turned-off.modal-disclaimer")})})})};var oF=n(33038);const lF=()=>{const e=(0,nt.wA)(),t=(0,ot.s)(),n=(0,oF.H)(),{isOpen:i,onConfirm:r}=(0,nt.d4)((e=>e.ui.turnOffPersonalizedRecommendationsModal)),s=()=>{e(qv.UU.actions.close()),t.logInteraction(n.cancelButtonFactory().hitUiHide())};return(0,ct.jsx)(Ga.A,{isOpen:i,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:s,contentLabel:u.Ru.get("web-player.settings.personalized-recommendations.modal-header"),animated:!0,children:(0,ct.jsx)(eF.Q,{className:rF,dialogTitle:u.Ru.get("web-player.settings.personalized-recommendations.modal-header"),"aria-label":u.Ru.get("web-player.settings.personalized-recommendations.modal-header"),body:(0,ct.jsxs)("div",{className:sF,children:[(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body")}),(0,ct.jsx)(fr.E,{variant:"bodySmallBold",semanticColor:"textBase",as:"h2",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-missing-features-intro")}),(0,ct.jsxs)(tF.b,{as:"ul",children:[(0,ct.jsx)(nF.K,{condensed:!0,semanticColor:"textSubdued",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-missing-features-1")}),(0,ct.jsx)(nF.K,{condensed:!0,semanticColor:"textSubdued",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-missing-features-2")}),(0,ct.jsx)(nF.K,{condensed:!0,semanticColor:"textSubdued",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-missing-features-3")})]}),(0,ct.jsx)(fr.E,{variant:"bodySmallBold",semanticColor:"textBase",as:"h2",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-persistent-features-intro")}),(0,ct.jsx)(tF.b,{condensed:!0,as:"ul",children:(0,ct.jsx)(nF.K,{condensed:!0,semanticColor:"textSubdued",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-body-persistent-features-1")})})]}),footer:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Xs.H,{onClick:s,size:"small",condensed:!0,children:u.Ru.get("web-player.settings.personalized-recommendations.modal-cancel")}),(0,ct.jsx)(br.$,{onClick:()=>{r(),e(qv.UU.actions.close()),t.logInteraction(n.turnOffPersonalizedRecommendationsButtonFactory().hitSettingDisable())},size:"small",colorSet:"invertedLight",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-confirm")})]}),legal:(0,ct.jsx)(fr.E,{variant:"marginal",semanticColor:"textBase",as:"p",children:u.Ru.get("web-player.settings.personalized-recommendations.modal-delay-disclaimer")})})})};var cF=n(91520),uF=n(21854),dF=n(18258);const mF="main-playlistEditDetailsModal-container",pF="main-playlistEditDetailsModal-content",hF="main-playlistEditDetailsModal-header",gF="main-playlistEditDetailsModal-closeBtn",fF="main-playlistEditDetailsModal-albumCover",bF="main-playlistEditDetailsModal-imageLoadingContainer",vF="main-playlistEditDetailsModal-imageChangeButton",yF="main-playlistEditDetailsModal-imageDropDownContainer",_F="main-playlistEditDetailsModal-imageDropDownButton",EF="main-playlistEditDetailsModal-textElement",xF="main-playlistEditDetailsModal-textElementError",CF="main-playlistEditDetailsModal-textElementInfo",SF="main-playlistEditDetailsModal-title",AF="main-playlistEditDetailsModal-textElementLabel",wF="main-playlistEditDetailsModal-description",IF="main-playlistEditDetailsModal-titleInput",TF="main-playlistEditDetailsModal-titleInputWithPadding",NF="main-playlistEditDetailsModal-descriptionTextarea",RF="main-playlistEditDetailsModal-save",kF="main-playlistEditDetailsModal-disclaimer",OF="main-playlistEditDetailsModal-characterCounter",PF="main-playlistEditDetailsModal-titleCharacterCounter",jF="main-playlistEditDetailsModal-descriptionCharacterCounter",LF="main-playlistEditDetailsModal-insertLinkButton",DF=({openImagePicker:e,onRemoveImage:t})=>(0,ct.jsx)("div",{className:yF,children:(0,ct.jsx)(ws.b,{menu:(0,ct.jsxs)(Rs.W,{children:[(0,ct.jsx)(Os.D,{role:"menuitem",onClick:e,leadingIcon:(0,ct.jsx)(uF.d,{semanticColor:"textSubdued",size:"small"}),children:u.Ru.get("playlist.edit-details.change-photo")}),(0,ct.jsx)(Os.D,{role:"menuitem",onClick:t,leadingIcon:(0,ct.jsx)(nR.x,{semanticColor:"textSubdued",size:"small"}),children:u.Ru.get("playlist.edit-details.remove-photo")})]}),children:(0,ct.jsxs)("button",{className:_F,type:"button",children:[(0,ct.jsx)(dF.x,{size:"small","aria-hidden":"true"}),(0,ct.jsx)("span",{className:"hidden-visually",children:u.Ru.get("edit_photo")})]})})});var UF=n(92029);const MF=({onClick:e})=>(0,ct.jsx)("button",{title:"Insert link",className:LF,onClick:e,children:(0,ct.jsx)(UF.b,{size:"small","aria-hidden":"true"})});var BF=n(79133),FF=n.n(BF);const HF=({className:e,usedCharacters:t,maxCharacters:n,isVisible:i=!0})=>{const r=n-t,{ariaLive:s,ariaAtomic:a}=function(e){let t,n;return e<=20?(t="assertive",n=!0):e<=60?(t="polite",n=!1):e<=70?(t="polite",n=!0):(t="off",n=!0),{ariaLive:t,ariaAtomic:n}}(r);return(0,ct.jsx)("span",{className:gr()(OF,e,{"hidden-visually":!i}),"aria-label":u.Ru.get("character-counter"),"aria-live":s,"aria-atomic":a,children:`${t}/${n}`})},VF=(0,at.forwardRef)((function({autoFocus:e,handleOnChange:t,playlistDescription:n,maxNumCharacters:i=300},r){const s=(0,at.useMemo)((()=>`text-input-${(0,be.Yu)(8)}`),[]),a=i-20,[o,l]=(0,at.useState)(!1),c=FF()(n).length;return(0,at.useEffect)((()=>{e&&"function"!=typeof r&&r?.current?.select()}),[e,r]),(0,ct.jsxs)("div",{className:wF,children:[(0,ct.jsx)(fr.E,{htmlFor:s,as:"label",variant:"marginalBold",className:AF,children:u.Ru.get("playlist.edit-details.description-label")}),(0,ct.jsx)("textarea",{ref:r,"":"playlist-edit-details-description-input",autoFocus:e,className:gr()(EF,NF,{[CF]:o}),onChange:e=>{const n=t(FF()(e.target.value).slice(0,i).join(""));l(!!n)},placeholder:u.Ru.get("playlist.edit-details.description-placeholder"),value:n}),(0,ct.jsx)(HF,{className:jF,maxCharacters:i,usedCharacters:c,isVisible:c>=a})]})})),zF=({autoFocus:e,handleOnChange:t,maxNumCharacters:n=100,playlistName:i,onSubmit:r})=>{const[s,a]=(0,at.useState)(!1),o=(0,at.useMemo)((()=>`text-input-${(0,be.Yu)(8)}`),[]),l=n-10,c=FF()(i).length,d=c>=l,m=(0,at.useRef)(null);return(0,at.useEffect)((()=>{e&&m.current?.select()}),[e]),(0,ct.jsxs)("div",{className:SF,children:[(0,ct.jsx)(fr.E,{as:"label",htmlFor:o,variant:"marginalBold",className:AF,children:u.Ru.get("playlist.edit-details.name-label")}),(0,ct.jsx)("input",{"":"playlist-edit-details-name-input",id:o,autoFocus:e,ref:m,type:"text",className:gr()(EF,IF,{[TF]:d,[xF]:s}),onKeyDown:e=>{"Enter"===e.key&&r()},onChange:e=>{const i=t(FF()(e.target.value).slice(0,n).join(""));a(!!i)},placeholder:u.Ru.get("playlist.edit-details.name-placeholder"),value:i}),(0,ct.jsx)(HF,{isVisible:d,maxCharacters:n,usedCharacters:c,className:PF})]})};var GF=n(63);const WF={name:"",description:"",image:void 0,loading:!1,message:null,hasWarnedAboutUnsavedChanges:!1};function KF(e){return{type:"setPlaylistDescription",data:e}}function YF(e){return{type:"setLoading",data:e}}function qF(e){return{type:"setMessage",data:e}}function QF(e,t){switch(t.type){case"setImageData":return{...e,loading:!1,image:{width:GF.B.SMALL,height:GF.B.SMALL,url:t.data}};case"removeImage":return{...e,loading:!1,imageToken:null,image:void 0};case"setImageToken":return{...e,imageToken:t.data};case"setPlaylistName":return{...e,name:t.data};case"setPlaylistDescription":return{...e,description:t.data};case"setLoading":return{...e,loading:t.data,message:null};case"setHasWarnedAboutUnsavedChanges":return{...e,hasWarnedAboutUnsavedChanges:t.data};case"setMessage":return{...e,loading:!1,message:t.data};case"reset":return{...WF,name:t.data.name,description:t.data.description,image:t.data.image};default:return e}}var $F=n(52786),ZF=n(40292),XF=n(4320),JF=n(78444),eH=n(59392);const tH=/[\b\f\n\r\t\v\0]/,nH=/<[bi]/i,iH=({isOpen:e,isImagePickerOpen:t,focusedElement:n,name:i,description:r,image:s,uri:a,onClose:o})=>{r=(e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(r);const{uploadImage:l,updateDetails:c}=(0,ED.x)(a),[d,m]=function({name:e,description:t,image:n}){const[i,r]=(0,at.useReducer)(QF,{...WF,name:e,description:t,image:n});return[i,r]}({name:i,description:r,image:s}),[p,h]=(0,JF.p)(),g=!(0,Yf.n)(),f=(0,at.useRef)(null),b=(0,nt.d4)((e=>"1"===e.session.productState?.["playlist-annotations-markup"]));(0,at.useEffect)((()=>{m(qF(g?tD:null))}),[g,m]),(0,at.useEffect)((()=>{t&&h()}),[t,h]);const v=(0,at.useCallback)((()=>{m({type:"removeImage"})}),[m]),y=(e=!1)=>{const t=null===d.imageToken,n=d.imageToken;!(i!==d.name||r!==d.description||n||t)||d.hasWarnedAboutUnsavedChanges||e?(m(function(e){return{type:"reset",data:e}}({name:i,description:r,image:s})),o()):(m(qF(eD)),m({type:"setHasWarnedAboutUnsavedChanges",data:!0}))};async function _(){if(!d.loading)if(0!==d.name.length){m(YF(!0));try{await async function(){const e={};i!==d.name&&(e.name=d.name);r!==d.description&&(e.description=d.description);d.imageToken?e.imageUploadToken=await d.imageToken:null===d.imageToken&&(e.imageUploadToken=null);e.image=d.image,await c(e)}(),m(YF(!1));y(!0)}catch{m(qF(aD))}}else m(qF(sD))}return(0,ct.jsx)(Ga.A,{isOpen:e,onRequestClose:()=>{y()},contentLabel:u.Ru.get("playlist.edit-details.title"),children:(0,ct.jsxs)("div",{"":"playlist-edit-details-modal",className:mF,children:[(0,ct.jsxs)("div",{className:hF,children:[(0,ct.jsx)(fr.E,{as:"h1",variant:"titleSmall",children:u.Ru.get("playlist.edit-details.title")}),(0,ct.jsx)("button",{className:gF,onClick:()=>{y()},children:(0,ct.jsx)(co.M,{size:"small","aria-label":u.Ru.get("close")})})]}),d.message&&(0,ct.jsx)(eH.z,{isErrorMessage:"error"===d.message.type,message:d.message.message}),b?(0,ct.jsx)(MF,{onClick:function(){if(!f.current)return;const{selectionStart:e,selectionEnd:t}=f.current,n=d.description.substring(e,t);let i=n;const r=!!(0,j.o_)(i);!i.startsWith("http://")&&!i.startsWith("https://")&&!r&&(i=`https://${i}`),m(KF([d.description.substring(0,e),`<a href="${i}">${n}</a>`,d.description.substring(t)].join("")))}}):null,(0,ct.jsxs)("div",{className:pF,children:[(0,ct.jsx)(XF.u,{isOpen:p,minImageWidth:300,minImageHeight:300,maxFileSizeMB:10,onChange:async function(e){if(!e)return;const{imageFile:t,imageDataUrl:n}=e;if(m(qF(null)),m({type:"setImageData",data:n}),t)try{const e=l(t);m({type:"setImageToken",data:e}),await e}catch{m(qF(rD))}},onError:e=>{e===XF.i.FILE_TOO_BIG?m(qF(nD)):e===XF.i.IMAGE_TOO_SMALL&&m(qF(iD))}}),(0,ct.jsxs)("div",{className:fF,children:[(0,ct.jsx)(ZF.b,{loading:"eager",name:d.name,images:d.image?[d.image]:[],placeholderType:"playlist"}),(0,ct.jsx)("div",{className:vF,children:(0,ct.jsx)($F.a,{overlay:!!d.image,onClick:h})}),(0,ct.jsx)(DF,{onRemoveImage:v,openImagePicker:h}),!!d.imageToken&&d.loading&&(0,ct.jsx)("div",{className:bF,children:(0,ct.jsx)(cF.I,{})})]}),(0,ct.jsx)(zF,{autoFocus:n===bn.NV.TITLE,handleOnChange:e=>(m({type:"setPlaylistName",data:e}),0===e.length?(m(qF(sD)),sD):(m(qF(null)),null)),playlistName:d.name,onSubmit:_}),(0,ct.jsx)(VF,{ref:f,autoFocus:n===bn.NV.DESCRIPTION,handleOnChange:e=>{let t=e;return nH.test(t)?(m(qF(JL)),JL):tH.test(t)?(t=(e||"").replace(tH,""),m(qF(XL)),XL):(m(KF(t)),null)},playlistDescription:d.description}),(0,ct.jsx)("div",{className:RF,children:(0,ct.jsx)(br.$,{colorSet:"invertedLight",onClick:_,disabled:d.loading,"":"playlist-edit-details-save-button",children:u.Ru.get("save")})}),(0,ct.jsx)(fr.E,{as:"p",variant:"marginalBold",className:kF,children:u.Ru.get("image-upload.legal-disclaimer")})]})]})})},rH=()=>{const{isOpen:e,isImagePickerOpen:t,playlistDetails:n,focusedElement:i}=(0,at.useContext)(bn.iE),r=(0,at.useContext)(bn.$$),s=(0,at.useCallback)((()=>{r({type:"close"})}),[r]),{name:a,description:o,uri:l,image:c}=n;return e?(0,ct.jsx)(iH,{isOpen:e,isImagePickerOpen:t,onClose:s,focusedElement:i,uri:l,name:a,description:o,image:c}):null},sH=new Map;sH.set("ad","€ 9,99"),sH.set("ar","$ 69,00"),sH.set("at","€ 9,99"),sH.set("au","$11.99"),sH.set("be","€ 9,99"),sH.set("bg","4.99 EUR"),sH.set("bo","5.99 USD"),sH.set("br","R$ 16,90"),sH.set("ca","9.99 CAD"),sH.set("ch","Fr. 12.95"),sH.set("cl","$ 3.490,00"),sH.set("co","$ 14.900,00"),sH.set("cr","5.99 USD"),sH.set("cy","6.99 EUR"),sH.set("cz","5.99 EUR"),sH.set("de","9,99 €"),sH.set("dk","kr 99,00"),sH.set("do","5.99 USD"),sH.set("ec","5.99 USD"),sH.set("ee","6.99 EUR"),sH.set("es","9,99 €"),sH.set("fi","9,99 €"),sH.set("fr","9,99 €"),sH.set("uk","£9.99"),sH.set("gr","6.99 EUR"),sH.set("gt","5.99 USD"),sH.set("hk","HK$58.00"),sH.set("hn","5.99 USD"),sH.set("hu","4.99 EUR"),sH.set("id","Rp 49.990"),sH.set("ie","€9.99"),sH.set("is","9.99 EUR"),sH.set("it","€ 9,99"),sH.set("kr","₩10,900"),sH.set("li","12.95 CHF"),sH.set("lt","6.99 EUR"),sH.set("lu","9.99 EUR"),sH.set("lv","6.99 EUR"),sH.set("mc","9.99 EUR"),sH.set("mt","6.99 EUR"),sH.set("mx","$ 99.00"),sH.set("my","RM14.90"),sH.set("ni","5.99 USD"),sH.set("nl","€9,99"),sH.set("no","kr109,00"),sH.set("nz","$14.99"),sH.set("pa","5.99 USD"),sH.set("pe","S/ 18.90"),sH.set("ph","₱129"),sH.set("pl","19,99 zł"),sH.set("pt","6.99 EUR"),sH.set("py","5.99 USD"),sH.set("se","99,00 kr"),sH.set("sg","S$9.90"),sH.set("sk","5.99 EUR"),sH.set("sv","5.99 USD"),sH.set("th","฿129.00"),sH.set("tr","13,99 TL"),sH.set("tw","NT$149.00"),sH.set("us","$9.99"),sH.set("uy","5.99 USD");const aH=new Map;aH.set("ad","€ 0,00"),aH.set("ar","$ 0,00"),aH.set("at","€ 0,00"),aH.set("au","$0.00"),aH.set("be","€ 0,00"),aH.set("bg","0.00 EUR"),aH.set("bo","0.00 USD"),aH.set("br","R$ 0,00"),aH.set("ca","0.00 CAD"),aH.set("ch","Fr. 0.00"),aH.set("cl","$ 0,00"),aH.set("co","$ 0,00"),aH.set("cr","0.00 USD"),aH.set("cy","0.00 EUR"),aH.set("cz","0.00 EUR"),aH.set("de","0,00 €"),aH.set("dk","kr 0,00"),aH.set("do","0.00 USD"),aH.set("ec","0.00 USD"),aH.set("ee","0.00 EUR"),aH.set("es","0,00 €"),aH.set("fi","0,00 €"),aH.set("fr","0,00 €"),aH.set("uk","£0.00"),aH.set("gr","0.00 EUR"),aH.set("gt","0.00 USD"),aH.set("hk","HK$0.00"),aH.set("hn","0.00 USD"),aH.set("hu","0.00 EUR"),aH.set("id","Rp 0.00"),aH.set("ie","€0.00"),aH.set("is","0.00 EUR"),aH.set("it","€ 0,00"),aH.set("li","0.00 CHF"),aH.set("lt","0.00 EUR"),aH.set("lu","0.00 EUR"),aH.set("lv","0.00 EUR"),aH.set("mc","0.00 EUR"),aH.set("mt","0.00 EUR"),aH.set("mx","$ 0.00"),aH.set("my","RM0.00"),aH.set("ni","0.00 USD"),aH.set("nl","€0,00"),aH.set("no","kr0,00"),aH.set("nz","$0.00"),aH.set("pa","0.00 USD"),aH.set("pe","S/ 0.00"),aH.set("ph","₱0.00"),aH.set("pl","0,00 zł"),aH.set("pt","0.00 EUR"),aH.set("py","0.00 USD"),aH.set("se","0,00 kr"),aH.set("sg","S$0.00"),aH.set("sk","0.00 EUR"),aH.set("sv","0.00 USD"),aH.set("th","฿0.00"),aH.set("tr","0,00 TL"),aH.set("tw","NT$0.00"),aH.set("us","$0.00"),aH.set("uy","0.00 USD");const oH="jqvEr4MvCdQ1QA_FSpe7",lH="sRkNI1Gya5aBxtf_vS1S",cH="WShxRrLdX9LzzqlCmWZy",uH="rlMoP29GxtDlHkDK_aci",dH=(0,at.memo)((function(){const e=(0,nt.wA)(),t=(0,nt.d4)((e=>e.ui.premiumDialog.isOpen)),n=(0,nt.d4)((e=>{const t=(e=>{const t=e.toLowerCase();return{premiumPrice:sH.has(t)?sH.get(t):"99,00 kr",freePrice:aH.has(t)?aH.get(t):"0,00 kr"}})((0,tc.JJ)(e));return t.premiumPrice})),i=(0,nt.d4)(tc.q),r=(0,at.useCallback)((()=>e((0,Re.wH)())),[e]),{openURLWithSessionTransfer:s}=(0,Bf.L)();return(0,ct.jsx)(Ga.A,{isOpen:t,shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:u.Ru.get("premium.dialog.title"),children:(0,ct.jsxs)("div",{className:oH,children:[(0,ct.jsx)("h1",{className:lH,children:u.Ru.get("premium.dialog.title")}),(0,ct.jsx)("p",{className:cH,children:u.Ru.get("premium.dialog.description",i?3:1)}),(0,ct.jsx)(br.$,{colorSet:"invertedLight",onClick:()=>s(vr.BW),children:u.Ru.get("premium.dialog.subscribe")}),(0,ct.jsx)(Xs.H,{semanticColor:"textBase",onClick:r,children:u.Ru.get("user.log-out")}),(0,ct.jsx)("p",{className:uH,children:i?u.Ru.get("premium.dialog.disclaimer.noprice"):u.Ru.get("premium.dialog.disclaimer",{price:n})})]})})}));var mH=n(765),pH=n(13326);const hH=(0,at.memo)((function(){const e=(0,nt.wA)(),t=(0,mH.L)(),{uri:n,isPrerelease:i}=(0,nt.d4)((e=>e.ui.removeFromLibraryDialog)),[r,s]=(0,qp.A)(n??""),{useContains:a,remove:o}=(0,pH.p)("prerelease"),l=a(n??"").at(0),c=(0,j.o_)(n)?.type,[d,m]=(0,at.useState)("");(0,at.useEffect)((()=>{(async()=>{switch(c){case j.NQ.PRERELEASE:case j.NQ.ALBUM:m(u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-album"));break;case j.NQ.ARTIST:m(u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-artist"));break;case j.NQ.SHOW:m((0,Ce.Go)(await t.getMetadata(n??""))?u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-audiobook"):u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-show"));break;case j.NQ.PLAYLIST:case j.NQ.PLAYLIST_V2:m(u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-playlist"));break;default:m(u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-description"))}})()}),[t,c,n]);const p=(0,at.useCallback)((()=>{e((0,et.yh)())}),[e]),h=(0,at.useCallback)((()=>{if(n){if(i){if(!l)return;o(n)}else{if(!r)return;s(!1)}p()}}),[n,i,p,l,o,r,s]);return(0,ct.jsx)(EN.T,{"aria-label":`${u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-title")} ${d}`,titleText:u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-title"),descriptionText:d,onConfirm:h,onClose:p,confirmText:u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-confirm-button"),cancelText:u.Ru.get("web-player.your-library-x.feedback-remove-from-library-dialog-cancel-button"),allowHTML:!0})})),gH="ZjyLlDvxh8QqNVY2vMsF",fH="sx8Bf4udHt_kPAnxmGW8",bH="sfaREUmOnuxlr99uOYnS",vH="RTGGeDA2P3rKc6r96vqA",yH="e1NO8ZuDIwSef3E4ppfX",_H="Fo3Fe1PpXtQ3G32BqnwP",EH="aRZZo0b_4ktkI0mPQ7Vw",xH=({name:e,onRename:t})=>{const n=(0,nt.wA)(),[i,r]=(0,at.useState)(null),s=(0,at.useCallback)((e=>{null!==e&&r(e)}),[]);(0,at.useEffect)((()=>{i?.select()}),[i]);const a=()=>{n((0,et.Yk)())},o=()=>{t(i?.value??""),a()};return(0,ct.jsx)(Ga.A,{contentLabel:u.Ru.get("playlist.edit-details.title"),shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:a,shouldFocusAfterRender:!0,isOpen:!0,children:(0,ct.jsxs)("div",{"":"playlist-edit-details-modal",className:gH,children:[(0,ct.jsxs)("div",{className:bH,children:[(0,ct.jsx)(fr.E,{as:"h1",variant:"titleSmall",children:u.Ru.get("web-player.your-library-x.rename-folder")}),(0,ct.jsx)("button",{className:vH,onClick:a,children:(0,ct.jsx)(co.M,{size:"medium","aria-label":u.Ru.get("close")})})]}),(0,ct.jsxs)("form",{className:fH,onSubmit:e=>{e.preventDefault(),o()},children:[(0,ct.jsx)("input",{ref:s,type:"text",defaultValue:e,onSubmit:o,className:gr()(yH,_H)}),(0,ct.jsx)("div",{className:EH,children:(0,ct.jsx)(br.$,{colorSet:"invertedLight",type:"submit",children:u.Ru.get("save")})})]})]})})};var CH=n(28736),SH=n(87357),AH=n(33892),wH=n(45643),IH=n(62328),TH=n(35438);const NH=Spicetify.GraphQL.Definitions["showItemsPlayedState"]=new Q.l("showItemsPlayedState","query","4a070b9bfab2e8537a5271e6839bc3ef51501dcac8170b5fb69a98f967c5fb60",null),RH=3e4;function kH(e,t=100){const{data:n,loading:i}=(r={uri:e,limit:t},s={staleTime:0,gcTime:18e5},(0,$.I)(NH,r,s));var r,s;const a=function(e){const t=e?.lookup.at(0);if("PodcastOrAudiobookResponseWrapper"===t?.__typename){if("Audiobook"===t.data.__typename){const e=t.data;return"ContextChapterPage"===e.chaptersV2?.__typename&&e.chaptersV2.items.some((({entity:e})=>"Chapter"===e.data.__typename&&OH(e.data)))}if("Podcast"===t.data.__typename){const e=t.data;return"ContextEpisodePage"===e.episodesV2?.__typename&&e.episodesV2.items.some((({entity:e})=>"Episode"===e.data.__typename&&OH(e.data)))}}return!1}(n);return{hasUserListenedToShow:a,loading:i}}function OH(e){return"COMPLETED"===e.playedState.state||e.playedState.playPositionMilliseconds>=RH}const PH="osuFIR_6Jo9yKsmLL4y2",jH="r1F2okBwH7F8pEGF7MEG",LH="H2z72R8YxQVQF8UU_ymH",DH="Pq5dXGGJ3mlXY0HFuhCS",UH="plZRpYfm5PMEiSYLRj8P",MH="B8OPJYenwKO45OLDwLyY",BH="HwHP6Y0kc7ksENQMXJ75",FH="l2w2Hl3YN3bb4TcgyXcb",HH="hWmnoRh1uj8ciMRAgL4f",VH="MXT688TwrGLq4tvesXwc",zH="hQIFH0LbkGEHIdsQ20tQ",GH=({uri:e,rating:t,isBook:n,closeRatingModal:i})=>{const[r,s]=(0,at.useState)(t??null),{onSubmitRating:a}=function(e,t){const n=(0,mH.L)(),{enqueueSnackbar:i}=(0,IH.dh)(),{spec:r,logger:s}=(0,Jr.r)(TH.b,{}),{mutateAsync:a}=(0,wH.n)({mutationFn:async()=>{t&&await n.updateUserRating(e,t)},onSuccess:()=>{const n=r.submitRatingButtonFactory().hitSubmitRating({rating:t,entityUri:e});s.logInteraction(n),i(u.Ru.get("web-player.show.rating.snackbarSuccess"))},onError:()=>{i(u.Ru.get("web-player.show.rating.snackbarFailure"))}});return{onSubmitRating:a}}(e,r??0),o=null!==r&&r!==t,l=Array.from(Array(5).keys(),(e=>e+1));return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("div",{className:VH,children:l.map((e=>(0,ct.jsx)(Xs.H,{"aria-label":n?u.Ru.get("web-player.audiobooks.rating.starAriaLabel",e):u.Ru.get("web-player.show.rating.starAriaLabel",e),className:zH,onClick:()=>s(e),iconOnly:()=>r&&r>=e?(0,ct.jsx)(CH.j,{size:"large",semanticColor:"textBase"}):(0,ct.jsx)(SH.a,{size:"large"})},e)))}),(0,ct.jsx)(br.$,{"aria-label":u.Ru.get("web-player.show.rating.submit"),colorSet:"invertedLight",disabled:!o,onClick:()=>{r&&a(),i()},children:u.Ru.get("web-player.show.rating.submit")})]})},WH=({isBook:e,onDismiss:t})=>(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(fr.E,{as:"p",variant:"titleSmall",className:FH,children:e?u.Ru.get("web-player.audiobooks.rating.listenFirstTitle"):u.Ru.get("web-player.show.rating.listenFirstTitle")}),(0,ct.jsx)(fr.E,{as:"p",className:HH,variant:"bodyMedium",children:e?u.Ru.get("web-player.audiobooks.rating.listenFirstDescription"):u.Ru.get("web-player.show.rating.listenFirstDescription")}),(0,ct.jsx)(br.$,{colorSet:"invertedLight",onClick:t,children:u.Ru.get("web-player.audiobooks.rating.ok")})]}),KH=({uri:e,isBook:t,rating:n,spec:i,logger:r,closeRatingModal:s})=>{const{hasUserListenedToShow:a,loading:o}=kH(e);return o?(0,ct.jsx)(oN.m,{}):n?.canRate&&a?(0,ct.jsx)(GH,{uri:e,rating:n?.rating?.rating??null,isBook:t,closeRatingModal:s}):(0,ct.jsx)(WH,{isBook:t,onDismiss:()=>{r.logInteraction(i.okButtonFactory().hitUiNavigateBack()),s()}})},YH=at.memo((function({uri:e,metadata:t,isOpen:n}){const i=(0,nt.wA)(),r=Boolean(t&&(0,Ce.Go)(t)),s=(0,iC.g)(t?.coverArt,{desiredSize:320}),{spec:a,logger:o}=(0,Jr.r)(AH.e,{data:{identifier:r?Kw.$h.RATINGS_AND_REVIEWS_RATINGS_AUDIOBOOK:Kw.$h.RATINGS_AND_REVIEWS_RATINGS,uri:e}}),l=t?.rating,c=()=>{i((0,et.Kc)())};return(0,ct.jsx)(Ga.A,{contentLabel:"podcast-rating-modal",isOpen:n,onRequestClose:c,children:(0,ct.jsxs)("div",{className:PH,children:[(0,ct.jsxs)("div",{className:LH,children:[(0,ct.jsx)(fr.E,{as:"h1",variant:"titleSmall",className:BH,children:r?u.Ru.get("web-player.audiobooks.rating.rateAudiobook"):u.Ru.get("web-player.show.rating.header")}),(0,ct.jsxs)("button",{className:DH,onClick:()=>{const e=a.closeButtonFactory().hitUiNavigateBack();o.logInteraction(e),c()},children:[(0,ct.jsx)(co.M,{role:"presentation"}),(0,ct.jsx)("span",{className:"hidden-visually",children:u.Ru.get("web-player.audiobooks.rating.closeModal")})]})]}),(0,ct.jsxs)("div",{className:UH,children:[(0,ct.jsx)(JT._,{loading:"eager",src:s?.url,className:jH}),(0,ct.jsx)("div",{className:MH,children:(0,ct.jsx)(xu.u,{property:Ie.skl,renderNewExperience:()=>(0,ct.jsx)(KH,{uri:e,rating:l,isBook:r,closeRatingModal:c,spec:a,logger:o}),renderOldExperience:()=>(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMediumBold",className:FH,children:r?u.Ru.get("web-player.audiobooks.rating.wantToRate"):u.Ru.get("web-player.show.rating.want-to-rate")}),(0,ct.jsx)(fr.E,{as:"p",className:HH,children:u.Ru.get("web-player.audiobooks.rating.goToApp")}),(0,ct.jsx)(br.$,{colorSet:"invertedLight",onClick:()=>{const e=a.okButtonFactory().hitUiNavigateBack();o.logInteraction(e),c()},children:u.Ru.get("web-player.audiobooks.rating.ok")})]})})})]})]})})})),qH=()=>{const{uri:e,isOpen:t,metadata:n}=(0,nt.d4)((e=>e.ui.showRatingModalState));return e&&n?(0,ct.jsx)(YH,{uri:e,metadata:n,isOpen:t}):null};var QH=n(73939);const $H={macOS:"https://download.scdn.co/SpotifyInstaller.zip",Windows:"https://download.scdn.co/SpotifySetup.exe"},ZH={iOS:"https://app.adjust.com/wp2zrj?adgroup=signup_to_listen&campaign=default&tracker_limit=250000",Android:"https://app.adjust.com/ff0trr?adgroup=signup_to_listen&campaign=default&tracker_limit=250000"},XH="nA6L5ghQWwxyiSLduNyb",JH="CgsDbaLb2DCGHkrw4wiw",eV="qp1xbhJfglEmJAWm6pdy",tV="fFk09sW_YL0Qsk8lYOfD",nV="BDNNVyxsxgQQvGmij9M1",iV="ChX5nojraEtlxQULfJFk",rV="XV07akXqG5L_suY2X8ML",sV="j8qAQ6XAb2YSBUEzUqEV",aV="xZnbvSzpNSY7qnC6X8Rf",oV="FZncbwv9M2sxuY27K8YO",lV=(0,at.memo)((function(){const e=(0,nt.wA)(),t=(0,nt.d4)((e=>e.ui.signupToListenDialog.isOpen)),n=(0,od.W)(),i=(0,nt.d4)((e=>e.session.userCountry)),r=(0,nt.d4)((e=>e.features.isPodcastEnabled)),s=(0,$r.W)(),a=(()=>{const e=(0,QH.f)();return Object.keys($H).includes(e)?$H[e]:Object.keys(ZH).includes(e)?ZH[e]:"https://spotify.com/download"})(),o=(0,Xi.vh)();(0,at.useEffect)((()=>{s({intent:"navigate",type:"view"})}),[s]);const l=(0,at.useCallback)((()=>{const t={category:"in_app_message",action:"click",label:"dismiss",destination_url:"open.spotify.com",os:(0,S.f)(),country:i,context:window.location.search},n=(0,or._)(t);o.send(n),s({intent:"close",type:"click"}),e((0,et.BY)())}),[e,s,o,i]),c=(0,at.useCallback)((()=>{const t={category:"in_app_message",action:"click",label:"download",destination_url:a,os:(0,S.f)(),country:i,context:window.location.search},n=(0,or._)(t);o.send(n),s({intent:"download",type:"click"}),e((0,et.BY)()),window.open(a,"_self")}),[e,s,a,o,i]);return(0,ct.jsx)(Ga.A,{animated:!0,isOpen:t,className:XH,overlayClassName:JH,contentLabel:u.Ru.get("s2l.download_spotify"),onRequestClose:l,children:(0,ct.jsxs)("div",{className:eV,children:[(0,ct.jsxs)("div",{className:tV,children:[(0,ct.jsx)("div",{className:`${iV}`,children:(0,ct.jsx)("img",{className:rV,alt:"Web Player",src:(0,as.b)(n?"images/s2l-desktopui-rtl.png":"images/s2l-desktopui-ltr.png")})}),(0,ct.jsxs)("div",{className:nV,children:[(0,ct.jsx)(fr.E,{as:"h1",variant:"titleSmall",className:sV,children:u.Ru.get("s2l.download_spotify")}),(0,ct.jsx)(fr.E,{as:"p",semanticColor:"textSubdued",className:aV,children:r?u.Ru.get("s2l.play_millions_podcasts"):u.Ru.get("s2l.play_millions")}),(0,ct.jsx)(br.$,{onClick:c,children:u.Ru.get("s2l.download")})]})]}),(0,ct.jsx)(Xs.H,{onClick:l,semanticColor:"textBase",className:oV,children:u.Ru.get("s2l.dismiss")})]})})})),cV=(0,at.memo)((function(){return(0,ct.jsx)(Ps.pZ,{value:"signup-to-listen",children:(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(lV,{})})})}));var uV=n(89496),dV=n(76976),mV=n(88703),pV=n(41100),hV=n(66187),gV=n(15229);const fV=(e,t)=>e.build().withHost(v.i6).withPath(`/v0/experimental/${t}/credits`).withoutMarket().withEndpointIdentifier("/v0/experimental/{trackId}/credits").send();var bV=n(96660);function vV(e){switch(e){case"Performers":return u.Ru.get("track-credits.performers");case"Writers":return u.Ru.get("track-credits.writers");case"Producers":return u.Ru.get("track-credits.producers");default:return e}}function yV(e){switch(e){case"assistant recording engineer":return u.Ru.get("track-credits.assistant-recording-engineer");case"engineer":return u.Ru.get("track-credits.engineer");case"assistant engineer":return u.Ru.get("track-credits.assistant-engineer");case"trumpet":return u.Ru.get("track-credits.trumpet");case"guitar":return u.Ru.get("track-credits.guitar");case"composer and lyricist":return u.Ru.get("track-credits.composer-and-lyricist");case"associated performer":return u.Ru.get("track-credits.associated-performer");case"background vocals":return u.Ru.get("track-credits.background-vocals");case"bass":return u.Ru.get("track-credits.bass");case"co-producer":return u.Ru.get("track-credits.co-producer");case"additional engineer":return u.Ru.get("track-credits.additional-engineer");case"masterer":return u.Ru.get("track-credits.masterer");case"mixer":return u.Ru.get("track-credits.mixer");case"recording engineer":return u.Ru.get("track-credits.recording-engineer");case"accordion":return u.Ru.get("track-credits.accordion");case"piano":return u.Ru.get("track-credits.piano");case"organ":return u.Ru.get("track-credits.organ");case"background vocal":return u.Ru.get("track-credits.background-vocal");case"recorded by":return u.Ru.get("track-credits.recorded-by");case"mixing engineer":return u.Ru.get("track-credits.mixing-engineer");case"editor":return u.Ru.get("track-credits.editor");case"fiddle":return u.Ru.get("track-credits.fiddle");case"additional vocals":return u.Ru.get("track-credits.additional-vocals");case"violin":return u.Ru.get("track-credits.violin");case"viola":return u.Ru.get("track-credits.viola");case"percussion":return u.Ru.get("track-credits.percussion");case"mastering engineer":return u.Ru.get("track-credits.mastering-engineer");case"composer":return u.Ru.get("track-credits.composer");case"additional keyboards":return u.Ru.get("track-credits.additional-keyboards");case"mix engineer":return u.Ru.get("track-credits.mix-engineer");case"mandolin":return u.Ru.get("track-credits.mandolin");case"acoustic guitar":return u.Ru.get("track-credits.acoustic-guitar");case"keyboards":return u.Ru.get("track-credits.keyboards");case"synthesizer":return u.Ru.get("track-credits.synthesizer");case"drum programmer":return u.Ru.get("track-credits.drum-programmer");case"programmer":return u.Ru.get("track-credits.programmer");case"assistant mixer":return u.Ru.get("track-credits.assistant-mixer");case"assistant mixing engineer":return u.Ru.get("track-credits.assistant-mixing-engineer");case"digital editor":return u.Ru.get("track-credits.digital-editor");case"drums":return u.Ru.get("track-credits.drums");case"drum programming":return u.Ru.get("track-credits.drum-programming");case"conga":return u.Ru.get("track-credits.conga");case"samples":return u.Ru.get("track-credits.samples");case"audio recording engineer":return u.Ru.get("track-credits.audio-recording-engineer");case"audio additional mix engineer":return u.Ru.get("track-credits.audio-additional-mix-engineer");case"recording":return u.Ru.get("track-credits.recording");case"assistant producer":return u.Ru.get("track-credits.assistant-producer");case"writer":return u.Ru.get("track-credits.writer");case"strings":return u.Ru.get("track-credits.strings");case"music publisher":return u.Ru.get("track-credits.music-publisher");case"programming":return u.Ru.get("track-credits.programming");case"music production":return u.Ru.get("track-credits.music-production");case"background vocalist":return u.Ru.get("track-credits.background-vocalist");case"producer":return u.Ru.get("track-credits.producer");case"vocal":return u.Ru.get("track-credits.vocal");case"songwriter":return u.Ru.get("track-credits.songwriter");case"lyricist":return u.Ru.get("track-credits.lyricist");case"additional mixer":return u.Ru.get("track-credits.additional-mixer");case"upright bass":return u.Ru.get("track-credits.upright-bass");case"clapping":return u.Ru.get("track-credits.clapping");case"electric bass":return u.Ru.get("track-credits.electric-bass");case"horn arranger":return u.Ru.get("track-credits.horn-arranger");case"flugelhorn":return u.Ru.get("track-credits.flugelhorn");case"second engineer":return u.Ru.get("track-credits.second-engineer");case"rhythm guitar":return u.Ru.get("track-credits.rhythm-guitar");case"bass guitar":return u.Ru.get("track-credits.bass-guitar");case"electric guitar":return u.Ru.get("track-credits.electric-guitar");case"dobro":return u.Ru.get("track-credits.dobro");case"instruments":return u.Ru.get("track-credits.instruments");case"vocal ensemble":return u.Ru.get("track-credits.vocal-ensemble");case"recording arranger":return u.Ru.get("track-credits.recording-arranger");case"arranger":return u.Ru.get("track-credits.arranger");case"steel guitar":return u.Ru.get("track-credits.steel-guitar");case"executive producer":return u.Ru.get("track-credits.executive-producer");case"additional production":return u.Ru.get("track-credits.additional-production");case"designer":return u.Ru.get("track-credits.designer");case"assistant mix engineer":return u.Ru.get("track-credits.assistant-mix-engineer");case"studio musician":return u.Ru.get("track-credits.studio-musician");case"voice performer":return u.Ru.get("track-credits.voice-performer");case"orchestra":return u.Ru.get("track-credits.orchestra");case"chamber ensemble":return u.Ru.get("track-credits.chamber-ensemble");case"additional percussion":return u.Ru.get("track-credits.additional-percussion");case"cajon":return u.Ru.get("track-credits.cajon");case"miscellaneous production":return u.Ru.get("track-credits.miscellaneous-production");case"backing vocals":return u.Ru.get("track-credits.backing-vocals");case"pedal steel":return u.Ru.get("track-credits.pedal-steel");case"additional producer":return u.Ru.get("track-credits.additional-producer");case"keyboard arrangements":return u.Ru.get("track-credits.keyboards-arrangements");case"saxophone":return u.Ru.get("track-credits.saxophone");case"sound engineer":return u.Ru.get("track-credits.sound-engineer");case"assistant remix engineer":return u.Ru.get("track-credits.assistant-remix-engineer");case"double bass":return u.Ru.get("track-credits.double-bass");case"co-writer":return u.Ru.get("track-credits.co-writer");case"pro tools":return u.Ru.get("track-credits.pro-tools");case"tape realization":return u.Ru.get("track-credits.tape-realization");case"ambient sounds":return u.Ru.get("track-credits.ambient-sounds");case"sound effects":return u.Ru.get("track-credits.sound-effects");case"harp":return u.Ru.get("track-credits.harp");case"cymbals":return u.Ru.get("track-credits.cymbals");case"vocal engineer":return u.Ru.get("track-credits.vocal-engineer");case"mellotron":return u.Ru.get("track-credits.mellotron");case"recorder":return u.Ru.get("track-credits.recorder");case"main artist":return u.Ru.get("track-credits.main-artist");case"production":return u.Ru.get("track-credits.production");case"artist":return u.Ru.get("track-credits.artist");case"vocals":return u.Ru.get("track-credits.vocals");case"featuring":return u.Ru.get("track-credits.featuring");case"featured artist":return u.Ru.get("track-credits.featured-artist");case"work arranger":return u.Ru.get("track-credits.work-arranger");case"mixing engineers":return u.Ru.get("track-credits.mixing-engineers");case"re-mixer":return u.Ru.get("track-credits.re-mixer");case"recording producer":return u.Ru.get("track-credits.recording-producer");case"co-mixer":return u.Ru.get("track-credits.co-mixer");case"bells":return u.Ru.get("track-credits.bells");case"pro tools editing":return u.Ru.get("track-credits.pro-tools-editing");case"vibraphone":return u.Ru.get("track-credits.vibraphone");case"additional recording":return u.Ru.get("track-credits.additional-recording");case"vocal producer":return u.Ru.get("track-credits.vocal-producer");case"sitar":return u.Ru.get("track-credits.sitar");case"cello":return u.Ru.get("track-credits.cello");case"flute":return u.Ru.get("track-credits.flute");case"horn":return u.Ru.get("track-credits.horn");case"brass band":return u.Ru.get("track-credits.brass-band");case"programming and keyboards":return u.Ru.get("track-credits.programming-and-keyboards");case"all instruments":return u.Ru.get("track-credits.all-instruments");case"programmed and arranged by":return u.Ru.get("track-credits.programmed-and-arranged-by");case"additional programmer":return u.Ru.get("track-credits.additional-programmer");case"recording and mixing":return u.Ru.get("track-credits.recording-and-mixing");case"engineer and mixer":return u.Ru.get("track-credits.engineer-and-mixer");case"vocal arranger":return u.Ru.get("track-credits.vocal-arranger");case"income participant":return u.Ru.get("track-credits.income-participant");default:return e}}const _V="main-trackCreditsModal-container",EV="main-trackCreditsModal-header",xV="main-trackCreditsModal-closeBtn",CV="main-trackCreditsModal-mainSection",SV="main-trackCreditsModal-originalCredits",AV="main-trackCreditsModal-sectionTitle",wV="main-trackCreditsModal-creditsGroup",IV="main-trackCreditsModal-creditsEntry",TV="main-trackCreditsModal-clickableCreditsEntry",NV="main-trackCreditsModal-sourceNames",RV="main-trackCreditsModal-additionalCredits",kV=(0,at.memo)((function(){const e=(0,nt.wA)(),{isOpen:t,trackUri:n}=(0,nt.d4)((e=>e.ui.trackCreditsModal)),i=n.split(":"),r=i[i.length-1],{data:s,error:a,loading:o}=(0,bV.Z)(fV,[r]),l=(0,at.useCallback)((()=>{e((0,et.P0)(!1,""))}),[e]),c=(0,Xi.vh)(),{isAnonymous:d}=(0,nt.d4)(ma.Ht),{spec:m,logger:p}=(0,Jr.r)(gV.i,{data:{uri:n}});return(0,ct.jsx)(Ga.A,{contentLabel:u.Ru.get("track-credits.label"),isOpen:t,onRequestClose:l,children:!o&&!a&&s&&(0,ct.jsxs)("div",{className:_V,children:[(0,ct.jsxs)("div",{className:EV,children:[(0,ct.jsx)(fr.E,{as:"h1",variant:"titleMedium",children:u.Ru.get("track-credits.label")}),(0,ct.jsx)("button",{"aria-label":u.Ru.get("close"),className:xV,onClick:l,children:(0,ct.jsx)(Wa,{width:18,height:18,fill:"white"})})]}),(0,ct.jsxs)("div",{className:CV,onScroll:d?()=>c.send((0,hV.s)({track_uri:n})):()=>c.send((0,pV.h)({track_uri:n})),children:[(0,ct.jsxs)("div",{className:SV,children:[(0,ct.jsx)(fr.E,{as:"h2",className:AV,variant:"bodyMediumBold",children:s.body.trackTitle}),s.body.roleCredits.map(((e,t)=>{const i=m.creditSectionFactory({position:t});return(0,ct.jsxs)("div",{className:wV,children:[(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmallBold",children:vV(e.roleTitle)}),e.artists.length>0?e.artists.map((({name:t,uri:r,externalUrl:s})=>s?(0,ct.jsx)("a",{href:s,draggable:!1,rel:"noopener noreferrer",onClick:()=>{const a=i.artistNameFactory({uri:r??""}).hitNavigateToExternalUri({destination:s});p.logInteraction(a),d?c.send((0,mV._)({track_uri:n,clickable_text:t,role:e.roleTitle,external_url:s})):c.send((0,dV.d)({track_uri:n,clickable_text:t,role:e.roleTitle,external_url:s}))},target:"_blank",className:TV,children:t},t):(0,ct.jsx)(fr.E,{className:IV,variant:"bodySmall",semanticColor:"textSubdued",children:t},t))):"-"]},e.roleTitle)})),(0,ct.jsxs)(fr.E,{as:"p",variant:"bodySmall",children:[u.Ru.get("track-credits.source"),":"," ",s.body.sourceNames.join(u.Ru.getSeparator())]})]}),s.body.extendedCredits&&s.body.extendedCredits.length>0&&(0,ct.jsxs)("div",{className:RV,children:[(0,ct.jsx)(fr.E,{as:"h3",className:AV,variant:"bodyMediumBold",children:u.Ru.get("track-credits.additional-credits")}),s.body.extendedCredits.map((e=>(0,ct.jsxs)("div",{className:wV,children:[(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmallBold",children:yV(e.roleTitle.toLowerCase())}),e.artists.map((t=>(0,ct.jsx)("a",{href:t.url,draggable:!1,rel:"noopener noreferrer",onClick:()=>{d||c.send((0,uV.L)({track_uri:n,clickable_text:t.name,role:e.roleTitle,external_url:t.url}))},target:"_blank",className:TV,children:t.name},t.name)))]},e.roleTitle))),(0,ct.jsxs)(fr.E,{as:"p",variant:"bodySmall",className:NV,semanticColor:"textSubdued",children:[u.Ru.get("track-credits.source"),":"," ",(0,ct.jsx)("a",{draggable:!1,rel:"noopener noreferrer",target:"_blank",href:"https://soundbetter.com",children:"SoundBetter"})]})]})]})]})})}));var OV=n(55569),PV=n.n(OV),jV=n(6039);function LV(){const e=document.createElement("canvas"),t=e.getContext("2d");return t&&(function(e){e.beginPath(),e.fillStyle="rgb(0, 200, 255)",e.arc(50,50,50,0,2*Math.PI,!0),e.fill(),e.stroke(),e.closePath()}(t),function(e){e.textBaseline="top",e.font="13pt Arial",e.textBaseline="alphabetic",e.fillStyle="rgb(255, 5, 5)",e.rotate(.8),e.fillText("random#$%^@£éú",4,17),e.fillStyle="rgb(165,205,5)",e.shadowBlur=8,e.shadowColor="green",e.fillRect(20,12,105,5)}(t)),e}const DV=()=>{const e=(0,Xi.vh)();return(0,at.useEffect)((()=>{const t=LV().toDataURL("image/png"),n=PV()(t);e.send((0,jV.u)({h:n}))}),[e]),null},UV=()=>{const e=(0,at.useRef)(!1);return!(0,a.NC)(Ie.x_7)||e.current?null:(e.current=!0,(0,ct.jsx)(DV,{}))};var MV=n(15222),BV=n(36960),FV=n(6490),HV=n(68013),VV=n(43480);let zV=null;const GV=()=>{const{verificationId:e,refetch:t}=(()=>{const[e,t]=(0,at.useState)(null),n=(0,Xi.vh)(),{isTrustedRef:i,isTrustedFn:r}=(0,VV.d)(),{data:s,refetch:a,error:o}=(0,Vg.I)({enabled:!1,queryKey:["fetchVerification"],queryFn:async()=>{const e=W.n.getInstance(),{body:t}=await(0,FV.Q)(e);return t}});return(0,at.useEffect)((()=>{s&&s.length>0&&(async()=>{await r();const e=s?.[0].id;t(e),n.send((0,MV.n)({id:e,method:"IN_APP_VERIFICATION_V0",is_trusted:i.current}))})(),o&&n.send((0,BV.D)({method:"IN_APP_VERIFICATION_V0",error_message:o instanceof HV.O?o.name:null,http_method:"get",http_path:"/verifications"}))}),[s,o,n,r,i]),{verificationId:e,refetch:a}})();return(0,Yt.p)(P.gd.UPDATE,(n=>{if(e)return;const i="number"==typeof n?.data?.positionAsOfTimestamp&&n.data.positionAsOfTimestamp>=0&&n.data.positionAsOfTimestamp<=1e3;!n?.data?.isPaused&&i&&function(){const e=performance.now();if(zV&&e-zV<6e5)return!1;return zV=e,!0}()&&t()})),e},WV=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(9742)]).then(n.bind(n,19742)))),KV=()=>{const e=(0,a.NC)(Ie.IqJ),[t,n]=(0,at.useState)(!1),i=GV();return(0,at.useEffect)((()=>{n(!!i)}),[i]),e&&t?(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(WV,{verificationId:`${i}`})}):null};function YV(){return null}function qV(){const[e]=(0,is.x)("lintHtmlWithCss",!1);let t;return t=YV,(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(t,{})})}const QV=(0,at.lazy)((async()=>{const{DsaModal:e}=await Promise.all([n.e(4151),n.e(9664)]).then(n.bind(n,89664));return{default:e}})),$V=at.memo((({isDesktop:e})=>{const t=(0,a.NC)(Ie.SeK,{loadingValue:!1}),n=(0,at.useRef)(null),i=(0,nt.d4)((e=>e.ui.deletePlaylistDialog)),r=(0,nt.d4)((e=>e.ui.deleteFolderDialog)),s=(0,nt.d4)((e=>e.ui.removeFromLibraryDialog)),o=(0,nt.d4)((e=>e.ui.premiumDialog)),l=(0,nt.d4)((e=>e.ui.loginToListenDialog)),c=(0,nt.d4)((e=>e.ui.signupToListenDialog)),u=(0,nt.d4)((e=>e.ui.improvedSignupPromptDialog)),d=(0,nt.d4)((e=>e.ui.removeDownloadsDialog)),m=(0,nt.d4)((e=>e.ui.clearCacheDialog)),p=(0,nt.d4)((e=>e.ui.renameFolderModal)),h=(0,nt.d4)((e=>e.ui.removeDownloadConfirmationDialog)),g=(0,nt.d4)((e=>e.ui.artistAboutDialog)),f=(0,nt.d4)((e=>e.ui.yourDJUpsellDialog)),b=(0,nt.d4)((e=>e.ui.dsaDialog)),v=(0,nt.d4)((e=>e.ui.trackCreditsModal)),y=(0,nt.d4)((e=>e.ui.createCoverArtModal));return(0,ct.jsxs)(ct.Fragment,{children:[i.isOpen&&(0,ct.jsx)(Ps.pZ,{value:"delete-playlist-modal",children:(0,ct.jsx)(XM,{})}),r.isOpen&&(0,ct.jsx)(Ps.pZ,{value:"delete-folder-modal",children:(0,ct.jsx)(WM,{})}),s.isOpen&&(0,ct.jsx)(Ps.pZ,{value:"delete-folder-modal",children:(0,ct.jsx)(hH,{})}),o.isOpen&&(0,ct.jsx)(Ps.pZ,{value:"premium-modal",children:(0,ct.jsx)(dH,{})}),l.isOpen&&(0,ct.jsx)(Ps.pZ,{value:"login-to-listen-modal",children:(0,ct.jsx)(JB,{})}),c.isOpen&&(0,ct.jsx)(Ps.pZ,{value:"signup-to-listen-modal",children:(0,ct.jsx)(cV,{})}),u.isOpen&&(0,ct.jsx)(Oj,{uri:u.uri}),d.isOpen&&(0,ct.jsx)(PU,{}),m.isOpen&&(0,ct.jsx)(jU,{}),p.isOpen&&(0,ct.jsx)(xH,{name:p.name,onRename:p.handleRename}),h.isOpen&&(0,ct.jsx)(kO,{...h}),g.isOpen&&(0,ct.jsx)(NO,{}),f.isOpen&&(0,ct.jsx)(Ps.pZ,{value:"your-dj-upsell-modal",children:(0,ct.jsx)(jp.tW,{})}),(0,ct.jsx)(sj,{}),(0,ct.jsx)(BU,{}),(0,ct.jsx)(lF,{}),(0,ct.jsx)(aF,{}),(0,ct.jsx)(wU,{}),(0,ct.jsx)(Vj,{}),t&&b.isOpen&&b.item&&(0,ct.jsx)(QV,{item:b.item}),(0,ct.jsx)(qH,{}),(0,ct.jsx)(KV,{}),(0,ct.jsx)(UV,{}),(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(rH,{})}),(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(sP,{})}),(0,ct.jsx)(IO.kS,{}),(0,ct.jsx)(lB,{}),(0,ct.jsx)(DB,{}),(0,ct.jsx)(zM,{}),e&&(0,ct.jsx)(tB,{}),(0,ct.jsx)(SM,{}),(0,ct.jsx)(PD.A,{languageSelectionModalRef:n}),(0,ct.jsx)(fM,{}),(0,ct.jsx)(cj,{}),(0,ct.jsx)(oj,{}),(0,ct.jsx)(MM,{}),(0,ct.jsx)(RB,{}),(0,ct.jsx)(OD,{}),(0,ct.jsx)(qV,{}),(0,ct.jsx)(SU,{}),(0,ct.jsx)(fB,{}),(0,ct.jsx)(QU,{}),v.isOpen&&(0,ct.jsx)(kV,{}),(0,ct.jsx)("div",{ref:n}),y.isOpen&&(0,ct.jsx)(ND,{name:y.name,uri:y.uri})]})}));var ZV=n(5172),XV=n(702),JV=n(10508),ez=n(13149),tz=n(37253),nz=n(30163),iz=n(12667);const rz="main-globalNav-searchInputSection",sz="uozPfgVVoIwfTp8aGiu1",az="main-globalNav-searchInputContainer",oz="TTmGm8qVTZIyhkzEGOqr",lz="SFAoASy0S_LZJmYZ3Fh9",cz="kJPt9Frupc8oKnAsjRJr",uz="hj_4wHxgXXHm6aI1zN9D",dz=({onSearch:e,handleSubmit:t,handleChange:n,handleKeyDown:i,handleFocus:r,handleClear:s,onLeadingIconClick:a,inputRef:o,value:l})=>{const{spec:c,logger:d}=(0,Jr.r)(Lg.x,{}),m=(0,cn.Zp)(),p="/search"===(0,cn.zy)().pathname,h=-1===o.current?.tabIndex;return(0,ct.jsx)("div",{className:rz,children:(0,ct.jsx)(ez.E,{className:gr()(az),onClick:a,value:l,iconLeading:(0,ct.jsx)(_s.Zp,{label:u.Ru.get("navbar.search"),children:h?(0,ct.jsx)(Xs.H,{className:oz,condensed:!0,iconOnly:Ck.C,"aria-label":u.Ru.get("navbar.search"),onClick:a}):(0,ct.jsx)(Ck.C,{className:oz,"aria-hidden":!0,size:"xlarge"})}),iconTrailing:""!==l?(0,ct.jsx)(_s.Zp,{label:u.Ru.get("search.a11y.clear-input"),children:(0,ct.jsx)(Xs.H,{className:cz,condensed:!0,iconOnly:co.M,"aria-label":u.Ru.get("search.a11y.clear-input"),onClick:s})}):(0,ct.jsx)("div",{className:uz,children:(0,ct.jsx)(_s.Zp,{label:u.Ru.get("browse"),children:(0,ct.jsx)(Xs.H,{condensedAll:!0,iconOnly:p?tz.q:nz.K,"aria-label":u.Ru.get("browse"),onClick:e=>{const t=c.browseButtonFactory().hitUiNavigate({destination:"spotify:app:search"});d.logInteraction(t),e.preventDefault(),e.stopPropagation(),m("/search",{state:{fromBrowse:!0}})},className:p?sz:""})})}),children:(0,ct.jsx)("form",{onSubmit:t,role:"search",children:(0,ct.jsx)(iz.Z,{"":"search-input",className:lz,type:"text",placeholder:e?u.Ru.get("search.search-for-label"):u.Ru.get("navbar.search"),value:l,ref:o,onKeyDown:i,onFocus:r,onChange:n})})})})},mz=at.memo((function({isSearchChipsEnabled:e=!1,onSearch:t=!0,onClick:n,onLeadingIconClick:i,inputRef:r}){const s=(0,cn.zy)(),a=(0,cn.Zp)(),o=(0,at.useRef)(null),l=r||o,c=(0,at.useRef)(null),u=(0,nt.wA)(),[{category:m,query:p},h]=(0,JV.o)(),[g,f]=(0,at.useState)(p),b=!!m,v=(0,Il.v7)(),y=s.pathname.startsWith("/recent-searches"),_=b||y,{spec:E,logger:x}=(0,Jr.r)(XV.F,{}),C=(0,Ra.YQ)(((t,n,i)=>{let r;if(i){const{interactionId:e}=x.logInteraction(i);r=e}e?h(t,m,!1,r):h(t,null,n,r),v.current&&(v.current.scrollTop=0)}),200),S=(0,at.useCallback)(((e=!1)=>{l.current!==document.activeElement&&(c.current=document.activeElement,l.current&&l.current.focus()),e&&l.current?.select()}),[l]);(0,RD.x)(d.W.SHOW_SEARCH,(()=>S(!0)));const A=s.pathname.startsWith("/search"),w=s?.state?.fromBrowse||!1;(0,at.useEffect)((()=>{!_&&t&&A&&!w&&(e&&p||S())}),[p,S,s.key,t,A,_,e,w]),(0,at.useEffect)((()=>{f(A?p:"")}),[A,p]);return(0,ct.jsx)(dz,{inputRef:l,onClick:n,onSearch:t,onLeadingIconClick:i,value:g,handleSubmit:e=>{e.preventDefault(),g&&x.logInteraction(E.keyStrokeSearch());const t=(0,j.o_)(g);if(t?.type===j.NQ.AD){const e=(0,j.cE)(t.id);if(t.id===e)return;u((0,kl.gt)(t.id))}else t?a(t.toURLPath(!0),{state:{preventMoveFocus:!0,redirectToHome:(0,j.cr)(t)}}):g||a("/search",{state:{preventMoveFocus:!0}});g&&v.current?.querySelector("h1, h2, h3, h4")?.focus()},handleChange:e=>{const t=e.currentTarget.value,n=E.keyStrokeChangeSearchQuery({searchQueryString:t});f(t),C(t,_,n)},handleKeyDown:e=>{if("Escape"===e.key)if(g){const e=E.hitTextClear();f(""),C("",_,e)}else l.current&&l.current.blur(),c.current instanceof HTMLElement&&c.current.focus()},handleFocus:()=>{e||!_&&t||C(g,_,null)},handleClear:()=>{l.current&&l.current.focus();const e=E.hitTextClear();f(""),C("",_,e)}})}));var pz=n(39205);const hz="Root__globalNav",gz="main-globalNav-link-icon",fz="main-globalNav-navLinkActive",bz="Dp3xccI7c2f_JSJ8OHYu",vz="M4MOhDLjSPUuMog9WxIM",yz="main-globalNav-historyButtonsContainer",_z="nmAHq8nfXRtoQmKU1gaF",Ez="main-globalNav-searchSection",xz="main-globalNav-searchContainer",Cz="axu7kRtHOzwIb8b14FT6",Sz="link-subtle",Az=({className:e})=>{const{spec:t,logger:n}=(0,Jr.r)(Lg.x,{}),i=(0,cn.Zp)(),r=(0,Il.v7)(),s=(0,cn.zy)(),a="/"===s.pathname||"/home"===s.pathname;return(0,ct.jsx)(_s.Zp,{label:u.Ru.get("view.web-player-home"),children:(0,ct.jsx)(Xs.H,{iconOnly:a?xk.x:Ek.H,className:gr()(e,gz,Sz,{[fz]:a}),"aria-label":u.Ru.get("view.web-player-home"),"":"home-button",onClick:()=>{const e=t.homeButtonFactory().hitUiNavigate({destination:"spotify:app:home"});a?r.current?.scrollTo({top:0,behavior:"smooth"}):(n.logInteraction(e),i("/"))}})})},wz=e=>{if(!e.current)return!1;return e.current.offsetWidth>400},Iz=e=>!!e.current&&(e.current===document.activeElement||""!==e.current.value),Tz=(e,t)=>!!e.current&&(e.current.offsetLeft<=t&&t<=e.current.offsetLeft+e.current.offsetWidth),Nz=e=>{const{spec:t,logger:n}=(0,Jr.r)(Lg.x,{}),i=(0,cn.zy)(),r=(0,cn.Zp)(),s=(0,at.useContext)(kn.A),o=(0,s_.c)(),l=(0,a.NC)(Ie.ttb);(0,at.useEffect)((()=>(s.setTitlebarHeight(ZV.uZ),()=>{s.setTitlebarHeight(ZV.Yw)})),[s]);const[c,u]=(0,at.useState)(!1),[d,m]=(0,at.useState)(!1),[p,h]=(0,at.useState)(!1),g=(0,at.useRef)(null),f=(0,at.useRef)(null),b=(0,at.useRef)(null),v=(0,at.useRef)(null),y=(0,at.useRef)(null),_=(0,at.useRef)(null),E=(0,at.useRef)(!1);(0,at.useEffect)((()=>{f.current&&(f.current.tabIndex=d&&!p?-1:0)}),[d,p]);const x=(0,at.useCallback)((({width:e})=>{e&&(_?.current&&e!==_.current&&(E.current=e>_.current),_.current=e),((e,t,n,i,r)=>{if(!n.current||!t.current||!e.current)return;const s=n.current,a=Math.max(350,Math.min(546,.5*s.offsetWidth)),o=Tz(e,s.offsetWidth/2-a/2)||Tz(e,s.offsetWidth/2+a/2)||Tz(t,s.offsetWidth/2-a/2)||Tz(t,s.offsetWidth/2+a/2);i!==o&&r(o)})(b,v,y,c,u),((e,t,n,i)=>{e.current&&(wz(e)&&!0===t&&n?i(!1):wz(e)||!1!==t||n||i(!0))})(g,E.current,d,m),((e,t,n)=>{e.current&&Iz(e)&&(t||n(!0))})(f,p,h)}),[p,d,c]);var C,S,A;(0,ry.w)({refOrElement:y,onResize:x}),C=v,S=()=>{y.current&&x({width:null})},A={subtree:!0,childList:!0},(0,at.useEffect)((()=>{if(C.current){const e=new MutationObserver(S);return e.observe(C.current,A),()=>e.disconnect()}return()=>{}}),[C,S,A]);const w=(0,at.useCallback)((()=>{if(!i.pathname.startsWith("/search")){const e=t.searchInputFactory().hitUiNavigate({destination:"spotify:app:search"});n.logInteraction(e),r("/search",{state:{preventMoveFocus:!0}})}}),[t,n,i,r]),I=(0,at.useCallback)((e=>{e?.preventDefault(),e?.stopPropagation(),Iz(f)||h(!p),(d&&!p||!d)&&(f.current?.focus(),w())}),[p,d,w]),T=l===Ie.ufd.CONTROL?pz.o:mz;return(0,ct.jsxs)("div",{className:gr()(hz,e.className,{[Cz]:c||d,searchInputCollapsed:d,forceExpandSearchInput:p}),ref:y,children:[(0,ct.jsxs)("div",{className:yz,ref:b,children:[o?(0,ct.jsx)(pC.N_,{to:"/",className:_z,children:(0,ct.jsx)(_k.G,{height:32,condensed:!0})}):(0,ct.jsx)(Ry,{responsive:!1,className:Sz}),l===Ie.ufd.HOME_NEXT_TO_NAVIGATION&&(0,ct.jsx)(Az,{className:vz})]}),(0,ct.jsx)("div",{className:Ez,children:(0,ct.jsxs)("div",{className:xz,ref:g,children:[l===Ie.ufd.HOME_NEXT_TO_SEARCH&&(0,ct.jsx)(Az,{className:bz}),(0,ct.jsx)(T,{inputRef:f,onLeadingIconClick:I,onClick:w,onSearch:!0,isSearchChipsEnabled:!0})]})}),(0,ct.jsx)(Sy,{className:Sz,ref:v})]})};var Rz=n(19793),kz=n(11856);const Oz=(0,at.createContext)(null);function Pz(){const e=(0,at.useContext)(Oz);if(null===e)throw new Error("Trying to use 'OverturePlaybackContext' without 'OverturePlaybackProvider'!");return e}const jz="playbackContainerWatchFeed",Lz=({children:e})=>{const[t,n]=(0,at.useState)((0,H.Ue)({videoPlayerContainer:`.${jz}`,audioPlayerContainer:`.${jz}`}));return(0,at.useEffect)((()=>()=>{t.stop(),t.removeAllListeners()}),[t]),(0,ct.jsx)(Oz.Provider,{value:t,children:e})};var Dz=n(12210),Uz=n(54657),Mz=n(23590),Bz=n(31470);const Fz=at.memo((function({uri:e,className:t,onClick:n=(()=>{}),size:i=aa.t.xs,placement:r}){const s=(0,zt.K)(),a=(0,$r.W)(),o=(0,at.useCallback)((()=>{a({intent:"add-to-queue",type:"click"}),s.addToQueue([{uri:e,uid:null}]),n()}),[a,s,e,n]),l=u.Ru.get("contextmenu.add-to-queue");return(0,ct.jsx)(_s.Zp,{label:l,placement:r,children:(0,ct.jsx)(Xs.H,{iconOnly:Bz.V,"aria-label":l,onClick:o,"":"add-button",size:i,className:t})})}));var Hz=n(83925),Vz=n(13855);function zz({playbackContainerClass:e,onError:t=(()=>{})}){const n=Pz(),[i,r]=(0,at.useState)(!1),{volume:s}=(0,Vz.n)();(0,at.useEffect)((()=>{s>=0&&n.setVolume(s)}),[n,s]),(0,at.useEffect)((()=>(n.on(N.LW.TRACK_LOADED,(()=>{const t=document.getElementsByClassName(e),n=t[0]?.querySelector("video");n&&(n.loop=!0,n.muted=!1,n.autoplay=!0)})),n.on(N.LW.ERROR,(e=>{e.data.error&&t(e.data.error),t(new Error("PreviewPlayback error"))})),n.on(N.LW.VOLUME_CHANGED,(({data:e})=>{r(0===e.volume)})),()=>{n.removeListener(N.LW.TRACK_LOADED),n.removeListener(N.LW.ERROR),n.removeListener(N.LW.VOLUME_CHANGED)})),[t,n,e]);return{playPreview:(0,at.useCallback)((e=>{const t=function(e){const t=e?.preview;return e?.uri&&t?.url?(0,N.a2)({uri:e.uri,format:"MP3",url:t.url}):null}(e);t&&n.playTracks([t],{paused:!1})}),[n]),toggleMute:(0,at.useCallback)((async()=>{n.setVolume(i?s||.7:0)}),[i,n,s]),isMuted:i}}const Gz=Spicetify.GraphQL.Definitions["watchFeedView"]=new Q.l("watchFeedView","query","3f7d47696b677be3b15977ae03f10db7fe2471ed1f8f8c994e835cc4b671ed04",null);function Wz(e){if("TrackResponseWrapper"===e.content.__typename&&"Track"===e.content.data.__typename){const n=e.content.data,i=function(e=[]){return e.find((e=>!!e.fileId))||null}(n.previews?.audioPreviews?.items);return{uri:n.uri,preview:i,title:n.name,album:n.albumOfTrack,artists:(t=n.artists.items,t.map((e=>({uri:e.uri,verified:e.profile.verified||!1,name:e.profile.name,avatar:e.visuals.avatarImage,saved:e.saved,listeners:e.stats.monthlyListeners})))),canvas:n.canvas,coverArt:n.albumOfTrack?.coverArt||null,sharingInfo:n.sharingInfo,hashtags:n.discoveryFeedHashtags}}var t;return null}const Kz={offset:0,previousItems:[]};const Yz=({artistUri:e,initialLibraryState:t})=>{const[n,i]=(0,qp.A)(e,t),r=(0,at.useCallback)((async()=>{try{await i(!n)}catch{}}),[n,i]),s=n?u.Ru.get("unfollow"):u.Ru.get("follow");return(0,ct.jsx)(Rx.W,{isFollowing:n,onClick:r,buttonText:s})};var qz=n(59088),Qz=n(78983);const $z=({iconSize:e="small",toggleMute:t,isMuted:n,className:i,labelPlacement:r})=>n?(0,ct.jsx)(_s.Zp,{label:u.Ru.get("playback-control.unmute"),placement:r,children:(0,ct.jsx)(Xs.H,{condensed:!0,onClick:t,"aria-label":u.Ru.get("playback-control.unmute"),className:i,children:(0,ct.jsx)(qz.X,{size:e})})}):(0,ct.jsx)(_s.Zp,{label:u.Ru.get("playback-control.mute"),placement:r,children:(0,ct.jsxs)(Xs.H,{condensed:!0,onClick:t,"aria-label":u.Ru.get("playback-control.mute"),className:i,children:[(0,ct.jsx)(Qz.C,{size:e}),(0,ct.jsx)(u_.J,{animated:!0,white:!0})]})}),Zz="JXh51ebDftiwM49U49IA",Xz="IId345zLSrSuzIWtN4Sd",Jz="u9Y5p18_czEwCmouik01",eG="yq8BQBHdFjByOaFPYXvr",tG="V795GKOEZNiChr8dJcD4",nG="ZLIuD8Osn1_kqFKrhn9p",iG="hkGfRF0HCFxIINgt3Mjz",rG="L_GK7Fy79LIWMIjV927Z",sG=()=>{const[e,t]=(0,at.useState)(!1);return(0,at.useLayoutEffect)((()=>{setTimeout((()=>t(!0)),200)}),[]),(0,ct.jsxs)("div",{className:gr()(Zz,{[Xz]:e}),children:[(0,ct.jsxs)("div",{className:Jz,children:[(0,ct.jsx)("div",{className:gr()(tG,nG)}),(0,ct.jsx)("div",{className:gr()(tG,iG)}),(0,ct.jsx)("div",{className:gr()(tG,nG)}),(0,ct.jsx)("div",{className:gr()(tG,rG)})]}),(0,ct.jsxs)("div",{className:eG,children:[(0,ct.jsx)("div",{className:gr()(tG,iG)}),(0,ct.jsx)("div",{className:gr()(tG,rG)}),(0,ct.jsx)("div",{className:gr()(tG,nG)}),(0,ct.jsx)("div",{className:gr()(tG,iG)})]})]})},aG="YHeDUF3aquXRxYmKOs1A",oG="Ul_Er3t8veggCi1APkwp",lG="fhmiZPVDhaOYIlNd7Myq",cG="sJnarE2UKqyhLo0LFNqy",uG="iQnF1gu0Mg2rGsKVHIFn",dG="rCxYvbE1hq2_VEMOM6M_",mG="cjZ23zZucJkKFMIrGZa4",pG="aaR1IsFisyCMP2Vh2qu7",hG="qgczwXDFdF_gy4gRs3LN";const gG=({parent:e,current:t})=>{const[n,i]=(0,at.useState)({shouldRender:!0,hasError:!1}),r=(0,$S.Eg)(t?.canvas?.fileId,t?.canvas?.uri)&&!n.hasError;(0,at.useEffect)((()=>{i({shouldRender:!0,hasError:!1})}),[t?.uri]);const s=(0,at.useCallback)((e=>{e&&i({shouldRender:!1,hasError:!0})}),[]);return e.current?(0,Ko.createPortal)((0,ct.jsxs)(ct.Fragment,{children:[r&&(0,ct.jsx)(pm.h,{renderInline:!0,menu:(0,ct.jsx)(Vw.P,{uri:t.uri}),children:(0,ct.jsx)("div",{className:oG,children:(0,ct.jsx)($S.Gg,{fileId:t.canvas?.fileId,canvasUri:t.canvas?.uri,className:lG,playerContainerClass:"canvasContainerWatchFeed",onError:s,playbackType:$S.RT.Loop})})}),null===t.canvas&&(0,ct.jsx)(sG,{})]}),e.current):null},fG=({items:e,position:t})=>{const n=[];for(let t=0;t<e.length;t++)n.push({uri:e[t].uri,imageSrc:(i=e[t],i.canvas?.thumbnail?.sources?i.canvas.thumbnail.sources.sort(((e,t)=>(t.width??0)-(e.width??0)))[0]?.url:i.coverArt?.sources.sort(((e,t)=>(t.width??0)-(e.width??0)))[0]?.url),isCoverArt:null===e[t].canvas});var i;const[r,s]=(0,at.useState)(!1),a=(0,at.useRef)(null),o=e[t]||null;return(0,at.useEffect)((()=>{a.current?.scrollIntoView({block:"center",inline:"nearest"})}),[o,t,r]),(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("div",{className:aG,tabIndex:-1,children:n.map(((e,n)=>e?.imageSrc?(0,ct.jsx)(pm.h,{renderInline:!0,menu:(0,ct.jsx)(Vw.P,{uri:e.uri}),children:(0,ct.jsx)("div",{ref:e=>{n===t&&(a.current=e,s(!0))},className:cG,children:(0,ct.jsx)("div",{className:hG,children:(0,ct.jsx)("div",{className:gr()(uG,{[mG]:e.isCoverArt,[dG]:n===t,[pG]:n<t&&e.isCoverArt}),children:(0,ct.jsx)(JT._,{loading:"lazy",src:e.imageSrc,radius:8,width:"100%"})})})})},n):null))}),r&&(0,ct.jsx)(gG,{parent:a,current:o})]})};var bG=n(55758);const vG="DJxOEatMU2PHk0cCYWoX",yG="FP_XXx0FMQPJEu3WzfpM",_G="JYvxp3Y58xF59FA7Mnaf",EG="dswEB5m2T6HF_Xqn2fKW",xG="BDm0FLizIyw3HftnKvVk",CG="mVDIyMki38fafzBYve3O",SG="AkStH5UDLsXzudcPz_J_",AG="YmJS4xMTXdNQLvbP2VAt",wG="rSocCr8RrRHyAsMiJQzb",IG="SliTY9e8oKOiypDQdhlw",TG="ceLnHLzAqi17OBKA5L3E",NG="KQvZL0gdpQhfxXSo4tJn",RG="ji0qx5PBc5_4aMgNLGrp",kG="NazSI1w8xaruwFqTP3sS",OG="C2YEbS4juQJW46HkQLyG",PG="sRQJtmvPhUf6jS4DTtuv",jG="Yo1pAwVrT2Gz53k6tHSN",LG="f8PJP4J4AaX3O2U7bFoL",DG="ZRarvpz5og3ifOVHzGOv",UG="RQaEu8T4LvqfvRmirqJy",MG="hK5DaTfJaFpo2BJuoy5k",BG="FVDlSph0IFDnHRZlftV0",FG="IjsZJ0qBvOBYxe7JBwWP",HG="Bf98DiMgF9BRLdcKiHzg",VG="wkkEUUDX9mU25yPI5XlC",zG="IuaCiindqh9Zl5JlB74m",GG="DibEaANbO0QDnic0pwnA",WG=({className:e})=>{const{progressMs:t,durationMs:n,animate:i}=function(){const e=Pz(),t=(0,at.useRef)(Date.now()),n=(0,at.useRef)(0),[i,r]=(0,at.useState)(0),[s,a]=(0,at.useState)(3e4),[o,l]=(0,at.useState)(!1);return e.on(N.LW.PROGRESS,(e=>{const i=Date.now();i-t.current>=500&&(r(e.data.position),t.current=i,e.data.position>n.current?l(!0):l(!1),n.current=e.data.position)})),e.on(N.LW.BEFORE_TRACK_LOAD,(()=>{r(0),l(!1)})),e.on(N.LW.DURATION_CHANGED,(e=>{a(e.data.duration)})),e.on(N.LW.TRACK_ENDED,(()=>{r(s)})),{progressMs:i,durationMs:s,animate:o}}();return(0,ct.jsx)(bG.z,{className:gr()(EG,e,{[CG]:i}),semanticColor:"essentialBase",value:100*t/n,dir:"ltr"})},KG="dcZW_YRCwhi9TTJMPxzX",YG="JSNVglrzXyqMjvBqTdjS",qG="HfPg2vA6Xn7iwiUnz1e9",QG="vWe6vr0rBY5E9eWjL4hm",$G="f7MX2BXkHu1edOXcPYc6",ZG="GMCJTC2SwK0uAZrugIfm",XG="LN31SBNtphm5YdIegKRN",JG=({children:e})=>(0,ct.jsx)("div",{className:KG,children:e}),eW=({children:e})=>{const[t,n]=(0,is.x)("watch-feed.dismissed-shortcut-onboarding",!1),i=(0,od.W)();if((0,at.useEffect)((()=>{const e=e=>{"?"===e.key&&n(!t)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[t,n]),t)return(0,ct.jsx)(ct.Fragment,{children:e});const r=(0,ct.jsxs)(bp.A,{colorSet:"announcement",popoverTitle:u.Ru.get("web-player.watch-feed.view.shortcuts.title"),children:[(0,ct.jsx)(Cj.Z,{variant:"ballad",className:QG,children:u.Ru.get("web-player.watch-feed.view.shortcuts.description")}),(0,ct.jsxs)("div",{className:$G,children:[(0,ct.jsxs)("div",{className:ZG,children:[(0,ct.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.previous")}),(0,ct.jsx)(JG,{children:(0,ct.jsx)(LO.J,{size:"small"})})]}),(0,ct.jsxs)("div",{className:ZG,children:[(0,ct.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.next")}),(0,ct.jsx)(JG,{children:(0,ct.jsx)(DO.y,{size:"small"})})]}),(0,ct.jsxs)("div",{className:ZG,children:[(0,ct.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.add-to-library")}),(0,ct.jsx)(JG,{children:(0,ct.jsx)(DO.y,{size:"small",className:YG})})]}),(0,ct.jsxs)("div",{className:ZG,children:[(0,ct.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.add-to-queue")}),(0,ct.jsx)(JG,{children:(0,ct.jsx)(DO.y,{size:"small",className:qG})})]}),(0,ct.jsxs)("div",{className:ZG,children:[(0,ct.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.mute-unmute")}),(0,ct.jsx)(JG,{children:(0,ct.jsx)("span",{className:XG,children:"M"})})]})]})]});return(0,ct.jsx)(fp.W,{overlay:r,onHide:()=>{n(!0)},placement:i?"topStart":"topEnd",children:e})};var tW=n(1648),nW=n(33432);const iW=({uri:e,moveUp:t,moveDown:n,toggleMute:i})=>{const r=(0,nW.i)(e),s=(0,zt.K)(),a=(0,cn.Zp)(),o=(0,nt.d4)((e=>e.platform.isDesktop)),[l,c]=(0,qp.A)(r),u=(0,$r.W)(),d=(0,at.useCallback)((()=>{u({targetUri:r,intent:l?"remove-from-library":"add-to-library",type:"key-press"}),c(!l)}),[l,u,r,c]),m=(0,at.useCallback)((()=>{u({intent:"add-to-queue",type:"key-press"}),s.addToQueue([{uri:e,uid:null}])}),[u,s,e]),p=(0,at.useCallback)((()=>{a(-1)}),[a]),h=(0,at.useCallback)((()=>{a(1)}),[a]);return(0,tW.Nx)(mg.gO.GO_BACKWARDS,p,o),(0,tW.Nx)(mg.gO.GO_FORWARDS,h,o),(0,tW.Nx)(mg.gO.WF_ADD_TO_LIBRRY,d),(0,tW.Nx)(mg.gO.WF_ADD_TO_QUEUE,m),(0,tW.Nx)(mg.gO.WF_MUTE_UNMUTE,i),(0,tW.Nx)(mg.gO.WF_GO_TO_PREVIOUS,t),(0,tW.Nx)(mg.gO.WF_GO_TO_NEXT,n),null},rW={intent:"share",type:"click",itemIdSuffix:"watchfeed/share"},sW="playbackContainerWatchFeed";function aW(e){const t=e?.extractedColors?.colorDark;if(t&&!t.isFallback)return t.hex}const oW=({hasNext:e,hasInteracted:t,moveDown:n,isRTL:i})=>{const r=u.Ru.get("web-player.watch-feed.view.next-button"),s=i?"right":"left",a=(0,at.useRef)(null);return(0,at.useLayoutEffect)((()=>{t&&a.current?.focus({preventScroll:!0})}),[t]),t?(0,ct.jsx)(_s.Zp,{label:r,placement:s,children:(0,ct.jsx)(Xs.H,{className:PG,"aria-label":r,label:r,disabled:!e,iconOnly:bh.r,onClick:()=>n(),ref:a})}):(0,ct.jsx)("div",{className:jG,children:(0,ct.jsx)(br.$,{className:LG,disabled:!e,colorSet:"invertedLight",iconTrailing:Dz.R,onClick:()=>n(),children:u.Ru.get("web-player.watch-feed.view.next-button")})})},lW=({sectionUri:e,discoveryFeedUri:t,firstItemUri:n,resumeOnClose:i})=>{const{close:r,open:s,updateLocationState:a}=(0,kz.P)(),o=(0,od.W)(),[l,c]=(0,at.useState)(!1),d=(0,cn.zy)(),m=(0,at.useRef)(),p=(0,CO.B2)(),{content:{title:h,items:g},error:f,fetchNextPage:b,isFetching:v}=function(e){const{sectionUri:t,discoveryFeedUri:n,firstItemUri:i}=e,r=(0,nt.d4)(tc.JJ),{request:s}=(0,at.useContext)(ci.j),{data:a,error:o,isFetching:l,fetchNextPage:c}=(0,qg.q)({queryKey:["watch-feed","view",t,n,i],queryFn:({pageParam:e})=>(0,tb.c)(s,Gz,{sp_t:(0,V.v8)("sp_t")??"",country:r,discoveryFeedUri:n,uri:t,firstItemUri:e.offset?"":i??"",offset:e.offset,limit:40,previousItems:e.previousItems}),gcTime:18e5,staleTime:3e5,initialPageParam:Kz,getNextPageParam:(e,t)=>{const n=t.reduce(((e,t)=>("HomeSectionCollection"===t?.data?.homeSections.__typename&&t.data.homeSections.sections.forEach((t=>{"HomeSection"===t.__typename&&"HomeWatchFeedSectionData"===t.data?.__typename&&(e.offset=t.sectionItems.pagingInfo.nextOffset??0,e.previousItems=e.previousItems.concat(t.sectionItems.items.map((e=>Wz(e)?.uri??null)).filter((e=>null!==e))))})),e)),{...Kz});if(0!==n.offset)return n}});return{content:(0,at.useMemo)((()=>a?.pages?a.pages.reduce(((e,t)=>{const n=t?.data?.homeSections;if("HomeSectionCollection"===n?.__typename){let t=e.title;return n.sections.forEach((n=>{"HomeSection"===n.__typename&&"HomeWatchFeedSectionData"===n.data?.__typename&&(t=n.data.title?.transformedLabel||null,n.sectionItems.items.forEach((t=>{const n=Wz(t);n&&e.items.push(n)})))})),{items:e.items,title:t}}return e}),{items:[],title:null}):{items:[],title:null}),[a]),error:o,isFetching:l,fetchNextPage:c}}({sectionUri:e,discoveryFeedUri:t,firstItemUri:n}),[y,_]=(0,at.useState)(0),E=(0,at.useCallback)((()=>{const e=y-1;c(!0),g[e]&&_(e)}),[g,y]),x=(0,at.useCallback)((()=>{const e=y+1;c(!0),g[e]&&_(e)}),[g,y]),C=g[y]||null,{playPreview:S,toggleMute:A,isMuted:w}=zz({playbackContainerClass:sW});(0,at.useEffect)((()=>{!f&&C&&function(e,t,n){return e>=t-5&&!(t>50)&&!n}(y,g.length,v)&&b()}),[f,C,y,v,g,b]),(0,at.useEffect)((()=>{m.current?d.pathname!==m.current?r({resumePlayback:i,forceClose:!0}):C?.uri&&C.uri!==d.state?.lastViewedItemUri&&a({lastViewedItemUri:C.uri,sectionUri:e,discoveryFeedUri:t}):m.current=d.pathname}),[r,d,i,C,a,e,t]),(0,at.useEffect)((()=>{S(C)}),[C,S]),(0,at.useEffect)((()=>{_(0)}),[t]),(0,at.useEffect)((()=>{const e=e=>{if("Escape"===e.key){e.target instanceof HTMLElement&&e.target.closest(`#${Mz.v}`)||r({resumePlayback:i})}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[i,r]);const I=Boolean(g[y-1]),T=Boolean(g[y+1]),N=(0,at.useMemo)((()=>{const e=u.Ru.get("web-player.watch-feed.view.previous-button"),t=o?"right":"left";return I?(0,ct.jsx)(_s.Zp,{label:e,placement:t,children:(0,ct.jsx)(Xs.H,{className:OG,"aria-label":e,label:e,iconOnly:fh.o,onClick:()=>E()})}):null}),[I,E,o]);if(f||!C)return null;const R=C?.artists[0],k=(O=C,O.coverArt?.sources.sort(((e,t)=>(e.width??0)-(t.width??0)))[0]?.url);var O;const P={backgroundColor:aW(C?.coverArt)||Ab.gray50},j=o?"right":"left";return(0,ct.jsx)(Ms.s,{children:(0,ct.jsx)("div",{className:vG,onClick:()=>r({resumePlayback:i}),role:"presentation",children:(0,ct.jsxs)("div",{style:P,className:yG,onClick:e=>{e.stopPropagation()},role:"presentation",tabIndex:-1,children:[(0,ct.jsxs)("div",{className:_G,children:[(0,ct.jsxs)("div",{className:MG,children:[(0,ct.jsx)("div",{className:SG,children:(0,ct.jsx)(fr.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:h})}),(0,ct.jsxs)("div",{className:BG,children:[(0,ct.jsx)(pm.h,{renderInline:!0,menu:(0,ct.jsx)(Vw.P,{uri:C.uri}),children:(0,ct.jsx)(fr.E,{variant:"titleMedium",semanticColor:"textBase",children:C.title})}),(0,ct.jsx)(pm.h,{renderInline:!0,menu:C.album?.uri?(0,ct.jsx)(ZD.h,{uri:C.album?.uri}):null,children:(0,ct.jsx)(fr.E,{variant:"bodyMedium",children:C.album?.name})}),(0,ct.jsxs)("div",{className:TG,children:[C.canvas&&k&&(0,ct.jsx)(pm.h,{renderInline:!0,menu:C.album?.uri?(0,ct.jsx)(ZD.h,{uri:C.album?.uri}):null,children:(0,ct.jsx)(Pj._,{src:k,className:NG})}),(0,ct.jsx)(WG,{className:gr()({[xG]:C.canvas&&k})})]})]}),(0,ct.jsxs)("div",{className:FG,children:[(0,ct.jsx)(pm.h,{renderInline:!0,menu:(0,ct.jsx)(Fw.t,{uri:R.uri,isInLibrary:R.saved}),children:(0,ct.jsxs)("div",{className:HG,children:[(0,ct.jsx)(Ef.e,{label:R.name,images:R.avatar?.sources||[],width:32,userIconSize:"small"}),(0,ct.jsxs)("div",{className:zG,children:[(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:(0,ct.jsx)(pC.N_,{to:R.uri,children:R.name})}),R.listeners&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:"•"}),(0,ct.jsx)(fr.E,{variant:"bodySmall",semanticColor:"textSubdued",children:u.Ru.formatNumber(R.listeners,{notation:"compact",maximumFractionDigits:0})})]})]}),(0,ct.jsx)(Yz,{artistUri:R.uri,initialLibraryState:R.saved})]})}),(0,ct.jsx)(Uz.I,{mode:"action","aria-label":"Hashtags",children:C.hashtags.map(((t,n)=>(0,ct.jsx)(zI.v,{onClick:()=>s(e,t.uri),children:(0,ct.jsx)("span",{className:VG,children:t.title})},n)))})]})]}),(0,ct.jsxs)("div",{className:DG,children:[(0,ct.jsx)(fG,{items:g,position:y}),(0,ct.jsx)("div",{className:UG,ref:p})]}),(0,ct.jsxs)("div",{className:RG,children:[(0,ct.jsxs)("div",{className:AG,children:[(0,ct.jsx)($z,{toggleMute:A,isMuted:w,className:wG,labelPlacement:j}),(0,ct.jsx)(Xs.H,{iconOnly:co.M,onClick:()=>r({resumePlayback:i}),"aria-label":"Close"})]}),(0,ct.jsxs)("div",{className:IG,children:[(0,ct.jsx)(ws.b,{renderInline:!0,placement:j,menu:(0,ct.jsx)(Vw.P,{uri:C.uri,sharingInfo:C.sharingInfo}),children:(0,ct.jsx)(dd.e,{size:dd.M.md,label:u.Ru.get("more.label.context",C.title),placement:j})}),(0,ct.jsx)(Hz.w,{uri:C.uri,placement:j,interactionData:rW,sharingInfo:null,size:"large"}),(0,ct.jsx)(Fz,{uri:C.uri,size:"large",placement:j}),(0,ct.jsx)(Xp.g,{uri:C.uri,size:aa.t.md,labelPlacement:j,menuPlacement:j})]}),(0,ct.jsxs)("div",{className:kG,children:[N,(0,ct.jsx)(oW,{hasNext:T,hasInteracted:l,moveDown:x,isRTL:o}),(0,ct.jsx)("div",{className:sW}),(0,ct.jsx)(iW,{moveUp:E,moveDown:x,toggleMute:A,uri:C.uri})]})]})]}),(0,ct.jsx)(eW,{children:(0,ct.jsx)("div",{className:GG})})]})})})};const cW=()=>{const{isOpen:e,sectionUri:t,discoveryFeedUri:n,firstItemUri:i,resumeOnClose:r}=(0,nt.d4)((e=>e.ui.watchFeedViewState));return function(){const e=(0,cn.zy)(),{isOpen:t}=(0,nt.d4)((e=>e.ui.watchFeedViewState)),{open:n}=(0,kz.P)();(0,at.useEffect)((()=>{(function(e,t){return e.state?.discoveryFeedUri&&e.state.sectionUri&&e.state.lastViewedItemUri&&!t})(e,t)&&n(e.state.sectionUri,e.state.discoveryFeedUri,e.state.lastViewedItemUri)}),[e,t,n])}(),e?(0,ct.jsx)(Lz,{children:(0,ct.jsx)(lW,{sectionUri:t,discoveryFeedUri:n,firstItemUri:i,resumeOnClose:r})}):null},uW=In.$S.PANEL_CLOSE_CLICK_OR_COLLAPSE,dW=In.$S.NPV_BUTTON_CLICK,mW=({elementRef:e})=>{const{item:t}=(0,Fr.o)((e=>({item:e?.item})),((e,t)=>e.item?.uri===t.item?.uri)),{spec:n,logger:i}=(0,Jr.r)($y.t,{data:{uri:t?.uri??""}}),r=(0,Fo._Y)(),{min:s,max:o,size:l,setSize:c}=(0,Fo.Zf)(),d=(0,Fo.Ev)(dW),m=(0,a.NC)(Ie.CI6),p=(0,Fo.XB)(),h=(0,od.W)(),g=(0,at.useCallback)(((e,t)=>{e!==t&&i.logInteraction(n.npvUiResizeFactory().dragUiResize({startSizePx:e,endSizePx:t}))}),[i,n]),f=(0,at.useMemo)((()=>({onCollapse:e=>{r(uW,e)},onExpand:e=>{r(dW,e)}})),[r]);return d||p!==Ho.Z.Disabled?(0,ct.jsx)(vg,{elementRef:e,placement:"inline-start",label:u.Ru.get("resize.sidebar"),cssCustomProperty:"--panel-width",onCSSPropertyChange:e=>{c(e)},initialValue:l,min:s,max:o,decreaseSizeKeyboardCombination:h?mg.gO.YLX_SIDEBAR_DECREASE_WIDTH:mg.gO.NPV_SIDEBAR_DECREASE_WIDTH,increaseSizeKeyboardCombination:h?mg.gO.YLX_SIDEBAR_INCREASE_WIDTH:mg.gO.NPV_SIDEBAR_INCREASE_WIDTH,afterResizing:g,collapseEvents:m?f:void 0,isClosed:p===Ho.Z.Disabled,canDragOpen:d,contentId:"Desktop_PanelContainer_Id"}):(0,ct.jsx)(ct.Fragment,{})},pW=({children:e})=>{const[t,n]=(0,at.useState)(!1),[i,r]=(0,at.useState)(""),s=(0,at.useRef)(null),a=(0,ii.L)(),o=ER(),l=(0,nt.wA)(),c=(0,at.useCallback)((e=>{t?(o(i),r(""),n(!1),l((0,et.np)())):(e&&r(e),a.getCapabilities().supportsLocalDiscovery&&a.updateListOfDevices(),n(!0),l((0,et.ae)()))}),[t,o,l,i,a]),u=(0,at.useMemo)((()=>({triggerRef:s,toggleDevicePicker:c,isPickerOpen:t})),[c,t]);return(0,ct.jsx)(Ec.Provider,{value:u,children:e})},hW=()=>((0,tW.qV)(),null),gW=()=>(0,nt.d4)((e=>e.ui.watchFeedViewState.isOpen))?null:(0,ct.jsx)(hW,{}),fW=e=>{const{accessTokenIsSet:t,onClose:n,onBrowserNotSupported:i,onCloseFullscreenMode:r,onCloseWatchFeed:s,onReachUsableState:o,isVideoSupported:l,isDesktop:c,billboardMinimized:d,isDeveloperMode:h,adsEnabled:g,children:f}=e,b=(0,at.useContext)(kn.A),v=(0,p.My)(),y=v===m.m.Desktop,_=(0,at.useRef)(null),E=(0,at.useRef)(null),x=(0,at.useRef)(null),S=(0,at.useRef)(null),A=(0,at.useRef)(null),w=(0,at.useRef)(null),I=(0,at.useRef)(null),T=(0,at.useRef)(null),N=(0,at.useRef)(null),R=(0,at.useRef)(null),k=(0,at.useRef)(null),P=(0,at.useRef)(null),j=EO(),L=(0,Mg.A)(),D=(0,a.NC)(Ie.rWU),U=function(e,t){return e!==m.m.Desktop&&(e!==m.m.PWA&&("/lyrics"!==t.pathname&&!(0,Gf.g)()))}(v,(0,cn.zy)());(e=>{const t=(0,cn.Zp)();(0,at.useEffect)((()=>{const n=n=>{e&&(3===n.button?t(-1):4===n.button&&t(1))};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}}),[e,t])})(y),Ng(!h),(({onBrowserNotSupported:e,onReachUsableState:t})=>{(0,at.useEffect)((()=>{const n=C().getParser(window.navigator.userAgent);n.satisfies({chrome:"<62"})||n.satisfies({edge:"<16"})?e(u.Ru.get("browser_upgrade_notice",n.getBrowserName())):t("home")}),[e,t])})({onBrowserNotSupported:i,onReachUsableState:o}),ek();const{handleDrop:M,handleDragStart:B,handleDragEnd:F,handleDragOver:H}=(()=>{const e=(0,at.useCallback)((e=>{e.preventDefault(),document.body.removeAttribute("data-dragging-type")}),[]),t=(0,at.useCallback)((e=>{document.body.removeAttribute("data-dragging-type")}),[]),n=(0,at.useCallback)((e=>{e.preventDefault()}),[]);return{handleDrop:e,handleDragStart:(0,at.useCallback)((e=>{e.target instanceof Element&&"true"!==e.target.getAttribute("draggable")&&(e.preventDefault(),e.stopPropagation())}),[]),handleDragEnd:t,handleDragOver:n}})();(()=>{const e=(0,bt.jE)();(0,xO.L)((()=>{e.invalidateQueries({queryKey:["useAddToPlaylistListData"]})}))})(),(()=>{const e=(0,at.useRef)(!0),t=(0,Yv.p)(),n=(0,bt.jE)();(0,at.useEffect)((()=>{e.current?e.current=!1:(n.invalidateQueries(),n.removeQueries({type:"inactive"}))}),[t,n])})(),(0,at.useEffect)((()=>{window&&window.history&&window.history.scrollRestoration&&(window.history.scrollRestoration="manual")}),[]),(0,at.useEffect)((()=>{b.notifyReadyStateReached()}),[b]);const V=(0,at.useMemo)((()=>[(0,ct.jsx)(Sg,{scrollNodeRef:k,scrollNodeChildRef:P}),(0,ct.jsx)(Ay.X,{}),(0,ct.jsx)(Yo.ZC,{mainLandmarkRef:E,lyricsCinemaRef:w,leftSidebarRef:N,rightSidebarRef:R,nowPlayingBarRef:S}),(0,ct.jsx)(zl,{}),(0,ct.jsx)(pW,{}),(0,ct.jsx)(Rr.k,{}),(0,ct.jsx)(Gr,{}),(0,ct.jsx)(Ag.$,{}),(0,ct.jsx)(Tg,{}),(0,ct.jsx)(Rg.JI,{}),(0,ct.jsx)(XR.Ad,{}),(0,ct.jsx)(dO.n,{instance:j}),(0,ct.jsx)(CO.n,{domRootRef:T}),(0,ct.jsx)(Rz.F,{})]),[j]),z=(0,nt.d4)((e=>e.ui.unsupportedBrowser));return(0,ct.jsxs)(qi,{providers:V,children:[(0,ct.jsxs)("div",{"":"root",className:gr()("Root",{"circular-sp-vietnamese":D,"global-nav":L}),style:{"--panel-gap":`${ns.KV}px`},onDrop:M,onDragOver:H,onDragStart:B,onDragEnd:F,ref:_,children:[(0,ct.jsx)(Jl,{message:z.isOpen?z.message:null,allowHTML:!0,onClose:n,isNotSupported:!0}),(0,ct.jsxs)(hk,{children:[L&&(0,ct.jsx)(Nz,{}),(0,ct.jsxs)(yk,{children:[(0,ct.jsx)(Kk,{}),(0,ct.jsx)(Eg,{elementRef:N})]}),(0,ct.jsx)(eO,{children:(0,ct.jsx)(cg,{})}),(0,ct.jsxs)(qk,{children:[(0,ct.jsx)(Ps.pZ,{value:"top-bar",children:(0,ct.jsx)(Ly,{})}),(0,ct.jsxs)("div",{className:"main-view-container",children:[(0,ct.jsx)("div",{className:"under-main-view"}),(0,ct.jsxs)(id.a,{className:"main-view-container__scroll-node",onInstanceCreated:e=>{k.current=e.elements().viewport},children:[!L&&(0,ct.jsx)("div",{className:"main-view-container__scroll-node-child-spacer"}),(0,ct.jsx)("div",{ref:P,className:gr()("main-view-container__scroll-node-child"),style:{minHeight:"calc(100vh - 64px - 90px - 519px)"},children:(0,ct.jsx)(Fy,{ref:E,children:(0,ct.jsxs)(rt.s,{FallbackComponent:()=>(0,ct.jsx)(ug.o,{}),onError:e=>(0,O.Jy)(e,"Root"),children:[f,U&&(0,ct.jsx)("div",{className:"main-view-container__mh-footer-container",children:(0,ct.jsx)(ZR,{})})]})})})]}),l&&(0,ct.jsx)(Hl,{fullscreenModeRef:I,cinemaModeRef:A,npbVideoAdRef:x})]}),(0,ct.jsx)(qR,{}),t&&g&&(0,ct.jsx)(lo,{}),c&&(0,ct.jsx)("div",{className:gr()("",{"Root__ads-container-desktop--is-hidden":!d}),children:(0,ct.jsx)(eo,{})}),(0,ct.jsx)("div",{className:"Root__modal-slot"})]}),(0,ct.jsxs)(Xk,{children:[(0,ct.jsx)(at.Suspense,{fallback:null,children:(0,ct.jsx)(zR,{})}),(0,ct.jsx)(mW,{elementRef:R})]}),(0,ct.jsx)("div",{id:"lyrics-cinema",className:"Root__lyrics-cinema",ref:w}),(0,ct.jsx)(fk,{ref:A}),(0,ct.jsx)(fk,{ref:T}),(0,ct.jsx)($k,{children:(0,ct.jsx)("div",{className:"VTO__modal-slot"})})]}),(0,ct.jsx)($V,{isDesktop:c}),(0,ct.jsx)(rt.s,{onError:e=>{s(),(0,O.Jy)(e,"WatchFeedView")},children:(0,ct.jsx)(cW,{})}),(0,ct.jsx)(rt.s,{onError:e=>{r(),(0,O.Jy)(e,"FullscreenMode")},children:(0,ct.jsx)(Pa,{videoRef:I})}),(0,ct.jsx)(uO,{}),(0,ct.jsx)(wO,{pipInstance:j})]}),(0,ct.jsx)(Nr,{}),(0,ct.jsx)(gW,{})]})};const bW=function({children:e}){const t=(0,cn.Zp)(),n=(0,cn.zy)(),i=(0,nt.wA)(),r=(0,Xi.mv)(),s=(0,nt.d4)((e=>e.session.accessToken)),a=(0,nt.d4)((e=>e.ui.errorPage)),o=(0,at.useContext)(kn.A),l=(0,nt.d4)((e=>e.platform.isDesktop?e.ads.root.adsEnabled:!!e.session.productState?.ads&&1===parseInt(e.session.productState.ads,10))),c=(0,nt.d4)((e=>!!e.ads.billboard&&e.ads.billboard.isMinimized)),{isDesktop:u,isDeveloperMode:d,isVideoSupported:m}=(0,nt.d4)((e=>e.platform)),p=a.isError,h=a.name,g=!!s;(0,at.useEffect)((()=>{i(et.yk())}),[i]),(0,at.useEffect)((()=>{o.notifyViewLoaded(n.pathname)}),[o,n.pathname]);const f=mt();(0,at.useEffect)((()=>{f?.registerMainWindowCallbacks(document,window)}),[f]);const b=(0,$f.V)();(0,at.useEffect)((()=>{mr({locationSearch:n.search,navigate:t,logDialog:()=>{r.getEventSender().send(dr(b,{os:(0,S.f)()}))},showDialog:()=>{i(et.mi())}})}),[i,n.search,t,r,b]),(0,at.useEffect)((()=>{ar({isPremiumUser:!1,locationSearch:n.search,navigate:t,logNavigation:()=>r.getEventSender().send((0,rr.Q)({category:"open",action:"pageview",label:"login",destination_url:"open.spotify.com",os:(0,S.f)()})),showDialog:()=>{i(et.Jp())}})}));const v=(0,at.useContext)(kn.A),y=(0,at.useCallback)((e=>{v.notifyUsableStateReached(e)}),[v]),_=(0,at.useCallback)((()=>{i(et.BZ())}),[i]),E=(0,at.useCallback)((e=>{i(et.Gz(e))}),[i]),x=(0,at.useCallback)((()=>{i(et.rF())}),[i]),C=(0,at.useCallback)((()=>{i(et.X0())}),[i]);return p?(0,ct.jsx)(Ar,{errorName:h}):(0,ct.jsx)(fW,{billboardMinimized:c,isVideoSupported:m,onReachUsableState:y,accessTokenIsSet:g,onClose:_,onBrowserNotSupported:E,onCloseFullscreenMode:x,onCloseWatchFeed:C,isDesktop:u,isDeveloperMode:d,adsEnabled:l,children:e})};var vW=n(98832);const yW="auth_redirect";function _W(e,t){return t?`spotify:playlist-format:${e}:${t}`:`spotify:playlist-format:${e}`}const EW={uri:null,error:null};function xW(e,t){switch(t.type){case"SUCCESS":return{...e,uri:t.uri};case"FAILURE":return{...e,error:t.error};default:throw new Error}}const CW=({isAnonymous:e,playlistFormatURI:t})=>{const n=(0,at.useContext)(wi.w),[i,r]=(0,at.useReducer)(xW,EW);if((0,at.useEffect)((()=>{e&&window.location.hash!==`#${yW}`?(window.location.hash=yW,(0,Le.PW)()):n.resolvePlaylistFormatURI(t).then((e=>r({type:"SUCCESS",uri:e}))).catch((e=>r({type:"FAILURE",error:e})))}),[n,e,t,r]),null!==i.uri){const e=(s=i.uri,(0,j.o_)(s).id);return(0,ct.jsx)(vW.InstrumentedRedirect,{to:`/playlist/${e}`})}var s;return(0,ct.jsx)(ir.A,{hasError:null!==i.error,errorMessage:u.Ru.get("error.not_found.title.playlist"),timeoutInMs:5e3})},SW=at.memo((function({isAnonymous:e}){const{title:t="",category:n}=(0,cn.g)();return(0,ct.jsx)(CW,{isAnonymous:e,playlistFormatURI:_W(t,n)})}));var AW=n(80833),wW=n(69283),IW=n(32264),TW=n(52963),NW=n(12464),RW=n(55732),kW=n(84958),OW=n(9997),PW=n(98756);const jW=()=>{const e=(0,cn.zy)(),{uri:t,playlistName:n}=e.state,i=RW.ui.MUSIC_SEE_ALL,{data:r,error:s,getLeavebehinds:a}=(0,kW.A)({surface:i,uri:t,playlistName:n});if((0,at.useEffect)((()=>{a()}),[]),!r?.leavebehindAds||s)return null;const o=(0,OW.iT)(r,t);return(0,ct.jsx)("div",{className:"contentSpacing",children:(0,ct.jsx)(PW.o,{leavebehinds:o.slice(0,OW.E9),surface:i,uri:t})})};var LW=n(52134),DW=n(45876),UW=n(33523);const MW=(0,at.lazy)((()=>n.e(8865).then(n.bind(n,40142)).then((e=>({default:e.AlbumPrerelease}))))),BW=e=>(0,ct.jsx)(UW.e,{pageId:Kw.$h.PRERELEASE,children:e}),FW=()=>{const{id:e}=(0,cn.g)();if(!e)return BW((0,ct.jsx)(ir.A,{hasError:!0,errorMessage:u.Ru.get("error.not_found.title.album")}));const t=(0,j.js)(e);return BW((0,ct.jsx)(MW,{uri:t.toString()},e))},HW=()=>(0,a.NC)(Ie.xnZ,{loadingValue:!1})?(0,ct.jsx)(cn.qh,{path:"/prerelease/:id",element:(0,ct.jsx)(FW,{})},"album-prerelease"):(0,ct.jsx)(cn.qh,{path:"/prerelease/:id",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},"album-prerelease"),VW=()=>[(0,ct.jsx)(cn.qh,{path:"/watch-feed/artist-videos",element:(0,ct.jsx)(Sr,{errorName:"artist_videos_not_supported"})},"artist-videos")];function zW(e){return`spotify:section:${e.replace(/^section/,"")}`}const GW=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(6266)]).then(n.bind(n,27967)).then((e=>({default:e.BrowsePage}))))),WW=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(6266)]).then(n.bind(n,70873)).then((e=>({default:e.BrowseSection}))))),KW=({id:e})=>{if(e.startsWith("section"))return(0,ct.jsx)(WW,{uri:zW(e)});const t=function(e){return/^(section)?[0-9A-Za-z_-]{22}$/.test(e)}(e)?function(e){return`spotify:page:${e}`}(e):function(e){return`spotify:genre:${e}`}(e);return(0,ct.jsx)(GW,{uri:t,id:e})},YW=e=>`spotify:cultural-moment:hub:${e}`,qW=at.lazy((()=>Promise.all([n.e(4151),n.e(3838)]).then(n.bind(n,5051)))),QW=()=>{const{id:e=""}=(0,cn.g)();return(0,ct.jsx)(qW,{uri:YW(e),id:e})};var $W=n(98620),ZW=n(16906),XW=n(68104),JW=n(43329),eK=n(43603);const tK=()=>{const e=(0,cn.zy)();return new URLSearchParams(e.search).get("facet")||""},nK="cj6vRk3nFAi80HSVqX91",iK="hIFR8WDm_54EEIa1gwpC",rK="fIvMht6B9HdROywMNJZ4",sK="mjZrvVI3CxfHJXu7y0Lg",aK="LVMjmN2CaPruPAo62RAY",oK=at.memo((({filterChips:e})=>{const t=(0,cn.Zp)(),n=tK(),{spec:i,logger:r}=(0,Jr.r)(ZW.Y,{data:{identifier:"home",uri:n?`spotify:home?facet=${n}`:"spotify:home"}}),s=e.flatMap((e=>e.id&&"wrapped-chip"!==e.id?{id:e.id,getName:()=>e.label?.text??"",ubiId:e.id}:[])),a=(0,at.useCallback)((e=>{const s=i.homeSubfeedsFactory();if(e&&e!==n){const n=s.filterChipFactory({identifier:e});r.logInteraction(n.hitFilter()),t(`/home?facet=${e}`)}else{const e=s.filterChipFactory({identifier:"all"});r.logInteraction(e.hitFilter()),t("/")}}),[i,r,t,n]),o=(0,Ra.YQ)(a,100,{leading:!0,trailing:!1});return(0,ct.jsx)("div",{className:aK,children:(0,ct.jsxs)(XW.F,{ariaLabel:u.Ru.get("home.filters"),children:[(0,ct.jsx)(zI.v,{"aria-label":u.Ru.get("search.title.all"),selectedColorSet:"invertedLight",onClick:()=>o(null),selected:""===n,children:u.Ru.get("search.title.all")},"all"),s.map((e=>(0,ct.jsx)(zI.v,{"aria-label":e.getName(),selectedColorSet:"invertedLight",onClick:()=>o(e.id),selected:Boolean(n&&n===e.id),children:e.getName()},e.id)))]})})})),lK=()=>{const e=(0,Yv.p)(),t=(0,a.NC)(Ie.kSk),n=kg(),i=(0,Il.v7)(),{ref:r,inView:s}=(0,Wg.Wx)({initialInView:!0,threshold:[1],rootMargin:`-${ns.uC}px 100%`,root:i.current}),o=void 0!==n,l=(0,cn.zy)(),c=new URLSearchParams(l.search).get("pCountry"),u=(0,nt.d4)(tc.JJ),{data:d,loading:m,error:p}=(0,JW.W3)({timeZone:(0,eK.Ff)(),sp_t:(0,V.v8)("sp_t")??"",country:c??u},{gcTime:eK.gO,staleTime:eK.jl});return m?(0,ct.jsx)("div",{className:gr()(aK,"contentSpacing"),children:(0,ct.jsx)(Hx.Y,{as:"h2",variant:"titleMedium",charCount:25,isLoading:!0})}):p||!d||"HomeResponsePayload"!==d.home?.__typename?null:t&&e?(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("div",{ref:r}),(0,ct.jsxs)("div",{className:nK,children:[(0,ct.jsx)("div",{className:gr()({[sK]:!s,[rK]:o},iK),style:{backgroundColor:n}}),(0,ct.jsx)(oK,{filterChips:d.home.homeChips})]})]}):null};var cK=n(12604),uK=n(67447),dK=n(99411),mK=n(52688),pK=n(17713),hK=n(2001),gK=n(85257);const fK="audiobooks-chip",bK=(0,at.memo)((({cardCount:e})=>(0,ct.jsx)("section",{children:(0,ct.jsx)("div",{className:gK.A.home,children:(0,ct.jsxs)("div",{className:gr()(gK.A.content,"contentSpacing"),children:[(0,ct.jsx)(cK.y,{withTitle:!1}),(0,ct.jsx)(hK.f,{showAll:!0,cardCount:e,withTitle:!1})]})})}))),vK=()=>{const e=tK(),t=[],n=(0,cn.zy)(),i=new URLSearchParams(n.search).get("pCountry"),r=(0,nt.d4)(tc.JJ),{data:s,fetching:a,error:o}=(0,JW.FE)({timeZone:(0,eK.Ff)(),sp_t:(0,V.v8)("sp_t")??"",facet:e,country:i??r},{gcTime:eK.gO,staleTime:eK.jl}),{spec:l}=(0,Jr.r)(ZW.Y,{data:{identifier:"home",uri:`spotify:home?facet=${e}`}}),c=s?.home;if(a)return(0,ct.jsx)(bK,{cardCount:50});if(null!==o)return(0,ct.jsx)(ir.A,{hasError:!0,errorMessage:u.Ru.get("error.generic")});if("HomeResponsePayload"!==c?.__typename)return(0,ct.jsx)(ir.A,{hasError:!0,errorMessage:u.Ru.get("error.generic")});if(0===c.sectionContainer.sections.items.length)return(0,ct.jsx)(ir.A,{hasError:!0,errorMessage:u.Ru.get("error.generic")});c.sectionContainer.sections.items.forEach((e=>{"HomeFeedBaselineSectionData"===e.data?.__typename&&t.push(e.sectionItems.items[0])}));const d=c.sectionContainer.sections.items.find((e=>t=>"HomeShortsSectionData"===t.data?.__typename||"spotify:section:0JQ5DAnM3wGh0gz1MXnu3N"===t.uri&&"podcasts-chip"===e||("spotify:section:0JQ5DAJvCyzyxqjq31tlEs"===t.uri||"spotify:section:0JQ5DAnM3wGh0gz1MXnucs"===t.uri)&&e===fK)(e));return(0,ct.jsx)("section",{"":"home-subfeed-page",className:gK.A.subfeedSection,children:(0,ct.jsxs)("div",{className:gr()(gK.A.content,"contentSpacing"),children:[d&&(0,ct.jsx)(pK.$,{spec:l,greeting:null,section:(0,dK.M)(d,d.data)}),(0,ct.jsx)(Hr.r,{spec:l.shelvesFactory(),children:(0,ct.jsx)(uK.p,{title:"",showAll:!0,index:0,id:"subfeed-cards",rowGap:k_.lT,children:t.map(mK.G)})})]})})},yK=()=>tK()?(0,ct.jsx)(vK,{}):(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"}),_K=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(2945),n.e(4312)]).then(n.bind(n,91976)))),EK=(0,at.lazy)((()=>n.e(5885).then(n.bind(n,14719)))),xK=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(3569)]).then(n.bind(n,88301)))),CK=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(9319)]).then(n.bind(n,4956)))),SK=(0,at.lazy)((()=>Promise.all([n.e(4151),n.e(1621)]).then(n.bind(n,87550)))),AK=()=>{const{sectionId:e}=(0,cn.g)();return(0,ct.jsx)(SK,{uri:`spotify:section:${e}`})},wK=({isDesktop:e,isPremium:t,isOffline:n})=>{const{allowSwitchingBetweenHomeAdsAndHpto:i}=Cn();return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(ck,{}),e&&(i?(0,ct.jsx)(EK,{}):(0,ct.jsx)(_K,{})),e&&t&&n&&(0,ct.jsx)(xK,{}),!n&&(0,ct.jsx)(CK,{})]})},IK=({isDesktop:e,isPremium:t,isOffline:n})=>(0,ct.jsxs)(ct.Fragment,{children:[e&&t&&n&&(0,ct.jsx)(xK,{}),!n&&(0,ct.jsx)(CK,{})]}),TK=({isDesktop:e,isOffline:t})=>{const n=tK()!==fK,{allowSwitchingBetweenHomeAdsAndHpto:i}=Cn();return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(ck,{}),e&&n&&(i?(0,ct.jsx)(EK,{}):(0,ct.jsx)(_K,{})),!t&&(0,ct.jsx)(lK,{}),(0,ct.jsx)(cn.sv,{})]})},NK="/launch-miniplayer",RK=()=>{const e=(()=>{const{open:e,isOpen:t,canOpen:n}=(0,KS.H)();return(0,at.useCallback)((()=>{n&&!t&&e()}),[n,t,e])})();return(0,at.useEffect)((()=>{e()}),[e]),(0,wW.L)((t=>t.pathname===NK&&(e(),!0)),[e]),(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})};var kK=n(36327),OK=n(42800);const PK=at.lazy((()=>n.e(1460).then(n.bind(n,40420)))),jK=at.lazy((()=>n.e(7790).then(n.bind(n,36057)))),LK=({queueView:e})=>{const{openQueue:t}=(0,lc.R)();return(0,at.useLayoutEffect)((()=>{t(e)}),[]),null},DK=()=>{const e=(0,a.NC)(Ie.eWj,{loadingValue:!1}),{openQueue:t}=(0,OK.R)();return(0,wW.L)((n=>!!e&&("/queue"===n.pathname?(t($w.p.QUEUE),!0):"/history"===n.pathname&&(t($w.p.HISTORY),!0)))),e?(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(cn.qh,{path:"/queue",element:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(LK,{queueView:$w.p.QUEUE}),(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})]})},"/queue"),(0,ct.jsx)(cn.qh,{path:"/history",element:(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(LK,{queueView:$w.p.HISTORY}),(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})]})},"/history")]}):(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(cn.qh,{path:"/queue",element:(0,ct.jsx)(UW.e,{navigationalRoot:AW.g.NOW_PLAYING_BAR,pageId:Kw.$h.NOWPLAYING_QUEUE,children:(0,ct.jsx)(jK,{})})}),(0,ct.jsx)(cn.qh,{path:"/history",element:(0,ct.jsx)(UW.e,{navigationalRoot:AW.g.NOW_PLAYING_BAR,pageId:Kw.$h.NOWPLAYING_HISTORY,children:(0,ct.jsx)(PK,{})})})]})};var UK=n(22144),MK=n(39744),BK=n(52459),FK=n(5587),HK=n(64647),VK=n(52612),zK=n(96470);const GK="VaoPVkde4AzxorQnp6Jp",WK="dDz8CzVKiV2128rhR543",KK="tBAiRbWhD79Gi2XqZ_AG",YK=({sessionMember:e,index:t,showRemoveButton:n,onClickRemove:i,onClickMember:r})=>{const{displayName:s,images:a,uri:o,username:l}=(0,dc.c)(e);return(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(IA.B,{uri:o}),children:(0,ct.jsx)("span",{children:(0,ct.jsxs)(zK.$,{rowIndex:t,className:GK,children:[(0,ct.jsx)(VK.T,{columnIndex:0,children:(0,ct.jsxs)(P_.default,{to:o,className:KK,onClick:r,"aria-label":s,children:[(0,ct.jsx)(Ef.e,{images:a,userIconSize:"medium",width:32,displayName:s,username:l,label:s}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMediumBold",semanticColor:"textBase",children:s})]})}),n&&(0,ct.jsx)(VK.T,{columnIndex:1,className:WK,children:(0,ct.jsx)(_x.n,{size:"small",onClick:i,"aria-label":u.Ru.get("web-player.social-connect.participant-list.remove-guest-accessible-label",{displayName:s}),children:u.Ru.get("web-player.social-connect.participant-list.remove-guest")})})]})})})},qK=({memberToBeRemoved:e,onClose:t})=>{const{logRemoveClick:n}=wP(),{currentSession:i,removeSessionMember:r}=(0,oc.D)(),s=e?.id??"",a=e?.displayName??"",o=i?.sessionId??"",l=(0,at.useCallback)((()=>{n(s,o),s&&(r(s),t())}),[n,s,o,r,t]),c=(0,at.useCallback)((()=>{t()}),[t]);return(0,ct.jsx)(EN.T,{isOpen:Boolean(s),titleText:u.Ru.get("web-player.social-connect.participant-list.remove-guest-dialog",{displayName:a}),"aria-label":u.Ru.get("web-player.social-connect.participant-list.remove-guest-dialog",{displayName:a}),confirmText:u.Ru.get("web-player.social-connect.participant-list.remove-guest"),cancelText:u.Ru.get("web-player.social-connect.participant-list.remove-guest-cancel"),onConfirm:l,onClose:c})},QK="qAE8wMAxO5THZoNqlb0q",$K=()=>{const e=(0,nt.d4)((e=>e.session.user?.id)),{currentSession:t}=(0,oc.D)(),[n,i]=(0,at.useState)(),{logUserClick:r,logRemoveClick:s,UBIFragmentWithSpec:a}=UA(),o=(0,at.useCallback)(((e,t)=>{s(e),i(t)}),[s]),l=(0,at.useCallback)(((e,t)=>{const n=(0,j.Qj)(t.username).toURI();r(e,n)}),[r]),c=(0,at.useCallback)((()=>{i(void 0)}),[]),d=t?.sessionMembers.find((e=>e.id===t.sessionOwnerId));if(!t||!d)return(0,ct.jsx)(cn.C5,{to:"/queue"});const m=t.isSessionOwner?2:1;return(0,ct.jsxs)("section",{className:"contentSpacing",children:[(0,ct.jsx)(HK.Q,{children:u.Ru.get("web-player.social-connect.participant-list.title",{host:d.displayName})}),(0,ct.jsx)(fr.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("web-player.social-connect.participant-list.title")}),(0,ct.jsx)(fr.E,{as:"h2",variant:"bodyMediumBold",semanticColor:"textSubdued",children:u.Ru.get("web-player.social-connect.participant-list.subtitle")}),(0,ct.jsx)(FK.f,{"aria-colcount":m,"aria-rowcount":t.sessionMembers.length,"aria-label":u.Ru.get("web-player.social-connect.participant-list.title"),className:QK,children:t.sessionMembers.map(((n,i)=>(0,ct.jsx)(YK,{sessionMember:n,showRemoveButton:t.isSessionOwner&&n.username!==e,index:i,onClickRemove:()=>o(i,n),onClickMember:()=>l(i,n)},n.displayName)))}),(0,ct.jsx)(a,{children:(0,ct.jsx)(qK,{memberToBeRemoved:n,onClose:c})})]})};var ZK=n(10654),XK=n(73420);const JK=()=>{const{id:e}=(0,cn.g)(),t=(0,nt.wA)(),n=(0,BK.M)(),i=(0,JP.C)();return(0,at.useEffect)((()=>{if(!e)return;const r=nY(n,i,e);r&&t(r)}),[t,e,n,i]),(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},eY=()=>{const e=(0,BK.M)(),t=(0,JP.C)(),n=(0,XK.Y)();return(0,at.useEffect)((()=>{t===Ae.l.PREMIUM&&e===Ae._.ENABLED&&n()}),[n,t,e]),(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},tY=()=>{const e=(0,nt.wA)(),t=(0,BK.M)(),n=(0,cn.Zp)(),i=(0,JP.C)(),r=(0,XK.Y)();return(0,wW.L)((s=>{const a=(0,j.o_)(s.pathname??""),o=a&&(0,j.cr)(a)&&(l=s.pathname,!Object.values(ZK.S).includes(l));var l;if("/jam"===s.pathname)return r(),!0;if(o){const r=nY(t,i,a.id);return!!r&&(e(r),s.state?.redirectToHome&&n("/"),!0)}return!1}),[t,i]),[(0,ct.jsx)(cn.qh,{path:ZK.S.PARTICIPANTS_PAGE,element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.SOCIAL_LISTENING_PARTICIPANTLIST,children:(0,ct.jsx)($K,{})})},"social-session-participant-page"),(0,ct.jsx)(cn.qh,{path:"/socialsession/:id",Component:JK},"social-session-invitation-fallback"),(0,ct.jsx)(cn.qh,{path:"/jam",Component:eY},"jam-creation-fallback")]};function nY(e,t,n){return t===Ae.l.NONE?(0,et.A9)(Vc.EL.ERROR):e===Ae._.DISABLED?(0,et.A9)(Vc.EL.MOBILE_ONLY):e===Ae._.RESTRICTED?(0,et.A9)(Vc.EL.REDIRECT,n):e===Ae._.ENABLED?(0,et.A9)(Vc.EL.JOIN,n):null}var iY=n(90495),rY=n(26902);const sY="q5riNmaoksSuEEvQAurA",aY=[{id:"ALBUM",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.music"),ubiId:"Music"},{id:"EPISODE",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.episodes"),ubiId:"Podcast & Shows"},{id:"WHATS_NEW_FEED_NOTIFICATION",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.notifications"),ubiId:"Merch & Events"}],oY=(0,at.memo)((function({availableFilters:e,selectedFilters:t,toggleFilterId:n,resetFilterIds:i,className:r,spec:s}){const a=u.Ru.get("web-player.whats-new-feed.filters.options"),o=(0,ot.s)(),l=(0,at.useMemo)((()=>{const t=new Map;return(e||[]).forEach((e=>{t.set(e.id,e)})),t}),[e]),c=(0,at.useCallback)(((e,t,n)=>{let i;if(!e)return i=s.clearFiltersFactory().hitClearFilter(),void o.logInteraction(i);const r=l.get(e);if(!r)return;const a=s.filterChipFactory({identifier:r.ubiId,position:n});i=t?a.hitClearFilter():a.hitFilter(),o.logInteraction(i)}),[s,o,l]);return(0,ct.jsx)("div",{className:sY,children:(0,ct.jsx)(rY.s,{placeholderFilters:aY,availableFilters:e,selectedFilters:t,toggleFilterId:n,onFilterClick:c,resetFilterIds:i,ariaLabel:a,className:r})})})),lY=({dateAdded:e,prefix:t})=>{let n=e.getTime()>0&&u.Ru.formatRelativeDate(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"});return n&&t&&(n=`${t} ${n}`),(0,ct.jsx)(fr.E,{variant:"bodySmall",children:n})};var cY=n(35789),uY=n(87344),dY=n(25279),mY=n(81643);const pY=e=>{switch(e){case Og.E.LARGE:return Cf.Qe.SIZE_112;case Og.E.MEDIUM:default:return Cf.Qe.SIZE_64}},hY={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",row:"SjhDNg4bQRQmIJAba47Z",actions:"eYvk_xcxVNMwCBkfY3O0",visibleAction:"TtoLzgGMAU9nkxMbixq9",playButton:"Rw7qIj58PeAz8p6dejOP",content:"K3oY37O4n1fElTqkmnd8",description:"AkSMHdbIxX7Fj7e_8APi",subtitleLink:"uzhTSuCH_4ojaqifMJRB",imageWrapper:"q82J4Wio82IYN9poOJfd",imageContainer:"D71yL9GnHIYg7PheYlz8",showImage:"KKRyrr7NUJy1VBWydHHH",largeImage:"kAYwHqwZ7agHEAGbYN3v",explicitIcon:"HjDtVqhmfzWlsvg4dliB",timeAgo:"H4ODi0SPeEXBawCgANeX",footer:"XaingSntLq8c8wEfqf81",episodeBody:"sbM0nIPBghB_k5Tb5a8y",fallbackIcon:"SCFHE5DLXwCFJz8oVFMs",dateAndTime:"FDm94lE0xkDYtA1Bk7Jc",medium:"jYce7J2dSeD3e9qvWO7N",seperator:"tDRI4dCXFmqKzB1b6K3u",seperatorAlbum:"TPNGFuTvzNVNHisumnhg",divider:"qyiUKTaPzLGyMSLo4IRG",listRow:"jtpCRP5bfx_qlMYMvzvs"};function gY({album:e,onLike:t,onMoreButtonClick:n,onDownloadClick:i,spec:r}){const s=(0,at.useRef)(null);uE(s);const a=(0,Pg.y)(),o=a===Og.E.LARGE,{draggable:l,onDragStart:c}=(0,rh.P)({itemUris:[e.uri],dragLabelText:e.name});let d;e.date&&(d=(0,ct.jsx)(lY,{dateAdded:new Date(e.date.isoString)}));const[m,p]=(0,qp.A)(e.uri),h=e.artists?.items.map((e=>e.profile.name)).join(u.Ru.getSeparator())||"",g=(0,ot.s)(),f=(0,at.useCallback)((async()=>{try{await p(!m)}catch{}}),[m,p]),{togglePlay:b,isPlaying:v,isActive:y}=(0,R_.P)({uri:e.uri},{featureIdentifier:"whats_new_panel",referrerIdentifier:"whats_new_panel"}),_=(0,at.useCallback)((t=>{let n;t.preventDefault(),y&&!v&&(n=r.playButtonFactory().hitResume({itemToBeResumed:e.uri})),v||y||(n=r.playButtonFactory().hitPlay({itemToBePlayed:e.uri})),v&&(n=r.playButtonFactory().hitPause({itemToBePaused:e.uri})),n&&g.logInteraction(n),b()}),[b,y,v,g,r,e.uri]),E=(0,dY.V)(e.uri),x=(0,Ow.T)(e.uri),C=(0,at.useCallback)((()=>{const t=r.hitUiNavigate({destination:e.uri});g.logInteraction(t),E()}),[e.uri,r,g,E]),S=(0,at.useCallback)((n=>{const i=r.saveButtonFactory().hitLike({itemToBeLiked:e.uri}),s=r.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});g.logInteraction(n?i:s),t?.(n)}),[r,g,e.uri,t]),A=(0,at.useCallback)(((t,n)=>{let s;n===ce.NV.ADD?s=r.downloadButtonFactory().hitDownload({itemToDownload:e.uri}):n===ce.NV.REMOVE&&(s=r.downloadButtonFactory().hitUiReveal()),s&&g.logInteraction(s),i?.(t,n)}),[e.uri,g,r,i]),w=(0,at.useCallback)((e=>{n?.(e)}),[n]),I=(0,at.useCallback)((()=>{const t=r.titleFactory().hitUiNavigate({destination:e.uri});g.logInteraction(t)}),[e.uri,g,r]),T=u.Ru.get("tracklist.a11y.play",e.name,h),N=u.Ru.get("tracklist.a11y.pause",e.name,h),R=(0,ct.jsx)(um.d,{lineClamp:1,children:(0,ct.jsx)(P_.default,{to:e.uri,onClick:I,children:e.name})}),k=e.artists?e.artists.items.map(((e,t,n)=>{return(0,ct.jsxs)(at.Fragment,{children:[(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Fw.t,{uri:e.uri}),children:(0,ct.jsx)(P_.default,{to:e.uri,className:hY.subtitleLink,onClick:(i=e.uri,()=>{const e=r.subtitleFactory().hitUiNavigate({destination:i});g.logInteraction(e)}),children:e.profile.name})}),t<n.length-1&&u.Ru.getSeparator()]},t);var i})):"",O=(0,ct.jsx)("div",{className:hY.imageContainer,children:(0,ct.jsx)(xf.b,{className:gr()(hY.showImage,{[hY.largeImage]:o}),type:M.c.ALBUM,size:pY(a),title:e.name,images:e.coverArt?.sources})}),P=(0,ct.jsxs)(fr.E,{className:hY.dateAndTime,children:[(0,uY.C)(e.albumType),(0,ct.jsx)("span",{className:hY.seperatorAlbum,children:d})]}),j=o?aa.t.sm:aa.t.xs,L=(0,ct.jsxs)("div",{className:hY.footer,children:[(0,ct.jsxs)("div",{className:hY.actions,children:[(0,ct.jsx)(la.b,{onClick:S,uri:e.uri,size:j,className:hY.visibleAction}),(0,ct.jsx)(mY.f,{onClick:A,className:gr()({[hY.visibleAction]:(0,cY.X)(x)}),uri:e.uri,isFollowing:m,onFollow:f,size:j}),(0,ct.jsx)(Hr.r,{spec:r,children:(0,ct.jsx)(ws.b,{menu:(0,ct.jsx)(ZD.h,{uri:e.uri}),children:(0,ct.jsx)(dd.e,{onClick:w,size:j})})})]}),(0,ct.jsx)("div",{className:hY.playButton,children:(0,ct.jsx)(tw.R,{size:"small",onClick:_,isPlaying:v,ariaPlayLabel:T,ariaPauseLabel:N,version:tw.H.secondary})})]});return(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(ZD.h,{uri:e.uri}),children:(0,ct.jsxs)("div",{className:hY.listRow,draggable:l,onDragStart:c,children:[(0,ct.jsx)(cm.v,{size:"xxl",ref:s,className:hY.row,media:O,title:R,subtitle:(0,ct.jsx)(dm.j,{lineClamp:1,children:k}),id:e.uri,variant:"naked",body:P,footer:L,onClick:C,hoverBackgroundColor:"backgroundHighlight",layout:o?"wide":"regular",horizontalGap:o?k_.lT:k_.CJ,verticalGap:k_.v4,paddingBlockStart:"16px",paddingBlockEnd:"16px"}),(0,ct.jsx)("hr",{className:hY.divider,"aria-hidden":!0})]})})}var fY=n(88395),bY=n(38037),vY=n(35291);const yY=({className:e})=>(0,ct.jsx)(vY.v,{ariaLabel:u.Ru.get("card.a11y.explicit"),text:u.Ru.get("paid"),className:e});var _Y=n(75024);const EY={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",episodeBody:"N3zMh5FMdbBKUvz4uDfe",progressBar:"h0YQcDKdGmWssZyuIcvq",seperator:"lMQrLkJVNqZAzT95gQnA"},xY=1e4;function CY({episode:e,isPlaying:t,isActive:n,isFullyPlayed:i,setIsFullyPlayed:r}){let s;e.releaseDate&&(s=(0,ct.jsx)(lY,{dateAdded:new Date(e.releaseDate.isoString)}));const a=e.restrictions?.paywallContent??!1,o=(0,at.useRef)(null),[l]=(0,Zr.S)(xY,(t=>t?.item?.uri===e.uri));(0,at.useEffect)((()=>{t&&(o.current=l)}),[t,l]),(0,at.useEffect)((()=>{!t&&o.current&&e.duration.totalMilliseconds<=o.current&&r(!0)}),[t,e.duration.totalMilliseconds,r]);const{badges:c}=(0,U_.b)({contentRating:e.contentRating?.label,isPaywalled:a}),d=(0,ct.jsxs)(ct.Fragment,{children:[c.explicit&&(0,ct.jsx)(L_.g,{}),c.paid&&(0,ct.jsx)(yY,{}),c.nineteen&&(0,ct.jsx)(D_.q,{size:16})]}),m=(0,ct.jsx)(_Y.j,{isPlaying:t,fullyPlayed:i,durationMs:e.duration.totalMilliseconds,resumePositionMs:o.current||e.playedState.playPositionMilliseconds,position:n?l:void 0,className:EY.progressBar});return(0,ct.jsxs)("div",{className:EY.episodeBody,children:[d,(0,ct.jsx)(fr.E,{variant:"bodySmall",children:u.Ru.get("card.tag.episode")}),(0,ct.jsx)("span",{className:EY.seperator}),(0,ct.jsx)(fr.E,{variant:"bodySmall",children:s}),(0,ct.jsx)("span",{className:EY.seperator}),(0,ct.jsx)(fr.E,{variant:"bodySmall",children:m})]})}const SY={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",row:"IEDOUN3mwwZhHVziC03a",actions:"Olh4d9g46wryDMTzRRmw",visibleAction:"zyDT2CX7tvGjKxxUnO7D",playButton:"TKntS5R19vVI3J9xxwDL",content:"h0EpgyZTOC5U8KOQL4A6",description:"IoTOUob09_0_3kC8ORbu",subtitleLink:"aKVUno8YrkyvGsg7iS59",imageWrapper:"O3nnn9_DD_2DzYEa64jv",imageContainer:"iF91evq0EtvlgCxIRI_6",showImage:"VzSICihKBYcgMsSFv8SH",largeImage:"iOxe1erWkyDFY3p4NG8x",explicitIcon:"iseqhC6eLcxmoGPk6JIE",timeAgo:"kUzqUQECoj43gCthqXdD",footer:"_72TrTBKZHea2vJ2I2BJX",episodeBody:"Bqh5LKZCXF5xkKJcEx7a",fallbackIcon:"OdJvEiRzLWN66tky0bvM",dateAndTime:"Y1f7yukeZPBc6n1uu1pi",medium:"uHM5B97d0hwAYDvOOmY8",seperator:"Oe5t36YEWzbJKH5LBNYD",seperatorAlbum:"dJMAGpC7b6bMSWNEfk6r",divider:"jY5CEwsrhUUSaNhzaqt7",enableDivider:"mOPPYtu5GS8WN_z0qIKJ",listRow:"HnBjFjY0iKJHF4x3mYwe"};function AY({episode:e,podcastName:t,podcastUri:n,onLike:i,onMoreButtonClick:r,onDownloadClick:s,spec:a,featureIdentifier:o,referrerIdentifier:l,enableDivider:c=!1,size:d="xxl"}){const m=(0,at.useRef)(null);uE(m);const p=(0,Pg.y)(),h=(0,Ow.T)(e.uri),g=p===Og.E.LARGE,{draggable:f,onDragStart:b}=(0,rh.P)({itemUris:[e.uri],dragLabelText:`${e.name} • ${t}`}),v=(0,ot.s)(),{togglePlay:y,isPlaying:_,isActive:E}=(0,R_.P)({uri:e.uri},{featureIdentifier:o,referrerIdentifier:l}),[x,C]=(0,at.useState)(e.playedState.state===ee._w.Completed),S=(0,dY.V)(e.uri),A=u.Ru.get("tracklist.a11y.play",e.name,t),w=u.Ru.get("tracklist.a11y.pause",e.name,t),I=(0,at.useCallback)((()=>{const t=a.hitUiNavigate({destination:e.uri});v.logInteraction(t),S()}),[S,v,a,e.uri]),T=(0,at.useCallback)((t=>{const n=a.saveButtonFactory().hitLike({itemToBeLiked:e.uri}),r=a.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});v.logInteraction(t?n:r),i?.(t)}),[a,v,e.uri,i]),N=(0,at.useCallback)(((t,n)=>{let i;n===ce.NV.ADD?i=a.downloadButtonFactory().hitDownload({itemToDownload:e.uri}):n===ce.NV.REMOVE&&(i=a.downloadButtonFactory().hitUiReveal()),i&&v.logInteraction(i),s?.(t,n)}),[v,a,e.uri,s]),R=(0,at.useCallback)((()=>{const t=a.titleFactory().hitUiNavigate({destination:e.uri});v.logInteraction(t)}),[v,a,e.uri]),k=(0,at.useCallback)((t=>{let n;t.preventDefault(),E&&!_&&(n=a.playButtonFactory().hitResume({itemToBeResumed:e.uri})),_||E||(n=a.playButtonFactory().hitPlay({itemToBePlayed:e.uri})),_&&(n=a.playButtonFactory().hitPause({itemToBePaused:e.uri})),n&&v.logInteraction(n),y()}),[y,v,a,e.uri,_,E]),O=(0,at.useCallback)((e=>{r?.(e)}),[r]),P=(0,ct.jsx)(um.d,{lineClamp:2,children:(0,ct.jsx)(P_.default,{to:e.uri,onClick:R,children:e.name})}),j=(0,ct.jsx)(ct.Fragment,{children:(0,ct.jsx)(dm.j,{lineClamp:1,paddingBottom:g?"8px":void 0,children:(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(Nx.H,{uri:n}),children:(0,ct.jsx)(P_.default,{to:n,className:SY.subtitleLink,onClick:(L=n,()=>{const e=a.subtitleFactory().hitUiNavigate({destination:L});v.logInteraction(e)}),children:(0,ct.jsx)(fr.E,{as:"span",variant:"bodySmall",children:t})})})})});var L;const D=(0,ct.jsx)("div",{className:SY.imageContainer,children:(0,ct.jsx)(xf.b,{className:gr()(SY.showImage,{[SY.largeImage]:g}),type:M.c.EPISODE,size:pY(p),title:e.name,images:e.coverArt?.sources})}),U=g?"medium":"small",B=(0,ae.Wx)(e.restrictions,e.playability),F=!(B.isPaywalled&&!B.isUserSubscribed),H=(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(CY,{episode:e,isPlaying:_,isActive:E,isFullyPlayed:x,setIsFullyPlayed:C}),(0,ct.jsxs)("div",{className:SY.footer,children:[(0,ct.jsxs)("div",{className:SY.actions,children:[(0,ct.jsx)(oa.b,{onClick:T,uri:e.uri,size:U,className:SY.visibleAction}),(0,ct.jsx)(bY.e,{className:gr()({[SY.visibleAction]:(0,cY.X)(h)}),onClick:N,uri:e.uri,size:U,canDownload:F}),(0,ct.jsx)(Hr.r,{spec:a,children:(0,ct.jsx)(ws.b,{menu:(0,ct.jsx)(N_.b,{uri:e.uri,onMarkAsPlayed:C,isPlayed:x}),children:(0,ct.jsx)(dd.e,{onClick:O,size:U})})})]}),(0,ct.jsx)("div",{className:SY.playButton,children:(0,ct.jsx)(tw.R,{"aria-label":"whats-new-feed-play-button",size:"small",onClick:k,isPlaying:_,ariaPlayLabel:A,ariaPauseLabel:w,version:tw.H.secondary})})]})]}),V=(0,ct.jsx)(fY.v,{lineClamp:2,paddingBottom:g?"4px":void 0,className:SY.description,children:(0,ct.jsx)(fr.E,{as:"p",variant:"bodySmall",children:e.description})});return(0,ct.jsx)(pm.h,{menu:(0,ct.jsx)(N_.b,{uri:e.uri,onMarkAsPlayed:C,isPlayed:x}),children:(0,ct.jsxs)("div",{className:SY.listRow,draggable:f,onDragStart:b,children:[(0,ct.jsx)(cm.v,{size:d,ref:m,className:SY.row,media:D,title:P,subtitle:j,id:e.uri,variant:"naked",body:V,footer:H,onClick:I,hoverBackgroundColor:"backgroundHighlight",layout:g?"wide":"regular",horizontalGap:g?k_.lT:k_.CJ,verticalGap:k_.v4,paddingBlockStart:"16px",paddingBlockEnd:"16px"}),(0,ct.jsx)("hr",{className:gr()(SY.divider,{[SY.enableDivider]:c}),"aria-hidden":!0})]})})}function wY({item:e,spec:t}){if("AlbumResponseWrapper"===e.content.__typename){const n=e.content.data;if("Album"===n.__typename)return(0,ct.jsx)(gY,{album:n,spec:t})}if("EpisodeOrChapterResponseWrapper"===e.content.__typename){const n=e.content.data;if("Chapter"===n.__typename)return(0,ct.jsx)(ct.Fragment,{});if("Episode"===n.__typename){let e="",i="";return"Podcast"===n.podcastV2.data.__typename&&(e=n.podcastV2.data.name,i=n.podcastV2.data.uri),(0,ct.jsx)(AY,{episode:n,podcastName:e,podcastUri:i,spec:t,referrerIdentifier:"whats_new_panel",featureIdentifier:"whats_new_panel",enableDivider:!0})}}return(0,ct.jsx)(ct.Fragment,{})}const IY="PNAsPBOgLLv9EX8LZ6xL",TY="UjEEhwY497frsytmeR9u",NY="VQ0BLAewv7Aw5H3hV0YK",RY="pxV6pRWzmVb2_leuWtEG",kY="G97bWDW7Mp3aZEL19Umr",OY="p6l0_RUXhei0P7rrQaeg",PY="erd9k4EG_HWK3UzsLhht",jY="ap9brNzQxEcx9SV2FksM",LY="pVVteJIfAdehWU3vX7JR",DY="J_VZoZ53jBtkdyxrt2My",UY=at.memo((()=>(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Hx.Y,{as:"h3",variant:"titleSmall",className:DY,charCount:4,isLoading:!0}),(0,ct.jsx)("div",{className:jY,children:[20,50,25].map(((e,t)=>(0,ct.jsx)(Hx.Y,{as:"div",variant:"bodySmall",className:DY,charCount:e,isLoading:!0},`${e}-${t}`)))})]})));const MY={offset:0,limit:50,onlyUnPlayedItems:!1};const BY={[ee.tv.Album]:{id:"ALBUM",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.music"),ubiId:"Music",active:!1},[ee.tv.Episode]:{id:"EPISODE",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.episodes"),ubiId:"Podcast & Shows",active:!1}};function FY(e){switch(e){case ee.tv.Album:return ee.tv.Album;case ee.tv.Episode:return ee.tv.Episode;case ee.tv.WhatsNewFeedNotification:return ee.tv.WhatsNewFeedNotification;case ee.tv.Unknown:default:return ee.tv.Unknown}}const HY=({spec:e,items:t})=>{const[n,i]=(0,at.useState)([]),r=e=>{const t=e.state.state;if(!e.state.timestamp?.isoString&&t===ee.GN.New)return!0;if(e.state.timestamp?.isoString){const t=new Date(e.state.timestamp.isoString).getTime();return Date.now()-t<=36e5}return!1},s=t.findIndex((e=>!r(e))),a=(0,at.useCallback)(((t,n)=>{const i=r(t)&&n<s,a=i&&0===n;return(0,ct.jsxs)(at.Fragment,{children:[a&&(0,ct.jsx)(fr.E,{as:"h3",variant:"titleSmall",className:NY,semanticColor:"textBase",children:u.Ru.get("web-player.whats-new-feed.new-section-title")}),!i&&n===s&&(0,ct.jsx)(fr.E,{as:"h3",variant:"titleSmall",className:NY,semanticColor:"textBase",children:u.Ru.get("web-player.whats-new-feed.earlier-section-title")}),(0,ct.jsx)(wY,{item:t,spec:e.notificationItemFactory({identifier:t.id,position:n})},t.id)]},t.id)}),[s,e]),o=(0,at.useRef)(0),l=(0,at.useCallback)((()=>{const e=t.slice(o.current,o.current+10);i((t=>(o.current=o.current+10,[...t,...e])))}),[t]),{ref:c,breakpoint:d}=(0,jg.x)({[Og.E.MEDIUM]:0,[Og.E.LARGE]:600});return(0,ct.jsx)(Pg.o.Provider,{value:d,children:(0,ct.jsx)("div",{className:PY,role:"list",ref:c,children:(0,ct.jsx)(c_._,{onReachBottom:l,triggerOnInitialLoad:!0,children:n.map(a)})})})},VY=({includedContentTypes:e,data:t,handleRetry:n,error:i,spec:r,loading:s})=>{if(s)return(0,ct.jsxs)("div",{className:RY,role:"list",children:[(0,ct.jsx)(UY,{}),(0,ct.jsx)(UY,{})]});if(i)return(0,ct.jsxs)("div",{className:kY,dir:"auto",children:[(0,ct.jsx)(fr.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("error.generic")}),(0,ct.jsx)(fr.E,{as:"p",variant:"bodyMedium",children:u.Ru.get("web-player.whats-new-feed.panel.error")}),(0,ct.jsx)(_x.n,{className:OY,onClick:n,size:"small",children:(0,ct.jsx)(fr.E,{as:"span",variant:"bodyMediumBold",semanticColor:"textBase",children:u.Ru.get("web-player.whats-new-feed.panel.error.button")})})]});const a=t?.whatsNewFeedItems?.items;if(!a||0===a?.length){const{title:t,message:n}=function(e=[]){return e.includes(ee.tv.Episode)?{title:u.Ru.get("web-player.whats-new-feed.panel.empty-results-podcast.title"),message:u.Ru.get("web-player.whats-new-feed.panel.empty-results-podcast.message")}:e.includes(ee.tv.Album)?{title:u.Ru.get("web-player.whats-new-feed.panel.empty-results-music.title"),message:u.Ru.get("web-player.whats-new-feed.panel.empty-results-music.message")}:{title:u.Ru.get("web-player.whats-new-feed.panel.empty-results-all.title"),message:u.Ru.get("web-player.whats-new-feed.panel.empty-results-all.message")}}(e);return(0,ct.jsx)(iY.p,{title:t,message:n,renderInline:!0})}return(0,ct.jsx)(HY,{items:a,spec:r},e.join(" "))},zY=()=>{const e=(0,bt.jE)(),{spec:t,logger:n}=(0,Jr.r)(eb.q,{}),i=(0,at.useCallback)((()=>{const{name:e}=ib;return[e]}),[]),r=(0,at.useCallback)((()=>{e.invalidateQueries({queryKey:i()})}),[e,i]);(0,at.useEffect)((()=>{n.logImpression(t.impression())}),[n,t]);const[s,a]=(0,at.useState)(BY),o=Object.values(s),l=o.filter((e=>e.active)),c=l.length>0?[]:o,d=l.map((e=>e.id)),m=(0,at.useCallback)((e=>{const t=FY(e),n={id:s[t]?.id||ee.tv.Unknown,getName:()=>s[t]?.getName()||"",ubiId:s[t]?.ubiId||"",active:!s[t]?.active},i={...BY,...s,[n.id||"UNKNOWN"]:n};a(i)}),[s,a]),p=(0,at.useCallback)((()=>{a(BY)}),[a]),{data:h,error:g,loading:f}=(b={...MY,includedContentTypes:d.map(FY)??[]},v={gcTime:30*$.i},(0,$.I)(ib,b,v));var b,v;const{getGraphQLLoader:y}=(0,Xi.mv)(),_=y();return(0,at.useEffect)((()=>{if(!h?.whatsNewFeedItems?.items)return;const e=h?.whatsNewFeedItems?.items.filter((e=>e.state.state===ee.GN.New)).map((e=>({id:e.id,state:ee.GN.Seen})));e.length>0&&async function(e,t){await e(sb,{items:t})}(_,{items:e})}),[h?.whatsNewFeedItems?.items,_]),(0,ct.jsxs)("div",{className:LY,children:[(0,ct.jsxs)("div",{className:IY,children:[(0,ct.jsx)(fr.E,{as:"h1",semanticColor:"textBase",variant:"titleMedium",className:TY,children:u.Ru.get("web-player.whats-new-feed.panel.title")}),(0,ct.jsx)(fr.E,{as:"p",semanticColor:"textSubdued",variant:"bodySmall",children:u.Ru.get("web-player.whats-new-feed.panel.subtitle")})]}),!g&&(0,ct.jsx)(oY,{availableFilters:c,toggleFilterId:m,selectedFilters:l,resetFilterIds:p,spec:t.filterChipsFactory()}),(0,ct.jsx)(VY,{includedContentTypes:d.map(FY),data:h,loading:f,error:g,spec:t,handleRetry:r})]})},GY=()=>Zf()?(0,ct.jsx)(zY,{}):(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"});var WY=n(33711),KY=n(95339),YY=n(85232),qY=n(51533);const QY=(0,at.lazy)((()=>n.e(1338).then(n.bind(n,52847)))),$Y=(0,at.lazy)((()=>n.e(4608).then(n.bind(n,90176))));var ZY=n(59659);const XY=(0,at.lazy)((()=>n.e(2312).then(n.bind(n,12300)))),JY=(0,at.lazy)((()=>n.e(4608).then(n.bind(n,90176))));function eq(e){const{isShowSponsorsEnabled:t}={isShowSponsorsEnabled:(0,a.NC)(Ie.W4i)},n=(0,a.NC)(Ie.SN8,{loadingValue:!1});if(t&&n){const e=(0,ZY.V)(qY.yA);return{allShowSponsorsRoute:t&&n?(0,ct.jsx)(cn.qh,{path:e,element:(0,ct.jsx)(JY,{surface:RW.ui.PODCAST_SEE_ALL})},"all-show-leavebehinds"):null}}return{allShowSponsorsRoute:t?(0,ct.jsx)(cn.qh,{path:(0,ZY.V)(qY.yA),element:(0,ct.jsx)(XY,{...e})},"all-show-sponsors"):null}}function tq(){const e=(0,cn.zy)(),t=`/${(0,cn.g)()["*"]??""}${e.search}`,n=e.pathname+e.search;return(0,ct.jsx)(cn.C5,{to:t===n?`/${e.search}`:t,replace:!0})}const nq=at.lazy((()=>Promise.all([n.e(4151),n.e(5962)]).then(n.bind(n,69525)))),iq=at.lazy((()=>Promise.resolve().then(n.bind(n,94087)))),rq=at.lazy((()=>n.e(3890).then(n.bind(n,13960)))),sq=at.lazy((()=>Promise.all([n.e(4151),n.e(6863)]).then(n.bind(n,24046)))),aq=at.lazy((()=>Promise.all([n.e(4151),n.e(9480)]).then(n.bind(n,53215)))),oq=at.lazy((()=>Promise.all([n.e(4151),n.e(9209)]).then(n.bind(n,91662)))),lq=at.lazy((()=>Promise.all([n.e(4151),n.e(9473),n.e(8828)]).then(n.bind(n,25721)))),cq=at.lazy((()=>Promise.all([n.e(4151),n.e(6080)]).then(n.bind(n,57779)))),uq=at.lazy((()=>Promise.all([n.e(4151),n.e(4389)]).then(n.bind(n,43315)))),dq=at.lazy((()=>Promise.all([n.e(4151),n.e(5783)]).then(n.bind(n,73628)))),mq=at.lazy((()=>Promise.all([n.e(4151),n.e(7784),n.e(7125)]).then(n.bind(n,93618)))),pq=at.lazy((()=>Promise.all([n.e(4151),n.e(7784),n.e(2889)]).then(n.bind(n,22075)))),hq=at.lazy((()=>Promise.all([n.e(4151),n.e(9473),n.e(2355)]).then(n.bind(n,29441)))),gq=at.lazy((()=>n.e(4496).then(n.bind(n,38762)))),fq=at.lazy((()=>Promise.resolve().then(n.bind(n,22144)))),bq=at.lazy((()=>Promise.resolve().then(n.bind(n,39744)))),vq=at.lazy((()=>Promise.resolve().then(n.bind(n,98620)))),yq=at.lazy((()=>Promise.all([n.e(4151),n.e(1785)]).then(n.bind(n,27034)))),_q=at.lazy((()=>n.e(6505).then(n.bind(n,76651)))),Eq=at.lazy((()=>Promise.all([n.e(4151),n.e(42)]).then(n.bind(n,7027)))),xq=at.lazy((()=>Promise.all([n.e(4151),n.e(42)]).then(n.bind(n,56110)))),Cq=at.lazy((()=>n.e(8212).then(n.bind(n,61495)))),Sq=at.lazy((()=>Promise.resolve().then(n.bind(n,36327)))),Aq=at.lazy((()=>Promise.all([n.e(4151),n.e(8860)]).then(n.bind(n,72860)))),wq=at.lazy((()=>Promise.all([n.e(4151),n.e(3522)]).then(n.bind(n,68189)))),Iq=at.lazy((()=>n.e(7241).then(n.bind(n,92241)))),Tq=e=>{const{viewId:t=""}=(0,cn.g)();return t===UK.RECENTLY_PLAYED_VIEW_ID?(0,ct.jsx)(fq,{...e,showAll:!0}):(0,ct.jsx)(KW,{id:t})},Nq=()=>{const e=(0,NW.o)();return(0,ct.jsxs)(cn.BV,{children:[(0,ct.jsx)(cn.qh,{path:"tracks",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.COLLECTION_SONGS,children:(0,ct.jsx)(lq,{})})}),(0,ct.jsx)(cn.qh,{path:"episodes",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.COLLECTION_PODCASTS_EPISODES,children:(0,ct.jsx)(cq,{})})}),(0,ct.jsx)(cn.qh,{path:"your-episodes",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.COLLECTION_PODCASTS_EPISODES,children:(0,ct.jsx)(cq,{})})}),e.canFetchAllTracks&&(0,ct.jsx)(cn.qh,{path:"local-files",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.LOCALFILES,children:(0,ct.jsx)(uq,{})})}),(0,ct.jsx)(cn.qh,{path:"/*",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/collection/tracks"})})]})},Rq=e=>{const{playlistId:t}=(0,cn.g)();return(0,at.createElement)(hq,{...e,key:t})},kq=e=>{const{artistId:t}=(0,cn.g)();return(0,at.createElement)(iq,{...e,key:t})},Oq=e=>{const{albumId:t}=(0,cn.g)();return(0,at.createElement)(nq,{...e,key:t})},Pq=e=>{const{showId:t}=(0,cn.g)();return(0,at.createElement)(bq,{...e,key:t})},jq=()=>{const e=(0,cn.zy)();(0,wW.k)();const t=(0,nt.d4)((e=>e.features.enableShows)),{isDesktop:n,isBrowser:i}=(0,nt.d4)((e=>e.platform)),{isAnonymous:r,productState:s}=(0,nt.d4)(ma.Ht),o="premium"===s?.product,l=!(0,Yf.n)();(0,WY.K)();const{allEpisodeSponsorsRoute:c}=function(e={}){const t=(0,YY.L)();return(0,a.NC)(Ie.kIZ,{loadingValue:!1})&&t?{allEpisodeSponsorsRoute:(0,ct.jsx)(cn.qh,{path:(0,KY.b)(qY.ob),element:(0,ct.jsx)($Y,{surface:RW.ui.PODCAST_SEE_ALL})},"all-episode-sponsors-consolidated")}:{allEpisodeSponsorsRoute:t?(0,ct.jsx)(cn.qh,{path:(0,KY.b)(qY.ob),element:(0,ct.jsx)(QY,{...e})},"all-episode-sponsors"):null}}(),{allShowSponsorsRoute:u}=eq(),d=(({isDesktop:e,isPremium:t,isOffline:n})=>{const i=(0,nC.W)({type:"locale",uri:"home"});return[(0,ct.jsxs)(cn.qh,{path:"/",element:(0,ct.jsx)(UW.e,{navigationalRoot:AW.g.HOME,pageId:Kw.$h.HOME,entityUri:"spotify:app:home",children:(0,ct.jsx)(TK,{isDesktop:e,isPremium:t,isOffline:n})}),children:[(0,ct.jsx)(cn.qh,{path:"/home",element:(0,ct.jsx)(yK,{})},"home-subfeed"),(0,ct.jsx)(cn.qh,{index:!0,element:(0,ct.jsx)(IK,{isDesktop:e,isPremium:t,isOffline:n})})]},"home"),i?TW.NW.map((i=>(0,ct.jsx)(cn.qh,{path:`/${TW.CT}${i}`,element:(0,ct.jsx)(UW.e,{navigationalRoot:AW.g.HOME,pageId:Kw.$h.HOME,entityUri:"spotify:app:home",children:(0,ct.jsx)(wK,{isDesktop:e,isPremium:t,isOffline:n})})},"home-i18n"))):null,(0,ct.jsx)(cn.qh,{path:"/section/:sectionId",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.HOME_DRILLDOWN,children:(0,ct.jsx)(AK,{})})},"home-section")]})({isDesktop:n,isPremium:o,isOffline:l}),m=(0,gu.N7)(),p=(0,ct.jsx)(cn.qh,{path:NK,element:(0,ct.jsx)(RK,{})},NK),h=[(0,ct.jsx)(cn.qh,{path:"/cultural-moment/hub/:id",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.CULTURALMOMENTSHUB,children:(0,ct.jsx)(QW,{})})},"cultural-moment-hub")],g=HW(),f=DK(),b=(0,ct.jsx)(cn.qh,{path:"/content-feed",element:(0,ct.jsx)(GY,{})}),v=(0,kK.usePremiumRoutes)(),y=tY(),_=VW(),E=(0,a.NC)(Ie.EXj),x=(0,a.NC)(Ie.z1M),C=(0,LW._)(),S=(0,DW.c)(),A=(0,DW.e)(),w=S||A,I=(0,a.NC)(Ie.DKh),T=!(0,Gf.g)();return(0,ct.jsxs)(cn.BV,{children:[(0,ct.jsx)(cn.qh,{path:"/user/:userId/collection/your-episodes",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/collection/episodes"})}),(0,ct.jsx)(cn.qh,{path:"/user/:userId/collection/album/:albumId",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/album/:albumId"})}),(0,ct.jsx)(cn.qh,{path:"/user/:userId/collection/artist/:artistId",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/artist/:artistId/saved"})}),(0,ct.jsx)(cn.qh,{path:"/user/:userId/playlist/:playlistId",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/playlist/:playlistId"})}),(0,ct.jsx)(cn.qh,{path:"/browse/genres",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/genre/hub-browse-grid"})}),(0,ct.jsx)(cn.qh,{path:"/browse/newreleases",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/genre/new-releases-page"})}),(0,ct.jsx)(cn.qh,{path:"/browse/discover",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/genre/discover-page"})}),(0,ct.jsx)(cn.qh,{path:"/browse/charts",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/genre/browse-charts-tab"})}),(0,ct.jsx)(cn.qh,{path:"/browse/featured",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})}),(0,ct.jsx)(cn.qh,{path:"/browse",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})}),IW.BG.map((e=>(0,ct.jsx)(cn.qh,{path:e,element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:IW.yf})},e))),(0,ct.jsx)(cn.qh,{path:"/internal/recs/playlist/:playlistId",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/playlist/:playlistId"})}),(0,ct.jsx)(cn.qh,{path:"/settings",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})}),r?[(0,ct.jsx)(cn.qh,{path:"/collection/*",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},"collection-redirect")]:[(0,ct.jsx)(cn.qh,{path:"/collection",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/collection/tracks"})},"collection-redirect")],d,m,p,h,g,_,f,b,v,y,(0,ct.jsx)(cn.qh,{path:"/user/:userId/collection",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:{search:e.search,pathname:"/collection/tracks"}})}),(0,ct.jsx)(cn.qh,{path:"/search/*",element:(0,ct.jsx)(UW.e,{navigationalRoot:AW.g.SEARCH,children:(0,ct.jsx)(mq,{})})}),(0,ct.jsx)(cn.qh,{path:"/recent-searches",element:(0,ct.jsx)(UW.e,{navigationalRoot:AW.g.SEARCH,pageId:Kw.$h.SEARCH_RECENT,children:(0,ct.jsx)(pq,{})})}),(0,ct.jsx)(cn.qh,{path:"/collection/*",element:(0,ct.jsx)(UW.e,{children:(0,ct.jsx)(Nq,{})})}),(0,ct.jsx)(cn.qh,{path:"/artist/:artistId/*",element:(0,ct.jsx)(UW.e,{children:(0,ct.jsx)(kq,{})})}),(0,ct.jsx)(cn.qh,{path:"/album/:albumId/*",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.ALBUM,children:(0,ct.jsx)(Oq,{})})}),(0,ct.jsx)(cn.qh,{path:"/playlist-format/:title",element:(0,ct.jsx)(UW.e,{children:(0,ct.jsx)(SW,{isAnonymous:r})})}),(0,ct.jsx)(cn.qh,{path:"/playlist-format/:title/:category",element:(0,ct.jsx)(UW.e,{children:(0,ct.jsx)(SW,{isAnonymous:r})})}),(0,ct.jsx)(cn.qh,{path:"/track/:trackId/*",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.TRACK,children:i?(0,ct.jsx)(sq,{}):(0,ct.jsx)(rq,{})})}),(0,ct.jsx)(cn.qh,{path:"/playlist/:playlistId/see-all-ads",element:(0,ct.jsx)(jW,{})}),(0,ct.jsx)(cn.qh,{path:"/playlist/:playlistId/*",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.PLAYLIST,children:(0,ct.jsx)(Rq,{})})}),(0,ct.jsx)(cn.qh,{path:"/user/:username/folder/:folderId",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})}),(0,ct.jsx)(cn.qh,{path:"/folder/:folderId/*",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})}),(0,ct.jsx)(cn.qh,{path:"/user/:userId/*",element:(0,ct.jsx)(UW.e,{children:(0,ct.jsx)(aq,{})})}),(0,ct.jsx)(cn.qh,{path:"/genre/corona_news_podcasts",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/genre/corona_news_podcasts-page"})}),(0,ct.jsx)(cn.qh,{path:"/genre/:viewId",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.GENRE,children:(0,ct.jsx)(Tq,{})})}),(0,ct.jsx)(cn.qh,{path:"/view/:viewId",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.HOME_DRILLDOWN,children:(0,ct.jsx)(Tq,{})})}),(0,ct.jsx)(cn.qh,{path:"/merchhub",element:x?(0,ct.jsx)(Aq,{}):(0,ct.jsx)(vW.InstrumentedRedirect,{to:E?IW.G6:IW.iB})}),(0,ct.jsx)(cn.qh,{path:"/concerts-page",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/concerts"})}),(0,ct.jsx)(cn.qh,{path:"/concerts/location/:location",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.CONCERTS,children:(0,ct.jsx)(dq,{})})}),(0,ct.jsx)(cn.qh,{path:"/concerts",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.CONCERTS,children:(0,ct.jsx)(dq,{})})}),(0,ct.jsx)(cn.qh,{path:"/concert/:concertId",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.CONCERTS_CONCERT,children:(0,ct.jsx)(oq,{})})}),I&&(0,ct.jsx)(cn.qh,{path:"/venue/:venueId",element:(0,ct.jsx)(UW.e,{children:(0,ct.jsx)(Iq,{})})}),T&&false,(0,ct.jsx)(cn.qh,{path:"/lyrics",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.LYRICS,children:(0,ct.jsx)(_q,{format:"fullscreen"})})}),(0,ct.jsx)(cn.qh,{path:"/preferences",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.SETTINGS,navigationalRoot:AW.g.SETTINGS,children:(0,ct.jsx)(yq,{})})}),(0,ct.jsx)(cn.qh,{path:"/premium",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,ct.jsx)(Sq,{})})}),(0,ct.jsx)(cn.qh,{path:"/radio/:entity/:id",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/:entity/:id"})}),(0,ct.jsx)(cn.qh,{path:"/station/:entity/:id",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/:entity/:id"})}),(0,ct.jsx)(cn.qh,{path:"/new/playlist",element:(0,ct.jsx)(UW.e,{children:(0,ct.jsx)(gq,{})})}),(0,ct.jsx)(cn.qh,{path:"/blend/taste-match/:invitationId",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.BLEND_TASTE_MATCH,children:(0,ct.jsx)(Eq,{})})}),(0,ct.jsx)(cn.qh,{path:"/blend/invitation",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.BLEND_INVITATION,children:(0,ct.jsx)(xq,{})})}),(0,ct.jsx)(cn.qh,{path:"/_pong",element:(0,ct.jsx)(Cq,{})}),(0,ct.jsx)(cn.qh,{path:"/blend/invitation-page",element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.BLEND_INVITATION,children:(0,ct.jsx)(xq,{})})}),(0,ct.jsx)(cn.qh,{path:"/blend/ci/:playlistId",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/playlist/:playlistId"})}),(0,ct.jsx)(cn.qh,{path:"/__noul__",element:(0,ct.jsx)(tq,{})}),(0,ct.jsx)(cn.qh,{path:"/__noul__/*",element:(0,ct.jsx)(tq,{})}),t?[(0,ct.jsx)(cn.qh,{path:"/browse/podcasts",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/genre/podcasts-web"})},"podcasts"),u,(0,ct.jsx)(cn.qh,{path:qY.e2,element:(0,ct.jsx)(Pq,{})},qY.e2),(0,ct.jsx)(cn.qh,{path:"/show/:showId/more-like-this",element:C?(0,ct.jsx)(MK.ShowMoreLikeThis,{}):(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},"more-like-this-shows"),(0,ct.jsx)(cn.qh,{path:"/episode/:episodeId/more-like-this",element:w?(0,ct.jsx)($W.EpisodeMoreLikeThis,{}):(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},"more-like-this-episodes"),c,(0,ct.jsx)(cn.qh,{path:qY.Ch,element:(0,ct.jsx)(vq,{})},"episode")]:[(0,ct.jsx)(cn.qh,{path:"/browse/podcasts",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},"podcasts"),(0,ct.jsx)(cn.qh,{path:"/show/*",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},"show"),(0,ct.jsx)(cn.qh,{path:"/episode/*",element:(0,ct.jsx)(vW.InstrumentedRedirect,{to:"/"})},"episode")],TW.NW.map((e=>((e,t)=>[(0,ct.jsx)(cn.qh,{path:`/${TW.CT}${t}/track/:trackId`,element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.TRACK,children:e?(0,ct.jsx)(sq,{}):(0,ct.jsx)(rq,{})})},"locale_track"),(0,ct.jsx)(cn.qh,{path:`/${TW.CT}${t}/artist/:artistId/*`,element:(0,ct.jsx)(UW.e,{children:(0,ct.jsx)(kq,{})})},"locale_artist"),(0,ct.jsx)(cn.qh,{path:`/${TW.CT}${t}/album/:albumId`,element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.ALBUM,children:(0,ct.jsx)(nq,{})})},"locale_album"),(0,ct.jsx)(cn.qh,{path:`/${TW.CT}${t}/premium`,element:(0,ct.jsx)(UW.e,{pageId:Kw.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,ct.jsx)(Sq,{})})},"locale_premium")])(i,e))),(0,ct.jsx)(cn.qh,{path:"/debug/locales",element:(0,ct.jsx)("div",{children:(0,ct.jsx)(wq,{})})}),!1]})},Lq=(0,at.memo)((function(){return(0,ct.jsx)(bW,{children:(0,ct.jsx)(at.Suspense,{fallback:(0,ct.jsx)(ir.A,{hasError:!1,errorMessage:"",loadOffline:(0,p.Ek)()}),children:(0,ct.jsx)(jq,{})})})}));var Dq=n(51184);const Uq=({store:e,platform:t})=>{const n=[(0,ct.jsx)(At.IF,{}),(0,ct.jsx)(Dq.G,{}),(0,ct.jsx)(tr.GM,{}),(0,ct.jsx)(tt.vd,{}),(0,ct.jsx)(St,{platform:t}),(0,ct.jsx)(ht.xy,{}),(0,ct.jsx)(Vt.wI,{}),(0,ct.jsx)(bn.Pj,{}),(0,ct.jsx)(st.nI,{}),(0,ct.jsx)(it.SF,{}),(0,ct.jsx)(Tt.id,{}),(0,ct.jsx)(It.k7,{}),(0,ct.jsx)(pt.o,{}),(0,ct.jsx)(dt,{}),(0,ct.jsx)(wt.yd,{})];return(0,ct.jsx)(nr,{history:t.getHistory(),children:(0,ct.jsx)(rt.s,{onError:e=>(0,O.Jy)(e,"App"),FallbackComponent:Ht,children:(0,ct.jsx)(nt.Kq,{store:e,children:(0,ct.jsxs)(er,{platform:t,children:[(0,ct.jsx)(hn,{eventSender:t.getEventSender()}),(0,ct.jsxs)(qi,{providers:n,children:[(0,ct.jsx)(nn,{}),(0,ct.jsx)(Gt,{}),(0,ct.jsx)(Lq,{})]})]})})})})},Mq={pop:"POP",push:"PUSH",replace:"REPLACE"};function Bq(e,t){return{canGoBack:e>0,canGoForward:e<t.length-1}}const Fq=e=>{window?.performance?.mark&&e&&window.performance.mark(e)},Hq=(e,t,n)=>window?.performance?.measure&&window?.performance?.getEntriesByName&&e&&t&&n?(window.performance.measure(n,e,t),window.performance.getEntriesByName(n)):[];const Vq=(e,t)=>{const n=e.url.searchParams.get("dlsi")??Ge(),i=navigator.userAgent,r={link:e.url.toString(),entity_uri:e.uri.toURI(),source:i,deeplink_session_id:n};t.send((0,Be.N)(r))};function zq(e){const t=function(e){const t="https://open.spotify.com/",n="spotify://";return e.startsWith(n)?e.replace(n,t):e.startsWith("spotify:")?(e.replaceAll(":","/"),e.replace("spotify/",t)):e}(e),n=(0,j.o_)(t,{parseUnknown:!0});if(!n)return null;const i=function(e){try{return new URL(e).search}catch{return""}}(t),r=new URLSearchParams(i),s=new URL(n.toURL());return r.forEach(((e,t)=>{s.searchParams.set(t,e)})),{url:s,uri:n}}async function Gq(e,t){const{uri:n,url:i}=e,r=i.searchParams.get("pt"),s=i.searchParams.get("prid"),a=n.toString();r&&(await t.getPlaylistPermissionsAPI().claimPermissions(a,r),await t.getPlaylistAPI().resync(a)),s&&await async function(e,t,n){await e.build().withHost(v.p1).withMethod("POST").withPath(`/shared?playlistId=${t}&sharedEntityUri=${n}`).withEndpointIdentifier("/shared").withoutMarket().withResponseType("text").send()}(W.n.getInstance(),a,s)}var Wq=n(333),Kq=n(16976),Yq=n(56170);const qq={isAnonymous:!0,accessToken:"",accessTokenExpirationTimestampMs:0,user:null,locale:Mm.h.en,productState:null,market:"",valid:!1,overrides:null};function Qq(e=qq,t){switch(t.type){case Yq.J:return{...e,user:t.data};case Yq.O:return{...e,productState:t.data};case JU.ro:return{...e,accessToken:t.authData.accessToken,accessTokenExpirationTimestampMs:t.authData.accessTokenExpirationTimestampMs,isAnonymous:t.authData.isAnonymous,valid:!0};case JU.Zz:return e.user?{...e,user:{...e.user,display_name:t.name}}:e;case JU.L0:return e.user?{...e,user:{...e.user,images:t.images}}:e;case JU.Vx:return{...e,overrides:{...e.overrides,country:t.country}};case JU.dD:return{...e,overrides:{...e.overrides,locale:t.locale}};default:return e}}var $q=n(34481);const Zq=e=>!(e.type===$q.l_.PLAY||e.type===$q.l_.PLAYING),Xq=e=>!(e.type===$q.l_.PLAY||e.type===$q.l_.USER_INVESTMENT),Jq=e=>t=>n=>i=>{const r=n(i);switch(i.type){case $q.Jf:{const{storeAction:t,actionIntent:n}=i;e.storeAction((e=>((e,t)=>{const{type:n}=t;switch(n){case $q.l_.PLAY:return[t];case $q.l_.PLAYING:return[...e.filter(Zq),t];case $q.l_.USER_INVESTMENT:return[...e.filter(Xq),t];default:return[t]}})(e,{storeAction:t,type:n})));break}case $q.f6:{const n=e.pullAction()||null;t.dispatch({type:"PLAY_AT_FIRST_TAP_HAD_DEFERRED_ACTIONS",had:!!n&&n.length>0}),n&&n.forEach((({storeAction:e})=>{t.dispatch(e)}));break}}return r};var eQ=n(56186),tQ=n(50834);const nQ="SET_AUDIO_AD_INFO",iQ=e=>({type:nQ,info:e});var rQ=n(59081);function sQ(e,t){return t?{enableAudioIfNotAlreadyEnabled(){if(!t.getEnabled())return t.enable((t=>e.dispatch(iQ(t))))},disableAudioIfNotAlreadyDisabled(){if(t.getEnabled())return t.disable()}}:{}}function aQ(e,t,n){const i=t.getEvents();return p.Ek()&&i.addListener(I._.VOLUME,(({data:{volume:e,isLocal:t}})=>{t&&rQ.Q.logAudioVolume(e)})),t=>{const{enableAudioIfNotAlreadyEnabled:i,disableAudioIfNotAlreadyDisabled:r}=sQ(t,e);return t=>async s=>{const a=t(s);switch(s.type){case kl.QN.ADS_ENABLED:i?.();break;case kl.QN.ADS_DISABLED:r?.();break;case kl.QN.LOG_NOW_PLAYING_AD_CLICK:Bh(n.getState())&&e.logClick(s.eventReason,s.eventSource)}return a}}}const oQ=(e,t,n)=>i=>r=>async s=>{const a=r(s);switch(s.type){case kl.QN.ADS_ENABLED:{const r={create:e=>{i.dispatch((e=>({type:ja,data:e}))(e))},canShow:()=>{const e=n.getState();return!("/"===t.location.pathname)&&!(0,Se.A3)(e)&&!Uh(e)},isActive:()=>i.getState().ads.billboard.isOpen,minimize:()=>{i.dispatch({type:Fa})},destroy:()=>(i.dispatch(za()),Promise.resolve())};await e.enable(r);break}case kl.QN.ADS_DISABLED:await e.disable();break;case Da:if(i.getState().ads.sponsoredPlaylist.isVisible)return i.dispatch(za()),Promise.resolve();e.minimize();break;case Ua:e.adClick();break;case Ma:e.onRender();break;case Ba:e.onError();break;case Ha:e.onFinish()}return a};var lQ=n(10411),cQ=n(37595),uQ=n(10868);const dQ=e=>t=>n=>async i=>{const r=n(i),s=t.getState();switch(i.type){case uQ.QN.HPTO_CONTAINER_LOAD:e.subscribeToPreview((e=>{t.dispatch((0,uQ.DZ)(e)),t.dispatch((0,uQ.zi)())})),e.onRefresh((async()=>{const n=await e.fetchTemplate();t.dispatch((0,uQ.bK)(n)),t.dispatch((0,uQ.Yg)())}));break;case cQ.R:t.dispatch((0,uQ.bK)(i.template)),t.dispatch((0,uQ.Yg)());break;case uQ.QN.HPTO_CONTAINER_MOUNTED:{const n=await e.fetchTemplate();t.dispatch((0,uQ.bK)(n)),t.dispatch((0,uQ.Yg)());break}case uQ.QN.FETCH_CREATIVE:if(s.ads.hpto.preview)break;if(s.ads.hpto.creativeFetchingState===lQ.C.FETCHING)break;if(!s.ads.hpto.template)break;if(!s.ads.hpto.hptoContainerMounted)break;if(s.ads.root.isPremium&&s.ads.root.isHptoHidden)break;try{t.dispatch((0,uQ.QL)()),await e.fetchCreative(s.ads.hpto.template).then((e=>{t.dispatch((0,uQ.Q5)(e))}))}catch(e){console.error(e),t.dispatch((0,uQ.Fi)())}break;case uQ.t3:e.viewRendered(i.element);break;case uQ.QN.HPTO_COMPONENT_NEW_AD_RENDERED:e.logViewed();break;case uQ.QN.HPTO_COMPONENT_UNMOUNTED:e.viewDestroyed();break;case kl.QN.ADS_POST_HIDE_HPTO:e.logEvent("event_collapsed");break;case uQ.Q6:e.logEvent(i.event,i.context);break;case uQ.$4:e.logErrorEvent(i.error);break;case uQ.QN.DEBUG_FORCE_REFRESH_HPTO:{const n=await e.fetchTemplate();t.dispatch((0,uQ.bK)(n)),t.dispatch((0,uQ.Yg)());break}}return r};function mQ(e){return t=>t=>async n=>{const i=t(n);switch(n.type){case kl.QN.ADS_ENABLED:break;case kl.QN.ADS_DISABLED:case ro:e.disableLeaderboard();break;case to:e.setLeaderboardElement(n.element),e.enableLeaderboard();break;case no:e.onNavigationChanged()}return i}}var pQ=n(48840);function hQ(e){return t=>n=>async i=>{const r=n(i);switch(i.type){case kl.QN.ADS_ENABLED:e.enable((e=>{t.dispatch((0,pQ.Lc)(e))}));break;case kl.QN.ADS_DISABLED:e.disable();break;case pQ.Uy:try{const n=await e.requestSponsoredPlaylists();t.dispatch((0,pQ.lj)(n))}catch(e){t.dispatch((0,pQ.Ei)(e instanceof Error?e:new Error("Unknown error object")))}break;case pQ.nk:try{const n=i.playlistUri,r=await e.requestSponsoredPlaylistAd(n);t.dispatch((0,pQ.DD)(n,r))}catch(e){t.dispatch((0,pQ.wz)(e instanceof Error?e:new Error("Unknown error object")))}break;case pQ.zB:e.logEvent(i.message);break;case pQ.zc:t.dispatch((0,pQ.Lc)(null))}return r}}const gQ=(e,t)=>{if(!(null===e?.ads?.vto?.info)&&t&&!t.isPaused){const e=document.getElementsByClassName("VideoPlayer__container")[0];if(e){const t=e.getElementsByTagName("video")[0];t&&t.play&&t.play()}}},fQ=(e,t)=>{e.getState().ads.vto.isMinimized||(e.dispatch((0,So.Oc)()),t.logEvent(Ao.ee.COLLAPSED))};function bQ(e,t,n){return n?{enableVideoTakeoverIfNotAlreadyEnabled(){if(n.getEnabled())return;const i={onCreated(){e.dispatch((0,So.Pu)())},onInfo(t){e.dispatch((0,So.gW)(t))},onFirstReady(){gQ(e.getState(),t.getState())},onStarted(){},onEnded:()=>{e.dispatch((0,So.gW)(null)),e.dispatch((0,So.W_)())}};return n.enable(i)},disableVideoTakeoverIfNotAlreadyDisabled(){if(n.getEnabled())return n.disable()}}:{}}const vQ=(e,t)=>n=>{const{enableVideoTakeoverIfNotAlreadyEnabled:i,disableVideoTakeoverIfNotAlreadyDisabled:r}=bQ(n,t,e);return s=>async a=>{const o=s(a);switch(a.type){case kl.QN.ADS_ENABLED:await(i?.());break;case kl.QN.ADS_DISABLED:await(r?.());break;case So.QN.VTO_LOG_EVENT:e.logEvent(a.event,a.eventReason,a.eventSource),a.event===Ao.ee.CLICKED&&fQ(n,e);break;case kl.QN.LOG_NOW_PLAYING_AD_CLICK:Mh(t.getState())&&(e.logEvent(Ao.ee.CLICKED,a.eventReason,a.eventSource),fQ(n,e));break;case So.QN.VTO_NAVIGATION_CHANGE:fQ(n,e);break;case So.QN.MAXIMIZE_VIDEO_AD_VIEW:case So.QN.MINIMIZE_VIDEO_AD_VIEW:gQ(n.getState(),t.getState())}return o}},yQ="ui.hide_hpto";class _Q{constructor(e,t){this.cosmosConnector=e,this.prefs=t}requestPreviewAd(e){return this.cosmosConnector.requestPreviewAd(e)}subscribeToAdsProductState(e){return this.cosmosConnector.subscribeToAdsProductState(e)}subscribeToPremiumState(e){return this.cosmosConnector.subscribeToProductState("catalogue",e)}fakeSubscribe(){}subscribeToHpto(e){const t=yQ;return this.prefs.sub({key:t},(({entries:n})=>e({[t]:!!n[t].bool})))}async hideHpto(){const e=yQ;await this.prefs.set({entries:{[e]:{bool:!0}}})}}class EQ{requestPreviewAd(){return Promise.resolve({})}subscribeToAdsProductState(){return{cancel:()=>{}}}subscribeToPremiumState(){return{cancel:()=>{}}}subscribeToHpto(){return{cancel:()=>{}}}async hideHpto(){}fakeSubscribe(e,t){e(t)}}const xQ={subscription:void 0};function CQ(e){const t=e?.item??void 0;return(0,$t.p)(t)?"audio"===t.mediaType||"mixed"===t.mediaType:!!(0,qt.N)(t)&&t.isPodcastAd}const SQ=({store:e,adManagers:t,isDesktop:n,playerAPI:i})=>({adsEnabled:r=e.getState().ads.root.adsEnabled,playerState:s=i.getState(),isPodcastContent:a=CQ(s)}={})=>{r!==e.getState().ads.root.adsEnabled&&e.dispatch((r?kl.s3:kl.Nb)());const{enableVideoTakeoverIfNotAlreadyEnabled:o,disableVideoTakeoverIfNotAlreadyDisabled:l}=bQ(e,i,t?.vto.manager),{enableAudioIfNotAlreadyEnabled:c,disableAudioIfNotAlreadyDisabled:u}=sQ(e,t?.audio);return Promise.all(n&&(a||r)?[o?.(),c?.()]:[l?.(),u?.()])};const AQ=({history:e,blockedPaths:t,rootApi:n,adManagers:i,isDesktop:r,playerAPI:s})=>a=>{const{handleAdsProductState:o,activateAdsProductStateSubscription:l}=function({rootApi:e,store:t,adManagers:n,isDesktop:i,playerAPI:r,toggleAdManagers:s=SQ({store:t,adManagers:n,isDesktop:i,playerAPI:r})}){async function a({playerState:e=r.getState(),isPodcastContent:t=CQ(e)}={}){return await s({playerState:e,isPodcastContent:t}),function(...[{ads:n}]){return s({adsEnabled:"1"===n,playerState:e,isPodcastContent:t})}}let o=CQ(r.getState());return{handleAdsProductState:a,activateAdsProductStateSubscription:async function(t){const n=CQ(t);return null===t||o!==n?(o=n,xQ.subscription?.cancel(),xQ.subscription=e.subscribeToAdsProductState(await a({playerState:t,isPodcastContent:n}))):xQ.subscription}}}({rootApi:n,store:a,adManagers:i,isDesktop:r,playerAPI:s});return s.getEvents().addListener(P.gd.UPDATE,(async({data:e})=>{await l(e)})),i=>async r=>{switch(r.type){case JU.xM:await l(null);break;case Yq.O:n.fakeSubscribe(await o(),r.data)}const c=i(r),u=a.getState();if(!u.ads.root.adsEnabled)return c;const d=u.platform.isDesktop,m=d&&u.ads.billboard.isOpen,p=u.ads.sponsoredPlaylist.isVisible,h=t.includes(e.location.pathname),g=u.ads.leaderboard.isEnabled,f=(0,Wt.c)(u)===Kt.K.cinema;switch(h||Uh(s.getState())?(m&&a.dispatch(Va()),g&&a.dispatch(so())):!d||g||m||p||f||a.dispatch({type:io}),r.type){case Vo.kX.SET_VIDEO_UI_FLAG:{const{key:e,value:t}=r;e===Kt.n.cinema&&t&&a.dispatch(so());break}case ja:a.dispatch(so());break;case pQ.Xv:a.dispatch(so()),a.dispatch(Va());break;case uQ.QN.HPTO_PREVIEW_HOME_NAVIGATION:"/"===e.location.pathname||e.push("/");break}return c}};var wQ=n(84841);let IQ,TQ;const NQ=({rootApi:e})=>t=>n=>async i=>{const r=n(i);switch(i.type){case JU.xM:(0,p.My)()===m.m.Desktop&&(0,wQ.z)({_debugForceRefreshHpto:()=>t.dispatch((0,uQ.BH)()),overrideSponsoredPlaylistEndpoint:()=>t.dispatch((0,pQ.uU)())}),IQ||(IQ=e.subscribeToPremiumState((({catalogue:e})=>{const n="premium"===e;t.dispatch((0,kl.CW)(n))}))),TQ||(TQ=e.subscribeToHpto((e=>t.dispatch((0,kl.yx)(e["ui.hide_hpto"])))));break;case kl.QN.ADS_POST_HIDE_HPTO:e.hideHpto();break;case Yq.O:e.fakeSubscribe((async({catalogue:e})=>{const n="premium"===e;t.dispatch((0,kl.CW)(n)),t.dispatch((0,kl.yx)(!1))}),i.data);break;case kl.QN.TRIGGER_PREVIEW_AD:e.requestPreviewAd(i.adUriHexId)}return r},RQ=(e,t,n,i,r,s)=>{const a=e?new _Q(rQ.Q,(0,eQ.dn)((0,tQ.X)())):new EQ,o=e?["/","/premium"]:[],{root:l=NQ,sponsoredPlaylist:c=hQ,orchestrator:u=AQ,leaderboard:d=mQ,billboard:m=oQ,hpto:p=dQ,audio:h=aQ,videoTakeover:g=vQ}=s??{};return[l({rootApi:a}),c(n.sponsoredPlaylist),u({history:t,blockedPaths:o,rootApi:a,adManagers:n,isDesktop:e,playerAPI:r}),...e?[d(n.leaderboard),m(n.billboard,t,r),p(n.hpto),h(n.audio,i,r),g(n.vto.manager,r)]:[]]},kQ={info:null},OQ=(e=kQ,t)=>t.type===nQ?{...e,info:t.info}:e,PQ={isOpen:!1,imageLoaded:!1,isMinimized:!1,data:{}},jQ=(e=PQ,t)=>{switch(t.type){case ja:return{...e,isOpen:!0,data:t?.data};case La:return{...e,isOpen:!1,isMinimized:!1,imageLoaded:!1};case Ma:return{...e,imageLoaded:!0};case Fa:case Da:return{...e,isMinimized:!0};default:return e}},LQ={hptoEnabled:!1,template:null,creative:null,preview:null,creativeFetchingState:lQ.C.NOT_FETCHING,hptoContainerMounted:!1,hptoIsStable:!0},DQ=(e=LQ,t)=>{switch(t.type){case kl.QN.ADS_ENABLED:return{...e,hptoEnabled:!0};case cQ.R:case uQ.QN.HPTO_CONTAINER_MOUNTED:return{...e,hptoContainerMounted:!0};case uQ.QN.HPTO_COMPONENT_UNMOUNTED:return{...e,preview:null,creativeFetchingState:lQ.C.NOT_FETCHING,creative:t.data.clearCreative?null:e.creative};case uQ.QN.HPTO_CONTAINER_UNMOUNTED:return{...e,hptoContainerMounted:!1};case uQ.QN.GOT_TEMPLATE:return{...e,template:t.data};case uQ.QN.SET_HPTO_PREVIEW:return{...e,hptoIsStable:!0,preview:t.data};case uQ.QN.GOT_CREATIVE:return{...e,creative:t.data,creativeFetchingState:lQ.C.FETCHED,hptoIsStable:!0};case uQ.QN.FETCHING_CREATIVE:return{...e,creativeFetchingState:lQ.C.FETCHING,creative:null};case uQ.QN.CREATIVE_FETCH_FAILED:return{...e,creativeFetchingState:lQ.C.FAILED,hptoIsStable:!1};default:return e}},UQ={isEnabled:!1};function MQ(e=UQ,t){switch(t.type){case io:return{...e,isEnabled:!0};case ro:return{...e,isEnabled:!1};default:return e}}const BQ={sponsoredPlaylist:new Map,isVisible:!1,previewAd:null};function FQ(e=BQ,t){switch(t.type){case pQ.Um:return function(e,t){return{...e,sponsoredPlaylist:e.sponsoredPlaylist.set("allSponsorships",t.sponsorships)}}(e,t);case pQ.Rl:return function(e,t){return{...e,sponsoredPlaylist:e.sponsoredPlaylist.set(t.playlistUri,t.ad)}}(e,t);case pQ.Xv:return{...e,isVisible:!0};case pQ.zc:return{...e,isVisible:!1};case pQ.Uh:return{...e,previewAd:t.previewAd};default:return e}}const HQ={isMinimized:!1,isHidden:!0,info:null},VQ=(e=HQ,t)=>{switch(t.type){case So.QN.MINIMIZE_VIDEO_AD_VIEW:return{...e,isMinimized:!0};case So.QN.MAXIMIZE_VIDEO_AD_VIEW:return{...e,isMinimized:!1};case So.QN.HIDE_VIDEO_AD_VIEW:return{...e,isHidden:!0};case So.QN.SHOW_VIDEO_AD_VIEW:return{...e,isHidden:!1};case So.QN.VTO_SET_INFO:return{...e,info:t.info};default:return e}};var zQ=n(96748),GQ=n(70011);const WQ=(0,zQ.vy)({adId:null,liked:!1,disliked:!1,feedback:null},(e=>{e.addCase(GQ.CJ.LIKE_AD,((e,t)=>{GQ.F$.match(t)&&(e.adId=t.payload.adId,e.liked=!0,e.disliked=!1,t.payload.reason&&(e.feedback=t.payload.reason))})).addCase(GQ.CJ.DISLIKE_AD,((e,t)=>{GQ.NI.match(t)&&(e.adId=t.payload.adId,e.disliked=!0,e.liked=!1,t.payload.reason&&(e.feedback=t.payload.reason))})).addCase(GQ.CJ.CANCEL_LIKE_AD,((e,t)=>{GQ.D$.match(t)&&(e.liked=!1,e.feedback=null)})).addCase(GQ.CJ.CANCEL_DISLIKE_AD,((e,t)=>{GQ.vA.match(t)&&(e.disliked=!1,e.feedback=null)}))})),KQ={adsEnabled:!1,isPremium:!1,isHptoHidden:!0},YQ=(e=KQ,t)=>{switch(t.type){case kl.QN.ADS_ENABLED:return{...e,adsEnabled:!0};case kl.QN.ADS_DISABLED:return{...e,adsEnabled:!1};case kl.QN.ADS_PREMIUM:return{...e,isPremium:!!t.isPremium};case kl.QN.ADS_HPTO_HIDDEN:return{...e,isHptoHidden:!!t.isHptoHidden};default:return e}},qQ={env:rM,message:null,showPreviewTool:!1},QQ=(e=qQ,t)=>{switch(t.type){case wr.QN.SHOW_IN_APP_MESSAGE:return{...e,message:t.message};case wr.QN.DISMISS_IN_APP_MESSAGE:return{...e,message:null};case wr.QN.SET_IN_APP_MESSAGING_ENV:return{...e,env:t.env};case wr.QN.SHOW_PREVIEW_TOOL:return{...e,showPreviewTool:t.show};default:return e}},$Q=e=>t=>n=>async i=>{const r=n(i);if(i.type===jM.QN.GET_AGE_RESTRICTION_MODAL)try{const n=await e.getDialog(i.uri);t.dispatch((0,jM.eK)(n))}catch{}return r},ZQ=e=>t=>n=>{const i=t(n);switch(n.type){case JU.xM:xt((()=>e.dispatch({type:JU.tQ})));break;case JU.tQ:(r=W.n.getInstance(),r.build().withHost(v.Go).withHostIdentifier("https://open.spotify.com").withPath("/logout").withoutMarket().withoutAuthorization().withEndpointIdentifier("/logout").send()).then((()=>{e.dispatch((0,Re.oM)()),window.location.assign("/")}),((e,t=!1)=>n=>(console.error(n),e&&e(n),t?Promise.reject(n):Promise.resolve(void 0)))())}var r;return i};var XQ=n(37666);const JQ="urn:x-cast:com.spotify.chromecast.secure.v1";let e$=!1;const t$=()=>window.cast?.framework.CastContext.getInstance(),n$=e=>PV()(e),i$=(e,t)=>{e.send((0,XQ.F)(t))},r$=(e,t,n)=>{const i=t$();i&&(i.setOptions({receiverApplicationId:"CC32E753",autoJoinPolicy:"page_scoped",androidReceiverCompatible:n}),e.dispatch(wm(i.getCastState())),i.addEventListener(window.cast?.framework.CastContextEventType.CAST_STATE_CHANGED,(({castState:t})=>e.dispatch(wm(t)))),i.addEventListener(window.cast?.framework.CastContextEventType.SESSION_STATE_CHANGED,(({sessionState:n,session:i})=>{if(n===window.cast?.framework.SessionState.SESSION_STARTING)i$(t,{step:"transfer_requested"});else if(n===window.cast?.framework.SessionState.SESSION_STARTED){let n=null;i?.getCastDevice()?.friendlyName&&(n=n$(i.getCastDevice().friendlyName)),e.dispatch({type:Sm,deviceId:n}),i$(t,{step:"receiver_app_started"})}})))},s$=async(e,t,n,i)=>{const r=await t.request("https://spclient.wg.spotify.com/device-auth/v1/refresh",{method:"POST",authorize:!0,payload:JSON.stringify({clientId:"d7df0887fb71494ea994202cb473eae7",deviceId:e})});if(null===r.body)throw new Error("Invalid response from device-auth!");((e,t,n)=>{const i={tokenType:"accesstoken",blob:t.accessToken};e.sendMessage(JQ,{type:"addUser",payload:i}),i$(n,{step:"message_from_sender"})})(n,JSON.parse(r.body),i)},a$=(e,t,n)=>{const i=t$().getCurrentSession();if(null===i)return;i.addMessageListener(JQ,((r,s)=>{const a=JSON.parse(s);i$(n,{step:"message_from_receiver"});try{if("getInfoResponse"===a.type){const t=a.payload;s$(t.deviceID,e,i,n)}else if("addUserResponse"===a.type){const e=a.payload;t.dispatch((0,my.VR)(e.deviceId))}else if(a.type.endsWith("Error"))throw new Error(a.payload.status)}catch(e){console.error("Failed to transfer playback to Cast device!",e)}})),((e,t)=>{const n=e.getCastDevice(),i={remoteName:n.friendlyName,deviceID:n$(n.friendlyName),deviceAPI_isGroup:n.capabilities.includes(chrome?.cast?.Capability.MULTIZONE_GROUP)};e.sendMessage(JQ,{type:"getInfo",payload:i}),i$(t,{step:"message_from_sender"})})(i,n)},o$=(e,t,{deviceInfo:n})=>{if(n&&n.is_active&&(0,jP.M)(n.type)){const i=t$()?.getCastState()===window.cast?.framework.CastState.CONNECTED,r=e.getState().playback?.connectingCastDeviceId;i&&n.id===r&&(i$(t,{step:"transfer_finished"}),e.dispatch({type:Am}))}};function l$(e,t,n){return i=>r=>s=>{switch(s.type){case JU.xM:((e,t,n)=>{if(!window.cast){window.__onGCastApiAvailable=i=>{i&&!e$&&(r$(e,t,n),e$=!0)};const i=document.createElement("script");i.async=!0,i.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",document.body.appendChild(i)}})(i,t,n);break;case Cm:(()=>{const e=t$();e&&e.requestSession()})();break;case xm:((e,t,n,{castState:i})=>{i===window.cast?.framework.CastState.CONNECTED&&a$(e,t,n)})(e,i,t,s);break;case my.gK.DEVICE_INFO_CHANGED:o$(i,t,s)}return r(s)}}var c$=n(27920);const u$=e=>t=>n=>async i=>{const r=n(i);switch(i.type){case du.QN.CHECK_DUPLICATE_TRACKS:{const{playlistUri:n,uris:r,position:a={after:"end"}}=i;try{const{name:i}=await e.getMetadata(n),o=await e.getContents(n);let l=[...r];if((0,j._T)(r[0])){const e=(0,ie.lY)(W.n.getInstance()),{trackUris:t}=await(0,Gw.s)(r[0],0,e);l=t}const c=o.items.map((e=>e?.uri)),{duplicates:u,newUris:d}=(s=c,l.reduce(((e,t)=>{const n=s.includes(t);return{duplicates:n?[...e.duplicates,t]:e.duplicates,newUris:n?e.newUris:[...e.newUris,t]}}),{duplicates:[],newUris:[]}));0===u.length?e.add(n,l,a):1===l.length?t.dispatch((0,du.xM)({playlistName:i,playlistUri:n,uri:l[0],position:a})):t.dispatch((0,du.xM)({playlistName:i,playlistUri:n,uris:l,newUris:d,position:a}))}catch(t){e.add(n,r,a),window.console.error(t)}break}}var s;return r},d$=e=>t=>n=>i=>{const r=n(i),{type:s}=i,{session:a}=t.getState(),{isAnonymous:o}=a;if(s===db.g.LOG_INTERACTION)e.send(o?(0,oy.o)(i.logData):(0,ay.x)(i.logData));return r},m$=()=>e=>t=>{const n=e(t);if(t.type===db.g.LOG_INTERACTION){const{logData:e}=t;dn(e.action_type,e.action_intent,e.item_id)}return n};let p$=null,h$=!1;let g$,f$=[],b$=[];const v$=e=>{try{(0,je.fE)({metric_type:Ke.MetricTypes.COUNTER,what:"harmony-error",value:1,tags:{type:e}})}catch(e){}},y$=(e,t)=>(g$=function(){if(null===k)throw new Error("Missing `instance`. Have you called `createHarmony` yet?");return k}(),g$.on(w.bi.LOCAL_PLAYER_ENABLED,(()=>{const e=(()=>{try{const e=localStorage.getItem(T);if(null===e)return null;const{volume:t}=JSON.parse(e);return t||null}catch(e){return null}})();null!==e&&g$.setVolume(e,"@local");try{Fq("playback_load_end");const e=Hq("playback_load_start","playback_load_end","time_to_playback_ready"),[{duration:t}={duration:void 0}]=e;t&&(0,je.fE)({metric_type:Ke.MetricTypes.TIMER,what:"playback-ready",value:Ke.Time.fromMillis(t).asNanos()}).catch((()=>({})))}catch(e){}})),g$.on(w.bi.AUTHENTICATION_ERROR,(()=>{v$(w.bi.AUTHENTICATION_ERROR)})),g$.on(w.bi.UNRECOVERABLE_FAILURE,(({data:t})=>{const n=t.error.message||"";if(navigator.userAgent.indexOf("Edge")>-1)e.dispatch(my.tS()),(0,O.UD)(t.error),v$(my.gK.CDM_ERROR);else if(t.source===w.O4.PLAYBACK){const i=t.name||t.error?.name||t.error?.code||"unknown";e.dispatch(my.CZ(i,t.source,n))}v$(w.bi.UNRECOVERABLE_FAILURE)})),g$.on(w.bi.ERROR,(({data:t})=>{if(t.error.code===w.Hv.EME_LICENSE_REQUEST_WIDEVINE_ERROR&&e.dispatch(et.rN()),t.error.code===w.Hv.MEDIA_DECODING_ERROR&&!h$){const n="media_decoding_error",i=t.source,r=t.error.message||"";e.dispatch(my.CZ(n,i,r))}const n=t.name||t.error?.name||t.error?.code||"unknown";v$(n)})),g$.on(w.bi.PLAYER_INITIALIZATION_DONE,(()=>{t.triggerActions(),e.dispatch((0,$q.H2)())})),g$.on(w.bi.PLAYER_INITIALIZATION_FAILED,(({data:t})=>{if(!navigator.webdriver&&(v$(my.gK.CDM_ERROR),t.error)){if(t.error.message&&t.error.message.indexOf("0x80004005")>=0)return;e.dispatch(my.tS()),(0,O.UD)(t.error)}})),g$.on(w.bi.MAX_SUBSCRIPTIONS_REACHED,(({data:t})=>{e.dispatch(my.fj(t.source??"unknown")),v$(w.bi.MAX_SUBSCRIPTIONS_REACHED)})),g$.on(w.bi.PRODUCT_STATE_CHANGED,(()=>{})),g$.on(w.bi.STATE_CHANGED,(e=>{if(e.data.state&&e.data.state.context&&e.data.state.context.uri&&(e.data.state.context.uri=e.data.state.context.uri.replace(/:user:([^:]+):playlist:/g,":playlist:")),0===f$.length)try{Fq("playback_load_update"),f$=Hq("playback_load_start","playback_load_update","time_to_playback_fetched");const[{duration:e}={duration:void 0}]=f$;e&&(0,je.fE)({metric_type:Ke.MetricTypes.TIMER,what:"playback-fetched",value:Ke.Time.fromMillis(e).asNanos()}).catch((()=>({})))}catch(e){}!e.data.state?.paused&&b$.length})),g$.on(w.bi.LAST_ACTIVE_DEVICE_INFO_CHANGED,(t=>{const n=t.data.deviceInfo;n&&e.dispatch(my.rD(n))})),g$.on(w.bi.PROGRESS,(()=>{h$=!0})),g$),_$=(e,t)=>{const n=e.getState(),{isAnonymous:i}=(0,ma.Ht)(n);return i?null:y$(e,t)},E$="STORE_SEARCH",x$="SEARCH_HISTORY_CLEAR_DATA";var C$=n(98304);const S$=()=>e=>t=>{if(t.type===x$)localStorage.removeItem(C$.C);return e(t)};var A$=n(53216);const w$=()=>e=>t=>async n=>{const i=t(n);if(n.type===A$.gK.REQUEST_SEO_EXPERIMENT_DATA)try{const t=await(r=W.n.getInstance(),s=`/${(0,j.o_)(n.uri).toURLPath()}`,r.build().withHost(v.Go).withHostIdentifier("https://open.spotify.com").withPath("/seo").withQueryParameters({entityURL:s}).withoutMarket().withoutAuthorization().withEndpointIdentifier("/seo").send());e.dispatch((0,A$.Jz)(t?.body))}catch(t){e.dispatch((0,A$.jG)())}var r,s;return i},I$=e=>()=>t=>n=>{const i=t(n);if(n.type===JU.tQ)e(n);return i};function T$(e){return t=>n=>i=>{const r=n(i);switch(i.type){case JU.tQ:{e.finalFlush(),t.dispatch((0,my.MW)()),t.dispatch({type:x$});const n=document.getElementById("session");n&&n.remove();break}}return r}}let N$=!1;const R$=(e,t)=>{const n=e.getEvents();return e=>(n.addListener(P.gd.ACTION,(n=>{const i=e.getState(),r=pr(),s=null!==r&&!1===r?.seen;N$||n.data.action!==P.Ik.PLAY||(N$=!0,s&&(N$=!0,function(e){const t=encodeURIComponent(JSON.stringify({seen:e})),n=pr();null!==n&&n.seen===e||(0,V.n0)({name:cr,days:30,domain:".spotify.com",value:t})}(!0),t.send(dr(i.session.isAnonymous,{country:i.session.userCountry,os:(0,S.f)()})),e.dispatch((0,et.mi)())))})),e=>t=>e(t))},k$=()=>e=>t=>{const n=e(t);switch(t.type){case et.gK.ENTER_FULLSCREEN:document.documentElement.classList.add("fullscreen");break;case et.gK.LEAVE_FULLSCREEN:document.documentElement.classList.remove("fullscreen")}return n},O$={isOpen:!1},P$=(e=O$,t)=>{switch(t.type){case vM.QN.SHOW_ABOUT_RECS_MODAL:return{...e,isOpen:!0};case vM.QN.HIDE_ABOUT_RECS_MODAL:return{...e,isOpen:!1};default:return e}},j$={isOpen:!1},L$=(e=j$,t)=>{switch(t.type){case dB.QN.SHOW_ABOUT_SPOTIFY_MODAL:return{...e,isOpen:!0};case dB.QN.HIDE_ABOUT_SPOTIFY_MODAL:return{...e,isOpen:!1};default:return e}},D$={isOpen:!1,uri:"",dialog:void 0},U$=(e=D$,t)=>{switch(t.type){case jM.QN.SHOW_AGE_RESTRICTION_MODAL:return{...e,isOpen:!0,dialog:t.dialog};case jM.QN.GET_AGE_RESTRICTION_MODAL:return{...e,uri:t.uri};case jM.QN.HIDE_AGE_RESTRICTION_MODAL:return{...e,isOpen:!1};default:return e}},M$={isOpen:!1,playlistUri:void 0,uri:void 0,uris:void 0,position:void 0,playlistName:void 0,newUris:void 0},B$=(e=M$,t)=>{switch(t.type){case du.QN.SHOW_DUPLICATE_TRACKS_DIALOG:return{...e,isOpen:!0,playlistUri:t.playlistUri,uri:t.uri,uris:t.uris,position:t.position,playlistName:t.playlistName,newUris:t.newUris};case du.QN.HIDE_DUPLICATE_TRACKS_DIALOG:return{...e,isOpen:!1};default:return e}},F$={ads:!1},H$=(e,t)=>(t.type,e||F$),V$={isOpen:!1},z$=(e=V$,t)=>{switch(t.type){case mB.QN.SHOW_LICENSES_MODAL:return{...e,isOpen:!0};case mB.QN.HIDE_LICENSES_MODAL:return{...e,isOpen:!1};default:return e}},G$=e=>{const t=(0,p.My)();return{isBrowser:t===m.m.Web,isPWA:t===m.m.PWA,isDesktop:t===m.m.Desktop,shouldCalloutPWA:(0,p.wD)(),isDeveloperMode:e.isDeveloperMode,isVideoSupported:e.isVideoSupported}},W$=e=>(t=G$(e),n)=>n.type===Xe?G$(e):t,K$={device:null,castState:"NO_DEVICES_AVAILABLE",connectingCastDeviceId:null},Y$=(e,t)=>{const n=t.deviceInfo;return n&&isNaN(n.volume)&&(n.volume=0),{...e,device:n}},q$=(e,t)=>({...e,castState:t.castState}),Q$=(e,t)=>({...e,connectingCastDeviceId:t.deviceId}),$$=e=>({...e,connectingCastDeviceId:null}),Z$=e=>(localStorage.removeItem(T),{...e}),X$=(()=>{const e={[my.gK.DEVICE_INFO_CHANGED]:Y$,[my.gK.PLAYBACK_CLEAR_DATA]:Z$,[xm]:q$,[Sm]:Q$,[Am]:$$};return(t,n)=>{let i=null;return n.type in e&&(i=e[n.type](i||t,n)),i||t||K$}})(),J$="searchHistory",eZ={contexts:(()=>{const e=localStorage.getItem(J$);return e?JSON.parse(e).filter((e=>"uri"in e)):[]})()},tZ=(e=eZ,t)=>{switch(t.type){case E$:{const n=t.uri?((e,t,n,i)=>[{uri:e,name:t,image:n}].concat(i.filter((t=>t.uri!==e))).splice(0,4))(t.uri,t.name,t.image,e.contexts):e.contexts;try{localStorage.setItem(J$,JSON.stringify(n))}catch(e){}return{...e,contexts:n}}case x$:return localStorage.removeItem(J$),{...e,contexts:[]};default:return e}},nZ={},iZ=(e=nZ,t)=>{switch(t.type){case A$.gK.REQUEST_SEO_EXPERIMENT_DATA:return{...e,uri:t.uri};case A$.gK.SET_SEO_EXPERIMENT_DATA:return{...e,...t.data};default:return e}},rZ=e=>{return(0,Wq.HY)({playback:X$,session:Qq,ui:qv.DN,searchHistory:tZ,features:H$,duplicateTracks:B$,ageRestriction:U$,platform:W$(e),ads:(t=e.container,(0,Wq.HY)({sponsoredPlaylist:FQ,leaderboard:MQ,root:YQ,adFeedback:WQ,...t===m.m.Desktop?{billboard:jQ,hpto:DQ,vto:VQ,audio:OQ}:{}})),inAppMessaging:QQ,aboutRecs:P$,seoExperiment:iZ,...e.container===m.m.Desktop&&{aboutSpotify:L$,licenses:z$}});var t},sZ=Wq.Zz,aZ=(e,t)=>{const{session:n}=e,{actionStoreApi:i,adManagers:r,ageRestrictionApi:s,deferredAction:a,eventSender:o,followApi:l,history:c,libraryApi:u,offlineApi:d,platform:m,playbackApi:p,playerApi:h,playlistApi:g,rootlistApi:f,serviceWorkerMessenger:b,socialConnectApi:v,transport:y}=t,_=Te(m),E=[];return _?E.push((e=>()=>t=>n=>{const i=t(n);return n.type===JU.tQ&&e.finalFlush().finally(c$.r),i})(o)):(n?.isAnonymous||E.push((e=>t=>n=>i=>{const r=n(i),s=t.getState(),a=s.session;if(i.type in my.gK){const{hasOccurred:e,isOpen:n}=t.getState().ui.playbackNotSupportedErrorDialog;if(e&&!n)return t.dispatch(et.rN()),r}switch(i.type){case JU.xM:!p$&&a.accessToken&&(p$=_$(t,e),t.getState().features&&t.getState().features.mwp&&window.addEventListener("focus",(()=>{p$&&p$._controller&&!p$._controller._state?p$=_$(t,e):p$?.getCurrentState().then((n=>{n||(p$=_$(t,e))}))})));break;case my.gK.SET_ACTIVE_DEVICE:s.playback.device&&s.playback.device.id===i.id||p$?.transfer(i.id)}return r})(i)),E.push(ZQ),E.push(l$(y,o,m.enableCastConnect))),[(0,py.oU)(h,u,f,l,i),(C=d,e=>(C.getEvents().addListener(ue.I.ERROR,(t=>{t.data.code===ce.O4.DEVICE_LIMIT_REACHED&&e.dispatch((0,et.j4)())})),e=>async t=>{e(t)})),(x=c.push,e=>t=>n=>{const{pathname:i,search:r,hash:s}=window.location,{dispatch:a}=e,o=e.getState(),l=new RegExp(mn),{OPEN_SIGNUP_PROMPT_DIALOG:c,CLOSE_SIGNUP_PROMPT_DIALOG:u,UPDATE_UI_HISTORY_STATE:d}=et.gK;switch(n.type){case c:x({pathname:i,search:r,state:{},hash:mn});break;case u:x({pathname:i,search:r,state:{},hash:""});break;case d:(e=>e.ui.improvedSignupPromptDialog.isOpen)(o)&&!l.test(s)&&a((0,et.BU)())}return t(n)}),Jq(a),...E,...RQ(_,c,r,p,h),I$(b),$Q(s),u$(g),T$(o),k$,pM(c,h,v),S$,d$(o),m$,R$(h,o),w$(),Kq.A];var x,C};n(74892);async function oZ(e,t,n){if(null===e||null===t)return;const r=await Me.hash(e.username);var s;(0,i.PN)((e=>{(0,p.My)()===m.m.Desktop&&e.setUser({id:r}),e.setTag("product",t.product)})),n.dispatch((s={country:t.country,uri:e.uri,id:e.username,display_name:e.displayName||void 0,images:e.images.map((({url:e,width:t,height:n})=>({url:e,width:t||null,height:n||null}))),product:t.product,policies:{opt_in_trial_premium_only_market:"1"===t["opt-in-trial-premium-only-market"]},type:"user",avatarBackgroundColor:e.avatarBackgroundColor},{type:Yq.J,data:s})),n.dispatch(function(e){return{type:Yq.O,data:e}}(t))}Fq("playback_load_start"),(0,o.Cd)(),async function(){if(g()){const e=.001,t=[];let n=0;0;const i="xpui_2024-05-03_1714757530304_e66eb7b";(0,O.ig),("https://de32132fc06e4b28965ecf25332c3a25@o22381.ingest.sentry.io/114855",i,{sampleRate:e,tracesSampleRate:n},{},void 0,t)}const e=await async function(){const e=(0,p.My)();return(0,f._)(e)}(),t=e.getSession(),n=e.getHistory(),m=e.getFeatureFlags(),h=e.getSEOExperiments(),b=e.getControlMessageAPI();(0,i.PN)((t=>{Object.keys(m).forEach((e=>{t.setExtra(e,m[e])})),e.container&&t.setTag("container",e.container)})),Qe.setup(),gB(e.container,e.operatingSystem);const v=e.getEventSender();b.getEvents().addListener("message",(t=>{t.data.type===d.W.NAVIGATION&&async function(e,t){if(!t)return;const n=zq(t);if(!n)return;const{url:i}=n;if(Ze(i)){const t=e.getEventSender();Vq(n,t)}await Gq(n,e);const r=`${i.pathname}${i.search}`;e.getHistory().push(r,{referrer:"deeplink"})}(e,t.data.data)})),(0,Pe.X)()&&!m.mwp&&(window.location.href="https://www.spotify.com");const{gtmId:y,market:_,locale:E,userCountry:x}=(0,A.C)("config"),C=Te(e),S=e.getPlayerAPI(),w=e.getAuthorizationAPI(),I=e.getTransport(),T=await e.getServiceWorkerMessenger(),N=Spicetify.Platform.ReduxStore=function(e,t){const{platform:n}=t,i=aZ(e,t);return(0,Wq.y$)(rZ(n),e,sZ((0,Wq.Tw)(...i)))}({session:t,features:m,seoExperiment:h},{platform:e,history:n,playbackApi:e.getPlaybackAPI(),playerApi:S,rootlistApi:e.getRootlistAPI(),playlistApi:e.getPlaylistAPI(),followApi:e.getFollowAPI(),libraryApi:e.getLibraryAPI(),actionStoreApi:e.getActionStoreAPI(),serviceWorkerMessenger:T,offlineApi:e.getOfflineAPI(),transport:I,eventSender:v,adManagers:e.getAdManagers(),deferredAction:Oe(sessionStorage,"ANONYMOUS_DEFERRED_ACTION_KEY"),ageRestrictionApi:new ke(W.n.getInstance()),socialConnectApi:e.getSocialConnectAPI()});I.on(c.TransportEvent.ACCESS_TOKEN,(async()=>{const e=w.getTokenProvider(),t=await e({preferCached:!0});null!==t&&(W.n.setSession(t),N.dispatch((0,Re.a7)(t)))}));let R=!1;I.on(c.TransportEvent.RECONNECTING,(()=>{R=!0})),I.on(c.TransportEvent.RECONNECTED,(()=>{R=!1})),I.on(c.TransportEvent.AUTHENTICATION_FAILED,(async()=>{if(!R&&!C){const e=w.getTokenProvider(),t=await e({preferCached:!0});null!==t&&t.isAnonymous||N.dispatch((0,Re.wH)())}})),(0,je.q6)("desktop-web-player",I),function(){Ke.BrowserMetrics.getPageLoadTime().then((e=>{(0,je.fE)({metric_type:Ke.MetricTypes.TIMER,what:"time-to-page-load-nanoseconds",value:(0,Ke.asNanoseconds)(Ke.Time.fromMillis(e).asNanos()),tags:{route:qe(window.location.pathname)}})})).catch((()=>{})),Ke.BrowserMetrics.getTimeToFirstPaint().then((e=>{(0,je.fE)({metric_type:Ke.MetricTypes.TIMER,what:"time-to-first-paint-nanoseconds",value:(0,Ke.asNanoseconds)(Ke.Time.fromMillis(e).asNanos()),tags:{route:qe(window.location.pathname)}})})).catch((()=>{})),Ke.BrowserMetrics.getTimeToFirstContentfulPaint().then((e=>{(0,je.fE)({metric_type:Ke.MetricTypes.TIMER,what:"time-to-first-contentful-paint-nanoseconds",value:(0,Ke.asNanoseconds)(Ke.Time.fromMillis(e).asNanos()),tags:{route:qe(window.location.pathname)}})})).catch((()=>{}));const e=e=>{(0,je.fE)(Ke.BrowserMetrics.getWebVitalsMetric({...e,label:e.name},{route:qe(window.location.pathname)}))};(0,We.lt)(e),(0,We.IN)(e),(0,We.fK)(e),(0,We.rH)(e),(0,We.zB)(e),(0,We.Ck)(e)}(),C||(()=>{const e=new URL(window.location.href);return $e(e)||((t=e).searchParams.has("utm_source")||t.searchParams.has("utm_medium")||t.searchParams.has("utm_campaign"))&&!(e=>"/"===e.pathname&&"pwa_install"===e.searchParams.get("utm_source"))(e)||!(e=>"/"===e.pathname||"/__noul__"===e.pathname||/\/intl-[A-Za-z][A-Za-z]$/.test(e.pathname))(e);var t})()&&((e,t)=>{const n=new URL(window.location.href),i=n.searchParams.get("dlsi")||Ge(),r={link:window.location.href,entity_uri:He(n),source:window.navigator.userAgent,deeplink_session_id:i};t?e.send((0,Fe.W)(r)):e.send((0,Be.N)(r))})(v,t.isAnonymous);const k=u.Ru.getLocaleForTranslation();if(N.dispatch((0,Re.Hh)()),N.dispatch((0,Je.zA)(k)),C){document.documentElement.setAttribute("lang",k)}(e=>{const t=window.matchMedia("(display-mode: standalone)");t.addEventListener?t.addEventListener("change",(t=>e(t.matches))):t.addListener((t=>e(t.matches)))})((()=>{N.dispatch({type:Xe})})),function(e,t){const n=[];let i=0;n.push(e.location),e.listen(((e,r)=>{r===Mq.push&&(i+=1,n.splice(i),n.push(e)),r===Mq.pop&&(i=n.findIndex((t=>t.key===e.key))),r===Mq.replace&&n.splice(i,1,e),t(Bq(i,n))})),t(Bq(i,n))}(n,(e=>{N.dispatch((0,et.hp)(e))})),await oZ(e.initialUser,e.initialProductState,N);const P=(0,Ne.e)(!0);(0,Le.lM)(),(0,r.H)(P).render((0,ct.jsx)(a.Gu,{configuration:null,children:(0,ct.jsx)(rt.s,{onError:e=>(0,O.Jy)(e,"App"),FallbackComponent:Ht,children:(0,ct.jsx)(Uq,{store:N,platform:e})})})),!C&&y&&(0,l.track)({dataLayerPushInitial:!0,googleTagManagerId:y,language:E?.locale,market:_,loggedIn:!t.isAnonymous,oneTrust:"1"===((0,V.v8)("client-web_one-trust")??"1"),userCountry:x}),e.operatingSystem===we.f.macOS&&window.outerHeight===window.screen.height&&window.outerWidth===window.screen.width&&N.dispatch((0,et.Kk)()),(0,o.Lj)("UI init phase is done for logged-in experience"),t.isAnonymous||v.send((0,s._)({width:window.outerWidth,height:window.outerHeight,mode:0,duration:0}),{flush:!1})}().catch((e=>{(0,O.OV)(e),console.error(e);const t=(0,Ne.e)(!0);(0,r.H)(t).render((0,ct.jsx)(a.Gu,{configuration:null,children:(0,ct.jsx)(Ht,{})}))}))},62166:(e,t,n)=>{"use strict";n.d(t,{$I:()=>a,Qv:()=>s,R2:()=>r});var i=n(77564);const r=(e,t)=>{const n=e.contextMenuButtonFactory().hitUiReveal();t.logInteraction(n)},s=(e,t,n,r)=>{let s;e===i.NV.ADD?s=t.hitDownload({itemToDownload:r}):e===i.NV.REMOVE?s=t.hitRemoveDownload({itemToRemoveFromDownloads:r}):e===i.NV.NO_PERMISSION&&(s=t.hitUiReveal?.()),s&&n.logInteraction(s)},a=({isPlaying:e,isActive:t,spec:n,logger:i,uri:r})=>{let s;return s=e?n.hitPause({itemToBePaused:r}):t?n.hitResume({itemToBeResumed:r}):n.hitPlay({itemToBePlayed:r}),i.logInteraction(s)}},44602:(e,t,n)=>{"use strict";n.d(t,{L:()=>o,P:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useActionStore must be used within a ActionStoreProvider");return e}},54712:(e,t,n)=>{"use strict";n.d(t,{Hf:()=>a,Mo:()=>s,as:()=>p,oI:()=>m,xy:()=>d});var i=n(79474),r=n(13274);const s=e=>({type:"SET_BACKGROUND_COLOR",color:e}),a=()=>({type:"CLEAR_BACKGROUND_COLOR"});function o(e,t){switch(t.type){case"SET_BACKGROUND_COLOR":return{backgroundColor:t.color};case"CLEAR_BACKGROUND_COLOR":return{backgroundColor:null}}return e}const l={backgroundColor:null},c=(0,i.createContext)(null),u=(0,i.createContext)(null),d=({children:e})=>{const[t,n]=(0,i.useReducer)(o,l);return(0,r.jsx)(u.Provider,{value:t,children:(0,r.jsx)(c.Provider,{value:n,children:e})})};function m(){const e=(0,i.useContext)(u);if(null===e)throw new Error("Trying to use 'BackgroundColorContext' without 'BackgroundColorProvider'!");return e}function p(){const e=(0,i.useContext)(c);if(null===e)throw new Error("Trying to use 'BackgroundColorDispatchContext' without 'BackgroundColorDispatchProvider'!");return e}},65742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,l:()=>o});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useCollectionPlatformAPI must be used within a CollectionPlatformAPIProvider");return e}},55188:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,U:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)({getEvents:()=>{}}),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t})},40858:(e,t,n)=>{"use strict";n.d(t,{D:()=>i.D,W:()=>i.W});var i=n(77692)},48901:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});const i=n(18696).x},26481:(e,t,n)=>{"use strict";n.d(t,{G:()=>o,m:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useEqualizerAPI must be used within a EqualizerProvider");return e}},26229:(e,t,n)=>{"use strict";n.d(t,{f:()=>o,x:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useFollowAPI must be used within a FollowAPIProvider");return e}},12206:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var i=n(79474),r=n(83856),s=n(26229),a=n(32247),o=n(29969);const l=e=>{const t=(0,s.f)(),[n,l]=(0,i.useState)(!1);if(!(0,r.AP)(e))throw new Error(`Expected a Spotify uri in format 'spotify:user:***', got "${e}"`);const c=(0,i.useCallback)((i=>i&&!n?t.followUsers([e]):!i&&n?t.unfollowUsers([e]):Promise.resolve()),[t,n,e]);return(0,i.useEffect)((()=>{l(!1),t.isFollowing([e]).then((t=>{l(t[e]??!1)}))}),[t,e]),(0,a.N)(o.mc.OPERATION_COMPLETE,(t=>{t.data.uris.includes(e)&&!t.data.error&&(t.data.operation===o.JK.FOLLOW_USER?l(!0):t.data.operation===o.JK.UNFOLLOW_USER&&l(!1))})),[n,c]}},10066:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o,n:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({children:e,instance:t})=>(0,r.jsx)(s.Provider,{value:t,children:e}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("usePictureInPictureContext() must be used within a PictureInPictureProvider");return e}},89477:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,J:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({platformData:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t})},75477:(e,t,n)=>{"use strict";n.d(t,{P:()=>u,g:()=>d});var i=n(79474),r=n(22215),s=n(8297),a=n(82052),o=n(90542),l=n(13274);const c=(0,i.createContext)(null),u=({children:e,configuration:t})=>{const[n,i]=(0,a.x)(o.e,s.Vk.empty().toJSON()),u=s.Vk.merge(t,s.Vk.fromJSON(n));return(0,l.jsx)(c.Provider,{value:{localConfiguration:u,remoteConfiguration:t,setOverrides:e=>i(s.Vk.merge(s.Vk.fromJSON(n),e).toJSON()),clearOverrides:()=>i(s.Vk.empty().toJSON())},children:(0,l.jsx)(r.Gu,{configuration:u,children:e})})};function d(){const e=(0,i.useContext)(c);if(null===e)throw new Error("Please wrap your component in RemoteConfigProviderWithOverrides");return e}},36457:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,o:()=>o});var i=n(79474),r=n(13274);const s=(0,i.createContext)(void 0),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(!e)throw new Error("useSegmentsAPI must be used within a SegmentsAPIProvider");return e}},58806:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var i=n(59313);function r(){const{ref:e,inView:t}=(0,i.Wx)({initialInView:!1}),{ref:n,inView:r}=(0,i.Wx)({initialInView:!1});return{titleRef:e,tracklistRef:n,displayTopBar:!t&&r}}},53886:(e,t,n)=>{"use strict";n.d(t,{$R:()=>o,Iu:()=>d,dB:()=>u,n5:()=>c,s0:()=>a,zK:()=>l});var i=n(83856),r=n(14056),s=n(9440);const a=[{url:"https://misc.scdn.co/liked-songs/liked-songs-64.png",width:64,height:64},{url:"https://misc.scdn.co/liked-songs/liked-songs-300.png",width:300,height:300},{url:"https://misc.scdn.co/liked-songs/liked-songs-640.png",width:640,height:640}];function o(e){if(!e)return null;const t=(0,i.fH)(e).toURI();return{type:s.c.LIKED_SONGS,uri:t,...l()}}function l(){return{images:a,name:r.Ru.get("sidebar.liked_songs")}}function c(e){const t=(0,i.fH)(e??void 0,"your-episodes").toURI();return{type:s.c.YOUR_EPISODES,uri:t,...u()}}function u(){return{images:[{url:"https://misc.scdn.co/your-episodes/SE-64.png",width:64,height:64},{url:"https://misc.scdn.co/your-episodes/SE-300.png",width:300,height:300},{url:"https://misc.scdn.co/your-episodes/SE-640.png",width:640,height:640}],name:r.Ru.get("sidebar.your_episodes")}}function d(){return{type:s.c.LOCAL_FILES,uri:"spotify:collection:local-files",images:[],name:r.Ru.get("local-files")}}},12275:(e,t,n)=>{"use strict";n.d(t,{MU:()=>r,NR:()=>s});var i=n(56593);i.uX;const r=i.uX,s=i.uX},51184:(e,t,n)=>{"use strict";n.d(t,{G:()=>c,_:()=>u});var i=n(79474),r=n(9856),s=n.n(r),a=n(87058);var o=n(13274);const l=(0,i.createContext)(void 0),c=({children:e,overrides:t})=>{const n=(0,i.useMemo)((()=>({supportsDragAndDrop:t?.supportsDragAndDrop??(!1!==s().getParser(window.navigator.userAgent).satisfies({"Microsoft Edge":">=17"})&&!(0,a.g)())})),[t?.supportsDragAndDrop]);return(0,o.jsx)(l.Provider,{value:n,children:e})},u=()=>{const e=(0,i.useContext)(l);if(!e)throw new Error("useUICapabilities() must be used within <UICapabilitiesProvider />");return e}},95402:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(19448);const r="rTMkDBDp47Eo12ZEQv4U";var s=n(13274);const a=({copyrights:e,courtesyLine:t})=>{const n=(e||[]).map(((e,t)=>{const n=e.text.replace(/^(\(C\)\s+)/,"").replace(/^(\(P\)\s+)/,"").replace(/^(©\s+)/,"").replace(/^(℗\s+)/,"");let r;return r="C"===e.type?"©":"P"===e.type?"℗":`(${e.type})`,(0,s.jsx)(i.Z,{as:"p",variant:"finale",dir:"auto",children:`${r} ${n}`},t)}));return t&&n.unshift((0,s.jsx)(i.Z,{as:"p",variant:"finale",dir:"auto",children:t},n.length)),(0,s.jsx)("div",{className:r,children:n})}},61681:(e,t,n)=>{"use strict";n.d(t,{b:()=>C,u:()=>x});var i=n(79474),r=n(97500),s=n.n(r),a=n(72423),o=n(94009);const l="G22LIjgkDtQEFpyBZcDo",c="x-entityImage-xsmall",u="x-entityImage-small",d="x-entityImage-medium",m="x-entityImage-large",p="x-entityImage-square",h="x-entityImage-circle",g="x-entityImage-image",f="x-entityImage-imageContainer",b="x-entityImage-imagePlaceholder",v="x-entityImage-defaultSize";var y=n(8955),_=n(13274);const E=({title:e,type:t,className:n,iconSize:i})=>(0,_.jsx)("div",{"aria-label":e,className:s()(b,n),children:(0,_.jsx)(y.s,{type:t,className:s()({[v]:!i}),size:i})});let x=function(e){return e[e.ROUNDED_CORNERS=0]="ROUNDED_CORNERS",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e}({});const C=(0,i.memo)((function({loadingMode:e="lazy",fadeIn:t=!1,type:n,title:i,images:r=[],shape:b=x.SQUARE,size:v=o.Qe.SIZE_56,iconSize:y,className:C,onContextMenu:S=(()=>{}),onTouchStart:A=(()=>{}),onTouchEnd:w=(()=>{}),color:I}){const T=function(e=[]){const t=e.filter((e=>Boolean(e.width))),n=t.filter((e=>e.url&&e.width&&e.width>=o.BZ[o.Qe.SIZE_56])).sort(((e,t)=>e.width-t.width));return n.length?n:t}(r),N=T[0]?.url??r[0]?.url??"",R=T.map((({url:e,width:t})=>`${e} ${t/2}w, ${e} ${t}w`)).join(", ");return(0,_.jsx)("div",{className:s()(f,C,{[h]:b===x.CIRCLE,[p]:b===x.SQUARE,[l]:o.fn.includes(v),[c]:o.zr.includes(v),[u]:o.pM.includes(v),[d]:o.JT.includes(v),[m]:o.B4.includes(v)}),onContextMenu:S,onTouchStart:A,onTouchEnd:w,style:{width:`${o.BZ[v]}px`,height:`${o.BZ[v]}px`,"--extracted-entity-color":I},children:(0,_.jsx)(a._,{loading:e,fadeIn:t,src:N,alt:i,ariaHidden:!0,className:s()(g),srcSet:R||void 0,testid:"entity-image",children:(0,_.jsx)(E,{title:i,type:n,iconSize:y})})})}))},94009:(e,t,n)=>{"use strict";n.d(t,{B4:()=>c,BZ:()=>r,JT:()=>l,Qe:()=>i,fn:()=>s,pM:()=>o,zr:()=>a});let i=function(e){return e[e.SIZE_20=0]="SIZE_20",e[e.SIZE_24=1]="SIZE_24",e[e.SIZE_40=2]="SIZE_40",e[e.SIZE_48=3]="SIZE_48",e[e.SIZE_56=4]="SIZE_56",e[e.SIZE_64=5]="SIZE_64",e[e.SIZE_72=6]="SIZE_72",e[e.SIZE_80=7]="SIZE_80",e[e.SIZE_88=8]="SIZE_88",e[e.SIZE_96=9]="SIZE_96",e[e.SIZE_104=10]="SIZE_104",e[e.SIZE_112=11]="SIZE_112",e[e.SIZE_120=12]="SIZE_120",e[e.SIZE_128=13]="SIZE_128",e[e.SIZE_136=14]="SIZE_136",e[e.SIZE_144=15]="SIZE_144",e[e.SIZE_152=16]="SIZE_152",e[e.SIZE_160=17]="SIZE_160",e[e.SIZE_168=18]="SIZE_168",e[e.SIZE_176=19]="SIZE_176",e[e.SIZE_184=20]="SIZE_184",e[e.SIZE_200=21]="SIZE_200",e[e.SIZE_232=22]="SIZE_232",e}({});const r={[i.SIZE_20]:20,[i.SIZE_24]:24,[i.SIZE_40]:40,[i.SIZE_48]:48,[i.SIZE_56]:56,[i.SIZE_64]:64,[i.SIZE_72]:72,[i.SIZE_80]:80,[i.SIZE_88]:88,[i.SIZE_96]:96,[i.SIZE_104]:104,[i.SIZE_112]:112,[i.SIZE_120]:120,[i.SIZE_128]:128,[i.SIZE_136]:136,[i.SIZE_144]:144,[i.SIZE_152]:152,[i.SIZE_160]:160,[i.SIZE_168]:168,[i.SIZE_176]:176,[i.SIZE_184]:184,[i.SIZE_200]:200,[i.SIZE_232]:232},s=[i.SIZE_20,i.SIZE_24],a=[i.SIZE_48,i.SIZE_56,i.SIZE_64],o=[i.SIZE_72,i.SIZE_80,i.SIZE_88,i.SIZE_96,i.SIZE_104,i.SIZE_112,i.SIZE_120,i.SIZE_128],l=[i.SIZE_136,i.SIZE_144,i.SIZE_152,i.SIZE_160,i.SIZE_168,i.SIZE_176],c=[i.SIZE_184,i.SIZE_200,i.SIZE_232]},8955:(e,t,n)=>{"use strict";n.d(t,{s:()=>m});var i=n(95231),r=n(33117),s=n(45992),a=n(41028),o=n(35022),l=n(43204),c=n(34472),u=n(9440),d=n(13274);function m({type:e,...t}){let n=i.e;switch(e){case"folder":case u.c.FOLDER:n=r.h;break;case"album":case u.c.ALBUM:n=s.I;break;case"artist":case u.c.ARTIST:n=a.r;break;case"show":case"episode":case u.c.SHOW:case u.c.EPISODE:n=o.L;break;case"user":case u.c.USER:n=l.v;break;case"book":case"audiobook":case u.c.AUDIOBOOK:n=c.l;break;case"playlist":case u.c.PLAYLIST:default:n=i.e}return(0,d.jsx)(n,{"aria-hidden":"true","":e,...t})}},881:(e,t,n)=>{"use strict";n.d(t,{v:()=>l});var i=n(79474),r=n(97500),s=n.n(r);const a="FqqZx78F1cgO3Q52XNba";var o=n(13274);const l=(0,i.memo)((function(e){const{className:t,children:n}=e;return(0,o.jsx)("section",{className:s()(a,t,"FixedWidthContainerInGrid"),children:n})}))},30980:(e,t,n)=>{"use strict";n.d(t,{E:()=>p});var i=n(79474),r=n(97500),s=n.n(r),a=n(65132);const o=(e,t)=>{const n=((e,t)=>{const{MINIMUM_COLUMN_WIDTH:n,MAXIMUM_COLUMN_WIDTH:i}=t;return i?Math.ceil(e/i):n?Math.max(1,Math.floor(e/n)):NaN})(e,t);return{columnCount:n,columnWidth:Number((e/n).toFixed(4))}},l="main-gridContainer-gridContainer",c="fJTotRs7ANTq1nrBwlqA",u="main-gridContainer-uniformRowHeight";var d=n(74938),m=n(13274);const p=(0,i.memo)((0,i.forwardRef)((function(e,t){const{className:n,colGap:r,rowGap:p,render:h,onLayoutChange:g,testId:f="container",useUniformRowHeight:b=!1,rowCount:v}=e,y=(0,i.useRef)(null),_=(0,a.R)();(0,i.useImperativeHandle)(t,(()=>y.current),[y]);const[E,x]=(0,i.useState)({columnWidth:-1,columnCount:-1});(0,i.useEffect)((()=>{g?.(E)}),[g,E]);const C=(0,i.useCallback)((e=>{const t=((e,t)=>{const{columnWidth:n,columnCount:i}=o(e,t);return{columnWidth:n,columnCount:i}})(e,_);x(t)}),[_]);(0,d.w)({refOrElement:y,observeOnly:"width",onResize:({width:e})=>{C(e)}}),(0,i.useLayoutEffect)((()=>{y.current&&C(y.current.offsetWidth)}),[C]);const S={"--column-count":`${E.columnCount}`},A=v&&isFinite(v);return(0,m.jsx)("div",{"":`grid-${f}`,ref:y,className:s()(l,n,{[u]:b,[c]:A}),style:{...S,...A?{"--row-count":`${v}`}:{},...p?{gridRowGap:p}:{},...r?{gridColumnGap:r}:{}},children:h(E)})})))},65132:(e,t,n)=>{"use strict";n.d(t,{R:()=>l,x:()=>o});var i=n(79474),r=n(70256),s=n(13274);const a=i.createContext((0,r.s1)(r.yV.DEFAULT)),o=({children:e,config:t})=>(0,s.jsx)(a.Provider,{value:t,children:e}),l=()=>(0,i.useContext)(a)},89018:(e,t,n)=>{"use strict";n.d(t,{L:()=>o});var i=n(79474),r=n(13274);const s=Symbol("unset"),a=i.createContext(s);function o({children:e,containerRef:t,postProcessWidth:n=(e=>e)}){const s=(0,i.useMemo)((()=>({postProcessWidth:n,containerRef:t})),[n,t]);return(0,r.jsx)(a.Provider,{value:s,children:e})}},8548:(e,t,n)=>{"use strict";n.d(t,{N:()=>h,y:()=>g});var i=n(79474),r=n(94022);const s=[[/<iframe[^>]*>/gi,"<span>"],[/<\/iframe>/gi,"</span>"],[/<script[^>]*>/gi,"<span>"],[/<\/script>/gi,"</span>"],[/srcdoc=/gi,"data-invalid="],[/onerror=/gi,"data-invalid="],[/onload=/gi,"data-invalid="],[/<form[^>]*>/gi,"<span>"],[/<\/form>/gi,"</span>"],[/<input[^>]*>/gi,"<span>"],[/<\/input>/gi,"</span>"],[/<link[^>]*>/gi,"<span>"],[/<\/link>/gi,"</span>"]];function a(e){return["http://","https://","#","/","www","spotify:"].some((t=>e.startsWith(t)))?e:""}var o=n(72423),l=n(76933);const c="upb5J45er158T713LxUy";var u=n(19448),d=n(13274);function m(e,t){return"tagName"in e&&e.tagName===t}function p(e){return"tagName"in e&&"string"==typeof e.tagName}const h=i.memo((function({source:e="",LinkComponent:t,onTimeStampClick:n,onLinkClick:u}){const h=(0,i.useMemo)((()=>function(e){const{LinkComponent:t,onTimeStampClick:n,onLinkClick:i}=e,s={replace:e=>{if(p(e)&&m(e,"a")&&t)try{return(0,d.jsx)(t,{to:a(e.attribs.href),onClick:i,children:(0,r.zd)(e.children.filter(f))})}catch(e){return null}else{if(p(e)&&m(e,"img")){const{src:t,alt:n,width:i,height:r}=e.attribs;return(0,d.jsx)(o._,{src:t,alt:n,loading:"eager",width:i,height:r,className:c})}if(p(e)&&m(e,"time")&&n)return(0,d.jsx)(l.D,{onClick:n,children:(0,r.zd)(e.children.filter(f))})}return e}};return s}({LinkComponent:t,onTimeStampClick:n,onLinkClick:u})),[t,n,u]),g=(0,i.useMemo)((()=>{return(0,r.Ay)((t=e,s.reduce(((e,t)=>{const[n,i]=t;return e.replace(n,i)}),t)),h);var t}),[e,h]);return(0,d.jsx)(d.Fragment,{children:g})})),g=i.memo((function({source:e="",paragraphClassName:t,variant:n="ballad",semanticColor:r,LinkComponent:s,onLinkClick:a,onTimeStampClick:o,splitter:l=/\n\n/g}){const c=(0,i.useMemo)((()=>e.split(l).map(((e,i)=>(0,d.jsx)(u.Z,{as:"p",className:t,variant:n,semanticColor:r,children:(0,d.jsx)(h,{source:e,LinkComponent:s,onTimeStampClick:o,onLinkClick:a})},i)))),[e,n,r,l,t,s,o,a]);return(0,d.jsx)(d.Fragment,{children:c})}));function f(e){return!(!e||"object"!=typeof e)&&((!("type"in e)||"cdata"!==e.type)&&((!("type"in e)||"root"!==e.type)&&("type"in e&&"comment"===e.type||(!(!("type"in e)||"string"!=typeof e.type||!["tag","script","style"].includes(e.type))||("type"in e&&"directive"===e.type||"type"in e&&"text"===e.type)))))}},13480:(e,t,n)=>{"use strict";n.d(t,{_:()=>a});var i=n(14056),r=n(11866),s=n(13274);const a=()=>(0,s.jsx)(r.F,{size:"small",title:i.Ru.get("download.available-offline"),semanticColor:"textBrightAccent"})},1523:(e,t,n)=>{"use strict";n.d(t,{J:()=>u});var i=n(87939),r=n(79474),s=n(39927);var a=n(99025),o=n(13274);const l={animated:"images/equaliser-animated-green.gif",static:"images/equaliser-green.svg"},c={animated:"images/equaliser-animated-white.gif",static:"images/equaliser-white.svg"},u=({className:e,animated:t=!1,white:n=!1})=>{const u=((e=!0)=>{const t=(0,s.ox)(),n=(0,s.ZY)(),[i,a]=(0,r.useState)((()=>!(!e||!n)&&n.hasFocus()));return(0,r.useEffect)((()=>{const i=()=>{a(!0)},r=()=>{a(!1)};return n&&e&&(a(n.hasFocus()),t?.addEventListener("focus",i),t?.addEventListener("blur",r)),()=>{t?.removeEventListener("focus",i),t?.removeEventListener("blur",r)}}),[n,e,t]),i})(!(0,a.j)()&&t),d=n?c:l;return(0,o.jsx)("img",{className:e,width:"14",height:"14",alt:"",src:(0,i.b)(u?d.animated:d.static)})}},32334:(e,t,n)=>{"use strict";n.d(t,{g:()=>a});var i=n(14056),r=n(35291),s=n(13274);const a=({className:e,fullText:t=!1})=>(0,s.jsx)(r.v,{ariaLabel:i.Ru.get("card.a11y.explicit"),text:t?i.Ru.get("card.a11y.explicit"):"E",className:e})},65495:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var i=n(34340),r=n(14056),s=n(13274);function a(e){return(0,s.jsx)(i.H,{"aria-label":r.Ru.get("a11y.externalLink"),...e})}},97374:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var i=n(14056),r=n(13274);const s=({size:e=32,className:t})=>(0,r.jsxs)("svg",{role:"img",width:e,height:e,viewBox:"0 0 12 12",className:t,"aria-label":i.Ru.get("age.restriction.nineeteen-badge"),children:[(0,r.jsx)("path",{fill:"#B3B3B3",d:"M4.607 9V3.328h-.96c-.112.592-.68 1.04-1.496 1.064v.752h1.36V9h1.096zm3.82-3.848c0 .616-.488 1.008-1.04 1.008-.568 0-1.04-.384-1.04-1.008 0-.608.48-1 1.04-1 .552 0 1.04.4 1.04 1zm-3 3.656c.288.184.84.312 1.312.312 1.92 0 2.92-1.208 2.92-3.256 0-1.8-1.049-2.656-2.249-2.656-1.208 0-2.144.816-2.144 1.976 0 1.192.92 1.904 1.952 1.904.64 0 1.136-.272 1.352-.632-.056 1.048-.72 1.696-1.84 1.696-.384 0-.8-.12-1.016-.24l-.288.896z"}),(0,r.jsx)("g",{transform:"scale(0.85) translate(1.1,1.1)",children:(0,r.jsx)("path",{fill:"#CD1A2B",d:"M6 11.2A5.2 5.2 0 01.8 6H-.8A6.8 6.8 0 006 12.8v-1.6zM11.2 6A5.2 5.2 0 016 11.2v1.6A6.8 6.8 0 0012.8 6h-1.6zM6 .8A5.2 5.2 0 0111.2 6h1.6A6.8 6.8 0 006-.8V.8zM6-.8A6.8 6.8 0 00-.8 6H.8A5.2 5.2 0 016 .8V-.8z"})})]})},72423:(e,t,n)=>{"use strict";n.d(t,{_:()=>p});var i=n(79474),r=n(97500),s=n.n(r);const a="main-image-image",o="main-image-loading",l="main-image-loaded";var c=n(14152),u=n(13274);function d(e){if(null!==e)return e}const m=({children:e,loading:t})=>"lazy"!==t||"undefined"==typeof HTMLImageElement||"loading"in HTMLImageElement.prototype?(0,u.jsx)(u.Fragment,{children:e}):(0,u.jsx)(c.b,{children:e}),p=(0,i.memo)((function(e){const{ariaHidden:t=!1,testid:n,src:r,alt:c="",radius:p=0,className:h="",srcSet:g,draggable:f=!1,sizes:b,children:v,loading:y,width:_,height:E,fadeIn:x=!1}=e,[C,S]=(0,i.useState)("loading"),A=(0,i.useRef)(null),[w,I]=(0,i.useState)(x);return(0,i.useLayoutEffect)((()=>{x&&A.current?.complete&&I(!1)}),[x]),r&&"error"!==C?(0,u.jsx)(m,{loading:y,children:(0,u.jsx)("img",{"aria-hidden":t,draggable:f,loading:y,src:r,"":n,alt:c,className:s()(a,h,{[o]:w,[l]:"loaded"===C}),style:{borderRadius:p||void 0},srcSet:g,sizes:b,width:d(_),height:d(E),onLoad:()=>S("loaded"),onError:()=>S("error"),ref:A})}):(0,u.jsx)(u.Fragment,{children:v})}))},19277:(e,t,n)=>{"use strict";n.d(t,{_:()=>u});var i=n(79474),r=n(59313),s=n(97500),a=n.n(s);const o="eqw9lvuoZHrkWMTdyTpY",l="lb08f71wES9AQnKx6e0R";var c=n(13274);const u=i.memo((function(e){const{triggerOnInitialLoad:t=!1,onReachBottom:n,showScrollbar:s=!0,horizontalScroll:u=!1,className:d}=e,{ref:m,inView:p}=(0,r.Wx)({initialInView:t});return(0,i.useEffect)((()=>{p&&n&&n()}),[p,n]),(0,c.jsxs)("div",{className:a()({[l]:!s,[o]:u},d),"":"infinite-scroll-list",children:[e.children,(0,c.jsx)("div",{ref:m})]})}))},95999:(e,t,n)=>{"use strict";n.d(t,{pZ:()=>o});var i=n(42360),r=n(13274);const s=i.zz.Provider,a=i.zz.Consumer,o=({value:e,index:t,children:n})=>(0,r.jsx)(a,{children:i=>{let a=""===i?e:`${i}/${e}`;return"number"==typeof t&&(a=`${a}/${t}`),(0,r.jsx)(s,{value:a,children:n})}})},14152:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var i=n(79474),r=n(59313);const s="VvxVxrxVVFjUD6BNsUub";var a=n(13274);const o=(0,i.memo)((function(e){const{children:t}=e,[n,o]=(0,i.useState)(!1),{ref:l,inView:c}=(0,r.Wx)({triggerOnce:!0});return(0,i.useEffect)((()=>{c&&o(!0)}),[c]),(0,a.jsx)("div",{className:n?void 0:s,ref:l,children:n?t:null})}))},77880:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var i=n(79474),r=n(14901),s=n(13274);const a=(0,i.lazy)((async()=>{const{LottieAnimation:e}=await Promise.all([n.e(3638),n.e(7067)]).then(n.bind(n,68351));return{default:e}})),o=(0,i.memo)((function(e){const{data:t}=(0,r.U)({queryKey:["async-lottie-animation",e.path],queryFn:()=>e.path?fetch(e.path).then((e=>e.json())):null,staleTime:6e4,gcTime:6e4,retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return(0,s.jsx)(a,{...e,animationData:e.animationData??t,path:void 0})}))},35291:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});const i="main-tag-container";var r=n(97500),s=n.n(r),a=n(13274);const o=({text:e,ariaLabel:t=e,title:n=t,className:r})=>(0,a.jsx)("span",{"aria-label":t,className:s()(i,r),title:n,children:e})},76933:(e,t,n)=>{"use strict";n.d(t,{D:()=>l});var i=n(79474);const r="NkWIcfgnWR9AXfikmWai",s="OvmkrxKmI82x4jlgEZG0";var a=n(19448),o=n(13274);const l=i.memo((function({onClick:e,children:t}){return(0,o.jsx)("button",{"":"clickable-timestamp",className:s,onClick:()=>{const n=c(t),i=1e3*n.split(":").reverse().reduce(((e,t,n)=>e+parseInt(t,10)*Math.pow(60,n)),0);e(i)},children:(0,o.jsx)(a.Z,{className:r,variant:"ballad",children:t})})}));function c(e){let t="";return i.Children.map(e,(e=>{"string"==typeof e||"number"==typeof e?t+=e:i.isValidElement(e)&&e.props.children&&(t+=c(e.props.children))})),t}},24032:(e,t,n)=>{"use strict";n.d(t,{L:()=>m});var i=n(79474),r=n(74938);const s="main-rootlist-wrapper",a="main-rootlist-topSentinel",o="main-rootlist-bottomSentinel";var l=n(34310),c=n(13274);const u=(e,t)=>(0,c.jsx)("div",{style:{height:e}},t),d=()=>"undefined"!=typeof window&&"requestIdleCallback"in window,m=({renderRows:e,nrRows:t,rowHeight:n,scrollNodeRef:m,nrRowsOverscan:p=10,renderPlaceholder:h=u})=>{const g=(0,l.a)(),f=(0,i.useRef)(null),b=(0,i.useRef)(null),v=(0,i.useRef)(null),y=(0,i.useRef)(0),[_,E]=(0,i.useState)(d()?0:p),[x,C]=(0,i.useState)(null),[S,A]=(0,i.useState)(0),w=(0,i.useCallback)((()=>{const e=m.current;if(!e)return;const t=Math.ceil(e.offsetHeight/n)+2;A(t)}),[m,n]),I=(0,i.useCallback)((()=>{const e=m.current;if(!e)return;const t=Math.floor((e.scrollTop-y.current-1)/n);C(t)}),[n,m]);(0,i.useEffect)((()=>{d()&&window.requestIdleCallback((()=>{g()&&E(p)}))}),[g,p]),(0,i.useLayoutEffect)((()=>{const e=v.current,t=m.current;e&&t&&(y.current=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)}),[m,v.current?.offsetTop]),(0,i.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const e=new window.IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&I()}))}));return f.current&&e.observe(f.current),b.current&&e.observe(b.current),()=>{e.disconnect()}}),[I,x,S,t]),(0,i.useLayoutEffect)((()=>{w(),I()}),[w,I]),(0,r.w)({refOrElement:m,observeOnly:"height",onResize:w});const T=(x??0)-_,N=Math.min(null!==x?T+2*_+S-1:-1,t-1),R=Math.max(T,0),k=Math.max(N,-1),O=Math.min(S>0?t*n:0,Math.max(n*(_-2),0)),P=n*R,j=n*t,L=j-n*Math.max(t-(k+1),0);return(0,c.jsxs)("div",{ref:v,className:s,style:{height:`${j}px`,"--row-height":`${n}px`},role:"presentation",children:[(0,c.jsxs)("div",{ref:f,"":"top-sentinel",className:a,style:{height:`${P+O}px`},role:"presentation",children:[h(`calc(100% - ${O}px)`,"top-sentinel"),(0,c.jsx)("div",{style:{height:`${O}px`},role:"presentation"})]}),(0,c.jsx)("div",{style:{transform:`translateY(${P}px)`},role:"presentation",children:e(R,k)}),(0,c.jsxs)("div",{ref:b,"":"bottom-sentinel",className:o,style:{height:`calc(100% - ${L}px + ${O}px)`},role:"presentation",children:[(0,c.jsx)("div",{style:{height:`${O}px`},role:"presentation"}),h(`calc(100% - ${O}px)`,"bottom-sentinel")]})]})}},81755:(e,t,n)=>{"use strict";n.d(t,{e:()=>g});var i=n(79474),r=n(44104),s=n(22492),a=n(61252);const o='a[href], button, input[role="searchbox"], input[type="range"], [role="button"]',l='[role="menuitem"],\n [role="menuitemradio"],\n [role="menuitemcheckbox"]';function c(e,t,n){if(!e)return void console.error("No menu element found. Canceling moving focus");if(!(0,a.fk)(e))return;const i=e.querySelector('[tabindex="0"]');t===r.O.UP&&(0,a.MS)(i,d(e,i,r.O.UP,n)),t===r.O.DOWN&&(0,a.MS)(i,d(e,i,r.O.DOWN,n)),t===r.O.RIGHT&&(0,a.MS)(i,u(i)),t===r.O.LEFT&&(0,a.MS)(i,function(e){const t=!!e.closest('ul[role="menu"] ul[role="menu"]');if(!t)return null;let n=e.closest('ul[role="menu"]')?.closest('li[role="presentation"]')?.querySelector(l)??null;if(!n){const t=e.closest('ul[role="menu"]')?.id;t&&(n=document.querySelector(`[aria-controls="${t}"]`)?.closest(l)??null)}return n}(i))}function u(e){if(!e?.closest(l)?.hasAttribute("aria-expanded"))return null;let t=e.closest('li[role="presentation"]').querySelector('ul[role="menu"]');if(!t){const n=e.closest('[role="menuitem"][aria-controls]')?.getAttribute("aria-controls");n&&(t=document.querySelector(`#${n}[role="menu"]`))}const n=t?.querySelector(o);return n??null}function d(e,t,n,i){const s=t.closest('ul[role="menu"]'),a=t.closest('li[role="presentation"]');if(!s||!a)return t;let l=t;const c=i?.(e,t,n);if(c)return c;if(n===r.O.UP){const t=s.querySelectorAll(':scope > li[role="presentation"]');let n=a.previousElementSibling;for(document.activeElement===e&&(n=t[t.length-1]);n!==a&&(n||(n=t[t.length-1]),l=n.querySelector(o),!l);)n=n.previousElementSibling}else{let t=a.nextElementSibling;for(document.activeElement===e&&(t=s.querySelector("li"));t!==a&&(t||(t=s.querySelector("li")),l=t.querySelector(o),!l);)t=t.nextElementSibling;l=t.querySelector(o)}return l||t}var m=n(49768),p=n(68172),h=n(13274);const g=({getInitialFocusElement:e,onKeyDown:t,onClose:n,onFocusVerticalItem:o,...l})=>{const d=(0,i.useRef)(null);(0,p.s)(),(0,s.i)({ref:d,getFocusElement:e,onFocus:e=>{(0,a.MS)(null,e,{preventScroll:!0})}});const g=(0,i.useCallback)((e=>{var i;d.current?.contains(e.target)&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),e.stopPropagation()),"Escape"!==e.key&&"Tab"!==e.key||n?.(),"ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===e.key&&c(d.current,r.O.UP,o),"ArrowDown"===e.key&&c(d.current,r.O.DOWN,o),"ArrowLeft"===e.key&&c(d.current,r.O.LEFT),"ArrowRight"===e.key&&c(d.current,r.O.RIGHT),"Enter"===e.key&&(i=d.current)&&u(i.querySelector('[tabindex="0"]'))&&(e.preventDefault(),c(d.current,r.O.RIGHT)),t?.(e))}),[o,t,n]);return(0,h.jsx)(m.Q,{ref:d,onKeyDown:g,...l})}},16799:(e,t,n)=>{"use strict";n.d(t,{H:()=>a});var i=n(79474),r=n(60096),s=n(13274);const a=(0,i.forwardRef)(((e,t)=>{const n=e.as,{testid:i,...a}=e;return n?(0,s.jsx)(n,{ref:t,...a}):a.href?(0,s.jsx)("a",{ref:t,"":i,...a}):a.to?(0,s.jsx)(r.k2,{ref:t,...a}):(0,s.jsx)("button",{"":i,ref:t,...a})}))},88682:(e,t,n)=>{"use strict";n.d(t,{u:()=>a});var i=n(79474),r=n(14288),s=n(13274);const a=({children:e,...t})=>{const n=(0,i.useRef)(null);return(0,r.g)(n),(0,s.jsx)("li",{ref:n,role:"presentation",...t,children:e})}},49768:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s});var i=n(79474),r=n(13274);const s=i.forwardRef((function({children:e,depth:t=0,...n},i){return(0,r.jsx)("ul",{tabIndex:-1,ref:i,role:"menu","data-depth":t,...n,children:e})}))},84346:(e,t,n)=>{"use strict";n.d(t,{s:()=>a});var i=n(531),r=n.n(i),s=n(13274);const a=e=>(0,s.jsx)(r(),{...e})},85747:(e,t,n)=>{"use strict";n.d(t,{T:()=>s});var i=n(59841),r=n(13274);const s=({color:e=i.black,height:t="30",className:n})=>(0,r.jsxs)("svg",{className:n,width:"114",role:"img",height:t,viewBox:"0 0 114 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("title",{id:"spotify-premium-logo-icon",children:"Spotify logo"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.7835 10.7851C37.7835 10.6921 37.86 10.6156 37.9545 10.6156L40.1039 10.6246C41.8485 10.6246 42.849 11.4421 42.849 12.9076C42.849 14.2486 41.745 15.1501 40.1039 15.1501L37.9545 15.1411C37.86 15.1411 37.7835 15.0646 37.7835 14.9701V10.7851ZM40.296 8.11502L35.232 8.10602C35.1375 8.10602 35.061 8.18252 35.061 8.27552V21.8085C35.061 21.903 35.1375 21.9795 35.232 21.9795H37.614C37.707 21.9795 37.7835 21.903 37.7835 21.8085V17.631L40.026 17.64C43.4175 17.64 45.6105 15.759 45.6105 12.81C45.6105 9.95852 43.524 8.11502 40.296 8.11502Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.4025 13.4759C59.9115 13.4759 60.6195 14.6519 60.7964 15.8174H55.956C56.217 14.3879 57.1605 13.4759 58.4025 13.4759ZM58.4218 11.217C55.4805 11.217 53.262 13.5765 53.262 16.704V16.743C53.262 19.911 55.5375 22.2105 58.6725 22.2105C60.264 22.2105 61.599 21.6705 62.6473 20.604C62.718 20.5305 62.8723 20.355 62.9775 20.2335C63.039 20.163 63.0315 20.058 62.961 19.995L61.5795 18.7695C61.5165 18.714 61.4235 18.714 61.362 18.7695C61.212 18.9075 60.957 19.14 60.93 19.161C60.24 19.7115 59.553 19.953 58.7115 19.953C57.2985 19.953 56.268 19.098 55.98 17.7075H63.4305L63.4485 17.4975C63.4663 17.28 63.4831 17.079 63.4831 16.878C63.4831 14.061 61.9185 11.217 58.4218 11.217Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M76.7895 11.217C75.414 11.217 74.289 11.76 73.3575 12.876C72.7245 11.8035 71.6474 11.217 70.296 11.217C68.8529 11.217 67.968 11.9145 67.356 12.645V11.5995C67.356 11.5065 67.2795 11.43 67.1865 11.43H64.8435C64.749 11.43 64.6724 11.5065 64.6724 11.5995V21.8085C64.6724 21.903 64.749 21.9795 64.8435 21.9795H67.1865C67.2795 21.9795 67.356 21.903 67.356 21.8085V16.0665C67.356 14.622 68.1465 13.6875 69.3675 13.6875C70.5719 13.6875 71.2635 14.5275 71.2635 15.99V21.8085C71.2635 21.903 71.34 21.9795 71.433 21.9795H73.776C73.8705 21.9795 73.9469 21.903 73.9469 21.8085V16.047C73.9469 14.5695 74.6985 13.6875 75.9585 13.6875C77.5245 13.6875 77.8529 14.9505 77.8529 16.0095V21.8085C77.8529 21.903 77.9295 21.9795 78.024 21.9795H80.367C80.4615 21.9795 80.5365 21.903 80.5365 21.8085V15.294C80.5365 12.741 79.1355 11.217 76.7895 11.217Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M93.0376 17.361C93.0376 18.795 92.2021 19.7205 90.9106 19.7205C89.6131 19.7205 88.8991 18.897 88.8991 17.4V11.5995C88.8991 11.5065 88.8226 11.43 88.7279 11.43H86.3849C86.2921 11.43 86.2156 11.5065 86.2156 11.5995V18.096C86.2156 20.622 87.6736 22.191 90.0211 22.191C91.2421 22.191 92.2321 21.7155 93.0376 20.7405V21.8085C93.0376 21.903 93.1141 21.9795 93.2071 21.9795H95.5501C95.6446 21.9795 95.7211 21.903 95.7211 21.8085V11.5995C95.7211 11.5065 95.6446 11.43 95.5501 11.43H93.2071C93.1141 11.43 93.0376 11.5065 93.0376 11.5995V17.361Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M109.308 11.217C107.934 11.217 106.808 11.76 105.876 12.876C105.243 11.8035 104.166 11.217 102.815 11.217C101.373 11.217 100.487 11.9145 99.876 12.6435V11.5995C99.876 11.5065 99.7995 11.43 99.705 11.43H97.362C97.269 11.43 97.1925 11.5065 97.1925 11.5995V21.8085C97.1925 21.903 97.269 21.9795 97.362 21.9795H99.705C99.7995 21.9795 99.876 21.903 99.876 21.8085V16.0665C99.876 14.622 100.665 13.6875 101.888 13.6875C103.092 13.6875 103.782 14.5275 103.782 15.99V21.8085C103.782 21.903 103.859 21.9795 103.953 21.9795H106.296C106.389 21.9795 106.466 21.903 106.466 21.8085V16.047C106.466 14.5695 107.217 13.6875 108.477 13.6875C110.045 13.6875 110.373 14.9505 110.373 16.0095V21.8085C110.373 21.903 110.45 21.9795 110.543 21.9795H112.886C112.98 21.9795 113.057 21.903 113.057 21.8085V15.294C113.057 12.741 111.656 11.217 109.308 11.217Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M52.7354 11.232H52.4204C51.0464 11.2425 49.9229 11.919 49.1909 13.167V11.5995C49.1909 11.5065 49.1144 11.43 49.0199 11.43H46.6769C46.5824 11.43 46.5074 11.5065 46.5074 11.5995V21.8085C46.5074 21.903 46.5824 21.9795 46.6769 21.9795H49.0199C49.1144 21.9795 49.1909 21.903 49.1909 21.8085V17.922C49.1909 15.5085 50.3533 14.106 52.3859 14.0565L52.3889 14.055H52.7354C52.8119 14.055 52.8734 13.9935 52.8734 13.9155V11.3715C52.8734 11.295 52.8119 11.232 52.7354 11.232Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M84.5339 11.4975H82.2195C82.1265 11.4975 82.05 11.574 82.05 11.667V21.768C82.05 21.8625 82.1265 21.9375 82.2195 21.9375H84.5339C84.6285 21.9375 84.7035 21.8625 84.7035 21.768V11.667C84.7035 11.574 84.6285 11.4975 84.5339 11.4975Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M83.388 6.8985C82.4715 6.8985 81.7275 7.641 81.7275 8.5575C81.7275 9.4755 82.4715 10.2195 83.388 10.2195C84.306 10.2195 85.0485 9.4755 85.0485 8.5575C85.0485 7.641 84.306 6.8985 83.388 6.8985Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.8725 13.2975C19.038 10.4265 11.0625 10.1625 6.44685 11.5635C5.7045 11.7885 4.9215 11.37 4.6965 10.629C4.4715 9.88648 4.89 9.10348 5.6325 8.87848C10.9305 7.26898 19.7385 7.58098 25.305 10.884C25.9723 11.28 26.19 12.141 25.7955 12.807C25.3995 13.473 24.5385 13.6935 23.8725 13.2975ZM23.715 17.55C23.376 18.1005 22.656 18.273 22.1055 17.9355C18.075 15.4575 11.9279 14.7405 7.15953 16.188C6.54003 16.374 5.88753 16.026 5.70003 15.408C5.51253 14.79 5.86203 14.1375 6.48003 13.95C11.9279 12.297 18.7005 13.098 23.3295 15.9435C23.88 16.281 24.0525 17.001 23.715 17.55ZM21.8789 21.6345C21.609 22.077 21.0345 22.215 20.5935 21.9465C17.0715 19.794 12.6375 19.3065 7.41602 20.5005C6.91352 20.616 6.41102 20.2995 6.29702 19.797C6.18152 19.293 6.49502 18.792 7.00052 18.678C12.714 17.3715 17.6159 17.934 21.5685 20.349C22.0095 20.619 22.149 21.195 21.8789 21.6345ZM15 0C6.7155 0 0 6.7155 0 15C0 23.2845 6.7155 30 15 30C23.2845 30 30 23.2845 30 15C30 6.7155 23.2845 0 15 0Z",fill:e})]})},66118:(e,t,n)=>{"use strict";n.d(t,{d:()=>c});var i=n(97500),r=n.n(i),s=n(62180),a=n(72345);const o="UyzJidwrGk3awngSGIwv";var l=n(13274);const c=({durationMs:e,className:t,displaySeconds:n})=>{const{hours:i,minutes:c,seconds:u}=(0,s.S)(e);return n=!1!==n&&!i&&u,(0,l.jsx)("span",{className:r()(o,t),children:(0,a.j)({h:i,m:c,s:n?u:0})})}},39927:(e,t,n)=>{"use strict";n.d(t,{IF:()=>c,ZY:()=>d,ox:()=>u});var i=n(79474),r=n(42397),s=n(34143),a=n(72752),o=n(13274);const l=(0,i.createContext)(null),c=({handle:e,children:t})=>{const n=(0,s.A)({key:"sp-emotion-css",container:e?.document.head});return(0,o.jsx)(l.Provider,{value:e??null,children:(0,o.jsx)(r.ID,{target:e?.document?.head,children:(0,o.jsx)(a.C,{value:n,children:t})})})};function u(){const e=(0,i.useContext)(l);return"undefined"==typeof window?null:e??window}function d(){const e=u();return e?.document??null}},47131:(e,t,n)=>{"use strict";n.d(t,{A9:()=>o,UD:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useRequestBuilder must be used within a RequestBuilderProvider");return e}},8644:(e,t,n)=>{"use strict";n.d(t,{P:()=>l,q:()=>c});var i=n(79474),r=n(86892),s=n(87240),a=n(13274);const o=(0,i.createContext)(null),l=({children:e,surface:t,uris:n})=>{const i=(0,r.lB)((()=>({surface:t,uris:n?.filter(s.P)??[]})),[t,n]);return(0,a.jsx)(o.Provider,{value:i,children:e})};function c(){return(0,i.useContext)(o)}},4254:(e,t,n)=>{"use strict";n.d(t,{_:()=>g,dZ:()=>h,yd:()=>p});var i=n(79474),r=n(22215),s=n(60351),a=n(82548),o=n(24577),l=n(13274);const c=(0,i.createContext)({optimizeImage:e=>e});let u=function(e){return e.ALBUM_COVER="ab67616d",e.PLAYLIST="ab67706c",e.ARTIST_AVATAR="ab676161",e.PODCAST_COVER="ab676563",e.AUDIOBOOK_COVERS="ab676663",e.PUFFIN="ab671fcc",e}({});const d={[u.ALBUM_COVER]:{defaultGroup:{"00004851":64,"00001e02":300,"0000b273":640},webp:{"000011eb":64,"0000e1a3":300,"0000aa54":640}},[u.PLAYLIST]:{defaultGroup:{"00006c11":64,"0000da84":300,"0000bebb":640},webp:{"0000dec5":64,"0000d72c":300,"000097ac":640}},[u.ARTIST_AVATAR]:{defaultGroup:{"0000f178":160,"00005174":320,"0000e5eb":640},webp:{"0000101f":160,"0000939b":320,"000086f7":640}},[u.PODCAST_COVER]:{defaultGroup:{"0000f68d":64,"00005f1f":300,"0000ba8a":640},webp:{"0000955f":64,"0000bdcf":300,"0000eeee":640}},[u.AUDIOBOOK_COVERS]:{defaultGroup:{"0000703b":64,"0000db5b":300,"000022a8":640},webp:{"00000c35":64,"000076bd":300,"0000382d":640}},[u.PUFFIN]:{defaultGroup:{"00009fbb":375,"00009256":750,"00005e4e":1125},webp:{"0000372b":375,"00002d5b":750,"0000980d":1125}}},m=(0,s.g)(u);const p=({children:e})=>{const t=(0,r.NC)(a._E,{loadingValue:!1});let n=!1;const s=new globalThis.Image;s.onload=()=>{n=1===s.width},s.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=";const o=(0,i.useCallback)(((e,i)=>{if(!t)return e;const r=!0===navigator.connection?.saveData;return function(e,t,n){const[i,r,s,a,o]=e?.match(f)??[];if(m(s)){const e=function(e,t,n,{supportsWebP:i,devicePixelRatio:r=1}={}){const s=d[e]??{},{defaultGroup:a,webp:o}=s;if(t in a||t in o){let e="defaultGroup";if(i&&(e="webp"),n){const i=Object.entries(s[e]);for(const[e,t]of i)if(t>=n*r)return e;return i.at(-1)?.[0]??t}}return t}(s,a,t,n);if(e!==a){return`${r}${s}${e}${o}`}}return e}(e,i,{supportsWebP:n,isSaveDataEnabled:r,devicePixelRatio})}),[n,t]);return(0,l.jsx)(c.Provider,{value:{optimizeImage:o},children:e})};function h(){return(0,i.useContext)(c).optimizeImage}function g(){const e=h();return(0,i.useCallback)(((t,n)=>{if(t?.length){const i=t[0].url,r=e(i,n);if(r!==i)return[{url:r}]}const i=(0,o.g)(t,{desiredSize:n});return i?[i]:t}),[e])}const f=/^(https:\/\/i\.scdn\.co\/image\/|spotify:image:)([0-9a-f]{8})([0-9a-f]{8})(.*)$/},587:(e,t,n)=>{"use strict";n.d(t,{Sx:()=>a,qg:()=>o});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useLocalStorageAPI must be used within a LocalStorageProvider");return e}},6193:(e,t,n)=>{"use strict";n.d(t,{a:()=>o,s:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("usePlaylistPermissionsAPI must be used within a PlaylistPermissionsProvider");return e}},68830:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,S:()=>o});var i=n(79474),r=n(13274);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useSingAlongAPI must be used within a SingAlongAPIProvider");return e}},19793:(e,t,n)=>{"use strict";n.d(t,{F:()=>c,a:()=>l});var i=n(79474),r=n(70786),s=n(3976),a=n(53896),o=n(13274);const l=(0,i.createContext)(null),c=({children:e})=>{const t=(0,r.g)(),[n,c]=(0,i.useState)(t.getCurrentSession());return(0,s.J)(a.K.UPDATE,(({data:e})=>{c(e)})),(0,o.jsx)(l.Provider,{value:n,children:e})}},56307:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,f:()=>o});var i=n(79474),r=n(13274);const s=(0,i.createContext)(void 0),a=({value:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(void 0===e)throw new Error("useUBIEventLocation() must be used within a UBIEventLocationContextProvider");return e}},64658:(e,t,n)=>{"use strict";n.d(t,{r:()=>a});var i=n(79474),r=n(56307),s=n(13274);const a=i.memo((function({spec:e,children:t}){const n=(0,i.useMemo)((()=>e?.getAbsoluteLocation()??null),[e]);return(0,s.jsx)(r.a,{value:n,children:t})}))},63237:(e,t,n)=>{"use strict";n.d(t,{k7:()=>l,oQ:()=>c});var i=n(79474),r=n(18741),s=n(14494),a=n(13274);const o=(0,i.createContext)(void 0),l=({children:e})=>{const t=(0,s.s)(),n=(0,i.useMemo)((()=>new r.J(t)),[t]);return(0,a.jsx)(o.Provider,{value:n,children:e})},c=()=>(0,i.useContext)(o)},14494:(e,t,n)=>{"use strict";n.d(t,{V:()=>a,s:()=>o});var i=n(79474),r=n(13274);const s=(0,i.createContext)(void 0),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(void 0===e)throw new Error("useUBILogger() must be used within a UBILoggerContextProvider");return e}},64495:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var i=n(67302),r=n(53855);const s=e=>(0,i.r)(r.F,{data:{uri:e}})},52792:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});var i=n(79474),r=n(63237),s=n(86892);const a=(e,t=!0)=>{const n=(0,r.oQ)(),a=(0,i.useRef)(null),o=(0,i.useMemo)((()=>{if(t)return e?.impression()}),[t,e]);return(0,s.Ij)((()=>{if(a.current&&n&&o){return n.addToObservableEntities({impression:()=>o,element:a.current})||void 0}}),[n,o]),(0,i.useCallback)((e=>{a.current=e}),[])}},67302:(e,t,n)=>{"use strict";n.d(t,{r:()=>l});var i=n(79474),r=n(86892),s=n(56307),a=n(14494),o=n(64658);const l=(e,t)=>{const n=(0,a.s)(),l=(0,s.f)(),c=(0,r.lB)((()=>({...t,parentAbsoluteLocation:t.parentAbsoluteLocation??l})),[t,l]);return{spec:(0,i.useMemo)((()=>e(c)),[e,c]),logger:n,UBIFragment:o.r}}},75024:(e,t,n)=>{"use strict";n.d(t,{j:()=>w});var i=n(15552);const r="wIA_5Ypq0rltNPeZQpM4",s="Swi6YtNEFCCVz8l4y75v",a="pklLPOhfigdytL9bPoth",o="sb24Y8kdMZInJ8aI8dXT";var l=n(13274);function c({ariaValueText:e,max:t,current:n}){const i=t&&n?100*Math.min(1,n/t):0,c={transform:`translateX(-${100-i}%)`},u=e||`${Math.round(i)}%`;return(0,l.jsxs)("div",{className:r,role:"progressbar",tabIndex:0,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuetext":u,children:[(0,l.jsx)("div",{className:s}),(0,l.jsx)("div",{className:a,children:(0,l.jsx)("div",{"":"progressBarFg",className:o,style:c})})]})}const u="qfYkuLpETFW3axnfMntO",d="_q93agegdE655O5zPz6l",m="z7Yl7CIT1AB0y91f_moh",p="iLIlkUcfIq56KncGtX7u",h="nV50yZ6BR_TIuWP3l7b1",g="qLjIx_SzBEpDRA_q7kxQ";var f=n(19448),b=n(25949),v=n(14056),y=n(97500),_=n.n(y),E=n(66118),x=n(62180),C=n(72345);const S="xWm_uA0Co4SXVxaO7wlB",A=({durationMs:e,className:t,displaySeconds:n})=>{const{hours:i,minutes:r,seconds:s}=(0,x.S)(e);n=!1!==n&&!i&&s;const a=(0,C.j)({h:i,m:r,s:n?s:0});return a?(0,l.jsx)("span",{className:_()(S,t),children:v.Ru.get("time.left",a)}):null},w=e=>{const{resumePositionMs:t=0,releaseDate:n,isPlaying:r,fullyPlayed:s,durationMs:a,position:o=t,compactVariant:y=!1,className:x,progressBarClassName:C,progressStateClassName:S,releaseDateClassName:w}=e;return(0,l.jsxs)("div",{className:_()(u,x),children:[n?(0,l.jsx)(f.Z,{as:"p",variant:"mesto",className:d,children:(0,i.gD)((0,i.ad)(n))}):null,(()=>{if(s&&!r)return(0,l.jsxs)("div",{className:_()(p,S),children:[(0,l.jsx)(f.Z,{as:"p",variant:"mesto",className:m,children:v.Ru.get("episode.played")}),(0,l.jsx)(b.i,{size:"small",className:g,"aria-hidden":"true"})]});if(o>0||r){const e=Math.ceil(Math.max(a-o,0));return(0,l.jsx)("div",{className:_()(p,S),children:(0,l.jsx)(f.Z,{as:"p",variant:"mesto",className:m,children:(0,l.jsx)(A,{durationMs:e,displaySeconds:!y&&void 0})})})}return(0,l.jsx)(f.Z,{as:"p",variant:"mesto",className:_()(d,w),"":"episode-progress-not-played",children:(0,l.jsx)(E.d,{durationMs:a,displaySeconds:!y&&void 0})})})(),!s&&o>0||r?(0,l.jsx)("div",{className:_()(h,C),children:(0,l.jsx)(c,{current:o,max:a})}):null]})}},87939:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});n(32941);let i;function r(e,t){let n;if(n='{"animations/plus-deselected-confetti-white.json":"/animations/plus-deselected-confetti-white.json","animations/plus-selected-confetti-white.json":"/animations/plus-selected-confetti-white.json","BUILD.bazel":"/BUILD.bazel","fonts/spoticon_regular_2.ttf":"/fonts/spoticon_regular_2.ttf","fonts/spoticon_regular_2.woff":"/fonts/spoticon_regular_2.woff","fonts/spoticon_regular_2.woff2":"/fonts/spoticon_regular_2.woff2","images/2022_wrapped_hub_tablet_banner_rtl.svg":"/images/2022_wrapped_hub_tablet_banner_rtl.svg","images/2022_wrapped_hub_tablet_banner.svg":"/images/2022_wrapped_hub_tablet_banner.svg","images/2022_wrapped_mobile_web_hub.svg":"/images/2022_wrapped_mobile_web_hub.svg","images/2022_wrapped_web_hub_banner_rtl.svg":"/images/2022_wrapped_web_hub_banner_rtl.svg","images/2022_wrapped_web_hub_banner.svg":"/images/2022_wrapped_web_hub_banner.svg","images/ac-row-placeholder.png":"/images/ac-row-placeholder.png","images/audiobooks-upsell.png":"/images/audiobooks-upsell.png","images/checkmark.png":"/images/checkmark.png","images/concert-hub-fb-card.png":"/images/concert-hub-fb-card.png","images/concert-hub-header.png":"/images/concert-hub-header.png","images/concert-hub-iphone-de.png":"/images/concert-hub-iphone-de.png","images/concert-hub-iphone-el.png":"/images/concert-hub-iphone-el.png","images/concert-hub-iphone-en.png":"/images/concert-hub-iphone-en.png","images/concert-hub-iphone-es_419.png":"/images/concert-hub-iphone-es_419.png","images/concert-hub-iphone-es.png":"/images/concert-hub-iphone-es.png","images/concert-hub-iphone-fi.png":"/images/concert-hub-iphone-fi.png","images/concert-hub-iphone-fr_CA.png":"/images/concert-hub-iphone-fr_CA.png","images/concert-hub-iphone-fr.png":"/images/concert-hub-iphone-fr.png","images/concert-hub-iphone-hu.png":"/images/concert-hub-iphone-hu.png","images/concert-hub-iphone-id.png":"/images/concert-hub-iphone-id.png","images/concert-hub-iphone-it.png":"/images/concert-hub-iphone-it.png","images/concert-hub-iphone-ja.png":"/images/concert-hub-iphone-ja.png","images/concert-hub-iphone-ms.png":"/images/concert-hub-iphone-ms.png","images/concert-hub-iphone-nl.png":"/images/concert-hub-iphone-nl.png","images/concert-hub-iphone-pl.png":"/images/concert-hub-iphone-pl.png","images/concert-hub-iphone-pt_BR.png":"/images/concert-hub-iphone-pt_BR.png","images/concert-hub-iphone-sv.png":"/images/concert-hub-iphone-sv.png","images/concert-hub-iphone-tr.png":"/images/concert-hub-iphone-tr.png","images/concert-hub-iphone-zh_TW.png":"/images/concert-hub-iphone-zh_TW.png","images/concert-hub-twitter-card.png":"/images/concert-hub-twitter-card.png","images/connect_header@1x.png":"/images/connect_header@1x.png","images/connect-to-devices-white.svg":"/images/connect-to-devices-white.svg","images/desktop-auth-check.svg":"/images/desktop-auth-check.svg","images/desktop-auth-error.svg":"/images/desktop-auth-error.svg","images/device-picker-equaliser-animation.webp":"/images/device-picker-equaliser-animation.webp","images/devices/mac.png":"/images/devices/mac.png","images/download-badges/apple/ar.svg":"/images/download-badges/apple/ar.svg","images/download-badges/apple/az.svg":"/images/download-badges/apple/az.svg","images/download-badges/apple/bg.svg":"/images/download-badges/apple/bg.svg","images/download-badges/apple/cs_CZ.svg":"/images/download-badges/apple/cs_CZ.svg","images/download-badges/apple/da.svg":"/images/download-badges/apple/da.svg","images/download-badges/apple/de.svg":"/images/download-badges/apple/de.svg","images/download-badges/apple/ee.svg":"/images/download-badges/apple/ee.svg","images/download-badges/apple/el.svg":"/images/download-badges/apple/el.svg","images/download-badges/apple/en.svg":"/images/download-badges/apple/en.svg","images/download-badges/apple/es_mx.svg":"/images/download-badges/apple/es_mx.svg","images/download-badges/apple/es.svg":"/images/download-badges/apple/es.svg","images/download-badges/apple/fi.svg":"/images/download-badges/apple/fi.svg","images/download-badges/apple/fp.svg":"/images/download-badges/apple/fp.svg","images/download-badges/apple/fr_ca.svg":"/images/download-badges/apple/fr_ca.svg","images/download-badges/apple/fr.svg":"/images/download-badges/apple/fr.svg","images/download-badges/apple/he.svg":"/images/download-badges/apple/he.svg","images/download-badges/apple/hu.svg":"/images/download-badges/apple/hu.svg","images/download-badges/apple/id.svg":"/images/download-badges/apple/id.svg","images/download-badges/apple/int.svg":"/images/download-badges/apple/int.svg","images/download-badges/apple/it.svg":"/images/download-badges/apple/it.svg","images/download-badges/apple/ja.svg":"/images/download-badges/apple/ja.svg","images/download-badges/apple/ko.svg":"/images/download-badges/apple/ko.svg","images/download-badges/apple/lt.svg":"/images/download-badges/apple/lt.svg","images/download-badges/apple/lv.svg":"/images/download-badges/apple/lv.svg","images/download-badges/apple/ms.svg":"/images/download-badges/apple/ms.svg","images/download-badges/apple/mt.svg":"/images/download-badges/apple/mt.svg","images/download-badges/apple/nb.svg":"/images/download-badges/apple/nb.svg","images/download-badges/apple/nl.svg":"/images/download-badges/apple/nl.svg","images/download-badges/apple/pl.svg":"/images/download-badges/apple/pl.svg","images/download-badges/apple/pt_br.svg":"/images/download-badges/apple/pt_br.svg","images/download-badges/apple/pt.svg":"/images/download-badges/apple/pt.svg","images/download-badges/apple/ro.svg":"/images/download-badges/apple/ro.svg","images/download-badges/apple/ru.svg":"/images/download-badges/apple/ru.svg","images/download-badges/apple/sk.svg":"/images/download-badges/apple/sk.svg","images/download-badges/apple/sl.svg":"/images/download-badges/apple/sl.svg","images/download-badges/apple/sv.svg":"/images/download-badges/apple/sv.svg","images/download-badges/apple/th_TH.svg":"/images/download-badges/apple/th_TH.svg","images/download-badges/apple/tr.svg":"/images/download-badges/apple/tr.svg","images/download-badges/apple/vi_VN.svg":"/images/download-badges/apple/vi_VN.svg","images/download-badges/apple/zh_HANS.svg":"/images/download-badges/apple/zh_HANS.svg","images/download-badges/apple/zh_HANT.svg":"/images/download-badges/apple/zh_HANT.svg","images/download-badges/google/af.svg":"/images/download-badges/google/af.svg","images/download-badges/google/am.svg":"/images/download-badges/google/am.svg","images/download-badges/google/ar.svg":"/images/download-badges/google/ar.svg","images/download-badges/google/az.svg":"/images/download-badges/google/az.svg","images/download-badges/google/be.svg":"/images/download-badges/google/be.svg","images/download-badges/google/bg.svg":"/images/download-badges/google/bg.svg","images/download-badges/google/bn.svg":"/images/download-badges/google/bn.svg","images/download-badges/google/bs.svg":"/images/download-badges/google/bs.svg","images/download-badges/google/ca.svg":"/images/download-badges/google/ca.svg","images/download-badges/google/cr.svg":"/images/download-badges/google/cr.svg","images/download-badges/google/cs_CZ.svg":"/images/download-badges/google/cs_CZ.svg","images/download-badges/google/da.svg":"/images/download-badges/google/da.svg","images/download-badges/google/de.svg":"/images/download-badges/google/de.svg","images/download-badges/google/el.svg":"/images/download-badges/google/el.svg","images/download-badges/google/en.svg":"/images/download-badges/google/en.svg","images/download-badges/google/es_419.svg":"/images/download-badges/google/es_419.svg","images/download-badges/google/es.svg":"/images/download-badges/google/es.svg","images/download-badges/google/et.svg":"/images/download-badges/google/et.svg","images/download-badges/google/eu.svg":"/images/download-badges/google/eu.svg","images/download-badges/google/fa.svg":"/images/download-badges/google/fa.svg","images/download-badges/google/fi.svg":"/images/download-badges/google/fi.svg","images/download-badges/google/fp.svg":"/images/download-badges/google/fp.svg","images/download-badges/google/fr_ca.svg":"/images/download-badges/google/fr_ca.svg","images/download-badges/google/fr.svg":"/images/download-badges/google/fr.svg","images/download-badges/google/gl.svg":"/images/download-badges/google/gl.svg","images/download-badges/google/gu.svg":"/images/download-badges/google/gu.svg","images/download-badges/google/he.svg":"/images/download-badges/google/he.svg","images/download-badges/google/hi.svg":"/images/download-badges/google/hi.svg","images/download-badges/google/hr.svg":"/images/download-badges/google/hr.svg","images/download-badges/google/hu.svg":"/images/download-badges/google/hu.svg","images/download-badges/google/hy.svg":"/images/download-badges/google/hy.svg","images/download-badges/google/id.svg":"/images/download-badges/google/id.svg","images/download-badges/google/int.svg":"/images/download-badges/google/int.svg","images/download-badges/google/is.svg":"/images/download-badges/google/is.svg","images/download-badges/google/it.svg":"/images/download-badges/google/it.svg","images/download-badges/google/ja.svg":"/images/download-badges/google/ja.svg","images/download-badges/google/ka.svg":"/images/download-badges/google/ka.svg","images/download-badges/google/kk.svg":"/images/download-badges/google/kk.svg","images/download-badges/google/km.svg":"/images/download-badges/google/km.svg","images/download-badges/google/kn.svg":"/images/download-badges/google/kn.svg","images/download-badges/google/ko.svg":"/images/download-badges/google/ko.svg","images/download-badges/google/ky.svg":"/images/download-badges/google/ky.svg","images/download-badges/google/lo.svg":"/images/download-badges/google/lo.svg","images/download-badges/google/lt.svg":"/images/download-badges/google/lt.svg","images/download-badges/google/lv.svg":"/images/download-badges/google/lv.svg","images/download-badges/google/mk.svg":"/images/download-badges/google/mk.svg","images/download-badges/google/ml.svg":"/images/download-badges/google/ml.svg","images/download-badges/google/mn.svg":"/images/download-badges/google/mn.svg","images/download-badges/google/mr.svg":"/images/download-badges/google/mr.svg","images/download-badges/google/ms.svg":"/images/download-badges/google/ms.svg","images/download-badges/google/my.svg":"/images/download-badges/google/my.svg","images/download-badges/google/nb.svg":"/images/download-badges/google/nb.svg","images/download-badges/google/ne.svg":"/images/download-badges/google/ne.svg","images/download-badges/google/nl.svg":"/images/download-badges/google/nl.svg","images/download-badges/google/pa.svg":"/images/download-badges/google/pa.svg","images/download-badges/google/pl.svg":"/images/download-badges/google/pl.svg","images/download-badges/google/pt_br.svg":"/images/download-badges/google/pt_br.svg","images/download-badges/google/pt.svg":"/images/download-badges/google/pt.svg","images/download-badges/google/ro.svg":"/images/download-badges/google/ro.svg","images/download-badges/google/ru.svg":"/images/download-badges/google/ru.svg","images/download-badges/google/si.svg":"/images/download-badges/google/si.svg","images/download-badges/google/sk.svg":"/images/download-badges/google/sk.svg","images/download-badges/google/sl.svg":"/images/download-badges/google/sl.svg","images/download-badges/google/sq.svg":"/images/download-badges/google/sq.svg","images/download-badges/google/sr.svg":"/images/download-badges/google/sr.svg","images/download-badges/google/sv.svg":"/images/download-badges/google/sv.svg","images/download-badges/google/sw.svg":"/images/download-badges/google/sw.svg","images/download-badges/google/ta.svg":"/images/download-badges/google/ta.svg","images/download-badges/google/te.svg":"/images/download-badges/google/te.svg","images/download-badges/google/th_TH.svg":"/images/download-badges/google/th_TH.svg","images/download-badges/google/tr.svg":"/images/download-badges/google/tr.svg","images/download-badges/google/ua.svg":"/images/download-badges/google/ua.svg","images/download-badges/google/ur.svg":"/images/download-badges/google/ur.svg","images/download-badges/google/uz.svg":"/images/download-badges/google/uz.svg","images/download-badges/google/vi_VN.svg":"/images/download-badges/google/vi_VN.svg","images/download-badges/google/zh_HANS.svg":"/images/download-badges/google/zh_HANS.svg","images/download-badges/google/zh_HANT.svg":"/images/download-badges/google/zh_HANT.svg","images/download-badges/google/zh_hk.svg":"/images/download-badges/google/zh_hk.svg","images/download-badges/google/zu.svg":"/images/download-badges/google/zu.svg","images/embed-legacy/copy-32_circle_grey_outline_bg.svg":"/images/embed-legacy/copy-32_circle_grey_outline_bg.svg","images/embed-legacy/embed-code-32_circle_grey_outline_bg.svg":"/images/embed-legacy/embed-code-32_circle_grey_outline_bg.svg","images/embed-legacy/fb_colour.svg":"/images/embed-legacy/fb_colour.svg","images/embed-legacy/messenger_colour.svg":"/images/embed-legacy/messenger_colour.svg","images/embed-legacy/twitter_colour.svg":"/images/embed-legacy/twitter_colour.svg","images/embed-legacy/whatsapp.svg":"/images/embed-legacy/whatsapp.svg","images/employee-podcasts-modal-art.png":"/images/employee-podcasts-modal-art.png","images/equaliser-animated-green.gif":"/images/equaliser-animated-green.gif","images/equaliser-animated-white.gif":"/images/equaliser-animated-white.gif","images/equaliser-green.svg":"/images/equaliser-green.svg","images/equaliser-white.svg":"/images/equaliser-white.svg","images/error-page-logo.svg":"/images/error-page-logo.svg","images/favicon.ico":"/images/favicon.ico","images/favicon.png":"/images/favicon.png","images/favicon16.png":"/images/favicon16.png","images/favicon32.png":"/images/favicon32.png","images/FC24_Spotify_PlayButton_V2_TriangleLight.svg":"/images/FC24_Spotify_PlayButton_V2_TriangleLight.svg","images/feature-activation-shelf-audio-quality.png":"/images/feature-activation-shelf-audio-quality.png","images/feature-activation-shelf-blend.png":"/images/feature-activation-shelf-blend.png","images/feature-activation-shelf-enhance-placeholder.png":"/images/feature-activation-shelf-enhance-placeholder.png","images/feature-activation-shelf-group-sessions-speaker.png":"/images/feature-activation-shelf-group-sessions-speaker.png","images/feature-activation-shelf-group-sessions.png":"/images/feature-activation-shelf-group-sessions.png","images/feature-activation-shelf-live-events.png":"/images/feature-activation-shelf-live-events.png","images/focused_stroy_play.png":"/images/focused_stroy_play.png","images/group-session-logo.svg":"/images/group-session-logo.svg","images/hifi-button-off.svg":"/images/hifi-button-off.svg","images/hifi-button-on.svg":"/images/hifi-button-on.svg","images/hifi.svg":"/images/hifi.svg","images/home-icon.svg":"/images/home-icon.svg","images/icons/Spotify_1024.png":"/images/icons/Spotify_1024.png","images/icons/Spotify_128.png":"/images/icons/Spotify_128.png","images/icons/Spotify_16.png":"/images/icons/Spotify_16.png","images/icons/Spotify_256.png":"/images/icons/Spotify_256.png","images/icons/Spotify_32.png":"/images/icons/Spotify_32.png","images/icons/Spotify_512.png":"/images/icons/Spotify_512.png","images/icons/Spotify_MWP_192.png":"/images/icons/Spotify_MWP_192.png","images/icons/Spotify_MWP_384.png":"/images/icons/Spotify_MWP_384.png","images/icons/Spotify_MWP_512.png":"/images/icons/Spotify_MWP_512.png","images/improved-modal-bg.jpg":"/images/improved-modal-bg.jpg","images/learning-card-background.jpg":"/images/learning-card-background.jpg","images/login-background.jpg":"/images/login-background.jpg","images/login-signup-burst.svg":"/images/login-signup-burst.svg","images/logo-complete-black.svg":"/images/logo-complete-black.svg","images/logo-white-2x.png":"/images/logo-white-2x.png","images/mando_helmet_felix.png":"/images/mando_helmet_felix.png","images/mando_helmet.png":"/images/mando_helmet.png","images/mid-year.png":"/images/mid-year.png","images/mwp-episodelist-placeholder.png":"/images/mwp-episodelist-placeholder.png","images/mwp-tracklist-placeholder.png":"/images/mwp-tracklist-placeholder.png","images/og-image.png":"/images/og-image.png","images/og-socialsession-preview.png":"/images/og-socialsession-preview.png","images/ribbon-graphic-mobile.svg":"/images/ribbon-graphic-mobile.svg","images/ribbon-graphic-small-side.svg":"/images/ribbon-graphic-small-side.svg","images/ribbon-graphic-small-top.svg":"/images/ribbon-graphic-small-top.svg","images/ribbon-graphic.svg":"/images/ribbon-graphic.svg","images/s2l-desktopui-ltr.png":"/images/s2l-desktopui-ltr.png","images/s2l-desktopui-rtl.png":"/images/s2l-desktopui-rtl.png","images/s2l-mobileui.png":"/images/s2l-mobileui.png","images/spotifylogo.svg":"/images/spotifylogo.svg","images/station-header-wave.svg":"/images/station-header-wave.svg","images/station-wave.svg":"/images/station-wave.svg","images/stranger-things-nether-bottom-left.png":"/images/stranger-things-nether-bottom-left.png","images/stranger-things-nether-bottom-right.png":"/images/stranger-things-nether-bottom-right.png","images/stranger-things-spores.png":"/images/stranger-things-spores.png","images/sw_saber_ahsoka1.png":"/images/sw_saber_ahsoka1.png","images/sw_saber_anakin.png":"/images/sw_saber_anakin.png","images/sw_saber_leia.png":"/images/sw_saber_leia.png","images/sw_saber_luke.png":"/images/sw_saber_luke.png","images/sw_saber_mace.png":"/images/sw_saber_mace.png","images/sw_saber_rey.png":"/images/sw_saber_rey.png","images/sw_saber_vader.png":"/images/sw_saber_vader.png","images/Sw23-Desktop-Left.png":"/images/Sw23-Desktop-Left.png","images/Sw23-Desktop-Left.webp":"/images/Sw23-Desktop-Left.webp","images/Sw23-Desktop-Right.png":"/images/Sw23-Desktop-Right.png","images/Sw23-Desktop-Right.webp":"/images/Sw23-Desktop-Right.webp","images/Sw23-Mobile-Left.png":"/images/Sw23-Mobile-Left.png","images/Sw23-Mobile-Left.webp":"/images/Sw23-Mobile-Left.webp","images/Sw23-Mobile-Right.png":"/images/Sw23-Mobile-Right.png","images/Sw23-Mobile-Right.webp":"/images/Sw23-Mobile-Right.webp","images/top-up.png":"/images/top-up.png","images/touch-icon-114.png":"/images/touch-icon-114.png","images/touch-icon-144.png":"/images/touch-icon-144.png","images/touch-icon-57.png":"/images/touch-icon-57.png","images/touch-icon-72.png":"/images/touch-icon-72.png","images/tracklist-placeholder-compact.png":"/images/tracklist-placeholder-compact.png","images/tracklist-placeholder.png":"/images/tracklist-placeholder.png","images/ylx-artist-row-placeholder.png":"/images/ylx-artist-row-placeholder.png","images/ylx-compact-row-placeholder.png":"/images/ylx-compact-row-placeholder.png","images/ylx-row-placeholder.png":"/images/ylx-row-placeholder.png","images/zara-larsson-singles.png":"/images/zara-larsson-singles.png","js/fb.js":"/js/fb.js","js/gtm.js":"/js/gtm.js","js/retargeting-pixels.js":"/js/retargeting-pixels.js","js/urlRedirect.js":"/js/urlRedirect.js","js/urlScheme.js":"/js/urlScheme.js","sounds/mando_this_is_the_way_103.mp3":"/sounds/mando_this_is_the_way_103.mp3","sounds/mando_this_is_the_way_107.mp3":"/sounds/mando_this_is_the_way_107.mp3","sounds/mando_this_is_the_way_felix.mp3":"/sounds/mando_this_is_the_way_felix.mp3","sounds/silence.mp3":"/sounds/silence.mp3","videos/Sw23-Desktop-Left.mp4":"/videos/Sw23-Desktop-Left.mp4","videos/Sw23-Desktop-Left.webm":"/videos/Sw23-Desktop-Left.webm","videos/Sw23-Desktop-Right.mp4":"/videos/Sw23-Desktop-Right.mp4","videos/Sw23-Desktop-Right.webm":"/videos/Sw23-Desktop-Right.webm","videos/Sw23-Mobile-Left.mp4":"/videos/Sw23-Mobile-Left.mp4","videos/Sw23-Mobile-Left.webm":"/videos/Sw23-Mobile-Left.webm","videos/Sw23-Mobile-Right.mp4":"/videos/Sw23-Mobile-Right.mp4","videos/Sw23-Mobile-Right.webm":"/videos/Sw23-Mobile-Right.webm"}',void 0!==globalThis.__CDN_FILE_URLS__&&(n=globalThis.__CDN_FILE_URLS__),"string"!=typeof n)throw new Error("No __CDN_FILE_URLS__ property available in globalThis or process.env");if(!i)try{i=JSON.parse(n)}catch(e){throw new Error("Invalid __CDN_FILE_URLS__ value.")}if(!i[e])throw new Error(`\`${e}\` is not available in __CDN_FILE_URLS__.`);return i[e]}},15945:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});let i=function(e){return e.af="af",e.am="am",e.ar="ar",e.arEG="ar-EG",e.arMA="ar-MA",e.arSA="ar-SA",e.az="az",e.bg="bg",e.bn="bn",e.bho="bho",e.bs="bs",e.ca="ca",e.cs="cs",e.da="da",e.de="de",e.el="el",e.en="en",e.enGB="en-GB",e.es419="es-419",e.es="es",e.esAR="es-AR",e.esMX="es-MX",e.et="et",e.eu="eu",e.fa="fa",e.fi="fi",e.fil="fil",e.frCA="fr-CA",e.fr="fr",e.gl="gl",e.gu="gu",e.he="he",e.hi="hi",e.hr="hr",e.hu="hu",e.id="id",e.is="is",e.it="it",e.ja="ja",e.kn="kn",e.ko="ko",e.lt="lt",e.lv="lv",e.mk="mk",e.ml="ml",e.mr="mr",e.ms="ms",e.nb="nb",e.ne="ne",e.nl="nl",e.or="or",e.paIN="pa-IN",e.paPK="pa-PK",e.pl="pl",e.ptBR="pt-BR",e.ptPT="pt-PT",e.ro="ro",e.ru="ru",e.sk="sk",e.sl="sl",e.sr="sr",e.sv="sv",e.sw="sw",e.ta="ta",e.te="te",e.th="th",e.tr="tr",e.uk="uk",e.ur="ur",e.vi="vi",e.zhCN="zh-CN",e.zhHK="zh-HK",e.zhTW="zh-TW",e.zu="zu",e}({})},14056:(e,t,n)=>{"use strict";n.d(t,{a7:()=>d,wB:()=>m,Ru:()=>h});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(79474),r=n(94758),s=n.n(r),a=n(98198);let o=function(e){return e.AR="، ",e.FA="، ",e.EN=", ",e}({});var l=n(15945);const c=new Intl.Locale(l.h.en),u=Object.values(l.h);function d(e){"string"==typeof e&&(e=new Intl.Locale(e));const t=new Set([l.h.paIN,l.h.paPK,l.h.zhCN,l.h.zhTW,l.h.zhHK]);return e?t.has(e.baseName)?e:new Intl.Locale(e.language):c}const m=e=>e&&(e=>u.includes(e))(e)?e:e?.includes("-")?m(e.split("-")[0]):void 0;function p(e){const t=`(?:${e.join("|")})`;return new RegExp(String.raw`(\{${t}\}|%${t}%)`,"g")}const h=new class{_localeForTranslation=c;_localeForFormatting=c;_localeForURLPath=c;_translations={};_relativeTimeFormat=null;_dateTimeFormats=new a.l2;_pluralRules=null;getRelativeTimeFormat(){return null===this._relativeTimeFormat&&(this._relativeTimeFormat=new Intl.RelativeTimeFormat(this._localeForFormatting)),this._relativeTimeFormat}getDateTimeFormat(e){const t=JSON.stringify(Object.keys(e).sort().map((t=>({[t]:e[t]}))));return this._dateTimeFormats.create(t,(()=>new Intl.DateTimeFormat(this._localeForFormatting,e)))}getPluralRules(){return null===this._pluralRules&&(this._pluralRules=new Intl.PluralRules(this._localeForTranslation)),this._pluralRules}getPluralKey(e){const t=this.getPluralRules();try{return"string"==typeof e&&(e=parseInt(e,10)),t.select(e)}catch{return"other"}}initialize({localeForTranslation:e,localeForFormatting:t,translations:n}){var i;this._localeForTranslation=new Intl.Locale(e),this._localeForFormatting=("string"==typeof(i=t??e)&&(i=new Intl.Locale(i)),"ar"===i.baseName?new Intl.Locale(i,{numberingSystem:"latn"}):i),this._localeForURLPath=d(e),this._relativeTimeFormat=null,this._dateTimeFormats.clear(),this._pluralRules=null,this._translations=n}getLocaleForTranslation(){return this._localeForTranslation.baseName}getLocaleForFormatting(){return this._localeForFormatting.baseName}getLocaleForURLPath(){return this._localeForURLPath.baseName}getLocaleForSmartling(){const e=this._localeForTranslation.baseName;return s()[e]||e}getTranslations(){return this._translations}toLocaleLowerCase(e){return e?.toLocaleLowerCase(this._localeForTranslation)}toLocaleUpperCase(e){return e?.toLocaleUpperCase(this._localeForTranslation)}get(e,...t){const n=e in this._translations?this._translations[e]:e;let r="";if("string"!=typeof n){const e=t[0],i=n[this.getPluralKey(e)];void 0!==i?r=i:n.other&&(r=n.other)}else r=n;if(/%\d%/.test(r)){if(!["desktop.login.DefaultErrorMessage","desktop.login.ErrorProxyAuthRequired","desktop.login.MissingUserInfoMessage","desktop.login.RegionMismatchMessage","desktop.login.ClientUpdateFail","desktop.login.FbUserNotFoundSignUp","desktop-auth.error"].includes(e))throw new Error("i18n: The placeholder format %0% is legacy and is only allowed for existing strings.")}const s={},a={};t.forEach(((e,t)=>{const n="object"!=typeof e||null===e||(0,i.isValidElement)(e)?[[t,e]]:Object.entries(e);for(const[e,t]of n)(0,i.isValidElement)(t)?a[e]=t:void 0!==t&&(s[e]=t)})),r=r.replace(p(Object.keys(s)),((e,t)=>{const n=t.slice(1,-1),i=s[n];return"number"==typeof i?this.formatNumber(i):i}));const o=Object.keys(a);return o.length?(0,i.createElement)(i.Fragment,null,r.split(p(o)).map(((e,t)=>{if(t%2){const t=e.slice(1,-1),n=a[t];return(0,i.cloneElement)(n,{key:n.key??t})}return e})).filter((e=>""!==e))):r}getSeparator(){switch(new Intl.Locale(this._localeForTranslation).language){case l.h.ar:return o.AR;case l.h.fa:return o.FA;default:return o.EN}}formatNumber(e,t){return e.toLocaleString(this._localeForFormatting,t)}formatNumberCompact(e){return this.formatNumber(e,{notation:"compact",maximumFractionDigits:1})}formatDate(e,t=null){const n=t||{year:"numeric",month:"long",day:"numeric"};return this.getDateTimeFormat(n).format(e)}formatRelativeDate(e,t=null,n=new Date){const i=this.getRelativeTimeFormat(),r=e.getTime()-n.getTime(),s=Math.abs(r)<2592e6;if(null!==i&&s){const{weeks:e,days:t,hours:n,minutes:s,seconds:o}=(a=r,{seconds:Math.round(a/1e3),minutes:Math.round(a/1e3/60),hours:Math.round(a/1e3/60/60),days:Math.round(a/1e3/60/60/24),weeks:Math.round(a/1e3/60/60/24/7)});return Math.abs(t)>=7?i.format(e,"weeks"):Math.abs(n)>=24?i.format(t,"days"):Math.abs(s)>=60?i.format(n,"hours"):Math.abs(o)>=60?i.format(s,"minutes"):i.format(o,"seconds")}var a;return this.formatDate(e,t)}}},94524:(e,t,n)=>{"use strict";n.d(t,{$c:()=>r,QN:()=>i,oK:()=>s});const i={SHOW_ABOUT_RECS_MODAL:"SHOW_ABOUT_RECS_MODAL",HIDE_ABOUT_RECS_MODAL:"HIDE_ABOUT_RECS_MODAL"},r=()=>({type:i.SHOW_ABOUT_RECS_MODAL}),s=()=>({type:i.HIDE_ABOUT_RECS_MODAL})},80156:(e,t,n)=>{"use strict";n.d(t,{DP:()=>s,QN:()=>i,Uu:()=>r});const i={SHOW_ABOUT_SPOTIFY_MODAL:"SHOW_ABOUT_SPOTIFY_MODAL",HIDE_ABOUT_SPOTIFY_MODAL:"HIDE_ABOUT_SPOTIFY_MODAL"},r=()=>({type:i.SHOW_ABOUT_SPOTIFY_MODAL}),s=()=>({type:i.HIDE_ABOUT_SPOTIFY_MODAL})},42624:(e,t,n)=>{"use strict";n.d(t,{QN:()=>i,Rb:()=>a,Tf:()=>s,eK:()=>r});const i={GET_AGE_RESTRICTION_MODAL:"GET_AGE_RESTRICTION_MODAL",SHOW_AGE_RESTRICTION_MODAL:"SHOW_AGE_RESTRICTION_MODAL",HIDE_AGE_RESTRICTION_MODAL:"HIDE_AGE_RESTRICTION_MODAL"},r=e=>({type:i.SHOW_AGE_RESTRICTION_MODAL,dialog:e}),s=e=>({type:i.GET_AGE_RESTRICTION_MODAL,uri:e}),a=()=>({type:i.HIDE_AGE_RESTRICTION_MODAL})},51654:(e,t,n)=>{"use strict";n.d(t,{Ai:()=>s,gK:()=>i,zL:()=>r});const i={ANONYMOUS_LOGIN_CLICK:"ANONYMOUS_LOGIN_CLICK",ANONYMOUS_SIGNUP_CLICK:"ANONYMOUS_SIGNUP_CLICK",ANONYMOUS_PREMIUM_CLICK:"ANONYMOUS_PREMIUM_CLICK",ANONYMOUS_DECLINE_SIGNUP:"ANONYMOUS_DECLINE_SIGNUP"},r=()=>({type:i.ANONYMOUS_LOGIN_CLICK}),s=()=>({type:i.ANONYMOUS_SIGNUP_CLICK})},41078:(e,t,n)=>{"use strict";n.d(t,{QN:()=>i,Qo:()=>a,io:()=>s,xM:()=>r});const i={SHOW_DUPLICATE_TRACKS_DIALOG:"SHOW_DUPLICATE_TRACKS_DIALOG",HIDE_DUPLICATE_TRACKS_DIALOG:"HIDE_DUPLICATE_TRACKS_DIALOG",CHECK_DUPLICATE_TRACKS:"CHECK_DUPLICATE_TRACKS"},r=e=>({type:i.SHOW_DUPLICATE_TRACKS_DIALOG,...e}),s=(e,t,n)=>({type:i.CHECK_DUPLICATE_TRACKS,playlistUri:e,uris:t,position:n}),a=()=>({type:i.HIDE_DUPLICATE_TRACKS_DIALOG})},51716:(e,t,n)=>{"use strict";n.d(t,{FS:()=>r,QN:()=>i,ku:()=>s});const i={SHOW_LICENSES_MODAL:"SHOW_LICENSES_MODAL",HIDE_LICENSES_MODAL:"HIDE_LICENSES_MODAL"},r=()=>({type:i.SHOW_LICENSES_MODAL}),s=()=>({type:i.HIDE_LICENSES_MODAL})},23464:(e,t,n)=>{"use strict";n.d(t,{d:()=>r,g:()=>i});const i={LOG_OPEN_ANALYTICS_EVENT:"LOG_OPEN_ANALYTICS_EVENT",LOG_INTERACTION:"LOG_INTERACTION"},r=e=>({type:i.LOG_INTERACTION,logData:e})},55521:(e,t,n)=>{"use strict";n.d(t,{tS:()=>l,MW:()=>c,rD:()=>s,fj:()=>o,CZ:()=>r,VR:()=>a,gK:()=>i});const i={DEVICE_INFO_CHANGED:"DEVICE_INFO_CHANGED",SET_ACTIVE_DEVICE:"SET_ACTIVE_DEVICE",PLAYBACK_ERROR:"PLAYBACK_ERROR",HARMONY_MAX_SUBSCRIPTIONS_REACHED:"HARMONY_MAX_SUBSCRIPTIONS_REACHED",CDM_ERROR:"CDM_ERROR",PLAYBACK_CLEAR_DATA:"PLAYBACK_CLEAR_DATA",QUEUE_UPDATE:"QUEUE_UPDATE",ADD_TO_QUEUE_SUCCESS:"ADD_TO_QUEUE_SUCCESS",ADD_TO_QUEUE_ERROR:"ADD_TO_QUEUE_ERROR",DISCONNECT_HARMONY:"DISCONNECT_HARMONY"},r=(e="unknown",t="unknown",n="")=>({type:i.PLAYBACK_ERROR,name:e,source:t,message:n}),s=e=>({type:i.DEVICE_INFO_CHANGED,deviceInfo:e}),a=e=>({type:i.SET_ACTIVE_DEVICE,id:e}),o=(e="unknown")=>({type:i.HARMONY_MAX_SUBSCRIPTIONS_REACHED,source:e}),l=()=>({type:i.CDM_ERROR,name:i.CDM_ERROR}),c=()=>({type:i.PLAYBACK_CLEAR_DATA})},53216:(e,t,n)=>{"use strict";n.d(t,{Jz:()=>s,SC:()=>r,gK:()=>i,jG:()=>a});const i={REQUEST_SEO_EXPERIMENT_DATA:"REQUEST_SEO_EXPERIMENT_DATA",SET_SEO_EXPERIMENT_DATA:"SET_SEO_EXPERIMENT_DATA",SET_SEO_EXPERIMENT_ERROR:"SET_SEO_EXPERIMENT_ERROR"},r=e=>({type:i.REQUEST_SEO_EXPERIMENT_DATA,uri:e}),s=e=>({type:i.SET_SEO_EXPERIMENT_DATA,data:e}),a=()=>({type:i.SET_SEO_EXPERIMENT_ERROR})},99676:(e,t,n)=>{"use strict";n.d(t,{zA:()=>l,gK:()=>a});var i=n(27778);let r=function(e){return e.RTL="rtl",e.LTR="ltr",e}({});const s=e=>{document.documentElement.setAttribute("dir",e)};let a=function(e){return e.SET_RTL_MODE="SET_RTL_MODE",e}({});const o=e=>{e===r.RTL?s(r.RTL):s(r.LTR)},l=e=>{const t=(e=>i.IB[e]?.isRTL?r.RTL:r.LTR)(e);return o(t),n=t===r.RTL,{type:a.SET_RTL_MODE,isRTL:n};var n}},28244:(e,t,n)=>{"use strict";n.d(t,{A9:()=>X,BU:()=>v,BY:()=>U,BZ:()=>y,DH:()=>P,Gz:()=>_,H2:()=>b,Ih:()=>q,Jp:()=>s,KB:()=>F,Kc:()=>oe,Kf:()=>Q,Kk:()=>O,MB:()=>H,Nk:()=>ee,O:()=>o,O2:()=>G,OB:()=>c,P0:()=>L,QK:()=>z,X0:()=>te,YF:()=>se,Yk:()=>W,Yp:()=>R,_3:()=>K,_P:()=>l,aP:()=>p,ae:()=>I,as:()=>B,aw:()=>d,b0:()=>$,c$:()=>u,cQ:()=>J,cd:()=>V,dK:()=>N,e$:()=>E,eH:()=>ae,eN:()=>re,f:()=>A,ft:()=>Z,gK:()=>i,hp:()=>k,j4:()=>S,k0:()=>a,kC:()=>C,lM:()=>ie,mE:()=>h,mi:()=>D,np:()=>T,p5:()=>ne,pf:()=>r,rF:()=>w,rN:()=>x,us:()=>Y,wi:()=>j,xF:()=>f,yh:()=>m,yk:()=>M,zj:()=>g});const i={COPY_LINK_SUCCESS:"COPY_LINK_SUCCESS",OPEN_DELETE_PLAYLIST_DIALOG:"OPEN_DELETE_PLAYLIST_DIALOG",CLOSE_DELETE_PLAYLIST_DIALOG:"CLOSE_DELETE_PLAYLIST_DIALOG",OPEN_DELETE_FOLDER_DIALOG:"OPEN_DELETE_FOLDER_DIALOG",CLOSE_DELETE_FOLDER_DIALOG:"CLOSE_DELETE_FOLDER_DIALOG",OPEN_REMOVE_FROM_LIBRARY_DIALOG:"OPEN_REMOVE_FROM_LIBRARY_DIALOG",CLOSE_REMOVE_FROM_LIBRARY_DIALOG:"CLOSE_REMOVE_FROM_LIBRARY_DIALOG",OPEN_BLOCK_USER_DIALOG:"OPEN_BLOCK_USER_DIALOG",CLOSE_BLOCK_USER_DIALOG:"CLOSE_BLOCK_USER_DIALOG",OPEN_SIGNUP_PROMPT_DIALOG:"OPEN_SIGNUP_PROMPT_DIALOG",CLOSE_SIGNUP_PROMPT_DIALOG:"CLOSE_SIGNUP_PROMPT_DIALOG",OPEN_LEAVE_PLAYLIST_DIALOG:"OPEN_LEAVE_PLAYLIST_DIALOG",CLOSE_LEAVE_PLAYLIST_DIALOG:"CLOSE_LEAVE_PLAYLIST_DIALOG",HIDE_UNSUPPORTED_MESSAGE:"HIDE_UNSUPPORTED_MESSAGE",SHOW_UNSUPPORTED_MESSAGE:"SHOW_UNSUPPORTED_MESSAGE",HIDE_PLAYBACK_NOT_SUPPORTED_MODAL:"HIDE_PLAYBACK_NOT_SUPPORTED_MODAL",SHOW_PLAYBACK_NOT_SUPPORTED_MODAL:"SHOW_PLAYBACK_NOT_SUPPORTED_MODAL",HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:"HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL",SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:"SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL",HIDE_PREMIUM_MODAL:"HIDE_PREMIUM_MODAL",SHOW_PREMIUM_MODAL:"SHOW_PREMIUM_MODAL",HIDE_L2L_MODAL:"HIDE_L2L_MODAL",SHOW_L2L_MODAL:"SHOW_L2L_MODAL",HIDE_S2L_MODAL:"HIDE_S2L_MODAL",SHOW_S2L_MODAL:"SHOW_S2L_MODAL",HIDE_EMPLOYEE_PODCASTS_MODAL:"HIDE_EMPLOYEE_PODCASTS_MODAL",SHOW_EMPLOYEE_PODCASTS_MODAL:"SHOW_EMPLOYEE_PODCASTS_MODAL",EMPLOYEE_PODCASTS_PLUGIN_ENABLED:"EMPLOYEE_PODCASTS_PLUGIN_ENABLED",EMPLOYEE_PODCASTS_PLUGIN_DISABLED:"EMPLOYEE_PODCASTS_PLUGIN_DISABLED",HIDE_COOKIE_NOTICE:"HIDE_COOKIE_NOTICE",SHOW_COOKIE_NOTICE:"SHOW_COOKIE_NOTICE",OPEN_FULLSCREEN_MODE:"OPEN_FULLSCREEN_MODE",CLOSE_FULLSCREEN_MODE:"CLOSE_FULLSCREEN_MODE",CONNECT_DEVICE_PICKER_OPENED:"CONNECT_DEVICE_PICKER_OPENED",CONNECT_DEVICE_PICKER_CLOSED:"CONNECT_DEVICE_PICKER_CLOSED",SHOW_CONNECT_NUDGE:"SHOW_CONNECT_NUDGE",HIDE_CONNECT_NUDGE:"HIDE_CONNECT_NUDGE",SHOW_CONNECT_BAR:"SHOW_CONNECT_BAR",HIDE_CONNECT_BAR:"HIDE_CONNECT_BAR",UPDATE_UI_HISTORY_STATE:"UPDATE_UI_HISTORY_STATE",ENTER_FULLSCREEN:"ENTER_FULLSCREEN",LEAVE_FULLSCREEN:"LEAVE_FULLSCREEN",ENABLE_KEYBOARD_SHORTCUTS:"ENABLE_KEYBOARD_SHORTCUTS",SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY:"SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY",SHOW_TRACK_CREDITS:"SHOW_TRACK_CREDITS",CONTEXT_MENU_OPENED:"CONTEXT_MENU_OPENED",CONTEXT_MENU_CLOSED:"CONTEXT_MENU_CLOSED",INITIALISE_QUICKSILVER:"INITIALISE_QUICKSILVER",TRIGGER_CLICK_DEPRECATION_MESSAGE:"TRIGGER_CLICK_DEPRECATION_MESSAGE",OPEN_REMOVE_DOWNLOADS_DIALOG:"OPEN_REMOVE_DOWNLOADS_DIALOG",CLOSE_REMOVE_DOWNLOADS_DIALOG:"CLOSE_REMOVE_DOWNLOADS_DIALOG",OPEN_CLEAR_CACHE_DIALOG:"OPEN_CLEAR_CACHE_DIALOG",CLOSE_CLEAR_CACHE_DIALOG:"CLOSE_CLEAR_CACHE_DIALOG",OPEN_RENAME_FOLDER_MODAL:"OPEN_RENAME_FOLDER_MODAL",CLOSE_RENAME_FOLDER_MODAL:"CLOSE_RENAME_FOLDER_MODAL",OPEN_YOUR_DJ_UPSELL_MODAL:"OPEN_YOUR_DJ_UPSELL_MODAL",CLOSE_YOUR_DJ_UPSELL_MODAL:"CLOSE_YOUR_DJ_UPSELL_MODAL",OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:"OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG",CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:"CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG",OPEN_ARTIST_ABOUT_DIALOG:"OPEN_ARTIST_ABOUT_DIALOG",CLOSE_ARTIST_ABOUT_DIALOG:"CLOSE_ARTIST_ABOUT_DIALOG",OPEN_BOOK_CONSUMPTION_CAP_MODAL:"OPEN_BOOK_CONSUMPTION_CAP_MODAL",CLOSE_BOOK_CONSUMPTION_CAP_MODAL:"CLOSE_BOOK_CONSUMPTION_CAP_MODAL",OPEN_DSA_DIALOG:"OPEN_DSA_DIALOG",CLOSE_DSA_DIALOG:"CLOSE_DSA_DIALOG",OPEN_JAM_MODAL:"OPEN_JAM_MODAL",CLOSE_JAM_MODAL:"CLOSE_JAM_MODAL",OPEN_SHOW_RATING_MODAL:"OPEN_SHOW_RATING_MODAL",CLOSE_SHOW_RATING_MODAL:"CLOSE_SHOW_RATING_MODAL",OPEN_WATCH_FEED_VIEW:"OPEN_WATCH_FEED_VIEW",CLOSE_WATCH_FEED_VIEW:"CLOSE_WATCH_FEED_VIEW"},r=e=>({type:i.COPY_LINK_SUCCESS,link:e}),s=()=>({type:i.SHOW_L2L_MODAL}),a=()=>({type:i.HIDE_L2L_MODAL}),o=e=>({type:i.OPEN_DELETE_PLAYLIST_DIALOG,uri:e}),l=()=>({type:i.CLOSE_DELETE_PLAYLIST_DIALOG}),c=(e,t)=>({type:i.OPEN_DELETE_FOLDER_DIALOG,uri:e,onDeleteCallback:t}),u=()=>({type:i.CLOSE_DELETE_FOLDER_DIALOG}),d=(e,t=!1)=>({type:i.OPEN_REMOVE_FROM_LIBRARY_DIALOG,uri:e,isPrerelease:t}),m=()=>({type:i.CLOSE_REMOVE_FROM_LIBRARY_DIALOG}),p=e=>({type:i.OPEN_LEAVE_PLAYLIST_DIALOG,playlistUri:e}),h=()=>({type:i.CLOSE_LEAVE_PLAYLIST_DIALOG}),g=(e,t)=>({type:i.OPEN_BLOCK_USER_DIALOG,uri:e,name:t}),f=()=>({type:i.CLOSE_BLOCK_USER_DIALOG}),b=(e=null)=>({type:i.OPEN_SIGNUP_PROMPT_DIALOG,uri:e}),v=()=>({type:i.CLOSE_SIGNUP_PROMPT_DIALOG}),y=()=>({type:i.HIDE_UNSUPPORTED_MESSAGE}),_=e=>({type:i.SHOW_UNSUPPORTED_MESSAGE,message:e}),E=()=>({type:i.HIDE_PLAYBACK_NOT_SUPPORTED_MODAL}),x=()=>({type:i.SHOW_PLAYBACK_NOT_SUPPORTED_MODAL}),C=()=>({type:i.HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL}),S=()=>({type:i.SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL}),A=()=>({type:i.OPEN_FULLSCREEN_MODE}),w=()=>({type:i.CLOSE_FULLSCREEN_MODE}),I=()=>({type:i.CONNECT_DEVICE_PICKER_OPENED}),T=()=>({type:i.CONNECT_DEVICE_PICKER_CLOSED}),N=()=>({type:i.SHOW_CONNECT_NUDGE}),R=()=>({type:i.HIDE_CONNECT_NUDGE}),k=e=>({type:i.UPDATE_UI_HISTORY_STATE,historyState:e}),O=()=>({type:i.ENTER_FULLSCREEN}),P=()=>({type:i.LEAVE_FULLSCREEN}),j=e=>({type:i.SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY,isOpen:e}),L=(e,t)=>({type:i.SHOW_TRACK_CREDITS,isOpen:e,trackUri:t}),D=()=>({type:i.SHOW_S2L_MODAL}),U=()=>({type:i.HIDE_S2L_MODAL}),M=()=>({type:i.INITIALISE_QUICKSILVER}),B=()=>({type:i.TRIGGER_CLICK_DEPRECATION_MESSAGE}),F=()=>({type:i.OPEN_REMOVE_DOWNLOADS_DIALOG}),H=()=>({type:i.CLOSE_REMOVE_DOWNLOADS_DIALOG}),V=()=>({type:i.OPEN_CLEAR_CACHE_DIALOG}),z=()=>({type:i.CLOSE_CLEAR_CACHE_DIALOG}),G=(e,t)=>({type:i.OPEN_RENAME_FOLDER_MODAL,name:e,handleRename:t}),W=()=>({type:i.CLOSE_RENAME_FOLDER_MODAL}),K=e=>({type:i.OPEN_BOOK_CONSUMPTION_CAP_MODAL,consumptionCapExplanation:e}),Y=()=>({type:i.CLOSE_BOOK_CONSUMPTION_CAP_MODAL}),q=(e,t,n,r)=>({type:i.OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG,uri:e,onConfirm:t,onCancel:n,remoteDeviceInfo:r}),Q=()=>({type:i.CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG}),$=e=>({type:i.OPEN_DSA_DIALOG,item:e}),Z=()=>({type:i.CLOSE_DSA_DIALOG}),X=(e,t,n)=>({type:i.OPEN_JAM_MODAL,modalType:e,joinToken:t,memberToRemove:n}),J=()=>({type:i.CLOSE_JAM_MODAL}),ee=(e,t,n,r=!1)=>({type:i.OPEN_WATCH_FEED_VIEW,sectionUri:e,discoveryFeedUri:t,firstItemUri:n,resumeOnClose:r}),te=()=>({type:i.CLOSE_WATCH_FEED_VIEW}),ne=e=>({type:i.OPEN_ARTIST_ABOUT_DIALOG,data:e}),ie=()=>({type:i.CLOSE_ARTIST_ABOUT_DIALOG}),re=()=>({type:i.OPEN_YOUR_DJ_UPSELL_MODAL}),se=()=>({type:i.CLOSE_YOUR_DJ_UPSELL_MODAL}),ae=(e,t)=>({type:i.OPEN_SHOW_RATING_MODAL,uri:e,metadata:t}),oe=()=>({type:i.CLOSE_SHOW_RATING_MODAL})},22496:(e,t,n)=>{"use strict";n.d(t,{Df:()=>l,HM:()=>h,XX:()=>g,Y:()=>c});var i=n(99754),r=n(14056),s=n(30232),a=n(33082),o=n(60516);function l(e){return"video"===e.mediaType}function c(e){return e.isPodcastAd}function u(e){return null!=e&&""!==e}function d(e){return u(e)&&"#"!==e}function m(e,...t){return t.find(e)??null}function p(...e){return m(u,...e)}function h(...e){const t=m(d,...e);return t?(0,o.H)(t):t}function g(e){const t=(0,i.d4)((e=>e.ads?.vto?.info??null)),n=(0,i.d4)((e=>e.ads?.audio?.info??null)),u=(0,s.o)((e=>e?.context),((e,t)=>e?.uri===t?.uri));if(!(0,a.N)(e))return null;const{advertiser:d,url:m,title:g}=e,f=r.Ru.get("ad-formats.advertisement"),b=r.Ru.get("ad-formats.learnMore");if(c(e)){const e=u?.metadata?.context_description||d||b;return{title:p(g,t?.advertiser,n?.buttonMessage)??f,subtitle:e,url:h(t?.clickUrl,n?.clickUrl,m),blurbUri:u?.metadata?.context_description&&e===u?.metadata.context_description&&u.uri?(0,o.H)(u.uri):void 0}}if(l(e))return{title:t?.advertiser??f,subtitle:t?.buttonMessage??b,url:h(t?.clickUrl,m)};const v=!0===n?.isFeaturedActionPlay?r.Ru.get("ad-formats.playTrack"):null;return{title:d||f,subtitle:p(n?.buttonMessage,v)??b,url:h(n?.clickUrl,m)}}},82901:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var i=n(52058),r=n(30323),s=n(94710);const a=e=>{const t=(0,r.dY)(),n=(0,s.vh)(),a=t.getInStreamAd();return{logAdFeedback:function(t){n.send((0,i.F)({ad_id:e.id,advertiser:e.advertiser,creative_id:a?.adId===e.id?a?.metadata?.creative_id:void 0,format:e.mediaType,line_item_id:a?.adId===e.id?a?.metadata?.lineitem_id:void 0,event:t}))}}}},61127:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>a,iz:()=>l,q5:()=>o});var i=n(14056),r=n(30323),s=n(22496);function a(e){return(0,s.Df)(e)?"video":"audio"}function o(e){return(0,s.Y)(e)?"podcast":"music"}function l(e){const t=(0,r.dY)().getInStreamAd(),n=t?.metadata?.logoImage,a=t?.metadata?.buttonMessage,o=t?.metadata?.tagline,l=t?.clickthroughUrl,{url:c}=e,u=e.metadata?.advertiser,d=u||null,m=i.Ru.get("ad-formats.advertisement");if((0,s.Y)(e)){return{title:d,subtitle:m,url:(0,s.HM)(l,c),tagline:o,buttonMessage:a,logoImage:n}}return(0,s.Df)(e),{title:d,subtitle:m,url:(0,s.HM)(l,c),tagline:o,buttonMessage:a,logoImage:n}}},94345:(e,t,n)=>{"use strict";n.d(t,{$L:()=>u,ZY:()=>o,b6:()=>l,x0:()=>c});var i=n(9997),r=n(55732),s=n(21361),a=n(88724);n(51806);const o=async e=>{const t=s.n.getInstance();return(await t.build().withMethod("POST").withHost(a.MW).withPath("/dsa-metadata").withEndpointIdentifier("/dsa-metadata").withBody(JSON.stringify(e)).withoutMarket().send()).body},l=(e,t,n,s,o=!1)=>{const l=o?"/leavebehinds/mock/ads":"/leavebehinds/ads";return e.build().withMethod("POST").withHost(a.I9).withPath(l).withEndpointIdentifier(l).withBody(JSON.stringify({surface:t,uri:n,playlistTitle:s,maxAds:(0,i.NI)((0,r.O$)(t))})).withoutMarket().send()},c=e=>s.n.getInstance().build().withHost(a.ip).withPath(`/sponsored/${e}`).withEndpointIdentifier("sponsored/{playlistUri}").send(),u=async()=>{const e=s.n.getInstance();return(await e.build().withHost(a.MR).withMethod("GET").send()).body}},51806:(e,t,n)=>{"use strict";n.d(t,{r:()=>s});var i=n(21361),r=n(88724);async function s(){return(await function(e,t){const n=(e||i.n.getInstance()).build();return(t?n.withHeaders(t):n).withHost(r.oD).withPath("/v2/config").withEndpointIdentifier("/v2/config").send()}()).body}},95339:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var i=n(51533);function r(e){return`${(0,i.jV)(e)}/sponsors`}},73756:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(22215),r=n(19498);function s(){return{version:(0,i.NC)(r._sf)?2:1}}},85232:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(22215),r=n(19498);function s(){return(0,i.NC)(r.CU7)}},45582:(e,t,n)=>{"use strict";function i(e){return{...e,clickthrough:e.clickthroughUrl,trackingEvents:e.trackingEvents,metadata:{...e,creative_id:e.creativeId,lineitem_id:e.lineitemId},display:e.displayImage}}n.d(t,{s:()=>i})},59659:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(51533);function r(e){return`${(0,i.P8)(e)}/sponsors`}},37595:(e,t,n)=>{"use strict";n.d(t,{R:()=>i,g:()=>r});const i="LEGACY_HPTO_CONTAINER_MOUNTED",r=({template:e})=>({type:i,template:e})},67631:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i});const i={HPTO_CONTAINER_LOAD:"HPTO_CONTAINER_LOAD",GOT_TEMPLATE:"GOT_TEMPLATE",HPTO_CONTAINER_MOUNTED:"HPTO_CONTAINER_MOUNTED",HPTO_CONTAINER_UNMOUNTED:"HPTO_CONTAINER_UNMOUNTED",HPTO_COMPONENT_UNMOUNTED:"HPTO_COMPONENT_UNMOUNTED",HPTO_COMPONENT_NEW_AD_RENDERED:"HPTO_COMPONENT_NEW_AD_RENDERED",FETCH_CREATIVE:"FETCH_CREATIVE",FETCHING_CREATIVE:"FETCHING_CREATIVE",CREATIVE_FETCH_FAILED:"CREATIVE_FETCH_FAILED",GOT_CREATIVE:"GOT_CREATIVE",SET_HPTO_PREVIEW:"SET_HPTO_PREVIEW",HPTO_PREVIEW_HOME_NAVIGATION:"HPTO_PREVIEW_HOME_NAVIGATION",DEBUG_FORCE_REFRESH_HPTO:"DEBUG_FORCE_REFRESH_HPTO"}},10868:(e,t,n)=>{"use strict";n.d(t,{$4:()=>a,$t:()=>c,BH:()=>_,DZ:()=>g,Fi:()=>b,IH:()=>u,Q5:()=>h,Q6:()=>s,QL:()=>p,QN:()=>i.Q,Yg:()=>m,Z6:()=>l,bK:()=>o,bW:()=>d,i2:()=>v,t3:()=>r,yF:()=>y,zi:()=>f});var i=n(67631);n(91200);const r="HPTO_COMPONENT_MOUNTED",s="HPTO_LOG_EVENT",a="HPTO_LOG_ERROR_EVENT",o=e=>({type:i.Q.GOT_TEMPLATE,data:e}),l=()=>({type:i.Q.HPTO_CONTAINER_MOUNTED}),c=e=>({type:r,element:e}),u=e=>({type:i.Q.HPTO_COMPONENT_UNMOUNTED,data:{clearCreative:e}}),d=()=>({type:i.Q.HPTO_COMPONENT_NEW_AD_RENDERED}),m=()=>({type:i.Q.FETCH_CREATIVE}),p=()=>({type:i.Q.FETCHING_CREATIVE}),h=e=>({type:i.Q.GOT_CREATIVE,data:e}),g=e=>({type:i.Q.SET_HPTO_PREVIEW,data:e}),f=()=>({type:i.Q.HPTO_PREVIEW_HOME_NAVIGATION}),b=()=>({type:i.Q.CREATIVE_FETCH_FAILED}),v=(e,t="")=>({type:s,event:e,context:t}),y=e=>({type:a,error:e}),_=()=>({type:i.Q.DEBUG_FORCE_REFRESH_HPTO})},91200:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});var i=n(67631);const r=()=>({type:i.Q.HPTO_CONTAINER_LOAD})},49764:(e,t,n)=>{"use strict";n.d(t,{$F:()=>a,Dr:()=>l,KI:()=>d,V0:()=>u,YO:()=>m,nC:()=>h,t$:()=>p,uW:()=>c,ye:()=>g});var i=n(42551),r=n(10411);const s=[r.G.NATIVE,r.G.IMAGE,r.G.HTML],a=e=>e.ads.hpto?.template||null,o=e=>e.ads.root.isHptoHidden,l=e=>e.ads.hpto?.hptoIsStable||null,c=e=>e.ads.root.isPremium,u=e=>"1"===e.session.productState?.["has-audiobooks-subscription"],d=e=>e.ads.hpto?.creativeFetchingState||null,m=(0,i.Mz)((e=>e.ads.hpto?.creative||null),(e=>e.ads.hpto?.preview||null),((e,t)=>t||e)),p=(0,i.Mz)(m,c,o,((e,t,n)=>{if(!e)return!1;return!(!s.includes(e.bannerMode)||t&&n)})),h=(0,i.Mz)(c,o,((e,t)=>!e||!t)),g=(0,i.Mz)(m,(e=>!!e&&s.includes(e.bannerMode)))},48840:(e,t,n)=>{"use strict";n.d(t,{DD:()=>b,Ei:()=>p,Lc:()=>v,Rl:()=>a,Uh:()=>u,Um:()=>r,Uy:()=>i,Xv:()=>l,i2:()=>y,lj:()=>m,nk:()=>s,tb:()=>h,uP:()=>d,uU:()=>f,wz:()=>_,zB:()=>o,zV:()=>g,zc:()=>c});const i="REQUEST_SPONSORED_PLAYLISTS",r="REQUEST_SPONSORED_PLAYLISTS_SUCCESS",s="REQUEST_SPONSORED_PLAYLIST_AD",a="REQUEST_SPONSORED_PLAYLIST_AD_SUCCESS",o="LOG_EVENT_SPONSORED_PLAYLIST",l="SPONSORED_PLAYLIST_RENDERED",c="SPONSORED_PLAYLIST_DESTROYED",u="SET_SPONSORED_PREVIEW_AD",d=e=>({type:s,playlistUri:e}),m=e=>({type:r,sponsorships:e}),p=e=>({type:"REQUEST_SPONSORED_PLAYLISTS_FAILURE",error:e}),h=()=>({type:l}),g=()=>({type:c}),f=()=>({type:i}),b=(e,t)=>({type:a,playlistUri:e,ad:t}),v=e=>({type:u,previewAd:e}),y=e=>({type:o,message:e}),_=e=>({type:"REQUEST_SPONSORED_PLAYLIST_AD_FAILURE",error:e})},78776:(e,t,n)=>{"use strict";n.d(t,{MW:()=>s,Oc:()=>r,Pu:()=>o,QN:()=>i,W_:()=>a,gW:()=>c,i2:()=>l,iB:()=>u});const i={MINIMIZE_VIDEO_AD_VIEW:"MINIMIZE_VIDEO_AD_VIEW",MAXIMIZE_VIDEO_AD_VIEW:"MAXIMIZE_VIDEO_AD_VIEW",HIDE_VIDEO_AD_VIEW:"HIDE_VIDEO_AD_VIEW",SHOW_VIDEO_AD_VIEW:"SHOW_VIDEO_AD_VIEW",VTO_LOG_EVENT:"VTO_LOG_EVENT",VTO_SET_INFO:"VTO_SET_INFO",VTO_NAVIGATION_CHANGE:"VTO_NAVIGATION_CHANGE"},r=()=>({type:i.MINIMIZE_VIDEO_AD_VIEW}),s=()=>({type:i.MAXIMIZE_VIDEO_AD_VIEW}),a=()=>({type:i.HIDE_VIDEO_AD_VIEW}),o=()=>({type:i.SHOW_VIDEO_AD_VIEW}),l=(e,t,n)=>({type:i.VTO_LOG_EVENT,event:e,eventReason:t,eventSource:n}),c=e=>({type:i.VTO_SET_INFO,info:e}),u=()=>({type:i.VTO_NAVIGATION_CHANGE})},4105:(e,t,n)=>{"use strict";n.d(t,{adsCoreConnector:()=>m,lv:()=>c,settingsClient:()=>l});var i=n(41975);const r=(0,n(50834).X)(),s=new i.CJ(r),a=new i.Dt(r),o=new i.Xk(r),l=new i.B3(r),c=new i.NB(r),u=new i.RI(r),d=new i.Yl(r);const m=new class{addNewSlot(e,t){return a.createSlot(i.Ym.fromPartial({slotId:e}))}clearSlot(e){return a.clearAllAds({slotId:e})}enableSlot(e){return l.updateSlotEnabled(i.S9.fromPartial({slotId:e,enabled:!0}))}async fetchAdForSlot(e){const t=(await s.getAds(i.c7.fromPartial({slotId:e}))).adPackage[e];if(!t)throw new Error("slot-not-defined");if(!t.ads.length)throw new Error("no-ads");return t.ads[0]}fetchSlot(e,t){return a.fetchSlot({slotId:e,targetingMap:t})}getSlotSettings(e){return l.getSlotSettings({slotId:e})}increaseStreamTime(e){return d.addPlaytime({seconds:e})}overrideCountry(e){return d.requestOverride({key:"country",value:e})}putTargeting(e){return o.putTargeting(e)}subscribeToInStreamAds(e){return u.subInStream({},e)}subscribeToSlot(e,t){return a.subSlot(i.ef.fromPartial({slotId:e}),(e=>t(e)))}triggerSlot(e){return a.triggerSlot({slotId:e})}}},91373:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});const i=(0,n(98930).h)()},97702:(e,t,n)=>{"use strict";function i(...e){return console.log("cosmos-connector: ",...e),e}n.d(t,{e:()=>i})},59081:(e,t,n)=>{"use strict";n.d(t,{Q:()=>A});var i=n(67899),r=n(91373),s=n(97702),a=n(50834);const o=new i.EW((0,a.X)()),l={"Content-Type":"application/json"};var c=n(47437),u=n(87333);const d=Date.now(),m="https://spclient.wg.spotify.com/ads/v1/ads",p="https://spclient.wg.spotify.com/sponsoredplaylist/v1/sponsored",h="sp://ads/v1/slots",g="sp://ads/v1/settings",f=`${g}/request_header`,b="sp://ads/v1/state",v="sp://ads/v2/state",y=["audio","video","banner"];let _=m,E=p;function x(e,t){r.l.sub("sp://ads/v1/formats/"+e,(e=>{t(e)}))}function C(e){return r.l.get(`${g}/${e}`,l)}function S(e,t){return r.l.post(`${h}/${e}/${t}`,{},l)}const A={subscribeToFormat:x,getSlotConfigurations:C,subscribeToAdsProductState:function(e){return o.subValues(i.cF.fromPartial({}),(t=>{t.pairs.ads&&e({ads:t.pairs.ads})}))},subscribeToProductState:function(e,t){return o.subValues(i.cF.fromPartial({}),(n=>{n.pairs[e]&&t({[e]:n.pairs[e]})}))},getAdSlotConfig:e=>C(e).then((t=>t.settings.filter((t=>t.id===e))[0])),getAdForSlot(e,t,n){(0,s.e)("fetch ad for slot=%o, localTargeting=%o",t,e,_);const i=_!==m?_:`${_}/${t}`;return r.l.get(i,{targeting:e,pod:{},session_id:d,overrides:n||{}},{}).then((e=>{if(!e.pod)throw new Error("pod-not-defined");if(!e.pod[t])throw new Error("slot-not-defined");if(0===e.pod[t].length)throw new Error("no-ads");return e.pod[t][0]}))},fetchAdForSlot(e,t){const n=`sp://ads/v1/ads/${e}`;(0,s.e)("fetchAdForSlot endpoint=%o",n);return r.l.get(n,t,{}).then((t=>{if(!t[e])throw new Error("slot-not-defined");if(0===t[e].length)throw new Error("no-ads");return t[e][0]}))},requestPreviewAd:e=>((0,s.e)("Requesting preview ad, adid=%o",e),r.l.post(`sp://ads/v1/preview/${e}`,{})),overrideCountry:e=>((0,s.e)("Overring country=%o",e),r.l.put("sp://ads/v2/testing/request_override/country",{value:e})),patchTargeting:(e,t)=>r.l.put(`sp://ads/v1/targeting/${e}`,{value:t},l),increaseStreamTime:e=>r.l.post("sp://ads/v1/testing/playtime",{value:e},l),addNewSlot:(e,t)=>r.l.put(`${h}/${e}`,{formats:[t]},l).then((()=>`${h}/${e}/${t}`)),subscribeToSlot:(e,t)=>r.l.sub(e,(e=>{t(e)})),subscribeToSlotType:(e,t)=>r.l.sub(`${h}/${e}`,(e=>{t(e)})),subscribeToAllFormats(e){y.map((t=>{x(t,(n=>{e(t,n)}))}))},subscribeToEvent:function(e,t,n,i){return r.l.sub((e=>`sp://ads/v1/events/${e}`)(e),t,n,i)},postEvent:function(e,t,n){const i=`sp://ads/v1/events/${t}/${e}`;if(n&&n.event_data){if(Object.keys(n.event_data).some((e=>"string"!=typeof n.event_data?.[e])))return Promise.reject(new TypeError("Invalid Payload. All event_data values need to be strings. Furthermore, event_data shouldn't even be used at all anymore since it has been deprecated with https://ghe.spotify.net/ads/adscore-docs/pull/6"))}return r.l.post(i,n||{},l)},postToSlot(e,t,n){const i=`${h}/${e}/${t}`;return r.l.post(i,n||{},l)},getSlotConfiguration:(e,t)=>window.Ads&&window.Ads.adFormatOverrides.billboardShowAfterSeconds?Promise.resolve(window.Ads.adFormatOverrides.billboardShowAfterSeconds):C(e).then((n=>{let i;return n.settings.forEach((n=>{n.id===e&&(i=n[t])})),i})),configureSlot:(e,t,n)=>r.l.put(`${g}/${e}/${t}`,{value:n},l),enableSlot:e=>r.l.put(`${g}/${e}/slot_enabled`,{value:!0},l),getSponsorshipAd(e){const t=E!==p?E:`${p}/${e}`;return(0,s.e)("getSponsorshipAd",t),r.l.get(t)},subToState(e){r.l.sub(b,e)},subToAdState(e){r.l.sub(v,e)},getState:()=>r.l.get(b),getAdState:()=>r.l.get(v),getFeatureFlags:e=>r.l.post("sp://abba/v1/flags",{flags:e},l),setAdSlotEndpoint(e){_=e,(0,s.e)("setAdSlotEndpoint",e)},setAdStatePusherEndpoint:e=>((0,s.e)("setAdStatePusherEndpoint",e),r.l.put("sp://ads/v2/settings/state/ad_state_endpoint",{value:e},l)),setSponsoredUri(e){E=e,(0,s.e)("setSponsoredUri",e)},triggerSlotFetch:e=>S(e,"fetch"),triggerSlotPlay:e=>S(e,"now"),triggerSlotClear:e=>S(e,"clear"),triggerSlotClearAll:e=>S(e,"clear_all"),setRequestHeader:(e,t,n)=>r.l.put(`${f}/${e}`,{value:t,refresh_inventory:n},l),removeRequestHeader:(e,t)=>r.l.del(`${f}/${e}`,{refresh_inventory:t},l),setAdStateKey:(e,t)=>r.l.put(`${v}/${e}`,{value:t},l),setAdState:e=>r.l.put(`${v}`,e,l),loadAdPod:e=>((0,s.e)("Loading ad pod via cosmos",e),r.l.put("sp://ads/v2/testing/insert_ads",{value:JSON.stringify(e)},l)),overridePodcastMetadata:function(e){return(0,s.e)("Overriding podcast metadata",e),r.l.put("sp://ads/v1/podcast/metadata",e,l)},logAudioVolume:async function(e){await r.l.put("sp://device_state/state",{volume:e},l)},getEpisodeSponsors:c.getEpisodeSponsors,getShowSponsors:u.getShowSponsors}},47437:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEpisodeSponsors:()=>s});var i=n(91373),r=n(45582);const s=async(...e)=>{const t=globalThis;if("function"==typeof t.getEpisodeSponsorsOverride)return await t.getEpisodeSponsorsOverride(...e);const[n,s]=e;if(!n)throw new Error("episodeBase62Id invalid for getting episode sponsors");const a=((...[e,t])=>`https://spclient.wg.spotify.com/podcast-ap4p/${2===t?.version?"v2/episodeSponsors":"rawSponsoredSection"}/${e}${2===t?.version?"?responseFormat=json":""}`)(...e);if(2===s?.version){return(await i.l.get(a)).ads.map(r.s)}return await i.l.get(a)}},87333:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getShowSponsors:()=>s});var i=n(91373),r=n(45582);const s=async(...e)=>(await i.l.get(((...[e])=>`https://spclient.wg.spotify.com/podcast-ap4p/showSponsors/${e}?responseFormat=json`)(...e))).ads.map(r.s)},84841:(e,t,n)=>{"use strict";n.d(t,{D:()=>v,z:()=>_});var i=n(73075),r=n.n(i);const s=["Loftie","HBOMax","Squarespace","Casper","Smile Direct Club","Test Advertiser #6","Test Advertiser #7"],a=async()=>s.map(((e,t)=>({clickthrough:"https://www.spotify.com/",display:"https://open.spotifycdn.com/cdn/images/logo-complete-black.573d8227.svg",metadata:{adId:`test ad id ${t}`,displayImage:"https://open.spotifycdn.com/cdn/images/logo-complete-black.573d8227.svg",clickthroughUrl:`test clickthroughUrl ${t}`,advertiser:e,lineitem_id:`test lineitem id ${t}`,lineitemId:`test lineitem id ${t}`,buttonMessage:`test button message ${t}`,creative_id:`test creative id ${t}`,creativeId:`test creative id ${t}`,featuredAction:`test featured action ${t}`,logoImage:"http://i.scdn.co/image/86a0078ff798be6840aec841e7fbd2da2acea75d",tagline:`test tagline ${t}`},trackingEvents:{clicked:["https://xpui.app.spotify.com/index.html"],viewed:["https://xpui.app.spotify.com/index.html"]}})));var o=n(4105),l=n(97702),c=n(59081);const u="https://admocker.spotify.com";const d="podcast_midroll_15_clickthrough",m="podcast-midroll-1",p={segments:[{slot:m,start:3e4,stop:45e3,targeting:{maxads:"1"},admockerTestCase:d}]};let h;function g(e){return o.adsCoreConnector.increaseStreamTime(e)}async function f(e,t){const i=Array.isArray(e)?e:[e],{settingsClient:r}=await Promise.resolve().then(n.bind(n,4105));await r.updateAdServerEndpoint({slotIds:i,url:t}),b()}function b(){h?._debugForceRefreshHpto?.()}const v={overrideCountry:function(e){return o.adsCoreConnector.overrideCountry(e)},patchTargeting:function(e,t){return c.Q.patchTargeting(e,t)},increaseStreamTime:g,getAdServerEndpoint:function(e){return c.Q.getSlotConfigurations(e).then((e=>e.settings[0].ad_server_endpoint))},overrideAdServerEndpoint:f,overrideAdSlotEndpoint:function(e){return c.Q.setAdSlotEndpoint(e)},overrideAdStatePusherEndpoint:function(e){return c.Q.setAdStatePusherEndpoint(e)},overrideSponsoredPlaylistEndpoint:function(e){c.Q.setSponsoredUri(e),h?.overrideSponsoredPlaylistEndpoint?.()},_debugForceRefreshHpto:b,manualPodLoad:function(e){return(0,l.e)("manualPodLoad(): pod=%o",e),c.Q.loadAdPod(e)},setAdServerEndpoint:async function(e,t,n){const i="ad_server_endpoint",r=await c.Q.getSlotConfigurations(e);let s="";return r?.settings?.[0]?.[i]&&(s=r.settings[0][i].replace("https://pubads.g.doubleclick.net",t)),s+=`&session_id=${n}`,c.Q.configureSlot(e,i,s)},clearSlot:function(e){return o.adsCoreConnector.clearSlot(e)},triggerSlot:async function(e){return o.adsCoreConnector.triggerSlot(e)},subToFormats:function(e){return c.Q.subscribeToAllFormats(((t,n)=>{e?e(t,n):(0,l.e)("config for slot=%o, res=%o",t,n)}))},subToState:function(e){return c.Q.subToState((t=>{e?e(t):(0,l.e)("legacy ads state updated: %o",t)}))},subToAdState:function(e){c.Q.subToAdState((t=>{e?e(t):(0,l.e)("ad state updated: %o",t)}))},getState:function(e){return c.Q.getState().then((t=>(e?e(t):(0,l.e)("legacy ads state: %o",t.state),t)))},getAdState:function(e){return c.Q.getAdState().then((t=>{e?e(t):(0,l.e)("ad state: %o",t)}))},configureSlot:function(e,t,n){return c.Q.configureSlot(e,t,n)},debug:l.e,getAdSlotConfigurations:function(e,t){c.Q.getSlotConfigurations(e).then((n=>{t?t(n):(0,l.e)("config for slot=%o, res=%o",e,n)}))},setRequestHeader:function(e,t,n){return c.Q.setRequestHeader(e,t,n)},removeRequestHeader:function(e,t){return c.Q.removeRequestHeader(e,t)},createSlotAndOverrideItsAdServerEndpoint:function(e,t){return c.Q.addNewSlot(e).then((()=>f(e,t))).catch((t=>(0,l.e)(`Problem creating and overriding ${e} slot, error=%o`,t)))},enableSlot:function(e){return c.Q.enableSlot(e)},queueVideoAd:function(){return Promise.all([c.Q.addNewSlot("stream","video"),c.Q.increaseStreamTime(1200),c.Q.patchTargeting("focus","true"),c.Q.patchTargeting("adbreak","video,adscore")])},setBillboardTimeout(e){v.adFormatOverrides.billboardShowAfterSeconds=e},applyAdmockerForPodcastAd:function({podcastMetadata:e=p,sessionId:t="1",endpoint:n=(e=>function(e,t){return`${u}/mock/ad?test_case=${e}&session_id=${t}`}(e.admockerTestCase,t))}={}){return e.segments.forEach((e=>{const t="function"==typeof n?n(e):n;f(e.slot,t)})),c.Q.overridePodcastMetadata(e)},adFormatOverrides:{billboardShowAfterSeconds:null},overrideGetEpisodeSponsors:function(e=a){globalThis.getEpisodeSponsorsOverride=e}};let y=!1;function _(e){h=e,y||(r().unbind("shift+f5"),r().bind("shift+f5",(()=>{g(1200)})),y=!0,window.Ads=v)}},44366:(e,t,n)=>{"use strict";n.d(t,{P:()=>r,w:()=>s});var i=n(79474);const r=()=>e=>fetch(e,{mode:"no-cors"});function s(e){return(0,i.useMemo)((()=>e()),[e])}},94018:(e,t,n)=>{"use strict";n.d(t,{w:()=>a});var i=n(22215),r=n(19498),s=n(33082);const a=e=>{const t=(0,i.NC)(r.mPu,{loadingValue:!1});return!!e&&(0,s.N)(e)&&t&&"true"===e.metadata?.["ad.afi"]}},60516:(e,t,n)=>{"use strict";n.d(t,{H:()=>r});var i=n(83856);function r(e){const t=(0,i.o_)(e);return function(e){return null!==e}(t)?t.toURI():e}},10411:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,G:()=>r});let i=function(e){return e.NOT_FETCHING="NOT_FETCHING",e.FETCHING="FETCHING",e.FETCHED="FETCHED",e.FAILED="FAILED",e}({}),r=function(e){return e.IMAGE="image",e.HTML="html",e.NATIVE="native",e}({})},55732:(e,t,n)=>{"use strict";n.d(t,{Fh:()=>s,O$:()=>r,ui:()=>i});let i=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.PODCAST_SCROLL_NPV=1]="PODCAST_SCROLL_NPV",e[e.SHOW_PAGE=2]="SHOW_PAGE",e[e.EPISODE_PAGE=3]="EPISODE_PAGE",e[e.PODCAST_SEE_ALL=7]="PODCAST_SEE_ALL",e[e.MUSIC_NPV=4]="MUSIC_NPV",e[e.PLAYLIST=5]="PLAYLIST",e[e.MUSIC_SEE_ALL=6]="MUSIC_SEE_ALL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function r(e){switch(e){case 0:case"UNKNOWN":return i.UNKNOWN;case 1:case"PODCAST_SCROLL_NPV":return i.PODCAST_SCROLL_NPV;case 2:case"SHOW_PAGE":return i.SHOW_PAGE;case 3:case"EPISODE_PAGE":return i.EPISODE_PAGE;case 7:case"PODCAST_SEE_ALL":return i.PODCAST_SEE_ALL;case 4:case"MUSIC_NPV":return i.MUSIC_NPV;case 5:case"PLAYLIST":return i.PLAYLIST;case 6:case"MUSIC_SEE_ALL":return i.MUSIC_SEE_ALL;default:return i.UNRECOGNIZED}}function s(e){switch(e){case i.UNKNOWN:return"UNKNOWN";case i.PODCAST_SCROLL_NPV:return"PODCAST_SCROLL_NPV";case i.SHOW_PAGE:return"SHOW_PAGE";case i.EPISODE_PAGE:return"EPISODE_PAGE";case i.PODCAST_SEE_ALL:return"PODCAST_SEE_ALL";case i.MUSIC_NPV:return"MUSIC_NPV";case i.PLAYLIST:return"PLAYLIST";case i.MUSIC_SEE_ALL:return"MUSIC_SEE_ALL";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}},67593:(e,t,n)=>{"use strict";n.d(t,{V:()=>r,c:()=>i});let i=function(e){return e.ADVERTISER_SUBTITLE="advertiser_subtitle",e.ADVERTISER_TITLE="advertiser_title",e.CTA_BUTTON="cta_button",e.COMPANION_CARD="companion_card",e.VIDEO_PLAYER="video_player",e.COVER_ART="cover_art",e.AD_LOGO="ad_logo",e.COVER_ART_EXPANDED="cover_art_expanded",e.COVER_ART_COLLAPSED="cover_art_collapsed",e.MINIMIZED_VIDEO_TAKEOVER="minimized_video_takeover",e}({}),r=function(e){return e.AD_NPV="ad_npv",e.NPB="npb",e.VIDEO_PLAYER="video_player",e}({})},36689:(e,t,n)=>{"use strict";n.d(t,{Lv:()=>o,Wh:()=>a,ee:()=>r,ei:()=>l});var i=n(8036);let r=function(e){return e.CLICKED="clicked",e.COLLAPSED="collapsed",e.EXPANDED="expanded",e.VIEWED="viewed",e}({}),s=function(e){return e.FOREGROUNDED="foregrounded",e.BACKGROUNDED="backgrounded",e}({}),a=function(e){return e.CTA_BUTTON="cta_button",e.MINIMIZE_BUTTON="minimize_button",e.VIDEO_TAKEOVER="video_takeover",e}({}),o=function(e){return e.VIDEO_PLAYER="video_player",e}({});class l{enabled=!1;active=!1;subscriptions=[];fireImpressionOnStart=!1;constructor(e,t,n,i){this.focusState=e,this.videoTakeoverApi=t,this.inStreamApi=n,this.isNewAdsNpvEnabled=i}async enable(e){return this.enabled||(this.enabled=!0,this.listener=e,this.focusState.addFocusListener(this),this.isNewAdsNpvEnabled&&this.inStreamApi.enable(),this.subscriptions.push(this.videoTakeoverApi.subscribeToSlotType("stream",this.onAdMessage)),this.isNewAdsNpvEnabled&&this.subscriptions.push(this.inStreamApi.subscribeToInStreamAds())),null}async disable(){this.enabled&&(this.resetState(),this.enabled=!1,this.listener=void 0,this.resetSubscriptions(),this.focusState.removeAllFocusListeners(),this.isNewAdsNpvEnabled&&this.inStreamApi.disable())}logEvent(e,t,n){if(this.playbackState){const{eventData:i,extraData:r}=this.createEventData(this.playbackState);this.log(e,i,r,t,n)}}onRender(){this.logEvent(this.focusState.hasFocus()?s.FOREGROUNDED:s.BACKGROUNDED)}onFocusChanged(e){return e?this.handleApplicationGainedFocus():this.handleApplicationLostFocus()}parseInfo=e=>({id:e.id,advertiser:e.advertiser,buttonMessage:e.metadata.buttonMessage||null,clickUrl:e.click_url,companionAd:this.getPreferredCompanionAd(e)||null,skippableAdDelaySeconds:parseInt(e.metadata?.skippable_ad_delay,10)||0});isPreferred=e=>300===e.width&&250===e.height&&/^image\/(jpeg|png)$/.test(e.mime_type);getPreferredCompanionAd(e){const t=e.companion_ads||[];return t.filter(this.isPreferred).reduce(((e,t)=>t),t[t.length-1])}onAdMessage=e=>{if("video"===e.format&&this.listener)switch(e.event){case"available":break;case"play":{const t=e&&e.ad&&e.ad.metadata;this.fireImpressionOnStart=t&&"true"===t.fireImpressionOnStart,this.listener.onInfo(this.parseInfo(e.ad));break}default:throw new Error(`[VTO] Unsupported event type: ${e.event}`)}};createEventData(e){return{eventData:{volume:e.volume.toString(),duration:e.duration.toString()},extraData:{playback_position:Math.floor(1e3*e.position)}}}resetState(){this.playbackState=null}resetSubscriptions(){for(const e of this.subscriptions)e.cancel();this.subscriptions=[]}async handleApplicationGainedFocus(){this.active&&this.logEvent(s.FOREGROUNDED),await Promise.all([this.videoTakeoverApi.patchTargeting("focus","true"),this.videoTakeoverApi.patchTargeting("adbreak","video,adscore")])}async handleApplicationLostFocus(){this.active&&this.logEvent(s.BACKGROUNDED),await Promise.all([this.videoTakeoverApi.patchTargeting("focus","false"),this.videoTakeoverApi.patchTargeting("adbreak","adscore")])}log(e,t={},n={},i,r){this.playbackState&&this.videoTakeoverApi.postEvent(this.playbackState.adId,e,{event_data:{clientReportedUserAgent:navigator.userAgent,...t},...n,...i&&{reason:i},...r&&{source:r}})}onCreated(e){this.active=!0,this.playbackState=e,this.listener&&this.listener.onCreated()}onEnded(e,t){this.active=!1,this.playbackState=e,i.mT.PLAYED_TO_END!==t||this.fireImpressionOnStart||this.logEvent(r.VIEWED),this.listener&&this.listener.onEnded(),this.playbackState=null}onStarted(e){this.playbackState=e,this.fireImpressionOnStart&&this.logEvent(r.VIEWED),this.listener&&this.listener.onStarted()}onStateUpdate(e){this.playbackState=e}onReady(){this.listener&&this.listener.onFirstReady()}getEnabled(){return this.enabled}}},70011:(e,t,n)=>{"use strict";n.d(t,{CJ:()=>r,D$:()=>a,F$:()=>s,NI:()=>o,vA:()=>l});var i=n(96748);let r=function(e){return e.DISLIKE_AD="DISLIKE_AD",e.CANCEL_DISLIKE_AD="CANCEL_DISLIKE_AD",e.LIKE_AD="LIKE_AD",e.CANCEL_LIKE_AD="CANCEL_LIKE_AD",e}({});const s=(0,i.VP)(r.LIKE_AD),a=(0,i.VP)(r.CANCEL_LIKE_AD),o=(0,i.VP)(r.DISLIKE_AD),l=(0,i.VP)(r.CANCEL_DISLIKE_AD)},44054:(e,t,n)=>{"use strict";n.d(t,{N2:()=>a,Tt:()=>s});var i=n(42551);const r=e=>e.ads.adFeedback,s=(0,i.Mz)([e=>r(e),(e,t)=>t],((e,t)=>!(!t||e.adId!==t)&&e.liked)),a=(0,i.Mz)([e=>r(e),(e,t)=>t],((e,t)=>!(!t||e.adId!==t)&&e.disliked));(0,i.Mz)([e=>r(e),(e,t)=>t],((e,t)=>t&&e.adId===t?e.feedback:null))},74484:(e,t,n)=>{"use strict";n.d(t,{CW:()=>a,Nb:()=>s,On:()=>l,QN:()=>i,gt:()=>c,q5:()=>u,s3:()=>r,yx:()=>o});const i={ADS_ENABLED:"ADS_ENABLED",ADS_DISABLED:"ADS_DISABLED",ADS_PREMIUM:"ADS_PREMIUM",ADS_HPTO_HIDDEN:"ADS_HPTO_HIDDEN",ADS_POST_HIDE_HPTO:"ADS_POST_HIDE_HPTO",TRIGGER_PREVIEW_AD:"TRIGGER_PREVIEW_AD",LOG_NOW_PLAYING_AD_CLICK:"LOG_NOW_PLAYING_AD_CLICK"},r=()=>({type:i.ADS_ENABLED}),s=()=>({type:i.ADS_DISABLED}),a=e=>({type:i.ADS_PREMIUM,isPremium:e}),o=e=>({type:i.ADS_HPTO_HIDDEN,isHptoHidden:e}),l=()=>({type:i.ADS_POST_HIDE_HPTO}),c=e=>({type:i.TRIGGER_PREVIEW_AD,adUriHexId:e}),u=(e,t)=>({type:i.LOG_NOW_PLAYING_AD_CLICK,eventReason:e,eventSource:t})},63492:(e,t,n)=>{"use strict";n.d(t,{M:()=>r,e:()=>s});var i=n(70190);const r=i.M,s=i.e},49386:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});const i=(e,t,n)=>({artists:[{uri:t,name:n}],images:e.coverArt?.sources||[],name:e.name,uri:e.uri,year:e.date?.year,type:e.type,sharingInfo:e.sharingInfo})},82963:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var i=n(79474),r=n(93423);const s=(e,t)=>{const n=(0,i.useRef)(null),{registerCloseCallback:s,closeToDepth:a,isOnPathToSubmenu:o}=(0,i.useContext)(r.P),l=(0,i.useRef)(!1),c=(0,i.useCallback)((()=>{n.current&&(window.clearTimeout(n.current),n.current=null)}),[]);(0,i.useEffect)((()=>c),[c]);const u=(0,i.useCallback)(((e,n)=>{a(e),c(),t&&(s((e=>{l.current=!1,t(e)}),n),l.current=!0,t(!0))}),[a,c,s,t]),d=(0,i.useCallback)((t=>{if(!e.current)return;const i=e.current.closest('[role="menu"]');if(i){const e={x:t.clientX,y:t.clientY},r=o(e,l.current),s=parseInt(i.getAttribute("data-depth")||"0",10);!r||l.current?u(s,e):"mouseenter"===t.type&&(n.current=window.setTimeout((()=>{u(s,e)}),500))}}),[e,o,u]),m=(0,i.useCallback)((()=>{if(!e.current)return;const t=e.current.closest('[role="menu"]');if(t){const e=parseInt(t.getAttribute("data-depth")||"0",10);u(e,{x:0,y:0})}}),[u,e]);return{handleMouseEnter:d,handleMouseMove:d,handleMouseLeave:c,handleFocus:m}}},30668:(e,t,n)=>{"use strict";function i(e){return"function"==typeof e}n.d(t,{d:()=>i})},57503:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var i=n(1884),r=n(69640);const s=(e,t,n=!1,a=[],o=[],l=[])=>{for(const c of t)if((0,r.sA)(c)||(0,r.Af)(c)){const t=(0,i.u)(e,c.name),u=null!==t?[...o,t]:o;(0,r.sA)(c)&&s(e,c.items,n,a,u,[...l,c.name]),((0,r.Af)(c)||n&&(0,r.sA)(c))&&u?.length>0&&a.push({...c,displayTitle:c.name,displaySubtitle:l.length>0?l.join(" • "):null,matchScore:u.reduce(((e,t)=>e+t.reduce(((e,t)=>e+t.range.length),0)),0)})}return a.sort(((e,t)=>t.matchScore-e.matchScore))}},6127:(e,t,n)=>{"use strict";function i(e){return"displayTitle"in e}n.d(t,{A:()=>i})},48610:(e,t,n)=>{"use strict";function i(e){const t=new Date;return(e instanceof Date?e:new Date(e)).getTime()-t.getTime()}n.d(t,{u:()=>i})},20044:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d,O9:()=>l,_4:()=>o,fl:()=>a,j3:()=>u});var i=n(83856),r=n(9440),s=n(60351);const a={TRACKS:"text/x-spotify-tracks",ALBUMS:"text/x-spotify-albums",ARTISTS:"text/x-spotify-artists",PLAYLISTS:"text/x-spotify-playlists",PLAYLISTS_V2:"text/x-spotify-playlists",FOLDERS:"text/x-spotify-folders",USERS:"text/x-spotify-users",SHOWS:"text/x-spotify-shows",AUDIOBOOKS:"text/x-spotify-audiobooks",EPISODES:"text/x-spotify-episodes",CHAPTERS:"text/x-spotify-chapters",LOCAL_TRACKS:"text/x-spotify-local-tracks",LOCAL_ALBUMS:"text/x-spotify-local-albums",LOCAL_ARTISTS:"text/x-spotify-local-artists",COLLECTION_ALBUMS:"text/x-spotify-collection-albums",COLLECTION_ARTISTS:"text/x-spotify-collection-artists",PSEUDO_PLAYLISTS:"text/x-spotify-pseudo-playlists",UIDS:"text/x-spotify-uids"},o=(0,s.g)(a),l={[i.NQ.TRACK]:a.TRACKS,[i.NQ.ALBUM]:a.ALBUMS,[i.NQ.ARTIST]:a.ARTISTS,[i.NQ.PLAYLIST]:a.PLAYLISTS,[i.NQ.PLAYLIST_V2]:a.PLAYLISTS_V2,[i.NQ.FOLDER]:a.FOLDERS,[i.NQ.PROFILE]:a.USERS,[i.NQ.SHOW]:a.SHOWS,[i.NQ.EPISODE]:a.EPISODES,[i.NQ.LOCAL]:a.LOCAL_TRACKS,[i.NQ.LOCAL_ALBUM]:a.LOCAL_ALBUMS,[i.NQ.LOCAL_ARTIST]:a.LOCAL_ARTISTS,[i.NQ.COLLECTION_ALBUM]:a.COLLECTION_ALBUMS,[i.NQ.COLLECTION_ARTIST]:a.COLLECTION_ARTISTS,[i.NQ.COLLECTION]:a.PSEUDO_PLAYLISTS},c={[r.c.TRACK]:a.TRACKS,[r.c.ALBUM]:a.ALBUMS,[r.c.ARTIST]:a.ARTISTS,[r.c.PLAYLIST]:a.PLAYLISTS,[r.c.PLAYLISTV2]:a.PLAYLISTS_V2,[r.c.FOLDER]:a.FOLDERS,[r.c.USER]:a.USERS,[r.c.SHOW]:a.SHOWS,[r.c.AUDIOBOOK]:a.AUDIOBOOKS,[r.c.EPISODE]:a.EPISODES,[r.c.LOCAL_FILES]:a.LOCAL_TRACKS,[r.c.LIKED_SONGS]:a.PSEUDO_PLAYLISTS,[r.c.YOUR_EPISODES]:a.PSEUDO_PLAYLISTS,[r.c.CHAPTER]:a.CHAPTERS},u=e=>e&&(e=>e in c)(e)?c[e]:void 0,d=l},59904:(e,t,n)=>{"use strict";n.d(t,{Nz:()=>o,Vp:()=>s,Vv:()=>l,wD:()=>c,xz:()=>a});var i=n(20044),r=n(60351);const s=[i.fl.TRACKS,i.fl.LOCAL_TRACKS,i.fl.ALBUMS,i.fl.ARTISTS,i.fl.PLAYLISTS,i.fl.PLAYLISTS_V2,i.fl.FOLDERS,i.fl.EPISODES,i.fl.CHAPTERS,i.fl.SHOWS,i.fl.AUDIOBOOKS,i.fl.PSEUDO_PLAYLISTS],a={[i.fl.TRACKS]:"tracks",[i.fl.ALBUMS]:"albums",[i.fl.ARTISTS]:"artists",[i.fl.PLAYLISTS]:"playlists",[i.fl.FOLDERS]:"folders",[i.fl.SHOWS]:"shows",[i.fl.EPISODES]:"episodes",[i.fl.CHAPTERS]:"chapters",[i.fl.LOCAL_TRACKS]:"local-tracks",[i.fl.AUDIOBOOKS]:"audiobooks",[i.fl.PSEUDO_PLAYLISTS]:"pseudo-playlists"};let o=function(e){return e.ON="on",e.BEFORE="before",e.AFTER="after",e}({});const l=(0,r.g)(o);function c(e){return s.includes(e)}},96537:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(79474),r=n(86892),s=n(20044),a=n(28580),o=n(7079),l=n(59904);function c(e,t,n,i){if(e.defaultPrevented)return null;const r=t.includes(l.Nz.BEFORE),s=t.includes(l.Nz.AFTER);let a=l.Nz.ON;if(e.currentTarget instanceof HTMLElement&&(r||s)){const{top:s,height:o,left:c,width:u,right:d}=e.currentTarget.getBoundingClientRect(),m=t.includes(l.Nz.ON);if("horizontal"===n)if(m&&r){(i?e.clientX>Math.round(d)-u/4:e.clientX<Math.round(c)+u/4)&&(a=l.Nz.BEFORE)}else{a=(i?e.clientX>Math.round(d)-u/2:e.clientX<Math.round(c)+u/2)?l.Nz.BEFORE:l.Nz.AFTER}else"vertical"===n&&(m&&r?e.clientY<Math.round(s)+o/4&&(a=l.Nz.BEFORE):a=e.clientY<Math.round(s)+o/2?l.Nz.BEFORE:l.Nz.AFTER)}return t.includes(a)?a:null}var u=n(83856);function d(e,t){return Array.from(e.dataTransfer?.types??[]).filter(s._4).filter((e=>!!(0,l.wD)(e)&&t.includes(e))).filter(l.wD)}var m=n(87240);function p(e,t,n){const i=d(e,t);if(!i.length)return function(e,t){return e.split(/[\s,;]+/g).map((e=>(0,u.o_)(e?.trim()))).filter(m.P).reduce(((e,n)=>{const i=s.Ay[n.type];return(0,l.wD)(i)&&t.includes(i)?(e[i]||=[],e[i].push(n.toURI()),e):e}),{})}(e.dataTransfer?.getData("text/plain"),t);const r=Object.fromEntries(i.map((t=>[t,e.dataTransfer?.getData(t)?.split("\n").filter(Boolean)??[]])));if(n){const{[s.fl.PLAYLISTS]:e,...t}=r,n=Array.from(new Set([...r[s.fl.PLAYLISTS_V2]??[],...(r[s.fl.PLAYLISTS]??[]).map(h)]));return{...t,...n.length?{[s.fl.PLAYLISTS_V2]:n}:null}}return r}function h(e){const t=(0,u.o_)(e);return t?.type===u.NQ.PLAYLIST?(0,u.Ps)(t.id).toURI():e}const g={droppableMimeTypes:"albums artists episodes chapters folders playlists shows tracks local-tracks audiobooks pseudo-playlists",useDropTarget:"main-useDropTarget-base","useDropTarget--albums":"main-useDropTarget-album","useDropTarget--artists":"main-useDropTarget-artist","useDropTarget--episodes":"main-useDropTarget-episode","useDropTarget--chapters":"OxrHhBsQAggwnv6RmqRy","useDropTarget--folders":"main-useDropTarget-folder","useDropTarget--playlists":"main-useDropTarget-playlist","useDropTarget--shows":"main-useDropTarget-show","useDropTarget--tracks":"main-useDropTarget-track","useDropTarget--local-tracks":"main-useDropTarget-local","useDropTarget--audiobooks":"main-useDropTarget-audiobook","useDropTarget--pseudo-playlists":"main-useDropTarget-pseudoPlaylist"};function f({uri:e,id:t=e,allowedMimeTypesByDropPosition:n,onDrop:u,onLongDragOver:m,longDragOverTimeout:h=1e3,reorderDirection:f="vertical"}){const v=(0,r.lB)((()=>n),[n]),y=(0,o.W)(),_=(0,a.wK)(),E=!!t&&1===_.length&&_[0]===t,x=Object.values(v).every((e=>e.includes(s.fl.PLAYLISTS_V2)&&!e.includes(s.fl.PLAYLISTS))),[C,S]=(0,i.useState)(null),A=(0,i.useCallback)((e=>E?[]:Object.entries(v).filter((([t,n])=>d(e,n).length>0)).map((([e])=>e)).filter(l.Vv)),[E,v]),w=(0,i.useRef)(!0),I=(0,i.useRef)(null),T=(0,i.useRef)(u);T.current=u;const N=(0,i.useRef)(m);N.current=m;const R=(0,i.useCallback)((()=>{w.current=!0,S(null),I.current&&(window.clearTimeout(I.current),I.current=null)}),[]);(0,i.useEffect)((()=>R),[R]);const k=(0,i.useCallback)((e=>{const t=A(e);t.length&&(S(c(e,t,f,y)),e.dataTransfer&&!e.defaultPrevented&&(e.dataTransfer.dropEffect=t.includes(l.Nz.ON)?"copy":"move"),e.preventDefault())}),[A,y,f]),O=(0,i.useCallback)((e=>{if(A(e).length&&!e.defaultPrevented){if(w.current){w.current=!1;const t=e.currentTarget,n=()=>{document.contains(t)||(R(),document.removeEventListener("dragenter",n))};document.addEventListener("dragenter",n),document.addEventListener("dragend",(()=>{document.removeEventListener("dragenter",n),R()}),{once:!0}),N.current&&(I.current=window.setTimeout((()=>{N.current?.()}),h))}e.preventDefault()}}),[A,h,R]),P=(0,i.useCallback)((e=>{A(e).length&&(function(e){return null===e.relatedTarget&&b?!document.elementsFromPoint(e.clientX,e.clientY).includes(e.currentTarget):!e.currentTarget.contains(e.relatedTarget instanceof Node?e.relatedTarget:null)}(e)&&R(),e.preventDefault())}),[A,R]),j=(0,i.useCallback)((e=>{const t=c(e,A(e),f,y);if(!e.defaultPrevented&&t){const n=p(e,v[t]??[],x),i=function(e){return{sectionId:parseInt(e.dataTransfer.getData("text/x-spotify-section"),10)||0,contextUri:e.dataTransfer.getData("text/x-spotify-context"),itemIds:e.dataTransfer.getData(s.fl.UIDS)?.split("\n").filter(Boolean)??[]}}(e);Object.keys(n).length&&T.current&&(T.current(n,t,i),e.preventDefault())}R()}),[A,f,y,R,v,x]),L=(0,i.useMemo)((()=>`${g.useDropTarget} ${Array.from(new Set(Object.values(v).flat()))?.map((e=>g[`useDropTarget--${l.xz[e]}`]??"")).join(" ")}`),[v]);return(0,i.useMemo)((()=>({dropPosition:C,className:L,onDragEnter:O,onDragLeave:P,onDragOver:k,onDrop:j})),[L,C,O,P,k,j])}const b=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},31151:(e,t,n)=>{"use strict";function i(e){return new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>{t(i.result?.toString()??"")},i.onerror=e=>n(e)}))}function r(e){return new Promise(((t,n)=>{const i=new Image;i.onload=()=>{const{width:e,height:n}=i;t([e,n])},i.src=e,i.onerror=e=>n(e)}))}n.d(t,{j:()=>i,v:()=>r})},78444:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(79474);function r(){const[e,t]=(0,i.useState)(!1);return[e,(0,i.useCallback)((()=>{t(!0),setTimeout((()=>t(!1)),0)}),[t])]}},17809:(e,t,n)=>{"use strict";n.d(t,{c:()=>m,e:()=>d});var i=n(83648),r=n(22215),s=n(41791),a=n(19498),o=n(88783),l=n(85852);const c=()=>(0,o.oC)(l.P.EpisodeList,(0,i.zy)()),u=()=>(0,o.oC)(l.P.EpisodeShelf,(0,i.zy)()),d=()=>{const e=c(),t=(()=>{const e=(0,s.c)(),t=(0,r.NC)(a.Ic0);return!!e&&t===a.aY8.List})();return!u()&&(e||t)},m=()=>{const e=u(),t=(()=>{const e=(0,s.c)(),t=(0,r.NC)(a.Ic0);return!!e&&t===a.aY8.Shelf})();return!c()&&(e||t)}},35445:(e,t,n)=>{"use strict";n.d(t,{D:()=>h});var i=n(99754),r=n(52415),s=n(64062),a=n(10454),o=n(99028),l=n(63192),c=n(80559),u=n(94710),d=n(7125),m=n(33560),p=n(31350);const h=({entityType:e,componentType:t,uri:n})=>{const h=(0,d.V)(),g=(0,u.vh)(),f=(0,i.d4)(p.F6),b=(0,i.d4)(m.JJ);return()=>{(0,c.fE)({metric_type:a.MetricTypes.COUNTER,what:"dwp-ilr-component-error",value:1,tags:{entityType:e,componentType:t}});const i={category:`${e}_${t}_ilr_render_error`,label:"dwp",os:(0,o.f)(),context:n,country:f?b:"",sp_t:(0,l.v8)("sp_t")};h?g.send((0,s.r)(i)):g.send((0,r._)(i))}}},52134:(e,t,n)=>{"use strict";n.d(t,{_:()=>c});var i=n(99754),r=n(83648),s=n(57704),a=n(88783),o=n(85852),l=n(33112);const c=()=>{const{showId:e}=(0,r.g)(),t=(0,r.zy)(),n=t.pathname.includes("more-like-this")?t.pathname.split("/")[2]:"",c=(0,a.oC)(o.P.PodcastDiscovery,t),u=(0,i.d4)(s.b),d=(({treatment:e,entityId:t,experimentId:n,treatmentVariation:i})=>{if(e&&e[t]){const r=e[t].find((e=>e.experimentId===n));return r?.treatment===i}return!1})({treatment:u||{},entityId:e||n||"",experimentId:l.R.PODCAST_DISCOVERY,treatmentVariation:l.d.VARIANT});return c||d}},45876:(e,t,n)=>{"use strict";n.d(t,{c:()=>i.c,e:()=>i.e});var i=n(17809)},57449:(e,t,n)=>{"use strict";n.d(t,{dr:()=>b,gO:()=>f});var i=n(22215),r=n(14056),s=n(77582),a=n(33237),o=n(99028),l=n(19498);const c="macOS"===(0,o.f)(),u=(0,a.My)()===s.m.Desktop;let d=function(e){return e.OPEN_HELP="OPEN_HELP",e.RAISE_VOLUME="RAISE_VOLUME",e.LOWER_VOLUME="LOWER_VOLUME",e.SKIP_PREVIOUS="SKIP_PREVIOUS",e.SKIP_NEXT="SKIP_NEXT",e.TOGGLE_PLAY="TOGGLE_PLAY",e.SHUFFLE="SHUFFLE",e.REPEAT="REPEAT",e.SEEK_BACKWARD="SEEK_BACKWARD",e.SEEK_FORWARD="SEEK_FORWARD",e.GO_TO_NOW_PLAYING="GO_TO_NOW_PLAYING",e.GO_TO_HOME="GO_TO_HOME",e.GO_TO_LIBRARY="GO_TO_LIBRARY",e.GO_TO_PLAYLISTS="GO_TO_PLAYLISTS",e.GO_TO_ARTISTS="GO_TO_ARTISTS",e.GO_TO_ALBUMS="GO_TO_ALBUMS",e.GO_TO_PODCASTS="GO_TO_PODCASTS",e.GO_TO_AUDIOBOOKS="GO_TO_AUDIOBOOKS",e.GO_TO_LIKED_SONGS="GO_TO_LIKED_SONGS",e.GO_TO_MADE_FOR_YOU="GO_TO_MADE_FOR_YOU",e.GO_TO_CHARTS="GO_TO_CHARTS",e.GO_TO_SEARCH="GO_TO_SEARCH",e.GO_TO_PREFERENCES="GO_TO_PREFERENCES",e.CREATE_NEW_PLAYLIST="CREATE_NEW_PLAYLIST",e.CREATE_NEW_FOLDER="CREATE_NEW_FOLDER",e.SELECT_ALL="SELECT_ALL",e.FILTER="FILTER",e.GO_FORWARDS="GO_FORWARDS",e.GO_BACKWARDS="GO_BACKWARDS",e.LIKE_DISLIKE_SONG="LIKE_DISLIKE_SONG",e.GO_TO_NEW_RELEASES="GO_TO_NEW_RELEASES",e.GO_TO_QUEUE="GO_TO_QUEUE",e.LOG_OUT="LOG_OUT",e.OPEN_CONTEXT_MENU="OPEN_CONTEXT_MENU",e.TOGGLE_YLX_SIDEBAR="TOGGLE_YLX_SIDEBAR",e.TOGGLE_NPV_SIDEBAR="TOGGLE_NPV_SIDEBAR",e.YLX_SIDEBAR_DECREASE_WIDTH="YLX_SIDEBAR_DECREASE_WIDTH",e.YLX_SIDEBAR_INCREASE_WIDTH="YLX_SIDEBAR_INCREASE_WIDTH",e.NPV_SIDEBAR_DECREASE_WIDTH="NPV_SIDEBAR_DECREASE_WIDTH",e.NPV_SIDEBAR_INCREASE_WIDTH="NPV_SIDEBAR_INCREASE_WIDTH",e.OPEN_SEARCH_MODAL="OPEN_SEARCH_MODAL",e.TOGGLE_DEBUG_WINDOW="TOGGLE_DEBUG_WINDOW",e.FOCUS_YLX_TEXT_FILTER="FOCUS_YLX_TEXT_FILTER",e.WF_GO_TO_PREVIOUS="WF_GO_TO_PREVIOUS",e.WF_GO_TO_NEXT="WF_GO_TO_NEXT",e.WF_ADD_TO_LIBRRY="WF_ADD_TO_LIBRRY",e.WF_ADD_TO_QUEUE="WF_ADD_TO_QUEUE",e.WF_MUTE_UNMUTE="WF_MUTE_UNMUTE",e}({});const m=c?["mod+left"]:["alt+left"],p=c?["mod+right"]:["alt+right"],h=c?"alt+left":"mod+left",g=c?"alt+right":"mod+right",f={[d.OPEN_SEARCH_MODAL]:["mod+k"],[d.OPEN_HELP]:["mod+/","?"],[d.CREATE_NEW_PLAYLIST]:[u?"mod+n":"alt+shift+p"],[d.LIKE_DISLIKE_SONG]:["alt+shift+b"],[d.LOG_OUT]:["alt+shift+f6"],[d.CREATE_NEW_FOLDER]:[u?"mod+shift+n":"mod+alt+shift+p"],[d.SELECT_ALL]:["mod+a"],[d.FILTER]:["mod+f"],[d.TOGGLE_PLAY]:["space"],[d.SEEK_BACKWARD]:[c?"mod+shift+left":"shift+left"],[d.SEEK_FORWARD]:[c?"mod+shift+right":"shift+right"],[d.SHUFFLE]:[u?"mod+s":"alt+s"],[d.REPEAT]:[u?"mod+r":"alt+r"],[d.RAISE_VOLUME]:[u?"mod+up":"alt+up"],[d.LOWER_VOLUME]:[u?"mod+down":"alt+down"],[d.SKIP_PREVIOUS]:[u?"mod+left":h],[d.SKIP_NEXT]:[u?"mod+right":g],[d.GO_TO_LIBRARY]:["alt+shift+0"],[d.GO_TO_PLAYLISTS]:["alt+shift+1"],[d.GO_TO_PODCASTS]:["alt+shift+2"],[d.GO_TO_ARTISTS]:["alt+shift+3"],[d.GO_TO_ALBUMS]:["alt+shift+4"],[d.GO_TO_AUDIOBOOKS]:["alt+shift+5"],[d.GO_TO_HOME]:["alt+shift+h"],[d.GO_TO_PREFERENCES]:["mod+,"],[d.GO_BACKWARDS]:u?["mod+alt+left","alt+left"]:m,[d.GO_FORWARDS]:u?["mod+alt+right","alt+right"]:p,[d.GO_TO_SEARCH]:[u?"mod+l":"mod+shift+l"],[d.GO_TO_NOW_PLAYING]:["alt+shift+j"],[d.GO_TO_LIKED_SONGS]:["alt+shift+s"],[d.GO_TO_MADE_FOR_YOU]:["alt+shift+m"],[d.GO_TO_NEW_RELEASES]:["alt+shift+n"],[d.GO_TO_CHARTS]:["alt+shift+c"],[d.GO_TO_QUEUE]:["alt+shift+q"],[d.OPEN_CONTEXT_MENU]:["alt+j"],[d.TOGGLE_NPV_SIDEBAR]:["alt+shift+r"],[d.TOGGLE_YLX_SIDEBAR]:["alt+shift+l"],[d.YLX_SIDEBAR_DECREASE_WIDTH]:["alt+shift+left"],[d.YLX_SIDEBAR_INCREASE_WIDTH]:["alt+shift+right"],[d.NPV_SIDEBAR_DECREASE_WIDTH]:["alt+shift+down"],[d.NPV_SIDEBAR_INCREASE_WIDTH]:["alt+shift+up"],[d.TOGGLE_DEBUG_WINDOW]:["alt+command+x"],[d.FOCUS_YLX_TEXT_FILTER]:u?["mod+alt+f"]:["shift+mod+alt+f"],[d.WF_GO_TO_PREVIOUS]:["up"],[d.WF_GO_TO_NEXT]:["down"],[d.WF_ADD_TO_LIBRRY]:["left"],[d.WF_ADD_TO_QUEUE]:["right"],[d.WF_MUTE_UNMUTE]:["m"]};function b(){const e=(0,i.NC)(l.DHV,{loadingValue:!1});return{basic:[{action:d.CREATE_NEW_PLAYLIST,get description(){return r.Ru.get("playlist.new-header")},enabled:!0},{action:d.CREATE_NEW_FOLDER,get description(){return r.Ru.get("keyboard.shortcuts.description.createNewFolder")},enabled:!0},{action:d.OPEN_CONTEXT_MENU,get description(){return r.Ru.get("keyboard.shortcuts.description.openContextMenu")},enabled:!0},{action:d.OPEN_SEARCH_MODAL,get description(){return r.Ru.get("keyboard.shortcuts.description.openSearchModal")},enabled:!0},{action:d.SELECT_ALL,get description(){return r.Ru.get("keyboard.shortcuts.description.selectAll")},enabled:u},{action:d.FILTER,get description(){return r.Ru.get("filter")},enabled:u},{action:d.FOCUS_YLX_TEXT_FILTER,get description(){return r.Ru.get("web-player.your-library-x.text-filter.generic-placeholder")},enabled:!0},{action:d.LOG_OUT,get description(){return r.Ru.get("user.log-out")},enabled:!0}],playback:[{action:d.TOGGLE_PLAY,get description(){return r.Ru.get("keyboard.shortcuts.description.togglePlay")},enabled:!0},{action:d.LIKE_DISLIKE_SONG,get description(){return r.Ru.get("keyboard.shortcuts.description.likeDislikeSong")},enabled:!0},{action:d.SHUFFLE,get description(){return r.Ru.get("keyboard.shortcuts.description.shuffle")},enabled:!0},{action:d.REPEAT,get description(){return r.Ru.get("keyboard.shortcuts.description.repeat")},enabled:!0},{action:d.SKIP_PREVIOUS,get description(){return r.Ru.get("keyboard.shortcuts.description.skipPrev")},enabled:!0},{action:d.SKIP_NEXT,get description(){return r.Ru.get("keyboard.shortcuts.description.skipNext")},enabled:!0},{action:d.SEEK_BACKWARD,get description(){return r.Ru.get("keyboard.shortcuts.description.seekBackward")},enabled:!0},{action:d.SEEK_FORWARD,get description(){return r.Ru.get("keyboard.shortcuts.description.seekForward")},enabled:!0},{action:d.RAISE_VOLUME,get description(){return r.Ru.get("keyboard.shortcuts.description.raiseVolume")},enabled:!0},{action:d.LOWER_VOLUME,get description(){return r.Ru.get("keyboard.shortcuts.description.lowerVolume")},enabled:!0}],navigation:[{action:d.GO_TO_HOME,get description(){return r.Ru.get("keyboard.shortcuts.description.home")},enabled:!0},{action:d.GO_BACKWARDS,get description(){return r.Ru.get("keyboard.shortcuts.description.goBackwards")},enabled:!0},{action:d.GO_FORWARDS,get description(){return r.Ru.get("keyboard.shortcuts.description.goForwards")},enabled:!0},{action:d.GO_TO_PREFERENCES,get description(){return r.Ru.get("keyboard.shortcuts.description.goToPreferences")},enabled:u},{action:d.GO_TO_NOW_PLAYING,get description(){return r.Ru.get("keyboard.shortcuts.description.currentlyPlaying")},enabled:!0},{action:d.GO_TO_SEARCH,get description(){return r.Ru.get("keyboard.shortcuts.description.search")},enabled:!0},{action:d.GO_TO_LIKED_SONGS,get description(){return r.Ru.get("keyboard.shortcuts.description.likedSongs")},enabled:!0},{action:d.GO_TO_QUEUE,get description(){return r.Ru.get("playback-control.queue")},enabled:!0},{action:d.GO_TO_LIBRARY,get description(){return r.Ru.get("web-player.your-library-x.your-library")},enabled:!0},{action:d.GO_TO_PLAYLISTS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourPlaylists")},enabled:!0},{action:d.GO_TO_PODCASTS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourPodcasts")},enabled:!0},{action:d.GO_TO_ARTISTS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourArtists")},enabled:!0},{action:d.GO_TO_ALBUMS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourAlbums")},enabled:!0},{action:d.GO_TO_AUDIOBOOKS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourAudiobooks")},enabled:!0},{action:d.GO_TO_MADE_FOR_YOU,get description(){return r.Ru.get("keyboard.shortcuts.description.madeForYour")},enabled:!0},{action:d.GO_TO_NEW_RELEASES,get description(){return r.Ru.get("new_releases")},enabled:!0},{action:d.GO_TO_CHARTS,get description(){return r.Ru.get("keyboard.shortcuts.description.charts")},enabled:!0}],layout:[{action:d.TOGGLE_YLX_SIDEBAR,get description(){return r.Ru.get("keyboard.shortcuts.layout.toggleLeftSidebar")},enabled:!0},{action:d.YLX_SIDEBAR_DECREASE_WIDTH,get description(){return r.Ru.get("keyboard.shortcuts.layout.navigationBarDecreaseWidth")},enabled:!0},{action:d.YLX_SIDEBAR_INCREASE_WIDTH,get description(){return r.Ru.get("keyboard.shortcuts.layout.navigationBarIncreaseWidth")},enabled:!0},{action:d.TOGGLE_NPV_SIDEBAR,get description(){return r.Ru.get("keyboard.shortcuts.layout.toggleRightSidebar")},enabled:!0},{action:d.NPV_SIDEBAR_DECREASE_WIDTH,get description(){return r.Ru.get("keyboard.shortcuts.layout.rightSidebarDecreaseWidth")},enabled:!0},{action:d.NPV_SIDEBAR_INCREASE_WIDTH,get description(){return r.Ru.get("keyboard.shortcuts.layout.rightSidebarIncreaseWidth")},enabled:!0}],employee:[{action:d.TOGGLE_DEBUG_WINDOW,description:"Toggle Debug Window",enabled:e}]}}},1648:(e,t,n)=>{"use strict";n.d(t,{qV:()=>j,Nx:()=>P});var i=n(79474),r=n(73075),s=n.n(r),a=n(99754),o=n(83648),l=n(22215),c=n(83856),u=n(14056),d=n(10098),m=n(2281),p=n(55327),h=n(7079),g=n(4428),f=n(32264),b=n(33037),v=n(5679),y=n(87687),_=n(95799),E=n(58445),x=n(30232),C=n(50014),S=n(37693);const A=e=>(t,n=!1)=>{let i,r=!1;return(...s)=>{i=s,r||(n||e.apply(e,s),r=!0,window.setTimeout((()=>{r=!1,n&&e.apply(e,i)}),t))}};var w=n(57449),I=n(28244),T=n(46070),N=n(9901),R=n(19498),k=n(32593);const O=e=>(t,...n)=>{t.repeat||e(t,...n)};function P(e,t,n=!0){(0,i.useEffect)((()=>n?(s().bind(e,O((e=>{t(e)}))),()=>{s().unbind(e)}):()=>{}),[t,e,n])}const j=()=>{const e=(0,o.Zp)(),t=(0,a.wA)(),n=(0,a.Pj)(),r=(0,y.K)(),s=(0,v.a)(),{createPlaylist:O}=(0,g.A)(),{shuffle:j,setShuffle:L,setRepeat:D,repeat:U}=(0,_.V)(),{contextURI:M,playingURI:B,isPaused:F,canPause:H,canResume:V}=(0,x.o)((e=>({contextURI:e?.context.uri??null,playingURI:e?.item?.uri??"",isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),S.a),{seekBackward:z,seekForward:G}=(0,E.p)(),W=(0,d._Y)(),K=(0,a.d4)((e=>e.platform.isDesktop)),Y=(0,h.W)(),[q,Q]=(0,b.A)(B),{createFolder:$}=(0,C.Z)(),Z=(0,N.N)(),{toggleQueue:X,openQueue:J}=(0,p.R)(),ee=(0,l.NC)(R.eWj),{show:te,hide:ne,handle:ie}=(0,T.j)(),re=!!ie,se=(0,l.NC)(R.DHV,{loadingValue:!1}),ae=(0,i.useCallback)((()=>{Z({type:"OPEN"})}),[Z]),oe=(0,i.useCallback)((()=>{t(I.wi(!n.getState().ui.keyboardShortcutsHelpModal.isOpen))}),[t,n]),le=(0,i.useCallback)((e=>{F&&V?r.resume():!F&&H&&r.pause(),e.preventDefault&&e.preventDefault()}),[H,V,F,r]),ce=(0,i.useCallback)((()=>{t((0,k.wH)())}),[t]),ue=(0,i.useCallback)((()=>{const e=document.activeElement?.getBoundingClientRect();if(!e)return;const t=new MouseEvent("contextmenu",{bubbles:!0,clientX:e.x+e.width/2,clientY:e.y+e.height});document.activeElement?.dispatchEvent(t)}),[]),de=(0,i.useCallback)((()=>{e(-1)}),[e]),me=(0,i.useCallback)((()=>{e(1)}),[e]),pe=(0,i.useCallback)((()=>{e("/")}),[e]);P(w.gO.OPEN_SEARCH_MODAL,ae),P(w.gO.OPEN_HELP,oe),P(w.gO.TOGGLE_PLAY,le),P(w.gO.LOG_OUT,ce),P(w.gO.OPEN_CONTEXT_MENU,ue),P(w.gO.GO_BACKWARDS,de,K),P(w.gO.GO_FORWARDS,me,K),P(w.gO.GO_TO_HOME,pe);const he=(0,i.useCallback)((()=>{e("/collection/tracks")}),[e]),ge=(0,i.useCallback)((()=>{if(null!==M){const t=(0,c.o_)(M).toURLPath(!0);e(t)}}),[M,e]),fe=(0,i.useCallback)((()=>{e(f.W$)}),[e]),be=(0,i.useCallback)((()=>{e("/search",{state:{preventMoveFocus:!0}})}),[e]),ve=(0,i.useCallback)((()=>{e(f.yf)}),[e]),ye=(0,i.useCallback)((()=>{e(f.qF)}),[e]),_e=(0,i.useCallback)((()=>{ee?X():J()}),[ee,J,X]),Ee=(0,i.useCallback)((()=>{W(m.$S.NPV_BUTTON_CLICK)}),[W]),xe=(0,i.useCallback)((()=>{Q(!q)}),[Q,q]),Ce=(0,i.useCallback)((()=>{O()}),[O]),Se=(0,i.useCallback)((()=>{$(u.Ru.get("playlist.default_folder_name"),{before:"start"})}),[$]),Ae=(0,i.useCallback)((()=>{r.skipToNext()}),[r]),we=(0,i.useCallback)((()=>{r.skipToPrevious()}),[r]),Ie=(0,i.useCallback)((()=>{A((()=>s.raiseVolume()))(100)}),[s]),Te=(0,i.useCallback)((()=>{A((()=>s.lowerVolume()))(100)}),[s]),Ne=(0,i.useCallback)((()=>{A((()=>z()))(100)}),[z]),Re=(0,i.useCallback)((()=>{A((()=>G()))(100)}),[G]),ke=(0,i.useCallback)((()=>{L(!j)}),[j,L]),Oe=(0,i.useCallback)((()=>{D((U+1)%3)}),[U,D]),Pe=(0,i.useCallback)((()=>{re?ne():te()}),[ne,re,te]);P(w.gO.GO_TO_LIKED_SONGS,he),P(w.gO.GO_TO_NOW_PLAYING,ge),P(w.gO.GO_TO_CHARTS,fe),P(w.gO.GO_TO_SEARCH,be),P(w.gO.GO_TO_MADE_FOR_YOU,ve),P(w.gO.GO_TO_NEW_RELEASES,ye),P(w.gO.GO_TO_QUEUE,_e),P(Y?w.gO.TOGGLE_YLX_SIDEBAR:w.gO.TOGGLE_NPV_SIDEBAR,Ee),P(w.gO.LIKE_DISLIKE_SONG,xe),P(w.gO.CREATE_NEW_PLAYLIST,Ce,!K),P(w.gO.CREATE_NEW_FOLDER,Se,!K),P(w.gO.SKIP_NEXT,Ae,!K),P(w.gO.SKIP_PREVIOUS,we,!K),P(w.gO.RAISE_VOLUME,Ie,!K),P(w.gO.LOWER_VOLUME,Te,!K),P(w.gO.SEEK_BACKWARD,Ne,!K),P(w.gO.SEEK_FORWARD,Re,!K),P(w.gO.SHUFFLE,ke,!K),P(w.gO.REPEAT,Oe,!K),P(w.gO.TOGGLE_DEBUG_WINDOW,Pe,se)}},30957:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Link:()=>i,default:()=>r});const i=n(10072).N,r=i},21820:(e,t,n)=>{"use strict";n.d(t,{k:()=>p});var i=n(79474),r=n(99754),s=n(60096),a=n(14056),o=n(87687),l=n(60786),c=n(50783),u=n(36471),d=n(12275),m=n(13274);const p=(0,i.memo)((0,i.forwardRef)((function(e,t){const{onClick:n,to:p,referrer:h,navigationalRoot:g,...f}=e,b=(0,o.K)(),v=a.Ru.getLocaleForURLPath(),y=(0,r.d4)(d.MU),_=(0,r.d4)(d.NR),E=(0,l.CW)(p),x=(0,c.p)({urlLocale:v,entity:E,localeFeatureFlag:y,entityFeatureFlag:_,type:"link"})?(0,l.hF)(p):p,C=(0,u.W)(),S=(0,i.useCallback)((e=>{C({intent:"navigate",type:"click",targetUri:x}),n&&n(e)}),[C,n,x]);return(0,m.jsx)(s.k2,{ref:t,draggable:!1,end:e.end,to:x,state:{referrer:h||b.getReferrer(),navigationalRoot:g},"aria-label":e["aria-label"],tabIndex:e.tabIndex,onClick:S,...f,children:e.children})})))},18645:(e,t,n)=>{"use strict";n.d(t,{Bq:()=>N,Ey:()=>E,SL:()=>l,So:()=>I,T4:()=>S,Xt:()=>w,kj:()=>A,lU:()=>o,ly:()=>T,rP:()=>C,zq:()=>x});var i=n(14056),r=n(13411),s=n(7009),a=n(60149);let o=function(e){return e.TITLE="TITLE",e.ADDED_BY="ADDED_BY",e.ADDED_AT="ADDED_AT",e.ARTIST="ARTIST",e.ALBUM="ALBUM",e.SHOW="SHOW",e.DURATION="DURATION",e}({});const l={[o.TITLE]:["title"],[o.ADDED_BY]:["added_by"],[o.ADDED_AT]:["added_at"],[o.ARTIST]:["artist_name","album_title","album_track_number"],[o.ALBUM]:["album_title","album_track_number"],[o.SHOW]:["album_title","added_at"],[o.DURATION]:["duration"]},c={[r.$.TITLE_AND_ARTIST]:s.n.TITLE,[r.$.TITLE]:s.n.TITLE,[r.$.ADDED_BY]:s.n.ADDED_BY,[r.$.ADDED_AT]:s.n.ADDED_AT,[r.$.DURATION]:s.n.DURATION,[r.$.ARTIST]:s.n.ARTIST,[r.$.ALBUM]:s.n.ALBUM,[r.$.ALBUM_OR_PODCAST]:s.n.ALBUM,[r.$.ALBUM_OR_SHOW]:null,[r.$.ACTIONS]:null,[r.$.RELEASE_DATE]:null,[r.$.INDEX]:null,[r.$.PLAYS]:null,[r.$.ADD]:null,[r.$.EVENT_DATE]:null,[r.$.EVENT_INFO]:null,[r.$.CONCERT_DATE]:null,[r.$.CONCERT_VENUE]:null,[r.$.TITLE_AND_AUTHOR]:s.n.TITLE,[r.$.AUTHOR]:null},u=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.ADDED_AT,r.$.DURATION],d=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.ADDED_BY,r.$.ADDED_AT,r.$.DURATION],m=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM_OR_PODCAST,r.$.RELEASE_DATE,r.$.ADDED_AT,r.$.DURATION],p=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM_OR_PODCAST,r.$.ADDED_BY,r.$.RELEASE_DATE,r.$.ADDED_AT,r.$.DURATION],h=[r.$.INDEX,r.$.TITLE_AND_AUTHOR,r.$.ADDED_AT,r.$.DURATION],g=[r.$.INDEX,r.$.TITLE_AND_AUTHOR,r.$.ADDED_BY,r.$.ADDED_AT,r.$.DURATION],f=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.EVENT_DATE,r.$.DURATION],b=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.CONCERT_DATE,r.$.CONCERT_VENUE,r.$.DURATION],v=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.ADDED_BY,r.$.DURATION],y=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.DURATION],_={[r.H.NONE]:void 0,[r.H.DESC]:a.x.DESC,[r.H.ASC]:a.x.ASC,[r.H.SECONDARY_DESC]:a.x.DESC,[r.H.SECONDARY_ASC]:a.x.ASC},E=({isMixedMedia:e,hasEpisodes:t,hasSpotifyAudiobooks:n,hasDateAdded:i,isLive:s,isConcert:a,isBlend:o,nrCollaborators:l,isBooklist:c,isChart:_,isCompactMode:E=!1,showPlayCount:x=!1})=>{let C=[...u];const S=l>1;if(e){S&&C.splice(3,0,r.$.ADDED_BY);const e=C.indexOf(r.$.ALBUM);n?C.splice(e,1):C.splice(e,1,r.$.ALBUM_OR_PODCAST)}else _?(C=[...y],x&&C.splice(C.indexOf(r.$.TITLE_AND_ARTIST)+1,0,r.$.PLAYS)):t&&S?C=[...p]:t?C=[...m]:o?C=[...v]:c&&S?C=[...g]:c?C=[...h]:S?C=[...d]:s?C=[...f]:a&&(C=[...b]);if(i||C.splice(C.indexOf(r.$.ADDED_AT),1),E){const e=C.indexOf(r.$.TITLE_AND_ARTIST),t=C.indexOf(r.$.TITLE_AND_AUTHOR);-1!==e?C.splice(e,1,r.$.TITLE,r.$.ARTIST):-1!==t&&C.splice(t,1,r.$.TITLE,r.$.AUTHOR)}return C},x=e=>{const t=e.filter((e=>null!==c[e]));return t.unshift(r.$.INDEX),t},C=e=>[r.H.ASC,r.H.SECONDARY_ASC].includes(e),S=e=>[r.H.DESC,r.H.SECONDARY_DESC].includes(e),A=(e,t)=>{return e===r.$.TITLE_AND_ARTIST&&(!(t.column!==r.$.TITLE_AND_ARTIST||(n=t.order,![r.H.SECONDARY_ASC,r.H.SECONDARY_DESC].includes(n)))||t.column===r.$.ARTIST);var n},w=e=>{if(e.order&&e.column)return A(e.column,e)?{field:s.n.ARTIST,order:_[e.order]}:{field:c[e.column],order:_[e.order]}},I=(e,t)=>{const n=e===r.$.TITLE_AND_ARTIST?5:3,i=(t.order+1)%n;return t.column===e?{column:i?t.column:null,order:i}:{column:e,order:r.H.ASC}},T=e=>{if(!e)return;return`text =^# "${e}"`},N=e=>{const t=e||i.Ru.get("playlist.similar-playlist"),n=t.match(new RegExp("(.*)\\((\\d+)\\)$"));return n?`${n[1].trim()} (${r=n[2],parseInt(r,10)+1})`:`${t} (2)`;var r}},98652:(e,t,n)=>{"use strict";n.d(t,{w:()=>c});var i=n(79474),r=n(3292),s=n(14056),a=n(27742),o=n(13326),l=n(67302);const c=({uri:e,isBook:t})=>{const{add:n,remove:c,useContains:u}=(0,o.p)("prerelease"),d=u(e).at(0),{enqueueSnackbar:m}=(0,a.d)(),{spec:p,logger:h}=(0,l.r)(r.k,{data:{uri:e}});return{isPreSaved:d,addPresave:(0,i.useCallback)((async()=>{h.logInteraction(p.actionBarFactory().preSaveButtonFactory().hitPresave({prereleaseId:e,itemToBePresaved:e,contextUri:e})),await n(e),m(t?s.Ru.get("web-player.prerelease.audiobook_feedback_presaved"):s.Ru.get("web-player.prerelease.album_feedback_presaved"))}),[n,m,t,h,p,e]),removePresave:(0,i.useCallback)((async()=>{h.logInteraction(p.actionBarFactory().preSaveButtonFactory().hitRemovePresave({prereleaseId:e,itemToBeRemovedFromPresaved:e,contextUri:e})),await c(e)}),[h,c,p,e])}}},13892:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});const i="loginButton"},17092:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(79474),r=n(35289);function s(e){const{clearSelected:t}=(0,i.useContext)(r.m);(0,i.useEffect)((()=>{const n=n=>{!(e.current&&n.target instanceof Node)||e.current.contains(n.target)||n.target instanceof Element&&"INPUT"===n.target.tagName||t()};return window.addEventListener("click",n),()=>{window.removeEventListener("click",n)}}),[t,e])}},42476:(e,t,n)=>{"use strict";n.d(t,{R:()=>l});var i=n(79474),r=n(14056),s=n(2092),a=n(20044),o=n(35289);function l({index:e,label:t,contextUri:n,sectionId:l,isEnabled:c=!0}){const{draggable:u,onDragStart:d}=(0,s.P)(),{isSelected:m,toggleSelected:p,getSelected:h}=(0,i.useContext)(o.m),g=(0,i.useCallback)((i=>{if(!c||i.target!==i.currentTarget)return;m(e)||p(e,!1,!1);const s=h(),o=s.map((({uri:e})=>e)),u=s.map((({uid:e})=>e)).filter(Boolean),g=s.map((({type:e})=>e)).map(a.j3);d(i,{itemUris:o,itemIds:u,itemMimeTypes:g,dragLabelText:o.length>1?r.Ru.get("tracklist.drag.multiple.label",o.length):t,contextUri:n,sectionId:l})}),[c,m,e,h,d,t,n,l,p]);return(0,i.useMemo)((()=>({draggable:u,onDragStart:g})),[u,g])}},72460:(e,t,n)=>{"use strict";n.d(t,{d:()=>a});var i=n(79474),r=n(82372),s=n(35289);function a(e){const{clearSelected:t,getSelected:n}=(0,i.useContext)(s.m),{filter:a}=(0,i.useContext)(r.g),o=(0,i.useRef)(e);o.current=e;return(0,i.useCallback)((e=>{if("Escape"===e.key&&!e.repeat){if(a)return;t()}if(("Backspace"===e.key||"Delete"===e.key)&&!e.repeat){const e=n();e.length&&o.current?.(e)}}),[a,t,n])}},76816:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(79474),r=n(33085);function s(){const e=(0,i.useContext)(r._);if(!e)throw new Error("useTrackListColumns must be used within a TracklistColumnsContext!");return e.visibleColumnTypes}},13411:(e,t,n)=>{"use strict";n.d(t,{$:()=>i,H:()=>r});let i=function(e){return e.INDEX="INDEX",e.TITLE="TITLE",e.TITLE_AND_ARTIST="TITLE_AND_ARTIST",e.ARTIST="ARTIST",e.PLAYS="PLAYS",e.ADDED_BY="ADDED_BY",e.ADDED_AT="ADDED_AT",e.RELEASE_DATE="RELEASE_DATE",e.ACTIONS="ACTIONS",e.DURATION="DURATION",e.ALBUM="ALBUM",e.ALBUM_OR_PODCAST="ALBUM_OR_PODCAST",e.ALBUM_OR_SHOW="ALBUM_OR_SHOW",e.EVENT_DATE="EVENT_DATE",e.EVENT_INFO="EVENT_INFO",e.CONCERT_DATE="CONCERT_DATE",e.CONCERT_VENUE="CONCERT_VENUE",e.TITLE_AND_AUTHOR="TITLE_AND_AUTHOR",e.AUTHOR="AUTHOR",e.ADD="ADD",e}({}),r=function(e){return e[e.NONE=0]="NONE",e[e.ASC=1]="ASC",e[e.DESC=2]="DESC",e[e.SECONDARY_ASC=3]="SECONDARY_ASC",e[e.SECONDARY_DESC=4]="SECONDARY_DESC",e}({})},71781:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var i=n(9138),r=n(87358),s=n(77962),a=n(92758),o=n(13411);const l=(e,t,n)=>{let l=a.o;return 0===e&&t===o.$.INDEX?l=r.y:1===e&&n[0]===o.$.INDEX||0===e?l=s.U:e===n.length-1&&(l=i.l),l}},83699:(e,t,n)=>{"use strict";n.d(t,{aX:()=>o});var i=n(37766);let r=function(e){return e.STREAM_SIGNAL="userFraudStreamSignal",e}({});class s extends i.V{}const a=new s;function o(e,t){a.emit(r.STREAM_SIGNAL,{event:e,action:t})}},43480:(e,t,n)=>{"use strict";n.d(t,{d:()=>M});var i=n(79474),r=n(9856),s=n.n(r);function a(){return"Chrome"===s().parse(navigator.userAgent).browser.name}function o(){return"Firefox"===s().parse(navigator.userAgent).browser.name}var l=n(26976),c=n(33657);function u(){return"webkitRequestAnimationFrame"in window}function d(){return!!window?.CSS?.supports}function m(){return!d()||CSS.supports("-webkit-border-vertical-spacing","0")}function p(){return eval.toString().length}const h=56.1124478168614,g=56.1124478168614,f=56.1124478168614,b=56.11244781686139;function v(){return Math.hypot(-24.42,-50.519999999999925)}function y(){const{userAgent:e,appVersion:t}=navigator,n=t??"";return/headless/i.test(e)||/headless/i.test(n)}var _=n(73939),E=n(1816);function x(){return(0,_.D)()===E.f.ChromeOS}function C(){return eval.toString().length}const S=33,A=33,w=37,I=37;const T=async()=>{if(navigator.webdriver)return!1;if(y())return!1;if(a()&&!await async function(){if(!window.chrome)return!1;if(!navigator.plugins?.length)return!1;if(""===navigator.languages)return!1;if(C()!==S)return!1;const e=await navigator.permissions.query({name:"notifications"});return"denied"!==window?.Notification?.permission||"prompt"!==e.state}())return!1;if(o()&&C()!==w)return!1;if((0,c.n)()&&C()!==I)return!1;if((0,l.k)()&&C()!==A)return!1;const{userAgent:e}=navigator;if(!function(e,t){if(!("platform"in t))return!0;if(x())return!0;const{platform:n}=t,i=function(e){const[t]=e.split(" "),n={MacIntel:"macOS",Win32:"Windows",Win64:"Windows",Linux:"Linux"};return t in n?n[t]:""}(n);if(!i)return!0;const{os:r}=s().parse(e);return i===r.name}(e,navigator))return!1;const t=Object.keys(document);for(const e of t)if(e.startsWith("$cdc_"))return!1;return!0};let N;const R=async()=>(N=N??await T(),N);function k(){return p()===w&&v()===b&&(!d()||CSS.supports("-moz-box-sizing","content-box"))&&"mozInnerScreenX"in window}function O(){return!(a()&&!(window.chrome&&p()===S&&v()===h&&m()&&u()))&&(!(o()&&!k())&&(!!(!(0,c.n)()||p()===I&&v()===f&&m()&&u())&&!!(!(0,l.k)()||p()===A&&v()===g&&m()&&u())))}async function P(){return navigator.webdriver||y()||function(){const e=Object.keys(document);for(const t of e)if(t.startsWith("$cdc_"))return!0;return!1}()||""===navigator.languages||!(!navigator.plugins||navigator.plugins.length)||await async function(){if(!("permissions"in navigator))return!1;const e=await navigator.permissions.query({name:"notifications"});return"denied"===window?.Notification?.permission&&"prompt"===e.state}()}function j(){if(!("platform"in navigator))return!0;if(x())return!0;const{platform:e}=navigator,t=function(e){const[t]=e.split(" "),n={MacIntel:"macOS",Win32:"Windows",Win64:"Windows",Linux:"Linux"};return t in n?n[t]:""}(e);if(!t)return!0;const{os:n}=s().parse(navigator.userAgent);return t===n.name}let L,D=function(e){return e.Ok="0",e.Warning="1",e.Error="2",e}({});const U=async()=>(L=L??await async function(){return{headless:await P()?D.Error:D.Ok,browser:O()?D.Ok:D.Error,os:j()?D.Ok:D.Error}}(),L);function M(){const e=(0,i.useRef)(void 0),t=(0,i.useRef)(!1),n=(0,i.useRef)(!1),r=(0,i.useRef)({}),s=(0,i.useCallback)((async i=>{r.current=await U(),i?await R()&&i.isTrusted?"click"!==i.type?e.current=!0:n.current?e.current=t.current:e.current=!0:e.current=!1:e.current=await R()}),[]);return(0,i.useEffect)((()=>{function e(){t.current=!0}function i(e){n.current="mouse"===e.pointerType}return document.addEventListener("mousemove",e),document.addEventListener("pointerdown",i),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("pointerdown",i)}}),[]),{isTrustedRef:e,isTrustedFn:s,metadataRef:r}}},38959:(e,t,n)=>{"use strict";n.d(t,{Ai:()=>a,YR:()=>s,oe:()=>o});var i=n(44104),r=n(61252);function s(e,t,n){if(!e)return void console.error("No grid element found. Canceling moving focus");if(!(0,r.fk)(e))return;const s=e.querySelector('[tabindex="0"]'),a=n?d:u;if(t===i.O.UP){const t=a(e,s,i.O.UP);if(!t)return;(0,r.MS)(s,l(s,t))}if(t===i.O.DOWN){const t=a(e,s,i.O.DOWN);if(!t)return;(0,r.MS)(s,l(s,t))}if(t===i.O.LEFT){const t=c(s,-1);if(t)return void(0,r.MS)(s,t);const n=a(e,s,i.O.LEFT);if(!n)return;const o=n.querySelectorAll(r.nu),l=o[o.length-1];(0,r.MS)(s,l)}if(t===i.O.RIGHT){const t=c(s,1);if(t)return void(0,r.MS)(s,t);const n=a(e,s,i.O.RIGHT);if(!n)return;const o=n.querySelectorAll(r.nu)[0];(0,r.MS)(s,o)}}function a(e){const t=e.closest('[role="grid"]');if(!t)return;const n=e.querySelectorAll(r.nu)[0],i=t.querySelector('[tabindex="0"]');(0,r.MS)(i,n)}function o(e,t,n){const i=e.querySelector(`[aria-rowindex="${t}"]`);if(!i)return void e.focus({preventScroll:!0});const s=i.querySelector(`[aria-colindex="${n}"]`);if(!s)return void a(i);const o=s.querySelectorAll(r.nu)[0],l=e.querySelector('[tabindex="0"]');(0,r.MS)(l,o)}function l(e,t){const n=e.closest("[aria-colindex]"),i=Array.from(n.querySelectorAll(r.nu)).indexOf(e),s=t.querySelectorAll(r.nu);return s[i]||s[0]}function c(e,t){const n=Array.from(e.closest("[aria-colindex]").querySelectorAll(r.nu)),i=n.findIndex((t=>t===e))+t;return n[i]}function u(e,t,n){const s=t.closest("[aria-rowindex]");if(n===i.O.DOWN){const n=Array.from(e.querySelectorAll("[aria-rowindex]")),i=t.closest("[aria-colindex]").getAttribute("aria-colindex");for(let e=n.indexOf(s)+1;e<n.length;e++){const t=n[e].querySelector(`[aria-colindex="${i}"]`);if((0,r.tM)(t))return t}}if(n===i.O.UP){const n=Array.from(e.querySelectorAll("[aria-rowindex]")),i=n.indexOf(s),a=t.closest("[aria-colindex]").getAttribute("aria-colindex");for(let e=i-1;e>=0;e--){const t=n[e].querySelector(`[aria-colindex="${a}"]`);if((0,r.tM)(t))return t}}if(n===i.O.LEFT){const e=Array.from(s.querySelectorAll("[aria-colindex]")),n=t.closest("[aria-colindex]");for(let t=e.indexOf(n)-1;t>=0;t--){const n=e[t];if((0,r.tM)(n))return n}}if(n===i.O.RIGHT){const e=Array.from(s.querySelectorAll("[aria-colindex]")),n=t.closest("[aria-colindex]");for(let t=e.indexOf(n)+1;t<e.length;t++){const n=e[t];if((0,r.tM)(n))return n}}return null}function d(e,t,n){if(n===i.O.DOWN){const n=t.closest("[aria-colindex]").getAttribute("aria-colindex"),i=t.closest("[aria-rowindex]").getAttribute("aria-rowindex"),s=Array.from(t.closest('[role="grid"]').querySelectorAll("[aria-rowindex]")).map((e=>parseInt(e.getAttribute("aria-rowindex")??"0",10))),a=parseInt(i,10),o=Math.max(...s);for(let t=a+1;t<=o;t+=1){const i=t,s=e.querySelector(`[aria-colindex="${n}"][aria-rowindex="${i}"]`);if((0,r.tM)(s))return s}}if(n===i.O.UP){const n=t.closest("[aria-colindex]").getAttribute("aria-colindex"),i=t.closest("[aria-rowindex]").getAttribute("aria-rowindex");for(let t=parseInt(i,10)-1;t>=0;t-=1){const i=t,s=e.querySelector(`[aria-colindex="${n}"][aria-rowindex="${i}"]`);if((0,r.tM)(s))return s}}if(n===i.O.LEFT){const n=t.closest("[aria-colindex]"),i=parseInt(n.getAttribute("aria-rowindex"),10),s=parseInt(n.getAttribute("aria-colindex"),10),a=Array.from(e.querySelectorAll(`[aria-rowindex="${i}"]`));for(let e=s-2;e>=0;e--){const t=a[e];if((0,r.tM)(t))return t}}if(n===i.O.RIGHT){const n=t.closest("[aria-colindex]"),i=parseInt(n.getAttribute("aria-rowindex"),10),s=parseInt(n.getAttribute("aria-colindex"),10),a=Array.from(e.querySelectorAll(`[aria-rowindex="${i}"]`));for(let e=s;e<a.length;e++){const t=a[e];if((0,r.tM)(t))return t}}return null}},99275:(e,t,n)=>{"use strict";n.d(t,{I:()=>a,X:()=>o});var i=n(79474),r=n(83608);const s=(0,n(56549).y)((()=>({transferKey:null,timestamp:0}))),a=(e,t)=>{s.setState({transferKey:e,timestamp:Date.now(),focusOptions:t})},o=(e,t,n=1e3)=>{const{transferKey:a,timestamp:o,focusOptions:l}=(0,r.Pj)(s);(0,i.useLayoutEffect)((()=>{null!==e&&e===a&&o>Date.now()-n&&t.current?.focus(l)}),[l,t,a,n,o,e])}},10132:(e,t,n)=>{"use strict";n.d(t,{i:()=>s});var i=n(79474);class r{constructor(e={}){this.settings={level:e.level||"polite",parent:e.parent||document.body,idPrefix:e.idPrefix||"live-region-",delay:e.delay||0},this.currentRegion=document.createElement("span")}say(e,t=this.settings.delay){this.clearNode(),this.currentRegion=document.createElement("span"),this.currentRegion.id=this.settings.idPrefix+Math.floor(1e4*Math.random());const n="assertive"!==this.settings.level?"status":"alert";this.currentRegion.setAttribute("aria-live",this.settings.level),this.currentRegion.setAttribute("role",n),this.currentRegion.setAttribute("style","clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px"),this.settings.parent.appendChild(this.currentRegion),window.setTimeout((()=>{this.currentRegion.textContent=e}),t)}clearNode(){const e=this.settings.parent.querySelector(`[id^="${this.settings.idPrefix}"]`);e&&this.settings.parent.removeChild(e)}}const s=({delay:e,idPrefix:t,level:n,parent:s}={})=>{const a=(0,i.useMemo)((()=>new r({delay:e,idPrefix:t,level:n,parent:s})),[e,t,n,s]);return(0,i.useEffect)((()=>()=>{a.clearNode()}),[a]),a}},62882:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var i=n(79474);const r=e=>{const[t,n]=(0,i.useState)(null);(0,i.useEffect)((()=>{const t=e.current;if(!t)return()=>{};const i=({target:e})=>{e instanceof HTMLElement&&n(e)};return t.addEventListener("focusout",i),()=>{t.removeEventListener("focusout",i)}}),[e]),(0,i.useEffect)((()=>{const i=e.current;if(!t||!i)return;const r=i.contains(t),s=i.contains(document.activeElement);!r&&!s&&i.focus({preventScroll:!0}),n(null)}),[e,t])}},43364:(e,t,n)=>{"use strict";n.d(t,{KV:()=>a,cp:()=>o,ev:()=>s,fC:()=>i,uC:()=>r});const i="isPlaybackBarRemainingTimeToggled",r=64,s=416,a=8,o=100},63565:(e,t,n)=>{"use strict";n.d(t,{HK:()=>r,xt:()=>s});var i=n(3775);n(16990);const r=Spicetify.GraphQL.Definitions["getAlbum"]=new i.l("getAlbum","query","469874edcad37b7a379d4f22f0083a49ea3d6ae097916120d9bbe3e36ca79e9d",null),s=Spicetify.GraphQL.Definitions["queryAlbumTracks"]=new i.l("queryAlbumTracks","query","469874edcad37b7a379d4f22f0083a49ea3d6ae097916120d9bbe3e36ca79e9d",null)},80499:(e,t,n)=>{"use strict";n.d(t,{$:()=>A,w:()=>w});var i=n(79474),r=n(28049),s=n(80964),a=n(14056),o=n(52963),l=n(15891),c=n(26360),u=n(16990),d=n(16323),m=n(11437),p=n(77564),h=n(63565),g=n(91303),f=n(30939),b=n(9440),v=n(45640),y=n(34762);const _=e=>({...e,uid:void 0,isSaved:!1,playcount:"0",linkedUri:e.uri}),E=e=>{switch(e){case"album":return y._.Album;case"ep":return y._.Ep;case"single":return y._.Single;case"compilation":return y._.Compilation;default:return(0,v.d)(e)}};var x=n(76998);const C=(e,t,n)=>{const{name:i}=h.HK,r={uri:e,locale:t,offset:0,limit:50};return{queryKey:[i,r],queryFn:async()=>{const e=await(0,c.c)(n,h.HK,r);return"Album"===e?.data?.albumUnion.__typename?(0,x.XA)(e?.data.albumUnion):null}}},S=e=>{const t=a.Ru.getLocaleForURLPath();return(0,g.W)({type:"link",uri:e})?`${o.CT}${t}`:""},A=e=>{const t=!(0,f.n)(),n=(0,m.T)(e),s=(0,i.useContext)(d.Z),[a,o]=(0,i.useState)(null),{request:c}=(0,i.useContext)(l.j),h=S(e),g=C(e,h,c),{data:v,isPending:y,error:x}=(0,r.I)({...g,gcTime:15*u.i,staleTime:5e3}),A=t&&n===p.kw.YES;(0,i.useEffect)((()=>{A&&s.getAlbum(e).then((e=>o(e?(e=>{return{type:b.c.ALBUM,uri:e.uri,name:e.name,artists:(n=e.artists,n.map((e=>({type:b.c.ARTIST,name:e.name,images:[],uri:e.uri,id:e.uri})))),images:e.images,moreAlbumsByArtist:[],nrTracks:e.items.length,isPlayable:e.items.some((e=>e.isPlayable)),isCatalogueRestricted:!1,discs:{totalCount:0,items:[]},copyright:(t=e.copyrights,{totalCount:t.length,items:t}),albumType:E(e.albumType),duration:{durationMs:e.items.reduce(((e,t)=>e+t.duration.milliseconds),0),isEstimate:!1},releases:{totalCount:0,items:[]},extractedColors:null,courtesyLine:null,sharingInfo:null,items:e.items.map(_)};var t,n})(e):null)))}),[A,s,e]);return{loading:A?!a:y,error:x,data:A?a:v??null,canLoadOffline:A}},w=e=>{const{request:t}=(0,i.useContext)(l.j),n=(0,s.jE)(),r=S(e);return(0,i.useCallback)((()=>{const i=C(e,r,t);n.prefetchQuery(i)}),[n,t,r,e])}},50068:(e,t,n)=>{"use strict";n.d(t,{F:()=>i.F});var i=n(79862)},21931:(e,t,n)=>{"use strict";n.d(t,{t:()=>c});var i=n(79474),r=n(13411),s=n(70746),a=n(77582),o=n(33237);const l=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.PLAYS,r.$.DURATION],c=()=>{const{isCompactMode:e}=(0,s.a)(),t=(0,o.My)()===a.m.Web;return(0,i.useMemo)((()=>(({isWebPlayer:e,isCompactMode:t})=>{const n=[...l];return e&&n.splice(n.indexOf(r.$.PLAYS),1),t&&n.splice(n.indexOf(r.$.TITLE_AND_ARTIST),1,r.$.TITLE,r.$.ARTIST),n})({isWebPlayer:t,isCompactMode:e})),[e,t])}},34762:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});let i=function(e){return e.Album="ALBUM",e.Audiobook="AUDIOBOOK",e.Compilation="COMPILATION",e.Ep="EP",e.Podcast="PODCAST",e.Single="SINGLE",e.Unknown="UNKNOWN",e}({})},76998:(e,t,n)=>{"use strict";n.d(t,{TI:()=>m,XA:()=>d});var i=n(35828),r=n(9440),s=n(45640),a=n(8468);const o=e=>(e||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),l=e=>{switch(e){case i.by.Minute:case i.by.Hour:case i.by.Day:return"day";case i.by.Month:return"month";case i.by.Year:case void 0:return"year";default:return(0,s.d)(e)}},c=e=>{if(null!==e)return{date:e.isoString,precision:l(e.precision)}},u=e=>{return{type:r.c.TRACK,uid:e.uid,uri:e.track.uri,name:e.track.name,artists:(t=e.track.artists,t.items.map((e=>({uri:e.uri,name:e.profile.name})))),duration:{milliseconds:e.track.duration.totalMilliseconds},album:null,discNumber:e.track.discNumber,trackNumber:e.track.trackNumber,isPlayable:e.track.playability.playable,isLocal:!1,isExplicit:e.track.contentRating?.label===i.x7.Explicit,is19PlusOnly:e.track.contentRating?.label===i.x7.NineteenPlus,isSaved:e.track.saved,playcount:e.track.playcount??"",linkedUri:"Track"===e.track.relinkingInformation?.linkedTrack.__typename?e.track.relinkingInformation?.linkedTrack.uri:null,hasAssociatedVideo:(e.track.associations?.associatedVideos?.totalCount||0)>0};var t},d=e=>{const t={totalCount:e.discs.totalCount,items:e.discs.items.map((e=>({type:"AlbumDisc",discNumber:e.number,nrTracks:e.tracks.totalCount})))},n=e.tracks.items.map(u),s=(0,a.E)(n,t)||[];return{type:r.c.ALBUM,uri:e.uri,name:e.name,artists:(m=e.artists,m.items.map((e=>({type:r.c.ARTIST,name:e.profile.name,images:o(e.visuals.avatarImage?.sources),uri:e.uri,id:e.id})))),images:o(e.coverArt?.sources),moreAlbumsByArtist:(d=e.moreAlbumsByArtist,d?.items[0]?.discography?.popularReleasesAlbums?.items.map((e=>({type:r.c.ALBUM,uri:e.uri,albumType:e.type,name:e.name,images:o(e.coverArt?.sources),artists:[],sharingInfo:e.sharingInfo,year:e.date?.year})))),nrTracks:e.tracks.totalCount,isPlayable:e.tracks.items.some((e=>e.track.playability.playable)),isCatalogueRestricted:e.playability.reason===i.$c.CatalogueRestricted,discs:t,copyright:e.copyright,albumType:e.type,duration:(l=e.tracks,{durationMs:l.items.length>0?l.items.reduce(((e,t)=>e+t.track.duration.totalMilliseconds),0)/l.items.length*l.totalCount:0,isEstimate:l.items.length<l.totalCount}),releases:e.releases,extractedColors:e.coverArt?.extractedColors??null,courtesyLine:e.courtesyLine??null,sharingInfo:e.sharingInfo??null,release:c(e.date),items:s};var l,d,m},m=(e,t)=>{if("Album"!==e?.albumUnion?.__typename)return{items:[],totalLength:0};const n=e.albumUnion.tracks.items.map(u);return{items:(0,a.E)(n,t)||[],totalLength:(0,a.Y)(t)?t.totalCount+e.albumUnion.tracks.totalCount:e.albumUnion.tracks.totalCount}}},8468:(e,t,n)=>{"use strict";n.d(t,{E:()=>r,Y:()=>i});const i=e=>e.totalCount>=2&&e.totalCount<=10,r=(e,t)=>{if(!i(t)||!e)return e;let n=0;return e.reduce(((e,t)=>((t.trackNumber<n||1===t.trackNumber)&&e.push({type:"AlbumDisc",discNumber:t.discNumber,nrTracks:null}),e.push(t),n=t.trackNumber,e)),[])}},58522:(e,t,n)=>{"use strict";n.d(t,{v:()=>l});var i=n(22215),r=n(19498),s=n(95338),a=n(57506),o=n(86412);function l(e){if(!(0,i.NC)(r.N_Z,{loadingValue:!1}))return!1;if("string"==typeof e)return(0,s.g)(e);const t=e;return(0,o.v)(t)||(0,a.p)(t)}},44827:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,t:()=>a});var i=n(81887),r=n(16212),s=n(87939);let a=function(e){return e[e.UNCURATED=0]="UNCURATED",e[e.CURATED=1]="CURATED",e}({});const o={[a.CURATED]:{Icon:i.k,iconProps:{semanticColor:"textBrightAccent"},transitions:{[a.UNCURATED]:{animationFilePath:(0,s.b)("animations/plus-deselected-confetti-white.json"),style:{transform:"scale(2.448)"}}}},[a.UNCURATED]:{Icon:r.P,transitions:{[a.CURATED]:{animationFilePath:(0,s.b)("animations/plus-selected-confetti-white.json"),style:{transform:"scale(2.448)"}}}}}},48327:(e,t,n)=>{"use strict";n.d(t,{g:()=>i.g});var i=n(67207)},16265:(e,t,n)=>{"use strict";n.d(t,{v:()=>i.v});var i=n(58522)},77670:(e,t,n)=>{"use strict";n.d(t,{A:()=>v,R:()=>y});var i=n(79474),r=n(28049),s=n(80964),a=n(22215),o=n(14056),l=n(52963),c=n(15891),u=n(26360),d=n(16990);const m=new(n(3775).l)("queryArtistOverview","query","da986392124383827dc03cbb3d66c1de81225244b6e20f8d78f9f802cc43df6e",null);var p=n(91303),h=n(19498);const g=e=>{const t=o.Ru.getLocaleForURLPath();return(0,p.W)({type:"link",uri:e})?`${l.CT}${t}`:""},f=(e,t)=>[e,t],b=(e,t,n,i)=>async()=>(0,u.c)(i,m,{uri:e,locale:t,includePrerelease:n}),v=e=>{const t=g(e),{request:n}=(0,i.useContext)(c.j),s=(0,a.NC)(h.xnZ),{data:o,isLoading:l,isFetching:u,error:m}=(0,r.I)({queryKey:f(e,t),queryFn:b(e,t,s,n),gcTime:5*d.i,staleTime:5*d.i});return{data:o?.data??null,extensions:o?.extensions,error:m??null,loading:l,fetching:u}},y=e=>{const{request:t}=(0,i.useContext)(c.j),n=(0,a.NC)(h.xnZ),r=(0,s.jE)(),o=g(e);return(0,i.useCallback)((()=>{r.prefetchQuery({queryKey:f(e,o),queryFn:b(e,o,n,t),staleTime:5*d.i})}),[n,r,t,o,e])}},94087:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ArtistOffers:()=>Mi,default:()=>ps});var i=n(79474),r=n(83648),s=n(9714),a=n(83856),o=n(98196),l=n(14056),c=n(46737),u=n(64647),d=n(82089),m=n(96642),p=n(16990),h=n(3775);const g=Spicetify.GraphQL.Definitions["queryArtistRelatedVideos"]=new h.l("queryArtistRelatedVideos","query","eb5bde95cd8cb2aa369d6ec868c008f7e42e5e0cc810188ecc973c6c1b0e73cd",null);var f=n(93820),b=n(13274);const v=i.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:n,error:i,data:s}=(a={uri:t},h={gcTime:15*p.i},(0,p.I)(g,a,h));var a,h;if(null===s||"Artist"!==s.artistUnion.__typename||"RelatedVideoPage"!==s.artistUnion.relatedVideos.__typename||i||n)return(0,b.jsx)(d.A,{hasError:null!==i,errorMessage:l.Ru.get("error.request-artist-related-videos")});const v=s.artistUnion.relatedVideos.items.filter((e=>"Track"===e.trackOfVideo.data.__typename));return(0,b.jsxs)("div",{className:"contentSpacing",children:[(0,b.jsx)(u.Q,{children:l.Ru.get("music_videos")}),(0,b.jsx)(m.$,{title:l.Ru.get("music_videos"),total:s.artistUnion.relatedVideos.totalCount,showAll:!0,fullPage:!0,rowGap:o.lT,children:v.map(((e,t)=>{if("Track"!==e.trackOfVideo.data.__typename)return null;const{data:n}=e.trackOfVideo;return(0,b.jsx)(c.O,{title:n.name,trackUri:n.uri,artists:n.artists.items,album:n.albumOfTrack,contentRating:n.contentRating,referrerIdentifier:"other",index:t},t)}))})]})}));var y=n(97500),_=n.n(y),E=n(98764),x=n(3498),C=n(64388),S=n(30957),A=n(14494),w=n(52792),I=n(67302);const T="EPBWBmUPyLEpl4VJflaL",N="JFiowuVIURESjJJznyZx",R="P6CL1uHz_zTqst4gaAXQ",k="JEd1tp9FdtDLBOCRSVe0",O=e=>{const t=(0,A.s)(),n=(0,i.useMemo)((()=>e.spec.promoRowFactory()),[e.spec]),r=(0,w.t)(n);return(0,b.jsxs)("div",{className:T,ref:r,children:[(0,b.jsx)(E.E,{as:"h2",variant:"bodyMediumBold",className:N,children:l.Ru.get("concerts.find_more")}),(0,b.jsx)(S.default,{to:"/concerts",className:R,onClick:()=>{const e=n.hitUiNavigate({destination:"spotify:app:concerts"});t.logInteraction(e)},children:(0,b.jsx)(x.v,{as:"span",selected:!0,children:l.Ru.get("concerts.find_nearby")})}),(0,b.jsx)("img",{className:k,alt:"",src:"https://i.scdn.co/image/ab676d63000076a07ce4a60e6015185a1c0edf08"})]})};var P=n(14485),j=n(50761);const L="xpUBYro3YQTRrHlOtDUG",D="RqzE7votb8N93rc_jcM1",U="FNDlk94hIuzTU46SX9XI",M="vy9zjnjiY17LMoE8NIXU",B="McNZLhuWvDVET5VU3isa",F="Y7ipyLdgXswfEfkyakDd",H="fPraNia968RT4uPMTi3A",V="us2rJWb_948b7dlVgBOe",z="GqNQN9feHja7Au6wOdLG",G="wjBvyzKbAJgD2BpyuHKP",W="LkCU9WXlxfddrPDZZZ4J",K="LtyyKmwxLSSxcYCrRZJh",Y="mIr00F_ZL6Nfv1NjMyzz",q="kc6crrZKKENRmaIMtzIx",Q="azrW1gfJbgz897iDaITJ",$="wYMCavuacjad59alV1BF",Z="U7meWrHbAMHqpiK5oslu",X="A6sC7UQiAsM__tCDUDW0",J=(0,i.memo)((e=>{const{concert:t,onClick:n}=e,i=(0,P.l4)(t.startDate.localDate),r=t.venue,s=t.location;return(0,b.jsxs)(S.Link,{to:`/concert/${t.id}`,className:M,onClick:n,"":"artist-concert-row",children:[(0,b.jsxs)("div",{className:B,"aria-hidden":!0,children:[(0,b.jsx)(E.E,{as:"span",variant:"bodySmallBold",className:F,children:(0,P.tj)(i)}),(0,b.jsx)(E.E,{as:"span",variant:"titleSmall",className:H,children:(0,P.Py)(i)})]}),(0,b.jsxs)("div",{className:V,children:[(0,b.jsxs)("div",{className:X,children:[(0,b.jsx)(E.E,{as:"div",variant:"bodyMediumBold",className:z,"":"event-title",children:s}),(0,b.jsx)(E.E,{as:"div",variant:"bodyMedium",className:G,children:(0,j.DB)(t)})]}),(0,b.jsxs)(E.E,{as:"span",variant:"bodyMedium",className:W,children:[(0,P.Y)(i)," • ",(0,P.WB)(i)]}),(0,b.jsx)(E.E,{as:"span",variant:"bodyMedium",className:K,"":"event-venue",children:r})]})]})})),ee=(0,i.memo)((e=>{const{concerts:t,spec:n,locationName:r}=e,s=(0,A.s)(),a=(0,w.t)(n),o=(0,i.useMemo)((()=>n.browseAllEventsButtonFactory({uri:"spotify:app:concerts"})),[n]),c=r?n.locationEventsFactory({identifier:r}):n.otherEventsFactory(),u=(0,w.t)(o);return 0===t.length?(0,b.jsxs)("div",{className:Z,children:[(0,b.jsx)(E.E,{as:"p",variant:"bodyMedium",ref:a,className:q,children:r?l.Ru.get("concerts.no_events_description"):l.Ru.get("concerts.no_upcoming_events")}),!r&&(0,b.jsx)(S.Link,{to:"/concerts",onClick:()=>{s.logInteraction(o.hitUiNavigate({destination:"spotify:app:concerts"}))},children:(0,b.jsx)(x.v,{selected:!0,selectedColorSet:"invertedLight",ref:u,children:l.Ru.get("concerts.browse_all_events")})})]}):(0,b.jsx)("div",{ref:a,className:Q,children:t.map(((e,t)=>{const n=`spotify:concert:${e.id}`;return(0,b.jsx)(J,{concert:e,onClick:()=>{const e=c.eventRowFactory({position:t,uri:n}).hitUiNavigate({destination:n});s.logInteraction(e)}},e.id)}))})})),te=ee;var ne=n(53933);const ie=(0,i.memo)((e=>{const{data:t,locationName:n,onSetLocation:r}=e,{artist:s,concerts:a}=t,{spec:o}=(0,I.r)(C.y,{data:{uri:s.uri,identifier:s.id}}),c=(0,A.s)(),u=(0,w.t)(o),d=(0,i.useMemo)((()=>o.headerFactory()),[o]),m=(0,i.useMemo)((()=>o.browseAllEventsButtonFactory({uri:"spotify:app:concerts"})),[o]),p=(0,w.t)(m),{nearUser:h,otherLocations:g}=(e=>{const t={nearUser:[],otherLocations:[]};return e.forEach((e=>{e.nearUser?t.nearUser.push(e.concert):t.otherLocations.push(e.concert)})),t})(a);return(0,b.jsxs)("section",{ref:u,className:U,children:[(0,b.jsx)(E.E,{as:"h1",className:D,variant:"titleLarge",semanticColor:"textBase",children:l.Ru.get("artist.concerts.artist_tour_dates",(0,b.jsx)(S.Link,{to:s.uri,className:L,children:s.name}))}),(0,b.jsx)("section",{children:(0,b.jsx)("div",{className:Y,children:(0,b.jsx)(ne.A,{handleLocationChange:e=>{e&&r(e)},locationStr:n,headerSpec:d,dialog:"preferred"})})}),0===t.concerts.length&&(0,b.jsxs)("div",{className:Z,children:[(0,b.jsx)(E.E,{as:"h2",className:D,variant:"titleMedium",semanticColor:"textBase",children:l.Ru.get("concerts.no_upcoming_events")}),(0,b.jsx)(E.E,{as:"p",variant:"bodyMedium",ref:u,className:q,children:l.Ru.get("artist.concerts.error.not_found")}),(0,b.jsx)(S.Link,{to:"/concerts",onClick:()=>{c.logInteraction(m.hitUiNavigate({destination:"spotify:app:concerts"}))},children:(0,b.jsx)(x.v,{selected:!0,selectedColorSet:"invertedLight",ref:p,children:l.Ru.get("concerts.browse_all_events")})})]}),t.concerts.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("section",{children:[(0,b.jsx)(E.E,{as:"h2",className:_()(D,{[$]:0===h.length}),variant:"titleMedium",semanticColor:"textBase",children:l.Ru.get("concerts.near_location",n)}),(0,b.jsx)(te,{concerts:h,spec:o,locationName:n})]}),(0,b.jsxs)("section",{children:[(0,b.jsx)(E.E,{as:"h2",className:_()(D,{[$]:0===g.length}),variant:"titleMedium",semanticColor:"textBase",children:l.Ru.get("concerts.header.other")}),(0,b.jsx)(te,{concerts:g,spec:o})]})]}),(0,b.jsx)("section",{children:(0,b.jsx)(O,{spec:o})})]})})),re=ie;var se=n(28049),ae=n(35430),oe=n(21361),le=n(39944);const ce=e=>{const[t,{artistId:n,geonameId:i}]=e.queryKey;return(async(e,t)=>(await(0,le.KM)(oe.n.getInstance(),t,e)).body)(n,i)},ue=()=>{const{artistId:e=""}=(0,r.g)(),[t,n]=(0,i.useState)(),{data:s,isLoading:a}=(e=>{const t=["artistConcerts",e];return(0,se.I)({queryKey:t,queryFn:ce,staleTime:6e5,placeholderData:ae.rX,retry:!1})})({artistId:e,geonameId:t?.geonameId?String(t?.geonameId):t?.geohash});return a?(0,b.jsx)(d.A,{hasError:!1,errorMessage:""}):s?(0,b.jsx)(re,{data:s,locationName:t?.location||s.userLocation||l.Ru.get("concerts.default_location"),onSetLocation:n}):(0,b.jsx)(d.A,{hasError:!0,errorMessage:l.Ru.get("concert.error.concert_not_found_title")})};var de=n(8309),me=n(88958),pe=n(33523),he=n(98832),ge=n(88080);const fe=Spicetify.GraphQL.Definitions["queryArtistAppearsOn"]=new h.l("queryArtistAppearsOn","query","9a4bb7a20d6720fe52d7b47bc001cfa91940ddf5e7113761460b4a288d18a4c1",null),be=i.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:n,error:i,data:s}=(a={uri:t},c={gcTime:15*p.i},(0,p.I)(fe,a,c));var a,c;const h="Artist"===s?.artistUnion.__typename?s.artistUnion:null;if(null===h||i||n)return(0,b.jsx)(d.A,{hasError:null!==i,errorMessage:l.Ru.get("error.request-artist-appears-on")});const g=h.profile.name,v=(0,f.Lf)(h.relatedContent.appearsOn.items);return(0,b.jsxs)("div",{className:"contentSpacing",children:[g?(0,b.jsx)(u.Q,{children:l.Ru.get("artist-page.appearson.seo.title",g)}):null,(0,b.jsx)(m.$,{title:l.Ru.get("artist.appears-on"),total:v.length,showAll:!0,fullPage:!0,rowGap:o.lT,children:v.map(((e,t)=>(0,b.jsx)(ge.a,{index:t,...(0,f.UT)(e)},e.uri)))})]})}));var ve=n(22215),ye=n(49386);const _e=Spicetify.GraphQL.Definitions["queryArtistDiscographyAlbums"]=new h.l("queryArtistDiscographyAlbums","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Ee=Spicetify.GraphQL.Definitions["queryArtistDiscographySingles"]=new h.l("queryArtistDiscographySingles","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),xe=Spicetify.GraphQL.Definitions["queryArtistDiscographyCompilations"]=new h.l("queryArtistDiscographyCompilations","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Ce=Spicetify.GraphQL.Definitions["queryArtistDiscographyAll"]=new h.l("queryArtistDiscographyAll","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Se=Spicetify.GraphQL.Definitions["queryArtistDiscographyOverview"]=new h.l("queryArtistDiscographyOverview","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null);var Ae=n(15891);var we=n(19498),Ie=n(30980),Te=n(19277),Ne=n(82052),Re=n(26271),ke=n(35828),Oe=n(82924),Pe=n(81643),je=n(63492),Le=n(65325),De=n(84387),Ue=n(65594),Me=n(39517),Be=n(40292),Fe=n(96343),He=n(21708),Ve=n(92585),ze=n(33085),Ge=n(50068),We=n(21931),Ke=n(70746),Ye=n(2092),qe=n(36471),Qe=n(58806),$e=n(33037),Ze=n(70968);const Xe="artist-artistDiscography-topBar",Je="artist-artistDiscography-topBarScrolled",et="artist-artistDiscography-artistName",tt="artist-artistDiscography-button",nt="artist-artistDiscography-active",it="artist-artistDiscography-tracklist",rt="artist-artistDiscography-cardGrid",st="artist-artistDiscography-headerContainer",at="artist-artistDiscography-firstAlbum",ot="artist-artistDiscography-headerImage",lt="artist-artistDiscography-headerMetadata",ct="artist-artistDiscography-headerButtons",ut="artist-artistDiscography-headerTitle",dt="k_Sa6fZvlbMKvnRJB6Zu";function mt(e){switch(e){case ke._m.Single:return l.Ru.get("single");case ke._m.Ep:return l.Ru.get("ep");case ke._m.Compilation:return l.Ru.get("compilation");case ke._m.Album:default:return l.Ru.get("album")}}const pt=i.memo((function({album:e,artistUri:t,usePlayContextPage:n,pageIndex:r,setTopBarContent:s}){const a=(0,qe.W)(),[o,c]=(0,$e.A)(e.uri),{titleRef:u,tracklistRef:d,displayTopBar:m}=(0,Qe.h)(),{isCompactMode:p}=(0,Ke.a)(),h=(0,i.useCallback)((async()=>{a({targetUri:e.uri,intent:o?"unsave":"save",type:"click"});try{await c(!o)}catch{}}),[a,e.uri,o,c]),{isPlaying:g,togglePlay:f,usePlayContextItem:v}=n({pageURI:e.uri,pageIndex:r}),{draggable:y,onDragStart:x}=(0,Ye.P)({itemUris:e.uri?[e.uri]:[],dragLabelText:e.name}),C=(0,i.useMemo)((()=>({items:[],totalCount:0})),[]),A=(0,i.useMemo)((()=>{if(m)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Ve.D,{size:"medium",onClick:()=>f(),disabled:!e.playability.playable,isPlaying:g,uri:e.uri}),(0,b.jsx)(Me.X,{text:e.name,dragUri:e.uri,dragLabel:e.name})]})}),[e.name,e.playability.playable,e.uri,m,g,f]);(0,i.useEffect)((()=>{s(A)}),[s,A]);const{date:w,precision:I}=e?.date?(0,Ze.mp)(e.date):{date:void 0,precision:void 0},T=(0,We.t)();return(0,b.jsxs)(me.P,{surface:de.u.ALBUM,uris:[e.uri],children:[(0,b.jsxs)("div",{className:_()(st,{[at]:0===r}),children:[(0,b.jsx)(Be.b,{className:ot,images:e.coverArt?.sources||[],name:e.name,placeholderType:"album",dragUri:e.uri}),(0,b.jsxs)("div",{className:lt,children:[(0,b.jsx)(E.E,{variant:"titleMedium",semanticColor:"textBase",className:ut,draggable:y&&!!e.uri,onDragStart:x,children:(0,b.jsx)(S.Link,{to:e.uri,children:e.name})}),(0,b.jsx)("div",{ref:u}),(0,b.jsx)(Fe.t,{releaseDate:w,releaseDatePrecision:I,totalItems:e.tracks.totalCount,albumType:mt(e.type),hasTracks:!0}),(0,b.jsxs)("div",{className:ct,children:[(0,b.jsx)(Ve.D,{onClick:()=>f(),disabled:!e.playability.playable,isPlaying:g,size:"small",uri:e.uri,version:He.H4.secondary}),(0,b.jsx)(Ue.e,{children:(0,b.jsx)(Oe.M,{isAdded:!!o,onClick:h,disabled:!1,size:Oe.t.sm})}),(0,b.jsx)(Pe.f,{uri:e.uri,isFollowing:!!o,onFollow:h,size:Pe.M.sm}),(0,b.jsx)(Le.b,{menu:(0,b.jsx)(De.h,{uri:e.uri,artistUri:t,sharingInfo:e.sharingInfo}),children:(0,b.jsx)(je.e,{size:je.M.sm,label:l.Ru.get("more.label.context",e.name)})})]})]})]}),(0,b.jsx)("div",{ref:d,className:_()("contentSpacing",it),children:(0,b.jsx)(ze.a,{columns:T,children:(0,b.jsx)(Ge.F,{ariaLabel:e.name,nrTracks:e.tracks.totalCount,albumUri:e.uri,discs:C,usePlayContextItem:v,isCompactMode:p})})})]})}));var ht=n(13650);const gt=i.memo((function(e){const{usePlayContextPage:t,pageIndex:n}=e,{isPlaying:i,togglePlay:r}=t({pageURI:e.uri,pageIndex:n});return(0,b.jsx)(ht.R,{index:n,showType:!0,...e,delegatePlayback:!0,isPlaying:i,onPlay:()=>r()})}));var ft=n(30190),bt=n(14570),vt=n(95063),yt=n(86082),_t=n(47929);let Et=function(e){return e.GRID="grid",e.LIST="list",e}({});const xt=i.memo((function({artistName:e,artistUri:t,albumType:n,dropDownOptions:r,onTypeChange:s,displayMode:a,onDisplayModeChange:o,topBarContent:l}){const[c,u]=(0,i.useState)(!1),d=(0,i.useCallback)((e=>{const t=e.target.scrollTop;t>0&&!c?u(!0):0===t&&c&&u(!1)}),[c]);return(0,_t.g)(d,{executeOnceOnStart:!0}),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(yt.g,{children:a!==Et.GRID?l:void 0}),(0,b.jsxs)("div",{className:_()(Xe,"contentSpacing",{[Je]:c}),children:[(0,b.jsx)(E.E,{as:"div",variant:"titleSmall",className:et,children:(0,b.jsx)(S.Link,{to:t,children:e})}),(0,b.jsx)(vt.g,{options:r,onSelect:s,selected:n}),(0,b.jsx)("button",{type:"button",role:"switch","aria-checked":a===Et.LIST,"aria-label":Et.LIST,className:_()(tt,{[nt]:a===Et.LIST}),onClick:()=>o(Et.LIST),children:(0,b.jsx)(ft.N,{size:"small"})}),(0,b.jsx)("button",{type:"button",role:"switch","aria-checked":a===Et.GRID,"aria-label":Et.GRID,className:_()(tt,{[nt]:a===Et.GRID}),onClick:()=>o(Et.GRID),children:(0,b.jsx)(bt.D,{size:"small"})})]})]})}));var Ct=n(90923);const St=(0,i.memo)((function({uri:e,name:t,dropDownOptions:n,nrAll:s,nrAlbums:o,nrSingles:l,nrCompilations:c,initialDropDownOption:u}){const[d,m]=(0,i.useState)(u),[,p]=(0,i.useState)(0),{pathname:h}=(0,r.zy)(),g=(0,r.Zp)(),[v=Et.LIST,y]=(0,Ne.x)("discography-page-view-mode",Et.LIST),E=(0,Ct.A)(),[x,C]=(0,i.useState)(void 0),S=(0,i.useRef)({all:{items:[],currentOffset:0,totalCount:s},[ke._m.Album]:{items:[],currentOffset:0,totalCount:o},[ke._m.Single]:{items:[],currentOffset:0,totalCount:l},[ke._m.Compilation]:{items:[],currentOffset:0,totalCount:c}}),{requestAlbums:A,requestSingles:w,requestCompilations:I,requestAll:T}=(e=>{const{request:t}=(0,i.useContext)(Ae.j);return{requestAlbums:(0,i.useCallback)((async(n,i)=>{if(!i)return[];const r=await t(_e,{uri:e,offset:n,limit:i});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,f.pe)(r.data.artistUnion.discography.albums.items||[])}),[e,t]),requestSingles:(0,i.useCallback)((async(n,i)=>{if(!i)return[];const r=await t(Ee,{uri:e,offset:n,limit:i});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,f.pe)(r.data.artistUnion.discography.singles.items||[])}),[e,t]),requestCompilations:(0,i.useCallback)((async(n,i)=>{if(!i)return[];const r=await t(xe,{uri:e,offset:n,limit:i});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,f.pe)(r.data.artistUnion.discography.compilations.items||[])}),[e,t]),requestAll:(0,i.useCallback)((async(n,i)=>{if(!i)return[];const r=await t(Ce,{uri:e,offset:n,limit:i});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,f.pe)(r.data.artistUnion.discography.all.items||[])}),[e,t])}})(e),N=(0,i.useCallback)((async()=>{let e=A;d.key===ke._m.Single&&(e=w),d.key===ke._m.Compilation&&(e=I),"all"===d.key&&(e=T);const t=S.current[d.key].totalCount-S.current[d.key].currentOffset,n=await e(S.current[d.key].currentOffset,Math.min(50,t));n.length>0&&(S.current[d.key].items=S.current[d.key].items.concat(n),S.current[d.key].currentOffset+=n.length),p((e=>e+1))}),[d.key,A,T,I,w]),R=(0,i.useCallback)((e=>{const t=n.find((t=>t.key===e));t&&(g(h.replace(/discography.*/,`discography/${t.key.toLowerCase()}`),{replace:!0}),m(t))}),[n,g,h]),{usePlayContextPage:k}=(0,Re.P)({uri:e,pages:S.current[d.key].items.filter((e=>(0,a._T)(e.uri))).map((e=>{const t=(0,a.o_)(e.uri).id;return{uri:e.uri,url:`hm://artistplaycontext/v1/page/spotify/album/${t}/km`}})),metadata:{"disable-autoplay":"true",context_description:t}},{featureIdentifier:"artist"});return(0,b.jsxs)(Te._,{onReachBottom:N,children:[(0,b.jsx)(xt,{artistName:t,artistUri:e,topBarContent:x,dropDownOptions:n,albumType:d,onTypeChange:R,displayMode:v,onDisplayModeChange:e=>{y(e)}}),v===Et.LIST?S.current[d.key].items.map(((t,n)=>(0,b.jsx)(pt,{album:t,artistUri:e,usePlayContextPage:k,pageIndex:n,setTopBarContent:C},t.uri))):(0,b.jsx)(Ie.E,{className:_()(rt,{[dt]:E}),render:()=>S.current[d.key].items.map(((n,i)=>(0,b.jsx)(gt,{...(0,ye.m)(n,e,t),usePlayContextPage:k,pageIndex:i},n.uri)))})]})})),At=(0,i.memo)((function(){const{artistId:e="",albumType:t}=(0,r.g)(),n=(0,ve.NC)(we.dAx),i=(0,f.ay)(e),{loading:s,error:a,data:o}=(c={uri:i},m={gcTime:15*p.i},(0,p.I)(Se,c,m));var c,m;if(null===o||!o?.artistUnion||"Artist"!==o?.artistUnion.__typename||a||s)return(0,b.jsx)(d.A,{hasError:null!==a,errorMessage:l.Ru.get("error.request-artist-discography")});const h=o.artistUnion.profile.name,g=[];o.artistUnion.discography.all.totalCount>0&&n&&g.push({key:"all",value:l.Ru.get("artist-page-discography.all")}),o.artistUnion.discography.albums.totalCount>0&&g.push({key:ke._m.Album,value:l.Ru.get("artist.albums")}),o.artistUnion.discography.singles.totalCount>0&&g.push({key:ke._m.Single,value:l.Ru.get("artist.singles")}),o.artistUnion.discography.compilations.totalCount>0&&g.push({key:ke._m.Compilation,value:l.Ru.get("artist.compilations")});const v=g.find((e=>!("all"!==e.key||"all"!==t||!n)||(e.key===ke._m.Album&&t===ke._m.Album.toLowerCase()||(e.key===ke._m.Single&&t===ke._m.Single.toLowerCase()||e.key===ke._m.Compilation&&t===ke._m.Compilation.toLowerCase()))))||g[0];return(0,b.jsxs)(b.Fragment,{children:[h?(0,b.jsx)(u.Q,{children:l.Ru.get("artist-page.discography.seo.title",h)}):null,(0,b.jsx)(St,{uri:i,name:h||"",dropDownOptions:g,nrAll:o.artistUnion.discography.all.totalCount,nrAlbums:o.artistUnion.discography.albums.totalCount,nrSingles:o.artistUnion.discography.singles.totalCount,nrCompilations:o.artistUnion.discography.compilations.totalCount,initialDropDownOption:v})]})}));var wt=n(99426);const It=Spicetify.GraphQL.Definitions["queryArtistDiscoveredOn"]=new h.l("queryArtistDiscoveredOn","query","71c2392e4cecf6b48b9ad1311ae08838cbdabcfd189c6bf0c66c2430b8dcfdb1",null),Tt=i.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:n,error:i,data:s}=(a={uri:t},c={gcTime:15*p.i},(0,p.I)(It,a,c));var a,c;if(null===s||"Artist"!==s.artistUnion.__typename||i||n)return(0,b.jsx)(d.A,{hasError:null!==i,errorMessage:l.Ru.get("error.request-artist-featuring")});const h=s.artistUnion.relatedContent.discoveredOnV2.items;return(0,b.jsxs)("div",{className:"contentSpacing",children:[(0,b.jsx)(u.Q,{children:l.Ru.get("artist-page.discovered-on")}),(0,b.jsx)(m.$,{title:l.Ru.get("artist-page.discovered-on"),total:h.length,showAll:!0,fullPage:!0,rowGap:o.lT,children:h.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,b.jsx)(wt.B,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)}))})]})})),Nt=Spicetify.GraphQL.Definitions["queryArtistFeaturing"]=new h.l("queryArtistFeaturing","query","20842d6d9d2d28ef945984b68cb927bb33edd00eab84a8da1667def21f1f2c54",null),Rt=i.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:n,error:i,data:s}=(a={uri:t},o={gcTime:15*p.i},(0,p.I)(Nt,a,o));var a,o;if(null===s||"Artist"!==s?.artistUnion?.__typename||i||n)return(0,b.jsx)(d.A,{hasError:null!==i,errorMessage:l.Ru.get("error.request-artist-featuring")});const c=s.artistUnion,{name:h}=c.profile,g=c.relatedContent.featuringV2.items;return(0,b.jsxs)("div",{className:"contentSpacing",children:[h?(0,b.jsx)(u.Q,{children:l.Ru.get("artist-page.featuring.seo.title",h)}):null,(0,b.jsx)(m.$,{title:l.Ru.get("artist-page.featuring",h),total:g.length,showAll:!0,children:g.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,b.jsx)(wt.B,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)}))})]})}));var kt=n(59841),Ot=n(2410),Pt=n(47376),jt=n(87465),Lt=n(67447),Dt=n(14040),Ut=n(52458),Mt=n(37672),Bt=n(7826),Ft=n(91630);const Ht=i.memo((function({concerts:e,artistId:t}){const{spec:n,logger:r}=(0,I.r)(Dt.N,{data:{identifier:t,uri:`${(0,Mt.Dh)(t)}`,position:0,reason:"Artist Page - On Tour"}}),s=`${(0,Mt.Dh)(t)}:concerts`,a=(0,w.t)(n);return(0,b.jsx)(i.Suspense,{fallback:null,children:(0,b.jsxs)("div",{ref:a,children:[(0,b.jsx)(Ut.U,{title:l.Ru.get("concerts_on_tour"),seeAllLabel:l.Ru.get("concerts_view_all"),seeAllUri:s,onClickSeeAll:()=>{const e=n.seeAllButtonFactory({uri:s}).hitUiNavigate({destination:s});r.logInteraction(e)},hasMoreElements:!0}),(0,b.jsx)("ul",{className:Ft.A.onTourShelfGrid,children:e.slice(0,9).map(((e,t)=>(0,b.jsx)("li",{children:(0,b.jsx)(Bt.I,{concert:e,index:t,spec:n})},e.uri)))})]})})}));var Vt=n(48763),zt=n(95999),Gt=n(76661),Wt=n(40643),Kt=n(92026),Yt=n(24577),qt=n(25642),Qt=n(77670),$t=n(37128),Zt=n(8548),Xt=n(41624),Jt=n(27769);const en=i.memo((function(e){const{artistUri:t,name:n,bio:r,bioSource:s,images:a=[],avatarImages:o=[],worldRank:c,monthlyListeners:u,topCities:d,followers:m,externalLinks:p=[],showModal:h=!1,className:g="",spec:f}=e,[v,y]=(0,i.useState)(h),x=(0,A.s)(),C=(0,i.useCallback)((()=>{const e=f.hitUiReveal();x.logInteraction(e),y(!0)}),[f,x]),S=(0,i.useCallback)((()=>{y(!1)}),[]),w=a.find((e=>(e.width||0)>=(e.height||0))),I=w&&{backgroundImage:`linear-gradient(${kt.opacityBlack0} 0%, ${kt.opacityBlack70} 100%), url(${w.url})`};return(0,b.jsxs)("div",{className:g,children:[(0,b.jsx)(E.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Jt.A.heading,children:l.Ru.get("artist.about")}),(0,b.jsx)("div",{className:_()(Jt.A.artistGridContainer),children:(0,b.jsxs)("button",{type:"button","aria-label":n,className:_()(Jt.A.container,{[Jt.A.backgroundImage]:I}),onClick:C,style:I,children:[c>0?(0,b.jsxs)("div",{className:Jt.A.rank,children:[(0,b.jsxs)(E.E,{as:"div",variant:"titleSmall",children:["#",c]}),(0,b.jsx)(E.E,{as:"div",variant:"marginal",children:l.Ru.get("artist-page.world_rank")})]}):null,(0,b.jsxs)("div",{className:Jt.A.content,children:[!w&&(0,b.jsx)($t.e,{images:o,label:n,width:204,userIconSize:"xxlarge",className:Jt.A.avatar}),"number"==typeof u?(0,b.jsx)(E.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",children:l.Ru.get("artist.monthly-listeners-count",u)}):null,r?(0,b.jsx)(E.E,{as:"div",variant:"bodyMedium",className:Jt.A.bio,semanticColor:"textBase",dir:"auto",children:(0,b.jsx)(Zt.N,{source:r})}):null]})]})}),(0,b.jsx)(Xt.y,{artistUri:t,name:n,bio:r,bioSource:s,worldRank:c,images:a,topCities:d,followers:m,externalLinks:p,isOpen:v,closeModal:S,monthlyListeners:u})]})}));var tn=n(59416),nn=n(28413),rn=n(62166),sn=n(64658),an=n(97997),on=n(5513),ln=n(36833),cn=n(91520),un=n(22259),dn=n(43204),mn=n(98930),pn=n(14251),hn=n(59492),gn=n(11283),fn=n(23689),bn=n(79851),vn=n(33013),yn=n(26715),_n=n(74946);const En="E64Aqe4DifpZfJ3HxEQS",xn="A44bgDs9J8gR5qVL4Z_O",Cn="ozW8kJYzvGHcaziSgng1",Sn="RIgMOMSyHAvNo0kLOSXO",An="Y9rIAfZ2nGTKyFVlXICX",wn="uIuvDLmQPX6JZsDmExzo",In="l0P94E5n3xjCXoXzfn6y",Tn="xhOFu9N7SDDP5JW2ojTM",Nn="KACP30WrBwPkgobLGugK",Rn="aZey7f2Ah4IST3nJKBKv",kn="EsuFmWqqVzGvcitNzsTF",On="iDJph3laUMvl4doSMqrQ",Pn="CqmgEsI3tWpc44q8ZwLa",jn="Q7WxZ6Rqw7tiaXDJSYgX",Ln="U4dRtCN6ReBuTaWJIing",Dn="j5DrMWga0MWWvUYPFOMU",Un=({userStats:e})=>{const t=e.map(((e,t)=>(0,b.jsx)(vn.H,{className:Pn,children:(0,b.jsx)(yn.n,{colSpan:4,className:jn,children:(0,b.jsxs)("div",{className:Rn,children:[(0,b.jsx)("div",{className:kn,children:t+=1}),(0,b.jsx)(un._,{src:e.profileImg,circle:!0,imageHeight:"50px",imageWidth:"50px"}),(0,b.jsxs)("div",{className:On,children:[(0,b.jsx)(E.E,{as:"p",children:e.displayName}),(0,b.jsxs)(E.E,{as:"p",className:Ln,children:[e.minutesPlayed,"m"]})]})]})})},t)));return(0,b.jsxs)(_n.X,{className:Nn,children:[(0,b.jsxs)("colgroup",{children:[(0,b.jsx)("col",{}),(0,b.jsx)("col",{width:"50%"}),(0,b.jsx)("col",{width:"50%"})]}),(0,b.jsx)("tbody",{children:t})]})};var Mn=n(75995),Bn=n(23659),Fn=n(85786),Hn=n(61080);const Vn="b1Rhjl3dFO39RoDTpCwr",zn="_A6KNlew96CMG9zGEoSR",Gn="at5T9EjEjuMMX0g3NmdY",Wn="MvJSv86BVOI1EjlzFuwf",Kn="J7b21rpwMsjiVjuU9QIm",Yn="KV0sKMTPHRA3r6qSFmOC",qn="He2lECsrxSUiDWhWPhtQ",Qn="bozxeqVBf0s66lJAscDE",$n="BWkDzCnCKQTrdpNxoFdq",Zn="HBjkEVu3Dh1ud610TTAG",Xn="pEsoJuiOkk3nsFR0gBQj",Jn=({setShowLeaderboard:e,setShowLeaderboardShareCard:t,artistInfo:n,currentUserInfo:i})=>{const{minutesPlayed:r,percentile:s,profileImg:a}=i;return(0,b.jsx)(Mn.j,{"aria-label":"Title",id:"dialogAlert",colorSet:"mutedAccent",className:Vn,body:(0,b.jsxs)("div",{className:zn,children:[(0,b.jsx)("div",{className:Gn,children:(0,b.jsx)(gn.H,{"aria-label":"close-share-card",iconOnly:Bn.g,onClick:()=>t(!1)})}),(0,b.jsx)("div",{className:Wn,children:(0,b.jsx)(gn.H,{"aria-label":"close-leaderboard-dialog",iconOnly:fn.M,onClick:()=>e(!1),size:"small"})}),(0,b.jsxs)("div",{className:Kn,children:[(0,b.jsxs)("div",{className:Yn,children:[(0,b.jsxs)("div",{className:qn,children:[(0,b.jsx)(un._,{circle:!0,imageHeight:"100px",imageWidth:"100px",src:a,className:Qn,style:{gridColumnStart:1,zIndex:1}}),(0,b.jsx)(un._,{circle:!0,imageHeight:"100px",imageWidth:"100px",src:n.profileImg,className:Qn,style:{gridColumnStart:4}})]}),(0,b.jsxs)(E.E,{as:"p",variant:"marginal",children:[(0,b.jsxs)("span",{className:$n,children:[r,"M"]})," ","STREAMED THIS WEEK"]}),(0,b.jsxs)(E.E,{as:"p",variant:"titleMedium",className:Zn,children:["I'M IN THE",(0,b.jsxs)("span",{className:$n,children:[s,"%"]})," ","OF ",(0,b.jsx)("span",{children:n.displayName.toUpperCase()})," LISTENERS THIS WEEK."]}),(0,b.jsx)("div",{className:Xn,children:(0,b.jsx)(Fn.D,{size:"large"})})]}),(0,b.jsx)(Hn.$,{"aria-label":"share-button",colorSet:"invertedLight",children:"Share this"})]})]})})},ei=({setShowLeaderboard:e,artistInfo:t,currentUserInfo:n,userStats:r})=>{const[s,a]=(0,i.useState)(!1);return(0,b.jsx)(pn.z,{center:!0,withPortal:!0,children:s?(0,b.jsx)(Jn,{setShowLeaderboard:e,setShowLeaderboardShareCard:a,artistInfo:t,currentUserInfo:n}):(0,b.jsx)(hn.Q,{className:En,dialogTitle:(0,b.jsxs)("div",{className:xn,children:[(0,b.jsx)(un._,{src:"https://i.scdn.co/image/a8f3fe2c87edf4f67acb629d832e65846c451afc",className:Cn,circle:!0,imageHeight:"40px",imageWidth:"40px"}),(0,b.jsx)(un._,{src:t.profileImg,className:Sn,circle:!0,imageHeight:"60px",imageWidth:"60px"}),(0,b.jsx)("div",{className:An,children:(0,b.jsx)(E.E,{as:"p",children:t.displayName})}),(0,b.jsx)("div",{className:wn,children:(0,b.jsxs)(E.E,{as:"p",children:["You listened to ",t.displayName," for"," ",(0,b.jsxs)("span",{className:Dn,children:[n.minutesPlayed,"m"]})," ","this week, putting you in the top"," ",(0,b.jsxs)("span",{className:Dn,children:[n.percentile,"%"]})," ","of spotify employees."]})}),(0,b.jsx)("div",{className:In,children:(0,b.jsx)(gn.H,{iconOnly:fn.M,size:"small",semanticColor:"textSubdued",onClick:()=>e(!1)})}),(0,b.jsx)("div",{className:Tn,children:(0,b.jsx)(gn.H,{iconOnly:bn.y,size:"large",onClick:()=>a(!0)})})]}),"aria-label":"Title",id:"dialogAlert",colorSet:"mutedAccent",footer:(0,b.jsx)(Un,{userStats:r})})})},ti="vNdax_mdLJrMon3dL2Ib",ni="vRMKKo2voS6p6Hh56OZC",ii="Dj9VIS37dpj7sdFnDCki",ri="xBgDFq1PqqU0GaXusIRj",si=(0,i.memo)((function({artistId:e}){const t=(0,mn.h)(),[n,r]=(0,i.useState)(!1),[s,a]=(0,i.useState)();if((0,i.useEffect)((()=>{(async()=>{await t.get(`https://spclient.wg.spotify.com/leaderboard-artist-service/v1/leaderboardartist/${e}`).then(a)})()}),[e,t]),!s)return(0,b.jsx)(cn.I,{});const{artistInfo:o,currentUserInfo:l,userStats:c}=s,u=c.slice(0,3).map(((e,t)=>(0,b.jsx)(i.Fragment,{children:e.profileImg?(0,b.jsx)(un._,{circle:!0,imageHeight:"50px",imageWidth:"50px",src:e.profileImg,className:ii,style:{gridColumnStart:t+1}}):(0,b.jsx)(dn.v,{size:"large",className:ii,style:{gridColumnStart:t+1}})},t)));return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{onClick:()=>{r(!0)},className:ti,children:[(0,b.jsx)("div",{className:ni,children:u}),(0,b.jsxs)("div",{className:ri,children:[(0,b.jsx)(E.E,{as:"p",variant:"bodySmallBold",semanticColor:"textBase",children:"View Employee Leaderboard"}),(0,b.jsxs)(E.E,{as:"p",children:["You're in the top ",l.percentile,"% of Listeners"]})]})]}),n?(0,b.jsx)(ei,{setShowLeaderboard:r,artistInfo:o,currentUserInfo:l,userStats:c}):null]})}));var ai=n(67976),oi=n(71132);const li=i.memo((function({uri:e,spec:t,logger:n,backgroundColor:r,name:s,sharingInfo:a,artistId:o}){const c=(0,ve.NC)(we.r6I),[u,d]=(0,$e.A)(e),m=(0,qe.W)(),p=(0,oi.X)(),h=i.useMemo((()=>t.actionBarFactory()),[t]),{togglePlay:g,isActive:f,isPlaying:v}=(0,Re.P)({uri:e},{featureIdentifier:"artist"}),y=i.useCallback((()=>{const t=(0,rn.$I)({isPlaying:v,isActive:f,spec:h.playButtonFactory(),logger:n,uri:e});g({loggingParams:t})}),[g,f,v,e,h,n]),_=(0,i.useCallback)((async()=>{m({targetUri:e,intent:u?"unsave":"save",type:"click"});const i=t.actionBarFactory().followButtonFactory().hitFollow({itemToBeFollowed:e}),r=t.actionBarFactory().followButtonFactory().hitUnfollow({itemToBeUnfollowed:e});n.logInteraction(u?r:i);try{await d(!u)}catch{}}),[m,e,u,d,t,n]),E=(0,ln.j)();return(0,b.jsxs)(an.E,{backgroundColor:r,children:[(0,b.jsxs)(on.S,{children:[(0,b.jsx)(Ve.D,{size:E,onClick:y,isPlaying:v,uri:e}),p&&(0,b.jsx)(sn.r,{spec:h,children:(0,b.jsx)(ai.Y,{entityName:s,contextUri:e,activationPlacement:"bottomEnd",size:E})}),(0,b.jsx)(Ue.e,{children:(0,b.jsx)(nn.W,{isFollowing:u,onClick:_})}),(0,b.jsx)(Le.b,{menu:(0,b.jsx)(tn.t,{uri:e,sharingInfo:a}),children:(0,b.jsx)(je.e,{label:l.Ru.get("more.label.context",s),size:E})})]}),c?(0,b.jsx)(si,{artistId:o}):null]})})),ci="qB6S3KrJlMCx4WS4zOtl",ui="EmeHQXR87mUskYK6xEde",di="qELskYs6YdzzafmETrAg",mi="fnphAtjtCDYY99lYBfLK",pi="hLi0oogSdDKAIC_rnfP1",hi="xN866HUyMGAaemLBKQQx",gi="cWcQITygrzZTduXuXope",fi="BpBrwbAwIMryupCOXJzw",bi="FOgY6uo_Bj_VTV5hwaix",vi="PHHrto0Qhh4dJcnnPhwu",yi="dIlzffEKwokwWI5sqYJN",_i="SMBqsyNXIMb0yeYVwPxv",Ei="yT49w5mDxTaLK9lL59Gd",xi="D6IunHuzuULf_Sr88GOA",Ci="b_dSllo9kearPhsw_MSp",Si="ZkkYlSbVnEhF1urK3rKO";function Ai(e){const t=e[0];return!(!t||!("releases"in t))}const wi=({artistId:e,artistUri:t,artistName:n,discography:r,shelfIndex:s,spec:a})=>{const[o,c]=(0,i.useState)("popularReleasesAlbums"),u=(0,i.useMemo)((()=>a.discographyShelfFactory({position:s})),[a,s]),d=(0,A.s)(),p=(0,i.useMemo)((()=>[r.popularReleasesAlbums.totalCount>0?"popularReleasesAlbums":null,r.singles.totalCount>0?"singles":null,r.albums.totalCount>0?"albums":null,r.compilations.totalCount>0?"compilations":null].filter(Boolean)),[r]),h=(0,i.useCallback)((e=>{const t=u.chipsFactory().chipFactory({identifier:e,position:p.indexOf(e)}).hitFilter();d.logInteraction(t),c(e)}),[u,p,d]),g=(0,i.useCallback)((()=>(0,b.jsx)(b.Fragment,{children:(0,b.jsxs)("div",{className:_()(ci),children:[r.popularReleasesAlbums.totalCount>0&&(0,b.jsx)(x.v,{selected:"popularReleasesAlbums"===o,onClick:()=>h("popularReleasesAlbums"),selectedColorSet:"invertedLight",children:l.Ru.get("artist-page.popular")}),r.albums.totalCount>0&&(0,b.jsx)(x.v,{selected:"albums"===o,onClick:()=>h("albums"),selectedColorSet:"invertedLight",children:l.Ru.get("artist.albums")}),r.singles.totalCount>0&&(0,b.jsx)(x.v,{selected:"singles"===o,onClick:()=>h("singles"),selectedColorSet:"invertedLight",children:l.Ru.get("artist.singles")}),r.compilations.totalCount>0&&(0,b.jsx)(x.v,{selected:"compilations"===o,onClick:()=>h("compilations"),selectedColorSet:"invertedLight",children:l.Ru.get("artist.compilations")})]})})),[r,o,h]);let f=r[o];"popularReleasesAlbums"===o&&r.latest&&(f={...r[o],items:[r.latest,...r[o].items.filter((e=>e.uri!==r.latest?.uri))]});let v="all";"albums"===o?v=ke._m.Album.toLowerCase():"singles"===o?v=ke._m.Single.toLowerCase():"compilations"===o&&(v=ke._m.Compilation.toLowerCase());const y=`${(0,Mt.Dh)(e)}:discography:${v}`,E=(0,i.useCallback)((()=>{const e=u.shelfHeaderFactory().titleFactory().hitUiNavigate({destination:y??""});d.logInteraction(e)}),[d,y,u]),C=(0,i.useCallback)((()=>{const e=u.shelfHeaderFactory().seeAllButtonFactory().hitUiNavigate({destination:y??""});d.logInteraction(e)}),[d,y,u]),S=(0,w.t)(u),I=f.items;return(0,b.jsx)(zt.pZ,{value:"shelf/discography",children:(0,b.jsx)(m.$,{total:f.totalCount,title:l.Ru.get("artist-page.discography"),seeAllUri:y,alwaysShowSeeAll:!0,className:pi,renderSubHeader:g,onClickShelfTitle:E,onClickShelfSeeAll:C,elementRef:S,children:(Ai(I)?(0,Mt.Ey)(I):I).map(((e,i)=>(0,b.jsx)(zt.pZ,{value:"card",index:i,children:(0,b.jsx)(ht.R,{latest:e.uri===r.latest?.uri,showType:!0,...(0,ye.m)(e,t,n),index:i})},e.uri)))})})};var Ii=n(62201),Ti=n(34340),Ni=n(88713),Ri=n(72423);const ki="RClL7GUhUo_xqzNcsXSG",Oi="EQaztpbGtXeN7V1cjAP4",Pi="tYSzgx8hG37WjBDn364n",ji="_4XNZPDdnyq1HHKG5Qtx",Li="DehN40s8150pzqyBfGN_",Di="ZiRNxR2_6cTTMHIqpwzl",Ui=({offer:e,index:t,spec:n,titleVariant:r})=>{const{name:s,uri:a,description:o,image:l,url:c}=e,u=(0,A.s)(),d=(0,i.useMemo)((()=>n.merchCardFactory({identifier:a,uri:c||"",position:t})),[c,a,n,t]),m=(0,w.t)(d);if(!s||!c)return null;const p=e=>{e?.stopPropagation();const t=d.hitNavigateToExternalUri({destination:c});u.logInteraction(t)};return(0,b.jsxs)("div",{className:ki,ref:m,onClick:()=>{p(),window.open(c,"_blank")},children:[l?.sources?.[0]?.url&&(0,b.jsx)(Ri._,{src:l.sources[0].url,className:Oi,alt:s,width:"48",height:"48",loading:"lazy"}),(0,b.jsxs)("div",{className:Pi,children:[(0,b.jsx)(Ni.Zp,{label:s,showDelay:Ni.uF,children:(0,b.jsx)(E.E,{as:"a",href:c,target:"_blank",onClick:p,variant:r,semanticColor:"textBase",className:ji,"":"offer-name",children:s})}),(0,b.jsx)(Ni.Zp,{label:o,showDelay:Ni.uF,children:(0,b.jsx)(E.E,{as:"p",variant:"bodySmall",className:Li,children:o})})]}),(0,b.jsx)(Ti.H,{size:"small",className:Di,"aria-hidden":"true"})]})},Mi=({items:e,className:t,merchVariant:n,artistId:i="",variant:r="bodyMediumBold"})=>{const{spec:s}=(0,I.r)(Ii.k,{data:{identifier:i,uri:(0,Mt.ay)(i),position:0,reason:n}});return(0,b.jsx)("ul",{className:t,children:e.map(((e,t)=>(0,b.jsx)("li",{children:(0,b.jsx)(Ui,{offer:e,index:t,spec:s,titleVariant:r})},e.uri+t)))})},Bi="GC3MlDrKu2PcuU6ymC1g",Fi="GLAXysTPuIgv3GRPVlhS",Hi="pZag8sthfxTLjP1tsOfV",Vi="lkXpBMSmNP9w702sek8V",zi="XlmJIRaVv7a23oYq6lwU",Gi="iy5hzmfkdXQ0B2SFZAyj",Wi="pJXRyroA6LuPSsKI8MrD",Ki="lmvQXQeHS4JcYWGciCt3";var Yi=n(87344);const qi="vQqlnrnZi2f4zrYRQvKW",Qi="OMowV_mBy8tlBELzbuTi",$i=({prerelease:e,spec:t})=>{const n=e.coverArt[0],r=(0,Yi.C)(e.albumType),s=(0,A.s)(),a=(0,i.useCallback)((()=>{s.logInteraction(t.albumImageFactory().hitUiNavigate({destination:e.uri}))}),[s,e.uri,t]),o=(0,i.useCallback)((()=>{s.logInteraction(t.albumNameFactory().hitUiNavigate({destination:e.uri}))}),[s,e.uri,t]);return(0,b.jsxs)("div",{className:qi,children:[(0,b.jsx)(S.Link,{to:e.uri,onClick:a,children:(0,b.jsx)(Ri._,{src:n.url,alt:e.title,width:"88",height:"88",loading:"eager",radius:4})}),(0,b.jsxs)("div",{className:Qi,children:[(0,b.jsx)(S.Link,{to:e.uri,onClick:o,children:(0,b.jsx)(E.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",children:e.title})}),(0,b.jsx)(E.E,{as:"div",variant:"bodySmall",children:r})]})]})},Zi=({prerelease:e,className:t,spec:n})=>(0,b.jsxs)("div",{className:t,children:[(0,b.jsx)(E.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Bi,children:l.Ru.get("web-player.artist.upcoming-release")}),(0,b.jsx)($i,{prerelease:e,spec:n})]});var Xi=n(88291),Ji=n(29117),er=n(27699),tr=n(80007),nr=n(79130),ir=n(11867),rr=n(97247),sr=n(5745),ar=n(42976),or=n(6950),lr=n(46545);const cr="S9KkAiRE_O9ax0Jv_D1i",ur=()=>{const e=(0,rr.y)();return(0,b.jsx)(tr.M,{text:l.Ru.get("artist.verified"),className:_()({[cr]:e===ir.E.SMALL})})},dr=i.memo((function({uri:e,artist:{name:t,sharingInfo:n,verified:r,monthlyListeners:s,headerImage:{sources:a,extractedColors:o},avatarImage:{sources:c,extractedColors:u}},spec:d}){const m=(0,A.s)(),p=(0,i.useMemo)((()=>d.topBarFactory()),[d]),h=(0,w.t)(p),g=(0,i.useMemo)((()=>d.topBarFactory().playButtonFactory()),[d]),{togglePlay:f,isActive:v,isPlaying:y}=(0,Re.P)({uri:e},{featureIdentifier:"artist"}),_=i.useCallback((()=>{const t=(0,rn.$I)({isPlaying:y,isActive:v,spec:g,logger:m,uri:e});f({loggingParams:t})}),[f,y,v,e,g,m]),E={backgroundColor:(0,nr.z)(o?.colorRaw.hex||u?.colorRaw.hex||null)},x=a.length>0;return x&&(E.backgroundImages=a),(0,b.jsxs)(Ji.z,{...E,children:[(0,b.jsxs)(er.h,{ref:h,children:[(0,b.jsx)(Ve.D,{size:"medium",onClick:_,isPlaying:y,uri:e}),(0,b.jsx)(Me.X,{text:t,dragUri:e,dragLabel:t})]}),x?null:(0,b.jsx)(Xi.h,{menu:(0,b.jsx)(tn.t,{uri:e,sharingInfo:n}),children:(0,b.jsx)(ar.K,{dragUri:e,images:(c||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),name:t,placeholderType:"artist",shape:Be.u.CIRCLE})}),(0,b.jsxs)(or.Y,{children:[r&&(0,b.jsx)(ur,{}),(0,b.jsx)(Xi.h,{menu:(0,b.jsx)(tn.t,{uri:e,sharingInfo:n}),children:(0,b.jsx)(lr.mm,{dragUri:e,dragLabel:t,children:t})}),(0,b.jsx)(sr.Z,{children:l.Ru.get("artist.monthly-listeners-count",s)})]})]})}));var mr=n(66675),pr=n(52995);const hr="JJvGfNiGtduy_XoXPFT1",gr="fYeCAFmjlgTatXRJ2v0b",fr="vJIXF1I7CfyfTyCa9JkP",br="ZEsebSb1CaZVzuPawZEj",vr="j2wjzbkgYnFp7ey8JIp0",yr="JNLGmI_C2cdhHFxe0oxm",_r="O36HCbLOjWcWkAwkNXqJ",Er="GS_6HA9xIobh5dt5VUSY",xr="EIxjItP8eBZ1eAT7c4Aq",Cr="H3mjE6AEBDPRuHNKUpRK",Sr=i.memo((function(e){const t=(0,A.s)(),{avatarImages:n=[],name:r,spec:s,item:a,comment:o}=e,l=a.itemV2.data,c=l.url??"",u=l.name,d=l.price,m=(0,Yt.g)(l.image?.sources,{desiredWidth:640})?.url??"",p=!!o,h=(0,i.useCallback)((()=>{const e=s.artworkFactory().hitNavigateToExternalUri({destination:c});t.logInteraction(e),window.open(c,"_blank","noopener")}),[s,t,c]),g=(0,i.useCallback)((e=>{e.stopPropagation();const n=s.linkFactory().hitNavigateToExternalUri({destination:c});t.logInteraction(n),window.open(c,"_blank","noopener")}),[s,t,c]);return(0,b.jsx)(b.Fragment,{children:(0,b.jsxs)("div",{className:hr,onClick:h,"":"artist-pick-merch-container",children:[(0,b.jsx)("img",{className:_()(fr),src:m,alt:"merch"}),(0,b.jsx)("div",{className:gr}),(0,b.jsxs)("div",{children:[p&&(0,b.jsxs)("div",{className:_()(Cr,Er),children:[(0,b.jsx)($t.e,{images:n,label:r,width:24,userIconSize:"small",className:xr}),(0,b.jsx)(E.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:o,"":"merch-artist-pick-comment",children:o})]}),(0,b.jsxs)("div",{className:br,children:[(0,b.jsx)(E.E,{as:"h1",variant:"titleSmall",className:vr,children:u}),(0,b.jsx)(E.E,{as:"p",variant:"bodySmallBold",className:yr,children:d}),(0,b.jsx)(mr.n,{size:"small",className:_r,onClick:g,href:c,component:pr.v,"":"artist-pick-merch-button-link",children:"Go to item"})]})]})]})})})),Ar=["AlbumResponseWrapper","ArtistResponseWrapper","PlaylistResponseWrapper","TrackResponseWrapper","EpisodeOrChapterResponseWrapper","PreReleaseResponseWrapper","ConcertResponseWrapper","MerchResponseWrapper"];const wr=["Album","Artist","Playlist","Track","Episode","PreRelease","Concert","Merch"];function Ir(e){return t=e.itemV2,Ar.includes(t.__typename)&&wr.includes(e.itemV2.data.__typename);var t}var Tr=n(15138),Nr=n(45640);const Rr="guUl5dHbF5HJRvwjBxzR",kr="Pnz4fz1OZWV19CVEQJDx",Or="HciFabcIqzhXoDbtwR92",Pr="PNadLEAqpH87jY11pma4",jr="yWkJ7Ua3DnSTaHxG2qgv",Lr="By3HGkfBq3fa6bjrhrli",Dr="ukV8NB0JGnieUOa0eri5",Ur="HGhEGu5V84RXBk6XAPQ6",Mr="kwzBRpFigKr1EP2d5qle",Br=({artistName:e,avatarImages:t,backgroundImageUrl:n,itemImageUrl:i,itemName:r,itemType:s,itemUri:a,comment:o,handleLinkClick:l,handleArtistPickImageClick:c,onDragStart:u})=>(0,b.jsx)(b.Fragment,{children:(0,b.jsxs)("section",{className:Rr,"":"artist-pick-with-background-container",draggable:!0,onDragStart:u,children:[(0,b.jsx)(Ri._,{src:n,alt:"merch",loading:"eager"}),(0,b.jsx)("div",{className:Or}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("section",{className:_()(Mr,Dr),children:[(0,b.jsx)($t.e,{images:t,label:e,width:24,userIconSize:"small",className:Ur}),(0,b.jsx)(E.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:o??"",children:o})]}),(0,b.jsxs)("section",{className:Pr,children:[(0,b.jsx)("div",{children:(0,b.jsx)(Ri._,{src:i,className:jr,alt:"",width:"76",height:"76",loading:"eager"})}),(0,b.jsxs)("div",{className:Lr,children:[(0,b.jsx)(E.E,{as:"div",variant:"bodyMediumBold",children:(0,b.jsx)(S.default,{to:a,onClick:l,"":"artist-pick-link",children:r})}),(0,b.jsx)(E.E,{as:"div",variant:"bodySmall",children:s})]})]})]}),(0,b.jsx)("div",{onClick:c,className:kr})]})});function Fr(e){const t=e?.itemV2.data;switch(t.__typename){case"Album":case"Playlist":case"Track":case"Episode":case"Merch":return t.name;case"Artist":return t.profile.name;case"PreRelease":return t.preReleaseContent?.name??"";case"Concert":return t.title;default:return(0,Nr.d)(t),""}}const Hr=i.memo((function(e){const{avatarImages:t=[],artistName:n,item:s,className:o="",spec:c}=e,u=s.comment,d=s.itemV2.data.uri,m=Fr(s),p=function(e){const t=e.itemV2.data;switch(t.__typename){case"Album":switch(t.type){case ke._m.Album:return l.Ru.get("album");case ke._m.Single:return l.Ru.get("single");case ke._m.Compilation:return l.Ru.get("compilation");case ke._m.Ep:return l.Ru.get("ep");default:return l.Ru.get("album")}case"Artist":return l.Ru.get("artist");case"Playlist":return l.Ru.get("playlist");case"Track":return l.Ru.get("song");case"Episode":return l.Ru.get("card.tag.episode");case"PreRelease":switch(t.preReleaseContent?.type){case"ALBUM":return l.Ru.get("web-player.artist.upcoming-release.album");case"EP":return l.Ru.get("web-player.artist.upcoming-release.ep");case"SINGLE":return l.Ru.get("web-player.artist.upcoming-release.single");default:return""}case"Merch":return l.Ru.get("web-player.merch.title");case"Concert":return"";default:return(0,Nr.d)(t),""}}(s),h=(0,A.s)(),g=(0,r.Zp)(),{draggable:f,onDragStart:v}=(0,Ye.P)({itemUris:[d],dragLabelText:m}),y=(0,i.useCallback)((()=>{const e=(0,a.o_)(d).toURLPath(!0),t=c.artworkFactory().hitUiNavigate({destination:e});h.logInteraction(t),g(e)}),[d,c,h,g]),x=(0,i.useCallback)((()=>{const e=(0,a.o_)(d).toURLPath(!0),t=c.linkFactory().hitUiNavigate({destination:e});h.logInteraction(t)}),[d,c,h]),C=function(e){const t=e.itemV2.data;switch(t.__typename){case"Album":return t.coverArt;case"Artist":return t.visuals.avatarImage;case"Playlist":return t.images.items[0]??null;case"Track":return t.albumOfTrack?.coverArt??null;case"Episode":{const e=(0,Yt.g)(t.coverArt?.sources,{desiredHeight:300});return e?{sources:[e]}:null}case"PreRelease":{const e=(0,Yt.g)(t.preReleaseContent?.coverArt?.sources,{desiredHeight:300});return e?{sources:[e]}:null}case"Concert":case"Merch":return t.image;default:return(0,Nr.d)(t),null}}(s),w=C?.sources[0]?.url,I=!!u,T=u||l.Ru.get("acq.artist.about.attribution",{artist:n}),N=(0,Dt.N)({data:{identifier:n,uri:d,position:0,reason:"Artist pick: Concert"}});const R=function(){if(function(e){return"MerchResponseWrapper"===e.itemV2.__typename&&"Merch"===e.itemV2.data.__typename&&!!e.itemV2.data.url}(s))return(0,b.jsx)(Sr,{name:n,item:s,comment:u,avatarImages:t,spec:c});if(function(e){return"ConcertResponseWrapper"===e.itemV2.__typename&&"Concert"===e.itemV2.data.__typename&&!!e.itemV2.data.venue}(s)){const e=s.itemV2.data;return(0,b.jsx)(Tr.I,{concert:{uri:e.uri,date:e.date,venue:e.venue,title:e.title},spec:N})}return s.backgroundImage?.sources[0].url?(0,b.jsx)(Br,{avatarImages:t,artistName:n,itemName:m,itemType:p,itemUri:d,itemImageUrl:w??"",comment:T,backgroundImageUrl:s?.backgroundImage?.sources[0].url,handleArtistPickImageClick:y,handleLinkClick:x,onDragStart:v}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{onClick:y,className:Hi,onDragStart:v,draggable:f,"":"artist-pick-image-container",children:(0,b.jsx)(Ri._,{src:w,className:Vi,alt:"",width:"88",height:"88",radius:4,loading:"eager"})}),(0,b.jsxs)("div",{onDragStart:v,draggable:f,children:[(0,b.jsxs)("div",{className:_()({[zi]:!0,[Ki]:I}),children:[(0,b.jsx)($t.e,{images:t,label:n,width:24,userIconSize:"small",className:Gi}),(0,b.jsx)(E.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:T,children:T})]}),(0,b.jsx)(E.E,{as:"div",variant:"bodyMediumBold",children:(0,b.jsx)(S.default,{to:d,onClick:x,"":"artist-pick-link",children:Fr(s)})}),(0,b.jsx)(E.E,{as:"div",variant:"bodySmall",className:Wi,children:p})]})]})}();return(0,b.jsxs)("div",{className:o,children:[(0,b.jsx)(E.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Bi,children:l.Ru.get("artist-page.artists-pick")}),(0,b.jsx)("div",{className:Fi,children:R})]})})),Vr=i.memo((function(e){const{item:t}=e;return Ir(t)?(0,b.jsx)(Hr,{...e,item:t}):null}));var zr=n(60923);const Gr="unaQVpO_antcqfMwSmsh",Wr="ECjQBV2evKE5PXHKhXV_",Kr="W_VvjqdqWRSlMRjRPkPb",Yr="pUNc2aOeOQANHrhYa1GU",qr="T_JcGdJujSuj014SZfjl",Qr="RDZ61ETnag1ilfZTkVxe",$r=e=>{const{uri:t,name:n,nrTracks:s,avatarImages:o=[],className:c="",spec:u}=e,d=(0,A.s)(),m=(0,r.Zp)(),p=(0,i.useCallback)((()=>{const e=u.artistFactory().hitUiNavigate({destination:(0,a.o_)(t).toURLPath(!0)});d.logInteraction(e),m((0,a.o_)(t).toURLPath(!0))}),[u,t,d,m]),h=(0,i.useCallback)((()=>{const e=u.linkFactory().hitUiNavigate({destination:(0,a.o_)(t).toURLPath(!0)});d.logInteraction(e)}),[u,d,t]);return(0,b.jsxs)("div",{className:c,children:[(0,b.jsx)(E.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Gr,children:l.Ru.get("artist-page.saved-header")}),(0,b.jsxs)("div",{className:Wr,children:[(0,b.jsxs)("div",{onClick:p,className:Yr,"":"saved-tracks-avatar",children:[(0,b.jsx)($t.e,{images:o,label:n,width:88,userIconSize:"xxlarge"}),(0,b.jsx)("div",{className:qr,children:(0,b.jsx)(zr.F,{size:"xsmall",className:Qr})})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(E.E,{as:"div",variant:"bodyMediumBold",children:(0,b.jsx)(S.default,{to:t,onClick:h,"":"saved-tracks-link",children:l.Ru.get("artist-page.saved-tracks-amount",s)})}),(0,b.jsx)(E.E,{as:"div",variant:"bodySmall",className:Kr,children:l.Ru.get("artist-page.saved-by-artist",n)})]})]})]})};function Zr(e){return null!=e}const Xr=i.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,Mt.ay)(e),n=(0,ve.NC)(we.dAx),s=(0,ve.NC)(we.xnZ),a=(0,ve.NC)(we.DqB),m=(0,ve.NC)(we.LX5),{spec:p,logger:h,UBIFragment:g}=(0,I.r)(Ot.a,{data:{identifier:e,uri:t}}),v=i.useMemo((()=>p.headerFactory()),[p]),y=i.useMemo((()=>p.featuredFactory().popularTracksFactory()),[p]),x=i.useMemo((()=>p.offersFactory()),[p]),{loading:C,error:S,data:A}=(0,Qt.A)(t),w=(0,Gt.dB)({offset:0,limit:1,uri:t});if(null===A||null===A.artistUnion||"Artist"!==A.artistUnion?.__typename||S||C)return(0,b.jsx)(d.A,{hasError:null!==S,errorMessage:l.Ru.get("error.request-artist-failure")});const T=A?.artistUnion?.profile.name,N=A.artistUnion,R=N.relatedContent.relatedArtists.items,k=N.sharingInfo,O=N.relatedContent.featuringV2.items,P=N.discography.latest,{totalCount:j,items:L}=N.discography.popularReleasesAlbums,D=L,U=j||D.length,M=(0,Mt.Ey)(N.relatedContent.appearsOn.items),B=N.discography.topTracks.items.map((e=>(0,f.fX)(e,t))),F=N.relatedContent.discoveredOnV2.items,{stats:{monthlyListeners:H,followers:V,worldRank:z,topCities:G},preRelease:W,profile:{name:K,verified:Y,pinnedItem:q,biography:Q,externalLinks:$,playlistsV2:Z},visuals:{headerImage:X,avatarImage:J,gallery:ee},goods:{events:te,merch:ne}}=N,ie=(re=W)&&re.releaseDate?.isoString&&re.preReleaseContent?.name&&re.preReleaseContent.coverArt?.sources?0===re.preReleaseContent.coverArt.sources.length?null:{albumType:re.preReleaseContent.type,title:re.preReleaseContent.name,uri:re.uri,releaseDate:new Date(re.releaseDate.isoString),coverArt:re.preReleaseContent.coverArt.sources}:null;var re;const se=s&&ie,ae=w?.totalLength||se||!!q,oe=(P?[P,...D]:D).filter(Zr).filter(((e,t,n)=>n.map((e=>e.uri)).indexOf(e.uri)===t));const le=X?.extractedColors?.colorRaw.hex||J?.extractedColors?.colorRaw.hex||kt.gray30,ce="RelatedVideoPage"===N.relatedVideos.__typename?N.relatedVideos.items.filter((e=>"Track"===e.trackOfVideo.data.__typename)):[];return(0,b.jsxs)("div",{className:xi,children:[(0,b.jsx)(u.Q,{children:(0,Wt.j2)({artistName:T})}),(0,b.jsx)(dr,{uri:t,artist:{sharingInfo:k,monthlyListeners:H||0,name:K,verified:Y||!1,headerImage:X||{sources:[],extractedColors:null},avatarImage:J||{sources:[],extractedColors:null}},spec:v}),(0,b.jsxs)("div",{className:ui,children:[(0,b.jsx)(li,{uri:t,spec:p,logger:h,backgroundColor:le,name:K,sharingInfo:k,artistId:e}),(0,b.jsxs)("div",{className:"contentSpacing",children:[(0,b.jsx)("div",{children:(0,b.jsx)(Ie.E,{colGap:o.lT,render:({columnCount:n})=>{const i={"--column-count":n};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:_()(mi,{[vi]:n<6||!ae}),style:{...i},children:[(0,b.jsx)(E.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ci,children:l.Ru.get("artist.popular-tracks")}),B.length?(0,b.jsx)(g,{spec:y,children:(0,b.jsx)(qt.z,{uri:t,nrTracks:B.length,initialTracks:B})}):null]}),ae&&(0,b.jsxs)("div",{className:_()(gi,{[fi]:n<6}),style:{...i},children:[se&&W?(0,b.jsx)(Zi,{prerelease:ie,className:bi,spec:p.featuredFactory().upcomingReleaseFactory()}):null,w?.totalLength?(0,b.jsx)($r,{className:bi,uri:`${(0,Mt.Dh)(e)}:saved`,name:K,nrTracks:w.totalLength,avatarImages:J?.sources,spec:p.featuredFactory().likedSongsFactory()}):null,q?(0,b.jsx)(Vr,{className:bi,avatarImages:J?.sources,artistName:K,item:q,spec:p.featuredFactory().pickedFactory()}):null]})]})},className:di})}),(0,b.jsxs)(g,{spec:p,children:[(0,b.jsx)(jt.u,{property:we.dAx,renderOldExperience:()=>(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(zt.pZ,{value:"shelf/popular-releases",children:(0,b.jsx)(Lt.p,{total:U+(P?1:0),title:l.Ru.get("artist-page.popular"),className:pi,index:0,id:"popular-releases",children:oe.map(((e,n)=>(0,b.jsx)(zt.pZ,{value:"card",index:n,children:(0,b.jsx)(ht.R,{index:n,latest:e.uri===P?.uri,showType:!0,...(0,ye.m)(e,t,K)})},e.uri)))})}),(0,b.jsx)(zt.pZ,{value:"shelf/albums",children:(0,b.jsx)(Lt.p,{total:N.discography.albums.totalCount,title:l.Ru.get("artist.albums"),seeAllUri:`${(0,Mt.Dh)(e)}:discography:${ke._m.Album.toLowerCase()}`,seeAllLabel:l.Ru.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:pi,index:1,id:"albums",children:(0,Mt.Ey)(N.discography.albums.items).map(((e,n)=>(0,b.jsx)(zt.pZ,{value:"card",index:n,children:(0,b.jsx)(ht.R,{index:n,latest:e.uri===P?.uri,showType:!0,...(0,ye.m)(e,t,K)})},e.uri)))})}),(0,b.jsx)(zt.pZ,{value:"shelf/singles-and-eps",children:(0,b.jsx)(Lt.p,{total:N.discography.singles.totalCount,title:l.Ru.get("artist.singles"),seeAllUri:`${(0,Mt.Dh)(e)}:discography:${ke._m.Single.toLowerCase()}`,seeAllLabel:l.Ru.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:pi,index:2,id:"singles-and-eps",children:(0,Mt.Ey)(N.discography.singles.items).map(((e,n)=>(0,b.jsx)(zt.pZ,{value:"card",index:n,children:(0,b.jsx)(ht.R,{index:n,latest:e.uri===P?.uri,showType:!0,...(0,ye.m)(e,t,K)})},e.uri)))})}),(0,b.jsx)(zt.pZ,{value:"shelf/compilations",children:(0,b.jsx)(Lt.p,{total:N.discography.compilations.totalCount,title:l.Ru.get("artist.compilations"),seeAllUri:`${(0,Mt.Dh)(e)}:discography:${ke._m.Compilation.toLowerCase()}`,seeAllLabel:l.Ru.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:pi,index:3,id:"compilations",children:(0,Mt.Ey)(N.discography.compilations.items).map(((e,n)=>(0,b.jsx)(zt.pZ,{value:"card",index:n,children:(0,b.jsx)(ht.R,{index:n,latest:e.uri===P?.uri,showType:!0,...(0,ye.m)(e,t,K)})},e.uri)))})})]}),renderNewExperience:()=>(0,b.jsx)(wi,{discography:N.discography,artistId:e,artistUri:t,artistName:K,shelfIndex:0,spec:p})}),(0,b.jsx)(zt.pZ,{value:"shelf/featuring",children:(0,b.jsx)(Lt.p,{total:O.length,title:l.Ru.get("artist-page.featuring",K),seeAllUri:`${(0,Mt.Dh)(e)}:featuring`,className:pi,index:n?1:4,id:"featuring",children:O.map(((e,t)=>{if("Playlist"===e.data.__typename){const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,b.jsx)(zt.pZ,{value:"card",index:t,children:(0,b.jsx)(wt.B,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)},n.uri)}return null}))})}),te.concerts.items&&te.concerts.items.length>0&&(0,b.jsx)(Ht,{artistId:e,total:te.concerts.totalCount,concerts:te.concerts.items}),a===we.OlV.VARIANTB&&ne.items.length>0&&(0,b.jsx)(g,{spec:x,children:(0,b.jsx)(Vt.q,{id:e,uri:(0,Mt.ay)(e),merchItems:ne.items,merchVariant:a})}),(0,b.jsx)(zt.pZ,{value:"shelf/fans-also-like",children:(0,b.jsx)(Lt.p,{total:R.length,title:l.Ru.get("artist-page.fansalsolike"),seeAllUri:`${(0,Mt.Dh)(e)}:related`,className:pi,index:n?2:5,id:"fans-also-like",children:R.map(((e,t)=>(0,b.jsx)(zt.pZ,{value:"card",index:t,children:(0,b.jsx)(Pt.a,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]})},e.uri)))})}),(0,b.jsx)(zt.pZ,{value:"shelf/appears-on",children:(0,b.jsx)(Lt.p,{total:M.length,title:l.Ru.get("artist.appears-on"),seeAllUri:`${(0,Mt.Dh)(e)}:appears-on`,className:pi,index:n?3:6,id:"appears-on",children:M.map(((e,t)=>(0,b.jsx)(zt.pZ,{value:"card",index:t,children:(0,b.jsx)(ht.R,{index:t,showType:!0,...(0,f.Mz)(e)})},e.uri)))})}),Z.items.length?(0,b.jsx)(zt.pZ,{value:"shelf/artist-playlists",children:(0,b.jsx)(Lt.p,{total:Z.totalCount,title:l.Ru.get("artist-page.artist-playlists"),seeAllUri:`${(0,Mt.Dh)(e)}:playlists`,className:pi,index:n?4:7,id:"artist-playlists",children:Z.items.map(((e,t)=>{if("Playlist"===e.data.__typename){const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,b.jsx)(zt.pZ,{value:"card",index:t,children:(0,b.jsx)(wt.B,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)},n.uri)}return null}))})}):null,(0,b.jsx)(zt.pZ,{value:"shelf/discovered-on",children:(0,b.jsx)(Lt.p,{total:F.length,title:l.Ru.get("artist-page.discovered-on",K),seeAllUri:`${(0,Mt.Dh)(e)}:discovered-on`,className:pi,index:n?5:8,id:"discovered-on",children:F.map(((e,t)=>{if("Playlist"===e.data.__typename){const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,b.jsx)(zt.pZ,{value:"card",index:t,children:(0,b.jsx)(wt.B,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)},n.uri)}return null}))})}),m&&ce.length?(0,b.jsx)(zt.pZ,{value:"shelf/related-videos",children:(0,b.jsx)(Lt.p,{total:"RelatedVideoPage"===N.relatedVideos.__typename?N.relatedVideos.totalCount:0,title:l.Ru.get("music_videos"),seeAllUri:`${(0,Mt.Dh)(e)}:related-videos`,className:_()(pi,hi),index:n?6:9,id:"related-videos",children:ce.map(((e,t)=>{if("Track"!==e.trackOfVideo.data.__typename)return null;const{data:n}=e.trackOfVideo;return(0,b.jsx)(zt.pZ,{value:"card",index:t,children:(0,b.jsx)(c.O,{title:n.name,trackUri:n.uri,artists:n.artists.items,album:n.albumOfTrack,contentRating:n.contentRating,referrerIdentifier:"other",index:t})},e.uri)}))})}):null]}),(0,b.jsx)(Ie.E,{render:({columnCount:t})=>(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(en,{className:yi,artistUri:N.uri,name:K,avatarImages:J?.sources.map(Kt.m),bio:Q?.text||"",bioSource:Q?.type||ke.B3.Biography,images:ee.items.map((e=>{const t=e.sources.map(Kt.m);return(0,Yt.g)(t,{desiredLabel:"large",desiredSize:600})})).filter(Zr),worldRank:z||0,monthlyListeners:H,topCities:G.items||[],followers:V,externalLinks:$?.items,spec:p.aboutFactory()}),a===we.OlV.DEFAULT&&ne.items.length?(0,b.jsxs)("div",{className:_()(_i,{[Ei]:t<4}),children:[(0,b.jsx)(E.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ci,children:l.Ru.get("artist-page.merch")}),(0,b.jsx)(g,{spec:x,children:(0,b.jsx)(Mi,{items:ne.items,artistId:e,merchVariant:a})})]}):null]}),colGap:o.lT}),a===we.OlV.VARIANTA&&ne.items.length>0&&(0,b.jsx)(g,{spec:x,children:(0,b.jsx)("div",{className:Si,children:(0,b.jsx)(Vt.q,{id:e,uri:(0,Mt.ay)(e),merchItems:ne.items,merchVariant:a})})})]})]})]})})),Jr=i.memo((function(){return(0,b.jsx)(i.Suspense,{fallback:null,children:(0,b.jsx)(Xr,{})})})),es=Spicetify.GraphQL.Definitions["queryArtistPlaylists"]=new h.l("queryArtistPlaylists","query","54f7e5a5a2af05b7dc98526df376a46c6b15c05440c8dfdc8f6cecb1a807eca7",null),ts=i.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:n,error:i,data:s}=(a={uri:t},c={gcTime:15*p.i},(0,p.I)(es,a,c));var a,c;const h="Artist"===s?.artistUnion.__typename?s.artistUnion:null;if(null===h||i||n)return(0,b.jsx)(d.A,{hasError:null!==i,errorMessage:l.Ru.get("error.request-artist-playlists")});const g=h.profile.name,{items:v}=h.profile.playlistsV2,y=(0,f.bj)(v);return(0,b.jsxs)("div",{className:"contentSpacing",children:[g?(0,b.jsx)(u.Q,{children:l.Ru.get("artist-page.artist-playlists.seo.title",g)}):null,(0,b.jsx)(m.$,{total:y.length,title:l.Ru.get("artist-page.artist-playlists"),showAll:!0,fullPage:!0,rowGap:o.lT,children:y.map(((e,t)=>(0,b.jsx)(wt.B,{index:t,uri:e.uri,name:e.name,authorName:e.authorName||e.name,description:e.description,images:e.images},e.uri)))})]})})),ns=Spicetify.GraphQL.Definitions["queryArtistRelated"]=new h.l("queryArtistRelated","query","3d031d6cb22a2aa7c8d203d49b49df731f58b1e2799cc38d9876d58771aa66f3",null),is=i.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:n,error:i,data:s}=(a={uri:t},c={gcTime:15*p.i},(0,p.I)(ns,a,c));var a,c;const h="Artist"===s?.artistUnion.__typename?s.artistUnion:null;if(null===h||i||n)return(0,b.jsx)(d.A,{hasError:null!==i,errorMessage:l.Ru.get("error.request-related-artists")});const g=h.profile.name,v=h.relatedContent.relatedArtists.items;return(0,b.jsxs)("div",{className:"contentSpacing",children:[g?(0,b.jsx)(u.Q,{children:l.Ru.get("artist-page.fansalsolike.seo.title",g)}):null,(0,b.jsx)(m.$,{title:l.Ru.get("artist-page.fansalsolike"),total:v.length,showAll:!0,fullPage:!0,rowGap:o.lT,children:v.map(((e,t)=>(0,b.jsx)(Pt.a,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]},e.uri)))})]})}));var rs=n(99754),ss=n(13411),as=n(24608);const os=Spicetify.GraphQL.Definitions["queryArtistMinimal"]=new h.l("queryArtistMinimal","query","53d3f76582c49ad0a05dc685955f20dc2a5f2209b192e5446e5e4e623ce23a48",null),ls="VjLekolG5eyfw_9Hhjxv",cs=[ss.$.INDEX,ss.$.TITLE_AND_ARTIST,ss.$.ALBUM,ss.$.ADDED_AT,ss.$.DURATION],us=({artistUri:e,collectionUri:t})=>{const n=(0,Gt.dB)({offset:0,limit:1,uri:e}),{error:r,data:s}=(a={uri:e},(0,p.I)(os,a,o));var a,o;const{usePlayContextItem:c,togglePlay:u,isPlaying:m}=(0,Re.P)({uri:t},{featureIdentifier:"your_library"}),h="Artist"===s?.artistUnion.__typename?s.artistUnion:null;return n&&h&&!r?(0,b.jsxs)("div",{className:_()("contentSpacing",ls),children:[(0,b.jsxs)(yt.g,{children:[(0,b.jsx)(Ve.D,{size:"medium",onClick:()=>u(),isPlaying:m,uri:t}),(0,b.jsx)(Me.X,{text:l.Ru.get("artist-page.liked-songs-by-artist-title",h.profile.name)})]}),n.totalLength>0&&(0,b.jsx)(i.Suspense,{fallback:(0,b.jsx)(d.A,{hasError:null!==r,errorMessage:l.Ru.get("error.request-collection-tracks-failure")}),children:(0,b.jsx)(ze.a,{columns:cs,children:(0,b.jsx)(as.b,{nrTracks:n.totalLength,collectionUri:t,uri:e,usePlayContextItem:c,initialItems:[]})})})]}):null},ds=()=>{const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),n=(0,rs.d4)((({session:e})=>e?.user?.id))||null,i=n?(0,a.g1)(n,e).toURI():null;return n&&i?(0,b.jsx)(us,{artistUri:t,collectionUri:i}):null},ms=(0,i.memo)((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{search:n}=(0,r.zy)(),i=new URLSearchParams(n).get("pageUri"),o=(0,a.o_)(i)?i:null;return(0,b.jsx)(me.P,{surface:de.u.ARTIST,uris:[t],children:(0,b.jsx)("section",{"":"artist-page","data-test-uri":t,children:(0,b.jsxs)(r.BV,{children:[(0,b.jsx)(r.qh,{path:"discography",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_ALBUMS,children:(0,b.jsx)(At,{})})}),(0,b.jsx)(r.qh,{path:"discography/:albumType",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_ALBUMS,children:(0,b.jsx)(At,{})})}),(0,b.jsx)(r.qh,{path:"featuring",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_FEATURING,children:(0,b.jsx)(Rt,{})})}),(0,b.jsx)(r.qh,{path:"related",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_RELATED,children:(0,b.jsx)(is,{})})}),(0,b.jsx)(r.qh,{path:"appears-on",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_APPEARS_ON,children:(0,b.jsx)(be,{})})}),(0,b.jsx)(r.qh,{path:"playlists",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_PLAYLISTS,children:(0,b.jsx)(ts,{})})}),(0,b.jsx)(r.qh,{path:"discovered-on",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_DISCOVERED_ON,children:(0,b.jsx)(Tt,{})})}),(0,b.jsx)(r.qh,{path:"saved",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_SAVED_TRACKS,children:(0,b.jsx)(ds,{})})}),(0,b.jsx)(r.qh,{path:"related-videos",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_RELATED_VIDEOS,children:(0,b.jsx)(v,{})})}),(0,b.jsx)(r.qh,{path:"/",element:o?(0,b.jsx)(he.InstrumentedRedirect,{to:{search:n,pathname:"/artist/:artistId/discography"}}):(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST,children:(0,b.jsx)(Jr,{})})}),(0,b.jsx)(r.qh,{path:"concerts",element:(0,b.jsx)(pe.e,{pageId:s.$h.ARTIST_CONCERTS,children:(0,b.jsx)(ue,{})})})]})})})}));ms.displayName="ArtistPage";const ps=ms},93820:(e,t,n)=>{"use strict";n.d(t,{Lf:()=>c,Mz:()=>o,UT:()=>a,ay:()=>s,bj:()=>d,fX:()=>l,pe:()=>u});var i=n(35828),r=n(87240);const s=e=>`spotify:artist:${e}`,a=e=>({artists:e.artists.items.map((e=>({uri:e.uri,name:e.profile.name}))),images:e.coverArt?.sources??[],name:e.name,uri:e.uri,sharingInfo:e.sharingInfo??null}),o=e=>({artists:e.artists?.items.map((e=>({uri:e.uri,name:e.profile?.name||""})))||[],images:e.coverArt?.sources||[],name:e.name,uri:e.uri,year:e.date?.year,type:e.type,sharingInfo:e.sharingInfo??null}),l=({track:{uri:e,name:t,playcount:n,duration:{totalMilliseconds:r},contentRating:s,artists:{items:a},albumOfTrack:o,playability:{playable:l},associations:c}},u)=>({uri:e,contextUri:u,totalMilliseconds:r,name:t,contentRating:s?.label||i.x7.None,isPlayable:l,playcount:parseInt(n||"0",10),artists:a.map((e=>({uri:e.uri,name:e.profile.name}))),imageUrl:o?.coverArt?.sources?.length?o?.coverArt.sources[0].url:"",albumUri:o?.uri||"",hasAssociatedVideo:(c?.associatedVideos?.totalCount||0)>0}),c=e=>e?e.reduce(((e,t)=>(e.push(t.releases.items[0]),e)),[]):[],u=e=>e?e.reduce(((e,t)=>(e.push(t.releases.items[0]),e)),[]):[],d=e=>e.map((e=>"Playlist"!==e.data?.__typename?null:{uri:e.data.uri,name:e.data.name,description:e.data.description??"",images:e.data.images?.items?.[0]?.sources??[],authorName:"User"===e.data.ownerV2.data.__typename?e.data.ownerV2.data.name:null})).filter(r.P)},33519:(e,t,n)=>{"use strict";n.d(t,{q:()=>o,O:()=>l});var i=n(22215),r=n(19498),s=n(73604);const a="spotify:playlist:37i9dQZF1DWXkVfVmXHa7l",o="#D4000E";function l(){const e=(0,i.NC)(r.Aem,{loadingValue:!1}),{isActive:t}=(0,s.l_)(a);return e&&t}},3979:(e,t,n)=>{"use strict";n.d(t,{j:()=>m});var i=n(79474),r=n(80964),s=n(28049),a=n(68970),o=n(83486),l=n(95230),c=n(41164),u=n(52470);const d={headphoneDevice:null,audioDevice:null,predictedState:null,isOnboarded:!1,currentState:{externalizationEnabled:!1,specificEnabled:!1},contentRestrictions:{specificRestricted:!1,externalizationRestricted:!1},toggleTuneHeadphones:null,toggleTuneStudio:null,setFilterState:()=>Promise.resolve()},m=()=>{const e=(0,l.N)(),t=(0,r.jE)(),n=(0,o.l)(),m=(0,i.useMemo)((()=>["puffin-current-device"]),[]),{data:p,isLoading:h,isError:g}=(0,s.I)({queryKey:m,queryFn:async()=>await e.getFilterState(),gcTime:5e3,staleTime:5e3});var f;return f=()=>t.invalidateQueries({queryKey:m}),(0,u.G)(c.n.UPDATE,f),{deviceFilterState:!n&&p||d,isHeadphoneDevice:p?.audioDevice?.terminalType===a.FI.HEADPHONES,isLoading:h,isError:g}}},31200:(e,t,n)=>{"use strict";n.d(t,{c:()=>l});var i=n(79474),r=n(99275),s=n(10098),a=n(2281),o=n(60181);const l=()=>{const{panelSend:e,isActive:t}=(0,s.AI)(o.Z.Puffin);return{togglePuffin:(0,i.useCallback)((()=>{const n=t;e(a.$S.PUFFIN_BUTTON_CLICK),n||(0,r.I)("PUFFIN")}),[t,e]),isPuffinPanelActive:t}}},77458:(e,t,n)=>{"use strict";n.d(t,{RT:()=>g,Gg:()=>_,Eg:()=>v});var i=n(79474),r=n(97500),s=n.n(r),a=n(86892),o=n(68248),l=n(83856),c=n(68102),u=n(73604),d=n(35828);const m="huMHH_FySIW5UhSrJfy8",p="bWyow5NL2GmdPjyBUAbh";var h=n(13274);let g=function(e){return e.Loop="loop",e.LoopOnHover="loopOnHover",e.LoopOnPlayback="loopOnPlayback",e}({});function f(e){return!!e&&(0,l.bp)(e)}function b(e){return!!e}function v(e,t){return f(t)&&b(e)}function y(e,t,n){if(!f(t))return null;if(!b(e))return null;const i={};return n&&(i.position=Math.trunc(8e3*Math.random())),(0,o.a2)({fileId:e,uri:t,mediaType:"video",format:"MANIFEST_ID",options:i})}const _=({canvasUri:e,fileId:t,canvasType:n,playerContainerClass:r,children:l,className:f,playbackType:b=g.LoopOnHover,onError:v=(()=>{}),mouseHoverRef:_=null})=>{const E=(0,i.useRef)(null),x=(0,i.useRef)((0,c.Ue)({videoPlayerContainer:`.${r}`,audioPlayerContainer:`.${r}`,disallowRobustnessValues:[o.ci.EMPTY]})),[C,S]=(0,i.useState)(!1),[A,w]=(0,i.useState)(!1),{isPlaying:I}=(0,u.GK)();(0,a.Ij)((()=>{const i=y(t,e,n===d.PJ.VideoLoopingRandom);return i?(x.current.playTracks([i],{paused:b===g.LoopOnHover||b===g.LoopOnPlayback&&!I}),x.current.on(o.LW.TRACK_LOADED,(()=>{const e=document.getElementsByClassName(r),t=e[0]?.querySelector("video");if(t&&E.current){E.current.appendChild(t);const e=t.videoWidth/t.videoHeight;w(e===16/9),t.muted=!0,t.loop=!0,t.autoplay=b===g.LoopOnPlayback&&I||b===g.Loop}S(!0)})),x.current.on(o.LW.ERROR,(e=>{e.data.error&&v(e.data.error),v(new Error("CanvasPlayer error"))})),()=>{S(!1),x.current.stop(),x.current.removeAllListeners()}):()=>{}}),[t,e]);const T=(0,i.useRef)(null),N=(0,i.useCallback)((()=>{T.current&&clearTimeout(T.current),C&&x.current.resume()}),[C]),R=(0,i.useCallback)((()=>{T.current&&clearTimeout(T.current),T.current=setTimeout((()=>{C&&x.current.pause()}),300)}),[C]);return(0,i.useEffect)((()=>{const e=_?.current;return e&&b===g.LoopOnHover?(e.addEventListener("mouseenter",N),e.addEventListener("mouseleave",R),()=>{e.removeEventListener("mouseenter",N),e.removeEventListener("mouseleave",R)}):()=>{}}),[b,N,R,I,_]),(0,i.useEffect)((()=>{b===g.LoopOnPlayback&&C&&(I?x.current.resume():x.current.pause())}),[I,C,b]),(0,h.jsx)("div",{className:s()(r,f,m,{[p]:A}),ref:E,children:l})}},33273:(e,t,n)=>{"use strict";n.d(t,{$V:()=>i,Bw:()=>l,XE:()=>o,dR:()=>a,se:()=>s,w1:()=>c,ys:()=>r});const i=e=>"data"in e&&Object.keys(e.data).length>0,r=e=>"concerts"in(e??{}),s=e=>null!=e,a=e=>"__typename"in e&&"AllEvents"===e.__typename,o=e=>"__typename"in e&&"RecommendedEvents"===e.__typename,l=e=>!!e&&"sections"in e,c=e=>"__typename"in e},15138:(e,t,n)=>{"use strict";n.d(t,{I:()=>i.I});var i=n(7826)},14485:(e,t,n)=>{"use strict";n.d(t,{Fn:()=>d,MW:()=>m,PR:()=>f,Py:()=>c,VJ:()=>u,Vi:()=>b,WB:()=>p,WZ:()=>h,Y:()=>o,l4:()=>a,m7:()=>g,tX:()=>y,tj:()=>l});var i=n(12058),r=n(14056),s=n(33273);const a=e=>new Date(e.substring(0,16)),o=e=>r.Ru.formatDate(e,{weekday:"short",month:"short",day:"numeric"}),l=e=>r.Ru.formatDate(e,{month:"short"}),c=e=>r.Ru.formatDate(e,{day:"numeric"}),u=e=>r.Ru.formatDate(e,{weekday:"short"}),d=e=>r.Ru.formatDate(e,{month:"short",day:"numeric"}),m=e=>r.Ru.formatDate(e,{weekday:"short",hour:"numeric",minute:"numeric"}),p=e=>r.Ru.formatDate(e,{hour:"numeric",minute:"numeric"}),h=(e,t)=>{if(e.toDateString()===t.toDateString())return o(e);if(e.getMonth()===t.getMonth()){return`${r.Ru.formatDate(e,{day:"numeric",month:"short"})}–${r.Ru.formatDate(t,{day:"numeric"})}`}return`${r.Ru.formatDate(e,{day:"numeric",month:"short"})}–${r.Ru.formatDate(t,{day:"numeric",month:"short"})}`},g=e=>{if(!e)return!1;const t=new Date(e);return new Date>t},f=e=>{if(!e)return!1;const t=new Date(e);return new Date<t},b=e=>{const[t]=e,n=e[e.length-1];return(0,s.$V)(t)&&(0,s.$V)(n)?{startDate:a(t.data.startDateIsoString),endDate:a(n.data.startDateIsoString)}:{startDate:new Date,endDate:new Date}},v={month:"short",day:"numeric"},y=e=>{if((0,i.r)(e.from,e.to))return r.Ru.formatDate(e.from,v);return`${r.Ru.formatDate(e.from,v)} - ${r.Ru.formatDate(e.to,v)}`}},50761:(e,t,n)=>{"use strict";n.d(t,{Ac:()=>a,DB:()=>c,a9:()=>o,i3:()=>d,im:()=>u,re:()=>l,tI:()=>r});var i=n(14056);const r=(e,t,n)=>!!e&&(t||!n.length),s=e=>e.artists.map((e=>e.name)),a=e=>1===e.length?i.Ru.get("concert.header.upcoming_concert_title_1",...e):2===e.length?i.Ru.get("concert.header.upcoming_concert_title_2",...e):3===e.length?i.Ru.get("concert.header.upcoming_concert_title_3",...e):4===e.length?i.Ru.get("concert.header.upcoming_concert_title_4",...e):e.length>4?i.Ru.get("concert.header.upcoming_concert_title_more",...e):"",o=e=>{const t=s(e);return r(e.title,e.festival,t)?e.title:a(t)},l=e=>1===e.length?i.Ru.get("concert.header.entity_title_1",...e):2===e.length?i.Ru.get("concert.header.entity_title_2",...e):3===e.length?i.Ru.get("concert.header.entity_title_3",...e):4===e.length?i.Ru.get("concert.header.entity_title_4",...e):e.length>4?i.Ru.get("concert.header.entity_title_more",...e):"",c=e=>{const t=s(e);return r(e.title,e.festival,t)?e.title:l(t)},u=({name:e,city:t,region:n,country:r})=>[e,t,n,r].filter((e=>!!e&&"unknown"!==e.toLowerCase())).join(i.Ru.getSeparator()),d=e=>{if(!e.artists||0===e.artists.items.length)return e.title;if(e.festival)return e.title;const t=e.artists.items.map((e=>e.profile.name));return l(t)}},36125:(e,t,n)=>{"use strict";n.d(t,{M:()=>i.Mp,t:()=>i.tf});var i=n(14205)},14205:(e,t,n)=>{"use strict";n.d(t,{$A:()=>S,HJ:()=>w,Mp:()=>x,p2:()=>I,tf:()=>C,uY:()=>A});var i=n(15721),r=n(12720),s=n(52444),a=n(17844),o=n(17143),l=n(56017),c=n(63469),u=n(82225),d=n(55873),m=n(74760),p=n(97981),h=n(4937),g=n(95525),f=n(41735),b=n(50421),v=n(14056),y=n(68970),_=n(85445),E=n(9753);function x(e){return e===_.bq.CAST_AUDIO||e===_.bq.CAST_VIDEO}function C(e,t,n){let g=i.U;const f=t?"multispeaker":e;if(function(e){return e?.audioDevice?.transportType===y.Yg.BLUETOOTH}(n))switch(n?.externalAccessory?.type){case E.G.HEADPHONES:return r.r;case E.G.SPEAKER:return s.r;case E.G.UNKNOWN:if(n?.audioDevice?.terminalType===y.FI.HEADPHONES)return r.r;if(n?.audioDevice?.terminalType===y.FI.SPEAKERS)return s.r}switch(f){case _.bq.COMPUTER:case _.bq.CHROMEBOOK:g=a.t;break;case _.bq.TABLET:g=o.$;break;case _.bq.SMARTPHONE:g=l.q;break;case _.bq.SPEAKER:case _.bq.CAST_AUDIO:case _.bq.AUDIO_DONGLE:case _.bq.HomeThing:g=s.r;break;case _.bq.TV:case _.bq.STB:case _.bq.CAST_VIDEO:g=c.I;break;case _.bq.AVR:g=u._;break;case _.bq.GAME_CONSOLE:g=d.q;break;case _.bq.SMARTWATCH:g=m.D;break;case _.bq.CarThing:case _.bq.AUTOMOBILE:g=p.Q;break;case"multispeaker":g=h.a}return g}function S(e,t="disconnected"){return x(e)?"connected"===t?g.I:f.m:b.E}function A(e,t){let n;switch(e){case _.bU.PREMIUM_REQUIRED:n=v.Ru.get("web-player.connect.device-picker.get-premium");break;case _.bU.NOT_INSTALLED:n=v.Ru.get("web-player.connect.device-picker.install-spotify");break;case _.bU.UNSUPPORTED_URI:n=v.Ru.get("web-player.connect.device-picker.unsupported-uri");break;case _.bU.INCOMPATIBLE:n=v.Ru.get("web-player.connect.device-picker.update-device");break;case _.bU.NOT_AUTHORIZED:n=t?v.Ru.get("web-player.connect.device-picker.playstation-unauthorized"):v.Ru.get("web-player.connect.device-picker.device-unavailable");break;case _.bU.UNAVAILABLE:n=v.Ru.get("web-player.connect.device-picker.device-unavailable");break;case _.bU.AD_PLAYING:n=v.Ru.get("web-player.connect.device-picker.ad-playing");break;case _.bU.NARRATION:n=v.Ru.get("web-player.connect.device-picker.tts-playing");break;case _.bU.WAKING_UP:n=v.Ru.get("web-player.connect.device-picker.wakingup-device");break;case _.bU.TIMED_OUT_WAKEUP:n=v.Ru.get("web-player.connect.device-picker.wakeup-timeout");break;case _.bU.UNKNOWN:default:n=v.Ru.get("web-player.connect.device-picker.restart-device")}return{helpText:n,tooltip:undefined}}function w(e){return void 0!==e&&2===e.available.length&&e.available.includes("cast")&&e.available.includes("connect")}function I(e,t){return e===_.bq.GAME_CONSOLE&&("ps5"===t||"ps4"===t)}},46070:(e,t,n)=>{"use strict";n.d(t,{j:()=>u});var i=n(79474),r=n(12975);function s(e){return e instanceof Node&&"STYLE"===e.nodeName}function a(e){return e instanceof Node&&"LINK"===e.nodeName}function o({nodeName:e,attributes:t}){return`${e}${Array.from(t).map((({name:e,value:t})=>`[${e}="${t}"]`)).join("")}`}function l(e){const t=window.open("about:blank",e.name,function(e){const{position:{x:t,y:n},size:{width:i,height:r}}=e;return`left=${t},top=${n},width=${i},height=${r}`}(e));if(null!==t){n=window.document,(i=t.document).head.querySelectorAll("style, link[rel=stylesheet]").forEach((e=>{i.head.removeChild(e)})),Array.from(n.styleSheets).forEach((e=>{if(e.href){const t=n.createElement("link");t.rel="stylesheet",t.href=e.href,i.head.appendChild(t)}else try{if(e.cssRules){const t=i.createElement("style");Array.from(e.cssRules).forEach((e=>{t.appendChild(i.createTextNode(e.cssText))})),i.head.appendChild(t)}}catch(t){console.warn("Failed to read `styleSheet.cssRules` - possibly a CORS issue?!",e)}})),function(e,t){const n=e.createElement("base");n.setAttribute("href",t),e.head.appendChild(n)}(t.document,`${window.location.protocol}//${window.location.hostname}/`);let r=null;r=new MutationObserver((e=>{for(const n of e)n.addedNodes.forEach((e=>{(a(e)||s(e))&&t.document.head.appendChild(e.cloneNode(!0))})),n.removedNodes.forEach((e=>{if(a(e))t.document.head.querySelector(o(e))?.remove();else if(s(e)){const n=e.textContent;Array.from(t.document.head.querySelectorAll(o(e))).find((({textContent:e})=>e===n))?.remove()}}))})),r.observe(window.document.head,{childList:!0}),t.addEventListener("pagehide",(()=>{null!==r&&(r.disconnect(),r=null),e.onClose?.(t)}))}var n,i;return t}const c={name:"debug-window",position:{x:200,y:200},size:{width:1200,height:800}};function u(){const{handle:e,open:t,close:n}=function(e){const[t,n]=(0,r.vB)(),s=(0,i.useRef)(e),a=t.map.get(e.name)??null;s.current=e;const o=(0,i.useCallback)((()=>{null!==a&&(a.close(),n((0,r.Mj)(s.current.name)))}),[n,a]),c=(0,i.useCallback)((()=>{if(null!==a)return;const e=l({...s.current,onClose:e=>{s.current.onClose?.(e),n((0,r.Mj)(s.current.name))}});null!==e&&n((0,r.qS)(s.current.name,e))}),[n,a]);return(0,i.useEffect)((()=>(window.addEventListener("pagehide",o),()=>{window.removeEventListener("pagehide",o)})),[o]),{handle:a,open:c,close:o}}(c);return{handle:e,show:t,hide:n}}},93963:(e,t,n)=>{"use strict";n.d(t,{V:()=>o});var i=n(79474),r=n(99754),s=n(28244),a=n(85961);function o(){const e=(0,a.Q)(),t=(0,r.wA)();return(0,i.useCallback)(((n,i)=>new Promise((r=>t((0,s.Ih)(n,(()=>e.removeDownload(n,i).then((()=>r(!0)))),(()=>r(!1)),i))))),[t,e])}},98620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EpisodeMoreLikeThis:()=>Zn,default:()=>Qn});var i=n(79474),r=n(60096),s=n(83648),a=n(34494),o=n(9714),l=n(83856),c=n(14056),u=n(64647),d=n(22792),m=n(99754),p=n(80707),h=n(79938),g=n(22215),f=n(99028),b=n(63192),v=n(94710),y=n(7125),_=n(19498),E=n(33560),x=n(31350);const C=()=>{const e=(0,y.V)(),t=(0,m.d4)(x.F6),n=(0,m.d4)(E.JJ),i=(0,v.vh)(),r=(0,g.NC)(_.Ic0);return s=>{const a={category:"episode_ilr_exposures",action:"episode_page_visit",variant:r,label:"dwp",os:(0,f.f)(),context:s??"",country:t?n:"",sp_t:(0,b.v8)("sp_t")};e?i.send((0,h.r)(a)):i.send((0,p._)(a))}};var S=n(97500),A=n.n(S),w=n(59313),I=n(49114),T=n(9440),N=n(3775),R=n(16990);const k=Spicetify.GraphQL.Definitions["internalLinkRecommenderEpisode"]=new N.l("internalLinkRecommenderEpisode","query","1a707c8b0ffba70f26bb06446ad3c3b75c966e35a9f71a00120a67444558f321",null),O=(e,t)=>(0,R.I)(k,e,t);var P=n(52415),j=n(64062);const L=e=>{const t=(0,y.V)(),n=(0,v.vh)(),r=(0,g.NC)(_.Ic0),s=(0,m.d4)(x.F6),a=(0,m.d4)(E.JJ);return(0,i.useCallback)((async i=>{const o={category:"episode_ilr_clicks_on_link",action:"episode_link_clicked",variant:r,label:"dwp",os:(0,f.f)(),...i&&{destination_url:i},context:`${e}|More episodes like this`,country:s?a:"",sp_t:(0,b.v8)("sp_t")};t?n.send((0,j.r)(o)):n.send((0,P._)(o))}),[e,a,n,t,s,r])},D=e=>{const t=(0,y.V)(),n=(0,v.vh)(),r=(0,g.NC)(_.Ic0),s=(0,m.d4)(x.F6),a=(0,m.d4)(E.JJ);return(0,i.useCallback)((async()=>{const i={category:"episode_ilr_component_visible",action:"ilr_component_viewed",variant:r,label:"dwp",os:(0,f.f)(),context:e,country:s?a:"",sp_t:(0,b.v8)("sp_t")};t?n.send((0,j.r)(i)):n.send((0,P._)(i))}),[a,n,t,e,s,r])};var U=n(35445),M=n(42624),B=n(90730),F=n(88291),H=n(47498),V=n(53311),z=n(90226),G=n(36706),W=n(2092),K=n(85711),Y=n(32334),q=n(97374),Q=n(95999),$=n(97247),Z=n(26271),X=n(70974),J=n(35828),ee=n(26903),te=n(13274);const ne=e=>`activation-trigger-mme-${e}`,ie=i.memo((function({index:e=-1,audio:t,contentInformation:n,coverArt:r,contentRatingLabel:s,description:a,mediaTypes:o,handleClick:c,isoString:u,name:p,playable:h,playedState:g,podcastSubscription:f,sharingInfo:b,showName:v,showTrailer:_,showTypes:E,showUri:x,status:C,totalMilliseconds:S,type:A,uri:w}){const I=g.playPositionMilliseconds,T=(0,i.useRef)(null),[N,R]=(0,i.useState)(g.state===J._w.Completed),{draggable:k,onDragStart:O}=(0,W.P)(),P=(0,y.V)(),j=(0,$.y)(),L=(0,m.wA)(),{isActive:D,isPlaying:U,togglePlay:ie}=(0,Z.P)({uri:w},{featureIdentifier:"episode"}),[re]=(0,X.S)(1e4,(e=>e?.item?.uri===w));(0,i.useEffect)((()=>{U&&(T.current=re)}),[U,re]),(0,i.useEffect)((()=>{!U&&T.current&&S<=T.current&&R(!0)}),[U,S]);const se=(0,i.useCallback)((e=>{e||(T.current=0),R(e)}),[]),ae={uri:x,name:v,trailer:_,showTypes:E},oe=(0,K.C)({audio:t,name:p,uri:w,mediaTypes:o,coverArt:{sources:r}},ae),le=(0,i.useCallback)((()=>{A!==J.I_.Episode?P?oe():ie():d.h.set((()=>({triggerId:ne(w),triggerAction:null})))}),[A,P,w,oe,ie]),ce=f?.isPaywalled??!1,ue=f?.isUserSubscribed??!1,de=ce&&!ue,me=ce&&P,{badges:pe}=(0,ee.b)({contentRating:s,isPaywalled:ce}),he=(0,i.useCallback)((()=>L((0,M.Tf)(x))),[x,L]),ge=(0,i.useCallback)((e=>{let t=e;return(de||me)&&(t=(0,te.jsx)(z.f,{enabled:!0,showUri:x,children:t})),!h&&pe.nineteen&&(t=(0,te.jsx)("div",{onClick:e=>{e.stopPropagation(),he()},children:e})),t=(0,te.jsx)(B.k,{id:ne(w),targetURI:(0,l.o_)(w),children:t}),t}),[de,me,h,pe.nineteen,w,x,he]);return(0,te.jsx)(Q.pZ,{value:"row",index:e,children:(0,te.jsx)(F.h,{menu:(0,te.jsx)(H.b,{uri:w,showUri:x,sharingInfo:b,isPlayed:N,onMarkAsPlayed:se}),children:(0,te.jsx)(V.k,{requestId:void 0,index:e,uri:w,size:j,images:r||[],name:p,showName:v,description:a,isPlayable:h||de,fullyPlayed:N,durationMs:S,releaseDate:u||"",resumePositionMs:T.current??I,draggable:k,handleDragStart:e=>{if(e.target!==e.currentTarget)return;O(e,{itemUris:[w],dragLabelText:`${p} • ${v}`,contextUri:x})},handlePlaybackClick:le,isCurrentlyPlaying:D,isPaywalled:ce,isUserSubscribed:ue,isPlaying:U,position:U?re:void 0,episodeSharingInfo:b,onMarkAsPlayed:se,contentInformation:n,showUri:x,mediaTypes:o??void 0,badges:(0,te.jsxs)(te.Fragment,{children:[pe.explicit&&(0,te.jsx)(Y.g,{}),pe.paid&&(0,te.jsx)(G.K,{}),pe.nineteen&&(0,te.jsx)(q.q,{size:16})]}),playButtonWrapper:ge,status:C,handleClick:c})})})})),re=e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"RestrictedContent"!==t?.__typename&&"Episode"===e.__typename;var t};function se(e){return(e||[]).filter((e=>re(e.data)))}function ae(e){if("Episode"===e.__typename){const t=e.podcastV2.data;return"Podcast"!==t.__typename?[]:t.coverArt?.sources.map((e=>({url:e.url,width:e.width,height:e.height})))??[]}return[]}function oe(e){return(e||[]).filter((e=>re(e.data))).map((e=>e.data.uri))}var le=n(38076),ce=n(61284),ue=n(52458);const de="GgMHVmfXNzteIydSWMIA",me="GcupflQsYyy0IMOsCeD1",pe="h6KkL9VhU8t6zFv7XQXc",he="X8ebQzoazcOf7IYTYOZd",ge="A4FqrLbXeENogU0IRaPn",fe="YCYs0Gv5B5ctDN0f5Zby",be=({uri:e,isFullPage:t=!1})=>{const{data:n}=O({uri:e}),r=n?.seoRecommendedEpisode.totalCount,s=n?.seoRecommendedEpisode.items,a=se(s),o=t?a:a.slice(0,5),u=C(),d=`${e}|[${oe(a)}]`;(0,i.useEffect)((()=>{u(d)}),[d,u]);const m=L(e),p=e=>{m((0,l.o_)(e)?.toURL()??"")},{ref:h,inView:g}=(0,w.Wx)({threshold:0}),f=D(e);if((0,i.useEffect)((()=>{g&&f()}),[g,f]),0===r)return null;const b=(0,l.o_)(e)?.id,v=`spotify:app:episode:${b}:more-like-this`;return(0,te.jsxs)("section",{className:A()(de,{[me]:!t}),"":"episode-list",ref:h,children:[(0,te.jsxs)("header",{className:pe,children:[(0,te.jsx)(ue.U,{title:c.Ru.get("internal-link-recommender.more-episodes-like-this"),forceTitleClickNavigation:!t,seeAllUri:v}),!t&&(0,te.jsx)(ce.default,{label:c.Ru.get("shelf.see-all"),link:v,className:he})]}),o.map((({data:e},t)=>{const n=(e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"RestrictedContent"!==t?.__typename&&"Podcast"===e.__typename;var t})(e.podcastV2.data)?e.podcastV2.data:null;return n?e&&(0,te.jsxs)("div",{className:fe,onClick:()=>{p(e.uri)},children:[(0,te.jsx)("hr",{className:ge,"aria-hidden":!0}),(0,te.jsx)(ie,{index:t,audio:e.audio,contentInformation:e.contentInformation,contentRatingLabel:e.contentRating?.label,coverArt:e.coverArt?e.coverArt.sources:void 0,description:e.description,isoString:e.releaseDate?.isoString,mediaTypes:e.mediaTypes,name:e.name,playable:e.playability.playable,playedState:e.playedState,podcastSubscription:(0,I.Wx)(e.restrictions,e.playability),sharingInfo:e.sharingInfo,showTrailer:(i=n.trailerV2?.data,i&&(e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"RestrictedContent"!==t?.__typename&&"Episode"===e.__typename;var t})(i)?{type:T.c.EPISODE,uri:i.uri,name:i.name,coverArt:i.coverArt?.sources||[],audio:i.audio,audioPreview:i.audioPreview,sharingInfo:i.sharingInfo,duration:{milliseconds:i.duration.totalMilliseconds},contentRating:i.contentRating,mediaTypes:i.mediaTypes}:null),showName:n.name,showTypes:n.showTypes,showUri:n.uri,totalMilliseconds:e.duration.totalMilliseconds,type:e.type,uri:e.uri,handleClick:()=>{p(e.uri)}},`${e.uri}/${t}`)]},`${t}${e.uri}`):null;var i}))]})},ve=e=>{const t=(0,U.D)({entityType:T.c.EPISODE,componentType:"list",uri:e.uri});return(0,te.jsx)(le.s,{onError:t,children:(0,te.jsx)(be,{...e})})};var ye=n(51326),_e=n(26472),Ee=n(70968),xe=n(12871),Ce=n(96642);const Se="tjYg4vq1mzFJ5kVFipZH",Ae=({uri:e,isFullPage:t=!1})=>{const{data:n}=O({uri:e}),r=n?.seoRecommendedEpisode.totalCount,s=n?.seoRecommendedEpisode.items,a=se(s),o=C(),u=`${e}|[${oe(a)}]`;(0,i.useEffect)((()=>{o(u)}),[u,o]);const d=L(e),{ref:m,inView:p}=(0,w.Wx)({threshold:0}),h=D(e);if((0,i.useEffect)((()=>{p&&h()}),[p,h]),0===r)return null;const g=(0,l.o_)(e)?.id;return(0,te.jsx)("span",{ref:m,children:(0,te.jsx)(Ce.$,{title:c.Ru.get("internal-link-recommender.more-episodes-like-this"),seeAllLabel:t?void 0:c.Ru.get("shelf.see-all"),total:r,alwaysShowSeeAll:!t,seeAllUri:`spotify:app:episode:${g}:more-like-this`,className:Se,testId:"episode",showAll:t,fullPage:t,children:a.map((({data:e},t)=>(0,te.jsx)(xe.U,{onClick:()=>{var t;t=e.uri,d((0,l.o_)(t)?.toURL()??"")},uri:e.uri,name:e.name,description:e.description??"",images:e.coverArt?.sources||[],showImages:ae(e),durationMilliseconds:e.duration.totalMilliseconds,releaseDate:(0,Ee.JO)(e.releaseDate),resume_point:{resume_position_ms:e.playedState.playPositionMilliseconds,fully_played:e.playedState.state===ye._w.Completed},isExplicit:(0,_e.V)(e.contentRating),is19PlusOnly:(0,_e.r)(e.contentRating),sharingInfo:e.sharingInfo,index:t},e.uri)))})})},we=e=>{const t=(0,U.D)({entityType:T.c.EPISODE,componentType:"shelf",uri:e.uri});return(0,te.jsx)(le.s,{onError:t,children:(0,te.jsx)(Ae,{...e})})};var Ie=n(82089),Te=n(66675),Ne=n(73756),Re=n(85232);const ke=(0,i.lazy)((()=>n.e(5703).then(n.bind(n,55703)))),Oe=(0,i.lazy)((()=>n.e(1576).then(n.bind(n,21576))));function Pe(e){const t=(0,Re.L)(),n=(0,g.NC)(_.kIZ,{loadingValue:!1}),r=(0,Ne.A)();return t?n?e.uri?(0,te.jsx)(i.Suspense,{fallback:!0,children:(0,te.jsx)(Oe,{uri:e.uri})}):null:(0,te.jsx)(i.Suspense,{fallback:!0,children:(0,te.jsx)(ke,{reason:"Episode page",...r,...e})}):null}const je="KY_tGmIGPqs9GPaaPqL1",Le="ZDeijYE6qPzPqT9vG_2w",De="qEoBuparvnBwiHsPzwEj",Ue="azmMKgbEFsGjSUnw2Knc",Me="oDljdc6tgUKxTeQMyh0D",Be="JflKazLAHawVzYxv1pXc",Fe="aTeXTpJi_WmakpodeGxX",He="kZWs1d_TjX2JQgmtx90y",Ve="JCSifKpPc54eqcTYBj5Q",ze="FlK1APGRiu5DTwm_0kix",Ge="ahQLeD18bYXcFRWkL_vg",We="l6peddfW1BiAnd1a_mF3",Ke="Xkg0O12dNVwomjL8dzm4",Ye="OexEjZt7Kf7pFUW701v8",qe="jAY3diSzPfk19oswf8_y",Qe="F3BJWbXwGSqNOwZHInLz",$e="YjVCpFaOT3LCR64t8jTN",Ze="Q7HlO_WHb9N8aK8bgOjG",Xe="xTENSk0_RmQ8qEeEuhnE";var Je=n(98764),et=n(87668),tt=n(14494),nt=n(61080),it=n(52995);const rt=({cardHeaderText:e,cardBodyText:t,buttonText:n,buttonTarget:i})=>(0,g.NC)(_._Nj)?(0,te.jsxs)("div",{className:Ve,children:[(0,te.jsxs)("div",{className:ze,children:[(0,te.jsx)(Je.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:e}),(0,te.jsx)(Je.E,{semanticColor:"textBase",children:t})]}),(0,te.jsx)(nt.$,{size:"small",colorSet:"invertedLight",href:(0,l.o_)(i).toURLPath(!0),component:it.v,children:n})]}):null,st=({areHTMLDescriptionsEnabled:e,contentInformation:t,description:n,hasDescription:r,htmlDescription:s,onExpanded:a,onTimeStampClick:o,playability:l,showHeader:u=!0,spec:d})=>{const m=(0,tt.s)(),p=(r||t)&&u,h=(0,i.useCallback)((e=>{const t=d.readMoreButtonFactory();m.logInteraction(e?t.hitUiReveal():t.hitUiHide()),a?.()}),[d,m,a]),f=(0,g.NC)(_.ZK8,{loadingValue:!1});return(0,te.jsxs)(te.Fragment,{children:[p&&(0,te.jsx)(Je.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ue,children:c.Ru.get("episode.description-title")}),t&&(0,te.jsx)(rt,{cardHeaderText:t.cardHeaderText,cardBodyText:t.cardBodyText,buttonText:t.buttonText,buttonTarget:t.buttonTarget}),r&&(0,te.jsx)(et.N,{className:De,onTimeStampClick:o,maxLines:4,onExpanded:h,content:(n||"").trim(),htmlContent:e&&s?s:void 0,enableTimestamps:l.playable,enableAutomaticLinkification:f&&e&&!!s})]})};var at=n(75383),ot=n(68671),lt=n(89888),ct=n(43364),ut=n(42360),dt=function(e){return e.DESCRIPTION="description",e.TRANSCRIPT="transcript",e}(dt||{});const mt=i.memo((function({transcriptSections:e,descriptionContent:t,transcriptContent:n,spec:r}){const s=(0,tt.s)(),[a,o]=(0,i.useState)(dt.DESCRIPTION),l=(0,ut.v7)(),{ref:u,inView:d}=(0,w.Wx)({threshold:[1],root:l.current,rootMargin:`-${ct.uC+1}px 100000px 0px 100000px`}),m=(0,i.useRef)(null),p=(0,i.useCallback)((e=>{m.current=e,u(e)}),[u]);return(0,i.useEffect)((()=>{const e=m.current?.parentElement?.offsetTop,t=l?.current;if(!e||!t)return;const n=e-ct.uC;t.scrollTop>n&&t.scrollTo({top:n})}),[l,a]),(0,te.jsx)(at.j,{list:(0,te.jsxs)(ot.L,{className:A()($e,{[Ze]:!d}),ref:p,children:[(0,te.jsx)(lt.Y,{label:c.Ru.get("web-player.episode.description"),sentenceCase:!0,active:a===dt.DESCRIPTION,onClick:()=>{const e=r.tabsFactory().descriptionTabButtonFactory().hitUiReveal();s.logInteraction(e),o(dt.DESCRIPTION)},className:A()(Xe,{[Ge]:a===dt.DESCRIPTION})}),(0,te.jsx)(lt.Y,{label:c.Ru.get("web-player.episode.transcript"),sentenceCase:!0,disabled:null===e,active:a===dt.TRANSCRIPT,onClick:()=>{const e=r.tabsFactory().transcriptTabButtonFactory().hitUiReveal();s.logInteraction(e),o(dt.TRANSCRIPT)},className:A()(Xe,{[Ge]:a===dt.TRANSCRIPT})})]}),children:null===e||a===dt.DESCRIPTION?t:n})}));var pt=n(21660),ht=n(67302),gt=n(7452);const ft=(0,i.memo)((function({transcriptSections:e,onTimeStampClick:t,episodeUri:n}){const{spec:i,logger:r}=(0,ht.r)(pt.c,{data:{uri:n}}),{isPlaying:s}=(0,Z.P)({uri:n},{featureIdentifier:"episode"}),a=i.timestampLinkFactory();return(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("div",{className:Ke,children:(0,te.jsx)(Je.E,{variant:"bodySmall",semanticColor:"textBase",children:c.Ru.get("web-player.episode.transcript.disclaimer")})}),e.map(((e,i)=>{const o=`transcript-section-${i}`;return(0,te.jsxs)("div",{className:We,children:[(0,te.jsx)("button",{className:Ye,onClick:()=>{t(e.startMs,o),r.logInteraction(s?a.hitSeekToTime({msToSeekTo:e.startMs}):a.hitPlay({itemToBePlayed:n}))},children:(0,te.jsx)(B.k,{id:o,targetURI:(0,l.o_)(n),fadeOut:!0,children:(0,te.jsx)(Je.E,{variant:"marginalBold",semanticColor:"textSubdued",className:qe,children:(0,gt.f)(e.startMs)})})}),e.content.map(((e,t)=>(0,te.jsx)(Je.E,{variant:"bodySmall",semanticColor:"textBase",className:Qe,dir:"auto",children:e},`transcript-text-${t}`)))]},o)}))]})}));var bt=n(43436),vt=n(35814),yt=n(39566),_t=n(98678),Et=n(96470),xt=n(73956),Ct=n(36471),St=n(35289),At=n(18039);const wt=({children:e,index:t,ariaRowIndex:n,onTriggerPlay:r,isActive:s,uri:a,spec:o})=>{const l=(0,tt.s)(),{pushPopSelected:c,toggleSelected:u,isSelected:d}=(0,i.useContext)(St.m),m=(0,i.useRef)(null),p=(0,Ct.W)(),h=(0,_t.YQ)((e=>{p({intent:"play",type:"double-click"});const t=l.logInteraction(o.doubleHitPlay({itemToBePlayed:a}));r(e,t)}),xt.d,{leading:!0,trailing:!1}),g=(0,i.useCallback)((e=>{u(t,e.shiftKey,e.ctrlKey||e.metaKey)}),[u,t]),f=(0,i.useCallback)((e=>{if(!m.current?.contains(e.target))return;const n="ArrowUp"===e.key?-1:1;["ArrowUp","ArrowDown"].includes(e.key)&&(e.shiftKey?c(t,n):u(t+n,!1,!1))}),[c,u,t]),b=d(t),v=b&&d(t-1),y=b&&d(t+1);return(0,te.jsx)(Et.$,{rowIndex:n,"aria-selected":b,children:(0,te.jsx)("div",{"":"tracklist-row",className:A()(At.A.trackListRow,At.A.trackListRowGrid,{[At.A.active]:s,[At.A.selected]:b,[At.A.isPreviousRowSelected]:v,[At.A.isNextRowSelected]:y}),onDoubleClick:h,onClick:g,onKeyDown:f,ref:m,children:e})})};var It=n(82390),Tt=n(16482),Nt=n(64652),Rt=n(43418),kt=n(91058),Ot=n(9138),Pt=n(77962),jt=n(92758),Lt=n(20502),Dt=n(38276);const Ut=({uri:e,title:t="",index:n,subtitle:r="",showName:s="",showUri:a="",duration:o=0,start:l,stop:u})=>{const{isActive:d,isPlaying:m,onClick:p}=(0,yt.L)({episodeUri:e,start:l,stop:u}),h=(0,i.useCallback)(((e,t)=>{p(t)}),[p]),{spec:g}=(0,ht.r)(vt.i,{data:{position:n,reason:"",uri:e}});return(0,te.jsx)(Q.pZ,{value:"row",index:n,children:(0,te.jsxs)(wt,{index:n,ariaRowIndex:n+1,onTriggerPlay:h,isActive:d,spec:g,uri:e,children:[(0,te.jsxs)(Pt.U,{ariaColIndex:0,children:[(0,te.jsx)(Rt.$,{uri:e,playAriaLabel:c.Ru.get("tracklist.a11y.play",r,s),onClick:h,isPlaying:m,isActive:d,spec:g,children:(0,te.jsx)(kt.a,{children:(0,te.jsx)(bt.M,{className:At.A.talkIcon,"aria-hidden":!0})})}),(0,te.jsxs)(Nt.l,{children:[(0,te.jsx)(Dt.p,{titleText:t,children:t}),(0,te.jsx)(Lt.p,{children:r})]})]}),(0,te.jsx)(jt.o,{ariaColIndex:1,children:(0,te.jsx)(It.g,{uri:a,name:s,spec:g,children:(0,te.jsx)("span",{dir:"auto",children:s})})}),(0,te.jsx)(Ot.l,{ariaColIndex:2,children:(0,te.jsx)(Tt.P,{duration:o,className:At.A.talkSegmentDuration})})]})})};var Mt=n(13411),Bt=n(36457),Ft=n(45640),Ht=n(24290),Vt=n(94544),zt=n(87882),Gt=n(41955),Wt=n(92633),Kt=n(18836),Yt=n(49798),qt=n(47469);const Qt="HRApv65revEcL42QzRjJ",$t="HbJqPqSmOY5H3lLnQVzD",Zt="DBcCnhHVt7coNqp3wMB4",Xt=({episodeUri:e,index:t,duration:n,start:r,stop:s,name:a,uri:o,artists:l,album:u,playable:d})=>{const{isActive:m,isPlaying:p,onClick:h}=(0,yt.L)({episodeUri:e,start:r,stop:s}),g=(0,i.useCallback)(((e,t)=>{h(t)}),[h]),{spec:f}=(0,ht.r)(vt.i,{data:{position:t,reason:"",uri:o}});return(0,te.jsx)(Q.pZ,{value:"row",index:t,children:(0,te.jsx)(zt.t,{trigger:"right-click",action:"open",menu:(0,te.jsx)(Gt.P,{uri:o}),children:(0,te.jsxs)(Wt.w,{uri:o,index:t,ariaRowIndex:t+1,dragMetadata:{name:a,createdBy:l?.[0].name??""},onTriggerPlay:g,isActive:m,isPlayable:d,spec:f,children:[(0,te.jsxs)(Pt.U,{ariaColIndex:0,children:[(0,te.jsx)(Rt.$,{uri:o,playAriaLabel:c.Ru.get("tracklist.a11y.play",a,l?.[0].name),onClick:g,isPlaying:p,isActive:m,spec:f,children:(0,te.jsx)(kt.a,{children:(0,te.jsx)("img",{className:$t,src:u.image,alt:u.name})})}),(0,te.jsxs)(Nt.l,{children:[(0,te.jsx)(Dt.p,{titleText:a,children:a}),(0,te.jsx)(Lt.p,{children:(0,te.jsx)(Kt.l,{artists:l,spec:f})})]})]}),(0,te.jsx)(jt.o,{ariaColIndex:1,children:(0,te.jsx)(It.g,{uri:u.uri,name:u.name,spec:f,children:u.name})}),(0,te.jsxs)(Ot.l,{ariaColIndex:2,children:[(0,te.jsx)(qt.d,{uri:o,spec:f}),(0,te.jsx)(Tt.P,{duration:n}),(0,te.jsx)(Yt.Y,{spec:f,menu:(0,te.jsx)(Gt.P,{uri:o,artists:l}),label:c.Ru.get("more.label.track",a,l?.[0].name)})]})]})})})};function Jt(e,t,n){return e.reduce(((e,i,r)=>((r>0||t>0)&&e.push({type:"SPACER",id:`spacer-${e.length}`}),"MUSIC"===i.type?e.push(function(e,t,n){return{type:"MUSIC",index:t,uri:n.uri,episodeUri:e,start:n.start,stop:n.stop,duration:n.duration,name:n.track.name,artists:n.track.artists,album:n.track.album,playable:n.track.playable}}(n,r,i)):"TALK"===i.type&&e.push(function(e,t,n){return{type:"TALK",index:t,uri:e,title:n.title,subtitle:n.subtitle,start:n.start,stop:n.stop,duration:n.duration,showUri:n.show.uri,showName:n.show.name}}(n,r,i)),e)),[])}const en=({uri:e,segmentCount:t})=>{const n=(0,Bt.o)(),r=(0,i.useCallback)((async(i,r)=>{const s=Math.ceil(i/2);try{return{items:Jt(await n.getSegments(e,s,r),s,e),totalLength:2*t-1}}catch(e){return{items:[],totalLength:0}}}),[t,n,e]),s=(0,i.useCallback)((t=>{switch(t.type){case"SPACER":return(0,te.jsx)("div",{className:Zt},t.id);case"MUSIC":return(0,te.jsx)(Xt,{...t},`${e}-${t.index}`);case"TALK":return(0,te.jsx)(Ut,{...t},`${e}-${t.index}`);default:return(0,Ft.d)(t)}}),[e]),a=(0,i.useCallback)((e=>({uri:"MUSIC"===e.type?e.uri:""})),[]),o=c.Ru.get("music_and_talk.in_this_episode");return(0,te.jsxs)("div",{children:[(0,te.jsx)(Je.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Qt,children:o}),(0,te.jsx)(Vt.S4,{ariaLabel:o,hasHeaderRow:!0,rowPlaceholder:Ht.qq,columns:[Mt.$.TITLE_AND_ARTIST,Mt.$.ALBUM_OR_SHOW,Mt.$.DURATION],renderRow:s,fetchTracks:r,resolveItem:a,limit:50,nrTracks:2*t-1,testID:"music-and-talk-tracklist"})]})};var tn=n(33350),nn=n(64658);const rn=({areHTMLDescriptionsEnabled:e,contentInformation:t,description:n,hasDescription:r,hasMusicAndTalkSegements:s,htmlDescription:a,onExpanded:o,onDescriptionTimestampClick:l,onTranscriptTimestampClick:u,playability:d,segmentCount:m,showUrl:p,transcript:h,uri:g,spec:f})=>{const b=(0,tt.s)(),v=(0,i.useMemo)((()=>f.descriptionSectionFactory()),[f]),y=(0,i.useMemo)((()=>v.trackListFactory()),[v]),[_,E]=(0,i.useState)(null),x=(0,i.useCallback)((async e=>{const t=await(0,tn.Q)(e);E(t)}),[]);(0,i.useEffect)((()=>{h&&h.length>0&&x(h[0].cdnUrl)}),[x,h]);const C=i=>(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(st,{hasDescription:r,contentInformation:t,onTimeStampClick:l,onExpanded:o,description:n,areHTMLDescriptionsEnabled:e,htmlDescription:a,playability:d,showHeader:i,spec:v}),s&&(0,te.jsx)(nn.r,{spec:y,children:(0,te.jsx)(en,{segmentCount:m,uri:g})}),p&&(0,te.jsx)(Te.n,{size:"small",className:Me,href:p,component:it.v,onClick:()=>{b.logInteraction(v.allEpisodesLinkFactory().hitUiNavigate({destination:p}))},children:c.Ru.get("episode.see_all_episodes")}),(0,te.jsx)(Pe,{uri:g})]}),S=h&&h?.length>0&&d.playable;return(0,te.jsx)(te.Fragment,{children:S?(0,te.jsx)(mt,{transcriptSections:_,descriptionContent:C(!1),transcriptContent:(0,te.jsx)(ft,{transcriptSections:_||[],onTimeStampClick:u,episodeUri:g}),spec:f}):C(!0)})};var sn=n(263),an=n(41791);const on="activation-trigger-mme",ln=({episodeUri:e,showUri:t,isLocked:n,isPlaying:i,isPlayDisabled:r,playButtonPlayLabel:s,playButtonPauseLabel:a,onClick:o,size:c="large"})=>{const u=(0,an.c)();if((0,y.V)())return(0,te.jsx)(sn.R,{size:c,onClick:o,isPlaying:i,disabled:r,locked:n,ariaPlayLabel:s,ariaPauseLabel:a});const d=(0,te.jsx)(z.f,{showUri:t,enabled:n,renderInline:!1,children:(0,te.jsx)(sn.R,{size:c,onClick:o,isPlaying:i,disabled:r,locked:n,ariaPlayLabel:s,ariaPauseLabel:a})});return u?(0,te.jsx)(B.k,{id:on,targetURI:(0,l.o_)(e),fadeOut:!0,children:d}):d};var cn=n(82754),un=n(87687),dn=n(73604),mn=n(30232),pn=n(39841),hn=n(40643),gn=n(45876),fn=n(30939),bn=n(98832),vn=n(54519),yn=n(38037),_n=n(63492),En=n(9789),xn=n(65325),Cn=n(16265),Sn=n(62166),An=n(75024),wn=n(97997),In=n(5513),Tn=n(36833),Nn=n(48327);function Rn(e){return e?.replace(/T.*/,"")||""}const kn=({episode:e,onPlayEpisode:t,isPlaying:n,isActive:r,isFullyPlayed:s,setIsFullyPlayed:a,backgroundColor:o,isLocked:l,spec:u})=>{const{uri:d,playedState:p,contentRating:h,playability:g}=e,f=(0,tt.s)(),b=(0,m.wA)(),[v]=(0,X.S)(1e4,(e=>e?.item?.uri===d)),y=(0,mn.o)((e=>e?.duration)),{badges:_}=(0,ee.b)({contentRating:h?.label}),E=(0,i.useCallback)((e=>{!g.playable&&_.nineteen&&(e.stopPropagation(),b((0,M.Tf)(d||"")))}),[d,g.playable,_.nineteen,b]),x=(0,i.useCallback)((()=>{const e=u.contextMenuButtonFactory().hitUiReveal();f.logInteraction(e)}),[f,u]),C=(0,i.useCallback)(((e,t)=>{(0,Sn.Qv)(t,u.downloadButtonFactory(),f,d)}),[f,u,d]),S=(0,i.useCallback)((e=>{const t=u.saveButtonFactory();f.logInteraction(e?t.hitLike({itemToBeLiked:d}):t.hitRemoveLike({itemNoLongerLiked:d}))}),[f,u,d]),A=!l&&!e.playability.playable,w=c.Ru.get("tracklist.a11y.play",e.name,e.podcast?.name),I=c.Ru.get("tracklist.a11y.pause",e.name,e.podcast?.name),T=e.podcast?.uri,N=(0,Tn.j)(),R=(0,Cn.v)(e.uri),k=!l;return(0,te.jsxs)(wn.E,{backgroundColor:o,children:[(0,te.jsxs)(In.S,{children:[_.nineteen&&(0,te.jsx)(q.q,{className:Be,size:16}),(0,te.jsx)(An.j,{fullyPlayed:s,durationMs:r&&y?y:e.duration.milliseconds,releaseDate:Rn(e.releaseDate?.isoString),resumePositionMs:p.playPositionMilliseconds,isPlaying:n,position:r&&v||void 0})]}),(0,te.jsxs)(In.S,{children:[(0,te.jsx)("div",{onClick:E,children:(0,te.jsx)(ln,{episodeUri:e.uri,showUri:T,isLocked:l,onClick:()=>{t(p.playPositionMilliseconds)},isPlaying:n,isPlayDisabled:A,playButtonPlayLabel:w,playButtonPauseLabel:I,size:N})}),(0,te.jsx)(yn.e,{uri:e.uri,onClick:C,size:N,canDownload:k}),R?(0,te.jsx)(Nn.g,{uri:e.uri,size:N}):(0,te.jsx)(En.b,{uri:e.uri,size:N,onClick:S}),(0,te.jsx)(xn.b,{onShow:x,menu:(0,te.jsx)(H.b,{uri:e.uri,sharingInfo:e.sharingInfo,showUri:T,contextUri:e.uri,isPlayed:s,onMarkAsPlayed:a}),children:(0,te.jsx)(_n.e,{label:c.Ru.get("more.label.context",e.name),size:N})})]})]})};var On=n(61623),Pn=n(27699),jn=n(39517),Ln=n(36919),Dn=n(19038),Un=n(30957),Mn=n(12269),Bn=n(29117),Fn=n(6950),Hn=n(40292),Vn=n(46545),zn=n(61681),Gn=n(94009),Wn=n(11867);const Kn=({coverArt:e,name:t})=>{const n=(0,$.y)(),i=n===Wn.E.SMALL||n===Wn.E.XSMALL;return(0,te.jsx)(zn.b,{images:e,type:T.c.EPISODE,shape:zn.u.ROUNDED_CORNERS,title:t,size:i?Gn.Qe.SIZE_20:Gn.Qe.SIZE_24,className:Fe})};const Yn=({episode:e,isFullyPlayed:t,setIsFullyPlayed:n,backgroundColor:r,spec:s})=>{const{uri:a,name:o,sharingInfo:u,playedState:d,episodeType:m,releaseDate:p,coverArt:h}=e,g=(0,tt.s)(),f=function(e,t,n,i,r){const s=t===J.I_.Episode;return(0,Mn.hD)(e,i,n,r)?(0,te.jsx)(Mn.Ih,{isMusicAndTalk:s}):s?c.Ru.get("type.showEpisode"):c.Ru.get("type.podcastEpisode")}(a,m||J.I_.Unknown,d.playPositionMilliseconds,Rn(p?.isoString),d.state===J._w.Completed),b=e.podcast?.uri,v=function(e){const t=(0,l.o_)(e);return`/show/${(0,l.cE)(t?.id||"")}`}(b),y=(0,i.useCallback)((()=>{g.logInteraction(s.podcastLinkFactory().hitUiNavigate({destination:v}))}),[g,v,s]),_=e.podcast?.coverArt,E=!!(_&&_.length===h.length&&h.every(((e,t)=>e.url===_[t].url)));return(0,te.jsxs)(Bn.z,{backgroundColor:r,children:[(0,te.jsx)(Pn.h,{children:(0,te.jsx)(jn.X,{text:o,dragUri:a,dragLabel:o})}),!E&&(0,te.jsx)(On.X,{children:(0,te.jsx)(F.h,{menu:(0,te.jsx)(H.b,{uri:a,sharingInfo:u,showUri:b,contextUri:a,isPlayed:t,onMarkAsPlayed:n}),children:(0,te.jsx)(Hn.b,{loading:"eager",name:o,images:h,placeholderType:"episode",shape:Hn.u.SQUARE})})}),(0,te.jsxs)(Fn.Y,{children:[(0,te.jsx)(Ln.B,{children:f}),(0,te.jsx)(F.h,{menu:(0,te.jsx)(H.b,{uri:a,sharingInfo:u,showUri:b,contextUri:a,isPlayed:t,onMarkAsPlayed:n}),children:(0,te.jsx)(Vn.mm,{dragUri:a,dragLabel:o,scaleAtMinWidth:Vn.tw,className:Le,children:(0,te.jsx)("span",{"":"episodeTitle",children:o})})}),(0,te.jsx)(F.h,{menu:(0,te.jsx)(H.b,{uri:a,sharingInfo:u,showUri:b,contextUri:a,isPlayed:t,onMarkAsPlayed:n}),children:(0,te.jsxs)(Un.default,{to:v,onClick:y,className:He,children:[E&&(0,te.jsx)(Kn,{name:o,coverArt:h}),(0,te.jsx)(Dn.g,{children:(0,te.jsx)("span",{"":"showTitle",children:e.podcast?.name})})]})})]})]})},qn=({episode:e})=>{const{uri:t,episodeType:n,description:s,htmlDescription:o,podcastSubscription:c,segmentsCount:m,podcast:p,contentInformation:h,playedState:g,coverArt:f}=e,{spec:b,logger:v}=(0,ht.r)(a.g,{data:{uri:t}}),_=(0,fn.n)(),E=(0,i.useMemo)((()=>b.headerFactory()),[b]),x=(0,i.useMemo)((()=>b.actionBarFactory()),[b]),[S,A]=(0,i.useState)(g.state===J._w.Completed),w=(0,un.K)(),I=(0,Ct.W)(),N=void 0!==m&&m>0,R=(0,y.V)(),{triggerPlay:k,togglePlay:O,isActive:P}=(0,Z.P)({uri:t,..._?{}:{pages:[{items:[{type:T.c.EPISODE,uri:t,uid:null,provider:null}]}]}},{featureIdentifier:"episode"}),{isActive:j,isPlaying:L}=(0,dn.te)(t),D=f[0].url,U=(0,cn.H)(D||null),M=(0,mn.o)((e=>e?.isPaused??void 0)),B=(0,an.c)(),F=c.isPaywalled&&!c.isUserSubscribed,H=j||P,V=e?{name:e.name,uri:e.uri,mediaTypes:e.mediaTypes,audio:{items:e.audio.items.map((e=>({url:e.url})))}}:null,z=p?{name:p.name,uri:p.uri,trailer:p.trailer,showTypes:p.showTypes}:null,G=(0,K.C)(V,z),W=(0,i.useCallback)(((e,i,r,s)=>{const a=()=>{M?(s?.("resume"),w.resume()):(s?.("pause"),w.pause())};if(F)return;let o="play";if(!L||0!==e&&i||(o="pause"),I({intent:o,targetUri:t,type:"click",itemIdSuffix:e>0?"podcast-description-timestamp":"button"}),n===J.I_.Episode&&B)d.h.set((()=>({triggerId:r||on,triggerAction:null})));else if(P&&!i)R?a():O({loggingParams:s?.()});else if(j&&!i)a();else{const t=s?.("play");R?G({seekTo:e,loggingParams:t}):k({seekTo:e,loggingParams:t})}}),[F,L,I,t,n,B,j,P,R,M,w,O,G,k]),Y=(0,i.useCallback)((e=>{W(e,!1,void 0,(e=>{const n=b.actionBarFactory().playButtonFactory();let i;return i="pause"===e||L?n.hitPause({itemToBePaused:t}):"resume"===e||H?n.hitResume({itemToBeResumed:t}):n.hitPlay({itemToBePlayed:t}),v.logInteraction(i)}))}),[W,H,L,v,b,t]),q=(0,i.useCallback)((e=>{W(e,!0,void 0,(()=>v.logInteraction(b.descriptionSectionFactory().timestampLinkFactory().hitPlay({itemToBePlayed:t}))))}),[W,v,b,t]),Q=(0,i.useCallback)(((e,t)=>{W(e,!0,t)}),[W]),$=(0,i.useCallback)((()=>{I({intent:"expand-description",type:"click"})}),[I]),[X,ee]=(0,r.ok)();(0,i.useEffect)((()=>{if(e&&!H&&X.has("t")){const t=X.get("t")||"0",n=1e3*parseInt(t,10);n<=e.duration.milliseconds&&(X.delete("t"),ee(X,{replace:!0}),W(n,!0))}}),[e,W,H,X,ee]);const ne=!!s||!!o,ie=e.podcast?.uri,re=(0,l.o_)(ie)?.toURLPath(!0),se=(0,gn.e)(),ae=(0,gn.c)(),oe=C(),le=`${t}|[]`;return(0,i.useEffect)((()=>{ae||se||oe(le)}),[le,oe,se,ae]),(0,te.jsxs)("section",{"":"episode",className:je,children:[(0,te.jsx)(u.Q,{children:(0,hn.L$)({episodeOrChapterName:e.name,showOrAudiobookName:e.podcast?.name??"",type:"Podcast"})}),(0,te.jsx)(Yn,{episode:e,isFullyPlayed:S,setIsFullyPlayed:A,backgroundColor:U,spec:E}),(0,te.jsx)(kn,{episode:e,onPlayEpisode:Y,isPlaying:L,isActive:H,isFullyPlayed:S,setIsFullyPlayed:A,backgroundColor:U,isLocked:F,spec:x}),(0,te.jsxs)("div",{className:"contentSpacing",children:[(0,te.jsx)(rn,{transcript:e.transcript,hasDescription:ne,contentInformation:h,onDescriptionTimestampClick:q,onTranscriptTimestampClick:Q,onExpanded:$,description:e.description,areHTMLDescriptionsEnabled:!0,htmlDescription:e.htmlDescription,playability:e.playability,hasMusicAndTalkSegements:N,segmentCount:m,uri:e.uri,showUrl:re,spec:b}),se&&(0,te.jsx)(ve,{uri:t}),ae&&(0,te.jsx)(we,{uri:t})]})]})},Qn=i.memo((function(){const{episodeId:e=""}=(0,s.g)(),t=(0,l.iM)(e).toURI(),n=(0,pn.d)(t);return n?.isError||!n?.episodeOrChapter?(0,te.jsx)(Ie.A,{hasError:n?.isError||!1,errorMessage:c.Ru.get("error.not_found.title.podcast")}):(0,ye.Gr)(n.episodeOrChapter)?(0,te.jsx)(bn.InstrumentedRedirect,{to:(0,l.o_)(n.episodeOrChapter.book?.uri).toURLPath(!0)}):(0,te.jsx)(i.Suspense,{fallback:null,children:(0,te.jsx)(vn.u,{pageId:o.$h.PODCAST_EPISODE,uri:t,children:(0,te.jsx)(qn,{episode:n.episodeOrChapter})})})}));var $n=n(17809);const Zn=i.memo((function(){const{episodeId:e=""}=(0,s.g)(),t=(e=>`spotify:episode:${e}`)(e),n=(0,$n.c)(),i=(0,$n.e)();return(0,te.jsxs)("div",{className:"contentSpacing",children:[(0,te.jsx)(u.Q,{children:c.Ru.get("internal-link-recommender.more-episodes-like-this")}),n&&(0,te.jsx)(we,{uri:t,isFullPage:!0}),i&&(0,te.jsx)(ve,{uri:t,isFullPage:!0})]})}))},81392:(e,t,n)=>{"use strict";n.d(t,{X:()=>s.X,K:()=>r});var i=n(83648);function r(e){const{search:t}=(0,i.zy)();return new URLSearchParams(t).get("feature-activation")===e}var s=n(50212)},50212:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});let i=function(e){return e.SmartShuffle="smart-shuffle",e.GroupSessions="group-sessions",e.Blend="blend",e.CollaborativePlaylists="collaborative-playlists",e.Dj="dj",e.VeryHighQualityAudio="very-high-quality-audio",e.LiveEvents="live-events",e}({})},90923:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(22215),r=n(19498);const s=()=>{const e=(0,i.NC)(r.ttb);return e===r.ufd.HOME_NEXT_TO_NAVIGATION||e===r.ufd.HOME_NEXT_TO_SEARCH}},43329:(e,t,n)=>{"use strict";n.d(t,{B8:()=>c,FE:()=>d,U3:()=>l,W3:()=>u});var i=n(3775),r=n(16990);const s=Spicetify.GraphQL.Definitions["home"]=new i.l("home","query","a68635e823cd71d9f6810ec221d339348371ef0b878ec6b846fc36b234219c59",null),a=Spicetify.GraphQL.Definitions["homeFeedChips"]=new i.l("homeFeedChips","query","a68635e823cd71d9f6810ec221d339348371ef0b878ec6b846fc36b234219c59",null),o=Spicetify.GraphQL.Definitions["homeSubfeed"]=new i.l("homeSubfeed","query","a68635e823cd71d9f6810ec221d339348371ef0b878ec6b846fc36b234219c59",null),l=Spicetify.GraphQL.Definitions["homeSection"]=new i.l("homeSection","query","a68635e823cd71d9f6810ec221d339348371ef0b878ec6b846fc36b234219c59",null),c=(e,t)=>(0,r.I)(s,e,t),u=(e,t)=>(0,r.I)(a,e,t),d=(e,t)=>(0,r.I)(o,e,t)},13161:(e,t,n)=>{"use strict";n.d(t,{Uk:()=>d,b1:()=>p,f0:()=>u,o8:()=>c,yr:()=>h});var i=n(83856),r=n(53886),s=n(4370),a=n(35828),o=n(45640);function l(e){return{url:e.url,width:e.width,height:e.height}}function c(e){if("Episode"===e.__typename){const t=e.podcastV2.data;return"Podcast"!==t.__typename?[]:t.coverArt?.sources.map(l)??[]}return[]}function u(e){switch(e.__typename){case"Artist":return e.visuals.avatarImage?.sources.map(l)??[];case"Album":case"Audiobook":case"Podcast":case"Episode":case"Chapter":return e.coverArt?.sources.map(l)??[];case"Track":return e.albumOfTrack?.coverArt?.sources.map(l)??[];case"Playlist":return e.images.items[0]?.sources.map(l)??[];case"User":return e.avatar?.sources.map(l)??[];case"GenericError":case"NotFound":case"RestrictedContent":case"DiscoveryFeed":return[];default:return(0,o.k)(e),[]}}function d(e){switch(e.__typename){case"Artist":return(0,s.m)(e.visuals.avatarImage?.extractedColors);case"Album":case"Audiobook":case"Podcast":case"Episode":case"Chapter":return(0,s.m)(e.coverArt?.extractedColors);case"Track":return(0,s.m)(e.albumOfTrack?.coverArt?.extractedColors);case"Playlist":return(0,s.m)(e.images.items[0]?.extractedColors);case"User":return(0,s.m)(e.avatar?.extractedColors);case"GenericError":case"NotFound":case"RestrictedContent":case"DiscoveryFeed":return;default:return void(0,o.k)(e)}}function m(e){return{uri:e??"",name:"",images:[],error:!0}}function p(e){const t=function(e){if("UnknownType"===e.content.__typename){const t=(0,i.o_)(e.uri);if((0,i.Z0)(e.uri)||t?.id===i.NQ.COLLECTION)return e.uri.endsWith("your-episodes")?(0,r.n5)(t?.username):e.uri.endsWith("local-files")?(0,r.Iu)():(0,r.$R)(t?.username)}return null}(e);return null!==t?t:function(e){if(null===e||"UnknownType"===e.content.__typename||"PromotionResponseWrapper"===e.content.__typename)return m(e?.uri??null);const t=e.content.data;if(!t)return m(e?.uri??null);switch(t.__typename){case"Artist":return{uri:e.uri,name:t.profile.name??"",images:u(t)};case"Album":case"Audiobook":case"Podcast":case"Track":case"User":return{uri:e.uri,name:t.name??"",images:u(t)};case"Playlist":return{uri:e.uri,name:t.name??"",images:u(t),formatListAttributes:t.attributes??[]};case"Episode":return{uri:e.uri,name:t.name??"",images:u(t),release_date:t.releaseDate?.isoString,resume_point:{resume_position_ms:t.playedState.playPositionMilliseconds,fully_played:t.playedState.state===a._w.Completed},podcast:"Podcast"===t.podcastV2.data.__typename?{uri:t.podcastV2.data.uri,name:t.podcastV2.data.name,images:u(t.podcastV2.data)}:void 0,duration_ms:t.duration.totalMilliseconds};case"Chapter":return"Audiobook"===t.audiobookV2.data.__typename?{uri:t.audiobookV2.data.uri,name:t.audiobookV2.data.name??"",images:u(t.audiobookV2.data)}:{uri:e.uri,name:t.name??"",images:u(t)};case"GenericError":case"NotFound":case"RestrictedContent":case"DiscoveryFeed":return m(e.uri);default:return(0,o.k)(t),m(e?.uri??null)}}(e)}function h(e){return function(e){if(!e||"UnknownTypeWrapper"===e.__typename)return m(e?._uri??null);if("GenreResponseWrapper"===e.__typename||"ConcertResponseWrapper"===e.__typename||"MerchResponseWrapper"===e.__typename||"PreReleaseResponseWrapper"===e.__typename)return m(null);const t=e?.data;switch(t.__typename){case"Artist":return{uri:t.uri,name:t.profile.name??"",images:u(t)};case"Album":case"Audiobook":case"Podcast":case"Track":case"User":return{uri:t.uri,name:t.name??"",images:u(t)};case"Playlist":return{uri:t.uri,name:t.name??"",images:u(t),formatListAttributes:t.attributes??[]};case"Episode":return{uri:t.uri,name:t.name??"",images:u(t),release_date:t.releaseDate?.isoString,resume_point:{resume_position_ms:t.playedState.playPositionMilliseconds,fully_played:t.playedState.state===a._w.Completed},podcast:"Podcast"===t.podcastV2.data.__typename?{uri:t.podcastV2.data.uri,name:t.podcastV2.data.name,images:u(t.podcastV2.data)}:void 0,duration_ms:t.duration.totalMilliseconds};case"Chapter":return"Audiobook"===t.audiobookV2.data.__typename?{uri:t.audiobookV2.data.uri,name:t.audiobookV2.data.name??"",images:u(t.audiobookV2.data)}:{uri:t.uri,name:t.name??"",images:u(t)};case"GenericError":case"NotFound":case"RestrictedContent":return m(null);default:return(0,o.k)(t),m(null)}}(e)}},99411:(e,t,n)=>{"use strict";function i(e,t){return{...e,data:t}}n.d(t,{M:()=>i})},43603:(e,t,n)=>{"use strict";function i(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone??""}n.d(t,{Ff:()=>i,gO:()=>r,jl:()=>s});const r=18e5,s=3e5},75439:(e,t,n)=>{"use strict";n.d(t,{X:()=>d,A:()=>G});var i=n(79474),r=n(66675),s=n(96538),a=n(14056),o=n(27778),l=n(59875);const c="KsnGjjEeMb2miriJrkjW";var u=n(13274);const d=()=>{const e=a.Ru.getLocaleForTranslation(),t=o.IB[e]??o.IB.en,n=(0,l.ZZ)(),d=(0,i.useCallback)((()=>{n({type:"OPEN"})}),[n]);return(0,u.jsx)("div",{className:c,children:(0,u.jsx)(r.n,{iconLeading:s.d,size:"small",onClick:d,"":"language-selection-button",children:t.displayName})})};var m=n(41615),p=n(99754),h=n(98764),g=n(98196),f=n(84346),b=n(74938),v=n(63192);var y=n(50783),_=n(12275);var E=n(83856),x=n(52963),C=n(9440),S=n(60786),A=n(91303);const w="ZpqHX3kvsJIsR1QIc4kf",I=({children:e,locale:t,onClick:n,type:i="button"})=>{const r=t===x.Xn,s=(0,y.vf)(window.location.pathname),o=(0,E.o_)(window.location.pathname),l=(0,A.W)({type:"route",uri:s?C.c.HOME:o?.toURI()}),c={className:w,id:t,onClick:e=>(e=>{if("button"===i){e.preventDefault();const t=new URL(window.location.href);window.location.href.includes("locale")&&t.searchParams.delete("locale"),window.location.href=t.href}n(t)})(e),"":`language-option-${t}`};if("link"===i){const n=(0,S.ll)(window.location.pathname,!r),i=(0,S.hF)(n,(0,a.a7)(t).baseName),s=l?i:window.location.pathname,o=(e=>e.endsWith("/")?e.slice(0,-1):e)(`${window.location.origin}${s}`);return(0,u.jsx)("a",{href:o,...c,children:e})}return(0,u.jsx)("button",{...c,children:e})},T="eYLSfS4EKfwsdTsItWkY",N=({style:e,children:t})=>(0,u.jsx)("div",{className:T,style:e,children:t});var R=n(97500),k=n.n(R),O=n(22215),P=n(82548);const j="KPuW9eE4auKgVgMtPZoH",L="zCedVxWmwaJhPIGzJixP",D="qzuG9AHNXHQrOGF06r9A",U="ZgjCz5A7qOyprtvcLK8y",M="BSwvSvqHiQUVuim4Eidv",B="TpluDuF12UKv3IIq_VDu",F=({onClose:e,children:t})=>{const n=(0,i.useRef)(null),{isOpen:r}=(0,l.iL)(),s=(0,O.NC)(P.rW);return(0,u.jsx)("div",{"":"language-selection-modal",className:k()(j,{"circular-sp-vietnamese":s,[L]:r}),onClick:t=>{t.target===n.current&&e()},role:"presentation",ref:n,children:t})},H=({ariaDescribedBy:e,ariaLabelledBy:t,children:n})=>{const{isOpen:i}=(0,l.iL)();return(0,u.jsx)("div",{className:D,role:"dialog",hidden:!i,"aria-modal":!0,"aria-labelledby":t,"aria-describedby":e,children:n})};var V=n(23689);const z=({onClose:e})=>(0,u.jsx)("button",{"":"close-button",className:B,onClick:()=>{e()},children:(0,u.jsx)(V.M,{size:"small","aria-label":a.Ru.get("close")})}),G=({languageSelectionModalRef:e})=>{const t=(0,i.useRef)(null),[n,r]=(0,i.useState)("0"),s=(0,l.ZZ)(),c=(0,p.d4)(_.MU),d=(0,i.useCallback)((()=>{s({type:"CLOSE"})}),[s]),{isOpen:E}=(0,l.iL)(),x=(0,i.useCallback)((()=>{r(`${t.current?.getBoundingClientRect().height}px`)}),[r]),C=e=>{var t;(0,v.n0)({name:"sp_locale",value:e,domain:(t="open.spotify.com",t.substring(t.indexOf("."))),days:365}),d()};var S;if(S=d,(0,i.useEffect)((()=>{const e=e=>{"Escape"===e.key&&S()};return window.addEventListener("keyup",e,!1),()=>window.removeEventListener("keyup",e)})),(0,b.w)({refOrElement:t,observeOnly:"height",onResize:x}),(0,i.useEffect)((()=>{x()}),[x]),!e.current)return null;const A="language-selection-title",w="language-selection-subtitle",T={"--header-height":n};return(0,m.createPortal)((0,u.jsx)(f.s,{active:E,children:(0,u.jsx)("div",{children:(0,u.jsx)(F,{onClose:d,children:(0,u.jsxs)(H,{ariaLabelledBy:A,ariaDescribedBy:w,children:[(0,u.jsxs)("div",{className:U,ref:t,children:[(0,u.jsxs)("div",{className:M,children:[(0,u.jsx)(h.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",id:A,paddingBottom:g.v4,children:a.Ru.get("i18n.language-selection.title")}),(0,u.jsx)(h.E,{as:"p",variant:"bodyMedium",semanticColor:"textBase",id:w,paddingBottom:g.CD,children:a.Ru.get("i18n.language-selection.subtitle")})]}),(0,u.jsx)(z,{onClose:d})]}),(0,u.jsx)(N,{style:{...T},children:o.Np.map((e=>{const t=(0,a.a7)(e).baseName,n=(0,y.p)({localeFeatureFlag:c,urlLocale:t,type:"locale"});return(0,u.jsxs)(I,{onClick:C,locale:e,type:n?"link":"button",children:[(0,u.jsx)(h.E,{semanticColor:"textBase",children:o.IB[e].displayName}),(0,u.jsx)(h.E,{children:o.IB[e].displayNameEn})]},e)}))})]})})})}),e.current)}},57055:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var i=n(79474),r=n(88255),s=n(82052),a=n(45640),o=n(43364),l=n(7293),c=n(7131);c.sQ.MIN,c.sQ.MAX;const u=()=>{const{ylxSidebarState:e,setYlxSidebarState:t,canCollapse:n,canExpand:u}=(0,r.$)(),[d,m]=(0,s.x)("ylx-default-state-nav-bar-width",Math.max(c.ZU.DEFAULT_MIN,Math.min(Math.round(.23*innerWidth),c.ZU.DEFAULT_MAX))),[p,h]=(0,s.x)("ylx-expanded-state-nav-bar-width",Math.max(c.ZU.EXPANDED_MIN,Math.min(Math.round(.55*innerWidth),c.ZU.EXPANDED_MAX)));let g;switch(e){case r.fX.COLLAPSED:g=c.ZU.COLLAPSED;break;case r.fX.DEFAULT:g=d;break;case r.fX.EXPANDED:g=p;break;case null:g=d;break;default:(0,a.k)(e),g=d}const f=(0,i.useCallback)((e=>{e<c.ZU.DEFAULT_MIN?t(r.fX.COLLAPSED):c.ZU.DEFAULT_MIN<=e&&e<=c.ZU.DEFAULT_MAX?(t(r.fX.DEFAULT),m(e)):c.ZU.EXPANDED_MIN<=e&&e<=c.ZU.EXPANDED_MAX?(t(r.fX.EXPANDED),h(e)):console.warn("`LeftSidebar.setSize` call out of bounds")}),[t,m,h]),b=(0,l.H)()-o.ev-3*o.KV,v=(0,i.useMemo)((()=>[...n?[[c.ZU.COLLAPSED,c.ZU.COLLAPSED]]:[],[c.ZU.DEFAULT_MIN,c.ZU.DEFAULT_MAX],...u?[[c.ZU.EXPANDED_MIN,c.ZU.EXPANDED_MAX]]:[]].map((([e,t])=>[e,Math.min(t,b)]))),[n,u,b]);let y,_;switch(e){case r.fX.COLLAPSED:y=_=c.ZU.COLLAPSED;break;case r.fX.DEFAULT:y=c.ZU.DEFAULT_MIN,_=c.ZU.DEFAULT_MAX;break;case r.fX.EXPANDED:y=c.ZU.EXPANDED_MIN,_=c.ZU.EXPANDED_MAX;break;case null:y=0,_=0;break;default:y=0,_=0,(0,a.k)(e)}return{size:g,setSize:f,minMaxRanges:v,minWidth:y,maxWidth:_,ylxCollapsedStateNavbarWidth:c.ZU.COLLAPSED,ylxDefaultStateNavbarWidth:d,ylxExpandedStateNavbarWidth:p}}},7131:(e,t,n)=>{"use strict";n.d(t,{ZU:()=>i,sQ:()=>r,x9:()=>s});let i=function(e){return e[e.COLLAPSED=72]="COLLAPSED",e[e.DEFAULT_MIN=280]="DEFAULT_MIN",e[e.DEFAULT_MAX=420]="DEFAULT_MAX",e[e.EXPANDED_MIN=584]="EXPANDED_MIN",e[e.EXPANDED_MAX=Number.POSITIVE_INFINITY]="EXPANDED_MAX",e}({}),r=function(e){return e[e.MIN=120]="MIN",e[e.DEFAULT=232]="DEFAULT",e[e.MAX=384]="MAX",e}({});const s="createPlaylist"},68876:(e,t,n)=>{"use strict";n.d(t,{ZU:()=>i.ZU,x9:()=>i.x9});var i=n(7131)},79742:(e,t,n)=>{"use strict";n.d(t,{y:()=>i.y});var i=n(57055)},85960:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});var i=n(18645),r=n(55810),s=n(7009);const a={[s.n.ADDED_AT]:r.Sw.ADDED_AT,[s.n.ADDED_BY]:null,[s.n.ALBUM]:r.Sw.ALBUM_NAME,[s.n.ARTIST]:r.Sw.ARTIST_NAME,[s.n.DURATION]:null,[s.n.TITLE]:r.Sw.NAME},o=e=>{const t=(0,i.Xt)(e);if(!t)return;const n=a[t.field],r=t.order;return n&&r?{field:n,order:r}:void 0}},25654:(e,t,n)=>{"use strict";n.d(t,{o:()=>f});var i=n(14056),r=n(36575),s=n(66956),a=n(26271),o=n(93207),l=n(85406),c=n(53886),u=n(99754),d=n(31350),m=n(76661),p=n(42232);var h=n(13274);const g=({metadata:e,index:t,variant:n})=>{const{isPlaying:l,togglePlay:c}=(0,a.P)({uri:e.uri},{featureIdentifier:"your_library"}),{name:u,images:d}=e;return(0,h.jsx)(r.Z,{variant:n,index:t,delegatePlayback:!0,delegateLogging:!0,isPlaying:l,featureIdentifier:"your_library",onPlay:(e,t)=>c({loggingParams:t}),headerText:u,uri:e.uri,renderCardImage:()=>(0,h.jsx)(s.M,{images:d}),renderSubHeaderContent:()=>(0,h.jsx)(o.c,{children:i.Ru.get("tracklist-header.songs-counter",e.totalLength)})})},f=({index:e,variant:t})=>{const n=function(){const e=(0,m.dB)({offset:0,limit:1}),{user:t}=(0,u.d4)(d.Ht);if(null===e||null===t)return null;const n=(0,c.$R)(t.id);return n?{uri:n.uri,name:n.name,images:n.images,totalLength:e?.totalLength,unfilteredTotalLength:e.unfilteredTotalLength,owner:(0,p.w)(t)}:null}();return n?(0,h.jsx)(g,{metadata:n,index:e,variant:t}):(0,h.jsx)(l.u,{cardImage:(0,h.jsx)(s.M,{images:c.s0}),isLoading:!0,variant:t})}},55456:(e,t,n)=>{"use strict";n.d(t,{H:()=>r,k:()=>i});const i=18e5,r=6e5},1264:(e,t,n)=>{"use strict";n.d(t,{I:()=>v});var i=n(28049),r=n(22215),s=n(83856),a=n(7452),o=n(82548),l=n(68013),c=n(15343),u=n(17072),d=n(55195);function m(e,t,n){const{startTimeMs:i,words:r}=e,s=n[t+1];return{start:i||0,end:s&&s.startTimeMs?s.startTimeMs:1/0,text:r}}function p(e){return c.Q.fromInt(e).toCSS(u.a.RGB)}var h=n(55456),g=n(81228),f=n(56864);const b={hasLyrics:!1},v=(e,t)=>{const n=(0,a.h)(t||void 0,{desiredLabel:"large",desiredSize:600})??t?.[0]?.url??"",c=(0,f.X)(),u=(0,r.NC)(o.Tc,{loadingValue:o.LZ.CONTROL}),v={[o.LZ.CONTROL]:void 0,[o.LZ.SYSTEM_LANGUAGE]:navigator.language,[o.LZ.ALL_LANGUAGES]:"all"}[u],y=["lyrics",{uri:e,image:n,vocalRemoval:c}],{hasLyrics:_,isLoading:E}=(0,g.f)(e),{data:x,isLoading:C,isError:S}=(0,i.I)({queryKey:y,queryFn:async()=>{if(!e||!n||!(0,s.U_)(e))return b;const t=await async function(e,t,n,i){try{const a=await(0,d.S)(e,t,n,i);return{hasLyrics:!0,isTimeSynced:(s=a.lyrics.syncType,"LINE_SYNCED"===s||"SYLLABLE_SYNCED"===s),syncType:a.lyrics.syncType,lyrics:a.lyrics.lines.map(m),colors:(r=a.colors,{text:p(r.text),activeText:p(r.highlightText),background:p(r.background)}),provider:a.lyrics.provider,providerDisplayName:a.lyrics.providerDisplayName,providerLyricsId:a.lyrics.providerLyricsId,hasVocalRemoval:a.hasVocalRemoval??!1,showUpsell:a.lyrics.showUpsell??!1,alternatives:a.lyrics.alternatives}}catch(e){if(e instanceof l.O&&404===e.status)return{hasLyrics:!1};throw e}var r,s}(e,n,c,v);return t},gcTime:h.k,staleTime:h.H,enabled:_}),A=E||C;let w=null;return A||(w=_?x??null:b),{data:w,loading:A,error:S}}},81228:(e,t,n)=>{"use strict";n.d(t,{f:()=>l});var i=n(28049),r=n(35430),s=n(83856),a=n(55195),o=n(55456);const l=e=>{const t=!!e&&(0,s.U_)(e),{data:n,isLoading:l}=(0,i.I)({queryKey:["useLyricsAvailability",e],queryFn:async()=>!!e&&await(0,a.z)(e),gcTime:o.k,staleTime:o.H,enabled:t,placeholderData:r.rX});return{isLoading:l,hasLyrics:!!t&&(n??!1)}}},56864:(e,t,n)=>{"use strict";n.d(t,{X:()=>a});var i=n(22215),r=n(19498),s=n(68830);const a=()=>{const e=(0,s.S)(),{isSupported:t}=e.getCapabilities();return(0,i.NC)(r.OBX,{loadingValue:!1})&&t}},30710:(e,t,n)=>{"use strict";n.d(t,{Bg:()=>i,gL:()=>s,gh:()=>r});let i=function(e){return e.SET_LYRICS_MODE="SET_LYRICS_MODE",e.SET_LYRICS_TRANSLATION_LANGUAGE="SET_LYRICS_ALTERNATIVE_LANGUAGE",e}({});const r=e=>({type:i.SET_LYRICS_MODE,mode:e}),s=e=>({type:i.SET_LYRICS_TRANSLATION_LANGUAGE,language:e})},62163:(e,t,n)=>{"use strict";n.d(t,{s:()=>r,u:()=>i});const i=e=>e.ui.lyrics.mode,r=e=>e.ui.lyrics.translationLanguage},55195:(e,t,n)=>{"use strict";n.d(t,{S:()=>a,z:()=>o});var i=n(83856),r=n(21361),s=n(88724);const a=async(e,t,n,a)=>{const o=(0,i.o_)(e).id,l=r.n.getInstance(),c={format:"json",vocalRemoval:n};a&&(c.clientLanguage=a);return(await l.build().withHost(s.Hj).withPath(`/track/${encodeURIComponent(o)}/image/${encodeURIComponent(t)}`).withQueryParameters(c).withEndpointIdentifier("/track/{trackId}").send()).body},o=async e=>{const t=(0,i.Y8)((0,i.o_)(e)?.id);if(!t)return!1;const n=r.n.getInstance(),a=await n.build().withHost(s.XE).withPath(`/track/${encodeURIComponent(t)}`).withEndpointIdentifier("/track/{trackId}").send();return a.body?.has_lyrics||!1}},33523:(e,t,n)=>{"use strict";n.d(t,{e:()=>u});var i=n(83648),r=n(70773),s=n(65732),a=n(80120),o=n(79474);var l=n(13274);const c=({children:e,navigationalRoot:t,pageId:n,entityUri:c})=>{const u=(0,s.H)(),d=t??u,m=(0,i.zy)();return function({pageId:e,navigationalRoot:t,entityUri:n}){const i=(0,s.u)();(0,o.useEffect)((()=>{i&&e&&i.reportPageView({pageId:e,navigationalRoot:t,entityUri:n})}),[e,i,t,n])}({pageId:n,navigationalRoot:d,entityUri:(0,r.y)(c??m.pathname)}),(0,l.jsx)(a.z,{value:d,children:e})};function u({children:e,pageId:t,navigationalRoot:n,entityUri:i}){return(0,l.jsx)(c,{navigationalRoot:n,pageId:t,entityUri:i,children:e})}},98832:(e,t,n)=>{"use strict";n.r(t),n.d(t,{InstrumentedRedirect:()=>l});var i=n(83648),r=n(83989),s=n(14494),a=n(70773);var o=n(13274);const l=({to:e,state:t})=>{const n=(0,i.g)(),l=function(){const e=(0,i.zy)(),t=(0,s.s)(),n=e.state?.interactionId;return n??t.getInteractionId((0,a.y)(e.pathname))}();return"string"==typeof e?(0,o.jsx)(i.C5,{to:(0,r.tW)(e,n),state:{...t,interactionId:l},replace:!0}):(0,o.jsx)(i.C5,{to:{...e,pathname:(0,r.tW)(e.pathname,n)},state:{...t,interactionId:l},replace:!0})}},44060:(e,t,n)=>{"use strict";n.d(t,{r:()=>u});var i=n(14056),r=n(33082),s=n(41982),a=n(57506),o=n(86412),l=n(54260),c=n(45640);function u(e){if((0,o.v)(e)||(0,l.v)(e)){let t=e.name;const n=e.artists.map((e=>e.name)).join(i.Ru.getSeparator());return n&&(t=`${t} • ${n} `),t}return(0,a.p)(e)?`${e.name} • ${e.show.name}`:(0,s.d)(e)||(0,r.N)(e)?(console.error(e.uri,"is not draggable"),""):(0,c.d)(e)}},60204:(e,t,n)=>{"use strict";n.d(t,{P:()=>d,X:()=>u});var i=n(14056),r=n(33082),s=n(41982),a=n(57506),o=n(86412),l=n(54260),c=n(45640);function u(e){return(0,o.v)(e)?i.Ru.get("playback-control.now-playing-label",e.name,e.artists.map((({name:e})=>e)).join(i.Ru.getSeparator())):(0,a.p)(e)?i.Ru.get("playback-control.now-playing-label",e.name,e.show.name):(0,s.d)(e)?i.Ru.get("playback-control.now-playing-label",e.name,e.book.name):(0,r.N)(e)?i.Ru.get("ad-formats.advertisement"):(0,l.v)(e)?void 0:(0,c.d)(e)}function d(e){let t=u(e);return t||(t=i.Ru.get("queue.now-playing")),t}},89426:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var i=n(30232),r=n(37693);function s(e,t){return null===e||null===t?e===t:e.context.uri===t.context.uri&&e.item?.uri===t.item?.uri&&e.item?.mediaType===t.item?.mediaType&&(0,r.a)(e.item?.metadata,t.item?.metadata)&&e.index.itemIndex===t.index.itemIndex&&e.index.pageIndex===t.index.pageIndex&&e.index.pageURI===t.index.pageURI}function a(){const e=(0,i.o)((e=>e),s);if(null===e)return null;const{context:t,item:n,index:r}=e;return null===n?null:{context:t,item:n,index:r}}},91746:(e,t,n)=>{"use strict";n.d(t,{b:()=>i.b});var i=n(16368)},13982:(e,t,n)=>{"use strict";n.d(t,{d:()=>i.d});var i=n(54047)},26774:(e,t,n)=>{"use strict";n.d(t,{W:()=>i.W});var i=n(17252)},84378:(e,t,n)=>{"use strict";n.d(t,{e:()=>_});var i=n(79474),r=n(83856),s=n(60516),a=n(30957),o=n(9544),l=n(75653),c=n(33082),u=n(41982),d=n(57506),m=n(86412),p=n(54260),h=n(45640),g=n(16649),f=n(60204),b=n(13274);const v=(0,i.lazy)((()=>n.e(7511).then(n.bind(n,7511))));function y(e,t,n){let i=(0,s.H)(e.uri);if((0,g.c0)(i))return null;const a=(0,r.U_)(i),c=i===l.bV,p="queue"===t.provider;(a||p||c)&&((0,m.v)(t)?i=t.album.uri:((0,d.p)(t)||(0,u.d)(t))&&(i=t.uri),c&&(i=o.E3));const h=(0,r.o_)(i);if(null===h)return null;if((0,m.v)(t)||(0,d.p)(t)||(0,u.d)(t)){return{to:h.toURLPath(!0),search:(f={uid:t.uid,uri:t.uri,page:n?.pageIndex??null,pageUri:n?.pageURI??null,index:n?.itemIndex??null,highlight:a?t.uri:null},Object.keys(f).filter((e=>null!==f[e])).map((e=>`${e}=${encodeURIComponent(f[e])}`)).join("&"))}}var f;return{to:h.toURLPath(!0)}}const _=({context:e,index:t,item:n,isVisible:r,children:s,className:o,referrer:l,onClick:g,adEventReason:_})=>{const E=(0,f.P)(n),x=n.type,C=r?void 0:-1;if((0,m.v)(n)||(0,d.p)(n)||(0,u.d)(n)){const i=y(e,n,t);return i?(0,b.jsx)(a.default,{className:o,referrer:l,"":"context-link","data-context-item-type":x,style:{border:"none"},to:i.to,search:i.search,"aria-label":E,tabIndex:C,onClick:g,children:s}):(0,b.jsx)(b.Fragment,{children:s})}return(0,c.N)(n)?(0,b.jsx)(i.Suspense,{fallback:(0,b.jsx)(b.Fragment,{children:s}),children:(0,b.jsx)(v,{item:n,"aria-label":E,tabIndex:C,adEventReason:_,children:s})}):(0,p.v)(n)?(0,b.jsx)(b.Fragment,{children:s}):(0,h.d)(n)}},4958:(e,t,n)=>{"use strict";n.d(t,{$K:()=>c.$,dQ:()=>l.d,hC:()=>s.h,s_:()=>r.s,uP:()=>o.u,v3:()=>a.v,w0:()=>u.w,xJ:()=>i.x});var i=n(85031),r=n(53159),s=n(57827),a=n(6963),o=n(46782),l=n(633),c=n(51915),u=n(41876)},57654:(e,t,n)=>{"use strict";n.d(t,{M:()=>i.M,V:()=>i.V});var i=n(9421)},24594:(e,t,n)=>{"use strict";n.d(t,{r:()=>i.r});var i=n(44060)},88040:(e,t,n)=>{"use strict";n.d(t,{L:()=>i.L});var i=n(89426)},35187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,D:()=>a});var i=n(79474),r=n(13274);const s=(0,i.createContext)({online:!0});const a=({children:e,initialStatus:t})=>{const[n,a]=(0,i.useState)((()=>t??globalThis.navigator.onLine));(0,i.useEffect)((()=>{const e=()=>{a(!0)},t=()=>{a(!1)};return window.addEventListener("online",e),window.addEventListener("offline",t),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}),[]);const o=(0,i.useMemo)((()=>({online:n})),[n]);return(0,r.jsx)(s.Provider,{value:o,children:e})}},7040:(e,t,n)=>{"use strict";n.d(t,{BX:()=>s,LA:()=>a,TL:()=>i,f6:()=>o,nW:()=>r});const i=280,r=420,s="panel-width",a="panel-width-saved",o="--panel-width"},54754:(e,t,n)=>{"use strict";n.d(t,{O:()=>u});var i=n(22215),r=n(8720),s=n(19498),a=n(7040),o=n(60181),l=n(14452),c=n(10392);function u(){const e=(0,i.NC)(s.jJQ),t=(0,l.X)(),{size:n,savedSize:u,min:d}=(0,r.Z)(),m=Math.min(1,n/a.TL),p=t===o.Z.Disabled?{width:0,opacity:0,transform:"scale(0.8)","--panel-min-width":`${u}`}:{width:n,opacity:m,transform:`scale(${.8+.2*m})`,"--panel-min-width":`${n<d?d:n}`};return e?{animatedStyles:p,animatedClassNames:c.A.panelTransition}:{animatedStyles:p,animatedClassNames:""}}},93536:(e,t,n)=>{"use strict";n.d(t,{_:()=>p});var i=n(79474),r=n(22215),s=n(587),a=n(43364),o=n(19498),l=n(7040),c=n(60181),u=n(14452),d=n(7012);const m=e=>(0,i.useCallback)((()=>{const t=document.querySelector(`[data-restore-focus-key="${e}"]`);t instanceof HTMLElement&&t.focus()}),[e]);function p(){const e=(0,u.X)(),[,,t]=(0,d.s)(),n=function(){const[,e]=(0,d.s)();return e.send}(),p=m(e),h=(0,s.qg)(),g=(0,r.NC)(o.jJQ),f=(0,i.useCallback)((e=>{document.documentElement.style.setProperty(l.f6,`${e}px`),h.setItem(l.BX,e)}),[h]);return(0,i.useCallback)(((i,r=!1)=>{if(r)return void n(i);const s=t.transition(e,i).value;if(e!==s)if(e===c.Z.Disabled){n(i);const e=h.getItem(l.LA),t="number"==typeof e?Math.max(e,l.TL):l.TL;g?setTimeout((()=>f(t))):f(t)}else s===c.Z.Disabled?(f(0),g?setTimeout((()=>n(i)),a.cp):n(i),p()):n(i);else n(i)}),[t,e,n,h,g,f,p])}},8720:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var i=n(22215),r=n(43364),s=n(79742),a=n(7293),o=n(82052),l=n(19498),c=n(7040);function u(){const[e,t]=(0,o.x)(c.BX,Math.max(c.TL,Math.min(Math.round(.23*innerWidth),c.nW))),[n,u]=(0,o.x)(c.LA,c.TL),d=(0,i.NC)(l.Wfl,{loadingValue:!1}),{minWidth:m}=(0,s.y)(),p=(0,a.H)();let h=c.nW;if(d){const e=p-m-r.ev-4*r.KV;h=Math.min(Math.max(0,e),h)}return{size:e,setSize:n=>{0===n&&0!==e?u(Math.max(c.TL,e)):n>=c.TL&&u(n),t(n)},savedSize:n,min:c.TL,max:h}}},2281:(e,t,n)=>{"use strict";n.d(t,{$S:()=>r.$S,MQ:()=>i.MQ,pF:()=>i.pF});var i=n(12363),r=n(86900)},10098:(e,t,n)=>{"use strict";n.d(t,{Ev:()=>l,XB:()=>s.X,_Y:()=>r._,Zf:()=>i.Z,AI:()=>c,sV:()=>o.s});var i=n(8720),r=(n(54754),n(93536)),s=n(14452),a=n(79474),o=n(7012);function l(e){const[t,n,i]=(0,o.s)(),[r,s]=(0,a.useState)(!0),l=(0,a.useCallback)((t=>{const n=i.transition(t,e);s(n.changed??!0)}),[i,e]);return(0,a.useEffect)((()=>{const e=n.subscribe(l);return()=>e.unsubscribe()}),[n]),r}function c(e){const[t]=(0,o.s)(),n=(0,r._)();return{isActive:t.value===e,panelSend:n,context:t.context}}},60181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});let i=function(e){return e.NowPlayingView="now_playing_view",e.BuddyFeed="buddy_feed",e.Puffin="puffin",e.PuffinActivation="puffin_activation",e.Queue="queue",e.DevicePicker="device_picker",e.Disabled="disabled",e}({})},86900:(e,t,n)=>{"use strict";n.d(t,{$S:()=>u,BV:()=>d});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(97191),r=n(60181),s=n(57506),a=n(8595),o=n(9440),l=n(45640);const c="ui.right_sidebar_content";let u=function(e){return e.NPV_BUTTON_CLICK="npv_button_click",e.BUDDY_FEED_BUTTON_CLICK="buddy_feed_button_click",e.PUFFIN_BUTTON_CLICK="puffin_button_click",e.PUFFIN_START_ACTIVATION="puffin_start_activation",e.PUFFIN_FINISH_ACTIVATION="puffin_finish_activation",e.QUEUE_BUTTON_CLICK="queue_button_click",e.JAM_CONNECT_BAR_CLICK="jam_connect_bar_click",e.DEVICE_PICKER_BUTTON_CLICK="device_picker_button_click",e.PANEL_CLOSE_CLICK_OR_COLLAPSE="panel_close_click_or_collapse",e.PLAYBACK_AUTOPLAY="playback_autoplay",e.PLAY_CLICK="play_click",e.PLAYBACK_AUTOPLAY_CONTEXT_CHANGED="playback_autoplay_context_changed",e}({});function d(e,t,n,d,m){const{isAutoToggleNPVEnabled:p,isQueueOnRightPanelEnabled:h,isDevicePickerSidePanelEnabled:g}=d;function f(t){const n=e.getState()?.context;switch(t){case r.Z.BuddyFeed:return!m;case r.Z.NowPlayingView:return!m&&(0,a.O)(n);case r.Z.PuffinActivation:case r.Z.Puffin:return!m;case r.Z.Queue:return h;case r.Z.DevicePicker:return g;case r.Z.Disabled:return!0;default:return(0,l.d)(t),!1}}function b(e){const t=e&&(0,s.p)(e)&&("video"===e.mediaType||"mixed"===e.mediaType);return Boolean(t)}function v(e,t){const n=t.playerState?.item;return b(n)}function y(e){return e.playerState?.item?.type===o.c.AD}function _(e,t){return y(t)}function E(t){return e.getState()?.item?.type!==o.c.AD}const x=new Set(["buddy_feed"]),C=new Set([...x,"queue","history"]);function S(e,t){const n=t.playerState?.item;return!!b(n)||(function(e){h?C.has(e.action.origin.featureIdentifier):x.has(e.action.origin.featureIdentifier)}(t),!1)}function A(e){return e.type===u.PLAYBACK_AUTOPLAY&&!y(e)}const w=new Set([u.BUDDY_FEED_BUTTON_CLICK,u.PUFFIN_BUTTON_CLICK,u.DEVICE_PICKER_BUTTON_CLICK,u.PANEL_CLOSE_CLICK_OR_COLLAPSE,u.NPV_BUTTON_CLICK,u.PLAY_CLICK,u.QUEUE_BUTTON_CLICK,u.JAM_CONNECT_BAR_CLICK]);function I(e){return A(e)||function(e){return"xstate.init"!==e.type&&w.has(e.type)}(e)}function T(e){return function(n,i){m||t.setItem(c,e),I(i)&&(n.preAdsPanelState=e)}}function N(e){return function(t,n){return!(!A(n)||e!==t.preAdsPanelState)}}const R=(0,i.Op)({id:"RightPanelState",context:{preAdsPanelState:null,devicePicker:null},initial:function(){const e=t.getItem(c);return function(e){return Object.values(r.Z).includes(e)}(e)&&f(e)?e:r.Z.Disabled}(),states:{[r.Z.Disabled]:{entry:[T(r.Z.Disabled)],on:{[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue},[u.JAM_CONNECT_BAR_CLICK]:[{target:r.Z.Queue}],[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:v},{target:r.Z.NowPlayingView,cond:_}],[u.PLAYBACK_AUTOPLAY_CONTEXT_CHANGED]:{target:r.Z.NowPlayingView,cond:()=>p},[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:S}]}},[r.Z.NowPlayingView]:{entry:[T(r.Z.NowPlayingView)],on:{[u.NPV_BUTTON_CLICK]:{target:r.Z.Disabled,cond:E},[u.PANEL_CLOSE_CLICK_OR_COLLAPSE]:{target:r.Z.Disabled,cond:E},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin,cond:E},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed,cond:E},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue,cond:E},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Queue,cond:E},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker,cond:E},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.BuddyFeed,cond:N(r.Z.BuddyFeed)},{target:r.Z.Disabled,cond:N(r.Z.Disabled)},{target:r.Z.DevicePicker,cond:N(r.Z.DevicePicker)},{target:r.Z.Disabled,cond:function(e,t){if(t.type===u.PLAYBACK_AUTOPLAY){const e=t.playerState?.context;if(!(0,a.O)(e))return!0}return!1}}]}},[r.Z.BuddyFeed]:{entry:[T(r.Z.BuddyFeed)],on:{[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.Disabled},[u.PANEL_CLOSE_CLICK_OR_COLLAPSE]:{target:r.Z.Disabled},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Queue},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:v},{target:r.Z.NowPlayingView,cond:_}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:S}]}},[r.Z.Queue]:{entry:[T(r.Z.Queue)],on:{[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Disabled},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Disabled},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed},[u.PANEL_CLOSE_CLICK_OR_COLLAPSE]:{target:r.Z.Disabled},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:v},{target:r.Z.NowPlayingView,cond:_}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:S}]}},[r.Z.Puffin]:{entry:[T(r.Z.Puffin)],on:{[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Disabled},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.PANEL_CLOSE_CLICK_OR_COLLAPSE]:{target:r.Z.Disabled},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Queue},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:v},{target:r.Z.NowPlayingView,cond:_}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:S}}},[r.Z.DevicePicker]:{entry:[T(r.Z.DevicePicker),(0,i.kp)({devicePicker:(e,t)=>t.type===u.DEVICE_PICKER_BUTTON_CLICK&&t.interactionId?{interactionId:t.interactionId}:null})],exit:[(0,i.kp)({devicePicker:null})],on:{[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.Disabled},[u.PANEL_CLOSE_CLICK_OR_COLLAPSE]:{target:r.Z.Disabled},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Queue},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:v},{target:r.Z.NowPlayingView,cond:_}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:S}}},[r.Z.PuffinActivation]:{entry:[],on:{[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Disabled},[u.PUFFIN_FINISH_ACTIVATION]:{target:r.Z.Puffin},[u.PANEL_CLOSE_CLICK_OR_COLLAPSE]:{target:r.Z.Disabled},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_}]}}}});for(const e of Object.values(R.config.states))e.on=Object.entries(e.on||{}).reduce(((e={},[t,n])=>{const i=Array.isArray(n)?n:[n];return e[t]=Object.values(i).map((e=>{const t="string"==typeof e?{target:e}:e,n="function"==typeof t.cond?t.cond:()=>!0;return t.cond=(e,i)=>{const r=n;return f(t.target)&&r(e,i)},t})),e}),{});return R}},12459:(e,t,n)=>{"use strict";n.d(t,{J:()=>a});var i=n(79474),r=n(97404),s=n(6193);const a=({uri:e,permissionLevel:t})=>{const n=(0,s.a)(),{onCopyLink:a}=(0,r.L)({uri:e,interactionData:{intent:"share",type:"click"}});return{onCopyLink:(0,i.useCallback)((async()=>{const i=await n.getPermissionGrant(e,t),r=new URLSearchParams;return i.token&&r.set("pt",i.token),a(r)}),[e,t,n,a])}}},43568:(e,t,n)=>{"use strict";n.d(t,{$:()=>o});var i=n(79474),r=n(22215),s=n(18645),a=n(19498);const o=(e,t)=>{const n=(0,r.NC)(a.G6N);return(0,i.useMemo)((()=>({metadataOptions:{decorateFormatListData:!0,withSync:!0,hydrateCollaboratorsWithMembers:n},contentsOptions:{offset:0,limit:25,sort:(0,s.Xt)(e),filter:t}})),[n,e,t])}},90547:(e,t,n)=>{"use strict";n.d(t,{J:()=>i.J});var i=n(12459)},36327:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>St,usePremiumRoutes:()=>Lt,useSessionStorage:()=>Dt});var i=n(79474),r=n(59313),s=n(22215),a=n(81731),o=n(14056),l=n(39927),c=n(67302),u=n(82089),d=n(19498),m=n(99754),p=n(15945),h=n(31350);var g=n(28049),f=n(21361),b=n(88724);const v=(e,t)=>{const n=new URL(e);return n.searchParams.set("ref",t),n.toString()},y=e=>v(e,"desktop_app_native_pdp"),_=`${b.Zc}/premium-marketing`,E=(e,t,n)=>{const{data:i,isLoading:r,isError:s}=(0,g.I)({queryKey:["premium-page"],queryFn:async()=>{const i=await(async(e,t,n)=>{const i=f.n.getInstance(),r=await i.build().withHost(_).withMethod("GET").withoutMarket().withPath("/marketingPage").withQueryParameters(((e,t,n)=>{const i={locale:e,automatedPaymentIcons:!0};return t&&(i.userEligibility=t),n&&(i.dateTimeOverride=n),i})(e,t,n)).withJsonContentType().withEndpointIdentifier("/marketingPage").send();return r.body})(e,t,n);return i.marketingPage},gcTime:18e5,staleTime:6e5});return{data:i??null,loading:r,error:s}};var x=n(97500),C=n.n(x),S=n(98764),A=n(91265),w=n(25949),I=n(88052),T=n(52792);const N="t_HhrMRQykkfPlBj5Bqg",R="rPZpSQivkcUpuKUQ5hQR",k="Mn0mjlP624SdPXlf0XD9",O="BkzyB9IfZLLrRaOv6hs8",P="nSzy4mYX_IKfAZBIAH1o",j="L2XtbwKztWBlt5ECfbk3",L="Nz9dhLHeQc78xXXo5hvO";var D=n(13274);const U=({data:e,useLatestTweakit:t})=>{const{spec:n}=(0,c.r)(a.Z,{data:{identifier:"benefitsEducation",reason:`${e.campaignId}:${e.userEligibility}`}}),r=(0,i.useMemo)((()=>n.educationListContainerFactory()),[n]),s=(0,T.t)(r);return(0,D.jsx)("div",{className:N,ref:s,"":"benefit-education-list",children:(0,D.jsxs)("div",{className:C()(R,{[j]:t}),children:[(0,D.jsx)(S.E,{className:L,as:"h2",size:24,variant:"titleSmall",color:"var(--spice-text)",semanticColor:"textBase",children:e.header}),(0,D.jsx)("div",{className:k,children:(0,D.jsx)(A.b,{as:"ul",listStyleReset:!1,className:O,"aria-label":"premium-benefits",children:e.benefits.map(((e,t)=>(0,D.jsxs)("div",{className:P,children:[(0,D.jsx)(w.i,{}),(0,D.jsx)(I.K,{"":"premium-benefit-item",className:P,color:"var(--spice-text)",condensed:!0,style:{marginLeft:"4px"},children:e},t)]},t)))})})]})})};var M=n(66569),B=n(81887),F=n(19448),H=n(62793);const V="hpcwgABmQsxArg6CHmwL",z="NiPwJn5g6wyg__gXXQLT",G=()=>(0,D.jsxs)("div",{className:V,children:[(0,D.jsx)(F.Z,{className:z,semanticColor:"textBase",variant:"balladBold",children:"Premium"}),(0,D.jsx)(H.G,{height:"24px",condensed:!0,semanticColor:"textBase"})]}),W="Cd1FDj9Rc0qIjN_tp7X1",K="SzqsgkOe1qmgXDHysfCq",Y="pY8CBZh9OXtJgDOFUbxN",q="mdN0LAS0jJsu8omAuHEA",Q="Dsan_DkzDFvoatncFM1d",$="_1oI8WowXCA7XxN26B_uM",Z="Tsde0ahv9SWmrVQZiUjg",X="vfwvxoZzAqqywq61ZbPT",J="dXilYFJ25GVUny5tyRi3",ee="IEjSVoB2p4KMxvDxFNMr",te="tybZ2Wyz6nkkgBFBcqzw",ne="oaLgU5wxEC9uoejIfHel",ie="uETtHkEVMnAvijF28fnf",re="S8eI0WpcfpToa5Gvdwoj",se="IAKbjrKVegAYqDE15Wr8",ae="iVUk8HOpJUxAlw6etLSq",oe="L5BFjkg4z0IOpYeVwtkZ",le="PREMIUM_TIER",ce=(0,i.memo)((()=>(0,D.jsx)(G,{}))),ue=({tiers:e,benefitLabel:t,useLatestTweakit:n})=>(0,D.jsx)("thead",{className:Z,children:(0,D.jsxs)("tr",{children:[(0,D.jsx)("th",{className:C()(ee,te),children:t}),e.map(((e,t)=>{const i=n&&e.id===le?(0,D.jsx)("div",{className:C()(q,e.id===le?$:Q),children:n&&e.id===le&&(0,D.jsx)("div",{className:oe,children:(0,D.jsx)(ce,{})})}):(0,D.jsx)("div",{className:C()(q,e.id===le?$:Q),dangerouslySetInnerHTML:{__html:e.name}});return(0,D.jsx)("th",{className:ee,children:i},t)}))]})}),de=({benefit:e,index:t,tierBenefit:n,useLatestTweakit:r})=>{const[s,a]=(0,i.useState)(!1);return(0,D.jsxs)("tr",{className:X,style:{"--animationDelay":100*t+"ms"},onMouseOver:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:[(0,D.jsxs)("td",{className:C()(ne),children:[(0,D.jsx)("span",{tabIndex:0,role:"tooltip",children:e.name}),(0,D.jsx)("div",{className:C()(se,{[K]:s}),children:s&&(0,D.jsx)(M.m,{colorSet:"invertedLight",dangerouslySetInnerHTML:{__html:e?.explanation}})})]}),n.map((e=>{const t=r?"—":"-";return(0,D.jsx)("td",{className:ie,children:(0,D.jsx)("div",{className:C()(re,{[J]:e.id===le}),children:e.isBenefitPresent?(0,D.jsx)(B.k,{className:Y,size:"large"}):t})},e.id)}))]})},me=({tableData:e,spec:t,useLatestTweakit:n=!1})=>{const{ref:s,inView:a}=(0,r.Wx)({triggerOnce:!0}),o=(0,i.useCallback)((t=>e.comparison.find((e=>e.benefitId===t))),[e.comparison]),l=(0,i.useMemo)((()=>t?.comparisonTableFactory()),[t]),c=(0,T.t)(l);return(0,D.jsx)("div",{className:C()(W,{[K]:a},{[ae]:n}),ref:s,"":"comparison-table",children:(0,D.jsxs)("table",{ref:c,children:[(0,D.jsx)(ue,{tiers:e.tier,benefitLabel:e.benefitLabelText,useLatestTweakit:n}),(0,D.jsx)("tbody",{children:e.benefit.map(((e,t)=>{const i=o(e.benefitId);return i?(0,D.jsx)(de,{index:t,benefit:e,tierBenefit:i.tierBenefit,useLatestTweakit:n},e.name):null}))})]})})};var pe=n(28596),he=n(61080),ge=n(66675),fe=n(918),be=n(79522),ve=n(28688);const ye="Gu5dPC6H3JLIutCvB2z_",_e="fdX405sq8Q1nFlEC9x0e",Ee="oFrTU99CFAivZDoYIehj",xe="eSQahsR_fNEO7f9YY2gh",Ce="uhiFjUXjo84p6X7gz0hu",Se="LVupwO4wvJkgmBd0lBjx",Ae="Gvwcl9dk5DOWt72tB3Vv",we="gTxsEwDpaubk8J6F7suV",Ie="GJtyFY_rr6HKawuGm6ud",Te=({data:e,refToStorefront:t,locale:n,useLatestTweakit:r})=>{const s=y(e.cta[0].link),{spec:o,logger:l}=(0,c.r)(a.Z,{data:{identifier:"hero",reason:`${e.campaignId}:${e.offerTypeId}`}}),u=(0,i.useMemo)((()=>o.heroContainerFactory({identifier:"hero",reason:`${e.campaignId}:${e.userEligibility}`})),[o,e.campaignId,e.userEligibility]),d=(0,T.t)(u),{openURLWithSessionTransfer:m}=(0,fe.L)(),p=(0,i.useCallback)((t=>{m(s,"_blank"),t.preventDefault(),l.logInteraction(u.heroCheckoutButtonFactory({reason:`${e.campaignId}:${e.offerTypeId}`}).hitNavigateToExternalUri({destination:s}))}),[u,l,m,e.campaignId,e.offerTypeId,s]),h=(0,i.useCallback)((e=>{setTimeout((()=>{t.current&&t?.current.scrollIntoView({behavior:"smooth",block:"start"})}),500),e.preventDefault(),l.logInteraction(u.heroViewPlansButtonFactory().hitQuickScroll())}),[u,l,t]),g=e.showCountdownTimer?((e,t,n)=>{const i=new Date;i.setHours(0,0,0,0);const r=new Date(e);r.setHours(0,0,0,0);const s=r.getTime()-i.getTime(),a=Math.round(s/864e5);return 0===a?t.offerEndsToday:1===a?t.offerEndsTomorrow:new ve.Ay(t.offerEndsInXDays,n).format({0:a})})(e.offerEndDate,e.countdownTimer,n):"",f={margin:e.showCountdownTimer?"16px 0 24px":"24px 0"};return(0,D.jsx)("div",{className:C()(ye,{[Ie]:r}),ref:d,style:{"--background-image-url":`url(${e.backgroundDesktop.url})`,"--theme-color":e.themeHexColor},children:(0,D.jsx)("div",{className:_e,children:(0,D.jsxs)("div",{className:Ee,"":"premium-hero",children:[(0,D.jsx)(S.E,{as:"h1",variant:"titleMedium",color:"var(--spice-text)",semanticColor:"textBase",style:{paddingBottom:"8px",fontSize:r?"48px":"32px"},children:(0,D.jsx)("span",{dangerouslySetInnerHTML:{__html:e.header}})}),(0,D.jsx)(S.E,{as:"p",variant:"marginal",color:"var(--spice-text)",semanticColor:"textBase",style:{fontSize:r?"24px":"18px"},children:e.subheader&&e.subheader.map(((e,t)=>(0,D.jsx)("span",{dangerouslySetInnerHTML:{__html:`${e}&nbsp;`}},t)))}),e.showCountdownTimer&&g&&(0,D.jsx)("div",{className:Ae,children:(0,D.jsxs)("div",{className:we,children:[(0,D.jsx)(pe.z,{size:"small",semanticColor:"textAnnouncement"}),(0,D.jsx)(S.E,{as:"p",variant:"bodySmall",color:"var(--spice-text)",semanticColor:"textBase",children:g})]})}),(0,D.jsxs)("div",{className:Ce,style:f,children:[(0,D.jsx)(he.$,{colorSet:"invertedLight",className:Se,onClick:p,"aria-label":e.cta[0].accessibilityText,children:e.cta[0].text}),(0,D.jsx)(ge.n,{style:{borderColor:"white"},className:Se,onClick:h,"aria-label":e.cta[1].accessibilityText,children:e.cta[1].text})]}),(0,D.jsx)(S.E,{as:"p",variant:"marginal",color:"var(--spice-text)",semanticColor:"textBase",onClick:be.k,onKeyDown:be.k,children:(0,D.jsx)("span",{className:xe,"":"hero-terms-link",dangerouslySetInnerHTML:{__html:e?.legalDisclaimer}})})]})})})},Ne="D4IPcSaP_aw1kTzBFmts",Re="UZnaIbk7HeCMnM47oVX8",ke="cfaF1MarYjXXEVrUqcyw",Oe="A747Ht40xUR4hVc5y3nM",Pe="WAqRKrOJRFZWIIUpu2gQ",je="hHfwjHBV1PCImQaPWNH6",Le="sWRyHyVg69dDodEMFlbS",De="GK61ijqgwz3YM_NDTlJj",Ue=({data:e,useLatestTweakit:t})=>{const n=e.paymentIcons?[...e.paymentIcons]:[];let i,r=[],s=[];const a=e.additionalPaymentMethodsLabel;n.length>5?(r=n.slice(0,4),s=n.slice(r.length,n.length),i=a.replace("{0}",s.length.toString())):r=n||[];const o={"grid-template-columns":`repeat(${s.length<4?s.length:4}, 1fr)`};return(0,D.jsxs)("div",{className:C()(Ne,{[De]:t}),"":"payment-icons",children:[(0,D.jsx)("ul",{className:Re,children:r.map((({url:e,label:t},n)=>(0,D.jsx)("li",{className:ke,children:(0,D.jsx)("div",{role:"img",className:Oe,style:{backgroundImage:`url(${e})`},"aria-label":t})},`icon-${n}`)))}),s.length>0&&(0,D.jsx)("div",{className:Pe,children:(0,D.jsxs)("div",{className:Le,tabIndex:0,children:[(0,D.jsx)("span",{children:i}),(0,D.jsx)("ul",{className:je,style:o,children:s.map((({url:e,label:t},n)=>(0,D.jsx)("li",{className:ke,children:(0,D.jsx)("div",{role:"img",className:Oe,style:{backgroundImage:`url(${e})`},"aria-label":t})},`icon-${n}`)))})]})})]})},Me="mhc6hFEWbMgtklj338kj",Be="z6VAlMqaVg7J6oVde_PC",Fe="Ta0vh5VToxIyXZB6oUjk",He="fGlxTBS_az1VSDF_JNZj",Ve=({testid:e,data:t,useLatestTweakit:n})=>(0,D.jsx)("div",{className:C()(Me,{[Fe]:n}),"":e,children:(0,D.jsxs)("div",{className:Be,children:[(0,D.jsx)(S.E,{as:"h1",variant:"titleMedium",color:"var(--spice-text)",semanticColor:"textBase",children:t.headline}),(0,D.jsx)(S.E,{as:"p",variant:"marginal",color:"var(--spice-text)",size:18,semanticColor:"textBase",style:{fontSize:"18px"},className:He,children:t.text})]})});var ze=n(33560),Ge=n(59841),We=n(36963),Ke=n(98258),Ye=n(14494);const qe="ESjbOIOvjhCXWqPUuiZt",Qe="eQY43pDGc3LhbExUrDtj",$e="CxK9MKBKmtH_YjEC9fNo",Ze="m9c_rcjsn5oTIhIin4Qz",Xe="LtjDRL21jc7aL3AGXUD_",Je="mANjYkmyc8VXfqfmgyEO",et="tfpGIPCxEkP6rluWFTzT",tt="T8lazoEcfzreo0tikcCh",nt="wuZpdKiSaLSvmXXp_w1F",it="BuLbWpE_U77sU7ru7T2D",rt="ld8oiOrKE00Qom62WsG3",st="ecDLzzYeaEoOZ1zJDWS1",at="q1lO7Evj8ava1CSbczX0",ot="n3mP3aOjMk_yPN3obC0T",lt="w92DKQuLYpcrnO8kaEVd",ct="GtuNtAimrtglxgjNwzR1",ut="DIqvj_Xf91jsfoIdGX65",dt="yKstAHtOxSSH18_7g67E",mt={premium:Ge.rose180,premiumDuo:Ge.brownYellow172,premiumFamily:Ge.blueDesat155,premiumMini:Ge.citric186,premiumStudent:Ge.violetDesat155},pt=({text:e})=>(0,D.jsx)("div",{className:Ze,children:e}),ht=(0,i.memo)((()=>(0,D.jsx)(G,{}))),gt=({benefits:e})=>(0,D.jsx)("ul",{className:rt,children:e.map((e=>(0,D.jsx)("li",{children:e},e)))}),ft=({options:e})=>(0,D.jsx)("ul",{className:lt,children:e.map((e=>(0,D.jsx)("li",{children:(0,D.jsx)(S.E,{as:"p",variant:"bodyMediumBold",children:e})},e)))}),bt=({primaryPriceDescription:e,secondaryPriceDescription:t})=>(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.E,{as:"p",className:ct,variant:"bodyMediumBold",children:e}),(0,D.jsx)(S.E,{as:"p",className:ut,variant:"bodySmallBold",children:t})]}),vt=({planName:e,priceText:t,duration:n})=>(0,D.jsxs)("div",{className:Je,children:[(0,D.jsx)(S.E,{as:"h3",variant:"titleSmall",className:et,children:e}),(0,D.jsxs)("div",{className:tt,children:[(0,D.jsx)(S.E,{as:"div",variant:"bodyMediumBold",className:nt,children:t}),(0,D.jsx)("div",{className:it,children:n})]})]}),yt=({planName:e,primaryPriceDescription:t,secondaryPriceDescription:n,prepaidOptionsDescription:i})=>(0,D.jsxs)("div",{className:Je,children:[(0,D.jsx)(ht,{}),(0,D.jsx)(S.E,{as:"h3",variant:"titleMedium",className:et,children:e}),i?(0,D.jsx)(ft,{options:i}):(0,D.jsx)(bt,{primaryPriceDescription:t,secondaryPriceDescription:n}),(0,D.jsx)(We.d,{className:dt})]}),_t=({children:e,data:t,cardIndex:n,spec:r,noPills:s,noBadges:a,isPrepaid:o=!1,useLatestTweakit:l=!1})=>{const c=(0,Ye.s)(),u=(e=>mt[e]||mt.premium)(t.encoreColorSetName),d=y(t.checkoutUrl),m=o?t.shortPlanName:t.planName,p=(0,i.useMemo)((()=>(e=>{const{planId:t,prepaidSection:n}=e;return"PREMIUM_MINI"===t?n?.prepaidOption.map((e=>e.priceDescription)):void 0})(t)),[t]),{openURLWithSessionTransfer:h}=(0,fe.L)(),g=r?.planCardFactory({identifier:t.planId,reason:`${t.offerTypeId}`,position:n}),f=(0,T.t)(g),b=(0,i.useCallback)((()=>{g&&c.logInteraction(g.planCardButtonFactory({position:0}).hitNavigateToExternalUri({destination:d})),h(d)}),[h,c,d,g]);return(0,D.jsxs)("div",{"":"plan-card",ref:f,style:{"--theme-color":u},className:C()($e,{[ot]:l}),children:[!a&&t.description&&(0,D.jsx)(pt,{text:t.description}),a||!t.description&&!s&&(0,D.jsx)("span",{className:Xe}),l?(0,D.jsx)(yt,{planName:m,primaryPriceDescription:t.primaryPriceDescription,secondaryPriceDescription:t.secondaryPriceDescription,prepaidOptionsDescription:p}):(0,D.jsx)(vt,{planName:m,priceText:t.priceText,duration:t.durationText}),(0,D.jsx)(gt,{benefits:t.benefit}),(0,D.jsx)(he.$,{onClick:b,fullWidth:!0,UNSAFE_colorSet:(0,Ke.mA)(u),className:st,"aria-label":t.checkoutAccessibilityText,children:t.checkoutUrlText}),e]})},Et=(0,i.forwardRef)((({text:e,onClick:t,onKeyDown:n,role:i},r)=>(0,D.jsx)("div",{ref:r,className:at,dangerouslySetInnerHTML:{__html:e},onClick:t,onKeyDown:n,role:i}))),xt=(0,i.forwardRef)((({data:e,spec:t,useLatestTweakit:n,isPrepaid:r},s)=>{const a=(0,i.useMemo)((()=>t?.storefrontContainerFactory({identifier:"Storefront"})),[t]),o=(0,T.t)(a),l="CA"===(0,m.d4)(ze.JJ),c=(0,i.useRef)([]),u=e=>t=>{c.current[e]=t};(0,i.useEffect)((()=>{(()=>{let e=0;c.current.forEach((t=>{t&&t.offsetHeight>e&&(e=t.offsetHeight)})),c.current.forEach((t=>{t&&(t.style.height=`${e}px`)}))})()}),[e?.planCard]);let d=!0;return e?.planCard.forEach((e=>{e.description&&(d=!1)})),(0,D.jsx)("div",{ref:o,className:qe,"":"storefront",children:(0,D.jsx)("div",{className:Qe,ref:s,children:e?.planCard?.map(((e,t)=>(0,D.jsx)(_t,{data:e,cardIndex:t,spec:a,noPills:d,noBadges:l,isPrepaid:r,useLatestTweakit:n,children:(0,D.jsx)(Et,{ref:u(t),text:e.legalDisclaimer,onClick:be.k,onKeyDown:be.k,role:"link"})},e.planId)))})})})),Ct="M3AKQVe3nkvUMc5RgBTW",St=()=>{const e=function(){const e=(0,m.d4)(h.Ht);return e?.locale??""??p.h.en}(),t=sessionStorage.getItem("eligibility")||"",n=sessionStorage.getItem("datetime")||"",g=decodeURIComponent(n),{loading:f,data:b}=E(e,t,g),v=(0,i.useRef)(null);let y="premium_page:native_pdp";y="premium_page:desktop_app_native_pdp";const{spec:_,logger:x}=(0,c.r)(a.Z,{data:{identifier:y,reason:`${b?.campaignId}:${b?.userEligibility}`}}),C=(0,s.NC)(d.pj7),S=(0,s.NC)(d.LYs,{loadingValue:d.jVP.CONTROL}),{ref:A,inView:w}=(0,r.Wx)({fallbackInView:!0,triggerOnce:!0});(0,i.useEffect)((()=>{w&&x.logImpression(_.impression())}),[w,x,_]);const I=(0,l.ox)();(0,i.useEffect)((()=>{!C&&I&&(I.dataLayer=I?.dataLayer||[],I.dataLayer.push({event:"ep_exposure",property_name:"premiumPageLatestTweakit",property_value:S}))}),[I,C,S]);let T=!1,N=!1,R=!1;return C?T=!0:(T=S===d.jVP.LATEST||S===d.jVP.LATEST_REORDERED,N=S!==d.jVP.CONTROL,R=S===d.jVP.REORDERED||S===d.jVP.LATEST_REORDERED),!f&&b?(0,D.jsxs)("div",{ref:A,className:Ct,"":"premium-page",children:[(0,D.jsx)(Te,{data:{campaignId:b.campaignId,userEligibility:b.userEligibility,...b.hero},refToStorefront:v,locale:e,useLatestTweakit:N}),R&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Ve,{testid:"comparison-table-header",data:{headline:b.comparisonTable.header,text:b.comparisonTable.subheader},useLatestTweakit:T}),(0,D.jsx)(me,{tableData:b.comparisonTable,spec:_,useLatestTweakit:T})]}),(0,D.jsx)(Ve,{testid:"benefit-education-header",data:{headline:b.benefitEducation.header,text:b.benefitEducation.subheader},useLatestTweakit:T}),b.storefront.paymentIcon&&(0,D.jsx)(Ue,{data:{paymentIcons:b.storefront.paymentIcon,additionalPaymentMethodsLabel:b.storefront.additionalPaymentMethodsLabel},useLatestTweakit:T}),(0,D.jsx)(U,{data:{header:b.benefitEducation.benefitListHeader,benefits:b.benefitEducation.benefit,userEligibility:b.userEligibility,campaignId:b.campaignId},useLatestTweakit:T}),(0,D.jsx)("div",{ref:v,children:(0,D.jsx)(xt,{data:b.storefront,spec:_,isPrepaid:C,useLatestTweakit:T})}),!R&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Ve,{testid:"comparison-table-header",data:{headline:b.comparisonTable.header,text:b.comparisonTable.subheader},useLatestTweakit:T}),(0,D.jsx)(me,{tableData:b.comparisonTable,spec:_,useLatestTweakit:T})]})]}):(0,D.jsx)(u.A,{hasError:!1,errorMessage:o.Ru.get("error.not_found.title.page")})};var At=n(83648),wt=n(9714),It=n(33523),Tt=n(98832),Nt=n(80833),Rt=n(9440),kt=n(60786),Ot=n(50783),Pt=n(12275);const jt=()=>(0,be.X)()?(0,D.jsx)(It.e,{navigationalRoot:Nt.g.EXPLORE_PREMIUM,pageId:wt.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,D.jsx)(St,{})}):(0,D.jsx)(Tt.InstrumentedRedirect,{to:"/"}),Lt=()=>{const e=o.Ru.getLocaleForURLPath(),t=(0,m.d4)(Pt.MU),n=(0,m.d4)(Pt.NR),i=(0,Ot.p)({localeFeatureFlag:t,entityFeatureFlag:n,urlLocale:e,entity:Rt.c.PREMIUM,type:"link"})?(0,kt.hF)("/premium"):"/premium";return(0,D.jsx)(At.qh,{path:i,element:(0,D.jsx)(jt,{})})};function Dt(e){const[t,n]=(0,i.useState)("");return(0,i.useEffect)((()=>{sessionStorage.setItem(e,t)}),[e,t]),{value:t,setValue:n,clearStoredKeyValue:()=>{sessionStorage.removeItem(e)},clearSessionStorage:()=>{sessionStorage.clear()}}}},79522:(e,t,n)=>{"use strict";n.d(t,{X:()=>a,k:()=>o});var i=n(22215),r=n(918),s=n(19498);const a=()=>{const e=(0,i.NC)(s.uyM),t=(0,i.NC)(s.pj7);return e||t},o=e=>{const{openURLWithSessionTransfer:t}=(0,r.L)();e.target instanceof HTMLAnchorElement&&e instanceof KeyboardEvent&&(t(e.target.href,"_blank"),e.preventDefault())}},64298:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});let i=function(e){return e[e.NowPlaying=0]="NowPlaying",e[e.NextInQueue=1]="NextInQueue",e[e.NextUp=2]="NextUp",e}({})},91292:(e,t,n)=>{"use strict";n.d(t,{H:()=>a,K:()=>s});var i=n(95666),r=n(82433);function s(e){return"autoplay"===e?.provider}function a(){const{uri:e,description:t}=(0,r.f)(),{current:n,nextUp:a,queued:o}=(0,i.w)(),l=a.filter((e=>s(e)?e:"autoplay"!==e.provider)),c=!!o?.length,u=!!l?.length;return{uri:e,description:t,current:n,nextUp:l,queued:o,isEmpty:!1===(n||c||u),hasQueuedTracks:c,hasNextTracks:u}}},69330:(e,t,n)=>{"use strict";n.d(t,{m:()=>s,p:()=>r});var i=n(82052);let r=function(e){return e.QUEUE="queue",e.HISTORY="history",e.PARTICIPANT_LIST="participant_list",e}({});const s=()=>{const[e,t]=(0,i.x)("queue-view",r.QUEUE);return{currentQueueView:e,setQueueView:t}}},42800:(e,t,n)=>{"use strict";n.d(t,{R:()=>h});var i=n(79474),r=n(83648),s=n(22215),a=n(2281),o=n(60181),l=n(63508),c=n(19498),u=n(99275),d=n(10098),m=n(69330);const p=a.$S.QUEUE_BUTTON_CLICK,h=()=>{const e=(0,s.NC)(c.eWj),t=(0,l.y)(),n=(0,r.Zp)(),{isActive:h,panelSend:g}=(0,d.AI)(o.Z.Queue),{setQueueView:f}=(0,m.m)(),b=(0,i.useCallback)(((i=m.p.QUEUE)=>{if(e){if(i===m.p.HISTORY&&!t)return;h||(g(a.$S.QUEUE_BUTTON_CLICK),f(i))}else n("/queue")}),[t,e,h,n,g,f]);return{toggleQueue:(0,i.useCallback)((()=>{if(e){const e=h;g(p),e||(0,u.I)("QUEUE-HISTORY-PANEL")}else b()}),[e,h,b,g]),openQueue:b}}},49073:(e,t,n)=>{"use strict";n.d(t,{m:()=>i.m,p:()=>i.p});var i=n(69330)},55327:(e,t,n)=>{"use strict";n.d(t,{R:()=>i.R});var i=n(42800)},96956:(e,t,n)=>{"use strict";n.d(t,{aj:()=>r,d2:()=>s});var i=n(40823);const r={fullscreen:!1,cinema:!1,npv:!1,transcriptAvailable:!1},s=(e={uiFlags:r,mode:i.aY.none},t)=>{const{key:n,value:s}=t,a={...e.uiFlags,[n]:s};return{...e,mode:(o=a,o.fullscreen?i.aY.fullscreen:o.cinema?i.aY.cinema:i.aY.npv),uiFlags:a};var o}},22144:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RECENTLY_PLAYED_VIEW_ID:()=>T,RecentlyPlayed:()=>k,default:()=>O});var i=n(97500),r=n.n(i),s=n(98196),a=n(22215),o=n(14056),l=n(88080),c=n(47376),u=n(11620),d=n(36575),m=n(99426),p=n(72412),h=n(84610),g=n(67447),f=n(25654),b=n(66076),v=n(19498),y=n(65132),_=n(70256),E=n(86357),x=n(79474),C=n(83275),S=n(66772);var A=n(45640);const w="wu4hGzXkWRNdY0UX1MJa";var I=n(13274);const T="recently-played",N=(e,t,n)=>{const i=e.uri;switch(e.type){case C.d2.LIKED_SONGS:return(0,I.jsx)(f.o,{index:t,variant:n},i);case C.d2.YOUR_EPISODES:return(0,I.jsx)(b.e,{index:t,variant:n},i);case C.d2.ALBUM:return(0,I.jsx)(l.a,{index:t,name:e.name,uri:e.uri,images:e.images,artists:e.artists,sharingInfo:null,variant:n},i);case C.d2.ARTIST:return(0,I.jsx)(c.a,{index:t,name:e.name,uri:e.uri,images:e.images,variant:n},i);case C.d2.PLAYLIST:return(0,I.jsx)(m.B,{index:t,name:e.name,uri:e.uri,images:e.images,description:e.description,authorName:e.owner.displayName,isPlayable:!(0,E.p)(e.attributes),variant:n},i);case C.d2.SHOW:return(0,I.jsx)(p.o,{index:t,name:e.name,uri:e.uri,images:e.images,publisher:e.publisher,sharingInfo:null,variant:n},i);case C.d2.AUDIOBOOK:return(0,I.jsx)(u.M,{index:t,name:e.name,uri:e.uri,images:e.images,authorName:e.authors?.[0]??"",signifierText:e.signifierText,variant:n},i);case C.d2.TRACK:return(0,I.jsx)(h.w,{index:t,name:e.name,uri:e.uri,images:e.images,is19PlusOnly:e.isMOGEFRestricted,artists:e.artists,album:null,isExplicit:e.isExplicit,sharingInfo:null,variant:n},i);default:return(0,A.k)(e),null}},R=({title:e,index:t,contexts:n})=>(0,a.NC)(v.WAq)?(0,I.jsx)(y.x,{config:(0,_.s1)(_.yV.HIGH_DENSITY),children:(0,I.jsx)(g.p,{id:"recently-played",index:t,total:n.length,seeAllUri:`/genre/${T}`,pageId:"home",title:e,children:n.map(((e,t)=>N(e,t,d._.Compact)))})}):(0,I.jsx)(g.p,{id:"recently-played",index:t,total:n.length,seeAllUri:`/genre/${T}`,pageId:"home",title:e,children:n.map(((e,t)=>N(e,t,d._.Default)))}),k=({title:e,showAll:t=!1,index:n=0})=>{const i=e??o.Ru.get("view.recently-played"),a=function(e=!0){const t=(0,S.O)(),[n,i]=(0,x.useState)((()=>t.getContexts()));return(0,x.useEffect)((()=>{if(!e)return;const n=({data:e})=>i(e),r=t.getEvents();return r.addListener(C.m5.UPDATE,n),()=>{r.removeListener(C.m5.UPDATE,n)}}),[t,e]),n}(!0);return null===a?null:t?(0,I.jsx)("section",{className:r()("contentSpacing",w),children:(0,I.jsx)(g.p,{pageId:"recently-played",title:i,showAll:!0,index:0,id:"recently-played",rowGap:s.lT,fullPage:!0,children:a.map(((e,t)=>N(e,t,d._.Default)))})}):(0,I.jsx)(R,{title:i,index:n,contexts:a})},O=k},9901:(e,t,n)=>{"use strict";n.d(t,{$:()=>i.$y,N:()=>i.Nf});var i=n(78885)},8143:(e,t,n)=>{"use strict";n.d(t,{TC:()=>r,j7:()=>s,ud:()=>a});var i=n(14056);const r=["artists","albums","episodes","genres","playlists","podcasts","audiobooks","tracks","users","topResults","podcastAndEpisodes"],s={artists:()=>i.Ru.get("search.title.artists"),albums:()=>i.Ru.get("search.title.albums"),playlists:()=>i.Ru.get("search.title.playlists"),podcasts:()=>i.Ru.get("search.title.shows"),episodes:()=>i.Ru.get("search.title.episodes"),audiobooks:()=>i.Ru.get("search.title.audiobooks"),users:()=>i.Ru.get("search.title.profiles"),genres:()=>i.Ru.get("search.title.genres-and-moods"),tracks:()=>i.Ru.get("search.title.tracks"),podcastAndEpisodes:()=>i.Ru.get("search.title.podcast-and-shows"),topResults:()=>i.Ru.get("search.row.top-results")},a=["artists","albums","playlists","podcasts","episodes","audiobooks","users","genres"]},98304:(e,t,n)=>{"use strict";n.d(t,{C:()=>s,k:()=>a});var i=n(79474),r=n(82052);const s="fusionSearchHistory",a=()=>{const[e,t]=(0,r.x)(s,[]),n=(0,i.useCallback)((e=>{t(function(e){const t={},n=[];for(let i=0;i<e.length;i++)e[i].uri in t||(n.push(e[i]),t[e[i].uri]=!0);return n.splice(50),n}(e))}),[t]);return{searchHistory:e,setSearchHistory:n,clearSearchHistory:n=>{let i=[];n&&(i=e.filter((e=>e.uri!==n))),t(i)}}}},10508:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var i=n(79474),r=n(83648),s=n(8143);const a=e=>s.TC.find((t=>t===e));function o(){const e=(0,r.Zp)(),t=(0,r.RQ)("/search/:query"),n=(0,r.RQ)("/search/:query/:category"),s=(0,i.useCallback)((function(t,n,i,r){const s=r?{interactionId:r,preventMoveFocus:!0}:{preventMoveFocus:!0},a=["/search"];t&&(a.push(encodeURIComponent(t)),n&&a.push(n));const o=a.join("/");e(o,i?{state:s}:{state:s,replace:!0})}),[e]);return[{query:function(e){try{return decodeURIComponent(e)}catch{return e}}(t?.params.query??n?.params?.query??""),category:a(n?.params.category)},s]}},1704:(e,t,n)=>{"use strict";n.d(t,{G:()=>l});var i=n(98764),r=n(14056),s=n(87465),a=n(19498),o=n(13274);const l=()=>(0,o.jsx)(s.u,{property:a.vQo,renderNewExperience:()=>(0,o.jsxs)(o.Fragment,{children:[" • ",(0,o.jsx)(i.E,{variant:"bodySmall",semanticColor:"textBase",dir:"auto",as:"span",children:r.Ru.get("search.lyrics-match")})]})})},97779:(e,t,n)=>{"use strict";n.d(t,{KR:()=>i,Qi:()=>a,WZ:()=>r,a1:()=>s});let i=function(e){return e[e.QUIET=0]="QUIET",e[e.NORMAL=1]="NORMAL",e[e.LOUD=2]="LOUD",e}({}),r=function(e){return e.MINIMIZED="minimized",e.NORMAL="normal",e.OFF="off",e}({}),s=function(e){return e[e.AUTOMATIC=0]="AUTOMATIC",e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e[e.VERY_HIGH=4]="VERY_HIGH",e[e.HIFI=5]="HIFI",e}({}),a=function(e){return e[e.STANDARD=0]="STANDARD",e[e.VERY_HIGH=1]="VERY_HIGH",e[e.LOSSLESS=2]="LOSSLESS",e}({})},2418:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var i=n(12882);class r extends i.e{}},78828:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});var i=n(64395);function r(){return(0,i.j4)()}},18378:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var i=n(28049),r=n(78828);function s(){const e=(0,r.t)();return(0,i.I)({queryKey:["settings-formats"],queryFn:()=>e.quality.getFormats(),gcTime:36e5,staleTime:6e5}).data}},9623:(e,t,n)=>{"use strict";n.d(t,{K:()=>u});var i=n(79474),r=n(80964),s=n(28049),a=n(45643),o=n(12882);class l extends o.e{}var c=n(2418);function u(e){const t=(0,i.useMemo)((()=>["useSettingsValue",e.key]),[e.key]),n=(0,r.jE)(),o=(0,s.I)({queryKey:t,queryFn:async()=>await e.getValue(),gcTime:36e5,staleTime:6e5,retry:(e,t)=>t instanceof l&&e<3}),u=(0,a.n)({mutationFn:async t=>{if(!("setValue"in e))throw new Error("valueApi does not have a setValue method");await e.setValue(t)},onMutate:async e=>{await n.cancelQueries({queryKey:t});const i=n.getQueryData(t);return n.setQueryData(t,e),{prevState:i,newState:e}},retry:(e,t)=>t instanceof l&&e<3,onError:(i,r,s)=>{i instanceof c.N||console.error(`Error setting ${e.key}`,i),n.setQueryData(t,s?.prevState)}});return(0,i.useEffect)((()=>e.subValue((e=>{n.setQueryData(t,e)}))),[n,t,e]),"setValue"in e?[o,u]:[o]}},31551:(e,t,n)=>{"use strict";n.d(t,{Ax:()=>o,FB:()=>r,dt:()=>a,rj:()=>s,zf:()=>l});var i=n(97779);function r(e){if(void 0===e)return null;const t=Number(e);return t>=i.a1.AUTOMATIC&&t<=i.a1.HIFI?t:null}function s(e){if(void 0===e)return null;const t=parseInt(e,10);return t>=i.Qi.STANDARD&&t<=i.Qi.LOSSLESS?t:null}function a(e){if(void 0===e)return null;const t=Number(e);return t>=i.KR.QUIET&&t<=i.KR.LOUD?t:null}function o(e){return e?"1":"0"}function l(e){return"1"===e}},9751:(e,t,n)=>{"use strict";n.d(t,{J:()=>r,g:()=>s});var i=n(82052);const r=()=>(0,i.x)("canvasVideosEnabled",!0),s=()=>{const[e]=r();return e}},74681:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,N:()=>r});var i=n(82052);const r=()=>(0,i.x)("toggleNowPlayingView",!0),s=()=>{const[e]=r();return e}},72653:(e,t,n)=>{"use strict";n.d(t,{t0:()=>f});var i=n(79474),r=n(56186),s=n(67899),a=n(48832),o=n(50834),l=n(43824);function c(){return new s.EW((0,o.X)())}let u=function(e){return e[e.Automatic=0]="Automatic",e[e.Low=1]="Low",e[e.Medium=2]="Medium",e[e.High=3]="High",e[e.VeryHigh=4]="VeryHigh",e[e.Hifi=5]="Hifi",e[e.Unknown=6]="Unknown",e}({});const d=[{enumKey:"quiet",enumValue:0},{enumKey:"normal",enumValue:1},{enumKey:"loud",enumValue:2}],m=[{enumKey:"minimized",enumValue:"minimized"},{enumKey:"normal",enumValue:"normal"},{enumKey:"off",enumValue:"off"}],p=e=>{switch(e){case 0:return u.Automatic;case 1:return u.Low;case 2:return u.Medium;case 3:return u.High;case 4:return u.VeryHigh;case 5:return u.Hifi;default:return u.Unknown}},h=["filter-explicit-content","publish-playlist","publish-activity","public-toplist","autoplay","dsa-mode-enabled","dsa-mode-available"],g=["incognito-enabled"],f=()=>{const e=(0,i.useRef)((0,r.dn)((0,o.X)())),{isPrivateSession:t,setPrivateSession:n}=(0,a.H)(),[u,f]=(0,i.useState)({formats:[],values:{"incognito-enabled":t},autoStart:m,loudness:d}),b=e=>"string"==typeof e?{string:e}:"boolean"==typeof e?{bool:e}:{number:BigInt(e)},v=e=>Object.fromEntries(Object.entries(e.entries).map((([e,{string:t,bool:n,number:i}])=>[e,t??n??Number(i)]))),y=(0,i.useCallback)((async(t,i)=>{h.includes(t)?await c().putValues(s.n3.fromPartial({pairs:{[t]:i}})):g.includes(t)?n(Boolean(i)):await e.current.set({entries:{[t]:b(i)}})}),[n]);return(0,i.useEffect)((()=>{f((e=>({...e,values:{...e.values,"incognito-enabled":t}})))}),[t]),(0,i.useEffect)((()=>{new l.NI((0,o.X)()).getFormats({}).then((e=>{const t=[{enumKey:"automatic",enumValue:0,supported:!0},...e.formats.filter((e=>e.supported))].map((e=>({supported:e.supported,quality:p(e.enumValue)})));f((e=>({...e,formats:t})))}));const t=c().subValues(s.cF.fromPartial({}),(e=>{f((t=>({...t,values:{...t.values,...e.pairs}})))})),n=e.current.subAll({},(e=>{f((t=>({...t,values:{...t.values,...v(e)}})))}));return()=>{n.cancel(),t.cancel()}}),[]),{settings:u,setValue:y}}},22653:(e,t,n)=>{"use strict";function i(e){return"1"===e.employee}n.d(t,{Q:()=>i})},39744:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ShowMoreLikeThis:()=>Ri,default:()=>Ti});var i=n(79474),r=n(83648),s=n(22215),a=n(62365),o=n(9714),l=n(83856),c=n(14056),u=n(64647),d=n(82089),m=n(97500),p=n.n(m),h=n(99754),g=n(98764),f=n(75020),b=n(586),v=n(63492),y=n(65325),_=n(96567),E=n(47304),x=n(19448),C=n(21708),S=n(61681),A=n(94009),w=n(32334),I=n(97374),T=n(35291),N=n(66118),R=n(9440),k=n(26903),O=n(263);const P="Bns6t3CfzQaCA4DLRzPQ",j="zGFcpmwFVhJxRDXUXoXA",L="_FLyhB96W9W0msGYNWUl",D="Si5iVyGLDY7mGWH_U2wA",U="HLBtD6mJyIB9EeOzDtXE",M="DRO0ur1WXqpK9BelywtE",B="vtlBEOtYFwv1cxC32ccc",F="Pq_DZj9ECxwTsK8pBxe0",H="bu7LVUNyDPF_FcrKMv74",V="bYP2npsc_CeChpMGcr6g",z="Ux7aVnDYlwojS4AmkSLg";var G=n(13274);let W=function(e){return e.SMALL="small",e.LARGE="large",e}({});const K=({images:e,title:t,contentRating:n,duration:i,moreButton:r,onClick:s,onContextMenu:a,onTouchStart:o,onTouchEnd:l,isPlaying:c,isActive:u,size:d,className:m,label:h,isPlayable:g=!0})=>{const f=d===W.LARGE?"medium":"small",{badges:b}=(0,k.b)({contentRating:n});return(0,G.jsxs)("div",{"":"trailer-component",className:p()(P,m,{[j]:u}),onContextMenu:a,onTouchStart:o,onTouchEnd:l,children:[(0,G.jsxs)("div",{className:D,children:[(0,G.jsxs)("div",{className:F,children:[(0,G.jsx)(S.b,{type:R.c.EPISODE,title:t,className:p()(B,{[z]:d===W.SMALL,[V]:d===W.LARGE}),size:A.Qe.SIZE_56,images:e,shape:S.u.ROUNDED_CORNERS}),(0,G.jsx)("div",{className:H,children:(0,G.jsx)(O.R,{"":"trailer-play-button",version:C.H4.transparent,size:f,isPlaying:c,onClick:s,disabled:!g})})]}),(0,G.jsxs)("div",{children:[(0,G.jsx)("div",{className:U,children:(0,G.jsx)(x.Z,{dir:"auto",className:L,variant:"balladBold",children:t})}),(0,G.jsxs)("div",{className:M,children:[(0,G.jsx)(T.v,{text:h}),b.explicit&&(0,G.jsx)(w.g,{}),b.nineteen&&(0,G.jsx)(I.q,{}),(0,G.jsx)(x.Z,{dir:"auto",variant:"mesto",children:(0,G.jsx)(N.d,{durationMs:i})})]})]})]}),r]})};var Y=n(36471),q=n(82754),Q=n(95402),$=n(28736),Z=n(87357);const X="_yl4tOZxcpoUt28k6B8I",J="lcJflizNrSwDM9yPNk6h",ee="ret7iHkCxcJvsZU14oPY",te=({rating:e,className:t,onClick:n})=>{if(!e)return null;const i=Boolean(e.rating?.rating);return(0,G.jsxs)("button",{className:p()(X,t),onClick:n,children:[(0,G.jsx)(x.Z,{dir:"auto",variant:"mestoBold",children:e.averageRating?.showAverage?c.Ru.formatNumber(e.averageRating.average,{maximumFractionDigits:1}):c.Ru.get("web-player.audiobooks.noRating")}),i?(0,G.jsx)($.j,{iconSize:16,className:p()(J)}):(0,G.jsx)(Z.a,{iconSize:16,className:p()(J)}),e.averageRating?.showAverage&&(0,G.jsxs)(x.Z,{variant:"mesto",className:p()(ee),children:["(",c.Ru.formatNumberCompact(Number(e.averageRating.totalRatings)),")"]})]})};var ne=n(11867),ie=n(97247),re=n(38377),se=n(26271),ae=n(38996),oe=n(40643),le=n(67302),ce=n(28244),ue=n(7125),de=n(62166),me=n(19498),pe=n(87668),he=n(14494);const ge=({htmlDescription:e,narrators:t,spec:n,isPreRelease:r})=>{const s=(0,Y.W)(),a=(0,he.s)(),o=(0,i.useCallback)((e=>{s({intent:"expand-description",type:"click"});const t=n.seeMoreButtonFactory();a.logInteraction(e?t.hitUiReveal():t.hitUiHide())}),[a,s,n]);return(0,G.jsxs)(G.Fragment,{children:[t.length?(0,G.jsx)(g.E,{as:"p",variant:"bodyMedium",children:c.Ru.get("web-player.audiobooks.narratedByX",t.join(c.Ru.getSeparator()))}):null,e&&(0,G.jsx)(pe.N,{maxLines:4,content:e,htmlContent:e,onExpanded:o,isOpen:r||null})]})};var fe=n(82924),be=n(77611),ve=n(84749);const ye="8px";var _e=n(15552);const Ee="myIGgR3zdb9nFuJ1pXYl",xe="e74TmRHu_W1yZHspTBmR",Ce="rrcjfInomKt1lXRDRdR8",Se="Wj9mxFJDtPdiMcUtS1te",Ae="SCwESjClY3m_9JlV2L7S",we="Yoa_yG2jhELT4w9wJpHf",Ie="xsw253oiwmIAafVfjl1J",Te="JPqnsg5dgBTzsEoClLmD",Ne="bhuRgaz03VXMf0mOG3Q2",Re="bilV2VquzmEnhV4d97Tc",ke="caqddwmUJf4ix6GI84NX",Oe=({explicit:e,durationMs:t,publishDate:n,isPreRelease:i})=>(0,G.jsxs)("div",{className:Ne,children:[e&&(0,G.jsx)(w.g,{className:ke}),(0,G.jsxs)("div",{children:[n&&(0,G.jsx)(g.E,{variant:"bodySmall",className:Re,children:i?c.Ru.get("web-player.prerelease.releases_on",{date:c.Ru.formatDate((0,_e.ad)(n.toString()),(0,_e.s7)({month:"long",day:"numeric",year:"numeric"}))}):c.Ru.formatDate(n)}),t?(0,G.jsx)(g.E,{variant:"bodySmall",children:(0,G.jsx)(N.d,{durationMs:t})}):null]})]});var Pe=n(33037),je=n(77564),Le=n(97997),De=n(5513),Ue=n(65594),Me=n(36833),Be=n(30939),Fe=n(61080),He=n(50895),Ve=n(11497);const ze=(0,i.createContext)(null),Ge=({children:e,isPreRelease:t})=>{const[n,r]=(0,i.useState)(!t),s=(0,i.useMemo)((()=>({isPreRelease:t,isCountdownFinished:n,setCountdownFinished:()=>r(!0)})),[t,n,r]);return(0,G.jsx)(ze.Provider,{value:s,children:e})};function We(){const e=(0,i.useContext)(ze);if(null===e)throw new Error("Trying to use 'PreRealeaseCountdownContext' without 'PreRealeaseCountdownProvider'!");return e}const Ke="nz8Wc80RAtdAb3yU9FxM",Ye=({uri:e})=>{const{isCountdownFinished:t}=We(),{invalidateCache:n}=(0,He.W)(e);return(0,G.jsx)("div",{className:Ke,children:t?(0,G.jsx)(Fe.$,{onClick:n,children:c.Ru.get("web-player.audiobooks.goToAudiobook")}):(0,G.jsx)(Ve.v,{uri:e,isBook:!0})})};var qe=n(92585),Qe=n(98678),$e=n(6366),Ze=n(27742);const Xe="NQAShVY0o7RQ2bCTDSkw";function Je({uri:e,price:t,size:n,spec:i,logger:r,onPlayback:s}){const{enqueueSnackbar:a}=(0,Ze.d)(),o=(0,ue.V)(),l=0===t?.finalPrice?.amount,u=l?i.getButtonFactory({uri:e}):i.buyButtonFactory({uri:e}),d=(0,Qe.YQ)((async()=>{if(r.logInteraction(u.hitShowPaywall({paywalledItem:e})),o)s();else{try{t?.finalPrice?await(0,$e.S)({show_uri:e,currency:t.finalPrice.currency,price:t.finalPrice.amount}):a(c.Ru.get("error.generic"))}catch(e){a(c.Ru.get("error.generic"))}s()}}),2e3,{leading:!0,trailing:!1});return(0,G.jsx)(Fe.$,{size:n,className:Xe,style:{flexShrink:0},onClick:d,children:l?c.Ru.get("web-player.audiobooks.buyFree"):c.Ru.get("web-player.audiobooks.buy")})}const et=({uri:e,isLocked:t,price:n,isPlaying:i,isConsumptionCapped:r,onPlayback:s,logger:a,spec:o,size:l="large"})=>t&&!r?(0,G.jsx)(Je,{size:l,uri:e,price:n,logger:a,spec:o,onPlayback:s}):(0,G.jsx)(qe.D,{size:l,isPlaying:i,uri:e,onClick:s}),tt=i.memo((function({backgroundColor:e,uri:t,name:n,isPlaying:r,togglePlay:s,isLocked:a,consumptionCapExplanation:o,price:l,spec:u,isExplicit:d,publishDate:m,duration:p}){const[g,f]=(0,Pe.A)(t),b=!(0,Be.n)(),{isPreRelease:_}=We(),E=(0,h.wA)(),x=(0,Y.W)(),C=(0,he.s)(),S=(0,i.useCallback)((()=>{x({targetUri:t,intent:g?"unsave":"save",type:"click"});const e=u.saveToLibraryButtonFactory();g?C.logInteraction(e.hitUnfollow({itemToBeUnfollowed:t})):C.logInteraction(e.hitFollow({itemToBeFollowed:t})),f(!g)}),[x,t,g,u,f,C]),A=(0,i.useCallback)(((e,n)=>{const i=u.downloadButtonFactory();o?E((0,ce._3)(o)):n===je.NV.ADD?C.logInteraction(i.hitDownload({itemToDownload:t})):n===je.NV.REMOVE?C.logInteraction(i.hitRemoveDownload({itemToRemoveFromDownloads:t})):n===je.NV.NO_PERMISSION&&C.logInteraction(i.hitUiReveal())}),[o,E,C,u,t]),w=(0,i.useCallback)((()=>{const e=u.contextButtonFactory().hitUiReveal();C.logInteraction(e)}),[C,u]),I=(0,Me.j)(),T=!!o,N=!a&&!T;return(0,G.jsxs)(Le.E,{backgroundColor:e,style:{"--action-bar-padding-bottom":ye},children:[(0,G.jsx)(De.S,{testId:"book-action-bar-metadata",children:(0,G.jsx)(Oe,{explicit:d,publishDate:m,durationMs:p,isPreRelease:_})}),(0,G.jsxs)(De.S,{children:[_&&(0,G.jsx)(Ye,{uri:t}),!_&&(0,G.jsx)(et,{uri:t,isLocked:a,isConsumptionCapped:T,price:l,isPlaying:r,onPlayback:s,logger:C,spec:u,size:I}),!_&&(0,G.jsx)(Ue.e,{children:(0,G.jsx)(fe.M,{isAdded:g,onClick:S,disabled:b,size:I,isAudiobook:!0})},"follow-button"),(0,G.jsx)(be.I,{uri:t,onClick:A,size:I,canDownload:N}),(0,G.jsx)(y.b,{menu:(0,G.jsx)(ve.p,{uri:t,isPreRelease:_}),children:(0,G.jsx)(v.e,{label:c.Ru.get("more.label.context",n),onClick:w,size:I})})]})]})}));var nt=n(88291),it=n(54084),rt=n(20044),st=n(29117),at=n(42976),ot=n(6950),lt=n(27699),ct=n(39517),ut=n(96343),dt=n(36919),mt=n(19038),pt=n(46545);const ht=i.memo((function({coverArt:e,name:t,authorName:n,uri:i,backgroundColor:r,isPlaying:s,togglePlay:a,isLocked:o,price:l,isConsumptionCapped:u,logger:d,spec:m,preReleaseEndDateTime:p}){const h=(0,ie.y)(),g=h===ne.E.SMALL||h===ne.E.XSMALL,{isPreRelease:f,setCountdownFinished:b}=We(),v=f&&g;return(0,G.jsxs)(st.z,{backgroundColor:r,size:f?st.K.XLARGE:st.K.DEFAULT,children:[(0,G.jsxs)(lt.h,{children:[f&&(0,G.jsx)(Ye,{uri:i}),!f&&(0,G.jsx)(et,{uri:i,isLocked:o,price:l,isPlaying:s,isConsumptionCapped:u,onPlayback:a,logger:d,spec:m,size:"medium"}),(0,G.jsx)(ct.X,{text:t,dragUri:i,dragLabel:t})]}),!v&&(0,G.jsx)(nt.h,{menu:(0,G.jsx)(ve.p,{uri:i}),children:(0,G.jsx)(at.K,{images:e,name:t,dragUri:i,dragMimeType:rt.fl.AUDIOBOOKS,shape:S.u.SQUARE})}),(0,G.jsxs)(ot.Y,{children:[(0,G.jsx)(dt.B,{children:c.Ru.get("web-player.audiobooks.audiobook")}),(0,G.jsx)(pt.mm,{canEdit:!1,onClick:()=>{},scaleAtMinWidth:pt.tw,dragUri:i,dragMimeType:rt.fl.AUDIOBOOKS,dragLabel:t,children:t}),f?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ut.t,{isPreRelease:!0,author:n}),p&&(0,G.jsx)(it.G,{targetDate:p,images:v?e:[],imageTitle:t,onComplete:b})]}):(0,G.jsx)(mt.g,{children:n})]})]})})),gt="pwjwUMaZVoJ0wBcQlIDf",ft=i.memo((({price:e})=>e.finalPrice&&e.finalListPrice?0===e.finalPrice.amount&&0===e.finalListPrice.amount?(0,G.jsxs)("div",{className:gt,children:[(0,G.jsx)(g.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:c.Ru.get("audiobook.freePriceDescription")}),(0,G.jsx)(g.E,{variant:"bodySmall",children:c.Ru.get("audiobook.freePriceExplanation")})]}):(0,G.jsxs)("div",{className:gt,children:[(0,G.jsx)(g.E,{variant:"titleSmall",semanticColor:"textBase",children:e.finalPrice.formattedPrice}),e.finalPrice.amount<e.finalListPrice.amount&&(0,G.jsx)(g.E,{variant:"bodyMedium",semanticColor:"textSubdued",children:c.Ru.get("web-player.audiobooks.retailPrice",(0,G.jsx)("span",{style:{textDecoration:"line-through"},children:e.finalListPrice.formattedPrice}))})]}):null));var bt=n(19277),vt=n(765);var yt=n(51326);var _t=n(75024),Et=n(70974);const xt="zh_eG8LWfdbVLacLrMEF",Ct="qABKHTHkEdmK0fa7KmIv",St="FgvV0kPK4h_EmOhrpT2d",At="oiFRsQXb5nSBVhMVOLLG",wt="jzZ2lXuiIoAWDd7iOmJI",It="Hv2cy05G19OhWRK4OHPv",Tt="NzouBpMYjqaK9b0f9dUk",Nt="FlMjXsCakgb_O4r1A5sA",Rt=i.memo((function({name:e,duration:t,uri:n,bookName:r,usePlayContextItem:a,isChapterLocked:o,isPlayable:l,resumePositionMs:u,isFullyPlayed:d,isExplicit:m,is19PlusOnly:f,spec:b,index:E,consumptionCapExplanation:x}){const C=(0,i.useRef)(u),{isPlaying:S,togglePlay:A,isActive:T}=a({uri:n}),N=(0,he.s)(),R=(0,ue.V)(),k=(0,h.wA)(),P=(0,s.NC)(me.HEU,{loadingValue:!1}),{position:j,isFullyPlayed:L}=((e,t,n,r)=>{const s=(0,i.useRef)(null),[a,o]=(0,i.useState)(r),[l]=(0,Et.S)(1e4,(t=>t?.item?.uri===e));return(0,i.useEffect)((()=>{n&&(s.current=l)}),[n,l]),(0,i.useEffect)((()=>{!n&&s.current&&t.milliseconds<=s.current+1e4&&o(!0)}),[n,t.milliseconds]),{position:n?l:null,isFullyPlayed:a}})(n,t,S,d);null!==j&&(C.current=j);const D=(0,i.useCallback)((e=>{e.stopPropagation(),e.preventDefault()}),[]),U=(0,Y.W)(),M=(0,i.useCallback)((e=>{if(D(e),x&&!R&&P)return void k((0,ce._3)(x));const t=b.chapterBlockFactory({position:E,uri:n}).playButtonFactory();if(o)U({type:"click",intent:"audiobook-gated-entry-point",itemIdSuffix:"target-chapter"}),N.logInteraction(t.hitShowPaywall({paywalledItem:n}));else{const e=(0,de.$I)({isPlaying:S,isActive:T,spec:t,logger:N,uri:n});A({loggingParams:e})}}),[x,k,E,P,T,R,o,S,N,U,b,D,A,n]),B=(0,i.useCallback)((()=>{const e=b.chapterBlockFactory({position:E,uri:n}).secondaryHitUiReveal();N.logInteraction(e)}),[E,N,b,n]),F=(0,i.useCallback)((e=>{D(e);const t=b.chapterBlockFactory({position:E,uri:n}).contextMenuFactory().hitUiReveal();N.logInteraction(t)}),[E,N,b,D,n]),H=(0,i.useMemo)((()=>!(o||x)),[x,o]),V=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("hr",{className:St,"aria-hidden":!0}),(0,G.jsxs)("div",{className:xt,onDoubleClick:e=>{U({targetUri:n,intent:"play",type:"double-click"}),M(e)},children:[(0,G.jsx)(g.E,{as:"h2",variant:"bodyMediumBold",className:p()(It,{[Ct]:T}),semanticColor:"textBase",children:e}),(0,G.jsxs)("div",{className:Tt,children:[(0,G.jsx)(O.R,{size:"small",version:O.H.secondary,onClick:M,isPlaying:S,ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,r),ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,r),locked:o&&!x,disabled:!l&&!(o||x)}),m&&(0,G.jsx)(w.g,{fullText:!0}),f&&(0,G.jsx)(I.q,{size:16}),(0,G.jsx)("div",{className:Nt,children:(0,G.jsx)(_t.j,{isPlaying:S,fullyPlayed:L,durationMs:t.milliseconds,resumePositionMs:C.current,position:j??void 0})})]}),H?(0,G.jsx)(y.b,{menu:(0,G.jsx)(_.r,{uri:n}),children:(0,G.jsx)(v.e,{className:wt,size:v.M.sm,label:c.Ru.get("more.label.context",e),onClick:F,condensedAll:!0})}):null]})]});return H?(0,G.jsx)(nt.h,{menu:(0,G.jsx)(_.r,{uri:n}),onShow:B,children:(0,G.jsx)("div",{className:At,children:V})}):(0,G.jsx)("div",{className:At,children:V})}));var kt=n(75783),Ot=n(2394),Pt=n(30232),jt=n(10551);const Lt="XzRW0BrBLoXKWET5f8m4",Dt="ooqITYCPJKua4e5yv8_9",Ut="zN8lTnSnAUSRAMPb7XYV",Mt="llVyicNXe8z0QAnoRur1",Bt="fCrjgF2UgDUWjtqWls4Q",Ft="CLnKy_BRVtIluLfBWy5t",Ht="RZa0qnXymlZCoGOdE03d",Vt="RFXE57hUzWvvK4_7GX13",zt="ALQqkJiR2lZOSYvhHesh",Gt="BQwrI2BbKK4n451iu2QC",Wt=i.memo((function({name:e,duration:t,uri:n,bookName:r,usePlayContextItem:a,isChapterLocked:o,isPlayable:l,resumePositionMs:u,isFullyPlayed:d,isExplicit:m,is19PlusOnly:g,spec:f,index:b,consumptionCapExplanation:E}){const x=(0,i.useRef)(u),{isPlaying:C,togglePlay:S,isActive:A}=a({uri:n}),T=(0,he.s)(),N=(0,ue.V)(),R=(0,h.wA)(),k=(0,s.NC)(me.HEU,{loadingValue:!1}),P=(0,Pt.o)((e=>{if(e?.item?.uri===n){const t=(0,jt.s)(e)??0;return x.current=t,t}return 0})),j=(0,i.useCallback)((e=>{e.stopPropagation(),e.preventDefault()}),[]),L=(0,Y.W)(),D=(0,i.useCallback)((e=>{if(j(e),E&&!N&&k)return void R((0,ce._3)(E));const t=f.chapterBlockFactory({position:b,uri:n}).playButtonFactory();if(o)L({type:"click",intent:"audiobook-gated-entry-point",itemIdSuffix:"target-chapter"}),T.logInteraction(t.hitShowPaywall({paywalledItem:n}));else{const e=(0,de.$I)({isPlaying:C,isActive:A,spec:t,logger:T,uri:n});S({loggingParams:e})}}),[E,R,b,k,A,N,o,C,T,L,f,j,S,n]),U=(0,i.useCallback)((()=>{const e=f.chapterBlockFactory({position:b,uri:n}).secondaryHitUiReveal();T.logInteraction(e)}),[b,T,f,n]),M=(0,i.useCallback)((e=>{j(e);const t=f.chapterBlockFactory({position:b,uri:n}).contextMenuFactory().hitUiReveal();T.logInteraction(t)}),[b,T,f,j,n]),B=!(o||E),F=(0,G.jsx)(kt.d,{className:p()({[Dt]:A}),children:e}),H=(0,G.jsxs)("div",{className:Ft,children:[m&&(0,G.jsx)(w.g,{fullText:!0}),g&&(0,G.jsx)(I.q,{size:16}),(0,G.jsx)("div",{className:Ht,children:(0,G.jsx)(_t.j,{isPlaying:C,fullyPlayed:d,durationMs:t.milliseconds,resumePositionMs:x.current,position:C?P:void 0})})]}),V=(0,G.jsxs)("div",{className:zt,children:[(0,G.jsx)("div",{className:Gt,children:B?(0,G.jsx)(y.b,{menu:(0,G.jsx)(_.r,{uri:n}),children:(0,G.jsx)(v.e,{className:Bt,size:v.M.xs,label:c.Ru.get("more.label.context",e),onClick:M})}):null}),(0,G.jsx)("div",{className:Vt,children:(0,G.jsx)(O.R,{size:"small",version:O.H.secondary,onClick:D,isPlaying:C,ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,r),ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,r),locked:o&&!E,disabled:!l&&!(o||E)})})]}),z=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("hr",{className:Ut,"aria-hidden":!0}),(0,G.jsx)(Ot.v,{id:`chapter-${b}`,title:F,body:H,footer:V,onDoubleClick:e=>{L({targetUri:n,intent:"play",type:"double-click"}),D(e)},className:Lt})]});return B?(0,G.jsx)(nt.h,{menu:(0,G.jsx)(_.r,{uri:n}),onShow:U,children:(0,G.jsx)("div",{className:Mt,children:z})}):(0,G.jsx)("div",{className:Mt,children:z})})),Kt=({bookUri:e,bookName:t,sampleUri:n,isFinishedUnlockingJourney:r,usePlayContextItem:a,spec:o,consumptionCapExplanation:l})=>{const c=function(e,t){const n=(0,vt.L)();return(0,i.useCallback)((async(i,r)=>n.getBookContents(e,{offset:i,limit:r,doRefreshSubscription:t})),[t,n,e])}(e,r),u=(0,i.useRef)(!1),d=(0,i.useRef)(0),m=(0,s.NC)(me.cKd,{loadingValue:!1}),[p,h]=(0,i.useState)([]),g=(0,i.useCallback)((e=>e?.uri===n),[n]),f=(0,i.useCallback)((e=>(e=>null!==e)(e)&&!g(e)),[g]),b=(0,i.useCallback)((()=>{c&&(u.current||null===d.current||(u.current=!0,c(d.current,50).then((e=>{u.current=!1,d.current=e.nextOffset,e.items.length>0&&h((t=>t.concat(e.items.filter(f))))}))))}),[c,f]);return(0,i.useEffect)((()=>{d.current=0,h([])}),[e]),(0,G.jsx)("ul",{children:(0,G.jsx)(bt._,{onReachBottom:b,triggerOnInitialLoad:!0,children:p.map(((e,n)=>{const{name:i,duration:r,uri:s,playability:{playable:c},playedState:{playPositionMilliseconds:u,state:d},isExplicit:p,is19PlusOnly:h}=e,g=function(e){return!e.playability?.playable&&(e.playability?.reason===yt.Uk.PaymentRequired||e.playability?.reason===yt.Uk.Anonymous)}(e);return m?(0,G.jsx)(Wt,{name:i,duration:r,uri:s,bookName:t,usePlayContextItem:a,isPlayable:c,isChapterLocked:g,consumptionCapExplanation:l,resumePositionMs:u,isFullyPlayed:d===yt._w.Completed,isExplicit:p,is19PlusOnly:h,spec:o,index:n},s):(0,G.jsx)(Rt,{name:i,duration:r,uri:s,bookName:t,usePlayContextItem:a,isPlayable:c,isChapterLocked:g,consumptionCapExplanation:l,resumePositionMs:u,isFullyPlayed:d===yt._w.Completed,isExplicit:p,is19PlusOnly:h,spec:o,index:n},s)}))})})},Yt={shuffle:!1,repeat:ae.p.REPEAT_NONE},qt=i.memo((function({metadata:e}){const{uri:t,coverArt:n,name:a,htmlDescriptionPlain:l,authorName:d,sample:m,narrators:x,rating:C,isExplicit:S,duration:A,copyrights:w,publishDate:I,price:T,isLocked:N,consumptionCapExplanation:k,signifierText:O,resumeEpisodeLink:P,topics:j,isPreRelease:L,preReleaseEndDateTime:D}=e,{search:U}=(0,r.zy)(),M=!!new URLSearchParams(U).get("isUnlockingAudiobook"),B=!(!(0,re.Z)(M)||M),F=(0,ue.V)(),H=(0,q.H)(n[0]?.url),V=(0,h.wA)(),z=(0,Y.W)(),$=(0,s.NC)(me.HEU,{loadingValue:!1}),{spec:Z,logger:X}=(0,le.r)(f.U,{data:{uri:t,identifier:o.$h.PODCAST_SHOW_AUDIOBOOK}}),{spec:J,logger:ee}=(0,le.r)(f.U,{data:{uri:t,identifier:o.$h.RATINGS_AND_REVIEWS_RATINGS_AUDIOBOOK}}),{spec:ae,logger:pe}=(0,le.r)(b.Y,{data:{uri:t,identifier:o.$h.PODCAST_SHOW_AUDIOBOOK}}),he=(0,i.useMemo)((()=>Z.actionBarFactory()),[Z]),fe=(0,i.useMemo)((()=>J.aboutSectionFactory()),[J]),be=(0,i.useMemo)((()=>Z.chapterListFactory()),[Z]);(0,i.useEffect)((()=>{z({type:"view",intent:"audiobook"})}),[z]),(0,i.useEffect)((()=>{N&&pe.logImpression(ae.impression())}),[ae,pe,N]);const{isPlaying:ve,togglePlay:ye,usePlayContextItem:_e,isActive:Ne,triggerPlay:Re}=(0,se.P)({uri:t},{featureIdentifier:"audiobook"},Yt),{togglePlay:ke,isPlaying:Oe,isActive:Pe}=(0,se.P)({uri:m?.uri??"",pages:[{items:[{uri:m?.uri??"",uid:m?.uri??"",type:R.c.CHAPTER,provider:null,metadata:L?{is_pre_release:"true",type:"trailer"}:void 0}]}]},{featureIdentifier:"audiobook"},Yt),je=ve&&!Oe,Le=Ne&&!Pe,De=(0,i.useCallback)((async()=>{const e=Z.actionBarFactory().playButtonFactory();if(k&&!F&&$)return X.logInteraction(e.hitShowPaywall({paywalledItem:t})),void V((0,ce._3)(k));if(!N||F)if(F)ye();else{const n=(0,de.$I)({isPlaying:je,isActive:Le,spec:e,logger:X,uri:t});Le?ye({loggingParams:n}):Re({skipTo:P?{uri:P}:void 0,loggingParams:n})}}),[Z,k,F,$,N,X,t,V,ye,je,Le,Re,P]),Ue=(0,i.useCallback)((()=>{m?.uri&&(z({targetUri:m.uri,intent:Oe?"play":"pause",type:"click"}),ke())}),[Oe,z,ke,m?.uri]),Me=(0,i.useCallback)((()=>{const n=fe.ratingButtonFactory().hitUiReveal();ee.logInteraction(n),V((0,ce.eH)(t,e))}),[fe,V,e,ee,t]),Be=(0,ie.y)(),Fe=N&&!k&&T;return(0,G.jsx)("section",{className:Ee,children:(0,G.jsxs)(Ge,{isPreRelease:L,children:[(0,G.jsx)(u.Q,{children:(0,oe.hV)({showOrAudiobookName:a,type:"Audiobook"})}),(0,G.jsx)(ht,{name:a,authorName:d,uri:t,coverArt:n,backgroundColor:H,togglePlay:De,isPlaying:je,isLocked:N,isConsumptionCapped:!!k,price:T,logger:X,spec:Z.actionBarFactory(),preReleaseEndDateTime:D}),(0,G.jsx)(tt,{name:a,backgroundColor:H,uri:t,togglePlay:De,isPlaying:je,isLocked:N,consumptionCapExplanation:k,isExplicit:S,duration:A,publishDate:I,price:T,spec:he}),(0,G.jsxs)("div",{className:p()(xe,"contentSpacing",{[Ce]:Be===ne.E.LARGE}),children:[(0,G.jsxs)("div",{className:Se,children:[(0,G.jsxs)("div",{className:Te,children:[O&&(0,G.jsx)(g.E,{variant:"bodyMedium",as:"p",semanticColor:"textBrightAccent",children:O}),!O&&Fe&&(0,G.jsx)(ft,{price:T})]}),(0,G.jsx)(ge,{htmlDescription:l,narrators:x,spec:fe,isPreRelease:L??!1})]}),(0,G.jsxs)("div",{className:Ae,children:[m?.isPlayable&&(0,G.jsx)(K,{label:c.Ru.get("audiobook.page.sample"),images:m.coverArt,title:m.name,duration:m.duration.milliseconds,moreButton:N?null:(0,G.jsx)(y.b,{menu:(0,G.jsx)(_.r,{uri:m.uri}),children:(0,G.jsx)(v.e,{})}),onClick:Ue,isPlaying:Oe,isActive:Pe,size:W.LARGE,contentRating:m.contentRating?.label,isPlayable:m.isPlayable}),!L&&(0,G.jsx)("div",{className:we,children:(0,G.jsx)(te,{rating:C,onClick:Me})}),j.length>0&&(0,G.jsx)(E.N,{topics:j})]}),(0,G.jsxs)("div",{className:Ie,children:[!L&&(0,G.jsx)(Kt,{bookUri:t,bookName:a,sampleUri:m?.uri,isFinishedUnlockingJourney:B,usePlayContextItem:_e,spec:be,consumptionCapExplanation:k},`${t}-${N}-${!!k}`),(0,G.jsx)(Q.Z,{copyrights:w})]})]})]})})}));var Qt=n(98832),$t=n(35370),Zt=n(54519),Xt=n(48136);const Jt={field:Xt.WY.PUBLISH_DATE,order:Xt.AX.DESC},en={field:Xt.WY.PUBLISH_DATE,order:Xt.AX.ASC},tn=en,nn={episodic:Jt,sequential:en,recent:Jt};function rn(){return new Map([[Jt,{key:"newest-to-oldest",value:c.Ru.get("shows.sort.newest-to-oldest")}],[en,{key:"oldest-to-newest",value:c.Ru.get("shows.sort.oldest-to-newest")}]])}function sn(e){return nn[e]}var an=n(63445),on=n(28413);const ln=({uri:e,name:t,backgroundColor:n,spec:r})=>{const s=(0,he.s)(),a=(0,Y.W)(),o=!(0,Be.n)(),[l,u]=(0,Pe.A)(e),d=(0,i.useCallback)((()=>{a({targetUri:e,intent:l?"unsave":"save",type:"click"});const t=r.followButtonFactory();s.logInteraction(l?t.hitUnfollow({itemToBeUnfollowed:e}):t.hitFollow({itemToBeFollowed:e})),u(!l)}),[a,e,l,r,s,u]),m=(0,i.useCallback)((()=>{s.logInteraction(r.contextButtonFactory().hitUiReveal())}),[s,r]),p=(0,Me.j)();return(0,G.jsx)(Le.E,{backgroundColor:n,children:(0,G.jsxs)(De.S,{children:[(0,G.jsx)(Ue.e,{children:(0,G.jsx)(on.W,{isFollowing:l,onClick:d,disabled:o})},"follow-button"),(0,G.jsx)(y.b,{menu:(0,G.jsx)(an.H,{uri:e}),onShow:m,children:(0,G.jsx)(v.e,{label:c.Ru.get("more.label.context",t),size:p})})]})})},cn=(0,i.lazy)((()=>n.e(5896).then(n.bind(n,25896)))),un=(0,i.lazy)((()=>n.e(3538).then(n.bind(n,73538))));function dn(e){const t=(0,s.NC)(me.W4i),n=(0,s.NC)(me.SN8);return t&&n?(0,G.jsx)(un,{uri:e.uri}):t?(0,G.jsx)(i.Suspense,{fallback:!0,children:(0,G.jsx)(cn,{...e})}):null}var mn=n(47498),pn=n(52134),hn=n(53216),gn=n(57704),fn=n(41791);var bn=n(85711),vn=n(46150),yn=n(34074),_n=n(64658),En=n(81660),xn=n(33112),Cn=n(3775),Sn=n(16990);const An=Spicetify.GraphQL.Definitions["internalLinkRecommenderShow"]=new Cn.l("internalLinkRecommenderShow","query","8d3464f76765ff8f582bd026118995afb5cd4aa2bb6e9e3ea14e68cb77f5894c",null),wn=(e,t)=>(0,Sn.I)(An,e,t);var In=n(35445);const Tn=e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"Podcast"===e.__typename;var t};var Nn=n(72412),Rn=n(38076),kn=n(96642);const On=({className:e,title:t,uri:n})=>{const{data:i}=wn({uri:n,seoExperimentId:xn.R.PODCAST_DISCOVERY}),r=i?.seoRecommendedPodcast.totalCount,s=i?.seoRecommendedPodcast.items,a=function(e){return(e||[]).filter((e=>Tn(e.data)))}(s);if(0===r)return null;const o=(0,l.o_)(n)?.id;return(0,G.jsx)(kn.$,{className:e,title:t,seeAllLabel:c.Ru.get("shelf.see-all"),total:r,alwaysShowSeeAll:!0,seeAllUri:`spotify:app:show:${o}:more-like-this`,children:a?.map((({data:e},t)=>(0,G.jsx)(Nn.o,{uri:e.uri,name:e.name,images:e.coverArt?.sources||[],publisher:e.publisher?.name??"",sharingInfo:null,mediaType:(0,En.w)(e.mediaType),index:t},e.uri)))})},Pn=e=>{const t=(0,In.D)({entityType:R.c.SHOW,componentType:"shelf",uri:e.uri});return(0,G.jsx)(Rn.s,{onError:t,children:(0,G.jsx)(On,{...e})})};var jn=n(55211),Ln=n(3498),Dn=n(27500),Un=n(95999),Mn=n(86892);var Bn=n(49622);const Fn=(0,i.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a ShowFilterProvider")},sortState:[]}),Hn=i.memo((function({uri:e,children:t}){return(0,G.jsx)(Bn.E,{uri:e,defaultState:[],sortContext:Fn,localStorageKey:"showFilterParams-v2",children:t})})),Vn=(0,i.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a ShowSortProvider")},sortState:sn("recent")}),zn=e=>{const t=rn();return Array.from(t.keys()).some((({field:t})=>t===e?.field))},Gn=i.memo((function({uri:e,children:t,defaultSortParam:n}){return(0,G.jsx)(Bn.E,{uri:e,defaultState:n,sortContext:Vn,localStorageKey:"showSortParam",validator:zn,children:t})})),Wn="ysJC093hc_2ixGCy40_s",Kn="mJP3Bamg3hN7S0p7XKfN",Yn="clPqCj1L_KSfoVuTuP6x",qn="vqQmhCMZq7eUtTV7YYOQ",Qn={totalCount:0,nextOffset:0,items:[]},$n=i.memo((function({showMetadata:e,usePlayContextItem:t}){const{sortState:n}=(0,i.useContext)(Vn),{sortState:r}=(0,i.useContext)(Fn),s=function(e,t,n){const i=(0,vt.L)(),{canSort:r}=i.capabilities,s=(0,Mn.U0)((async(r,s)=>i.getContents(e,{offset:r,limit:s,sort:t,filters:n})),[i,e,t,n]),a=(0,Mn.U0)((async(t,n)=>i.getContents(e,{offset:t,limit:n})),[i,e]);return r?s:a}(e.uri,n,r),[a,o]=(0,i.useState)(Qn),l=(0,i.useRef)(!1),u=(0,pn._)(),d=(0,i.useRef)(0),m=u?6:50,p=u&&null!==d.current,h=!u,f=(0,i.useCallback)(((e=!1)=>{if(!s)return;const t=d.current;null!==t&&!l.current&&m>0&&(l.current=!0,s(t,m).then((n=>{o((i=>{const r=e?[]:[...i.items];return r.splice(t,n.items.length,...n.items),d.current=n.nextOffset,{...n,items:r}})),l.current=!1})))}),[s,m]);return(0,i.useEffect)((()=>{o(Qn)}),[e.uri]),(0,i.useEffect)((()=>{d.current=0,f(!0)}),[f]),(0,G.jsxs)(Un.pZ,{value:"track-list",children:[(0,G.jsx)(bt._,{onReachBottom:h?f:void 0,triggerOnInitialLoad:!0,children:a.items.map(((n,i)=>n&&(0,G.jsxs)("div",{className:Kn,children:[(0,G.jsx)("hr",{className:Wn,"aria-hidden":!0}),(0,G.jsx)(jn.q,{index:i,episode:n,showMetadata:e,usePlayContextItem:t},`${n.uri}/${i}`)]},`${i}${n.uri}`)))}),p&&(0,G.jsx)("div",{className:Yn,children:(0,G.jsxs)(Ln.v,{onClick:()=>{f()},className:qn,children:[(0,G.jsx)(g.E,{variant:"bodySmallBold",children:c.Ru.get("internal-link-recommender.load-more-episodes")}),(0,G.jsx)(Dn.V,{size:"xsmall"})]})})]})}));var Zn=n(95063);const Xn={field:Xt.K$.ISPLAYED,operator:Xt.uj.EQUALS,value:!1},Jn={field:Xt.K$.STARTEDPLAYING,operator:Xt.uj.GREATER_THAN,value:0};const ei="all-episodes",ti=({onFilter:e})=>{const{sortState:t,setSortState:n}=(0,i.useContext)(Fn),r=new Map([[Xn,{key:"is-played",value:c.Ru.get("shows.filter.unplayed")}],[Jn,{key:"started-playing",value:c.Ru.get("shows.filter.in-progress")}]]),s=Array.from(r.values());s.unshift({key:ei,value:c.Ru.get("mwp.podcast.all.episodes")});const a=Array.from(r.keys()),o=(0,i.useCallback)((t=>{if(t===ei)n([]);else{const e=a.find((e=>r.get(e)?.key===t));e&&n([e])}e()}),[e,n,a,r]);if(!r.size||!a)return null;let l=s[0];const u=Array.from(r.entries()).filter((e=>t?.some((t=>t.field===e[0].field&&t.operator===e[0].operator))));return u.length>0&&(l=u[0][1]),(0,G.jsx)(Zn.g,{options:s,onSelect:e=>o(e),selected:l,variant:"bodyMediumBold",semanticColor:"textBase",heading:c.Ru.get("drop_down.filter_by")})},ni=({onSort:e})=>{const{sortState:t,setSortState:n}=(0,i.useContext)(Vn),r=rn(),s=Array.from(r.values()),a=Array.from(r.keys()),o=(0,i.useCallback)((t=>{const i=a.find((e=>r.get(e)?.key===t));i&&n(i),e()}),[a,e,r,n]);if(!r.size||!t)return null;const l=Array.from(r.keys()).find((e=>e.field===t.field&&e.order===t.order));if(!l)return null;const u=r.get(l);return u?(0,G.jsx)(Zn.g,{options:s,onSelect:e=>o(e),selected:u,heading:c.Ru.get("drop_down.sort_by")}):null},ii="bOAvdKi0zqyA_S6ThcvF",ri="jVWq1orbpiIK34UFHkFb",si="GMHh7OED_Nijo4zzSfrb",ai="sNEwCEh44Lapg36PnVFw",oi="OMG3QMzpwer8oWsiJpzs",li="r0yVSge7A1iSTNfudfyV",ci="yP6EeRtQJeqKq10IsMxn",ui="MIaGJ1KyQ3JLblOjWL19",di="p8WHC1qBUrwrBwzp_vYY",mi="Uzyuaxpkm_Gwb6jOGbva",pi="TSNj_F4gGzCuxrzx6n98",hi="E4HX0M3aD0MY5dUCKSCb",gi="CbSqM7wDwoLFnyIo1iKL",fi="c0h80mSMc3PkNlHX0DYs",bi="SGGetEMTKgQk1aJvG4k9",vi="ne3ntrWAoMrE6_4A23Mf",yi=({spec:e})=>{const t=(0,he.s)(),{canSort:n,canFilter:r}=(0,vt.L)().capabilities,s=(0,i.useCallback)((()=>{t.logInteraction(e.episodeListFactory().filterButtonFactory().hitFilter())}),[t,e]),a=(0,i.useCallback)((()=>{t.logInteraction(e.episodeListFactory().sortButtonFactory().hitSort())}),[t,e]);return(0,G.jsxs)("div",{className:ci,children:[r&&(0,G.jsx)("div",{className:di,children:(0,G.jsx)(ti,{onFilter:s})}),!r&&(0,G.jsx)(g.E,{as:"h3",variant:"titleSmall",semanticColor:"textBase",className:mi,children:c.Ru.get("mwp.podcast.all.episodes")}),n&&(0,G.jsx)("div",{className:ui,children:(0,G.jsx)(ni,{onSort:a})})]})},_i=e=>{switch(e){case yt.t5.TRAILER:return c.Ru.get("podcasts.next-episode.trailer");case yt.t5.UP_NEXT:return c.Ru.get("podcasts.next-episode.up-next");case yt.t5.CONTINUE_LISTENING:return c.Ru.get("podcasts.next-episode.continue-listening");case yt.t5.FIRST_PUBLISHED:return c.Ru.get("podcasts.next-episode.first-published");case yt.t5.LATEST_PUBLISHED:return c.Ru.get("podcasts.next-episode.latest-published");default:return}},Ei=({breakpoint:e,metadata:t,showId:n,spec:r})=>{const{uri:s,trailer:o,topics:l,description:u,htmlDescription:d,rating:m}=t,f=(0,he.s)(),{spec:b,logger:_}=(0,le.r)(a.R,{data:{uri:s}}),x=(0,i.useMemo)((()=>b.aboutSectionFactory()),[b]),C=(0,i.useMemo)((()=>r.episodeListFactory()),[r]),S=(0,h.wA)(),A=(0,Y.W)(),w=(0,ue.V)(),{sortState:I}=(0,i.useContext)(Fn),T=(0,vt.L)(),{usePlayContextItem:N}=(0,se.P)({uri:s,metadata:{[yn.W.SORTING_CRITERIA]:T.getPlayerSort(tn),[yn.W.FILTERING_PREDICATE]:T.getPlayerFilter(I)}},{featureIdentifier:"show"}),{isActive:R,isPlaying:k,togglePlay:O}=N({uri:o?.uri||""});(e=>{const t=(0,h.wA)(),n=(0,fn.c)(),r=(0,h.d4)(gn.u);(0,i.useEffect)((()=>{n&&e!==r&&t((0,hn.SC)(e))}),[e,r,t,n])})(s);const P=(0,i.useCallback)((e=>{A({intent:"expand-description",type:"click"});const t=r.aboutSectionFactory().seeMoreButtonFactory(),n=e?t.hitUiReveal():t.hitUiHide();f.logInteraction(n)}),[f,A,r]),j=(0,i.useCallback)(((e,t)=>{const n=r.aboutSectionFactory().topicFactory(t).hitUiNavigate({destination:t.uri});f.logInteraction(n)}),[f,r]),L=o?{name:o.name,uri:o.uri,audio:{items:o.audio.items.map((e=>({url:e.url})))}}:null,D=(0,jn.B)(t),U=(0,bn.C)(L,D),M=(0,i.useCallback)((()=>{o?.uri&&(w?U():(A({targetUri:o.uri,intent:k?"play":"pause",type:"click"}),O()))}),[U,w,k,A,O,o?.uri]),{ref:B,breakpoint:F}=(0,vn.x)({[ne.E.MEDIUM]:0,[ne.E.LARGE]:600}),H=l.length>0,V=u||d,z=V||H,q=(0,pn._)();return(0,G.jsxs)("div",{className:p()(ri,"contentSpacing",{[si]:e===ne.E.LARGE}),ref:B,children:[(0,G.jsxs)("div",{className:ai,children:[z&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(g.E,{as:"h3",variant:"titleSmall",semanticColor:"textBase",className:mi,children:c.Ru.get("artist.about")}),V&&(0,G.jsx)(pe.N,{maxLines:4,content:(u||"").trim(),onExpanded:P,htmlContent:d||void 0}),o&&(0,G.jsx)(nt.h,{menu:(0,G.jsx)(mn.b,{uri:o.uri,showUri:s,sharingInfo:o.sharingInfo}),children:(0,G.jsx)(K,{label:c.Ru.get("track-trailer"),className:pi,images:o.coverArt,title:o.name,duration:o.duration.milliseconds,moreButton:(0,G.jsx)(y.b,{menu:(0,G.jsx)(mn.b,{uri:o.uri,sharingInfo:o.sharingInfo,showUri:s}),children:(0,G.jsx)(v.e,{})}),onClick:M,isPlaying:k,isActive:R,size:W.LARGE,contentRating:o.contentRating?.label})}),(0,G.jsxs)("div",{className:gi,children:[m&&(0,G.jsx)("div",{className:fi,children:(0,G.jsx)(te,{rating:m,onClick:()=>{const e=x.ratingButtonFactory().hitUiReveal();_.logInteraction(e),S((0,ce.eH)(s,t))}})}),H&&(0,G.jsx)(E.N,{topics:l,className:bi,onClick:j})]})]}),(0,G.jsx)(dn,{showId:n,uri:s})]}),(0,G.jsx)(ie.o.Provider,{value:F,children:(0,G.jsxs)("div",{className:p()(oi,{[li]:q}),"":"show-all-episode-list",children:[t.nextBestEpisode&&(0,G.jsx)(jn.q,{showMetadata:t,episode:t.nextBestEpisode.data,usePlayContextItem:N,status:_i(t.nextBestEpisode.type),variant:"next-best-episode"}),(0,G.jsx)(yi,{spec:r}),(0,G.jsx)(_n.r,{spec:C,children:(0,G.jsx)($n,{showMetadata:t,usePlayContextItem:N})})]})}),(0,G.jsx)(Q.Z,{copyrights:[]}),q&&(0,G.jsx)(Pn,{title:c.Ru.get("internal-link-recommender.more-podcasts-like-this"),uri:s,className:vi})]})},xi=i.memo(Ei);var Ci=n(61623),Si=n(40292);const Ai=({reason:e})=>{const t=(0,s.NC)(me.C2),n=function(e){switch(e){case"OTP":return c.Ru.get("podcasts.subscriber-indicator.otp");case"SUBSCRIPTION":return c.Ru.get("podcasts.subscriber-indicator.subscription");default:return""}}(e);return t&&n?(0,G.jsx)(g.E,{className:hi,children:n}):null};const wi=({metadata:e,backgroundColor:t})=>{const{uri:n,coverArt:i,name:r,podcastType:s,publisherName:a,gatedContentAccessReason:o}=e;return(0,G.jsxs)(st.z,{backgroundColor:t,children:[(0,G.jsx)(lt.h,{children:(0,G.jsx)(ct.X,{text:r,dragUri:n,dragLabel:r})}),(0,G.jsx)(Ci.X,{children:(0,G.jsx)(nt.h,{menu:(0,G.jsx)(an.H,{uri:n}),children:(0,G.jsx)(Si.b,{loading:"eager",name:r,images:i,placeholderType:"show",shape:Si.u.SQUARE})})}),(0,G.jsxs)(ot.Y,{children:[(0,G.jsxs)(dt.B,{children:["SHOW"===s?c.Ru.get("type.show"):c.Ru.get("type.podcast"),o&&(0,G.jsx)(Ai,{reason:o})]}),(0,G.jsx)(nt.h,{menu:(0,G.jsx)(an.H,{uri:n}),children:(0,G.jsx)(pt.mm,{dragUri:n,dragLabel:r,scaleAtMinWidth:pt.tw,children:(0,G.jsx)("span",{"":"show-title",children:r})})}),(0,G.jsx)(mt.g,{children:a})]})]})},Ii=({metadata:e,showId:t})=>{const{coverArt:n,name:r,uri:s}=e,{spec:o}=(0,le.r)(a.R,{data:{uri:s}}),l=(0,i.useMemo)((()=>o.actionBarFactory()),[o]),c=(0,q.H)(n[0]?.url||null),d=(0,ie.y)();return(0,G.jsxs)("section",{className:ii,children:[(0,G.jsx)(u.Q,{children:(0,oe.hV)({showOrAudiobookName:r,type:"Podcast"})}),(0,G.jsx)(wi,{metadata:e,backgroundColor:c}),(0,G.jsx)(ln,{uri:s,name:r,backgroundColor:c,spec:l}),(0,G.jsx)(xi,{breakpoint:d,metadata:e,showId:t,spec:o})]})},Ti=(0,i.memo)((function(){const{showId:e=""}=(0,r.g)(),t=`spotify:show:${e}`,{data:n,error:a,redirectUri:u}=(0,He.W)(t),m=(0,s.NC)(me.Jl4);if(u){const e=(0,l.cA)(u);return(0,G.jsx)(Qt.InstrumentedRedirect,{to:e.toURLPath(!0)})}const p=n&&(0,yt.Go)(n);return!n||a||p&&n?.isPreRelease&&!m?a instanceof $t.W?(0,G.jsx)(d.A,{hasError:!0,errorMessage:c.Ru.get("error-page.not-available-in-region.title")}):(0,G.jsx)(d.A,{hasError:!!a,errorMessage:c.Ru.get("error.not_found.title.page")}):p?(0,G.jsx)(i.Suspense,{fallback:null,children:(0,G.jsx)(Zt.u,{pageId:o.$h.PODCAST_SHOW_AUDIOBOOK,uri:t,children:(0,G.jsx)(qt,{metadata:n},`${!!n.consumptionCapExplanation}`)})}):(0,G.jsx)(i.Suspense,{fallback:null,children:(0,G.jsx)(Zt.u,{pageId:o.$h.PODCAST,uri:t,children:(0,G.jsx)(Hn,{uri:n.uri,children:(0,G.jsx)(Gn,{uri:n.uri,defaultSortParam:sn(n.consumptionOrder),children:(0,G.jsx)(Ii,{showId:e,metadata:n})})})})})}));var Ni=n(98196);const Ri=i.memo((function(){const{showId:e=""}=(0,r.g)(),t=(e=>`spotify:show:${e}`)(e),{data:n}=wn({uri:t,seoExperimentId:xn.R.PODCAST_DISCOVERY}),s=n?.seoRecommendedPodcast.totalCount,a=n?.seoRecommendedPodcast.items;return(0,G.jsxs)("div",{className:"contentSpacing",children:[(0,G.jsx)(u.Q,{children:c.Ru.get("internal-link-recommender.more-podcasts-like-this")}),(0,G.jsx)(kn.$,{title:c.Ru.get("internal-link-recommender.more-podcasts-like-this"),total:s,showAll:!0,fullPage:!0,rowGap:Ni.lT,children:a?.map(((e,t)=>{if(!Tn(e.data))return(0,G.jsx)(i.Fragment,{},t);const n=e.data;return(0,G.jsx)(Nn.o,{uri:n.uri,name:n.name,images:n.coverArt?.sources||[],publisher:n.publisher?.name??"",sharingInfo:null,mediaType:(0,En.w)(n.mediaType),index:t},n.uri)}))})]})}))},76267:(e,t,n)=>{"use strict";n.d(t,{b:()=>l,Z:()=>c});var i=n(79474),r=n(40534),s=n(10910),a=n(81392),o=n(11693);const l={playlistActionBar:"playlist-action-bar"},c=(e,t,n,c)=>{const{seen:u,setSeen:d}=(0,o.i)(),[m,p]=(0,i.useState)(!u),[h,g]=(0,i.useState)(!1),{toggleActivationVisible:f}=(0,r.R)(),b=(0,a.K)(a.X.SmartShuffle),v=m&&!!e?.includes(s.j.SMART_SHUFFLE)&&!f&&n;return(0,i.useLayoutEffect)((()=>{v&&d(!0),b&&t===l.playlistActionBar&&c===s.j.OFF&&g(!0)}),[v,d,b,t,g,c]),[v,p,h,g]}},50623:(e,t,n)=>{"use strict";n.d(t,{XR:()=>a});var i=n(22215),r=n(82548);let s=function(e){return e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e}({});const a=(e=!1)=>((e=!1)=>(0,i.NC)(r.uy,e?void 0:{loadingValue:!1})?s.ENABLED:s.DISABLED)(e)===s.ENABLED},52843:(e,t,n)=>{"use strict";n.d(t,{t:()=>v});var i=n(79474),r=n(14056),s=n(87687),a=n(73604),o=n(82433),l=n(42529),c=n(30939),u=n(27742),d=n(84332),m=n(23861),p=n(67222),h=n(25658),g=n(93134),f=n(3030),b=n(13274);const v=({uri:e,uid:t=e,contextUri:n,onAddRecommendation:v,onRemoveRecommendation:y,onUndo:_})=>{const E=(0,i.useContext)(l.w),x=(0,s.K)(),{enqueueSnackbar:C,closeSnackbar:S}=(0,u.d)(),A=(0,i.useRef)(),[w,I]=(0,i.useState)(!1),T=(0,i.useRef)(),N=!(0,c.n)(),{isActive:R}=(0,a.te)(e),{description:k}=(0,o.f)(),O=function(e){const{enqueueCustomSnackbar:t}=(0,f.i)();return(0,i.useCallback)((()=>t((0,b.jsx)(d.O,{children:(0,b.jsx)(h.P,{center:(0,b.jsx)(p.z,{children:r.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback")}),trailing:(0,b.jsx)(m.M,{ctaText:r.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback-undo"),onCtaClick:e})})}),{autoHideDuration:g.r,preventDuplicate:!1,identifier:r.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback")})),[t,e])}((0,i.useCallback)((()=>{clearTimeout(A.current),C(r.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback-undone")),I(!1),_?.()}),[C,_])),P=(0,i.useCallback)((async()=>{w||(R&&x.skipToNext(),N?C(r.Ru.get("web-player.smart-shuffle.offline-remove-recommendation-feedback")):(I(!0),T.current=O(),A.current=setTimeout((async()=>{try{await E.sendSignal(n,"minus",t)}catch(e){S(T.current),C(r.Ru.get("error-dialog.generic.header"))}I(!1)}),3e3),y?.()))}),[S,n,O,C,R,N,y,x,E,t,w]);return{addRecommendation:(0,i.useCallback)((async()=>{if(w)return;if(N)return void C(r.Ru.get("web-player.smart-shuffle.offline-add-recommendation-feedback"));I(!0);let e=k?r.Ru.get("web-player.smart-shuffle.add-to-playlist-feedback",k):r.Ru.get("web-player.smart-shuffle.add-to-playlist-feedback-fallback");try{await E.sendSignal(n,"plus",t)}catch(t){e=r.Ru.get("error-dialog.generic.header")}C(e),I(!1),v?.()}),[n,k,C,N,v,E,t,w]),removeRecommendation:P}}},11693:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(82052);const r=()=>{const[e,t]=(0,i.x)("smart-shuffle-seen",!1);return{seen:e,setSeen:t}}},67976:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i.Y});var i=n(24407)},27906:(e,t,n)=>{"use strict";n.d(t,{o:()=>C});var i=n(79474),r=n(97500),s=n.n(r),a=n(11283),o=n(62359),l=n(16212),c=n(904),u=n(83856),d=n(14056),m=n(88713),p=n(82433),h=n(17980),g=n(14494),f=n(67302),b=n(52843);const v="VcqCvLW71lZT4kqnCgt0";var y=n(13274);const _=({contextUri:e="",uri:t,id:n=t,className:r,canAdd:u})=>{const{description:h}=(0,p.f)(),_=(0,g.s)(),{spec:E}=(0,f.r)(c.A,{data:{uri:e}}),x=(0,i.useCallback)((()=>{_.logInteraction(E.undoButtonFactory({uri:t}).hitUiHide())}),[_,E,t]),C=(0,i.useCallback)((()=>{_.logInteraction(E.removeRecommendationButtonFactory({uri:t}).hitRemoveRecommendation({recommendedItemUri:t,contextUri:e}))}),[e,_,E,t]),S=(0,i.useCallback)((()=>{_.logInteraction(E.addRecommendationButtonFactory({uri:t}).hitAddToPlaylist({playlist:e,itemToBeAdded:t}))}),[e,_,E,t]),{removeRecommendation:A,addRecommendation:w}=(0,b.t)({uri:t,uid:n,contextUri:e,onUndo:x,onRemoveRecommendation:C,onAddRecommendation:S}),I=(0,i.useCallback)((()=>h?d.Ru.get("web-player.smart-shuffle.add-to-playlist-button",h):d.Ru.get("web-player.smart-shuffle.add-to-playlist-button-fallback")),[h]);return(0,y.jsxs)("div",{className:s()(v,r),children:[(0,y.jsx)(m.Zp,{label:d.Ru.get("web-player.smart-shuffle.removed-from-recommendations-button"),children:(0,y.jsx)(a.H,{onClick:A,iconOnly:o.V,size:"small","aria-label":d.Ru.get("web-player.smart-shuffle.removed-from-recommendations-button"),condensedAll:!0})}),u&&(0,y.jsx)(m.Zp,{label:I(),children:(0,y.jsx)(a.H,{onClick:w,iconOnly:l.P,size:"small","aria-label":I(),condensedAll:!0})})]})},E=e=>{const t=(0,h.J)(e.contextUri);return(0,y.jsx)(_,{...e,canAdd:t?.canAdd??!1})},x=e=>(0,y.jsx)(_,{...e,canAdd:!0}),C=e=>e.contextUri&&(0,u.tb)(e.contextUri)?(0,y.jsx)(E,{...e,contextUri:e.contextUri}):e.contextUri&&(0,u.Z0)(e.contextUri)?(0,y.jsx)(x,{...e,contextUri:e.contextUri}):(0,y.jsx)(_,{...e,canAdd:!1})},19760:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var i=n(83856),r=n(51845),s=n(14255),a=n(10910);const o="tap";function l(e,t,n,l){const u=e.getEvents();u.addListener(s.gd.ACTION,(async d=>{if(d.data.action!==s.Ik.PLAY)return;if(m=d.data.context.uri,!(0,i.tb)(m)&&!(0,r.Z0)(m))return;var m;const p=d.data;if(!(await n.getContextualShuffleMode(p.context.uri)===a.j.SMART_SHUFFLE))return;const h=await async function(e,t){const{context:n,options:{skipTo:r}}=t;if(!r?.uid&&!r?.uri)return null;const{uid:a,uri:o}=r;let l=null;const u=await Promise.race([new Promise((t=>{l=e=>{e.data?.context.uri&&(0,i.B2)(e.data?.context.uri,n.uri)&&(a&&e.data?.item?.uid===a||o&&e.data?.item?.uri===o)&&t(e.data)},e.addListener(s.gd.UPDATE,l)})),new Promise((e=>setTimeout(e,c,null)))]);l&&e.removeListener(s.gd.UPDATE,l);return u}(u,p);if(!h?.item?.uid)return;const{lensUri:g}=await l.getEligibility(p.context.uri);try{await t.sendSignal(g,o,h.item.uid),await e.refreshCurrentContext()}catch(e){}}))}const c=5e3},22168:(e,t,n)=>{"use strict";n.d(t,{m:()=>a});var i=n(18321),r=n(10910);const s="reset";function a(e,t,n,a,o){e.getEvents().addListener(i.S.UPDATE_COMPLETE,(async({data:{contextURI:e,shuffleMode:i}})=>{if(i!==r.j.SMART_SHUFFLE||!o.getState()?.activeDevice?.isLocal)return;const{lensUri:l}=await t.getEligibility(e);try{await a.sendSignal(l,s),await n.refreshCurrentContext()}catch(e){}}))}},65656:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});const i=e=>"enhanced_recommendation"===e?.metadata?.provider&&"queue"!==e?.provider},71132:(e,t,n)=>{"use strict";n.d(t,{X:()=>i.XR});var i=n(50623)},93134:(e,t,n)=>{"use strict";n.d(t,{r:()=>i});const i=7e3},17008:(e,t,n)=>{"use strict";function i({prefix:e="id"}={}){return`${e}-${`${(new Date).getTime()}${Math.random()}`}`}n.d(t,{g:()=>i})},3030:(e,t,n)=>{"use strict";n.d(t,{i:()=>a});var i=n(79474),r=n(62328),s=n(17008);function a(){const{enqueueSnackbar:e,closeSnackbar:t}=(0,r.dh)();return{enqueueCustomSnackbar:(0,i.useCallback)(((t,n)=>{const i=function(e){return"keyPrefix"in e}(n);if(i){const{keyPrefix:i,...r}=n,a=(0,s.g)({prefix:i});return e(a,{variant:"headless",children:t,key:a,...r})}const{identifier:r,...a}=n;return e(r,{variant:"headless",children:t,...a})}),[e]),closeSnackbar:t}}},8856:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var i=n(79474),r=n(49778);function s(){return(0,i.useContext)(r.J2)}},27742:(e,t,n)=>{"use strict";n.d(t,{d:()=>a});var i=n(79474),r=n(62328),s=n(17008);function a(){const{enqueueSnackbar:e,closeSnackbar:t}=(0,r.dh)();return{enqueueSnackbar:(0,i.useCallback)(((t,n)=>{if(!n)return e(t,{variant:"default"});if(function(e){return"keyPrefix"in e}(n)){const{keyPrefix:i,...r}=n;return e(t,{variant:"default",key:(0,s.g)({prefix:i}),...r})}return e(t,{variant:"default",...n})}),[e]),closeSnackbar:t}}},61862:(e,t,n)=>{"use strict";n.d(t,{c:()=>s,t:()=>a});var i=n(83856);const r=e=>({url:e}),s=e=>{const t=[];return e.largeImageUrl?t.push(r(e.largeImageUrl)):e.imageUrl&&t.push(r(e.imageUrl)),{displayName:e.displayName,images:t,username:e.username,uri:(0,i.Qj)(e.username).toURI()}},a=(e,t,n)=>{const i=[],r=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId));r&&i.push(r);const a=e.isSessionOwner?void 0:e?.sessionMembers.find((({username:e})=>e===t));a&&(n?.userFirst?i.unshift(a):i.push(a));const o=e.sessionMembers.filter((({username:n,id:i})=>i!==e.sessionOwnerId&&n!==t));return[...i,...o].map(s)}},10654:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});const i={PARTICIPANTS_PAGE:"/socialsession/participant-list"}},1640:(e,t,n)=>{"use strict";n.d(t,{y:()=>a});var i=n(70786),r=n(33831),s=n(91144);const a=()=>{const e=(0,i.g)(),t=(0,s.C)();return e.getEnabled()===r._.ENABLED&&t===r.l.PREMIUM}},73420:(e,t,n)=>{"use strict";n.d(t,{Y:()=>d});var i=n(79474),r=n(97739),s=n(50042),a=n(94710),o=n(55327),l=n(48061),c=n(68584),u=n(76576);function d(){const{createSession:e}=(0,s.D)(),t=(0,c.Z)(),{openQueue:n}=(0,o.R)(),d=(0,a.vh)(),m=(0,u.c)();return(0,i.useCallback)((async()=>{const i=await e();if(!i)throw new Error("Failed to create Jam");d.send((0,r.q)({session_id:i.sessionId,device_type:m.deviceType,tech_type:m.techType,session_uri:i.joinSessionUri,session_type:l.dF.REMOTE})),i.joinSessionShortLink&&t(i.joinSessionShortLink),n()}),[e,m.deviceType,m.techType,d,t,n])}},76576:(e,t,n)=>{"use strict";n.d(t,{c:()=>d});var i=n(68970),r=n(90532),s=n(79864),a=n(85445),o=n(48061);const l={techType:o.PJ.SELF,deviceType:a.bq.COMPUTER},c={[i.FI.DISPLAY_DEVICE]:"display_device",[i.FI.HEADPHONES]:"maybe_headphones",[i.FI.SPEAKERS]:a.bq.SPEAKER,[i.FI.UNKNOWN]:"unknown"},u={[i.Yg.BLUETOOTH]:o.PJ.BLUETOOTH,[i.Yg.BUILT_IN]:o.PJ.WIRED,[i.Yg.DISPLAY_DEVICE]:o.PJ.DISPLAY_DEVICE,[i.Yg.UNKNOWN]:o.PJ.UNKNOWN,[i.Yg.USB]:o.PJ.WIRED,[i.Yg.VIRTUAL]:o.PJ.VIRTUAL};function d(){const e=(0,s.v)((e=>e.activeDevice),((e,t)=>e?.id===t?.id)),t=(0,r.b)();if(e&&!e.isLocal){return{techType:e.type===a.bq.CAST_VIDEO||e.type===a.bq.CAST_AUDIO?o.PJ.CAST:o.PJ.CONNECT,deviceType:e.type}}if(t){const e=t.terminalType===i.FI.SPEAKERS;return t.transportType===i.Yg.BUILT_IN&&e?l:{techType:u[t.transportType],deviceType:c[t.terminalType]}}return l}},91144:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});var i=n(70786);function r(){return(0,i.g)().getJamExperience()}},20490:(e,t,n)=>{"use strict";n.d(t,{_:()=>b});var i=n(99754),r=n(53822),s=n(83856),a=n(14056),o=n(28244),l=n(53603),c=n(40823),u=n(26271),d=n(50042),m=n(14494),p=n(1640),h=n(73420),g=n(13274);const f=({contextUri:e,uri:t,spec:n})=>{const p=(0,m.s)(),{currentSession:f}=(0,d.D)(),b=e&&!(0,s.Th)(e),v=b?e:t,{triggerPlay:y,isActive:_}=(0,u.P)({uri:v},{featureIdentifier:"group_session_context_menu"}),E=(0,i.wA)(),x=(0,h.Y)();return f?.active?null:(0,g.jsx)(l.D,{role:"menuitem",onClick:async()=>{const e=n.createJamButtonFactory().hitUiNavigate({destination:t});e&&p.logInteraction(e);try{await x(),_||y({...b&&{skipTo:{uri:t}}})}catch(e){E((0,o.A9)(c.EL.ERROR))}},leadingIcon:(0,g.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("web-player.social-connect.menu-action.title")})},b=e=>(0,p.y)()?(0,g.jsx)(f,{...e}):null},68083:(e,t,n)=>{"use strict";n.d(t,{p:()=>f});var i=n(79474),r=n(98764),s=n(11283),a=n(23689),o=n(14056),l=n(82052),c=n(92979),u=n(27742);const d="pIxPdfuNasUDLbEDmuK_",m="T5TwrUTf23N311rgrEAc",p="BTwQUS5iBiiOBgdda2Zi",h="lu2OTpzgQ6hv6AYWXMNQ";var g=n(13274);const f=({localStorageKey:e,onDismiss:t})=>{const[n,f]=(0,l.x)(e,!1),{enqueueSnackbar:b}=(0,u.d)(),v=(0,i.useCallback)((()=>{f(!0),t&&t(),b(o.Ru.get("web-player.social-connect.promotion.how-to-start-a-jam-reminder"),{autoHideDuration:5e3})}),[b,t,f]);return n?(0,g.jsx)(g.Fragment,{}):(0,g.jsxs)("div",{className:d,children:[(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)(r.E,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",children:o.Ru.get("web-player.social-connect.invitation-modal.subtitle")}),(0,g.jsx)(s.H,{iconOnly:a.M,className:p,"aria-label":o.Ru.get("close"),onClick:v,size:"small"})]}),(0,g.jsx)("div",{className:h,children:(0,g.jsx)(c.$,{})})]})}},40091:(e,t,n)=>{"use strict";n.d(t,{y:()=>i.y});var i=n(1640)},48061:(e,t,n)=>{"use strict";n.d(t,{JO:()=>a,Mm:()=>i,PJ:()=>s,dF:()=>r});let i=function(e){return e.QUEUE_END_SESSION_BUTTON="end_session_queue_button_pressed",e.QUEUE_LEAVE_SESSION_BUTTON="leave_session_queue_button_pressed",e.INVITATION_MODAL_CANCEL_BUTTON="invitation_modal_cancel_button_pressed",e}({}),r=function(e){return e.REMOTE="REMOTE",e.IN_PERSON="IN_PERSON",e}({}),s=function(e){return e.SELF="SELF",e.CONNECT="CONNECT",e.CAST="CAST",e.BLUETOOTH="BLUETOOTH",e.AIRPLAY="AIRPLAY",e.CARPLAY="CARPLAY",e.WIRED="WIRED",e.VIRTUAL="VIRTUAL",e.DISPLAY_DEVICE="DISPLAY_DEVICE",e.UNKNOWN="UNKNOWN",e}({}),a=function(e){return e.DEEPLINKING="deeplinking",e}({})},33432:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(88040);const r=e=>{const t=(0,i.L)(),n=t?.item?.metadata?.["save_track.uri"],r=t?.item?.uri;return n&&r===e?n:e}},51820:(e,t,n)=>{"use strict";n.d(t,{k:()=>o});var i=n(79474),r=n(30232),s=n(39730);const a=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e===t||e.length===t.length&&e.every((e=>t.includes(e)))),o=()=>{const e=(0,r.o)((e=>e?.signals),a),t=Boolean(e?.includes(s.L.SWITCH_TO_VIDEO)),n=Boolean(e?.includes(s.L.SWITCH_TO_AUDIO)),o=n||t,l=n;return(0,i.useMemo)((()=>({isSongVideo:o,isSongVideoPlayingVideo:l})),[o,l])}},24640:(e,t,n)=>{"use strict";n.d(t,{VW:()=>h,rt:()=>w,Mu:()=>b,xF:()=>v,oQ:()=>g,E6:()=>I,Zo:()=>x});var i=n(79474),r=n(99754),s=n(80707),a=n(22215),o=n(99028),l=n(63192),c=n(41791),u=n(19498),d=n(33560),m=n(31350),p=n(94710);let h=function(e){return e.QueuePage="queue_page_exposures",e.QueuePanel="queue_panel_exposures",e}({});const g=e=>{const t=(0,r.d4)(d.JJ),n=(0,p.vh)(),h=(0,c.c)(),g=(0,r.d4)(m.oo),f=(0,a.NC)(u.tqn);(0,i.useEffect)((()=>{const i={category:e,action:e,variant:f,context:g,label:"dwp",os:(0,o.f)(),country:t,sp_t:(0,l.v8)("sp_t")};h&&n.send((0,s._)(i))}),[e,t,n,h,g,f])};var f=n(52415);let b=function(e){return e.NowPlayingBar="now_playing_bar_track_title_click",e.NowPlayingView="now_playing_view_track_title_click",e}({});const v=e=>{const t=(0,p.vh)(),n=(0,r.d4)(d.JJ),s=(0,r.d4)(m.oo),h=(0,c.c)(),g=(0,a.NC)(u.tqn);return(0,i.useCallback)((async({categoryAndAction:i,destinationUrl:r})=>{const a={category:i,action:i,variant:g,label:"dwp",os:(0,o.f)(),destination_url:r,context:JSON.stringify({uri:e,product:s}),country:n,sp_t:(0,l.v8)("sp_t")};h&&t.send((0,f._)(a))}),[g,e,s,n,h,t])};var y=n(83648),_=n(88783),E=n(85852);const x=()=>{const e=(0,c.c)(),t=(0,y.zy)(),n=(0,a.NC)(u.tqn);if(!e)return{trackPageEnhancedEnabled:!1,trackPageLinksNoLyricsEnabled:!1,trackPageNoLyricsEnabled:!1};const i=(0,_.oC)(E.P.TrackPageEnhanced,t),r=(0,_.oC)(E.P.TrackPageLinksNoLyrics,t),s=(0,_.oC)(E.P.TrackPageNoLyrics,t),o=n===u.dHy.ENHANCED,l=n===u.dHy.LINKS_NO_LYRICS,d=n===u.dHy.NO_LYRICS;return{trackPageEnhancedEnabled:!s&&!r&&(i||o),trackPageLinksNoLyricsEnabled:!i&&!s&&(r||l),trackPageNoLyricsEnabled:!i&&!r&&(s||d)}};var C=n(98678),S=n(64062),A=n(7125);let w=function(e){return e.HasLyrics="has-lyrics",e.NoLyrics="no-lyrics",e.Ineligible="ineligible",e}({});const I=e=>{const t=(0,r.d4)(d.JJ),n=(0,A.V)(),i=(0,p.vh)(),h=(0,c.c)(),g=(0,r.d4)(m.oo),f=(0,a.NC)(u.tqn);return(0,C.YQ)((()=>{const r={category:"track_page_exposures",action:"track_page_exposures",context:JSON.stringify({exposure:e,product:g}),variant:f,label:"dwp",os:(0,o.f)(),country:t,sp_t:(0,l.v8)("sp_t")};h&&(n?i.send((0,S.r)(r)):i.send((0,s._)(r)))}),1500)}},21255:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});let i=function(e){return e.HOME="home",e.COLLECTION="collection",e.CREATE_PLAYLIST="create-playlist",e.LIKED_SONGS="liked-songs",e.YOUR_EPISODES="your-episodes",e.SEARCH="search",e.SETTINGS="settings",e.PLAYLISTS_SIDEBAR="playlists-sidebar",e.NOW_PLAYING_BAR="now-playing-bar",e.BUDDY_FEED="buddy-feed",e.PROFILE="profile",e.DEEP_LINK="deep-link",e.MAKE_MUSIC="make-music",e.NOW_PLAYING_PANEL="now_playing_panel",e.WHATS_NEW_PANEL="whats_new_panel",e.UNKNOWN="unknown",e.EXPLORE_PREMIUM="explore-premium",e}({})},65732:(e,t,n)=>{"use strict";n.d(t,{H:()=>o,u:()=>a});var i=n(79474),r=n(80120),s=n(6929);const a=()=>(0,i.useContext)(s.U),o=()=>(0,i.useContext)(r.N)},80833:(e,t,n)=>{"use strict";n.d(t,{g:()=>i.g});var i=n(21255)},54519:(e,t,n)=>{"use strict";n.d(t,{u:()=>a});var i=n(79474),r=n(65732),s=n(13274);const a=({pageId:e,uri:t,children:n})=>{const a=(0,r.u)(),o=(0,r.H)();return(0,i.useEffect)((()=>{a?.reportPageView({pageId:e,navigationalRoot:o??void 0,entityUri:t})}),[e,o,a,t]),(0,s.jsx)(s.Fragment,{children:n})}},64933:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});var i=n(79474),r=n(99754),s=n(13114),a=n(14693);const o=()=>{const e=(0,r.wA)(),t=(0,r.d4)(s.C);return{videoPlayerMode:(0,r.d4)(s.c),setVideoPlayerUIFlag:(0,i.useCallback)(((t,n)=>{e((0,a.Kp)(t,n))}),[e]),videoPlayerUIFlags:t}}},63842:(e,t,n)=>{"use strict";n.d(t,{d:()=>i.d});var i=n(64933)},13114:(e,t,n)=>{"use strict";n.d(t,{C:()=>i.C,c:()=>i.c});var i=n(88120)},27246:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,n:()=>i});let i=function(e){return e.videoAvailable="videoAvailable",e.fullscreen="fullscreen",e.cinema="cinema",e.npv="npv",e.pip="pip",e.documentPip="documentPip",e.nowPlayingBar="nowPlayingBar",e}({}),r=function(e){return e.none="none",e.npv="npv",e.cinema="cinema",e.pip="pip",e.documentPip="documentPip",e.fullscreen="fullscreen",e.nowPlayingBar="nowPlayingBar",e}({})},14693:(e,t,n)=>{"use strict";n.d(t,{Kp:()=>s,R2:()=>r,kX:()=>i});let i=function(e){return e.SET_VIDEO_MODE="SET_VIDEO_MODE",e.SET_VIDEO_UI_FLAG="SET_VIDEO_UI_FLAG",e}({});const r=e=>({type:i.SET_VIDEO_MODE,mode:e}),s=(e,t)=>({type:i.SET_VIDEO_UI_FLAG,key:e,value:t})},7273:(e,t,n)=>{"use strict";n.d(t,{F3:()=>a,sN:()=>s});var i=n(27246),r=n(14693);const s={fullscreen:!1,cinema:!1,npv:!1,pip:!1,videoAvailable:!1,documentPip:!1,nowPlayingBar:!1},a=(e={isSubtitlesEnabled:!1,uiFlags:s,mode:i.K.none},t)=>{switch(t.type){case r.kX.SET_VIDEO_MODE:return{...e,mode:t.mode};case r.kX.SET_VIDEO_UI_FLAG:{const{key:r,value:s}=t,a={...e.uiFlags,[r]:s};return{...e,mode:(n=a,n.videoAvailable?n.fullscreen?i.K.fullscreen:n.cinema?i.K.cinema:n.pip?i.K.pip:n.documentPip?i.K.documentPip:n.npv?i.K.npv:n.nowPlayingBar?i.K.nowPlayingBar:i.K.none:i.K.none),uiFlags:a}}default:return e}var n}},88120:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,c:()=>s});var i=n(7273),r=n(27246);const s=e=>e.ui?.videoPlayer?.mode??r.K.none,a=e=>e.ui?.videoPlayer?.uiFlags??i.sN},627:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var i=n(96729),r=n(80482),s=n(82052);const a=()=>{const[e,t]=(0,s.x)("view-mode",r.I.LIST);let n=e;return i.p.includes(n)||(n=r.I.LIST),{viewMode:n,isCompactMode:n===r.I.COMPACT,setViewMode:t}}},70746:(e,t,n)=>{"use strict";n.d(t,{a:()=>i.a});var i=n(627)},80482:(e,t,n)=>{"use strict";n.d(t,{I:()=>i});let i=function(e){return e.LIST="list",e.COMPACT="compact",e}({})},11856:(e,t,n)=>{"use strict";n.d(t,{P:()=>u});var i=n(79474),r=n(99754),s=n(83648),a=n(79864),o=n(85445),l=n(87687),c=n(28244);function u(){const e=(0,l.K)(),t=(0,a.v)((({connectionStatus:e})=>e===o.zP.NOT_CONNECTED)),n=(0,r.wA)(),u=function(){const e=(0,s.zy)(),t=(0,s.Zp)();return n=>{t(e.pathname,{replace:!0,state:{..."object"==typeof e.state?e.state:{},...n}})}}();return{open:(0,i.useCallback)(((i,r,s)=>{const a=e.getState();let o=!1;!a?.isPaused&&t&&(e.pause(),o=!0),n((0,c.Nk)(i,r,s,o))}),[n,t,e]),close:(0,i.useCallback)((({resumePlayback:i,forceClose:r=!1})=>{const s=e.getState();s?.isPaused&&t&&i&&e.resume(),r||u({lastViewedItemUri:void 0,sectionUri:void 0,discoveryFeedUri:void 0}),n((0,c.X0)())}),[n,t,e,u]),updateLocationState:u}}},90553:(e,t,n)=>{"use strict";n.d(t,{Mz:()=>s,N6:()=>r,Ym:()=>a,wn:()=>i});const i="37i9dQZF1EYkqdzj48dyYq",r=`spotify:playlist:${i}`,s=["37i9dQZF1EYkqdzj8OSOas","37i9dQZF1EYkqdzjdvy3mw","37i9dQZF1EYkqdzjicdiyA","37i9dQZF1EYkqdzjmSSxKE","37i9dQZF1EYkqdzjrzxMWI"],a="#0A59B8"},16649:(e,t,n)=>{"use strict";n.d(t,{HS:()=>s,bJ:()=>a,c0:()=>r});var i=n(90553);const r=e=>e===i.N6||i.Mz.map((e=>`spotify:playlist:${e}`)).includes(e),s=e=>r(e?.uri||"")||"your_dj"===e?.metadata?.lexicon_set_type,a=(e,t)=>s(e)&&"true"===t?.metadata?.is_narration},65136:(e,t,n)=>{"use strict";n.d(t,{N:()=>u,_:()=>d});var i=n(79474),r=n(28049),s=n(35430),a=n(90553),o=n(26271),l=n(42529);const c=["useYourDJContextMetadata"],u=()=>{const e=(0,i.useContext)(l.w),{data:t,error:n}=(0,r.I)({queryKey:c,queryFn:()=>e.getMetadata(a.N6,{decorateFormatListData:!0}),gcTime:36e5,placeholderData:s.rX});return{metadata:t,error:n}},d=e=>{const{featureIdentifier:t="unknown",referrerIdentifier:n}=e||{},{metadata:i,error:r}=u();return{context:(0,o.P)({uri:a.N6,url:i?.formatListData?.attributes.lexicon_context_url},{featureIdentifier:t,referrerIdentifier:n}),metadata:i,error:r}}},73238:(e,t,n)=>{"use strict";n.d(t,{F:()=>u});var i=n(79474),r=n(22215),s=n(4736),a=n(19498),o=n(33037),l=n(82052),c=n(90553);const u=()=>{const e=(0,r.NC)(a.jif,{loadingValue:!1}),[t,n]=(0,o.A)(c.N6,!1),[u,d]=(0,l.x)(s.r,!1),[m,p]=(0,l.x)("dj.addedToLibraryOnce",!1),h=(0,i.useCallback)((()=>{m||t||e&&(d(!0),p(!0),n(!0))}),[m,t,n,p,e,d]),g=(0,i.useCallback)((()=>{n(!0)}),[n]),f=(0,i.useCallback)((()=>{n(!1)}),[n]);return{isDJInLibrary:t,setDJAddedToLibraryOnceLocalStorage:p,maybeAddDJToLibrary:h,addDJToLibrary:g,removeDJFromLibrary:f}}},61948:(e,t,n)=>{"use strict";n.d(t,{I:()=>s});var i=n(30232),r=n(42544);const s=()=>{const{isYourDJContext:e,isYourDJNarrator:t}=(0,r.C)(),n=(0,i.o)((e=>e?.isPaused));return void 0===n?{isPlaying:!1,isNarrating:!1}:{isPlaying:e&&!n,isNarrating:t&&!n}}},42544:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(16649),r=n(30232);const s=()=>{const e=(0,r.o)((e=>e),((e,t)=>null===e||null===t?e===t:e.context.uri===t.context.uri&&e.item?.uri===t.item?.uri));return e?{isYourDJContext:(0,i.HS)(e.context),isYourDJNarrator:(0,i.bJ)(e.context,e.item)}:{isYourDJContext:!1,isYourDJNarrator:!1}}},72728:(e,t,n)=>{"use strict";n.d(t,{gb:()=>h.g,fW:()=>qe,ed:()=>Y,aU:()=>oe,mA:()=>Re,IT:()=>de,tW:()=>He,cW:()=>ke.c});var i=n(52458),r=n(79474),s=n(97500),a=n.n(s),o=n(98764),l=n(38979),c=n(14056),u=n(63492),d=n(65325),m=n(88291),p=n(263),h=n(43554),g=n(59313);const f=e=>e/2-e/2*22*2/169,b=e=>22*e/169,v=[{name:"rear",color:"#1E95D7",loudnessAnimation:{multiplier:.1},idleAnimation:null},{name:"middle",color:"#1ED7BC",loudnessAnimation:{multiplier:.4},idleAnimation:{xScale:.95,yScale:1.05,clockwise:!1,beginTime:1800,duration:3600}},{name:"fore",color:"#19E68C",loudnessAnimation:{multiplier:1},idleAnimation:{xScale:1.05,yScale:.95,clockwise:!0,beginTime:0,duration:2*Math.PI/3*1e3}}];var y=n(13274);const _=({animateSource:e,repeatCount:t="indefinite"})=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet",width:"300",height:"300",viewBox:"0 0 300 300",style:{width:"100%",height:"100%"},children:[e&&(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)("defs",{children:[(0,y.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_2_G_D_0_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0504202;0.092437;0.1344538;0.1764706;0.2184874;0.2605042;0.302521;0.3445378;0.3865546;0.4285714;0.4705882;0.512605;0.5546218;0.5966387;0.6386555;0.6806723;0.7226891;0.7647059;0.8067227;0.8487395;0.8907563;0.9327731;0.9747899;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,y.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_2_G_D_1_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0504202;0.092437;0.1344538;0.1764706;0.2184874;0.2605042;0.302521;0.3445378;0.3865546;0.4285714;0.4705882;0.512605;0.5546218;0.5966387;0.6386555;0.6806723;0.7226891;0.7647059;0.8067227;0.8487395;0.8907563;0.9327731;0.9747899;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,y.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_1_G_D_0_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0252101;0.0672269;0.1092437;0.1512605;0.1932773;0.2352941;0.2773109;0.3193277;0.3613445;0.4033613;0.4453782;0.487395;0.5294118;0.5714286;0.6134454;0.6554622;0.697479;0.7394958;0.7815126;0.8235294;0.8655462;0.907563;0.9495798;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,y.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_1_G_D_1_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0252101;0.0672269;0.1092437;0.1512605;0.1932773;0.2352941;0.2773109;0.3193277;0.3613445;0.4033613;0.4453782;0.487395;0.5294118;0.5714286;0.6134454;0.6554622;0.697479;0.7394958;0.7815126;0.8235294;0.8655462;0.907563;0.9495798;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,y.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_0_G_D_0_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0420168;0.0840336;0.1260504;0.1680672;0.210084;0.2521008;0.2941176;0.3361345;0.3781513;0.4201681;0.4621849;0.5042017;0.5462185;0.5882353;0.6302521;0.6722689;0.7142857;0.7563025;0.7983193;0.8403361;0.8823529;0.9243697;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,y.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_0_G_D_1_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0420168;0.0840336;0.1260504;0.1680672;0.210084;0.2521008;0.2941176;0.3361345;0.3781513;0.4201681;0.4621849;0.5042017;0.5462185;0.5882353;0.6302521;0.6722689;0.7142857;0.7563025;0.7983193;0.8403361;0.8823529;0.9243697;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,y.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"2s",from:"0",to:"1",xlinkHref:`#${e}_time_group`})]})}),(0,y.jsxs)("g",{id:"_R_G",children:[(0,y.jsxs)("g",{id:"_R_G_L_2_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,y.jsx)("path",{id:`${e}_R_G_L_2_G_D_0_P_0`,fill:"#000000",fillOpacity:"0",fillRule:"nonzero",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "}),(0,y.jsx)("path",{id:`${e}_R_G_L_2_G_D_1_P_0`,stroke:"#1e95d7",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "})]}),(0,y.jsxs)("g",{id:"_R_G_L_1_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,y.jsx)("path",{id:`${e}_R_G_L_1_G_D_0_P_0`,fill:"#000000",fillOpacity:"0",fillRule:"nonzero",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "}),(0,y.jsx)("path",{id:`${e}_R_G_L_1_G_D_1_P_0`,stroke:"#1ed7bc",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "})]}),(0,y.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,y.jsx)("path",{id:`${e}_R_G_L_0_G_D_0_P_0`,fill:"#000000",fillOpacity:"0",fillRule:"nonzero",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "}),(0,y.jsx)("path",{id:`${e}_R_G_L_0_G_D_1_P_0`,stroke:"#19e68c",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "})]})]}),(0,y.jsx)("g",{id:`#${e}_time_group`})]});var E=n(42360),x=n(99025),C=n(74938);class S{constructor(e,t){this.x=e,this.y=t}static fromRadiusAndAngle(e,t){return new S(e*Math.cos(t),e*Math.sin(t))}static sum(e,t){return new S(e.x+t.x,e.y+t.y)}static mul(e,t){return new S(e*t.x,e*t.y)}controlPoint(e,t){return S.sum(this,S.fromRadiusAndAngle(e,t))}}var A=n(1879);const w=18.5/169;function I(e,t,n,i){const r=new S(e.x,e.y);if(i){const e=t/2*w*i.xScale,s=t/2*w*i.yScale,a=(n-i.beginTime)/i.duration,o=(i.clockwise?1:-1)*a*2*Math.PI;r.x+=e*Math.cos(o),r.y+=s*Math.sin(o)}const s=new Path2D;return s.arc(r.x,r.y,t,0,2*Math.PI),s}const T=({forceAlwaysInView:e})=>{const t=(0,r.useRef)(null),n=(0,r.useRef)(null),i=(0,r.useRef)(0),s=(0,r.useRef)(0),a=(0,E.v7)(),{ref:o,inView:l}=(0,g.Wx)({root:a.current,initialInView:!1}),c=(0,r.useCallback)((()=>{const e=performance.now();i.current=i.current||e;const n=e-i.current,r=t.current?.getContext("2d");if(t.current&&r){const e=t.current.width/window.devicePixelRatio;r.clearRect(0,0,t.current.width,t.current.height),function(e,t,n){const i=new S(t/2,t/2),r=f(t),s=b(r);e.lineWidth=s;for(const{color:t,idleAnimation:s}of v)e.strokeStyle=t,e.stroke(I(i,r,n,s))}(r,e,n)}}),[]),u=(0,r.useCallback)((()=>{t.current&&(s.current=requestAnimationFrame((()=>{c(),u()})))}),[c]),d=(0,r.useCallback)((()=>{if(!t.current?.parentElement)return;const{offsetWidth:e,offsetHeight:n}=t.current.parentElement,i=Math.min(e,n),r=window.devicePixelRatio||1,s=i*r;t.current.width=s,t.current.height=s,t.current.style.width=`${i}px`,t.current.style.height=`${i}px`;const a=t.current.getContext("2d");a?.scale(r,r)}),[]);(0,C.w)({onResize:(0,A.s)(d)(200),refOrElement:n});const m=(0,r.useCallback)((()=>(d(),(l||e)&&u(),()=>{cancelAnimationFrame(s.current)})),[d,u,l,e]);return(0,r.useEffect)((()=>()=>{cancelAnimationFrame(s.current)}),[]),(0,y.jsx)("div",{ref:n,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:(0,y.jsx)("canvas",{style:{width:"100%",height:"100%"},ref:e=>{o(e),t.current=e,m()}})})},N=e=>(0,x.j)()?(0,y.jsx)(_,{animateSource:!1}):(0,y.jsx)(T,{...e});var R=n(65136),k=n(73238),O=n(52792),P=n(67302);const j="diX3qTISyTDEx7TNJrxf",L="hcZhIWbB_uHEr2Zu61Mz",D="mWMNdMyzjQTUamoKvI3n",U="LT_9lqpf7DbYVqytlXKg",M="OrAzTU2IM8kYjcoNVliq",B="UDj7VTgRt15O8xLzVGE0",F="syVH7w1vO4Cq92dzuz2o",H="G6jC6RfEbQSTpAmpKIdq",V="rcvAUAKIXXHhbgYIALd6",z=({uri:e,title:t,description:n,forceAlwaysInView:i})=>{const{maybeAddDJToLibrary:s}=(0,k.F)(),{context:g}=(0,R._)({featureIdentifier:"your_dj_home_card",referrerIdentifier:"home"}),{togglePlay:f,isActive:b,isPlaying:v}=g,_=(0,y.jsx)(h.g,{}),{spec:E,logger:x}=(0,P.r)(l.y,{data:{uri:e,position:0,reason:""}}),C=(0,r.useCallback)((()=>{let t;b?t=v?E.cardPlayButtonFactory().hitPause({itemToBePaused:e}):E.cardPlayButtonFactory().hitResume({itemToBeResumed:e}):(t=E.cardPlayButtonFactory().hitPlay({itemToBePlayed:e}),s());const n=x.logInteraction(t);f({loggingParams:n})}),[f,b,v,x,E,e,s]),S=(0,r.useCallback)((e=>{"Enter"===e.code&&f()}),[f]),A=(0,O.t)(E);return(0,y.jsx)(m.h,{menu:_,children:(0,y.jsx)("div",{className:a()(V),children:(0,y.jsxs)("div",{className:j,onClick:C,onKeyDown:S,tabIndex:0,role:"button",ref:A,children:[(0,y.jsx)("div",{className:L,children:(0,y.jsx)("div",{className:D,children:(0,y.jsx)(N,{forceAlwaysInView:i})})}),(0,y.jsxs)("div",{className:U,children:[(0,y.jsxs)("div",{className:M,children:[(0,y.jsx)(o.E,{variant:"titleLarge",semanticColor:"textBase",children:t}),(0,y.jsx)("span",{className:F,children:"BETA"})]}),(0,y.jsx)(o.E,{variant:"bodySmall",className:B,children:n}),(0,y.jsxs)("div",{className:H,onClick:e=>{e.stopPropagation()},children:[(0,y.jsx)(p.R,{onClick:C,version:p.H.secondary,isPlaying:v,size:"small"}),(0,y.jsx)(d.b,{menu:_,children:(0,y.jsx)(u.e,{size:u.M.xs,label:c.Ru.get("more.label.context",t)})})]})]})]})})})};var G=n(881);const W="PcYHHxROltpxrNbcsztg",K="CJstW7tpBherNlQLht7T",Y=({uri:e,shelfTitle:t,title:n,description:r})=>(0,y.jsxs)(G.v,{className:W,children:[(0,y.jsx)("div",{className:K,children:(0,y.jsx)(i.U,{title:t})}),(0,y.jsx)(z,{uri:e,title:n,description:r})]});var q=n(13982),Q=n(88040),$=n(21351),Z=n(87687);function X(e,t,n){return(1-e)*t+e*n}const J=e=>e-Math.PI,ee=Math.PI/2,te=e=>e+ee,ne=.67,ie=4/3*Math.PI;function re(e,t,n,i,r,s,a,o=1,l=1){const c=S.sum(e,S.fromRadiusAndAngle((1-o*l*ne)*s,t)),u=te(t)-o*(4*Math.PI/9),d=n.controlPoint(a,te(ie)),m=c.controlPoint(a,J(u)),p=c.controlPoint(a,u),h=i.controlPoint(a,J(te(r))),g=new Path2D;return g.moveTo(n.x,n.y),g.bezierCurveTo(d.x,d.y,m.x,m.y,c.x,c.y),g.bezierCurveTo(p.x,p.y,h.x,h.y,i.x,i.y),g.arc(e.x,e.y,s,r,ie,!1),g}function se(e,t,n){const i=new S(t/2,t/2),r=f(t),s=b(r),a=ie+2*Math.PI/2,o=X(.5,ie,a),l=S.sum(i,S.fromRadiusAndAngle(r,ie)),c=S.sum(i,S.fromRadiusAndAngle(r,a)),u=r*(d=4,4/3*Math.tan(Math.PI/(2*d)));var d;e.lineWidth=s;for(const{loudnessAnimation:t,color:s}of v){e.strokeStyle=s;const d=re(i,o,l,c,a,r,u,n,t?.multiplier||0);e.stroke(d)}}const ae=()=>{const e=(0,r.useRef)(null),t=(0,r.useRef)(null),n=(0,Z.K)(),i=(0,r.useRef)(0),s=(0,r.useRef)(0),a=(0,r.useRef)(0),o=(0,r.useRef)(0),l=(0,r.useRef)(0),c=(0,r.useRef)(0),u=(0,r.useRef)(0),d=(0,r.useRef)(-1),m=(0,r.useRef)(!1),p=(0,r.useRef)(0),h=(0,r.useCallback)((()=>{const t=performance.now(),r=n.getState()||{isPaused:!0};i.current=i.current||t;const p=t-i.current;r.isPaused?(s.current=s.current||p,a.current=p-s.current):(o.current+=a.current,a.current=0,s.current=0);const h=p-a.current-o.current,g=1-Math.max(0,Math.min(1,(u.current-p)/80)),f=X(g,l.current,c.current);if(m.current||d.current!==f){const t=e.current?.getContext("2d");if(e.current&&t){d.current=f,m.current=!1;const n=e.current.width/window.devicePixelRatio;t.clearRect(0,0,e.current.width,e.current.height),se(t,n,d.current)}}if(1===g){if(l.current=c.current,r.isPaused)c.current=0;else{const e=(0,$.Gq)(r.playbackId,h);c.current=e??0}u.current=p+80}}),[n]),g=(0,r.useCallback)((()=>{e.current&&(p.current=requestAnimationFrame((()=>{h(),g()})))}),[h]),f=(0,r.useCallback)((()=>{if(!e.current)return;const{offsetWidth:t,offsetHeight:n}=e.current.parentElement,i=Math.min(t,n),r=window.devicePixelRatio||1,s=i*r;e.current.style.width=`${i}px`,e.current.style.height=`${i}px`,e.current.width=s,e.current.height=s;const a=e.current.getContext("2d");a?.scale(r,r),m.current=!0}),[]);(0,C.w)({onResize:(0,A.s)(f)(200),refOrElement:t});const b=(0,r.useCallback)((()=>{f(),g()}),[f,g]);return(0,r.useEffect)((()=>()=>{cancelAnimationFrame(p.current)}),[]),(0,y.jsx)("div",{ref:t,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:(0,y.jsx)("canvas",{ref:t=>{e.current=t,m.current=!0,b()}})})},oe=()=>(0,x.j)()?(0,y.jsx)(_,{animateSource:!1}):(0,y.jsx)(ae,{});var le=n(64658);const ce="kYswrotiABgUDQYygUSl",ue="Yx4LX57uEtpnvgzbxoAC",de=({spec:e})=>{const t=(0,Q.L)()||{item:null,context:null},{item:n,context:i}=t;return(0,y.jsx)(le.r,{spec:e,children:(0,y.jsxs)("div",{className:ce,children:[(0,y.jsx)("div",{className:ue,children:(0,y.jsx)(oe,{})}),i&&n?(0,y.jsx)(q.d,{context:i,item:n,titleTypeVariant:"titleSmall",subtitleTypeVariant:"bodyMedium"}):null]})})};var me=n(31499),pe=n(88713),he=n(72120),ge=n(16649),fe=n(30232),be=n(39730);function ve(){const e=(0,Z.K)();return(0,fe.o)((t=>{if(t?.signals?.find((e=>e===be.L.JUMP)))return{available:!0,callback:()=>{e.sendSignal(be.L.JUMP)}};if(t?.context&&t?.item&&(0,ge.HS)(t?.context)&&!(0,ge.bJ)(t?.context,t?.item)){const n=t?.nextItems.find((e=>e.metadata?.jump_track))??t?.nextItems.find((e=>e.metadata?.["narration.intro.ssml"]||e.metadata?.["narration.jump.ssml"]));if(n)return{available:!0,callback:()=>{e.skipTo(n)}}}return{available:!1,callback:()=>{}}}))}var ye=n(82052),_e=n(14255),Ee=n(19645),xe=n(61948);const Ce="yourdj.tiredofset.tooltipshown",Se={status:"inactive",skippedCount:0},Ae=({children:e,onTooltipShown:t,api:n})=>{const[i,s]=(0,r.useState)(!1),a=(0,r.useCallback)((()=>{s(!1)}),[]);(0,r.useImperativeHandle)(n,(()=>({visible:i,hide:()=>{a()}})));const[o,l]=(0,ye.x)(Ce,!1),u=(0,r.useCallback)((e=>{o||(t?.(e),l(!0),s(!0))}),[o,t,l]);return((e,t,n)=>{const i=(0,r.useRef)("inactive"),{isPlaying:s}=(0,xe.I)(),{available:a}=ve();(0,r.useEffect)((()=>{s&&a?"inactive"===i.current&&(i.current="dj_active"):(i.current="inactive",n())}),[s,a,n]),(0,r.useEffect)((()=>{const n=()=>{"dj_active_then_blurred"===i.current&&(i.current="executed",s(),setTimeout((()=>{t("blur_then_focus")}),1e3))},r=()=>{"dj_active"===i.current&&(i.current="dj_active_then_blurred")};function s(){e||(window.removeEventListener("focus",n),window.removeEventListener("blur",r))}return e||(window.addEventListener("focus",n),window.addEventListener("blur",r)),s}),[s,t,e])})(o,u,a),((e,t,n)=>{const i=(0,r.useRef)(Se),{isPlaying:s}=(0,xe.I)(),{available:a}=ve();(0,r.useEffect)((()=>{s&&a?"inactive"===i.current.status&&(i.current.status="dj_active"):(i.current=Se,n())}),[s,a,n]),(0,Ee.p)(_e.gd.ACTION,(n=>{e||n.data.action===_e.Ik.SKIP_TO_NEXT&&("dj_active"!==i.current.status&&"dj_active_then_skipped"!==i.current.status||(i.current.skippedCount+=1,2===i.current.skippedCount&&(i.current.status="executed",t("multiple_skips"))))}))})(o,u,a),(0,y.jsx)(he.x,{title:c.Ru.get("web-player.your-dj.jumpbutton.tooltip.title"),description:c.Ru.get("web-player.your-dj.jumpbutton.tooltip.desc"),visible:i,id:Ce,showButtons:!1,hideOnClickOutside:!1,onSecondaryButtonClick:s.bind(null,!1),children:e})},we="M2CC9pnZH5pjRK1DWgLd",Ie="lzFeyvDl_N0F6bGKxl26",Te="_odkH8ibNDtYDkMjKUhT";let Ne=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e}({});const Re=({onClick:e})=>{const t=(0,r.useRef)(null),{available:n,callback:i}=ve(),s=(0,r.useCallback)((()=>{i(),t.current?.hide(),e?.()}),[e,i]);return n?(0,y.jsx)(Ae,{api:t,children:(0,y.jsx)(pe.Zp,{label:c.Ru.get("web-player.your-dj.jumpbutton.tooltip.hover"),children:(0,y.jsx)("button",{className:a()(we),onClick:s,children:(0,y.jsx)("div",{className:a()(Ie),children:(0,y.jsx)(me.E,{iconSize:Ne.xs,className:a()(Te)})})})})}):null};var ke=n(4736),Oe=n(99754),Pe=n(83648),je=n(22215),Le=n(28244),De=n(45132),Ue=n(19498),Me=n(32264),Be=n(42490),Fe=n(918);const He=()=>{const e=(0,je.NC)(Ue.wq9,{loadingValue:!1}),t=((0,je.NC)(Ue.LDS,{loadingValue:!1}),(0,Oe.wA)()),n=(0,Pe.Zp)(),{openURLWithSessionTransfer:i}=(0,Fe.L)(),s=(0,r.useCallback)((()=>{t((0,Le.YF)())}),[t]);return e?(0,y.jsx)(De.T,{onClose:s,onConfirm:()=>{i(`${Be.M0}&ref=desktop_dj`,"_blank"),s()},"aria-label":c.Ru.get("web-player.your-dj.upsell.premium.title"),titleText:c.Ru.get("web-player.your-dj.upsell.premium.title"),descriptionText:c.Ru.get("web-player.your-dj.upsell.premium.description"),confirmText:c.Ru.get("web-player.your-dj.upsell.premium.yes"),confirmLabel:"confirmLabel",cancelText:c.Ru.get("web-player.your-dj.upsell.premium.no")}):(0,y.jsx)(De.T,{onClose:s,onConfirm:()=>{n(Me.yf),s()},"aria-label":c.Ru.get("web-player.your-dj.upsell.notavailable.title"),titleText:c.Ru.get("web-player.your-dj.upsell.notavailable.title"),descriptionText:c.Ru.get("web-player.your-dj.upsell.notavailable.description"),confirmText:c.Ru.get("web-player.your-dj.upsell.notavailable.gotolink"),confirmLabel:"confirmLabel",cancelText:c.Ru.get("web-player.your-dj.upsell.notavailable.notnow")})};var Ve=n(61080),ze=n(90553),Ge=n(47895);const We="YimlNzI7J6qlgfRRvjXV",Ke="q5CwEeVbq3wRt0e6nBOo",Ye="aLH5DNwdd7ag9mqexICS",qe=()=>{const{isDJInLibrary:e,maybeAddDJToLibrary:t,addDJToLibrary:n,removeDJFromLibrary:i}=(0,k.F)(),{context:r,metadata:s}=(0,R._)(),a=(0,Ge.CV)(),o=(0,Ge.Ir)(),l=(0,Oe.wA)();return(0,y.jsxs)("div",{className:We,children:[(0,y.jsx)("h1",{children:"DJ Debug Window"}),(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:"Library"}),(0,y.jsxs)("h3",{children:["In Library: ",(0,y.jsx)("code",{children:e.toString()})]}),(0,y.jsx)(Ve.$,{size:"small",className:Ke,onClick:()=>{t()},children:"Maybe add DJ to Library"}),(0,y.jsx)(Ve.$,{size:"small",className:Ke,onClick:()=>{n()},children:"Add DJ to Library (forced)"}),(0,y.jsx)(Ve.$,{size:"small",className:Ke,onClick:()=>{i()},children:"Remove DJ from Library (forced)"}),(0,y.jsx)(Ve.$,{size:"small",className:Ke,onClick:()=>{l((0,Le.eN)())},children:"Trigger Upsell"})]}),(0,y.jsx)("hr",{}),(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:"Playback"}),(0,y.jsx)(Ve.$,{size:"small",className:Ke,onClick:()=>{r.togglePlay()},children:"Toggle Play"})]}),(0,y.jsx)("hr",{}),(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:"Loudness-animated DJ Jellyfish"}),(0,y.jsx)("div",{className:Ye,children:(0,y.jsx)(oe,{})})]}),(0,y.jsx)("hr",{}),(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:"Home Card"}),(0,y.jsx)(z,{uri:ze.N6,title:s?.name||"",description:s?.description||"",forceAlwaysInView:!0})]}),(0,y.jsx)("hr",{}),(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:"Now Playing State"}),(0,y.jsx)("pre",{children:JSON.stringify({...a,...o},null,2)}),(0,y.jsx)("br",{}),(0,y.jsx)("h2",{children:"Metadata"}),(0,y.jsx)("pre",{children:JSON.stringify(s,null,23)})]}),(0,y.jsx)("hr",{})]})}},47895:(e,t,n)=>{"use strict";n.d(t,{b8:()=>x,_E:()=>u._,NO:()=>u.N,_x:()=>v,FJ:()=>_.F,Ir:()=>y.I,N7:()=>g,CV:()=>C.C});var i=n(79474),r=n(99754),s=n(83648),a=n(28244),o=n(98832),l=n(69283),c=n(90553),u=n(65136),d=n(13274);const m=`/playlist/${c.wn}`,p=()=>{const{metadata:e,error:t,context:n}=(0,u._)(),{triggerPlay:s,isPlaying:o}=n,l=(0,r.wA)();return{isLoading:!e&&!t,callback:(0,i.useCallback)((()=>{e?o||s():l((0,a.eN)())}),[o,s,l,e])}},h=()=>{const{isLoading:e,callback:t}=p();return(0,i.useEffect)((()=>{e||t()}),[e,t]),e?null:(0,d.jsx)(o.InstrumentedRedirect,{to:"/"})},g=()=>{const{isLoading:e,callback:t}=p();return(0,l.L)((n=>n.pathname===m&&(e||t(),!0)),[e,t]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(s.qh,{path:m,element:(0,d.jsx)(h,{})},m)})};var f=n(22215),b=n(19498);const v=()=>(0,f.NC)(b.p5T,{loadingValue:!1});var y=n(61948),_=n(73238),E=n(99411);function x(){const e=v();return function(t,n){if(!e)return!1;const i=(0,E.M)(t,n).sectionItems.items[0];return"PlaylistResponseWrapper"===i.content.__typename&&"Playlist"===i.content.data.__typename}}var C=n(42544)},21351:(e,t,n)=>{"use strict";n.d(t,{Gq:()=>l,nC:()=>o});var i=n(52716),r=n(50834);const s=new Map;let a=null;const o=()=>a||(a=new i.B((0,r.X)()),a.subLoudness({},(e=>{s.has(e.playbackId)||(s.clear(),s.set(e.playbackId,[]));const t=s.get(e.playbackId),n=Math.min(1,Math.max(0,e.loudness[0]/80));t[Math.floor(Number(e.position/BigInt(40)))]=n})),a),l=(e,t)=>{const n=Math.floor(t/40);{const t=e?s.get(e):null;if(!t||n>=t.length)return;return t[n]}}},67628:(e,t,n)=>{"use strict";n.d(t,{u:()=>c});var i=n(99754),r=n(83856),s=n(14056),a=n(31350),o=n(76661),l=n(42232);function c(){const e=(0,o.vr)({offset:0,limit:1}),{user:t}=(0,i.d4)(a.Ht);if(null===e||!t?.id)return null;return{uri:(0,r.fH)(t.id,"your-episodes").toURI(),name:s.Ru.get("sidebar.your_episodes"),images:[],totalLength:e?.totalLength,owner:(0,l.w)(t)}}},66076:(e,t,n)=>{"use strict";n.d(t,{e:()=>h});var i=n(14056),r=n(36575),s=n(66956),a=n(26271),o=n(93207),l=n(85406),c=n(67628),u=n(8646),d=n(15054),m=n(13274);const p=({metadata:e,index:t,variant:n})=>{const{isPlaying:l,togglePlay:c}=(0,a.P)({uri:e.uri},{featureIdentifier:"your_library"}),{name:p,images:h}=e;return(0,m.jsx)(r.Z,{variant:n,index:t,delegatePlayback:!0,delegateLogging:!0,isPlaying:l,featureIdentifier:"your_library",onPlay:(e,t)=>c({loggingParams:t}),headerText:p,uri:e.uri,renderCardImage:()=>(0,m.jsx)(s.M,{images:h,FallbackComponent:u.b}),renderSubHeaderContent:()=>(0,m.jsx)(o.c,{children:i.Ru.get("tracklist-header.episodes-counter",e.totalLength)}),className:d.A.yourEpisodesCard})},h=({index:e,variant:t})=>{const n=(0,c.u)();return n?(0,m.jsx)(p,{metadata:n,index:e,variant:t}):(0,m.jsx)(l.u,{cardImage:(0,m.jsx)(s.M,{FallbackComponent:u.b}),isLoading:!0,variant:t})}},5342:(e,t,n)=>{"use strict";n.d(t,{X:()=>o,t:()=>l});var i=n(22215),r=n(82052),s=n(19498),a=n(79180);let o=function(e){return e[e.LIST=0]="LIST",e[e.GRID=1]="GRID",e}({});const l=()=>{const e=(0,a.vW)(),t=(0,i.NC)(s.AEN),[n,l]=(0,r.x)("items-view",o.LIST);return{itemsView:n,setItemsView:l,isGridView:n===o.GRID&&(t||e===a.fX.EXPANDED)&&e!==a.fX.COLLAPSED}}},79180:(e,t,n)=>{"use strict";n.d(t,{$:()=>p,fX:()=>c,sy:()=>m,vW:()=>d});var i=n(79474),r=n(43364),s=n(7125),a=n(48145),o=n(82052),l=n(68876);let c=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.COLLAPSED=1]="COLLAPSED",e[e.EXPANDED=2]="EXPANDED",e}({});function u(){return(0,o.x)("ylx-sidebar-state",c.DEFAULT)}function d(){return u()[0]}function m(){return u()[0]===c.COLLAPSED}function p(){const e=(0,s.V)(),[t,n]=u(),o=(0,i.useRef)(c.DEFAULT);(0,i.useEffect)((()=>{t!==c.COLLAPSED&&(o.current=t)}),[t]);const d=!e,m=(0,a.U)(`(min-width: ${l.ZU.EXPANDED_MIN+3*r.KV+r.ev}px)`)&&!e,p=(0,i.useCallback)((e=>{e===c.COLLAPSED&&!d||e===c.EXPANDED&&!m||n(e)}),[n,d,m]);return{ylxSidebarState:t,setYlxSidebarState:p,isCollapsed:t===c.COLLAPSED,isExpanded:t===c.EXPANDED,canCollapse:d,canExpand:m,lastUncollapsedYlxSidebarState:o.current}}},88255:(e,t,n)=>{"use strict";n.d(t,{$:()=>i.$,fX:()=>i.fX,sy:()=>i.sy,vW:()=>i.vW});var i=n(79180)},36833:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var i=n(11867),r=n(97247);const s=()=>{const e=(0,r.y)();return e===i.E.SMALL||e===i.E.XSMALL?"medium":"large"}},7293:(e,t,n)=>{"use strict";n.d(t,{H:()=>r});var i=n(79474);function r(){const[e,t]=(0,i.useState)(document.body.clientWidth);return(0,i.useLayoutEffect)((()=>{const e=()=>{t(document.body.clientWidth)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),document.body.clientWidth}},63:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,P:()=>s});const i={SMALL:192,BIG:232},r={small:{width:64,height:64},standard:{width:300,height:300},large:{width:640,height:640},xlarge:{width:1280,height:1280}};function s(e){const t=function(e=[]){const t=e.map(a),n=t.filter((e=>e.width>=i.SMALL&&e.url)).sort(((e,t)=>e.width-t.width));return n.length?n:t}(e),[n]=t,r=n?.url||null;if(!r)return[];return[r,t.filter((({url:e,width:t})=>e&&t)).map((({url:e,width:t})=>`${e} ${t/2}w, ${e} ${t}w`)).join(", "),`(min-width: 1280px) ${i.BIG}px, ${i.SMALL}px`]}function a(e){if(!e.label)return e;const{width:t,height:n}=r[e.label];return{url:e.url,width:t,height:n}}},69283:(e,t,n)=>{"use strict";n.d(t,{L:()=>o,k:()=>a});var i=n(79474),r=n(4485);const s=new Map,a=()=>{const e=(0,r.J)(),t=(0,i.useRef)("");(0,i.useEffect)((()=>e.block(((e,n)=>{let i=!1;for(const[t]of s)t(e,n)&&(i=!0);const r=e.pathname+e.search+e.hash;if("PUSH"===n&&t.current===r&&(i=!0),i)return!1;t.current=r}))),[e])},o=(e,t=[])=>{(0,i.useEffect)((()=>(s.set(e,!0),()=>{s.delete(e)})),[...t,e])}},4485:(e,t,n)=>{"use strict";n.d(t,{J:()=>r});var i=n(94710);const r=()=>{const e=(0,i.mv)();if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e.getHistory()}},91303:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});const i=n(34285).W},36471:(e,t,n)=>{"use strict";n.d(t,{W:()=>c});var i=n(79474),r=n(99754),s=n(83648),a=n(42360);const o=(e,t)=>n=>{const{intent:i,type:r,targetUri:s,itemIdSuffix:a,pathNameOverride:o}=n,l=a?`${t}/${a}`:t,c=o||e;return{page:c.split(/\//).filter((e=>""!==e)).shift(),view_uri:c,action_intent:i,action_type:r,target_uri:s,item_id:l}};var l=n(23464);function c(){const e=(0,i.useContext)(a.zz),t=(0,r.wA)(),{pathname:n}=(0,s.zy)();return(0,i.useCallback)((i=>{const r=o(n,e);t((0,l.d)(r(i)))}),[t,n,e])}},97075:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});var i=n(79474);const r=(e,t)=>{const n=(0,i.useRef)(e);(0,i.useEffect)((()=>{n.current=e}),[e]),(0,i.useEffect)((()=>{let e;function i(){e&&clearInterval(e)}if(null!==t)return e=setInterval((function(){n.current(i)}),t),i}),[t])}},7125:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});var i=n(99754),r=n(31350);const s=()=>{const e=(0,i.d4)(r.Ht);return e?.isAnonymous??!1}},41791:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});var i=n(99754);const r=()=>(0,i.d4)((e=>e.platform?.isBrowser))},87571:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(50629);const r=()=>"1"!==(0,i.$)("dsa-mode-enabled")},65911:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var i=n(99754),r=n(22215),s=n(19498),a=n(31350);const o=()=>{const e=(0,r.NC)(s.poS,{loadingValue:!1}),t=(0,i.d4)(a.Yb);return e&&t}},90381:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var i=n(50629);const r=()=>"1"===(0,i.$)("is-pigeon")},7283:(e,t,n)=>{"use strict";n.d(t,{g:()=>a});var i=n(30939),r=n(11437),s=n(77564);function a(e,t=!0,n=!1,a=!1){const o=(0,r.T)(e),l=(0,i.n)(),c=o===s.kw.YES;return t&&(l||c||n)&&!a}},74157:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(50629);const r=()=>"1"===(0,i.$)("is-puffin")},7079:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var i=n(99754);function r(){return(0,i.d4)((e=>e.ui?.textDirection?.isRTL))}},80959:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});var i=n(79474);function r(e,t="-100% 0px 0px 0px",n=0,r){const[s,a]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const i=new window.IntersectionObserver((e=>{e.forEach((e=>{a(!e.isIntersecting)}))}),{root:e.current,rootMargin:t,threshold:n});return r?.current?i.observe(r.current):e.current?.firstElementChild&&i.observe(e.current.firstElementChild),()=>{i.disconnect()}}),[r,t,e,n]),s&&!!e.current?.scrollTop}},13507:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var i=n(99754),r=n(31350);const s=()=>(0,i.d4)(r.Yb)},25279:(e,t,n)=>{"use strict";n.d(t,{V:()=>a});var i=n(79474),r=n(83648),s=n(83856);function a(e){const t=(0,s.o_)(e);let n="";return t&&(n=t.toURLPath(!0)),function(e){const t=(0,r.Zp)();return(0,i.useCallback)((()=>{""!==e&&t(e)}),[e,t])}(n)}},50823:(e,t,n)=>{"use strict";n.d(t,{J:()=>l});var i=n(99754),r=n(83856),s=n(33037),a=n(31350),o=n(30939);const l=e=>{const[t]=(0,s.A)(e),n=(0,o.n)(),l=(0,i.d4)(a.F6);return!n&&t?(0,r.Uu)(l,(0,r.o_)(e)?.id).toURI():e}},30939:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var i=n(79474),r=n(35187);const s=()=>{const e=(0,i.useContext)(r.Z);if(null===e)throw new Error("Trying to use 'OfflineContext' without 'OfflineStatusProvider'!");return e.online}},85711:(e,t,n)=>{"use strict";n.d(t,{C:()=>g});var i=n(79474),r=n(22215),s=n(36471);const a=e=>e<=64?"small":e>640?"xlarge":e>300?"large":"standard";function o(e,t){return e.filter((e=>e.label?e.label===t:e.width?a(e.width)===t:!!e.height&&a(e.height)===t))[0]}var l=n(68877);var c=n(51326);function u(e){const t=o(e,"standard"),n=o(e,"large"),i=o(e,"small"),r=o(e,"xlarge");return{image_url:t?.url,image_height:t?.height?.toString(),image_width:t?.width?.toString(),image_url_large:n?.url,image_height_large:n?.height?.toString(),image_width_large:n?.width?.toString(),image_url_small:i?.url,image_height_small:i?.height?.toString(),image_width_small:i?.width?.toString(),image_url_xlarge:r?.url,image_height_xlarge:r?.height?.toString(),image_width_xlarge:r?.width?.toString()}}var d=n(87687),m=n(73604),p=n(9440),h=n(19498);function g(e,t){const n=(0,s.W)(),a=(0,d.K)(),{isPlaying:o,isActive:g}=(0,m.te)(e?.uri||""),{isActive:f}=(0,m.l_)(t?.uri||""),b=(0,r.NC)(h.pZ0);return(0,i.useCallback)((i=>{if(!t||!e)return;const r=function(e,t,n=!1){const i=(e.coverArt?.sources||[]).sort(((e,t)=>(t.width||0)-(e.width||0))),r=(0,l.QH)(e,t),s=(0,l.gf)(t)||r,a=e.mediaTypes&&e.mediaTypes.includes(c.Cx.Video)?"video":"audio";return{uri:e.uri,title:e.name,subtitle:t.name,type:"episode",album_uri:t.uri,album_title:t.name,artist_uri:t.uri,artist_name:t.name,...u(i),media_type:n?a:"audio",isTrailer:r,anonymousPlaybackAllowed:s}}(e,t,b);f&&!o&&g&&!i?a.resume():f&&o&&!i?(n({type:"click",intent:"pause",targetUri:e.uri}),a.pause()):(n({type:"click",intent:"play",targetUri:e.uri}),a.play({uri:t.uri,pages:[{items:[{type:p.c.EPISODE,uri:e.uri,uid:null,metadata:r,provider:null}]}]},{referrerIdentifier:a.getReferrer(),featureIdentifier:"episode"},i))}),[t,e,b,f,o,g,a,n])}},68035:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var i=n(79474);function r(e){return(0,i.useCallback)((t=>{null!==t&&void 0!==t.getAnimations&&t.getAnimations({subtree:!0}).filter((t=>t instanceof CSSAnimation&&t.animationName===e&&"running"===t.playState)).forEach((e=>e.startTime=0))}),[e])}},55541:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var i=n(79474),r=n(99754);function s(e){const{isDesktop:t,isBrowser:n}=(0,r.d4)((e=>e.platform));return(0,i.useCallback)((i=>{const r=new URL(i);return t?r.searchParams.set("ref",`desktop_${e}`):n&&r.searchParams.set("ref",`web_${e}`),r.toString()}),[t,n,e])}},33711:(e,t,n)=>{"use strict";n.d(t,{K:()=>a,m:()=>o});var i=n(79474),r=n(83648),s=n(87687);const a=()=>{const e=(0,r.zy)(),t=(0,s.K)();e.state?.referrer?t.setReferrer(e.state?.referrer):e.state={...e.state,referrer:t.getReferrer()}},o=e=>{const t=(0,s.K)(),n=(0,r.zy)();(0,i.useEffect)((()=>{t.setReferrer(e),n.state={..."object"==typeof n.state?n.state:{},referrer:e}}),[n,t,e])}},68421:(e,t,n)=>{"use strict";n.d(t,{$h:()=>u,QN:()=>i,Su:()=>a,V$:()=>s,ab:()=>d,rI:()=>r,vx:()=>o,yR:()=>c,yv:()=>l});const i={DISMISS_IN_APP_MESSAGE:"DISMISS_IN_APP_MESSAGE",PREVIEW_IN_APP_MESSAGE:"PREVIEW_IN_APP_MESSAGE",SET_IN_APP_MESSAGING_ENV:"SET_IN_APP_MESSAGING_ENV",SHOW_IN_APP_MESSAGE:"SHOW_IN_APP_MESSAGE",SHOW_PREVIEW_TOOL:"SHOW_PREVIEW_TOOL",TRIGGER_APP_START_IN_APP_MESSAGE:"TRIGGER_APP_START_IN_APP_MESSAGE",TRIGGER_CONTEXT_START_IN_APP_MESSAGE:"TRIGGER_CONTEXT_START_IN_APP_MESSAGE",TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE:"TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE"};function r(){return{type:i.TRIGGER_APP_START_IN_APP_MESSAGE}}function s(){return{type:i.TRIGGER_CONTEXT_START_IN_APP_MESSAGE}}function a(){return{type:i.TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE}}function o(e){return{type:i.SHOW_IN_APP_MESSAGE,message:e}}function l(){return{type:i.DISMISS_IN_APP_MESSAGE}}function c(e,t){return{type:i.PREVIEW_IN_APP_MESSAGE,creativeId:e,appUri:t}}function u(e){return{type:i.SET_IN_APP_MESSAGING_ENV,env:e}}function d(e){return{type:i.SHOW_PREVIEW_TOOL,show:e}}},33541:(e,t,n)=>{"use strict";n.d(t,{Hv:()=>o,IA:()=>r,YZ:()=>a,j8:()=>s});var i=n(8012);const r="player.play",s="library.add",a="rootlist.add",o="follow.user";(0,i.u)("ActionStoreAPI")},64420:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});const i=e=>"spotify:artist:0LyfQWJT6nXafLPZqxe9Of"!==e.uri},79130:(e,t,n)=>{"use strict";n.d(t,{f:()=>o,z:()=>a});var i=n(79474),r=n(59841),s=n(54712);function a(e,t=r.gray30){const n=(0,s.as)();return(0,i.useEffect)((()=>(e&&n((0,s.Mo)(e)),()=>{n((0,s.Hf)())})),[e,n]),e||t}const o=({color:e,fallbackColor:t})=>(a(e,t),null)},82754:(e,t,n)=>{"use strict";n.d(t,{H:()=>o});var i=n(79474),r=n(59841),s=n(46697),a=n(54712);function o(e=null,t=r.gray30){const{backgroundColor:n}=(0,a.oI)(),o=(0,a.as)(),l=(0,s.z)(e);return(0,i.useEffect)((()=>(o((0,a.Mo)(l)),()=>{o((0,a.Hf)())})),[l,o]),n||t}},73893:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,g:()=>o});var i=n(79474),r=n(13274);const s=(0,i.createContext)({copy:()=>{}}),a=s,o=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t})},7829:(e,t,n)=>{"use strict";n.d(t,{ar:()=>o,r0:()=>l,tV:()=>a});var i=n(8012),r=n(37766);const s=["artist","artistban","ban","collection","enhanced","ignoreinrecs","listenlater","show","ylpin","prerelease"];function a(e){return s.includes(e)}let o=function(e){return e.ADDED="added",e.REMOVED="removed",e}({});class l extends r.V{}(0,i.u)("CollectionPlatformAPI")},13326:(e,t,n)=>{"use strict";n.d(t,{p:()=>s});var i=n(79474),r=n(65742);function s(e){const t=(0,r.l)();return{add:(0,i.useCallback)(((...n)=>t.add(e,n)),[t,e]),remove:(0,i.useCallback)(((...n)=>t.remove(e,n)),[t,e]),contains:(0,i.useCallback)(((...n)=>t.contains(e,n)),[t,e]),useContains:(0,i.useCallback)((function(...n){const[r,s]=(0,i.useState)([]);return(0,i.useEffect)((()=>{s((e=>e.length?[]:e));return t.subscribeContains(e,n,s)}),n),r}),[t,e])}}},5172:(e,t,n)=>{"use strict";n.d(t,{Yw:()=>a,uZ:()=>o});var i=n(53007),r=n(99028),s=n(8012);const a=(0,r.D)()===i.f.macOS?42:40,o=64;(0,s.u)("ControlMessageAPI")},82536:(e,t,n)=>{"use strict";n.d(t,{s:()=>r});var i=n(9244);class r extends i.bk{}},77692:(e,t,n)=>{"use strict";n.d(t,{D:()=>r,W:()=>i});let i=function(e){return e.COPY="copy",e.COPY_ADVANCED="copy_advanced",e.CUT="cut",e.PASTE="paste",e.SELECT_ALL="select_all",e.FILTER="filter",e.DELETE="delete",e.CREATE_NEW_FOLDER="create_new_folder",e.CREATE_NEW_PLAYLIST="create_new_playlist",e.BROWSE_BACKWARD="browse_backward",e.BROWSE_FORWARD="browse_forward",e.LOGOUT="logout",e.SHOW_ABOUT="show_about",e.SHOW_PREFERENCES="show_preferences",e.SHOW_SEARCH="show_search",e.SHOW_DEBUG_WINDOW="show_debug_window",e.SHOW_ACCOUNT="show_account",e.SHOW_COMMUNITY="show_community",e.SHOW_HELP="show_help",e.SHOW_LICENSES="show_licenses",e.SHOW_LICENSING_INFORMATION="show_licensing_information",e.SHOW_SCTA_INFORMATION="show_scta_information",e.NAVIGATION="navigation",e.ENTER_FULLSCREEN="enter_fullscreen",e.LEAVE_FULLSCREEN="leave_fullscreen",e.SET_PLATFORM_EMULATION_AUTO="set_platform_emulation_auto",e.SET_PLATFORM_EMULATION_MACOS="set_platform_emulation_macos",e.SET_PLATFORM_EMULATION_WINDOWS="set_platform_emulation_windows",e.SET_PLATFORM_EMULATION_LINUX="set_platform_emulation_linux",e}({}),r=function(e){return e.FILTER="enable_filter_item",e}({})},18696:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var i=n(79474),r=n(55188);function s(e,t){const n=(0,i.useContext)(r.A),s=(0,i.useRef)(t);(0,i.useEffect)((()=>{s.current=t})),(0,i.useEffect)((()=>{const t=n.getEvents();function i({data:{type:t,data:n}}){t===e&&s.current(n)}return t.addListener("message",i),()=>{t.removeListener("message",i)}}),[e,n])}},81375:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var i=n(70869),r=n(43183),s=n(9908);class a{constructor(e){this.localStorageAPI=e,this.filters=JSON.parse(JSON.stringify(this.getPreset().filters))}subscribeToEnabledState(e){throw new Error("subscribeToEnabledState not yet implemented")}setEnabledState(e){throw new Error("setEnabledState not yet implemented")}async setFilterGain(e,t){throw new Error("setFilterGain not yet implemented")}async getFilters(){throw new Error("getFilters not yet implemented")}isSupported(){throw new Error("isSupported not yet implemented")}setPreset(e){const t="string"==typeof e?s.fG[e]:e;this.localStorageAPI.setItem(r.h,t),t.filters.forEach((e=>{this.setFilterGain(e.key,e.gain)}))}getPreset(){const e=this.localStorageAPI.getItem(r.h);return e instanceof Error?s.fG.flat:e}subscribeToPresetChange(e){const t=this.localStorageAPI.getEvents(),n=t=>{if(t.data.key===r.h){const n=t.data.value;e(n)}};return t.addListener(i.r.UPDATE,n),()=>{t.removeListener(i.r.UPDATE,n)}}}},43183:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,h:()=>r});const i="audio.equalizer.enabled",r="audio.equalizer.saved_preset"},9908:(e,t,n)=>{"use strict";n.d(t,{Zs:()=>r,fG:()=>o,zP:()=>l});var i=n(14056);const r=12,s=[{type:"lowshelf",frequency:60,key:"audio.equalizer.low_shelf_gain_v2",gain:0},{type:"peaking",frequency:150,key:"audio.equalizer.low_peak_gain_v2",gain:0},{type:"peaking",frequency:400,key:"audio.equalizer.low_mid_peak_gain_v2",gain:0},{type:"peaking",frequency:1e3,key:"audio.equalizer.high_mid_peak_gain_v2",gain:0},{type:"peaking",frequency:2400,key:"audio.equalizer.high_peak_gain_v2",gain:0},{type:"highshelf",frequency:15e3,key:"audio.equalizer.high_shelf_gain_v2",gain:0}],a={flat:{gains:[0,0,0,0,0,0],get displayName(){return i.Ru.get("equalizer.preset.flat")}},acoustic:{gains:[4.9,3.95,2.15,1.75,3.5,2.15],get displayName(){return i.Ru.get("equalizer.preset.acoustic")}},bassBooster:{gains:[4.25,3.5,1.25,0,0,0],get displayName(){return i.Ru.get("equalizer.preset.bassBooster")}},bassReducer:{gains:[-4.25,-3.5,-1.25,0,0,0],get displayName(){return i.Ru.get("equalizer.preset.bassReducer")}},classical:{gains:[3.75,3,-1.5,-1.5,0,3.75],get displayName(){return i.Ru.get("equalizer.preset.classical")}},dance:{gains:[6.55,4.99,1.92,3.65,5.15,0],get displayName(){return i.Ru.get("equalizer.preset.dance")}},deep:{gains:[3.55,1.75,2.85,2.5,1.45,-2.15,-3.55,-4.6],get displayName(){return i.Ru.get("equalizer.preset.deep")}},electronic:{gains:[3.8,1.2,-2.15,2.25,.85,4.8],get displayName(){return i.Ru.get("equalizer.preset.electronic")}},hiphop:{gains:[4.25,1.5,-1,-1,1.5,3],get displayName(){return i.Ru.get("equalizer.preset.hiphop")}},jazz:{gains:[3,1.5,-1.5,-1.5,0,3.75],get displayName(){return i.Ru.get("equalizer.preset.jazz")}},latin:{gains:[3,0,-1.5,-1.5,-1.5,4.5],get displayName(){return i.Ru.get("equalizer.preset.latin")}},loudness:{gains:[4,0,-2,0,-1,1],get displayName(){return i.Ru.get("equalizer.preset.loudness")}},lounge:{gains:[-1.5,-.5,4,2.5,0,1],get displayName(){return i.Ru.get("equalizer.preset.lounge")}},piano:{gains:[2,0,3,1.5,3.5,3.5],get displayName(){return i.Ru.get("equalizer.preset.piano")}},pop:{gains:[-1,0,4,4,2,-1.5],get displayName(){return i.Ru.get("equalizer.preset.pop")}},rnb:{gains:[6.92,5.65,-2.19,-1.5,2.32,3.75],get displayName(){return i.Ru.get("equalizer.preset.rnb")}},rock:{gains:[4,3,-.5,-1,.5,4.5],get displayName(){return i.Ru.get("equalizer.preset.rock")}},smallSpeakers:{gains:[4.25,3.5,1.25,0,-1.25,-4.25],get displayName(){return i.Ru.get("equalizer.preset.smallSpeakers")}},spokenWord:{gains:[-.47,0,3.46,4.61,4.84,0],get displayName(){return i.Ru.get("equalizer.preset.spokenWord")}},trebleBooster:{gains:[0,0,0,1.25,2.5,5.5],get displayName(){return i.Ru.get("equalizer.preset.trebleBooster")}},trebleReducer:{gains:[0,0,0,-1.25,-2.5,-5.5],get displayName(){return i.Ru.get("equalizer.preset.trebleReducer")}},vocalBooster:{gains:[-3,-3,3.75,3.75,3,-1.5],get displayName(){return i.Ru.get("equalizer.preset.vocalBooster")}}},o=Object.entries(a).reduce(((e,[t,n])=>({...e,[t]:{filters:s.map(((e,t)=>Object.freeze({...e,gain:n.gains[t]}))),key:t,get displayName(){return n.displayName}}})),{});function l(e){return{key:"custom",displayName:i.Ru.get("equalizer.preset.manual"),filters:e.map(((e,t)=>({frequency:o.flat.filters[t].frequency,key:o.flat.filters[t].key,type:o.flat.filters[t].type,gain:e})))}}},64936:(e,t,n)=>{"use strict";n.d(t,{XO:()=>a,tv:()=>s});var i=n(8012),r=n(37766);let s=function(e){return e.CONNECTION_STATE_CHANGE="connection_state_change",e}({});(0,i.u)("FacebookAPI");class a extends r.V{}},18811:(e,t,n)=>{"use strict";n.d(t,{d:()=>s,q:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use FacebookContext without FacebookProvider!");return e}},29969:(e,t,n)=>{"use strict";n.d(t,{JK:()=>r,mc:()=>s,tG:()=>a});var i=n(37766);let r=function(e){return e.FOLLOW_USER="follow_user",e.UNFOLLOW_USER="unfollow_user",e.IS_FOLLOWING_USER="is_following_user",e}({}),s=function(e){return e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{emitOperationSync(e,t){return this.emitSync(s.OPERATION,{operation:e,uris:t}).defaultPrevented}emitOperationComplete(e,t,n=null){this.emit(s.OPERATION_COMPLETE,{operation:e,uris:t,error:n})}}},32618:(e,t,n)=>{"use strict";n.d(t,{T:()=>m});var i=n(83856),r=n(98198),s=n(90700),a=n(3775);n(16990);const o=Spicetify.GraphQL.Definitions["isFollowingUsers"]=new a.l("isFollowingUsers","query","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null),l=Spicetify.GraphQL.Definitions["followUsers"]=new a.l("followUsers","mutation","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null),c=Spicetify.GraphQL.Definitions["unfollowUsers"]=new a.l("unfollowUsers","mutation","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null);var u=n(29969);const d=Symbol();class m{constructor(e,t){this._events=new u.tG,this._cache=t??new r.l2,this._loader=e}getEvents(){return this._events}async isFollowing(e){const t={},n=[];if(this._validateURIs(e),e.forEach((e=>{const i=this._cache.get(e);void 0!==i?t[e]=i:n.push(e)})),n.length>0){const e=await this.executeOperation(u.JK.IS_FOLLOWING_USER,n,(()=>async function(e,t){const n=[];if(t.length>0){const i=await e(o,{uris:t});i?.data?.users?.forEach((e=>{"User"===e.__typename?n.push({uri:e.uri,isFollowing:e.following}):"NotFound"===e.__typename&&n.push({uri:e.uri,isFollowing:!1})}))}return n}(this._loader,n)));e!==d?e.forEach((e=>{this._cache.set(e.uri,e.isFollowing),t[e.uri]=e.isFollowing})):n.forEach((e=>{t[e]=!1}))}return t}async followUsers(e){this._validateURIs(e);const t=await this.executeOperation(u.JK.FOLLOW_USER,e,(()=>async function(e,t){const n=[];if(t.length>0){const r=await e(l,{usernames:t.map((e=>(0,s.v)(e)))});r?.data?.followUsers.responses.forEach((e=>{if("FollowUserResult"===e.__typename&&e.result){const t=(0,i.Qj)(e.username).toURI();n.push({uri:t,isFollowing:!0})}}))}return n}(this._loader,e)));t!==d&&t.forEach((e=>{this._cache.set(e.uri,e.isFollowing)}))}async unfollowUsers(e){this._validateURIs(e);const t=await this.executeOperation(u.JK.UNFOLLOW_USER,e,(()=>async function(e,t){const n=[];if(t.length>0){const r=await e(c,{usernames:t.map((e=>(0,s.v)(e)))});r?.data?.unfollowUsers.responses.forEach((e=>{if("UnfollowUserResult"===e.__typename&&e.result){const t=(0,i.Qj)(e.username).toURI();n.push({uri:t,isFollowing:!1})}}))}return n}(this._loader,e)));t!==d&&t.forEach((e=>{this._cache.set(e.uri,e.isFollowing)}))}async executeOperation(e,t,n){if(this._events.emitOperationSync(e,t))return d;try{const i=await n();return this._events.emitOperationComplete(e,t),i}catch(n){throw this._events.emitOperationComplete(e,t,n instanceof Error?n:new Error("Unknown error object")),n}}_validateURIs(e){e.forEach((e=>{if(!(0,i.AP)(e))throw new Error(`Expected a profile URI, but got ${e}!`)}))}}},32247:(e,t,n)=>{"use strict";n.d(t,{N:()=>s});var i=n(79474),r=n(26229);const s=(e,t)=>{const n=(0,r.f)();(0,i.useEffect)((()=>{const i=n.getEvents();return i.addListener(e,t),()=>{i.removeListener(e,t)}}),[e,n,t])}},2690:(e,t,n)=>{"use strict";function i(e,t,n,i){try{if(!e)return n;const r=getComputedStyle(e);if(!r)return n;const s=r.getPropertyValue(t),a=parseInt(s.replace(i,""),10);return isNaN(a)?n:a}catch(e){return n}}n.d(t,{D:()=>i})},24369:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});var i=n(79474),r=n(73075),s=n.n(r);const a=new Map;function o(e,t){const n=function(e){const t=a.get(e.toString());if(t)return t;const n=[];return s().bind(e,(()=>n.forEach((e=>e())))),a.set(e.toString(),n),n}(e);(0,i.useEffect)((()=>(n.push(t),()=>{n.splice(n.indexOf(t),1)})),[n,t])}},61965:(e,t,n)=>{"use strict";n.d(t,{H:()=>h});var i=n(79474),r=n(83486),s=n(79864),a=n(30232),o=n(33082),l=n(57506),c=n(37693),u=n(63842),d=n(27246),m=n(30939),p=n(10066);const h=()=>{const e=(0,p.Q)(),t=(0,r.l)(),n=(0,m.n)(),{connectionStatus:h,isActiveDeviceLocal:g}=(0,s.v)((e=>({connectionStatus:e.connectionStatus,isActiveDeviceLocal:e.activeDevice?.isLocal})),c.a),f=(0,a.o)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.isPaused===t?.isPaused&&e?.item?.uri===t?.item?.uri)),b=e.getCapabilities(),[v,y]=(0,i.useState)((()=>"open"===e.getCurrentState())),{setVideoPlayerUIFlag:_}=(0,u.d)();((e,t)=>{const n=(0,p.Q)(),r=(0,i.useRef)(t);r.current=t,(0,i.useEffect)((()=>{const t=n.getEvents(),i=r.current;return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[n,e])})("visibility_change",(({data:e})=>{!1===e&&_(d.n.documentPip,e),y(e)})),(0,i.useEffect)((()=>{v&&e.syncWithPlayerState(f)}),[e,v,f]),(0,i.useEffect)((()=>{!e.isAllowed(f,h,g)&&v&&e.close()}),[e,h,g,v,f]);const E=f?.item,x=E&&(0,l.p)(E)&&("video"===E.mediaType||"mixed"===E.mediaType),C=E&&(0,o.N)(E),S=!x||b.supportsVideo,A=!C||b.supportsAds,w=!t||b.supportsConnect,I=n||b.supportsOffline,T=b.isEnabled&&S&&A&&w&&I,N=(0,i.useCallback)((async()=>{await e.open(f)}),[e,f]),R=(0,i.useCallback)((()=>{e.close()}),[e]);return{capabilities:b,isOpen:v,open:N,close:R,canOpen:T}}},91172:(e,t,n)=>{"use strict";n.d(t,{D:()=>u});var i=n(79474),r=n(21727),s=n(36471),a=n(67302),o=n(61965);var l=n(63842),c=n(27246);const u=({item:e,onClick:t})=>{const n=(0,s.W)(),{capabilities:{isEnabled:u},isOpen:d,close:m,open:p,canOpen:h}=(0,o.H)(),{videoPlayerMode:g}=(0,l.d)(),{spec:f,logger:b}=(0,a.r)(r.h9,{data:{identifier:g===c.K.cinema?r.gw.CINEMA:r.gw.DESKTOP}}),v=(0,i.useCallback)((()=>{let i;u&&(d?(m(),e?.uri&&b.logInteraction(f.pipButtonFactory({uri:e.uri}).hitUiHide()),i="close-picture-in-picture"):(p(),e?.uri&&(({spec:e,logger:t,uri:n})=>{const i=window.documentPictureInPicture;if(!i)return;const r=s=>{setTimeout((()=>{const i=s.window?.innerWidth,r=s.window?.innerHeight;if(!i||!r)return;const a=e.pipButtonFactory({uri:n}).hitUiOpenWindow({widthPx:i,heightPx:r});t.logInteraction(a)}),100),i.removeEventListener("enter",r)};i.addEventListener("enter",r)})({spec:f,logger:b,uri:e.uri}),i="show-picture-in-picture"),t?.(!d,e?.uri),n({type:"click",intent:i,targetUri:e?.uri,itemIdSuffix:"picture-in-picture-toggle"}))}),[m,u,d,e?.uri,b,t,n,p,f]);return{showButton:h,isActive:d,onClick:v}}},6024:(e,t,n)=>{"use strict";n.d(t,{K:()=>Ze});var i={};n.r(i),n.d(i,{getAlbum:()=>Fe});var r={};n.r(r),n.d(r,{getArtist:()=>He,getArtistAlbums:()=>Ve});var s={};n.r(s),n.d(s,{getOnDemandPlaylists:()=>Ge,getPlaylist:()=>ze,getPlaylistPermissionForUser:()=>We});var a={};n.r(a),n.d(a,{getTrack:()=>Ye});class o{constructor(e,t,n){this.spotifyTransport=e,this.endpoints=t,this.imageSelection=n}getAlbum(e){return this.endpoints.Album.getAlbum(this.spotifyTransport,e).then(this.mapDefaultData)}getArtist(e){return this.endpoints.Artist.getArtist(this.spotifyTransport,e).then(this.mapDefaultData)}getEpisode(e){return this.endpoints.Show.getEpisode(this.spotifyTransport,e).then(this.mapDefaultData).then(this.mapEpisode)}getPlaylist(e){return this.endpoints.Playlist.getPlaylist(this.spotifyTransport,e).then(this.mapDefaultData)}getShow(e){return this.endpoints.Show.getShow(this.spotifyTransport,e).then(this.mapDefaultData)}getTrack(e){return this.endpoints.Track.getTrack(this.spotifyTransport,e).then(this.mapDefaultData).then(this.mapTrack)}mapEpisode=e=>({...e,episodeShowUri:e.show.uri});mapTrack=e=>({...e,smallImage:this.imageSelection(e.album.images||[],{desiredSize:210})});mapDefaultData=({body:e})=>({...e,smallImage:this.imageSelection(e.images||[],{desiredSize:210}),name:e.name,artists:e.artists?e.artists.map((({name:e,uri:t})=>({name:e,uri:t}))):[]})}class l{enabled=!1;inStreamAdsSubscription=null;inStreamAd=null;constructor(e){this.adsCoreConnector=e}enable(){this.enabled||(this.enabled=!0,this.inStreamAdsSubscription=this.adsCoreConnector.subscribeToInStreamAds(this.onInStreamAdMessage.bind(this)))}disable(){this.enabled=!1,this.inStreamAd=null}subscribeToInStreamAds(){return this.inStreamAdsSubscription?this.inStreamAdsSubscription:this.adsCoreConnector.subscribeToInStreamAds(this.onInStreamAdMessage)}getInStreamAd(){return this.inStreamAd}onInStreamAdMessage(e){const{ad:t}=e;t&&(this.inStreamAd=t)}}var c=n(8012),u=n(51806);class d{constructor(e){this.cosmosConnector=e}postEvent(e,t,n){return this.cosmosConnector.postEvent(e,t,n)}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}}var m=n(59081),p=n(60516);class h{enabled=!1;subscriptions=[];constructor(e,t,n,i){this.audioApi=e,this.getContextAdInfo=t,this.inStreamApi=n,this.isNewAdsNpvEnabled=i}async enable(e){this.enabled=!0,this.onInfoCallback=e,this.isNewAdsNpvEnabled&&this.inStreamApi.enable(),this.subscriptions.push(this.audioApi.subscribeToSlotType("stream",this.onAdMessage)),this.isNewAdsNpvEnabled&&this.subscriptions.push(this.inStreamApi.subscribeToInStreamAds())}async disable(){this.enabled=!1,this.resetSubscriptions(),this.isNewAdsNpvEnabled&&this.inStreamApi.disable()}async logClick(e,t){if(!this.enabled)throw new Error("You have to enable the manager before calling logEvent");const n=await this.getContextAdInfo();if(null===n)return;const{positionMs:i,adId:r}=n;null!==r&&this.audioApi.postEvent(r,"clicked",null!==i?{playback_position:Math.round(i),...e&&{reason:e},...t&&{source:t}}:{})}onAdMessage=e=>{if("audio"===e.format&&"play"===e.event){const t="Play"===e.ad?.metadata?.featuredAction,n={buttonMessage:e.ad?.metadata?.buttonMessage,clickUrl:(0,p.H)(e.ad.click_url),isFeaturedActionPlay:t,skippableAdDelaySeconds:parseInt(e.ad?.metadata?.skippable_ad_delay,10)||0};this.onInfoCallback&&this.onInfoCallback(n)}};resetSubscriptions(){for(const e of this.subscriptions)e.cancel();this.subscriptions=[]}getEnabled(){return this.enabled}}function g(e,t,n){return new h(new d(m.Q),e,t,n)}var f=n(41975),b=n(4105);const v={billboard:"billboard",hpto:"hpto",leaderboard:"leaderboard","podcast-preroll":"podcast-preroll","podcast-midroll-1":"podcast-midroll-1","podcast-midroll-2":"podcast-midroll-2","podcast-midroll-3":"podcast-midroll-3","podcast-midroll-4":"podcast-midroll-4","podcast-midroll-5":"podcast-midroll-5","podcast-postroll":"podcast-postroll","sponsored-playlist":"sponsored-playlist"},y=(Object.values(v),{[f.CY.AVAILABLE]:"available",[f.CY.PLAY]:"play",[f.CY.DISCARD]:"discard",[f.CY.UNRECOGNIZED]:"unrecognized"}),_={[f.nM.UNKNOWN]:"unknown",[f.nM.AUDIO]:"audio",[f.nM.VIDEO]:"video",[f.nM.DISPLAY]:"banner",[f.nM.DUMMY]:"dummy",[f.nM.UNRECOGNIZED]:"unrecognized"},E=e=>{const t=y[e];if((e=>e===y[f.CY.AVAILABLE]||e===y[f.CY.PLAY]||e===y[f.CY.DISCARD])(t))return t;throw new Error(`not billboard event type ${t}`)},x=e=>{const t=_[e];if((e=>e===_[f.nM.DISPLAY]||e===_[f.nM.DUMMY])(t))return t;throw new Error(`not billboard format type ${t}`)};class C{constructor(e){this.adsCoreConnector=e}async addNewSlot(e,t){return await this.adsCoreConnector.addNewSlot(e),e}async getSlotConfiguration(e,t){if(window.Ads&&window.Ads.adFormatOverrides.billboardShowAfterSeconds)return Promise.resolve(window.Ads.adFormatOverrides.billboardShowAfterSeconds);const{slotSettings:n}=await this.adsCoreConnector.getSlotSettings(e),i=Number(n[0][t]);if(void 0===i)throw new Error("billboard settings value undefined");return i}async patchTargeting(e,t){const n={targetingMap:{[e]:t}},{targetingMap:i}=await this.adsCoreConnector.putTargeting(n);return i}async postEvent(e,t,n){const i={adId:e,eventType:t,...n.event_data};return await b.lv.postEvent(i),Promise.resolve({event:"sent"})}async postToSlot(e,t){if("now"===t)await this.adsCoreConnector.triggerSlot(e);else{if("fetch"!==t)throw new Error(`billboard intent not recognized. ${t}`);await this.adsCoreConnector.fetchSlot(e)}return Promise.resolve({slotId:e,intent:t})}subscribeToSlotType(e,t){return this.adsCoreConnector.subscribeToSlot(e,function(e){return t=>{try{if(t&&t.adSlotEvent&&t.adSlotEvent.ad){const{eventType:n,format:i,ad:{adId:r,clickthroughUrl:s,metadata:a,display:o,isDummy:l,requestId:c,coverArt:[{url:u}]}}=t.adSlotEvent,{advertiser:d,title:m,creative_id:p}=a,h=x(Number(i)),g=E(n),{duration:f,url:b}=o[0],v=Number(f);return e({ad:{id:r,uri:`spotify:ad:${r}`,advertiser:d,title:m,click_url:s,duration:v,ad_type:0,test_ad:!1,skippable:!1,creative_id:p,dummy:l,ad_playback_id:c,format:h,metadata:a,companion_ad:u?{url:u}:void 0,images:b?[{url:b}]:void 0},event:g,format:h})}throw new Error("no data on BillboardEvent")}catch(e){throw new Error("error mapping billboard data")}}}(t))}async triggerSlotClearAll(e){if(e in v)return await this.adsCoreConnector.clearSlot(e),{slotCleared:!0};throw new Error(`slot is not a reconized type ${e}`)}}class S{constructor(e){this.cosmosConnector=e}addNewSlot(e,t){return this.cosmosConnector.addNewSlot(e,t)}getSlotConfiguration(e,t){return this.cosmosConnector.getSlotConfiguration(e,t)}patchTargeting(e,t){return this.cosmosConnector.patchTargeting(e,t)}postEvent(e,t,n){return this.cosmosConnector.postEvent(e,t,n)}postToSlot(e,t){return this.cosmosConnector.postToSlot(e,t)}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}triggerSlotClearAll(e){return this.cosmosConnector.triggerSlotClearAll(e)}}class A{static listeners=[];static intervalId=null;static previousFocus=!1;static kPollTimeout=500;static reset(){A.listeners=[],A.previousFocus=!1,A.intervalId&&(clearInterval(A.intervalId),A.intervalId=null)}static maybeStartPolling(){null===A.intervalId&&(A.intervalId=setInterval(A.checkFocusState,A.kPollTimeout))}static maybeStopPolling(){A.intervalId&&0===A.listeners.length&&(clearInterval(A.intervalId),A.intervalId=null)}static addFocusListener(e){e.onFocusChanged(document.hasFocus()),A.listeners.push(e),A.maybeStartPolling()}static removeFocusListener(e){A.listeners=A.listeners.filter((t=>t!==e)),A.maybeStopPolling()}static checkFocusState=()=>{const e=document.hasFocus();e!==A.previousFocus&&(A.previousFocus=e,A.listeners.forEach((t=>{t.onFocusChanged(e)})))}}class w{constructor(){this.listeners=[]}addFocusListener(e){this.listeners.push(e),A.addFocusListener(e)}removeFocusListener(e){this.listeners=this.listeners.filter((t=>t!==e)),A.removeFocusListener(e)}removeAllFocusListeners(){this.listeners.forEach((e=>A.removeFocusListener(e))),this.listeners=[]}hasFocus(){return document.hasFocus()}}const I=!0,T=!1,N=[];function R(e,t){const n=L(t);if(-1===n)N.push({fn:t,msInactive:e,isActive:!1});else{const t=N[n];t.msInactive=e,clearTimeout(t.inactiveTimeout),t.inactiveTimeout=setTimeout(t.fn.bind(null,T),t.msInactive)}return k.bind(null,t)}function k(e){const t=L(e);return-1!==t&&(N.splice(t,1),!0)}function O(e){return e.addEventListener("mousemove",j),e.addEventListener("mouseup",j),e.addEventListener("keydown",j),e.addEventListener("scroll",j,!0),P.bind(null,e)}function P(e){e.removeEventListener("mousemove",j),e.removeEventListener("mouseup",j),e.removeEventListener("keydown",j),e.removeEventListener("scroll",j,!0)}function j(){N.forEach((e=>{e.isActive||(e.isActive=!0,e.fn(I)),clearTimeout(e.inactiveTimeout),e.inactiveTimeout=setTimeout((()=>{e.isActive=!1,e.fn(T)}),e.msInactive)}))}function L(e){let t=-1;return N.some(((n,i)=>n.fn===e&&(t=i,!0))),t}const D="billboard",U="foregrounded",M="backgrounded";class B{enabled=!1;activating=!1;viewedTimestamp=0;constructor(e,t){this.billboardApi=e,this.focusState=t}async enable(e){return this.enabled||(this.enabled=!0,this.listener=e,this.focusState.addFocusListener(this),this.disableWindow=O(window),this.activitySubscription=R(18e4,this.onActivity),await this.billboardApi.addNewSlot(D,"video"),this.subscription=this.billboardApi.subscribeToSlotType(D,this.onAdMessage)),null}async disable(){this.enabled&&(this.resetState(),this.enabled=!1,this.listener=void 0,this.subscription&&this.subscription.cancel(),this.activitySubscription&&this.activitySubscription(),this.disableWindow&&this.disableWindow(),this.focusState.removeAllFocusListeners())}minimize(){clearInterval(this.focusMinimizeTimeoutId),clearInterval(this.minimizeTimeoutId),this.minimizeTimeoutId=window.setTimeout(this.finish,3e4),this.logEvent("collapsed",{msSinceViewed:String((new Date).getTime()-this.viewedTimestamp)})}adClick(){this.logEvent("clicked")}onRender(){this.logEvent(this.focusState.hasFocus()?U:M)}onError(){this.handleDiscard()}onFinish(){this.finish()}onFocusChanged(e){return e?this.handleApplicationGainedFocus():this.handleApplicationLostFocus()}onActivity=async e=>{e?this.focusState.hasFocus()&&this.triggerAutoMinimizeIfPossible():await this.displayBillboard()};onAdMessage=e=>{if(this.isPreviewServiceAd(e.ad.metadata))this.handlePreview(e);else if(this.listener)switch(e.event){case"available":this.adId=e&&e.ad?e.ad.id:void 0,this.listener.canShow()?this.listener.create(this.mapBillboardData(e)):this.clearSlot();break;case"play":break;case"discard":this.handleDiscard();break;default:throw new Error(`[Billboard] Unsupported event type: ${e.event}`)}};handleDiscard(){if(clearInterval(this.retryDfpTimoutId),this.listener){const e=!this.listener.isActive();this.listener.isActive()&&this.logEvent("terminated"),this.resetState(),this.listener.destroy().then((()=>{e&&(this.retryDfpTimoutId=window.setTimeout(this.displayBillboard,1e4))}))}}handlePreview(e){if(this.listener)switch(e.event){case"available":this.adId=e&&e.ad?e.ad.id:void 0,this.listener.create(this.mapBillboardData(e)),this.billboardApi.postToSlot(D,"now");break;case"play":break;case"discard":this.handleDiscard();break;default:throw new Error(`Unknown core event from ${D} slot: ${e.event}`)}}isPreviewServiceAd(e){return e&&"true"===e.is_preview}resetState(){clearInterval(this.displayTimeoutId),clearInterval(this.retryTimoutId),clearInterval(this.retryDfpTimoutId),clearInterval(this.focusMinimizeTimeoutId),clearInterval(this.minimizeTimeoutId),this.adId=void 0,this.viewedTimestamp=0,this.focusMinimizeTimeoutId=void 0}focusMinimize=()=>{clearInterval(this.focusMinimizeTimeoutId),this.listener&&this.listener.isActive()&&(this.listener.minimize(),this.minimize())};finish=()=>{clearInterval(this.minimizeTimeoutId),this.listener&&this.listener.isActive()&&(this.listener.destroy(),this.logEvent("ended"),this.resetState())};triggerAutoMinimizeIfPossible=()=>{this.listener&&this.listener.isActive()&&!this.focusMinimizeTimeoutId&&(this.focusMinimizeTimeoutId=window.setTimeout(this.focusMinimize,3e4),this.viewedTimestamp=(new Date).getTime(),this.logEvent("viewed"))};async handleApplicationGainedFocus(){if(clearTimeout(this.displayTimeoutId),clearTimeout(this.retryTimoutId),this.listener&&!this.activating){if(this.listener.isActive())return this.logEvent(U),void this.triggerAutoMinimizeIfPossible();this.activating=!0;try{await this.billboardApi.patchTargeting("focus","true"),await this.billboardApi.postToSlot(D,"now")}catch(e){}finally{this.activating=!1}}}async handleApplicationLostFocus(){if(this.listener&&this.listener.isActive())return void this.logEvent(M);clearTimeout(this.displayTimeoutId);const e=await this.getFocusTimeoutMs();this.displayTimeoutId=window.setTimeout(this.displayBillboard,e)}displayBillboard=async()=>{clearTimeout(this.displayTimeoutId),clearTimeout(this.retryTimoutId),this.listener&&this.listener.isActive()||(this.listener&&this.listener.canShow()?(await this.clearSlot(),await this.billboardApi.postToSlot(D,"fetch")):this.retryTimoutId=window.setTimeout((()=>{this.displayBillboard()}),5e3))};async getFocusTimeoutMs(){const e=await this.billboardApi.getSlotConfiguration(D,"display_time_interval").catch((()=>null));return e&&e>0?1e3*e:18e4}logEvent(e,t={}){this.adId&&this.billboardApi.postEvent(this.adId,e,{event_data:{clientReportedUserAgent:navigator.userAgent,...t}})}clearSlot(){return this.billboardApi.triggerSlotClearAll(D)}mapBillboardData(e){const t=e.ad.metadata||{},n={accountUpgrade:t.accountUpgrade,accountUpgradeTracking:t.accountUpgradeTracking,clickUrl:(0,p.H)(e.ad.click_url),companionSrc:"",creativeId:t.creative_id,dummy:e.ad.dummy,id:e.ad.id,isAdaptive:!1,isPreview:"true"===t.is_preview,isValid:!0,lineItemId:t.lineitem_id,mediaSrc:""};switch(e.ad.format){case"banner":n.companionSrc=e.ad.companion_ad&&e.ad.companion_ad.url||"",n.mediaSrc=e.ad.images&&e.ad.images[0]&&e.ad.images[0].url||"";break;case"dummy":break;default:n.isValid=!1}return n}}function F(e,t){const n=t?new C(e):new S(m.Q);return new B(n,new w)}var H=n(90603);class V{constructor(e,t){this.eventSender=e,this.appStartupId=t}log(e,t){this.eventSender.send((0,H.A)({ad_id:t.adId,app_startup_id:this.appStartupId,creative_id:t.metadata.creative_id,event:e,event_source:"client",format:(0,f.gh)(t.format),lineitem_id:t.metadata.lineitem_id,product_name:"dummy",request_id:t.requestId,slot:"hpto"}))}}const z=async()=>await(await Promise.resolve().then(n.bind(n,4105))).adsCoreConnector.fetchAdForSlot("hpto"),G=(e,t)=>({logger:new V(e,t),fetchHomeAd:z,enableLegacyHptoContainerLoader:!0});var W=n(57797),K=n(83856),Y=n(94345);const q={"discover-weekly":"666f726d61740004","release-radar":"666f726d61740000","time-machine":"666f726d6174f00d","summerjams-a":"666f726d6174f011","summerjams-b":"666f726d6174f012","summerjams-c":"666f726d6174f013","friends-weekly":"666f726d6174f119","on-repeat":"666f726d6174f152"};class Q{constructor(e,t,n,i){this.cosmosConnector=e,this.webApi=t,this.previewParser=n,this.eventSender=i}getSlot(e){return this.cosmosConnector.fetchAdForSlot(e).then((e=>{const t=e.display?.find((e=>"text/html"===e.mime_type));if(!t)throw Error("No template");return{adPlaybackId:e.ad_playback_id,...t}}))}async logEvent(e){try{await this.eventSender.send(e)}catch(e){}}async getAlgoPlaylistInfo(e){if(!(e in q))return;const t=q[e],{sponsorships:n}=await(0,Y.$L)(),i=n.find((e=>{const n=e.spotifyUri.split(":").at(-1);return(0,K.Y8)(n)?.includes(t)}));if(i)return{uri:i.spotifyUri,playBtnUri:i.spotifyUri,uriType:K.NQ.PLAYLIST};this.eventSender.send((0,W.G)({error_message:"HPTO Sponsored Playlist from GAM not in sponsorships list.",request_type:"hpto"}))}getAlbum(e){return this.webApi.getAlbum(e)}getArtist(e){return this.webApi.getArtist(e)}getEpisode(e){return this.webApi.getEpisode(e)}getPlaylist(e){return this.webApi.getPlaylist(e)}getShow(e){return this.webApi.getShow(e)}getTrack(e){return this.webApi.getTrack(e)}async subscribeToPreview(e){return await this.cosmosConnector.addNewSlot("hpto","banner"),await this.cosmosConnector.enableSlot("hpto"),this.cosmosConnector.subscribeToSlot("sp://ads/v1/slots/hpto",(async t=>{if("available"===t.event&&this.previewParser.isPreviewServiceAd(t.ad)){const n=this.previewParser.parsePreview(t);e({...n})}}))}}class ${parsePreview({metadata:e,display:t,requestId:n}){const{creative_id:i,gid:r}=e,s={creativeId:parseInt(i,10),gid:r,hpto:JSON.parse(t[0]&&t[0].text||"")},a=s.hpto||s;let o=null;const l=a.html&&-1!==a.html.search(/id="native-elements"/),c=!a.html&&"html"===a["banner-mode"];if(l?o=this.handleNativeEl(a):c&&(o=this.renameImageBannerField(a)),o=o||a,o.bannerMode=o["banner-mode"],!o.bannerMode)throw new TypeError("hpto data looks invalid");const u=this.createInteractiveIframe(o.html);return{...o,adPlaybackId:n,loaderFrame:u}}isPreviewServiceAd({metadata:e}){return!!e&&"true"===e.is_preview}getKeyByValue(e,t){return Object.keys(t).find((n=>t[n]===e))||""}renameImageBannerField(e){return delete e[this.getKeyByValue("html",e)],Object.assign({},e,{"banner-mode":"image"})}handleNativeEl(e){const t=document.implementation.createHTMLDocument("");t.documentElement.innerHTML=e.html;let n="";const i=t.getElementById("native-elements"),r=this.getKeyByValue("html",e);return["data-is-spotlight","data-is-exclusive","data-is-sponsored"].some((e=>(i&&i.hasAttribute(e)&&(n=e),n))),n=n.split("-").pop()||"",delete e[r],Object.assign({},e,{version:2,badge:n,"banner-mode":"native",blurb:i&&i.getAttribute("data-blurb"),"target-uri":i&&i.getAttribute("data-uri"),playBtnUri:i&&i.getAttribute("data-track-override")})}createInteractiveIframe(e){const t=encodeURIComponent(e),n=document.createElement("iframe");return n.className="ad-iframe",n.src=`data:text/html;charset=utf-8,${t}`,n.srcdoc=e,n.scrolling="no",n.marginWidth="0",n.marginHeight="0",n}}const Z="hpto";class X{constructor(e,t,n,i){this.adsCoreConnector=e,this.webApi=t,this.esperantoPreviewParser=n,this.eventSender=i}async getSlot(e){const t=await this.adsCoreConnector.fetchAdForSlot(e),n=t.display.find((e=>"text/html"===e.mimeType));if(!n)throw Error("No template");return{id:t.adId,adPlaybackId:t.requestId,media:n.text,"mime-type":n.mimeType,height:n.height,width:n.width,bitrate:n.bitrate,duration:n.duration}}async logEvent(e){try{await this.eventSender.send(e)}catch(e){}}subscribeToPreview(e){return this.adsCoreConnector.addNewSlot(Z),this.adsCoreConnector.enableSlot(Z),this.adsCoreConnector.subscribeToSlot(Z,(t=>{const n=t.adSlotEvent;if(n?.eventType===f.CY.AVAILABLE&&this.esperantoPreviewParser.isPreviewServiceAd(n.ad)){const t=this.esperantoPreviewParser.parsePreview(n.ad);e({...t})}}))}async getAlgoPlaylistInfo(e){if(!(e in q))return;const t=q[e],{sponsorships:n}=await(0,Y.$L)(),i=n.find((e=>{const n=e.spotifyUri.split(":").at(-1);return(0,K.Y8)(n)?.includes(t)}));if(i)return{uri:i.spotifyUri,playBtnUri:i.spotifyUri,uriType:K.NQ.PLAYLIST};this.eventSender.send((0,W.G)({error_message:"HPTO Sponsored Playlist from GAM not in sponsorships list.",request_type:"hpto"}))}getAlbum(e){return this.webApi.getAlbum(e)}getArtist(e){return this.webApi.getArtist(e)}getEpisode(e){return this.webApi.getEpisode(e)}getPlaylist(e){return this.webApi.getPlaylist(e)}getShow(e){return this.webApi.getShow(e)}getTrack(e){return this.webApi.getTrack(e)}}class J{parsePreview(e){const t=e.ad,{creative_id:n,id:i,display:r}=t,s={creativeId:parseInt(n,10),gid:i,hpto:JSON.parse(r[0]&&r[0].media||"")},a=s.hpto||s;let o=null;const l=a.html&&-1!==a.html.search(/id="native-elements"/),c=!a.html&&"html"===a["banner-mode"];if(l?o=this.handleNativeEl(a):c&&(o=this.renameImageBannerField(a)),o=o||a,o.bannerMode=o["banner-mode"],!o.bannerMode)throw new TypeError("hpto data looks invalid");const u=this.createInteractiveIframe(o.html);return{...o,adPlaybackId:t.ad_playback_id,loaderFrame:u}}isPreviewServiceAd(e){return e.metadata&&"true"===e.metadata.is_preview}getKeyByValue(e,t){return Object.keys(t).find((n=>t[n]===e))||""}renameImageBannerField(e){return delete e[this.getKeyByValue("html",e)],Object.assign({},e,{"banner-mode":"image"})}handleNativeEl(e){const t=document.implementation.createHTMLDocument("");t.documentElement.innerHTML=e.html;let n="";const i=t.getElementById("native-elements"),r=this.getKeyByValue("html",e);return["data-is-spotlight","data-is-exclusive","data-is-sponsored"].some((e=>(i&&i.hasAttribute(e)&&(n=e),n))),n=n.split("-").pop()||"",delete e[r],Object.assign({},e,{version:2,badge:n,"banner-mode":"native",blurb:i&&i.getAttribute("data-blurb"),"target-uri":i&&i.getAttribute("data-uri"),playBtnUri:i&&i.getAttribute("data-track-override")})}createInteractiveIframe(e){const t=encodeURIComponent(e),n=document.createElement("iframe");return n.className="ad-iframe",n.src=`data:text/html;charset=utf-8,${t}`,n.srcdoc=e,n.scrolling="no",n.marginWidth="0",n.marginHeight="0",n}}const ee="visible_unknown",te={root:null,rootMargin:"",thresholds:[],observe(){},disconnect(){},takeRecords:()=>[],unobserve(){}};class ne{constructor(e={threshold:[0,.5,1]}){this.currentState=ee,this.intersectionObserver=te,IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver(this.onObservation,e))}onObservation=e=>{const t=e[0].intersectionRatio;let n=ee;1===t?n="visible_100":t>=.5?n="visible_50":t<.5&&(n="visible_0"),n!==this.currentState&&(this.currentState=n,this.callback&&this.callback(this.currentState))};observe(e,t){this.callback=t,this.intersectionObserver.observe(e)}disconnect(){this.intersectionObserver.disconnect()}}const ie="hpto";class re{timeOfLastViewUpdate=0;refreshCallback=()=>{};visibilityState="";constructor(e,t,n,i,r){this.hptoApi=e,this.focusState=t,this.visibilityObserver=n,this.offlineObserver=i,this.appStartupId=r,this.trackingPixelDiv=document.createElement("div"),this.trackingPixelDiv.setAttribute("id","ad-tracking-pixel"),this.trackingPixelDiv.style.display="none",document.body.appendChild(this.trackingPixelDiv),this.appStartupId=r}subscribeToPreview(e){return this.hptoApi.subscribeToPreview((async t=>{const n=await this.mapData(t);e(n)}))}onRefresh(e){this.refreshCallback=e}fetchTemplate(){return this.hptoApi.getSlot(ie).catch((e=>{throw this.logAdEventError("template fetch from ARS failed"),e}))}fetchCreative(e){return new Promise(((t,n)=>{window.addEventListener("message",(function i(r){if("object"==typeof r.data&&"string"==typeof r.data.type){const s=r.data.type.split(":");if("ads"!==s[0]||"hpto"!==s[1])return;if("error"===s[2]||"no-ad"===s[2])n(s[2]);else if("init"===s[2]){const n={...r.data.data.data,loaderFrame:undefined,adPlaybackId:e.adPlaybackId};t(n)}else n("unsupported hpto message");window.removeEventListener("message",i)}}))})).then(this.mapData).catch((e=>{throw"no-ad"!==e&&(this.logErrorEvent(`fetch creative error: ${e}`),this.logAdEventError("creative fetch from GAM failed")),e}))}logEvent(e,t=""){this.log(e,t),"event_clicked"===e&&this.trackPixelClicked()}logErrorEvent(e){const t=(0,W.G)({request_type:ie,error_message:e});this.hptoApi.logEvent(t)}createTrackingPixelImage=(e,t)=>{const n=document.createElement("img");return n.src=e,n.alt="",n.style.display="none",n.style.height="1px",n.style.width="1px",n.classList.add("pixel",t),n};trackPixelClicked(){if(!this.currentAd)return;const e=this.currentAd.click,t=this.handleTrackingUrl(e);if(t){this.trackingPixelDiv.innerHTML="";const e=this.createTrackingPixelImage(t,"event_clicked");this.trackingPixelDiv.appendChild(e)}}trackPixelViewed(){if(!this.currentAd)return;this.trackingPixelDiv.innerHTML="";const e=this.currentAd["tracking-urls"],t=this.currentAd["tracking-url"],{creativeId:n,lineItemId:i,advertiserId:r,campaignId:s,adEventTrackerViewUrls:a}=this.currentAd;this.createTrackingList({trackingUrls:e,trackingUrl:t,adEventTrackerViewUrls:a,adTrackingInfo:{creativeId:n,lineItemId:i,advertiserId:r,campaignId:s}}).map((e=>this.createTrackingPixelImage(e,"view-tracking"))).forEach((e=>{this.trackingPixelDiv.appendChild(e)}))}logViewed(){this.timeOfLastViewUpdate=Date.now(),this.log("event_viewed"),this.trackPixelViewed()}maybeTriggerRefresh(){if(!this.offlineObserver.getOnlineStatus())return;Date.now()-this.timeOfLastViewUpdate>=18e5&&this.focusState.hasFocus()&&("visible_50"===this.visibilityState||"visible_100"===this.visibilityState)&&this.refreshCallback?.()}viewRendered(e){this.timeOfLastViewUpdate=Date.now(),this.focusState.removeAllFocusListeners(),this.focusState.addFocusListener(this),this.visibilityObserver.observe(e,this.onVisibilityChanged)}viewDestroyed(){this.focusState.removeAllFocusListeners(),this.visibilityObserver.disconnect(),this.log("event_unload"),this.currentAd=null}onFocusChanged(e){e?(this.maybeTriggerRefresh(),this.log("event_foregrounded")):this.log("event_backgrounded")}onVisibilityChanged=e=>{const t=this.visibilityState;this.visibilityState=e;"visible_0"===t&&("visible_50"===e||"visible_100"===e)&&this.maybeTriggerRefresh(),this.log(`event_${e}`)};log=(e,t="")=>{if(this.currentAd){const n=(0,H.A)({slot:ie,app_startup_id:this.appStartupId,event:e,lineitem_id:String(this.currentAd.lineItemId),creative_id:String(this.currentAd.creativeId),ad_id:String(this.currentAd.creativeId),format:`hpto ${this.currentAd.bannerMode}`,request_id:String(this.currentAd.adPlaybackId),event_source:t?`client-${t}`:"client"});this.hptoApi.logEvent(n)}};logAdEventError=e=>{const t=(0,H.A)({slot:ie,app_startup_id:this.appStartupId,event:"event_errored",event_reason:e,event_source:"client"});this.hptoApi.logEvent(t)};mapData=async e=>{this.currentAd={...e};let t=e["target-uri"],n=(0,K.o_)(t)?.type,i={episodeShowUri:""},r=e.playBtnUri||t;if("native"===e.bannerMode){const e=await this.hptoApi.getAlgoPlaylistInfo(t);e&&(t=e.uri,r=e.playBtnUri,n=e.uriType),i=await this.getNativeData(t,n)}const s=e.blurb,a=(e.badge||"").toLowerCase(),o=e["background-color"],l=o&&"#"===o[0]?o:`#${o}`,c=e["background-image"],u=(0,p.H)(e["background-url"]),d=u&&u.replace(/&amp;/g,"&"),m="sponsored"===e.nativeHptoType;return{...e,...i,isSponsored:m,uri:i.episodeShowUri||t,uriType:n,badgeType:a,playBtnUri:r,backgroundColor:l,backgroundUrl:u,backgroundImage:c,clickThroughUrl:d,description:s}};maybeModifyUrl(e,t){let n=e;const i=["adeventtracker.spotify.com","adeventtrackermonitoring.spotify.com"];try{const e=new URL(n);if(i.includes(e.host)){const i=e.searchParams;Object.keys(t).forEach((e=>{const n=t[e];i.append(e,n)})),n=e.toString()}}catch(t){const n=(0,W.G)({error_type:"malformedAdEventTrackerUrl",lineitem_id:this.currentAd?.lineItemId,error_message:`cannot parse ad event tracker url: ${e}`});this.hptoApi.logEvent(n)}return n}createTrackingList({trackingUrls:e,trackingUrl:t,adEventTrackerViewUrls:n=[],adTrackingInfo:i={}}){let r=n.map((e=>this.maybeModifyUrl(e,i)));if(e){const t=e.map(this.handleTrackingUrl).filter(Boolean);r=r.concat(t)}else t&&r.concat(this.handleTrackingUrl(t));return r}handleTrackingUrl=e=>{if(!e)return"";try{return decodeURIComponent(e.replace(/&amp;/g,"&"))}catch(t){if(t instanceof URIError&&"URI malformed"===t.message){const t=(0,W.G)({error_type:"malformedTrackingUrl",lineitem_id:this.currentAd?.lineItemId,error_message:`url is malformed: ${e}`});return this.hptoApi.logEvent(t),""}return""}};getNativeData(e,t){if(!e||!t)return Promise.reject(`error when getting native data: uri: ${e} uriType: ${t}`);const n=e.split(":").pop();if(!n)return Promise.reject("error when getting native data: id not found");switch(t){case K.NQ.SHOW:return this.hptoApi.getShow(n);case K.NQ.TRACK:return this.hptoApi.getTrack(n);case K.NQ.ALBUM:return this.hptoApi.getAlbum(n);case K.NQ.PLAYLIST:case K.NQ.PLAYLIST_V2:return this.hptoApi.getPlaylist(n);case K.NQ.EPISODE:return this.hptoApi.getEpisode(n);default:return Promise.reject(`error when getting native data ${e} is not valid`)}}}class se{constructor({initialStatus:e,onOnlineStatusChange:t}){this.isOnline=e||!0,window.addEventListener("online",(()=>{this.isOnline=!0,t?.(!0)})),window.addEventListener("offline",(()=>{this.isOnline=!1,t?.(!1)})),window.addEventListener("visibilitychange",(()=>{if(document.hidden)return;const e=navigator.onLine;this.isOnline=e,t?.(e)}))}getOnlineStatus(){return this.isOnline}}function ae({webHptoApi:e},t,n,i,r){return new re(r?new X(i,e,new $,t):new Q(m.Q,e,new J,t),new w,new ne,new se({}),n)}const oe={displayTimeIntervalMs:2e4,timeInViewThresholdMs:15e3};class le{constructor(e){this.cosmosConnector=e}async addSlot(e){return await this.cosmosConnector.addNewSlot(e,"banner"),await this.cosmosConnector.enableSlot(e)}async getConfig(){try{const e=await this.cosmosConnector.getAdSlotConfig("leaderboard");return this.normalizeConfig(e)}catch(e){if(!(e instanceof Error))throw e;if("DUPLICATE_REQUEST_ERROR"!==e.name)throw e;return oe}}normalizeConfig(e){if(e){const t={displayTimeIntervalMs:2e4,timeInViewThresholdMs:15e3};return Object.prototype.hasOwnProperty.call(e,"display_time_interval")&&(t.displayTimeIntervalMs=1e3*e.display_time_interval),t}return oe}async getSlot(e){try{const t=await this.cosmosConnector.fetchAdForSlot(e),n=t.display.find((e=>"text/html"===e.mime_type));return{html:n?n.media:t.html,adDisplay:n}}catch(e){throw Error(`Slot Request failed ${e}`)}}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}}var ce=n(3074),ue=n.n(ce),de=n(26027);const me="leaderboard";class pe{fetching=!1;enabled=!1;currentAd={creativeId:null,lineitemId:null};constructor(e={},t,n,i,r,s,a){this.appStartupId=a,this.frameSrc=e.frameSrc,this.focusState=i,this.leaderboardApi=t,this.refreshDecisioner=n,this.refreshDecisioner.setRefreshDelegate(this),this.leaderboardWrapper=null,this.eventSender=r,this.history=s,this.appStartupId=a,this.offlineObserver=new se({onOnlineStatusChange:e=>this.refreshDecisioner.onlineStateChanged(e)})}enableLeaderboard(){this.enabled=!0,this.enableLeaderboardMessageHandler(),this.refreshDecisioner.onLeaderboardEnabled(),this.subscription=this.leaderboardApi.subscribeToSlotType(me,this.onAdMessage)}setLeaderboardElement(e){this.domTarget=e}onNavigationChanged(){this.refreshDecisioner.onNavigationChanged()}enableLeaderboardMessageHandler(){window.removeEventListener("message",this.handleLeaderboardMessage),window.addEventListener("message",this.handleLeaderboardMessage)}disableLeaderboardMessageHandler(){window.removeEventListener("message",this.handleLeaderboardMessage)}handleLeaderboardMessage=e=>{switch(this.currentAd.lineitemId=String(e.data?.data?.lineItemId||""),this.currentAd.creativeId=String(e.data?.data?.creativeId||""),e.data&&e.data.type){case"ads-leaderboard-rendered":""!==this.currentAd.lineitemId&&null!==this.currentAd.creativeId&&this.logLeaderboardEvent("event_viewed");break;case"ads-leaderboard-failed":this.logLeaderboardEvent("event_errored"),this.handleBadLeaderboard()}};logLeaderboardEvent(e){this.eventSender.send((0,de.y)({ad_playback_id:this.adPlaybackId,view_uri:this.history.location.pathname,event:e}));const t=(0,H.A)({event:e,slot:"leaderboard",format:"banner",app_startup_id:this.appStartupId,request_id:this.adPlaybackId,lineitem_id:this.currentAd.lineitemId,creative_id:this.currentAd.creativeId,ad_id:this.currentAd.creativeId,in_focus:document.hasFocus?document.hasFocus():null,event_source:"client"});this.eventSender.send(t)}async requestConfig(){return this.cachedConfig?Promise.resolve(this.cachedConfig):(this.cachedConfig=await this.leaderboardApi.getConfig(),this.cachedConfig)}requestSlot(e){return this.leaderboardApi.getSlot(e).then((e=>(this.adPlaybackId=ue().create().hex,e))).catch((e=>{throw new Error(`LeaderboardManager: cant get slot. ${e}`)}))}async fetchAndDisplayLeaderboard(){if(!this.frameSrc)throw new Error("LeaderboardManager: frameSrc must be specified in options. Point it to a blank page on the same domain.");this.domTarget&&(this.fetching||this.enabled&&(this.fetching=!0,this.requestSlot(me).then((e=>{const t=e.html,n=e.adDisplay&&e.adDisplay.width?e.adDisplay.width:"728",i=e.adDisplay&&e.adDisplay.height?e.adDisplay.height:"90";return this.fetching=!1,this.renderLeaderboard(t,n,i)})).catch((e=>{throw this.fetching=!1,Error(`Slot Request and display failed: ${e}`)}))))}onAdMessage=e=>{if(this.isPreviewServiceAd(e.ad.metadata)){if(!e.ad.display||e.ad.display.length<1)throw new Error(`Unknown core event from ${me} slot: ${e.event}`);const t=e.ad.display[0],n=t.media,i=t&&t.width?t.width:"728",r=t&&t.height?t.height:"90";this.renderLeaderboard(n,i,r)}};isPreviewServiceAd(e){return e&&"true"===e.is_preview}renderLeaderboard(e,t,n){const i=document.createElement("iframe");i.addEventListener("load",this.adFrameLoaded.bind(this,i)),i.setAttribute("sandbox",["allow-top-navigation-by-user-activation","allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts",/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?"":"allow-presentation"].join(" ")),i.setAttribute("width",t),i.setAttribute("height",n),i.setAttribute("id","leaderboard-ad-element"),i.setAttribute("src",this.frameSrc),i.setAttribute("srcdoc",e),i.setAttribute("tab-index","-1"),this.leaderboardWrapper=document.createElement("div"),this.leaderboardWrapper.setAttribute("aria-hidden","true"),this.leaderboardWrapper.appendChild(i),this.domTarget.innerHTML="",this.domTarget.appendChild(this.leaderboardWrapper)}adFrameLoaded(e,t){const n=t.composedPath&&t.composedPath()&&t.composedPath()[0].contentWindow||e.contentWindow;this.refreshDecisioner.onViewLoaded(),this.focusState.addFocusListener(this);const i=()=>{this.logLeaderboardEvent("event_unload"),this.refreshDecisioner.onViewUnloaded(),this.focusState.removeFocusListener(this),n.removeEventListener("unload",i)};n.addEventListener("unload",i)}disableLeaderboard(){this.enabled=!1,this.disableLeaderboardMessageHandler(),this.refreshDecisioner.onLeaderboardDisabled(),this.focusState.removeFocusListener(this),this.subscription&&this.subscription.cancel(),this.leaderboardWrapper&&this.leaderboardWrapper.firstChild&&this.leaderboardWrapper.removeChild(this.leaderboardWrapper.firstChild),this.leaderboardWrapper&&this.leaderboardWrapper.parentNode&&this.leaderboardWrapper.parentNode.removeChild(this.leaderboardWrapper),this.leaderboardWrapper=null}handleBadLeaderboard(){this.currentAd.creativeId=null,this.currentAd.lineitemId=null,this.domTarget&&(this.domTarget.innerHTML="")}onFocusChanged(e){this.logLeaderboardEvent("event_"+(e?"foregrounded":"backgrounded"))}refreshLeaderboard(){this.fetchAndDisplayLeaderboard()}}const he={displayTimeIntervalMs:2e4,timeInViewThresholdMs:15e3};class ge{constructor(e){this.adsCoreConnector=e}subscribeToSlotType(e,t){return this.adsCoreConnector.subscribeToSlot(e,(e=>{const n=e.adSlotEvent;n&&t(n)}))}async addSlot(e){return await this.adsCoreConnector.addNewSlot(e,"banner"),await this.adsCoreConnector.enableSlot(e)}async getConfig(){try{const e=await this.adsCoreConnector.getSlotSettings(me);return this.normalizeConfig(e)}catch(e){if(!(e instanceof Error))throw e;if("DUPLICATE_REQUEST_ERROR"!==e.name)throw e;return he}}async getSlot(e){return(e=>{const t=e.display?.find((e=>"text/html"===e.mimeType));if(!t||!t.text)throw Error("No template");return{html:t.text,adDisplay:{width:t.width.toString(),height:t.height.toString()}}})(await this.adsCoreConnector.fetchAdForSlot(e))}normalizeConfig(e){const t=e?.slotSettings[0].displayTimeInterval;return{...he,...t?{displayTimeIntervalMs:1e3*Number(t)}:null}}}class fe{viewTimer=0;lastOnlineStatus=!0;constructor(e){this.focusState=e}setRefreshDelegate(e){this.delegate=e}async onViewLoaded(){const e=await this.delegate.requestConfig();this.viewTimer=e.displayTimeIntervalMs,this.timeOfLastViewUpdate=Date.now(),this.focusState.addFocusListener(this),this.startRefreshTimer()}onViewUnloaded(){this.focusState.removeFocusListener(this),clearTimeout(this.refreshTimeout)}onLeaderboardEnabled(){this.triggerRefresh()}onLeaderboardDisabled(){this.onViewUnloaded()}onNavigationChanged(){return this.updateViewTimer()}onlineStateChanged(e){e!==this.lastOnlineStatus&&(this.lastOnlineStatus=e,e&&this.triggerRefresh())}onFocusChanged(e){e?(this.timeOfLastViewUpdate=Date.now(),this.notifyRefreshIfPossible(),this.startRefreshTimer()):(this.updateViewTimer(),clearTimeout(this.refreshTimeout))}async updateViewTimer(){null===this.timeOfLastViewUpdate&&(this.timeOfLastViewUpdate=Date.now());const e=Date.now()-this.timeOfLastViewUpdate;return this.viewTimer=this.viewTimer-e,this.timeOfLastViewUpdate=Date.now(),this.notifyRefreshIfPossible()}isPastViewThreshold(){return this.delegate.requestConfig().then((e=>e.displayTimeIntervalMs-this.viewTimer>e.timeInViewThresholdMs))}async notifyRefreshIfPossible(){const e=await this.isPastViewThreshold();return e&&this.triggerRefresh(),e}startRefreshTimer(){clearTimeout(this.refreshTimeout),this.refreshTimeout=setTimeout(this.triggerRefresh.bind(this),this.viewTimer)}triggerRefresh(){document.hasFocus()&&this.delegate&&this.delegate.refreshLeaderboard()}}function be(e,t,n,i,r){const s=new w,a=r?new ge(i):new le(m.Q);return new pe({frameSrc:"/blank.html"},a,new fe(s),s,e,t,n)}var ve=n(88724),ye=n(21361);const _e=()=>ye.n.getInstance().build().withHost(ve.ip).withPath("/sponsored").withEndpointIdentifier("/sponsored").send();class Ee{constructor(e,t){this.eventSender=e,this.adsCoreConnector=t}async getSponsoredUris(){return(await _e()).body.sponsorships}async getSponsorshipAd(e){try{return(await(0,Y.x0)(e)).body}catch(e){throw this.eventSender.send((0,W.G)({request_type:"sponsored",error_message:JSON.stringify({err:e})})),e}}async subscribeToPreview(e){const t="sponsored-playlist";try{this.adsCoreConnector.addNewSlot(t)}catch(e){this.eventSender.send((0,W.G)({request_type:"sponsored playlist",error_message:JSON.stringify({error:e})}))}return this.adsCoreConnector.subscribeToSlot(t,(n=>{const i=new DOMParser,r=n.adSlotEvent?.ad?.display[0]?.text;if(r){const n=i.parseFromString(r,"text/html"),s=JSON.parse(n.querySelector(`[data-template="${t}"]`).innerText);e({...s.sponsoredPlaylist,logoUrl:s.sponsoredPlaylist.logo})}}))}async logEvent({event:e,ad_format:t,lineitem_id:n,creative_id:i,ad_id:r}){this.eventSender.send((0,H.A)({event:e,format:t,lineitem_id:n,creative_id:i,ad_id:r,event_source:"client"}))}}class xe{constructor(e){this.eventSender=e}async getSponsoredUris(){return(await _e()).body.sponsorships}async getSponsorshipAd(e){try{return(await Y.x0(e)).body}catch(e){throw this.eventSender.send((0,W.G)({request_type:"sponsored",error_message:JSON.stringify({err:e})})),e}}async subscribeToPreview(e){const t="sponsored-playlist";return await m.Q.addNewSlot(t).catch((e=>{this.eventSender.send((0,W.G)({request_type:"sponsored playlist",error_message:JSON.stringify({error:e})}))})),m.Q.subscribeToSlot(`sp://ads/v1/slots/${t}`,(t=>{const n=(new DOMParser).parseFromString(t.ad.display[0].media,"text/html"),i=JSON.parse(n.querySelector('[data-template="sponsored-playlist"]').innerText);e({...i.sponsoredPlaylist,logoUrl:i.sponsoredPlaylist.logo})}))}async logEvent({event:e,ad_format:t,lineitem_id:n,creative_id:i,ad_id:r}){this.eventSender.send((0,H.A)({event:e,format:t,lineitem_id:n,creative_id:i,ad_id:r,event_source:"client"}))}}class Ce{constructor(e){this.eventSender=e}async getSponsoredUris(){return(await _e()).body.sponsorships}async getSponsorshipAd(e){return(await Y.x0(e)).body}logEvent(e){return this.eventSender.send((0,H.A)({...e,format:e.ad_format}))}async subscribeToPreview(){return{cancel:()=>{}}}}class Se{enabled=!1;constructor(e){this.sponsoredPlaylistApi=e}async enable(e){this.enabled=!0,this.subscription=await this.sponsoredPlaylistApi.subscribeToPreview(e)}disable(){this.enabled=!1,this.subscription&&(this.subscription.cancel(),this.subscription=void 0)}async requestSponsoredPlaylists(){if(!this.enabled)throw new Error("You have to enable the manager before calling requestSponsoredPlaylists");return this.sponsoredPlaylistApi.getSponsoredUris()}async requestSponsoredPlaylistAd(e){if(!this.enabled)throw new Error("You have to enable the manager before calling requestSponsoredPlaylistAd");return this.sponsoredPlaylistApi.getSponsorshipAd(e)}async logEvent(e){if(!this.enabled)throw new Error("You have to enable the manager before calling logEvent");return this.sponsoredPlaylistApi.logEvent(e)}}function Ae(e,t,n,i){let r;return r=e?i?new Ee(t,n):new xe(t):new Ce(t),new Se(r)}class we{constructor(e){this.cosmosConnector=e}patchTargeting(e,t){return this.cosmosConnector.patchTargeting(e,t)}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}postEvent(e,t,n){return this.cosmosConnector.postEvent(e,t,n)}}class Ie{constructor(e,t){this.vastEventsTracker=e,this.vtoTracker=t}onStarted(){this.vtoTracker.onStarted(),this.vastEventsTracker.onStarted()}onResumed(){this.vastEventsTracker.onResumed()}onPaused(){this.vastEventsTracker.onPaused()}onVolumeChanged(e){this.vtoTracker.onVolumeChanged(e),this.vastEventsTracker.onVolumeChanged(e)}onPlaybackEnded(e){this.vtoTracker.onPlaybackEnded(e),this.vastEventsTracker.onPlaybackEnded(e)}onDurationChanged(e){this.vtoTracker.onDurationChanged(e),this.vastEventsTracker.onDurationChanged(e)}onPlaybackCreated(e){this.vtoTracker.onPlaybackCreated(e),this.vastEventsTracker.onPlaybackCreated(e)}onReady(){this.vtoTracker.onReady()}onSeeking(){}onSubtitleChanged(){}onVideoFormatChanged(){}}var Te=n(8036);let Ne=function(e){return e.STARTED="started",e.RESUMED="resumed",e.PAUSED="paused",e.MUTED="muted",e.UNMUTED="unmuted",e.FIRST_QUARTILE="first_quartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="third_quartile",e.ENDED="ended",e.SKIPPED="skipped",e.ERRORED="errored",e.EVENTS="EVENTS",e.VOLUME_CHANGE="volume_change",e}({});class Re{constructor(e){this.trackingCallback=e,this.lastLadderPosition=0,this.isMuted=!1,this.isPaused=!1,this.volume=-1,this.duration=-1,this.position=-1}getVastEventLadderPosition(e){switch(e){case Ne.STARTED:return 1;case Ne.FIRST_QUARTILE:return 2;case Ne.MIDPOINT:return 3;case Ne.THIRD_QUARTILE:return 4;case Ne.SKIPPED:case Ne.ENDED:case Ne.ERRORED:return 5;default:return null}}createPayload(){return{volume:this.volume,duration:this.duration,position:this.position}}processEvent(e){const t=this.getVastEventLadderPosition(e);t?t>this.lastLadderPosition&&(this.lastLadderPosition=t,this.trackingCallback(e,this.createPayload())):this.trackingCallback(e,this.createPayload())}onStarted(){this.processEvent(Ne.STARTED)}onResumed(){this.isPaused&&(this.isPaused=!1,this.processEvent(Ne.RESUMED))}onPaused(){this.isPaused=!0,this.processEvent(Ne.PAUSED)}onVolumeChanged({volume:e}){this.volume=e,this.processEvent(Ne.VOLUME_CHANGE),e>0&&this.isMuted?(this.isMuted=!1,this.processEvent(Ne.UNMUTED)):0!==e||this.isMuted||(this.isMuted=!0,this.processEvent(Ne.MUTED))}onPlaybackEnded({reason:e}){switch(e){case Te.mT.REQUESTED:this.processEvent(Ne.SKIPPED);break;case Te.mT.FATAL_ERROR:case Te.mT.NETWORK_ERROR:this.processEvent(Ne.ERRORED);break;case Te.mT.PLAYED_TO_END:this.processEvent(Ne.ENDED)}}onDurationChanged({duration:e}){this.duration=e}onPlaybackCreated({initialConfiguration:e,timeObservable:t}){this.position=e.position,this.volume=e.volume,this.isMuted=0===this.volume,t.addObserverForPeriodicEvents(.4,(e=>{this.position=e})),t.addObserverForMediaPositions([.25,.5,.75],(e=>{e>=.25&&this.processEvent(Ne.FIRST_QUARTILE),e>=.5&&this.processEvent(Ne.MIDPOINT),e>=.75&&this.processEvent(Ne.THIRD_QUARTILE)}))}}class ke{constructor(e,t){this.listener=e,this.adId=t,this.firstReadyDone=!1,this.volume=-1,this.duration=-1,this.position=-1}createPayload(){return{adId:this.adId,volume:this.volume,duration:this.duration,position:this.position}}onStarted(){this.listener.onStarted(this.createPayload())}onVolumeChanged({volume:e}){this.volume=e,this.listener.onStateUpdate(this.createPayload())}onDurationChanged({duration:e}){this.duration=e,this.listener.onStateUpdate(this.createPayload())}onPlaybackCreated({initialConfiguration:e,timeObservable:t}){this.position=e.position,this.volume=e.volume,t.addObserverForPeriodicEvents(.4,(e=>{this.position=e,this.listener.onStateUpdate(this.createPayload())})),this.listener.onCreated(this.createPayload())}onPlaybackEnded({reason:e}){this.listener.onEnded(this.createPayload(),e)}onReady(){this.firstReadyDone||this.listener.onReady(),this.firstReadyDone=!0}}const Oe=e=>(t,n)=>m.Q.postEvent(e,t,{event_data:{clientReportedUserAgent:navigator.userAgent,volume:n.volume.toString(),duration:n.duration.toString()},playback_position:Math.floor(1e3*n.position)});var Pe=n(36689);function je(e,t){const n=new Pe.ei(new w,new we(m.Q),e,t);return{manager:n,factories:[(i=Oe,r=n,e=>"true"===e.metadata?.is_advertisement?new Ie(new Re(i(e.metadata.ad_id)),new ke(r,e.metadata.ad_id)):null)]};var i,r}class Le{constructor(e,t,n){this.focusState=t,this.setAdStateKey=e,this.focusState.addFocusListener(this),this.history=n,this.history.listen((e=>{this.setAdStateKey("view_uri",e.pathname)}))}onFocusChanged(e){this.setAdStateKey("focus",e?"true":"false")}}function De(e){return new Le(m.Q.setAdStateKey,new w,e)}const Ue=(e,{webHptoApi:t},n,i,r,s,a,o,c,d,m)=>()=>{const p=new l(b.adsCoreConnector);return{config:{getAdsSlotConfig:u.r},audio:g(r,p,o),vto:je(p,o),hpto:ae({webHptoApi:t},i,s,b.adsCoreConnector,a),billboard:F(b.adsCoreConnector,m),leaderboard:be(i,n,s,b.adsCoreConnector,d),sponsoredPlaylist:Ae(e,i,b.adsCoreConnector,c),home:G(i,s),inStreamApi:p,...e?{adStateReporter:De(n)}:{}}};(0,c.u)("AdManagers");var Me=n(77582),Be=n(19498);function Fe(e,t){return e.build().withHost(ve.QU).withPath(`/albums/${t}`).withEndpointIdentifier("/albums/{albumId}").send()}function He(e,t){return e.build().withHost(ve.QU).withPath(`/artists/${t}`).withoutMarket().withEndpointIdentifier("/artists/{artistId}").send()}function Ve(e,t,n={}){return e.build().withHost(ve.QU).withPath(`/artists/${t}/albums`).withQueryParameters(n).withoutMarket().withEndpointIdentifier("/artists/{artistId}/albums").send()}function ze(e,t,n={additional_types:"track"}){return e.build().withHost(ve.QU).withPath(`/playlists/${t}`).withQueryParameters(n).withEndpointIdentifier("/playlists/{playlistId}").send()}function Ge(e){return e.build().withHost(ve._1).withPath("/select-ondemand-set?format=json").withEndpointIdentifier("/select-ondemand-set").withJsonContentType().withoutMarket().send()}function We(e,t){return e.build().withHost(ve.ZJ).withMethod("GET").withPath(`/playlist/${t}/capabilities`).withEndpointIdentifier("/playlist/{id}/capabilities").withoutMarket().send()}var Ke=n(14640);function Ye(e,t){return e.build().withHost(ve.QU).withPath(`/tracks/${t}`).withEndpointIdentifier("/tracks/{trackId}").send()}var qe=n(33082),Qe=n(10551),$e=n(7452);function Ze({container:e,history:t,eventSender:n,appStartupId:l,playerAPI:c,resolver:u}){const d=u.getValue(Be.PnP),m=u.getValue(Be.mPu),p=u.getValue(Be.k7D),h=u.getValue(Be.C7K),g=u.getValue(Be.umO);return Ue(e===Me.m.Desktop,{webHptoApi:new o(ye.n.getInstance(),{Album:i,Artist:r,Playlist:s,Track:a,Show:Ke},$e.h)},t,n,(async()=>{const e=c.getState(),t=e?.item??void 0;return null!==e&&(0,qe.N)(t)?{positionMs:(0,Qe.s)(e),adId:t.id}:null}),l,d,m,p,g,h)()}},73656:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var i=n(21361),r=n(13781);function s(e,t,n,s){(0,r.N)(e),i.n.setLocale(t.locale),i.n.setMarket(t.market),i.n.setSession(t),i.n.setGlobalRequestHeaders([["App-Platform",s],["Spotify-App-Version",n]])}},871:(e,t,n)=>{"use strict";n.d(t,{_:()=>Fc,N:()=>Mc});var i=n(75978),r=n(83407),s=n(39636),a=n(43824),o=n(56186),l=n(67899),c=n(21051),u=n(71266),d=n(8297),m=n(70688),p=n(42555),h=n(15945),g=n(14056),f=n(59081),b=n(19760),v=n(22168),y=n(21351);class _{cleanActions(){}triggerActions(){}storeAction(){}}class E{constructor(e){this._cosmos=e}async copy(e){await this._cosmos.put("sp://desktop/v1/clipboard",e)}async paste(){const e=await this._cosmos.get("sp://desktop/v1/clipboard");return e?.data}}var x=n(15170),C=n(7829);const S={artist:x.XU.FOLLOWED_ARTISTS,artistban:x.XU.BANNED_ARTISTS,ban:x.XU.BAN,collection:x.XU.COLLECTION,enhanced:x.XU.ENHANCED,ignoreinrecs:x.XU.IGNOREINRECS,listenlater:x.XU.LISTENLATER,show:x.XU.SHOW,ylpin:x.XU.PINNED_YOUR_LIBRARY,prerelease:x.XU.PRERELEASE};class A{events=new C.r0;constructor(e){this._service=e}getEvents(){return this.events}async add(e,t){await this._service.add(x.XI.fromPartial({set:S[e],items:t})),this.events.emit(C.ar.ADDED,{set:e,uris:t,source:"client"})}async remove(e,t){await this._service.remove(x.XI.fromPartial({set:S[e],items:t})),this.events.emit(C.ar.REMOVED,{set:e,uris:t,source:"client"})}async contains(e,t){const n=await this._service.contains(x.XI.fromPartial({set:S[e],items:t}));return n.contains?n.contains.found:new Array(t.length).fill(!1)}subscribeContains(e,t,n){return this._service.streamContains(x.XI.fromPartial({set:S[e],items:t}),(({contains:e})=>{n(e?e.found:new Array(t.length).fill(!1))})).cancel}}var w=n(5172),I=n(82536);class T extends I.s{_numListeners=0;_subscriptions=[];constructor(e,t){super(),this._cosmos=e,this._endpoints=t,this.onAddListener("message",this.onListenerAdded.bind(this)),this.onRemoveListener("message",this.onListenerRemoved.bind(this))}onListenerAdded(){if(++this._numListeners,0===this._subscriptions.length)for(const e of this._endpoints){const t=this._cosmos.sub(e,(e=>{this.emit("message",e)}),(()=>{}));this._subscriptions.push(t)}}onListenerRemoved(){0==--this._numListeners&&this._subscriptions.length>0&&(this._subscriptions.forEach((e=>e.cancel())),this._subscriptions=[])}}class N{constructor(e){this._cosmos=e}async enableMenuItem(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"update_menu_state",[e]:!0})}async disableMenuItem(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"update_menu_state",[e]:!1})}async setTitlebarHeight(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"update_titlebar",height:e})}async notifyUsableStateReached(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"loaded_initial_state",name:e})}async notifyReadyStateReached(){await this._cosmos.post("sp://messages/v1/container/control",{type:"ready"})}async notifyViewLoaded(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"view_loaded",name:e,innerWidth:window.innerWidth,innerHeight:window.innerHeight})}getEvents(){return function(e){return new T(e,["sp://messages/v1/container/control","sp://desktop/v1/navigation"])}(this._cosmos)}}var R=n(81375),k=n(9908);const O=2**31-1,P=e=>BigInt(Math.round(e/k.Zs*O));class j extends R.W{constructor(e,t){super(t),this.prefs=e}subscribeToEnabledState(e){return this.prefs.sub({key:"audio.equalizer_v2"},(t=>{const n=!!t.entries["audio.equalizer_v2"].bool;e(n)})).cancel}setEnabledState(e){this.prefs.set({entries:{"audio.equalizer_v2":{bool:e}}})}async setFilterGain(e,t){await this.prefs.set({entries:{[e]:{number:P(t)}}}),this.filters[this.filters.findIndex((t=>t.key===e))].gain=t}async getFilters(){const e=await Promise.all(this.filters.map((e=>this.prefs.get({key:e.key}))));for(let t=0;t<this.filters.length;t++){const n=e[t],i=this.filters[t],r=n.entries[i.key].number;r&&(this.filters[t].gain=Number(r)/O*k.Zs)}return this.filters}isSupported(){return!0}}var L=n(64936);const D="sp://facebook/v1/connection";class U extends L.XO{_numListeners=0;_subscription=null;constructor(e){super(),this._cosmos=e,this.onAddListener(L.tv.CONNECTION_STATE_CHANGE,(()=>{this._numListeners++,null===this._subscription&&(this._subscription=this._cosmos.sub(D,(e=>{this.emit(L.tv.CONNECTION_STATE_CHANGE,e)})))})),this.onRemoveListener(L.tv.CONNECTION_STATE_CHANGE,(()=>{this._numListeners--,null!==this._subscription&&0===this._numListeners&&(this._subscription.cancel(),this._subscription=null)}))}connect(e){return this._cosmos.put(D,e)}disconnect(){return this._cosmos.del(D)}}var M=n(32618),B=n(6024),F=n(73656),H=n(31237);const V=(e,t)=>{const n=e.event_sender_context_information;return[(0,H.QI)({version_code:n.client_version_int,version_string:n.client_version_string}),(0,H.ks)(t),(0,H.xB)(n.installation_id),(0,H.es)({device_id:n.device_id,device_manufacturer:n.device_manufacturer,device_model:n.device_model,os_version:n.os_version,platform_type:n.platform_type})]},z=(e,t,{clientId:n,ownerProvider:i,storagePrefix:r,useInMemoryStorage:s,useOptimizedESS2NA:a})=>(0,H.kE)({transport:t,suppressPersist:false,context:V(e,n),storage:s?{adapter:new H.ty,flushStrategy:{kind:H.aN.IMMEDIATE}}:void 0,storagePrefix:r,ownerProvider:i,useOptimizedESS2NA:a});var G=n(98930);const W=(0,G.h)();async function K(){try{const e=await W.get("sp://remote-config-overrides/v1/values");return d.Vk.fromJSON(e["desktop-ui"]||{})}catch(e){return console.warn(e),d.Vk.builder().build()}}const Y=/Spotify\/(?<version>.+)\s/;var q=n(55154);const Q={"Master Build":"(master)","Release Build":"(release)","PR Build":"(pull request)","Local Build":"(local development)"};class ${constructor(e){this._cosmos=e}async getVersionInfo(){const e=await this._cosmos.get("sp://desktop/v1/version"),t=Q[e.buildType]||"Spotify (unknown)";return{containerVersion:e.version,containerBuildType:t,containerPlatform:e.platform,uiVersion:"xpui_2024-05-03_1714757530304_e66eb7b",cefVersion:e.cefVersion,cefRuntime:e.cefRuntime,buildSystem:"b"===e.buildSystemID?"Build System: Bazel":"Build System: CMake"}}subscribe(e){return this._cosmos.sub("sp://desktop/v1/upgrade/status",(t=>{void 0!==t.pending?e({state:q.D.UPDATE_AVAILABLE,version:t.pending.version}):void 0!==t.downloading?e({state:q.D.UPDATE_PROCESSING,version:t.downloading.version}):void 0!==t.prepared?e({state:q.D.UPDATE_READY,version:t.prepared.version}):e({state:q.D.UPDATE_NONE,version:null})}))}async prepareUpdate(){await this._cosmos.post("sp://desktop/v1/upgrade/download")}async applyUpdate(){await this._cosmos.post("sp://desktop/v1/restart")}}var Z=n(99028),X=n(31394),J=n(98198),ee=n(83856),te=n(93314),ne=n(9440);async function ie(e,t,n){const i=n.tracks.filter((e=>!!e.uri)).slice(1).map((e=>function(e){return(0,ee.U_)(e.uri)||(0,ee.Pk)(e.uri)?{type:ne.c.TRACK,uri:e.uri,name:e.metadata.title,duration:{milliseconds:parseInt(e.metadata.duration,10)},isExplicit:"true"===e.metadata.is_explicit,isLocal:"true"===e.metadata.is_local,images:[{url:e.metadata.image_url}],album:{type:ne.c.ALBUM,uri:e.metadata.album_uri??"",name:e.metadata.album_title,images:[{url:e.metadata.image_url}]},artists:[{type:ne.c.ARTIST,uri:e.metadata.artist_uri??"",name:e.metadata.artist_name??""}],mediaType:"audio",provider:null,uid:null}:(0,ee.gH)(e.uri)?{type:ne.c.EPISODE,uri:e.uri,name:e.metadata.title,duration:{milliseconds:parseInt(e.metadata.duration,10)},images:[{url:e.metadata.image_url}],show:{type:ne.c.SHOW,uri:e.metadata.album_uri??"",name:e.metadata.album_title,images:[{url:e.metadata.image_url}]},mediaType:"audio",provider:null,uid:null}:null}(e))).filter((e=>null!==e));try{await(0,te.Lc)(e,t,i)}catch(e){console.error(e)}return{items:i.map((e=>t.get(e.uri)??e))}}var re=n(1879),se=n(10780);class ae extends se.I{_subscriptions={[se.X.UPDATE]:null};constructor(e,t,n){super(),this._loader=t,this._cache=n,this._player=new X.GD(e)}startListening(){null===this._subscriptions[se.X.UPDATE]&&(this._subscriptions[se.X.UPDATE]=this._player.getPlayHistory({},(0,re.s)((async e=>{this.emit(se.X.UPDATE,await ie(this._loader,this._cache,e))}))(100,true)))}stopListening(){const e=this._subscriptions[se.X.UPDATE];null!==e&&(e.cancel(),this._subscriptions[se.X.UPDATE]=null)}}class oe{_cache=new J.GG(36e5,3e5);constructor(e,t){this._loader=t,this._player=new X.GD(e),this._events=new ae(e,this._loader,this._cache)}async getContents(){const e=await new Promise((e=>{const t=this._player.getPlayHistory({},(n=>{e(n),t.cancel()}))}));return ie(this._loader,this._cache,e)}getEvents(){return this._events}getCapabilities(){return{isSupported:!0}}}class le{constructor(e){this._scrobble=e}subscribeToPrivateSession(e){const t=this._scrobble.subIncognitoMode(m.lX.fromPartial({}),(t=>{e(t.incognitoMode)}));return()=>{t.cancel()}}async setPrivateSession(e){await this._scrobble.putIncognitoMode(m.Yz.fromPartial({incognitoMode:e}))}getCapabilities(){return{isSupported:!0}}}var ce=n(23387);class ue{constructor(e,t){this._productState=e,this._playlistAPI=t}async getReportURL(e,t){const n=(await this._productState.getValues(l.kM.fromPartial({}))).pairs["ugc-abuse-report-url"],i=new URL(n.replace("{uri}",e));return i.searchParams.append("platform","desktop"),i.searchParams.append("version","1.2.37.701.ge66eb7bc"),t&&i.searchParams.append("playback_timestamp",""+t/1e3),i.href}isURIReportable(e){return(0,ce.X)(e)}canReportPlaylist(e,t){return(0,ce.v)(this._playlistAPI,e,t)}}var de=n(50319),me=n(45640);function pe(e){return!!e?.uri}async function he(e,t){const n=await e.getDisplaySegments(function(e){return de.q4.fromPartial({episodeUris:[e],segmentsPolicy:{playback:!0},trackDecorationPolicy:{trackPolicy:{name:!0,length:!0,playable:!0},albumPolicy:{name:!0,link:!0,covers:!0},artistsPolicy:{name:!0,link:!0}},episodeDecorationPolicy:{episodePolicy:{isMusicAndTalk:!0},showDecorationPolicy:{name:!0,link:!0}}})}(t));if(!n||!n.success||!n.episodeSegments)return[];const i=n.episodeSegments.find((e=>e.episodeUri===t));return i?.segments.map((e=>{switch(e.type){case de.MI.MUSIC:return function(e){const t=e.startMs??0;if(!e.trackMetadata?.album||!e.trackMetadata.artist)return null;return{type:"MUSIC",uri:e.uri,start:t,stop:e.stopMs,duration:e.stopMs-t,track:{playable:e.trackMetadata.playable,name:e.trackMetadata.name,album:{uri:e.trackMetadata.album.link,name:e.trackMetadata.album.name,image:e.trackMetadata.album.covers?.standardLink||""},artists:e.trackMetadata.artist.map((e=>({uri:e.link,name:e.name})))}}}(e);case de.MI.TALK:return function(e){const t=e.startMs??0;if(!e.episodeMetadata?.show)return null;return{type:"TALK",uri:e.uri,start:t,stop:e.stopMs,duration:e.stopMs-t,title:e.title,subtitle:e.subtitle,show:{uri:e.episodeMetadata.show.link,name:e.episodeMetadata.show.name}}}(e);case de.MI.UPSELL:case de.MI.UNKNOWN:case de.MI.UNRECOGNIZED:return null;default:return(0,me.k)(e.type),null}})).filter(pe)||[]}class ge{constructor(e){this._client=new de.di(e)}getCapabilities(){return{isSupported:!0}}async getSegments(e,t,n){return(await he(this._client,e)).splice(t,n)}async getArtists(){return await async function(){return[]}()}}var fe=n(30253),be=n(94369),ve=n(56925),ye=n(74883),_e=n(17989);const Ee=JSON.parse('{"type":"record","name":"EndVideo","namespace":"com.spotify.Message","doc":"Information about a video played by the client","fields":[{"name":"message_name","type":"string"},{"name":"message_version","type":"int"},{"name":"sequence_number","type":["null","long"],"doc":"Sequence number of message","default":null},{"name":"sequence_id","type":["null","string"],"doc":"Sequence ID the sequence number belongs to. Combined from cache-id and device-id.","default":null},{"name":"video_session_id","type":["null","string"],"doc":"ID of the video playback session","default":null},{"name":"file_id","type":["null","bytes"],"doc":"ID of the video manifest","default":null},{"name":"playback_id","type":["null","bytes"],"doc":"ID of the unique playback","default":null},{"name":"feature_identifier","type":["null","string"],"doc":"The identifier of the feature that started playback","default":null},{"name":"feature_version","type":["null","string"],"doc":"The version of the feature that started playback","default":null},{"name":"view_uri","type":["null","string"],"doc":"The URI of the view that started playback","default":null},{"name":"reason_start","type":["null","string"],"doc":"Why the video was started","default":null},{"name":"reason_end","type":["null","string"],"doc":"Why the video ended (trackdone, trackerror, etc.)","default":null},{"name":"ms_played","type":["null","long"],"doc":"Total milliseconds played, including overlapping time ranges","default":null},{"name":"ms_nominal_played","type":["null","long"],"doc":"Milliseconds played (amount of time that media would have been outputted, if played in 1x speed, nominal time)","default":null},{"name":"ms_total_est","type":["null","long"],"doc":"Duration of the video in milliseconds (constant if VOD, variable if live)","default":null},{"name":"live","type":["null","boolean"],"doc":"Is the video being streamed live?","default":null},{"name":"ms_manifest_latency","type":["null","long"],"doc":"The time it took to fetch the manifest in milliseconds (may be 0 if cached or prefetched)","default":null},{"name":"n_seekback","type":["null","long"],"doc":"Number of times user seeked backwards","default":null},{"name":"ms_seekback","type":["null","long"],"doc":"The total amount of milliseconds jumped when performing seekbacks throughout playback.","default":null},{"name":"n_seekfwd","type":["null","long"],"doc":"Number of times user seeked forwards","default":null},{"name":"ms_seekfwd","type":["null","long"],"doc":"The total amount of milliseconds jumped when performing seek forwards throughout playback.","default":null},{"name":"ms_latency","type":["null","long"],"doc":"Time from initiating video playback to first frame ready to play in milliseconds","default":null},{"name":"ui_latency","type":["null","long"],"doc":"Time from UI interaction to first frame ready to play in milliseconds (may be -1 if not user-initiated)","default":null},{"name":"start_offset_ms","type":["null","long"],"doc":"The offset at which the video started playing in milliseconds","default":null},{"name":"ms_initial_buffering","type":["null","long"],"doc":"Time between first segment load and first frame ready to play in milliseconds","default":null},{"name":"ms_seek_rebuffering","type":["null","long"],"doc":"Total time spent re-buffering from a seek in milliseconds","default":null},{"name":"ms_stalled","type":["null","long"],"doc":"Total time where playback stalled in milliseconds (excluding initial buffering and seek rebuffering)","default":null},{"name":"max_ms_seek_rebuffering","type":["null","long"],"doc":"Maximum time spent re-buffering from a single seek","default":null},{"name":"max_ms_stalled","type":["null","long"],"doc":"Maximum time stalled from a single stall","default":null},{"name":"n_stalls","type":["null","long"],"doc":"Number of times playback was stopped because of empty buffer (excluding initial buffering and seek rebuffering)","default":null},{"name":"shuffle","type":["null","boolean"],"doc":"If playback was initiated while in shuffle mode","default":null},{"name":"max_continous","type":["null","long"],"doc":"Maximum continuous time range played in milliseconds","default":null},{"name":"union_played","type":["null","long"],"doc":"Union of all played time ranges in milliseconds (cannot exceed duration)","default":null},{"name":"play_context","type":["null","string"],"doc":"The context from which this track was played (spotify URI)","default":null},{"name":"audiocodec","type":["null","string"],"doc":"The primarily played audio codec (in RFC6381 notation)","default":null},{"name":"videocodec","type":["null","string"],"doc":"The primarily played video codec (in RFC6381 notation)","default":null},{"name":"play_track","type":["null","string"],"doc":"Spotify URI for the track (ex. spotify:episode:abc)","default":null},{"name":"incognito_mode","type":["null","boolean"],"doc":"Whether playback was initiated in incognito mode","default":null},{"name":"provider","type":["null","string"],"doc":"The playback rule that provided the video, e.g., \\"mft/inject_random_track\\" or \\"queue\\"","default":null},{"name":"referrer","type":["null","string"],"doc":"Either a remote site or a spotify app which initiated the request","default":null},{"name":"referrer_version","type":["null","string"],"doc":"The version of the referrer, where applicable","default":null},{"name":"referrer_vendor","type":["null","string"],"doc":"The vendor of the referrer, where applicable","default":null},{"name":"streaming_rule","type":["null","string"],"doc":"The streaming rule in effect for this track","default":null},{"name":"gaia_dev_id","type":["null","string"],"doc":"Remote control that started the playback. Same as \\"dev-id\\" in \\"Gaia\\" messages sent by that device. \\"none\\" if non-Gaia playback.","default":null},{"name":"start_bitrate","type":["null","long"],"doc":"Bitrate at which playback started (bits/s)","default":null},{"name":"full_screen","type":["null","long"],"doc":"Milliseconds played while video is in a modal or fullscreen state","default":null},{"name":"time_weighted_bitrate","type":["null","long"],"doc":"Average bitrate weighted by the amount of time video played at each bitrate","default":null},{"name":"prefetched_bytes","type":["null","long"],"doc":"Total number of bytes prefetched for the selected content","default":null},{"name":"prefetched_bytes_loaded","type":["null","long"],"doc":"Total number of prefetched bytes played back","default":null},{"name":"key_system","type":["null","string"],"doc":"The DRM key system","default":null},{"name":"ms_key_latency","type":["null","long"],"doc":"The time it took to fetch and install the DRM key in milliseconds.","default":null},{"name":"total_bytes","type":["null","long"],"doc":"The total segment bytes downloaded","default":null},{"name":"local_time_ms","type":["null","long"],"doc":"The local time at which playback was initiated (Unix timestamp in milliseconds)","default":null},{"name":"connection_type_start","type":["null","string"],"doc":"connection type (i.e. wifi, 3G) at the start of the stream","default":null},{"name":"connection_type_end","type":["null","string"],"doc":"connection type (i.e. wifi, 3G) at the end of the stream","default":null},{"name":"ms_played_background","type":["null","long"],"doc":"Milliseconds played in background (audio-only). Always subset of ms-played.","default":null},{"name":"page_instance_id","type":["null","string"],"doc":"ID of the page where the user triggered this video to play.","default":null},{"name":"interaction_id","type":["null","string"],"doc":"ID of the interaction that triggered this video to play.","default":null},{"name":"core_version","type":"long","doc":"The core version this message was sent from in the form of xxxxyyyyzzzzwwwwwww (major, minor, micro, tiny)","default":0},{"name":"ms_played_video","type":["null","long"],"doc":"Milliseconds played with video rendering enabled, in wall-clock time. Always a subset of ms-played.","default":null},{"name":"feature_uuid","type":["null","string"],"doc":"UUID of a feature that uniquely identifies the feature.","default":null},{"name":"media_type","type":["null","string"],"doc":"The media type of content played, e.g. video or audio","default":null},{"name":"decision_id","type":["null","string"],"doc":"Identifier for the decision to add the track to the played context. Used to identify recommendations and join with external datasets containing decision related data.","default":null},{"name":"play_context_decision_id","type":["null","string"],"doc":"Same as decision_id, but for the played context. E.g. a decision that was made to add the card for the played playlist in Home section.","default":null}],"schema_version":17}');var xe=n(84686).hp;function Ce({type:e,name:t},n){if(Array.isArray(e)){const i=n[t];if(null===i)return;n[t]={};const r=e.filter((e=>"null"!==e))[0];"object"==typeof r?(n[t]={[r.type]:i},Ce(r,n[t])):n[t][r]="bytes"===r?xe.from(i):i}else"bytes"===e&&(n[t]=xe.from(n[t]))}function Se(e,t){const n=t.message_name,i=t.message_version,r=Object.assign({},t);if(i!==e.schema_version)throw new Error(`Invalid message version: received Message with message_version ${i} but the Schema requires version ${e.schema_version}`);return{message:n,version:i,fields:e.fields.map((e=>{const t=r[e.name];return void 0===t?e.default:(Ce(e,r),t)})).slice(2)}}var Ae=n(53086);const we=(0,G.h)();const Ie={schema:Ee,create:function({name:e,schema_version:t},n){const i={message_name:e,version:t};we.post("",i).then((e=>{e.sequence_number?e.sequence_id?n(null,e.sequence_number,e.sequence_id):n(new Error("pendingLog: sequence_id not present"),null):n(new Error("pendingLog: sequence_number not present"),null)})).catch((e=>{(0,Ae.vV)("create error",e,i),n(e,null)}))}.bind(null,Ee),update:function(e,t,n,i){const r=function(e,t){const n=Se(e,Object.assign({},{message_name:e.name,message_version:e.schema_version},t));return n.fields=n.fields.map((e=>"string"==typeof e?e:null===e?"":JSON.stringify(e))),n}(e,n);r.sequence_number=t,we.post("",r).then((()=>{i(null)})).catch((e=>{(0,Ae.vV)("update error",e,r),i(e)}))}.bind(null,Ee),send:function({name:e},t){const n={sequence_number:t,message_name:e};we.post("",n).catch((e=>{(0,Ae.vV)("send error",e,n)}))}.bind(null,Ee)};var Te=n(82548);class Ne{incognito=!1;constructor(e){this.scrobble=e,this.scrobble.subIncognitoMode(m.lX.fromPartial({}),(e=>{this.incognito=e.incognitoMode}))}isIncognito(){return this.incognito}}class Re{constructor(e){this.productStateClient=e,this.rules="",this.productStateClient.subValues(l.cF.fromPartial({}),(e=>{this.rules=e.pairs["streaming-rules"]}))}streamingRules(){return this.rules}}const ke="video.subtitles";class Oe{_hasSubtitleSupport=!1;_hasMinimizeBitrateSupport=!1;_hasPipSupport=!1;_events=new _e.p;_subtitleLanguages=[];_pictureInPictureState=!1;_videoCoordinator=null;_offlineCoordinator=null;constructor(e,t,n,i,r,s,a,o,l,c,u,d,m){this._cosmos=e,this._showService=t,this._productStateService=n,this._scrobbleService=i,this._playbackService=r,this._pendingEventsService=s,this._prefsClient=a,this._resolver=o,this._eventSender=l,this._factories=c,this._esperantoTransport=u,this._failPlaybackOnStreamingReportingError=d,this._shouldEnableStreamReportingTracker=m,this.initialize()}async initialize(){fe.Mw.installAll(),this._hasSubtitleSupport=this._resolver.getValue(Te.H_),this._hasMinimizeBitrateSupport=this._resolver.getValue(Te.CN),this._hasPipSupport=this._resolver.getValue(Te.Cn);const e=await this.createPlayerConfiguration();[this._videoCoordinator,this._offlineCoordinator]=await Promise.all([this.createVideoCoordinator(e),this.createOfflineCoordinator(e)])}async createPlayerConfiguration(){const e=this._resolver.getValue(Te.vq),t=this._resolver.getValue(Te.H_),n=this._resolver.getValue(Te.Wm),i=this._resolver.getValue(Te.jY),r=this._resolver.getValue(Te.d8),s=this._resolver.getValue(Te.tF),a=this._resolver.getValue(Te.vr),o=this._resolver.getValue(Te.kA),l=this._resolver.getValue(Te.yf),c=this._resolver.getValue(Te.Vi),u=this._resolver.getValue(Te.cc),d=this._resolver.getValue(Te.S3);return{containerElementClass:"VideoPlayer__container",streaming:{rebufferingGoal:r,autoplayVideoOnLoad:l},adaptiveBitrate:{initialLowBitrate:c,surfaceBasedResolutionCap:u,maxBitrate:0===d?void 0:d},drm:{vmpEnabled:a},subtitles:{enabled:t},offline:{enabled:e,targetBitrate:n},retry:{attempts:s},minimizeBitrate:{bufferMargin:o},experimental:{filterNegativeDuration:this._resolver.getValue(Te.iL),autoSeekToBufferedStartPositionOnLoad:this._resolver.getValue(Te.zu)},analytics:{mux:{enabled:i,token:"2qbjhhcl4u87btjbo7dh8vi2n",appName:"Desktop-X",playerName:"betamax-player-desktop-x"}}}}async getAccessToken(){return this._cosmos.get("sp://oauth/v2/token")}async getProductState(){return this._productStateService.getValues(l.kM.fromPartial({})).then((e=>{const t={"video-manifest-url":"","streaming-rules":"","widevine-license-url":""};return e.pairs["video-manifest-url"]&&(t["video-manifest-url"]=e.pairs["video-manifest-url"]),e.pairs["streaming-rules"]&&(t["streaming-rules"]=e.pairs["streaming-rules"]),e.pairs["widevine-license-url"]&&(t["widevine-license-url"]=e.pairs["widevine-license-url"]),t}))}async createVideoCoordinator(e){const t={videoOnVideoSaiEnabled:this._resolver.getValue(Te.Yw)},n=this._resolver.getValue(Te.o4),i=this._resolver.getValue(Te.gW),r=this._resolver.getValue(Te.jO),s=this.getAccessToken.bind(this),a=this._productStateService,o=this._scrobbleService,c=this._playbackService,u=this._pendingEventsService,d={factories:[()=>this,...this._factories]},p=this._resolver.getValue(Te.Sd),h=this._resolver.getValue(Te.XV),g=this._resolver.getValue(Te.Br),f=await this.getProductState(),b={ads:t,playerConfiguration:e,boomboxAudioSync:p,cosmos:this._cosmos,eventSenderProvider:()=>Promise.resolve(this._eventSender),endVideoLogger:Ie,getToken:s,playerDependencies:d,productState:f,productStateService:a,widevineVersionSupported:n,scrobbleService:o,playbackService:c,pendingEventsService:u,playerPool:{enabled:h,size:g},logging:{usePendingStorage:i},experimental:{seekToAd:r}},v=new be.N(b),y=[];if(this._shouldEnableStreamReportingTracker){const e=(0,ve.d)(this._esperantoTransport,function(e){const t=new Re(new l.EW(e)),n=new Ne(new m.aA(e));return{streamingRules:()=>t.streamingRules(),isIncognito:()=>n.isIncognito()}}(this._esperantoTransport),this._eventSender,v,this._failPlaybackOnStreamingReportingError);y.push(e)}return await v.initialize(y),v}async createOfflineCoordinator(e){const t={cosmos:this._cosmos,productState:await this.getProductState(),playerConfiguration:e,networkConfiguration:{getAuthorizationHeader:async()=>{const{accessToken:e,tokenType:t}=await this.getAccessToken();return`${t} ${e}`}},show_service:this._showService},n=new ye.Y(t);return n.initialize(),n}onManifestLoaded({availableSubtitles:e}){const t=e.map((e=>e.languageTag));this.setSubtitleLanguages(t)}onPictureInPictureChanged({pictureInPicture:e}){this._pictureInPictureState=e,this._events.emit(_e.S.PICTURE_IN_PICTURE_CHANGED,e)}getPictureInPictureState(){return this._pictureInPictureState}setSubtitleLanguages(e){this._subtitleLanguages=e,this._events.emit(_e.S.SUBTITLE_LANGUAGES_CHANGED,e)}getCapabilities(){return{hasSubtitleSupport:this._hasSubtitleSupport,hasMinimizeBitrateSupport:this._hasMinimizeBitrateSupport,hasPipSupport:this._hasPipSupport}}getEvents(){return this._events}async getSubtitleLanguages(){return this._subtitleLanguages}async getPreferredSubtitleLanguage(){try{const{entries:e}=await this._prefsClient.get({key:ke}),t=e[ke]?.string;return t&&t.length>0?t:null}catch(e){return null}}async setPreferredSubtitleLanguage(e){await this._prefsClient.set({entries:{[ke]:{string:e??""},"video.subtitles_cc":{bool:e?.endsWith("-cc")??!1}}})}reportVideoMode(e){this._videoCoordinator?.reportSurface(this.videoModeToSurface(e))}videoModeToSurface(e){return"npv"===e?"now-playing-view":"nowPlayingBar"===e?"now-playing-bar":"pip"===e||"documentPip"===e?"picture-in-picture":"none"!==e?e:void 0}setMinimizeBitrate(e){this._videoCoordinator?.setMinimizeBitrate(e)}setFullscreen(e){this._videoCoordinator?.setFullscreen(e)}setPip(e){return this._videoCoordinator?.setPip(e)??Promise.resolve(null)}setWindow(e){this._videoCoordinator?.setWindow(e)}}var Pe=n(19498),je=n(21361),Le=n(21386),De=n(51237),Ue=n(86833),Me=n(68970);const Be=e=>{switch(e){case De.FI.TERMINAL_TYPE_DISPLAY_DEVICE:return Me.FI.DISPLAY_DEVICE;case De.FI.TERMINAL_TYPE_HEADPHONES:return Me.FI.HEADPHONES;case De.FI.TERMINAL_TYPE_SPEAKERS:return Me.FI.SPEAKERS;case De.FI.TERMINAL_TYPE_UNKNOWN:case De.FI.TERMINAL_TYPE_UNSPECIFIED:case De.FI.UNRECOGNIZED:default:return Me.FI.UNKNOWN}},Fe=e=>{switch(e){case De.Yg.TRANSPORT_TYPE_BLUETOOTH:return Me.Yg.BLUETOOTH;case De.Yg.TRANSPORT_TYPE_BUILT_IN:return Me.Yg.BUILT_IN;case De.Yg.TRANSPORT_TYPE_DISPLAY_DEVICE:return Me.Yg.DISPLAY_DEVICE;case De.Yg.TRANSPORT_TYPE_USB:return Me.Yg.USB;case De.Yg.TRANSPORT_TYPE_VIRTUAL:return Me.Yg.VIRTUAL;case De.Yg.TRANSPORT_TYPE_UNKNOWN:case De.Yg.TRANSPORT_TYPE_UNSPECIFIED:case De.Yg.UNRECOGNIZED:default:return Me.Yg.UNKNOWN}};class He{devices=[];constructor(e){this._audioObserver=e,this._events=new Ue.e,this._audioObserver.getAudioOutputDevices({},(async e=>{this.devices=e.devices.map((e=>(e=>({id:e.id,name:e.name,fullName:e.fullName,terminalType:Be(e.terminalType),transportType:Fe(e.transportType),isDefaultDevice:e.isDefaultDevice}))(e))),this._events.emit(Ue.B.DEVICE_CONNECTED,{})}))}getDefaultDevice(){return this.devices.find((e=>e.isDefaultDevice))||null}getDevices(){return this.devices}getEvents(){return this._events}}var Ve=n(27920),ze=n(6960),Ge=n(36264),We=n(91864),Ke=n(84054),Ye=n(80884);const qe="isTokenUnavailable",Qe={baseTime:200,ceiling:9e5,curve:"exponential",jitter:!0};class $e{name="desktop-lifecycle-plugin";_authCounter=new Ke.p(Qe);_authAttempts=0;_authTimeoutId=null;constructor(e,t){this._transport=e,this._onAuthenticationFailed=t,this.onConnected=this.onConnected.bind(this),this.onDisconnected=this.onDisconnected.bind(this),this.onAuthenticated=this.onAuthenticated.bind(this),this.onAuthenticationFailed=this.onAuthenticationFailed.bind(this),this.onBeforeProcessRequest=this.onBeforeProcessRequest.bind(this),this.onBeforeSendRequest=this.onBeforeSendRequest.bind(this)}tryAuthenticate(){this._transport.isAuthenticated()||(null!==this._authTimeoutId&&(window.clearTimeout(this._authTimeoutId),this._authTimeoutId=null),this._transport.authenticate())}onConnected(){this._transport.isAuthenticated()||this._transport.authenticate()}onDisconnected(){this._transport.connect()}onAuthenticated(){this._authAttempts=0}onAuthenticationFailed(){this._authAttempts++;const e=this._authCounter.getTime(this._authAttempts),t=new Date(Date.now()+e);this._onAuthenticationFailed(this._authAttempts,t),console.log("Transport authentication failed, retrying in %.2d seconds...",e/1e3),this._authTimeoutId=window.setTimeout((()=>{this._authTimeoutId=null,this._transport.authenticate()}),e)}onBeforeProcessRequest(e){const{data:t}=e,n=t.options?.metadata?.noRequestTransform;if(n)return;if(this._transport.isAuthenticated())return;this._authAttempts>0&&(t.options?.authorize&&(t.context[qe]=!0),t.options=(0,Ye.K)(t.options,{authorize:!1}))}onBeforeSendRequest(e){if(e.data.context[qe])throw new Error("Token is currently unavailable.")}attach(e,t){e.addListener(We.TransportEvent.CONNECTED,this.onConnected),e.addListener(We.TransportEvent.DISCONNECTED,this.onDisconnected),e.addListener(We.TransportEvent.AUTHENTICATED,this.onAuthenticated),e.addListener(We.TransportEvent.AUTHENTICATION_FAILED,this.onAuthenticationFailed),t.addListener(We.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest),t.addListener(We.PluginEvent.TRANSPORT_BEFORE_SEND_REQUEST,this.onBeforeSendRequest)}detach(e,t){e.removeListener(We.TransportEvent.CONNECTED,this.onConnected),e.removeListener(We.TransportEvent.DISCONNECTED,this.onDisconnected),e.removeListener(We.TransportEvent.AUTHENTICATED,this.onAuthenticated),e.removeListener(We.TransportEvent.AUTHENTICATION_FAILED,this.onAuthenticationFailed),t.removeListener(We.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest),t.removeListener(We.PluginEvent.TRANSPORT_BEFORE_SEND_REQUEST,this.onBeforeSendRequest)}}function Ze(e,t){return(0,Ge.hj)((async()=>{try{const t=await e.get("sp://oauth/v2/token");return function(e){return Object.prototype.hasOwnProperty.call(e,"error")}(t)?null:{accessToken:t.accessToken,accessTokenExpirationTimestampMs:t.expiresAtTime,isAnonymous:!1}}catch(e){return null}}),t)}var Xe=n(76756);class Je{_state=Xe.h;_plugin=null;constructor(e,t){this._cosmos=e,this._events=t,this._tokenProvider=Ze(e,this.onTokenChanged.bind(this))}createTransportPlugin(e){return this._plugin=new $e(e,this.onAuthenticationFailed.bind(this)),this._plugin}onTokenChanged(e){this._state={isAuthorized:null!==e&&!(0,Ge.Hm)(e),token:e,retryAttempt:null,retryAt:null},this._events.emit(ze.m.UPDATE,this._state)}onAuthenticationFailed(e,t){this._state={isAuthorized:!1,token:null,retryAttempt:e,retryAt:t},this._events.emit(ze.m.UPDATE,this._state)}getCapabilities(){return{canGetSessionTransferURL:!0}}getEvents(){return this._events}getState(){return this._state}getTokenProvider(){return this._tokenProvider}tryAuthorize(){null!==this._plugin&&this._plugin.tryAuthenticate()}async getSessionTransferURL(e){const{accessToken:t}=await this._cosmos.get(`sp://auth/v1/session_transfer_token?url=${encodeURIComponent(e)}`);return`https://accounts.spotify.com/login/ott/v2#token=${encodeURIComponent(t)}`}}var et=n(64295),tt=n(85445);function nt(e){switch(e){case"computer":return tt.bq.COMPUTER;case"tablet":return tt.bq.TABLET;case"smartphone":return tt.bq.SMARTPHONE;case"speaker":return tt.bq.SPEAKER;case"tv":return tt.bq.TV;case"avr":return tt.bq.AVR;case"stb":return tt.bq.STB;case"audio_dongle":return tt.bq.AUDIO_DONGLE;case"game_console":return tt.bq.GAME_CONSOLE;case"cast_video":return tt.bq.CAST_VIDEO;case"cast_audio":return tt.bq.CAST_AUDIO;case"automobile":return tt.bq.AUTOMOBILE;case"smartwatch":return tt.bq.SMARTWATCH;case"chromebook":return tt.bq.CHROMEBOOK;case"carthing":return tt.bq.CarThing;case"homething":return tt.bq.HomeThing;default:return tt.bq.UNKNOWN}}function it(e){switch(e){case"incompatible":return tt.bU.INCOMPATIBLE;case"unavailable":return tt.bU.UNAVAILABLE;case"premium_required":return tt.bU.PREMIUM_REQUIRED;case"not_installed":return tt.bU.NOT_INSTALLED;case"unsupported_uri":return tt.bU.UNSUPPORTED_URI;case"not_authorized":return tt.bU.NOT_AUTHORIZED;case"ad_playing":return tt.bU.AD_PLAYING;case"narration":return tt.bU.NARRATION;case"waking_up":return tt.bU.WAKING_UP;case"timed_out_wakeup":return tt.bU.TIMED_OUT_WAKEUP;default:return}}function rt(e){switch(e){case"connecting":return tt.gX.CONNECTING;case"logged_in":return tt.gX.LOGGED_IN;case"not_logged_in":return tt.gX.NOT_LOGGED_IN;case"sleeping":return tt.gX.SLEEPING;case"not_loaded":return tt.gX.NOT_LOADED;case"unknown":return tt.gX.UNKNOWN;default:return it(e)}}const st=65535;function at(e){switch(e){case s.Gb.CAST:return"cast";case s.Gb.CONNECT:return"connect";default:return"unrecognized"}}function ot(e){const t=[];let n;for(const i of e){const e=at(i.loginType);(0,tt.Ts)(e)&&(t.push(e),i.preferred&&(n=e))}return{preferred:n,available:t}}function lt(e){const{localIdentifier:t,connectStateIdentifier:n,name:i,type:r,isGroup:s,isSelf:a,isActive:o,isBeingActivated:l,isDisabled:c,volume:u,hifi:d,brandDisplayName:m,modelDisplayName:p,license:h,state:g,isLocal:f,isZeroconf:b,isWebapp:v,supportsLogout:y,incarnations:_,supportsDj:E}=e;return{id:t,connectStateId:n,name:i??"",type:nt(r),isGroup:s,isLocal:a,isActive:o,isConnecting:l,isDisabled:c,disabledReason:it(g),volume:u/st,hifiSupport:{fullySupported:!!d?.fullySupported,deviceSupported:!!d?.deviceSupported,userEligible:!!d?.userEligible},brandDisplayName:m,modelDisplayName:p,license:h,currentState:rt(g),isLocalNetwork:f,isZeroconf:b,isWebApp:v,supportsLogout:(x=a,C=y,S=m,A=p,!x&&("spotify"!==S||"web_player"!==A&&"mobile_web_player"!==A)&&C),incarnation:_?ot(_):void 0,supportsDJNarration:E};var x,C,S,A}function ct(e,t){return t?tt.zP.CONNECTING:e&&!e.isLocal?tt.zP.CONNECTED:tt.zP.NOT_CONNECTED}function ut(e){return{success:e.status===s.nW.OK}}class dt extends et.a{constructor(e){super(),this.connectServiceClient=e,this.connectServiceClient.state(s.d1.fromPartial({includeLocalDevice:!0,showOfflineDevicesInCore:!0,showOfflineAmazonDevicesAsOnline:!0}),(({devices:e})=>{e&&e.length>0&&this.emit(et.P.UPDATE,function(e){let t;t=e?e.map(lt):[];let n=t.find((e=>e.isActive));if(!n){const e=t.findIndex((e=>e.isLocal));-1!==e&&(n={...t[e],isActive:!0},t[e]=n)}const i=t.find((e=>e.isConnecting&&!e.isActive));return{connectionStatus:ct(n,i),activeDevice:n??null,connectingDevice:i??null,devices:t}}(e))}))}}class mt{state=null;constructor(e,t){this.connectServiceClient=e,this.useNewEndpoint=t,this.events=new dt(this.connectServiceClient),this.events.addListener(et.P.UPDATE,(({data:e})=>{this.state=e})),this.initiateLocalDiscovery()}getCapabilities(){return{supportsLocalDiscovery:!0}}getState(){return this.state}getEvents(){return this.events}async initiateLocalDiscovery(){this.useNewEndpoint?await this.connectServiceClient.performDiscovery({}):await this.connectServiceClient.startDiscovery({})}async updateListOfDevices(){this.useNewEndpoint?await Promise.all([this.connectServiceClient.performDiscovery({}),this.connectServiceClient.refreshCluster({}),this.connectServiceClient.wakeSleepingClusterDevices({})]):await this.connectServiceClient.forceDiscover({})}createLoggingParams(e){return {interactionIds:null,pageInstanceIds:null};return s.OU.fromPartial({interactionIds:[e.interactionId],pageInstanceIds:e.pageInstanceId?[e.pageInstanceId]:void 0})}async pullToLocal(e){await this.connectServiceClient.pull(s.B9.fromPartial({loggingParams:this.createLoggingParams(e)}))}async transferToRemote(e,t){await this.connectServiceClient.transfer(s.f6.fromPartial({connectDeviceIdentifier:e,loggingParams:this.createLoggingParams(t)}))}async transferPlayback(e,t){await("local_device"===e?this.pullToLocal(t):this.transferToRemote(e,t))}checkDeviceId=e=>{if(0===e.length)throw new Error("missing device id")};async logout(e){this.checkDeviceId(e);return ut(await this.connectServiceClient.logout(s.yE.fromPartial({connectDeviceIdentifier:e})))}mapIncarnationToLoginType=e=>"cast"===e?s.Gb.CAST:"connect"===e?s.Gb.CONNECT:s.Gb.UNRECOGNIZED;async setPreferredIncarnation(e,t){this.checkDeviceId(e);const n=this.mapIncarnationToLoginType(t);return ut(await this.connectServiceClient.setPreferredZeroconf(s.B0.fromPartial({deviceId:e.replace("cluster_",""),preferredLoginType:n})))}}var pt=n(33197);const ht="sp://internal/v1/latest_messages";function gt(e){n.g.window.getCosmosMessages||(n.g.window.getCosmosMessages=()=>async function(e){return await e.get(ht)??[]}(e))}var ft=n(72541),bt=n(16117),vt=n(4968);class yt extends vt.s{streamIsCuratedCancellable=null;constructor(e,t){super(t),this._your_library=e}async onCuratedBatchChanged(e){if(null!==this.streamIsCuratedCancellable&&this.streamIsCuratedCancellable.cancel(),0===e.size)return;const t=Array.from(e.keys());this.streamIsCuratedCancellable=this._your_library.streamIsCurated({uri:t,updateThrottling:0,contextUri:""},(e=>{this.emitUpdateCuratedItems(t,e.item.map((e=>e.isCurated)))}))}}var _t=n(6016);var Et=n(49566);function xt(e){return null===e||e.type===ne.c.PLAYLIST||e.type===ne.c.FOLDER||e.type===ne.c.LIKED_SONGS||e.type===ne.c.YOUR_EPISODES}class Ct{cache=new J.GG(6e5,864e5);constructor(e,t,n){this._your_library=e,this._libraryAPI=t,this._playlistAPI=n,this.events=new yt(e,this.cache)}getEvents(){return this.events}async getCurationContexts(e){const{curatedItemUri:t,offset:n=0,limit:i,textFilter:r="",folderUri:s}=e,a=await this._libraryAPI.getContents({offset:n,limit:i,filters:[ft.jO.PLAYLIST.toString(),ft.jO.WRITABLE.toString()],textFilter:r,sortOrder:ft.oR.RECENTLY_PLAYED_OR_ADDED.toString(),itemToCheckCurationFor:[t],includeYourEpisodes:(0,ee.gH)(t),includeLikedSongs:(0,ee.U_)(t)||(0,ee.Pk)(t),folderUri:s});return{...a,items:a.items.filter(xt)}}async curateItems(e,t,n){if(this.events.emitOperationSync(bt.jy.CURATE_ITEMS,e,t,n))return null;const i=[],r=[];for(const n of t){let t;t=(0,ee.Z0)(n)?this._libraryAPI.add({uris:[e],silent:!0}):(0,ee.tb)(n)?this._playlistAPI.add(n,[e],{after:"end"},!0):Promise.reject(`Unsupported uri: "${n}"`),i.push(t)}for(const t of n){let n;n=(0,ee.Z0)(t)?this._libraryAPI.remove({uris:[e],silent:!0}):(0,ee.tb)(t)?this._playlistAPI.remove(t,[{uri:e,uid:""}],!0):Promise.reject(`Unsupported uri: "${t}"`),r.push(n)}i.length&&!this.isCuratedSync(e)&&(this.events.emitUpdateCuratedItems([e],!0),Promise.any(i).catch((async()=>{this.isCurated(e).then((t=>{this.events.emitUpdateCuratedItems([e],t)}))})));const s=await Promise.allSettled(i),a=await Promise.allSettled(r),o=t.filter(((e,t)=>"fulfilled"===s.at(t)?.status)),l=t.filter(((e,t)=>"rejected"===s.at(t)?.status)),c=n.filter(((e,t)=>"fulfilled"===a.at(t)?.status)),u=n.filter(((e,t)=>"rejected"===a.at(t)?.status));if((o.length||c.length)&&this.events.emitOperationComplete(bt.jy.CURATE_ITEMS,e,o,c),l.length||u.length){const i=function({curatedItemUri:e,addedCurationContextUris:t,removedCurationContextUris:n,settledAddCurationContextPromises:i,settledRemoveCurationContextPromises:r}){for(const n of[...i])if("rejected"===n.status){const r=t.at(i.indexOf(n));return new _t.e(`Failed curating "${e}" into "${r}"`,{cause:n.reason})}for(const t of[...r])if("rejected"===t.status){const i=n.at(r.indexOf(t));return new _t.e(`Failed uncurating "${e}" from "${i}"`,{cause:t.reason})}return new _t.e(e)}({curatedItemUri:e,addedCurationContextUris:t,removedCurationContextUris:n,settledAddCurationContextPromises:s,settledRemoveCurationContextPromises:a});throw this.events.emitOperationComplete(bt.jy.CURATE_ITEMS,e,l,u,i),i}return!!o.length||(await this.isCurated(e))?.[0]}getDefaultCurationContextUri=Et.o;async curateDefault(e){const t=this.getDefaultCurationContextUri(e);if(this.events.emitOperationSync(bt.jy.CURATE_ITEMS,e,[t],[]))return;let n=!1;try{this.isCuratedSync(e)||(n=!0,this.events.emitUpdateCuratedItems([e],!0)),await this._libraryAPI.add({uris:[e],silent:!0}),this.events.emitOperationComplete(bt.jy.CURATE_ITEMS,e,[t],[])}catch(i){n&&this.isCurated(e).then((t=>{this.events.emitUpdateCuratedItems([e],t)}));const r=new _t.e(`Failed curating "${e}" into default context`,{cause:i});throw this.events.emitOperationComplete(bt.jy.CURATE_ITEMS,e,[t],[],r),r}}async isCurated(...e){return(await this._your_library.isCurated({uri:e,updateThrottling:0,contextUri:""})).item.map((e=>(this.cache.set(e.uri,e.isCurated),e.isCurated)))}isCuratedSync(e){return this.cache.peek(e)}}var St=n(50620);class At{subscriptionId=null;subscription=null;constructor(e,t){this._watchdogClient=e,this._url=t,this.subscribeToWatchdog()}subscribeToWatchdog(){this.subscription=this._watchdogClient.subscribe({url:this._url},(e=>{0!==e.id?(this.subscriptionId=e.id,this.scheduleNextPing()):this.subscription?.cancel()}))}async pingWatchdog(){this.subscriptionId&&(await this._watchdogClient.ping({id:this.subscriptionId}),this.scheduleNextPing())}scheduleNextPing(){setTimeout((()=>{this.pingWatchdog()}),6e4)}}var wt=n(94119),It=n(89857),Tt=n(99614),Nt=n(17393),Rt=n(78787),kt=n(82031),Ot=n(9344),Pt=n(20005),jt=n(25556);function Lt(e){switch(e){case kt.Ir.ALBUMS:return ft.jO.ALBUM;case kt.Ir.ARTISTS:return ft.jO.ARTIST;case kt.Ir.SHOWS:return ft.jO.SHOW;case kt.Ir.BOOKS:return ft.jO.BOOK;default:throw Error("Invalid library filter!")}}class Dt extends Ot.w{_cancellables={[kt.Ir.ALBUMS]:null,[kt.Ir.ARTISTS]:null,[kt.Ir.SHOWS]:null,[kt.Ir.TRACKS]:null,[kt.Ir.EPISODES]:null,[kt.Ir.BOOKS]:null};_containsCancellable=null;constructor(e,t,n,i){super(i),this._your_library=e,this._collection=t,this._listen_later=n}subscribeToUpdates(){for(const e of Object.values(kt.Ir))if(e===kt.Ir.EPISODES){let t;this._cancellables[e]=this._listen_later.streamEpisodes(Pt.Fn.fromPartial({updateThrottling:100}),(n=>{t!==n.unfilteredLength&&(this.emit(kt.UV.UPDATE,{list:e}),t=n.unfilteredLength)}))}else if(e===kt.Ir.TRACKS){let t;this._cancellables[e]=this._collection.streamTrackListMetadata(jt.oT.fromPartial({updateThrottling:100}),(n=>{t!==n.metadata?.unfilteredLength&&(this.emit(kt.UV.UPDATE,{list:e}),t=n.metadata?.unfilteredLength)}))}else{const t=Lt(e);this._cancellables[e]=this._your_library.streamAll(ft.WT.fromPartial({updateThrottling:100,header:{allPlaylists:!1,totalCount:!0,filters:{filter:[t]}}}),(()=>{this.emit(kt.UV.UPDATE,{list:e})}))}}unsubscribeFromUpdates(){for(const e of Object.values(kt.Ir)){const t=this._cancellables[e];null!==t&&(t.cancel(),this._cancellables[e]=null)}}async onBatchChanged(e){if(null!==this._containsCancellable&&this._containsCancellable.cancel(),0===e.size)return;const t=Array.from(e.keys());this._containsCancellable=this._collection.streamContains(jt.Rs.fromPartial({uri:t}),(e=>this.emitUpdateItems(t,e.found)))}}n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var Ut=n(66774),Mt=n(9544);let Bt=function(e){return e[e.UNKNOWN_EXTENSION=0]="UNKNOWN_EXTENSION",e[e.CANVAZ=1]="CANVAZ",e[e.STORYLINES=2]="STORYLINES",e[e.PODCAST_TOPICS=3]="PODCAST_TOPICS",e[e.PODCAST_SEGMENTS=4]="PODCAST_SEGMENTS",e[e.AUDIO_FILES=5]="AUDIO_FILES",e[e.TRACK_DESCRIPTOR=6]="TRACK_DESCRIPTOR",e[e.PODCAST_COUNTER=7]="PODCAST_COUNTER",e[e.ARTIST_V4=8]="ARTIST_V4",e[e.ALBUM_V4=9]="ALBUM_V4",e[e.TRACK_V4=10]="TRACK_V4",e[e.SHOW_V4=11]="SHOW_V4",e[e.EPISODE_V4=12]="EPISODE_V4",e[e.PODCAST_HTML_DESCRIPTION=13]="PODCAST_HTML_DESCRIPTION",e[e.PODCAST_QUOTES=14]="PODCAST_QUOTES",e[e.USER_PROFILE=15]="USER_PROFILE",e[e.CANVAS_V1=16]="CANVAS_V1",e[e.SHOW_V4_BASE=17]="SHOW_V4_BASE",e[e.SHOW_V4_EPISODES_ASSOC=18]="SHOW_V4_EPISODES_ASSOC",e[e.TRACK_DESCRIPTOR_SIGNATURES=19]="TRACK_DESCRIPTOR_SIGNATURES",e[e.PODCAST_AD_SEGMENTS=20]="PODCAST_AD_SEGMENTS",e[e.EPISODE_TRANSCRIPTS=21]="EPISODE_TRANSCRIPTS",e[e.PODCAST_SUBSCRIPTIONS=22]="PODCAST_SUBSCRIPTIONS",e[e.EXTRACTED_COLOR=23]="EXTRACTED_COLOR",e[e.PODCAST_VIRALITY=24]="PODCAST_VIRALITY",e[e.IMAGE_SPARKLES_HACK=25]="IMAGE_SPARKLES_HACK",e[e.PODCAST_POPULARITY_HACK=26]="PODCAST_POPULARITY_HACK",e[e.AUTOMIX_MODE=27]="AUTOMIX_MODE",e[e.CUEPOINTS=28]="CUEPOINTS",e[e.PODCAST_POLL=29]="PODCAST_POLL",e[e.EPISODE_ACCESS=30]="EPISODE_ACCESS",e[e.SHOW_ACCESS=31]="SHOW_ACCESS",e[e.PODCAST_QNA=32]="PODCAST_QNA",e[e.CLIPS=33]="CLIPS",e[e.SHOW_V5=34]="SHOW_V5",e[e.EPISODE_V5=35]="EPISODE_V5",e[e.PODCAST_CTA_CARDS=36]="PODCAST_CTA_CARDS",e[e.PODCAST_RATING=37]="PODCAST_RATING",e[e.DISPLAY_SEGMENTS=38]="DISPLAY_SEGMENTS",e[e.GREENROOM=39]="GREENROOM",e[e.USER_CREATED=40]="USER_CREATED",e[e.SHOW_DESCRIPTION=41]="SHOW_DESCRIPTION",e[e.SHOW_HTML_DESCRIPTION=42]="SHOW_HTML_DESCRIPTION",e[e.SHOW_PLAYABILITY=43]="SHOW_PLAYABILITY",e[e.EPISODE_DESCRIPTION=44]="EPISODE_DESCRIPTION",e[e.EPISODE_HTML_DESCRIPTION=45]="EPISODE_HTML_DESCRIPTION",e[e.EPISODE_PLAYABILITY=46]="EPISODE_PLAYABILITY",e[e.SHOW_EPISODES_ASSOC=47]="SHOW_EPISODES_ASSOC",e[e.CLIENT_CONFIG=48]="CLIENT_CONFIG",e[e.PLAYLISTABILITY=49]="PLAYLISTABILITY",e[e.AUDIOBOOK_V5=50]="AUDIOBOOK_V5",e[e.CHAPTER_V5=51]="CHAPTER_V5",e[e.AUDIOBOOK_SPECIFICS=52]="AUDIOBOOK_SPECIFICS",e[e.EPISODE_RANKING=53]="EPISODE_RANKING",e[e.HTML_DESCRIPTION=54]="HTML_DESCRIPTION",e[e.CREATOR_CHANNEL=55]="CREATOR_CHANNEL",e[e.AUDIOBOOK_PROVIDERS=56]="AUDIOBOOK_PROVIDERS",e[e.PLAY_TRAIT=57]="PLAY_TRAIT",e[e.CONTENT_WARNING=58]="CONTENT_WARNING",e[e.IMAGE_CUE=59]="IMAGE_CUE",e[e.STREAM_COUNT=60]="STREAM_COUNT",e[e.AUDIO_ATTRIBUTES=61]="AUDIO_ATTRIBUTES",e[e.NAVIGABLE_TRAIT=62]="NAVIGABLE_TRAIT",e[e.NEXT_BEST_EPISODE=63]="NEXT_BEST_EPISODE",e[e.AUDIOBOOK_PRICE=64]="AUDIOBOOK_PRICE",e[e.EXPRESSIVE_PLAYLISTS=65]="EXPRESSIVE_PLAYLISTS",e[e.DYNAMIC_SHOW_EPISODE=66]="DYNAMIC_SHOW_EPISODE",e[e.LIVE=67]="LIVE",e[e.SKIP_PLAYED=68]="SKIP_PLAYED",e[e.AD_BREAK_FREE_PODCASTS=69]="AD_BREAK_FREE_PODCASTS",e[e.ASSOCIATIONS=70]="ASSOCIATIONS",e[e.PLAYLIST_EVALUATION=71]="PLAYLIST_EVALUATION",e[e.CACHE_INVALIDATIONS=72]="CACHE_INVALIDATIONS",e[e.LIVESTREAM_ENTITY=73]="LIVESTREAM_ENTITY",e[e.SINGLE_TAP_REACTIONS=74]="SINGLE_TAP_REACTIONS",e[e.USER_COMMENTS=75]="USER_COMMENTS",e[e.CLIENT_RESTRICTIONS=76]="CLIENT_RESTRICTIONS",e[e.PODCAST_GUEST=77]="PODCAST_GUEST",e[e.PLAYABILITY=78]="PLAYABILITY",e[e.COVER_IMAGE=79]="COVER_IMAGE",e[e.SHARE_TRAIT=80]="SHARE_TRAIT",e[e.INSTANCE_SHARING=81]="INSTANCE_SHARING",e[e.ARTIST_TOUR=82]="ARTIST_TOUR",e[e.AUDIOBOOK_GENRE=83]="AUDIOBOOK_GENRE",e[e.CONCEPT=84]="CONCEPT",e[e.ORIGINAL_VIDEO=85]="ORIGINAL_VIDEO",e[e.SMART_SHUFFLE=86]="SMART_SHUFFLE",e[e.LIVE_EVENTS=87]="LIVE_EVENTS",e[e.AUDIOBOOK_RELATIONS=88]="AUDIOBOOK_RELATIONS",e[e.HOME_POC_BASECARD=89]="HOME_POC_BASECARD",e[e.AUDIOBOOK_SUPPLEMENTS=90]="AUDIOBOOK_SUPPLEMENTS",e[e.PAID_PODCAST_BANNER=91]="PAID_PODCAST_BANNER",e[e.FEWER_ADS=92]="FEWER_ADS",e[e.WATCH_FEED_SHOW_EXPLORER=93]="WATCH_FEED_SHOW_EXPLORER",e[e.TRACK_EXTRA_DESCRIPTORS=94]="TRACK_EXTRA_DESCRIPTORS",e[e.TRACK_EXTRA_AUDIO_ATTRIBUTES=95]="TRACK_EXTRA_AUDIO_ATTRIBUTES",e[e.TRACK_EXTENDED_CREDITS=96]="TRACK_EXTENDED_CREDITS",e[e.SIMPLE_TRAIT=97]="SIMPLE_TRAIT",e[e.AUDIO_ASSOCIATIONS=98]="AUDIO_ASSOCIATIONS",e[e.VIDEO_ASSOCIATIONS=99]="VIDEO_ASSOCIATIONS",e[e.PLAYLIST_TUNER=100]="PLAYLIST_TUNER",e[e.ARTIST_VIDEOS_ENTRYPOINT=101]="ARTIST_VIDEOS_ENTRYPOINT",e[e.ALBUM_PRERELEASE=102]="ALBUM_PRERELEASE",e[e.CONTENT_ALTERNATIVES=103]="CONTENT_ALTERNATIVES",e[e.SNAPSHOT_SHARING=105]="SNAPSHOT_SHARING",e[e.DISPLAY_SEGMENTS_COUNT=106]="DISPLAY_SEGMENTS_COUNT",e[e.PODCAST_FEATURED_EPISODE=107]="PODCAST_FEATURED_EPISODE",e[e.PODCAST_SPONSORED_CONTENT=108]="PODCAST_SPONSORED_CONTENT",e[e.PODCAST_EPISODE_TOPICS_LLM=109]="PODCAST_EPISODE_TOPICS_LLM",e[e.PODCAST_EPISODE_TOPICS_KG=110]="PODCAST_EPISODE_TOPICS_KG",e[e.EPISODE_RANKING_POPULARITY=111]="EPISODE_RANKING_POPULARITY",e[e.MERCH=112]="MERCH",e[e.COMPANION_CONTENT=113]="COMPANION_CONTENT",e[e.WATCH_FEED_ENTITY_EXPLORER=114]="WATCH_FEED_ENTITY_EXPLORER",e[e.ANCHOR_CARD_TRAIT=115]="ANCHOR_CARD_TRAIT",e[e.AUDIO_PREVIEW_PLAYBACK_TRAIT=116]="AUDIO_PREVIEW_PLAYBACK_TRAIT",e[e.VIDEO_PREVIEW_STILL_TRAIT=117]="VIDEO_PREVIEW_STILL_TRAIT",e[e.PREVIEW_CARD_TRAIT=118]="PREVIEW_CARD_TRAIT",e[e.SHORTCUTS_CARD_TRAIT=119]="SHORTCUTS_CARD_TRAIT",e[e.VIDEO_PREVIEW_PLAYBACK_TRAIT=120]="VIDEO_PREVIEW_PLAYBACK_TRAIT",e[e.COURSE_SPECIFICS=121]="COURSE_SPECIFICS",e[e.CONCERT=122]="CONCERT",e[e.CONCERT_LOCATION=123]="CONCERT_LOCATION",e[e.CONCERT_MARKETING=124]="CONCERT_MARKETING",e[e.CONCERT_PERFORMERS=125]="CONCERT_PERFORMERS",e[e.TRACK_PAIR_TRANSITION=126]="TRACK_PAIR_TRANSITION",e[e.CONTENT_TYPE_TRAIT=127]="CONTENT_TYPE_TRAIT",e[e.NAME_TRAIT=128]="NAME_TRAIT",e[e.ARTWORK_TRAIT=129]="ARTWORK_TRAIT",e[e.RELEASE_DATE_TRAIT=130]="RELEASE_DATE_TRAIT",e[e.CREDITS_TRAIT=131]="CREDITS_TRAIT",e[e.RELEASE_URI_TRAIT=132]="RELEASE_URI_TRAIT",e[e.ENTITY_CAPPING=133]="ENTITY_CAPPING",e[e.LESSON_SPECIFICS=134]="LESSON_SPECIFICS",e[e.CONCERT_OFFERS=135]="CONCERT_OFFERS",e[e.TRANSITION_MAPS=136]="TRANSITION_MAPS",e[e.ARTIST_HAS_CONCERTS=137]="ARTIST_HAS_CONCERTS",e[e.PRERELEASE=138]="PRERELEASE",e[e.PLAYLIST_ATTRIBUTES_V2=139]="PLAYLIST_ATTRIBUTES_V2",e[e.LIST_ATTRIBUTES_V2=140]="LIST_ATTRIBUTES_V2",e[e.LIST_METADATA=141]="LIST_METADATA",e[e.LIST_TUNER_AUDIO_ANALYSIS=142]="LIST_TUNER_AUDIO_ANALYSIS",e[e.LIST_TUNER_CUEPOINTS=143]="LIST_TUNER_CUEPOINTS",e[e.CONTENT_RATING_TRAIT=144]="CONTENT_RATING_TRAIT",e[e.COPYRIGHT_TRAIT=145]="COPYRIGHT_TRAIT",e[e.SUPPORTED_BADGES=146]="SUPPORTED_BADGES",e[e.BADGES=147]="BADGES",e[e.PREVIEW_TRAIT=148]="PREVIEW_TRAIT",e[e.ROOTLISTABILITY_TRAIT=149]="ROOTLISTABILITY_TRAIT",e[e.LOCAL_CONCERTS=150]="LOCAL_CONCERTS",e[e.RECOMMENDED_PLAYLISTS=151]="RECOMMENDED_PLAYLISTS",e[e.POPULAR_RELEASES=152]="POPULAR_RELEASES",e[e.RELATED_RELEASES=153]="RELATED_RELEASES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});var Ft=n(21364),Ht=n(59043),Vt=n.n(Ht);const zt={isPaywalled:!1,isUserSubscribed:!1,userExplanation:0},Gt={encode:(e,t=Vt().Writer.create())=>(!0===e.isPaywalled&&t.uint32(8).bool(e.isPaywalled),!0===e.isUserSubscribed&&t.uint32(16).bool(e.isUserSubscribed),0!==e.userExplanation&&t.uint32(24).int32(e.userExplanation),t),decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...zt};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.isPaywalled=n.bool();break;case 2:r.isUserSubscribed=n.bool();break;case 3:r.userExplanation=n.int32();break;default:n.skipType(7&e)}}return r},fromPartial(e){const t={...zt};return void 0!==e.isPaywalled&&null!==e.isPaywalled?t.isPaywalled=e.isPaywalled:t.isPaywalled=!1,void 0!==e.isUserSubscribed&&null!==e.isUserSubscribed?t.isUserSubscribed=e.isUserSubscribed:t.isUserSubscribed=!1,void 0!==e.userExplanation&&null!==e.userExplanation?t.userExplanation=e.userExplanation:t.userExplanation=0,t}};Vt().util.Long!==Ft.A&&(Vt().util.Long=Ft.A,Vt().configure());var Wt=n(45901);const Kt={encode:(e,t=Vt().Writer.create())=>("0"!==e.seconds&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={seconds:"0",nanos:0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;r.seconds=n.int64().toString();continue;case 2:if(16!==e)break;r.nanos=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({seconds:Yt(e.seconds)?globalThis.String(e.seconds):"0",nanos:Yt(e.nanos)?globalThis.Number(e.nanos):0}),toJSON(e){const t={};return"0"!==e.seconds&&(t.seconds=e.seconds),0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},create:e=>Kt.fromPartial(e??{}),fromPartial(e){const t={seconds:"0",nanos:0};return t.seconds=e.seconds??"0",t.nanos=e.nanos??0,t}};function Yt(e){return null!=e}Vt().util.Long!==Ft.A&&(Vt().util.Long=Ft.A,Vt().configure());const qt={encode:(e,t=Vt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.credits&&Qt.encode(e.credits,t.uint32(18).fork()).ldelim(),""!==e.edition&&t.uint32(26).string(e.edition),"0"!==e.duration_ms&&t.uint32(32).int64(e.duration_ms),void 0!==e.publish_date&&Kt.encode(function(e){const t=Math.trunc(e.getTime()/1e3).toString(),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}(e.publish_date),t.uint32(42).fork()).ldelim(),""!==e.main_title&&t.uint32(50).string(e.main_title),""!==e.subtitle&&t.uint32(58).string(e.subtitle),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={uri:"",credits:void 0,edition:"",duration_ms:"0",publish_date:void 0,main_title:"",subtitle:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=n.string();continue;case 2:if(18!==e)break;r.credits=Qt.decode(n,n.uint32());continue;case 3:if(26!==e)break;r.edition=n.string();continue;case 4:if(32!==e)break;r.duration_ms=n.int64().toString();continue;case 5:if(42!==e)break;r.publish_date=Jt(Kt.decode(n,n.uint32()));continue;case 6:if(50!==e)break;r.main_title=n.string();continue;case 7:if(58!==e)break;r.subtitle=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({uri:tn(e.uri)?String(e.uri):"",credits:tn(e.credits)?Qt.fromJSON(e.credits):void 0,edition:tn(e.edition)?String(e.edition):"",duration_ms:tn(e.duration_ms)?String(e.duration_ms):"0",publish_date:tn(e.publish_date)?en(e.publish_date):void 0,main_title:tn(e.main_title)?String(e.main_title):"",subtitle:tn(e.subtitle)?String(e.subtitle):""}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.credits&&(t.credits=e.credits?Qt.toJSON(e.credits):void 0),void 0!==e.edition&&(t.edition=e.edition),void 0!==e.duration_ms&&(t.duration_ms=e.duration_ms),void 0!==e.publish_date&&(t.publish_date=e.publish_date.toISOString()),void 0!==e.main_title&&(t.main_title=e.main_title),void 0!==e.subtitle&&(t.subtitle=e.subtitle),t},create:e=>qt.fromPartial(e??{}),fromPartial(e){const t={uri:"",credits:void 0,edition:"",duration_ms:"0",publish_date:void 0,main_title:"",subtitle:""};return t.uri=e.uri??"",t.credits=void 0!==e.credits&&null!==e.credits?Qt.fromPartial(e.credits):void 0,t.edition=e.edition??"",t.duration_ms=e.duration_ms??"0",t.publish_date=e.publish_date??void 0,t.main_title=e.main_title??"",t.subtitle=e.subtitle??"",t}};const Qt={encode(e,t=Vt().Writer.create()){for(const n of e.publishers)$t.encode(n,t.uint32(18).fork()).ldelim();for(const n of e.authors)Zt.encode(n,t.uint32(26).fork()).ldelim();for(const n of e.narrators)Xt.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={publishers:[],authors:[],narrators:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 2:if(18!==e)break;r.publishers.push($t.decode(n,n.uint32()));continue;case 3:if(26!==e)break;r.authors.push(Zt.decode(n,n.uint32()));continue;case 4:if(34!==e)break;r.narrators.push(Xt.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({publishers:Array.isArray(e?.publishers)?e.publishers.map((e=>$t.fromJSON(e))):[],authors:Array.isArray(e?.authors)?e.authors.map((e=>Zt.fromJSON(e))):[],narrators:Array.isArray(e?.narrators)?e.narrators.map((e=>Xt.fromJSON(e))):[]}),toJSON(e){const t={};return e.publishers?t.publishers=e.publishers.map((e=>e?$t.toJSON(e):void 0)):t.publishers=[],e.authors?t.authors=e.authors.map((e=>e?Zt.toJSON(e):void 0)):t.authors=[],e.narrators?t.narrators=e.narrators.map((e=>e?Xt.toJSON(e):void 0)):t.narrators=[],t},create:e=>Qt.fromPartial(e??{}),fromPartial(e){const t={publishers:[],authors:[],narrators:[]};return t.publishers=e.publishers?.map((e=>$t.fromPartial(e)))||[],t.authors=e.authors?.map((e=>Zt.fromPartial(e)))||[],t.narrators=e.narrators?.map((e=>Xt.fromPartial(e)))||[],t}};const $t={encode:(e,t=Vt().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 2:if(18!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({name:tn(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>$t.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const Zt={encode:(e,t=Vt().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 2:if(18!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({name:tn(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>Zt.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const Xt={encode:(e,t=Vt().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 2:if(18!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({name:tn(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>Xt.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};function Jt(e){let t=1e3*(Number(e.seconds)||0);return t+=(e.nanos||0)/1e6,new Date(t)}function en(e){return e instanceof Date?e:"string"==typeof e?new Date(e):Jt(Kt.fromJSON(e))}function tn(e){return null!=e}Vt().util.Long!==Ft.A&&(Vt().util.Long=Ft.A,Vt().configure());const nn={encode:(e,t=Vt().Writer.create())=>(""!==e.cardHeaderText&&t.uint32(10).string(e.cardHeaderText),""!==e.cardBodyText&&t.uint32(18).string(e.cardBodyText),""!==e.buttonText&&t.uint32(26).string(e.buttonText),""!==e.buttonTarget&&t.uint32(34).string(e.buttonTarget),t),decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={cardHeaderText:"",cardBodyText:"",buttonText:"",buttonTarget:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.cardHeaderText=n.string();break;case 2:r.cardBodyText=n.string();break;case 3:r.buttonText=n.string();break;case 4:r.buttonTarget=n.string();break;default:n.skipType(7&e)}}return r},fromJSON:e=>({cardHeaderText:rn(e.cardHeaderText)?String(e.cardHeaderText):"",cardBodyText:rn(e.cardBodyText)?String(e.cardBodyText):"",buttonText:rn(e.buttonText)?String(e.buttonText):"",buttonTarget:rn(e.buttonTarget)?String(e.buttonTarget):""}),toJSON(e){const t={};return void 0!==e.cardHeaderText&&(t.cardHeaderText=e.cardHeaderText),void 0!==e.cardBodyText&&(t.cardBodyText=e.cardBodyText),void 0!==e.buttonText&&(t.buttonText=e.buttonText),void 0!==e.buttonTarget&&(t.buttonTarget=e.buttonTarget),t},fromPartial(e){const t={cardHeaderText:"",cardBodyText:"",buttonText:"",buttonTarget:""};return t.cardHeaderText=e.cardHeaderText??"",t.cardBodyText=e.cardBodyText??"",t.buttonText=e.buttonText??"",t.buttonTarget=e.buttonTarget??"",t}};function rn(e){return null!=e}Vt().util.Long!==Ft.A&&(Vt().util.Long=Ft.A,Vt().configure());const sn={},an={encode(e,t=Vt().Writer.create()){for(const n of e.topics)ln.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...sn};for(r.topics=[];n.pos<i;){const e=n.uint32();if(e>>>3==1)r.topics.push(ln.decode(n,n.uint32()));else n.skipType(7&e)}return r},fromJSON(e){const t={...sn};if(t.topics=[],void 0!==e.topics&&null!==e.topics)for(const n of e.topics)t.topics.push(ln.fromJSON(n));return t},toJSON(e){const t={};return e.topics?t.topics=e.topics.map((e=>e?ln.toJSON(e):void 0)):t.topics=[],t},fromPartial(e){const t={...sn};if(t.topics=[],void 0!==e.topics&&null!==e.topics)for(const n of e.topics)t.topics.push(ln.fromPartial(n));return t}},on={uri:"",title:""},ln={encode:(e,t=Vt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.title&&t.uint32(18).string(e.title),t),decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...on};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.uri=n.string();break;case 2:r.title=n.string();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...on};return void 0!==e.uri&&null!==e.uri?t.uri=String(e.uri):t.uri="",void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",t},toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.title&&(t.title=e.title),t},fromPartial(e){const t={...on};return void 0!==e.uri&&null!==e.uri?t.uri=e.uri:t.uri="",void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",t}},cn={htmlDescription:""},un={encode:(e,t=Vt().Writer.create())=>(void 0!==e.header&&mn.encode(e.header,t.uint32(10).fork()).ldelim(),""!==e.htmlDescription&&t.uint32(18).string(e.htmlDescription),t),decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...cn};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.header=mn.decode(n,n.uint32());break;case 2:r.htmlDescription=n.string();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...cn};return void 0!==e.header&&null!==e.header?t.header=mn.fromJSON(e.header):t.header=void 0,void 0!==e.htmlDescription&&null!==e.htmlDescription?t.htmlDescription=String(e.htmlDescription):t.htmlDescription="",t},toJSON(e){const t={};return void 0!==e.header&&(t.header=e.header?mn.toJSON(e.header):void 0),void 0!==e.htmlDescription&&(t.htmlDescription=e.htmlDescription),t},fromPartial(e){const t={...cn};return void 0!==e.header&&null!==e.header?t.header=mn.fromPartial(e.header):t.header=void 0,void 0!==e.htmlDescription&&null!==e.htmlDescription?t.htmlDescription=e.htmlDescription:t.htmlDescription="",t}},dn={},mn={encode:(e,t=Vt().Writer.create())=>t,decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...dn};for(;n.pos<i;){const e=n.uint32();n.skipType(7&e)}return r},fromJSON:e=>({...dn}),toJSON:e=>({}),fromPartial:e=>({...dn})};Vt().util.Long!==Ft.A&&(Vt().util.Long=Ft.A,Vt().configure());let pn=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.TALK=1]="TALK",e[e.MUSIC=2]="MUSIC",e[e.UPSELL=3]="UPSELL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const hn={episodeUri:"",canUpsell:!1,albumMosaicUri:"",artists:"",durationMs:0},gn={encode(e,t=Vt().Writer.create()){""!==e.episodeUri&&t.uint32(10).string(e.episodeUri);for(const n of e.playbackSegments)bn.encode(n,t.uint32(18).fork()).ldelim();for(const n of e.embeddedSegments)yn.encode(n,t.uint32(26).fork()).ldelim();!0===e.canUpsell&&t.uint32(32).bool(e.canUpsell),""!==e.albumMosaicUri&&t.uint32(42).string(e.albumMosaicUri);for(const n of e.artists)t.uint32(50).string(n);return 0!==e.durationMs&&t.uint32(56).int32(e.durationMs),t},decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...hn};for(r.playbackSegments=[],r.embeddedSegments=[],r.artists=[];n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.episodeUri=n.string();break;case 2:r.playbackSegments.push(bn.decode(n,n.uint32()));break;case 3:r.embeddedSegments.push(yn.decode(n,n.uint32()));break;case 4:r.canUpsell=n.bool();break;case 5:r.albumMosaicUri=n.string();break;case 6:r.artists.push(n.string());break;case 7:r.durationMs=n.int32();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...hn};return t.episodeUri=void 0!==e.episodeUri&&null!==e.episodeUri?String(e.episodeUri):"",t.playbackSegments=(e.playbackSegments??[]).map((e=>bn.fromJSON(e))),t.embeddedSegments=(e.embeddedSegments??[]).map((e=>yn.fromJSON(e))),t.canUpsell=void 0!==e.canUpsell&&null!==e.canUpsell&&Boolean(e.canUpsell),t.albumMosaicUri=void 0!==e.albumMosaicUri&&null!==e.albumMosaicUri?String(e.albumMosaicUri):"",t.artists=(e.artists??[]).map((e=>String(e))),t.durationMs=void 0!==e.durationMs&&null!==e.durationMs?Number(e.durationMs):0,t},toJSON(e){const t={};return void 0!==e.episodeUri&&(t.episodeUri=e.episodeUri),e.playbackSegments?t.playbackSegments=e.playbackSegments.map((e=>e?bn.toJSON(e):void 0)):t.playbackSegments=[],e.embeddedSegments?t.embeddedSegments=e.embeddedSegments.map((e=>e?yn.toJSON(e):void 0)):t.embeddedSegments=[],void 0!==e.canUpsell&&(t.canUpsell=e.canUpsell),void 0!==e.albumMosaicUri&&(t.albumMosaicUri=e.albumMosaicUri),e.artists?t.artists=e.artists.map((e=>e)):t.artists=[],void 0!==e.durationMs&&(t.durationMs=e.durationMs),t},fromPartial(e){const t={...hn};return t.episodeUri=e.episodeUri??"",t.playbackSegments=(e.playbackSegments??[]).map((e=>bn.fromPartial(e))),t.embeddedSegments=(e.embeddedSegments??[]).map((e=>yn.fromPartial(e))),t.canUpsell=e.canUpsell??!1,t.albumMosaicUri=e.albumMosaicUri??"",t.artists=(e.artists??[]).map((e=>e)),t.durationMs=e.durationMs??0,t}},fn={uri:"",startMs:0,stopMs:0,durationMs:0,type:0,title:"",subtitle:"",imageUrl:"",actionUrl:"",isAbridged:!1},bn={encode:(e,t=Vt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),0!==e.startMs&&t.uint32(16).int32(e.startMs),0!==e.stopMs&&t.uint32(24).int32(e.stopMs),0!==e.durationMs&&t.uint32(32).int32(e.durationMs),0!==e.type&&t.uint32(40).int32(e.type),""!==e.title&&t.uint32(50).string(e.title),""!==e.subtitle&&t.uint32(58).string(e.subtitle),""!==e.imageUrl&&t.uint32(66).string(e.imageUrl),""!==e.actionUrl&&t.uint32(74).string(e.actionUrl),!0===e.isAbridged&&t.uint32(80).bool(e.isAbridged),t),decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...fn};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.uri=n.string();break;case 2:r.startMs=n.int32();break;case 3:r.stopMs=n.int32();break;case 4:r.durationMs=n.int32();break;case 5:r.type=n.int32();break;case 6:r.title=n.string();break;case 7:r.subtitle=n.string();break;case 8:r.imageUrl=n.string();break;case 9:r.actionUrl=n.string();break;case 10:r.isAbridged=n.bool();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...fn};return t.uri=void 0!==e.uri&&null!==e.uri?String(e.uri):"",t.startMs=void 0!==e.startMs&&null!==e.startMs?Number(e.startMs):0,t.stopMs=void 0!==e.stopMs&&null!==e.stopMs?Number(e.stopMs):0,t.durationMs=void 0!==e.durationMs&&null!==e.durationMs?Number(e.durationMs):0,t.type=void 0!==e.type&&null!==e.type?function(e){switch(e){case 0:case"UNKNOWN":return pn.UNKNOWN;case 1:case"TALK":return pn.TALK;case 2:case"MUSIC":return pn.MUSIC;case 3:case"UPSELL":return pn.UPSELL;default:return pn.UNRECOGNIZED}}(e.type):0,t.title=void 0!==e.title&&null!==e.title?String(e.title):"",t.subtitle=void 0!==e.subtitle&&null!==e.subtitle?String(e.subtitle):"",t.imageUrl=void 0!==e.imageUrl&&null!==e.imageUrl?String(e.imageUrl):"",t.actionUrl=void 0!==e.actionUrl&&null!==e.actionUrl?String(e.actionUrl):"",t.isAbridged=void 0!==e.isAbridged&&null!==e.isAbridged&&Boolean(e.isAbridged),t},toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.startMs&&(t.startMs=e.startMs),void 0!==e.stopMs&&(t.stopMs=e.stopMs),void 0!==e.durationMs&&(t.durationMs=e.durationMs),void 0!==e.type&&(t.type=function(e){switch(e){case pn.UNKNOWN:return"UNKNOWN";case pn.TALK:return"TALK";case pn.MUSIC:return"MUSIC";case pn.UPSELL:return"UPSELL";default:return"UNKNOWN"}}(e.type)),void 0!==e.title&&(t.title=e.title),void 0!==e.subtitle&&(t.subtitle=e.subtitle),void 0!==e.imageUrl&&(t.imageUrl=e.imageUrl),void 0!==e.actionUrl&&(t.actionUrl=e.actionUrl),void 0!==e.isAbridged&&(t.isAbridged=e.isAbridged),t},fromPartial(e){const t={...fn};return t.uri=e.uri??"",t.startMs=e.startMs??0,t.stopMs=e.stopMs??0,t.durationMs=e.durationMs??0,t.type=e.type??0,t.title=e.title??"",t.subtitle=e.subtitle??"",t.imageUrl=e.imageUrl??"",t.actionUrl=e.actionUrl??"",t.isAbridged=e.isAbridged??!1,t}},vn={uri:"",absoluteStartMs:0,absoluteStopMs:0},yn={encode:(e,t=Vt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),0!==e.absoluteStartMs&&t.uint32(16).int32(e.absoluteStartMs),0!==e.absoluteStopMs&&t.uint32(24).int32(e.absoluteStopMs),t),decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...vn};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.uri=n.string();break;case 2:r.absoluteStartMs=n.int32();break;case 3:r.absoluteStopMs=n.int32();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...vn};return t.uri=void 0!==e.uri&&null!==e.uri?String(e.uri):"",t.absoluteStartMs=void 0!==e.absoluteStartMs&&null!==e.absoluteStartMs?Number(e.absoluteStartMs):0,t.absoluteStopMs=void 0!==e.absoluteStopMs&&null!==e.absoluteStopMs?Number(e.absoluteStopMs):0,t},toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.absoluteStartMs&&(t.absoluteStartMs=e.absoluteStartMs),void 0!==e.absoluteStopMs&&(t.absoluteStopMs=e.absoluteStopMs),t},fromPartial(e){const t={...vn};return t.uri=e.uri??"",t.absoluteStartMs=e.absoluteStartMs??0,t.absoluteStopMs=e.absoluteStopMs??0,t}};Vt().util.Long!==Ft.A&&(Vt().util.Long=Ft.A,Vt().configure());const _n={encode(e,t=Vt().Writer.create()){""!==e.episodeUri&&t.uint32(10).string(e.episodeUri);for(const n of e.transcripts)En.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={episodeUri:"",transcripts:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.episodeUri=n.string();break;case 2:r.transcripts.push(En.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return r},fromJSON:e=>({episodeUri:xn(e.episodeUri)?String(e.episodeUri):"",transcripts:Array.isArray(e?.transcripts)?e.transcripts.map((e=>En.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.episodeUri&&(t.episodeUri=e.episodeUri),e.transcripts?t.transcripts=e.transcripts.map((e=>e?En.toJSON(e):void 0)):t.transcripts=[],t},fromPartial(e){const t={episodeUri:"",transcripts:[]};return t.episodeUri=e.episodeUri??"",t.transcripts=e.transcripts?.map((e=>En.fromPartial(e)))||[],t}};const En={encode:(e,t=Vt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.language&&t.uint32(18).string(e.language),!0===e.curated&&t.uint32(24).bool(e.curated),""!==e.cdnUrl&&t.uint32(34).string(e.cdnUrl),t),decode(e,t){const n=e instanceof Vt().Reader?e:new(Vt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={uri:"",language:"",curated:!1,cdnUrl:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.uri=n.string();break;case 2:r.language=n.string();break;case 3:r.curated=n.bool();break;case 4:r.cdnUrl=n.string();break;default:n.skipType(7&e)}}return r},fromJSON:e=>({uri:xn(e.uri)?String(e.uri):"",language:xn(e.language)?String(e.language):"",curated:!!xn(e.curated)&&Boolean(e.curated),cdnUrl:xn(e.cdnUrl)?String(e.cdnUrl):""}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.language&&(t.language=e.language),void 0!==e.curated&&(t.curated=e.curated),void 0!==e.cdnUrl&&(t.cdnUrl=e.cdnUrl),t},fromPartial(e){const t={uri:"",language:"",curated:!1,cdnUrl:""};return t.uri=e.uri??"",t.language=e.language??"",t.curated=e.curated??!1,t.cdnUrl=e.cdnUrl??"",t}};function xn(e){return null!=e}Vt().util.Long!==Ft.A&&(Vt().util.Long=Ft.A,Vt().configure());const Cn={encode:(e,t=Ht.Writer.create())=>(""!==e.userId&&t.uint32(10).string(e.userId),""!==e.showUri&&t.uint32(18).string(e.showUri),0!==e.rating&&t.uint32(24).int32(e.rating),void 0!==e.ratedAt&&Kt.encode(wn(e.ratedAt),t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof Ht.Reader?e:new Ht.Reader(e);let i=void 0===t?n.len:n.pos+t;const r={userId:"",showUri:"",rating:0,ratedAt:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.userId=n.string();break;case 2:r.showUri=n.string();break;case 3:r.rating=n.int32();break;case 4:r.ratedAt=In(Kt.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return r},fromJSON:e=>({userId:Nn(e.userId)?String(e.userId):"",showUri:Nn(e.showUri)?String(e.showUri):"",rating:Nn(e.rating)?Number(e.rating):0,ratedAt:Nn(e.ratedAt)?Tn(e.ratedAt):void 0}),toJSON(e){const t={};return void 0!==e.userId&&(t.userId=e.userId),void 0!==e.showUri&&(t.showUri=e.showUri),void 0!==e.rating&&(t.rating=Math.round(e.rating)),void 0!==e.ratedAt&&(t.ratedAt=e.ratedAt.toISOString()),t},fromPartial(e){const t={userId:"",showUri:"",rating:0,ratedAt:void 0};return t.userId=e.userId??"",t.showUri=e.showUri??"",t.rating=e.rating??0,t.ratedAt=e.ratedAt??void 0,t}};const Sn={encode:(e,t=Ht.Writer.create())=>(0!==e.average&&t.uint32(9).double(e.average),"0"!==e.totalRatings&&t.uint32(16).int64(e.totalRatings),!0===e.showAverage&&t.uint32(24).bool(e.showAverage),t),decode(e,t){const n=e instanceof Ht.Reader?e:new Ht.Reader(e);let i=void 0===t?n.len:n.pos+t;const r={average:0,totalRatings:"0",showAverage:!1};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.average=n.double();break;case 2:r.totalRatings=n.int64().toString();break;case 3:r.showAverage=n.bool();break;default:n.skipType(7&e)}}return r},fromJSON:e=>({average:Nn(e.average)?Number(e.average):0,totalRatings:Nn(e.totalRatings)?String(e.totalRatings):"0",showAverage:!!Nn(e.showAverage)&&Boolean(e.showAverage)}),toJSON(e){const t={};return void 0!==e.average&&(t.average=e.average),void 0!==e.totalRatings&&(t.totalRatings=e.totalRatings),void 0!==e.showAverage&&(t.showAverage=e.showAverage),t},fromPartial(e){const t={average:0,totalRatings:"0",showAverage:!1};return t.average=e.average??0,t.totalRatings=e.totalRatings??"0",t.showAverage=e.showAverage??!1,t}};const An={encode:(e,t=Ht.Writer.create())=>(void 0!==e.averageRating&&Sn.encode(e.averageRating,t.uint32(10).fork()).ldelim(),void 0!==e.rating&&Cn.encode(e.rating,t.uint32(18).fork()).ldelim(),!0===e.canRate&&t.uint32(24).bool(e.canRate),t),decode(e,t){const n=e instanceof Ht.Reader?e:new Ht.Reader(e);let i=void 0===t?n.len:n.pos+t;const r={averageRating:void 0,rating:void 0,canRate:!1};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.averageRating=Sn.decode(n,n.uint32());break;case 2:r.rating=Cn.decode(n,n.uint32());break;case 3:r.canRate=n.bool();break;default:n.skipType(7&e)}}return r},fromJSON:e=>({averageRating:Nn(e.averageRating)?Sn.fromJSON(e.averageRating):void 0,rating:Nn(e.rating)?Cn.fromJSON(e.rating):void 0,canRate:!!Nn(e.canRate)&&Boolean(e.canRate)}),toJSON(e){const t={};return void 0!==e.averageRating&&(t.averageRating=e.averageRating?Sn.toJSON(e.averageRating):void 0),void 0!==e.rating&&(t.rating=e.rating?Cn.toJSON(e.rating):void 0),void 0!==e.canRate&&(t.canRate=e.canRate),t},fromPartial(e){const t={averageRating:void 0,rating:void 0,canRate:!1};return t.averageRating=void 0!==e.averageRating&&null!==e.averageRating?Sn.fromPartial(e.averageRating):void 0,t.rating=void 0!==e.rating&&null!==e.rating?Cn.fromPartial(e.rating):void 0,t.canRate=e.canRate??!1,t}};function wn(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function In(e){let t=1e3*Number(e.seconds);return t+=e.nanos/1e6,new Date(t)}function Tn(e){return e instanceof Date?e:"string"==typeof e?new Date(e):In(Kt.fromJSON(e))}function Nn(e){return null!=e}Ht.util.Long!==Ft.A&&(Ht.util.Long=Ft.A,Ht.configure());let Rn=function(e){return e[e.COPYRIGHT_TYPE_UNSPECIFIED=0]="COPYRIGHT_TYPE_UNSPECIFIED",e[e.COPYRIGHT_TYPE_P=1]="COPYRIGHT_TYPE_P",e[e.COPYRIGHT_TYPE_C=2]="COPYRIGHT_TYPE_C",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function kn(e){switch(e){case 0:case"COPYRIGHT_TYPE_UNSPECIFIED":return Rn.COPYRIGHT_TYPE_UNSPECIFIED;case 1:case"COPYRIGHT_TYPE_P":return Rn.COPYRIGHT_TYPE_P;case 2:case"COPYRIGHT_TYPE_C":return Rn.COPYRIGHT_TYPE_C;default:return Rn.UNRECOGNIZED}}const On={encode(e,t=Vt().Writer.create()){""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.type&&t.uint32(18).string(e.type),""!==e.name&&t.uint32(26).string(e.name);for(const n of e.agents)Dn.encode(n,t.uint32(34).fork()).ldelim();for(const n of e.covers)Ln.encode(n,t.uint32(42).fork()).ldelim();void 0!==e.explicit&&t.uint32(48).bool(e.explicit);for(const n of e.copyright)Pn.encode(n,t.uint32(58).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={uri:"",type:void 0,name:"",agents:[],covers:[],explicit:void 0,copyright:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=n.string();continue;case 2:if(18!==e)break;r.type=n.string();continue;case 3:if(26!==e)break;r.name=n.string();continue;case 4:if(34!==e)break;r.agents.push(Dn.decode(n,n.uint32()));continue;case 5:if(42!==e)break;r.covers.push(Ln.decode(n,n.uint32()));continue;case 6:if(48!==e)break;r.explicit=n.bool();continue;case 7:if(58!==e)break;r.copyright.push(Pn.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({uri:Bn(e.uri)?globalThis.String(e.uri):"",type:Bn(e.type)?globalThis.String(e.type):void 0,name:Bn(e.name)?globalThis.String(e.name):"",agents:globalThis.Array.isArray(e?.agents)?e.agents.map((e=>Dn.fromJSON(e))):[],covers:globalThis.Array.isArray(e?.covers)?e.covers.map((e=>Ln.fromJSON(e))):[],explicit:Bn(e.explicit)?globalThis.Boolean(e.explicit):void 0,copyright:globalThis.Array.isArray(e?.copyright)?e.copyright.map((e=>Pn.fromJSON(e))):[]}),toJSON(e){const t={};return""!==e.uri&&(t.uri=e.uri),void 0!==e.type&&(t.type=e.type),""!==e.name&&(t.name=e.name),e.agents?.length&&(t.agents=e.agents.map((e=>Dn.toJSON(e)))),e.covers?.length&&(t.covers=e.covers.map((e=>Ln.toJSON(e)))),void 0!==e.explicit&&(t.explicit=e.explicit),e.copyright?.length&&(t.copyright=e.copyright.map((e=>Pn.toJSON(e)))),t},create:e=>On.fromPartial(e??{}),fromPartial(e){const t={uri:"",type:void 0,name:"",agents:[],covers:[],explicit:void 0,copyright:[]};return t.uri=e.uri??"",t.type=e.type??void 0,t.name=e.name??"",t.agents=e.agents?.map((e=>Dn.fromPartial(e)))||[],t.covers=e.covers?.map((e=>Ln.fromPartial(e)))||[],t.explicit=e.explicit??void 0,t.copyright=e.copyright?.map((e=>Pn.fromPartial(e)))||[],t}};const Pn={encode:(e,t=Vt().Writer.create())=>(void 0!==e.type&&t.uint32(8).int32(e.type),void 0!==e.text&&t.uint32(18).string(e.text),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={type:void 0,text:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;r.type=n.int32();continue;case 2:if(18!==e)break;r.text=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({type:Bn(e.type)?kn(e.type):void 0,text:Bn(e.text)?globalThis.String(e.text):void 0}),toJSON(e){const t={};return void 0!==e.type&&(t.type=function(e){switch(e){case Rn.COPYRIGHT_TYPE_UNSPECIFIED:return"COPYRIGHT_TYPE_UNSPECIFIED";case Rn.COPYRIGHT_TYPE_P:return"COPYRIGHT_TYPE_P";case Rn.COPYRIGHT_TYPE_C:return"COPYRIGHT_TYPE_C";case Rn.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),void 0!==e.text&&(t.text=e.text),t},create:e=>Pn.fromPartial(e??{}),fromPartial(e){const t={type:void 0,text:void 0};return t.type=e.type??void 0,t.text=e.text??void 0,t}};const jn={encode:(e,t=Vt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.releaseTime&&Kt.encode(function(e){const t=Math.trunc(e.getTime()/1e3).toString(),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}(e.releaseTime),t.uint32(18).fork()).ldelim(),void 0!==e.entity&&On.encode(e.entity,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={uri:"",releaseTime:void 0,entity:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=n.string();continue;case 2:if(18!==e)break;r.releaseTime=Un(Kt.decode(n,n.uint32()));continue;case 3:if(26!==e)break;r.entity=On.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({uri:Bn(e.uri)?globalThis.String(e.uri):"",releaseTime:Bn(e.releaseTime)?Mn(e.releaseTime):void 0,entity:Bn(e.entity)?On.fromJSON(e.entity):void 0}),toJSON(e){const t={};return""!==e.uri&&(t.uri=e.uri),void 0!==e.releaseTime&&(t.releaseTime=e.releaseTime.toISOString()),void 0!==e.entity&&(t.entity=On.toJSON(e.entity)),t},create:e=>jn.fromPartial(e??{}),fromPartial(e){const t={uri:"",releaseTime:void 0,entity:void 0};return t.uri=e.uri??"",t.releaseTime=e.releaseTime??void 0,t.entity=void 0!==e.entity&&null!==e.entity?On.fromPartial(e.entity):void 0,t}};const Ln={encode:(e,t=Vt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.size&&t.uint32(18).string(e.size),void 0!==e.width&&t.uint32(24).sint32(e.width),void 0!==e.height&&t.uint32(32).sint32(e.height),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={uri:"",size:"",width:void 0,height:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=n.string();continue;case 2:if(18!==e)break;r.size=n.string();continue;case 3:if(24!==e)break;r.width=n.sint32();continue;case 4:if(32!==e)break;r.height=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({uri:Bn(e.uri)?globalThis.String(e.uri):"",size:Bn(e.size)?globalThis.String(e.size):"",width:Bn(e.width)?globalThis.Number(e.width):void 0,height:Bn(e.height)?globalThis.Number(e.height):void 0}),toJSON(e){const t={};return""!==e.uri&&(t.uri=e.uri),""!==e.size&&(t.size=e.size),void 0!==e.width&&(t.width=Math.round(e.width)),void 0!==e.height&&(t.height=Math.round(e.height)),t},create:e=>Ln.fromPartial(e??{}),fromPartial(e){const t={uri:"",size:"",width:void 0,height:void 0};return t.uri=e.uri??"",t.size=e.size??"",t.width=e.width??void 0,t.height=e.height??void 0,t}};const Dn={encode:(e,t=Vt().Writer.create())=>(void 0!==e.uri&&t.uint32(10).string(e.uri),""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={uri:void 0,name:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=n.string();continue;case 2:if(18!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({uri:Bn(e.uri)?globalThis.String(e.uri):void 0,name:Bn(e.name)?globalThis.String(e.name):""}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),""!==e.name&&(t.name=e.name),t},create:e=>Dn.fromPartial(e??{}),fromPartial(e){const t={uri:void 0,name:""};return t.uri=e.uri??void 0,t.name=e.name??"",t}};function Un(e){let t=1e3*(globalThis.Number(e.seconds)||0);return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function Mn(e){return e instanceof globalThis.Date?e:"string"==typeof e?new globalThis.Date(e):Un(Kt.fromJSON(e))}function Bn(e){return null!=e}var Fn=n(79162);const Hn={encode:(e,t=Vt().Writer.create())=>(!0===e.enabled&&t.uint32(8).bool(e.enabled),""!==e.uri&&t.uint32(18).string(e.uri),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={enabled:!1,uri:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;r.enabled=n.bool();continue;case 2:if(18!==e)break;r.uri=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Hn.fromPartial(e??{}),fromPartial(e){const t={enabled:!1,uri:""};return t.enabled=e.enabled??!1,t.uri=e.uri??"",t}};const Vn={encode:(e,t=Vt().Writer.create())=>(""!==e.language&&t.uint32(10).string(e.language),""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={language:"",value:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.language=n.string();continue;case 2:if(18!==e)break;r.value=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Vn.fromPartial(e??{}),fromPartial(e){const t={language:"",value:""};return t.language=e.language??"",t.value=e.value??"",t}};function zn(){return{gid:new Uint8Array,name:"",localizedName:[],description:"",deprecatedPopularity:0,publisher:"",language:"",explicit:!1,coverImage:void 0,episode:[],copyright:[],restriction:[],keyword:[],mediaType:0,consumptionOrder:1,interpretRestrictionUsingGeoip:!1,salePeriod:[],availability:[],countryOfOrigin:"",categories:[],passthrough:0,employeeOnly:!1,trailerUri:"",isAudiobook:!1,isCreatorChannel:!1}}const Gn={encode(e,t=Vt().Writer.create()){0!==e.gid.length&&t.uint32(10).bytes(e.gid),""!==e.name&&t.uint32(18).string(e.name);for(const n of e.localizedName)Vn.encode(n,t.uint32(234).fork()).ldelim();""!==e.description&&t.uint32(514).string(e.description),0!==e.deprecatedPopularity&&t.uint32(520).sint32(e.deprecatedPopularity),""!==e.publisher&&t.uint32(530).string(e.publisher),""!==e.language&&t.uint32(538).string(e.language),!0===e.explicit&&t.uint32(544).bool(e.explicit),void 0!==e.coverImage&&Xn.encode(e.coverImage,t.uint32(554).fork()).ldelim();for(const n of e.episode)Kn.encode(n,t.uint32(562).fork()).ldelim();for(const n of e.copyright)Jn.encode(n,t.uint32(570).fork()).ldelim();for(const n of e.restriction)ei.encode(n,t.uint32(578).fork()).ldelim();for(const n of e.keyword)t.uint32(586).string(n);0!==e.mediaType&&t.uint32(592).int32(e.mediaType),1!==e.consumptionOrder&&t.uint32(600).int32(e.consumptionOrder),!0===e.interpretRestrictionUsingGeoip&&t.uint32(608).bool(e.interpretRestrictionUsingGeoip);for(const n of e.salePeriod)ri.encode(n,t.uint32(618).fork()).ldelim();for(const n of e.availability)ti.encode(n,t.uint32(626).fork()).ldelim();""!==e.countryOfOrigin&&t.uint32(634).string(e.countryOfOrigin);for(const n of e.categories)ni.encode(n,t.uint32(642).fork()).ldelim();return 0!==e.passthrough&&t.uint32(648).int32(e.passthrough),!0===e.employeeOnly&&t.uint32(656).bool(e.employeeOnly),""!==e.trailerUri&&t.uint32(666).string(e.trailerUri),!0===e.isAudiobook&&t.uint32(712).bool(e.isAudiobook),!0===e.isCreatorChannel&&t.uint32(720).bool(e.isCreatorChannel),t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=zn();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.gid=n.bytes();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 29:if(234!==e)break;r.localizedName.push(Vn.decode(n,n.uint32()));continue;case 64:if(514!==e)break;r.description=n.string();continue;case 65:if(520!==e)break;r.deprecatedPopularity=n.sint32();continue;case 66:if(530!==e)break;r.publisher=n.string();continue;case 67:if(538!==e)break;r.language=n.string();continue;case 68:if(544!==e)break;r.explicit=n.bool();continue;case 69:if(554!==e)break;r.coverImage=Xn.decode(n,n.uint32());continue;case 70:if(562!==e)break;r.episode.push(Kn.decode(n,n.uint32()));continue;case 71:if(570!==e)break;r.copyright.push(Jn.decode(n,n.uint32()));continue;case 72:if(578!==e)break;r.restriction.push(ei.decode(n,n.uint32()));continue;case 73:if(586!==e)break;r.keyword.push(n.string());continue;case 74:if(592!==e)break;r.mediaType=n.int32();continue;case 75:if(600!==e)break;r.consumptionOrder=n.int32();continue;case 76:if(608!==e)break;r.interpretRestrictionUsingGeoip=n.bool();continue;case 77:if(618!==e)break;r.salePeriod.push(ri.decode(n,n.uint32()));continue;case 78:if(626!==e)break;r.availability.push(ti.decode(n,n.uint32()));continue;case 79:if(634!==e)break;r.countryOfOrigin=n.string();continue;case 80:if(642!==e)break;r.categories.push(ni.decode(n,n.uint32()));continue;case 81:if(648!==e)break;r.passthrough=n.int32();continue;case 82:if(656!==e)break;r.employeeOnly=n.bool();continue;case 83:if(666!==e)break;r.trailerUri=n.string();continue;case 89:if(712!==e)break;r.isAudiobook=n.bool();continue;case 90:if(720!==e)break;r.isCreatorChannel=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Gn.fromPartial(e??{}),fromPartial(e){const t=zn();return t.gid=e.gid??new Uint8Array,t.name=e.name??"",t.localizedName=e.localizedName?.map((e=>Vn.fromPartial(e)))||[],t.description=e.description??"",t.deprecatedPopularity=e.deprecatedPopularity??0,t.publisher=e.publisher??"",t.language=e.language??"",t.explicit=e.explicit??!1,t.coverImage=void 0!==e.coverImage&&null!==e.coverImage?Xn.fromPartial(e.coverImage):void 0,t.episode=e.episode?.map((e=>Kn.fromPartial(e)))||[],t.copyright=e.copyright?.map((e=>Jn.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>ei.fromPartial(e)))||[],t.keyword=e.keyword?.map((e=>e))||[],t.mediaType=e.mediaType??0,t.consumptionOrder=e.consumptionOrder??1,t.interpretRestrictionUsingGeoip=e.interpretRestrictionUsingGeoip??!1,t.salePeriod=e.salePeriod?.map((e=>ri.fromPartial(e)))||[],t.availability=e.availability?.map((e=>ti.fromPartial(e)))||[],t.countryOfOrigin=e.countryOfOrigin??"",t.categories=e.categories?.map((e=>ni.fromPartial(e)))||[],t.passthrough=e.passthrough??0,t.employeeOnly=e.employeeOnly??!1,t.trailerUri=e.trailerUri??"",t.isAudiobook=e.isAudiobook??!1,t.isCreatorChannel=e.isCreatorChannel??!1,t}};function Wn(){return{gid:new Uint8Array,name:"",duration:0,audio:[],localizedName:[],description:"",number:0,publishTime:void 0,deprecatedPopularity:0,coverImage:void 0,language:"",explicit:!1,show:void 0,video:[],videoPreview:[],audioPreview:[],restriction:[],freezeFrame:void 0,keyword:[],interpretRestrictionUsingGeoip:!1,suppressMonetization:!1,salePeriod:[],allowBackgroundPlayback:!1,availability:[],externalUrl:"",originalAudio:void 0,employeeOnly:!1,rssGuid:"",type:0,seasonNumber:0,episodeNumber:0,isAudiobookChapter:!1}}const Kn={encode(e,t=Vt().Writer.create()){0!==e.gid.length&&t.uint32(10).bytes(e.gid),""!==e.name&&t.uint32(18).string(e.name),0!==e.duration&&t.uint32(56).sint32(e.duration);for(const n of e.audio)ai.encode(n,t.uint32(98).fork()).ldelim();for(const n of e.localizedName)Vn.encode(n,t.uint32(186).fork()).ldelim();""!==e.description&&t.uint32(514).string(e.description),0!==e.number&&t.uint32(520).sint32(e.number),void 0!==e.publishTime&&Qn.encode(e.publishTime,t.uint32(530).fork()).ldelim(),0!==e.deprecatedPopularity&&t.uint32(536).sint32(e.deprecatedPopularity),void 0!==e.coverImage&&Xn.encode(e.coverImage,t.uint32(546).fork()).ldelim(),""!==e.language&&t.uint32(554).string(e.language),!0===e.explicit&&t.uint32(560).bool(e.explicit),void 0!==e.show&&Gn.encode(e.show,t.uint32(570).fork()).ldelim();for(const n of e.video)li.encode(n,t.uint32(578).fork()).ldelim();for(const n of e.videoPreview)li.encode(n,t.uint32(586).fork()).ldelim();for(const n of e.audioPreview)ai.encode(n,t.uint32(594).fork()).ldelim();for(const n of e.restriction)ei.encode(n,t.uint32(602).fork()).ldelim();void 0!==e.freezeFrame&&Xn.encode(e.freezeFrame,t.uint32(610).fork()).ldelim();for(const n of e.keyword)t.uint32(618).string(n);!0===e.interpretRestrictionUsingGeoip&&t.uint32(624).bool(e.interpretRestrictionUsingGeoip),!0===e.suppressMonetization&&t.uint32(632).bool(e.suppressMonetization);for(const n of e.salePeriod)ri.encode(n,t.uint32(642).fork()).ldelim();!0===e.allowBackgroundPlayback&&t.uint32(648).bool(e.allowBackgroundPlayback);for(const n of e.availability)ti.encode(n,t.uint32(658).fork()).ldelim();return""!==e.externalUrl&&t.uint32(666).string(e.externalUrl),void 0!==e.originalAudio&&qn.encode(e.originalAudio,t.uint32(674).fork()).ldelim(),!0===e.employeeOnly&&t.uint32(680).bool(e.employeeOnly),""!==e.rssGuid&&t.uint32(690).string(e.rssGuid),0!==e.type&&t.uint32(696).int32(e.type),0!==e.seasonNumber&&t.uint32(704).int32(e.seasonNumber),0!==e.episodeNumber&&t.uint32(712).int32(e.episodeNumber),!0===e.isAudiobookChapter&&t.uint32(768).bool(e.isAudiobookChapter),t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=Wn();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.gid=n.bytes();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 7:if(56!==e)break;r.duration=n.sint32();continue;case 12:if(98!==e)break;r.audio.push(ai.decode(n,n.uint32()));continue;case 23:if(186!==e)break;r.localizedName.push(Vn.decode(n,n.uint32()));continue;case 64:if(514!==e)break;r.description=n.string();continue;case 65:if(520!==e)break;r.number=n.sint32();continue;case 66:if(530!==e)break;r.publishTime=Qn.decode(n,n.uint32());continue;case 67:if(536!==e)break;r.deprecatedPopularity=n.sint32();continue;case 68:if(546!==e)break;r.coverImage=Xn.decode(n,n.uint32());continue;case 69:if(554!==e)break;r.language=n.string();continue;case 70:if(560!==e)break;r.explicit=n.bool();continue;case 71:if(570!==e)break;r.show=Gn.decode(n,n.uint32());continue;case 72:if(578!==e)break;r.video.push(li.decode(n,n.uint32()));continue;case 73:if(586!==e)break;r.videoPreview.push(li.decode(n,n.uint32()));continue;case 74:if(594!==e)break;r.audioPreview.push(ai.decode(n,n.uint32()));continue;case 75:if(602!==e)break;r.restriction.push(ei.decode(n,n.uint32()));continue;case 76:if(610!==e)break;r.freezeFrame=Xn.decode(n,n.uint32());continue;case 77:if(618!==e)break;r.keyword.push(n.string());continue;case 78:if(624!==e)break;r.interpretRestrictionUsingGeoip=n.bool();continue;case 79:if(632!==e)break;r.suppressMonetization=n.bool();continue;case 80:if(642!==e)break;r.salePeriod.push(ri.decode(n,n.uint32()));continue;case 81:if(648!==e)break;r.allowBackgroundPlayback=n.bool();continue;case 82:if(658!==e)break;r.availability.push(ti.decode(n,n.uint32()));continue;case 83:if(666!==e)break;r.externalUrl=n.string();continue;case 84:if(674!==e)break;r.originalAudio=qn.decode(n,n.uint32());continue;case 85:if(680!==e)break;r.employeeOnly=n.bool();continue;case 86:if(690!==e)break;r.rssGuid=n.string();continue;case 87:if(696!==e)break;r.type=n.int32();continue;case 88:if(704!==e)break;r.seasonNumber=n.int32();continue;case 89:if(712!==e)break;r.episodeNumber=n.int32();continue;case 96:if(768!==e)break;r.isAudiobookChapter=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Kn.fromPartial(e??{}),fromPartial(e){const t=Wn();return t.gid=e.gid??new Uint8Array,t.name=e.name??"",t.duration=e.duration??0,t.audio=e.audio?.map((e=>ai.fromPartial(e)))||[],t.localizedName=e.localizedName?.map((e=>Vn.fromPartial(e)))||[],t.description=e.description??"",t.number=e.number??0,t.publishTime=void 0!==e.publishTime&&null!==e.publishTime?Qn.fromPartial(e.publishTime):void 0,t.deprecatedPopularity=e.deprecatedPopularity??0,t.coverImage=void 0!==e.coverImage&&null!==e.coverImage?Xn.fromPartial(e.coverImage):void 0,t.language=e.language??"",t.explicit=e.explicit??!1,t.show=void 0!==e.show&&null!==e.show?Gn.fromPartial(e.show):void 0,t.video=e.video?.map((e=>li.fromPartial(e)))||[],t.videoPreview=e.videoPreview?.map((e=>li.fromPartial(e)))||[],t.audioPreview=e.audioPreview?.map((e=>ai.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>ei.fromPartial(e)))||[],t.freezeFrame=void 0!==e.freezeFrame&&null!==e.freezeFrame?Xn.fromPartial(e.freezeFrame):void 0,t.keyword=e.keyword?.map((e=>e))||[],t.interpretRestrictionUsingGeoip=e.interpretRestrictionUsingGeoip??!1,t.suppressMonetization=e.suppressMonetization??!1,t.salePeriod=e.salePeriod?.map((e=>ri.fromPartial(e)))||[],t.allowBackgroundPlayback=e.allowBackgroundPlayback??!1,t.availability=e.availability?.map((e=>ti.fromPartial(e)))||[],t.externalUrl=e.externalUrl??"",t.originalAudio=void 0!==e.originalAudio&&null!==e.originalAudio?qn.fromPartial(e.originalAudio):void 0,t.employeeOnly=e.employeeOnly??!1,t.rssGuid=e.rssGuid??"",t.type=e.type??0,t.seasonNumber=e.seasonNumber??0,t.episodeNumber=e.episodeNumber??0,t.isAudiobookChapter=e.isAudiobookChapter??!1,t}};function Yn(){return{uuid:new Uint8Array}}const qn={encode:(e,t=Vt().Writer.create())=>(0!==e.uuid.length&&t.uint32(10).bytes(e.uuid),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=Yn();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uuid=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>qn.fromPartial(e??{}),fromPartial(e){const t=Yn();return t.uuid=e.uuid??new Uint8Array,t}};const Qn={encode:(e,t=Vt().Writer.create())=>(0!==e.year&&t.uint32(8).sint32(e.year),0!==e.month&&t.uint32(16).sint32(e.month),0!==e.day&&t.uint32(24).sint32(e.day),0!==e.hour&&t.uint32(32).sint32(e.hour),0!==e.minute&&t.uint32(40).sint32(e.minute),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={year:0,month:0,day:0,hour:0,minute:0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;r.year=n.sint32();continue;case 2:if(16!==e)break;r.month=n.sint32();continue;case 3:if(24!==e)break;r.day=n.sint32();continue;case 4:if(32!==e)break;r.hour=n.sint32();continue;case 5:if(40!==e)break;r.minute=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Qn.fromPartial(e??{}),fromPartial(e){const t={year:0,month:0,day:0,hour:0,minute:0};return t.year=e.year??0,t.month=e.month??0,t.day=e.day??0,t.hour=e.hour??0,t.minute=e.minute??0,t}};function $n(){return{fileId:new Uint8Array,size:0,width:0,height:0}}const Zn={encode:(e,t=Vt().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),0!==e.size&&t.uint32(16).int32(e.size),0!==e.width&&t.uint32(24).sint32(e.width),0!==e.height&&t.uint32(32).sint32(e.height),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=$n();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue;case 2:if(16!==e)break;r.size=n.int32();continue;case 3:if(24!==e)break;r.width=n.sint32();continue;case 4:if(32!==e)break;r.height=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Zn.fromPartial(e??{}),fromPartial(e){const t=$n();return t.fileId=e.fileId??new Uint8Array,t.size=e.size??0,t.width=e.width??0,t.height=e.height??0,t}};const Xn={encode(e,t=Vt().Writer.create()){for(const n of e.image)Zn.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={image:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.image.push(Zn.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Xn.fromPartial(e??{}),fromPartial(e){const t={image:[]};return t.image=e.image?.map((e=>Zn.fromPartial(e)))||[],t}};const Jn={encode:(e,t=Vt().Writer.create())=>(0!==e.type&&t.uint32(8).int32(e.type),""!==e.text&&t.uint32(18).string(e.text),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={type:0,text:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;r.type=n.int32();continue;case 2:if(18!==e)break;r.text=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Jn.fromPartial(e??{}),fromPartial(e){const t={type:0,text:""};return t.type=e.type??0,t.text=e.text??"",t}};const ei={encode(e,t=Vt().Writer.create()){t.uint32(10).fork();for(const n of e.catalogue)t.int32(n);t.ldelim(),void 0!==e.countriesAllowed&&t.uint32(18).string(e.countriesAllowed),void 0!==e.countriesForbidden&&t.uint32(26).string(e.countriesForbidden),0!==e.type&&t.uint32(32).int32(e.type);for(const n of e.catalogueStr)t.uint32(42).string(n);return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={catalogue:[],countriesAllowed:void 0,countriesForbidden:void 0,type:0,catalogueStr:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(8===e){r.catalogue.push(n.int32());continue}if(10===e){const e=n.uint32()+n.pos;for(;n.pos<e;)r.catalogue.push(n.int32());continue}break;case 2:if(18!==e)break;r.countriesAllowed=n.string();continue;case 3:if(26!==e)break;r.countriesForbidden=n.string();continue;case 4:if(32!==e)break;r.type=n.int32();continue;case 5:if(42!==e)break;r.catalogueStr.push(n.string());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>ei.fromPartial(e??{}),fromPartial(e){const t={catalogue:[],countriesAllowed:void 0,countriesForbidden:void 0,type:0,catalogueStr:[]};return t.catalogue=e.catalogue?.map((e=>e))||[],t.countriesAllowed=e.countriesAllowed??void 0,t.countriesForbidden=e.countriesForbidden??void 0,t.type=e.type??0,t.catalogueStr=e.catalogueStr?.map((e=>e))||[],t}};const ti={encode(e,t=Vt().Writer.create()){for(const n of e.catalogueStr)t.uint32(10).string(n);return void 0!==e.start&&Qn.encode(e.start,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={catalogueStr:[],start:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.catalogueStr.push(n.string());continue;case 2:if(18!==e)break;r.start=Qn.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>ti.fromPartial(e??{}),fromPartial(e){const t={catalogueStr:[],start:void 0};return t.catalogueStr=e.catalogueStr?.map((e=>e))||[],t.start=void 0!==e.start&&null!==e.start?Qn.fromPartial(e.start):void 0,t}};const ni={encode(e,t=Vt().Writer.create()){""!==e.name&&t.uint32(10).string(e.name);for(const n of e.subcategories)ii.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:"",subcategories:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.name=n.string();continue;case 2:if(18!==e)break;r.subcategories.push(ii.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>ni.fromPartial(e??{}),fromPartial(e){const t={name:"",subcategories:[]};return t.name=e.name??"",t.subcategories=e.subcategories?.map((e=>ii.fromPartial(e)))||[],t}};const ii={encode:(e,t=Vt().Writer.create())=>(""!==e.name&&t.uint32(10).string(e.name),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>ii.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const ri={encode(e,t=Vt().Writer.create()){for(const n of e.restriction)ei.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.start&&Qn.encode(e.start,t.uint32(18).fork()).ldelim(),void 0!==e.end&&Qn.encode(e.end,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={restriction:[],start:void 0,end:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.restriction.push(ei.decode(n,n.uint32()));continue;case 2:if(18!==e)break;r.start=Qn.decode(n,n.uint32());continue;case 3:if(26!==e)break;r.end=Qn.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>ri.fromPartial(e??{}),fromPartial(e){const t={restriction:[],start:void 0,end:void 0};return t.restriction=e.restriction?.map((e=>ei.fromPartial(e)))||[],t.start=void 0!==e.start&&null!==e.start?Qn.fromPartial(e.start):void 0,t.end=void 0!==e.end&&null!==e.end?Qn.fromPartial(e.end):void 0,t}};function si(){return{fileId:new Uint8Array,format:0}}const ai={encode:(e,t=Vt().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),0!==e.format&&t.uint32(16).int32(e.format),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=si();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue;case 2:if(16!==e)break;r.format=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>ai.fromPartial(e??{}),fromPartial(e){const t=si();return t.fileId=e.fileId??new Uint8Array,t.format=e.format??0,t}};function oi(){return{fileId:new Uint8Array}}const li={encode:(e,t=Vt().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=oi();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>li.fromPartial(e??{}),fromPartial(e){const t=oi();return t.fileId=e.fileId??new Uint8Array,t}};Vt().util.Long!==Ft.A&&(Vt().util.Long=Ft.A,Vt().configure());let ci=function(e){return e[e.PLAYABILITY_VERDICT_UNSPECIFIED=0]="PLAYABILITY_VERDICT_UNSPECIFIED",e[e.PLAYABILITY_VERDICT_PLAYABLE=1]="PLAYABILITY_VERDICT_PLAYABLE",e[e.PLAYABILITY_VERDICT_COUNTRY_RESTRICTED=2]="PLAYABILITY_VERDICT_COUNTRY_RESTRICTED",e[e.PLAYABILITY_VERDICT_CATALOGUE_RESTRICTED=3]="PLAYABILITY_VERDICT_CATALOGUE_RESTRICTED",e[e.PLAYABILITY_VERDICT_UNAVAILABLE=4]="PLAYABILITY_VERDICT_UNAVAILABLE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const ui={encode:(e,t=Vt().Writer.create())=>(!0===e.isPlayable&&t.uint32(8).bool(e.isPlayable),0!==e.reason&&t.uint32(16).int32(e.reason),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={isPlayable:!1,reason:0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;r.isPlayable=n.bool();continue;case 2:if(16!==e)break;r.reason=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>ui.fromPartial(e??{}),fromPartial(e){const t={isPlayable:!1,reason:0};return t.isPlayable=e.isPlayable??!1,t.reason=e.reason??0,t}};const di={encode(e,t=Vt().Writer.create()){for(const n of e.coverImages)pi.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={coverImages:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.coverImages.push(pi.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>di.fromPartial(e??{}),fromPartial(e){const t={coverImages:[]};return t.coverImages=e.coverImages?.map((e=>pi.fromPartial(e)))||[],t}};function mi(){return{fileId:new Uint8Array,size:0,width:0,height:0}}const pi={encode:(e,t=Vt().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),0!==e.size&&t.uint32(16).int32(e.size),0!==e.width&&t.uint32(24).int32(e.width),0!==e.height&&t.uint32(32).int32(e.height),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=mi();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue;case 2:if(16!==e)break;r.size=n.int32();continue;case 3:if(24!==e)break;r.width=n.int32();continue;case 4:if(32!==e)break;r.height=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>pi.fromPartial(e??{}),fromPartial(e){const t=mi();return t.fileId=e.fileId??new Uint8Array,t.size=e.size??0,t.width=e.width??0,t.height=e.height??0,t}};const hi={encode:(e,t=Vt().Writer.create())=>(""!==e.id&&t.uint32(10).string(e.id),""!==e.contextualName&&t.uint32(18).string(e.contextualName),0!==e.depth&&t.uint32(24).int32(e.depth),""!==e.parentId&&t.uint32(34).string(e.parentId),""!==e.destinationUri&&t.uint32(42).string(e.destinationUri),""!==e.shortName&&t.uint32(50).string(e.shortName),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={id:"",contextualName:"",depth:0,parentId:"",destinationUri:"",shortName:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.id=n.string();continue;case 2:if(18!==e)break;r.contextualName=n.string();continue;case 3:if(24!==e)break;r.depth=n.int32();continue;case 4:if(34!==e)break;r.parentId=n.string();continue;case 5:if(42!==e)break;r.destinationUri=n.string();continue;case 6:if(50!==e)break;r.shortName=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>hi.fromPartial(e??{}),fromPartial(e){const t={id:"",contextualName:"",depth:0,parentId:"",destinationUri:"",shortName:""};return t.id=e.id??"",t.contextualName=e.contextualName??"",t.depth=e.depth??0,t.parentId=e.parentId??"",t.destinationUri=e.destinationUri??"",t.shortName=e.shortName??"",t}};const gi={encode(e,t=Vt().Writer.create()){for(const n of e.genres)hi.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={genres:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.genres.push(hi.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>gi.fromPartial(e??{}),fromPartial(e){const t={genres:[]};return t.genres=e.genres?.map((e=>hi.fromPartial(e)))||[],t}};const fi={encode:(e,t=Vt().Writer.create())=>(""!==e.sameBookUri&&t.uint32(10).string(e.sameBookUri),0!==e.action&&t.uint32(16).int32(e.action),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={sameBookUri:"",action:0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.sameBookUri=n.string();continue;case 2:if(16!==e)break;r.action=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>fi.fromPartial(e??{}),fromPartial(e){const t={sameBookUri:"",action:0};return t.sameBookUri=e.sameBookUri??"",t.action=e.action??0,t}};n(14269);let bi=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.SMALL=1]="SMALL",e[e.LARGE=2]="LARGE",e[e.XLARGE=3]="XLARGE",e[e.XXLARGE=4]="XXLARGE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function vi(e){switch(e){case 0:case"DEFAULT":return bi.DEFAULT;case 1:case"SMALL":return bi.SMALL;case 2:case"LARGE":return bi.LARGE;case 3:case"XLARGE":return bi.XLARGE;case 4:case"XXLARGE":return bi.XXLARGE;default:return bi.UNRECOGNIZED}}const yi={encode(e,t=Vt().Writer.create()){for(const n of e.videoAssociation)_i.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={videoAssociation:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.videoAssociation.push(_i.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({videoAssociation:globalThis.Array.isArray(e?.videoAssociation)?e.videoAssociation.map((e=>_i.fromJSON(e))):[]}),toJSON(e){const t={};return e.videoAssociation?.length&&(t.videoAssociation=e.videoAssociation.map((e=>_i.toJSON(e)))),t},create:e=>yi.fromPartial(e??{}),fromPartial(e){const t={videoAssociation:[]};return t.videoAssociation=e.videoAssociation?.map((e=>_i.fromPartial(e)))||[],t}};const _i={encode:(e,t=Vt().Writer.create())=>(""!==e.trackUri&&t.uint32(10).string(e.trackUri),void 0!==e.images&&Ei.encode(e.images,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={trackUri:"",images:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.trackUri=n.string();continue;case 2:if(18!==e)break;r.images=Ei.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({trackUri:Si(e.trackUri)?globalThis.String(e.trackUri):"",images:Si(e.images)?Ei.fromJSON(e.images):void 0}),toJSON(e){const t={};return""!==e.trackUri&&(t.trackUri=e.trackUri),void 0!==e.images&&(t.images=Ei.toJSON(e.images)),t},create:e=>_i.fromPartial(e??{}),fromPartial(e){const t={trackUri:"",images:void 0};return t.trackUri=e.trackUri??"",t.images=void 0!==e.images&&null!==e.images?Ei.fromPartial(e.images):void 0,t}};const Ei={encode(e,t=Vt().Writer.create()){for(const n of e.image)xi.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={image:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.image.push(xi.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({image:globalThis.Array.isArray(e?.image)?e.image.map((e=>xi.fromJSON(e))):[]}),toJSON(e){const t={};return e.image?.length&&(t.image=e.image.map((e=>xi.toJSON(e)))),t},create:e=>Ei.fromPartial(e??{}),fromPartial(e){const t={image:[]};return t.image=e.image?.map((e=>xi.fromPartial(e)))||[],t}};const xi={encode:(e,t=Vt().Writer.create())=>(void 0!==e.fileId&&t.uint32(10).bytes(e.fileId),void 0!==e.size&&t.uint32(16).int32(e.size),void 0!==e.width&&t.uint32(24).sint32(e.width),void 0!==e.height&&t.uint32(32).sint32(e.height),t),decode(e,t){const n=e instanceof Vt().Reader?e:Vt().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={fileId:void 0,size:void 0,width:void 0,height:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue;case 2:if(16!==e)break;r.size=n.int32();continue;case 3:if(24!==e)break;r.width=n.sint32();continue;case 4:if(32!==e)break;r.height=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({fileId:Si(e.fileId)?Ci(e.fileId):void 0,size:Si(e.size)?vi(e.size):void 0,width:Si(e.width)?globalThis.Number(e.width):void 0,height:Si(e.height)?globalThis.Number(e.height):void 0}),toJSON(e){const t={};return void 0!==e.fileId&&(t.fileId=function(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{const t=[];return e.forEach((e=>{t.push(globalThis.String.fromCharCode(e))})),globalThis.btoa(t.join(""))}}(e.fileId)),void 0!==e.size&&(t.size=function(e){switch(e){case bi.DEFAULT:return"DEFAULT";case bi.SMALL:return"SMALL";case bi.LARGE:return"LARGE";case bi.XLARGE:return"XLARGE";case bi.XXLARGE:return"XXLARGE";case bi.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.size)),void 0!==e.width&&(t.width=Math.round(e.width)),void 0!==e.height&&(t.height=Math.round(e.height)),t},create:e=>xi.fromPartial(e??{}),fromPartial(e){const t={fileId:void 0,size:void 0,width:void 0,height:void 0};return t.fileId=e.fileId??void 0,t.size=e.size??void 0,t.width=e.width??void 0,t.height=e.height??void 0,t}};function Ci(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}}function Si(e){return null!=e}function Ai(e){const t={};return e.forEach((e=>{switch(e.extensionKind){case Bt.PODCAST_SUBSCRIPTIONS:t.podcastSubscription=Gt.decode(e.data);break;case Bt.SHOW_ACCESS:t.showAccess=Wt.Cb.decode(e.data);break;case Bt.SHOW_V4:t.showV4=Gn.decode(e.data);break;case Bt.PLAYABILITY:t.playability=ui.decode(e.data);break;case Bt.COVER_IMAGE:t.coverImage=di.decode(e.data);break;case Bt.AUDIOBOOK_GENRE:t.audiobookGenres=gi.decode(e.data);break;case Bt.AUDIOBOOK_SPECIFICS:t.audiobookSpecifics=qt.decode(e.data);break;case Bt.PODCAST_TOPICS:t.podcastTopics=an.decode(e.data);break;case Bt.PODCAST_SEGMENTS:t.podcastSegments=gn.decode(e.data);break;case Bt.HTML_DESCRIPTION:t.htmlDescription=un.decode(e.data);break;case Bt.PODCAST_RATING:t.rating=An.decode(e.data);break;case Bt.CONTENT_WARNING:t.contentInformation=nn.decode(e.data);break;case Bt.EPISODE_TRANSCRIPTS:t.transcripts=_n.decode(e.data);break;case Bt.AUDIOBOOK_PRICE:t.audiobookPrice=Fn.ZC.decode(e.data);break;case Bt.SMART_SHUFFLE:t.smartShuffle=Hn.decode(e.data);break;case Bt.AUDIOBOOK_RELATIONS:t.audiobookRelation=fi.decode(e.data);break;case Bt.VIDEO_ASSOCIATIONS:t.videoAssociations=yi.decode(e.data);break;case Bt.PRERELEASE:t.prerelease=jn.decode(e.data)}})),t}var wi=n(15956),Ii=n(71253),Ti=n(2995),Ni=n(73221);function Ri(e){return void 0===e?[]:function(...e){return e.filter((({url:e,label:t})=>e&&t)).map((({url:e,label:t})=>({url:e,label:t})))}({url:e.standardLink,label:"standard"},{url:e.smallLink,label:"small"},{url:e.largeLink,label:"large"},{url:e.xlargeLink,label:"xlarge"})}function ki(e){return void 0!==e&&e>0?function(e){return new Date(1e3*e)}(e).toISOString():null}function Oi(e){return ki(e?Number(e):void 0)}function Pi(e){return{milliseconds:1e3*e}}function ji(e,t){return e?t===e?null:Oi(e):null}function Li(e){return e?[{url:e,width:300,height:300}]:[]}function Di(e){const t=e.entityInfo?.pinnable;switch(t){case ft.ID.YES:return Mt.oT.YES;case ft.ID.NO_IN_FOLDER:return Mt.oT.NO_IN_FOLDER;case ft.ID.UNRECOGNIZED:default:return Mt.oT.NO}}function Ui(e){return{type:ne.c.ARTIST,uri:e.link,name:e.name}}function Mi(e){return{type:ne.c.ALBUM,name:e.entityInfo?.name??"",artists:e.album?.artistName?[{type:ne.c.ARTIST,name:e.album?.artistName,uri:e.album?.artistUri??""}]:[],images:Li(e.entityInfo?.imageUri),uri:e.entityInfo?.uri??"",pinned:e.entityInfo?.pinned??!1,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Di(e)}}function Bi(e){return{name:e.entityInfo?.name??"",images:Li(e.entityInfo?.imageUri),uri:e.entityInfo?.uri??"",pinned:e.entityInfo?.pinned??!1,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Di(e)}}function Fi(e){if(!function(e){return!!e.prerelease}(e))throw new Error("Invalid collection Esperanto prerelease response!");return e.prerelease.type===ft.O4.ALBUM?function(e){return{...Bi(e),type:ne.c.PRE_RELEASE_ALBUM,artists:e.prerelease.artistName?[{type:ne.c.ARTIST,name:e.prerelease.artistName,uri:e.prerelease.artistUri??""}]:[]}}(e):function(e){return{...Bi(e),type:ne.c.PRE_RELEASE_BOOK,authorName:e.prerelease.artistName??""}}(e)}function Hi(e){return{type:ne.c.ARTIST,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",images:Li(e.entityInfo?.imageUri),pinned:e.entityInfo?.pinned??!1,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Di(e)}}function Vi(e){return{type:ne.c.SHOW,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",publisher:e.show?.creatorName??"",images:Li(e.entityInfo?.imageUri)}}function zi(e,t){let n={};e.extension&&(n=Ai(e.extension));const i=e.show;return{type:ne.c.EPISODE,uri:e.link,name:e.name,description:e.description,duration:Pi(e.length),timeLeft:Pi(t.isPlayed?0:t.timeLeft),images:Ri(e.covers),isExplicit:e.isExplicit,languages:[e.language],release:{date:new Date(1e3*Number(e.publishDate)).toISOString(),precision:"day"},podcastSubscription:{isPaywalled:n.podcastSubscription?.isPaywalled??!1,isUserSubscribed:n.podcastSubscription?.isUserSubscribed??!1},show:{type:ne.c.SHOW,uri:i.link,name:i.name,publisher:i.publisher,images:Ri(i.covers),mediaType:Ut.Q.UNKNOWN},isPlayable:t.isPlayable,is19PlusOnly:e.is19PlusOnly}}function Gi(e){if(void 0===e.episodeMetadata||void 0===e.episodePlayedState)throw new Error("Invalid listen-later cosmos response!");return{...zi(e.episodeMetadata,e.episodePlayedState)}}function Wi(e){return{type:ne.c.ARTIST,uri:e.link,name:e.name}}function Ki(e){const t=e.albumMetadata?.artists.at(0);return{type:ne.c.ALBUM,uri:e.albumMetadata?.link??"",name:e.albumMetadata?.name??"",artist:t&&Ui(t),images:Ri(e.albumMetadata?.covers)}}function Yi(e,t,n){return{type:ne.c.TRACK,uri:e.link,name:e.name,duration:Pi(e.length),album:Ki(n),artists:e.artist.map(Wi),discNumber:e.discNumber,trackNumber:e.trackNumber,isExplicit:e.isExplicit,isPlayable:t.isPlayable,isLocal:e.isLocal,is19PlusOnly:e.is19PlusOnly}}function qi(e){if(void 0===e.track||void 0===e.track?.trackMetadata||void 0===e.track?.trackPlayState)throw new Error("Invalid collection esperanto tracks response!");return function(e){if(void 0===e||void 0===e.trackMetadata)throw new Error("Invalid track data");const t=Ai(e.trackMetadata.extension);return{type:ne.c.TRACK,uri:e.trackMetadata.link,name:e.trackMetadata.name,duration:Pi(e.trackMetadata.length),album:e.album?Ki(e.album):null,artists:e.trackMetadata.artist.map(Wi),discNumber:e.trackMetadata.discNumber,trackNumber:e.trackMetadata.trackNumber,isExplicit:e.trackMetadata.isExplicit,isPlayable:e.trackMetadata.playable,isLocal:e.trackMetadata.isLocal,is19PlusOnly:e.trackMetadata.is19PlusOnly,addedAt:ki(e.addTime),hasAssociatedVideo:(t.videoAssociations?.videoAssociation?.length||0)>0}}(e.track)}function Qi(e){return{type:ne.c.AUDIOBOOK,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",authorName:e.book?.authorName??"",images:Li(e.entityInfo?.imageUri),isLocked:e.book?.access===ft.p2.LOCKED,pinned:e.entityInfo?.pinned??!1,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Di(e)}}function $i(e,t){return e.length>=(t?.offset??0)+(t?.limit??0)}function Zi(e,t,n,i,r){if(e.error?.includes("filter only available"))throw new Mt.c_(e.error.match(/^(.*) filter only available/)?.at(1)??e.error);if(e.error?.includes("order only available"))throw new Mt.IU(e.error.match(/^(.*) order only available/)?.at(1)??e.error);if(e.error&&404===e.statusCode&&t?.folderUri)throw new Mt.db(e.error);const s=t?.folderUri?ft.jO.PLAYLIST:void 0,a=(0,Ti.FD)(i??[]).map(Ti.sW),o=s??(0,wi.IP)(a.at(0)?.id);r&&e.header?.tagInfo&&a.unshift({id:r,name:e.header?.tagInfo?.tagName});const l=(0,Ii.ss)((0,wi.CA)(t?.sortOrder),o),c=o===ft.jO.PLAYLIST&&l.id===ft.oR.CUSTOM.toString(),u=!!t?.textFilter;let d,m=e.header?.totalCount??0;if(n){const n=function(e,t,n,i){let r=0;const s=[],a=new Set(i?.expandedFolders??[]),o=e.slice(0),l=Array.from({length:o.length},(()=>0));let c;for(;c=o.shift();){const e=l.shift()??0,u=Xi(c,t,e,n);if(s.push(u),e>0&&r++,$i(s,i))break;if(c.folder&&c.entityInfo?.uri&&a.has(c.entityInfo?.uri)){o.unshift(...c.folder.entity);const t=e+1;l.unshift(...Array.from({length:c.folder.entity.length},(()=>t)))}}return{items:s.slice(i?.offset??0,(i?.offset??0)+(i?.limit??0)),numExpandedFolderItemsInChunk:r}}(e.entity,c,u,t);d=n.items,m+=n.numExpandedFolderItemsInChunk}else d=function(e,t,n){return e.map((e=>Xi(e,t,void 0,n)))}(e.entity,c,u);return{primaryFilter:(0,Ti.qZ)(o)??void 0,passedFilterIds:t?.filters??[],availableFilters:(0,Ti.FD)(e.header?.availableFilters?.filter??[]).map(Ti.sW),selectedFilters:t?.folderUri?(0,Ti.Wu)(a):a,availableSortOrders:(0,Ii.fG)(o),selectedSortOrder:l,limit:t?.limit??e.header?.totalCount??0,offset:t?.offset??0,items:d,unfilteredTotalLength:e.header?.totalCount??0,totalLength:m,hasUnfilteredItems:!!e.header?.totalCount||!!t?.filters?.length||!!t?.textFilter,hasTextFilter:u,reorderAllowed:c,passedFolderUri:t?.folderUri,openedFolderName:e.header?.folderName,parentFolderUri:e.header?.parentFolderUri,tagPlaylist:e.header?.tagInfo?.tagPlaylistInfo?(p=e.header.tagInfo.tagPlaylistInfo,{type:ne.c.PLAYLIST,uri:p.uri,name:p.name,images:[{url:p.imageUri}],isLoading:p.isLoading,isBooklist:!1,isCurated:p.isCurated,description:p.description}):void 0};var p}function Xi(e,t,n,i){return e.playlist?function(e,t,n){return{type:ne.c.PLAYLIST,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Di(e),images:Li(e.entityInfo?.imageUri),owner:{type:ne.c.USER,name:e.playlist?.creatorName??"",uri:e.playlist?.creatorUri??"",id:"",username:"",images:[]},isOwnedBySelf:e.playlist?.ownedBySelf,isLoading:e.playlist?.isLoading,folderDepth:n,canAddTo:e.playlist?.canAdd,canReorder:t,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),hasCuratedItems:e.entityInfo?.hasCuratedItems,isBooklist:!!e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>e===Ni.JaG.SHOW))?.numItems,isEmpty:!e.playlist?.numberOfItemsPerLinkType.some((e=>e.numItems>0))}}(e,t,n):e.album?Mi(e):e.prerelease?Fi(e):e.artist?Hi(e):e.show?function(e){return{type:ne.c.SHOW,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,publisher:e.show?.creatorName??"",images:Li(e.entityInfo?.imageUri),addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Di(e)}}(e):e.book?Qi(e):e.folder?function(e,t,n,i=!1){return{type:ne.c.FOLDER,uri:e.entityInfo?.uri??"",rowId:e.folder?.rowId??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Di(e),numberOfFolders:e.folder?.numberOfFolders??0,numberOfPlaylists:e.folder?.numberOfPlaylists??0,folderDepth:n,canReorder:t,isFlattened:i,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e,t,n,i):e.likedSongs?function(e){return{type:ne.c.LIKED_SONGS,uri:Mt.BP,name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Di(e),images:Li(e.entityInfo?.imageUri),numberOfSongs:e.likedSongs?.numberOfSongs??0,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),hasCuratedItems:e.entityInfo?.hasCuratedItems}}(e):e.yourEpisodes?function(e){return{type:ne.c.YOUR_EPISODES,uri:Mt.Xn,name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Di(e),images:Li(e.entityInfo?.imageUri),numberOfDownloadedEpisodes:e.yourEpisodes?.numberOfDownloadedEpisodes??0,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),hasCuratedItems:e.entityInfo?.hasCuratedItems}}(e):e.localFiles?function(e){return{type:ne.c.LOCAL_FILES,uri:"spotify:local-files",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Di(e),images:Li(e.entityInfo?.imageUri),numberOfFiles:e.localFiles?.numberOfFiles??0,addedAt:Oi(e.entityInfo?.addTime),lastPlayedAt:ji(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):null}function Ji(e){switch(e){case"album":default:return"album";case"single":return"single";case"compilation":return"compilation";case"ep":return"ep"}}function er(e){if(!e.album)return null;if(!e.album.albumMetadata)return null;const t=e.album;return{type:ne.c.ALBUM,uri:e.album.albumMetadata.link,name:e.album.albumMetadata.name,artists:e.album.albumMetadata.artists.map(Ui).filter((e=>e.name)),images:Ri(e.album.albumMetadata.covers),albumType:Ji(e.album.albumType),year:e.album.albumMetadata.year,copyrights:(n=e.album.albumMetadata.copyright,n.map((e=>e.includes("℗")?{type:"P",text:e}:{type:"C",text:e}))),items:e.album.track.map((e=>function(e,t){if(void 0===e.trackMetadata||void 0===e.trackPlayState)throw new Error("Invalid collection cosmos shows response!");return{...Yi(e.trackMetadata,e.trackPlayState,t),addedAt:ki(e.addTime)}}(e,t)))};var n}function tr(e){const t=e.map((e=>(0,ee.o_)(e))),n=t.map((e=>null!==e?e.type:null)).reduce(((e,t)=>e===t?e:null));if(null===n)throw new Error("Given URIs need to be of the same type!");return{type:n,ids:t.map((e=>e.id))}}var nr=n(89124),ir=n(21052);function rr(e){return{likedSongs:e?.includeLikedSongs?{label:g.Ru.get("shared.library.entity-row.liked-songs.title"),image:"https://misc.scdn.co/liked-songs/liked-songs-300.png",includeEmpty:!1}:void 0,yourEpisodes:e?.includeYourEpisodes?{label:g.Ru.get("shared.library.entity-row.your-episodes.title"),image:"https://misc.spotifycdn.com/your-episodes/SE-300.png",includeEmpty:!1}:void 0,localFiles:e?.includeLocalFiles?{image:"",label:g.Ru.get("shared.library.entity-row.local-files.title"),includeEmpty:!1}:void 0,cachedFiles:void 0,newEpisodes:void 0,allAvailableConfigsProvided:"boolean"==typeof e?.includeLikedSongs&&"boolean"==typeof e?.includeYourEpisodes&&"boolean"==typeof e?.includeLocalFiles}}var sr=n(87240),ar=n(88724),or=n(95641);const lr={offset:0},cr={episodePolicy:{link:!0,length:!0,name:!0,manifestId:!0,previewId:!0,previewManifestId:!0,description:!0,publishDate:!0,covers:!0,freezeFrames:!0,language:!0,available:!0,mediaTypeEnum:!0,number:!0,backgroundable:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,is19PlusOnly:!0,isBookChapter:!0,extension:[Pt.UH.PODCAST_SUBSCRIPTIONS]},showPolicy:{name:!0,link:!0,description:!0,publisher:!0,covers:!0,language:!0,isExplicit:!0,mediaTypeEnum:!0},collectionPolicy:{isFollowingShow:!0,isInListenLater:!0,isNew:!0},syncPolicy:{offline:!0,syncProgress:!0},playedStatePolicy:{timeLeft:!0,isPlayed:!0,playable:!0,playabilityRestriction:!0,lastPlayedAt:!0}};function ur(e,t){return"end"===e.after?{}:e.after?.uri?{afterUri:(0,ir.c)(e.after.uri,t)}:"start"===e.before?{first:!0}:e.before?.uri?{beforeUri:(0,ir.c)(e.before.uri,t)}:{}}const dr=e=>e.startsWith("spotify:concept:"),mr=e=>!dr(e);class pr{_cache=new Map;constructor(e,t,n,i,r,s){this._your_library=e,this._your_library_tags=t,this._collection=n,this._listen_later=i,this._builder=r,this._currentUsername=s,this._events=new Dt(this._your_library,this._collection,this._listen_later,this._cache)}getCapabilities(){return{canSort:!0,canFilter:!0,canSortTracksAndEpisodes:!0,canFilterTracksAndEpisodes:!0,canModifyOffline:!0,canGetTracksByArtistOrAlbum:!0,canMarkEpisodesAsDone:!0,canFetchAllItems:!0,canPin:!0,canTextFilterContentsInRealtime:!0}}async getAlbums(e=lr){const{sort:t,filter:n,offset:i,limit:r}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");return function(e,t){if(void 0===e.entity)throw new Error("Invalid collection Esperanto artists response!");return{items:e.entity.map(Mi),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(ft.WT.fromPartial({header:{totalCount:!0,skip:i,length:r,filters:{filter:[ft.jO.ALBUM]},textFilter:(0,Ti.WQ)((0,nr.HI)(n)),sortOrder:{sortOrder:(0,Ii.fC)(t)}}})),i)}async getArtists(e=lr){const{sort:t,filter:n,offset:i,limit:r}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");return function(e,t){if(void 0===e.entity)throw new Error("Invalid collection Esperanto artist response!");return{items:e.entity.map(Hi),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(ft.WT.fromPartial({header:{totalCount:!0,skip:i,length:r,filters:{filter:[ft.jO.ARTIST]},textFilter:(0,Ti.WQ)((0,nr.HI)(n)),sortOrder:{sortOrder:(0,Ii.Lf)(t)}}})),i)}async getTracks(e=lr){const{sort:t,filters:n,offset:i,limit:r,uri:s}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");const a=(0,ee.o_)(s),o=a&&(0,ee.cE)(a.id)||void 0,l=jt.V$.fromPartial({trackPolicy:{collectionPolicy:{isInCollection:!0},trackPolicy:{link:!0,name:!0,playable:!0,length:!0,trackNumber:!0,discNumber:!0,isExplicit:!0,is19PlusOnly:!0,isLocal:!0,extension:[Pt.UH.VIDEO_ASSOCIATIONS]},albumPolicy:{decorated:!0,albumPolicy:{link:!0,name:!0,covers:!0}},artistPolicy:{name:!0,link:!0}},addTime:!0,start:i,length:r,filter:(0,Ti.Bf)(n?.map(nr.HI).map((e=>e??null)).filter(sr.P)??[]),sort:t?(0,Ii.c6)(t):"",id:o});let c;return c=(0,ee.o_)(s)?.type===ee.NQ.ARTIST?await this._collection.getArtistTrackList(l):(0,ee.o_)(s)?.type===ee.NQ.ALBUM?await this._collection.getAlbumTrackList(l):await this._collection.getTrackList(l),function(e,t){if(void 0===e.item)throw new Error("Invalid collection esperanto tracks response!");return{items:e.item.map(qi),offset:t||0,limit:e.item.length,totalLength:e.unrangedLength,unfilteredTotalLength:e.unfilteredLength}}(c,i)}async _isTagsInfoSynced(){return await new Promise((e=>{let t=null;const n=this._collection.streamTagsInfo({},(i=>{i.isSynced&&(n.cancel(),t&&clearTimeout(t),e(!0))}));t=setTimeout((()=>{e(!1),n.cancel()}),5e3)}))}async getTracksFilterTags(){if(await this._isTagsInfoSynced()){const e=this._builder.build(),t=await e.withHost(ar.o1).withPath("/liked-songs").withQueryParameters({subjective:!0}).withJsonContentType().withResponseType("json").send();return t.body?.contentFilters.map((({title:e,query:t})=>({name:e,filter:t})))??[]}return[]}async getShows(e=lr){const{sort:t,filter:n,offset:i,limit:r}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");return function(e,t){if(void 0===e.entity)throw new Error("Invalid collection cosmos shows response!");return{items:e.entity.map(Vi),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(ft.WT.fromPartial({header:{totalCount:!0,skip:i,length:r,filters:{filter:[ft.jO.SHOW]},textFilter:(0,Ti.WQ)((0,nr.HI)(n)),sortOrder:{sortOrder:(0,Ii.rC)(t)}}})),i)}async getEpisodes(e=lr){const{sort:t,filter:n,offset:i,limit:r}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");return function(e,t){return{items:(e.episode||[]).map(Gi),offset:t||0,limit:(e.episode||[]).length,totalLength:e.unrangedLength,unfilteredTotalLength:e.unfilteredLength}}(await this._listen_later.episodes(Pt.Fn.fromPartial({...cr,sort:(0,Ii.wh)(t),filter:(0,Ti.Bf)([(0,nr.HI)(n)??null].filter(sr.P)),start:i,length:r})),i)}async getBooks(e=lr){const{filter:t,sort:n,offset:i,limit:r}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");return function(e,t){if(void 0===e.entity)throw new Error("Invalid your library esperanto response!");return{items:e.entity.map(Qi),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(ft.WT.fromPartial({header:{totalCount:!0,skip:i,length:r,filters:{filter:[ft.jO.BOOK]},textFilter:(0,Ti.WQ)((0,nr.HI)(t)),sortOrder:{sortOrder:(0,Ii._e)(n)}}})),i)}getEvents(){return this._events}async add({uris:e,silent:t}){if(!this._events.emitOperationSync(kt.tS.ADD,e,t))try{this._events.emitUpdateItems(e,!0),await async function(e,t,n){const{type:i}=tr(n);i===ee.NQ.EPISODE?await t.add({uris:n}):await e.add({uri:n})}(this._collection,this._listen_later,e),this._events.emitOperationComplete(kt.tS.ADD,e,null,t)}catch(n){throw this._events.emitUpdateItems(e,!1),this._events.emitOperationComplete(kt.tS.ADD,e,n instanceof Error?n:new Error("Unknown error object"),t),n}}async remove({uris:e,silent:t}){if(!this._events.emitOperationSync(kt.tS.REMOVE,e,t))try{this._events.emitUpdateItems(e,!1),await async function(e,t,n){const{type:i}=tr(n);i===ee.NQ.EPISODE?await t.remove({uris:n}):await e.remove({uri:n})}(this._collection,this._listen_later,e),this._events.emitOperationComplete(kt.tS.REMOVE,e,null,t)}catch(n){throw this._events.emitUpdateItems(e,!0),this._events.emitOperationComplete(kt.tS.REMOVE,e,n instanceof Error?n:new Error("Unknown error object"),t),n}}async contains(...e){const t=await async function(e,t){return(await e.contains(jt.Rs.fromPartial({uri:t}))).found||[]}(this._collection,e);return this._events.emitUpdateItems(e,t),t}containsSync(e){return this._cache.get(e)}async markAsPlayed(e){await this._collection.removeUnplayed({uri:[e]})}async markAsUnPlayed(e){await this._collection.addUnplayed({uri:[e]})}async pin(e,t){const n=await this._your_library.pin(ft.Xb.fromPartial({uri:(0,ir.c)(e,this._currentUsername),...t&&ur(t,this._currentUsername)}));n.status===ft.Fy.PINNED?this._events.emitUpdatePin(e,!0):n.status===ft.Fy.NOT_PINNED&&n.hasMaximumPinnedItems&&this._events.emitUpdatePinErrorTooManyPins(e,n.maximumPinnedItems)}async unpin(e){await this._your_library.unPin(ft.Xb.fromPartial({uri:(0,ir.c)(e,this._currentUsername)})),this._events.emitUpdatePin(e,!1)}async getContents(e){let t=e?.itemToCheckCurationFor,n=e?.textFilter;const i=n?(0,ee.o_)(n):null;let r=ft.iO.GROUP_BY;!i||i.type!==ee.NQ.TRACK&&i.type!==ee.NQ.EPISODE&&i.type!==ee.NQ.LOCAL_TRACK&&i.type!==ee.NQ.SHOW||(t||(r=ft.iO.ONLY_CURATED,t=[]),t.push(i.toURI()),n="");const s=t&&ft.ZP.fromPartial({items:t,filter:r}),a=e?.filters?.find(dr),o=e?.filters?.filter(mr).map(wi.qF),l=o&&(0,Ti.FD)(o).at(0),c=!!l,u=l===ft.jO.PLAYLIST,d=l===ft.jO.DOWNLOADED,m=!!e?.expandedFolders?.length&&!!!e?.textFilter&&!a&&(!c||u||d);let p=e?.offset,h=e?.limit;m&&(p=0,h=(e?.offset??0)+(e?.limit??0));const g=(0,Ii.ss)((0,wi.CA)(e?.sortOrder),l),f=(0,ee.o_)(e?.folderUri)?.id;let b;f&&""!==f&&(b=Ft.A.fromString(f,!0,16).toString(10));return Zi(await this._your_library.all(ft.WT.fromPartial({header:{length:h,skip:p,textFilter:n,sortOrder:{sortOrder:(0,wi.CA)(g.id)},filters:{filter:o},totalCount:!0,allPlaylists:!!e?.textFilter,entitiesInFolders:m,folderId:b?BigInt(b):void 0,numLinkTypesInPlaylists:!0,curatedItems:s,tagFilter:a?ft.Jk.fromPartial({tagUri:a}):void 0},pseudoPlaylistConfig:rr(e)})),e,m,o,a)}getContentsPrimaryFilterId(e){return(0,Ti.i_)(e)?.toString()??null}getFilterLabel(e){const t=(0,wi.IP)(e);return void 0!==t?ft.jO[t]?.toLowerCase():e}getSortOrderLabel(e){const t=(0,wi.CA)(e);return void 0!==t?ft.oR[t]?.toLowerCase():e}getStaticallyKnownFilters(){return{playlist:{filterId:ft.jO.PLAYLIST.toString(),sortOrderIds:{customSort:ft.oR.CUSTOM.toString()}}}}async getAlbum(e){return er(await this._collection.getAlbumView(jt.sZ.fromPartial({albumUri:e,trackPolicy:{collectionPolicy:{isInCollection:!0},trackPolicy:{link:!0,name:!0,playable:!0,length:!0,trackNumber:!0,discNumber:!0,isExplicit:!0,is19PlusOnly:!0},artistPolicy:{name:!0,link:!0},playedStatePolicy:{playable:!0}},albumPolicy:{decorated:!0,albumType:!0,artistsPolicy:{artistPolicy:{link:!0,name:!0,portraits:!0},decorated:!0},albumPolicy:{link:!0,name:!0,copyrights:!0,covers:!0,year:!0,numDiscs:!0,numTracks:!0,playability:!0}}})))}async getFilterTags(){const e=await new Promise((e=>{const t=this._your_library_tags.streamYourLibraryTags(or.nD.fromPartial({updateThrottling:1,responseFormat:3}),(n=>{e(n),t.cancel()}))}));return e.classGroup.map((e=>({classUri:e.classUri,name:e.className,tags:e.tag.map((e=>({tagUri:e.tagUri,name:e.tagName,entityCount:e.entityCount})))})))}}var hr=n(75653);function gr(e){return{type:ne.c.ARTIST,uri:e.link,name:e.name}}function fr(e){const t=e.metadata;return{type:ne.c.TRACK,uid:e.rowId,addedAt:(s=e.addTime,new Date(1e3*s)),uri:t.link,name:t.name,album:(i=t.album,{type:ne.c.ALBUM,uri:i.link,name:i.name,artist:i.artist&&gr(i.artist),images:(r=i.covers?.standardLink,r?[{url:r,label:"standard"}]:[])}),artists:t.artist.map(gr),discNumber:t.discNumber,trackNumber:t.trackNumber,duration:(n=1e3*t.length,{milliseconds:n}),isExplicit:!1,isLocal:t.isLocal,isPlayable:t.playable,is19PlusOnly:!1};var n,i,r,s}var br=n(12892),vr=n(60149),yr=n(7009),_r=n(70869),Er=n(96972);const xr="showLocalFiles";function Cr(e){switch(e){case br.de.UNKNOWN:return hr.kW.UNKNOWN;case br.de.ITUNES:return hr.kW.ITUNES;case br.de.DOWNLOADS:return hr.kW.DOWNLOADS;case br.de.MY_MUSIC:return hr.kW.MY_MUSIC;case br.de.WINDOWS_MUSIC_LIBRARY:return hr.kW.WINDOWS_MUSIC_LIBRARY;case br.de.ANDROID_MEDIA_STORE:case br.de.UNRECOGNIZED:case br.de.IOS_DOCUMENTS:return hr.kW.UNRECOGNIZED;default:return(0,me.k)(e),hr.kW.UNRECOGNIZED}}function Sr(e){switch(e){case hr.kW.UNKNOWN:return br.de.UNKNOWN;case hr.kW.ITUNES:return br.de.ITUNES;case hr.kW.DOWNLOADS:return br.de.DOWNLOADS;case hr.kW.MY_MUSIC:return br.de.MY_MUSIC;case hr.kW.WINDOWS_MUSIC_LIBRARY:return br.de.WINDOWS_MUSIC_LIBRARY;case hr.kW.UNRECOGNIZED:return br.de.UNRECOGNIZED;default:return(0,me.k)(e),br.de.UNRECOGNIZED}}const Ar=e=>{const t=e?.order===vr.x.DESC?1:0;switch(e?.field){case yr.n.TITLE:return br.rj.NAME_ASC+t;case yr.n.ADDED_AT:return br.rj.ADD_TIME_ASC+t;case yr.n.ALBUM:return br.rj.ALBUM_NAME_ASC+t;case yr.n.ARTIST:return br.rj.ARTIST_NAME_ASC+t;case yr.n.DURATION:return br.rj.LENGTH_ASC+t;default:return br.rj.NO_SORT}};function wr(e){switch(e){case br.xp.NOT_FOUND:throw new Error("Error adding local files folder: Path not found!");case br.xp.UNKNOWN:case br.xp.UNRECOGNIZED:throw new Error("Error adding local files folder!");case br.xp.SUCCESS:case br.xp.NOT_CHANGED:return Promise.resolve();default:return(0,me.d)(e)}}const Ir=br.oU.fromPartial({rowId:!0,addTime:!0,track:{link:!0,name:!0,discNumber:!0,trackNumber:!0,length:!0,isLocal:!0,playable:!0,hasLyrics:!1,is19PlusOnly:!1,isAvailableInMetadataCatalogue:!1,isExplicit:!1,isPremiumOnly:!1,locallyPlayable:!1,playableLocalTrack:!1,playableTrackLink:!1,popularity:!1,previewId:!1,trackDescriptors:!1},album:{album:{link:!0,name:!0,covers:!0,copyrights:!1,isPremiumOnly:!1,numDiscs:!1,numTracks:!1,playability:!1,year:!1},artist:{link:!0,name:!0,isVariousArtists:!1,portraits:!1}},artist:{link:!0,name:!0,isVariousArtists:!1,portraits:!1},addedBy:void 0,canAddToCollection:!1,canBan:!1,displayCovers:!1,formatListAttributes:!1,inCollection:!1,isBanned:!1,localFile:!1,offline:!1});class Tr{_totalLength=0;constructor(e,t,n){this._cosmos=t,this._localStorageAPI=n,this._client=new br._w(e),this._events=new Er.Q,this._subscribeToTracksUpdates()}getCapabilities(){return{canSort:!0,canFilter:!0,canFetchAllTracks:!0}}getEvents(){return this._events}getIsEnabled(){const e=this._localStorageAPI.getItem(xr);return!(e instanceof Error)&&e}setIsEnabled(e){this._localStorageAPI.setItem(xr,e),this._emitUpdate()}subscribeIsEnabled(e){const t=this._localStorageAPI.getEvents(),n=t=>{t.data.key===xr&&e(t.data.value)};return t.addListener(_r.r.UPDATE,n),()=>t.removeListener(_r.r.UPDATE,n)}async browseForFolder(){return function(e){return{path:e.path||null}}(await this._cosmos.post("sp://desktop/v1/browse_for_folder"))}async getSources(){const e=await this._client.getSources({});return{defaultSources:e.defaultSources.map((e=>({enabled:e.enabled,id:Cr(e.id)}))),folders:e.folders}}async addFolder(e){wr((await this._client.addFolder({path:e.path})).result)}async removeFolder(e){wr((await this._client.removeFolder({path:e.path})).result)}async mutateDefaultSource(e){wr((await this._client.mutateDefaultSource({id:Sr(e.id),enabled:e.enabled})).result)}async getTracks(e,t){const n=await this._client.getTracks({query:{sortBy:Ar(e),textFilter:t??"",range:void 0,minLength:0,removeDuplicateLinks:!1},policy:Ir});return void 0!==n.data?n.data.item.map(fr):[]}_subscribeToTracksUpdates(){let e=!0;this._client.subscribeTracks(br.mo.fromPartial({query:{range:{start:0,length:0}}}),(t=>{this._totalLength=t.data?.unfilteredLength??0,e?e=!1:this._emitUpdate()}))}_emitUpdate(){this._events.emit(Er.T.UPDATE,{isEnabled:this.getIsEnabled(),totalLength:this._totalLength})}}var Nr=n(98555),Rr=n(10075),kr=n(45482),Or=n(68079),Pr=n(81987),jr=n(77564),Lr=n(65687),Dr=n(67910),Ur=n(58055);function Mr(e,t){t=t.split(":").map((e=>encodeURIComponent(e))).join(":");const n=(0,ee.o_)(t,{parseUnknown:!0});if(null===n)throw new Error(`URI "${t}" is invalid!`);switch(n.type){case ee.NQ.TRACK:case ee.NQ.LOCAL:case ee.NQ.EPISODE:case ee.NQ.SHOW:case ee.NQ.PLAYLIST:case ee.NQ.PLAYLIST_V2:case ee.NQ.COLLECTION:case ee.NQ.COLLECTION_ALBUM:case ee.NQ.COLLECTION_ARTIST:return t;case ee.NQ.ALBUM:return(0,ee.Uu)(e,n.id).toURI();case ee.NQ.ARTIST:return(0,ee.g1)(e,n.id).toURI();default:return console.warn(`URI "${t}" is can not be downloaded!`),null}}function Br(e){const t=(0,ee.o_)(e);if(null===t)throw new Error(`URI "${e}" is invalid!`);switch(t.type){case ee.NQ.ALBUM:case ee.NQ.ARTIST:case ee.NQ.TRACK:case ee.NQ.LOCAL:case ee.NQ.EPISODE:case ee.NQ.SHOW:case ee.NQ.PLAYLIST:case ee.NQ.PLAYLIST_V2:case ee.NQ.COLLECTION:return e;case ee.NQ.COLLECTION_ALBUM:return(0,ee.Q0)(t.id).toURI();case ee.NQ.COLLECTION_ARTIST:return(0,ee.IT)(t.id).toURI();default:return console.warn(`URI "${e}" is can not be downloaded!`),null}}function Fr(e=!1,t=!1){return(n,i=!0)=>(0,ee.gH)(n)||(0,ee.WB)(n)?i?jr.vs.YES:jr.vs.NO_PERMISSION_HIDE:e?jr.vs.YES:t?jr.vs.NO_PERMISSION_HIDE:jr.vs.NO_PERMISSION}let Hr=function(e){return e[e.CONTEXT=0]="CONTEXT",e[e.ITEM=1]="ITEM",e[e.UNRECOGNIZED=2]="UNRECOGNIZED",e}({});function Vr(e){const t=(0,ee.o_)(e);if(null===t)return Hr.UNRECOGNIZED;switch(t.type){case ee.NQ.ALBUM:case ee.NQ.ARTIST:case ee.NQ.SHOW:case ee.NQ.PLAYLIST:case ee.NQ.PLAYLIST_V2:case ee.NQ.COLLECTION:case ee.NQ.COLLECTION_ALBUM:case ee.NQ.COLLECTION_ARTIST:return Hr.CONTEXT;case ee.NQ.TRACK:case ee.NQ.EPISODE:return Hr.ITEM;default:return Hr.UNRECOGNIZED}}var zr=function(e){return e.ONLINE="online",e.OFFLINE="offline",e.FORCED_OFFLINE="forced_offline",e.RECONNECTING="reconnecting",e}(zr||{});function Gr(e){switch(e.connection.status){case zr.ONLINE:return jr.uJ.ONLINE;case zr.OFFLINE:return jr.uJ.OFFLINE;case zr.FORCED_OFFLINE:return jr.uJ.FORCED_OFFLINE;case zr.RECONNECTING:return jr.uJ.RECONNECTING;default:return jr.uJ.OFFLINE}}function Wr(e){const t=e?Number(e.totalTracks):0,n=e?Number(e.downloadedTracks):0;return{syncing:e?.downloading??!1,percentage:e?.percentComplete??0,totalItems:t,currentItem:Math.min(n+1,t)}}function Kr(e){switch(e){case Or.zZ.SUCCESS:return jr.O4.SUCCESS;case Or.zZ.GENERIC:return jr.O4.GENERIC;case Or.zZ.DISK_FULL:return jr.O4.DISK_FULL;case Or.zZ.EXPIRED:return jr.O4.EXPIRED;case Or.zZ.TOO_MANY_TRACKS:return jr.O4.TOO_MANY_TRACKS;case Or.zZ.NOT_ALLOWED:return jr.O4.NOT_ALLOWED;case Or.zZ.CONNECTION_DISABLED:return jr.O4.CONNECTION_DISABLED;case Or.zZ.DEVICE_LIMIT_REACHED:return jr.O4.DEVICE_LIMIT_REACHED;case Or.zZ.UNRECOGNIZED:default:return jr.O4.UNRECOGNIZED}}function Yr(e){let t=[];return(0,Dr.XT)((n=>{t.forEach((e=>e.cancel())),t=[],(0,Ur.F)(Array.from(n.keys()),(n=>t.push(e(n))),100)}),100)}class qr extends Lr.p{constructor(e,t,n,i,r){super(),this._username=e,this._cosmos=t,this._offline=n,this._productState=i,this._cache=r,this.setupConnectivityEvents(),this.setupErrorEvents(),this.setupCapabilitiesEvents(),this.setupTotalProgressEvents(),this.setupContextProgressEvents(),this.setupContextAndItemAvailabilityEvents()}setupConnectivityEvents(){let e=0,t=null;this.onAddListener(Lr.I.UPDATE_CONNECTIVITY,(()=>{1==++e&&(t=this._cosmos.sub("sp://connectivity-manager/v1/connection",(e=>this.emit(Lr.I.UPDATE_CONNECTIVITY,{connectivity:Gr(e)}))))})),this.onRemoveListener(Lr.I.UPDATE_CONNECTIVITY,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupErrorEvents(){let e=0,t=null;this.onAddListener(Lr.I.ERROR,(()=>{1==++e&&(t=this._offline.subscribeError({},(({code:e})=>this.emit(Lr.I.ERROR,{code:Kr(e)}))))})),this.onRemoveListener(Lr.I.ERROR,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupCapabilitiesEvents(){let e=0,t=null;this.onAddListener(Lr.I.UPDATE_CAPABILITIES,(()=>{1==++e&&(t=this._productState.subValues({},(({pairs:e})=>{e.offline&&this.emit(Lr.I.UPDATE_CAPABILITIES,{capabilites:{canDownload:Fr("1"===e.offline,"1"===e["streaming-only-premium"])}})})))})),this.onRemoveListener(Lr.I.UPDATE_CAPABILITIES,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupTotalProgressEvents(){let e=0,t=null;this.onAddListener(Lr.I.UPDATE_TOTAL_PROGRESS,(()=>{1==++e&&(t=this._offline.subscribeTotalProgress({},(({progress:e})=>this.emit(Lr.I.UPDATE_TOTAL_PROGRESS,{progress:Wr(e)}))))})),this.onRemoveListener(Lr.I.UPDATE_TOTAL_PROGRESS,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupContextProgressEvents(){const e=e=>{const t=Br(e.uri);null!==t&&this.emit(Lr.I.UPDATE_CONTEXT_PROGRESS,{uri:t,progress:Wr(e.progress)})},t=Yr((t=>this._offline.subscribeContextsProgress({uris:t},(({progresses:t})=>t.forEach((t=>e(t)))))));this.onAddListener(Lr.I.UPDATE_CONTEXT_PROGRESS,(e=>{const n=Mr(this._username,e.data.options.uri);null!==n&&t.subscribe(n)})),this.onRemoveListener(Lr.I.UPDATE_CONTEXT_PROGRESS,(e=>{const n=Mr(this._username,e.data.options.uri);null!==n&&t.unsubscribe(n)}))}setupContextAndItemAvailabilityEvents(){const e=e=>{const t=Br(e.uri);if(null===t)return;const n=function(e){switch(e.state){case Or.W1.DOWNLOADED:return jr.kw.YES;case Or.W1.DOWNLOADING:return jr.kw.DOWNLOADING;case Or.W1.WAITING:case Or.W1.REQUESTED:return jr.kw.WAITING;case Or.W1.NOT_DOWNLOADED:case Or.W1.ERROR:case Or.W1.UNRECOGNIZED:default:return jr.kw.NO}}(e);this._cache.set(t,n),this.emit(Lr.I.UPDATE_AVAILABILITY,{uri:t,availability:n})},t=Yr((t=>this._offline.subscribeContexts({uris:t},(({contexts:t})=>t.forEach((t=>{void 0!==t.context&&e(t.context)})))))),n=e=>{const t=Br(e.uri);if(null===t)return;const n=function(e){switch(e.state){case Or.C8.DOWNLOADED:return jr.kw.YES;case Or.C8.DOWNLOADING:return jr.kw.DOWNLOADING;case Or.C8.WAITING_FOR_REDOWNLOAD:case Or.C8.WAITING:case Or.C8.WAITING_LIMIT_EXCEEDED:return jr.kw.WAITING;case Or.C8.NOT_DOWNLOADED:case Or.C8.ERROR:case Or.C8.DOWNLOADED_EXPIRED:case Or.C8.UNRECOGNIZED:default:return jr.kw.NO}}(e);this._cache.set(t,n),this.emit(Lr.I.UPDATE_AVAILABILITY,{uri:t,availability:n})},i=Yr((e=>this._offline.subscribeItems({uris:e},(({items:e})=>e.forEach((e=>n(e)))))));this.onAddListener(Lr.I.UPDATE_AVAILABILITY,(e=>{const n=Mr(this._username,e.data.options.uri);if(null===n)return;const r=Vr(n);r===Hr.CONTEXT?t.subscribe(n):r===Hr.ITEM&&i.subscribe(n)})),this.onRemoveListener(Lr.I.UPDATE_AVAILABILITY,(e=>{const n=Mr(this._username,e.data.options.uri);if(null===n)return;const r=Vr(n);r===Hr.CONTEXT?t.unsubscribe(n):r===Hr.ITEM&&i.unsubscribe(n)}))}}var Qr=n(39104);const $r=(0,n(60351).g)(Or.W1);function Zr(e){if($r(e))switch(e){case Or.W1.UNRECOGNIZED:return jr.kw.NO;case Or.W1.REQUESTED:case Or.W1.WAITING:return jr.kw.WAITING;case Or.W1.DOWNLOADING:return jr.kw.DOWNLOADING;case Or.W1.DOWNLOADED:return jr.kw.YES;case Or.W1.ERROR:case Or.W1.NOT_DOWNLOADED:return jr.kw.NO;default:return(0,me.k)(e),jr.kw.NO}return jr.kw.NO}function Xr(e){const t=e.entityInfo;if(void 0===t)return null;const n=(0,ee.o_)(t.uri);if(null===n)return null;switch(n.type){case ee.NQ.ARTIST:case ee.NQ.COLLECTION_ARTIST:return function(e){return{type:ne.c.ARTIST,uri:Br(e.uri)??"",name:e.name,images:[{url:e.imageUri,label:"standard"}]}}(t);case ee.NQ.ALBUM:case ee.NQ.COLLECTION_ALBUM:return function(e,t){return{type:ne.c.ALBUM,uri:Br(e.uri)??"",name:e.name,artists:[{type:ne.c.ARTIST,uri:t?.artistUri??"",name:t?.artistName??""}],images:[{url:e.imageUri,label:"standard"}]}}(t,e.album);case ee.NQ.SHOW:return function(e,t){return{type:ne.c.SHOW,uri:e.uri,name:e.name,publisher:t?.creatorName??"",images:[{url:e.imageUri,label:"standard"}]}}(t,e.show);case ee.NQ.PLAYLIST:case ee.NQ.PLAYLIST_V2:return function(e,t){return{type:ne.c.PLAYLIST,uri:e.uri,name:e.name,creatorName:t?.creatorName??"",images:[{url:e.imageUri,label:"standard"}]}}(t,e.playlist);case ee.NQ.COLLECTION:return function(e){return{type:e.uri.endsWith("your-episodes")?ne.c.YOUR_EPISODES:ne.c.LIKED_SONGS,uri:e.uri}}(t);default:return null}}class Jr{_cache=new Map;constructor(e,t,n,i,r,s){this._username=e,this._storage=n,this._offline=i,this._yourLibrary=r,this._productState=s,this._events=new qr(this._username,t,this._offline,this._productState,this._cache),this._events.addListener(Lr.I.UPDATE_CAPABILITIES,(e=>this._canDownload=e.data.capabilites.canDownload)),this._canDownload=Fr()}getCapabilities(){return{canDownload:(e,t)=>this._canDownload(e,t),canRemoteDownload:!0}}getEvents(){return this._events}async getDownloads(){return(await this._yourLibrary.all(ft.WT.fromPartial({header:{allPlaylists:!0,filters:{filter:[ft.jO.DOWNLOADED]},length:1e3}}))).entity.map(Xr).filter(sr.P)}getAvailabilitySync(e){return this._cache.get(e)??jr.kw.NO}async getContextForDevices(e){const t=await new Promise((t=>{const n=this._offline.subscribeDevicesWithContext(Or.U9.fromPartial({uri:e}),(e=>{t(e),n.cancel()}))}));return t.deviceWithContext.filter((e=>!!e.device&&e.isSupported&&!!e.device.capabilities?.remoteDownloadsEnabled)).map((({device:e,context:t})=>{const{deviceId:n,cacheId:i,isLocal:r,name:s,type:a,lastSeenAt:o,platform:l}=e;return{deviceId:n,cacheId:i,deviceType:a,clientPlatform:l,isLocal:r,name:s,type:(0,Qr.I)(a),lastSeenAtMs:o?.getTime()??0,contextDownloadAvailability:Zr(t?.state),contextDownloadPercentage:t?.percentComplete??0}}))}async addDownload(e,t){const n=Mr(this._username,e);null!==n&&await this._offline.addDownload(Or.WN.fromPartial({uri:n,device:t}))}async removeDownload(e,t){const n=Mr(this._username,e);null!==n&&await this._offline.removeDownload(Or.WN.fromPartial({uri:n,device:t}))}async removeAllDownloads(){await this._offline.removeAllDownloads({})}async removeCache(){await this._storage.deleteUnlockedItems({})}async getStatistics(){const e=await this._storage.getStats({});return{currentSizeMB:Number(e.currentSize),currentLockedSizeMB:Number(e.currentLockedSize)}}}var es=n(3991);class ts{_info=null;getCapabilities(){return{canChangeVolume:!0,canGetPlaybackInfo:!0,canGetFiles:!0,puffinEnabled:!0}}_isLocal=!1;_isAvailable=!1;_volume=-1;constructor(e,t,n){this._playbackService=e,this._storageService=t,this._connectServiceClient=n,this._events=new es.T,this._playbackService.subPlaybackInfo({},(async e=>{this._info=e,this._events.emit(es._.INFO,e)})),this._playbackService.subVolume({},(({volume:e})=>{this._volume=e,this.emitVolume()})),this._connectServiceClient&&this._connectServiceClient.state(s.d1.fromPartial({includeLocalDevice:!0}),(({devices:e})=>{const t=e.find((e=>e.isActive));t?(this._isLocal=t.isSelf,this._isAvailable=t.supportsVolume):(this._isLocal=!1,this._isAvailable=!0),this.emitVolume()}))}getEvents(){return this._events}async getVolume(){return this.getVolumeInternal()}async setVolume(e){this._playbackService.setVolume({source:a.Sf.USER,volume:e,connectLoggingParams:void 0})}async raiseVolume(){this._playbackService.raiseVolume({source:a.Sf.USER,connectLoggingParams:void 0})}async lowerVolume(){this._playbackService.lowerVolume({source:a.Sf.USER,connectLoggingParams:void 0})}async getPlaybackInfo(){return this._info}async getFiles(e){const t=await this._playbackService.getFiles({uri:e});if(t.status!==a.e6.GETFILES_OK)throw new Error(`Failed to get files for URI '${e}'. Error code: ${t.status}`);const n=await Promise.all(t.files.map((({fileId:e})=>this._storageService.getFileRanges({fileId:e,realm:Pr.Mx.STREAM}))));return t.files.map(((e,t)=>({...e,byteSize:n[t].byteSizeKnown?Number(n[t].byteSize):-1,byteRanges:n[t].ranges.map((e=>({fromByte:Number(e.fromByte),toByte:Number(e.toByte)})))})))}getVolumeInternal(){return this._isAvailable?this._volume:-1}emitVolume(){this._events.emit(es._.VOLUME,{volume:this.getVolumeInternal(),isLocal:this._isLocal})}}var ns=n(37953),is=n(41164),rs=n(14255);const ss={specificRestricted:!1,externalizationRestricted:!1};var as=n(8012);const os="audio.saved-devices",ls="audio.disable-normalization-override";(0,as.u)("PlaybackFiltersAPI");class cs{constructor(e){this._localStorageAPI=e}setDevices(e){this._localStorageAPI.setItem(os,e)}getDevices(){const e=this._localStorageAPI.getItem(os);return e instanceof Error?null:e}getDevice(e){if(!e)return null;const t=this.getDevices();return t?.[e]??null}addDevice(e,t){if(!e)return;const n=this.getDevices();this.setDevices({...n,[e]:t})}updateDevice(e,t){if(!e)return;const n=this.getDevices();n?.[e]&&this.setDevices({...n,[e]:{...n[e],...t}})}removeDevice(e){if(!e)return;const t=this.getDevices();if(t){const{[e]:n,...i}=t;this.setDevices(i)}}}class us{getFilterState(){return Promise.resolve(null)}getDevices(){return Promise.resolve([])}getFiltersEvents(){return null}setCurrentDevice(){return Promise.resolve(void 0)}getSavedDevices(){return[]}removeCurrentDevice(){}isNormalizationOverriden(){return!1}disableNormalizationOverride(){}}const ds=e=>e?.filterFiles.map((e=>e.id))??[],ms=`${ar.I_}/better-sound-filters/v1`;class ps{_devicesCache=new Map;_deviceFiltersCache=new Map;_filterBytesCache=new Map;_inflightGetDevicesCache=new J.od;_inflightGetFiltersCache=new J.od;async fetchFilterBytesFromCDN(e){if(!this._filterBytesCache.has(e.id)){const t=await fetch(e.url);if(!t.ok)throw new Error(`CDN request for filter ${e.id} failed with status ${t.status}`);const n=await t.arrayBuffer();if(!(n.byteLength>0))throw new Error(`CDN returned null for filter ${e.id}!`);{const t=new Uint8Array(n);this._filterBytesCache.set(e.id,t)}}}async getFilterBytesForDevice(e){const t=e.specificEnabled?.filterFiles||[],n=e.specificDisabled?.filterFiles||[],i=e.externalizationEnabled?.filterFiles||[],r=e.externalizationDisabled?.filterFiles||[],s=t.concat(n,i,r);await Promise.all(s.map((e=>this.fetchFilterBytesFromCDN(e))))}constructor(e){this._builder=e}async getDevices(){if(this._devicesCache.size>0)return this._devicesCache;const e=(await this._inflightGetDevicesCache.create("getDevices",(()=>this._builder.build().withoutMarket().withJsonContentType().withHost(ms).withPath("/get-devices/").send()))).body.devices;return this._devicesCache.size!==e.length&&(this._devicesCache.clear(),e.forEach((e=>this._devicesCache.set(e.id,e)))),this._devicesCache}async getFiltersForDevice(e,t){if(!e)return null;const n=this._deviceFiltersCache.get(e);if(n)return n;const i=(await this.getDevices()).get(e)??{brand:"",model:""},r=(await this._inflightGetFiltersCache.create(`getFiltersForDevice:${i.brand}:${i.model}`,(()=>this._builder.build().withoutMarket().withJsonContentType().withHost(ms).withPath(`/map-device-to-filters/?brand=${encodeURIComponent(i.brand)}&model=${encodeURIComponent(i.model)}&format=${t.version}`).send()))).body;await this.getFilterBytesForDevice(r);const s=r;return this._deviceFiltersCache.set(e,s),s}async getFilterDataForDevice(e,t,n,i){const r=await this.getFiltersForDevice(e,i);if(!r)throw new Error(`No filters exist for device ${e}`);const s=ds(t?r.specificEnabled:r.specificDisabled);return{filterData:ds(n?r.externalizationEnabled:r.externalizationDisabled).concat(s||[]).map((e=>{const t=this.getFilterBytes(e);if(!t)throw new Error(`Filter ${e} not found!`);return t})),deviceFilters:r}}getFilterBytes(e){return this._filterBytesCache.get(e)}}var hs=n(9753);const gs={specificEnabled:!1,externalizationEnabled:!1};class fs{getCurrentAudioDeviceId(){return this._audioOutputDevicesApi.getDefaultDevice()?.id??null}constructor(e,t,n){this._audioOutputDevicesApi=e,this._devicePersister=t,this._externalAccessoryAPI=n}getCurrentDeviceState(){const e=this.getCurrentAudioDeviceId();return this._devicePersister.getDevice(e)}updateCurrentDeviceState(e){const t=this.getCurrentAudioDeviceId();return t?(this._devicePersister.updateDevice(t,{filterState:e}),e):gs}setCurrentDevice(e,t=null){const n=this.getCurrentAudioDeviceId();if(null===e)return this._devicePersister.updateDevice(n,{headphoneDevice:void 0}),gs;const i=this._devicePersister.getDevice(n);return i?(this._devicePersister.updateDevice(n,{headphoneDevice:e}),null!==i.filterState?i.filterState:gs):(this._devicePersister.addDevice(n,{headphoneDevice:e,filterState:null,predictedState:t}),gs)}async predictDevice(e,t){const n=Array.from(t.values());let i=n.find((t=>t.deviceName.toLowerCase().includes(e.name.toLowerCase()))),r=null;if(!i&&e.transportType===Me.Yg.BLUETOOTH){const t=await this._externalAccessoryAPI.lookup(e.name);t.type===hs.G.HEADPHONES&&t.brand&&t.model&&(i=n.find((e=>e.deviceName.toLowerCase().includes(t.model.toLowerCase())&&e.brand.toLowerCase().includes(t.brand.toLowerCase()))),r={predictedBrand:t.brand,predictedModel:t.model})}return{maybeDevice:i,predictedState:r}}}function bs(e,t){return{specificEnabled:e.specificEnabled&&!t.specificRestricted,externalizationEnabled:e.externalizationEnabled&&!t.externalizationRestricted}}var vs=n(55060);const ys=e=>{const t=e?.item?.type,n=e?.item?.mediaType;switch(t){case ne.c.CHAPTER:return"audiobook";case ne.c.EPISODE:return"audio"===n?"audio_podcast":"unknown";case ne.c.TRACK:return"track";default:return"unknown"}};class _s{async _initializeCurrentDevice(e){if(!e)return;const t=this._devicePersister.getDevice(e?.id);if(t)return void this.setCurrentDevice(t.headphoneDevice);const n=await this.getDevices(),{maybeDevice:i,predictedState:r}=await this._playbackFiltersDeviceService.predictDevice(e,n);this.setCurrentDevice(i??null,r)}async updateCurrentDeviceState(e){const t=this._playbackFiltersDeviceService.updateCurrentDeviceState(e);return this.setFilters(t)}async _updateCurrentFilter(){const{currentState:e}=await this._currentDeviceFilterState();await this.setFilters(e)}async setFilters(e){const t=this._playbackFiltersDeviceService.getCurrentDeviceState(),{specificEnabled:n,externalizationEnabled:i}=bs(e,this._contentRestrictions);if(!t||!n&&!i){try{this._shouldOverrideNormalization&&await this._puffin.leaveProcessingEnvironment({}),await this._puffin.disableProcessing({})}finally{this._events.emit(is.n.UPDATE,{})}return}const r=t?.headphoneDevice.id,{filterData:s,deviceFilters:a}=await this._playbackFiltersService.getFilterDataForDevice(r,n,i,await this._puffin.libraryVersion({}));try{this._shouldOverrideNormalization&&await this._puffin.enterProcessingEnvironment({}),await this._puffin.filter(ns.cj.fromPartial({filters:s,isO:n,isV:i}))}finally{((e,t,n,i)=>{const r=t.getState();e.send((0,vs.v)({specific_enabled:n.specificEnabled,externalization_enabled:n.externalizationEnabled,specific_filter_id:n.specificEnabled?i.specificEnabled?.id:i.specificDisabled?.id,content_type:ys(r),content_uri:r?.item?.uri,specific_enabled_revision:i.specificEnabled?.revision,format:i.externalizationEnabled?.format}))})(this._eventSender,this.__playerAPI,e,a),this._events.emit(is.n.UPDATE,{})}}async _currentDeviceFilterState(){const e=this._playbackFiltersDeviceService.getCurrentDeviceState(),t=(e?.headphoneDevice??null)?.id;return function(e,t,n,i,r){const s=e?.filterState??{specificEnabled:!1,externalizationEnabled:!1},a=e?.headphoneDevice??null,o=((e,t)=>({canTuneHeadphones:!(!e||!e.specificEnabled||t.specificRestricted)&&e.specificEnabled.filterFiles.length>0,canTuneStudio:!(!e||!e.externalizationEnabled||t.externalizationRestricted)&&e.externalizationEnabled.filterFiles.length>0}))(t,n);return{headphoneDevice:a,audioDevice:i.getDefaultDevice(),predictedState:e?.predictedState??null,isOnboarded:null!==e&&null!==e.filterState,currentState:bs(s,n),contentRestrictions:n,toggleTuneHeadphones:e&&o.canTuneHeadphones?()=>r({specificEnabled:!s.specificEnabled,externalizationEnabled:s.externalizationEnabled}):null,toggleTuneStudio:e&&o.canTuneStudio?()=>r({specificEnabled:s.specificEnabled,externalizationEnabled:!s.externalizationEnabled}):null,setFilterState:e=>r(e)}}(e,t?await this._playbackFiltersService.getFiltersForDevice(t,await this._puffin.libraryVersion({})):null,this._contentRestrictions,this._audioOutputDevicesAPI,this.updateCurrentDeviceState.bind(this))}constructor(e,t,n,i,r,s,a){this._builder=e,this._puffin=t,this._localStorageAPI=n,this.__eventSender=i,this.__playerAPI=r,this._audioOutputDevicesAPI=s,this._externalAccessoryAPI=a,this._events=new is.G,this._contentRestrictions=ss,this._eventSender=this.__eventSender,this._playerAPI=this.__playerAPI,this._devicePersister=new cs(this._localStorageAPI),this._playbackFiltersService=new ps(e),this._playbackFiltersDeviceService=new fs(this._audioOutputDevicesAPI,this._devicePersister,this._externalAccessoryAPI);const o=this._localStorageAPI.getItem(ls);this._shouldOverrideNormalization=o instanceof Error||!o,this._puffin.subscribeToErrors({},(e=>console.error("Puffin service error!",e))),this._audioOutputDevicesAPI.getEvents().addListener(Ue.B.DEVICE_CONNECTED,(async()=>{const e=this._audioOutputDevicesAPI.getDefaultDevice();e&&e.terminalType===Me.FI.HEADPHONES?await this._initializeCurrentDevice(e):this.setCurrentDevice(null)})),((e,t)=>{let n={...ss};e.getEvents().addListener(rs.gd.UPDATE,(({data:e})=>{const i=e?.item?.type,r=e?.item?.mediaType,s={...n};switch(i){case ne.c.CHAPTER:case ne.c.EPISODE:s.specificRestricted="video"===r||"mixed"===r,s.externalizationRestricted=!0;break;case ne.c.TRACK:s.specificRestricted=!1,s.externalizationRestricted=!1;break;case ne.c.UNKNOWN:break;default:s.specificRestricted=!0,s.externalizationRestricted=!0}n.specificRestricted===s.specificRestricted&&n.externalizationRestricted===s.externalizationRestricted||t(s),n=s}))})(this._playerAPI,(e=>{this._contentRestrictions={...e},this._updateCurrentFilter()}))}async getDevices(){const e=await this._playbackFiltersService.getDevices();return Array.from(e.values())}async getFilterState(){return this._currentDeviceFilterState()}async setCurrentDevice(e,t){const n=this._playbackFiltersDeviceService.setCurrentDevice(e,t??null);return this.setFilters(n)}getSavedDevices(){const e=this._devicePersister.getDevices();return null===e?[]:Object.values(e).filter((e=>null!==e.filterState))}async removeCurrentDevice(){await this.setCurrentDevice(null);const e=this._audioOutputDevicesAPI.getDefaultDevice(),t=e?.id??null;this._devicePersister.removeDevice(t),this._initializeCurrentDevice(e),this._events.emit(is.n.UPDATE,{})}getFiltersEvents(){return this._events}isNormalizationOverriden(){return this._shouldOverrideNormalization}disableNormalizationOverride(){this._localStorageAPI.setItem(ls,!0),this._shouldOverrideNormalization=!1,this._events.emit(is.n.NORMALIZATION_OVERRIDE_DISABLED,{})}}var Es=n(38996);function xs(e){return{feature_identifier:e.featureIdentifier,feature_version:e.featureVersion??"",referrer_identifier:e.referrerIdentifier??"",view_uri:e.viewURI??"",external_referrer:e.externalReferrer??"",device_identifier:""}}function Cs(e,t){const n={},i=function(e,{shuffle:t,repeat:n}){const i={};return void 0!==t?i.shuffling_context=t:(0,ee.WB)(e.uri)&&(i.shuffling_context=!1),void 0!==n?(i.repeating_context=n!==Es.p.REPEAT_NONE,i.repeating_track=n===Es.p.REPEAT_TRACK):(0,ee.WB)(e.uri)&&(i.repeating_context=!1,i.repeating_track=!1),i}(e,t);0!==Object.keys(i).length&&(n.player_options_override=i);const r=function({skipTo:e}){const{pageURL:t,pageIndex:n,uid:i,uri:r,index:s}=e??{};if(void 0===i&&void 0===r&&void 0===s&&void 0===n&&void 0===t)return;const a={};return void 0!==t&&(a.page_url=t),void 0!==n&&(a.page_index=n),void 0!==i&&(a.track_uid=i),void 0!==r&&(a.track_uri=r),void 0!==s&&(a.track_index=s),a}(t);return void 0!==r&&(n.skip_to=r),void 0!==t.seekTo&&(n.seek_to=t.seekTo),n}async function Ss(e,t,n,i,r,s){var a,o,l;return t&&await(a=n.maybeResync(i.uri),o=750,Promise.race([a,new Promise((e=>setTimeout(e,o)))])),await e.post(`sp://core-playlist/v1/playlist/${i.uri}/play`,{prepare_play_options:Cs(i,s),play_origin:xs(r),...i.metadata?{context_metadata:i.metadata}:{},logging_params:(l=s.loggingParams,{command_initiated_time:Date.now(),interaction_ids:l?.interactionId?[l.interactionId]:[],page_instance_ids:l?.pageInstanceId?[l.pageInstanceId]:[]})})}var As=n(34074);function ws(e){return X.xd.fromPartial({uid:e.uid??"",uri:e.uri,metadata:e.metadata??{}})}function Is({uri:e,url:t,nextPageUrl:n,items:i,metadata:r}){if(void 0!==t)return X.hn.fromPartial({pageUrl:t,nextPageUrl:n,metadata:{...r,page_uri:e},isLoading:!0});if(void 0!==i)return X.hn.fromPartial({tracks:i.map(ws),nextPageUrl:n,metadata:r,isLoading:!1});throw new Error("Invalid 'ContextPage' provided! Either 'url' or 'items' needs to be set.")}function Ts(e){return X.uF.fromPartial({disallowPausingReasons:e?.disallowPausingReasons,disallowResumingReasons:e?.disallowResumingReasons,disallowSeekingReasons:e?.disallowSeekingReasons,disallowSkippingPrevReasons:e?.disallowSkippingPreviousReasons,disallowSkippingNextReasons:e?.disallowSkippingNextReasons,disallowTogglingRepeatContextReasons:e?.disallowTogglingRepeatContextReasons,disallowTogglingRepeatTrackReasons:e?.disallowTogglingRepeatTrackReasons,disallowTogglingShuffleReasons:e?.disallowTogglingShuffleReasons})}function Ns({uri:e,url:t,pages:n,metadata:i,restrictions:r}){return void 0!==n?X.ob.fromPartial({uri:e,url:t,pages:n.map(Is),metadata:i,restrictions:Ts(r),isLoading:!1}):X.ob.fromPartial({uri:e,url:t??`context://${e}`,metadata:i,isLoading:!0})}function Rs(e){return X.xi.fromPartial({featureIdentifier:e.featureIdentifier??"",featureVersion:e.featureVersion??"",referrerIdentifier:e.referrerIdentifier??"",viewUri:e.viewURI??"",externalReferrer:e.externalReferrer??""})}function ks(e,{shuffle:t,repeat:n}){const i=X.Vk.fromPartial({});return void 0!==t?i.shufflingContext={value:t}:(0,ee.WB)(e.uri)&&(i.shufflingContext={value:!1}),void 0!==n?(i.repeatingContext={value:n!==Es.p.REPEAT_NONE},i.repeatingTrack={value:n===Es.p.REPEAT_TRACK}):(0,ee.WB)(e.uri)&&(i.repeatingContext={value:!1},i.repeatingTrack={value:!1}),i}function Os(e,t){return X.YH.fromPartial({skipTo:void 0!==t.skipTo?(n=t.skipTo,{pageUrl:n.pageURL??"",pageIndex:void 0!==n.pageIndex?{value:BigInt(n.pageIndex)}:void 0,trackUid:n.uid??"",trackUri:n.uri??"",trackIndex:void 0!==n.index?{value:BigInt(n.index)}:void 0}):void 0,seekTo:void 0!==t.seekTo?{value:BigInt(t.seekTo)}:void 0,playerOptionsOverride:ks(e,t)});var n}function Ps({uri:e,url:t,nextPageUrl:n,items:i,metadata:r}){if(void 0!==t)return jt.hn.fromPartial({pageUrl:t,nextPageUrl:n,metadata:{...r,page_uri:e},isLoading:!0});if(void 0!==i)return jt.hn.fromPartial({tracks:i.map(ws),nextPageUrl:n,metadata:r,isLoading:!1});throw new Error("Invalid 'ContextPage' provided! Either 'url' or 'items' needs to be set.")}function js({uri:e,url:t,pages:n,metadata:i,restrictions:r}){return void 0!==n?jt.ob.fromPartial({uri:e,url:t,pages:n.map(Ps),metadata:i,restrictions:Ts(r),isLoading:!1}):jt.ob.fromPartial({uri:e,url:t??`context://${e}`,metadata:i,isLoading:!0})}function Ls(e){if(e.error!==X.wM.OK)throw new Error(`Command failed with code '${e.error}' and reasons '${e.reasons}'`);return{}}function Ds(e){return X.OU.fromPartial({commandInitiatedTime:{value:BigInt(Date.now())},interactionIds:e?.interactionId?[e.interactionId]:void 0,pageInstanceIds:e?.pageInstanceId?[e.pageInstanceId]:void 0})}async function Us(e,t,n,i){return e.setQueue(X.LC.fromPartial({nextTracks:t,prevTracks:n,queueRevision:BigInt(i),loggingParams:Ds()}))}function Ms(e){return void 0===e?[]:function(...e){return e.filter((({url:e,label:t})=>e&&t)).map((({url:e,label:t})=>({url:e,label:t})))}({url:e.image_url,label:"standard"},{url:e.image_small_url,label:"small"},{url:e.image_large_url,label:"large"},{url:e.image_xlarge_url,label:"xlarge"})}function Bs(e){return{milliseconds:(t=e,n=-1,t?parseInt(t,10):n)};var t,n}function Fs(e){return"true"===e?.toLowerCase()}const Hs=9;function Vs(e,t){if(void 0===e)return[];const n="artist_uri",i="artist_name",r=[{type:t,uri:e[n]??"",name:e[i]??""}];for(let s=1;s<=Hs;++s){const a=`${n}:${s}`,o=`${i}:${s}`;if(!e[a]||!e[o])break;r.push({type:t,uri:e[a]??"",name:e[o]??""})}return r}function zs(e){return{type:ne.c.ALBUM,uri:e.album_uri??"",name:e.album_title??"",images:Ms(e)}}function Gs(e){return{type:ne.c.SHOW,uri:e.album_uri??"",name:e.album_title??"",images:Ms(e)}}function Ws(e){return{type:ne.c.ALBUM,uri:e.album_uri??"",name:e.album_title??"",images:Ms(e)}}function Ks(e){return{type:ne.c.AUDIOBOOK,uri:e.album_uri??"",name:e.album_title??"",images:Ms(e)}}function Ys(e,t){return(0,ee.U_)(t.uri)||(0,ee.Pk)(t.uri)?function(e,t){const n=t.metadata;return{type:ne.c.TRACK,uri:t.uri,uid:t.uid,name:n.title??"",mediaType:n["media.type"]??"audio",duration:Bs(n.duration),album:zs(n),artists:Vs(n,ne.c.ARTIST),isLocal:Fs(n.is_local),isExplicit:Fs(n.is_explicit),is19PlusOnly:Fs(n.is_19_plus),hasAssociatedVideo:!!n.video_association,provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.album.images}}}(e,t):(0,ee.gH)(t.uri)?function(e){return"true"===e.metadata.is_audiobook_chapter}(t)?function(e,t){const n=t.metadata;return{type:ne.c.CHAPTER,uri:t.uri,uid:t.uid,name:n.title??"",mediaType:n["media.type"]??"audio",duration:Bs(n.duration),book:Ks(n),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,isExplicit:Fs(n.is_explicit),is19PlusOnly:Fs(n.is_19_plus),get images(){return this.book.images}}}(e,t):function(e,t){const n=t.metadata;return{type:ne.c.EPISODE,uri:t.uri,uid:t.uid,name:n.title??"",mediaType:n["media.type"]??"audio",duration:Bs(n.duration),show:Gs(n),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,isExplicit:Fs(n.is_explicit),is19PlusOnly:Fs(n.is_19_plus),get images(){return this.show.images}}}(e,t):(0,ee.AI)(t.uri)?function(e,t){const n=t.metadata,i=Fs(n.is_podcast_advertisement),r=n.artist_name??null;return{type:ne.c.AD,uri:t.uri,uid:t.uid,title:n.title??null,advertiser:i?r:n.advertiser??null,url:n.click_url??null,id:n.ad_id??null,mediaType:n["media.type"]??"audio",duration:Bs(n.duration),images:Ms(n),videoOrientation:n["ad.video_orientation"],isPodcastAd:i,isSkippableAd:Fs(n["ad.is_skippable"]),isTestAd:Fs(n["ad.is_test"]),provider:e.provider.length>0?e.provider:null,metadata:t.metadata}}(e,t):function(e,t){const n=t.metadata;return{type:ne.c.UNKNOWN,uri:t.uri,uid:t.uid??null,name:n.title??"",mediaType:n["media.type"]??"audio",duration:Bs(n.duration),album:Ws(n),artists:Vs(n,ne.c.ARTIST),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.album.images}}}(e,t)}var qs=n(48450);const Qs={canPause:!0,canResume:!0,canSeek:!0,canSkipPrevious:!0,canSkipNext:!0,canToggleRepeatContext:!0,canToggleRepeatTrack:!0,canToggleShuffle:!0,disallowPausingReasons:[],disallowResumingReasons:[],disallowSeekingReasons:[],disallowSkippingPreviousReasons:[],disallowSkippingNextReasons:[],disallowTogglingRepeatContextReasons:[],disallowTogglingRepeatTrackReasons:[],disallowTogglingShuffleReasons:[],disallowTransferringPlaybackReasons:[]};function $s(e=[]){return e.map((e=>qs.D.includes(e)?e:"unknown"))}function Zs(e){return{canPause:0===e.disallowPausingReasons.length,canResume:0===e.disallowResumingReasons.length,canSeek:0===e.disallowSeekingReasons.length,canSkipPrevious:0===e.disallowSkippingPrevReasons.length,canSkipNext:0===e.disallowSkippingNextReasons.length,canToggleRepeatContext:0===e.disallowTogglingRepeatContextReasons.length,canToggleRepeatTrack:0===e.disallowTogglingRepeatTrackReasons.length,canToggleShuffle:0===e.disallowTogglingShuffleReasons.length,disallowPausingReasons:$s(e.disallowPausingReasons),disallowResumingReasons:$s(e.disallowResumingReasons),disallowSeekingReasons:$s(e.disallowSeekingReasons),disallowSkippingPreviousReasons:$s(e.disallowSkippingPrevReasons),disallowSkippingNextReasons:$s(e.disallowSkippingNextReasons),disallowTogglingRepeatContextReasons:$s(e.disallowTogglingRepeatContextReasons),disallowTogglingRepeatTrackReasons:$s(e.disallowTogglingRepeatTrackReasons),disallowTogglingShuffleReasons:$s(e.disallowTogglingShuffleReasons),disallowTransferringPlaybackReasons:$s(e.disallowTransferringPlaybackReasons)}}var Xs=n(57442);const Js={bitrateLevel:Xs.Yn.UNKNOWN,strategy:Xs.ZT.UNKNOWN,targetBitrateLevel:Xs.Yn.UNKNOWN,targetBitrateAvailable:!1,hifiStatus:Xs.d4.NONE};function ea(e){const t=e=>{switch(e){case X.$E.LOW:return Xs.Yn.LOW;case X.$E.NORMAL:return Xs.Yn.NORMAL;case X.$E.HIGH:return Xs.Yn.HIGH;case X.$E.VERY_HIGH:return Xs.Yn.VERY_HIGH;case X.$E.HIFI:return Xs.Yn.HIFI;case X.$E.HIFI24:return Xs.Yn.HIFI24;default:return Xs.Yn.UNKNOWN}};return{bitrateLevel:t(e.bitrateLevel),strategy:(()=>{switch(e.strategy){case X.Mc.BEST_MATCHING:return Xs.ZT.BEST_MATCHING;case X.Mc.BACKEND_ADVISED:return Xs.ZT.BACKEND_ADVISED;case X.Mc.OFFLINED_FILE:return Xs.ZT.OFFLINED_FILE;case X.Mc.CACHED_FILE:return Xs.ZT.CACHED_FILE;case X.Mc.LOCAL_FILE:return Xs.ZT.LOCAL_FILE;default:return Xs.ZT.UNKNOWN}})(),targetBitrateLevel:t(e.targetBitrateLevel),targetBitrateAvailable:e.targetBitrateAvailable,hifiStatus:(()=>{switch(e.hifiStatus){case X.o_.UNRECOGNIZED:case X.o_.NONE:default:return Xs.d4.NONE;case X.o_.OFF:return Xs.d4.OFF;case X.o_.ON:return Xs.d4.ON}})()}}var ta=n(70964);var na=n(67922);function ia(e){return new na.q3(function(e){switch(e){case X.tE.SUCCESS:return na.Z9.SUCCESS;case X.tE.PLAYBACK_STUCK:return na.Z9.PLAYBACK_STUCK;case X.tE.PLAYBACK_ERROR:return na.Z9.PLAYBACK_ERROR;case X.tE.LICENSE_CHANGE:return na.Z9.LICENSE_CHANGE;case X.tE.PLAY_RESTRICTED:return na.Z9.PLAY_RESTRICTED;case X.tE.STOP_RESTRICTED:return na.Z9.STOP_RESTRICTED;case X.tE.UPDATE_RESTRICTED:return na.Z9.UPDATE_RESTRICTED;case X.tE.PAUSE_RESTRICTED:return na.Z9.PAUSE_RESTRICTED;case X.tE.RESUME_RESTRICTED:return na.Z9.RESUME_RESTRICTED;case X.tE.SKIP_TO_PREV_RESTRICTED:return na.Z9.SKIP_TO_PREV_RESTRICTED;case X.tE.SKIP_TO_NEXT_RESTRICTED:return na.Z9.SKIP_TO_NEXT_RESTRICTED;case X.tE.SKIP_TO_NON_EXISTENT_TRACK:return na.Z9.SKIP_TO_NON_EXISTENT_TRACK;case X.tE.SEEK_TO_RESTRICTED:return na.Z9.SEEK_TO_RESTRICTED;case X.tE.TOGGLE_REPEAT_CONTEXT_RESTRICTED:return na.Z9.TOGGLE_REPEAT_CONTEXT_RESTRICTED;case X.tE.TOGGLE_REPEAT_TRACK_RESTRICTED:return na.Z9.TOGGLE_REPEAT_TRACK_RESTRICTED;case X.tE.SET_OPTIONS_RESTRICTED:return na.Z9.SET_OPTIONS_RESTRICTED;case X.tE.TOGGLE_SHUFFLE_RESTRICTED:return na.Z9.TOGGLE_SHUFFLE_RESTRICTED;case X.tE.SET_QUEUE_RESTRICTED:return na.Z9.SET_QUEUE_RESTRICTED;case X.tE.INTERRUPT_PLAYBACK_RESTRICTED:return na.Z9.INTERRUPT_PLAYBACK_RESTRICTED;case X.tE.ONE_TRACK_UNPLAYABLE:return na.Z9.ONE_TRACK_UNPLAYABLE;case X.tE.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED:return na.Z9.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED;case X.tE.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED:return na.Z9.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED;case X.tE.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED:return na.Z9.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED;case X.tE.QUEUE_REVISION_MISMATCH:return na.Z9.QUEUE_REVISION_MISMATCH;case X.tE.VIDEO_PLAYBACK_ERROR:return na.Z9.VIDEO_PLAYBACK_ERROR;case X.tE.VIDEO_GEOGRAPHICALLY_RESTRICTED:return na.Z9.VIDEO_GEORESTRICTED;case X.tE.VIDEO_UNSUPPORTED_PLATFORM_VERSION:return na.Z9.VIDEO_UNSUPPORTED_PLATFORM_VERSION;case X.tE.VIDEO_UNSUPPORTED_CLIENT_VERSION:return na.Z9.VIDEO_UNSUPPORTED_CLIENT_VERSION;case X.tE.VIDEO_UNSUPPORTED_KEY_SYSTEM:return na.Z9.VIDEO_UNSUPPORTED_KEY_SYSTEM;case X.tE.VIDEO_MANIFEST_DELETED:return na.Z9.VIDEO_MANIFEST_DELETED;case X.tE.VIDEO_COUNTRY_RESTRICTED:return na.Z9.VIDEO_COUNTRY_RESTRICTED;case X.tE.VIDEO_UNAVAILABLE:return na.Z9.VIDEO_UNAVAILABLE;case X.tE.VIDEO_CATALOGUE_RESTRICTED:return na.Z9.VIDEO_CATALOGUE_RESTRICTED;case X.tE.INVALID:return na.Z9.INVALID;case X.tE.TIMEOUT:return na.Z9.TIMEOUT;case X.tE.PLAYBACK_REPORTING_ERROR:return na.Z9.PLAYBACK_REPORTING_ERROR;case X.tE.AUDIOBOOK_NOT_PLAYABLE:return na.Z9.AUDIOBOOK_NOT_PLAYABLE;case X.tE.UNKNOWN:return na.Z9.UNKNOWN;case X.tE.UNRECOGNIZED:default:return na.Z9.UNRECOGNIZED}}(e.code),e.data.reasons?e.data.reasons.split(","):[])}let ra=!1;class sa extends rs.JW{constructor(e,t){super(),this._client=e;let n=null,i=null;this._client.getState(X.T1.fromPartial({prevTracksCap:{value:BigInt(0)},nextTracksCap:{value:BigInt(t)}}),(e=>{const t=function(e){const t={timestamp:Number(e.timestamp),context:{uri:e.contextUri,url:e.contextUrl,metadata:e.contextMetadata},index:{pageURI:e.pageMetadata.page_uri??null,pageIndex:void 0!==e.index?.page?Number(e.index.page):null,itemIndex:void 0!==e.index?.track?Number(e.index.track):null},item:null,shuffle:null,repeat:null,speed:e.playbackSpeed?.value??null,positionAsOfTimestamp:Number(e.positionAsOfTimestamp?.value??0),duration:void 0!==e.duration?Number(e.duration.value):null,hasContext:e.isPlaying&&void 0!==e.track,isPaused:e.isPaused,isBuffering:e.isBuffering,restrictions:void 0!==e.restrictions?Zs(e.restrictions):Qs,previousItems:[],nextItems:[],playbackQuality:void 0!==e.playbackQuality?ea(e.playbackQuality):Js,playbackId:e.playbackId.length>0?(0,ta.U5)(e.playbackId):null,sessionId:e.sessionId,signals:e.signals};return void 0!==e.options&&(t.shuffle=e.options.shufflingContext,e.options.repeatingTrack?t.repeat=Es.p.REPEAT_TRACK:e.options.repeatingContext?t.repeat=Es.p.REPEAT_CONTEXT:t.repeat=Es.p.REPEAT_NONE),void 0!==e.track&&void 0!==e.track.contextTrack&&(t.item=Ys(e.track,e.track.contextTrack)),e.prevTracks.forEach((e=>{e.contextTrack&&t.previousItems.push(Ys(e,e.contextTrack))})),e.nextTracks.forEach((e=>{e.contextTrack&&t.nextItems.push(Ys(e,e.contextTrack))})),t}(e);e.timestamp===BigInt(0)?null===i&&(i=setTimeout((()=>{this.emit(rs.gd.UPDATE,t)}),500)):(null!==i&&(clearTimeout(i),i=null),this.emit(rs.gd.UPDATE,t),null!==n&&function(e,t){const n=e.contextUri===t.contextUri,i=e.sessionId===t.sessionId,r=(s=e.playbackId,a=t.playbackId,s.byteLength===a.byteLength&&s.every(((e,t)=>e===a[t])));var s,a;const o=t.isPaused,l=t.positionAsOfTimestamp?.value===BigInt(0);return n&&i?(o||(ra=!0),!r&&ra&&o&&l):(ra=!1,!1)}(n,e)&&this.emit(rs.gd.CONTEXT_WRAPAROUND,{contextURI:e.contextUri,previousItemURI:n.track?.contextTrack?.uri??null}),n=e)})),this._client.getError(X.mc.fromPartial({}),(e=>{this.emit(rs.gd.ERROR,ia(e))}))}}var aa=n(14763);class oa{_queue=null;timeoutId=null;constructor(e,t,n,i){this._client=e,this._events=t,this.getRepeatMode=n,this._shouldRenderSecondRepeatedContextItemsIteration=i,this._client.getQueue(X.jy.fromPartial({}),(e=>{const t=!e.track?.contextTrack||0===e.nextTracks.length;this._queue=e,this._queueState=this.convertQueueState(e,this.getRepeatMode()),clearTimeout(this.timeoutId??0),t?this.timeoutId=setTimeout((()=>{this._events.emitQueueUpdate(this._queueState)}),500):this._events.emitQueueUpdate(this._queueState)})),this._queueState=(0,aa.RU)([],this.getRepeatMode(),this._shouldRenderSecondRepeatedContextItemsIteration)}convertQueueState(e,t){const n=e?.track&&e.track.contextTrack?Ys(e.track,e.track.contextTrack):null,i=this._queue?.nextTracks?.filter((e=>e.contextTrack)).map((e=>Ys(e,e.contextTrack)))??[],r=n?[n,...i]:i;return(0,aa.RU)(r,t,this._shouldRenderSecondRepeatedContextItemsIteration)}isSameItem(e,t){return e.uid&&t.contextTrack?.uid?e.uid===t.contextTrack?.uid:e.uri===t.contextTrack?.uri}isQueued(e){return"queue"===e.provider}markAsQueued(e){return X.zz.fromPartial({...e,contextTrack:X.xd.fromPartial({...e.contextTrack,metadata:{...e.contextTrack?.metadata,is_queued:"true"}}),provider:"queue"})}createQueueItem(e,t){return X.zz.fromPartial({contextTrack:X.xd.fromPartial({uri:e.uri,metadata:{is_queued:t.toString()}}),provider:t?"queue":"context"})}async addToQueue(e){if(null===this._queue)return;const t=e.map((e=>this.createQueueItem(e,!0))),n=[...this._queue?.nextTracks||[]],i=n.map((e=>e.provider)).lastIndexOf("queue");n.splice(i+1,0,...t),await Us(this._client,n,this._queue.prevTracks,this._queue.queueRevision.toString())}async removeFromQueue(e){null!==this._queue&&await Us(this._client,this._queue.nextTracks.filter((t=>!e.some((e=>this.isSameItem(e,t))))),this._queue.prevTracks,this._queue.queueRevision.toString())}async clearQueue(){null!==this._queue&&await Us(this._client,this._queue.nextTracks.filter((e=>!this.isQueued(e))),this._queue.prevTracks,this._queue.queueRevision.toString())}async reorderQueue(e,t){if(null===this._queue)return;const n=[...this._queue?.nextTracks||[]];await Us(this._client,(0,aa.jl)(e,n,t,this.isSameItem,this.isQueued,this.markAsQueued),this._queue.prevTracks,this._queue.queueRevision.toString())}async insertIntoQueue(e,t){if(null===this._queue)return;const n=[...this._queue?.nextTracks||[]];await Us(this._client,(0,aa.Ry)(e,n,t,this.isSameItem,this.isQueued,this.createQueueItem),this._queue.prevTracks,this._queue.queueRevision.toString())}getQueue(){return this._queueState}getInternalQueue(){return this._queue}}const la=e=>(0,ee.WB)(e);var ca=n(76663),ua=n(87512);var da=n(46724);function ma(e){return`context://${e}`}class pa{_state=null;forcedShuffle=!1;constructor(e,t,n,i,r,s,a,o,l,c,u,d){this._cosmos=e,this._prefs=t,this._contextPlayer=n,this._collection=i,this._playlistServiceClient=r,this._contextualShuffle=s,this._smartShuffleEligibility=a,this._defaultFeatureVersion=o,this._isSmartShuffleEnabled=l,this._isResyncBeforePlayPlaylistEnabled=c,this._playlistResyncerAPI=u,this._shouldRenderSecondRepeatedContextItemsIteration=d,this._events=new sa(this._contextPlayer,50),this._queue=new oa(this._contextPlayer,this._events,(()=>this._state?.repeat??Es.p.REPEAT_NONE),this._shouldRenderSecondRepeatedContextItemsIteration),this._events.addListener(rs.gd.UPDATE,(({data:e})=>{this._state=e,this.forcedShuffle&&e&&!1===e.shuffle&&e.restrictions.canToggleShuffle&&!la(e.context.uri)&&this.setShuffle(!0)})),this.referrer="PlayerCore_UnknownReferrer"}setDefaultFeatureVersion(e){void 0===e.featureVersion&&(e.featureVersion=this._defaultFeatureVersion)}getCapabilities(){return{canChangeSpeed:!0,canChangeVolume:!0,canPlayMultipleContextPages:!0,maxNextTracks:50,hasDecoratedQueue:!0}}getEvents(){return this._events}getState(){return this._state}getReferrer(){return this.referrer}setReferrer(e){this.referrer=e}async play(e,t,n={}){const i={...n},r={...e};if("your_library"===t.featureIdentifier&&n.skipTo?.index){const e=Math.floor(n.skipTo.index/150),t={index:n.skipTo.index-150*e,pageIndex:e};i.skipTo={...i.skipTo,...t}}if(this.forcedShuffle&&!la(r.uri))i.shuffle=!0;else if(this._isSmartShuffleEnabled){const e=(0,ee.o_)(r.uri)?.type===ee.NQ.COLLECTION;let t=r.uri;const n=await(this._contextualShuffle?.getContextualShuffleMode(r.uri))??ua.j.OFF;n===ua.j.SMART_SHUFFLE&&e&&(({lensUri:t}=await this._smartShuffleEligibility.getEligibility(r.uri)),r.url=ma((0,da.f0)(t,!0))),i.shuffle=(0,ca.C)(n),((e,t,n)=>{(0,ee.tb)(e)?n.requestLenses(Ni.K02.fromPartial({uri:e,lenses:[{identifier:"enhance",active:t}]})):Promise.resolve(null)})(t,n===ua.j.SMART_SHUFFLE,this._playlistServiceClient)}if(this._events.emitPlaySync(r,t,i))return;this.setDefaultFeatureVersion(t);const s=(0,ee.tb)(r.uri),a=(0,ee.Z0)(r.uri)&&!r.uri.endsWith("your-episodes")||(0,ee.KB)(r.uri)||(0,ee.eW)(r.uri),o=!!r.url;a&&!o?await async function(e,t,n,i){const r=jt.o$.fromPartial({sort:t.metadata?.[As.W.LIST_UTIL_SORT],filter:t.metadata?.[As.W.LIST_UTIL_FILTER],context:js(t),preparePlayOptions:Os(t,i),playOrigin:Rs(n),loggingParams:Ds(i.loggingParams)}),s=(0,ee.o_)(t.uri);return s?.type===ee.NQ.COLLECTION_ARTIST?(r.id=s.id,await e.playArtist(r)):s?.type===ee.NQ.COLLECTION_ALBUM?(r.id=s.id,await e.playAlbum(r)):await e.playTracks(r)}(this._collection,r,t,i):s&&!o?await Ss(this._cosmos,this._isResyncBeforePlayPlaylistEnabled,this._playlistResyncerAPI,r,t,i):await async function(e,t,n,i){return e.play(X.kN.fromPartial({preparePlayRequest:X.fQ.fromPartial({context:Ns(t),playOrigin:Rs(n),options:Os(t,i)}),loggingParams:Ds(i.loggingParams)})).then(Ls)}(this._contextPlayer,r,t,i)}async pause(){this._events.emitPauseSync()||await async function(e){return e.pause(X.Uq.fromPartial({loggingParams:Ds()})).then(Ls)}(this._contextPlayer)}async resume(){this._events.emitResumeSync()||await async function(e){return e.resume(X.dR.fromPartial({loggingParams:Ds()})).then(Ls)}(this._contextPlayer)}async skipToNext(e){this._events.emitSkipToNextSync()||await async function(e,t,n){const i={};return void 0!==n&&t&&(i.track=t.nextTracks.find((e=>(!n.uid||e.contextTrack?.uid===n.uid)&&e.contextTrack?.uri===n.uri))?.contextTrack),e.skipNext(X.od.fromPartial({...i,loggingParams:Ds()})).then(Ls)}(this._contextPlayer,this._queue.getInternalQueue(),e)}async skipTo(e){this._events.emitSkipToNextSync()||await async function(e,t){const n={track:t};return e.skipNext(X.od.fromPartial({...n,loggingParams:Ds()})).then(Ls)}(this._contextPlayer,ws(e))}async skipToPrevious(){this._events.emitSkipToPreviousSync()||await async function(e){return e.skipPrev(X.iy.fromPartial({allowSeeking:!0,loggingParams:Ds()})).then(Ls)}(this._contextPlayer)}async seekTo(e){await async function(e,t,n=null){return e.seekTo(X.vn.fromPartial({position:BigInt(Math.floor(t)),relative:X.w8.BEGINNING,options:{onlyForPlaybackId:n??void 0},loggingParams:Ds()})).then(Ls)}(this._contextPlayer,e,this._state?.playbackId?(0,ta.xJ)(this._state.playbackId):null)}async seekBy(e){await async function(e,t,n=null){return e.seekTo(X.vn.fromPartial({position:BigInt(Math.floor(t)),relative:X.w8.CURRENT,options:{onlyForPlaybackId:n??void 0},loggingParams:Ds()})).then(Ls)}(this._contextPlayer,e,this._state?.playbackId?(0,ta.xJ)(this._state.playbackId):null)}async seekForward(e){await this.seekBy(e)}async seekBackward(e){await this.seekBy(-e)}async setShuffle(e){await async function(e,t){return e.setShufflingContext(X.Zb.fromPartial({shufflingContext:t,loggingParams:Ds()})).then(Ls)}(this._contextPlayer,this.forcedShuffle||e)}async setRepeat(e){await async function(e,t){let n=!1,i=!1;switch(t){case Es.p.REPEAT_NONE:n=!1,i=!1;break;case Es.p.REPEAT_CONTEXT:n=!0,i=!1;break;case Es.p.REPEAT_TRACK:n=!0,i=!0}return e.setOptions(X.y4.fromPartial({repeatingTrack:{value:i},repeatingContext:{value:n},loggingParams:Ds()})).then(Ls)}(this._contextPlayer,e)}async setSpeed(e){await async function(e,t){await e.set({entries:{"audio.episode.speed":{number:BigInt(Math.round(100*t))}}})}(this._prefs,e)}async canPlayEncryptedContent(){return!0}async refreshCurrentContext(){}async updateContext(e,t,n){t&&async function(e,t,n,i){e.updateContext(X.eM.fromPartial({sessionId:t,context:n,loggingParams:Ds(i?.loggingParams)})).then(Ls)}(this._contextPlayer,e,t,n)}async sendSignal(e){await async function(e,t,n){return e.signal(X.gU.fromPartial({signalId:t,options:n,loggingParams:Ds()}))}(this._contextPlayer,e)}canSendSignal(e){const t=this._state?.signals;return!!t&&(!(t.length<=0)&&t.includes(e))}async addToQueue(e){if(!this._events.emitQueueActionSync(rs.UC.ADD))try{await this._queue.addToQueue(e),this._events.emitQueueActionComplete(rs.UC.ADD)}catch(e){throw this._events.emitQueueActionComplete(rs.UC.ADD,e instanceof Error?e:new Error("Unknown error object")),e}}async removeFromQueue(e){if(!this._events.emitQueueActionSync(rs.UC.REMOVE))try{await this._queue.removeFromQueue(e),this._events.emitQueueActionComplete(rs.UC.REMOVE)}catch(e){throw this._events.emitQueueActionComplete(rs.UC.REMOVE,e instanceof Error?e:new Error("Unknown error object")),e}}async clearQueue(){if(!this._events.emitQueueActionSync(rs.UC.CLEAR))try{await this._queue.clearQueue(),this._events.emitQueueActionComplete(rs.UC.CLEAR)}catch(e){throw this._events.emitQueueActionComplete(rs.UC.CLEAR,e instanceof Error?e:new Error("Unknown error object")),e}}async reorderQueue(e,t){if(!this._events.emitQueueActionSync(rs.UC.REORDER))try{await this._queue.reorderQueue(e,t),this._events.emitQueueActionComplete(rs.UC.REORDER)}catch(e){throw this._events.emitQueueActionComplete(rs.UC.REORDER,e instanceof Error?e:new Error("Unknown error object")),e}}async insertIntoQueue(e,t){if(!this._events.emitQueueActionSync(rs.UC.INSERT))try{await this._queue.insertIntoQueue(e,t),this._events.emitQueueActionComplete(rs.UC.INSERT)}catch(e){throw this._events.emitQueueActionComplete(rs.UC.INSERT,e instanceof Error?e:new Error("Unknown error object")),e}}getQueue(){return this._queue.getQueue()}getForcedShuffle(){return this.forcedShuffle}setForcedShuffle(e){this.forcedShuffle=e}async playAsNextInQueue(e){const t=e.map((e=>ws(e)));await async function(e,t,n){await e.playAsNextInQueue(X.bf.fromPartial({tracks:t,options:n,loggingParams:Ds()}))}(this._contextPlayer,t)}}var ha=n(70602);var ga=n(98739),fa=n(51055),ba=n(39361),va=n(20370),ya=n(72877),_a=n(54361),Ea=n(34840);class xa extends Ea.N{_subscriptions=new Map;constructor(e){super(),this._dataClient=e}onBatchChanged(e){this._subscriptions.forEach(((t,n)=>{e.has(n)||(t.cancel(),this._subscriptions.delete(n))})),e.forEach(((e,t)=>{this._subscriptions.has(t)||this._dataClient.subscribe({uri:t,query:Ni.bpJ.fromPartial({range:{start:0,length:0},updateThrottlingMs:100,showUnavailable:!0}),policy:{playlist:Ni.fu_.fromPartial({name:!0,description:!0,picture:!0}),item:void 0,track:void 0,episode:void 0}},(()=>{this.emit(_a.Lj.UPDATE,{uri:t})}))}))}}function Ca(e){return Object.prototype.hasOwnProperty.call(e,"uid")}function Sa(e){const{before:t,after:n}=e;return"start"===t?{before:"start"}:void 0!==t?{before:Ca(t)?t.uid:t.uri}:"end"===n?{after:"end"}:void 0!==n?{after:Ca(n)?n.uid:n.uri}:{}}const Aa=Ni.gop.fromPartial({username:!0,link:!0,name:!0,image:!0,thumbnail:!0,color:!0}),wa=Ni.fu_.fromPartial({link:!0,name:!0,loaded:!0,totalLength:!0,duration:!0,description:!0,picture:!0,playable:!0,canReportAnnotationAbuse:!0,followers:!0,ownedBySelf:!0,published:!0,formatListType:!0,formatListAttributes:!0,containsSpotifyTracks:!0,containsTracks:!0,containsEpisodes:!0,owner:Aa,madeFor:Aa,allows:{insert:!0,remove:!0},numberOfEpisodes:!0,numberOfTracks:!0,collaboratingUsers:{count:!0,limit:5,collaborator:{user:Aa,numberOfItems:!0,numberOfTracks:!0,numberOfEpisodes:!0,isOwner:!0}},basePermission:!0,userCapabilities:!0,extension:[],lenses:!0,lengthIgnoringTextFilter:!0,numberOfItemsPerLinkType:!0}),Ia=Ni.MvQ.fromPartial({hasLyrics:!0,link:!0,name:!0,length:!0,playable:!0,isAvailableInMetadataCatalogue:!0,locallyPlayable:!0,playableLocalTrack:!0,discNumber:!0,trackNumber:!0,isExplicit:!0,previewId:!0,isLocal:!0,isPremiumOnly:!0,playableTrackLink:!0,popularity:!0,is19PlusOnly:!0,trackDescriptors:!0,extension:[Ni.UHM.VIDEO_ASSOCIATIONS]}),Ta=Ni.ycN.fromPartial({link:!0,name:!0,covers:!0}),Na=Ni.Sdk.fromPartial({link:!0,name:!0}),Ra=Ni.oUG.fromPartial({track:Ia,rowId:!0,addTime:!0,formatListAttributes:!0,addedBy:Aa,album:{album:Ta,artist:Na},artist:Na}),ka=Ni.q$c.fromPartial({link:!0,length:!0,name:!0,number:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,publishDate:!0,extension:[Ni.UHM.PODCAST_SUBSCRIPTIONS],is19PlusOnly:!0,isBookChapter:!0,isPodcastShort:!0}),Oa=Ni.QVI.fromPartial({link:!0,name:!0,covers:!0,isMusicAndTalk:!0,extension:[],isBook:!0}),Pa=Ni.C4N.fromPartial({episode:ka,rowId:!0,addTime:!0,formatListAttributes:!0,addedBy:Aa,show:Oa,signals:!0,isRecommendation:!0,playedState:{playable:!0,timeLeft:!0}}),ja=Ni.MTo.fromPartial({uri:!0,collectionState:!0,extensionPolicy:[{linkType:Ni.JaG.SHOW,extension:Ni.UHM.SHOW_ACCESS},{linkType:Ni.JaG.SHOW,extension:Ni.UHM.COVER_IMAGE},{linkType:Ni.JaG.SHOW,extension:Ni.UHM.AUDIOBOOK_SPECIFICS},{linkType:Ni.JaG.SHOW,extension:Ni.UHM.PLAYABILITY},{linkType:Ni.JaG.SHOW,extension:Ni.UHM.SHOW_V4},{linkType:Ni.JaG.SHOW,extension:Ni.UHM.HTML_DESCRIPTION},{linkType:Ni.JaG.SHOW,extension:Ni.UHM.PODCAST_RATING},{linkType:Ni.JaG.SHOW,extension:Ni.UHM.AUDIOBOOK_GENRE}]}),La=Ni.NYH.fromPartial({addTime:!0,folder:{rowId:!0,link:!0,name:!0,rows:!0}}),Da=Ni.xJU.fromPartial({addTime:!0,playlist:{allows:{insert:!0,remove:!0},canReportAnnotationAbuse:!0,description:!0,duration:!0,formatListAttributes:!0,formatListType:!0,link:!0,loadState:!0,loaded:!0,name:!0,ownedBySelf:!0,owner:{link:!0,name:!0,username:!0},picture:!0,playable:!0,published:!0,rowId:!0,totalLength:!0}}),Ua=Ni.q5f.fromPartial({folder:{folder:{rows:!0}},playlist:{playlist:{ownedBySelf:!0}}}),Ma=Ni.q5f.fromPartial({folder:La,playlist:Da});var Ba=n(84689);function Fa(e){return void 0===e?[]:function(...e){return e.filter((({url:e,label:t})=>e&&t)).map((({url:e,label:t})=>({url:e,label:t})))}({url:e.standardLink,label:"standard"},{url:e.smallLink,label:"small"},{url:e.largeLink,label:"large"},{url:e.xlargeLink,label:"xlarge"},{url:e.imageUri,label:"standard"},{url:e.thumbnailUri,label:"small"})}function Ha(e){return e?{type:ne.c.USER,uri:e.link,username:e.username,displayName:e.displayName,images:Fa(e)}:null}function Va(e){return e?new Date(1e3*e):null}function za(e){return e.reduce(((e,t)=>(e[t.key]=t.value,e)),{})}function Ga(e){return{milliseconds:e}}function Wa(e){return{isOwner:e.isOwner,tracksAdded:e.numberOfItems,user:e.user&&Ha(e.user)}}function Ka(e){return{isOwner:e.isOwner,tracksAdded:e.numTracks,user:e.user&&Ha(e.user)}}function Ya(e,t){return t&&t.basePermissionLevel!==Ni.e6Z.CONTRIBUTOR?{count:t?.numTotalMembers||0,items:(t?.members||[]).map(Ka)}:{count:e?.count||0,items:(e?.collaborator||[]).map(Wa)}}function qa(e){return!e||!Ba.E.includes(e)}function Qa(e,t,n){return{type:ne.c.PLAYLIST,uri:e.link,name:e.name,description:e.description,images:Fa(e.pictures),madeFor:Ha(e.madeFor),owner:Ha(e.owner),totalLength:t?.unrangedLength??e.totalLength,unfilteredTotalLength:e.lengthIgnoringTextFilter,totalLikes:t?.numFollowers??null,duration:t?.duration?(l=t.duration,{milliseconds:1e3*Number(l),isEstimate:!1}):null,isLoaded:e.isLoaded,isOwnedBySelf:e.ownedBySelf,isPublished:e.published,hasEpisodes:t?.containsEpisodes??null,hasSpotifyTracks:t?.containsSpotifyTracks??null,hasSpotifyAudiobooks:!!t?.numberOfItemsPerLinkType?.find((({linkType:e})=>e===Ni.JaG.SHOW))?.numItems,canAdd:e.allows?.canInsert??!1,canRemove:e.allows?.canRemove??!1,canPlay:t?.playable??null,formatListData:(a=e.formatListType,o=e.formatListAttributes,a?{type:a,attributes:za(o)}:null),canReportAnnotationAbuse:e.canReportAnnotationAbuse,hasDateAdded:qa(e.formatListType),permissions:(i=t?.userCapabilities,r=t?.collaborators,s=t?.basePermission,i||r||s?{canView:!!i?.canView,canAdministratePermissions:i?.canAdministratePermissions||!1,canCancelMembership:i?.canCancelMembership||!1,isPrivate:s?.permissionLevel===Ni.e6Z.BLOCKED}:null),collaborators:Ya(t?.collaborators,n)};var i,r,s,a,o,l}function $a(e){return{type:ne.c.ARTIST,uri:e.link,name:e.name}}function Za(e){return{type:ne.c.ARTIST,uri:e.link,name:e.name}}function Xa(e){return e?{type:ne.c.ALBUM,uri:e.link,name:e.name,artist:e.artist&&Za(e.artist),images:Fa(e.covers)}:null}function Ja(e,t){const n=Ai(e.extension);return{type:ne.c.TRACK,uri:e.link,name:e.name,album:Xa(e.album),artists:e.artist.map($a),discNumber:e.discNumber,trackNumber:e.trackNumber,duration:Ga(1e3*e.length),isExplicit:e.isExplicit,isLocal:e.isLocal,isPlayable:t.isPlayable,is19PlusOnly:e.is19PlusOnly,hasAssociatedVideo:(n.videoAssociations?.videoAssociation?.length||0)>0}}function eo(e,t){return{type:ne.c.SHOW,uri:e.link,name:e.name,publisher:e.publisher,images:Fa(e.covers),mediaType:t}}function to(e){return{isPaywalled:e.podcastSubscription?.isPaywalled??!1,isUserSubscribed:e.podcastSubscription?.isUserSubscribed??!1}}function no(e,t){const n=Ai(e.extension);return{type:ne.c.EPISODE,uri:e.link,name:e.name,description:e.description,duration:Ga(1e3*e.length),timeLeft:Ga(1e3*t.timeLeft),images:Fa(e.covers),isExplicit:e.isExplicit,isPlayable:t.isPlayable,languages:[e.language],release:(i=e.publishDate,{date:Va(Number(i)).toISOString(),precision:"day"}),show:eo(e.show,e.mediaTypeEnum),podcastSubscription:to(n),is19PlusOnly:e.is19PlusOnly};var i}var io=n(35828),ro=n(51326),so=n(81623);function ao(e){return{isPaywalled:e.podcastSubscription?.isPaywalled??!1,isUserSubscribed:e.podcastSubscription?.isUserSubscribed??!1}}function oo(e){return e?.audiobookSpecifics?.credits?.narrators.map((e=>e.name))??[]}function lo(e){return e.is19PlusOnly?{label:io.x7.NineteenPlus}:e.isExplicit?{label:io.x7.Explicit}:{label:io.x7.Unknown}}function co(e){return void 0===e?[]:function(...e){return e.filter((({url:e})=>e)).map((({url:e,width:t,height:n})=>({url:e,width:t,height:n})))}({url:e.standardLink,width:300,height:300},{url:e.smallLink,width:64,height:64},{url:e.largeLink,width:640,height:640})}function uo(e,t){const n=e.length-t.timeLeft;return{playPositionMilliseconds:1e3*n,playPosition:n,state:t.isPlayed?io._w.Completed:io._w.NotStarted}}function mo(e){if(!e.publishDate)return null;const t=1e3*Number(e.publishDate);return{isoString:new Date(t).toISOString()}}function po(e){return e.mediaTypeEnum===Ni.Cix.VODCAST||e.mediaTypeEnum===Ni.Cix.VIDEO?[ro.Cx.Audio,ro.Cx.Video]:e.mediaTypeEnum===Ni.Cix.AUDIO?[ro.Cx.Audio]:[]}function ho(e,t){if(!e||!t)throw new Error("Error while constructing chapter metadata");const n=Ai(e.extension);return{type:ne.c.CHAPTER,uri:e.link,name:e.name,duration:{milliseconds:1e3*e.length},description:e.description,coverArt:co(e.covers)??[],audio:{items:[]},audioPreview:null,htmlDescription:n.htmlDescription?.htmlDescription||"",sharingInfo:null,contentRating:lo(e),playedState:uo(e,t),book:fo(e.show),playability:go(t,n),isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly}}function go(e,t){const n=!!t?.podcastSubscription?.isPaywalled;return{playable:n?!!t?.podcastSubscription?.isUserSubscribed:e.isPlayable,reason:n?ro.Uk.PaymentRequired:ro.Uk.Unknown}}function fo(e){return e?{uri:e.link,name:e.name,coverArt:co(e.covers)??[],trailer:null}:null}function bo(e,t){if(!e||!t)throw new Error("Error while constructing episode");const n=Ai(e.extension);return{type:ne.c.EPISODE,uri:e.link,name:e.name,description:e.description,htmlDescription:n.htmlDescription?.htmlDescription||"",episodeType:io.I_.Unknown,coverArt:co(e.covers)??[],playedState:uo(e,t),mediaTypes:po(e),audio:{items:[]},audioPreview:null,sharingInfo:null,segmentsCount:n.podcastSegments?.playbackSegments.length||0,podcast:(i=e.show,i?{uri:i.link,name:i.name,coverArt:co(i.covers)??[],trailer:null,showTypes:[]}:null),podcastSubscription:ao(n),releaseDate:mo(e),playability:go(t),contentRating:lo(e),duration:{milliseconds:1e3*e.length},contentInformation:n.contentInformation||null,transcript:n.transcripts?.transcripts||null};var i}const vo=e=>{switch(e){case c.j8.TRAILER:return ro.t5.TRAILER;case c.j8.CONTINUE_LISTENING:return ro.t5.CONTINUE_LISTENING;case c.j8.LATEST_PUBLISHED:return ro.t5.LATEST_PUBLISHED;case c.j8.UP_NEXT:return ro.t5.UP_NEXT;case c.j8.FIRST_PUBLISHED:return ro.t5.FIRST_PUBLISHED;default:return ro.t5.UNKNOWN}};function yo(e){if(e?.item)return{type:vo(e.label),data:bo(e.item.episodeMetadata,e.item.episodePlayState)}}function _o(e){const t=e.auxiliarySections?.trailerSection?.item,n=t?function(e){const t=e.episodeMetadata,n=e.episodePlayState;if(!t||!n)throw new Error("Error while constructing trailer");return{type:ne.c.EPISODE,uri:t.link,name:t.name,coverArt:co(t.covers)??[],audio:{items:[]},audioPreview:null,sharingInfo:null,duration:{milliseconds:1e3*t.length},contentRating:lo(t),mediaTypes:po(t)}}(t):null,i=e.header?.showMetadata;if(!i)throw new Error("Error while constructing podcast metadata");const r=Ai(i.extension),s=(0,so.E)(r.showAccess?.unlockedBy);return{type:ne.c.SHOW,uri:i.link,name:i.name,description:i.description||"",htmlDescription:r.htmlDescription?.htmlDescription||"",coverArt:co(i.covers)??[],trailer:n,topics:r.podcastTopics?.topics||[],podcastType:(o=i,o.isMusicAndTalk?"SHOW":"PODCAST"),showTypes:[],publisherName:i.publisher,consumptionOrder:(a=i.consumptionOrder,"sequential"===a?"sequential":"episodic"===a?"episodic":"recent"),nextBestEpisode:yo(e.auxiliarySections?.nextBestEpisodeSection),gatedContentAccessReason:s,isLocked:null===s,rating:r?.rating};var a,o}function Eo(e,t){return{text:e,type:t}}function xo(e){const t=!1===e?.isUserMemberOfAtLeastOneGroup,n=e?.unlockedBy?.includes(Wt.UG.ABP);return t&&!n}function Co(e){return e.map((e=>({uri:e.destinationUri,title:e.contextualName})))}function So(e){const t=e.auxiliarySections?.trailerSection?.item,n=t?function(e){const t=e.episodeMetadata,n=e.episodePlayState;if(!t||!n)throw new Error("Error while constructing sample");return{type:ne.c.CHAPTER,uri:t.link,name:t.name,coverArt:co(t.covers)??[],audio:{items:[]},audioPreview:null,sharingInfo:null,duration:{milliseconds:1e3*t.length},contentRating:lo(t),isPlayable:e.episodePlayState?.isPlayable??!1}}(t):null,i=e.header?.showMetadata;if(!i)throw new Error("Error while constructing book metadata");const r=Ai(i.extension),s=oo(r);return{isPreRelease:!1,type:ne.c.AUDIOBOOK,uri:i.link,name:i.name,coverArt:co(i.covers)??[],authorName:i.publisher,narrators:s,sample:n,htmlDescriptionPlain:r.htmlDescription?.htmlDescription,rating:r?.rating,isExplicit:i.isExplicit,duration:Number(r.audiobookSpecifics?.duration_ms),copyrights:(a=r.audiobookSpecifics?.credits?.publishers?.map((e=>e.name))??[],o=i.copyright,[...a.map((e=>Eo(e,"P"))),...o.map((e=>Eo(e,"C")))]),publishDate:r.audiobookSpecifics?.publish_date,price:r?.audiobookPrice,isLocked:xo(r?.showAccess),consumptionCapExplanation:r.showAccess?.consumptionCapped,signifierText:r.showAccess?.signifier?.text,resumeEpisodeLink:e.header?.showPlayState?.resumeEpisodeLink,topics:r.audiobookGenres?Co(r.audiobookGenres.genres):[]};var a,o}function Ao(e){return e?.prerelease?.entity?.copyright.map((e=>{let t;switch(e.type){case Rn.COPYRIGHT_TYPE_P:t="P";break;case Rn.COPYRIGHT_TYPE_C:t="C";break;default:t=null}return{text:e.text??"",type:t}})).filter((e=>!!e.type&&!!e.text))??[]}function wo(e,t){const n=Ai(t);return{type:ne.c.AUDIOBOOK,images:n.coverImage?.coverImages.map((e=>({url:`https://i.scdn.co/image/${(0,ta.U5)(e.fileId)}`,width:e.width,height:e.height})))??[],name:n.audiobookSpecifics?.main_title||"",uri:e,durationMs:Number(n.audiobookSpecifics?.duration_ms)||0,authorName:n.audiobookSpecifics?.credits?.authors?.map((e=>e.name)).join(g.Ru.getSeparator())||"",isLocked:xo(n.showAccess),isExplicit:n.showV4?.explicit,isOutOfMarket:!1===n.playability?.isPlayable&&n.playability?.reason===ci.PLAYABILITY_VERDICT_COUNTRY_RESTRICTED,consumptionCapExplanation:n.showAccess?.consumptionCapped,description:n.htmlDescription?.htmlDescription,signifierText:n.showAccess?.signifier?.text,rating:{average:n.rating?.averageRating?.average,showAverage:!!n.rating?.averageRating?.showAverage},topics:n.audiobookGenres?.genres?.map((e=>({uri:e.destinationUri,title:e.contextualName})))??[]}}function Io(e,t){if(!e?.item)throw new Error("Invalid playlist response!");return{items:e.item.map((e=>function(e){const t={uid:e.rowId,playIndex:null,addedAt:(n=e.addTime,Va(n)?.toISOString()??null),addedBy:Ha(e.addedBy),formatListAttributes:za(e.formatListAttributes)};var n;return void 0!==e.trackMetadata&&void 0!==e.trackPlayState?{...t,...Ja(e.trackMetadata,e.trackPlayState)}:void 0!==e.episodeMetadata&&void 0!==e.episodePlayState?{...t,...no(e.episodeMetadata,e.episodePlayState)}:void 0===e.trackMetadata&&void 0===e.episodeMetadata&&void 0!==e.extension?{...t,...wo(e.uri,e.extension)}:null}(e))),offset:t||0,limit:e.item.length,totalLength:e.unrangedLength}}function To(e){return e.some((e=>e.uid.length>0))?{rows:e.map((e=>e.uid))}:{uris:e.map((e=>e.uri))}}var No=n(69640);function Ro(e){if(void 0===e)return Ni.RHQ.NO_SORT;const{field:t,order:n}=e;switch(t){case yr.n.TITLE:return n===vr.x.DESC?Ni.RHQ.NAME_DESC:Ni.RHQ.NAME_ASC;case yr.n.ADDED_AT:return n===vr.x.DESC?Ni.RHQ.ADD_TIME_DESC:Ni.RHQ.ADD_TIME_ASC;case yr.n.ADDED_BY:return n===vr.x.DESC?Ni.RHQ.ADDED_BY_DESC:Ni.RHQ.ADDED_BY_ASC;case yr.n.ALBUM:return n===vr.x.DESC?Ni.RHQ.ALBUM_NAME_DESC:Ni.RHQ.ALBUM_NAME_ASC;case yr.n.ARTIST:return n===vr.x.DESC?Ni.RHQ.ARTIST_NAME_DESC:Ni.RHQ.ARTIST_NAME_ASC;case yr.n.DURATION:return n===vr.x.DESC?Ni.RHQ.DURATION_DESC:Ni.RHQ.DURATION_ASC;default:return(0,me.k)(t),Ni.RHQ.NO_SORT}}function ko(e){if(void 0===e)return Ni.xAU.NO_SORT;const{field:t,order:n}=e;switch(t){case No.nw.NAME:return n===No.xB.DESC?Ni.xAU.NAME_DESC:Ni.xAU.NAME_ASC;case No.nw.ADDED_AT:return n===No.xB.DESC?Ni.xAU.ADD_TIME_DESC:Ni.xAU.ADD_TIME_ASC;case No.nw.RECENTLY_PLAYED:return n===No.xB.DESC?Ni.xAU.RECENTLY_PLAYED_RANK_DESC:Ni.xAU.RECENTLY_PLAYED_RANK_ASC;case No.nw.RELEVANCE:return n===No.xB.DESC?Ni.xAU.FRECENCY_SCORE_DESC:Ni.xAU.FRECENCY_SCORE_ASC;case No.nw.AVAILABLE_OFFLINE:return n===No.xB.DESC?Ni.xAU.OFFLINE_STATE_DESC:Ni.xAU.OFFLINE_STATE_ASC;default:return(0,me.k)(t),Ni.xAU.NO_SORT}}function Oo(e){const t=e?.statusCode??0;if(t<200||t>299)throw new Error(e?.reason??"Unknown error!")}class Po{constructor(e,t,n,i,r,s){this._playlistDataClient=e,this._playlistServiceClient=t,this._smartShuffleEligibilityAPI=n,this._builder=i,this._isAudiobookCurationEnabled=r,this._resyncAPI=s,this._events=new xa(e)}getCapabilities(){return{canSort:!0,canFilter:!0,canModifyOffline:!0,canMoveMultipleItems:!0,canFetchAllTracks:!0,canDecorateAddedBy:!0,hasUidsGeneratedFromIndicies:!1,canAddAudiobooks:this._isAudiobookCurationEnabled}}getEvents(){return this._events}getPlaylistQuery(e){const t=[];return e?.includeRecommendations||t.push(Ni.l98.NOT_RECOMMENDATION),Ni.bpJ.fromPartial({supportedPlaceholderTypes:[Ni.JaG.SHOW],textFilter:(0,ha.QG)(e?.filter),sortBy:Ro(e?.sort),showUnavailable:!0,range:void 0!==e?.offset||void 0!==e?.limit?{start:e?.offset,length:e?.limit}:void 0,boolPredicates:t})}async getPlaylist(e,t,n){t?.withSync&&this.resync(e);const i=!n||0!==n.limit,r=this._playlistDataClient.get({uri:e,query:this.getPlaylistQuery(n),policy:Ni.gXE.fromPartial({playlist:wa,track:i?Ra:void 0,episode:i?Pa:void 0,item:i?ja:void 0})});let s=Promise.resolve(null);t?.hydrateCollaboratorsWithMembers&&(s=this._playlistServiceClient.getMembers(Ni.zOt.fromPartial({uri:e})));const[a,o]=await Promise.all([r,s]);if(403===a.status?.statusCode)return function(e){return{metadata:{type:ne.c.PLAYLIST,uri:e,name:"",description:"",images:[],madeFor:null,owner:{type:ne.c.USER,uri:"",username:"",displayName:"",images:[]},totalLength:0,unfilteredTotalLength:0,totalLikes:null,duration:null,isLoaded:!1,isOwnedBySelf:!1,isPublished:!1,hasEpisodes:null,hasSpotifyTracks:null,hasSpotifyAudiobooks:null,canAdd:!1,canRemove:!1,canPlay:null,formatListData:null,canReportAnnotationAbuse:!1,hasDateAdded:!1,permissions:{isPrivate:!1,canView:!1,canAdministratePermissions:!1,canCancelMembership:!1},collaborators:null},contents:{totalLength:0,offset:0,limit:0,items:[]}}}(e);const l=a.data,c=a.data?.playlist?.playlistMetadata,u=o?.response;if(!l||!c)throw new Error("Invalid playlist or members response!");return function(e,t,n){return{metadata:Qa(e,t,n),contents:Io(t)}}(c,l,u)}async getContents(e,t){return Io((await this._playlistDataClient.get({uri:e,query:this.getPlaylistQuery(t),policy:Ni.gXE.fromPartial({track:Ra,episode:Pa,item:ja})})).data)}async getMetadata(e,t){return(await this.getPlaylist(e,t,{offset:0,limit:0})).metadata}async resync(e){await this._resyncAPI.resync(e)}async add(e,t,n,i){if(!this._events.emitAddSync(e,t,i))try{Oo((await this._playlistServiceClient.modify(Ni.oVT.fromPartial({uri:e,request:Ni.Eas.fromPartial({operation:"add",uris:t,...Sa(n)})}))).status),this._events.emitAddComplete(e,null,t,i)}catch(n){throw this._events.emitAddComplete(e,(0,ya.z)(n),t,i),n}}async move(e,t,n){if(!this._events.emitMoveSync(e,t))try{Oo((await this._playlistServiceClient.modify(Ni.oVT.fromPartial({uri:e,request:Ni.Eas.fromPartial({operation:"move",rows:t.map((e=>e.uid)),...Sa(n)})}))).status),this._events.emitMoveComplete(e,null,t)}catch(n){throw this._events.emitMoveComplete(e,(0,ya.z)(n),t),n}}async remove(e,t){if(!this._events.emitRemoveSync(e,t))try{Oo((await this._playlistServiceClient.modify(Ni.oVT.fromPartial({uri:e,request:Ni.Eas.fromPartial({operation:"remove",...To(t)})}))).status),this._events.emitRemoveComplete(e,null,t)}catch(n){throw this._events.emitRemoveComplete(e,(0,ya.z)(n),t),n}}async uploadImage(e){return(0,va.V)(this._builder,e)}async setAttributes(e,t){Oo((await this._playlistServiceClient.modify(Ni.oVT.fromPartial({uri:e,request:{operation:"set",attributes:t}}))).status)}async clearAttributes(e,t){Oo((await this._playlistServiceClient.modify(Ni.oVT.fromPartial({uri:e,request:{operation:"clear",attributesToClear:t}}))).status)}async updateDetails(e,t){if(this._events.emitUpdateSync(e,t))return;const n={},i=[];if("name"in t){if(!t.name)throw Error("Can not set empty playlist name!");n.name=t.name}"description"in t&&(void 0===t.description||""===t.description?i.push(2):n.description=t.description);let r=null;if(t.imageUploadToken){const n=(0,ee.o_)(e).id;r=await(0,ba.H)(this._builder,n,t.imageUploadToken)}null!==r?n.picture=(0,ta.U5)(r):null===t.imageUploadToken&&i.push(3);try{Object.keys(n).length>0&&await this.setAttributes(e,n),i.length>0&&await this.clearAttributes(e,i),this._events.emitUpdateComplete(e,null,t)}catch(n){throw this._events.emitUpdateComplete(e,(0,ya.z)(n),t),n}}async _getLensedPlaylistUri(e){if((0,ee.Z0)(e)){const{lensUri:t}=await this._smartShuffleEligibilityAPI.getEligibility(e);return t}return e}async sendSignal(e,t,n){if(this._events.emitSendSignalSync(e,t,n))return;const i=await this._getLensedPlaylistUri(e);try{Oo((n?await this._playlistServiceClient.signalItem(Ni.$zj.fromPartial({itemUri:i,itemId:n,signal:{identifier:t}})):await this._playlistServiceClient.signal(Ni.Kue.fromPartial({listUri:i,signal:{identifier:t}}))).status),this._events.emitSendSignalComplete(e,t,n)}catch(i){this._events.emitSendSignalComplete(e,t,n,(0,ya.z)(i))}}async resolvePlaylistFormatURI(e){return(0,fa._)(this._builder,e)}async getRecommendedTracks(e,t,n){return await(0,ga.u)(this._builder,e,t,n)}async getRecommendedBookUris(e,t,n){return await(0,ga.w)(this._builder,e,t,n)}}var jo=n(48475),Lo=n(36651);function Do(e=Ni.e6Z.UNKNOWN){switch(e){case Ni.e6Z.UNKNOWN:return"UNKNOWN";case Ni.e6Z.BLOCKED:return"BLOCKED";case Ni.e6Z.CONTRIBUTOR:return"CONTRIBUTOR";case Ni.e6Z.VIEWER:return"VIEWER";case Ni.e6Z.UNRECOGNIZED:return"UNKNOWN";default:return(0,me.d)(e),"UNKNOWN"}}function Uo(e){switch(e){case"UNKNOWN":return Ni.e6Z.UNKNOWN;case"BLOCKED":return Ni.e6Z.BLOCKED;case"CONTRIBUTOR":return Ni.e6Z.CONTRIBUTOR;case"VIEWER":return Ni.e6Z.VIEWER;default:return(0,me.d)(e),Ni.e6Z.UNKNOWN}}function Mo(e){return{canView:e?.canView??!1,canAdministratePermissions:e?.canAdministratePermissions??!1,canEditMetadata:e?.canEditMetadata??!1,canEditItems:e?.canEditItems??!1,canCancelMembership:e?.canCancelMembership??!1}}function Bo(e){return{isFollowed:e.followState===Ni.$NQ.CAN_BE_UNFOLLOWED,isOwner:e.isOwner,permissionLevel:Do(e.permissionLevel),user:e.user&&Ha(e.user),songsAdded:e.numTracks}}function Fo(e=[]){return e.map(Bo)}class Ho{constructor(e,t){this._client=e,this._builder=t,this._events=new jo.KD}getCapabilities(){return{}}getEvents(){return this._events}async getPermissionGrant(e,t){const n={operation:jo.mA.GET_PERMISSION_GRANT,uri:e};this._events.emitOperationSync(n);try{const i=await(0,Lo.S1)(this._builder,e,t);return this._events.emitOperationComplete(n),i}catch(e){throw this._events.emitOperationComplete(n,(0,ya.z)(e)),e}}async claimPermissions(e,t){const n={operation:jo.mA.CLAIM_PERMISSION,uri:e,token:t};this._events.emitOperationSync(n);try{const i=await(0,Lo.f5)(this._builder,e,t);return this._events.emitOperationComplete(n),i}catch(e){throw this._events.emitOperationComplete(n,(0,ya.z)(e)),e}}async getMembers(e){const t=(await this._client.getMembers({uri:e,limit:void 0})).response;return{basePermissionLevel:Do(t?.basePermissionLevel),capabilities:Mo(t?.capabilities),members:Fo(t?.members)}}subscribeToMembers(e,t){return this._client.subscribeToMembers({uri:e,limit:void 0},(e=>{const n=e.response,i={basePermissionLevel:Do(n?.basePermissionLevel),capabilities:Mo(n?.capabilities),members:Fo(n?.members)};t(null,i)})).cancel}async removeMember(e,t){const n={operation:jo.mA.REMOVE_MEMBER,uri:e,username:t};this._events.emitOperationSync(n);try{await this._client.setMemberPermission({playlistUri:e,username:t,permissionLevel:Ni.e6Z.UNKNOWN,timeoutMs:1e3}),this._events.emitOperationComplete(n)}catch(e){throw this._events.emitOperationComplete(n,e),e}}async setMemberPermission(e,t,n){const i={operation:jo.mA.SET_MEMBER_PERMISSION,uri:e,permissionLevel:n};this._events.emitOperationSync(i);try{await this._client.setMemberPermission({playlistUri:e,username:t,permissionLevel:Uo(n),timeoutMs:1e3}),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,(0,ya.z)(e)),e}}async setBasePermission(e,t){const n={operation:jo.mA.SET_BASE_PERMISSION,uri:e,permissionLevel:t};this._events.emitOperationSync(n);try{await this._client.setBasePermission({uri:e,request:{permissionLevel:Uo(t),timeoutMs:1e3}}),this._events.emitOperationComplete(n)}catch(e){throw this._events.emitOperationComplete(n,(0,ya.z)(e)),e}}}class Vo{constructor(e){this._playlistServiceClient=e,this.lastSync=new Map}async resync(e){await this._playlistServiceClient.resync(Ni.Vr.fromPartial({playlistUris:[e]})),this.lastSync.set(e,Date.now())}async maybeResync(e){const t=this.lastSync.get(e);(void 0===t||Date.now()-t>216e5)&&await this.resync(e)}}var zo=n(33924),Go=n(32625),Wo=n(28495),Ko=n(26831),Yo=n(39718);class qo extends Yo.D{_subscription=null;constructor(e,t){super(),this._dataClient=e,this._contains=t}subscribeToUpdates(){this._dataClient.subscribe({query:{range:{start:0,length:0},updateThrottlingMs:100},policy:{folder:{folder:{name:!0}},playlist:{playlist:{name:!0}}}},(()=>{this.onUpdate()}))}unsubscribeFromUpdates(){null!==this._subscription&&(this._subscription.cancel(),this._subscription=null)}async onUpdate(){this.emit(Ko.tD.UPDATE,null),this.onContainsItems(this._aggregator.getBatch())}async onContainsItems(e){if(e.size>0){const t=Array.from(e.keys()),n=await this._contains(t);this.emitUpdateItems(t,n)}}}function Qo(e){return"notFound"===e.loadState}function $o(e){return"forbidden"===e.loadState}function Zo(e){const t=e.playlistMetadata;return Qo(t)||$o(t)?function(e,t){return{type:"placeholder",uri:t.link,addedAt:Va(e.addTime),isNotFound:Qo(t),isForbidden:$o(t)}}(e,t):{addedAt:Va(e.addTime),...Qa(t)}}function Xo(e,t){const n=e.folderMetadata,i=(e.item??[]).map((e=>function(e,t){if(e.folder)return Xo(e.folder,t);if(e.playlist)return Zo(e.playlist);throw new Error("Invalid playlist cosmos response!")}(e,t)));return i.forEach(t),{type:"folder",addedAt:Va(e.addTime),items:i,name:n.name,uri:n.link}}class Jo{_cache=null;_decorationCache=new J.l2(3e5);constructor(e,t,n,i){var r,s;this._rootlistDataClient=e,this._rootlistModificationClient=t,this._playlistDataClient=n,this._builder=i,this._events=(r=this._rootlistDataClient,s=this.contains.bind(this),new qo(r,s))}getCapabilities(){return{canSort:!0,canFilter:!0,canModifyOffline:!0}}async getMetadata(){const e=await this._rootlistDataClient.get({policy:Ua});return Oo(e.status),function(e){const t=[...e.item];let n=0,i=0;for(;t.length>0;){const e=t[0];e.folder?t.push(...e.folder.item):(!0===e.playlist?.playlistMetadata?.ownedBySelf&&n++,i++),t.shift()}return{ownedPlaylistCount:n,playlistCount:i}}(e.data?.root)}async getContents(e){const t=await this._rootlistDataClient.get({query:{folderUri:e?.folderUri,sortBy:ko(e?.sort),textFilter:(0,zo.QG)(e?.filter),range:void 0!==e?.offset||void 0!==e?.limit?{start:e?.offset,length:e?.limit}:void 0,flattenTree:e?.flatten},policy:Ma});Oo(t.status);const n=new Set,i={...Xo(t.data?.root,(e=>{(0,No.Af)(e)&&n.add(e.uri)})),totalItemCount:t.data?.unrangedLength};return this._cache=n,e?.decorateImagesAndOwner&&await(0,Wo.k)(this._builder,this._decorationCache,(0,Go.sh)(i)),i}getEvents(){return this._events}onUpdateItems(e,t){if(null!==this._cache){const n=this._cache;e.forEach((e=>t?n.add(e):n.delete(e)))}this._events.emitUpdateItems(e,t)}async applyModification(e){const t=await this._rootlistModificationClient.modify(Ni.C5T.fromPartial({request:e}));if(Oo(t.status),!t.response.success)throw new Error("Failed to apply rootlist modification!");return t.response}async renameFolder(e,t){await this.applyModification({operation:"set",attributes:{name:t},rows:[e.uri]})}async createFolder(e,t){return await this.applyModification({operation:"create",createItemKind:Ni.EtD.CREATE_ITEM_KIND_FOLDER,...Sa(t),name:e})}async moveFolder(e,t){await this.move(e,t)}async removeFolder(e){await this.applyModification({operation:"remove",contents:!0,rows:[e]})}async createPlaylist(e,t,n){if(this._events.emitCreatePlaylistSync(e,t,n))return null;try{const i=await this.applyModification({operation:"create",createItemKind:Ni.EtD.CREATE_ITEM_KIND_PLAYLIST,...Sa(t),name:e});return this._events.emitCreatePlaylistComplete(e,t,i.uri,null,n),i.uri}catch(i){return this._events.emitCreatePlaylistComplete(e,t,null,(0,ya.z)(i),n),null}}async add(e,t){if(!this._events.emitAddSync(e,t))try{this.onUpdateItems(e,!0),await this.applyModification({operation:"add",uris:e,...Sa(t)}),this._events.emitAddComplete(e,t)}catch(n){this.onUpdateItems(e,!1),this._events.emitAddComplete(e,t,(0,ya.z)(n))}}async move(e,t,n){if(!this._events.emitMoveSync(e,t))try{await this.applyModification({operation:"move",rows:[e.uri],...Sa(t)}),this._events.emitMoveComplete(e,t,null,n)}catch(n){this._events.emitMoveComplete(e,t,(0,ya.z)(n))}}async remove(e){if(this._events.emitRemoveSync(e))return;const t=e.map((e=>e.uri));try{this.onUpdateItems(t,!1),await this.applyModification({operation:"remove",rows:t}),this._events.emitRemoveComplete(e)}catch(n){this.onUpdateItems(t,!0),this._events.emitRemoveComplete(e,(0,ya.z)(n))}}async contains(e){const t=await this._rootlistDataClient.contains({items:e});return Oo(t.status),t.response?.found}containsSync(e){return null!==this._cache?this._cache.has(e):void 0}async getPublishedState(e){const t=await this._playlistDataClient.get({uri:e,query:{range:{start:0,length:0}},policy:{playlist:{published:!0}}});return Oo(t.status),t.data?.playlist?.playlistMetadata?.published??!1}async setPublishedState(e,t){await this.applyModification({operation:"set",attributes:{publishedState:t?Ni.Kpc.PUBLISHED_STATE_PUBLISHED:Ni.Kpc.PUBLISHED_STATE_NOT_PUBLISHED},rows:[e]})}}class el{_subs=new Set;_cache=new J.l2(36e5);_inFlightCache=new J.od;constructor(e){this.productStateApi=e,this.productStateApi.subValues(l.kM.fromPartial({}),(e=>{const t=this.mapKeys(e.pairs),n={...this._cache.get("productState")??{},...t};this._cache.set("productState",n);for(const e of this._subs)try{e(n)}catch(t){console.error("Error in `ProductState` sub:",{sub:e,error:t})}return n}))}mapKeys({country_code:e,type:t,...n}){const i={...n};return void 0!==e&&(i.country=e),void 0!==t&&(i.product=t),i}async getValues(){const e=this._cache.get("productState");if(e)return e;const t=await this._inFlightCache.create("getValues",(()=>this.productStateApi.getValues(l.kM.fromPartial({})))),n=this.mapKeys(t.pairs);return this._cache.set("productState",n),n}subValues(e){return this._subs.add(e),()=>{this._subs.delete(e)}}async setValues(e){await this.productStateApi.putValues(l.n3.fromPartial({pairs:e}))}}var tl=n(20004),nl=n(33925);function il(e,t){const n=new tl.BM(e);return new nl.j((e=>function(e,t){return e.addOnNewConnectionID({},(({id:e})=>t(e)))}(n,e)),((e,t,i)=>function(e,t,n,i){const r=e=>i({ident:e.Ident?.Ident??"",timestamp:Date.now(),attributes:e.Attributes,payloads:e.Payloads});return n?e.addOnPushedMessageForIdentFilter({Prefix:t},r):e.addOnPushedMessageForIdent({Ident:t},r)}(n,e,t,i)),t)}var rl=n(83275),sl=n(94343);const al=sl.pw.fromPartial({includeCollectionSongs:!0,includeYourEpisodes:!0,artistPolicy:{timestamp:!0,artistPolicy:{link:!0,name:!0,portraits:!0}},albumPolicy:{timestamp:!0,albumPolicy:{link:!0,name:!0,covers:!0},artistsPolicy:{link:!0,name:!0}},showPolicy:{timestamp:!0,showPolicy:{link:!0,name:!0,publisher:!0,covers:!0,extension:[c.UH.AUDIOBOOK_SPECIFICS,c.UH.SHOW_ACCESS]}},playlistPolicy:{timestamp:!0,playlistPolicy:{link:!0,name:!0,description:!0,picture:!0,owner:{link:!0,name:!0}}},trackPolicy:{timestamp:!0,trackPolicy:{link:!0,name:!0,isExplicit:!0,is19PlusOnly:!0},albumPolicy:{link:!0,name:!0,covers:!0},artistsPolicy:{link:!0,name:!0}},episodePolicy:{timestamp:!0,showPolicy:{link:!0,name:!0,publisher:!0,covers:!0,extension:[c.UH.AUDIOBOOK_SPECIFICS]}},collectionTracksPolicy:{link:!0,timestamp:!0}});function ol(e){return e?[{url:e,label:"standard"}]:[]}class ll extends rl.K5{_contexts=null;_cancellable=null;constructor(e,t){super(),this._client=new sl.oW(e),this._events=t}getEvents(){return this._events}getContexts(){return null===this._cancellable&&(this._cancellable=this._client.stream(al,(e=>{this._contexts=function(e){const t=new Set;return e.context.map((e=>{if(e.artist){const t=e.artist.artistMetadata;return{type:rl.d2.ARTIST,uri:t?.link??"",name:t?.name??"",images:ol(t?.portraits?.standardLink),timestampMs:e.artist.addTime}}if(e.album){const t=e.album.albumMetadata,n=new Set;return{type:rl.d2.ALBUM,uri:t?.link??"",name:t?.name??"",images:ol(t?.covers?.standardLink),artists:t?.artists.map((e=>({uri:e.link,name:e.name}))).filter((e=>!n.has(e.uri)&&n.add(e.uri)))??[],timestampMs:e.album.addTime}}if(e.show){const t=e.show.showMetadata,n=Ai(t?.extension??[]);if(void 0!==n.audiobookSpecifics){const i=n.audiobookSpecifics,r=n.showAccess?.signifier?.text;return{type:rl.d2.AUDIOBOOK,uri:t?.link??"",name:t?.name??"",images:ol(t?.covers?.standardLink),authors:i.credits?.authors.map((e=>e.name))??[],timestampMs:e.show.addTime,signifierText:r}}return{type:rl.d2.SHOW,uri:t?.link??"",name:t?.name??"",images:ol(t?.covers?.standardLink),publisher:t?.publisher??"",timestampMs:e.show.addTime}}if(e.playlist){const t=e.playlist.playlistMetadata;return{type:rl.d2.PLAYLIST,uri:t?.link??"",name:t?.name??"",description:t?.description??"",images:ol(t?.pictures?.standardLink),owner:{uri:t?.owner?.link??"",displayName:t?.owner?.displayName??""},attributes:t?.formatListAttributes??[],timestampMs:e.playlist.addTime}}if(e.track){const t=e.track.trackMetadata;return{type:rl.d2.TRACK,uri:t?.link??"",name:t?.name??"",images:ol(t?.album?.covers?.standardLink),artists:t?.artist.map((e=>({uri:e.link,name:e.name})))??[],isExplicit:t?.isExplicit??!1,isMOGEFRestricted:t?.is19PlusOnly??!1,timestampMs:e.track.addTime}}if(e.episode){const t=e.episode.showMetadata,n=Ai(t?.extension??[]);if(void 0!==n.audiobookSpecifics){const i=n.audiobookSpecifics;return{type:rl.d2.AUDIOBOOK,uri:t?.link??"",name:t?.name??"",images:ol(t?.covers?.standardLink),authors:i.credits?.authors.map((e=>e.name))??[],timestampMs:e.episode.addTime}}return{type:rl.d2.SHOW,uri:t?.link??"",name:t?.name??"",images:ol(t?.covers?.standardLink),publisher:t?.publisher??"",timestampMs:e.episode.addTime}}return e.collectionTracks&&(0,ee.Z0)(e.collectionTracks.link)?e.collectionTracks.link.endsWith("your-episodes")?{type:rl.d2.YOUR_EPISODES,uri:e.collectionTracks.link??"",timestampMs:e.collectionTracks.addTime}:{type:rl.d2.LIKED_SONGS,uri:e.collectionTracks.link??"",timestampMs:e.collectionTracks.addTime}:null})).filter(sr.P).sort(((e,t)=>t.timestampMs-e.timestampMs)).filter((e=>!t.has(e.uri)&&t.add(e.uri)))}(e),this._events.emit(rl.m5.UPDATE,this._contexts)}))),this._contexts}}var cl=n(94300),ul=n(48136);const dl={field:ul.K$.AVAILABLE,operator:ul.uj.EQUALS,value:!0};var ml=function(e){return e.TITLE="TITLE",e}(ml||{});const pl={[ul.K$.AVAILABLE]:ul.K$.AVAILABLE,[ul.K$.NAME]:ml.TITLE,[ul.K$.TEXT]:ul.K$.TEXT,[ul.K$.ISPLAYED]:ul.K$.ISPLAYED,[ul.K$.STARTEDPLAYING]:ul.K$.STARTEDPLAYING},hl={[ul.K$.AVAILABLE]:["available"],[ul.K$.TEXT]:["text"],[ul.K$.NAME]:["name"],[ul.K$.ISPLAYED]:["isPlayed"],[ul.K$.STARTEDPLAYING]:["progress"],[ml.TITLE]:["title"]},gl={[ul.uj.CONTAINS]:"contains",[ul.uj.EQUALS]:"eq",[ul.uj.NOT_EQUALS]:"!=",[ul.uj.GREATER_THAN]:">"};function fl(e){return e.map((e=>{const{field:t,operator:n,value:i}=e;return`${hl[t]} ${gl[n]} ${encodeURIComponent(i)}`})).join(",")}var bl=function(e){return e.ADDED_AT="ADDED_AT",e.DURATION="DURATION",e.TITLE="TITLE",e}(bl||{});const vl={[ul.WY.PUBLISH_DATE]:bl.ADDED_AT},yl={[ul.WY.PUBLISH_DATE]:["number","publishDate","name"],[bl.ADDED_AT]:["added_at"],[bl.DURATION]:["duration"],[bl.TITLE]:["title"]};var _l=n(55052),El=n(6366),xl=n(61391);class Cl extends xl.r{_subscriptions=new Map;constructor(e){super(),this._show_client=e,this.onAddListener(xl.K.UPDATE_ACCESS_INFO,(e=>{const{uri:t}=e.data.options;t&&this._aggregator.subscribe(t)})),this.onRemoveListener(xl.K.UPDATE_ACCESS_INFO,(e=>{const{uri:t}=e.data.options;t&&this._aggregator.unsubscribe(t)})),this.onAddListener(xl.K.UPDATE_RESUME_EPISODE_LINK,(e=>{const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(xl.K.UPDATE_RESUME_EPISODE_LINK,(e=>{const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)})),this._aggregator=(0,Dr.XT)((e=>{this._subscriptions.forEach(((t,n)=>{e.has(n)||(t.cancel(),this._subscriptions.delete(n))})),e.forEach(((e,t)=>{this._subscriptions.has(t)||this._subscriptions.set(t,this._show_client.subDecorate(c.NC.fromPartial({item:[t],showPolicy:{showPolicy:{isBook:!0,extension:[c.UH.SHOW_ACCESS]},showPlayedStatePolicy:{resumeEpisodeLink:!0}}}),(e=>{const n=e.response?.show.find((e=>e.link===t));if(!n)return;Ai(n.showMetadata?.extension).showAccess&&this.emit(xl.K.UPDATE_ACCESS_INFO,{uri:t}),n.showPlayState?.resumeEpisodeLink&&n.showMetadata?.isBook&&this.emit(xl.K.UPDATE_RESUME_EPISODE_LINK,{uri:t,resumeEpisodeLink:n.showPlayState?.resumeEpisodeLink})})))}))}))}}var Sl=n(35370),Al=n(67433),wl=n(58775);const Il=c.pt.fromPartial({showPolicy:{showPolicy:{link:!0,name:!0,publisher:!0,covers:!0}},episodePolicy:{link:!0,length:!0,name:!0,manifestId:!0,previewId:!0,previewManifestId:!0,description:!0,publishDate:!0,covers:!0,freezeFrames:!0,language:!0,available:!0,mediaTypeEnum:!0,number:!0,backgroundable:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,is19PlusOnly:!0,isBookChapter:!0,extension:[c.UH.PODCAST_SUBSCRIPTIONS,c.UH.CONTENT_WARNING]},episodePlayedStatePolicy:{timeLeft:!0,isPlayed:!0,playable:!0,playabilityRestriction:!0,lastPlayedAt:!0},episodeCollectionPolicy:{isFollowingShow:!0,isInListenLater:!0,isNew:!0},episodeSyncPolicy:{offline:!0,syncProgress:!0},progress:!0}),Tl=c.iz.fromPartial({showPolicy:{link:!0,name:!0,description:!0,publisher:!0,isExplicit:!0,covers:!0,mediaTypeEnum:!0,copyrights:!0,isMusicAndTalk:!0,isBook:!0,consumptionOrder:!0,extension:[c.UH.AUDIOBOOK_SPECIFICS,c.UH.PODCAST_SUBSCRIPTIONS,c.UH.PODCAST_TOPICS,c.UH.HTML_DESCRIPTION,c.UH.EPISODE_TRANSCRIPTS,c.UH.PODCAST_RATING,c.UH.AUDIOBOOK_PRICE,c.UH.SHOW_ACCESS,c.UH.AUDIOBOOK_RELATIONS,c.UH.PLAYABILITY,c.UH.AUDIOBOOK_GENRE,138]},showPlayedStatePolicy:{resumeEpisodeLink:!0}}),Nl=Ni.q$c.fromPartial({link:!0,length:!0,name:!0,manifestId:!0,previewId:!0,previewManifestId:!0,description:!0,publishDate:!0,covers:!0,freezeFrames:!0,language:!0,available:!0,mediaTypeEnum:!0,number:!0,backgroundable:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,is19PlusOnly:!0,isBookChapter:!0,extension:[c.UH.SHOW_ACCESS,c.UH.PODCAST_SEGMENTS,c.UH.PODCAST_SUBSCRIPTIONS,c.UH.HTML_DESCRIPTION,c.UH.CONTENT_WARNING,c.UH.EPISODE_TRANSCRIPTS]}),Rl=c.pt.fromPartial({episodeCollectionPolicy:{isNew:!0},episodePlayedStatePolicy:{playable:!0,timeLeft:!0,isPlayed:!0},episodePolicy:Nl}),kl=c.pt.fromPartial({showPolicy:{showPolicy:{link:!0,name:!0,publisher:!0,covers:!0}},episodePolicy:Nl,episodePlayedStatePolicy:{timeLeft:!0,isPlayed:!0,playable:!0,playabilityRestriction:!0,lastPlayedAt:!0},episodeCollectionPolicy:{isFollowingShow:!0,isInListenLater:!0,isNew:!0},episodeSyncPolicy:{offline:!0,syncProgress:!0},progress:!0});class Ol{capabilities={canSort:!0,canFilter:!0,canGetDefaultSort:!0,canGetShowPlayedState:!0};constructor(e,t,n){this.remote_configuration=t,this._builder=n,this._podcast_paywalls_client=new _l.lb(e),this._show_service_client=new c.Gy(e),this._events=new Cl(this._show_service_client),this._metadata_service_client=new wl.sp(e)}async getMetadata(e){const t=(0,ee.o_)(e).id,n=await this._show_service_client.getShow(c.bU.fromPartial({showId:t,range:{start:0,limit:1},headerPolicy:Tl,listPolicy:Rl,sectionsPolicy:{trailerSection:!0,nextBestEpisode:!0},includeExtensionsOnError:!0}));if(void 0===n.response||n.status?.code!==c.D7.SUCCESS){if(n.response?.header?.showMetadata?.extension){const e=Ai(n.response.header.showMetadata.extension);if(function(e){return e.audiobookSpecifics&&e.prerelease?.releaseTime&&e.prerelease?.releaseTime>new Date||!1}(e))return function(e){if(!e?.prerelease)throw new Error("Error while constructing prerelease metadata");return{isPreRelease:!0,type:ne.c.AUDIOBOOK,uri:e.prerelease.uri,name:e.prerelease.entity?.name??"",coverArt:e.prerelease.entity?.covers.map((e=>({...e,url:e.uri})))??[],authorName:e.prerelease.entity?.agents.map((e=>e.name)).join(", "),narrators:oo(e),sample:null,htmlDescriptionPlain:e.htmlDescription?.htmlDescription,rating:null,isExplicit:e.prerelease.entity?.explicit??!1,duration:Number(e.audiobookSpecifics?.duration_ms),copyrights:Ao(e),publishDate:e.prerelease.releaseTime,preReleaseEndDateTime:e.prerelease.releaseTime,price:e?.audiobookPrice,isLocked:xo(e?.showAccess),consumptionCapExplanation:e.showAccess?.consumptionCapped,signifierText:e.showAccess?.signifier?.text,topics:e.audiobookGenres?Co(e.audiobookGenres.genres):[]}}(e);if(!e.playability?.isPlayable&&e.playability?.reason===ci.PLAYABILITY_VERDICT_COUNTRY_RESTRICTED)throw new Sl.W("Requested audiobook is out of market",{cause:n.status?.reason,redirectUri:e.audiobookRelation?.sameBookUri})}throw new Error("Error while getting show metadata")}return function(e){const t=e.header?.showMetadata;if(t?.isBook)return So(e);if(!t)throw new Error("Error while constructing metadata");return _o(e)}(n.response)}async getAccessInfo(e){const t=await this._show_service_client.getDecorate(c.NC.fromPartial({item:[e],showPolicy:{showPolicy:{extension:[c.UH.SHOW_ACCESS]}}}));if(void 0===t.response)throw new Error("decorate request error");return function(e){let t={};const n=e.show.map((e=>e.showMetadata?.extension)).filter((e=>null!==e));for(const e of n)if(e&&(t=Ai(e),t.showAccess))break;return{prompt:t?.showAccess?.prompt,upsellLink:t?.showAccess?.upsellLink,basic:t?.showAccess?.basic,multiPass:t?.showAccess?.multiPass&&{title:t?.showAccess?.multiPass?.title,body:t?.showAccess?.multiPass?.soaDescription,soaPartners:t?.showAccess?.multiPass?.soaPartner},consumptionCapped:t?.showAccess?.consumptionCapped}}(t.response)}async getBookContents(e,t){t.doRefreshSubscription&&await this._podcast_paywalls_client.putShowSubscription(_l.D$.fromPartial({showUri:e}));const n=(0,ee.o_)(e).id,i=await this._show_service_client.getShow(c.bU.fromPartial({showId:n,range:{start:t.offset,limit:t.limit},listPolicy:Il}));if(void 0===i.response||i.status?.code!==c.D7.SUCCESS)throw new Error("Error while getting show metadata");return function(e,t,n){if(!e.item)throw new Error("Invalid show cosmos response!");const i="number"==typeof t&&"number"==typeof n?t+n:0;return{nextOffset:e.unrangedLength<i?null:i,totalCount:e.unrangedLength,items:e.item.map((e=>ho(e.episodeMetadata,e.episodePlayState)))}}(i.response,t.offset,t.limit)}async getContents(e,t){const n=(0,ee.o_)(e).id,i=function(e){if(e?.field===ul.WY.PUBLISH_DATE&&e.order===ul.AX.ASC)return c.xB.PUBLISH_DATE_ASC;if(e?.field===ul.WY.PUBLISH_DATE&&e.order===ul.AX.DESC)return c.xB.PUBLISH_DATE_DESC;return c.xB.CONSUMPTION_ORDER_ASC}(t.sort),r=function(e=[]){return e=e||[],fl([...e,dl])}(t.filters),s=await this._show_service_client.getShow(c.bU.fromPartial({showId:n,sortOrder:i,filter:r,listPolicy:Il,range:{start:t.offset,limit:t.limit}}));if(void 0===s.response||s.status?.code!==c.D7.SUCCESS)throw new Error(`Error while getting show metadata: ${s.status?.reason}`);return function(e,t,n){if(!e.item)throw new Error("Invalid show cosmos response!");const i="number"==typeof t&&"number"==typeof n?t+n:0;return{nextOffset:e.unrangedLength<i?null:i,totalCount:e.unrangedLength,items:e.item.map((e=>bo(e.episodeMetadata,e.episodePlayState)))}}(s.response,t.offset,t.limit)}async getEpisodeOrChapter(e){const t=await this._show_service_client.getDecorate(c.NC.fromPartial({item:[e],episodePolicy:kl}));if(void 0===t.response)throw new Error("decorate request error");return function(e){const t=e.episode?.[0];if(!t||!t.episodeMetadata)throw new Error("Error while constructing episode");if(t.episodeMetadata.isBookChapter)return ho(t.episodeMetadata,t.episodePlayState);if(!t.episodeMetadata)throw new Error("Error while constructing episode");return bo(t.episodeMetadata,t.episodePlayState)}(t.response)}async checkoutBook(e){return await(0,El.S)(e)}getPlayerSort(e){return e?function(e){const{field:t,order:n}=e;return yl[t].map((e=>n?`${e} ${n}`:e))}(function(e){return{field:vl[e.field],order:e.order}}(e)).join(", "):""}getPlayerFilter(e=[]){return fl(function(e){return(e=e||[]).map((e=>{const t=pl[e.field],n=function(e){return"string"==typeof e.value?`"${e.value}"`:e.value}(e);return{...e,field:t,value:n}}))}(e))}getEvents(){return this._events}async getShowPlayedState(e){const t=await this._show_service_client.getShow(c.bU.fromPartial({showId:(0,ee.o_)(e).id,headerPolicy:c.iz.fromPartial({showPlayedStatePolicy:{playedTime:!0,label:!0}})}));if(void 0===t.response)throw new Error("decorate request error");return t.response.header?.showPlayState?function(e){const t=e.response?.header?.showPlayState;if(!t)return null;const n=Number(t.playedTime);let i;switch(t.label){case 0:i=ro.H7.Unknown;break;case 1:i=ro.H7.NotStarted;break;case 2:i=ro.H7.InProgress;break;case 3:i=ro.H7.Completed;break;default:i=ro.H7.Unrecogniced}return{playPositionMilliseconds:1e3*n,state:i}}(t):null}async updateUserRating(e,t){const n=await(0,Al.p)(this._builder,e,t);return await this._metadata_service_client.expire(wl.vq.fromPartial({extensionKind:c.UH.PODCAST_RATING,entityUri:[e]})),this._events.emit(xl.K.UPDATE_RATING,{uri:e}),n}async invalidateShowMetadataCaches(e){await this._metadata_service_client.expire(wl.vq.fromPartial({extensionKind:c.UH.PLAYABILITY,entityUri:[e]}))}}var Pl=n(69632),jl=n(10910),Ll=n(18321),Dl=n(6370),Ul=n(12882);class Ml extends Ul.e{}const Bl="enhance";async function Fl({playlistDataServiceClient:e,playlistServiceClient:t,uri:n,isActive:i,timeout:r=5e3}){return await t.requestLenses(Ni.K02.fromPartial({uri:n,lenses:[{identifier:Bl,active:i}]})),new Promise(((s,a)=>{let o=null;const{cancel:l}=e.subscribe(Ni.qrL.fromPartial({uri:n,query:{range:{start:0,length:0}},policy:{playlist:{lenses:!0}}}),(e=>{!!e.data?.playlist?.lenses?.appliedLenses.find((e=>e.name===Bl))===i&&(l(),null!==o&&clearTimeout(o),s())}));r&&(o=setTimeout((()=>{l(),i&&t.requestLenses(Ni.K02.fromPartial({uri:n,lenses:[{identifier:Bl,active:!1}]})),a(new Ml(`${i?"Enabling":"Disabling"} Smart Shuffle failed after ${r}ms.`))}),r))}))}var Hl=n(13213),Vl=n(23974),zl=n(34980);class Gl{_isDsaEnabled=!1;constructor(e,t,n,i,r,s,a,o){if(this._player=e,this._playlistServiceClient=t,this._playlistDataServiceClient=n,this._contextualShuffle=i,this._smartShuffleEligibility=r,this._productStateApi=s,this._history=a,this.isSmartShuffleEnabled=o,this._events=new Ll.L,(0,zl.w)(this._productStateApi,(e=>{this._isDsaEnabled=e})),this.isSmartShuffleEnabled){new Hl.F(this._contextualShuffle,this._events,this._syncShuffle.bind(this)).observe()}else{const e=e=>{const t=(0,ee.o_)(e);t?.type===ee.NQ.PLAYLIST_V2&&Fl({playlistDataServiceClient:this._playlistDataServiceClient,playlistServiceClient:this._playlistServiceClient,uri:t.toURI(),isActive:!1})};this._player.getEvents().addListener(rs.gd.ACTION,(t=>{t.data.action===rs.Ik.PLAY&&e(t.data.context.uri)})),this._history.listen((async t=>{e(t.pathname)}))}}async _syncShuffle(e,t){let n=this._player.getState();const i=n?.context.uri,r=(0,ee.o_)(e)?.type===ee.NQ.COLLECTION,s=t===jl.j.SMART_SHUFFLE;let a=e;r&&(a=(await this._smartShuffleEligibility.getEligibility(e)).lensUri),await Fl({playlistDataServiceClient:this._playlistDataServiceClient,playlistServiceClient:this._playlistServiceClient,uri:a,isActive:s}),n?.context&&(0,Pl.b8)(e,i)&&(await this._player.setShuffle((0,Dl.C)(t)),n=this._player.getState(),r?this._player.updateContext(null,{uri:e,url:ma((0,da.f0)(s?a:e,s)),metadata:{...n?.context.metadata,enhanced_context:s?"true":void 0}}):n&&this._player.updateContext(null,{...n.context,metadata:{...n.context.metadata,enhanced_context:s?"true":void 0}}))}getEvents(){return this._events}async getAvailableShuffleModes(e){const t=[],n=this._player.getState(),i=n?.context.uri;if((0,Pl.b8)(e,i)&&!1===n?.restrictions.canToggleShuffle)t.push(n?.shuffle?jl.j.ON:jl.j.OFF);else{t.push(jl.j.OFF,jl.j.ON);const{canSmartShuffle:n}=await this._smartShuffleEligibility.getEligibility(e);n&&t.push(jl.j.SMART_SHUFFLE)}return t}async getShuffle(e){const t=this._player.getState(),n=t?.context.uri;let i=await this._contextualShuffle.getContextualShuffleMode(e);return(0,Pl.b8)(e,n)&&(i=(0,Vl.l)(t)??i),i===jl.j.SMART_SHUFFLE&&this._isDsaEnabled?jl.j.ON:i}async setShuffle(e,t){if(this._events.emitUpdateShuffleModeSync(e,t),t===jl.j.SMART_SHUFFLE&&this._isDsaEnabled)throw new Error("Trying to set smart shuffle when dsa is enabled");await this._contextualShuffle.setContextualShuffleMode(e,t)}}var Wl=n(20076),Kl=n(10229);class Yl{constructor(e){this.karaokeServiceClient=new Wl.Pm(e)}getCapabilities(){return{isSupported:!0}}async setVocalVolume(e){await this.karaokeServiceClient.postVocalVolume({volume:e})}async setStatus(e){await this.karaokeServiceClient.postStatus({status:e===Kl.nW.ENABLED?Wl.Fr.ENABLED:Wl.Fr.DISABLED})}async getStatus(){const{status:e}=await this.karaokeServiceClient.getStatus({});return e===Wl.Fr.ENABLED?Kl.nW.ENABLED:Kl.nW.DISABLED}}class ql{constructor(e){this._metadataServiceClient=e}async getEligibility(e){const t=(await this._metadataServiceClient.fetch(wl.Rr.fromPartial({extensionQuery:[{extensionKind:wl.UH.SMART_SHUFFLE,entityUri:[e]}]}))).extension.at(0),n=t?.extensionKind,i=t?.entityExtension.at(0)?.extensionData?.value,r=void 0===n||void 0===i?null:Ai([{extensionKind:n,data:i}]),s=r?.smartShuffle??null;return{canSmartShuffle:s?.enabled??!1,lensUri:s?.uri||e}}}var Ql=n(68096),$l=n(31530),Zl=n(2532),Xl=n(78014),Jl=n(43950),ec=n(48516),tc=n(33831);class nc{constructor(e,t){this.productStateApi=t,this.isJamFreeEnabled="1"===e["social-session-free-tier"],this.isJamPremiumEnabled="1"===e["social-session"],this.productStateApi.subValues((e=>{this.isJamFreeEnabled="1"===e["social-session-free-tier"],this.isJamPremiumEnabled="1"===e["social-session"]}))}getJamExperience(){return this.isJamPremiumEnabled?tc.l.PREMIUM:this.isJamFreeEnabled?tc.l.FREE:tc.l.NONE}}var ic=n(62288),rc=n(17359),sc=n(37938);async function ac(e,t){const n=(0,rc.F)(We.createBaseTransport,(0,sc.M)(),e);return n.addPlugin(ic.kJ,{WebSocket}),n.addPlugin(t),n.connect(),n}var oc=n(67296),lc=n(38743);class cc{constructor(e){this._cosmos=e}async getUser(){const{username:e}=await this._cosmos.get("sp://desktop/v1/session"),t=await async function(e,t){const n={name:t,images:[]};try{const{profiles:i}=await e.get("sp://core-profile/v1/profiles",{usernames:[t]});return i.length>0?i[0]:n}catch(e){return n}}(this._cosmos,e);return{type:ne.c.USER,uri:(0,ee.Qj)(e).toURI(),username:e,displayName:t.name,avatarBackgroundColor:t.color,images:t.images?.map((e=>({url:e.url,width:e.maxWidth,height:e.maxHeight})))||[]}}}async function uc(e){return{remote_config_client_id:"desktop-ui",...await e.get("sp://desktop/v1/platform")}}var dc=n(18875);const mc=n(8333).HZ.addMiddleware(dc.F);var pc=n(7564);class hc{constructor(e,t){this._pubsub=e,this._builder=t}subscribeToBuddyActivity(e,t){return this._pubsub.subscribe({ident:`hm://presence2/user/${encodeURIComponent(e)}`,isPrefix:!1,onMessage:async()=>{try{const n=await this.getBuddyActivity(e);t(n.body)}catch(e){}return{status:200,status_text:"Ok"}},onSubscribe:t=>t?(0,pc.GG)(this._builder,e,t):Promise.resolve(),onCancel:t=>t?(0,pc.Np)(this._builder,e,t):Promise.resolve()})}getBuddyActivity(e){return(0,pc.Yf)(this._builder,e)}getBuddyFeed(){return(0,pc.xA)(this._builder)}getFacebookFriends(){return(0,pc.KY)(this._builder)}}let gc=function(e){return e.FACEBOOK="FACEBOOK",e}({});class fc{constructor(e,t){this.cosmos=e,this.buddyFetchApi=t}getCapabilities(){return{isSupported:!0}}connectToFacebook(){return this.cosmos.post("sp://facebook/v1/connection",{enable:!0})}subscribeToFacebookConnectionState(e){return this.cosmos.sub("sp://facebook/v1/connection",(t=>{e(t)}))}subscribeToBuddyActivity(e,t){return this.buddyFetchApi.subscribeToBuddyActivity(e,t)}async fetchFacebookFriends(){const e=await this.buddyFetchApi.getFacebookFriends();return(e.body?.results||[]).filter((e=>e.indexes.includes(gc.FACEBOOK))).map((({title:e,uri:t,image:n,following:i})=>({title:e,uri:t,image:n,following:i})))}async fetchFriendActivity(e){const t=(0,ee.o_)(e[0]).username,n=await this.buddyFetchApi.getBuddyActivity(t);return n.body?[n.body]:[]}}var bc=n(31551);class vc{value=null;subs=new Set;subscription=null;constructor(e,t,n){this.prefsApi=e,this.identifier=t,this.deserializeValue=n,this.getValue=this.getValue.bind(this),this.subValue=this.subValue.bind(this)}async getValue(){const e=(await this.prefsApi.get({key:this.identifier})).entries[this.identifier];return this.value=this.deserializeValue(e),this.value}subValue(e){return this.subs.add(e),this.subscription??=this.prefsApi.sub({key:this.identifier},(e=>{const t=this.deserializeValue(e.entries[this.identifier]);if(t!==this.value){this.value=t;for(const e of this.subs)try{e(t)}catch(t){console.error("Error in `PrefValue` sub:",{sub:e,error:t})}}})),()=>{this.subs.delete(e),0===this.subs.size&&(this.subscription?.cancel(),this.subscription=null)}}}class yc extends Ul.e{}class _c extends vc{static identifier="app.player.autoplay";static deserialize=e=>{if(void 0===e.bool)throw new yc(`Could not deserialize ${_c.identifier} from ${JSON.stringify(e)}`);return e.bool};constructor(e){super(e,_c.identifier,_c.deserialize)}}class Ec{value=null;subs=new Set;subscription=null;constructor(e,t,n){this.productStateApi=e,this.identifier=t,this.deserialize=n,this.getValue=this.getValue.bind(this),this.subValue=this.subValue.bind(this)}async getValue(){const e=await this.productStateApi.getValues();if(!e)throw new Error("No product state values returned");const t=e[this.identifier];return this.value=this.deserialize(t),this.value}subValue(e){return this.subs.add(e),this.subscription??=this.productStateApi.subValues((e=>{if(!e[this.identifier])return;const t=this.deserialize(e[this.identifier]);if(t!==this.value){this.value=t;for(const e of this.subs)try{e(t)}catch(t){console.error("Error in `ProductStateValue` sub:",{sub:e,error:t})}}})),()=>{this.subs.delete(e),0===this.subs.size&&(this.subscription?.(),this.subscription=null)}}}class xc extends Ec{constructor(e,t,n,i){super(e,t,i),this.productStateApi=e,this.identifier=t,this.serialize=n,this.setValue=this.setValue.bind(this)}async setValue(e){await this.productStateApi.setValues({[this.identifier]:this.serialize(e)}),this.value=e}}class Cc extends xc{static identifier="autoplay";static serialize=bc.Ax;static deserialize=e=>void 0===e||(0,bc.zf)(e);key="autoplay";constructor(e,t){super(e,Cc.identifier,Cc.serialize,Cc.deserialize),this.autoPlaySupported=new _c(t)}async getValue(){const[e,t]=await Promise.all([this.autoPlaySupported.getValue(),super.getValue()]);if(!e)throw new Error("AutoPlay is not supported");return t}}class Sc extends vc{constructor(e,t,n,i){super(e,t,i),this.prefsApi=e,this.identifier=t,this.serializeValue=n,this.setValue=this.setValue.bind(this)}async setValue(e){await this.prefsApi.set({entries:{[this.identifier]:this.serializeValue(e)}}),this.value=e}}class Ac extends Sc{static identifier="language";static serialize=e=>({string:e});static deserialize=e=>{if(void 0===e?.string)throw new yc(`Could not deserialize ${Ac.identifier} from ${JSON.stringify(e)}`);return e.string};key="language";constructor(e){super(e,Ac.identifier,Ac.serialize,Ac.deserialize)}}class wc extends Sc{static identifier="audio.allow_downgrade";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new yc(`Could not deserialize ${wc.identifier} from ${JSON.stringify(e)}`);return e.bool};key="quality.autoAdjustQuality";constructor(e){super(e,wc.identifier,wc.serialize,wc.deserialize)}}class Ic extends Sc{static identifier="audio.sync_bitrate_enumeration";static serialize=e=>({number:BigInt(e)});static deserialize=e=>{const t=(0,bc.FB)(e.number);if(null===t)throw new yc(`Could not deserialize ${Ic.identifier} from ${JSON.stringify(e)}`);return t};key="quality.downloadAudioQuality";constructor(e,t){super(e,Ic.identifier,Ic.serialize,Ic.deserialize),this.maxSupportedQuality=t,this.setValue=this.setValue.bind(this)}async setValue(e){const t=await this.maxSupportedQuality.clampAudioQuality(e);return super.setValue(t)}}var Tc=n(97779);class Nc extends Ec{static identifier="audio-quality";static deserialize=e=>{const t=(0,bc.rj)(e);if(null===t)throw new yc(`Could not deserialize ${Nc.identifier} from ${JSON.stringify(e)}`);return t};key="quality.maxSupportedQuality";constructor(e){super(e,Nc.identifier,Nc.deserialize),this.clampAudioQuality=this.clampAudioQuality.bind(this)}async clampAudioQuality(e){this.value??=await this.getValue();const t=this.value===Tc.Qi.LOSSLESS&&e>Tc.a1.AUTOMATIC&&e<=Tc.a1.HIFI,n=this.value===Tc.Qi.VERY_HIGH&&e<=Tc.a1.VERY_HIGH,i=this.value===Tc.Qi.STANDARD&&e<=Tc.a1.HIGH;return t||n||i?e:Tc.a1.HIGH}}class Rc extends Sc{static identifier="audio.normalize_v2";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new yc(`Could not deserialize ${Rc.identifier} from ${JSON.stringify(e)}`);return e.bool};key="quality.normalizeVolume";constructor(e){super(e,Rc.identifier,Rc.serialize,Rc.deserialize)}}const kc=e=>e.find((e=>e.isActive))?.localIdentifier??null;class Oc{callbacks=new Set;stateSubscription=null;static deserialize=e=>{const t=(0,bc.FB)(e);if(null===t)throw new yc(`Could not deserialize ${JSON.stringify(e)}`);return t};getActiveDeviceId(){return new Promise((e=>{const t=this.connectService.state(s.d1.fromPartial({}),(({devices:n})=>{t.cancel(),e(kc(n))}))}))}constructor(e){this.connectService=e}key="quality.remoteQuality";async getValue(e){const t=void 0===e?await this.getActiveDeviceId():e;if(!t)return null;const n=await this.connectService.getDeviceSettings(s.zF.fromPartial({deviceId:t}));return{streamingQuality:Oc.deserialize(n.deviceSettings?.streamQuality),maxSupportedQuality:Oc.deserialize(n.deviceSettings?.capabilities?.maxSupportedStreamQuality)}}subValue(e){return 0===this.callbacks.size&&(this.stateSubscription=this.connectService.state(s.d1.fromPartial({}),(({devices:e})=>{e&&e.length>0&&this.callbacks.size>0&&this.getValue(kc(e)).then((e=>{this.callbacks.forEach((t=>t(e)))}))}))),this.callbacks.add(e),()=>{this.callbacks.delete(e),0===this.callbacks.size&&this.stateSubscription&&(this.stateSubscription.cancel(),this.stateSubscription=null)}}async setValue({streamingQuality:e}){const t=await this.getActiveDeviceId();t&&await this.connectService.setDeviceStreamQuality(s.MG.fromPartial({deviceId:t,value:e}))}}class Pc extends Sc{static identifierMetered="audio.play_bitrate_enumeration";static identifierNonMetered="audio.play_bitrate_non_metered_enumeration";static serialize=e=>({number:BigInt(e)});static deserialize=e=>{const t=(0,bc.FB)(e.number);if(null===t)throw new yc(`Could not deserialize ${JSON.stringify(e)}`);return t};key="quality.streamingQuality";constructor(e,t){super(e,Pc.identifierNonMetered,Pc.serialize,Pc.deserialize),this.maxSupportedQuality=t,this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.subValue=this.subValue.bind(this)}async setValue(e){const t=await this.maxSupportedQuality.clampAudioQuality(e),n=Pc.serialize(t);await this.prefsApi.set({entries:{[Pc.identifierNonMetered]:n,[Pc.identifierMetered]:n}}),this.value=e}}class jc extends Sc{static identifier="audio.loudness.environment";static serialize=e=>({number:BigInt(e)});static deserialize=e=>{const t=(0,bc.dt)(e.number);if(null===t)throw new yc(`Could not deserialize ${jc.identifier} from ${JSON.stringify(e)}`);return t};key="quality.volumeLevel";constructor(e){super(e,jc.identifier,jc.serialize,jc.deserialize)}}class Lc{constructor(e,t,n,i){this.playbackService=n,this.maxSupportedQuality=new Nc(t),this.streamingQuality=new Pc(e,this.maxSupportedQuality),this.downloadAudioQuality=new Ic(e,this.maxSupportedQuality),this.normalizeVolume=new Rc(e),this.autoAdjustQuality=new wc(e),this.volumeLevel=new jc(e),this.remoteQuality=new Oc(i)}async getFormats(){return(await this.playbackService.getFormats({})).formats.filter((e=>e.supported)).map((e=>{const t=(0,bc.FB)(e.enumValue);if(!t)throw new yc(`Could not deserialize formats from ${JSON.stringify(e)}`);return{supported:e.supported,quality:t}}))}}class Dc{constructor(e,t,n,i){this.language=new Ac(e),this.quality=new Lc(e,t,n,i),this.autoPlay=new Cc(t,e)}}var Uc=n(90542);async function Mc(e){return await fetch(`i18n/${e}.json`).then((e=>e.json()))}async function Bc(e,t){return await async function(e,t){const n=await e();return null!==n?{...n,market:"from_token",locale:t,valid:!0}:{accessToken:"accessToken",accessTokenExpirationTimestampMs:0,isAnonymous:!1,market:"from_token",locale:t,valid:!1}}(e,t)}async function Fc(e){navigator.serviceWorker&&navigator.serviceWorker.getRegistrations().then((e=>e.forEach((e=>e.unregister()))));const t="65b708073fc0480ea92a077233ca87bd",n=function(){const e=window.navigator.userAgent.match(Y);return e?.groups?.version||"unknown"}(),C=(0,G.h)(),S=(0,wt.n1)(),I=(0,o.dn)(S),T=new l.EW(S),R=new el(T);gt(C);const k=function(e){return new Je(e,new ze.x)}(C),O=k.getTokenProvider(),P=function(e){return new cc(e)}(C),L=await async function(e){const t="language";try{const n=await e.get({key:t});return n.entries[t]?.string??h.h.en}catch{return h.h.en}}(I),[D,H]=await async function(e){try{return[null,await Mc(e)]}catch(t){const n=h.h.en;(0,i.ZQ)({message:`Attempt to use desired locale '${e}' failed. Using fallback '${n}'.`}),(0,cl.UD)(t);try{return[n,await Mc(n)]}catch(e){throw(0,cl.Lu)(e),new Error(`Error when getting fallback translation: ${e}`)}}}(L);g.Ru.initialize({localeForTranslation:D??L,localeForFormatting:D??navigator.language,translations:H});const[V,W,q,Q,J,ee,te]=await Promise.all([uc(C),Bc(O,D??L),(0,Ve.k)(S),K(),P.getUser(),R.getValues(),ac(O,(e=>k.createTransportPlugin(e)))]),ne=je.n.getInstance();(0,F.K)(te,W,n,V.app_platform);const ie=J?.username||null,re=ie??"anonymous",se=new kr.P(re),ae=new Rt.E(re),ce=z(V,te,{clientId:t,ownerProvider:()=>ie,storagePrefix:`${t}-desktop-ui`,useInMemoryStorage:!1,useOptimizedESS2NA:!1}),de=new mc({timeout:1e4,clientId:V.remote_config_client_id,transport:te,eventSender:ce,version:n,sp_t_cookie:V.event_sender_context_information?.installation_id}),me=await de.resolve({username:ie}),pe=(0,Uc.s)(se),he=d.Vk.merge(me,Q,pe),fe=d.Vk.merge(me,Q),be=he.getValue(Te.uy),ve=he.getValue(Te.vU);let ye;if(ie&&V.is_developer_mode){const e="lastVisitedLocation",t=se.getItem(e);ye=t instanceof Nr.m||t instanceof Rr.Y?(0,r.sC)({initialEntries:void 0}):(0,r.sC)({initialEntries:[encodeURI(t)]}),ye.listen((t=>{se.setItem(e,t.pathname)}))}else ye=(0,r.sC)();he.getValue(Te.rW)&&document.documentElement.classList.add("circular-sp-vietnamese");const _e=(0,Nt.lY)(ne),Ee=(0,Tt.q)(_e),xe=new $(C),Ce=il(S,V.is_developer_mode),Se=new pt.C(ae),Ae=function(e){return new ql(new wl.sp(e))}(S),we=function(e){return new Vo(new Ni.to1(e))}(S),Ie=function(e,t,n,i,r,s,a,l,c){return new pa(e,(0,o.dn)(t),new X.GD(t),new jt.ve(t),new Ni.to1(t),n,i,r,s,a,l,c)}(C,S,Se,Ae,"xpui_2024-05-03_1714757530304_e66eb7b",be,ve,we,!1===he.getValue(Pe.eWj)),Ne=new s.Pc(S),Re=he.getValue(Pe.OcM),ke=new mt(Ne,Re),Ue=function(e,t,n,i,r,s,a){return new Gl(e,new Ni.to1(r),new Ni.hm7(r),t,n,i,s,a)}(Ie,Se,Ae,R,S,ye,be),Me=he.getValue(Pe.iUp),Be=new lc.J(ne),Fe=function(e,t,n,i,r,s,a){switch(e){case tc._.ENABLED:return new Ql.o(new Xl.U(r,s),new Jl.x(i),a,new nc(t,n),e);case tc._.RESTRICTED:return new Ql.o(new ec.D(r),new Zl.G,a,new nc(t,n),e);case tc._.DISABLED:default:return new Ql.o(new $l.o,new Zl.G,a,new nc(t,n),e)}}(Me,ee,R,Ce,te,ne,Be),Ge=function(e){return new He(new De.Ag(e))}(S);!function(e,t){new At(new St.NH(e),t)}(S,"xpui");const We=function(e,t){const n=new a.NI(e),i=(0,Pr.k7)(e);return new ts(n,i,t)}(S,Ne),Ke=(0,It.W)(ne),Ye=function(e,t,n,i,r,s,a,o){if("1"!==o["is-puffin"])return new us;const l=new ns.zW(e);return new _s(t,l,n,i,r,s,a)}(S,ne,se,ce,Ie,Ge,Ke,ee),qe=function(e,t,n){const i=new Pr.LN(n),r=new Or.rM(n),s=new ft.HG(n),a=new l.EW(n);return new Jr(e,t,i,r,s,a)}(ie??"anonymous",C,S),Qe=function(e,t,n){return new pr(new ft.HG(e),new or._4(e),new jt.ve(e),new Pt.Ww(e),n,t)}(S,ie,ne),$e=he.getValue(Te.Mc),Ze=function(e,t){return new Jo(new Ni.Bl$(e),new Ni.ZxE(e),new Ni.hm7(e),t)}(S,ne),Xe=function(e,t,n,i,r){return new Po(new Ni.hm7(e),new Ni.to1(e),t,n,i,r)}(S,Ae,ne,$e,we),et=function(e,t){return new Ho(new Ni.to1(e),t)}(S,ne),tt=function(e,t,n){return new Ct(new ft.HG(e),t,n)}(S,Qe,Xe),nt=new Ol(S,he,ne),it=new Le.y(Ie,nt,Ce),rt=new ue(new l.EW(S),Xe),st=new Tr(S,C,se),at=new oe(S,Ee),ot=new N(C),lt=new E(C),ct=new U(C),ut=new M.T(_e),dt=new le(new m.aA(S)),ht=new ge(S),bt=new rl.hr,vt=new ll(S,bt),yt=new oc.T(p.vR.getUBILogger({eventSender:ce,disableAutoBackgroundMonitoring:!0,authenticationProvider:{isAuthenticated:()=>null!==J},contextualProviders:{playContextUriProvider:{getPlayContextUri:()=>Ie.getState()?.context.uri??null},playbackIdProvider:{getPlaybackId:()=>Ie.getState()?.playbackId??null}}})),_t=new _,Et=(await f.Q.getAdState()).app_startup_id.value,xt=(0,B.K)({container:e,history:ye,eventSender:ce,playerAPI:Ie,appStartupId:Et,resolver:he}),kt=he.getValue(Te.kr),Ot=he.getValue(Te.NL),Lt=new Oe(C,new c.Gy(S),new l.EW(S),new m.aA(S),new a.NI(S),new u._X(S),(0,o.dn)(S),he,ce,xt.vto.factories,S,Ot,kt),Dt=new Yl(S),Ut=function(e){return new A(new x.MI(e))}(S),Mt=new j((0,o.dn)(S),se),Bt=new fc(C,new hc(Ce,ne)),Ft=new Dc((0,o.dn)(S),R,new a.NI(S),new s.Pc(S));ot.setTitlebarHeight(w.Yw);return he.getValue(Pe.p5T)&&(0,y.nC)(),be&&((0,b.$)(Ie,Xe,Se,Ae),(0,v.m)(Ue,Ae,Ie,Xe,ke)),Spicetify._platform={version:n,container:e,operatingSystem:(0,Z.D)(),isDeveloperMode:V.is_developer_mode,isVideoSupported:!0,enableCastConnect:!1,initialUser:J,initialProductState:ee,username:re,getServiceWorkerMessenger:async()=>()=>new Promise((()=>{})),getSession:()=>W,getTransport:()=>te,getEventSender:()=>ce,getTranslations:()=>H,getFeatureFlags:()=>q,getHistory:()=>ye,getAdManagers:()=>xt,getRemoteConfiguration:()=>fe,getActionStoreAPI:()=>_t,getAuthorizationAPI:()=>k,getClipboardAPI:()=>lt,getConnectAPI:()=>ke,getSocialConnectAPI:()=>Fe,getControlMessageAPI:()=>ot,getFacebookAPI:()=>ct,getFollowAPI:()=>ut,getGraphQLLoader:()=>_e,getLibraryAPI:()=>Qe,getCurationAPI:()=>tt,getLocalFilesAPI:()=>st,getOfflineAPI:()=>qe,getPlatformData:()=>V,getPlayerAPI:()=>Ie,getShuffleAPI:()=>Ue,getPlayHistoryAPI:()=>at,getPlaylistAPI:()=>Xe,getPlaylistPermissionsAPI:()=>et,getPrivateSessionAPI:()=>dt,getPubSubAPI:()=>Ce,getRecentlyPlayedAPI:()=>vt,getReportAPI:()=>rt,getRootlistAPI:()=>Ze,getSegmentsAPI:()=>ht,getShowAPI:()=>nt,getAudiobooksPremiumConsumptionCapObserverAPI:()=>it,getUpdateAPI:()=>xe,getUserAPI:()=>P,getProductStateAPI:()=>R,getVideoAPI:()=>Lt,getSEOExperiments:()=>({}),getSingAlongAPI:()=>Dt,getPlaybackAPI:()=>We,getUBILogger:()=>yt,getCollectionPlatformAPI:()=>Ut,getLocalStorageAPI:()=>se,getIndexedDbAPI:()=>ae,getEqualizerAPI:()=>Mt,getBuddyFeedAPI:()=>Bt,getSettingsAPI:()=>Ft,getRequestBuilder:()=>ne,getAudioOutputDevicesAPI:()=>Ge,getPlaybackFiltersAPI:()=>Ye,getUrlDispenserServiceClient:()=>Be,getExternalAccessoryAPI:()=>Ke}}},77582:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});let i=function(e){return e.Web="Web",e.PWA="PWA",e.Desktop="Desktop",e}({})},53007:(e,t,n)=>{"use strict";n.d(t,{f:()=>i});let i=function(e){return e.macOS="macOS",e.Windows="Windows",e.Linux="Linux",e.ChromeOS="ChromeOS",e.Other="Other",e}({})},55154:(e,t,n)=>{"use strict";n.d(t,{D:()=>r});var i=n(8012);let r=function(e){return e[e.UPDATE_NONE=0]="UPDATE_NONE",e[e.UPDATE_AVAILABLE=1]="UPDATE_AVAILABLE",e[e.UPDATE_PROCESSING=2]="UPDATE_PROCESSING",e[e.UPDATE_READY=3]="UPDATE_READY",e}({});(0,i.u)("UpdateAPI")},12555:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});const i=(0,n(79474).createContext)(null)},82274:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(79474),r=n(12555);function s(){const e=(0,i.useContext)(r.b),[t,n]=(0,i.useState)(null);return(0,i.useEffect)((()=>{const{cancel:t}=e.subscribe(n);return t}),[e,n]),t}},33237:(e,t,n)=>{"use strict";n.d(t,{Ek:()=>c,My:()=>o,aS:()=>a,wD:()=>l});var i=n(99028),r=n(77582),s=n(53007);const a=/Spotify\/(?<version>.+)\s/;function o(){if(!!window.navigator.userAgent.match(a))return r.m.Desktop;const e="serviceWorker"in window.navigator,t=window.matchMedia("(display-mode: standalone)").matches,n="Windows"in window;return e&&(t||n)?r.m.PWA:r.m.Web}function l(){const e="serviceWorker"in window.navigator,t=-1!==window.location.search.indexOf("pwa=1"),n=(0,i.D)()===s.f.ChromeOS;return e&&(n||t)}function c(){return o()===r.m.Desktop}},99028:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,f:()=>o});var i=n(9856),r=n.n(i),s=n(53007);function a(){const e=r().parse(window.navigator.userAgent).os.name;return"macOS"===e?s.f.macOS:"Windows"===e?s.f.Windows:"Linux"===e?s.f.Linux:"Chrome OS"===e?s.f.ChromeOS:s.f.Other}function o(){return r().getParser(window.navigator.userAgent).getOSName()||"not_applicable"}},10780:(e,t,n)=>{"use strict";n.d(t,{I:()=>s,X:()=>r});var i=n(37766);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{_numListeners=0;constructor(){super(),this.onAddListener(r.UPDATE,this.onListenerAdded.bind(this)),this.onRemoveListener(r.UPDATE,this.onListenerRemoved.bind(this))}onListenerAdded(){++this._numListeners,this.startListening()}onListenerRemoved(){0==--this._numListeners&&this.stopListening()}}},68602:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var i=n(79474);const r=new Error("Play History API used without being initialized.\n Did you provide the context in a a parent component?'"),s=(0,i.createContext)({getContents:()=>{throw r}})},63508:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var i=n(79474),r=n(68602);function s(){return(0,i.useContext)(r.y).getCapabilities().isSupported}},7018:(e,t,n)=>{"use strict";n.d(t,{a:()=>c});var i=n(79474),r=n(80964),s=n(28049),a=n(68602);var o=n(10780);const l=["play-history-contents"];function c(){const e=(0,i.useContext)(a.y),t=(0,r.jE)();return function(e,t){const n=(0,i.useContext)(a.y);(0,i.useEffect)((()=>{const i=n.getEvents();return i.addListener(e,t),()=>{i.removeListener(e,t)}}),[e,t,n])}(o.X.UPDATE,(e=>t.setQueryData(l,e.data))),(0,s.I)({queryKey:l,queryFn:()=>e.getContents(),gcTime:3e5,staleTime:0})}},4428:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var i=n(79474),r=n(83648),s=n(83856),a=n(14056),o=n(80833),l=n(15891),c=n(42529),u=n(14411),d=n(87240),m=n(79392),p=n(18645);function h(){const e=(0,r.Zp)(),t=(0,i.useContext)(c.w),n=(0,i.useContext)(u.S),{request:h}=(0,i.useContext)(l.j),g=(0,i.useCallback)((async(e,i)=>{const{name:r,trackUris:s}=await(0,m.s)(e,0,h),a=await n.createPlaylist(r,i,!0);return a&&await t.add(a,s,{before:"start"}),a}),[t,n,h]),f=(0,i.useCallback)((async(e,i)=>{const r=await(0,m.P)(e[0],h),s=await n.createPlaylist(r,i,!0);return s&&await t.add(s,e,{before:"start"}),s}),[t,n,h]),b=(0,i.useCallback)((async(e,i)=>{const r=await t.getMetadata(e),s=await t.getContents(e,{offset:0,limit:r.totalLength}),a=(0,p.Bq)(r.name),o=await n.createPlaylist(a,i,!0);return o&&await t.add(o,s.items.map((e=>e?.uri??null)).filter(d.P),{before:"start"}),o}),[t,n]);return{createPlaylist:(0,i.useCallback)((async(t,i)=>{const{ownedPlaylistCount:r}=await n.getMetadata(),l=a.Ru.get("playlist.new-default-name",r+1),c=await n.createPlaylist(l,i??{before:"start"}),u=(0,s.o_)(c);return u&&e(`/playlist/${u.id}`,{state:{referrer:"your_library",navigationalRoot:o.g.CREATE_PLAYLIST,interactionId:t}}),c}),[n,e]),createPlaylistFromAlbum:g,createPlaylistFromTracks:f,createPlaylistFromPlaylist:b}}},79392:(e,t,n)=>{"use strict";n.d(t,{s:()=>d,P:()=>u});var i=n(83856),r=n(14056),s=n(3775);n(16990);const a=Spicetify.GraphQL.Definitions["getAlbumNameAndTracks"]=new s.l("getAlbumNameAndTracks","query","5a0d4729518c17325756a3a9fdab0db7feeaf9f913e790de28bc53240b808d85",null),o=Spicetify.GraphQL.Definitions["getEpisodeName"]=new s.l("getEpisodeName","query","508f9db2e7dc340c338950dc67a6045ee1406703646f23b760986fa689c239b1",null),l=Spicetify.GraphQL.Definitions["getPodcastOrBookName"]=new s.l("getPodcastOrBookName","query","631676b4cf1eb7c93d1133e3f1f17e5bfe8d6a5e2fb9560148bac61f1531f267",null),c=Spicetify.GraphQL.Definitions["getTrackName"]=new s.l("getTrackName","query","3dee761788854e8dd9239e13ce0d712da031fb8c2036f096a1c765062b410660",null);async function u(e,t){const n=r.Ru.get("playlist.default_playlist_name");try{if((0,i.gH)(e)){const n=await t(o,{uri:e});if("Episode"===n?.data?.episodeUnionV2?.__typename)return n.data.episodeUnionV2.name}if((0,i.U_)(e)){const n=await t(c,{uri:e});if("Track"===n?.data?.trackUnion?.__typename)return n.data.trackUnion.name}if((0,i.WB)(e)){const n=await t(l,{uri:e});if("Podcast"===n?.data?.podcastUnionV2?.__typename||"Audiobook"===n?.data?.podcastUnionV2?.__typename)return n.data.podcastUnionV2.name}return n}catch{return n}}async function d(e,t,n){const i=await n(a,{uri:e,offset:t,limit:200});if("Album"===i?.data?.albumUnion?.__typename){const{name:r,tracks:s}=i.data.albumUnion,a=s.items.map((e=>e.track.uri));if(s.pagingInfo.nextOffset){if(s.pagingInfo.nextOffset<=t||0===a.length)throw new Error(`Error while requesting ${e} content, unexpected nextOffset`);const i=await d(e,s.pagingInfo.nextOffset,n);return{name:r,trackUris:a.concat(i.trackUris)}}return{name:r,trackUris:a}}throw new Error(`Error while requesting ${e} content`)}},12258:(e,t,n)=>{"use strict";n.d(t,{h:()=>r,s:()=>s});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PrivateSessionContext' without 'PrivateSessionProvider'!");return e}},48832:(e,t,n)=>{"use strict";n.d(t,{H:()=>a});var i=n(79474),r=n(34310),s=n(12258);function a(){const e=(0,s.s)(),[t,n]=(0,i.useState)(!1),a=(0,r.a)();(0,i.useEffect)((()=>{const t=e.subscribeToPrivateSession((e=>{a()&&n(e)}));return()=>{t()}}),[e,a]);return{isPrivateSession:t,setPrivateSession:(0,i.useCallback)((t=>{e.setPrivateSession(t)}),[e])}}},1884:(e,t,n)=>{"use strict";n.d(t,{u:()=>y});const i=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"}),r=/\p{White_Space}/u,s=/\p{P}/u,a=/\p{sc=Han}/u;function o(e){return null!==e&&r.test(e)}function l(e){return null!==e&&(e<="/"||e>=":"&&e<="@"||"\\"===e||o(e))}function c(e){return null!==e&&s.test(e)}function u(e){return null!==e&&a.test(e)}class d{constructor(e,t,n){if(t<0||n<0||t+n>e.length)throw new RangeError;this.data=e,this.offset=t,this.length=n,this.position=0}static from(e){const t=Array.from(e.normalize("NFC"));return new d(t,0,t.length)}toString(){return this.data.slice(this.offset,this.offset+this.length).join("")}slice(e=0,t=this.length){if(e<0||t>this.length)throw new RangeError;const n=this.offset+e,i=t-e;return new d(this.data,n,i)}nextCodePoint(){return this.position===this.length?null:this.data[this.offset+this.position++]}}function m(e){let t;do{t=e.nextCodePoint()}while(null!==t&&o(t)||c(t));return t}function p(e,t){let n=m(e),r=m(t);if(null===r)return{offset:0,length:0};const s=e.offset+e.position-1;let a=e.offset+e.position;for(;;){if(null===n&&null===r)return{offset:s,length:a-s};if(null===r)return{offset:s,length:a-s};if(null===n)return null;if(0!==i.compare(n,r))return null;a=e.offset+e.position,n=m(e),r=m(t)}}function h(e,t){let n,i,r;do{i=e.position,n=e.nextCodePoint()}while(null!==n&&o(n));if(t?.segmentQuotedStrings&&function(e){return null!==e&&('"'===e||"'"===e)}(n)){const t=n;i=e.position;do{r=e.position,n=e.nextCodePoint()}while(null!==n&&n!==t);return null===n&&i===r?null:e.slice(i,r)}do{if(r=e.position,t?.segmentCJKUnifieIdeographs&&u(n))break;n=e.nextCodePoint()}while(null!==n&&!l(n));return null===n&&i===r?null:e.slice(i,r)}function g(e){return h(e,{segmentQuotedStrings:!0,segmentCJKUnifieIdeographs:!1})}function f(e){return h(e,{segmentQuotedStrings:!1,segmentCJKUnifieIdeographs:!0})}function b(e,t){const n=[];for(let i=f(e);null!==i;i=f(e)){let r=p(i,t.slice());null===r?(r=p(e.slice(i.offset),t.slice()),null===r||n.push(r)):n.push(r)}return n}function v(e,t){return e.offset===t.offset&&e.length===t.length}function y(e,...t){const n=d.from(e),i=[];for(let e=g(n);null!==e;e=g(n)){const n=[];for(let i=0;i<t.length;++i){const r=t[i],s=b(d.from(r),e);for(const e of s)n.push({text:r,range:e})}if(0===n.length)return null;i.push(...n.filter(((e,t,n)=>e.range.length>0&&n.findIndex((t=>v(e.range,t.range)))===t)))}return i.length>0?i:null}},66565:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,k:()=>a});var i=n(46352);const r="react-query";function s(){return{persistClient:async e=>{await(0,i.hZ)(r,e)},restoreClient:async()=>await(0,i.Jt)(r),removeClient:async()=>{await(0,i.yH)(r)}}}function a(){return(0,i.yH)(r)}},90542:(e,t,n)=>{"use strict";n.d(t,{e:()=>r,s:()=>s});var i=n(8297);const r="remote-config-overrides";function s(e){const t=e.getItem(r);if(t instanceof Error)return i.Vk.empty();try{return i.Vk.fromJSON(t)}catch(e){return i.Vk.empty()}}},83227:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var i=n(79474);const r=new Error("Report API used without being initialized.\n Did you provide the context in a a parent component?'"),s=(0,i.createContext)({isURIReportable:()=>{throw r},canReportPlaylist:()=>{throw r},getReportURL:()=>{throw r}})},23387:(e,t,n)=>{"use strict";n.d(t,{X:()=>s,v:()=>a});var i=n(83856),r=n(53086);const s=e=>(0,i.tb)(e)||(0,i.ec)(e)||(0,i.gH)(e)||(0,i.AP)(e)||(0,i.WB)(e),a=(e,t,n,i)=>e.getMetadata(t).then((e=>{const t="chart"===e.formatListData?.type;return!(!i&&!e.canReportAnnotationAbuse||t||n===e.owner.uri)})).catch((e=>((0,r.vV)(e),!1)))},39566:(e,t,n)=>{"use strict";n.d(t,{L:()=>o});var i=n(79474),r=n(26271),s=n(30232),a=n(10551);function o({episodeUri:e,start:t,stop:n}){const{togglePlay:o,triggerPlay:l,isPlaying:c,isActive:u}=(0,r.P)({uri:e},{featureIdentifier:"episode"}),d=(0,s.o)((e=>(0,a.s)(e)??0)),m=u&&function(e,t,n){return n>=e&&n<t}(t,n,d),p=c&&m;return{onClick:(0,i.useCallback)((e=>{m?o({seekTo:t,loggingParams:e}):l({seekTo:t,loggingParams:e})}),[m,t,o,l]),isPlaying:p,isActive:m}}},29433:(e,t,n)=>{"use strict";n.d(t,{CX:()=>i,K3:()=>r,t2:()=>a,wA:()=>s});let i=function(e){return e.bitrateLevel="bitrateLevel",e.targetBitrateLevel="targetBitrateLevel",e.targetBitrateAvailable="targetBitrateAvailable",e.strategy="strategy",e.isLocal="isLocal",e.autoAdjust="autoAdjust",e.deviceSupported="deviceSupported",e}({}),r=function(e){return e.Bluetooth_Degrades_Lossless="Bluetooth_Degrades_Lossless",e.Connect_Explanation="Connect_Explanation",e.Default_To_Very_High="Default_To_Very_High",e.Need_To_Redownload="Need_To_Redownload",e.Opt_Out_Of_Downgrade="Opt_Out_Of_Downgrade",e.Poor_Bandwidth_Interferes="Poor_Bandwidth_Interferes",e.Lossless_Unavailable="Lossless_Unavailable",e.Listen_Offline="Listen_Offline",e.Update_Setting="Update_Setting",e}({}),s=function(e){return e[e.Internet=0]="Internet",e[e.Spotify_Connect=1]="Spotify_Connect",e[e.Downloads=2]="Downloads",e}({}),a=function(e){return e.Good="good",e.Poor="poor",e.Unknown="unknown",e.Unavailable="unavailable",e}({})},56715:(e,t,n)=>{"use strict";n.d(t,{H:()=>v});var i=n(79474),r=n(79864),s=n(30232),a=n(57442),o=n(37693),l=n(29433);const c=[{criteria:{online:!0,autoAdjust:!1,trackHiFiAvailable:!0},result:l.K3.Opt_Out_Of_Downgrade},{criteria:{online:!0,streamingHiFi:!1,targetingHiFi:!0,deviceCompatible:!0,internetBandwidth:l.t2.Poor,trackHiFiAvailable:!0},result:l.K3.Poor_Bandwidth_Interferes},{criteria:{online:!0,autoAdjust:!0,streamingHiFi:!1,targetingHiFi:!1,deviceCompatible:!0,internetBandwidth:l.t2.Poor,trackHiFiAvailable:!0},result:l.K3.Default_To_Very_High},{criteria:{online:!0,streamingHiFi:!1,bitrateStrategy:[a.ZT.OFFLINED_FILE],trackHiFiAvailable:!0},result:l.K3.Need_To_Redownload},{criteria:{online:!0,targetingHiFi:!0,trackHiFiAvailable:!1},result:l.K3.Lossless_Unavailable},{criteria:{online:!0,isSetStreamingQualityLessThanLossless:!0},result:l.K3.Update_Setting}];const u=[{criteria:{bitrateLevel:[a.Yn.HIFI],strategy:[a.ZT.BEST_MATCHING,a.ZT.BACKEND_ADVISED,a.ZT.CACHED_FILE],deviceSupported:!0,autoAdjust:!0},result:l.t2.Good},{criteria:{bitrateLevel:[a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],targetBitrateLevel:[a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],strategy:[a.ZT.BEST_MATCHING,a.ZT.CACHED_FILE],deviceSupported:!0,autoAdjust:!0},result:l.t2.Good},{criteria:{bitrateLevel:[a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],targetBitrateLevel:[a.Yn.HIFI],strategy:[a.ZT.BEST_MATCHING,a.ZT.BACKEND_ADVISED,a.ZT.CACHED_FILE],targetBitrateAvailable:!0,deviceSupported:!0,autoAdjust:!0},result:l.t2.Poor},{criteria:{bitrateLevel:[a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],targetBitrateLevel:[a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],strategy:[a.ZT.BACKEND_ADVISED],deviceSupported:!0,autoAdjust:!0},result:l.t2.Poor},{criteria:{bitrateLevel:[a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],targetBitrateLevel:[a.Yn.HIFI],targetBitrateAvailable:!1,deviceSupported:!0,autoAdjust:!0},result:l.t2.Unavailable},{criteria:{autoAdjust:!1},result:l.t2.Unknown},{criteria:{deviceSupported:!1},result:l.t2.Unknown}],d=[{criteria:{bitrateLevel:[a.Yn.HIFI],deviceSupported:!0},result:!0},{criteria:{bitrateLevel:[a.Yn.UNKNOWN,a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],strategy:[a.ZT.BEST_MATCHING,a.ZT.BACKEND_ADVISED,a.ZT.CACHED_FILE],targetBitrateLevel:[a.Yn.HIFI],targetBitrateAvailable:!0,deviceSupported:!0},result:!0},{criteria:{bitrateLevel:[a.Yn.UNKNOWN,a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],strategy:[a.ZT.OFFLINED_FILE],targetBitrateLevel:[a.Yn.HIFI],targetBitrateAvailable:!0,deviceSupported:!0},result:!1},{criteria:{strategy:[a.ZT.BEST_MATCHING,a.ZT.BACKEND_ADVISED,a.ZT.CACHED_FILE],targetBitrateAvailable:!0,deviceSupported:!0},result:!1},{criteria:{deviceSupported:!1},result:!0},{criteria:{bitrateLevel:[a.Yn.UNKNOWN,a.Yn.LOW,a.Yn.NORMAL,a.Yn.HIGH,a.Yn.VERY_HIGH],targetBitrateLevel:[a.Yn.HIFI],targetBitrateAvailable:!1,deviceSupported:!0},result:!0},{criteria:{targetBitrateLevel:[a.Yn.HIFI]},result:!0}],m=(e,t)=>{for(const[n,i]of Object.entries(t.criteria))if(n===l.CX.bitrateLevel){if(!i.includes(e[l.CX.bitrateLevel]))return!1}else if(n===l.CX.targetBitrateLevel){if(!i.includes(e[l.CX.targetBitrateLevel]))return!1}else if(n===l.CX.strategy){if(!i.includes(e[l.CX.strategy]))return!1}else{if(!i===e[n])return!1}return!0},p=e=>{for(const t of d){if(m(e,t))return t.result}return e[l.CX.bitrateLevel]===a.Yn.HIFI||e[l.CX.targetBitrateLevel]===a.Yn.HIFI},h=e=>{for(const t of u){if(m(e,t))return t.result}return e[l.CX.strategy]===a.ZT.BACKEND_ADVISED?l.t2.Poor:l.t2.Good};var g=n(72653),f=n(30939);const b={hifiStatus:a.d4.NONE,bitrateLevel:a.Yn.UNKNOWN,targetBitrateLevel:a.Yn.UNKNOWN,targetBitrateAvailable:!1,strategy:a.ZT.UNKNOWN};function v(){const{hifiStatus:e,bitrateLevel:t,targetBitrateLevel:n,targetBitrateAvailable:u,strategy:d}=(0,s.o)((e=>({...b,...e?.playbackQuality??null})),o.a),m=(0,r.v)((e=>e.activeDevice)),v=(0,i.useMemo)((()=>null!==m&&m.hifiSupport?m.hifiSupport:{fullySupported:!1,deviceSupported:!1,userEligible:!1}),[m]).deviceSupported,{settings:{values:y}}=(0,g.t0)(),_=y["audio.allow_downgrade"],E=m?.isLocal||!1;let x;x=E?d===a.ZT.CACHED_FILE||d===a.ZT.OFFLINED_FILE?l.wA.Downloads:l.wA.Internet:l.wA.Spotify_Connect;const C={bitrateLevel:t,targetBitrateLevel:n,targetBitrateAvailable:u,strategy:d,isLocal:E,deviceSupported:v,autoAdjust:_},S=p(C),A=h(C),w=(0,f.n)(),I=n===a.Yn.HIFI&&u,T=function({online:e,streamingHiFi:t,targetingHiFi:n,strategy:i,trackHiFiAvailable:r,autoAdjust:s,internetBandwidth:a,hifiCompatibleDevice:o,isLocal:u,isSetStreamingQualityLessThanLossless:d}){const m=[l.K3.Listen_Offline,l.K3.Connect_Explanation,l.K3.Bluetooth_Degrades_Lossless];for(const l of c){const{criteria:c,result:p}=l;c.online===e&&(void 0!==c.autoAdjust&&c.autoAdjust!==s||void 0!==c.streamingHiFi&&c.streamingHiFi!==t||void 0!==c.targetingHiFi&&c.targetingHiFi!==n||void 0!==c.deviceCompatible&&c.deviceCompatible!==o||void 0!==c.bitrateStrategy&&!1===u||(void 0===c.bitrateStrategy||void 0!==i&&c.bitrateStrategy.includes(i))&&(void 0!==c.internetBandwidth&&c.internetBandwidth!==a||void 0!==c.trackHiFiAvailable&&c.trackHiFiAvailable!==r||void 0!==c.isSetStreamingQualityLessThanLossless&&c.isSetStreamingQualityLessThanLossless!==d||m.push(p)))}return m}({online:w,streamingHiFi:t===a.Yn.HIFI,targetingHiFi:n===a.Yn.HIFI,strategy:d,trackHiFiAvailable:I,autoAdjust:_,internetBandwidth:A,hifiCompatibleDevice:v,isLocal:E});return{hifiStatus:e,bitrateLevel:t,flags:T,internetBandwidth:A,playingVia:{channelIsHiFi:S,channel:x},hifiCompatibleDevice:v}}},97404:(e,t,n)=>{"use strict";n.d(t,{L:()=>x});var i=n(79474),r=n(99754),s=n(83648),a=n(3074),o=n.n(a),l=n(14851),c=n(22215),u=n(83856),d=n(14056),m=n(28244),p=n(42490),h=n(52963),g=n(75891),f=n(74089),b=n(94710),v=n(27742),y=n(34285),_=n(36471),E=n(19498);const x=({sharingInfo:e,uri:t,interactionData:n})=>{const a=(0,_.W)(),x=(0,r.wA)(),{pathname:C}=(0,s.zy)(),S=(0,y.W)({type:"link",uri:t}),{enqueueSnackbar:A}=(0,v.d)(),w=d.Ru.getLocaleForURLPath(),I=(0,g.E)(),T=(0,c.NC)(E.vnr),N=(0,b.vh)(),R=(0,i.useCallback)((n=>{let i=e;i?.shareUrl||(i=((e,t,n)=>{const i=(0,u.o_)(e)?.toURL(),r=o().create().hex.replace(/-/g,"").substr(0,16),s=(0,u.cA)(e).toURL(`${p.iG}${h.CT}${n}/`);return{shareUrl:t&&i?`${s}?si=${r}`:`${i}?si=${r}`,shareId:r}})(t,S,w));const r=i?.shareUrl||"";let s=r;if(n){const e=new URL(r);n.forEach(((t,n)=>e.searchParams.set(n,t))),s=e.toString()}return{shareUrl:s,shareId:i?.shareId}}),[e,S,t,w]),k=(0,i.useCallback)((async e=>{let n=[{key:"app_destination",value:"copy-link"}];e&&(n=n.concat(Array.from(e).map((([e,t])=>({key:e,value:t})))));const{shareable_url:i,share_id:r}=await I.getShortUrl(t,{customData:n});return{shareUrl:i,shareId:r}}),[t,I]);return{onCopyLink:(0,i.useCallback)((async e=>{const i=T&&!S;let r=R(e);try{i&&(r=await k(e))}catch(e){console.error(e)}const{shareUrl:s,shareId:o}=r;if(a(n),(0,f.l)(s),x((0,m.pf)(s)),A(d.Ru.get("feedback.link-copied")),o){const e=(0,u.o_)(C);N.send((0,l.c)({share_id:o,entity_uri:t,destination_id:"copy-link",source_page:e?.type||"",source_page_uri:e?.toURI()||""}))}}),[T,S,k,R,a,n,x,A,C,N,t])}}},17989:(e,t,n)=>{"use strict";n.d(t,{S:()=>r,p:()=>s});var i=n(37766);let r=function(e){return e.SUBTITLE_LANGUAGES_CHANGED="subtitle_languages_changed",e.PICTURE_IN_PICTURE_CHANGED="picture_in_picture_changed",e}({});class s extends i.V{}},39658:(e,t,n)=>{"use strict";n.d(t,{$k:()=>w,no:()=>I,oU:()=>j,tf:()=>T});var i=n(83856),r=n(22792),s=n(33541),a=n(29969),o=n(47930),l=n(99047),c=n(42490),u=n(34481),d=n(82031),m=n(14255),p=n(57506),h=n(53098),g=n(69632),f=n(26831),b=n(9440),v=n(14431),y=n(51654),_=n(55521),E=n(28244),x=n(65594),C=n(13892),S=n(68876),A=n(31350);const w={START_RADIO:"START_RADIO"},I={SAVE_TRACK:"SAVE_TRACK",SAVE_EPISODE:"SAVE_EPISODE",SAVE_ALBUM:"SAVE_ALBUM",SAVE_PRERELEASE:"SAVE_PRERELEASE"},T={FOLLOW_USER:"FOLLOW_USER"},N=/(^PLAY_.+|QUEUE_UPDATE)/i,R={...{[o.Gs]:o.Gs},..._.gK},k=()=>{const e={...R};return delete e.DEVICE_INFO_CHANGED,delete e.PLAYBACK_CLEAR_DATA,delete e.QUEUE_UPDATE,e},O=(e,t)=>{if(k()[t.type]){if((e=>e.type!==o.Gs&&!![_.gK.PLAYBACK_ERROR].includes(e.type))(t))return!1;const[n,i]=(e=>{const t=k();switch(e.type){case t.FOLLOW_PLAYLIST:return[!0,{triggerId:x.D,triggerAction:e}];case t.CREATE_PLAYLIST:return[!0,{triggerId:S.x9,triggerAction:e}];case t.ADD_TO_QUEUE:case o.Gs:return[!0,{triggerId:C.d,triggerAction:e}];default:return[!1,null]}})(t),s=N.test(t.type);if(e.dispatch((0,u.$W)(t,s?u.l_.PLAY:u.l_.USER_INVESTMENT)),n)r.h.set((e=>({...e,...i})));else{const n=t.uri||t.contextURI;if(e.dispatch((0,E.H2)(n)),t.type===l.xM)return!1}return!0}return!1};function P(e,t){if(e===d.tS.ADD){if((0,i.U_)(t))return[!0,{triggerId:C.d,triggerAction:{type:I.SAVE_TRACK}}];if((0,i.gH)(t))return[!0,{triggerId:C.d,triggerAction:{type:I.SAVE_EPISODE}}]}return e===m.Ik.PLAY&&(0,i.Cf)(t)?[!0,{triggerId:C.d,triggerAction:{type:w.START_RADIO}}]:e===f.ut.ADD||e===f.ut.CREATE_PLAYLIST?[!0,{triggerId:S.x9,triggerAction:{type:null}}]:e===a.JK.FOLLOW_USER?[!0,{triggerId:C.d,triggerAction:{type:T.FOLLOW_USER}}]:[!1,null]}const j=(e,t,n,u,_)=>x=>{const C=e.getEvents(),S=t.getEvents(),w=n.getEvents(),I=u.getEvents();return C.addListener(m.gd.ACTION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:a}=(0,A.Ht)(i);if(!a)return!1;switch(e.action){case m.Ik.PLAY:{const{context:i,options:a}=e,l=function(e){return e.pages&&e.pages.length>0&&e.pages[0].items&&e.pages[0].items.length>0?e.pages[0].items[0]:null}(i);if(l?.type===b.c.EPISODE&&(o=l,void 0===o.metadata?.anonymousPlaybackAllowed||o.metadata.anonymousPlaybackAllowed))return!1;const c=a?.skipTo?.uri??i.uri;n.storeAction(s.IA,e);const[u,d]=P(m.Ik.PLAY,c);return u?(r.h.set((e=>({...e,...d}))),!0):(t.dispatch((0,E.H2)(c)),!0)}case m.Ik.SKIP_TO_NEXT:case m.Ik.SKIP_TO_PREVIOUS:return t.dispatch((0,E.H2)()),!0;default:return!1}var o})(e.data,x,_)&&e.preventDefault()})),S.addListener(d.UV.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:a}=(0,A.Ht)(i);if(!a)return!1;if(e.operation===d.tS.ADD){const[i]=e.uris;n.storeAction(s.j8,e);const[a,o]=P(d.tS.ADD,i);return a?(r.h.set((e=>({...e,...o}))),!0):(t.dispatch((0,E.H2)(i)),!0)}return!1})(e.data,x,_)&&e.preventDefault()})),w.addListener(f.tD.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:a}=(0,A.Ht)(i);if(!a)return!1;switch(e.operation){case f.ut.ADD:{const[i]=e.uris;n.storeAction(s.YZ,e);const[a,o]=P(f.ut.ADD,i);return a?(r.h.set((e=>({...e,...o}))),!0):(t.dispatch((0,E.H2)(i)),!0)}case f.ut.CREATE_PLAYLIST:{const[e,n]=P(f.ut.CREATE_PLAYLIST,"");return e?(r.h.set((e=>({...e,...n}))),!0):(t.dispatch((0,E.H2)(null)),!0)}default:return!1}})(e.data,x,_)&&e.preventDefault()})),I.addListener(a.mc.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:o}=(0,A.Ht)(i);if(!o)return!1;if(e.operation===a.JK.FOLLOW_USER){const[i]=e.uris;n.storeAction(s.Hv,e);const[o,l]=P(a.JK.FOLLOW_USER,i);return o?(r.h.set((e=>({...e,...l}))),!0):(t.dispatch((0,E.H2)(i)),!0)}return!1})(e.data,x,_)&&e.preventDefault()})),t=>n=>{const r=x.getState(),{isAnonymous:a}=(0,A.Ht)(r),u=new URL(location.href).searchParams.has("signupPrompt");if(a){if(!O(x,n)){switch(n.type){case y.gK.ANONYMOUS_LOGIN_CLICK:{const t=e.getState();if(function(e){return(0,g.uW)(e)===h.i.PLAYING&&(0,p.p)(e?.item??void 0)}(t)){const n=function(e,t){if(!e?.item)return null;const n={uri:e.context.uri,pages:[{items:[{type:e.item.type,uri:e.item.uri,uid:e.item.uid,metadata:e.item.metadata,provider:e.item.provider}]}]},i={referrerIdentifier:t.getReferrer(),featureIdentifier:"unknown"},r={seekTo:e.positionAsOfTimestamp??void 0};return{action:m.Ik.PLAY,context:n,origin:i,options:r}}(t,e);n&&_.storeAction(s.IA,n)}setTimeout(v.PW,500);break}case y.gK.ANONYMOUS_SIGNUP_CLICK:setTimeout(v.ie,500);break;case y.gK.ANONYMOUS_PREMIUM_CLICK:setTimeout((()=>{window.location.assign(c.BW)}),500);break;case l.xM:u&&x.dispatch((0,E.H2)((0,i.o_)(location.pathname)?.toURI()||"")),(0,o.cU)(e,".main-view-container .os-viewport-native-scrollbars-invisible",(0,o.pL)(x),(0,o.ox)(x))}t(n)}}else t(n)}}},47930:(e,t,n)=>{"use strict";n.d(t,{Gs:()=>s,cU:()=>c,ox:()=>l,pL:()=>o});var i=n(14255),r=n(10551);const s="ANONYMOUS_PLAYBACK_HOOK",a=(e,t)=>{const n=t?.item?.type;e.dispatch((e=>({type:s,entityType:e}))(n))},o=e=>t=>{a(e,t)},l=e=>(t,n,i)=>{const s=e.getState(),a=s?.ui?.modal,o=((e,t,n,i)=>{const s=((0,r.s)(n)??0)>1e4,a=document.hasFocus();return!e&&s&&a&&i&&"now-playing-view"!==t})(t,a,n,i);return o},c=(e,t,n,r)=>{let s=!1,a=Date.now(),o=document.querySelector(t);const l=e.getEvents(),c=()=>{a=Date.now()},u=()=>{o||(o=document.querySelector(t),o&&o.addEventListener("scroll",c))},d=({data:e})=>{u();const t=Date.now()-a>1e3;r(s,e,t)&&(s=!0,n(e),l.removeListener(i.gd.UPDATE,d),o&&o.removeEventListener("scroll",c))};l.addListener(i.gd.UPDATE,d),u()}},17724:(e,t,n)=>{"use strict";function i(e=!1){let t=document.getElementById("main");return!t&&e&&(t=document.createElement("div"),t.id="main",document.body.appendChild(t)),t}n.d(t,{e:()=>i})},19293:(e,t,n)=>{"use strict";n.d(t,{I3:()=>b,cI:()=>p,r8:()=>g,bL:()=>f,UU:()=>h,DN:()=>v});var i=n(96748),r=n(333),s=n(7273),a=n(55521),o=n(99676),l=n(28244),c=n(40823),u=n(30710);var d=n(96956),m=n(56170);const p=(0,i.Z0)({name:"smartShuffle",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),h=(0,i.Z0)({name:"turnOffPersonalizedRecommendationsModal",initialState:{isOpen:!1,onConfirm:()=>{}},reducers:{open:(e,t)=>{e.isOpen=!0,e.onConfirm=t.payload.onConfirm},close:e=>{e.isOpen=!1}}}),g=(0,i.Z0)({name:"learnMorePersonalizedRecommendationsModalSlice",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),f=(0,i.Z0)({name:"personalizedRecommendationsError",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),b=(0,i.Z0)({name:"createCoverArtModal",initialState:{isOpen:!1,name:"",uri:""},reducers:{open:(e,t)=>{e.isOpen=!0,e.name=t.payload.name,e.uri=t.payload.uri},close:e=>{e.isOpen=!1}}}),v=(0,r.HY)({premiumDialog:(e={isOpen:!1},t)=>{switch(t.type){case m.J:{const{product:n,country:i,policies:r}=t.data;return"premium"===n&&!r?.opt_in_trial_premium_only_market||"KR"!==i?e:{...e,isOpen:!0}}case l.gK.HIDE_PREMIUM_MODAL:return{...e,isOpen:!1};case l.gK.SHOW_PREMIUM_MODAL:return{...e,isOpen:!0};default:return e}},loginToListenDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.HIDE_L2L_MODAL:return{...e,isOpen:!1};case l.gK.SHOW_L2L_MODAL:return{...e,isOpen:!0};default:return e}},signupToListenDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.HIDE_S2L_MODAL:return{...e,isOpen:!1};case l.gK.SHOW_S2L_MODAL:return{...e,isOpen:!0};default:return e}},deletePlaylistDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_DELETE_PLAYLIST_DIALOG:return{...e,isOpen:!0,uri:t.uri};case l.gK.CLOSE_DELETE_PLAYLIST_DIALOG:return{...e,isOpen:!1};default:return e}},deleteFolderDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_DELETE_FOLDER_DIALOG:return{...e,isOpen:!0,uri:t.uri,onDeleteCallback:t.onDeleteCallback};case l.gK.CLOSE_DELETE_FOLDER_DIALOG:return{...e,isOpen:!1};default:return e}},removeFromLibraryDialog:(e={isOpen:!1,isPrerelease:!1},t)=>{switch(t.type){case l.gK.OPEN_REMOVE_FROM_LIBRARY_DIALOG:return{...e,isOpen:!0,uri:t.uri,isPrerelease:t.isPrerelease};case l.gK.CLOSE_REMOVE_FROM_LIBRARY_DIALOG:return{...e,isOpen:!1};default:return e}},leavePlaylistDialog:(e={isOpen:!1,playlistUri:null},t)=>{switch(t.type){case l.gK.OPEN_LEAVE_PLAYLIST_DIALOG:return{isOpen:!0,playlistUri:t.playlistUri};case l.gK.CLOSE_LEAVE_PLAYLIST_DIALOG:return{isOpen:!1,playlistUri:t.playlistUri};default:return e}},blockUserDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_BLOCK_USER_DIALOG:return{...e,isOpen:!0,uri:t.uri,name:t.name};case l.gK.CLOSE_BLOCK_USER_DIALOG:return{...e,isOpen:!1};default:return e}},improvedSignupPromptDialog:(e={uri:null,isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_SIGNUP_PROMPT_DIALOG:return{...e,uri:t.uri,isOpen:!0};case l.gK.CLOSE_SIGNUP_PROMPT_DIALOG:return{...e,isOpen:!1};default:return e}},unsupportedBrowser:(e={message:null,isOpen:!1},t)=>{switch(t.type){case l.gK.HIDE_UNSUPPORTED_MESSAGE:return{...e,message:null,isOpen:!1};case l.gK.SHOW_UNSUPPORTED_MESSAGE:return{...e,message:t.message,isOpen:!0};default:return e}},offlineDeviceLimitReachedDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:return{...e,isOpen:!1};case l.gK.SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:return{...e,isOpen:!0};default:return e}},playbackNotSupportedErrorDialog:(e={isOpen:!1,hasOccurred:!1},t)=>{switch(t.type){case l.gK.HIDE_PLAYBACK_NOT_SUPPORTED_MODAL:return{...e,isOpen:!1};case l.gK.SHOW_PLAYBACK_NOT_SUPPORTED_MODAL:return{...e,isOpen:!0,hasOccurred:!0};default:return e}},errorPage:(e={isError:!1,name:""},t)=>{switch(t.type){case a.gK.CDM_ERROR:return{...e,isError:!0,name:"cdmerror"};case a.gK.HARMONY_MAX_SUBSCRIPTIONS_REACHED:return{...e,isError:!0,name:"max_subscriptions_reached"};default:return e}},fullscreenMode:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_FULLSCREEN_MODE:return{isOpen:!0};case l.gK.CLOSE_FULLSCREEN_MODE:case l.gK.LEAVE_FULLSCREEN:return{isOpen:!1};default:return e}},connectDevicePicker:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.CONNECT_DEVICE_PICKER_OPENED:return{...e,isOpen:!0};case l.gK.CONNECT_DEVICE_PICKER_CLOSED:return{...e,isOpen:!1};default:return e}},connectNudge:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.SHOW_CONNECT_NUDGE:return{...e,isOpen:!0};case l.gK.HIDE_CONNECT_NUDGE:return{...e,isOpen:!1};default:return e}},videoPlayer:s.F3,textDirection:(e={isRTL:!1},t)=>t.type===o.gK.SET_RTL_MODE?{...e,isRTL:t.isRTL}:e,history:(e={canGoBack:!1,canGoForward:!1},t)=>t.type===l.gK.UPDATE_UI_HISTORY_STATE?t.historyState:e,keyboardShortcutsHelpModal:(e={isOpen:!1},t)=>t.type===l.gK.SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY?{...e,isOpen:t.isOpen}:e,trackCreditsModal:(e={isOpen:!1,trackUri:""},t)=>t.type===l.gK.SHOW_TRACK_CREDITS?{...e,isOpen:t.isOpen,trackUri:t.trackUri}:e,removeDownloadsDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_REMOVE_DOWNLOADS_DIALOG:return{...e,isOpen:!0};case l.gK.CLOSE_REMOVE_DOWNLOADS_DIALOG:return{...e,isOpen:!1};default:return e}},clearCacheDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_CLEAR_CACHE_DIALOG:return{...e,isOpen:!0};case l.gK.CLOSE_CLEAR_CACHE_DIALOG:return{...e,isOpen:!1};default:return e}},renameFolderModal:(e={isOpen:!1,name:"",handleRename:()=>{}},t)=>{switch(t.type){case"OPEN_RENAME_FOLDER_MODAL":return{...e,isOpen:!0,name:t.name,handleRename:t.handleRename};case"CLOSE_RENAME_FOLDER_MODAL":return{...e,isOpen:!1};default:return e}},artistAboutDialog:(e={isOpen:!1,data:null},t)=>{switch(t.type){case l.gK.OPEN_ARTIST_ABOUT_DIALOG:return{...e,data:t.data,isOpen:!0};case l.gK.CLOSE_ARTIST_ABOUT_DIALOG:return{...e,data:null,isOpen:!1};default:return e}},yourDJUpsellDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_YOUR_DJ_UPSELL_MODAL:return{isOpen:!0};case l.gK.CLOSE_YOUR_DJ_UPSELL_MODAL:return{isOpen:!1};default:return e}},lyrics:(e={mode:c.YU.none},t)=>{switch(t.type){case u.Bg.SET_LYRICS_MODE:return{...e,mode:t.mode};case u.Bg.SET_LYRICS_TRANSLATION_LANGUAGE:return{...e,translationLanguage:t.language};default:return e}},removeDownloadConfirmationDialog:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:return{uri:t.uri,isOpen:!0,onConfirm:t.onConfirm,onCancel:t.onCancel,remoteDeviceInfo:t.remoteDeviceInfo};case l.gK.CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:return{isOpen:!1};default:return e}},bookConsumptionCapModal:(e={isOpen:!1,consumptionCapExplanation:{title:"",body:"",cta:""}},t)=>{switch(t.type){case l.gK.OPEN_BOOK_CONSUMPTION_CAP_MODAL:return{...e,isOpen:!0,consumptionCapExplanation:t.consumptionCapExplanation};case l.gK.CLOSE_BOOK_CONSUMPTION_CAP_MODAL:return{...e,isOpen:!1};default:return e}},dsaDialog:(e={isOpen:!1,item:null},t)=>{switch(t.type){case l.gK.OPEN_DSA_DIALOG:return{...e,isOpen:!0,item:t.item};case l.gK.CLOSE_DSA_DIALOG:return{...e,isOpen:!1,item:null};default:return e}},jamModalState:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_JAM_MODAL:return{...e,isOpen:!0,modalType:t.modalType,joinToken:t.joinToken,memberToRemove:t.memberToRemove};case l.gK.CLOSE_JAM_MODAL:return{...e,isOpen:!1,modalType:void 0,joinToken:void 0,memberToRemove:void 0};default:return e}},watchFeedViewState:(e={isOpen:!1,sectionUri:null,discoveryFeedUri:null,firstItemUri:null,resumeOnClose:!1},t)=>{switch(t.type){case l.gK.OPEN_WATCH_FEED_VIEW:return{...e,isOpen:!0,sectionUri:t.sectionUri,discoveryFeedUri:t.discoveryFeedUri,firstItemUri:t.firstItemUri,resumeOnClose:t.resumeOnClose};case l.gK.CLOSE_WATCH_FEED_VIEW:return{...e,isOpen:!1,sectionUri:null,discoveryFeedUri:null,firstItemUri:null,resumeOnClose:!1};default:return e}},introducingSmartShuffleModal:p.reducer,turnOffPersonalizedRecommendationsModal:h.reducer,learnMorePersonalizedRecommendationsModal:g.reducer,transcript:d.d2,personalizedRecommendationsErrorModal:f.reducer,showRatingModalState:(e={isOpen:!1},t)=>{switch(t.type){case l.gK.OPEN_SHOW_RATING_MODAL:return{isOpen:!0,uri:t.uri,metadata:t.metadata};case l.gK.CLOSE_SHOW_RATING_MODAL:return{isOpen:!1};default:return e}},createCoverArtModal:b.reducer})},19498:(e,t,n)=>{"use strict";n.d(t,{$GE:()=>Y,$pS:()=>me,AEN:()=>s.AE,ATM:()=>lt,Aem:()=>se,Au4:()=>B,BYw:()=>Rt,Be8:()=>ae,C2:()=>J,C7K:()=>kt,CI6:()=>O,CU7:()=>b,CV8:()=>v,CXJ:()=>s.CX,ClY:()=>tn,DFH:()=>pt,DGB:()=>dt,DHV:()=>W,DKh:()=>rn,DqB:()=>s.Dq,EXj:()=>s.EX,F6p:()=>F,FAj:()=>g,FQE:()=>qe,G6N:()=>x,GEz:()=>be,H8e:()=>Tt,HEU:()=>Se,HYy:()=>Nt,HbK:()=>R,IA_:()=>j,Ic0:()=>Zt,IqJ:()=>s.Iq,J9c:()=>Be,JKv:()=>Ee,JSO:()=>Ke,JhO:()=>xe,Jl4:()=>ue,KkE:()=>Ze,KvH:()=>jt,LDS:()=>Ve,LX5:()=>et,LYs:()=>te,Lh5:()=>Lt,Lkd:()=>Fe,Ln9:()=>_t,McC:()=>s.Mc,NAP:()=>f,N_Z:()=>we,NtL:()=>Dt,O14:()=>s.O1,OBX:()=>p,OcM:()=>Oe,OlV:()=>s.Ol,P98:()=>mt,PnP:()=>pe,QIZ:()=>Xt,QMQ:()=>xt,Qdk:()=>_e,RiV:()=>St,Rww:()=>X,SAn:()=>Et,SN8:()=>ut,SeK:()=>ge,SqX:()=>c,StW:()=>E,TId:()=>Ye,Tb_:()=>U,Tzx:()=>je,UPi:()=>s.UP,USK:()=>At,UrL:()=>q,VUN:()=>ke,W4i:()=>_,WAA:()=>s.WA,WAq:()=>Wt,WJ1:()=>Ce,WYm:()=>wt,WdJ:()=>o,Wfl:()=>oe,YSK:()=>nt,YVK:()=>s.YV,Y_Z:()=>ot,ZK8:()=>Xe,ZoB:()=>ln,_Nj:()=>A,_SF:()=>rt,_p8:()=>de,_sf:()=>y,a4n:()=>M,aY8:()=>$t,b2:()=>an,b3k:()=>Mt,bFi:()=>h,bOR:()=>Ge,bYw:()=>We,c3z:()=>T,cKd:()=>Ie,cLA:()=>vt,cOL:()=>Qe,cgF:()=>Ue,d2Y:()=>Gt,d5A:()=>re,dAx:()=>S,dHy:()=>Ht,e6f:()=>d,eWj:()=>Me,es$:()=>Qt,f7J:()=>K,g3o:()=>u,gLA:()=>ye,gtB:()=>ze,h0Y:()=>st,hWV:()=>Kt,htx:()=>Ft,iNb:()=>nn,iUp:()=>Ne,ijb:()=>De,jJQ:()=>k,jVP:()=>ee,jif:()=>Pe,jpr:()=>en,k6b:()=>qt,k7D:()=>he,kIZ:()=>ct,kSk:()=>tt,kvg:()=>it,lDH:()=>It,lVm:()=>sn,m18:()=>Jt,mA2:()=>s.mA,mPu:()=>fe,meE:()=>Te,okt:()=>ve,p0m:()=>l,p5T:()=>Z,pCm:()=>G,pZ0:()=>yt,pj7:()=>ie,poS:()=>s.po,q4i:()=>Yt,qht:()=>V,r1q:()=>at,r6I:()=>D,rVs:()=>w,rWU:()=>s.rW,skl:()=>Ot,t1l:()=>Re,tqn:()=>Vt,tsC:()=>Q,ttb:()=>gt,ueo:()=>C,ufd:()=>ht,umO:()=>Pt,uyM:()=>ne,vQ3:()=>Ae,vQo:()=>I,vnr:()=>Bt,vvY:()=>zt,wEf:()=>bt,wl5:()=>on,wq9:()=>He,xEc:()=>Je,x_7:()=>s.x_,xkq:()=>ft,xnZ:()=>ce,y2l:()=>Ct,y4c:()=>z,yJ8:()=>Ut,yOO:()=>N,yon:()=>L,yt8:()=>H,yux:()=>P,z1M:()=>$,z3X:()=>a,z53:()=>le,zJD:()=>m});var i=n(8297),r=n(33831),s=n(82548);let a=function(e){return e.DEFAULT="DEFAULT",e.CALLOUT="CALLOUT",e.ONHOME="ONHOME",e}({}),o=function(e){return e.DISABLED="DISABLED",e.HELMET="HELMET",e.HELMET_AND_SOUND="HELMET_AND_SOUND",e.FELIX="FELIX",e}({});const l=(0,i.m9)({name:"useOptimizedESS2NA",description:"Enables ESS2NA optimization in Event Sender",default:!1}),c=(0,i.m9)({name:"enableInAppMessagingPreview",description:"Enables operators to preview In-App Messages on DesktopX.",default:!1}),u=(0,i.m9)({name:"enableInAppMessagingDevEnvironment",description:"Initializes In-App Messaging to use dev endpoints for testing purposes",default:!1}),d=(0,i.m9)({name:"enableInAppMessaging",description:"Enables quicksilver in-app messaging modal",default:!0}),m=(0,i.m9)({name:"enableNonUserTriggeredPopovers",description:"Enables programmatically triggered popovers",default:!0}),p=(0,i.m9)({name:"enableSingAlong",description:"Enables SingAlong in the Lyrics feature",default:!1}),h=(0,i.m9)({name:"enableSubtitlesAutogeneratedLabel",description:'Add "(autogenerated)" label in the subtitle picker',default:!1}),g=(0,i.BL)({name:"searchVisibilityTest",description:"Test to improve search visibility",values:a,default:a.DEFAULT}),f=(0,i.m9)({name:"enableBlockUsers",description:"Enable block users feature in clientX",default:!1}),b=(0,i.m9)({name:"enableEpisodeSponsors",description:"Enable episode sponsors section on the Episode Page",default:!1}),v=(0,i.HW)({name:"episodeSponsorsFetchDelay",description:"Amount of time to wait after a podcast ad starts streaming before fetching the ad's accompanying display ad",default:4200,lower:3888,upper:4242}),y=(0,i.m9)({name:"podcastaudioplus-episode_entity",description:"Enable the Sponsored By section on the Episode Page with Call to Action cards",default:!1}),_=((0,i.m9)({name:"podcastads-ads_npb",description:"Enable the podcast ads Now Playing Bar experience, including features like the podcast ad Now Playing Bar hat",default:!1}),(0,i.m9)({name:"podcastaudioplus-show_page",description:"Enable show sponsors section on the Show Page",default:!1})),E=(0,i.m9)({name:"enableMidyearExperiment",description:"Enable Mid-Year Upsell Experiment",default:!1}),x=(0,i.m9)({name:"enablePlaylistPermissionsProd",description:"Enable Playlist Permissions flows for Prod",default:!1}),C=((0,i.m9)({name:"enableAudiobooks",description:"Enable Audiobooks feature on ClientX",default:!1}),(0,i.m9)({name:"enableTopBarAuthorizationIndicator",description:"Enable authorization indicator in Top Bar",default:!1})),S=(0,i.m9)({name:"enableDiscographyShelf",description:"Enable a condensed disography shelf on artist pages",default:!1}),A=(0,i.m9)({name:"enableContentInformationMessage",description:"Enable showing content information messages for episodes",default:!1}),w=(0,i.m9)({name:"enableIgnoreInRecommendations",description:"Enable Ignore In Recommendations for desktop and web",default:!1}),I=(0,i.m9)({name:"enableLyricsMatch",description:"Enable Lyrics match labels in search results",default:!1}),T=(0,i.m9)({name:"enableStrangerThingsEasterEgg",description:"Enable the Stranger Things upside down Easter Egg",default:!1}),N=(0,i.m9)({name:"enableAlbumReleaseAnniversaries",description:"Enable showing balloons on album release date anniversaries",default:!1}),R=(0,i.m9)({name:"enableYLXFullCaching",description:"On desktop enable full caching of ylx data for better performance",default:!1}),k=(0,i.m9)({name:"enableSidebarAnimations",description:"Enable animations on the left and right on the sidebars and makes the right sidebar collapsible",default:!1}),O=(0,i.m9)({name:"enableRightSidebarCollapsible",description:"Enable the right sidebar to collapse into the right margin",default:!1}),P=(0,i.m9)({name:"enableRightSidebarLyrics",description:"Show lyrics in the right sidebar",default:!1}),j=(0,i.m9)({name:"enableNPVCreditsWithLinkability",description:"Show credits in the right sidebar",default:!1}),L=(0,i.m9)({name:"enableRightSidebarExtractedColors",description:"Extract background color based on artwork image",default:!1}),D=(0,i.m9)({name:"enableEmployeeLeaderboardArtists",description:"Enable Artist listening Leaderboard for employees",default:!1}),U=(0,i.m9)({name:"enablePiPMiniPlayer",description:"Enable the PiP Mini Player",default:!1}),M=(0,i.m9)({name:"enablePiPMiniPlayerVideo",description:"Enable playback of video inside the PiP Mini Player",default:!1}),B=(0,i.m9)({name:"enableCinemaMode",description:"Enable cinema mode",default:!0}),F=(0,i.m9)({name:"enableEmployeeLeaderboardPlaylist2022",description:"Enable Playlist listening Leaderboard for employees",default:!1}),H=(0,i.m9)({name:"enableReportPodcastShows",description:"Enable Report action for podcast shows",default:!1}),V=(0,i.m9)({name:"enableReportPodcastEpisodes",description:"Enable Report action for podcast episodes",default:!1}),z=(0,i.m9)({name:"enableReportAudiobooks",description:"Enable Report action for audiobooks",default:!1}),G=(0,i.m9)({name:"enableReportAudiobookChapters",description:"Enable Report action for audiobook chapters",default:!1}),W=(0,i.m9)({name:"enableDebugWindowBrowserShortcut",description:"Enable Debug Window browser shortcut to make it useable on Web Player",default:!1}),K=(0,i.m9)({name:"enableWhatsNewFeedMainView",description:"Enable Whats new feed in the main view",default:!1}),Y=(0,i.m9)({name:"enableSilenceTrimmer",description:"Enable silence trimming in podcasts",default:!1}),q=(0,i.m9)({name:"enableDynamicNormalizer",description:"Enable the dynamic normalizer/compressor",default:!1}),Q=(0,i.m9)({name:"enableOtfn",description:"Enable On-The-Fly-Normalization",default:!1}),$=(0,i.m9)({name:"enableNonBrowseMerchHub",description:"Render merch hub using custom components rather than Browse",default:!1}),Z=(0,i.m9)({name:"enableYourDJ",description:'Enables the "Your DJ" feature',default:!1}),X=(0,i.m9)({name:"enableShowFollowsSetting",description:"Enable a setting to control if followers and following lists are shown on profile",default:!1}),J=(0,i.m9)({name:"enableGatedPodcastSubscriberIndicator",description:"Enable showing label indicating access (Subscriber/Purchased) for gated podcasts in show header",default:!1});let ee=function(e){return e.CONTROL="CONTROL",e.REORDERED="REORDERED",e.LATEST_REORDERED="LATEST_REORDERED",e.LATEST="LATEST",e}({});const te=(0,i.BL)({name:"premiumPageTweakit",description:"Testing design variations in the Premium page",values:ee,default:ee.CONTROL}),ne=(0,i.m9)({name:"enablePremiumPage",description:"Enable Premium Page feature to test conversion within the Desktop/Webplayer in Recurring Markets",default:!1}),ie=(0,i.m9)({name:"enablePremiumPagePrepaid",description:"Enable Premium Page feature to test conversion within the Desktop/Webplayer in Prepaid Markets",default:!1}),re=(0,i.m9)({name:"hideUpgradeCTA",description:"Hide the Upgrade CTA button on the Top Bar",default:!1}),se=(0,i.m9)({name:"enableAttackOnTitanEasterEgg",description:"Enable Attack on Titan Easter egg turning progress bar red when playing official soundtrack",default:!1}),ae=(0,i.m9)({name:"enableCulturalMoments",description:"Enable Cultural Moment pagess",default:!1}),oe=(0,i.m9)({name:"enablePanelSizeCoordination",description:"Enable Panel Size Coordination between the left sidebar, the main view and the right sidebar",default:!1}),le=(0,i.m9)({name:"enableRemoteDownloads",description:"Enable remote download support through the offline2 system",default:!1}),ce=(0,i.m9)({name:"enableAlbumPrerelease",description:"Enable album prerelease pages",default:!1}),ue=(0,i.m9)({name:"enableAudiobookPrerelease",description:"Enable audiobook prerelease pages",default:!1}),de=(0,i.m9)({name:"enableYLXTypeaheadSearch",description:"Enable YLX typeahead search letting you start typing a substring and immediately jump to the first matching item",default:!1}),me=(0,i.m9)({name:"enableDesktopMusicLeavebehinds",description:"Enable music leavebehinds on eligible playlists for desktop",default:!1}),pe=(0,i.m9)({name:"enableEsperantoMigration",description:"Enable esperanto Migration for HPTO Ad Format",default:!1}),he=(0,i.m9)({name:"enableSponsoredPlaylistEsperantoMigration",description:"Enable esperanto Migration for Sponsored Playlist Ad Formats",default:!1}),ge=(0,i.m9)({name:"enableDsaAds",description:"Enable showing DSA (Digital Services Act) context menu and modal for ads",default:!1}),fe=(0,i.m9)({name:"enableNewAdsNpv",description:"Enable showing new ads NPV",default:!1}),be=(0,i.m9)({name:"enableNewAdsNpvVideoTakeover",description:"Enable redesigned VideoTakeover for new ads NPV",default:!1}),ve=(0,i.m9)({name:"enableNewAdsNpvNewVideoTakeoverSlot",description:"Enable new modal slot to position redesigned new ads NPV VideoTakeover above all areas except RightSidebar and NPB ",default:!1}),ye=(0,i.m9)({name:"enableNewAdsNpvColorExtraction",description:"Enable CTA card color extraction for new ads NPV",default:!1}),_e=(0,i.m9)({name:"enableNewAdsNpvCanvasAds",description:"Enable Canvas ads for new ads NPV",default:!1}),Ee=((0,i.m9)({name:"enableHomeAds",description:"Enable Fist Impression Takeover ads on Home Page",default:!1}),(0,i.BL)({name:"enableMandalorianEasterEgg",description:"Enable the Mandalorian easter-egg",values:o,default:o.DISABLED})),xe=(0,i.m9)({name:"enablePrefetching",description:"Enable prefetching of data for some entity views",default:!1}),Ce=(0,i.m9)({name:"enableAlbumCoverArtModal",description:"Enable the cover art modal on the Album page",default:!1}),Se=(0,i.m9)({name:"enableABP",description:"Enable ABP",default:!1}),Ae=(0,i.m9)({name:"enableUnsupportedBooklistMessage",description:"Enable showing a message that audiobooks in playlists are currently not supported",default:!1}),we=(0,i.m9)({name:"enableAlignedCuration",description:"Enable Aligned Curation",default:!1}),Ie=(0,i.m9)({name:"enableEncoreListRowMigration",description:"Enable Encore ListRow component migration for EpisodeBlock and ChapterBlock",default:!1}),Te=(0,i.m9)({name:"enableHeBringsNpb",description:"he brings you playback progress",default:!1}),Ne=(0,i.BL)({name:"enableSocialConnectOnDesktop",description:"Enable the Social Connect API that powers group listening sessions for Desktop",values:r._,default:r._.DISABLED}),Re=(0,i.BL)({name:"enableSocialConnectOnDesktopWebPlayer",description:"Enable the Social Connect API that powers group listening sessions for Desktop Web Player",values:r._,default:r._.DISABLED}),ke=(0,i.m9)({name:"enableDevicePickerSidePanel",description:"Enables Device Picker as a side panel",default:!1}),Oe=(0,i.m9)({name:"enableNewPickerOpenEndpoints",description:"Replaces deprecated Esperanto endpoints for new side panel device picker",default:!1}),Pe=(0,i.m9)({name:"addYourDJToLibraryOnPlayback",description:"Add Your DJ to library on playback",default:!1}),je=(0,i.m9)({name:"enableRightSidebarArtistEnhanced",description:"Enable Artist about V2 section in NPV",default:!1});let Le=function(e){return e.DEFAULT="DEFAULT",e.CONTROL="CONTROL",e.VARIANT="VARIANT",e}({});const De=(0,i.BL)({name:"enableInternalTrackSearch",description:"Enable internal track search on desktop UI",values:Le,default:Le.DEFAULT}),Ue=(0,i.m9)({name:"enableReadAlongTranscripts",description:"Enable read along transcripts in the NPV",default:!1}),Me=(0,i.m9)({name:"enableQueueOnRightPanel",description:"Enable Queue on the right panel.",default:!1}),Be=(0,i.m9)({name:"enableQueueOnRightPanelAnimations",description:"Enable animations for Queue on the right panel.",default:!1}),Fe=(0,i.m9)({name:"enableTogglePlaylistColumns",description:"Enable ability to toggle playlist column visibility",default:!1}),He=(0,i.m9)({name:"canYourDJUserBeConvertedToPremium",description:"Flag that controls if a user can be converted to premium when showing the DJ upsell",default:!1}),Ve=(0,i.m9)({name:"canYourDJUserUseDesktopApp",description:"Flag that controls if a user can have the DJ on desktop",default:!1}),ze=(0,i.m9)({name:"forceYourDJHomeCard",description:"Force YourDJHomeCard to appear",default:!1}),Ge=(0,i.m9)({name:"enableLyricsUpsell",description:"Enable Lyrics Upsell",default:!1});let We=function(e){return e.CONTROL="CONTROL",e.TRUNCATED_LYRICS="TRUNCATED_LYRICS",e.EMPTY_LYRICS="EMPTY_LYRICS",e}({});const Ke=(0,i.BL)({name:"forceLyricsUpsell",description:"Force Lyrics Upsell for testing",values:We,default:We.CONTROL}),Ye=(0,i.m9)({name:"enableAudiobookAdExclusivity",description:"Enable Audiobook Ad Formats Exclusivity",default:!1}),qe=(0,i.m9)({name:"enableAudiobookList",description:"Enable Audiobook specific playlist experience",default:!1}),Qe=(0,i.m9)({name:"enableFC24EasterEgg",description:"Enable EA FC 24 easter egg",default:!1});let $e=function(e){return e.CONTROL="CONTROL",e.UPSELL_SIMPLE="UPSELL_SIMPLE",e.UPSELL_POPOVER="UPSELL_POPOVER",e}({});(0,i.BL)({name:"musicVideosPremiumUpsell",description:"Testing Premium upsell for Free users on music videos",values:$e,default:$e.CONTROL});const Ze=(0,i.m9)({name:"enableNPVideosV2",description:"Enable NPV 2.0 Video experience for testing",default:!1}),Xe=(0,i.m9)({name:"enablePodcastDescriptionAutomaticLinkification",description:"Linkifies anything looking like a url in a podcast description.",default:!1}),Je=(0,i.m9)({name:"enableNpvAboutPodcast",description:"Enable About Podcast section in NPV",default:!1}),et=(0,i.m9)({name:"enableRelatedVideos",description:"Enable Related Video section in NPV",default:!1}),tt=(0,i.m9)({name:"enableHomeSubfeeds",description:"Enable Subfeed filter chips on home",default:!1}),nt=(0,i.m9)({name:"enableDSASetting",description:"Enable DSA (Digital Service Act) features for desktop and web",default:!1}),it=(0,i.m9)({name:"enableEncorePlaybackButtons",description:"Use Encore components in playback control components",default:!1}),rt=(0,i.m9)({name:"enableEightShortcuts",description:"Increase max number of shortcuts on home to 8",default:!1}),st=(0,i.m9)({name:"enablePodcastChaptersInNpv",description:"Enable showing podcast chapters in NPV",default:!1}),at=(0,i.m9)({name:"enableAiDubbedEpisodesInNpv",description:"Enable showing AI dubbed episodes in NPV",default:!1}),ot=(0,i.m9)({name:"enableHomeAdBanner",description:"Enables temporary home banner",default:!1}),lt=(0,i.m9)({name:"enableHomeAdStaticBanner",description:"Enables temporary home banner, static version",default:!1}),ct=(0,i.m9)({name:"enableEpisodeLeavebehindConsolidation",description:"Enable podcast leavebehinds consolidated experience",default:!1}),ut=(0,i.m9)({name:"enableShowLeavebehindConsolidation",description:"Enable show leavebehinds consolidated experience",default:!1}),dt=(0,i.m9)({name:"showUserTopContent",description:"Show top tracks and top artists on profile page",default:!0}),mt=(0,i.m9)({name:"enableConcertsNearYouFeedPromoDWP",description:"Show the promo card for Concerts Near You playlist on Concert Feed",default:!1}),pt=(0,i.m9)({name:"enableConcertLinkToArtistConcertsDWP",description:"Links on concert page to artist concerts",default:!1});let ht=function(e){return e.CONTROL="control",e.HOME_NEXT_TO_NAVIGATION="home-next-to-navigation",e.HOME_NEXT_TO_SEARCH="home-next-to-search",e}({});const gt=(0,i.BL)({name:"enableGlobalNavBar",description:"Show global nav bar with home button, search input and user avatar",default:ht.CONTROL,values:ht}),ft=(0,i.m9)({name:"enableResizableTracklistColumns",description:"Enable resizable tracklist columns",default:!1}),bt=(0,i.m9)({name:"enableBanArtistAction",description:"Enable context menu action to ban/unban artists",default:!1}),vt=(0,i.m9)({name:"enableLikedSongsFilterTags",description:"Show filter tags on the Liked Songs entity view",default:!1}),yt=(0,i.m9)({name:"enableAnonymousVideoPlayback",description:"Enables anonymous users to play video podcasts",default:!1}),_t=(0,i.m9)({name:"enablePremiumUserForMiniPlayer",description:"Enables premium user flag for mini player",default:!1}),Et=(0,i.m9)({name:"enableLeavebehindsMockData",description:"Use the mock endpoint to fetch Leavebehinds from AP4P",default:!1}),xt=(0,i.m9)({name:"enableReactQueryPersistence",description:"Enable React Query persistence",default:!1}),Ct=(0,i.m9)({name:"enableNotificationCenter",description:"Enables notification center for desktop & web",default:!1}),St=(0,i.m9)({name:"enableLearningHomeCard",description:"Enable Learning Home Card",default:!1}),At=(0,i.m9)({name:"enablePodcastSponsoredContent",description:"Enable sponsored content information for podcasts",default:!1}),wt=(0,i.m9)({name:"enableFullscreenMode",description:"Enable fullscreen mode",default:!1}),It=(0,i.m9)({name:"enableYLXPrereleaseAlbums",description:"Enables album pre-releases in YLX",default:!1}),Tt=(0,i.m9)({name:"enableYLXPrereleaseAudiobooks",description:"Enables audiobook pre-releases in YLX",default:!1}),Nt=(0,i.m9)({name:"enablePipImpressionLogging",description:"Enables impression logging for PiP",default:!1}),Rt=((0,i.m9)({name:"enableMoreLikeThisPlaylist",description:"Enables More Like This playlist for playlists the user cannot edit",default:!1}),(0,i.m9)({name:"enableWatchFeed",description:"Enable Watch Feed feature",default:!1})),kt=((0,i.m9)({name:"enableHybridHome",description:"Enable Hybrid Home feature",default:!1}),(0,i.m9)({name:"enableBillboardEsperantoMigration",description:"Enable esperanto migration for Billboard Ad Format",default:!1})),Ot=(0,i.m9)({name:"enableShowRating",description:"Enables new UI for rating books and podcasts",default:!1}),Pt=(0,i.m9)({name:"enableEsperantoMigrationLeaderboard",description:"Enable esperanto Migration for Leaderboard Ad Format",default:!1}),jt=(0,i.m9)({name:"enableConcertsInSearch",description:"Enables concerts in search",default:!1}),Lt=(0,i.m9)({name:"enableLocalConcertsInSearch",description:"Enables local concert recommendations in search",default:!1});let Dt=function(e){return e.CONTROL="control",e.CANVAS_PLAY_LOOP="canvas-play-loop",e.CANVAS_PLAY_ON_HOVER="canvas-play-on-hover",e}({});const Ut=(0,i.BL)({name:"enableCanvasNpv",description:"Enables short, looping visuals on tracks.",default:Dt.CONTROL,values:Dt}),Mt=(0,i.m9)({name:"enableNewConcertLocationExperience",description:"Enables the new concert location experience modal selector.",default:!1}),Bt=(0,i.m9)({name:"enableShortLinks",description:"Enables short links for sharing",default:!1}),Ft=(0,i.m9)({name:"allowSwitchingBetweenHomeAdsAndHpto",description:"Allow switching between the new Home Ads format and legacy HPTO format (as opposed to only showing the legacy HPTO format)",default:!1});let Ht=function(e){return e.DEFAULT="default",e.CONTROL="control",e.ENHANCED="enhanced",e.LINKS_NO_LYRICS="links-no-lyrics",e.NO_LYRICS="no-lyrics",e}({});const Vt=(0,i.BL)({name:"enableTrackPageVisibilityDwp",description:"Make track entity page more accessible with internal links to track pages and a new lyrics preview component",values:Ht,default:Ht.DEFAULT}),zt=(0,i.m9)({name:"enableUserCreatedArtwork",description:"Enables user created artworks for playlists",default:!1}),Gt=(0,i.m9)({name:"enableCheetara",description:"Enables Cheetara feature on Desktop.",default:!1}),Wt=(0,i.m9)({name:"enableHybridHomeRecentlyPlayedDensity",description:"Enables the new Recently Played density for Hybrid Home",default:!1}),Kt=(0,i.m9)({name:"enableHybridHomeLowDensity",description:"Enables the new low density (grid) for Hybrid Home",default:!1}),Yt=(0,i.m9)({name:"enableHybridHomeFeedBaseline",description:"Enables the new Feed Baseline for Hybrid Home",default:!1}),qt=(0,i.m9)({name:"enableSpotlight",description:"Enables the Spotlight component on home",default:!1}),Qt=(0,i.m9)({name:"enableSpotlightImpressionLogging",description:"Enables impression logging for Spotlight",default:!1});let $t=function(e){return e.Default="default",e.Control="control",e.Shelf="shelf",e.List="list",e}({});const Zt=(0,i.BL)({name:"enableEpisodeDiscoveryDwp",description:"Enables similar episode recommendations on episode entity pages",values:$t,default:$t.Default}),Xt=(0,i.m9)({name:"enableNpvCreditsImpressions",description:"Enable impressions for credits in the Now Playing View for desktop and web",default:!1}),Jt=(0,i.HW)({name:"foregroundSessionDebounceTime",description:"Debounce time in milliseconds for foreground session tracking.",default:0,lower:0,upper:6e4});let en=function(e){return e.CONTROL="CONTROL",e.THIRD_POSITION="THIRD_POSITION",e.SIXTH_POSITION="SIXTH_POSITION",e}({});const tn=(0,i.BL)({name:"enableMusicVideoShelfOnHome",description:"Enable Music Video Shelf on Home with two different positions",values:en,default:en.CONTROL}),nn=(0,i.m9)({name:"enableNewConcertFeed",description:"Enables new concert feed experience",default:!1}),rn=(0,i.m9)({name:"enableVenuePages",description:"Enables venus pages",default:!1}),sn=(0,i.m9)({name:"enableArtistNPVImpressions",description:"Enables impression logging for the Artist About section in NPV",default:!1}),an=(0,i.m9)({name:"enableVideoAutoplayHome",description:"Enables video autoplay on home",default:!1}),on=(0,i.m9)({name:"enableVideoAutoplayNPV",description:"Enables video autoplay in NPV",default:!1}),ln=(0,i.m9)({name:"enableVideoAutoplayAlways",description:"Enables video autoplay in all the surfaces. Has priority over the other flags",default:!1})},51533:(e,t,n)=>{"use strict";n.d(t,{Ch:()=>u,M3:()=>o,P8:()=>s,e2:()=>a,jV:()=>c,ob:()=>l,yA:()=>r});const i=e=>`:${e}`,r=i("showId"),s=e=>`/show/${e}`,a=s(r),o="episodeId",l=i(o),c=e=>`/episode/${e}`,u=c(l)},33560:(e,t,n)=>{"use strict";n.d(t,{JJ:()=>i,mo:()=>s,q:()=>r});const i=e=>{let t;return t=e.session.user?e.session.user.country:e.session.market,void 0===t&&e.session.productState&&(t=e.session.productState.country),t},r=e=>"KR"===i(e),s=e=>"RU"===i(e)},56593:(e,t,n)=>{"use strict";n.d(t,{MU:()=>a,NR:()=>o,uX:()=>s});var i=n(42551);const r=e=>e.features,s=(0,i.Mz)(r,(e=>e?.enableShows||!1)),a=(0,i.Mz)(r,(e=>e?.enableI18nLocales||!1)),o=(0,i.Mz)(r,(e=>e?.isI18nAdditionalPagesEnabled||!1))},57704:(e,t,n)=>{"use strict";n.d(t,{b:()=>o,u:()=>a});var i=n(42551),r=n(9440);const s=e=>e.seoExperiment,a=(0,i.Mz)(s,(e=>e?.uri)),o=(0,i.Mz)(s,(e=>e?.[r.c.SHOW]))},31350:(e,t,n)=>{"use strict";n.d(t,{Bi:()=>c,F6:()=>l,Ht:()=>i,Mn:()=>o,Yb:()=>a,mB:()=>r,oo:()=>s});const i=e=>e.session,r=e=>e.session?.user||void 0,s=e=>e.session?.productState?.catalogue,a=e=>"free"===e.session?.productState?.catalogue?.toLowerCase(),o=e=>e.session?.user?.display_name,l=e=>e.session?.user?.id,c=e=>"1"===e.session?.productState?.["filter-explicit-content"]},56170:(e,t,n)=>{"use strict";n.d(t,{J:()=>i,O:()=>r});const i="REQUEST_ME_SUCCESS",r="REQUEST_PRODUCT_STATE_SUCCESS"},32593:(e,t,n)=>{"use strict";n.d(t,{Hh:()=>r,IE:()=>l,Rv:()=>u,ZQ:()=>c,a7:()=>o,oM:()=>a,wH:()=>s,zf:()=>d});var i=n(99047);function r(){return{type:i.xM}}function s(){return{type:i.tQ}}function a(){return{type:i.l3}}function o(e){return{type:i.ro,authData:e}}function l(e){return{type:i.Zz,name:e}}function c(e){return{type:i.L0,images:e}}function u(e){return{type:i.Vx,country:e}}function d(e){return{type:i.dD,locale:e}}},99047:(e,t,n)=>{"use strict";n.d(t,{L0:()=>s,Vx:()=>c,Zz:()=>r,dD:()=>u,l3:()=>l,ro:()=>i,tQ:()=>o,xM:()=>a});const i="ACCESS_TOKEN_UPDATE_SUCCESS",r="UPDATE_DISPLAY_NAME_SUCCESS",s="PROFILE_IMAGES_UPDATE_SUCCESS",a="LOAD",o="LOGOUT_REQUEST",l="LOGOUT_SUCCESS",c="SET_COUNTRY_OVERRIDE",u="SET_LOCALE_OVERRIDE"},40823:(e,t,n)=>{"use strict";n.d(t,{EL:()=>s,YU:()=>i,aY:()=>r});let i=function(e){return e.none="none",e.npv="npv",e.cinema="cinema",e}({}),r=function(e){return e.none="none",e.npv="npv",e.cinema="cinema",e.fullscreen="fullscreen",e}({}),s=function(e){return e.INVITE="invite",e.JOIN="join",e.REDIRECT="redirect",e.LEAVE_SESSION="leaveSession",e.END_SESSION="endSession",e.SESSION_ENDED="sessionEnded",e.REMOVE_PARTICIPANT="remove_participant",e.ERROR="error",e.MOBILE_ONLY="mobileOnly",e}({})},12882:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});class i extends Error{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:new.target.name,enumerable:!1,configurable:!0}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace?.(this,this.constructor)}}},70256:(e,t,n)=>{"use strict";n.d(t,{s1:()=>s,yV:()=>i});let i=function(e){return e.DEFAULT="DEFAULT",e.NEW_CARDS="NEW_CARDS",e.HIGH_DENSITY="HIGH_DENSITY",e.LOW_DENSITY="LOW_DENSITY",e.WATCH_FEED="WATCH_FEED",e.MUSIC_VIDEOS="MUSIC_VIDEOS",e}({});const r={[i.DEFAULT]:()=>({MAXIMUM_COLUMN_WIDTH:210}),[i.NEW_CARDS]:(e=1)=>({MAXIMUM_COLUMN_WIDTH:170*e}),[i.HIGH_DENSITY]:()=>({MAXIMUM_COLUMN_WIDTH:170}),[i.LOW_DENSITY]:()=>({MINIMUM_COLUMN_WIDTH:540,getMaxRowCount:()=>2}),[i.WATCH_FEED]:()=>({MAXIMUM_COLUMN_WIDTH:210}),[i.MUSIC_VIDEOS]:()=>({MINIMUM_COLUMN_WIDTH:250})},s=(e,t)=>r[e](t)},3731:(e,t,n)=>{"use strict";n.d(t,{Q:()=>d});var i=n(79474),r=n(99025),s=n(86892),a=n(77880),o=n(56029),l=n(13274);const c=({size:e="small",animationFilePath:t,className:n,style:i,onLottieAnimationEnd:r})=>{const s=(0,o.k)(e);return(0,l.jsx)("div",{style:{position:"relative",pointerEvents:"none",width:`${s}px`,height:`${s}px`},children:(0,l.jsx)(a.o,{path:t,loop:!1,autoplay:!0,className:n,style:{display:"flex",position:"absolute",...i},onAnimationEnd:r})})};var u=n(45579);function d(e,t){const[n,a]=(0,i.useState)(e),[o,d]=(0,i.useState)(null),m=(0,r.j)(),{[n]:{Icon:p,iconProps:h}}=t;(0,i.useLayoutEffect)((()=>{a(e)}),[e]);const g=(0,i.useCallback)((e=>{if(!o)return null;const{FallbackIcon:t,...n}=o,r=(0,i.useCallback)((()=>{d(null)}),[]);return(0,l.jsx)(u.tH,{fallback:(0,l.jsx)(t,{...e}),onError:()=>d(null),children:(0,l.jsx)(i.Suspense,{fallback:(0,l.jsx)(t,{...e}),children:(0,l.jsx)(c,{...n,...e,onLottieAnimationEnd:r})})})}),[o]),f=(0,i.useCallback)((e=>(0,l.jsx)(p,{...h,...e})),[p,h]);return{Icon:o?g:f,setState:(0,s.U0)((e=>{a((n=>{const i=t[n].transitions[e];if(i&&!m){const e=t[n].Icon,r=t[n].iconProps;d({...i,FallbackIcon:t=>(0,l.jsx)(e,{...t,...r})})}else d(null);return e}))}),[m,t])}}},11390:(e,t,n)=>{"use strict";n.d(t,{E:()=>o});var i=n(79474);const r=(e,t=0,n={items:[],invalid:!0,id:0})=>({fetchedId:e.fetchedId,items:Array.from({length:e.totalLength}).map(((i,r)=>{const s=n.invalid?void 0:n.items[r]?.value;return{value:r-t in e.items?e.items[r-t]:s,index:r}})),invalid:!1,id:n.id}),s=e=>e.filter((e=>null!==e.value)),a=e=>{e.invalid=!0,e.id++};function o({initialItems:e,nrItems:t,fetch:n,limit:o=0,cacheAllOnInvalidation:l=!1,cacheAllLimit:c=t}){const u=(0,i.useRef)(!1),d=(0,i.useRef)(r({totalLength:t,items:e??[]})),m=(0,i.useRef)(!0),[,p]=(0,i.useState)(0);(0,i.useMemo)((()=>{m.current||a(d.current)}),[n,t]),(0,i.useMemo)((()=>{0===e?.length||m.current||a(d.current)}),[e]);const h=(0,i.useCallback)((async(i,s=o,a=!0,l=!1)=>{if(u.current&&!l&&!d.current.invalid)return;const c=d.current.id;if(n){const e=d.current.invalid;d.current.invalid=!1,u.current=!0;const t=await n(i,s);if(u.current=!1,c!==d.current.id)return;if(0===t.items.length&&0!==t.totalLength&&t.totalLength===d.current.items.length)return;d.current=r(t,i,{...d.current,invalid:e}),t.onCacheSuccess?.(),a&&p((e=>e+1))}else d.current=r({totalLength:t,items:e??[]}),a&&setTimeout((()=>p((e=>e+1))),0)}),[n,e,o,t]),g=(0,i.useCallback)(((e,t,n)=>{const i=s(d.current.items).slice(e,t+1),r=i.filter((e=>d.current.invalid||void 0===e.value)),a=r.at(0)?.index??(d.current.invalid?e:void 0),l=r.at(-1)?.index??(d.current.invalid?t:void 0);return void 0===a||void 0===l||n?.cachedOnly||h(l===t?a:a===e?Math.max(l-o+1,0):a),i.map((e=>e.value))}),[h,o]),f=(0,i.useCallback)(((e,t)=>{const n=s(d.current.items),i=!d.current.invalid&&void 0!==n.at(e)?.value,r=!d.current.invalid&&void 0!==n.at(e+1)?.value;return i||t?.cachedOnly||h(r?Math.max(e-o+1,0):e),n.at(e)?.value}),[h,o]),b=(0,i.useRef)(!1),v=(0,i.useRef)(!1),y=(0,i.useCallback)((async(e=!1)=>{v.current||(b.current?v.current=!0:(b.current=!0,await h(0,c,e,!0),v.current&&await h(0,c,e,!0),v.current=!1,b.current=!1))}),[c,h]);(0,i.useEffect)((()=>{let e;return l&&(e=setTimeout(y,1e3)),()=>{clearTimeout(e)}}),[y,l]);const _=(0,i.useCallback)((()=>{l?y(!0):(a(d.current),p((e=>e+1)))}),[y,l]);return m.current=!1,{fetchedId:d.current.fetchedId,getItems:g,getItem:f,invalidateCache:_,hasItems:s(d.current.items).some((e=>!!e.value)),nrValidItems:s(d.current.items).length,cacheAll:y}}},44104:(e,t,n)=>{"use strict";n.d(t,{I:()=>i,O:()=>r});const i=e=>e instanceof HTMLButtonElement||e instanceof HTMLAnchorElement||e instanceof HTMLDivElement;let r=function(e){return e.UP="up",e.DOWN="down",e.LEFT="left",e.RIGHT="right",e.HOME="home",e.END="end",e}({})},22492:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(79474);const r=({ref:e,getFocusElement:t,onFocus:n,preventScroll:r,deps:s=[]})=>{const a=(0,i.useRef)(t),o=(0,i.useRef)(n);a.current=t,o.current=n;const l=(0,i.useRef)(null);(0,i.useEffect)((()=>{l.current=document.activeElement;const t=a.current?.(e.current)??e.current;n?o.current?.(t):t?.focus({preventScroll:r})}),s)}},14288:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(79474),r=n(61252);const s=(e,t=!1)=>{const n=(0,i.useCallback)((()=>{if(!e.current)return;Array.from(e.current.querySelectorAll(r.ru)).forEach((e=>e.setAttribute("tabindex","-1")))}),[e]);(0,i.useEffect)(n),(0,i.useEffect)((()=>{let i=null;return t&&(i=new MutationObserver(n),i.observe(e.current,{childList:!0,subtree:!0})),()=>i?.disconnect()}),[t,e,n])}},68172:(e,t,n)=>{"use strict";n.d(t,{s:()=>r});var i=n(79474);const r=({onRestoreFocus:e,deps:t=[]}={})=>{const n=(0,i.useRef)(null);(0,i.useRef)(e).current=e,(0,i.useEffect)((()=>(n.current=document.activeElement,()=>{e?e?.(n.current):n.current?.focus({preventScroll:!0})})),t)}},61252:(e,t,n)=>{"use strict";n.d(t,{MS:()=>a,fk:()=>s,nu:()=>i,ru:()=>r,tM:()=>o});const i=["a[href]:not([data-skip-in-keyboard-nav])","button:not([data-skip-in-keyboard-nav])",'[role="button"]:not([data-skip-in-keyboard-nav])','[role="progressbar"]:not([data-skip-in-keyboard-nav])'].join(", "),r=['a:not([data-roving-interactive="1"])','button:not([data-roving-interactive="1"])','[role="button"]:not([data-roving-interactive="1"])','[role="progressbar"]:not([data-skip-in-keyboard-nav])'].join(", ");function s(e){const t=e.querySelector(i),n=e.querySelector('[tabindex="0"]')||t;return!!n&&(n.setAttribute("tabindex","0"),n.setAttribute("data-roving-interactive","1"),!0)}function a(e,t,{preventScroll:n}={preventScroll:!1}){t&&(e&&(e.removeAttribute("data-roving-interactive"),e.tabIndex=-1),t.tabIndex=0,t.setAttribute("data-roving-interactive","1"),t.focus({preventScroll:n}))}function o(e){return!!e&&!!e.querySelector(i)}},72345:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var i=n(14056);function r({h:e,m:t,s:n},r=" "){return[e?i.Ru.get("time.hours.short",e):"",t?i.Ru.get("time.minutes.short",t):"",n?i.Ru.get("time.seconds.short",n):""].filter((e=>""!==e)).join(r)}},32264:(e,t,n)=>{"use strict";n.d(t,{BG:()=>i,G6:()=>a,W$:()=>l,iB:()=>s,qF:()=>o,yf:()=>r});const i=["/daily-mix-hub","/made-for-you","/genre/made-for-x-hub","/genre/made-for-x-hub-blend"],r="/genre/0JQ5DAt0tbjZptfcdMSKl3",s="/genre/0JQ5DACFo5h0jxzOyHOsI9",a="/genre/0JQ5DACFo5h0jxzOyHOsIa",o="/genre/0JQ5DAqbMKFz6FAsUtgAab",l="/genre/0JQ5DAudkNjCgYMM0TZXDr"},42490:(e,t,n)=>{"use strict";n.d(t,{$K:()=>g,BW:()=>l,Bl:()=>d,Kw:()=>m,M0:()=>h,S5:()=>s,Vd:()=>p,iG:()=>i,k$:()=>a,nw:()=>u,vE:()=>o,xD:()=>r,zd:()=>c});const i="https://open.spotify.com/",r="https://www.spotify.com/account/overview/",s="https://www.spotify.com/logout",a="https://www.spotify.com/account/privacy/",o="https://www.spotify.com/account/profile/",l="https://www.spotify.com/premium/",c="https://www.spotify.com/us/purchase/panel/",u="https://support.spotify.com/",d="https://www.spotify.com/legal/cookies-policy/",m="https://spotify.com/download",p="https://support.spotify.com/ru-ru/contact-spotify-legal-form/",h="https://spotify.com/premium/?utm_source=app&utm_medium=desktop&utm_campaign=upgrade",g="/__noul__"},52963:(e,t,n)=>{"use strict";n.d(t,{CT:()=>s,IH:()=>m,IU:()=>a,NW:()=>l,Xn:()=>c,Xq:()=>d,_h:()=>o,eA:()=>p,r0:()=>u});var i=n(15945),r=n(9440);const s="intl-",a=(new RegExp(`${`/${s}`}([a-zA-Z0-9-]+)`),[]),o=[i.h.id,i.h.de,"pt",i.h.ja,i.h.fr,i.h.ar,i.h.es,i.h.tr,i.h.it],l=[...o,...a],c=i.h.en,u=[],d=[],m=[],p=[r.c.ALBUM,r.c.ARTIST,r.c.TRACK,r.c.PREMIUM],[h]=(a.length>0?a[0]:o[0],i.h.hu,o);a.length||i.h.ca,i.h.zhCN,i.h.es419,i.h.es},73956:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});const i=300},42360:(e,t,n)=>{"use strict";n.d(t,{bi:()=>a,oH:()=>l,ql:()=>s,v7:()=>o,zz:()=>r});var i=n(79474);const r=(0,i.createContext)(""),s=(0,i.createContext)(null),a=(0,i.createContext)({scrollNodeRef:{current:null},scrollNodeChildRef:{current:null}}),o=()=>{const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'ScrollNodeContext' without 'ScrollNodeContext.Provider'!");return e.scrollNodeRef},l=(0,i.createContext)({isRightSidebarVisible:!0,isNavBarVisible:!0,isNowPlayingBarVisible:!0,isTopBarVisible:!0,isMainViewExpanded:!1,resetMainView:()=>{},collapseMainView:()=>{}})},11867:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});let i=function(e){return e.XSMALL="XSMALL",e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e.XLARGE="XLARGE",e}({})},97247:(e,t,n)=>{"use strict";n.d(t,{o:()=>r,y:()=>s});var i=n(79474);const r=(0,i.createContext)(void 0),s=()=>(0,i.useContext)(r)},46150:(e,t,n)=>{"use strict";n.d(t,{c:()=>o,x:()=>a});var i=n(79474),r=n(74938);function s(e,t,n){const[s,a]=(0,i.useState)(),o=Object.entries(e).sort(((e,t)=>t[1]-e[1]));return{ref:(0,r.w)({refOrElement:n,observeOnly:t,onResize:({[t]:e})=>{if(void 0===e)return;const n=o.find((([,t])=>e>=t)),i=n&&n[0];i&&i!==s&&a(i)}}),breakpoint:s}}function a(e,t){return s(e,"width",t)}function o(e,t){return s(e,"height",t)}},3273:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(79474);function r(e){const t=(0,i.useRef)(e);return(0,i.useLayoutEffect)((()=>{t.current=e})),(0,i.useCallback)(((...e)=>t.current(...e)),[])}},24289:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var i=n(79474);function r(e){const t=(0,i.useRef)(null);return(0,i.useEffect)((()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)})),t}},47929:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(79474),r=n(42360);function s(e,{executeOnceOnStart:t=!1,disabled:n=!1}={}){const{scrollNodeRef:s}=(0,i.useContext)(r.bi);(0,i.useEffect)((()=>{const i=s.current;if(!n&&i)return i.addEventListener("scroll",e),t&&i.dispatchEvent(new Event("scroll")),()=>i.removeEventListener("scroll",e)}),[s,e,t,n])}},48145:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var i=n(79474),r=n(85558);const s=e=>{const t=(0,i.useMemo)((()=>(0,r.c)()?null:window.matchMedia(e)),[e]),[n,s]=(0,i.useState)((()=>!t||t.matches));return(0,i.useEffect)((()=>{if(!t||!t.addEventListener)return()=>{};const e=e=>{s(e.matches)};return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}),[t]),n}},99025:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var i=n(48145);const r=()=>(0,i.U)("(prefers-reduced-motion: reduce)")},38377:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(79474);function r(e){const t=(0,i.useRef)();return(0,i.useEffect)((()=>{t.current=e}),[e]),t.current}},82729:(e,t,n)=>{"use strict";n.d(t,{s:()=>o});var i=n(79474),r=n(98678),s=n(39927);const a={throttleTime:100,leading:!0};function o(e,t=a){const n=(0,s.ox)(),{throttleTime:o,...l}=t,c=(0,r.YQ)(e,o,l);(0,i.useEffect)((()=>(n?.addEventListener("resize",c),()=>{n?.removeEventListener("resize",c),c.cancel()})),[c,n])}},74938:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(79474),r=n(85558);function s(e){return!(0,r.c)()&&e instanceof HTMLElement}let a;const o={subscribersByElement:new WeakMap,get resizeObserver(){return a||(a=new ResizeObserver((e=>{Array.isArray(e)&&e.forEach((t=>{const n={width:Math.round(t.contentRect.width),height:Math.round(t.contentRect.height)};(o.subscribersByElement.get(t.target)??new Set).forEach((i=>{i(n,t,e)}))}))}))),a}};function l({onResize:e,refOrElement:t,observeOnly:n,observeOnMount:r=!1}){const a=(0,i.useRef)(e);a.current=e;const l=(0,i.useRef)(n);l.current=n;const c=(0,i.useRef)({width:-1,height:-1}),u=(0,i.useCallback)(((e,t,n)=>{if(!a.current)return;const i=c.current.width!==e.width,r=c.current.height!==e.height;("width"===l.current&&i||"height"===l.current&&r||!l.current&&(i||r))&&a.current(e,t,n),c.current.width=e.width,c.current.height=e.height}),[]),d=function({refOrElement:e,subscriber:t}){let n=null;const r=(0,i.useRef)(null),a=(0,i.useRef)(null),o=(0,i.useRef)(null),l=(0,i.useRef)(),c=(0,i.useRef)(t);c.current=t;const u=(0,i.useCallback)((()=>{let t=null;a.current?t=a.current:r.current?t=r.current:s(e)&&(t=e),o.current!==t&&(l.current&&(l.current(),l.current=null),o.current=t,t&&c.current&&(l.current=c.current(t)))}),[e]),d=(0,i.useCallback)((e=>{a.current=e,u()}),[u]);return e&&!s(e)&&(n=e),(0,i.useLayoutEffect)((()=>{n&&(r.current=n.current),u()}),[n,n?.current,u]),(0,i.useEffect)((()=>()=>{l?.current?.()}),[]),d}({refOrElement:t,subscriber:e=>(r&&u({width:e.offsetWidth,height:e.offsetHeight},null,[]),o.subscribersByElement.has(e)||(o.resizeObserver.observe(e),o.subscribersByElement.set(e,new Set)),o.subscribersByElement.get(e)?.add(u),()=>{o.subscribersByElement.get(e)?.delete(u),0===o.subscribersByElement.get(e)?.size&&(o.resizeObserver.unobserve(e),o.subscribersByElement.delete(e))})});return d}},34310:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});var i=n(79474);function r(){const e=(0,i.useRef)(!1);return(0,i.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),(0,i.useCallback)((()=>e.current),[])}},94300:(e,t,n)=>{"use strict";n.d(t,{Jy:()=>u,Lu:()=>c,OV:()=>d,UD:()=>l,ig:()=>m});var i=n(75978),r=n(59916),s=n(13259),a=n(75958);const o=["open.spotifycdn.com","xpui.app.spotify.com"],l=e=>{(0,i.Cp)(e),console.error(e)},c=e=>{(0,i.v4)((t=>{t.setTag("FatalError","true"),l(e)}))},u=(e,t)=>{(0,i.v4)((n=>{n.setTag("ErrorBoundary",t),c(e)}))},d=e=>{(0,i.v4)((t=>{t.setTag("TopLevelError","true"),c(e)}))},m=(e,t,n={},l={},c,u=[])=>{try{(0,r.Ts)({dsn:e,allowUrls:o,sampleRate:.1,tracesSampleRate:0,environment:"production",release:t,...n,integrations:[new s.T,...u],ignoreErrors:[/\/[\dA-F]{8}-[\dA-F]{4}-[\dA-F]{4}-[\dA-F]{4}-[\dA-F]{12}\/main\.js/,/^NotFoundError: Failed to execute '(removeChild|insertBefore)' on 'Node': The node.*child.*this node.$/,/ResizeObserver loop limit exceeded/,"PresentationRequest",/DA97E0680A7030159BC0C0EE3A1D098E947A08E3/]}),(0,i.PN)((e=>{const t=(0,a.C)("config").correlationId;t&&e.setUser({id:t}),Object.keys(l).forEach((t=>{e.setExtra(t,l[t])})),""!==document.referrer&&e.setExtra("referrer",document.referrer),c&&e.setTag("container",c)}))}catch(e){console.error(e)}}},7452:(e,t,n)=>{"use strict";n.d(t,{f:()=>o,h:()=>a});var i=n(62180),r=n(24577),s=n(85558);const a=(e=[],{desiredSize:t=300,desiredLabel:n=""}={})=>{0===t&&(t=300);const i=!(0,s.c)()&&(window?.devicePixelRatio>1||window?.matchMedia&&window?.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),(-moz-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)").matches)?2:1;return(0,r.g)(e,{desiredSize:t*i,desiredLabel:n})?.url},o=e=>{if(-1===e||Number.isNaN(e))return"-:--";const{hours:t,minutes:n,seconds:r}=(0,i.S)(e);return`${t>0?`${t}:`:""}${t>0&&n<10?`0${n}`:n}:${r<10?`0${r}`:r}`}},67910:(e,t,n)=>{"use strict";n.d(t,{XT:()=>a});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);class i extends Map{}class r{_batch=new i;_additions=new i;_deletions=new i;_timeoutId=null;constructor(e,t,n,i,r=0){this._onBatch=e,this._onAdd=t,this._onRemove=n,this._onUpdate=i,this._timeout=r}onUpdate(){this._timeoutId=null,this._onUpdate(this._batch,this._additions,this._deletions),this._onBatch(this._batch)}scheduleUpdate(){null===this._timeoutId&&(this._timeoutId=setTimeout(this.onUpdate.bind(this),this._timeout))}getBatch(){return this._batch}subscribe(e,t){this._onAdd(this._additions,e,t),this._onRemove(this._deletions,e,t),this.scheduleUpdate()}unsubscribe(e,t){this._onAdd(this._deletions,e,t),this._onRemove(this._additions,e,t),this.scheduleUpdate()}}class s extends r{}function a(e,t=0){return new s(e,((e,t)=>{const n=e.get(t);void 0!==n?e.set(t,n+1):e.set(t,1)}),((e,t)=>{const n=e.get(t);void 0!==n&&(n-1==0?e.delete(t):e.set(t,n-1))}),((e,t,n)=>{n.forEach(((t,n)=>{const i=e.get(n)||0;i-t<=0?e.delete(n):e.set(n,i-t)})),n.clear(),t.forEach(((t,n)=>{const i=e.get(n)||0;e.set(n,i+t)})),t.clear()}),t)}},58055:(e,t,n)=>{"use strict";async function i(e,t,n=50){const i=[];for(let r=0;r<e.length;r+=n)i.push(t(e.slice(r,r+n)));return Promise.all(i)}n.d(t,{F:()=>i})},68877:(e,t,n)=>{"use strict";n.d(t,{gf:()=>o,QH:()=>l,Nu:()=>c});var i=n(21361),r=n(88724);const s=async(e,t,n)=>(n??="com.widevine.alpha",(await e.build().withMethod("GET").withHost(r.FN).withPath(`/unauth/episode/${t}/${n}`).withEndpointIdentifier("/unauth/episode/{episodeId}/{keysystem}").send()).body);var a=n(83856);function o(e){return 0===e.showTypes?.length}function l(e,t){return e.uri===t.trailer?.uri}async function c(e,t,n){const r=(0,a.o_)(e.uri),o=await s(i.n.getInstance(),r?.id,t);if("video"===n)return{format:"MANIFEST_ID",mediaType:n,noManifest:!1,fileId:o.video?.[0].manifestId};const l="ALLOWED"===o.passthrough?o.passthroughUrl?.split(".").pop()?.split("?")[0]?.toUpperCase():o.format?.replace(/_(128|256)/,""),c="NONE"!==o.passthrough;return{format:l,mediaType:n??"audio",noManifest:c,url:c?o.passthroughUrl:o.url[0],fileId:c?"":o.fileId}}},21361:(e,t,n)=>{"use strict";n.d(t,{n:()=>E});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(10454),r=n(80559),s=n(68013),a=n(56794);function o(e){return`${e.method}::${e.host}${e.path}::${JSON.stringify(e.queryParameters)}`}function l(e,t,n){try{(0,r.fE)({metric_type:i.MetricTypes.COUNTER,what:"request-rate",value:1,tags:{endpoint:e,statusCode:t,isFatal:n}}).catch((()=>({})))}catch(e){}}class c extends a.t{constructor(e){super(e),this.pendingRequests=new Set}resetPendingRequests(){this.pendingRequests=new Set}build(){const e=super.build();let t;return e.onBeforeSend=()=>{if(t=o(e),this.pendingRequests.has(t)){const e=new Error(`DUPLICATE_REQUEST_ERROR: Already sent this request (${t})`);throw e.name="DUPLICATE_REQUEST_ERROR",e}"GET"===e.method.toUpperCase()&&this.pendingRequests.add(t)},e.onAfterSend=n=>{t=o(e);let a="unknown",c=!1;if(null!==e.endpointIdentifier&&(c=!0,a=`${e.method} ${e.hostIdentifier||"unknown-host"}::${e.endpointIdentifier}`),this.pendingRequests.delete(t),n)throw c&&l(a,JSON.stringify(n.status||0),JSON.stringify(0===(e.endpointIdentifier||"").indexOf("/me"))),s.O.fromResponse(n,e.method);if(c){l(a,"200","false");const t=Date.now()-(e.startTimestamp||0);!function(e,t,n){try{(0,r.fE)({metric_type:i.MetricTypes.TIMER,what:"request-duration",value:n,tags:{endpoint:e,statusCode:t}}).catch((()=>({})))}catch(e){}}(a,"200",i.Time.fromMillis(t).asNanos())}},e}}var u=n(45616),d=n(56324),m=n(72817),p=n.n(m),h=n(59208),g=n.n(h);const f=p()(d.fetch);async function b(e,t,n=1e4){const i=new(g()),r=i.signal,a=setTimeout((()=>i.abort()),n),o=function(e){return e&&void 0!==e.retries&&e.retries>0?f:d.fetch}(t);return o(e,{...t,signal:r}).then((e=>(clearTimeout(a),e))).catch((i=>{if("AbortError"===i.name)throw new s.J({timeout:n,url:e,method:t?.method??"get"});throw clearTimeout(a),i}))}class v{constructor(e,t){return this.method=e,this.url=t,this.postData=null,this.queryParameters=void 0,this.responseType="json",this._headers={},this._includeCredentials=!1,this._endpointIdentifier=null,this._abortSignal=null,this}withQueryParameters(e){this.queryParameters=e}withResponseType(e){this.responseType=e}withPostData(e){this.postData=e}withEndpointIdentifier(e){this._endpointIdentifier=e}addHeader(e,t){return this._headers[e]=t,this}includeCredentials(){return this._includeCredentials=!0,this}withAbortSignal(e){return this._abortSignal=e,this}async send(){let e;this.postData&&(e=this._headers["Content-Type"]?.startsWith("application/json;charset=UTF-8")?JSON.stringify(this.postData):this.postData);const t=new URLSearchParams(this.queryParameters).toString(),n=i.Timer.start(),a=await b(`${this.url}${t?`?${t}`:""}`,{method:this.method,body:e,credentials:this._includeCredentials?"include":void 0,signal:this._abortSignal,headers:{"User-Agent":{}.SERVER_UA,"Content-Type":y(this.responseType),...this._headers}},1e4);if((0,r.fE)({metric_type:i.MetricTypes.TIMER,what:"isomorphic-request-time",value:n.end().nanoseconds,tags:this._endpointIdentifier?{endpoint:this._endpointIdentifier}:{}}),!a.ok)throw s.O.fromResponse(a,this.method||"GET");return{body:"text"===this.responseType?await a.text():await a.json(),status:a.status}}}function y(e){return"text"===e?"text/plain":"application/json"}let _=null;class E{static setSession(e){if(!e)return;const{accessToken:t}=e,n=this.getInstance();n.accessToken=t,t||n.resetPendingRequests()}static setLocale(e){this.getInstance().locale=e}static setGlobalRequestHeaders(e){this.getInstance().globalRequestHeaders=e}static setMarket(e){this.getInstance().market=e}static resetInstance(){_=null}static getInstance(e={}){return _||(_=this.createNew(e)),_}static createNew(e){const{Constructor:t=c,fromServer:n=!1}=e;return new t(n?v:u.H)}}},88724:(e,t,n)=>{"use strict";n.d(t,{CC:()=>q,D8:()=>M,Dk:()=>C,EN:()=>O,FN:()=>R,Go:()=>c,Hj:()=>w,I9:()=>V,I_:()=>r,J8:()=>v,K:()=>d,L1:()=>k,LG:()=>B,LW:()=>x,MR:()=>h,MW:()=>z,Og:()=>E,Q6:()=>S,QU:()=>u,RQ:()=>D,SX:()=>Y,Ty:()=>T,XE:()=>I,ZJ:()=>j,Zc:()=>o,_1:()=>P,ao:()=>H,d:()=>y,dv:()=>W,eX:()=>g,i6:()=>A,ip:()=>p,mm:()=>N,mz:()=>f,o1:()=>G,oD:()=>b,p1:()=>F,qE:()=>m,sG:()=>K,t2:()=>L,tc:()=>_,us:()=>U});const{WEB_API_URL:i,SPCLIENT_WG_URL:r,PARTNER_API_ENDPOINT:s,ACCOUNTS_HOST:a,EXP_WG_ENDPOINT:o,INT_WG_ENDPOINT:l}={WEB_API_URL:"https://api.spotify.com",SPCLIENT_WG_URL:"https://spclient.wg.spotify.com",EXP_WG_ENDPOINT:"https://exp.wg.spotify.com",ACCOUNTS_HOST:"https://accounts.spotify.com",PARTNER_API_ENDPOINT:"https://api-partner.spotify.com",INT_WG_ENDPOINT:"https://wgint.spotify.net"},c="",u=`${i}/v1`,d=`${r}/melody/v1`,m=`${r}/recently-played/v3`,p=`${r}/sponsoredplaylist/v1`,h=`${r}/sponsoredplaylist/v1/sponsored`,g=`${r}/playlist/v2`,f=`${r}/inspiredby-mix/v2`,b=`${r}/ads`,v=`${s}/pathfinder/v1`,y=`${r}/age-verification/v1`,_=`${r}/concerts`,E=`${r}/collection`,x=`${r}/presence-view`,C=`${r}/presence2`,S=`${r}/find-friends`,A=`${r}/track-credits-view`,w=`${r}/color-lyrics/v2`,I=`${r}/metadata/4`,T=`${r}/user-profile-view/v3`,N=`${r}/campaigns-service/v1`,R=`${r}/soundfinder/v1`,k=`${r}/`,O=`${r}/socialgraph/v2`,P=`${r}/ondemand-selector/v2`,j=`${r}/playlist-permission/v1`,L=`${r}/blend-invitation`,D=`${r}/spotify.audiobookcashier.v1.AudiobookCashier`,U=`${r}/profile-privacy`,M=`${r}/user-verification-service/v0`,B=`${r}/cultural-moment/v1`,F=`${r}/algotorial-sharing-service/v1`,H=`${r}/transcript-read-along/v2`,V=`${r}/podcast-ap4p`,z=`${r}/ad-dsa-metadata-lookup`,G=`${r}/content-filter/v1`,W=`${r}/gander/v1`,K=`${r}/playlistextender`,Y=`${r}/assisted-curation/v1/recommendations/curation/uri`,q=`${r}/ratings/v1`},7564:(e,t,n)=>{"use strict";n.d(t,{GG:()=>o,KY:()=>a,Np:()=>l,Yf:()=>s,xA:()=>r});var i=n(88724);const r=e=>e.build().withHost(i.LW).withMethod("GET").withoutMarket().withPath("/v1/buddylist").withJsonContentType().withEndpointIdentifier("/v1/buddylist").send(),s=(e,t)=>e.build().withHost(i.LW).withMethod("GET").withoutMarket().withPath(`/v1/user/${encodeURIComponent(t)}`).withJsonContentType().withEndpointIdentifier("/v1/user").send(),a=e=>e.build().withHost(i.Q6).withMethod("POST").withoutMarket().withPath("/v1/friends").withJsonContentType().withEndpointIdentifier("/v1/friends").send(),o=(e,t,n)=>e.build().withHost(i.Dk).withMethod("POST").withoutMarket().withJsonContentType().withPath(`/sub/user/${encodeURIComponent(t)}/connection_id/${n}`).withEndpointIdentifier("POST:/sub/user/:username/connection_id/:connection_id").send(),l=(e,t,n)=>e.build().withHost(i.Dk).withMethod("DELETE").withoutMarket().withPath(`/sub/user/${encodeURIComponent(t)}/connection_id/${n}`).withEndpointIdentifier("DELETE:/sub/user/:username/connection_id/:connection_id").send()},39944:(e,t,n)=>{"use strict";n.d(t,{DX:()=>m,Jr:()=>a,KM:()=>l,Ki:()=>c,ZV:()=>d,aw:()=>o,kr:()=>u,m9:()=>s,oF:()=>p});var i=n(88724),r=n(14056);const s=(e,t)=>e.build().withMethod("POST").withHost(i.tc).withPath(`/v2/concerts/saved/${t}`).withEndpointIdentifier("/concerts/saved/{concertId}").withoutMarket().send(),a=(e,t)=>e.build().withMethod("DELETE").withHost(i.tc).withPath(`/v2/concerts/saved/${t}`).withEndpointIdentifier("/concerts/saved/{concertId}").withoutMarket().send(),o=(e,t,n)=>e.build().withMethod("POST").withHost(i.Og).withPath("/v2/contains").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withBody(JSON.stringify({username:t,set:"concerts",items:[{uri:n}]})).send();function l(e,t,n){return e.build().withHost(i.tc).withPath(`/v2/concerts/artist/${n}`).withQueryParameters({locale:r.Ru.getLocaleForTranslation(),filterByLoc:!1,decorate:!0,...t&&{geohash:t}}).withEndpointIdentifier("concerts/artist/${artistId}").send()}function c(e,t,n){return e.build().withHost(i.tc).withPath("/v3/concerts/view").withQueryParameters({locale:r.Ru.getLocaleForTranslation(),source:["user","popular","online"],playlists:!1,...t&&{geonameId:t},...n&&{skipLocationUpdate:n}}).withEndpointIdentifier("/concerts/view").send()}function u(e,t){return e.build().withHost(i.tc).withPath("/v1/location/suggest").withQueryParameters({q:t}).withEndpointIdentifier("/concerts/location/suggest").send()}function d(e,t,n,r){const s={};return t&&(s.ip=t),n&&(s.geonameId=n),r&&(s.skipLocationUpdate=r),e.build().withHost(i.tc).withPath("/v3/concerts/open").withQueryParameters(s).withEndpointIdentifier("/v3/concerts/open").send()}function m(e,t){const n={};return t.page&&(n.page=t.page),t.geonameId&&(n.geonameId=t.geonameId),t.startDate&&(n.startDate=t.startDate),t.endDate&&(n.endDate=t.endDate),t.skipLocationUpdate&&(n.skipLocationUpdate=t.skipLocationUpdate),e.build().withHost(i.tc).withPath("/v3/concerts").withQueryParameters(n).withEndpointIdentifier("/v3/concerts").send()}function p(e){return e.build().withHost(i.tc).withPath("/v3/concerts/saved").withEndpointIdentifier("/v3/concerts/saved").send()}},93656:(e,t,n)=>{"use strict";n.d(t,{F:()=>s,i:()=>r});var i=n(88724);const r=(e,t,n)=>{const r=t.replace("<reason>","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("<track-uri>",n);return e.build().withMethod("POST").withHost(i.L1).withPath(r).withEndpointIdentifier("/<feature>/feedback/").send()},s=(e,t,n)=>{const r=t.replace("<reason>","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("<track-uri>",n);return e.build().withMethod("DELETE").withHost(i.L1).withPath(r).withEndpointIdentifier("/<feature>/feedback/").send()}},14640:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createCheckoutSession:()=>a,getEpisode:()=>s,getShow:()=>r});var i=n(88724);function r(e,t,n){return e.build().withHost(i.QU).withPath(`/shows/${t}`).withQueryParameters({market:n}).withEndpointIdentifier("shows/{showId}").send()}function s(e,t,n){return e.build().withHost(i.QU).withPath(`/episodes/${t}`).withQueryParameters({market:n}).withEndpointIdentifier("episodes/{episodeId}").send()}function a(e,t){const n="undefined"!=typeof window&&window.navigator&&window.navigator.platform||"";let r=null;return-1!==n.indexOf("Mac")?r="OSX":-1!==n.indexOf("Win")?r="Win32":-1!==n.indexOf("Linux")&&(r="Linux"),e.build().withMethod("POST").withHost(i.RQ).withPath("/CheckoutBook").withoutMarket().withBody(JSON.stringify(t)).withEndpointIdentifier("show/{showId}").withHeaders([{key:"App-Platform",value:r??"Browser"}]).send()}},70682:(e,t,n)=>{"use strict";n.d(t,{rn:()=>A,SR:()=>_,mH:()=>y,zP:()=>S,Eo:()=>x,df:()=>v,E$:()=>E,sL:()=>C,kp:()=>I,gN:()=>T,kV:()=>w});var i=n(90700),r=n(88724);const s={fromJSON:e=>({uri:p(e.uri)?String(e.uri):"",name:p(e.name)?String(e.name):"",image_url:p(e.image_url)?String(e.image_url):"",followers_count:p(e.followers_count)?Number(e.followers_count):0,following_count:p(e.following_count)?Number(e.following_count):0,is_following:!!p(e.is_following)&&Boolean(e.is_following),recently_played_artists:Array.isArray(e?.recently_played_artists)?e.recently_played_artists.map((e=>l.fromJSON(e))):[],public_playlists:Array.isArray(e?.public_playlists)?e.public_playlists.map((e=>u.fromJSON(e))):[],total_public_playlists_count:p(e.total_public_playlists_count)?Number(e.total_public_playlists_count):0,is_current_user:!!p(e.is_current_user)&&Boolean(e.is_current_user),is_verified:!!p(e.is_verified)&&Boolean(e.is_verified),edit_profile_disabled:!!p(e.edit_profile_disabled)&&Boolean(e.edit_profile_disabled),report_abuse_disabled:!!p(e.report_abuse_disabled)&&Boolean(e.report_abuse_disabled),has_spotify_name:!!p(e.has_spotify_name)&&Boolean(e.has_spotify_name),has_spotify_image:!!p(e.has_spotify_image)&&Boolean(e.has_spotify_image),color:p(e.color)?Number(e.color):0,is_dismissed:!!p(e.is_dismissed)&&Boolean(e.is_dismissed),allow_follows:!!p(e.allow_follows)&&Boolean(e.allow_follows),show_follows:!!p(e.show_follows)&&Boolean(e.show_follows),pronouns:p(e.pronouns)?String(e.pronouns):"",location:p(e.location)?String(e.location):"",bio:p(e.bio)?String(e.bio):"",blends:Array.isArray(e?.blends)?e.blends.map((e=>u.fromJSON(e))):[],top_artists:p(e.top_artists)?a.fromJSON(e.top_artists):void 0,edit_name_disabled:!!p(e.edit_name_disabled)&&Boolean(e.edit_name_disabled),edit_image_disabled:!!p(e.edit_image_disabled)&&Boolean(e.edit_image_disabled),edit_bio_disabled:!!p(e.edit_bio_disabled)&&Boolean(e.edit_bio_disabled)}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.name&&(t.name=e.name),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.followers_count&&(t.followers_count=Math.round(e.followers_count)),void 0!==e.following_count&&(t.following_count=Math.round(e.following_count)),void 0!==e.is_following&&(t.is_following=e.is_following),e.recently_played_artists?t.recently_played_artists=e.recently_played_artists.map((e=>e?l.toJSON(e):void 0)):t.recently_played_artists=[],e.public_playlists?t.public_playlists=e.public_playlists.map((e=>e?u.toJSON(e):void 0)):t.public_playlists=[],void 0!==e.total_public_playlists_count&&(t.total_public_playlists_count=Math.round(e.total_public_playlists_count)),void 0!==e.is_current_user&&(t.is_current_user=e.is_current_user),void 0!==e.is_verified&&(t.is_verified=e.is_verified),void 0!==e.edit_profile_disabled&&(t.edit_profile_disabled=e.edit_profile_disabled),void 0!==e.report_abuse_disabled&&(t.report_abuse_disabled=e.report_abuse_disabled),void 0!==e.has_spotify_name&&(t.has_spotify_name=e.has_spotify_name),void 0!==e.has_spotify_image&&(t.has_spotify_image=e.has_spotify_image),void 0!==e.color&&(t.color=Math.round(e.color)),void 0!==e.is_dismissed&&(t.is_dismissed=e.is_dismissed),void 0!==e.allow_follows&&(t.allow_follows=e.allow_follows),void 0!==e.show_follows&&(t.show_follows=e.show_follows),void 0!==e.pronouns&&(t.pronouns=e.pronouns),void 0!==e.location&&(t.location=e.location),void 0!==e.bio&&(t.bio=e.bio),e.blends?t.blends=e.blends.map((e=>e?u.toJSON(e):void 0)):t.blends=[],void 0!==e.top_artists&&(t.top_artists=e.top_artists?a.toJSON(e.top_artists):void 0),void 0!==e.edit_name_disabled&&(t.edit_name_disabled=e.edit_name_disabled),void 0!==e.edit_image_disabled&&(t.edit_image_disabled=e.edit_image_disabled),void 0!==e.edit_bio_disabled&&(t.edit_bio_disabled=e.edit_bio_disabled),t},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={uri:"",name:"",image_url:"",followers_count:0,following_count:0,is_following:!1,recently_played_artists:[],public_playlists:[],total_public_playlists_count:0,is_current_user:!1,is_verified:!1,edit_profile_disabled:!1,report_abuse_disabled:!1,has_spotify_name:!1,has_spotify_image:!1,color:0,is_dismissed:!1,allow_follows:!1,show_follows:!1,pronouns:"",location:"",bio:"",blends:[],top_artists:void 0,edit_name_disabled:!1,edit_image_disabled:!1,edit_bio_disabled:!1};return t.uri=e.uri??"",t.name=e.name??"",t.image_url=e.image_url??"",t.followers_count=e.followers_count??0,t.following_count=e.following_count??0,t.is_following=e.is_following??!1,t.recently_played_artists=e.recently_played_artists?.map((e=>l.fromPartial(e)))||[],t.public_playlists=e.public_playlists?.map((e=>u.fromPartial(e)))||[],t.total_public_playlists_count=e.total_public_playlists_count??0,t.is_current_user=e.is_current_user??!1,t.is_verified=e.is_verified??!1,t.edit_profile_disabled=e.edit_profile_disabled??!1,t.report_abuse_disabled=e.report_abuse_disabled??!1,t.has_spotify_name=e.has_spotify_name??!1,t.has_spotify_image=e.has_spotify_image??!1,t.color=e.color??0,t.is_dismissed=e.is_dismissed??!1,t.allow_follows=e.allow_follows??!1,t.show_follows=e.show_follows??!1,t.pronouns=e.pronouns??"",t.location=e.location??"",t.bio=e.bio??"",t.blends=e.blends?.map((e=>u.fromPartial(e)))||[],t.top_artists=void 0!==e.top_artists&&null!==e.top_artists?a.fromPartial(e.top_artists):void 0,t.edit_name_disabled=e.edit_name_disabled??!1,t.edit_image_disabled=e.edit_image_disabled??!1,t.edit_bio_disabled=e.edit_bio_disabled??!1,t}};const a={fromJSON:e=>({title:p(e.title)?String(e.title):"",subtitle:p(e.subtitle)?String(e.subtitle):"",image_url:p(e.image_url)?String(e.image_url):"",top_artists_page_uri:p(e.top_artists_page_uri)?String(e.top_artists_page_uri):""}),toJSON(e){const t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.subtitle&&(t.subtitle=e.subtitle),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.top_artists_page_uri&&(t.top_artists_page_uri=e.top_artists_page_uri),t},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={title:"",subtitle:"",image_url:"",top_artists_page_uri:""};return t.title=e.title??"",t.subtitle=e.subtitle??"",t.image_url=e.image_url??"",t.top_artists_page_uri=e.top_artists_page_uri??"",t}};const o={fromJSON:e=>({artists:Array.isArray(e?.artists)?e.artists.map((e=>l.fromJSON(e))):[]}),toJSON(e){const t={};return e.artists?t.artists=e.artists.map((e=>e?l.toJSON(e):void 0)):t.artists=[],t},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={artists:[]};return t.artists=e.artists?.map((e=>l.fromPartial(e)))||[],t}};const l={fromJSON:e=>({uri:p(e.uri)?String(e.uri):"",name:p(e.name)?String(e.name):"",image_url:p(e.image_url)?String(e.image_url):"",followers_count:p(e.followers_count)?Number(e.followers_count):0,is_following:!!p(e.is_following)&&Boolean(e.is_following)}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.name&&(t.name=e.name),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.followers_count&&(t.followers_count=Math.round(e.followers_count)),void 0!==e.is_following&&(t.is_following=e.is_following),t},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={uri:"",name:"",image_url:"",followers_count:0,is_following:!1};return t.uri=e.uri??"",t.name=e.name??"",t.image_url=e.image_url??"",t.followers_count=e.followers_count??0,t.is_following=e.is_following??!1,t}};const c={fromJSON:e=>({public_playlists:Array.isArray(e?.public_playlists)?e.public_playlists.map((e=>u.fromJSON(e))):[],total_public_playlists_count:p(e.total_public_playlists_count)?Number(e.total_public_playlists_count):0}),toJSON(e){const t={};return e.public_playlists?t.public_playlists=e.public_playlists.map((e=>e?u.toJSON(e):void 0)):t.public_playlists=[],void 0!==e.total_public_playlists_count&&(t.total_public_playlists_count=Math.round(e.total_public_playlists_count)),t},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={public_playlists:[],total_public_playlists_count:0};return t.public_playlists=e.public_playlists?.map((e=>u.fromPartial(e)))||[],t.total_public_playlists_count=e.total_public_playlists_count??0,t}};const u={fromJSON:e=>({uri:p(e.uri)?String(e.uri):"",name:p(e.name)?String(e.name):"",image_url:p(e.image_url)?String(e.image_url):"",followers_count:p(e.followers_count)?Number(e.followers_count):0,owner_name:p(e.owner_name)?String(e.owner_name):"",owner_uri:p(e.owner_uri)?String(e.owner_uri):"",is_following:!!p(e.is_following)&&Boolean(e.is_following)}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.name&&(t.name=e.name),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.followers_count&&(t.followers_count=Math.round(e.followers_count)),void 0!==e.owner_name&&(t.owner_name=e.owner_name),void 0!==e.owner_uri&&(t.owner_uri=e.owner_uri),void 0!==e.is_following&&(t.is_following=e.is_following),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={uri:"",name:"",image_url:"",followers_count:0,owner_name:"",owner_uri:"",is_following:!1};return t.uri=e.uri??"",t.name=e.name??"",t.image_url=e.image_url??"",t.followers_count=e.followers_count??0,t.owner_name=e.owner_name??"",t.owner_uri=e.owner_uri??"",t.is_following=e.is_following??!1,t}};const d={fromJSON:e=>({profiles:Array.isArray(e?.profiles)?e.profiles.map((e=>m.fromJSON(e))):[]}),toJSON(e){const t={};return e.profiles?t.profiles=e.profiles.map((e=>e?m.toJSON(e):void 0)):t.profiles=[],t},create:e=>d.fromPartial(e??{}),fromPartial(e){const t={profiles:[]};return t.profiles=e.profiles?.map((e=>m.fromPartial(e)))||[],t}};const m={fromJSON:e=>({uri:p(e.uri)?String(e.uri):"",name:p(e.name)?String(e.name):"",image_url:p(e.image_url)?String(e.image_url):"",followers_count:p(e.followers_count)?Number(e.followers_count):0,following_count:p(e.following_count)?Number(e.following_count):0,is_followed:!!p(e.is_followed)&&Boolean(e.is_followed),is_following:!!p(e.is_following)&&Boolean(e.is_following),is_dismissed:!!p(e.is_dismissed)&&Boolean(e.is_dismissed),is_verified:!!p(e.is_verified)&&Boolean(e.is_verified),color:p(e.color)?Number(e.color):0,allow_follows:!!p(e.allow_follows)&&Boolean(e.allow_follows)}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.name&&(t.name=e.name),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.followers_count&&(t.followers_count=Math.round(e.followers_count)),void 0!==e.following_count&&(t.following_count=Math.round(e.following_count)),void 0!==e.is_followed&&(t.is_followed=e.is_followed),void 0!==e.is_following&&(t.is_following=e.is_following),void 0!==e.is_dismissed&&(t.is_dismissed=e.is_dismissed),void 0!==e.is_verified&&(t.is_verified=e.is_verified),void 0!==e.color&&(t.color=Math.round(e.color)),void 0!==e.allow_follows&&(t.allow_follows=e.allow_follows),t},create:e=>m.fromPartial(e??{}),fromPartial(e){const t={uri:"",name:"",image_url:"",followers_count:0,following_count:0,is_followed:!1,is_following:!1,is_dismissed:!1,is_verified:!1,color:0,allow_follows:!1};return t.uri=e.uri??"",t.name=e.name??"",t.image_url=e.image_url??"",t.followers_count=e.followers_count??0,t.following_count=e.following_count??0,t.is_followed=e.is_followed??!1,t.is_following=e.is_following??!1,t.is_dismissed=e.is_dismissed??!1,t.is_verified=e.is_verified??!1,t.color=e.color??0,t.allow_follows=e.allow_follows??!1,t}};function p(e){return null!=e}var h=n(59043),g=n.n(h);const f={encode:(e,t=g().Writer.create())=>(!0===e.showFollows&&t.uint32(8).bool(e.showFollows),t),decode(e,t){const n=e instanceof g().Reader?e:new(g().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={showFollows:!1};for(;n.pos<i;){const e=n.uint32();if(e>>>3==1)r.showFollows=n.bool();else n.skipType(7&e)}return r},fromPartial(e){const t={showFollows:!1};return t.showFollows=e.showFollows??!1,t}};const b={encode:(e,t=g().Writer.create())=>(""!==e.username&&t.uint32(10).string(e.username),!0===e.showFollows&&t.uint32(16).bool(e.showFollows),t),decode(e,t){const n=e instanceof g().Reader?e:new(g().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={username:"",showFollows:!1};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.username=n.string();break;case 2:r.showFollows=n.bool();break;default:n.skipType(7&e)}}return r},fromPartial(e){const t={username:"",showFollows:!1};return t.username=e.username??"",t.showFollows=e.showFollows??!1,t}};const v=e=>e.build().withHost(r.K).withPath("/product_state").withEndpointIdentifier("/product_state").send(),y=async(e,t)=>{const n=await e.build().withMethod("GET").withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,i.v)(t))}/following`).withEndpointIdentifier("/profile/{username}/following").send();return d.fromJSON(n.body)},_=async(e,t)=>{const n=await e.build().withMethod("GET").withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,i.v)(t))}/followers`).withEndpointIdentifier("/profile/{username}/followers").send();return d.fromJSON(n.body)},E=async(e,{uri:t,playlists:n=0,artists:a=0,episodes:o=0})=>{const l=await e.build().withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,i.v)(t))}`).withEndpointIdentifier("/profile/{username}").withQueryParameters({playlist_limit:n,artist_limit:a,episode_limit:o}).send();return s.fromJSON(l.body)},x=async(e,{uri:t,offset:n=0,limit:s=200})=>{const a=await e.build().withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,i.v)(t))}/playlists`).withEndpointIdentifier("/profile/{username}/playlists").withQueryParameters({offset:n,limit:s}).send();return c.fromJSON(a.body)},C=async(e,{uri:t,limit:n=10})=>{const s=await e.build().withMethod("GET").withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,i.v)(t))}/artists`).withEndpointIdentifier("/profile/{username}/artists").withQueryParameters({limit:n}).send();return o.fromJSON(s.body)},S=(e,{currentUserUri:t,uri:n})=>e.build().withMethod("GET").withHost(r.EN).withPath("/is_dismissed").withEndpointIdentifier("/is_dismissed").withQueryParameters({source_uri:t,target_uri:n,format:"json"}).send(),A=(e,{currentUserUri:t,uri:n})=>e.build().withMethod("POST").withHost(r.EN).withPath("/dismissed").withEndpointIdentifier("/dismissed").withQueryParameters({source_uri:t,target_uri:n,format:"json"}).send(),w=(e,{currentUserUri:t,uri:n})=>e.build().withMethod("DELETE").withHost(r.EN).withPath("/dismissed").withEndpointIdentifier("/dismissed").withQueryParameters({source_uri:t,target_uri:n,format:"json"}).send(),I=async(e,{uri:t})=>e.build().withHost(r.us).withMethod("GET").withoutMarket().withResponseType("arraybuffer").withPath(`/show-follows/${encodeURIComponent((0,i.v)(t))}`).withEndpointIdentifier("/show-follows/{username}").send().then((e=>f.decode(new Uint8Array(e.body)))),T=async(e,{uri:t,showFollows:n})=>{const s=b.encode(b.fromPartial({username:(0,i.v)(t),showFollows:n}));await e.build().withHost(r.us).withMethod("POST").withoutMarket().withBody(s.finish()).withPath("/show-follows").withEndpointIdentifier("/show-follows").send()}},6490:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s,s:()=>a});var i=n(91864),r=n(88724);function s(e){return e.build().withHost(r.D8).withPath("/verifications/").withEndpointIdentifier("/verifications/").send()}function a(e,t){return e.build().withMethod(i.Method.PUT).withHost(r.D8).withPath(`/verifications/${t}/`).withEndpointIdentifier("/verifications/{verificationId}/").send()}},68013:(e,t,n)=>{"use strict";n.d(t,{J:()=>r,O:()=>i});class i extends Error{static fromResponse(e,t){return new i({message:e.statusText,url:e.url,method:t,status:e.status,response:e})}constructor(e){const{message:t,url:n,method:i,status:r,response:s}=e;super(t),this.name="HttpResponseError",this.requestUrl=n,this.requestMethod=i,this.status=r,this.response=s}}class r extends i{constructor(e){const{timeout:t,url:n,method:i}=e;super({message:`${i.toUpperCase()} ${n} timed out (${t}ms)`,url:n,method:i,status:503}),this.name="HttpRequestTimeoutError",this.timeout=t}}},96660:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var i=n(28049),r=n(86892),s=n(47131);let a=0;const o=new WeakMap,l=function(e,t,n){const l=(0,s.A9)(),c=o.has(e)?o.get(e):o.set(e,++a).get(e),u=(0,r.lB)((()=>["useEndpoint",e.name,c,t]),[e.name,c,t]),{isLoading:d,error:m,data:p}=(0,i.I)({...n,queryKey:u,queryFn:()=>e(l,...t||[])});return{data:p??null,error:m,loading:d,queryKey:u}}},56794:(e,t,n)=>{"use strict";n.d(t,{t:()=>o});var i=n(8012);let r;class s{constructor(){this._accessToken=null,this._market="",this._headers=[],this._globalRequestHeaders=[],this._shouldSendMarket=!0,this._shouldSendGlobalHeaders=!0,this._locale=null,this._shouldSendLocale=!1,this._shouldSendAuthorization=!0,this._host="",this._hostIdentifier="",this.path="",this.responseType="json",this.queryParameters=void 0,this._method="GET",this.jsonContentType=!1,this.body=null,this._endpointIdentifier=null,this._startTimestamp=null,this._includeCredentials=!1,this._abortSignal=null}static setRequestImplementation(e){r=e}getRequestImplementation(){return r}set accessToken(e){this._accessToken=e}get market(){return this._market}set market(e){this._market=e}get locale(){return this._locale}set locale(e){this._locale=e}get globalRequestHeaders(){return this._globalRequestHeaders}set globalRequestHeaders(e){this._globalRequestHeaders=e}get startTimestamp(){return this._startTimestamp}get host(){return this._host}get hostIdentifier(){return this._hostIdentifier||this._host}get method(){return this._method}get endpointIdentifier(){return this._endpointIdentifier}get abortSignal(){return this._abortSignal}withHost(e){return this._host=e,this}withHostIdentifier(e){return this._hostIdentifier=e,this}withPath(e){return this.path=e,this}withResponseType(e){return this.responseType=e,this}withEndpointIdentifier(e){return this._endpointIdentifier=e,this}withQueryParameters(e){return this.queryParameters=e,this}withBody(e){return this.body=e,this}withMethod(e){return this._method=e,this}withoutMarket(){return this._shouldSendMarket=!1,this}withoutGlobalHeaders(){return this._shouldSendGlobalHeaders=!1,this}withoutAuthorization(){return this._shouldSendAuthorization=!1,this}withLocale(e){return this._shouldSendLocale=!0,e&&(this._locale=e),this}withJsonContentType(){return this.jsonContentType=!0,this}withHeaders(e){return this._headers=e,this}withCredentials(){return this._includeCredentials=!0,this}withAbortSignal(e){return this._abortSignal=e,this}onBeforeSend(e){}onAfterSend(e){}async send(){const e=new r(this.method,`${this._host}${this.path}`,this._shouldSendAuthorization);this._shouldSendMarket&&this.market&&(this.queryParameters={...this.queryParameters,market:this.market}),this._shouldSendLocale&&this.locale&&(this.queryParameters={...this.queryParameters,locale:this.locale}),this.locale&&e.addHeader("Accept-Language",this.locale),e.withQueryParameters(this.queryParameters),e.withResponseType(this.responseType),e.withEndpointIdentifier(this._endpointIdentifier),this._abortSignal&&e.withAbortSignal(this._abortSignal),this._shouldSendAuthorization&&this._accessToken&&e.addHeader("Authorization",`Bearer ${this._accessToken}`),e.addHeader("Accept","application/json"),this._includeCredentials&&e.includeCredentials(),this._shouldSendGlobalHeaders&&this._globalRequestHeaders.length>0&&this._globalRequestHeaders.forEach((([t,n])=>{e.addHeader(t,n)}));for(let t=0;t<this._headers.length;t++){const n=this._headers[t];e.addHeader(n.key,n.value)}this.jsonContentType&&e.addHeader("Content-Type","application/json;charset=UTF-8"),this.body&&e.withPostData(this.body);try{this.onBeforeSend(e)}catch(e){return Promise.reject(e)}return this._startTimestamp=Date.now(),e.send().then((e=>(this.onAfterSend(),e))).catch((e=>{throw this.onAfterSend(e),e}))}}var a=n(45616);(0,i.u)("RequestBuilder");class o{constructor(e){this._accessToken=null,this._market="",this._locale="",this._globalRequestHeaders=[],this._RequestImplementation=e||a.H}get accessToken(){return this._accessToken}set accessToken(e){this._accessToken=e}get globalRequestHeaders(){return this._globalRequestHeaders}set globalRequestHeaders(e){this._globalRequestHeaders=e}get market(){return this._market}set market(e){this._market=e}get locale(){return this._locale}set locale(e){this._locale=e}resetPendingRequests(){}build(){s.setRequestImplementation(this._RequestImplementation);const e=new s;return e.accessToken=this._accessToken,e.market=this.market,e.locale=this.locale,e.globalRequestHeaders=this.globalRequestHeaders,e}}},45616:(e,t,n)=>{"use strict";n.d(t,{H:()=>r});var i=n(13781);class r{constructor(e,t,n){return this.method=e,this.url=t,this.postData=null,this.queryParameters=void 0,this.responseType="json",this._headers={},this._authorize=n,this._includeCredentials=!1,this._abortSignal=void 0,this}withQueryParameters(e){this.queryParameters=e}withPostData(e){this.postData=e}withResponseType(e){this.responseType=e}withEndpointIdentifier(){}addHeader(e,t){return this._headers[e]=t,this}includeCredentials(){return this._includeCredentials=!0,this}withAbortSignal(e){return this._abortSignal=e,this}async send(){const e=(0,i.V)(),t=new URLSearchParams(this.queryParameters).toString(),n=`${this.url}${t?`?${t}`:""}`,r={method:this.method,responseType:this.responseType,headers:this._headers,authorize:this._authorize,rejectNotOk:!0,signal:this._abortSignal};return this._includeCredentials&&(r.credentials="include"),this.postData&&(this._headers["Content-Type"]?.startsWith("application/json;charset=UTF-8")?r.payload=JSON.stringify(this.postData):r.payload=this.postData),e.request(n,r).then((e=>e)).catch((e=>{throw e}))}}},21386:(e,t,n)=>{"use strict";n.d(t,{y:()=>a});var i=n(83856),r=n(14255),s=n(61391);class a{currentPlayerState=null;requestInFlight=!1;constructor(e,t,n){this._playerApi=e,this._showApi=t,this._pubSubApi=n;const a=this._playerApi.getEvents(),o=this._showApi.getEvents();a.addListener(r.gd.UPDATE,(({data:e})=>{this.currentPlayerState=e})),a.addListener(r.gd.ERROR,(async()=>{if(this.requestInFlight)return;const e=this.currentPlayerState?.context.uri;if(!e)return;if(!(0,i.WB)(e))return;this.requestInFlight=!0;const t=await this._showApi.getAccessInfo(e).catch((e=>{throw e})).finally((()=>{this.requestInFlight=!1})),n=t?.consumptionCapped;n&&o.emitSync(s.K.UPDATE_ACCESS_INFO,{consumptionCapExplanation:n})})),this._pubSubApi.subscribe({ident:"hm://show-access/user-capped",onMessage:()=>o.emitSync(s.K.UPDATE_ACCESS_INFO,{})}),this._pubSubApi.subscribe({ident:"hm://show-access/user-quota-changed",onMessage:()=>o.emitSync(s.K.UPDATE_ACCESS_INFO,{})})}}},63399:(e,t,n)=>{"use strict";n.d(t,{V:()=>a});var i=n(79474),r=n(63843),s=n(61391);function a({callback:e,uri:t}){const n=(0,i.useContext)(r.J);(0,i.useEffect)((()=>{const i=n.getEvents(),r=n=>{n.data.uri!==t&&void 0!==n.data.uri||e(n)};return i.addListener(s.K.UPDATE_ACCESS_INFO,r),()=>{i.removeListener(s.K.UPDATE_ACCESS_INFO,r)}}),[n,t,e])}},68970:(e,t,n)=>{"use strict";n.d(t,{FI:()=>r,Yg:()=>s});var i=n(8012);let r=function(e){return e.UNKNOWN="unknown",e.SPEAKERS="speakers",e.HEADPHONES="headphones",e.DISPLAY_DEVICE="display_device",e}({}),s=function(e){return e.UNKNOWN="unknown",e.BUILT_IN="built_in",e.VIRTUAL="virtual",e.USB="usb",e.BLUETOOTH="bluetooth",e.DISPLAY_DEVICE="display_device",e}({});(0,i.u)("AudioOutputDevicesAPI")},86833:(e,t,n)=>{"use strict";n.d(t,{B:()=>r,e:()=>s});var i=n(37766);let r=function(e){return e.DEVICE_CONNECTED="deviceConnected",e}({});class s extends i.V{}},23241:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,c:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'AudioOutputDevicesContext' without 'AudioOutputDevicesProvided'!");return e}},77473:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(79474),r=n(23241);function s(e,t){const n=(0,i.useRef)(t),s=(0,r.V)();n.current=t,(0,i.useEffect)((()=>{const t=s.getEvents(),i=e=>n.current(e);return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[e,s])}},90532:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var i=n(79474),r=n(23241),s=n(77473),a=n(86833);const o=()=>{const e=(0,r.V)(),[t,n]=(0,i.useState)((()=>e.getDefaultDevice()));return(0,s.k)(a.B.DEVICE_CONNECTED,(()=>{n(e.getDefaultDevice())})),t}},6960:(e,t,n)=>{"use strict";n.d(t,{m:()=>r,x:()=>s});var i=n(37766);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{}},76756:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});const i={isAuthorized:!1,token:null,retryAttempt:null,retryAt:null}},36264:(e,t,n)=>{"use strict";n.d(t,{Hm:()=>i,hj:()=>r});(0,n(8012).u)("TokenProvider");function i(e){return Date.now()>=e.accessTokenExpirationTimestampMs}function r(e,t){let n=null,i=null;return async({preferCached:r=!1}={})=>{if(r&&n)return n;if(i)return i;i=e();try{n=await i,t(n)}finally{i=null}return n}}},27920:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,r:()=>s});var i=n(67899);const r=(0,n(98930).h)();async function s(){await r.post("sp://desktop/v1/logout")}async function a(e){const t=new i.EW(e);return{enableShows:await t.getValues(i.kM.fromPartial({})).then((e=>"1"===e.pairs["shows-collection"]))}}},99226:(e,t,n)=>{"use strict";n.d(t,{O:()=>s,n:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'AuthorizationContext' without 'AuthorizationProvider'!");return e}},74161:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var i=n(79474),r=n(6960),s=n(99226);function a(){const e=(0,s.O)(),[t,n]=(0,i.useState)(e.getState());return(0,i.useEffect)((()=>{const t=e.getEvents(),i=r.m.UPDATE,s=e=>{n(e.data)};return t.addListener(i,s),()=>{t.removeListener(i,s)}}),[e]),t}},918:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(79474),r=n(99226);function s(){const e=(0,r.O)(),{canGetSessionTransferURL:t}=e.getCapabilities();return{openURL:(0,i.useCallback)(((e,t="_blank")=>{window.open(e,t)}),[]),openURLWithSessionTransfer:(0,i.useCallback)((async(n,i="_blank")=>{if(t){const t=await e.getSessionTransferURL(n);window.open(t,i)}else window.open(n,i)}),[e,t]),useGetURLWithSessionTransfer:n=>{const[r,s]=(0,i.useState)(n);return(0,i.useEffect)((()=>{t&&async function(){const t=await e.getSessionTransferURL(n);s(t)}()}),[n]),r}}}},98198:(e,t,n)=>{"use strict";n.d(t,{GG:()=>s,l2:()=>r,od:()=>a});const i=864e5;class r{_cache=new Map;constructor(e=null){if(this._ttl=e,null!==e&&(e<1||e>i))throw new Error("TTL should be between 1 (1 ms) and 86400000 (1 day).")}isExpired(e){return null!==e.expiry&&e.expiry<Date.now()}getExpiry(){return null!==this._ttl?Date.now()+this._ttl:null}entries(){return this._cache.entries()}has(e){return void 0!==this.get(e)}peek(e){const t=this._cache.get(e);return t?.value}get(e){const t=this._cache.get(e);if(void 0!==t){if(!this.isExpired(t))return t.value;this._cache.delete(e)}}set(e,t){this._cache.set(e,{value:t,expiry:this.getExpiry()})}create(e,t){const n=this.get(e);if(void 0===n){const n=t();return this.set(e,n),n}return n}delete(e){this._cache.delete(e)}clear(){this._cache.clear()}cleanup(){this._cache.forEach(((e,t)=>{this.isExpired(e)&&this._cache.delete(t)}))}}class s extends r{constructor(e,t){super(e),setInterval(this.cleanup.bind(this),t)}}class a extends r{constructor(){super(null)}deleteOnSettle(e,t){return t.then((()=>this.delete(e)),(()=>this.delete(e))),t}create(e,t){const n=super.create(e,t);return this.deleteOnSettle(e,n)}set(e,t){super.set(e,this.deleteOnSettle(e,t))}}},58402:(e,t,n)=>{"use strict";n.d(t,{extractColors:()=>m});var i=n(15343);const r="https://local-image.spotify.com";let s=function(e){return e[e.ARRAY_BUFFER=0]="ARRAY_BUFFER",e[e.IMAGE_BITMAP=1]="IMAGE_BITMAP",e}({});var a=n(46050),o=n.n(a);var l=n(44666);const c=new function(){return o()('(()=>{"use strict";var t={1924:(t,r,n)=>{var e=n(9599),o=n(8069),i=TypeError;t.exports=function(t){if(e(t))return t;throw new i(o(t)+" is not a function")}},4282:(t,r,n)=>{var e=n(1948).has;t.exports=function(t){return e(t),t}},6857:(t,r,n)=>{var e=n(1492),o=String,i=TypeError;t.exports=function(t){if(e(t))return t;throw new i(o(t)+" is not an object")}},3103:(t,r,n)=>{var e=n(8491),o=n(3660),i=n(5956),s=function(t){return function(r,n,s){var a=e(r),u=i(a);if(0===u)return!t&&-1;var c,h=o(s,u);if(t&&n!=n){for(;u>h;)if((c=a[h++])!=c)return!0}else for(;u>h;h++)if((t||h in a)&&a[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},5010:(t,r,n)=>{var e=n(6054),o=e({}.toString),i=e("".slice);t.exports=function(t){return i(o(t),8,-1)}},5818:(t,r,n)=>{var e=n(1663),o=n(581),i=n(6709),s=n(3335);t.exports=function(t,r,n){for(var a=o(r),u=s.f,c=i.f,h=0;h<a.length;h++){var f=a[h];e(t,f)||n&&e(n,f)||u(t,f,c(r,f))}}},5785:(t,r,n)=>{var e=n(3210),o=n(3335),i=n(8878);t.exports=e?function(t,r,n){return o.f(t,r,i(1,n))}:function(t,r,n){return t[r]=n,t}},8878:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},5294:(t,r,n)=>{var e=n(9599),o=n(3335),i=n(1605),s=n(2723);t.exports=function(t,r,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:r;if(e(n)&&i(n,c,a),a.global)u?t[r]=n:s(r,n);else{try{a.unsafe?t[r]&&(u=!0):delete t[r]}catch(t){}u?t[r]=n:o.f(t,r,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},2723:(t,r,n)=>{var e=n(7801),o=Object.defineProperty;t.exports=function(t,r){try{o(e,t,{value:r,configurable:!0,writable:!0})}catch(n){e[t]=r}return r}},3210:(t,r,n)=>{var e=n(2005);t.exports=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},7069:(t,r,n)=>{var e=n(7801),o=n(1492),i=e.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},2946:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3718:(t,r,n)=>{var e,o,i=n(7801),s=n(2946),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,h=c&&c.v8;h&&(o=(e=h.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!o&&s&&(!(e=s.match(/Edge\\/(\\d+)/))||e[1]>=74)&&(e=s.match(/Chrome\\/(\\d+)/))&&(o=+e[1]),t.exports=o},6553:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7888:(t,r,n)=>{var e=n(7801),o=n(6709).f,i=n(5785),s=n(5294),a=n(2723),u=n(5818),c=n(6734);t.exports=function(t,r){var n,h,f,l,p,g=t.target,v=t.global,b=t.stat;if(n=v?e:b?e[g]||a(g,{}):e[g]&&e[g].prototype)for(h in r){if(l=r[h],f=t.dontCallGetSet?(p=o(n,h))&&p.value:n[h],!c(v?h:g+(b?".":"#")+h,t.forced)&&void 0!==f){if(typeof l==typeof f)continue;u(l,f)}(t.sham||f&&f.sham)&&i(l,"sham",!0),s(n,h,l,t)}}},2005:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},1206:(t,r,n)=>{var e=n(2005);t.exports=!e((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3155:(t,r,n)=>{var e=n(1206),o=Function.prototype.call;t.exports=e?o.bind(o):function(){return o.apply(o,arguments)}},876:(t,r,n)=>{var e=n(3210),o=n(1663),i=Function.prototype,s=e&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!e||e&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},5684:(t,r,n)=>{var e=n(6054),o=n(1924);t.exports=function(t,r,n){try{return e(o(Object.getOwnPropertyDescriptor(t,r)[n]))}catch(t){}}},6054:(t,r,n)=>{var e=n(1206),o=Function.prototype,i=o.call,s=e&&o.bind.bind(i,i);t.exports=e?s:function(t){return function(){return i.apply(t,arguments)}}},4589:(t,r,n)=>{var e=n(7801),o=n(9599);t.exports=function(t,r){return arguments.length<2?(n=e[t],o(n)?n:void 0):e[t]&&e[t][r];var n}},7317:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},8080:(t,r,n)=>{var e=n(1924),o=n(5619);t.exports=function(t,r){var n=t[r];return o(n)?void 0:e(n)}},6351:(t,r,n)=>{var e=n(1924),o=n(6857),i=n(3155),s=n(4313),a=n(7317),u="Invalid size",c=RangeError,h=TypeError,f=Math.max,l=function(t,r){this.set=t,this.size=f(r,0),this.has=e(t.has),this.keys=e(t.keys)};l.prototype={getIterator:function(){return a(o(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},t.exports=function(t){o(t);var r=+t.size;if(r!=r)throw new h(u);var n=s(r);if(n<0)throw new c(u);return new l(t,n)}},7801:function(t,r,n){var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n.g&&n.g)||e("object"==typeof this&&this)||function(){return this}()||Function("return this")()},1663:(t,r,n)=>{var e=n(6054),o=n(8247),i=e({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},4047:t=>{t.exports={}},8307:(t,r,n)=>{var e=n(3210),o=n(2005),i=n(7069);t.exports=!e&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9157:(t,r,n)=>{var e=n(6054),o=n(2005),i=n(5010),s=Object,a=e("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?a(t,""):s(t)}:s},3728:(t,r,n)=>{var e=n(6054),o=n(9599),i=n(4011),s=e(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},5519:(t,r,n)=>{var e,o,i,s=n(9408),a=n(7801),u=n(1492),c=n(5785),h=n(1663),f=n(4011),l=n(1717),p=n(4047),g="Object already initialized",v=a.TypeError,b=a.WeakMap;if(s||f.state){var m=f.state||(f.state=new b);m.get=m.get,m.has=m.has,m.set=m.set,e=function(t,r){if(m.has(t))throw new v(g);return r.facade=t,m.set(t,r),r},o=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var d=l("state");p[d]=!0,e=function(t,r){if(h(t,d))throw new v(g);return r.facade=t,c(t,d,r),r},o=function(t){return h(t,d)?t[d]:{}},i=function(t){return h(t,d)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(r){var n;if(!u(r)||(n=o(r)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},9599:t=>{var r="object"==typeof document&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},6734:(t,r,n)=>{var e=n(2005),o=n(9599),i=/#|\\.prototype\\./,s=function(t,r){var n=u[a(t)];return n===h||n!==c&&(o(r)?e(r):!!r)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",h=s.POLYFILL="P";t.exports=s},5619:t=>{t.exports=function(t){return null==t}},1492:(t,r,n)=>{var e=n(9599);t.exports=function(t){return"object"==typeof t?null!==t:e(t)}},8057:t=>{t.exports=!1},6843:(t,r,n)=>{var e=n(4589),o=n(9599),i=n(5163),s=n(5690),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var r=e("Symbol");return o(r)&&i(r.prototype,a(t))}},453:(t,r,n)=>{var e=n(3155);t.exports=function(t,r,n){for(var o,i,s=n?t:t.iterator,a=t.next;!(o=e(a,s)).done;)if(void 0!==(i=r(o.value)))return i}},4021:(t,r,n)=>{var e=n(3155),o=n(6857),i=n(8080);t.exports=function(t,r,n){var s,a;o(t);try{if(!(s=i(t,"return"))){if("throw"===r)throw n;return n}s=e(s,t)}catch(t){a=!0,s=t}if("throw"===r)throw n;if(a)throw s;return o(s),n}},5956:(t,r,n)=>{var e=n(96);t.exports=function(t){return e(t.length)}},1605:(t,r,n)=>{var e=n(6054),o=n(2005),i=n(9599),s=n(1663),a=n(3210),u=n(876).CONFIGURABLE,c=n(3728),h=n(5519),f=h.enforce,l=h.get,p=String,g=Object.defineProperty,v=e("".slice),b=e("".replace),m=e([].join),d=a&&!o((function(){return 8!==g((function(){}),"length",{value:8}).length})),w=String(String).split("String"),x=t.exports=function(t,r,n){"Symbol("===v(p(r),0,7)&&(r="["+b(p(r),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),n&&n.getter&&(r="get "+r),n&&n.setter&&(r="set "+r),(!s(t,"name")||u&&t.name!==r)&&(a?g(t,"name",{value:r,configurable:!0}):t.name=r),d&&n&&s(n,"arity")&&t.length!==n.arity&&g(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var e=f(t);return s(e,"source")||(e.source=m(w,"string"==typeof r?r:"")),t};Function.prototype.toString=x((function(){return i(this)&&l(this).source||c(this)}),"toString")},1019:t=>{var r=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?n:r)(e)}},3335:(t,r,n)=>{var e=n(3210),o=n(8307),i=n(2980),s=n(6857),a=n(2227),u=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,f="enumerable",l="configurable",p="writable";r.f=e?i?function(t,r,n){if(s(t),r=a(r),s(n),"function"==typeof t&&"prototype"===r&&"value"in n&&p in n&&!n[p]){var e=h(t,r);e&&e[p]&&(t[r]=n.value,n={configurable:l in n?n[l]:e[l],enumerable:f in n?n[f]:e[f],writable:!1})}return c(t,r,n)}:c:function(t,r,n){if(s(t),r=a(r),s(n),o)try{return c(t,r,n)}catch(t){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},6709:(t,r,n)=>{var e=n(3210),o=n(3155),i=n(1719),s=n(8878),a=n(8491),u=n(2227),c=n(1663),h=n(8307),f=Object.getOwnPropertyDescriptor;r.f=e?f:function(t,r){if(t=a(t),r=u(r),h)try{return f(t,r)}catch(t){}if(c(t,r))return s(!o(i.f,t,r),t[r])}},3130:(t,r,n)=>{var e=n(7938),o=n(6553).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},8591:(t,r)=>{r.f=Object.getOwnPropertySymbols},5163:(t,r,n)=>{var e=n(6054);t.exports=e({}.isPrototypeOf)},7938:(t,r,n)=>{var e=n(6054),o=n(1663),i=n(8491),s=n(3103).indexOf,a=n(4047),u=e([].push);t.exports=function(t,r){var n,e=i(t),c=0,h=[];for(n in e)!o(a,n)&&o(e,n)&&u(h,n);for(;r.length>c;)o(e,n=r[c++])&&(~s(h,n)||u(h,n));return h}},1719:(t,r)=>{var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!n.call({1:2},1);r.f=o?function(t){var r=e(this,t);return!!r&&r.enumerable}:n},2704:(t,r,n)=>{var e=n(3155),o=n(9599),i=n(1492),s=TypeError;t.exports=function(t,r){var n,a;if("string"===r&&o(n=t.toString)&&!i(a=e(n,t)))return a;if(o(n=t.valueOf)&&!i(a=e(n,t)))return a;if("string"!==r&&o(n=t.toString)&&!i(a=e(n,t)))return a;throw new s("Can\'t convert object to primitive value")}},581:(t,r,n)=>{var e=n(4589),o=n(6054),i=n(3130),s=n(8591),a=n(6857),u=o([].concat);t.exports=e("Reflect","ownKeys")||function(t){var r=i.f(a(t)),n=s.f;return n?u(r,n(t)):r}},3684:(t,r,n)=>{var e=n(5619),o=TypeError;t.exports=function(t){if(e(t))throw new o("Can\'t call method on "+t);return t}},492:(t,r,n)=>{var e=n(1948),o=n(3547),i=e.Set,s=e.add;t.exports=function(t){var r=new i;return o(t,(function(t){s(r,t)})),r}},2138:(t,r,n)=>{var e=n(4282),o=n(1948),i=n(492),s=n(1336),a=n(6351),u=n(3547),c=n(453),h=o.has,f=o.remove;t.exports=function(t){var r=e(this),n=a(t),o=i(r);return s(r)<=n.size?u(r,(function(t){n.includes(t)&&f(o,t)})):c(n.getIterator(),(function(t){h(r,t)&&f(o,t)})),o}},1948:(t,r,n)=>{var e=n(6054),o=Set.prototype;t.exports={Set,add:e(o.add),has:e(o.has),remove:e(o.delete),proto:o}},8900:(t,r,n)=>{var e=n(4282),o=n(1948),i=n(1336),s=n(6351),a=n(3547),u=n(453),c=o.Set,h=o.add,f=o.has;t.exports=function(t){var r=e(this),n=s(t),o=new c;return i(r)>n.size?u(n.getIterator(),(function(t){f(r,t)&&h(o,t)})):a(r,(function(t){n.includes(t)&&h(o,t)})),o}},5967:(t,r,n)=>{var e=n(4282),o=n(1948).has,i=n(1336),s=n(6351),a=n(3547),u=n(453),c=n(4021);t.exports=function(t){var r=e(this),n=s(t);if(i(r)<=n.size)return!1!==a(r,(function(t){if(n.includes(t))return!1}),!0);var h=n.getIterator();return!1!==u(h,(function(t){if(o(r,t))return c(h,"normal",!1)}))}},7380:(t,r,n)=>{var e=n(4282),o=n(1336),i=n(3547),s=n(6351);t.exports=function(t){var r=e(this),n=s(t);return!(o(r)>n.size)&&!1!==i(r,(function(t){if(!n.includes(t))return!1}),!0)}},6773:(t,r,n)=>{var e=n(4282),o=n(1948).has,i=n(1336),s=n(6351),a=n(453),u=n(4021);t.exports=function(t){var r=e(this),n=s(t);if(i(r)<n.size)return!1;var c=n.getIterator();return!1!==a(c,(function(t){if(!o(r,t))return u(c,"normal",!1)}))}},3547:(t,r,n)=>{var e=n(6054),o=n(453),i=n(1948),s=i.Set,a=i.proto,u=e(a.forEach),c=e(a.keys),h=c(new s).next;t.exports=function(t,r,n){return n?o({iterator:c(t),next:h},r):u(t,r)}},8950:(t,r,n)=>{var e=n(4589),o=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var r=e("Set");try{(new r)[t](o(0));try{return(new r)[t](o(-1)),!1}catch(t){return!0}}catch(t){return!1}}},1336:(t,r,n)=>{var e=n(5684),o=n(1948);t.exports=e(o.proto,"size","get")||function(t){return t.size}},6488:(t,r,n)=>{var e=n(4282),o=n(1948),i=n(492),s=n(6351),a=n(453),u=o.add,c=o.has,h=o.remove;t.exports=function(t){var r=e(this),n=s(t).getIterator(),o=i(r);return a(n,(function(t){c(r,t)?h(o,t):u(o,t)})),o}},194:(t,r,n)=>{var e=n(4282),o=n(1948).add,i=n(492),s=n(6351),a=n(453);t.exports=function(t){var r=e(this),n=s(t).getIterator(),u=i(r);return a(n,(function(t){o(u,t)})),u}},1717:(t,r,n)=>{var e=n(3275),o=n(5974),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},4011:(t,r,n)=>{var e=n(8057),o=n(7801),i=n(2723),s="__core-js_shared__",a=t.exports=o[s]||i(s,{});(a.versions||(a.versions=[])).push({version:"3.36.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},3275:(t,r,n)=>{var e=n(4011);t.exports=function(t,r){return e[t]||(e[t]=r||{})}},8433:(t,r,n)=>{var e=n(3718),o=n(2005),i=n(7801).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))},3660:(t,r,n)=>{var e=n(4313),o=Math.max,i=Math.min;t.exports=function(t,r){var n=e(t);return n<0?o(n+r,0):i(n,r)}},8491:(t,r,n)=>{var e=n(9157),o=n(3684);t.exports=function(t){return e(o(t))}},4313:(t,r,n)=>{var e=n(1019);t.exports=function(t){var r=+t;return r!=r||0===r?0:e(r)}},96:(t,r,n)=>{var e=n(4313),o=Math.min;t.exports=function(t){var r=e(t);return r>0?o(r,9007199254740991):0}},8247:(t,r,n)=>{var e=n(3684),o=Object;t.exports=function(t){return o(e(t))}},2095:(t,r,n)=>{var e=n(3155),o=n(1492),i=n(6843),s=n(8080),a=n(2704),u=n(2069),c=TypeError,h=u("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var n,u=s(t,h);if(u){if(void 0===r&&(r="default"),n=e(u,t,r),!o(n)||i(n))return n;throw new c("Can\'t convert object to primitive value")}return void 0===r&&(r="number"),a(t,r)}},2227:(t,r,n)=>{var e=n(2095),o=n(6843);t.exports=function(t){var r=e(t,"string");return o(r)?r:r+""}},8069:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},5974:(t,r,n)=>{var e=n(6054),o=0,i=Math.random(),s=e(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},5690:(t,r,n)=>{var e=n(8433);t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},2980:(t,r,n)=>{var e=n(3210),o=n(2005);t.exports=e&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},9408:(t,r,n)=>{var e=n(7801),o=n(9599),i=e.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},2069:(t,r,n)=>{var e=n(7801),o=n(3275),i=n(1663),s=n(5974),a=n(8433),u=n(5690),c=e.Symbol,h=o("wks"),f=u?c.for||c:c&&c.withoutSetter||s;t.exports=function(t){return i(h,t)||(h[t]=a&&i(c,t)?c[t]:f("Symbol."+t)),h[t]}},6805:(t,r,n)=>{var e=n(7888),o=n(2138);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("difference")},{difference:o})},4563:(t,r,n)=>{var e=n(7888),o=n(2005),i=n(8900);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("intersection")||o((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:i})},9606:(t,r,n)=>{var e=n(7888),o=n(5967);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("isDisjointFrom")},{isDisjointFrom:o})},8211:(t,r,n)=>{var e=n(7888),o=n(7380);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("isSubsetOf")},{isSubsetOf:o})},4164:(t,r,n)=>{var e=n(7888),o=n(6773);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("isSupersetOf")},{isSupersetOf:o})},9499:(t,r,n)=>{var e=n(7888),o=n(6488);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("symmetricDifference")},{symmetricDifference:o})},9271:(t,r,n)=>{var e=n(7888),o=n(194);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("union")},{union:o})}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),(()=>{let t=function(t){return t[t.HEX=0]="HEX",t[t.HEXA=1]="HEXA",t[t.RGB=2]="RGB",t[t.RGBA=3]="RGBA",t[t.HSL=4]="HSL",t[t.HSLA=5]="HSLA",t}({});function r(t,r,n=1e-6){return Math.abs(t-r)<n}function e(t){return t.toString(16).padStart(2,"0")}function o(t){return`${parseFloat((100*t).toFixed(1))}%`}function i(t){t=t.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,(function(t,r,n,e){return r+r+n+n+e+e}));const r=/^#?(?<r>[a-f\\d]{2})(?<g>[a-f\\d]{2})(?<b>[a-f\\d]{2})(?<a>[a-f\\d]{2})?$/i.exec(t),n=r?.groups?.r,e=r?.groups?.g,o=r?.groups?.b,i=r?.groups?.a;if(void 0===n||void 0===e||void 0===o)throw new Error(`Invalid hex color code "${t}"`);return{r:n,g:e,b:o,a:i}}function s(t){const{a:r}=i(t);if(!r)return 1;return function(t,r,n){const e=t.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:r,maximumFractionDigits:n});return Number(e)}(parseInt(r,16)/255,0,2)}function a(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function u({rgb:{r:t,g:r,b:n}}){return.2126*a(t/255)+.7152*a(r/255)+.0722*a(n/255)}function c(t,r){const n=u(t),e=u(r);return(Math.max(n,e)+.05)/(Math.min(n,e)+.05)}class h{constructor(t,r,n,e=1){this.rgb=t,this.hsl=r,this.hsv=n,this.a=e}static BLACK=h.fromRGB({r:0,g:0,b:0});static WHITE=h.fromRGB({r:255,g:255,b:255});static fromRGB(t,n){if(t.r<0||t.g<0||t.b<0||t.r>255||t.g>255||t.b>255||n&&n<0||n&&n>1)throw Error(`Invalid RGB color: ${JSON.stringify(t)}, alpha: ${n}`);const e=function({r:t,g:n,b:e}){const o=t/255,i=n/255,s=e/255,a=Math.max(o,i,s),u=Math.min(o,i,s),c=a-u;let h;const f=(a+u)/2,l=a;h=r(c,0)?0:r(l,o)?60*(0+(i-s)/c):r(l,i)?60*(2+(s-o)/c):60*(4+(o-i)/c),h%=360,h<0&&(h+=360);const p=0===f||1===f?0:(l-f)/Math.min(f,1-f);return{h:Math.round(h),s:p,l:f}}(t),o=function({r:t,g:n,b:e}){const o=t/255,i=n/255,s=e/255,a=Math.max(o,i,s),u=a-Math.min(o,i,s);let c;const h=a;c=r(u,0)?0:r(h,o)?60*(0+(i-s)/u):r(h,i)?60*(2+(s-o)/u):60*(4+(o-i)/u),c%=360,c<0&&(c+=360);const f=0===h?0:u/h;return{h:Math.round(c),s:f,v:h}}(t);return new h(t,e,o,n)}static fromHex(t,r){const n=function(t){const{r,g:n,b:e}=i(t);return{r:parseInt(r,16),g:parseInt(n,16),b:parseInt(e,16)}}(t),e=s(t);return h.fromRGB(n,r??e)}static fromHSV(t,r){const n=function({h:t,s:r,v:n}){const e=n*r,o=t/60,i=e*(1-Math.abs(o%2-1));let s;s=o>=0&&o<=1?[e,i,0]:o>1&&o<=2?[i,e,0]:o>2&&o<=3?[0,e,i]:o>3&&o<=4?[0,i,e]:o>4&&o<=5?[i,0,e]:o>5&&o<=6?[e,0,i]:[0,0,0];const a=n-e;return{r:Math.round(255*(s[0]+a)),g:Math.round(255*(s[1]+a)),b:Math.round(255*(s[2]+a))}}(t);return h.fromRGB(n,r)}static fromHSL(t,r){const n=function({h:t,s:r,l:n}){const e=(1-Math.abs(2*n-1))*r,o=t/60,i=e*(1-Math.abs(o%2-1));let s;s=o>=0&&o<=1?[e,i,0]:o>1&&o<=2?[i,e,0]:o>2&&o<=3?[0,e,i]:o>3&&o<=4?[0,i,e]:o>4&&o<=5?[i,0,e]:o>5&&o<=6?[e,0,i]:[0,0,0];const a=n-e/2;return{r:Math.round(255*(s[0]+a)),g:Math.round(255*(s[1]+a)),b:Math.round(255*(s[2]+a))}}(t);return h.fromRGB(n,r)}static fromInt(t,r){const n=function(t){return{r:t>>16&255,g:t>>8&255,b:255&t}}(t);return h.fromRGB(n,r)}static fromCSS(t,r){const n=function(t,r){const n=t.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/);if(n){const[t,e,o,i]=n.slice(1),s=r??parseFloat(i);return{rgb:{r:parseInt(t,10),g:parseInt(e,10),b:parseInt(o,10)},rgbAlpha:Number.isNaN(s)?void 0:s}}return null}(t,r);if(n){const{rgb:t,rgbAlpha:r}=n;return h.fromRGB(t,r)}const e=function(t){const r=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(r)return r[1];return null}(t);if(e)return h.fromHex(e,r);const o=function(t,r){const n=t.match(/^hsla?\\((\\d+),\\s*(\\d+)%,\\s*(\\d+)%(?:,\\s*(\\d*(?:\\.\\d+)?))?\\)$/);if(n){const[t,e,o,i]=n.slice(1),s=r??parseFloat(i);return{hsl:{h:parseInt(t,10),s:parseInt(e,10)/100,l:parseInt(o,10)/100},hslAlpha:Number.isNaN(s)?void 0:s}}return null}(t,r);if(o){const{hsl:t,hslAlpha:r}=o;return h.fromHSL(t,r)}throw new Error(`Invalid or unsupported CSS color: ${t}`)}toCSS(r){switch(r){case t.HEX:return`#${e((n=this).rgb.r)}${e(n.rgb.g)}${e(n.rgb.b)}`;case t.HEXA:return function(t){return`#${e(t.rgb.r)}${e(t.rgb.g)}${e(t.rgb.b)}${e(Math.floor(255*t.a))}`}(this);case t.RGB:return function(t){return`rgb(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b})`}(this);case t.RGBA:return function(t){return`rgba(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b}, ${t.a})`}(this);case t.HSL:return function(t){const{h:r,s:n,l:e}=t.hsl;return`hsl(${r}, ${o(n)}, ${o(e)})`}(this);case t.HSLA:return function(t){const{h:r,s:n,l:e}=t.hsl;return`hsla(${r}, ${o(n)}, ${o(e)}, ${t.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var n}contrastAdjust(t,r=4.5){let n=h.BLACK;if("light"===t&&(n=h.WHITE),n!==h.BLACK&&n!==h.WHITE)throw new Error("Only supports contrast calculation between black and white.");let e=c(this,n);if(e>=r)return this;let o=this.hsv.v,i=n===h.WHITE?-.02:.02,s=Number.MAX_VALUE,a=null;for(let t=0;t<100&&s>.07&&o>=0&&o<=1;t++){o=Math.min(o+i,1),a=h.fromHSV({h:this.hsv.h,s:this.hsl.s,v:o}),e=c(a,h.WHITE);const t=Math.round(10*Math.abs(e-r))/10;t>s&&(i*=-.5),s=t}return null===a?this:a}toString(){return`${this.rgb.r},${this.rgb.g},${this.rgb.b},${this.a}`}stringify(){return JSON.stringify(this)}static parse(t){const{rgb:r,hsl:n,hsv:e,a:o}=JSON.parse(t);return new h(r,n,e,o)}}class f{constructor(t,r){this.color=t,this.population=r}static fromColor(t,r){return new f(t,r)}static fromRGB(t,r){return new f(h.fromRGB(t),r)}}class l{constructor(t,r=[]){this._comparator=t,this._data=r}swap(t,r){[this._data[t],this._data[r]]=[this._data[r],this._data[t]]}compare(t,r){return this._comparator(this._data[t],this._data[r])}bubbleUp(t){for(;t>0;){const r=t-1>>>1;if(this.compare(t,r)>=0)break;this.swap(t,r),t=r}}bubbleDown(t){const r=this._data.length;for(;;){const n=1+(t<<1),e=n+1;let o=t;if(n<r&&this.compare(n,o)<=0&&(o=n),e<r&&this.compare(e,o)<0&&(o=e),o===t)break;this.swap(o,t),t=o}}size(){return this._data.length}push(t){this._data.push(t),this.bubbleUp(this._data.length-1)}pop(){if(0===this._data.length)return null;this.swap(0,this._data.length-1);const t=this._data.pop();return this.bubbleDown(0),t}clone(){return new l(this._comparator,[...this._data])}*popAll(){for(;this._data.length>0;)yield this.pop()}}const p=31;function g(t){const r=(t>>>10&31)<<3,n=(t>>>5&31)<<3,e=(t>>>0&31)<<3;return h.fromRGB({r,g:n,b:e})}function v(t,r){return Math.round((t>>>3)/r)<<3}function b({rgb:{r:t,g:r,b:n}},{rgb:{r:e,g:o,b:i}}){return t*p*p+r*p+n-(e*p*p+o*p+i)}function m({rgb:{r:t,g:r,b:n}},{rgb:{r:e,g:o,b:i}}){return r*p*p+t*p+n-(o*p*p+e*p+i)}function d({rgb:{r:t,g:r,b:n}},{rgb:{r:e,g:o,b:i}}){return n*p*p+r*p+t-(i*p*p+o*p+e)}class w{constructor(t,r){this.min=t,this.max=r}size(){return this.max-this.min+1}clampTo(t){this.min=this.max=t}extendTo(t){this.min=Math.min(this.min,t),this.max=Math.max(this.max,t)}}class x{_population=0;_spanR=new w(0,0);_spanG=new w(0,0);_spanB=new w(0,0);constructor(t){this._swatches=t,this.fitBox()}getVolume(){return this._spanR.size()*this._spanG.size()*this._spanB.size()}getColorCount(){return this._swatches.length}getAverageColor(){let t=0,r=0,n=0,e=0;for(const{color:o,population:i}of this._swatches)e+=i,t+=i*o.rgb.r,r+=i*o.rgb.g,n+=i*o.rgb.b;const o=v(t,e),i=v(r,e),s=v(n,e);return f.fromRGB({r:o,g:i,b:s},e)}canSplit(){return this.getColorCount()>1}split(){if(!this.canSplit())throw new Error("Can not split a box with only 1 color");const t=this.findSplitPoint(),r=new x(this._swatches.slice(t+1,this._swatches.length));return this._swatches.splice(t+1),this.fitBox(),r}fitBox(){this._population=0;for(let t=0;t<this._swatches.length;t++){const{color:r,population:n}=this._swatches[t];this._population+=n,0===t?(this._spanR.clampTo(r.rgb.r),this._spanG.clampTo(r.rgb.g),this._spanB.clampTo(r.rgb.b)):(this._spanR.extendTo(r.rgb.r),this._spanG.extendTo(r.rgb.g),this._spanB.extendTo(r.rgb.b))}}findSplitPoint(){const t=this.getLongestDimensionComparator();this._swatches.sort(((r,n)=>t(r.color,n.color)));const r=Math.floor(this._population/2);for(let t=0,n=0;t<this._swatches.length;t++)if(n+=this._swatches[t].population,n>=r)return Math.min(this._swatches.length-1,t);return 0}getLongestDimensionComparator(){const t=this._spanR.size(),r=this._spanG.size(),n=this._spanB.size();return t>=r&&t>=n?b:r>=t&&r>=n?m:d}}class y{queue=new l(((t,r)=>r.getVolume()-t.getVolume()));_swatches=[];constructor(t){this._options=t}static fromPixels(t,r){return new y(r).quantize(t)}quantize(t){const r=new Array(32768).fill(0);let n=0,e=0,o=0;for(let e=t.next();!e.done;e=t.next()){n++;r[((i=e.value)>>>0&255)>>3<<10|(i>>>8&255)>>3<<5|(i>>>16&255)>>3]++}var i;for(let t=0;t<r.length;t++){const n=r[t];if(0===n)continue;const i=g(t);(void 0===this._options.filter||this._options.filter(i))&&(e++,o+=i.hsv.s,this._swatches.push(f.fromColor(i,n)))}return this._swatches.length>this._options.maxColors&&(this._swatches=this.quantizePixels(this._options.maxColors)),{swatches:this._swatches,totalPixels:n,totalColors:e,totalSaturationFromHSV:o}}quantizePixels(t){this.queue.push(new x(this._swatches)),this.splitBoxes(t);const r=Array.from(this.queue.popAll()).map((t=>t.getAverageColor())),n=this._options.filter;return void 0!==n?r.filter((t=>n(t.color))):r}splitBoxes(t){for(;this.queue.size()<t;){const t=this.queue.pop();if(null===t||!t.canSplit())return;this.queue.push(t.split()),this.queue.push(t)}}}n(6805),n(4563),n(9606),n(8211),n(4164),n(9499),n(9271);function S(t,r){return t.reduce(((t,n)=>null!==t&&r(t)>r(n)?t:n),null)}const _=30,M=80,O=2,I=.0016,E=.3,R=.1,A=45,j=.4,B=.6,P=.1,C=.02;function $(t,r,n){return(t-r)/(n-r)}function G(t){return(t%=360)<0?360+t:t}function z(t,r){const n=function(t){let r=Number.MAX_VALUE;for(const n of t)r=Math.min(r,n);r=-1*Math.abs(r);let n=0,e=360;for(const o of t){const t=G(o+r);t<180&&t>n&&(n=t),t>=180&&t<e&&(e=t)}return n=G(n-r),e=G(e-r),{hue1:Math.min(n,e),hue2:Math.max(n,e)}}(t);let e=0;return r>=n.hue1&&r<=n.hue2?$(G(r),n.hue1,n.hue2):(e=360-n.hue2,$(G(r+e),0,G(n.hue1+e)))}function L(t,r){const n=t.map((t=>t.color.hsv.h)),e=function(t){let r=0,n=0;for(const e of t)r+=Math.cos(e/180*Math.PI),n+=Math.sin(e/180*Math.PI);const e=r/t.length,o=n/t.length,i=180*Math.atan2(o,e)/Math.PI%360;return i>=0?i:360-Math.abs(i)}(n),o=z(n,e);return o>j||o<B?t.filter((t=>{return t.population/r>C||(n=t.color.hsv.h,o=e,i=A,Math.min(Math.abs(o-n),360-Math.abs(o-n))<i);var n,o,i})):t}function T({color:{hsv:t},population:r},n,e){return(n?1:function(t){const r=function(t,r,n){const e=(n-r)/2+r-r,o=t-r,i=(e-Math.abs(e-o))/e;return Math.max(0,Math.min(i,1))}(t,_,M);return-1*Math.abs(r*O)}(t.h))+r/e+t.s*t.v}function F(t,r,n,e){const o=e/n;if(o<R)return null;const i=t.filter((t=>t.population/r>=I)).filter((t=>!(o>=R+P)||function({hsv:t}){return(t.v>.85||t.v<.15)&&t.s<.2||t.v<.15||t.s<.2||t.s<.2&&t.v<.4?0:(t.v+t.s)/2}(t.color)>=E));if(0===i.length)return null;const s=L(i,r),a=function(t){return t.map((t=>t.color.hsv.h)).every((t=>t>=_&&t<=M))}(s);return S(s,(t=>T(t,a,r)))}const H={min:.3,target:.5,max:.7},k={min:0,target:.26,max:.45},D={min:.55,target:.74,max:1},N={min:.35,target:1,max:1},q={min:0,target:.3,max:.4},V={saturation:.24,luminance:.52,population:.24},U={vibrantLight:{lightness:D,saturation:N,weights:V},vibrant:{lightness:H,saturation:N,weights:V},vibrantDark:{lightness:k,saturation:N,weights:V},mutedLight:{lightness:D,saturation:q,weights:V},muted:{lightness:H,saturation:q,weights:V},mutedDark:{lightness:k,saturation:q,weights:V}},X=f.fromRGB({r:83,g:83,b:83},1),W=f.fromRGB({r:83,g:83,b:83},1),J=f.fromRGB({r:127,g:127,b:127},1);function K(t,r){const{color:{hsl:n}}=t;return n.s>=r.saturation.min&&n.s<=r.saturation.max&&n.l>=r.lightness.min&&n.l<=r.lightness.max}function Y(t,r,n){const{color:{hsl:e}}=t;let o=0,i=0,s=0;return r.weights.saturation>0&&(o=r.weights.saturation*(1-Math.abs(e.s-r.saturation.target))),r.weights.luminance>0&&(i=r.weights.luminance*(1-Math.abs(e.l-r.lightness.target))),r.weights.population>0&&(s=r.weights.population*(t.population/n)),o+i+s}let Q=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});const Z=self;const tt=t=>!function({hsl:t}){return t.l<=.05}(t)&&!function({hsl:t}){return t.l>=.95}(t)&&!function({hsl:t}){return t.h>=10&&t.h<=37&&t.s<=.82}(t)&&function({hsv:t}){return t.v>.2}(t);Z.addEventListener("message",(t=>{const[r,n]=t.data,e=function(t){if(t.source===Q.IMAGE_BITMAP){const r=t.data,n=new OffscreenCanvas(r.width,r.height).getContext("2d");return n.drawImage(r,0,0,r.width,r.height),n.getImageData(0,0,r.width,r.height).data.buffer}return t.data}(n),o=function*(t,r){const n=new Uint32Array(t),e=Math.ceil(n.length/r);for(let t=0;t<n.length;t+=e)yield n[t]}(e,2e4),i=y.fromPixels(o,{maxColors:16,filter:tt}),{visRefSwatch:s,visRefDarkSwatch:a,visRefLightSwatch:u}=function(t,r,n,e,o=U){const i=new Set,s=S(t,(t=>t.population)),a={};for(const[r,n]of Object.entries(o)){const e=S(t.filter((t=>!i.has(t.color.toString()))).filter((t=>K(t,n))),(t=>Y(t,n,s?.population||1)));null!==e&&(a[r]=e,i.add(e.color.toString()))}const u=F(Object.values(a),r,n,e),c=u?f.fromColor(u.color.contrastAdjust("dark"),1):null,h=u?f.fromColor(u.color.contrastAdjust("light"),1):null;return{dominantSwatch:s,visRefSwatch:u||X,visRefDarkSwatch:c||W,visRefLightSwatch:h||J,visRefIsFallback:null===u,targetSwatches:a}}(i.swatches,i.totalPixels,i.totalColors,i.totalSaturationFromHSV);Z.postMessage([r,{colorRawJson:s.color.stringify(),colorLightJson:u.color.stringify(),colorDarkJson:a.color.stringify()}])}))})()})();\n',"Worker",void 0,void 0)};let u=0;async function d(e){const t=u++,n=new Promise(((e,n)=>{c.addEventListener("message",(n=>{const[r,s]=n.data;r===t&&e({colorRaw:i.Q.parse(s.colorRawJson),colorDark:i.Q.parse(s.colorDarkJson),colorLight:i.Q.parse(s.colorLightJson)})})),c.addEventListener("error",n)}));return c.postMessage([t,e],[e.data]),await n}async function m(e){let t;try{t=await async function(e){const t=new Image;return t.crossOrigin="anonymous",function(e){const t=0===e.indexOf("spotify:image:"),n=0===e.indexOf("spotify:mosaic:"),i=0===e.indexOf("spotify:localfileimage:");return t||n||i}(e)?t.src=`${r}?uri=${encodeURIComponent(e)}`:t.src=e,await t.decode(),t}(e)}catch(e){return Promise.resolve(l.A)}const n=t.naturalWidth,i=t.naturalHeight;if("createImageBitmap"in window&&"OffscreenCanvas"in window){const e=await window.createImageBitmap(t);return await async function(e){return await d({source:s.IMAGE_BITMAP,data:e})}(e)}const a=document.createElement("canvas"),o=a.getContext("2d");return a.width=n,a.height=i,o.drawImage(t,0,0,n,i),await async function(e){return await d({source:s.ARRAY_BUFFER,data:e.data.buffer})}(o.getImageData(0,0,n,i))}},74841:(e,t,n)=>{"use strict";n.d(t,{h:()=>A,L:()=>x});var i=n(83856),r=n(59841),s=n(79474),a=n(3775);n(16990);const o=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForAlbumEntity"]=new a.l("fetchExtractedColorAndImageForAlbumEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),l=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForArtistEntity"]=new a.l("fetchExtractedColorAndImageForArtistEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),c=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForEpisodeEntity"]=new a.l("fetchExtractedColorAndImageForEpisodeEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),u=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForPlaylistEntity"]=new a.l("fetchExtractedColorAndImageForPlaylistEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),d=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForPodcastEntity"]=new a.l("fetchExtractedColorAndImageForPodcastEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),m=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForTrackEntity"]=new a.l("fetchExtractedColorAndImageForTrackEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),p=Spicetify.GraphQL.Definitions["fetchExtractedColorForAlbumEntity"]=new a.l("fetchExtractedColorForAlbumEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),h=Spicetify.GraphQL.Definitions["fetchExtractedColorForArtistEntity"]=new a.l("fetchExtractedColorForArtistEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),g=Spicetify.GraphQL.Definitions["fetchExtractedColorForEpisodeEntity"]=new a.l("fetchExtractedColorForEpisodeEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),f=Spicetify.GraphQL.Definitions["fetchExtractedColorForPlaylistEntity"]=new a.l("fetchExtractedColorForPlaylistEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),b=Spicetify.GraphQL.Definitions["fetchExtractedColorForPodcastEntity"]=new a.l("fetchExtractedColorForPodcastEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),v=Spicetify.GraphQL.Definitions["fetchExtractedColorForTrackEntity"]=new a.l("fetchExtractedColorForTrackEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null);var y=n(15891),_=n(24577);const E={artist:h,album:p,episode:g,playlist:f,"playlist-v2":f,show:b,track:v};function x(e,t=r.gray30){const{request:n}=(0,s.useContext)(y.j),[a,o]=(0,s.useState)(t);return(0,s.useEffect)((()=>{(async()=>{const t=(0,i.o_)(e);if(!t)return;const r=E[t.type];if(!r)return void console.error(`The entity (${e}) you're trying to use it not supported for this query`);const s=await n(r,{uri:t.toURI()}),{albumUnion:a,artistUnion:l,episodeUnionV2:c,playlistV2:u,podcastUnionV2:d,trackUnion:m}=s?.data||{};w(a)?o(C(a.coverArt)):I(l)?o(C(l.visuals?.avatarImage)):T(c)?o(C(c.coverArt)):N(u)?o(C(u.images?.items?.[0])):R(d)?o(C(d?.coverArt)):k(m)&&o(C(m.albumOfTrack?.coverArt))})()}),[e,n]),a}function C(e){return e?.extractedColors?.colorDark.hex}const S={artist:l,album:o,episode:c,playlist:u,"playlist-v2":u,show:d,track:m};function A(e,t=r.gray30,n){const{request:a}=(0,s.useContext)(y.j),[o,l]=(0,s.useState)(t),[c,u]=(0,s.useState)(n),d=(0,s.useCallback)((e=>{const{url:t}=(0,_.g)(e?.sources)||{},n=C(e);t&&u(t),n&&l(n)}),[u]);return(0,s.useEffect)((()=>{(async()=>{const t=(0,i.o_)(e);if(!t)return;const n=S[t.type];if(!n)return void console.error(`The entity (${e}) you're trying to use it not supported for this query`);const r=await a(n,{uri:t.toURI()}),{albumUnion:s,artistUnion:o,episodeUnionV2:l,playlistV2:c,podcastUnionV2:u,trackUnion:m}=r?.data||{};w(s)?d(s.coverArt):I(o)?d(o.visuals.avatarImage):T(l)?d(l.coverArt):N(c)?d(c.images?.items?.[0]):R(u)||function(e){if(!e||0===Object.keys(e).length)return!1;return"Audiobook"===e.__typename}(u)?d(u.coverArt):k(m)&&d(m.albumOfTrack?.coverArt)})()}),[e,a,d]),[c,o]}function w(e){return!!e}function I(e){return!!e}function T(e){return!(!e||0===Object.keys(e).length)&&"Episode"===e.__typename}function N(e){return!!e}function R(e){return!(!e||0===Object.keys(e).length)&&"Podcast"===e.__typename}function k(e){return!!e}},50450:(e,t,n)=>{"use strict";n.d(t,{j:()=>a,n:()=>o});var i=n(15343),r=n(3775);n(16990);const s=Spicetify.GraphQL.Definitions["fetchExtractedColors"]=new r.l("fetchExtractedColors","query","86bdf61bb598ee07dc85d6c3456d9c88eb94f33178509ddc9b33fc9710aa9e9c",null);function a(e){return i.Q.fromHex(e)}async function o(e,t){Array.isArray(t)||(t=[t]);const n=await e(s,{uris:t}),{extractedColors:i}=n?.data||{};if(!i)throw new Error("Failed to fetch multiple extracted colors!");return i.map((e=>"ExtractedColors"!==e.__typename?null:{colorRaw:a(e.colorRaw.hex),colorDark:a(e.colorDark.hex),colorLight:a(e.colorLight.hex),isFallback:e.colorRaw.isFallback&&e.colorDark.isFallback&&e.colorLight.isFallback}))}},78053:(e,t,n)=>{"use strict";n.d(t,{j:()=>l});var i=n(50450),r=n(98198),s=n(85558),a=n(44666);const o=new r.l2;async function l(e,t){Array.isArray(t)||(t=[t]);const r=await Promise.all(t.map((e=>o.get(e))));if(r.every((e=>!!e)))return r;try{const r=await(0,i.n)(e,t),l=await function(e,t){const i=t.map((async(t,i)=>{if(t&&!t.isFallback)return t;if(""===e[i])return a.A;if(!(0,s.c)()){const{extractColors:t}=await Promise.resolve().then(n.bind(n,58402));return t(e[i])}return a.A}));return Promise.all(i)}(t,r);return l.forEach(((e,n)=>{o.set(t[n],Promise.resolve(e))})),l}catch{if(!(0,s.c)()){const{extractColors:e}=await Promise.resolve().then(n.bind(n,58402));return Promise.all(t.map((t=>{const n=e(t);return o.set(t,n),n})))}return Promise.resolve([a.A])}}},44666:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(59841),r=n(50450);const s={colorRaw:(0,r.j)(i.gray30),colorDark:(0,r.j)(i.gray30),colorLight:(0,r.j)(i.gray30)}},46697:(e,t,n)=>{"use strict";n.d(t,{r:()=>c,z:()=>u});var i=n(79474),r=n(59841),s=n(17072),a=n(78053),o=n(15891),l=n(28049);function c(e=null){const{request:t}=(0,i.useContext)(o.j),{data:n}=(0,l.I)({queryKey:["extracted-color",e],queryFn:()=>e?(0,a.j)(t,e).then((([{colorDark:e,colorLight:t,colorRaw:n}])=>({colorDark:e.toCSS(s.a.HEX),colorLight:t.toCSS(s.a.HEX),colorRaw:n.toCSS(s.a.HEX)}))):null,gcTime:864e5,staleTime:216e5,enabled:!!e});return n??void 0}function u(e=null,t=r.gray30,n="colorRaw"){return c(e)?.[n]??t}},15343:(e,t,n)=>{"use strict";n.d(t,{Q:()=>c});var i=n(17072),r=n(9530);function s(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return t+t+n+n+i+i}));const t=/^#?(?<r>[a-f\d]{2})(?<g>[a-f\d]{2})(?<b>[a-f\d]{2})(?<a>[a-f\d]{2})?$/i.exec(e),n=t?.groups?.r,i=t?.groups?.g,r=t?.groups?.b,s=t?.groups?.a;if(void 0===n||void 0===i||void 0===r)throw new Error(`Invalid hex color code "${e}"`);return{r:n,g:i,b:r,a:s}}function a(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function o({rgb:{r:e,g:t,b:n}}){return.2126*a(e/255)+.7152*a(t/255)+.0722*a(n/255)}function l(e,t){const n=o(e),i=o(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}class c{constructor(e,t,n,i=1){this.rgb=e,this.hsl=t,this.hsv=n,this.a=i}static BLACK=c.fromRGB({r:0,g:0,b:0});static WHITE=c.fromRGB({r:255,g:255,b:255});static fromRGB(e,t){if(e.r<0||e.g<0||e.b<0||e.r>255||e.g>255||e.b>255||t&&t<0||t&&t>1)throw Error(`Invalid RGB color: ${JSON.stringify(e)}, alpha: ${t}`);const n=function({r:e,g:t,b:n}){const i=e/255,s=t/255,a=n/255,o=Math.max(i,s,a),l=Math.min(i,s,a),c=o-l;let u;const d=(o+l)/2,m=o;u=(0,r.vn)(c,0)?0:(0,r.vn)(m,i)?60*(0+(s-a)/c):(0,r.vn)(m,s)?60*(2+(a-i)/c):60*(4+(i-s)/c),u%=360,u<0&&(u+=360);const p=0===d||1===d?0:(m-d)/Math.min(d,1-d);return{h:Math.round(u),s:p,l:d}}(e),i=function({r:e,g:t,b:n}){const i=e/255,s=t/255,a=n/255,o=Math.max(i,s,a),l=o-Math.min(i,s,a);let c;const u=o;c=(0,r.vn)(l,0)?0:(0,r.vn)(u,i)?60*(0+(s-a)/l):(0,r.vn)(u,s)?60*(2+(a-i)/l):60*(4+(i-s)/l),c%=360,c<0&&(c+=360);const d=0===u?0:l/u;return{h:Math.round(c),s:d,v:u}}(e);return new c(e,n,i,t)}static fromHex(e,t){const n=function(e){const{r:t,g:n,b:i}=s(e);return{r:parseInt(t,16),g:parseInt(n,16),b:parseInt(i,16)}}(e),i=function(e){const{a:t}=s(e);if(!t)return 1;const n=parseInt(t,16)/255;return(0,r.LI)(n,0,2)}(e);return c.fromRGB(n,t??i)}static fromHSV(e,t){const n=function({h:e,s:t,v:n}){const i=n*t,r=e/60,s=i*(1-Math.abs(r%2-1));let a;a=r>=0&&r<=1?[i,s,0]:r>1&&r<=2?[s,i,0]:r>2&&r<=3?[0,i,s]:r>3&&r<=4?[0,s,i]:r>4&&r<=5?[s,0,i]:r>5&&r<=6?[i,0,s]:[0,0,0];const o=n-i;return{r:Math.round(255*(a[0]+o)),g:Math.round(255*(a[1]+o)),b:Math.round(255*(a[2]+o))}}(e);return c.fromRGB(n,t)}static fromHSL(e,t){const n=function({h:e,s:t,l:n}){const i=(1-Math.abs(2*n-1))*t,r=e/60,s=i*(1-Math.abs(r%2-1));let a;a=r>=0&&r<=1?[i,s,0]:r>1&&r<=2?[s,i,0]:r>2&&r<=3?[0,i,s]:r>3&&r<=4?[0,s,i]:r>4&&r<=5?[s,0,i]:r>5&&r<=6?[i,0,s]:[0,0,0];const o=n-i/2;return{r:Math.round(255*(a[0]+o)),g:Math.round(255*(a[1]+o)),b:Math.round(255*(a[2]+o))}}(e);return c.fromRGB(n,t)}static fromInt(e,t){const n=function(e){return{r:e>>16&255,g:e>>8&255,b:255&e}}(e);return c.fromRGB(n,t)}static fromCSS(e,t){const n=function(e,t){const n=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){const[e,i,r,s]=n.slice(1),a=t??parseFloat(s);return{rgb:{r:parseInt(e,10),g:parseInt(i,10),b:parseInt(r,10)},rgbAlpha:Number.isNaN(a)?void 0:a}}return null}(e,t);if(n){const{rgb:e,rgbAlpha:t}=n;return c.fromRGB(e,t)}const i=function(e){const t=e.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(t)return t[1];return null}(e);if(i)return c.fromHex(i,t);const r=function(e,t){const n=e.match(/^hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*(?:\.\d+)?))?\)$/);if(n){const[e,i,r,s]=n.slice(1),a=t??parseFloat(s);return{hsl:{h:parseInt(e,10),s:parseInt(i,10)/100,l:parseInt(r,10)/100},hslAlpha:Number.isNaN(a)?void 0:a}}return null}(e,t);if(r){const{hsl:e,hslAlpha:t}=r;return c.fromHSL(e,t)}throw new Error(`Invalid or unsupported CSS color: ${e}`)}toCSS(e){switch(e){case i.a.HEX:return t=this,`#${(0,r.nj)(t.rgb.r)}${(0,r.nj)(t.rgb.g)}${(0,r.nj)(t.rgb.b)}`;case i.a.HEXA:return function(e){return`#${(0,r.nj)(e.rgb.r)}${(0,r.nj)(e.rgb.g)}${(0,r.nj)(e.rgb.b)}${(0,r.nj)(Math.floor(255*e.a))}`}(this);case i.a.RGB:return function(e){return`rgb(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b})`}(this);case i.a.RGBA:return function(e){return`rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.a})`}(this);case i.a.HSL:return function(e){const{h:t,s:n,l:i}=e.hsl;return`hsl(${t}, ${(0,r.wF)(n)}, ${(0,r.wF)(i)})`}(this);case i.a.HSLA:return function(e){const{h:t,s:n,l:i}=e.hsl;return`hsla(${t}, ${(0,r.wF)(n)}, ${(0,r.wF)(i)}, ${e.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var t}contrastAdjust(e,t=4.5){let n=c.BLACK;if("light"===e&&(n=c.WHITE),n!==c.BLACK&&n!==c.WHITE)throw new Error("Only supports contrast calculation between black and white.");let i=l(this,n);if(i>=t)return this;let r=this.hsv.v,s=n===c.WHITE?-.02:.02,a=Number.MAX_VALUE,o=null;for(let e=0;e<100&&a>.07&&r>=0&&r<=1;e++){r=Math.min(r+s,1),o=c.fromHSV({h:this.hsv.h,s:this.hsl.s,v:r}),i=l(o,c.WHITE);const e=Math.round(10*Math.abs(i-t))/10;e>a&&(s*=-.5),a=e}return null===o?this:o}toString(){return`${this.rgb.r},${this.rgb.g},${this.rgb.b},${this.a}`}stringify(){return JSON.stringify(this)}static parse(e){const{rgb:t,hsl:n,hsv:i,a:r}=JSON.parse(e);return new c(t,n,i,r)}}},4370:(e,t,n)=>{"use strict";function i(e){if(!e?.colorDark.isFallback)return e?.colorDark.hex}n.d(t,{m:()=>i})},9530:(e,t,n)=>{"use strict";function i(e,t,n=1e-6){return Math.abs(e-t)<n}function r(e){return e.toString(16).padStart(2,"0")}function s(e){return`${parseFloat((100*e).toFixed(1))}%`}function a(e,t,n){const i=e.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:t,maximumFractionDigits:n});return Number(i)}n.d(t,{LI:()=>a,nj:()=>r,vn:()=>i,wF:()=>s})},17072:(e,t,n)=>{"use strict";n.d(t,{a:()=>i});let i=function(e){return e[e.HEX=0]="HEX",e[e.HEXA=1]="HEXA",e[e.RGB=2]="RGB",e[e.RGBA=3]="RGBA",e[e.HSL=4]="HSL",e[e.HSLA=5]="HSLA",e}({})},64295:(e,t,n)=>{"use strict";n.d(t,{P:()=>r,a:()=>s});var i=n(37766);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{}},36307:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,L:()=>s});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'ConnectContext' without 'ConnectProvider'!");return e}},28157:(e,t,n)=>{"use strict";n.d(t,{W:()=>s});var i=n(79474),r=n(36307);function s(e,t){const n=(0,i.useRef)(t),s=(0,r.L)();n.current=t,(0,i.useEffect)((()=>{const t=s.getEvents(),i=e=>n.current(e);return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[e,s])}},83486:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,l:()=>a});var i=n(85445),r=n(79864);const s=e=>{let t,n=!1;return e.connectionStatus===i.zP.CONNECTING?(n=!0,t=e.connectingDevice):e.connectionStatus===i.zP.CONNECTED&&(n=!0,t=e.activeDevice),{isPlayingRemotely:n,connectionStatus:e.connectionStatus,remoteDevice:t}},a=()=>(0,r.v)((e=>s(e).isPlayingRemotely))},79864:(e,t,n)=>{"use strict";n.d(t,{v:()=>c});var i=n(79474),r=n(64295),s=n(85445),a=n(36307),o=n(28157);const l={connectionStatus:s.zP.NOT_CONNECTED,activeDevice:null,connectingDevice:null,devices:[]};function c(e,t=((e,t)=>e===t)){const n=(0,a.L)(),[s,c]=(0,i.useState)((()=>{const t=n.getState()??l;return e(t)}));return(0,o.W)(r.P.UPDATE,(n=>{const i=n.data??l,r=e(i);t(s,r)||c(r)})),s}},85445:(e,t,n)=>{"use strict";n.d(t,{Ts:()=>l,bU:()=>a,bq:()=>r,gX:()=>s,zP:()=>i});let i=function(e){return e.NOT_CONNECTED="not_connected",e.CONNECTING="connecting",e.CONNECTED="connected",e}({}),r=function(e){return e.UNKNOWN="unknown",e.COMPUTER="computer",e.TABLET="tablet",e.SMARTPHONE="smartphone",e.SPEAKER="speaker",e.TV="tv",e.AVR="avr",e.STB="stb",e.AUDIO_DONGLE="audio_dongle",e.GAME_CONSOLE="game_console",e.CAST_VIDEO="cast_video",e.CAST_AUDIO="cast_audio",e.AUTOMOBILE="automobile",e.SMARTWATCH="smartwatch",e.CHROMEBOOK="chromebook",e.CarThing="carthing",e.HomeThing="homething",e}({}),s=function(e){return e.CONNECTING="connecting",e.LOGGED_IN="logged_in",e.NOT_LOGGED_IN="not_logged_in",e.SLEEPING="sleeping",e.NOT_LOADED="not_loaded",e.UNKNOWN="unknown",e}({}),a=function(e){return e.INCOMPATIBLE="incompatible",e.UNAVAILABLE="unavailable",e.PREMIUM_REQUIRED="premium_required",e.NOT_INSTALLED="not_installed",e.UNSUPPORTED_URI="unsupported_uri",e.NOT_AUTHORIZED="not_authorized",e.AD_PLAYING="ad_playing",e.NARRATION="narration",e.WAKING_UP="waking_up",e.TIMED_OUT_WAKEUP="timed_out_wakeup",e.UNKNOWN="unknown",e}({});const o=["cast","connect"];function l(e){return Boolean(o.find((t=>t===e)))}},53086:(e,t,n)=>{"use strict";n.d(t,{vV:()=>r});const i=!1;function r(...e){s((()=>{console.error(...e)}))}function s(e){i&&e()}},87512:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var i=n(8012);let r=function(e){return e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.SMART_SHUFFLE=2]="SMART_SHUFFLE",e}({});(0,i.u)("ContextualShuffleAPI")},33197:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var i=n(98305),r=n(87512);const s={[i.b.OFF]:r.j.OFF,[i.b.LOCAL]:r.j.ON,[i.b.SMART]:r.j.SMART_SHUFFLE},a={[r.j.OFF]:i.b.OFF,[r.j.ON]:i.b.LOCAL,[r.j.SMART_SHUFFLE]:i.b.SMART};class o{constructor(e){this._indexedDbAPI=e}async getContextualShuffleMode(e){const t=await this._indexedDbAPI.getItem("shuffle-state",e);return t instanceof Error?r.j.OFF:s[t]}async setContextualShuffleMode(e,t){const n=a[t];if(n===i.b.OFF){const t=await this._indexedDbAPI.deleteItem("shuffle-state",e);if(t instanceof Error)throw t}else{const t=await this._indexedDbAPI.setItem("shuffle-state",e,n);if(t instanceof Error)throw t}}getEvents(){return this._indexedDbAPI.getEvents()}}},63192:(e,t,n)=>{"use strict";function i(e,t=document){const{name:n,value:i,days:r,domain:s,secure:a=!0,samesite:o="none"}=e;let l="";if(r){const e=new Date;e.setTime(Date.now()+24*r*60*60*1e3),l=`; expires=${e.toUTCString()}`}else l="";let c=`${n}=${i}${l}; path=/`;s&&s.length&&(c+=`;domain=${s}`),i&&(!0===a&&(c+=";secure"),c+=`;samesite=${o}`),t.cookie=c}function r(e,t=document){try{const n=t.cookie;return n.split(";").map((e=>e.trim().split("="))).reduce(((e,t)=>(e.set(t[0],t[1]),e)),new Map).get(e)}catch(e){return}}n.d(t,{n0:()=>i,v8:()=>r})},98930:(e,t,n)=>{"use strict";n.d(t,{h:()=>m});var i=n(8012);function r(e){return Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})}let s=function(e){return e.DELETE="DELETE",e.GET="GET",e.HEAD="HEAD",e.POST="POST",e.PUT="PUT",e.SUB="SUB",e.PATCH="PATCH",e}({});class a{constructor(e,t,n,i){this.uri=t,this.headers=r(n),this.body=this.stringifyBody(i||""),this.method=e}stringify(){return JSON.stringify({headers:this.headers,body:this.body,method:this.method,uri:this.uri})}stringifyBody(e){return"string"!=typeof e?JSON.stringify(e):e}static parse(e){const t=JSON.parse(e);return new a(t.method,t.uri,t.headers,t.body)}}(0,i.u)("Cosmos");class o{constructor(e,t){this.resolver=e,this.requestFactory=t}head(e,t){return this.resolve(s.HEAD,e,null,t).then((e=>e.headers))}get(e,t,n){return this.resolve(s.GET,e,t,n).then((e=>e.body))}post(e,t=null,n){return this.resolve(s.POST,e,t,n).then((e=>e.body))}put(e,t,n){return this.resolve(s.PUT,e,t,n).then((e=>e.body))}del(e,t,n){return this.resolve(s.DELETE,e,t,n).then((e=>e.body))}patch(e,t,n){return this.resolve(s.PATCH,e,t,n).then((e=>e.body))}sub(e,t,n=(e=>{console.error(e)}),i=null,r={}){const a=this.requestFactory(s.SUB,e,r,i);return this.resolver.resolve(a,(e=>t(e.body)),n)}postSub(e,t=null,n,i=(e=>{console.error(e)})){const r=this.requestFactory(s.SUB,e,{},t);return this.resolver.resolve(r,(e=>n(e.body)),i)}request(e,t,n=null,i){return this.resolve(e,t,n,i)}resolve(e,t,n=null,i={}){return new Promise(((r,s)=>{const a=this.requestFactory(e,t,i,n);this.resolver.resolve(a,r,s)}))}}class l{constructor(e,t,n){this.status=e,this.headers=r(t),this.body=this.parseBody(n)}static isSuccessStatus(e){return e>=200&&e<=299}static parse(e){const t=JSON.parse(e),n=this.isSuccessStatus(t.status)&&t.body?t.body:"";return new l(t.status,t.headers||{},n)}parseBody(e){return""!==e?JSON.parse(e):{}}}var c=n(91771),u=n.n(c);class d{constructor(e,t){this.send=e,this.cancel=t}resolve(e,t,n){const i=this.send({request:e.stringify(),persistent:e.method===s.SUB,onSuccess:i=>this.onSuccess(e,i,t,n),onFailure:(t,i)=>this.onFailure(e,t,i,n)});return{cancel:()=>{this.cancel(i)}}}onSuccess(e,t,n,i){try{const r=l.parse(t);if(l.isSuccessStatus(r.status))n(r);else{i(u()(r.status,`${e.method} request to ${e.uri} failed with status code ${r.status}`))}}catch(t){const n=t instanceof Error?t.message:"(unknown error object)";i(new Error(`${e.method} request to ${e.uri} failed with exception '${n}'`))}}onFailure(e,t,n,i){i(new Error(`${e.method} request to ${e.uri} request failed with error code ${t} (${n})`))}}function m(){const e=function(){const e=n.g.window||{};return new d(e.sendCosmosRequest,e.cancelCosmosRequest)}();return new o(e,((...e)=>new a(...e)))}},6016:(e,t,n)=>{"use strict";n.d(t,{e:()=>r});var i=n(12882);class r extends i.e{}},49566:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var i=n(83856),r=n(9544);function s(e){switch((0,i.o_)(e)?.type){case i.NQ.TRACK:case i.NQ.LOCAL_TRACK:return r.BP;case i.NQ.EPISODE:return r.Xn;default:return r.gv}}},16117:(e,t,n)=>{"use strict";n.d(t,{FR:()=>a,jy:()=>r,oq:()=>s});var i=n(37766);let r=function(e){return e.CURATE_ITEMS="curate_items",e}({}),s=function(e){return e.UPDATE_CURATED_ITEM="update_curated_item",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{}},4968:(e,t,n)=>{"use strict";n.d(t,{s:()=>s});var i=n(67910),r=n(16117);class s extends r.FR{constructor(e){super(),this.cache=e,this.aggregator=(0,i.XT)(this.onCuratedBatchChanged.bind(this),100),this.onAddListener(r.oq.UPDATE_CURATED_ITEM,(e=>{this.aggregator.subscribe(e.data.options.uri)})),this.onRemoveListener(r.oq.UPDATE_CURATED_ITEM,(e=>{this.aggregator.unsubscribe(e.data.options.uri)}))}emitUpdateCuratedItems(e,t){Array.isArray(t)?e.forEach(((e,n)=>{this.cache.set(e,t[n]),this.emit(r.oq.UPDATE_CURATED_ITEM,{uri:e,isCurated:t[n]})})):e.forEach((e=>{this.cache.set(e,t),this.emit(r.oq.UPDATE_CURATED_ITEM,{uri:e,isCurated:t})}))}emitOperationSync(e,t,n,i){return this.emitSync(r.oq.OPERATION,{operation:e,curatedItemUri:t,addedCurationContextUris:n,removedCurationContextUris:i}).defaultPrevented}emitOperationComplete(e,t,n,i,s=null){this.emit(r.oq.OPERATION_COMPLETE,{operation:e,curatedItemUri:t,addedCurationContextUris:n,removedCurationContextUris:i,error:s})}}},95338:(e,t,n)=>{"use strict";n.d(t,{g:()=>r});var i=n(83856);function r(e){const t=(0,i.o_)(e);return t?.type===i.NQ.TRACK||t?.type===i.NQ.LOCAL_TRACK||t?.type===i.NQ.EPISODE}},42787:(e,t,n)=>{"use strict";n.d(t,{B:()=>r,Q:()=>s});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'CurationContext' without 'CurationProvider'!");return e}},94337:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});let i=function(e){return e.STAR_WARS="star_wars",e.MANDALORIAN="mandalorian",e.FC_24="fc_24",e}({})},8309:(e,t,n)=>{"use strict";n.d(t,{u:()=>i});let i=function(e){return e.ALBUM="album",e.ARTIST="artist",e.TRACK="track",e.PLAYLIST="playlist",e.NOW_PLAYING="now_playing",e}({})},88958:(e,t,n)=>{"use strict";n.d(t,{P:()=>i.P});var i=n(8644)},2530:(e,t,n)=>{"use strict";n.d(t,{K:()=>i.K});var i=n(94337)},34628:(e,t,n)=>{"use strict";n.d(t,{h:()=>d});var i=n(8644),r=n(83856),s=n(94337);const a={[s.K.STAR_WARS]:[(0,r.cA)("spotify:playlist:37i9dQZF1DXaUaRhCgtpCo"),(0,r.cA)("spotify:playlist:69BOXIItwwyxTgdz6flzvU"),(0,r.cA)("spotify:playlist:37i9dQZF1DWUgUvAPAFxdh")],[s.K.MANDALORIAN]:[(0,r.cA)("spotify:album:4xFmHg5dYvaqmn9ZNQpjWL"),(0,r.cA)("spotify:album:4AOyNiCYswORQsTLxyGYQ4"),(0,r.cA)("spotify:album:5r9JMvwLPm2HNY5WgBZ8Q7"),(0,r.cA)("spotify:album:43PIYGro37xm0Y8iXMP5Pc"),(0,r.cA)("spotify:album:249DL9DzLAZRyxkpOa5w5w"),(0,r.cA)("spotify:album:71GgO9VtkVN2grqmpZo4Y2"),(0,r.cA)("spotify:album:4PMsqnolvUGyj1ZRxE1aki"),(0,r.cA)("spotify:album:4UbdaOH1jy1l9EG9vLFCle"),(0,r.cA)("spotify:album:2NxNzw1ohPc2Hhjaq2j3tW"),(0,r.cA)("spotify:album:4xUXCZfINYIV1DdZKomeVx"),(0,r.cA)("spotify:album:2JtB7K4gMmfC7Ow9Y4pz4b"),(0,r.cA)("spotify:album:3wuE2JeCx2Vmvk7b1c9fnI"),(0,r.cA)("spotify:playlist:37i9dQZF1DWTEvftu9yFoF")],[s.K.FC_24]:[(0,r.cA)("spotify:playlist:37i9dQZF1DX3rXtgePifMs")]};function o(e,t){if(null===t)return null;for(const[n,i]of e)if(i.some((e=>(0,r.B2)(t,e))))return n;return null}function l(e){const t=Object.entries(a),n=Array.isArray(e)?e:[e];for(const e of n){const n=o(t,e);if(null!==n)return n}return null}var c=n(30232),u=n(86412);function d(){const e=(0,i.q)(),t=(0,c.o)((e=>e?.context.uri??null)),n=(0,c.o)((e=>{const t=e?.item??void 0;return(0,u.v)(t)?t.album.uri:null}));if(null===e)return{surface:null,isViewingVariant:null,isPlayingVariant:null};const{surface:r,uris:s}=e;return{surface:r,isViewingVariant:l(s),isPlayingVariant:l([t,n])}}},47530:(e,t,n)=>{"use strict";n.d(t,{KY:()=>o,cX:()=>s,mb:()=>c,rw:()=>l});var i=n(9525),r=n(75958);const s=(e,t,n)=>(n&&e.searchParams.set("t",n.toString()),t&&(e.searchParams.has("utm_source")||e.searchParams.set("utm_source",t)),e.searchParams.has("utm_medium")||e.searchParams.set("utm_medium",(0,i.X)()?"mobile":"desktop"),e);function a(e,t=!0){const n=new URL("undefined"!=typeof location&&location.href?location.href:"https://open.spotify.com");let i=null;if(e){const r=e.toURL();i=new URL(r),t&&n.searchParams.forEach(((e,t)=>{i.searchParams.set(t,e)}))}else i=n,t||(i.search="");i.searchParams.delete("nd"),i.searchParams.delete("fallback"),i.searchParams.set("go","1");const s=(0,r.C)("config");return"string"==typeof s?.correlationId&&i.searchParams.append("sp_cid",s.correlationId),i}function o(e,t){const n=a(e,t);return n.searchParams.set("fallback","getapp"),n}function l(e,t){const n=a(e,t);return n.searchParams.set("fallback","download"),n}function c(){return new URL(`https://www.spotify.com/download${window.location.search}`)}},34481:(e,t,n)=>{"use strict";n.d(t,{$W:()=>a,H2:()=>o,Jf:()=>i,f6:()=>r,l_:()=>s});const i="STORE_DEFERRED_ACTION",r="PULL_DEFERRED_ACTION";let s=function(e){return e.PLAY="play",e.PLAYING="playing",e.USER_INVESTMENT="user-investment",e}({});const a=(e,t)=>({type:i,storeAction:e,actionIntent:t}),o=()=>({type:r})},8012:(e,t,n)=>{"use strict";function i(e){return Symbol.for(e)}n.d(t,{u:()=>i})},37766:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(9244);class r{constructor(e=new i.bk){this._emitter=e,this._emitter=e||new i.bk}addListener(e,t,n){return this._emitter.addListener(e,t,n),this}removeListener(e,t,n){return this._emitter.removeListener(e,t,n),this}onAddListener(e,t){return this._emitter.onAddListener(e,t),this}onRemoveListener(e,t){return this._emitter.onRemoveListener(e,t),this}emit(e,t){return this._emitter.emit(e,t)}emitSync(e,t){return this._emitter.emitSync(e,t)}}},50834:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var i=n(94119);function r(){return(0,i.n1)()}},94119:(e,t,n)=>{"use strict";n.d(t,{n1:()=>l});var i=n(8012);class r{constructor(e,t=0){this._output=e,this._offset=t,this._view=new DataView(this._output.buffer,this._output.byteOffset)}write(e){this._view.setInt32(this._offset,e.byteLength),this._output.set(e,this._offset+4),this._offset+=e.byteLength+4}}function s(e){const t=new TextEncoder,n=t.encode(e.service),i=t.encode(e.method),s=e.payload,a=new Uint8Array(4+n.byteLength+4+i.byteLength+4+s.byteLength),o=new r(a);return o.write(n),o.write(i),o.write(s),a.buffer}class a extends Error{constructor(){super("aborted")}}(0,i.u)("EsperantoTransport");class o{constructor(e,t){this._onSend=e,this._onCancel=t}callSingle(e,{signal:t}={}){let n;return new Promise(((i,r)=>{const s=this.call(e,!1,i,r);t?.addEventListener("abort",n=()=>{s.cancel(),r(new a)})})).finally((()=>t?.removeEventListener("abort",n)))}callStream(e,t){return this.call(e,!0,t,(e=>{throw e}))}call(e,t,n,i){const r=this._onSend({request:s(e),persistent:t,onSuccess:t=>{t instanceof ArrayBuffer?n(new Uint8Array(t)):i(new Error(`${e.service}.${e.method} failed with invalid payload!`))},onFailure:(t,n)=>{i(new Error(`${e.service}.${e.method} failed with code: ${n}`))}}),a=this._onCancel;return{cancel(){a(r)}}}}function l(){const e=n.g.window||{};return new o(e.executeEsperantoCall,e.cancelEsperantoCall)}},9753:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(8012);let r=function(e){return e.UNKNOWN="unknown",e.CAR="car",e.HEADPHONES="headphones",e.SPEAKER="speaker",e.WEARABLE="wearable",e}({});(0,i.u)("ExternalAccessoryAPI")},89857:(e,t,n)=>{"use strict";n.d(t,{W:()=>g});var i=n(88724),r=n(98198),s=n(9753);let a=function(e){return e[e.unknown=0]="unknown",e[e.car=1]="car",e[e.headphones=2]="headphones",e[e.speaker=3]="speaker",e[e.wearable=4]="wearable",e[e.other=5]="other",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function o(e){switch(e){case 0:case"unknown":return a.unknown;case 1:case"car":return a.car;case 2:case"headphones":return a.headphones;case 3:case"speaker":return a.speaker;case 4:case"wearable":return a.wearable;case 5:case"other":return a.other;default:return a.UNRECOGNIZED}}let l=function(e){return e[e.none=0]="none",e[e.regex=1]="regex",e[e.model=2]="model",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function c(e){switch(e){case 0:case"none":return l.none;case 1:case"regex":return l.regex;case 2:case"model":return l.model;default:return l.UNRECOGNIZED}}const u={fromJSON:e=>({category:d(e.category)?o(e.category):0,company:d(e.company)?globalThis.String(e.company):"",model:d(e.model)?globalThis.String(e.model):"",version:d(e.version)?globalThis.String(e.version):"",interapp:!!d(e.interapp)&&globalThis.Boolean(e.interapp),inferenceMethod:d(e.inferenceMethod)?c(e.inferenceMethod):0,confidence:d(e.confidence)?globalThis.Number(e.confidence):0,displayName:d(e.displayName)?globalThis.String(e.displayName):""}),toJSON(e){const t={};return 0!==e.category&&(t.category=function(e){switch(e){case a.unknown:return"unknown";case a.car:return"car";case a.headphones:return"headphones";case a.speaker:return"speaker";case a.wearable:return"wearable";case a.other:return"other";case a.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.category)),""!==e.company&&(t.company=e.company),""!==e.model&&(t.model=e.model),""!==e.version&&(t.version=e.version),!0===e.interapp&&(t.interapp=e.interapp),0!==e.inferenceMethod&&(t.inferenceMethod=function(e){switch(e){case l.none:return"none";case l.regex:return"regex";case l.model:return"model";case l.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.inferenceMethod)),0!==e.confidence&&(t.confidence=e.confidence),""!==e.displayName&&(t.displayName=e.displayName),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={category:0,company:"",model:"",version:"",interapp:!1,inferenceMethod:0,confidence:0,displayName:""};return t.category=e.category??0,t.company=e.company??"",t.model=e.model??"",t.version=e.version??"",t.interapp=e.interapp??!1,t.inferenceMethod=e.inferenceMethod??0,t.confidence=e.confidence??0,t.displayName=e.displayName??"",t}};function d(e){return null!=e}const m=`${i.I_}/external-accessory-mapping-serving/v1`;function p(e){switch(e){case a.car:return s.G.CAR;case a.headphones:return s.G.HEADPHONES;case a.speaker:return s.G.SPEAKER;case a.wearable:return s.G.WEARABLE;case a.UNRECOGNIZED:case a.unknown:default:return s.G.UNKNOWN}}class h{_cache=new r.l2(864e5);constructor(e){this._builder=e}async lookup(e){return this._cache.create(e,(()=>this.sendLookupRequest(e)))}async sendLookupRequest(e){const t=await this._builder.build().withoutMarket().withJsonContentType().withHost(m).withPath(`/lookup/${e}`).send(),{category:n,company:i,model:r,displayName:s}=u.fromJSON(t.body);return{type:p(n),brand:i,model:r,displayName:s}}}function g(e){return new h(e)}},99614:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});(0,n(8012).u)("GraphQLBatchedLoader");const i=50;function r(e,t=i){return async(n,i,r,s)=>{const a=[],o=Math.max(...r.map((e=>i[e]?.length??0)));for(let l=0;l<o;l+=t){const o={...i};r.forEach((e=>{o[e]=o[e]?.slice(l,l+t)})),void 0!==s?a.push(e(n,o,s)):a.push(e(n,o))}return(await Promise.all(a)).map((e=>{if(null===e||void 0!==e.errors||null===e.data)throw new Error("GraphQL batched query failed!");return e.data}))}}},15891:(e,t,n)=>{"use strict";n.d(t,{j:()=>i});const i=(0,n(79474).createContext)({request:()=>{throw new Error("GraphQL Context not initialized with Request object")}})},3775:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});class i{constructor(e,t,n,i){this.name=e,this.operation=t,this.sha256Hash=n,this.value=i}}},17393:(e,t,n)=>{"use strict";n.d(t,{lY:()=>a});var i=n(8012),r=n(88724),s=n(68013);(0,i.u)("GraphQLLoader");function a(e){return async(t,n,i={},a=[])=>{const{operation:c}=t;if("subscription"===c)throw new Error("GraphQL subscriptions are not supported!");const u=await async function(e,t,n,i={},a=[]){const{operation:c}=t;try{let s;return s="mutation"===c?await async function(e,t,n,i){const{name:s}=t;return e.build().withHost(r.J8).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withBody({variables:n,operationName:s,extensions:o(t)}).withQueryParameters({...i}).withEndpointIdentifier(`/query/${s}`).send()}(e,t,n,i):await async function(e,t,n,i,s){const{name:a}=t;return e.build().withHost(r.J8).withMethod("GET").withoutMarket().withPath("/query").withJsonContentType().withQueryParameters({operationName:a,variables:JSON.stringify(n),extensions:JSON.stringify(o(t)),...i}).withHeaders(s).withEndpointIdentifier(`/query/${a}`).send()}(e,t,n,i,a),s.body?.errors?.some((e=>"PersistedQueryNotFound"===e.message))?l(e,t,n,i):s}catch(r){const a=405;if(r instanceof s.O&&r.status===a)return l(e,t,n,i);throw r}}(e,t,n,i,a);return u.body}}function o(e){return{persistedQuery:{version:1,sha256Hash:e.sha256Hash}}}async function l(e,t,n,i){const{name:s,value:a}=t;if(null===a)throw new Error(`Fallback query for "${s}" is not available!`);return e.build().withHost(r.J8).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withBody({operationName:s,variables:n,query:a,extensions:o(t)}).withQueryParameters({...i}).withEndpointIdentifier(`/query/${s}`).send()}},26360:(e,t,n)=>{"use strict";async function i(e,t,n){try{const i=await e(t,n);return i?.errors?Promise.reject(i?.errors):i}catch(e){return e instanceof Error?Promise.reject([{message:e.message}]):Promise.reject(null)}}n.d(t,{c:()=>i})},16990:(e,t,n)=>{"use strict";n.d(t,{I:()=>c,i:()=>l});var i=n(79474),r=n(80964),s=n(28049),a=n(15891),o=n(26360);const l=6e4;function c(e,t,n){const l=(0,r.jE)(),{request:c}=(0,i.useContext)(a.j),{name:u,operation:d,sha256Hash:m}=e,p="query"===d,h=p&&n?.gcTime?n?.gcTime:0,g=p&&n?.staleTime?n?.staleTime:0,f=(0,i.useRef)([u,t,m]);f.current=[u,t,m];const{data:b,isLoading:v,isFetching:y,error:_}=(0,s.I)({queryKey:f.current,queryFn:()=>(0,o.c)(c,e,t),...n,gcTime:h,staleTime:g,meta:{persist:!0}}),E=(0,i.useCallback)((()=>l.invalidateQueries({queryKey:f.current,exact:!0})),[l]);return{data:b?.data??null,extensions:b?.extensions,error:_??null,loading:v,fetching:y,invalidate:E}}},78787:(e,t,n)=>{"use strict";n.d(t,{E:()=>y});var i=n(83844),r=n(8012),s=n(12882);class a extends s.e{constructor(e,t){super(e,t)}}n(14269);class o extends s.e{constructor(e,t){super(e,t)}}class l extends s.e{constructor(e,t){super(e,t)}}class c extends s.e{constructor(e,t){super(e,t)}}class u extends s.e{constructor(e,t){super(e,t)}}class d extends s.e{constructor(e,t){super(e,t)}}class m extends s.e{constructor(e,t){super(e,t)}}class p extends s.e{}const h={0:e=>{const t=e;return t.createObjectStore("shuffle-state"),t}};var g=n(74743);function f(e){e instanceof Error&&!(e instanceof a)&&console.error(e,"cause:",e.cause)}class b{constructor(e){this.name=e}close(){}dispatchEvent(){return!1}addEventListener(){}removeEventListener(){}postMessage(){}onmessage(){}onmessageerror(){}}class v extends(window.BroadcastChannel??b){postMessage(e){super.postMessage(e)}addEventListener(e,t,n){super.addEventListener(e,t,n)}}(0,r.u)("IndexedDbAPI");class y{constructor(e){this.name=`${e}:client-web`,this.version=1,this._events=new g.H,this._channel=new v(this.name),this._channel.addEventListener("message",(e=>{const{type:t,payload:n}=e.data;if(t===g.w.UPDATE){const{storeName:e,key:t,value:i}=n;this._events.emit(g.w.UPDATE,{storeName:e,key:t,value:i})}else if(t===g.w.DELETE){const{storeName:e,key:t}=n;this._events.emit(g.w.DELETE,{storeName:e,key:t})}}))}getEvents(){return this._events}async openDb(){const e=(0,i.P2)(this.name,this.version,{upgrade(e,t,n){!function(e,t,n){if(!n)throw new p(`Version change triggered for version ${t} but there is no new version to migrate to.`);let i=t;for(;i<n;){const t=h[i];if(!t)throw new p(`No migration from version ${i} to ${i+1}.`);t(e),i++}}(e,t,n)},blocking(){window.location.reload()}}).catch((t=this.version,e=>{if(e instanceof DOMException)switch(e.name){case"ConstraintError":return new l(`ConstraintError while opening database version "${t}"`,{cause:e});case"VersionError":return new u(e.message,{cause:e});case"AbortError":return new o(`AbortError while opening database version "${t}"`,{cause:e})}return new c(`Error opening database version "${t}"`,{cause:e})}));var t;return f(e),e}async getItem(e,t){const n=await this.openDb();if(n instanceof Error)return n;const i=await n.get(e,t).then((n=>void 0===n?new a(`Key "${t}" not found in store "${e}". DB version: "${this.version}"`,{cause:void 0}):n)).catch(((e,t,n)=>i=>{if(i instanceof DOMException)switch(i.name){case"NotFoundError":return new a(`Key "${n}" not found in store "${t}". DB version: "${e}"`,{cause:i});case"InvalidStateError":return new m(`InvalidStateError when reading key "${n}" from store "${t}". DB version: "${e}"`,{cause:i})}return new c(`Error reading key "${n}" from store "${t}". DB version: "${e}"`,{cause:i})})(this.version,e,t));return f(i),i}async setItem(e,t,n){const i=await this.openDb();if(i instanceof Error)return i;const r=await i.put(e,n,t).catch(((e,t)=>n=>{if(n instanceof DOMException)switch(n.name){case"QuotaExceededError":return new d(`Quota exceeded when writing to object store "${t}". DB version: "${e}"`,{cause:n});case"AbortError":return new o(`Abort occured when writing to object store "${t}". DB version: "${e}"`,{cause:n})}return new c(`Error writing to "${t}". DB version: "${e}"`,{cause:n})})(this.version,e));return f(r),r instanceof Error||(this._channel.postMessage({type:g.w.UPDATE,payload:{storeName:e,key:t,value:n}}),this._events.emit(g.w.UPDATE,{storeName:e,key:t,value:n})),r}async deleteItem(e,t){const n=await this.openDb();if(n instanceof Error)return n;const i=n.delete(e,t).catch(((e,t,n)=>i=>{if(i instanceof DOMException)switch(i.name){case"NotFoundError":return new a(`Key "${n}" not found in store "${t}". DB version: "${e}"`,{cause:i});case"InvalidStateError":return new m(`InvalidStateError when deleting key "${n}" from store "${t}". DB version: "${e}"`,{cause:i})}return new c(`Error deleting key "${n}" from store "${t}". DB version: "${e}"`,{cause:i})})(this.version,e,t));return f(i),i instanceof Error||(this._channel.postMessage({type:g.w.DELETE,payload:{storeName:e,key:t}}),this._events.emit(g.w.DELETE,{storeName:e,key:t})),i}}},74743:(e,t,n)=>{"use strict";n.d(t,{H:()=>s,w:()=>r});var i=n(37766);let r=function(e){return e.UPDATE="update",e.DELETE="delete",e}({});class s extends i.V{}},98305:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});let i=function(e){return e.OFF="OFF",e.LOCAL="LOCAL",e.SMART="SMART",e}({})},9544:(e,t,n)=>{"use strict";n.d(t,{BP:()=>s,E3:()=>o,IU:()=>u,Xn:()=>a,c_:()=>c,db:()=>d,gv:()=>r,oT:()=>l});var i=n(8012);n(9440);const r="spotify:collection",s="spotify:collection:tracks",a="spotify:collection:your-episodes",o="spotify:collection:local-files";let l=function(e){return e[e.YES=0]="YES",e[e.NO_IN_FOLDER=1]="NO_IN_FOLDER",e[e.NO=2]="NO",e}({});class c extends Error{constructor(e){super(`"${e}" is not a valid YLX filter.`),Object.setPrototypeOf(this,c.prototype)}}class u extends Error{constructor(e){super(`"${e}" is not a valid YLX sort order.`),Object.setPrototypeOf(this,u.prototype)}}class d extends Error{constructor(e){super(`${e}`),Object.setPrototypeOf(this,d.prototype)}}(0,i.u)("LibraryAPI")},82031:(e,t,n)=>{"use strict";n.d(t,{Ir:()=>r,UV:()=>a,b7:()=>l,tS:()=>s,uL:()=>o});var i=n(37766);let r=function(e){return e.ALBUMS="albums",e.ARTISTS="artists",e.SHOWS="shows",e.TRACKS="tracks",e.EPISODES="episodes",e.BOOKS="books",e}({}),s=function(e){return e.ADD="add",e.REMOVE="remove",e}({}),a=function(e){return e.UPDATE="update",e.UPDATE_ITEM="update_item",e.UPDATE_PIN="update_pin",e.UPDATE_PIN_ERROR="update_pin_error",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({}),o=function(e){return e[e.TOO_MANY_PINS=0]="TOO_MANY_PINS",e[e.NO_PIN_IN_FOLDER=1]="NO_PIN_IN_FOLDER",e}({});class l extends i.V{}},89124:(e,t,n)=>{"use strict";n.d(t,{HI:()=>s,Hh:()=>i,tl:()=>r});let i=function(e){return e.TEXT="TEXT",e.TAGS="TAGS",e}({}),r=function(e){return e.CONTAINS="CONTAINS",e}({});function s(e){if(e)return"string"==typeof e&&e.startsWith("tags contains")?{field:i.TAGS,operator:r.CONTAINS,value:e.slice(14)}:"string"==typeof e?{field:i.TEXT,operator:r.CONTAINS,value:e.trim()}:e}},55810:(e,t,n)=>{"use strict";n.d(t,{Ev:()=>c,Sw:()=>r,WW:()=>a,af:()=>o,ci:()=>l,uY:()=>s,xB:()=>i});let i=function(e){return e.ASC="ASC",e.DESC="DESC",e}({}),r=function(e){return e.NAME="NAME",e.ARTIST_NAME="ARTIST_NAME",e.ALBUM_NAME="ALBUM_NAME",e.ADDED_AT="ADDED_AT",e}({}),s=function(e){return e.NAME="NAME",e.ARTIST_NAME="ARTIST_NAME",e.ADDED_AT="ADDED_AT",e}({}),a=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e}({}),o=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e}({}),l=function(e){return e.NAME="NAME",e.SHOW_NAME="SHOW_NAME",e.ADDED_AT="ADDED_AT",e}({}),c=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e}({})},9344:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(67910),r=n(82031);class s extends r.b7{_numListeners=0;constructor(e){super(),this._cache=e,this._aggregator=(0,i.XT)(this.onBatchChanged.bind(this),100),this.onAddListener(r.UV.UPDATE,(()=>{1==++this._numListeners&&this.subscribeToUpdates()})),this.onRemoveListener(r.UV.UPDATE,(()=>{0==--this._numListeners&&this.unsubscribeFromUpdates()})),this.onAddListener(r.UV.UPDATE_ITEM,(e=>{1==++this._numListeners&&this.subscribeToUpdates(),this._aggregator.subscribe(e.data.options.uri)})),this.onRemoveListener(r.UV.UPDATE_ITEM,(e=>{0==--this._numListeners&&this.unsubscribeFromUpdates(),this._aggregator.unsubscribe(e.data.options.uri)}))}emitUpdateItems(e,t){Array.isArray(t)?e.forEach(((e,n)=>{this._cache.set(e,t[n]),this.emit(r.UV.UPDATE_ITEM,{uri:e,isInLibrary:t[n]})})):e.forEach((e=>{this._cache.set(e,t),this.emit(r.UV.UPDATE_ITEM,{uri:e,isInLibrary:t})}))}emitUpdatePin(e,t){this.emit(r.UV.UPDATE_PIN,{uri:e,isPinned:t})}emitUpdatePinErrorTooManyPins(e,t){this.emit(r.UV.UPDATE_PIN_ERROR,{reason:r.uL.TOO_MANY_PINS,uri:e,maximumPinnedItems:t})}emitOperationSync(e,t,n){return this.emitSync(r.UV.OPERATION,{operation:e,uris:t,silent:n}).defaultPrevented}emitOperationComplete(e,t,n=null,i){this.emit(r.UV.OPERATION_COMPLETE,{operation:e,uris:t,error:n,silent:i})}}},21052:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var i=n(83856),r=n(9544);function s(e,t){if(t){if(e===r.BP)return(0,i.fH)(t).toURI();if(e===r.Xn)return(0,i.fH)(t,"your-episodes").toURI()}return e===r.E3?"spotify:local-files":e}},2995:(e,t,n)=>{"use strict";n.d(t,{Bf:()=>f,FD:()=>E,Pz:()=>v,WQ:()=>b,Wu:()=>x,i_:()=>S,qZ:()=>C,sW:()=>y});var i=n(34074),r=n(89124),s=n(9544),a=n(72541),o=n(45640),l=n(14056),c=n(9440),u=n(15956);const d={[r.Hh.TEXT]:"text",[r.Hh.TAGS]:"tags"},m={[r.tl.CONTAINS]:"contains"};function p(e){return e.map((e=>{const{field:t,operator:n,value:i}=e;if(t!==r.Hh.TEXT&&t!==r.Hh.TAGS||n!==r.tl.CONTAINS)throw new Error("Invalid filter params!");return`${d[t]} ${m[n]} ${encodeURIComponent(i)}`})).join(",")}const h={[r.Hh.TEXT]:"text",[r.Hh.TAGS]:"tags"},g={[r.tl.CONTAINS]:"=^#"};function f(e){return p(e)}function b(e){return e?.value??""}function v(e,t){if(void 0===t||0===t.length)return;const n=function(e){return e.map((e=>{const{field:t,operator:n,value:i}=e;if(t!==r.Hh.TEXT&&t!==r.Hh.TAGS||n!==r.tl.CONTAINS)throw new Error("Invalid filter params!");return`${h[t]} ${g[n]} "${i}"`})).join(",")}(t),s=p(t);e.url=`context://${e.uri}?filter=${encodeURIComponent(s)}`,e.metadata=e.metadata??{},e.metadata[i.W.FILTERING_PREDICATE]=n,e.metadata[i.W.LIST_UTIL_FILTER]=s}function y(e){const t=e?.toString()??"";switch(e){case a.jO.ALBUM:return{id:t,name:l.Ru.get("shared.library.filter.album")};case a.jO.ARTIST:return{id:t,name:l.Ru.get("shared.library.filter.artist")};case a.jO.PLAYLIST:return{id:t,name:l.Ru.get("shared.library.filter.playlist")};case a.jO.SHOW:return{id:t,name:l.Ru.get("shared.library.filter.show")};case a.jO.BOOK:return{id:t,name:l.Ru.get("shared.library.filter.book")};case a.jO.DOWNLOADED:return{id:t,name:l.Ru.get("shared.library.filter.downloaded")};case a.jO.BY_YOU:return{id:t,name:l.Ru.get("shared.library.filter.by-you")};case a.jO.BY_SPOTIFY:return{id:t,name:l.Ru.get("shared.library.filter.by-spotify")};case a.jO.UNPLAYED:return{id:t,name:l.Ru.get("shared.library.filter.unplayed")};case a.jO.IN_PROGRESS:return{id:t,name:l.Ru.get("shared.library.filter.in-progress")};case a.jO.EVENT:case a.jO.WRITABLE:case a.jO.UNRECOGNIZED:return{id:t,name:a.jO[e]};default:throw(0,o.k)(e),new s.c_(`${e}`)}}const _={[a.jO.PLAYLIST]:0,[a.jO.SHOW]:1,[a.jO.BOOK]:2,[a.jO.ALBUM]:3,[a.jO.ARTIST]:4,[a.jO.BY_YOU]:5,[a.jO.BY_SPOTIFY]:6,[a.jO.IN_PROGRESS]:7,[a.jO.UNPLAYED]:8,[a.jO.DOWNLOADED]:9,[a.jO.WRITABLE]:-1,[a.jO.UNRECOGNIZED]:-1,[a.jO.EVENT]:-1};function E(e){return e.filter((e=>-1!==_[e])).sort(((e,t)=>_[e]-_[t]))}function x(e){return e.filter((({id:e})=>![a.jO.PLAYLIST].includes((0,u.qF)(e))))}function C(e){switch(e){case a.jO.ALBUM:return c.c.ALBUM;case a.jO.ARTIST:return c.c.ARTIST;case a.jO.PLAYLIST:return c.c.PLAYLIST;case a.jO.SHOW:return c.c.SHOW;case a.jO.BOOK:return c.c.AUDIOBOOK;case a.jO.DOWNLOADED:return"downloaded";default:return null}}function S(e){switch(e){case c.c.ALBUM:return a.jO.ALBUM;case c.c.ARTIST:return a.jO.ARTIST;case c.c.PLAYLIST:return a.jO.PLAYLIST;case c.c.SHOW:return a.jO.SHOW;case c.c.AUDIOBOOK:return a.jO.BOOK;case"downloaded":return a.jO.DOWNLOADED;default:return null}}},71253:(e,t,n)=>{"use strict";n.d(t,{Lf:()=>c,_e:()=>b,c6:()=>d,fC:()=>l,fG:()=>_,qq:()=>p,rC:()=>h,ss:()=>y,wh:()=>f});var i=n(34074),r=n(55810),s=n(72541),a=n(45640),o=n(14056);function l(e){if(void 0===e)return;const{field:t}=e;if(t===r.uY.NAME)return s.oR.NAME;if(t===r.uY.ARTIST_NAME)return s.oR.CREATOR;if(t===r.uY.ADDED_AT)return s.oR.RECENTLY_ADDED;throw new Error("Invalid album sort params!")}function c(e){if(void 0===e)return;const{field:t}=e;if(t===r.af.NAME)return s.oR.NAME;if(t===r.af.ADDED_AT)return s.oR.RECENTLY_ADDED;throw new Error("Invalid artist sort params!")}var u=function(e){return e.TRACK_NAME_ASC="name ASC",e.TRACK_NAME_DESC="name DESC",e.TRACK_ARTIST_NAME_ASC="artist.name ASC,album.name,discNumber,trackNumber",e.TRACK_ARTIST_NAME_DESC="artist.name DESC,album.name,discNumber,trackNumber",e.TRACK_ALBUM_NAME_ASC="album.name ASC,discNumber,trackNumber",e.TRACK_ALBUM_NAME_DESC="album.name DESC,discNumber,trackNumber",e.TRACK_ADDED_AT_ASC="addTime ASC,album.name,album.artist.name,discNumber,trackNumber",e.TRACK_ADDED_AT_DESC="addTime DESC,album.name,album.artist.name,discNumber,trackNumber",e}(u||{});function d({field:e,order:t}){switch(e){case r.Sw.NAME:return t===r.xB.ASC?u.TRACK_NAME_ASC:u.TRACK_NAME_DESC;case r.Sw.ARTIST_NAME:return t===r.xB.ASC?u.TRACK_ARTIST_NAME_ASC:u.TRACK_ARTIST_NAME_DESC;case r.Sw.ALBUM_NAME:return t===r.xB.ASC?u.TRACK_ALBUM_NAME_ASC:u.TRACK_ALBUM_NAME_DESC;case r.Sw.ADDED_AT:return t===r.xB.ASC?u.TRACK_ADDED_AT_ASC:u.TRACK_ADDED_AT_DESC;default:throw new Error("Invalid track sort params!")}}var m=function(e){return e.TRACK_NAME_ASC="title ASC",e.TRACK_NAME_DESC="title DESC",e.TRACK_ARTIST_NAME_ASC="artist_name ASC, album_title, album_disc_number, album_track_number",e.TRACK_ARTIST_NAME_DESC="artist_name DESC, album_title, album_disc_number, album_track_number",e.TRACK_ALBUM_NAME_ASC="album_title ASC, album_disc_number, album_track_number",e.TRACK_ALBUM_NAME_DESC="album_title DESC, album_disc_number, album_track_number",e.TRACK_ADDED_AT_ASC="added_at ASC, album_title, album_artist_name, album_disc_number, album_track_number",e.TRACK_ADDED_AT_DESC="added_at DESC, album_title, album_artist_name, album_disc_number, album_track_number",e}(m||{});function p(e,t){void 0!==t&&(e.metadata=e.metadata??{},e.metadata[i.W.SORTING_CRITERIA]=function({field:e,order:t}){switch(e){case r.Sw.NAME:return t===r.xB.ASC?m.TRACK_NAME_ASC:m.TRACK_NAME_DESC;case r.Sw.ARTIST_NAME:return t===r.xB.ASC?m.TRACK_ARTIST_NAME_ASC:m.TRACK_ARTIST_NAME_DESC;case r.Sw.ALBUM_NAME:return t===r.xB.ASC?m.TRACK_ALBUM_NAME_ASC:m.TRACK_ALBUM_NAME_DESC;case r.Sw.ADDED_AT:return t===r.xB.ASC?m.TRACK_ADDED_AT_ASC:m.TRACK_ADDED_AT_DESC;default:throw new Error("Invalid track sort params!")}}(t),e.metadata[i.W.LIST_UTIL_SORT]=d(t))}function h(e){if(void 0===e)return;const{field:t}=e;if(t===r.WW.NAME)return s.oR.NAME;if(t===r.WW.ADDED_AT)return s.oR.RECENTLY_ADDED;throw new Error("Invalid show sort params!")}var g=function(e){return e.EPISODE_NAME_ASC="name ASC",e.EPISODE_NAME_DESC="name DESC",e.EPISODE_ADDED_AT_ASC="addTime ASC,name",e.EPISODE_ADDED_AT_DESC="addTime DESC,name",e.SHOW_NAME_ASC="show.name ASC,addTime ASC",e.SHOW_NAME_DESC="show.name DESC,addTime ASC",e}(g||{});function f(e){return void 0===e?"":function({field:e,order:t}){if(e===r.ci.NAME&&t===r.xB.ASC)return g.EPISODE_NAME_ASC;if(e===r.ci.NAME&&t===r.xB.DESC)return g.EPISODE_NAME_DESC;if(e===r.ci.ADDED_AT&&t===r.xB.ASC)return g.EPISODE_ADDED_AT_ASC;if(e===r.ci.ADDED_AT&&t===r.xB.DESC)return g.EPISODE_ADDED_AT_DESC;if(e===r.ci.SHOW_NAME&&t===r.xB.ASC)return g.SHOW_NAME_ASC;if(e===r.ci.SHOW_NAME&&t===r.xB.DESC)return g.SHOW_NAME_DESC;throw new Error("Invalid episode sort params!")}(e)}function b(e){if(void 0!==e){if(e===r.Ev.NAME)return s.oR.NAME;if(e===r.Ev.ADDED_AT)return s.oR.RECENTLY_ADDED;throw new Error("Invalid book sort params!")}}function v(e){return _(e)?.[0]}function y(e,t){const n=e?.toString()??"";switch(e){case s.oR.CREATOR:return{id:n,name:t===s.jO.BOOK?o.Ru.get("shared.library.sort-by.author"):o.Ru.get("shared.library.sort-by.creator")};case s.oR.CUSTOM:return{id:n,name:o.Ru.get("shared.library.sort-by.custom")};case s.oR.NAME:return{id:n,name:o.Ru.get("shared.library.sort-by.name")};case s.oR.RECENTLY_ADDED:return{id:n,name:o.Ru.get("shared.library.sort-by.recently-added")};case s.oR.RECENTLY_PLAYED_OR_ADDED:return{id:n,name:o.Ru.get("shared.library.sort-by.recently-played-or-added")};case s.oR.RECENTLY_UPDATED:return{id:n,name:o.Ru.get("shared.library.sort-by.recently-updated")};case s.oR.RELEVANCE:return{id:n,name:o.Ru.get("shared.library.sort-by.relevance")};case s.oR.UNRECOGNIZED:case s.oR.EVENT_START_TIME:case void 0:return v(t);default:return(0,a.k)(e),v(t)}}function _(e){let t=[];switch(e){case s.jO.ALBUM:case s.jO.DOWNLOADED:case s.jO.WRITABLE:case s.jO.BY_YOU:case s.jO.BY_SPOTIFY:case s.jO.UNPLAYED:case s.jO.EVENT:case s.jO.IN_PROGRESS:case s.jO.UNRECOGNIZED:case s.jO.BOOK:t=[s.oR.RECENTLY_PLAYED_OR_ADDED,s.oR.RECENTLY_ADDED,s.oR.NAME,s.oR.CREATOR];break;case s.jO.SHOW:t=[s.oR.RECENTLY_PLAYED_OR_ADDED,s.oR.RECENTLY_ADDED,s.oR.NAME,s.oR.CREATOR,s.oR.RECENTLY_UPDATED];break;case s.jO.PLAYLIST:t=[s.oR.RECENTLY_PLAYED_OR_ADDED,s.oR.RECENTLY_ADDED,s.oR.NAME,s.oR.CREATOR,s.oR.CUSTOM];break;case s.jO.ARTIST:t=[s.oR.RECENTLY_PLAYED_OR_ADDED,s.oR.RECENTLY_ADDED,s.oR.NAME];break;case void 0:t=[s.oR.RECENTLY_PLAYED_OR_ADDED,s.oR.RECENTLY_ADDED,s.oR.NAME,s.oR.CREATOR];break;default:(0,a.k)(e)}return t.map((t=>y(t,e)))}},15956:(e,t,n)=>{"use strict";function i(e){return Number(e)}function r(e){return e?i(e):void 0}function s(e){return e?function(e){return Number(e)}(e):void 0}n.d(t,{CA:()=>s,IP:()=>r,qF:()=>i})},16323:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=(0,n(79474).createContext)(null)},66615:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var i=n(79474),r=n(16323);function s(){return(0,i.useContext)(r.Z)}},76661:(e,t,n)=>{"use strict";n.d(t,{dB:()=>d,vr:()=>m});var i=n(79474),r=n(82031),s=n(16323),a=n(8819),o=n(86892),l=n(9244);const c=r.UV.UPDATE;function u(e,t){const n=(0,i.useContext)(s.Z),[r,o]=(0,i.useState)(null),u=(0,i.useCallback)((async i=>{e===i.data.list&&o(await t(n))}),[n,e,t]);return(0,i.useEffect)((()=>{u(new l.Vk(c,{list:e}))}),[u,e]),(0,a.l)(c,u),r}function d(e){return u(r.Ir.TRACKS,(0,o.U0)((t=>t.getTracks(e)),[e]))}function m(e){return u(r.Ir.EPISODES,(0,o.U0)((t=>t.getEpisodes(e)),[e]))}},8819:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var i=n(79474),r=n(16323);function s(e,t){const n=(0,i.useContext)(r.Z),s=(0,i.useRef)(t);(0,i.useLayoutEffect)((()=>{s.current=t})),(0,i.useEffect)((()=>{const t=n.getEvents(),i=e=>s.current(e);return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[e,n])}},33037:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(79474),r=n(16323),s=n(14411),a=n(83856),o=n(82031),l=n(26831);function c(e,t){const n=(0,i.useContext)(r.Z),c=(0,i.useContext)(s.S);(0,i.useEffect)((()=>function(e,t,n,i){const r=(0,a.o_)(n)?.type;switch(r){case a.NQ.ALBUM:case a.NQ.ARTIST:case a.NQ.SHOW:case a.NQ.TRACK:case a.NQ.LOCAL_TRACK:case a.NQ.EPISODE:{const t=e.getEvents(),r=e=>{e.data.uri===n&&i(e.data.isInLibrary)};return t.addListener(o.UV.UPDATE_ITEM,r,{uri:n}),()=>{t.removeListener(o.UV.UPDATE_ITEM,r,{uri:n})}}case a.NQ.PLAYLIST:case a.NQ.PLAYLIST_V2:{const e=t.getEvents(),r=e=>{e.data.uri===n&&i(e.data.isInRootlist)};return e.addListener(l.tD.UPDATE_ITEM,r,{uri:n}),()=>{e.removeListener(l.tD.UPDATE_ITEM,r,{uri:n})}}default:return()=>{}}}(n,c,e,t)),[n,c,e,t])}function u(e,t=!1){const n=(0,i.useContext)(r.Z),o=(0,i.useContext)(s.S),l=(0,i.useCallback)((()=>function(e,t,n){const i=(0,a.o_)(n)?.type;switch(i){case a.NQ.ALBUM:case a.NQ.ARTIST:case a.NQ.SHOW:case a.NQ.TRACK:case a.NQ.LOCAL_TRACK:case a.NQ.EPISODE:return e.containsSync(n);case a.NQ.PLAYLIST:case a.NQ.PLAYLIST_V2:return t.containsSync(n)}}(n,o,e)||t),[t,n,o,e]),[u,d]=(0,i.useState)(l);(0,i.useEffect)((()=>{d(l)}),[l]);const m=(0,i.useCallback)((async t=>{await async function(e,t,n,i){const r=(0,a.o_)(n)?.type;switch(r){case a.NQ.ALBUM:case a.NQ.ARTIST:case a.NQ.SHOW:case a.NQ.EPISODE:case a.NQ.LOCAL_TRACK:case a.NQ.TRACK:i?e.add({uris:[n]}):e.remove({uris:[n]});break;case a.NQ.PLAYLIST:case a.NQ.PLAYLIST_V2:i?t.add([n],{before:"start"}):t.remove([{uri:n}])}}(n,o,e,t)}),[e,n,o]);return c(e,d),[u,m]}},75653:(e,t,n)=>{"use strict";n.d(t,{bV:()=>r,kW:()=>s});var i=n(8012);const r="spotify:internal:local-files";let s=function(e){return e.UNKNOWN="unknown",e.ITUNES="itunes",e.DOWNLOADS="downloads",e.MY_MUSIC="my_music",e.WINDOWS_MUSIC_LIBRARY="windows_music_library",e.UNRECOGNIZED="unrecognized",e}({});(0,i.u)("LocalFilesAPI")},96972:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s,T:()=>r});var i=n(37766);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{}},76922:(e,t,n)=>{"use strict";n.d(t,{_:()=>s});var i=n(79474);const r=new Error("Local files API used without being initialized.\n Did you provide the context in a a parent component?'"),s=(0,i.createContext)({getCapabilities:()=>{throw r},getTracks:()=>{throw r},getScannerStatus:()=>{throw r},getSources:()=>{throw r},mutateDefaultSource:()=>{throw r},addFolder:()=>{throw r},removeFolder:()=>{throw r}})},12464:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var i=n(79474),r=n(76922);function s(){return(0,i.useContext)(r._).getCapabilities()}},45482:(e,t,n)=>{"use strict";n.d(t,{P:()=>d});var i=n(8012),r=n(94300),s=n(70869),a=n(12882);class o extends a.e{}var l=n(98555);class c extends a.e{static getSize(e){return`${(JSON.stringify(e).length/1024).toFixed(2)}KB`}constructor(){super(`Local storage quota exceeded. Total size used: ${c.getSize(localStorage)}`),Object.setPrototypeOf(this,c.prototype)}}var u=n(10075);(0,i.u)("LocalStorageAPI");class d{items={};max_retries=3;auto_cleanup=!1;constructor(e,t){this.namespace=e,this._events=new s.G,this.max_retries=t?.max_retries??this.max_retries,this.auto_cleanup=t?.auto_cleanup??this.auto_cleanup,this.listenToStorageEvents()}createNamespacedKey(e){return`${this.namespace}:${e}`}parseLocalStorageValue(e,t){try{const n=JSON.parse(t);return this.items[e]=n,n}catch(n){return console.error(`Failed to parse value ${t} for key ${e}`),new u.Y(t)}}listenToStorageEvents(){window.addEventListener("storage",(e=>{const{key:t,newValue:n,oldValue:i}=e;if(null!==t&&null!==n&&t.startsWith(this.namespace)&&n!==i){const e=this.parseLocalStorageValue(t,n);this.items[t]=e,this._events.emit(s.r.UPDATE,{key:t.replace(`${this.namespace}:`,""),value:e})}}))}getEvents(){return this._events}getItem(e){const t=this.createNamespacedKey(e),n=this.items[t];if(t in this.items)return n;const i=window.localStorage.getItem(t);return null===i?new l.m(e):this.parseLocalStorageValue(t,i)}setItem(e,t){this.setItemInternal(e,t,this.max_retries)}setItemInternal(e,t,n){if(0===n)return void(0,r.UD)(new Error("LocalStorage retried too many times"));const i=this.createNamespacedKey(e),a=JSON.stringify(t),l=window.localStorage.getItem(i);if(l!==a){this.items[i]=t;try{window.localStorage.setItem(i,a)}catch(i){if(console.error("LocalStorage quota exceeded (no space left)"),(0,r.UD)(new c),this.auto_cleanup)return this.toggleItemsTypeAndCleanup(),this.setItemInternal(e,t,n-1)}try{this._events.emitSync(s.r.UPDATE,{key:e,value:t})}catch(t){const n=new o(`Failed to emit UPDATE event for key: ${e}`,{cause:t});console.error(n,`value: ${l}`),(0,r.UD)(n)}}}toggleItemsTypeAndCleanup(){Object.keys(localStorage).forEach((e=>{"true"!==localStorage[e]&&"false"!==localStorage[e]||localStorage.setItem(e,"true"===localStorage[e]?"1":"0"),e.startsWith(this.namespace)&&localStorage.removeItem(e)}))}clearItem(e){const t=this.createNamespacedKey(e);window.localStorage.removeItem(t),delete this.items[t]}}},70869:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,r:()=>r});var i=n(37766);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{}},98555:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});class i extends Error{constructor(e){super(`"${e}" not found in local storage.`),Object.setPrototypeOf(this,i.prototype)}}},10075:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});class i extends Error{constructor(e){super(`Failed to JSON.parse value "${e}"`),Object.setPrototypeOf(this,i.prototype)}}},82052:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});var i=n(79474),r=n(86892),s=n(587),a=n(70869);const o=(e,t)=>{const n=(0,s.qg)(),o=(0,i.useRef)(n.getItem(e)),[l,c]=(0,i.useState)(o.current instanceof Error?t:o.current),u=(0,i.useCallback)((t=>{o.current=t,n.setItem(e,t)}),[e,n]);return(0,r.Ij)((()=>{o.current instanceof Error&&u(t)}),[t,u]),(0,i.useEffect)((()=>{const t=n.getEvents(),i=t=>{t.data.key===e&&(o.current=t.data.value,c(t.data.value))},r=n.getItem(e);return r instanceof Error||c(r),t.addListener(a.r.UPDATE,i),()=>{t.removeListener(a.r.UPDATE,i)}}),[e,n]),[l,u]}},45901:(e,t,n)=>{"use strict";n.d(t,{Cb:()=>o,UG:()=>a});var i=n(59043),r=n.n(i),s=n(79162);let a=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.ANCHOR_PAYWALL=1]="ANCHOR_PAYWALL",e[e.OAP_OTP=2]="OAP_OTP",e[e.OAP_LINKING=3]="OAP_LINKING",e[e.AUDIOBOOK_DIRECT_SALES=4]="AUDIOBOOK_DIRECT_SALES",e[e.ABP=5]="ABP",e[e.AUDIOBOOK_PROMOTION=6]="AUDIOBOOK_PROMOTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const o={encode(e,t=r().Writer.create()){void 0!==e.none&&d.encode(e.none,t.uint32(10).fork()).ldelim(),void 0!==e.legacy&&u.encode(e.legacy,t.uint32(18).fork()).ldelim(),void 0!==e.basic&&c.encode(e.basic,t.uint32(26).fork()).ldelim(),void 0!==e.upsellLink&&m.encode(e.upsellLink,t.uint32(34).fork()).ldelim(),void 0!==e.engagement&&p.encode(e.engagement,t.uint32(50).fork()).ldelim(),void 0!==e.multiPass&&b.encode(e.multiPass,t.uint32(74).fork()).ldelim(),void 0!==e.checkoutOnWebOverlay&&h.encode(e.checkoutOnWebOverlay,t.uint32(90).fork()).ldelim(),void 0!==e.freeCheckout&&g.encode(e.freeCheckout,t.uint32(98).fork()).ldelim(),void 0!==e.consumptionCapped&&f.encode(e.consumptionCapped,t.uint32(106).fork()).ldelim(),void 0!==e.prompt&&y.encode(e.prompt,t.uint32(42).fork()).ldelim(),!1!==e.isUserMemberOfAtLeastOneGroup&&t.uint32(64).bool(e.isUserMemberOfAtLeastOneGroup),t.uint32(82).fork();for(const n of e.unlockedBy)t.int32(n);t.ldelim(),t.uint32(114).fork();for(const n of e.unlockingMethods)t.int32(n);return t.ldelim(),void 0!==e.signifier&&l.encode(e.signifier,t.uint32(122).fork()).ldelim(),t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={none:void 0,legacy:void 0,basic:void 0,upsellLink:void 0,engagement:void 0,multiPass:void 0,checkoutOnWebOverlay:void 0,freeCheckout:void 0,consumptionCapped:void 0,prompt:void 0,isUserMemberOfAtLeastOneGroup:!1,unlockedBy:[],unlockingMethods:[],signifier:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.none=d.decode(n,n.uint32());continue;case 2:if(18!==e)break;s.legacy=u.decode(n,n.uint32());continue;case 3:if(26!==e)break;s.basic=c.decode(n,n.uint32());continue;case 4:if(34!==e)break;s.upsellLink=m.decode(n,n.uint32());continue;case 6:if(50!==e)break;s.engagement=p.decode(n,n.uint32());continue;case 9:if(74!==e)break;s.multiPass=b.decode(n,n.uint32());continue;case 11:if(90!==e)break;s.checkoutOnWebOverlay=h.decode(n,n.uint32());continue;case 12:if(98!==e)break;s.freeCheckout=g.decode(n,n.uint32());continue;case 13:if(106!==e)break;s.consumptionCapped=f.decode(n,n.uint32());continue;case 5:if(42!==e)break;s.prompt=y.decode(n,n.uint32());continue;case 8:if(64!==e)break;s.isUserMemberOfAtLeastOneGroup=n.bool();continue;case 10:if(80===e){s.unlockedBy.push(n.int32());continue}if(82===e){const e=n.uint32()+n.pos;for(;n.pos<e;)s.unlockedBy.push(n.int32());continue}break;case 14:if(112===e){s.unlockingMethods.push(n.int32());continue}if(114===e){const e=n.uint32()+n.pos;for(;n.pos<e;)s.unlockingMethods.push(n.int32());continue}break;case 15:if(122!==e)break;s.signifier=l.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={none:void 0,legacy:void 0,basic:void 0,upsellLink:void 0,engagement:void 0,multiPass:void 0,checkoutOnWebOverlay:void 0,freeCheckout:void 0,consumptionCapped:void 0,prompt:void 0,isUserMemberOfAtLeastOneGroup:!1,unlockedBy:[],unlockingMethods:[],signifier:void 0};return t.none=void 0!==e.none&&null!==e.none?d.fromPartial(e.none):void 0,t.legacy=void 0!==e.legacy&&null!==e.legacy?u.fromPartial(e.legacy):void 0,t.basic=void 0!==e.basic&&null!==e.basic?c.fromPartial(e.basic):void 0,t.upsellLink=void 0!==e.upsellLink&&null!==e.upsellLink?m.fromPartial(e.upsellLink):void 0,t.engagement=void 0!==e.engagement&&null!==e.engagement?p.fromPartial(e.engagement):void 0,t.multiPass=void 0!==e.multiPass&&null!==e.multiPass?b.fromPartial(e.multiPass):void 0,t.checkoutOnWebOverlay=void 0!==e.checkoutOnWebOverlay&&null!==e.checkoutOnWebOverlay?h.fromPartial(e.checkoutOnWebOverlay):void 0,t.freeCheckout=void 0!==e.freeCheckout&&null!==e.freeCheckout?g.fromPartial(e.freeCheckout):void 0,t.consumptionCapped=void 0!==e.consumptionCapped&&null!==e.consumptionCapped?f.fromPartial(e.consumptionCapped):void 0,t.prompt=void 0!==e.prompt&&null!==e.prompt?y.fromPartial(e.prompt):void 0,t.isUserMemberOfAtLeastOneGroup=e.isUserMemberOfAtLeastOneGroup??!1,t.unlockedBy=e.unlockedBy?.map((e=>e))||[],t.unlockingMethods=e.unlockingMethods?.map((e=>e))||[],t.signifier=void 0!==e.signifier&&null!==e.signifier?l.fromPartial(e.signifier):void 0,t}};const l={encode:(e,t=r().Writer.create())=>(""!==e.text&&t.uint32(10).string(e.text),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={text:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.text=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={text:""};return t.text=e.text??"",t}};const c={encode:(e,t=r().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.body=n.string();continue;case 3:if(26!==e)break;s.cta=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:""};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t}};const u={encode:(e,t=r().Writer.create())=>t,decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={};for(;n.pos<i;){const e=n.uint32();if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>u.fromPartial(e??{}),fromPartial:e=>({})};const d={encode:(e,t=r().Writer.create())=>t,decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={};for(;n.pos<i;){const e=n.uint32();if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>d.fromPartial(e??{}),fromPartial:e=>({})};const m={encode:(e,t=r().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),""!==e.url&&t.uint32(34).string(e.url),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:"",url:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.body=n.string();continue;case 3:if(26!==e)break;s.cta=n.string();continue;case 4:if(34!==e)break;s.url=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>m.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:"",url:""};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t.url=e.url??"",t}};const p={encode:(e,t=r().Writer.create())=>(""!==e.header&&t.uint32(10).string(e.header),""!==e.title&&t.uint32(18).string(e.title),""!==e.body&&t.uint32(26).string(e.body),""!==e.cta&&t.uint32(34).string(e.cta),""!==e.dismiss&&t.uint32(42).string(e.dismiss),""!==e.actionType&&t.uint32(50).string(e.actionType),""!==e.bodySecondary&&t.uint32(58).string(e.bodySecondary),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={header:"",title:"",body:"",cta:"",dismiss:"",actionType:"",bodySecondary:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.header=n.string();continue;case 2:if(18!==e)break;s.title=n.string();continue;case 3:if(26!==e)break;s.body=n.string();continue;case 4:if(34!==e)break;s.cta=n.string();continue;case 5:if(42!==e)break;s.dismiss=n.string();continue;case 6:if(50!==e)break;s.actionType=n.string();continue;case 7:if(58!==e)break;s.bodySecondary=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>p.fromPartial(e??{}),fromPartial(e){const t={header:"",title:"",body:"",cta:"",dismiss:"",actionType:"",bodySecondary:""};return t.header=e.header??"",t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t.dismiss=e.dismiss??"",t.actionType=e.actionType??"",t.bodySecondary=e.bodySecondary??"",t}};const h={encode:(e,t=r().Writer.create())=>(""!==e.cta&&t.uint32(10).string(e.cta),""!==e.snackbarSuccess&&t.uint32(18).string(e.snackbarSuccess),""!==e.snackbarError&&t.uint32(26).string(e.snackbarError),""!==e.snackbarFulfilmentComplete&&t.uint32(34).string(e.snackbarFulfilmentComplete),void 0!==e.price&&s.ZC.encode(e.price,t.uint32(42).fork()).ldelim(),!1!==e.isPriceDisplayed&&t.uint32(48).bool(e.isPriceDisplayed),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={cta:"",snackbarSuccess:"",snackbarError:"",snackbarFulfilmentComplete:"",price:void 0,isPriceDisplayed:!1};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;a.cta=n.string();continue;case 2:if(18!==e)break;a.snackbarSuccess=n.string();continue;case 3:if(26!==e)break;a.snackbarError=n.string();continue;case 4:if(34!==e)break;a.snackbarFulfilmentComplete=n.string();continue;case 5:if(42!==e)break;a.price=s.ZC.decode(n,n.uint32());continue;case 6:if(48!==e)break;a.isPriceDisplayed=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>h.fromPartial(e??{}),fromPartial(e){const t={cta:"",snackbarSuccess:"",snackbarError:"",snackbarFulfilmentComplete:"",price:void 0,isPriceDisplayed:!1};return t.cta=e.cta??"",t.snackbarSuccess=e.snackbarSuccess??"",t.snackbarError=e.snackbarError??"",t.snackbarFulfilmentComplete=e.snackbarFulfilmentComplete??"",t.price=void 0!==e.price&&null!==e.price?s.ZC.fromPartial(e.price):void 0,t.isPriceDisplayed=e.isPriceDisplayed??!1,t}};const g={encode:(e,t=r().Writer.create())=>(""!==e.snackbarAwaitingFulfilment&&t.uint32(10).string(e.snackbarAwaitingFulfilment),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={snackbarAwaitingFulfilment:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.snackbarAwaitingFulfilment=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>g.fromPartial(e??{}),fromPartial(e){const t={snackbarAwaitingFulfilment:""};return t.snackbarAwaitingFulfilment=e.snackbarAwaitingFulfilment??"",t}};const f={encode:(e,t=r().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),void 0!==e.ctaUrl&&t.uint32(34).string(e.ctaUrl),void 0!==e.dismiss&&t.uint32(42).string(e.dismiss),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:"",ctaUrl:void 0,dismiss:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.body=n.string();continue;case 3:if(26!==e)break;s.cta=n.string();continue;case 4:if(34!==e)break;s.ctaUrl=n.string();continue;case 5:if(42!==e)break;s.dismiss=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>f.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:"",ctaUrl:void 0,dismiss:void 0};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t.ctaUrl=e.ctaUrl??void 0,t.dismiss=e.dismiss??void 0,t}};const b={encode(e,t=r().Writer.create()){""!==e.title&&t.uint32(10).string(e.title),""!==e.soaDescription&&t.uint32(18).string(e.soaDescription);for(const n of e.soaPartner)v.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",soaDescription:"",soaPartner:[]};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.soaDescription=n.string();continue;case 3:if(26!==e)break;s.soaPartner.push(v.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>b.fromPartial(e??{}),fromPartial(e){const t={title:"",soaDescription:"",soaPartner:[]};return t.title=e.title??"",t.soaDescription=e.soaDescription??"",t.soaPartner=e.soaPartner?.map((e=>v.fromPartial(e)))||[],t}};const v={encode:(e,t=r().Writer.create())=>(""!==e.displayName&&t.uint32(10).string(e.displayName),""!==e.linkUrl&&t.uint32(18).string(e.linkUrl),""!==e.logoUrl&&t.uint32(26).string(e.logoUrl),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={displayName:"",linkUrl:"",logoUrl:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.displayName=n.string();continue;case 2:if(18!==e)break;s.linkUrl=n.string();continue;case 3:if(26!==e)break;s.logoUrl=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>v.fromPartial(e??{}),fromPartial(e){const t={displayName:"",linkUrl:"",logoUrl:""};return t.displayName=e.displayName??"",t.linkUrl=e.linkUrl??"",t.logoUrl=e.logoUrl??"",t}};const y={encode:(e,t=r().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),""!==e.url&&t.uint32(34).string(e.url),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:"",url:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.body=n.string();continue;case 3:if(26!==e)break;s.cta=n.string();continue;case 4:if(34!==e)break;s.url=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>y.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:"",url:""};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t.url=e.url??"",t}}},79162:(e,t,n)=>{"use strict";n.d(t,{ZC:()=>a});var i=n(59043),r=n.n(i);const s={encode:(e,t=r().Writer.create())=>(0!==e.amount&&t.uint32(9).double(e.amount),""!==e.currency&&t.uint32(18).string(e.currency),""!==e.formattedPrice&&t.uint32(26).string(e.formattedPrice),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={amount:0,currency:"",formattedPrice:""};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(9!==e)break;s.amount=n.double();continue;case 2:if(18!==e)break;s.currency=n.string();continue;case 3:if(26!==e)break;s.formattedPrice=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={amount:0,currency:"",formattedPrice:""};return t.amount=e.amount??0,t.currency=e.currency??"",t.formattedPrice=e.formattedPrice??"",t}};const a={encode:(e,t=r().Writer.create())=>(void 0!==e.finalPrice&&s.encode(e.finalPrice,t.uint32(10).fork()).ldelim(),void 0!==e.finalListPrice&&s.encode(e.finalListPrice,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={finalPrice:void 0,finalListPrice:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;a.finalPrice=s.decode(n,n.uint32());continue;case 2:if(18!==e)break;a.finalListPrice=s.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={finalPrice:void 0,finalListPrice:void 0};return t.finalPrice=void 0!==e.finalPrice&&null!==e.finalPrice?s.fromPartial(e.finalPrice):void 0,t.finalListPrice=void 0!==e.finalListPrice&&null!==e.finalListPrice?s.fromPartial(e.finalListPrice):void 0,t}}},65687:(e,t,n)=>{"use strict";n.d(t,{I:()=>r,p:()=>s});var i=n(37766);let r=function(e){return e.UPDATE_CONNECTIVITY="update_connectivity",e.UPDATE_CAPABILITIES="update_capabilities",e.UPDATE_TOTAL_PROGRESS="update_total_progress",e.UPDATE_CONTEXT_PROGRESS="update_context_progress",e.UPDATE_AVAILABILITY="update_availability",e.ERROR="error",e}({});class s extends i.V{}},39104:(e,t,n)=>{"use strict";n.d(t,{I:()=>l});var i=n(60351),r=n(45640),s=n(85445),a=function(e){return e[e.Unknown=0]="Unknown",e[e.Computer=1]="Computer",e[e.Tablet=2]="Tablet",e[e.Smartphone=3]="Smartphone",e[e.Speaker=4]="Speaker",e[e.TV=5]="TV",e[e.AVR=6]="AVR",e[e.STB=7]="STB",e[e.AudioDongle=8]="AudioDongle",e[e.GameConsole=9]="GameConsole",e[e.CastVideo=10]="CastVideo",e[e.CastAudio=11]="CastAudio",e[e.Automobile=12]="Automobile",e[e.Smartwatch=13]="Smartwatch",e[e.Chromebook=14]="Chromebook",e[e.UnknownSpotifyHardware=100]="UnknownSpotifyHardware",e[e.CarThing=101]="CarThing",e[e.HomeThing=103]="HomeThing",e}(a||{});const o=(0,i.g)(a);function l(e){if(o(e))switch(e){case a.Unknown:return s.bq.UNKNOWN;case a.Computer:return s.bq.COMPUTER;case a.Tablet:return s.bq.TABLET;case a.Smartphone:return s.bq.SMARTPHONE;case a.Speaker:return s.bq.SPEAKER;case a.TV:return s.bq.TV;case a.AVR:return s.bq.AVR;case a.STB:return s.bq.STB;case a.AudioDongle:return s.bq.AUDIO_DONGLE;case a.GameConsole:return s.bq.GAME_CONSOLE;case a.CastVideo:return s.bq.CAST_VIDEO;case a.CastAudio:return s.bq.CAST_AUDIO;case a.Automobile:return s.bq.AUTOMOBILE;case a.Smartwatch:return s.bq.SMARTWATCH;case a.Chromebook:return s.bq.CHROMEBOOK;case a.UnknownSpotifyHardware:return s.bq.UNKNOWN;case a.CarThing:return s.bq.CarThing;case a.HomeThing:return s.bq.HomeThing;default:return(0,r.k)(e),s.bq.UNKNOWN}return s.bq.UNKNOWN}},85961:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s,R:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'OfflineContext' without 'OfflineProvider'!");return e}},35789:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var i=n(77564);function r(e){return[i.kw.YES,i.kw.DOWNLOADING,i.kw.WAITING].includes(e)}},11437:(e,t,n)=>{"use strict";n.d(t,{T:()=>o});var i=n(79474),r=n(65687),s=n(98931),a=n(85961);function o(e){const t=(0,a.Q)(),[n,o]=(0,i.useState)(t.getAvailabilitySync(e)),l=r.I.UPDATE_AVAILABILITY,c=(0,i.useCallback)((t=>{t.data.uri===e&&o(t.data.availability)}),[e]);return(0,s.b)(l,c,{uri:e}),n}},33712:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var i=n(79474),r=n(85961),s=n(11437),a=n(65687),o=n(98931);function l(e,t=!0){const n=(0,r.Q)(),l=function(e,t=!0){const n=(0,r.Q)(),[s,l]=(0,i.useState)(n.getCapabilities().canDownload(e,t)),c=a.I.UPDATE_CAPABILITIES,u=(0,i.useCallback)((n=>l(n.data.capabilites.canDownload(e,t))),[e,t]);return(0,o.b)(c,u),s}(e,t);return{capability:l,availability:(0,s.T)(e),addDownload:(0,i.useCallback)((()=>n.addDownload(e)),[n,e]),removeDownload:(0,i.useCallback)((()=>n.removeDownload(e)),[n,e])}}},81172:(e,t,n)=>{"use strict";n.d(t,{e:()=>a});var i=n(79474),r=n(65687),s=n(98931);function a(e){const[t,n]=(0,i.useState)({syncing:!1,percentage:0,totalItems:0,currentItem:0}),a=r.I.UPDATE_CONTEXT_PROGRESS,o=(0,i.useCallback)((t=>{t.data.uri===e&&n(t.data.progress)}),[e]);return(0,s.b)(a,o,{uri:e}),t}},98931:(e,t,n)=>{"use strict";n.d(t,{b:()=>a});var i=n(79474),r=n(85961),s=n(86892);function a(e,t,n){const a=(0,r.Q)(),o=(0,s.lB)((()=>n),[n]);(0,i.useEffect)((()=>{const n=a.getEvents();return n.addListener(e,t,o),()=>{n.removeListener(e,t,o)}}),[e,t,o,a])}},77564:(e,t,n)=>{"use strict";n.d(t,{NV:()=>a,O4:()=>o,kw:()=>s,uJ:()=>i,vs:()=>r});let i=function(e){return e.ONLINE="online",e.OFFLINE="offline",e.FORCED_OFFLINE="forced_offline",e.RECONNECTING="reconnecting",e}({}),r=function(e){return e[e.NO_CAPABILITY=0]="NO_CAPABILITY",e[e.NO_PERMISSION=1]="NO_PERMISSION",e[e.NO_PERMISSION_HIDE=2]="NO_PERMISSION_HIDE",e[e.YES=3]="YES",e}({}),s=function(e){return e.NO="no",e.YES="yes",e.DOWNLOADING="downloading",e.WAITING="waiting",e}({}),a=function(e){return e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.NO_PERMISSION=2]="NO_PERMISSION",e}({}),o=function(e){return e[e.SUCCESS=0]="SUCCESS",e[e.GENERIC=1]="GENERIC",e[e.DISK_FULL=2]="DISK_FULL",e[e.EXPIRED=3]="EXPIRED",e[e.TOO_MANY_TRACKS=4]="TOO_MANY_TRACKS",e[e.NOT_ALLOWED=5]="NOT_ALLOWED",e[e.CONNECTION_DISABLED=6]="CONNECTION_DISABLED",e[e.DEVICE_LIMIT_REACHED=7]="DEVICE_LIMIT_REACHED",e[e.UNRECOGNIZED=8]="UNRECOGNIZED",e}({})},75958:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,x:()=>r});n(14269);function i(e,t={}){try{const n=document.getElementById(e);return n?JSON.parse(n.innerHTML):t}catch{return t}}function r(e,t={}){try{const i=document.getElementById(e);return i?JSON.parse((n=i.innerHTML,decodeURIComponent(Array.prototype.map.call(atob(n),(function(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`})).join("")))):t}catch{return t}var n}},33482:(e,t,n)=>{"use strict";n.d(t,{Ek:()=>a,My:()=>s});n(73939);var i=n(1816);const r=/Spotify\/(?<version>.+)\s/;function s(){if(!!window.navigator.userAgent.match(r))return i.m.Desktop;const e="serviceWorker"in window.navigator,t=window.matchMedia("(display-mode: standalone)").matches,n="Windows"in window;return e&&(t||n)?i.m.PWA:i.m.Web}function a(){return s()===i.m.Desktop}},73939:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,f:()=>o});var i=n(9856),r=n.n(i),s=n(1816);function a(){const e=r().parse(window.navigator.userAgent).os.name;return"macOS"===e?s.f.macOS:"Windows"===e?s.f.Windows:"Linux"===e?s.f.Linux:"Chrome OS"===e?s.f.ChromeOS:s.f.Other}function o(){return r().getParser(window.navigator.userAgent).getOSName()||"not_applicable"}},26976:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(9856),r=n.n(i);function s(){return"Microsoft Edge"===r().parse(window.navigator.userAgent).browser.name}},9525:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});const i=432;function r(){let e;if("undefined"==typeof window)return!1;if(void 0!==window.orientation)switch(window.orientation){case 0:case 180:e=window.screen.width;break;default:e=window.screen.height}else{const t=window.screen.orientation&&window.screen.orientation.type||window.screen.msOrientation||"";if(0===t.indexOf("portrait"))e=window.screen.width;else{if(0!==t.indexOf("landscape"))return!1;e=window.screen.height}}return e<=i}},87058:(e,t,n)=>{"use strict";function i(e=window.navigator.userAgent){return e.includes("OculusBrowser")}n.d(t,{g:()=>i})},33657:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var i=n(9856),r=n.n(i);function s(){return"Safari"===r().parse(window.navigator.userAgent).browser.name}},1816:(e,t,n)=>{"use strict";n.d(t,{f:()=>r,m:()=>i});let i=function(e){return e.Web="Web",e.PWA="PWA",e.Desktop="Desktop",e}({}),r=function(e){return e.macOS="macOS",e.Windows="Windows",e.Linux="Linux",e.ChromeOS="ChromeOS",e.Other="Other",e}({})},41164:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,n:()=>r});var i=n(37766);let r=function(e){return e.UPDATE="update",e.NORMALIZATION_OVERRIDE_DISABLED="normalizationOverrideDisabled",e}({});class s extends i.V{}},95230:(e,t,n)=>{"use strict";n.d(t,{M:()=>r,N:()=>s});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PlaybackFiltersContext' without 'PlaybackFiltersProvider'!");return e}},52470:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var i=n(79474),r=n(95230);function s(e,t){const n=(0,i.useRef)(t),s=(0,r.N)();n.current=t,(0,i.useEffect)((()=>{const t=s.getFiltersEvents(),i=e=>n.current(e);return t?.addListener(e,i),()=>{t?.removeListener(e,i)}}),[e,s])}},3991:(e,t,n)=>{"use strict";n.d(t,{T:()=>s,_:()=>r});var i=n(37766);let r=function(e){return e.VOLUME="volume",e.INFO="info",e}({});class s extends i.V{}},5679:(e,t,n)=>{"use strict";n.d(t,{T:()=>r,a:()=>s});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PlaybackContext' without 'PlaybackProvider'!");return e}},40893:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var i=n(79474),r=n(5679);function s(e,t){const n=(0,i.useRef)(t),s=(0,r.a)();n.current=t,(0,i.useEffect)((()=>{const t=s.getEvents(),i=e=>n.current(e);return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[e,s])}},13855:(e,t,n)=>{"use strict";n.d(t,{n:()=>o});var i=n(79474),r=n(3991),s=n(5679),a=n(40893);function o(){const e=(0,s.a)(),[t,n]=(0,i.useState)(-1);(0,i.useEffect)((()=>{let t=!0;return(async()=>{const i=await e.getVolume();t&&n(i)})(),()=>{t=!1}}),[e]),(0,a.F)(r._.VOLUME,(e=>n(e.data.volume)));return{volume:t,setVolume:(0,i.useCallback)((t=>{n(t),e.setVolume(t)}),[e]),raiseVolume:(0,i.useCallback)((()=>e.raiseVolume()),[e]),lowerVolume:(0,i.useCallback)((()=>e.lowerVolume()),[e])}}},93314:(e,t,n)=>{"use strict";n.d(t,{Lc:()=>m});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(83856),r=n(35828),s=n(9440),a=n(45640),o=n(3775);n(16990);const l=Spicetify.GraphQL.Definitions["decorateContextEpisodesOrChapters"]=new o.l("decorateContextEpisodesOrChapters","query","8b8d939c5d6da65a3f1b9fbaa96106b27fd6ff1ae7205846d9de3ffbee3298ee",null),c=Spicetify.GraphQL.Definitions["decorateContextTracks"]=new o.l("decorateContextTracks","query","8b8d939c5d6da65a3f1b9fbaa96106b27fd6ff1ae7205846d9de3ffbee3298ee",null);var u=n(92026);function d(e){const t=e??[];return t.length>1?"mixed":0===t.length||t[0]===r.Cx.Audio?"audio":t[0]===r.Cx.Video?"video":"audio"}async function m(e,t,n){const o=Array.from(new Set(n.map((e=>e.uri)).filter((e=>!t.has(e))))),m=o.filter((e=>(0,i.U_)(e))),p=o.filter((e=>(0,i.gH)(e))),[h,g]=await Promise.all([m.length>0?e(c,{uris:m},["uris"]):Promise.resolve([]),p.length>0?e(l,{uris:p},["uris"]):Promise.resolve([])]);return[...h.reduce(((e,t)=>e.concat(t.tracks??[])),[]),...g.reduce(((e,t)=>e.concat(t.episodes??[])),[])].map((e=>"GenericError"===e.__typename||"NotFound"===e.__typename||"RestrictedContent"===e.__typename?null:function(e){return"Track"===e.__typename}(e)?function(e){return{type:s.c.TRACK,uri:e.uri,name:e.name,mediaType:"audio",duration:{milliseconds:e.duration.totalMilliseconds},album:{type:s.c.ALBUM,uri:e.albumOfTrack?.uri??"",name:e.albumOfTrack?.name??"",images:e.albumOfTrack?.coverArt?.sources.map((e=>(0,u.m)(e)))??[]},artists:e.artists.items.map((e=>({type:s.c.ARTIST,uri:e.uri,name:e.profile.name}))),isLocal:!1,isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus,hasAssociatedVideo:(e.associations?.associatedVideos?.totalCount||0)>0,get images(){return this.album.images},uid:null,provider:null}}(e):function(e){return"Episode"===e.__typename}(e)?function(e){if("Podcast"!==e.podcastV2.data.__typename)return null;const t=e.podcastV2.data;return{type:s.c.EPISODE,uri:e.uri,name:e.name??"",mediaType:d(e.mediaTypes),duration:{milliseconds:e.duration.totalMilliseconds},show:{type:s.c.SHOW,uri:t.uri??"",name:t.name??"",images:t.coverArt?.sources.map((e=>(0,u.m)(e)))??[]},isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus,get images(){return this.show.images},uid:null,provider:null}}(e):function(e){return"Chapter"===e.__typename}(e)?function(e){if("Audiobook"!==e.audiobookV2.data.__typename)return null;const t=e.audiobookV2.data;return{type:s.c.CHAPTER,uri:e.uri,name:e.name??"",mediaType:d(e.mediaTypes),duration:{milliseconds:e.duration.totalMilliseconds},book:{type:s.c.AUDIOBOOK,uri:t.uri??"",name:t.name??"",images:t.coverArt?.sources.map((e=>(0,u.m)(e)))??[]},isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus,get images(){return this.book.images},uid:null,provider:null}}(e):((0,a.k)(e),null))).forEach((e=>{null!==e&&t.set(e.uri,e)})),n.map((e=>({...e,...t.get(e.uri),uid:e.uid,provider:e.provider})))}},67922:(e,t,n)=>{"use strict";n.d(t,{K7:()=>s,Z9:()=>r,bt:()=>l,q3:()=>o});let i=function(e){return e[e.TRANSIENT=0]="TRANSIENT",e[e.PERSISTENT=1]="PERSISTENT",e}({}),r=function(e){return e.SUCCESS="success",e.PLAYBACK_STUCK="playback_stuck",e.PLAYBACK_ERROR="playback_error",e.LICENSE_CHANGE="license_change",e.PLAY_RESTRICTED="play_restricted",e.STOP_RESTRICTED="stop_restricted",e.UPDATE_RESTRICTED="update_restricted",e.PAUSE_RESTRICTED="pause_restricted",e.RESUME_RESTRICTED="resume_restricted",e.SKIP_TO_PREV_RESTRICTED="skip_to_prev_restricted",e.SKIP_TO_NEXT_RESTRICTED="skip_to_next_restricted",e.SKIP_TO_NON_EXISTENT_TRACK="skip_to_non_existent_track",e.TOGGLE_REPEAT_CONTEXT_RESTRICTED="toggle_repeat_context_restricted",e.TOGGLE_REPEAT_TRACK_RESTRICTED="toggle_repeat_track_restricted",e.SET_OPTIONS_RESTRICTED="set_options_restricted",e.TOGGLE_SHUFFLE_RESTRICTED="toggle_shuffle_restricted",e.SET_QUEUE_RESTRICTED="set_queue_restricted",e.INTERRUPT_PLAYBACK_RESTRICTED="interrupt_playback_restricted",e.SEEK_TO_RESTRICTED="seek_to_restricted",e.ONE_TRACK_UNPLAYABLE="one_track_unplayable",e.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED="one_track_unplayable_auto_stopped",e.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED="all_tracks_unplayable_auto_stopped",e.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED="skip_to_non_existent_track_auto_stopped",e.QUEUE_REVISION_MISMATCH="queue_revision_mismatch",e.VIDEO_PLAYBACK_ERROR="video_playback_error",e.VIDEO_GEORESTRICTED="video_georestricted",e.VIDEO_UNSUPPORTED_PLATFORM_VERSION="video_unsupported_platform_version",e.VIDEO_UNSUPPORTED_CLIENT_VERSION="video_unsupported_client_version",e.VIDEO_UNSUPPORTED_KEY_SYSTEM="video_unsupported_key_system",e.VIDEO_COUNTRY_RESTRICTED="video_country_restricted",e.VIDEO_UNAVAILABLE="video_unavailable",e.VIDEO_CATALOGUE_RESTRICTED="video_catalogue_restricted",e.VIDEO_MANIFEST_DELETED="video_manifest_deleted",e.TIMEOUT="timeout",e.INVALID="invalid",e.PLAYBACK_REPORTING_ERROR="playback_reporting_error",e.AUDIOBOOK_NOT_PLAYABLE="audiobook_not_playable",e.UNKNOWN="unknown",e.UNRECOGNIZED="unrecognized",e}({}),s=function(e){return e.AD_DISALLOW="ad_disallow",e.AGE_RESTRICTION_FILTERED="age_restriction_filtered",e.ALREADY_PAUSED="already_paused",e.ALREADY_PLAYING="already_playing",e.BANNED_BY_USER_TRACK="banned_by_user/track",e.BANNED_BY_USER_ALBUM="banned_by_user/album",e.BANNED_BY_USER_ARTIST="banned_by_user/artist",e.CONTEXT_PLAYER_DISALLOW="context_player_disallow",e.ENDLESS_CONTEXT="endless_context",e.EXPLICIT_CONTENT_FILTERED="explicit_content_filtered",e.LOCAL_FILE_BAD_FORMAT="local_file_bad_format",e.LOCAL_FILE_DRM_PROTECTED="local_file_drm_protected",e.LOCAL_FILE_NOT_FOUND="local_file_not_found",e.MFT_DISALLOW="mft_disallow",e.MFT_DISALLOW_MISSING_TRAC="mft_disallow_missing_trac",e.NEWS_SET_TRACK_FILTERED="news_set_track_filtered",e.NO_NEXT_TRACK="no_next_track",e.NO_PREV_TRACK="no_prev_track",e.NO_SPECIFIC_TRACK="no_specific_track",e.NOT_AVAILABLE="not_available",e.NOT_AVAILABLE_BY_ARTIST_BAN="not_available_by_artist_ban",e.NOT_AVAILABLE_IN_CURRENT_REGION="not_available_in_current_region",e.NOT_AVAILABLE_IN_NON_PREMIUM="not_available_in_non_premium",e.NOT_AVAILABLE_OFFLINE="not_available_offline",e.NOT_AVAILABLE_ON_MOBILE_NETWORK="not_available_on_mobile_network",e.NOT_PAUSED="not_paused",e.NOT_PLAYING_CONTEXT="not_playing_context",e.NOT_PLAYING_LOCALLY="not_playing_locally",e.NOT_PLAYING_TRACK="not_playing_track",e.OFFLINE_CAPPING_REACHED="offline_capping_reached",e.PLAYER_CONTEXT_DISALLOW="player_context_disallow",e.PROTOCOL_LIMITATIONS="protocol_limitations",e.PROTOCOL_LIMITIATIONS="protocol_limitiations",e.THROTTLED="throttled",e.UNKNOWN="unknown",e.UNSUPPORTED_FILE_FORMAT="unsupported_file_format",e.USER_CAPPING_REACHED="user_capping_reached",e.USER_STREAMING_DISALLOWED="user_streaming_disallowed",e}({});class a extends Error{constructor(e,t,n,i=void 0){super(a.getMessage(t,n,i)),this.type=e,this.code=t,this.reasons=n,this.cause=i}static getMessage(e,t,n=void 0){return t.length>0?`Code '${e}' with reasons '${t.join(", ")}'`:void 0!==n?`Code '${e}' with cause '${n.name}: ${n.message}'`:`Code '${e}'`}}class o extends a{constructor(e,t,n=void 0){super(i.TRANSIENT,e,t,n)}}class l extends a{constructor(e,t,n=void 0){super(i.PERSISTENT,e,t,n)}}},14255:(e,t,n)=>{"use strict";n.d(t,{Ik:()=>s,JW:()=>o,UC:()=>a,gd:()=>r});var i=n(37766);let r=function(e){return e.UPDATE="update",e.ERROR="error",e.ACTION="action",e.QUEUE_ACTION="queue_action",e.QUEUE_ACTION_COMPLETE="queue_action_complete",e.QUEUE_UPDATE="queue_update",e.CONTEXT_WRAPAROUND="context_wraparound",e}({}),s=function(e){return e.PLAY="play",e.PAUSE="pause",e.RESUME="resume",e.SKIP_TO_NEXT="skipToNext",e.SKIP_TO_PREVIOUS="skipToPrevious",e}({}),a=function(e){return e.ADD="add",e.REMOVE="remove",e.CLEAR="clear",e.INSERT="insert",e.REORDER="reorder",e}({});class o extends i.V{emitPlaySync(e,t,n){const{defaultPrevented:i}=this.emitSync(r.ACTION,{action:s.PLAY,context:e,origin:t,options:n});return i}emitPauseSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:s.PAUSE});return e}emitResumeSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:s.RESUME});return e}emitSkipToNextSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:s.SKIP_TO_NEXT});return e}emitSkipToPreviousSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:s.SKIP_TO_PREVIOUS});return e}emitQueueActionSync(e){const{defaultPrevented:t}=this.emitSync(r.QUEUE_ACTION,{action:e});return t}emitQueueActionComplete(e,t=null){this.emit(r.QUEUE_ACTION_COMPLETE,{action:e,error:t})}emitQueueUpdate(e){this.emit(r.QUEUE_UPDATE,e)}}},68102:(e,t,n)=>{"use strict";n.d(t,{F7:()=>s,Ue:()=>o,ds:()=>a});var i=n(68248),r=n(13781);function s(e){return`Partner spotify ${e}`}function a(e,t){return(0,i.Wq)({transport:e,...t})}function o(e){return a((0,r.V)(),{platform_identifier:s("desktop"),config:e,autoActivateElement:!0})}},87687:(e,t,n)=>{"use strict";n.d(t,{K:()=>s,T:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PlayerContext' without 'PlayerProvider'!");return e}},26271:(e,t,n)=>{"use strict";n.d(t,{P:()=>d});var i=n(79474),r=n(45640),s=n(87687),a=n(53098),o=n(73604);function l(e,t,n,i,s,o){switch(t){case a.i.NOT_ACTIVE:o?o():e.play(n,i,s);break;case a.i.PLAYING:e.pause();break;case a.i.PAUSED:e.resume();break;default:(0,r.d)(t)}}function c(e,t,n,r,s,a){const c=(0,i.useRef)(a);c.current=a;const{playbackStatus:u,isActive:d,isPlaying:m}=(0,o.t6)({contextURI:t.current.uri,...r.current,...a}),p=(0,i.useCallback)(((i,a)=>{a?a():e.play(t.current,n.current,{...s.current,...i,skipTo:{...r.current,...c.current}})}),[e,t,n,s,r]),h=(0,i.useCallback)(((i,a)=>{l(e,u,t.current,n.current,{...s.current,...i,skipTo:{...r.current,...c.current}},a)}),[e,u,t,n,s,r]);return{playbackStatus:u,isActive:d,isPlaying:m,triggerPlay:p,togglePlay:h}}function u(e,t,n,r,s){const[a,u]=function(e,t,n){return e.getCapabilities().canPlayMultipleContextPages||void 0===n.pageURI?[t,n]:[{current:{uri:n.pageURI,metadata:t.current.metadata}},{pageURI:n.pageURI,pageIndex:0}]}(e,t,s),d=(0,i.useRef)(u);d.current=u;const{playbackStatus:m,isActive:p,isPlaying:h}=(0,o.ke)({contextURI:a.current.uri,pageIndex:u.pageIndex,pageURI:u.pageURI}),g=(0,i.useMemo)((()=>c.bind(null,e,a,n,d,r)),[e,a,n,r]),f=(0,i.useCallback)(((t,i)=>{i?i():e.play(a.current,n.current,{...r.current,...t,skipTo:d.current})}),[e,a,n,r]),b=(0,i.useCallback)(((t,i)=>{l(e,m,a.current,n.current,{...r.current,...t,skipTo:d.current},i)}),[e,m,a,n,r]);return{playbackStatus:m,isActive:p,isPlaying:h,triggerPlay:f,togglePlay:b,usePlayContextItem:g}}function d(e,t,n){const r=(0,s.K)(),a={...t,referrerIdentifier:t.referrerIdentifier??r.getReferrer()},d=(0,i.useRef)(e),m=(0,i.useRef)(a),p=(0,i.useRef)(n);d.current=e,m.current=a,p.current=n;const{playbackStatus:h,isActive:g,isPlaying:f}=(0,o.l_)(e.uri),b=(0,i.useMemo)((()=>u.bind(null,r,d,m,p)),[r]),v=(0,i.useMemo)((()=>c.bind(null,r,d,m,{current:null},p)),[r]),y=(0,i.useCallback)(((e,t)=>{r.play(t??d.current,m.current,{...p.current,...e})}),[r]),_=(0,i.useCallback)(((e,t)=>{l(r,h,t??d.current,m.current,{...p.current,...e})}),[r,h]);return{playbackStatus:h,isActive:g,isPlaying:f,triggerPlay:y,togglePlay:_,usePlayContextPage:b,usePlayContextItem:v}}},95799:(e,t,n)=>{"use strict";n.d(t,{V:()=>o});var i=n(38996),r=n(87687),s=n(30232),a=n(37693);function o(){const e=(0,r.K)();return{...(0,s.o)((e=>({shuffle:e?.shuffle??!1,repeat:e?.repeat??i.p.REPEAT_NONE,speed:e?.speed??0,canToggleShuffle:e?.restrictions.canToggleShuffle??!1,canToggleRepeatContext:e?.restrictions.canToggleRepeatContext??!1,canToggleRepeatTrack:e?.restrictions.canToggleRepeatTrack??!1})),a.a),canChangeSpeed:e.getCapabilities().canChangeSpeed,setShuffle:e.setShuffle.bind(e),setRepeat:e.setRepeat.bind(e),setSpeed:e.setSpeed.bind(e)}}},19645:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var i=n(79474),r=n(87687),s=n(34310);function a(e,t){const n=(0,i.useRef)(t),a=(0,r.K)(),o=(0,s.a)();(0,i.useLayoutEffect)((()=>{n.current=t})),(0,i.useEffect)((()=>{const t=a.getEvents(),i=e=>{o()&&n.current(e)};return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[e,o,a])}},70974:(e,t,n)=>{"use strict";n.d(t,{S:()=>c,f:()=>u});var i=n(79474),r=n(10551),s=n(30232),a=n(39927);const o=()=>!0;function l(e,t=o,n){const r=(0,a.ox)(),l=(0,s.o)((e=>e),((e,t)=>e?.timestamp===t?.timestamp&&e?.positionAsOfTimestamp===t?.positionAsOfTimestamp&&e?.duration===t?.duration&&e?.speed===t?.speed&&e?.hasContext===t?.hasContext&&e?.isPaused===t?.isPaused&&e?.isBuffering===t?.isBuffering)),[c,u]=(0,i.useState)((()=>null===l||t(l)?n(l)??0:0)),[d,m]=(0,i.useState)(!1),[p,h]=(0,i.useState)(null),g=(0,i.useCallback)((()=>{m(!0),setTimeout((()=>m(!1)),Math.floor(1e3/60))}),[]),f=(0,i.useCallback)((e=>{h(e),g()}),[g]),b=(0,i.useRef)(t);return b.current=t,(0,i.useEffect)((()=>{(null===l||b.current(l))&&(u(n(l)??0),l?.isPaused?m(!0):g())}),[l,n,g]),(0,i.useEffect)((()=>{l?.isPaused||l?.isBuffering||(h(null),g())}),[l?.timestamp,l?.isPaused,l?.isBuffering,g]),(0,i.useEffect)((()=>{let t=!0;if(null===l||!l.hasContext||l.isPaused||!b.current(l))return()=>{};u(n(l)??0),m(!0);const i=r?.setInterval((()=>{if(t){const e=n(l);u(e??0),m(!1)}}),e);return()=>{t=!1,null!==i&&r?.clearInterval(i)}}),[r,l,e,n]),[p??c,f,d]}function c(e,t=o){return l(e,t,r.s)}function u(e,t=o){return l(e,t,r.F)}},73604:(e,t,n)=>{"use strict";n.d(t,{GK:()=>d,gC:()=>a,ke:()=>l,l_:()=>o,t6:()=>u,te:()=>c});var i=n(53098),r=n(69632),s=n(30232);function a(e){const t=(0,s.o)(e);return{playbackStatus:t,isActive:t!==i.i.NOT_ACTIVE,isPlaying:t===i.i.PLAYING}}function o(e){return a((t=>(0,r.yc)(t,e)))}function l(e){return a((t=>(0,r.dt)(t,e)))}function c(e){return a((t=>(0,r.Ok)(t,e)))}function u(e){return a((t=>(0,r.cA)(t,e)))}function d(){return a((e=>(0,r.uW)(e)))}},95666:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var i=n(79474),r=n(14255),s=n(87687),a=n(19645);function o(){const e=(0,s.K)(),[t,n]=(0,i.useState)(e.getQueue());return(0,a.p)(r.gd.QUEUE_UPDATE,(e=>n(e.data))),t}},58445:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var i=n(79474),r=n(9440),s=n(87687),a=n(30232);const o=5e3,l=15e3;function c(){const e=(0,s.K)(),t=function(e){return e===r.c.TRACK?o:e===r.c.EPISODE?l:0}((0,a.o)((e=>e?.item?.type)));return{seekBackward:(0,i.useCallback)((()=>(0!==t&&e.seekBackward(t),t)),[e,t]),seekForward:(0,i.useCallback)((()=>(0!==t&&e.seekForward(t),t)),[e,t]),seekOffsetMs:t}}},30232:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var i=n(79474),r=n(14255),s=n(87687),a=n(19645);function o(e,t=((e,t)=>e===t)){const n=(0,s.K)().getState(),[o,l]=(0,i.useState)(e(n));return(0,a.p)(r.gd.UPDATE,(n=>{const i=e(n.data);t(o,i)||l(i)})),o}},82433:(e,t,n)=>{"use strict";n.d(t,{f:()=>c});var i=n(34074),r=n(30232),s=n(37693),a=n(83856),o=n(14056);function l(e){if(e?.metadata?.[i.W.CONTEXT_DESCRIPTION])return e.metadata[i.W.CONTEXT_DESCRIPTION];const t=(0,a.o_)(e?.uri);if(t?.type===a.NQ.COLLECTION){const{category:e}=t;if("your-episodes"===e)return o.Ru.get("sidebar.your_episodes");if(void 0===e)return o.Ru.get("sidebar.liked_songs")}return null}function c(){return(0,r.o)((e=>({uri:e?.context.uri??null,description:l(e?.context)})),s.a)}},34074:(e,t,n)=>{"use strict";n.d(t,{I:()=>r,W:()=>i});let i=function(e){return e.CONTEXT_DESCRIPTION="context_description",e.IS_AUDIOBOOK="is_audiobook",e.REPORTING_URI="reporting.uri",e.FILTERING_PREDICATE="filtering.predicate",e.SORTING_CRITERIA="sorting.criteria",e.LIST_UTIL_FILTER="list_util_filter",e.LIST_UTIL_SORT="list_util_sort",e}({}),r=function(e){return e.ALBUM_URI="album_uri",e.ARTIST_NAME="artist_name",e.ARTIST_URI="artist_uri",e.DURATION="duration",e.HAS_SEGMENTS="has_display_segments",e.SEGMENT_INDEX="segment.index",e.HAS_LYRICS="has_lyrics",e.PARENT_EPISODE_URI="parent_episode.uri",e.PAGE_INSTANCE_ID="page_instance_id",e.IMAGE_URL="image_url",e}({})},39730:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});let i=function(e){return e.SWITCH_TO_VIDEO="switch-to-video",e.SWITCH_TO_AUDIO="switch-to-audio",e.JUMP="jump",e}({})},57442:(e,t,n)=>{"use strict";n.d(t,{Yn:()=>i,ZT:()=>r,d4:()=>s});let i=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.LOW=1]="LOW",e[e.NORMAL=2]="NORMAL",e[e.HIGH=3]="HIGH",e[e.VERY_HIGH=4]="VERY_HIGH",e[e.HIFI=5]="HIFI",e[e.HIFI24=6]="HIFI24",e}({}),r=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.BEST_MATCHING=1]="BEST_MATCHING",e[e.BACKEND_ADVISED=2]="BACKEND_ADVISED",e[e.OFFLINED_FILE=3]="OFFLINED_FILE",e[e.CACHED_FILE=4]="CACHED_FILE",e[e.LOCAL_FILE=5]="LOCAL_FILE",e}({}),s=function(e){return e[e.NONE=0]="NONE",e[e.OFF=1]="OFF",e[e.ON=2]="ON",e}({})},53098:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});let i=function(e){return e[e.NOT_ACTIVE=0]="NOT_ACTIVE",e[e.PLAYING=1]="PLAYING",e[e.PAUSED=2]="PAUSED",e}({})},38996:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});let i=function(e){return e[e.REPEAT_NONE=0]="REPEAT_NONE",e[e.REPEAT_CONTEXT=1]="REPEAT_CONTEXT",e[e.REPEAT_TRACK=2]="REPEAT_TRACK",e}({})},48450:(e,t,n)=>{"use strict";n.d(t,{D:()=>i});const i=["not_playing_locally","not_playing_context","not_playing_track","no_prev_track","no_next_track","no_specific_track","already_paused","not_paused","context_player_disallow","mft_disallow","ad_disallow","protocol_limitations","unknown","already_playing","throttled","endless_context","autoplay","narration"]},33082:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var i=n(9440);function r(e){return e?.type===i.c.AD}},41982:(e,t,n)=>{"use strict";n.d(t,{d:()=>r});var i=n(9440);function r(e){return e?.type===i.c.CHAPTER}},57506:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(9440);function r(e){return e?.type===i.c.EPISODE}},86412:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(9440);function r(e){return e?.type===i.c.TRACK}},54260:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(9440);function r(e){return e?.type===i.c.UNKNOWN}},10551:(e,t,n)=>{"use strict";function i(e,t){if(null===e||null===t||null===e.duration)return null;const{timestamp:n,duration:i,speed:r,hasContext:s,isPaused:a,isBuffering:o}=e;if(!s||a||o)return t;const l=(Date.now()-n)*(r??0);return Math.min(t+l,i)}function r(e){return i(e,e?.positionAsOfTimestamp??null)}function s(e){const t=parseInt(e?.item?.metadata?.["segment.position_as_of_timestamp"]??"",10),n=e?.positionAsOfTimestamp??null;return i(e,isNaN(t)?n:t)}n.d(t,{F:()=>s,s:()=>r})},76663:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(45640),r=n(87512);const s=e=>{if("boolean"==typeof e)return e;switch(e){case r.j.OFF:return!1;case r.j.ON:case r.j.SMART_SHUFFLE:return!0;default:return(0,i.k)(e),!1}}},8595:(e,t,n)=>{"use strict";function i(e){const t=e?.uri;return Boolean(t)&&""!==t&&"invalid_context_uri"!==t}n.d(t,{O:()=>i})},69632:(e,t,n)=>{"use strict";n.d(t,{A3:()=>_,Ok:()=>v,Q3:()=>E,b8:()=>m,cA:()=>y,dt:()=>b,uW:()=>g,yc:()=>f});var i=n(83856),r=n(34074),s=n(33082),a=n(57506),o=n(86412),l=n(53098),c=n(57442),u=n(9440),d=n(45640);function m(e,t){const n=(0,i.o_)(e,{parseUnknown:!0}),r=(0,i.o_)(t,{parseUnknown:!0});return!(!n||!r)&&((0,i.B2)(n,r)??!1)}function p(e){return"queue"===e?.provider}function h(e,t){if(null===e)return!1;switch(e.type){case u.c.TRACK:if(m(e.album.uri,t)||m(e.uri,t))return!0;break;case u.c.EPISODE:if(m(e.show.uri,t)||m(e.uri,t))return!0;break;case u.c.CHAPTER:if(m(e.book.uri,t)||m(e.uri,t))return!0;break;case u.c.AD:case u.c.UNKNOWN:break;default:(0,d.d)(e)}return!1}function g(e){return null!==e&&e.hasContext?e.isPaused?l.i.PAUSED:l.i.PLAYING:l.i.NOT_ACTIVE}function f(e,t){return null===e?l.i.NOT_ACTIVE:(!p(e.item)&&(n=e.item,"autoplay"!==n?.provider)||h(e.item,t??null))&&(m(e.context.uri,t??null)||m(e.index?.pageURI??null,t??null)||m(e.item?.uri??null,e.context.uri??null)&&h(e.item,t??null))?g(e):l.i.NOT_ACTIVE;var n}function b(e,{contextURI:t,pageIndex:n,pageURI:i}){if(null===e)return l.i.NOT_ACTIVE;if(p(e.item)&&!h(e.item,i??null))return l.i.NOT_ACTIVE;if(m(e.context.uri,t??null)){if(r=e.index.pageIndex??null,s=n??null,null!==r&&null!==s&&r===s)return g(e);if(m(e.index.pageURI??null,i??null))return g(e)}var r,s;return m(e.context.uri,i??null)?g(e):l.i.NOT_ACTIVE}function v(e,t){return null===e?l.i.NOT_ACTIVE:m(e.item?.uri??null,t??null)?g(e):l.i.NOT_ACTIVE}function y(e,t){if(null===e)return l.i.NOT_ACTIVE;let n=function(e,t){if(!p(e.item))return l.i.NOT_ACTIVE;const{item:n}=e;if(m(n.uri,t.uri??null)){if(h(n,t.contextURI??null))return g(e);if(h(n,t.pageURI??null))return g(e)}return l.i.NOT_ACTIVE}(e,t);return n!==l.i.NOT_ACTIVE?n:(n=f(e,t.contextURI),n===l.i.NOT_ACTIVE&&(n=f(e,t.pageURI),n===l.i.NOT_ACTIVE)?l.i.NOT_ACTIVE:void 0!==t.uid?e.item?.uid===t.uid?n:l.i.NOT_ACTIVE:void 0!==t.uri?e.item?.uri===t.uri||e.item?.metadata&&e.item.metadata[r.I.PARENT_EPISODE_URI]===t.uri?n:l.i.NOT_ACTIVE:void 0!==t.index&&e.index.itemIndex===t.index?n:l.i.NOT_ACTIVE)}function _(e){const t=e?.item??void 0;if((0,o.v)(t)||(0,a.p)(t)||(0,s.N)(t)){return("video"===t.mediaType||"mixed"===t.mediaType)&&e?.playbackQuality.strategy!==c.ZT.OFFLINED_FILE}return!1}function E(e){return"true"===String(e?.context.metadata?.is_audiobook)}},14763:(e,t,n)=>{"use strict";n.d(t,{RU:()=>o,Ry:()=>a,jl:()=>s});var i=n(38996),r=n(9440);function s(e,t,n,i,r,s){const a=t.find((e=>i(n.after||n.before,e)));if(!a)return t;const o=[];e.forEach((e=>{const n=t.find((t=>i(e,t)));n&&o.push(n)}));const l=t.filter((e=>!o.includes(e))),c=o.map((e=>r(a)?s(e):e)),u=a?l.indexOf(a):0;return n.after?l.splice(u+1,0,...c):l.splice(u,0,...c),l}function a(e,t,n,i,r,s){const a=t.find((e=>i(n.after||n.before,e)));if(!a)return t;const o=e.map((e=>s(e,r(a)))),l=t.indexOf(a);return n.after?t.splice(l+1,0,...o):t.splice(l,0,...o),t}function o(e,t,n){if(0===e.length)return{current:null,queued:[],nextUp:[]};const s=t===i.p.REPEAT_CONTEXT&&n?2:1,a=[];let o=0;const l=e[0];for(let t=1;t<e.length;t++){const{type:n,uri:i,metadata:{hidden:l,availability_restrictions:c}={}}=e[t],u="spotify:delimiter"===i||"spotify:meta:delimiter"===i;if(u&&++o>=s)break;const d=i.startsWith("spotify:meta:"),m=n!==r.c.UNKNOWN&&c;d||u||"true"===l||m||a.push(e[t])}const c=a.findIndex((({provider:e})=>"queue"!==e));return{current:l,queued:-1===c?a:a.slice(0,c),nextUp:-1===c?[]:a.slice(c)}}},46724:(e,t,n)=>{"use strict";n.d(t,{f0:()=>s});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);const i="enhance",r="spotify-apply-lenses";function s(e,t){const n=new URL(e),s=new Set(n.searchParams.get(r)?.split(","));return t?s.add(i):s.delete(i),s.size?n.searchParams.set(r,[...s].join(",")):n.searchParams.delete(r),n.toString()}},54361:(e,t,n)=>{"use strict";n.d(t,{Lj:()=>s,Y0:()=>a,sP:()=>r});var i=n(37766);let r=function(e){return e.ADD="add",e.MOVE="move",e.REMOVE="remove",e.UPDATE="update",e.SET_COLLABORATIVE="set_collaborative",e.SIGNAL="signal",e}({}),s=function(e){return e.UPDATE="update",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{}},70602:(e,t,n)=>{"use strict";n.d(t,{HI:()=>s,Hh:()=>i,QG:()=>a,tl:()=>r});let i=function(e){return e.TEXT="TEXT",e}({}),r=function(e){return e.CONTAINS="CONTAINS",e}({});function s(e){if(e)return"string"==typeof e?{field:i.TEXT,operator:r.CONTAINS,value:e.trim()}:e}function a(e){if(e)return"string"==typeof e?e.trim():e.value.trim()}},48475:(e,t,n)=>{"use strict";n.d(t,{GV:()=>s,KD:()=>a,mA:()=>r});var i=n(37766);let r=function(e){return e.CLAIM_PERMISSION="claim_permission",e.REMOVE_MEMBER="remove_member",e.SET_MEMBER_PERMISSION="set_member_permission",e.SET_BASE_PERMISSION="set_base_permission",e.GET_PERMISSION_GRANT="get_permission_grant",e}({}),s=function(e){return e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{emitOperationSync(e){return this.emitSync(s.OPERATION,e).defaultPrevented}emitOperationComplete(e,t=null){this.emit(s.OPERATION_COMPLETE,{...e,error:t})}}},69640:(e,t,n)=>{"use strict";n.d(t,{Af:()=>s,nw:()=>a,sA:()=>r,xB:()=>o});var i=n(8012);n(33924);function r(e){return"folder"===e.type}function s(e){return"playlist"===e.type}let a=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e.RECENTLY_PLAYED="RECENTLY_PLAYED",e.RELEVANCE="RELEVANCE",e.AVAILABLE_OFFLINE="AVAILABLE_OFFLINE",e}({}),o=function(e){return e.ASC="ASC",e.DESC="DESC",e}({});(0,i.u)("RootlistAPI")},26831:(e,t,n)=>{"use strict";n.d(t,{OO:()=>a,tD:()=>s,ut:()=>r});var i=n(37766);let r=function(e){return e.ADD="add",e.MOVE="move",e.REMOVE="remove",e.CREATE_PLAYLIST="create_playlist",e}({}),s=function(e){return e.UPDATE="update",e.UPDATE_ITEM="update_item",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{}},33924:(e,t,n)=>{"use strict";n.d(t,{QG:()=>i});function i(e){if(e)return"string"==typeof e?e.trim():e.value.trim()}},90539:(e,t,n)=>{"use strict";n.d(t,{a:()=>l});var i=n(27631),r=n(36657),s=n(70964);function a(e){return t=e,Object.prototype.hasOwnProperty.call(t,"uid")?{itemId:(0,s.xJ)(e.uid)}:{};var t}function o(e){const{before:t,after:n}=e;return"start"===t?{addFirst:!0}:void 0!==t?{addBeforeItem:{uri:(0,r.DY)(t.uri),attributes:a(t)}}:"end"===n?{addLast:!0}:void 0!==n?{addAfterItem:{uri:(0,r.DY)(n.uri),attributes:a(n)}}:{}}class l{_ops=[];_needsBaseRevision=!1;add(e,t,n=Date.now()){return this._ops.push({kind:i.H1.ADD,add:{...o(t),items:e.map((e=>({uri:e,attributes:{timestamp:n.toString()}})))}}),this}addByIndex(e,t,n,r=Date.now()){var s,a;return this._needsBaseRevision=!0,this._ops.push({kind:i.H1.ADD,add:{...(s=e,a=t,0===s?{addFirst:!0}:s>=a?{addLast:!0}:{fromIndex:s}),items:n.map((e=>({uri:e,attributes:{timestamp:r.toString()}})))}}),this}removeByIndex(e,t=1){return this._needsBaseRevision=!0,this._ops.push({kind:i.H1.REM,rem:{fromIndex:e,length:t}}),this}remove(e){return this._ops.push({kind:i.H1.REM,rem:{itemsAsKey:!0,items:e.map((e=>({uri:e.uri})))}}),this}move(e,t){return this._ops.push({kind:i.H1.MOV,mov:{items:e.map((e=>({uri:e.uri,attributes:a(e)}))),...o(t)}}),this}moveByIndex(e,t,n=1){return this._needsBaseRevision=!0,this._ops.push({kind:i.H1.MOV,mov:{fromIndex:e,toIndex:t,length:n}}),this}updateListAttributes(e){return this._ops.push({kind:i.H1.UPDATE_LIST_ATTRIBUTES,updateListAttributes:e}),this}updateItemAttributes(e){return this._ops.push({kind:i.H1.UPDATE_ITEM_ATTRIBUTES,updateItemAttributes:e}),this}buildDelta(){return{ops:this._ops,info:{source:{client:i.Gv.WEBPLAYER}}}}buildListChanges(e){if(this._needsBaseRevision&&void 0===e)throw new Error("Operation needs base revision, which was not provided!");return{baseRevision:e,deltas:[this.buildDelta()],wantResultingRevisions:!1,wantSyncResult:!1,nonces:[]}}}},34840:(e,t,n)=>{"use strict";n.d(t,{N:()=>s});var i=n(67910),r=n(54361);class s extends r.Y0{constructor(){super(),this._aggregator=(0,i.XT)(this.onBatchChanged.bind(this)),this.onAddListener(r.Lj.UPDATE,(e=>{const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(r.Lj.UPDATE,(e=>{const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)}))}emitAddSync(e,t,n){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.ADD,uri:e,items:t,silent:n}).defaultPrevented}emitMoveSync(e,t){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.MOVE,uri:e,items:t}).defaultPrevented}emitRemoveSync(e,t,n){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.REMOVE,uri:e,items:t,silent:n}).defaultPrevented}emitUpdateSync(e,t){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.UPDATE,uri:e,details:t}).defaultPrevented}emitSendSignalSync(e,t,n){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.SIGNAL,uri:e,itemId:n,signalIdentifier:t}).defaultPrevented}emitAddComplete(e,t=null,n=[],i){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.ADD,uri:e,uris:n,error:t,silent:i})}emitMoveComplete(e,t=null,n=[]){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.MOVE,uri:e,items:n,error:t})}emitRemoveComplete(e,t=null,n=[],i){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.REMOVE,uri:e,items:n,error:t,silent:i})}emitUpdateComplete(e,t=null,n={}){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.UPDATE,uri:e,details:n,error:t})}emitSendSignalComplete(e,t,n,i=null){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.SIGNAL,uri:e,itemId:n,signalIdentifier:t,error:i})}}},36651:(e,t,n)=>{"use strict";n.d(t,{N4:()=>l,S1:()=>a,f5:()=>o});var i=n(88724),r=n(72877);const s=6048e5;async function a(e,t,n,a=s){const o=(0,r.m)(t);return(await e.build().withHost(i.ZJ).withMethod("POST").withPath(`/playlist/${o}/permission-grant`).withEndpointIdentifier("/playlist/{id}/permission-grant").withJsonContentType().withBody({permission:{permissionLevel:n},ttlMs:a}).withoutMarket().send()).body}async function o(e,t,n){const s=(0,r.m)(t);return(await e.build().withHost(i.ZJ).withMethod("POST").withPath(`/playlist/${s}/permission-grant/token/${n}/claim`).withEndpointIdentifier("/playlist/{id}/permission-grant/token/{token}/claim").withJsonContentType().withoutMarket().send()).body}async function l(e,t){const n=(0,r.m)(t);return(await e.build().withHost(i.ZJ).withMethod("GET").withPath(`/playlist/${n}/permission/base`).withEndpointIdentifier("/playlist/{id}/permission/base").withoutMarket().send()).body}},39718:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var i=n(26831),r=n(67910);class s extends i.OO{_numListeners=0;constructor(){super(),this._aggregator=(0,r.XT)(this.onContainsItems.bind(this)),this.onAddListener(i.tD.UPDATE,(()=>{1==++this._numListeners&&this.subscribeToUpdates()})),this.onRemoveListener(i.tD.UPDATE,(()=>{0==--this._numListeners&&this.unsubscribeFromUpdates()})),this.onAddListener(i.tD.UPDATE_ITEM,(e=>{1==++this._numListeners&&this.subscribeToUpdates();const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(i.tD.UPDATE_ITEM,(e=>{0==--this._numListeners&&this.unsubscribeFromUpdates();const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)}))}emitUpdateItems(e,t){e.forEach(((e,n)=>{this.emit(i.tD.UPDATE_ITEM,{uri:e,isInRootlist:Array.isArray(t)?t[n]:t})}))}emitCreatePlaylistSync(e,t,n){return this.emitSync(i.tD.OPERATION,{operation:i.ut.CREATE_PLAYLIST,name:e,position:t,silent:n}).defaultPrevented}emitAddSync(e,t,n){return this.emitSync(i.tD.OPERATION,{operation:i.ut.ADD,uris:e,position:t,silent:n}).defaultPrevented}emitMoveSync(e,t,n=!1){return this.emitSync(i.tD.OPERATION,{operation:i.ut.MOVE,item:e,position:t,showAddConfirmation:n}).defaultPrevented}emitRemoveSync(e){return this.emitSync(i.tD.OPERATION,{operation:i.ut.REMOVE,items:e}).defaultPrevented}emitCreatePlaylistComplete(e,t,n=null,r=null,s){this.emit(i.tD.OPERATION_COMPLETE,{operation:i.ut.CREATE_PLAYLIST,name:e,position:t,uri:n,error:r,silent:s})}emitAddComplete(e,t,n=null,r){this.emit(i.tD.OPERATION_COMPLETE,{operation:i.ut.ADD,uris:e,position:t,error:n,silent:r})}emitMoveComplete(e,t,n=null,r=!1){this.emit(i.tD.OPERATION_COMPLETE,{operation:i.ut.MOVE,item:e,position:t,error:n,showAddConfirmation:r})}emitRemoveComplete(e,t=null){this.emit(i.tD.OPERATION_COMPLETE,{operation:i.ut.REMOVE,items:e,error:t})}}},32625:(e,t,n)=>{"use strict";n.d(t,{IJ:()=>_,N7:()=>S,q1:()=>A,dG:()=>C,sh:()=>x,jH:()=>b,W3:()=>f});var i=n(83856),r=n(69640),s=n(87240),a=n(9440),o=n(70964);function l(e){return e?new Date(parseInt(e,10)):null}function c(e){return{type:a.c.USER,uri:(0,i.Qj)(e).toURI(),username:e,displayName:null,images:[]}}function u(e,t){if(void 0!==e)return e.map((e=>e.url??null)).filter(s.P).map((e=>({url:e})));if(void 0!==t){return[{url:`https://i.scdn.co/image/${(0,o.U5)(t)}`}]}return[]}function d(e,t,n){const i=n.attributes;return{type:"folder",uri:e,name:t,addedAt:l(i?.timestamp),items:[]}}function m(e,t,n){const i=t.attributes,r=n.attributes;if(!(t.uri&&n.ownerUsername&&i&&r))return function(e){const t=e.attributes;return{type:"placeholder",uri:e.uri??"",addedAt:l(t?.timestamp),isNotFound:!0,isForbidden:!1}}(t);const s=c(n.ownerUsername),o=function(e){return void 0===e?null:c(e)}(r.formatAttributes?.find((e=>"madeFor.username"===e.key))?.value),d=e===s.username,m=i.public??!1,p=d,h=d;return{type:a.c.PLAYLIST,addedAt:l(i.timestamp),uri:t.uri,name:r.name??"",description:r.description??"",totalLength:n.length??0,unfilteredTotalLength:n.length??0,totalLikes:null,duration:null,images:u(r.pictureSize,r.picture),owner:s,madeFor:o,isLoaded:!0,isOwnedBySelf:d,isPublished:m,hasEpisodes:null,hasSpotifyTracks:null,hasSpotifyAudiobooks:null,canAdd:p,canRemove:h,canPlay:null,formatListData:null,canReportAnnotationAbuse:!1,hasDateAdded:!0,permissions:null,collaborators:null}}var p=n(36657);function h(e){const t=e;return"folder"===t.type&&void 0!==t.hash&&void 0!==t.rawItemCount}function g(e,t){const n=e.contents?.items?.[t];return void 0===n?null:(0,i.o_)(n.uri,{parseUnknown:!0})}function f(e,t){const n=g(e,t);return null!==n&&(n.type===i.NQ.UNKNOWN&&"start-group"===n.args?.[0]&&3===n.args.length)}function b(e,t){const n=g(e,t);return null!==n&&(n.type===i.NQ.UNKNOWN&&"end-group"===n.args?.[0]&&2===n.args.length)}function v(e,t){return{type:"folder",uri:e,name:"<root>",addedAt:new Date(0),items:[],hash:"0000000000000000",rawItemCount:0,...t}}function y(e,t,n,i){return{...d((0,p.p0)(e,t,n),n,i),hash:t,rawItemCount:1}}class _{stack=[];seen=[];constructor(e){this.username=e;const t=(0,p.p0)(e,"0000000000000000","<root>");this.root=v(t)}build(e){const t=e.contents,n=t?.items||[],r=t?.metaItems||[];for(let e=0;e<n.length;++e){this.increaseRawItemCount();const t=n[e],s=r[e],a=(0,i.o_)(t.uri,{parseUnknown:!0});if(a)switch(a.type){case i.NQ.PLAYLIST:case i.NQ.PLAYLIST_V2:{const e=m(this.username,t,s);this.onPlaylist(e);break}case i.NQ.UNKNOWN:if("start-group"===a.args?.[0]&&3===a.args?.length){const e=a.args[1],n=(0,i.d7)(a.args[2]);this.hasSeen(e)||this.onStartGroup(y(this.username,e,n,t))}else if("end-group"===a.args?.[0]&&2===a.args?.length){const e=a.args[1];this.onEndGroup(e)}}}return this.root}peek(){return this.stack.length>0?this.stack[this.stack.length-1]:this.root}onPlaylist(e){this.peek().items.push(e)}onStartGroup(e){this.peek().items.push(e),this.stack.push(e),this.seen.push(e.hash)}onEndGroup(e){const t=this.stack.findIndex((t=>t.hash===e));-1!==t&&(this.stack.length=t)}hasSeen(e){return-1!==this.seen.indexOf(e)}increaseRawItemCount(){this.root.rawItemCount++;for(let e=0;e<this.stack.length;++e)this.stack[e].rawItemCount++}}function E(e,t){const n=[];t(e)&&n.push(e);const i=[e];for(;i.length>0;){const e=i.pop();for(const r of e.items)h(r)&&i.push(r),t(r)&&n.push(r)}return n}function x(e){return E(e,(e=>(0,r.Af)(e)))}function C(e){return v(e.uri,{items:x(e)})}function S(e,t){const n=(0,i.o_)(t),r=E(e,(e=>(0,p.B2)(n,(0,i.o_)(e.uri))));return r.length>0?r[0]:null}function A(e,t){const n=(0,i.o_)(t);return E(e,(e=>(0,p.B2)(n,(0,i.o_)(e.uri)))).at(0)??null}},28495:(e,t,n)=>{"use strict";n.d(t,{k:()=>c});var i=n(17393),r=n(3775);n(16990);const s=Spicetify.GraphQL.Definitions["decoratePlaylists"]=new r.l("decoratePlaylists","query","896382ce80ad65a99a7acef04886629b57f9673bdef3ed3d1c90cdc17237612b",null);var a=n(58055);const o=50;const l=e=>null===e.owner.displayName||0===e.images.length;async function c(e,t,n){try{for(let e=0;e<n.length;++e){const i=n[e];if(t.has(i.uri)){const{images:e,owner:n}=t.get(i.uri);i.owner=n,i.images=e}}const r=n.filter(l).filter((e=>!t.has(e.uri))),c=await async function(e,t){const n=(0,i.lY)(e);return{playlistsV2:(await(0,a.F)(t,(async e=>{const t=await n(s,{uris:e}),{errors:i,data:r}=t||{};if(!r?.playlistsV2)throw i&&i.length>0?new Error(`GraphQL error: ${i[0].message}`):new Error("Unknown GraphQL error!");return r}),o)).reduce(((e,t)=>e.concat(t.playlistsV2||[])),[])}}(e,r.map((e=>e.uri))),u=c.playlistsV2;for(let e=0;e<r.length;++e){const n=r[e],i=u[e];if("Playlist"===i.__typename){const{uri:e,images:r,ownerV2:s}=i;s&&"User"===s.data.__typename&&(n.owner.displayName=s.data.name),n.images=r.items?.[0]?.sources.map((({url:e,width:t,height:n})=>({url:e,width:t||void 0,height:n||void 0}))),t.set(e,{owner:n.owner,images:n.images})}}}catch(e){window.console.error(e)}}},36657:(e,t,n)=>{"use strict";n.d(t,{B2:()=>u,BU:()=>c,DY:()=>g,Yu:()=>s,_U:()=>l,nK:()=>p,p0:()=>o});var i=n(83856),r=n(70964);function s(e){const t=new Uint8Array(e);return globalThis.crypto.getRandomValues(t),(0,r.U5)(t)}function a(e){const t=e.replace(/\s+/g," ");return encodeURIComponent(t).replace(/%20/g,"+")}function o(e,t,n){return`${(0,i.TR)(e,t).toURI()}:${a(n)}`}function l(e){const t=(0,i.o_)(e,{parseUnknown:!0});return null!==t&&t.type===i.NQ.UNKNOWN&&void 0!==t.args&&"start-group"===t.args[0]&&t.args.length>=2&&t.args.length<=3}function c(e){const t=(0,i.o_)(e,{parseUnknown:!0});return null!==t&&t.type===i.NQ.UNKNOWN&&void 0!==t.args&&"end-group"===t.args[0]&&2===t.args.length}function u(e,t){const n=(0,i.o_)(e,{parseUnknown:!0}),r=(0,i.o_)(t,{parseUnknown:!0});return null!==n&&null!==r&&(n.type===i.NQ.FOLDER&&r.type===i.NQ.FOLDER?n.id===r.id:l(n)&&l(r)||c(n)&&c(r)?n.args[0]===r.args[0]:n.type===i.NQ.FOLDER&&l(r)?n.id===r.args[1]:l(n)&&r.type===i.NQ.FOLDER?n.args[1]===r.id:(0,i.B2)(n,r))}function d(e,t){return void 0!==t?`spotify:start-group:${e}:${a(t)}`:`spotify:start-group:${e}`}function m(e){return`spotify:end-group:${e}`}function p(e={}){const{name:t,folderUri:n,hash:i=(n?h(n):s(8))}=e;return[d(i,t),m(i)]}function h(e){const t=(0,i.o_)(e);if(null===t||t.type!==i.NQ.FOLDER)throw new Error("Failed to parse folder URI!");return t.id}function g(e){try{return d(h(e))}catch{return e}}},84689:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});const i=["daily-mix","my-mix","car-mix","personalized-podcasts"]},98739:(e,t,n)=>{"use strict";n.d(t,{u:()=>s,w:()=>a});var i=n(83856),r=n(88724);const s=async(e,t,n,s)=>{const a=await e.build().withMethod("POST").withHost(r.sG).withPath("/extendp/").withEndpointIdentifier("/extendp/").withJsonContentType().withBody({playlistURI:t,trackSkipIDs:n||[],numResults:s||10}).withoutMarket().send();return a.body?a.body.recommendedTracks.map((e=>{const{id:t,album:{id:n},artists:r}=e,s=(0,i.tR)(t).toURI(),a=(0,i.Q0)(n).toURI(),o=r.map((({id:e,name:t})=>({id:e,name:t,uri:(0,i.IT)(e).toURI()})));return{...e,uri:s,album:{...e.album,uri:a},artists:o,isMOGEFRestricted:!!e.contentRating?.find((e=>"KR"===e.country&&e.tag.includes("MOGEF-19+")))}})):[]},a=async(e,t,n,i)=>{try{return(await e.build().withMethod("POST").withHost(r.SX).withJsonContentType().withBody({curation_uri:t,suggested_audiobooks:{},skipItemUris:n,limit:i}).withoutMarket().send()).body.uris}catch(e){return[]}}},51055:(e,t,n)=>{"use strict";n.d(t,{_:()=>r});var i=n(88724);async function r(e,t){const n=await e.build().withHost(i.eX).withMethod("GET").withPath(`/resolve-uri/${encodeURIComponent(t)}`).withEndpointIdentifier("/resolve-uri/{uri}").withoutMarket().send(),{resolvedPlaylists:r}=n.body;if(r.length>0)return r[0].uri;throw new Error("Error resolving playlist format URI!")}},39361:(e,t,n)=>{"use strict";n.d(t,{H:()=>c,k:()=>l});var i=n(27631),r=n(83856),s=n(90539),a=n(88724),o=n(70964);async function l(e,t,n){let l=null;const u=(0,r.o_)(t).id;n.imageUploadToken&&(l=await c(e,u,n.imageUploadToken));const d={},m=[];if(null!==l?d.picture=l:null===n.imageUploadToken&&m.push(i.Dr.LIST_PICTURE),"name"in n){if(!n.name)throw Error("Can not set empty playlist name!");d.name=n.name}if("description"in n&&(d.description=n.description),0===Object.keys(d).length&&0===m.length)return null;const p=(new s.a).updateListAttributes({newAttributes:{values:d,noValue:m}}).buildListChanges(),h=i.Qm.toJSON(p),g=await e.build().withMethod("POST").withHost(a.eX).withPath(`/playlist/${u}/changes`).withEndpointIdentifier("/playlist/{id}/changes").withoutMarket().withJsonContentType().withBody(h).send();return(0,o.tX)(g.body.revision)}async function c(e,t,n){const i=await e.build().withEndpointIdentifier("playlist/${id}/register-image").withHost(a.eX).withMethod("POST").withPath(`/playlist/${t}/register-image`).withJsonContentType().withBody({uploadToken:n}).withoutMarket().send();if(!i.body)throw new Error("No image id from registration!");return(0,o.tX)(i.body.picture)}},20370:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});const i="https://image-upload.spotify.com/v4";async function r(e,t){const n=await e.build().withEndpointIdentifier("image-upload/v4/playlist").withHost(i).withMethod("POST").withPath("/playlist").withBody(t).withoutGlobalHeaders().withHeaders([{key:"Content-Type",value:"image/jpeg"}]).withoutMarket().send();if(!n.body)throw new Error("No upload token recieved");return n.body.uploadToken}},72877:(e,t,n)=>{"use strict";n.d(t,{m:()=>r,z:()=>s});var i=n(83856);function r(e){const t=(0,i.o_)(e);return t?t.id:""}function s(e){return e instanceof Error?e:new Error("Unknown error!")}},42529:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});const i=(0,n(79474).createContext)({getCapabilities:()=>{},getMetadata:()=>{},getContents:()=>{},add:()=>{},move:()=>{},remove:()=>{},getEvents:()=>{}})},14411:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});const i=(0,n(79474).createContext)(null)},92665:(e,t,n)=>{"use strict";n.d(t,{W:()=>f,r:()=>b});var i=n(79474),r=n(42529),s=n(76626),a=n(80964),o=n(28049),l=n(35430),c=n(86892),u=n(63399),d=(n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271),n(6193)),m=n(87240),p=n(96131);const h=(e,t,n)=>["usePlaylist",e,t,n],g=(e,t,n,i,r)=>()=>e.getPlaylist(t,{...i,withSync:n},r),f=(e,t,n)=>{const f=(0,i.useContext)(r.w),b=(0,a.jE)(),v=(0,i.useRef)(t?.withSync),y=(0,c.U0)((()=>h(e,t,n)),[e,t,n]),{data:_,isLoading:E,isError:x}=(0,o.I)({queryKey:y(),queryFn:g(f,e,v.current,t,n),gcTime:36e5,staleTime:5e3,placeholderData:l.rX}),C=(0,i.useCallback)((()=>{v.current=!1,b.invalidateQueries({queryKey:y()})}),[b,y]);return(0,u.V)({callback:C,uri:e}),(0,s.H)(e,C),((e,t,n=!1)=>{const r=(0,d.a)(),s=(0,i.useRef)(null),a=(0,i.useRef)(t);(0,i.useLayoutEffect)((()=>{a.current=t})),(0,i.useEffect)((()=>n?r.subscribeToMembers(e,((e,t)=>{const n=s.current,i=new Set(t?.members?.map((e=>e.user?.uri??null)).filter(m.P)??[]);n&&!(0,p.j)(n,i)&&a.current(),s.current=i})):()=>{}),[e,r,n])})(e,C,t?.hydrateCollaboratorsWithMembers),{data:_??null,isLoading:E,isError:x}},b=(e,t,n)=>{const s=(0,i.useContext)(r.w),o=(0,a.jE)();return(0,i.useCallback)((()=>{const i=h(e,t,n),r=g(s,e,!1,t,n);o.prefetchQuery({queryKey:i,queryFn:r})}),[s,n,t,o,e])}},96217:(e,t,n)=>{"use strict";n.d(t,{e:()=>a});var i=n(79474),r=n(42529),s=n(86892);function a(...e){const[t,n,a]=e,o=(0,i.useRef)(n),l=(0,s.lB)((()=>a),[a]),c=(0,i.useContext)(r.w);o.current=n,(0,i.useEffect)((()=>{const e=c.getEvents(),n=e=>o.current(e);return e.addListener(t,n,l),()=>{e.removeListener(t,n,l)}}),[c,t,l])}},17980:(e,t,n)=>{"use strict";n.d(t,{J:()=>u});var i=n(79474),r=n(42529),s=n(76626),a=n(80964),o=n(28049),l=n(35430),c=n(86892);const u=(e,t)=>{const n=(0,i.useContext)(r.w),u=(0,a.jE)(),d=(0,i.useRef)(t?.withSync),m=(0,c.U0)((()=>["usePlaylistMetadata",e,t]),[t,e]),{data:p}=(0,o.I)({queryKey:m(),queryFn:()=>n.getMetadata(e,{...t,withSync:d.current}),gcTime:36e5,placeholderData:l.rX}),h=(0,i.useCallback)((()=>{d.current=!1,u.invalidateQueries({queryKey:m()})}),[u,m]);return(0,s.H)(e,h),p??null}},58452:(e,t,n)=>{"use strict";n.d(t,{x:()=>a});var i=n(79474),r=n(42529),s=n(6193);function a(e){const t=(0,i.useContext)(r.w),n=(0,s.a)();return{addItems:(0,i.useCallback)(((n,i)=>t.add(e,n,i)),[e,t]),moveItems:(0,i.useCallback)(((n,i)=>t.move(e,n,i)),[e,t]),removeItems:(0,i.useCallback)((n=>t.remove(e,n)),[e,t]),updateDetails:(0,i.useCallback)((n=>t.updateDetails(e,n)),[e,t]),uploadImage:(0,i.useCallback)((e=>t.uploadImage(e)),[t]),setPrivateState:(0,i.useCallback)((t=>n.setBasePermission(e,t?"BLOCKED":"VIEWER")),[n,e]),removeMember:(0,i.useCallback)((t=>n.removeMember(e,t)),[n,e])}}},96710:(e,t,n)=>{"use strict";n.d(t,{v:()=>a});var i=n(79474),r=n(14411),s=n(86316);function a(e){const t=(0,i.useContext)(r.S),[n,a]=(0,i.useState)(void 0),o=(0,i.useCallback)((()=>{t.getPublishedState(e).then(a)}),[t,e]);return(0,i.useEffect)(o,[o]),(0,s.L)(o),n}},76626:(e,t,n)=>{"use strict";n.d(t,{H:()=>s});var i=n(54361),r=n(96217);function s(e,t){(0,r.e)(i.Lj.UPDATE,(n=>{n.data.uri===e&&t(n)}),{uri:e})}},3351:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(79474),r=n(14411);function s(){return(0,i.useContext)(r.S)}},58325:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var i=n(79474),r=n(14411),s=n(86316),a=n(80964),o=n(28049);function l(e){const t=(0,i.useContext)(r.S),n=(0,a.jE)(),l=["rootlist-contents",e];return(0,s.L)((()=>n.invalidateQueries({queryKey:l},{cancelRefetch:!0}))),(0,o.I)({queryKey:l,queryFn:()=>t.getContents(e),gcTime:864e5,staleTime:0}).data}},50014:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(79474),r=n(14411);function s(){const e=(0,i.useContext)(r.S);return{createFolder:(0,i.useCallback)(((t,n)=>e.createFolder(t,n)),[e]),createPlaylist:(0,i.useCallback)(((t,n)=>e.createPlaylist(t,n)),[e]),moveFolder:(0,i.useCallback)(((t,n)=>e.moveFolder(t,n)),[e]),removeFolder:(0,i.useCallback)((t=>e.removeFolder(t)),[e]),renameFolder:(0,i.useCallback)(((t,n)=>e.renameFolder(t,n)),[e]),addPlaylists:(0,i.useCallback)(((t,n)=>e.add(t,n)),[e]),movePlaylists:(0,i.useCallback)(((t,n)=>e.move(t,n)),[e]),removePlaylists:(0,i.useCallback)((t=>e.remove(t)),[e]),containsPlaylists:(0,i.useCallback)((t=>e.contains(t)),[e]),setPublishedState:(0,i.useCallback)(((t,n)=>e.setPublishedState(t,n)),[e])}}},86316:(e,t,n)=>{"use strict";n.d(t,{L:()=>o,b:()=>l});var i=n(79474),r=n(26831),s=n(14411),a=n(86892);function o(e){const t=(0,i.useContext)(s.S);(0,i.useEffect)((()=>{const n=t.getEvents();return n.addListener(r.tD.UPDATE,e),()=>{n.removeListener(r.tD.UPDATE,e)}}),[e,t])}function l(...e){const[t,n,r]=e,o=(0,i.useRef)(n),l=(0,a.lB)((()=>r),[r]),c=(0,i.useContext)(s.S);o.current=n,(0,i.useEffect)((()=>{const e=c.getEvents(),n=e=>o.current(e);return e.addListener(t,n,l),()=>{e.removeListener(t,n,l)}}),[c,t,l])}},7009:(e,t,n)=>{"use strict";n.d(t,{n:()=>i});let i=function(e){return e.TITLE="TITLE",e.ADDED_BY="ADDED_BY",e.ADDED_AT="ADDED_AT",e.ARTIST="ARTIST",e.ALBUM="ALBUM",e.DURATION="DURATION",e}({})},60149:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});let i=function(e){return e.ASC="ASC",e.DESC="DESC",e}({})},86357:(e,t,n)=>{"use strict";function i(e){return!!e&&(Array.isArray(e)?e.some((e=>"is-editorial-booklist"===e.key&&"true"===e.value)):"true"===e["is-editorial-booklist"])}n.d(t,{p:()=>i})},42232:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(9440);function r(e){return{url:e.url,width:e.width||void 0,height:e.height||void 0}}function s(e){return{type:i.c.USER,uri:e.uri,username:e.id,displayName:e?.display_name||null,images:e?.images?.map(r)||[]}}},18346:(e,t,n)=>{"use strict";n.d(t,{g:()=>s,q:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'ProductStateAPIContext' without 'ProductStateAPIProvider'!");return e}},38774:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(79474),r=n(18346);function s(){const e=(0,r.g)(),[t,n]=(0,i.useState)(!0),[s,a]=(0,i.useState)({}),[o,l]=(0,i.useState)(null);return(0,i.useEffect)((()=>{let t=!0;return e.getValues().then((e=>{t&&a(e)})).catch((e=>{t&&l(e)})).finally((()=>{t&&n(!1)})),()=>{t=!1}}),[e]),{isLoading:t,data:s,error:o}}},50629:(e,t,n)=>{"use strict";n.d(t,{$:()=>o});var i=n(80964),r=n(28049),s=n(18346),a=n(79474);const o=e=>{const t=(0,s.g)(),n=(0,i.jE)(),{data:o}=(0,r.I)({queryKey:["useProductStateValue",e],queryFn:async()=>await t.getValues(),select:t=>t[e],gcTime:0});return(0,a.useEffect)((()=>t.subValues((()=>{n.invalidateQueries({queryKey:["useProductStateValue",e]})}))),[e,t,n]),o}},70048:(e,t,n)=>{"use strict";n.d(t,{O:()=>r});var i=n(3775);n(16990);const r=Spicetify.GraphQL.Definitions["accountAttributes"]=new i.l("accountAttributes","query","23af600e2a5712a0af7ff08119fad6325f9b2bd028a680d442b9d5680abe0157",null)},45679:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,K:()=>r});var i=n(37766);let r=function(e){return e.CONNECTION="connection",e.MESSAGE="push",e.SUBSCRIBE="subscribe",e.CANCEL="cancel",e.REFRESH="refresh",e.ERROR="error",e}({});class s extends i.V{}},33925:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var i=n(45679);const r="hm://";class s{static NEXT_SUBSCRIPTION_ID=0;_subscriptions=new Map;_messages=[];constructor(e,t,n){this._subscribeToConnectionId=e,this._subscribeToMessages=t,this._isDeveloperMode=n,this._events=new i.D,this._connectionId=new Promise((e=>{this._subscribeToConnectionId((t=>{this.onConnectionId(t),e(t),this._events.emit(i.K.CONNECTION,{connectionId:t})}))})),this._isDeveloperMode&&this.subscribe({ident:r,isPrefix:!0,onMessage:()=>{}})}onConnectionId(e){this._connectionId=Promise.resolve(e);for(const t of this._subscriptions.values())this.refreshSubscription(t,e)}getConnectionId(){return this._connectionId}async cancelSubscription(e){const t=this._subscriptions.get(e);if(void 0!==t)try{await(t.onCancel?.(t.connectionId)),this._events.emit(i.K.CANCEL,{ident:t.ident,isPrefix:t.isPrefix??!1})}catch(e){this._events.emit(i.K.ERROR,new Error("Error while trying to cancel!",{cause:e}))}this._subscriptions.delete(e)}async createSubscription(e,t,n){if(n.aborted)return;const r=s.NEXT_SUBSCRIPTION_ID++,{ident:a,isPrefix:o,onMessage:l}=e;this._subscriptions.set(r,{...e,connectionId:t});const c=this._subscribeToMessages(a,o??!1,(e=>{l(e),this._isDeveloperMode&&(this._messages.unshift(e),this._messages.length>1e3&&this._messages.pop(),this._messages.splice(0,this._messages.length,...function(e,t){const n=new Map;return e.forEach((e=>{const i=t(e);n.has(i)||n.set(i,e)})),Array.from(n.values())}(this._messages,(e=>`${e.timestamp}-${e.ident}`)))),this._events.emit(i.K.MESSAGE,e)}));n.addEventListener("abort",(()=>{this.cancelSubscription(r),c.cancel()}),{once:!0});try{await(e.onSubscribe?.(t)),this._events.emit(i.K.SUBSCRIBE,{ident:a,isPrefix:o??!1})}catch(e){this._events.emit(i.K.ERROR,new Error("Error while trying to subscribe!",{cause:e}))}}async refreshSubscription(e,t){try{await(e.onCancel?.(e.connectionId))}catch(e){this._events.emit(i.K.ERROR,new Error("Error while trying to cancel!",{cause:e}))}try{const n=e.connectionId;await(e.onSubscribe?.(t)),e.connectionId=t,this._events.emit(i.K.REFRESH,{ident:e.ident,isPrefix:e.isPrefix??!1,oldConnectionId:n,newConnectionId:t})}catch(e){this._events.emit(i.K.ERROR,new Error("Error while trying to subscribe!",{cause:e}))}}subscribe(e){const t=new AbortController,n=t.signal;return this._connectionId.then((t=>this.createSubscription(e,t,n))),{cancel:()=>t.abort()}}getSubscriptions(){return Array.from(this._subscriptions.values()).filter((e=>!(e.ident===r&&!0===e.isPrefix)))}getMessages(){return this._messages}getEvents(){return this._events}}},67299:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s,h:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PubSubContext' without 'PubSubProvider'!");return e}},88783:(e,t,n)=>{"use strict";n.d(t,{oC:()=>i});const i=(e,t)=>{const n=t?new URLSearchParams(t.search):void 0;return"1"===n?.get(e)}},83275:(e,t,n)=>{"use strict";n.d(t,{K5:()=>o,d2:()=>s,hr:()=>l,m5:()=>a});var i=n(8012),r=n(37766);let s=function(e){return e.ARTIST="artist",e.ALBUM="album",e.SHOW="show",e.AUDIOBOOK="audiobook",e.PLAYLIST="playlist",e.LIKED_SONGS="liked_songs",e.YOUR_EPISODES="your_episodes",e.TRACK="track",e}({}),a=function(e){return e.UPDATE="update",e}({});(0,i.u)("RecentlyPlayedAPI");class o{}class l extends r.V{}},66772:(e,t,n)=>{"use strict";n.d(t,{O:()=>s,b:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'RecentlyPlayedContext' without 'RecentlyPlayedProvider'!");return e}},80559:(e,t,n)=>{"use strict";n.d(t,{fE:()=>l,q6:()=>o});var i=n(10454),r=n(46268);let s;function a({isAnonymous:e,transport:t,tokenProvider:n}){const{DEBUG_SEMANTIC_METRICS:s}={};if("1"===s)return[new i.ConsoleReporter];if(!t&&!n)throw new Error("[SemanticMetricsHelper] An instance of either transport or tokenProvider is required!");let a={environment:"undefined"!=typeof window?"browser":"nodejs"};return e||(a={...a,getToken:async e=>{if(n){const t=await(0,r.C)(n);e(await t())}else t&&e(t.getLastToken())}}),[(0,i.createUniversalReporter)(a),..."2"===s?[new i.ConsoleReporter]:[]]}function o(e,t,n=!1){const{sendMetric:r}=(0,i.createSemanticMetrics)({key:e,dev:!"production"?.startsWith("prod")&&!0,reporter:a({transport:t,isAnonymous:n})});s=r}async function l(e){if(!s)throw new Error("Invalid call to sendMetric before initSemanticMetrics.");return e.tags||(e.tags={}),"review_build"in e.tags||(e.tags.review_build="1"==={}.IS_REVIEW_BUILD?"true":"false"),s(e)}},48136:(e,t,n)=>{"use strict";n.d(t,{AX:()=>s,K$:()=>a,WY:()=>r,uj:()=>o});var i=n(8012);let r=function(e){return e.PUBLISH_DATE="PUBLISH_DATE",e}({}),s=function(e){return e.ASC="ASC",e.DESC="DESC",e}({}),a=function(e){return e.AVAILABLE="AVAILABLE",e.TEXT="TEXT",e.NAME="NAME",e.ISPLAYED="ISPLAYED",e.STARTEDPLAYING="STARTEDPLAYING",e}({}),o=function(e){return e.CONTAINS="CONTAINS",e.EQUALS="EQUALS",e.NOT_EQUALS="NOT_EQUALS",e.GREATER_THAN="GREATER_THAN",e}({});(0,i.u)("ShowAPI")},61391:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,r:()=>s});var i=n(37766);let r=function(e){return e.UPDATE_ACCESS_INFO="update_access_info",e.UPDATE_RESUME_EPISODE_LINK="update_resume_episode_link",e.UPDATE_RATING="update_rating",e}({});class s extends i.V{}},6366:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var i=n(14640),r=n(56794);async function s(e){const{body:t}=await i.createCheckoutSession(new r.t,e),{redirectToUrl:n}=t;if(!new URL(n).hostname.endsWith(".spotify.com"))throw new Error("Unknown URL host");window.location.assign(n)}},35370:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var i=n(12882);class r extends i.e{constructor(e,t){super(e,t),this.redirectUri=t.redirectUri}}},81623:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,q:()=>a});var i=n(45901),r=n(35828);function s(e){return void 0===e||0===e.length?null:e.some((e=>[i.UG.OAP_OTP,i.UG.AUDIOBOOK_DIRECT_SALES].includes(e)))?"OTP":e.some((e=>[i.UG.OAP_LINKING,i.UG.ANCHOR_PAYWALL].includes(e)))?"SUBSCRIPTION":"OTHER"}function a(e){return e?.length?e.some((e=>e&&[r.UG.OapOtp,r.UG.AudiobookDirectSales].includes(e)))?"OTP":e.some((e=>e&&[r.UG.OapLinking,r.UG.AnchorPaywall].includes(e)))?"SUBSCRIPTION":"OTHER":null}},63843:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var i=n(79474),r=n(61391);const s=(0,i.createContext)({capabilities:{canFilter:!1,canSort:!1,canGetDefaultSort:!1,canGetShowPlayedState:!1},getMetadata:()=>Promise.reject(),getContents:()=>Promise.reject(),getBookContents:()=>Promise.reject(),getEpisodeOrChapter:()=>Promise.reject(),getPlayerSort:()=>"",getPlayerFilter:()=>"",getAccessInfo:()=>Promise.reject(),checkoutBook:()=>Promise.reject(),getShowPlayedState:()=>Promise.reject(),getEvents:()=>new r.r,updateUserRating:()=>Promise.reject(),invalidateShowMetadataCaches:()=>Promise.reject()})},39841:(e,t,n)=>{"use strict";n.d(t,{d:()=>a});var i=n(28049),r=n(765);const s=3e5;function a(e){const t=(0,r.L)(),{data:n,isError:a}=(0,i.I)({queryKey:["useEpisodeOrChapter",e],queryFn:()=>t.getEpisodeOrChapter(e),gcTime:s,retry:(e,t)=>!t});return n||a?{isError:a,episodeOrChapter:n}:null}},765:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(79474),r=n(63843);function s(){return(0,i.useContext)(r.J)}},50895:(e,t,n)=>{"use strict";n.d(t,{W:()=>p});var i=n(80964),r=n(28049),s=n(765),a=n(51326),o=n(63399),l=n(79474),c=n(35370),u=n(61391),d=n(63843);const m=3e5;function p(e){const t=(0,s.L)(),n=(0,i.jE)(),p=(0,l.useCallback)((()=>["useShowMetadata",e]),[e]),{data:h,error:g}=(0,r.I)({queryKey:p(),queryFn:()=>t.getMetadata(e),gcTime:m,refetchOnWindowFocus:!1,retry:(e,t)=>!(t.message===a.Xz.RestrictedContent||t instanceof c.W)&&e<3}),f=(0,l.useCallback)((()=>{h&&n.invalidateQueries({queryKey:p()})}),[h,p,n]);(0,o.V)({callback:f,uri:e}),function({callback:e,uri:t}){const n=(0,l.useContext)(d.J);(0,l.useEffect)((()=>{const i=n.getEvents(),r=n=>{n.data.uri!==t&&void 0!==n.data.uri||e(n)};return i.addListener(u.K.UPDATE_RATING,r),()=>{i.removeListener(u.K.UPDATE_RATING,r)}}),[n,t,e])}({callback:f,uri:e}),(0,l.useEffect)((()=>{const i=e=>{n.setQueryData(p(),(t=>t?{...t,resumeEpisodeLink:e.data.resumeEpisodeLink,invalidateCache:f}:t))};return t.getEvents().addListener(u.K.UPDATE_RESUME_EPISODE_LINK,i,{uri:e}),()=>{t.getEvents().removeListener(u.K.UPDATE_RESUME_EPISODE_LINK,i,{uri:e})}}),[p,f,n,t,e]);const b=(0,l.useCallback)((async()=>{await t.invalidateShowMetadataCaches(e),f()}),[f,t,e]);return g?{data:null,error:g,redirectUri:g instanceof c.W?g.redirectUri:void 0,invalidateCache:b}:{data:h??null,invalidateCache:b}}},33350:(e,t,n)=>{"use strict";n.d(t,{Q:()=>h});var i=n(21364),r=n(59043),s=n.n(r);let a=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.PLAINTEXT_CONTENT=1]="PLAINTEXT_CONTENT",e[e.MUSIC_TRACK=2]="MUSIC_TRACK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function o(e){switch(e){case 0:case"UNKNOWN":return a.UNKNOWN;case 1:case"PLAINTEXT_CONTENT":return a.PLAINTEXT_CONTENT;case 2:case"MUSIC_TRACK":return a.MUSIC_TRACK;default:return a.UNRECOGNIZED}}const l={encode(e,t=s().Writer.create()){""!==e.version&&t.uint32(10).string(e.version),""!==e.episodeUri&&t.uint32(18).string(e.episodeUri),""!==e.publishedAt&&t.uint32(26).string(e.publishedAt);for(const n of e.sections)c.encode(n,t.uint32(34).fork()).ldelim();return""!==e.language&&t.uint32(42).string(e.language),!0===e.curated&&t.uint32(48).bool(e.curated),t},decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={version:"",episodeUri:"",publishedAt:"",sections:[],language:"",curated:!1};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.version=n.string();break;case 2:r.episodeUri=n.string();break;case 3:r.publishedAt=n.string();break;case 4:r.sections.push(c.decode(n,n.uint32()));break;case 5:r.language=n.string();break;case 6:r.curated=n.bool();break;default:n.skipType(7&e)}}return r},fromJSON:e=>({version:m(e.version)?String(e.version):"",episodeUri:m(e.episodeUri)?String(e.episodeUri):"",publishedAt:m(e.publishedAt)?String(e.publishedAt):"",sections:Array.isArray(e?.sections)?e.sections.map((e=>c.fromJSON(e))):[],language:m(e.language)?String(e.language):"",curated:!!m(e.curated)&&Boolean(e.curated)}),toJSON(e){const t={};return void 0!==e.version&&(t.version=e.version),void 0!==e.episodeUri&&(t.episodeUri=e.episodeUri),void 0!==e.publishedAt&&(t.publishedAt=e.publishedAt),e.sections?t.sections=e.sections.map((e=>e?c.toJSON(e):void 0)):t.sections=[],void 0!==e.language&&(t.language=e.language),void 0!==e.curated&&(t.curated=e.curated),t},fromPartial(e){const t={version:"",episodeUri:"",publishedAt:"",sections:[],language:"",curated:!1};return t.version=e.version??"",t.episodeUri=e.episodeUri??"",t.publishedAt=e.publishedAt??"",t.sections=e.sections?.map((e=>c.fromPartial(e)))||[],t.language=e.language??"",t.curated=e.curated??!1,t}};const c={encode:(e,t=s().Writer.create())=>(0!==e.type&&t.uint32(8).int32(e.type),0!==e.startMs&&t.uint32(16).int32(e.startMs),void 0!==e.plaintextContent&&u.encode(e.plaintextContent,t.uint32(26).fork()).ldelim(),void 0!==e.musicTrack&&d.encode(e.musicTrack,t.uint32(50).fork()).ldelim(),""!==e.title&&t.uint32(34).string(e.title),void 0!==e.fallback&&u.encode(e.fallback,t.uint32(42).fork()).ldelim(),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={type:0,startMs:0,plaintextContent:void 0,musicTrack:void 0,title:"",fallback:void 0};for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.type=n.int32();break;case 2:r.startMs=n.int32();break;case 3:r.plaintextContent=u.decode(n,n.uint32());break;case 6:r.musicTrack=d.decode(n,n.uint32());break;case 4:r.title=n.string();break;case 5:r.fallback=u.decode(n,n.uint32());break;default:n.skipType(7&e)}}return r},fromJSON:e=>({type:m(e.type)?o(e.type):0,startMs:m(e.startMs)?Number(e.startMs):0,plaintextContent:m(e.plaintextContent)?u.fromJSON(e.plaintextContent):void 0,musicTrack:m(e.musicTrack)?d.fromJSON(e.musicTrack):void 0,title:m(e.title)?String(e.title):"",fallback:m(e.fallback)?u.fromJSON(e.fallback):void 0}),toJSON(e){const t={};return void 0!==e.type&&(t.type=function(e){switch(e){case a.UNKNOWN:return"UNKNOWN";case a.PLAINTEXT_CONTENT:return"PLAINTEXT_CONTENT";case a.MUSIC_TRACK:return"MUSIC_TRACK";default:return"UNKNOWN"}}(e.type)),void 0!==e.startMs&&(t.startMs=Math.round(e.startMs)),void 0!==e.plaintextContent&&(t.plaintextContent=e.plaintextContent?u.toJSON(e.plaintextContent):void 0),void 0!==e.musicTrack&&(t.musicTrack=e.musicTrack?d.toJSON(e.musicTrack):void 0),void 0!==e.title&&(t.title=e.title),void 0!==e.fallback&&(t.fallback=e.fallback?u.toJSON(e.fallback):void 0),t},fromPartial(e){const t={type:0,startMs:0,plaintextContent:void 0,musicTrack:void 0,title:"",fallback:void 0};return t.type=e.type??0,t.startMs=e.startMs??0,t.plaintextContent=void 0!==e.plaintextContent&&null!==e.plaintextContent?u.fromPartial(e.plaintextContent):void 0,t.musicTrack=void 0!==e.musicTrack&&null!==e.musicTrack?d.fromPartial(e.musicTrack):void 0,t.title=e.title??"",t.fallback=void 0!==e.fallback&&null!==e.fallback?u.fromPartial(e.fallback):void 0,t}};const u={encode(e,t=s().Writer.create()){for(const n of e.plaintext)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={plaintext:[]};for(;n.pos<i;){const e=n.uint32();if(e>>>3==1)r.plaintext.push(n.string());else n.skipType(7&e)}return r},fromJSON:e=>({plaintext:Array.isArray(e?.plaintext)?e.plaintext.map((e=>String(e))):[]}),toJSON(e){const t={};return e.plaintext?t.plaintext=e.plaintext.map((e=>e)):t.plaintext=[],t},fromPartial(e){const t={plaintext:[]};return t.plaintext=e.plaintext?.map((e=>e))||[],t}};const d={encode:(e,t=s().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={uri:""};for(;n.pos<i;){const e=n.uint32();if(e>>>3==1)r.uri=n.string();else n.skipType(7&e)}return r},fromJSON:e=>({uri:m(e.uri)?String(e.uri):""}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),t},fromPartial(e){const t={uri:""};return t.uri=e.uri??"",t}};function m(e){return null!=e}function p(e){return e.type===a.MUSIC_TRACK?{type:"track",startMs:e.startMs,content:e.fallback?.plaintext||[],trackUri:e.musicTrack?.uri}:{type:"text",startMs:e.startMs,content:e.plaintextContent?.plaintext||[]}}async function h(e){try{const t=await fetch(e,{});if(t.ok&&t.body){const e=await t.arrayBuffer(),n=l.decode(new Uint8Array(e));return n.sections.map(p)}return null}catch(e){return null}}s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},51326:(e,t,n)=>{"use strict";n.d(t,{Cx:()=>s,Go:()=>d,Gr:()=>m,H7:()=>o,Uk:()=>l,Xz:()=>c,_w:()=>a,t5:()=>u,x7:()=>r});var i=n(9440);let r=function(e){return e.Explicit="EXPLICIT",e.NineteenPlus="NINETEEN_PLUS",e.None="NONE",e.Unknown="UNKNOWN",e}({}),s=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),a=function(e){return e.Completed="COMPLETED",e.InProgress="IN_PROGRESS",e.NotStarted="NOT_STARTED",e}({}),o=function(e){return e.Unknown="UNKNOWN",e.NotStarted="NOT_STARTED",e.InProgress="IN_PROGRESS",e.Completed="COMPLETED",e.Unrecogniced="UNRECOGNIZED",e}({}),l=function(e){return e.AgeRestricted="AGE_RESTRICTED",e.Anonymous="ANONYMOUS",e.CatalogueRestricted="CATALOGUE_RESTRICTED",e.CountryRestricted="COUNTRY_RESTRICTED",e.Explicit="EXPLICIT",e.PaymentRequired="PAYMENT_REQUIRED",e.Playable="PLAYABLE",e.Unavailable="UNAVAILABLE",e.Unknown="UNKNOWN",e}({}),c=function(e){return e.RestrictedContent="Restricted content",e.Generic="Error while requesting the show metadata",e}({}),u=function(e){return e.UNKNOWN="unknown",e.TRAILER="trailer",e.CONTINUE_LISTENING="continue-listening",e.LATEST_PUBLISHED="latest-published",e.UP_NEXT="up-next",e.FIRST_PUBLISHED="first-published",e}({});function d(e){return e.type===i.c.AUDIOBOOK}function m(e){return e.type===i.c.CHAPTER}},67433:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(88724);const r=async(e,t,n)=>{const r=e.build();try{const e=await r.withMethod("POST").withHost(i.CC).withPath(`/rating/show/${t}`).withBody({rating:n}).withJsonContentType().withResponseType("json").send();return e.body?{showUri:e.body.show_uri,rating:e.body.rating,ratedAt:new Date(e.body.rated_at)}:null}catch(e){throw new Error("Error while rating show",{cause:e})}}},8689:(e,t,n)=>{"use strict";n.d(t,{el:()=>d,Ar:()=>m,S:()=>g,_v:()=>_,Wt:()=>u,pE:()=>S,e$:()=>x});var i=n(14056),r=n(35828),s=n(9440),a=n(51326);const o="recent";var l=n(81623),c=n(49114);function u(e){return{totalCount:e.totalCount,nextOffset:e.pagingInfo.nextOffset,items:e.items.map((e=>"Episode"!==e.entity.data.__typename?null:g(e.entity.data)))}}function d(e,t){return{totalCount:e.totalCount,nextOffset:e.pagingInfo.nextOffset,items:e.items.map((e=>"Chapter"===e.entity.data.__typename?f(e.entity.data,t):null))}}function m(e,t){return"Chapter"===e.__typename?f(e,t):g(e)}function p(e){switch(e){case r.$c.AgeRestricted:return a.Uk.AgeRestricted;case r.$c.CatalogueRestricted:return a.Uk.CatalogueRestricted;case r.$c.CountryRestricted:return a.Uk.CountryRestricted;case r.$c.Explicit:return a.Uk.Explicit;case r.$c.PaymentRequired:return a.Uk.PaymentRequired;case r.$c.Playable:return a.Uk.Playable;case r.$c.Unavailable:default:return a.Uk.Unavailable}}function h(e,t=!1){return{playable:!t&&e.playable,reason:t?a.Uk.Anonymous:p(e.reason)}}function g(e){const t="Podcast"!==(n=e.podcastV2).data.__typename?null:{uri:n.data.uri,name:n.data.name,coverArt:n.data.coverArt?.sources||[],trailer:(i=n.data.trailerV2,("Episode"===i?.data.__typename?{uri:i.data.uri}:null)||null),showTypes:(n.data.showTypes||[]).filter(b)};var n,i;const r=(0,c.Wx)(e?.restrictions,e.playability);return{type:s.c.EPISODE,uri:e.uri,name:e.name,description:e.description||"",htmlDescription:e.htmlDescription||"",podcast:t,episodeType:e.type,mediaTypes:e.mediaTypes,coverArt:e.coverArt?.sources||[],audio:e.audio,releaseDate:(a=e.releaseDate,a?{isoString:a.isoString}:null),playedState:e.playedState,playability:h(e.playability),audioPreview:e.audioPreview,sharingInfo:e.sharingInfo,duration:{milliseconds:e.duration.totalMilliseconds},contentRating:e.contentRating,segmentsCount:0,podcastSubscription:r,contentInformation:e.contentInformation,transcript:e.transcripts?.items||null};var a}function f(e,t){return{type:s.c.CHAPTER,uri:e.uri,name:e.name,description:e.description||"",htmlDescription:e.htmlDescription||"",coverArt:e.coverArt?.sources||[],audio:e.audio,playedState:e.playedState,audioPreview:e.audioPreview,sharingInfo:e.sharingInfo,duration:{milliseconds:e.duration.totalMilliseconds},contentRating:e.contentRating,playability:h(e.playability,t),book:E(e.audiobookV2),isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus}}function b(e){return!!e}function v(e){return Boolean(e)}function y(e){const t=e.nextBestEpisodes.items.sort(((e,t)=>t.score-e.score)),n=t[0]?.item.data;if("Episode"!==n?.__typename)return;let i;const s="Episode"===e.trailerV2?.data.__typename?e.trailerV2.data.uri:null;return i=n.uri===s?a.t5.TRAILER:n.playedState.state===r._w.InProgress?a.t5.CONTINUE_LISTENING:a.t5.UP_NEXT,{type:i,data:g(n)}}function _(e){const t="Episode"===e.trailerV2?.data.__typename?(n=e.trailerV2.data,{type:s.c.EPISODE,uri:n.uri,name:n.name,coverArt:n.coverArt?.sources||[],audio:n.audio,audioPreview:n.audioPreview,sharingInfo:n.sharingInfo,duration:{milliseconds:n.duration.totalMilliseconds},contentRating:n.contentRating,mediaTypes:n.mediaTypes}):null;var n;const i=(0,l.q)(e?.accessInfo?.unlockedBy);return{type:s.c.SHOW,uri:e.uri,name:e.name,description:e.description||"",htmlDescription:e.htmlDescription||"",coverArt:e.coverArt?.sources||[],trailer:t,topics:e.topics.items,podcastType:e.musicAndTalk?"SHOW":"PODCAST",showTypes:(e.showTypes||[]).filter(b),publisherName:e.publisher?.name||"",consumptionOrder:o,nextBestEpisode:y(e),gatedContentAccessReason:i,isLocked:null===i,rating:e.rating}}function E(e){if("Audiobook"!==e.data.__typename)return null;const t=e.data;return{uri:t.uri,name:t.name,coverArt:t.coverArt?.sources||[],trailer:(n=t,"Chapter"===n.trailerV2?.data.__typename?{uri:n.trailerV2.data.uri}:null)};var n}function x(e){const t=!1===e?.isUserMemberOfAtLeastOneGroup,n=e?.unlockedBy?.includes(r.UG.Abp);return t&&!n}function C(e){return"ConsumptionCappedAccessExplanation"===e?.accessInfo?.accessExplanation?.__typename?{title:e.accessInfo.accessExplanation.title||"",body:e.accessInfo.accessExplanation.body||"",cta:e.accessInfo.accessExplanation.actionText||"",ctaUrl:e.accessInfo.accessExplanation.ctaUrl??void 0,dismiss:e.accessInfo.accessExplanation.dismiss??void 0}:null}function S(e,t){return"Audiobook"===e.__typename?function(e,t){return{type:s.c.AUDIOBOOK,uri:e.uri,name:e.name,coverArt:e.coverArt?.sources??[],narrators:e.narrators?.map((e=>e?.name)).filter(v)??[],sample:"Chapter"===e.trailerV2?.data.__typename?(c=e.trailerV2.data,{type:s.c.CHAPTER,uri:c.uri,name:c.name,coverArt:c.coverArt?.sources||[],audio:c.audio,audioPreview:c.audioPreview,sharingInfo:c.sharingInfo,duration:{milliseconds:c.duration.totalMilliseconds},contentRating:c.contentRating,isPlayable:c.playability.playable}):null,htmlDescription:e.htmlDescription??"",htmlDescriptionPlain:e.htmlDescriptionPlain??"",authorName:e.authors?.map((e=>e?.name)).filter(Boolean).join(i.Ru.getSeparator())??"",rating:e.rating,isExplicit:e.contentRating?.label===r.x7.Explicit,duration:e.duration?.totalMilliseconds??0,copyrights:e.publisher?(n=e.publisher.name,a=e.copyrights,[(o=n,l="P",{text:o,type:l}),...a.items]):[],publishDate:e.publishDate?new Date(e.publishDate.isoString):null,price:e.price,isLocked:!!t||x(e.accessInfo),consumptionCapExplanation:C(e),signifierText:e.accessInfo?.signifier?.text??void 0,topics:e.genres?.map((e=>({uri:e.destinationUri,title:e.contextualName})))||[],isPreRelease:e.isPreRelease??!1,preReleaseEndDateTime:e.preReleaseEndDateTime?new Date(e.preReleaseEndDateTime.isoString):void 0};var n,a,o,l,c}(e,t):_(e)}},13213:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});var i=n(74743),r=n(10910),s=n(98305);const a={[s.b.OFF]:r.j.OFF,[s.b.LOCAL]:r.j.ON,[s.b.SMART]:r.j.SMART_SHUFFLE};class o{sessionShuffleStates=new Map;constructor(e,t,n){this._contextualShuffle=e,this._events=t,this._syncShuffle=n}_update=(e,t)=>{this.sessionShuffleStates.get(e)!==t&&(this.sessionShuffleStates.set(e,t),this._syncShuffle(e,t).then((()=>{this._events.emitUpdateShuffleModeCompleteSync(e,t)}),(()=>this._events.emitUpdateShuffleModeErrorSync(e,t))))};observe=()=>{this._contextualShuffle.getEvents().addListener(i.w.UPDATE,(e=>{if("shuffle-state"===e.data.storeName){const t=a[e.data.value];this._update(e.data.key,t)}})),this._contextualShuffle.getEvents().addListener(i.w.DELETE,(e=>{"shuffle-state"===e.data.storeName&&this._update(e.data.key,r.j.OFF)}))}}},18321:(e,t,n)=>{"use strict";n.d(t,{L:()=>s,S:()=>r});var i=n(37766);let r=function(e){return e.UPDATE="update",e.UPDATE_COMPLETE="update_complete",e.UPDATE_ERROR="update_error",e}({});class s extends i.V{emitUpdateShuffleModeSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE,{shuffleMode:t,contextURI:e});return n}emitUpdateShuffleModeCompleteSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE_COMPLETE,{shuffleMode:t,contextURI:e});return n}emitUpdateShuffleModeErrorSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE_ERROR,{shuffleMode:t,contextURI:e});return n}}},34980:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});const i=(e,t)=>{const n=()=>{e.getValues().then((e=>{t("1"===e["dsa-mode-enabled"])}))};n(),e.subValues(n)}},34627:(e,t,n)=>{"use strict";n.d(t,{U:()=>s,t:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'ShuffleContext' without 'ShuffleProvider'!");return e}},10910:(e,t,n)=>{"use strict";n.d(t,{j:()=>i});let i=function(e){return e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.SMART_SHUFFLE=2]="SMART_SHUFFLE",e}({})},6370:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(45640),r=n(10910);const s=e=>{switch(e){case r.j.OFF:return!1;case r.j.ON:case r.j.SMART_SHUFFLE:return!0;default:return(0,i.k)(e),!1}}},23974:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});var i=n(10910);function r(e){return"true"===e?.context.metadata?.enhanced_context?i.j.SMART_SHUFFLE:!0===e?.shuffle?i.j.ON:!1===e?.shuffle?i.j.OFF:void 0}},10229:(e,t,n)=>{"use strict";n.d(t,{Y9:()=>r,nW:()=>s});var i=n(8012);let r=function(e){return e[e.HIGH=.25]="HIGH",e[e.LOW=.1]="LOW",e[e.SING_ALONG_OFF=.99999]="SING_ALONG_OFF",e}({}),s=function(e){return e.ENABLED="enabled",e.DISABLED="disabled",e}({});(0,i.u)("SingAlongAPI")},68096:(e,t,n)=>{"use strict";n.d(t,{o:()=>p});var i=n(53896),r=n(80927),s=n(94300);function a(e,t,n){return t.filter((t=>!function(e,t,n){return e.find((e=>e[t]===n))??null}(e,n,t[n])))}var o=n(98198),l=n(14056),c=n(5405);function u(e){const{id:t,username:n,display_name:i,image_url:r,large_image_url:s}=e;return{id:t,username:n,displayName:i,imageUrl:r,largeImageUrl:s}}function d(e,t){const{timestamp:n,session_id:i,join_session_token:r,session_owner_id:s,session_members:a,join_session_uri:o,is_session_owner:l,active:c,queue_only_mode:d,participantVolumeControl:m}=e;return{timestamp:n,sessionId:i,isSessionOwner:l,joinSessionToken:r??"",joinSessionShortLink:t,sessionOwnerId:s??"",sessionMembers:a?.map(u)??[],joinSessionUri:o??"",queueOnlyMode:d,participantVolumeControl:m??"UNAVAILABLE",active:c??!1}}var m=n(45640);class p{_fetchCurrentSessionInFlightCache=new o.od;constructor(e,t,n,s,a){this.socialConnectServiceClient=e,this.serviceEvents=t,this.urlDispenserServiceClient=n,this.socialConnectProductState=s,this.socialConnectConfig=a,this.socialConnectServiceClient=e,this.currentSession=null,this.events=new i.z,this.shortLinkCache=new o.l2,this.serviceEvents.addListener(r.n.SESSION_UPDATE,this.handleSessionUpdate.bind(this)),this.serviceEvents.addListener(r.n.SESSION_MESSAGE,this.handleSessionMessage.bind(this)),this.socialConnectServiceClient.onConnected(this.fetchCurrentSession.bind(this))}async handleSessionUpdate({data:e}){const t=await this.getShortInviteLink(e.session.join_session_token,e.session.join_session_uri),n=d(e.session,t);if(this.isSessionNewer(n))switch(e.reason){case c.YM.YOU_LEFT:case c.YM.YOU_WERE_KICKED:this.cleanupSession();break;case c.YM.SESSION_DELETED:this.currentSession&&this.emitSessionEnded(this.currentSession),this.cleanupSession();break;case c.YM.USER_JOINED:case c.YM.USER_LEFT:this.maybeEmitLeaveOrJoin(n,e.reason),this.setCurrentSession(n);break;case c.YM.YOU_JOINED:case c.YM.USER_KICKED:case c.YM.UNKNOWN_UPDATE_TYPE:case c.YM.NEW_SESSION:case c.YM.PARTICIPANT_PROMOTED_TO_HOST:case c.YM.VOLUME_CONTROL_PERMISSIONS_CHANGED:case c.YM.QUEUE_ONLY_MODE_CONTROL_CHANGED:case c.YM.WIFI_BROADCAST_CHANGED:case c.YM.ACTIVE_DEVICE_CHANGED:this.setCurrentSession(n);break;default:(0,m.d)(e.reason)}}handleSessionMessage({data:e}){this.events.emit(i.K.SESSION_MESSAGE,e.userMessage)}isSessionNewer(e){const t=parseInt(this.currentSession?.timestamp??"0",10);return parseInt(e.timestamp,10)>t}getEnabled(){return this.socialConnectConfig}getJamExperience(){return this.socialConnectProductState.getJamExperience()}getCurrentSession(){return this.currentSession}cleanupSession(){this.shortLinkCache.clear(),this.setCurrentSession(null)}emitSessionEnded(e){const t=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId))?.displayName??null;this.events.emit(i.K.SESSION_ENDED,{sessionId:e.sessionId??null,isSessionOwner:e.isSessionOwner??null,hostDisplayName:t})}maybeEmitLeaveOrJoin(e,t){if(!this.currentSession)return;if(this.currentSession.sessionId!==e.sessionId)return;const n=t===c.YM.USER_JOINED?a(this.currentSession.sessionMembers,e.sessionMembers,"id"):a(e.sessionMembers,this.currentSession.sessionMembers,"id");if(n.length<1)return;const r=Array.from(n,(e=>e.displayName)),s=t===c.YM.USER_JOINED?i.K.JOINED:i.K.LEFT;this.events.emit(s,{sessionId:this.currentSession.sessionId,isSessionOwner:this.currentSession.isSessionOwner,users:r})}setCurrentSession(e){this.currentSession=e,this.events.emit(i.K.UPDATE,e)}getEvents(){return this.events}async handleSessionResponse(e){if(!e||!e.join_session_token||!e.join_session_uri)return this.cleanupSession(),null;const t=d(e,await this.getShortInviteLink(e.join_session_token,e.join_session_uri));return(e.session_id!==this.currentSession?.sessionId||this.isSessionNewer(t))&&this.setCurrentSession(t),t}async fetchCurrentSession(){try{const e=await this._fetchCurrentSessionInFlightCache.create("fetchCurrentSession",(()=>this.socialConnectServiceClient.fetchCurrentSession()));return this.handleSessionResponse(e)}catch(e){return(0,s.UD)(e),null}}async createSession(){try{const e=await this.socialConnectServiceClient.createSession();return this.handleSessionResponse(e)}catch(e){return(0,s.UD)(e),null}}async leaveSession(){let e=!1;if(this.currentSession)try{e=await this.socialConnectServiceClient.leaveSession(this.currentSession.sessionId)}catch(e){(0,s.UD)(e)}finally{this.cleanupSession()}return e}async deleteSession(){let e=!1;if(this.currentSession)try{e=await this.socialConnectServiceClient.deleteSession(this.currentSession.sessionId)}catch(e){(0,s.UD)(e)}finally{this.cleanupSession()}return e}async joinSession(e,t,n){const i=await this.socialConnectServiceClient.joinSession(e,t,n);return this.handleSessionResponse(i)}async getSessionInfo(e){const t=await this.socialConnectServiceClient.getSessionInfo(e);return t?d(t,null):null}async removeSessionMember(e){if(this.currentSession)try{const t=await this.socialConnectServiceClient.removeSessionMember(this.currentSession.sessionId,e);return this.handleSessionResponse(t)}catch(e){return(0,s.UD)(e),null}return null}async kickAllParticipants(e){if(this.currentSession)try{const t=await this.socialConnectServiceClient.kickAllParticipants(e);return this.handleSessionResponse(t)}catch(e){return(0,s.UD)(e),null}return null}async getShortInviteLink(e,t){if(!e||!t)return null;const n=this.shortLinkCache.get(e);if(n)return n;try{const n={utm_campaign:null,utm_term:null,utm_medium:"share-link",utm_content:null,utm_source:"share-options-sheet"},r=[{key:"ssp",value:"1"},{key:"app_destination",value:"socialsession"}],s={title:l.Ru.get("web-player.social-connect.share.title"),image_url:`https://shareables.scdn.co/publish/socialsession/${e}`},a=await this.urlDispenserServiceClient.getShortUrl(t,{utmParameters:n,customData:r,linkPreview:s}),o={shareableUrl:(i=a).shareable_url,shareId:i.share_id,spotifyUri:i.spotify_uri};return this.shortLinkCache.set(e,o),o}catch(e){return(0,s.UD)(e),null}var i}async setQueueOnlyMode(e){const t=await this.socialConnectServiceClient.setQueueOnlyMode(e);return this.handleSessionResponse(t)}async setParticipantVolumeControl(e){const t=await this.socialConnectServiceClient.setParticipantVolumeControl(e);return this.handleSessionResponse(t)}}},43950:(e,t,n)=>{"use strict";n.d(t,{x:()=>a});var i=n(70964),r=n(80927),s=n(5405);class a extends r.M{_update_subscription=null;_message_subscription=null;constructor(e){super(),this._pubSubAPI=e}subscribeToUpdates(){this._update_subscription||(this._update_subscription=this._pubSubAPI.subscribe({ident:"social-connect/v2/session_update",onMessage:e=>this.onSessionUpdate(e)}))}unsubscribeToUpdates(){null!==this._update_subscription&&this._update_subscription.cancel()}onSessionUpdate(e){e.payloads.forEach((e=>{const t=JSON.parse((0,i.dI)(e));(0,s.HP)(t)&&this.emit(r.n.SESSION_UPDATE,t)}))}subscribeToMessages(){this._message_subscription||(this._message_subscription=this._pubSubAPI.subscribe({ident:"social-connect/v2/session_messages",onMessage:e=>this.onSessionMessage(e)}))}unsubscribeToMessages(){null!==this._message_subscription&&this._message_subscription.cancel()}onSessionMessage(e){e.payloads.forEach((e=>{const t=JSON.parse((0,i.dI)(e));(0,s.Vl)(t)&&this.emit(r.n.SESSION_MESSAGE,t)}))}}},31530:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});class i{async fetchCurrentSession(){return null}async createSession(){return null}async leaveSession(e){return!1}async deleteSession(e){return!1}async joinSession(e,t,n){return null}async getSessionInfo(){return null}async removeSessionMember(){return null}async kickAllParticipants(){return null}async setParticipantVolumeControl(){return null}onConnected(){}async setQueueOnlyMode(){return null}}},2532:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(80927);class r extends i.M{subscribeToUpdates(){}unsubscribeToUpdates(){}subscribeToMessages(){}unsubscribeToMessages(){}}},53896:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,z:()=>s});var i=n(37766);let r=function(e){return e.UPDATE="update",e.SESSION_ENDED="session_ended",e.JOINED="joined",e.LEFT="left",e.SESSION_MESSAGE="session_message",e}({});class s extends i.V{}},80927:(e,t,n)=>{"use strict";n.d(t,{M:()=>s,n:()=>r});var i=n(37766);let r=function(e){return e.SESSION_UPDATE="SESSION_UPDATE",e.SESSION_MESSAGE="SESSION_MESSAGE",e}({});class s extends i.V{numUpdateListeners=0;numMessageListeners=0;constructor(){super(),this.onAddListener(r.SESSION_UPDATE,(()=>{this.numUpdateListeners++,1===this.numUpdateListeners&&this.subscribeToUpdates()})),this.onRemoveListener(r.SESSION_UPDATE,(()=>{this.numUpdateListeners--,0===this.numUpdateListeners&&this.unsubscribeToUpdates()})),this.onAddListener(r.SESSION_MESSAGE,(()=>{this.numMessageListeners++,1===this.numMessageListeners&&this.subscribeToMessages()})),this.onRemoveListener(r.SESSION_MESSAGE,(()=>{this.numMessageListeners--,0===this.numMessageListeners&&this.unsubscribeToMessages()}))}}},70786:(e,t,n)=>{"use strict";n.d(t,{N:()=>r,g:()=>s});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'SocialConnectAPIContext' without 'SocialConnectAPIProvider'!");return e}},52459:(e,t,n)=>{"use strict";n.d(t,{M:()=>r});var i=n(70786);function r(){return(0,i.g)().getEnabled()}},50042:(e,t,n)=>{"use strict";n.d(t,{D:()=>o});var i=n(79474),r=n(70786),s=n(19793),a=n(79864);const o=()=>{const e=(0,r.g)(),t=(0,i.useContext)(s.a),n=(0,a.v)((e=>{const t=e.activeDevice??e.devices.find((e=>e.isLocal));if(t)return t.connectStateId}));return{currentSession:t,createSession:(0,i.useCallback)((()=>e.createSession()),[e]),leaveSession:(0,i.useCallback)((()=>e.leaveSession()),[e]),deleteSession:(0,i.useCallback)((()=>e.deleteSession()),[e]),joinSession:(0,i.useCallback)(((t,i)=>e.joinSession(t,i,n)),[n,e]),refreshCurrentSession:(0,i.useCallback)((()=>e.fetchCurrentSession()),[e]),getSessionInfo:(0,i.useCallback)((t=>e.getSessionInfo(t)),[e]),removeSessionMember:(0,i.useCallback)((t=>e.removeSessionMember(t)),[e]),kickAllParticipants:(0,i.useCallback)((t=>e.kickAllParticipants(t)),[e]),setQueueOnlyMode:(0,i.useCallback)((t=>e.setQueueOnlyMode(t)),[e]),setParticipantVolumeControl:(0,i.useCallback)((t=>e.setParticipantVolumeControl(t)),[e])}}},3976:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var i=n(79474),r=n(70786);function s(e,t){const n=(0,i.useRef)(t),s=(0,r.g)();n.current=t,(0,i.useEffect)((()=>{const t=e=>n.current(e);return s.getEvents().addListener(e,t),()=>{s.getEvents().removeListener(e,t)}}),[s,e])}},48516:(e,t,n)=>{"use strict";n.d(t,{D:()=>r});var i=n(91864);class r{constructor(e){this.transport=e}onConnected(e){this.transport.on(i.TransportEvent.CONNECTED,e),this.transport.on(i.TransportEvent.RECONNECTED,e)}async getSessionInfo(e){const{body:t}=await this.transport.request(`@webgate/social-connect/v2/sessions/info/${e}`,{responseType:"json"});return t}async fetchCurrentSession(){return null}async createSession(){return null}async leaveSession(){return!1}async deleteSession(){return!1}async joinSession(){return null}async removeSessionMember(){return null}async kickAllParticipants(){return null}async setQueueOnlyMode(){return null}async setParticipantVolumeControl(){return null}}},33831:(e,t,n)=>{"use strict";n.d(t,{_:()=>i,l:()=>r});let i=function(e){return e.DISABLED="DISABLED",e.RESTRICTED="RESTRICTED",e.ENABLED="ENABLED",e}({}),r=function(e){return e.NONE="NONE",e.UNKNOWN="UNKNOWN",e.FREE="FREE",e.PREMIUM="PREMIUM",e}({})},5405:(e,t,n)=>{"use strict";n.d(t,{HP:()=>r,RG:()=>s,Vl:()=>a,YM:()=>i});let i=function(e){return e.UNKNOWN_UPDATE_TYPE="UNKNOWN_UPDATE_TYPE",e.NEW_SESSION="NEW_SESSION",e.USER_JOINED="USER_JOINED",e.USER_LEFT="USER_LEFT",e.SESSION_DELETED="SESSION_DELETED",e.YOU_LEFT="YOU_LEFT",e.YOU_WERE_KICKED="YOU_WERE_KICKED",e.YOU_JOINED="YOU_JOINED",e.PARTICIPANT_PROMOTED_TO_HOST="PARTICIPANT_PROMOTED_TO_HOST",e.USER_KICKED="USER_KICKED",e.VOLUME_CONTROL_PERMISSIONS_CHANGED="VOLUME_CONTROL_PERMISSIONS_CHANGED",e.QUEUE_ONLY_MODE_CONTROL_CHANGED="QUEUE_ONLY_MODE_CONTROL_CHANGED",e.WIFI_BROADCAST_CHANGED="WIFI_BROADCAST_CHANGED",e.ACTIVE_DEVICE_CHANGED="ACTIVE_DEVICE_CHANGED",e}({});function r(e){return"object"==typeof e&&null!==e&&"session"in e&&"reason"in e&&"string"==typeof e.reason&&e.reason in i}let s=function(e){return e.UNKNOWN="UNKNOWN",e.PERMISSIONS_RESTRICTED_GENERIC="PERMISSIONS_RESTRICTED_GENERIC",e.CONNECTIVITY_ISSUES="CONNECTIVITY_ISSUES",e.CONTENT_ISSUES="CONTENT_ISSUES",e.NO_HOST_ACTIVE_DEVICE="NO_HOST_ACTIVE_DEVICE",e.GENERIC_ERROR="GENERIC_ERROR",e}({});function a(e){return"object"==typeof e&&null!==e&&"userMessage"in e&&"string"==typeof e.userMessage&&e.userMessage in s}},42947:(e,t,n)=>{"use strict";n.d(t,{Bj:()=>r,T4:()=>s,kt:()=>a});var i=n(83856);function r(e,t){if(!t)return null;const n=(0,i.o_)(t);if(!n||!(0,i.AP)(n))return null;const r=(0,i.XI)(n.username);return e.find((e=>e.username===r))??null}function s(e){const t=e.getCurrentSession(),n=t?.sessionOwnerId;return n?t.sessionMembers.find((e=>e.id===n))??null:null}function a(e,t){if(!t||!function(e){return e.getCurrentSession()?.isSessionOwner??!1}(e))return!1;const n=e.getCurrentSession(),i=r(n?.sessionMembers??[],t),a=s(e);return!!i&&i?.username!==a?.username}},78014:(e,t,n)=>{"use strict";n.d(t,{U:()=>a});var i=n(91864),r=n(68013);const s="@webgate/social-connect";class a{constructor(e,t){this._transport=e,this._requestBuilder=t}onConnected(e){this._transport.on(i.TransportEvent.CONNECTED,e),this._transport.on(i.TransportEvent.RECONNECTED,e)}async fetchCurrentSession(){try{const{body:e}=await this._requestBuilder.build().withHost(`${s}/v2/sessions/current`).withJsonContentType().withoutMarket().send();return e}catch(e){if(e instanceof r.O&&404===e.status)return null;throw e}}async createSession(){const{body:e}=await this._requestBuilder.build().withHost(`${s}/v2/sessions/current_or_new?activate=true`).withJsonContentType().withoutMarket().send();return e}async leaveSession(e){try{return await this._requestBuilder.build().withMethod("POST").withHost(`${s}/v3/sessions/${e}/leave`).withJsonContentType().withoutMarket().send(),!0}catch(e){if(e instanceof r.O&&404===e.status)return!0;throw e}}async deleteSession(e){try{return await this._requestBuilder.build().withMethod("DELETE").withHost(`${s}/v3/sessions/${e}`).withJsonContentType().withoutMarket().send(),!0}catch(e){if(e instanceof r.O&&404===e.status)return!0;throw e}}async joinSession(e,t,n){const i=new URLSearchParams;i.set("playback_control","REMOTE"===t?"listen_and_control":"control"),n&&i.set("local_device_id",n);const{body:r}=await this._requestBuilder.build().withMethod("POST").withHost(`${s}/v2/sessions/join/${e}?${i.toString()}`).withJsonContentType().withoutMarket().send();return r}async getSessionInfo(e){try{const{body:t}=await this._requestBuilder.build().withHost(`${s}/v2/sessions/info/${e}`).withJsonContentType().withoutMarket().send();return t}catch(e){if(e instanceof r.O&&404===e.status)return null;throw e}}async removeSessionMember(e,t){const{body:n}=await this._requestBuilder.build().withMethod("POST").withHost(`${s}/v3/sessions/${e}/member/${t}/kick`).withJsonContentType().withoutMarket().send();return n}async kickAllParticipants(e){const{body:t}=await this._requestBuilder.build().withMethod("POST").withHost(`${s}/v3/sessions/${e}/participant/all/kick`).withJsonContentType().withoutMarket().send();return t}async setQueueOnlyMode(e){const{body:t}=await this._requestBuilder.build().withMethod("PUT").withHost(`${s}/v2/sessions/current/queue_only_mode/${e?"enabled":"disabled"}`).withJsonContentType().withoutMarket().send();return t}async setParticipantVolumeControl(e){const{body:t}=await this._requestBuilder.build().withMethod("PUT").withHost(`${s}/v2/sessions/current/volume_control/${e?"ENABLED":"DISABLED"}`).withJsonContentType().withoutMarket().send();return t}}},40643:(e,t,n)=>{"use strict";n.d(t,{L$:()=>l,Q2:()=>c,hV:()=>o,j2:()=>a,pr:()=>d,qc:()=>s,rO:()=>u});var i=n(35828),r=n(87344);const s=({albumArtists:e,albumName:t,albumType:n,shouldLocalize:s,i18n:a})=>{if(!n||!t||!e)return"";const o=n!==i._m.Ep?(e=>e.charAt(0).toUpperCase()+e.toLowerCase().slice(1))(n):n,l=(0,r.C)(n),c=`${t} - ${o} by ${e} | Spotify`,u=a.get("i18n.meta.album.title",t,l,e);return s?u:c},a=({artistName:e})=>e?`${e} | Spotify`:"",o=({showOrAudiobookName:e,type:t})=>e?`${e} | ${t} on Spotify`:"",l=({episodeOrChapterName:e,showOrAudiobookName:t,type:n})=>e&&t?`${e} - ${t} | ${n} on Spotify`:"",c=({playlistName:e,userName:t,isSpotifyOwned:n=!1})=>{if(!e||!t)return"";return`${e}${n?"":` - playlist by ${t}`} | ${n?"Spotify Playlist":"Spotify"}`},u=({i18n:e,trackArtistsList:t,trackName:n,shouldLocalize:i,disabled:r=!1})=>{if(!t||!n)return"";let s=`${n} - song and lyrics by ${t} | Spotify`,a=e.get("i18n.meta.track-lyrics.title",n,t);return r&&(s=`${n} - song by ${t} | Spotify`,a=e.get("i18n.meta.track.title",n,t)),i?a:s},d=({i18n:e,shouldLocalize:t})=>{const n=e.get("i18n.meta.home.title");return t?n:"Spotify - Web Player: Music for everyone"}},13781:(e,t,n)=>{"use strict";n.d(t,{N:()=>r,V:()=>s});let i=null;function r(e){i=e}function s(){if(null===i)throw new Error("Missing `instance`. Have you called `setTransportInstance` yet?");return i}},46268:(e,t,n)=>{"use strict";function i(e){return async()=>{const t=await e();if(null===t)throw new Error("Token is currently unavailable.");const{accessToken:n,accessTokenExpirationTimestampMs:i}=t;return[n,Math.floor(((i||0)-Date.now())/1e3)]}}n.d(t,{C:()=>i})},17359:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var i=n(46268);const r={disconnectBeforeUnload:!0,reconnectionRetries:3,requestMode:"fetch"};function s(e,t,n,s={}){return e({providers:{endpoints:t,token:(0,i.C)(n)},...r,...s})}},37938:(e,t,n)=>{"use strict";n.d(t,{M:()=>l});var i=n(82740);const r="https://apresolve.spotify.com/",s="https://api.spotify.com/";var a=function(e){return e.DEALER="dealer",e.WEBGATE="spclient",e}(a||{});const o=3e3;function l({timeout:e=o}={}){const t=function(e){const t=`${r}?type=${a.DEALER}&type=${a.WEBGATE}`;return async()=>{const n=new AbortController,i=setTimeout((()=>n.abort()),e);let r;try{const e=await fetch(t,{signal:n.signal});clearTimeout(i),r=await e.json()}catch(t){if(n.signal.aborted)throw new Error(`x-resolve request timed out after ${e} ms`);throw t}if(!Array.isArray(r[a.DEALER])||!Array.isArray(r[a.WEBGATE])||0===r[a.DEALER].length||0===r[a.WEBGATE].length)throw new Error("x-resolve responded with incomplete results");const o=r[a.DEALER][0],l=r[a.WEBGATE][0];return{dealer:`wss://${o.replace(/:443$/,"")}`,webgate:`https://${l.replace(/:443$/,"")}`,webapi:s}}}(e),n=(0,i.Q)({});return async function(e){try{return await t(e)}catch(t){return console.error("Failed to resolve endpoints via x-resolve. Using fallbacks!",t),await n(e)}}}},80884:(e,t,n)=>{"use strict";function i(e,t={}){return void 0===e?t:{...e,...t}}n.d(t,{K:()=>i})},67296:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});var i=n(70773);class r{constructor(e){this.ubiLogger=e}logInteraction(e){return {interactionId:null,pageInstanceId:null};const t=this.ubiLogger.logInteraction.bind(this.ubiLogger),n=this.ubiLogger.getPageInstanceId()??void 0;if("ui_navigate"!==e.actionName){return{interactionId:t(e),pageInstanceId:n}}const i=this.formatUiNavigateEvent(e),r=t(i);return this.interaction={id:r,event:i},{interactionId:r,pageInstanceId:n}}logImpression(e){return;return this.ubiLogger.logImpression(e)}logClientLostFocus(){this.ubiLogger.logClientLostFocus()}logClientGainedFocus(){this.ubiLogger.logClientGainedFocus()}logNavigation(e){return;this.ubiLogger.logNavigationStart(e),this.ubiLogger.logNavigationEnd({pageId:e.pageId,entityUri:e.entityUri}),this.interaction=void 0}getInteractionId(e){if(!this.interaction)return;const{event:t,id:n}=this.interaction,i=t.actionParameterNames?.findIndex((e=>"destination"===e));if(void 0===i||-1===i)return;const r=t.actionParameterValues?.[i];if(r&&r===e)return n}formatUiNavigateEvent=e=>{const t=e.actionParameterNames?.findIndex((e=>"destination"===e));return void 0===t||-1===t?e:{...e,actionParameterValues:e.actionParameterValues?.map(((e,n)=>n!==t?e:(0,i.y)(e)??""))}}}},70773:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});n(36805),n(4563),n(79606),n(98211),n(24164),n(79499),n(49271);var i=n(83856);const r=new Set([i.NQ.ALBUM,i.NQ.ARTIST,i.NQ.PLAYLIST,i.NQ.PLAYLIST_V2,i.NQ.TRACK,i.NQ.EPISODE,i.NQ.SHOW,i.NQ.LOCAL_TRACK,i.NQ.PRERELEASE]),s=e=>{const t=(0,i.o_)(e);if(!t)return;if((0,i.Th)(t))return r.has(t.id)?t.toString().replace(":app:",":"):t.toString();if(r.has(t.type))return t.toString();const n=t.args||t.query&&[t.query]||t.category&&[t.category]||void 0,s=(0,i.bX)(t.type,n);return s?.toString()??void 0}},38743:(e,t,n)=>{"use strict";n.d(t,{J:()=>r});var i=n(8012);(0,i.u)("UrlDispenserServiceClient");class r{constructor(e){this._builder=e}async getShortUrl(e,{utmParameters:t,customData:n,linkPreview:i}){const r=await this._builder.build().withHost("@webgate/url-dispenser/v1/generate-url").withMethod("POST").withJsonContentType().withoutMarket().withEndpointIdentifier("/v1/generate-url").withBody({spotify_uri:e,custom_data:n,link_preview:i,utm_parameters:t}).send();if(201===r.status)return r.body;throw new Error(`Failed to get short link for uri ${e}`)}}},75891:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,J:()=>r});var i=n(79474);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'UrlDispenserServiceContext' without 'UrlDispenserServiceProvider'!");return e}},90700:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(83856);function r(e){const t=(0,i.o_)(e);if(null===t||void 0===t.username)throw new Error("Invalid URI or URI does not contain username!");return t.username}},27778:(e,t,n)=>{"use strict";n.d(t,{IB:()=>a,J2:()=>l,Np:()=>c,kX:()=>u});var i=n(14056),r=n(45640),s=n(15945);const a={[s.h.en]:{displayName:"English",displayNameEn:"English"},[s.h.af]:{displayName:"Afrikaans",displayNameEn:"Afrikaans"},[s.h.am]:{displayName:"አማርኛ",displayNameEn:"Amharic"},[s.h.ar]:{displayName:"العَرَبِيَّة",displayNameEn:"Arabic",isRTL:!0},[s.h.arEG]:{displayName:"عربي مصري",displayNameEn:"Arabic (Egypt)",isRTL:!0},[s.h.arMA]:{displayName:"العَرَبِيَّة مغربي",displayNameEn:"Arabic (Morocco)",isRTL:!0},[s.h.arSA]:{displayName:"العربية السعودية",displayNameEn:"Arabic (Saudi Arabia)",isRTL:!0},[s.h.az]:{displayName:"Azərbaycanca",displayNameEn:"Azerbaijani"},[s.h.bg]:{displayName:"Български",displayNameEn:"Bulgarian"},[s.h.bho]:{displayName:"भोजपुरी",displayNameEn:"Bhojpuri"},[s.h.bn]:{displayName:"বাংলা",displayNameEn:"Bengali"},[s.h.bs]:{displayName:"Bosanski",displayNameEn:"Bosnian"},[s.h.ca]:{displayName:"Català",displayNameEn:"Catalan"},[s.h.cs]:{displayName:"Čeština",displayNameEn:"Czech"},[s.h.da]:{displayName:"Dansk",displayNameEn:"Danish"},[s.h.de]:{displayName:"Deutsch",displayNameEn:"German"},[s.h.el]:{displayName:"Eλληνικά",displayNameEn:"Greek"},[s.h.enGB]:{displayName:"English",displayNameEn:"United Kingdom"},[s.h.es]:{displayName:"Español de España",displayNameEn:"European Spanish"},[s.h.esAR]:{displayName:"Español (Argentina)",displayNameEn:"Spanish (Argentina)"},[s.h.esMX]:{displayName:"Español (México)",displayNameEn:"Spanish (Mexico)"},[s.h.es419]:{displayName:"Español de Latinoamérica",displayNameEn:"Latin American Spanish"},[s.h.et]:{displayName:"Eesti",displayNameEn:"Estonian"},[s.h.eu]:{displayName:"Euskara",displayNameEn:"Basque"},[s.h.fa]:{displayName:"فارسی",displayNameEn:"Persian",isRTL:!0},[s.h.fi]:{displayName:"Suomeksi",displayNameEn:"Finnish"},[s.h.fil]:{displayName:"Filipino",displayNameEn:"Filipino"},[s.h.fr]:{displayName:"Français",displayNameEn:"French"},[s.h.frCA]:{displayName:"Français Canadien",displayNameEn:"Canadian French"},[s.h.gl]:{displayName:"Galego",displayNameEn:"Galician"},[s.h.gu]:{displayName:"ગુજરાતી",displayNameEn:"Gujarati"},[s.h.he]:{displayName:"עברית",displayNameEn:"Hebrew",isRTL:!0},[s.h.hi]:{displayName:"हिन्दी",displayNameEn:"Hindi"},[s.h.hr]:{displayName:"Hrvatski",displayNameEn:"Croatian"},[s.h.hu]:{displayName:"Magyar",displayNameEn:"Hungarian"},[s.h.id]:{displayName:"Bahasa Indonesia",displayNameEn:"Indonesian"},[s.h.is]:{displayName:"Íslenska",displayNameEn:"Icelandic"},[s.h.it]:{displayName:"Italiano",displayNameEn:"Italian"},[s.h.ja]:{displayName:"日本語",displayNameEn:"Japanese"},[s.h.kn]:{displayName:"ಕನ್ನಡ",displayNameEn:"Kannada"},[s.h.ko]:{displayName:"한국어",displayNameEn:"Korean"},[s.h.lt]:{displayName:"Lietuvių",displayNameEn:"Lithuanian"},[s.h.lv]:{displayName:"Latviešu",displayNameEn:"Latvian"},[s.h.mk]:{displayName:"Македонски",displayNameEn:"Macedonian"},[s.h.ml]:{displayName:"മലയാളം",displayNameEn:"Malayalam"},[s.h.mr]:{displayName:"मराठी",displayNameEn:"Marathi"},[s.h.ms]:{displayName:"Melayu",displayNameEn:"Malay"},[s.h.nb]:{displayName:"Norsk",displayNameEn:"Norwegian"},[s.h.ne]:{displayName:"नेपाली",displayNameEn:"Nepali"},[s.h.nl]:{displayName:"Nederlands",displayNameEn:"Dutch"},[s.h.or]:{displayName:"ଓଡ଼ିଆ",displayNameEn:"Odia"},[s.h.paIN]:{displayName:"ਪੰਜਾਬੀ",displayNameEn:"Punjabi"},[s.h.paPK]:{displayName:"پنجابی",displayNameEn:"Punjabi (Naskh)",isRTL:!0},[s.h.pl]:{displayName:"Polski",displayNameEn:"Polish"},[s.h.ptBR]:{displayName:"Português do Brasil",displayNameEn:"Brazilian Portuguese"},[s.h.ptPT]:{displayName:"Português",displayNameEn:"European Portuguese"},[s.h.ro]:{displayName:"Română",displayNameEn:"Romanian"},[s.h.ru]:{displayName:"Русский",displayNameEn:"Russian"},[s.h.sk]:{displayName:"Slovenčina",displayNameEn:"Slovak"},[s.h.sl]:{displayName:"Slovenski",displayNameEn:"Slovenian"},[s.h.sr]:{displayName:"Srpski",displayNameEn:"Serbian"},[s.h.sv]:{displayName:"Svenska",displayNameEn:"Swedish"},[s.h.sw]:{displayName:"Kiswahili",displayNameEn:"Swahili"},[s.h.ta]:{displayName:"தமிழ்",displayNameEn:"Tamil"},[s.h.te]:{displayName:"తెలుగు",displayNameEn:"Telugu"},[s.h.th]:{displayName:"ภาษาไทย",displayNameEn:"Thai"},[s.h.tr]:{displayName:"Türkçe",displayNameEn:"Turkish"},[s.h.uk]:{displayName:"Українська",displayNameEn:"Ukrainian"},[s.h.ur]:{displayName:"اردو",displayNameEn:"Urdu",isRTL:!0},[s.h.vi]:{displayName:"Tiếng Việt",displayNameEn:"Vietnamese"},[s.h.zhCN]:{displayName:"简体中文",displayNameEn:"Simplified Chinese"},[s.h.zhHK]:{displayName:"繁體中文 (香港)",displayNameEn:"Chinese (Traditional) Hong Kong"},[s.h.zhTW]:{displayName:"中文",displayNameEn:"Traditional Chinese"},[s.h.zu]:{displayName:"IsiZulu",displayNameEn:"Zulu"}},o=[s.h.en,s.h.af,s.h.am,s.h.ar,s.h.arEG,s.h.arMA,s.h.arSA,s.h.az,s.h.bg,s.h.bho,s.h.bn,s.h.bs,s.h.ca,s.h.cs,s.h.da,s.h.de,s.h.el,s.h.enGB,s.h.es,s.h.es419,s.h.esAR,s.h.esMX,s.h.et,s.h.eu,s.h.fa,s.h.fi,s.h.fil,s.h.fr,s.h.frCA,s.h.gl,s.h.gu,s.h.he,s.h.hi,s.h.hr,s.h.hu,s.h.id,s.h.is,s.h.it,s.h.ja,s.h.kn,s.h.ko,s.h.lt,s.h.lv,s.h.mk,s.h.ml,s.h.mr,s.h.ms,s.h.nb,s.h.ne,s.h.nl,s.h.or,s.h.paIN,s.h.paPK,s.h.pl,s.h.ptBR,s.h.ptPT,s.h.ro,s.h.ru,s.h.sk,s.h.sl,s.h.sr,s.h.sv,s.h.sw,s.h.ta,s.h.te,s.h.th,s.h.tr,s.h.uk,s.h.ur,s.h.vi,s.h.zhCN,s.h.zhHK,s.h.zhTW,s.h.zu],l=[...o],c=[...o],u=e=>{switch(e){case s.h.en:return i.Ru.get("locale.en");case s.h.af:return i.Ru.get("locale.af");case s.h.am:return i.Ru.get("locale.am");case s.h.ar:return i.Ru.get("locale.ar");case s.h.arEG:return i.Ru.get("locale.ar-EG");case s.h.arMA:return i.Ru.get("locale.ar-MA");case s.h.arSA:return i.Ru.get("locale.ar-SA");case s.h.az:return i.Ru.get("locale.az");case s.h.bg:return i.Ru.get("locale.bg");case s.h.bho:return i.Ru.get("locale.bho");case s.h.bn:return i.Ru.get("locale.bn");case s.h.bs:return i.Ru.get("locale.bs");case s.h.ca:return i.Ru.get("locale.ca");case s.h.cs:return i.Ru.get("locale.cs");case s.h.da:return i.Ru.get("locale.da");case s.h.de:return i.Ru.get("locale.de");case s.h.el:return i.Ru.get("locale.el");case s.h.enGB:return i.Ru.get("locale.en-GB");case s.h.es:return i.Ru.get("locale.es");case s.h.es419:return i.Ru.get("locale.es-419");case s.h.esAR:return i.Ru.get("locale.es-AR");case s.h.esMX:return i.Ru.get("locale.es-MX");case s.h.et:return i.Ru.get("locale.et");case s.h.eu:return i.Ru.get("locale.eu");case s.h.fa:return i.Ru.get("locale.fa");case s.h.fi:return i.Ru.get("locale.fi");case s.h.fil:return i.Ru.get("locale.fil");case s.h.fr:return i.Ru.get("locale.fr");case s.h.frCA:return i.Ru.get("locale.fr-CA");case s.h.gl:return i.Ru.get("locale.gl");case s.h.gu:return i.Ru.get("locale.gu");case s.h.he:return i.Ru.get("locale.he");case s.h.hi:return i.Ru.get("locale.hi");case s.h.hr:return i.Ru.get("locale.hr");case s.h.hu:return i.Ru.get("locale.hu");case s.h.id:return i.Ru.get("locale.id");case s.h.is:return i.Ru.get("locale.is");case s.h.it:return i.Ru.get("locale.it");case s.h.ja:return i.Ru.get("locale.ja");case s.h.kn:return i.Ru.get("locale.kn");case s.h.ko:return i.Ru.get("locale.ko");case s.h.lt:return i.Ru.get("locale.lt");case s.h.lv:return i.Ru.get("locale.lv");case s.h.mk:return i.Ru.get("locale.mk");case s.h.ml:return i.Ru.get("locale.ml");case s.h.mr:return i.Ru.get("locale.mr");case s.h.ms:return i.Ru.get("locale.ms");case s.h.nb:return i.Ru.get("locale.nb");case s.h.ne:return i.Ru.get("locale.ne");case s.h.nl:return i.Ru.get("locale.nl");case s.h.or:return i.Ru.get("locale.or");case s.h.paIN:return i.Ru.get("locale.pa-IN");case s.h.paPK:return i.Ru.get("locale.pa-PK");case s.h.pl:return i.Ru.get("locale.pl");case s.h.ptBR:return i.Ru.get("locale.pt-BR");case s.h.ptPT:return i.Ru.get("locale.pt-PT");case s.h.ro:return i.Ru.get("locale.ro");case s.h.ru:return i.Ru.get("locale.ru");case s.h.sk:return i.Ru.get("locale.sk");case s.h.sl:return i.Ru.get("locale.sl");case s.h.sr:return i.Ru.get("locale.sr");case s.h.sv:return i.Ru.get("locale.sv");case s.h.sw:return i.Ru.get("locale.sw");case s.h.ta:return i.Ru.get("locale.ta");case s.h.te:return i.Ru.get("locale.te");case s.h.th:return i.Ru.get("locale.th");case s.h.tr:return i.Ru.get("locale.tr");case s.h.uk:return i.Ru.get("locale.uk");case s.h.ur:return i.Ru.get("locale.ur");case s.h.vi:return i.Ru.get("locale.vi");case s.h.zhCN:return i.Ru.get("locale.zh-CN");case s.h.zhHK:return i.Ru.get("locale.zh-HK");case s.h.zhTW:return i.Ru.get("locale.zh-TW");case s.h.zu:return i.Ru.get("locale.zu");default:return(0,r.d)(e)}}},35828:(e,t,n)=>{"use strict";n.d(t,{$c:()=>y,B3:()=>a,Cx:()=>m,EK:()=>f,GN:()=>A,I8:()=>u,I_:()=>h,Ll:()=>E,N0:()=>x,Nm:()=>r,PJ:()=>o,UG:()=>C,Yu:()=>g,_m:()=>s,_w:()=>p,by:()=>d,nz:()=>_,pb:()=>l,tC:()=>b,to:()=>v,tv:()=>S,x7:()=>c,xE:()=>i});let i=function(e){return e.Affinity="AFFINITY",e.LastPlayed="LAST_PLAYED",e.PlayCount="PLAY_COUNT",e}({}),r=function(e){return e.LongTerm="LONG_TERM",e.MidTerm="MID_TERM",e.ShortTerm="SHORT_TERM",e}({}),s=function(e){return e.Album="ALBUM",e.Audiobook="AUDIOBOOK",e.Compilation="COMPILATION",e.Ep="EP",e.Podcast="PODCAST",e.Single="SINGLE",e.Unknown="UNKNOWN",e}({}),a=function(e){return e.Autobiography="AUTOBIOGRAPHY",e.Biography="BIOGRAPHY",e}({}),o=function(e){return e.Gif="GIF",e.Image="IMAGE",e.Unknown="UNKNOWN",e.Video="VIDEO",e.VideoLooping="VIDEO_LOOPING",e.VideoLoopingRandom="VIDEO_LOOPING_RANDOM",e}({}),l=function(e){return e.Albums="ALBUMS",e.Artists="ARTISTS",e.Audiobooks="AUDIOBOOKS",e.Episodes="EPISODES",e.Genres="GENRES",e.Playlists="PLAYLISTS",e.Podcasts="PODCASTS",e.TopResults="TOP_RESULTS",e.Tracks="TRACKS",e.Users="USERS",e}({}),c=function(e){return e.Explicit="EXPLICIT",e.NineteenPlus="NINETEEN_PLUS",e.None="NONE",e.Unknown="UNKNOWN",e}({}),u=function(e){return e.Curate="CURATE",e.Uncurate="UNCURATE",e}({}),d=function(e){return e.Day="DAY",e.Hour="HOUR",e.Minute="MINUTE",e.Month="MONTH",e.Year="YEAR",e}({}),m=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),p=function(e){return e.Completed="COMPLETED",e.InProgress="IN_PROGRESS",e.NotStarted="NOT_STARTED",e}({}),h=function(e){return e.Episode="EPISODE",e.PodcastEpisode="PODCAST_EPISODE",e.Unknown="UNKNOWN",e}({}),g=function(e){return e.LikedSongs="LIKED_SONGS",e.Prereleases="PRERELEASES",e.YourEpisodes="YOUR_EPISODES",e.YourEpisodesV2="YOUR_EPISODES_V2",e}({}),f=function(e){return e.Facebook="FACEBOOK",e.Instagram="INSTAGRAM",e.Other="OTHER",e.Soundbetter="SOUNDBETTER",e.Twitter="TWITTER",e.Wikipedia="WIKIPEDIA",e}({}),b=function(e){return e.Description="DESCRIPTION",e.Guest="GUEST",e.Host="HOST",e.Lyrics="LYRICS",e.Name="NAME",e.UnknownField="UNKNOWN_FIELD",e}({}),v=function(e){return e.FailedItemInFolder="FAILED_ITEM_IN_FOLDER",e.FailedItemLimitReached="FAILED_ITEM_LIMIT_REACHED",e.FailedItemNotSupported="FAILED_ITEM_NOT_SUPPORTED",e.FailedNotInYourLibrary="FAILED_NOT_IN_YOUR_LIBRARY",e.Successful="SUCCESSFUL",e}({}),y=function(e){return e.AgeRestricted="AGE_RESTRICTED",e.CatalogueRestricted="CATALOGUE_RESTRICTED",e.CountryRestricted="COUNTRY_RESTRICTED",e.Explicit="EXPLICIT",e.PaymentRequired="PAYMENT_REQUIRED",e.Playable="PLAYABLE",e.Unavailable="UNAVAILABLE",e.Unknown="UNKNOWN",e}({}),_=function(e){return e.AfterUid="AFTER_UID",e.BeforeUid="BEFORE_UID",e.BottomOfPlaylist="BOTTOM_OF_PLAYLIST",e.TopOfPlaylist="TOP_OF_PLAYLIST",e}({}),E=function(e){return e.Audio="AUDIO",e.Mixed="MIXED",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),x=function(e){return e.ContentOnly="CONTENT_ONLY",e.OrganicTraffic="ORGANIC_TRAFFIC",e.OrganicTrafficContentPool="ORGANIC_TRAFFIC_CONTENT_POOL",e}({}),C=function(e){return e.Abp="ABP",e.AnchorPaywall="ANCHOR_PAYWALL",e.AudiobookDirectSales="AUDIOBOOK_DIRECT_SALES",e.AudiobookPromotion="AUDIOBOOK_PROMOTION",e.OapLinking="OAP_LINKING",e.OapOtp="OAP_OTP",e.Unknown="UNKNOWN",e}({}),S=function(e){return e.Album="ALBUM",e.Episode="EPISODE",e.Unknown="UNKNOWN",e.WhatsNewFeedNotification="WHATS_NEW_FEED_NOTIFICATION",e}({}),A=function(e){return e.Hidden="HIDDEN",e.New="NEW",e.Seen="SEEN",e.Unknown="UNKNOWN",e}({})},80734:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,a:()=>s});var i=n(9440);function r(e){return e.items.map((({uri:e,profile:{name:t}})=>({type:i.c.ARTIST,uri:e,name:t})))}function s(e){return e?e.items.map((({data:e})=>"Artist"===e.__typename?{type:i.c.ARTIST,uri:e.uri,name:e.profile.name}:null)).filter((e=>!!e)):[]}},26472:(e,t,n)=>{"use strict";n.d(t,{V:()=>r,r:()=>s});var i=n(35828);function r(e){return e?.label===i.x7.Explicit}function s(e){return e?.label===i.x7.NineteenPlus}},70968:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>a,JO:()=>s,mp:()=>l});var i=n(35828),r=n(45640);function s(e,t=null){if(null===e){return(t??new Date(0)).toISOString()}return e.isoString}function a(e){return null===e?null:s(e)}function o(e){const t=e?.precision;switch(t){case i.by.Minute:case i.by.Hour:case i.by.Day:return"day";case i.by.Month:return"month";case i.by.Year:case void 0:return"year";default:return(0,r.d)(t)}}function l(e,t=null){return{date:s(e,t),precision:o(e)}}},49114:(e,t,n)=>{"use strict";n.d(t,{NG:()=>c,Wx:()=>l,jM:()=>o});var i=n(35828),r=n(9440),s=n(92026),a=n(81660);function o(e){return{type:r.c.SHOW,uri:e.uri,name:e.name,publisher:e.publisher?.name??"",images:(0,s.r)(e.coverArt),mediaType:(0,a.w)(e.mediaType)}}function l(e,t){const n=e?.paywallContent??!1,r=t.reason;return{isPaywalled:n,isUserSubscribed:n&&r!==i.$c.PaymentRequired}}function c(e,t){return{milliseconds:e.totalMilliseconds-t.playPositionMilliseconds}}},67768:(e,t,n)=>{"use strict";function i(e,t,n){if(null!==e&&e.__typename!==t)throw new Error(n||`${e} is not a "${t}"`)}function r(e,t){try{!function(e){if(null===e)throw new Error(`${e} is \`null\``)}(e);const n=t.split(".");let i=e;for(;n.length;){i=i[n.shift()]}return function(e){if(e.message)throw new Error(`${e} is a \`PathfinderError\``)}(i),i}catch{throw new Error(`Could not get "${t}"!`)}}function s(e,t,n){try{return r(e,t)}catch{return n}}n.d(t,{Jt:()=>r,j:()=>i,no:()=>s})},92026:(e,t,n)=>{"use strict";function i(e){return null!==e?e.sources.map(r):[]}function r(e){return{url:e.url,width:e.width,height:e.height}}n.d(t,{m:()=>r,r:()=>i})},81660:(e,t,n)=>{"use strict";n.d(t,{S:()=>o,w:()=>a});var i=n(35828),r=n(66774),s=n(45640);function a(e){switch(e){case i.Ll.Audio:return r.Q.AUDIO;case i.Ll.Video:return r.Q.VIDEO;case i.Ll.Mixed:return r.Q.MIXED;case i.Ll.Unknown:return r.Q.UNKNOWN;default:return(0,s.d)(e)}}function o(e){return null!==e?[e.code]:[]}},49990:(e,t,n)=>{"use strict";n.d(t,{S:()=>s,h:()=>o});var i=n(9440),r=n(92026);function s(e){return e.items.map((({uri:e,profile:{name:t}})=>({type:i.c.ARTIST,uri:e,name:t})))}function a({items:e}){if(0===e.length)return{type:i.c.ARTIST,uri:"",name:""};const{uri:t,profile:{name:n}}=e[0];return{type:i.c.ARTIST,uri:t,name:n}}function o(e){return{type:i.c.ALBUM,uri:e.uri,name:e.name,images:(0,r.r)(e.coverArt),artist:a(e.artists)}}},82548:(e,t,n)=>{"use strict";n.d(t,{AE:()=>Y,AM:()=>F,Br:()=>w,CN:()=>y,CX:()=>j,Cf:()=>G,Cn:()=>I,Dq:()=>M,EX:()=>U,H_:()=>p,Iq:()=>V,LZ:()=>Z,Mc:()=>ne,NL:()=>O,O1:()=>se,Ol:()=>a,Ri:()=>D,S3:()=>S,Sd:()=>d,Tc:()=>X,UP:()=>ie,V1:()=>te,Vi:()=>x,WA:()=>J,Wm:()=>m,XV:()=>A,YV:()=>r,Yw:()=>f,Zx:()=>W,_E:()=>q,cc:()=>C,d8:()=>b,gW:()=>T,hU:()=>L,iL:()=>H,jO:()=>N,jY:()=>h,kA:()=>_,kr:()=>k,mA:()=>ee,o4:()=>u,oq:()=>z,po:()=>B,rW:()=>ae,t1:()=>P,tF:()=>v,uy:()=>Q,vU:()=>$,vq:()=>c,vr:()=>g,x_:()=>K,yf:()=>E,zu:()=>R});var i=n(8297);let r=function(e){return e.DISABLED="DISABLED",e.TWO_USER="TWO_USER",e.MULTI_USER="MULTI_USER",e}({}),s=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({}),a=function(e){return e.DEFAULT="default",e.VARIANTA="varianta",e.VARIANTB="variantb",e}({}),o=function(e){return e.DEFAULT="default",e.VARIANTA="varianta",e.VARIANTB="variantb",e}({}),l=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({});(0,i.m9)({name:"exampleOfSharedPropertyThatDoesNotExist",description:"Example of enabling a propoerty that is shared between Desktop, Mobile and Embed",default:!1});const c=(0,i.m9)({name:"enableOfflineVideoDev",description:"Enables Spotify videos to be offlined on DesktopX. Used during feature development",default:!1}),u=(0,i.m9)({name:"betamaxWidevineVersionSupported",description:"true if the version of widevine used is still supported.",default:!0}),d=(0,i.m9)({name:"betamaxBoomboxAudioSync",description:"true if video/audio sync is enabled (experimental).",default:!1}),m=(0,i.HW)({name:"betamaxOfflineTargetBitrate",description:"targetBitrate to use when offlining. The closest to this bitrate to this is used.",default:12e5,lower:1e3,upper:1e9}),p=(0,i.m9)({name:"enableBetamaxSdkSubtitlesDesktopX",description:"Enables subtitles setting and rendering subtitles on the betamax SDK on DesktopX",default:!0}),h=(0,i.m9)({name:"enableBetamaxSdkMuxDesktopXDev",description:"Enables MUX library for development on Desktop X",default:!1}),g=((0,i.m9)({name:"enableVideoOnVideoSaiDev",description:"Enables video-on-video SAI on videos Desktop X. Used during feature development",default:!0}),(0,i.m9)({name:"enableBetamaxSdkVmp",description:"Enables client-side widevine VMP (verified media path) on betamax SDK.",default:!0})),f=(0,i.m9)({name:"enableBetamaxSdkVideoOnVideoSai",description:"Enables video-on-video SAI on videos Desktop X",default:!1}),b=(0,i.HW)({name:"betamaxSdkMinimumBuffer",description:"Sets the minimum buffer goal (in seconds) required before starting or resuming playback video on betamax SDK",default:2,upper:8,lower:0}),v=(0,i.HW)({name:"betamaxSdkRetryAttempts",description:"The number of times to retry on network",default:2,upper:100,lower:1}),y=(0,i.m9)({name:"betamaxSdkDataSaverV2",description:"Enables the data saver feature on betamax SDK (linked to the video show/hide controls and close video window)",default:!0}),_=(0,i.HW)({name:"betamaxSdkDataSaverBufferMargin",description:"Sets the amount of buffer in seconds to be kept when disabling data saver (lower = faster variant change)",default:4,upper:100,lower:0}),E=(0,i.m9)({name:"betamaxVideoAutoplay",description:"Enables an alternative method for video autoplay to address Mux metrics",default:!1}),x=(0,i.m9)({name:"enableBetamaxSdkInitialLowBitrateV2",description:"Optimize startup time by choosing the lowest quality for the first segment",default:!0}),C=(0,i.m9)({name:"enableBetamaxSdkSurfaceBasedResolutionCapV2",description:"Enables surface-based resolution cap for adaptive video on betamax SDK",default:!0}),S=(0,i.HW)({name:"betamaxSdkMaxBitrate",description:"Sets the max bitrate cap for adaptive video on betamax SDK (0=disabled)",default:0,upper:1e8,lower:0}),A=(0,i.m9)({name:"enableBetamaxSdkPlayerPool",description:"Enables player pool for betamax SDK",default:!1}),w=(0,i.HW)({name:"betamaxSdkPlayerPoolSize",description:"Sets the player pool size, should it be enabled",default:20,upper:100,lower:0}),I=(0,i.m9)({name:"enableVideoPip",description:"Enables desktop picture-in-picture surface using betamax SDK.",default:!1}),T=(0,i.m9)({name:"betamaxUsePendingStorage",description:"true if pending storage is used to generate BetamaxPlaybackSession messages, false if using only the normal event sender.",default:!0}),N=(0,i.m9)({name:"betamaxAutoSeekToAdPosition",description:"If true, the player will seek to the ad position when an stop position is registered. Usefull for debugging ads.",default:!1}),R=(0,i.m9)({name:"enableAutoSeekToVideoBufferedStartPosition",description:"Automatically seek to the video buffered start position on load to avoid initial seek if the initial position is not buffered",default:!1}),k=(0,i.m9)({name:"enableStreamReportingTracker3",description:"Enables use of the StreamReporting module for video playback",default:!0}),O=(0,i.m9)({name:"enableStreamReportingTrackerStopVideoPlaybackOnError",description:"The StreamReportingTracker module stop video playback when an error in reporting occurs",default:!1}),P=(0,i.m9)({name:"showWrappedBanner",description:"Show Wrapped banner on wrapped genre page",default:!1}),j=(0,i.BL)({name:"enableBlendInvitation",description:"Enable users to join Blends through client-web",values:r,default:r.DISABLED}),L=(0,i.m9)({name:"enableSubtitlesUsingHarmony",description:"Enable subtitles using Harmony",default:!1}),D=((0,i.m9)({name:"enableUriLinks",description:"Enable the `uri_link` type in Web API /views",default:!1}),(0,i.BL)({name:"enableI18nRoutes",description:"Enable internationalized routes for all locales in EXPERIMENTAL_INTERNATIONALIZED_LOCALES.",values:s,default:s.DEFAULT}),(0,i.m9)({name:"enableCastConnect",description:"Enable Google's new Cast Connect feature for Android TV from Web Player's Cast Sender implementation",default:!1})),U=((0,i.m9)({name:"enableNewEpisodes",description:"Enable the new episodes view",default:!1}),(0,i.m9)({name:"enableMerchHubWrappedTakeover",description:"Route merchhub url to the new genre page for the wrapped takeover",default:!1})),M=(0,i.BL)({name:"merchVariantExperiment",description:"Merch shelf re-ordering experiment on Artist Profile Page(A/B/C test)",values:a,default:a.DEFAULT}),B=((0,i.BL)({name:"OnTourVariantExperiment",description:"On Tour shelf re-ordering experiment on Artist Page(A/B/C test)",values:o,default:o.DEFAULT}),(0,i.m9)({name:"enableMerchOnAlbum",description:"Enable merch shelf view on album page",default:!1}),(0,i.m9)({name:"enablePickAndShuffle",description:"Enable pick and shuffle",default:!1})),F=((0,i.m9)({name:"enableNewTicketingSection",description:"Enable New Ticketing section on Concert Event Pages",default:!1}),(0,i.m9)({name:"enableEqualizer",description:"Enable audio equalizer for Desktop and Web Player",default:!1})),H=(0,i.m9)({name:"betamaxFilterNegativeDuration",description:"Remove updates to esperanto for duration that is negative",default:!0}),V=(0,i.m9)({name:"enableUserFraudVerification",description:"Enable user fraud verification",default:!1}),z=((0,i.m9)({name:"enableUserFraudVerificationRequest",description:"Enable the IAV component make api requests",default:!0}),(0,i.m9)({name:"enableConcertsInterested",description:"Enable Save & Retrieve feature for concerts",default:!1})),G=((0,i.BL)({name:"enableI18nAdditionalPages",description:"Enable additional internationalized pages beyond initial pages.",values:l,default:l.DEFAULT}),(0,i.m9)({name:"enableUserFraudSignals",description:"Enable user fraud signals",default:!1}),(0,i.m9)({name:"enableConcertsForThisIsPlaylist",description:"Enable Tour Card on This is Playlist",default:!1}),(0,i.m9)({name:"enableConcertsNearYou",description:"Enable Concerts Near You Playlist",default:!1})),W=(0,i.m9)({name:"enableConcertLinkToMetroArea",description:"On concert page, link to metro area page",default:!1}),K=(0,i.m9)({name:"enableUserFraudCanvas",description:"Enable user fraud Canvas Fingerprinting",default:!1}),Y=((0,i.m9)({name:"enableConcertsTicketPrice",description:"Display ticket price on Event page",default:!1}),(0,i.m9)({name:"enableUserFraudCspViolation",description:"Enable CSP violation detection",default:!0}),(0,i.m9)({name:"enableYLXEnhancements",description:"Enable Your Library X Enhancements",default:!1})),q=(0,i.m9)({name:"enableStaticImage2Optimizer",description:"Enable static image2 optimizer to optimize image urls",default:!1}),Q=(0,i.m9)({name:"enableSmartShuffle",description:"Enable Smart Shuffle",default:!1}),$=(0,i.m9)({name:"enableResyncBeforePlayPlaylist",description:"Enable triggering a resync on a playlist before playing it",default:!0});(0,i.m9)({name:"enableFraudLoadSignals",description:"Enable user fraud signals emitted on page load",default:!0});let Z=function(e){return e.CONTROL="CONTROL",e.SYSTEM_LANGUAGE="SYSTEM_LANGUAGE",e.ALL_LANGUAGES="ALL_LANGUAGES",e}({});const X=(0,i.BL)({name:"enableLyricsTranslations",description:"Enable Lyrics Translations",values:Z,default:Z.CONTROL}),J=(0,i.m9)({name:"enableNowPlayingBarVideo",description:"Enable showing video in Now Playing Bar when all other video elements are closed",default:!1}),ee=(0,i.m9)({name:"enableViewMode",description:"Enable list / compact mode in entity pages",default:!1}),te=(0,i.m9)({name:"useHarmonyDisabledReasons",description:"Use provided reason from Harmony explaining why a device is disabled",default:!1}),ne=((0,i.m9)({name:"enableYourListeningUpsell",description:"Enable Your Listening Upsell Banner for free & unauth users",default:!1}),(0,i.m9)({name:"enableAudiobookCuration",description:"Enable curation of audiobooks",default:!1})),ie=(0,i.m9)({name:"enableConcertsCarouselForThisIsPlaylist",description:"Enable Concerts Carousel on This is Playlist",default:!1});let re=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT_A="variant-a",e.VARIANT_B="variant-b",e}({});(0,i.BL)({name:"enableILRShow",description:"Enable internal link recommender component for show pages",values:re,default:re.DEFAULT}),(0,i.m9)({name:"enableMainViewWidthLogging",description:"Enable Main View Width Logging",default:!1});const se=(0,i.m9)({name:"enablePlaybackBarAnimation",description:"Enable the animation of the playback bar",default:!1}),ae=(0,i.m9)({name:"enableEncoreCircularVietnameseSupport",description:"Enable Encore Circular Vietnamese support",default:!1})},68304:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});const i={ALBUM:"ALBUM",AUDIOBOOK:"AUDIOBOOK",EP:"EP",COMPILATION:"COMPILATION",PODCAST:"PODCAST",SINGLE:"SINGLE",UNKNOWN:"UNKNOWN"}},9440:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});let i=function(e){return e.AD="ad",e.ALBUM="album",e.ARTIST="artist",e.ARTIST_CONCERTS="artist-concerts",e.AUDIOBOOK="audiobook",e.CHAPTER="chapter",e.CONCERT="concert",e.CONCERTS="concerts",e.EPISODE="episode",e.PODCAST_SHORT="podcast-short",e.GENRE="genre",e.HOME="",e.VIEW="view",e.PLAYLIST="playlist",e.PLAYLISTV2="playlist-v2",e.SHOW="show",e.TRACK="track",e.UNKNOWN="unknown",e.USER="user",e.LIKED_SONGS="liked-songs",e.LOCAL_FILES="local-files",e.YOUR_EPISODES="your-episodes",e.FOLDER="folder",e.PREMIUM="premium",e.PRE_RELEASE_ALBUM="pre-release-album",e.PRE_RELEASE_BOOK="pre-release-book",e}({})},83278:(e,t,n)=>{"use strict";n.d(t,{C:()=>i});let i=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({})},66774:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i});let i=function(e){return e[e.UNKNOWN=-1]="UNKNOWN",e[e.MIXED=0]="MIXED",e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e}({})},85852:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});let i=function(e){return e.I18nSEO="i18nSEO",e.I18nAdditionalPages="i18nap",e.ILRShowVariantA="ilrs-a",e.ILRShowVariantB="ilrs-b",e.PodcastDiscovery="pd",e.PlaylistInternalTrackLinks="pitl",e.PlaylistInternalTrackAndArtistLinks="pital",e.AlbumInternalTrackLinks="aitl",e.AlbumInternalTrackAndArtistLinks="aital",e.TrackPageEnhanced="tpe",e.TrackPageLinksNoLyrics="tplnl",e.TrackPageNoLyrics="tpnl",e.EpisodeShelf="es",e.EpisodeShelfLite="esl",e.EpisodeList="el",e}({})},87240:(e,t,n)=>{"use strict";function i(e){return null!==e}n.d(t,{P:()=>i})},60351:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});const i=e=>t=>Object.values(e).includes(t)},45640:(e,t,n)=>{"use strict";function i(e,t){throw new Error(t??`Unexpectedly hit unreachable code! Unhandled discriminated union member: ${JSON.stringify(e)}`)}function r(e,t){try{i(e,t)}catch(e){console.error(e)}}n.d(t,{d:()=>i,k:()=>r})},14431:(e,t,n)=>{"use strict";n.d(t,{PW:()=>h,ie:()=>g,lM:()=>f});var i=n(33482);var r=n(1816),s=n(42490);let a=()=>{window.location.reload()},o=e=>{window.location.assign(e)},l=()=>window.location.origin,c=()=>window.location.href;const u={reload(){a()},assign(e){o(e)},get origin(){return l()},get href(){return c()}},d=()=>(0,i.My)()===r.m.PWA||"1"===function(e){try{return window?.google_optimize?.get(e)}catch(e){return}}("u7gmg4jBRTOUMmTZNyEx9w"),m=()=>{if(d())return`${u.origin}/auth_redirect`;if(/iphone|ipod|ipad/i.test(navigator.userAgent)||/android/i.test(navigator.userAgent)){const e=new URL(u.href);return e.pathname=`${s.$K}${e.pathname}`,e.toString()}return u.href},p=(e,t,n)=>{var i;n&&(e+=`&${i=n,Object.keys(i).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(i[e]).replace(/%7C/g,"|")}`)).join("&")}`),d()?((e,t)=>{const n=void 0!==window.screenLeft?window.screenLeft:window.screenX,i=void 0!==window.screenTop?window.screenTop:window.screenY,r=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,s=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,a=r/window.screen.availWidth,o=(r-t.width)/2/a+n,l=(s-t.height)/2/a+i,c=window.open(e,void 0,`scrollbars=${t.scrollbars?"yes":"no"},\n toolbar=${t.toolbar?"yes":"no"},\n width=${t.width/a},\n height=${t.height/a},\n top=${l},\n left=${o}`);c?.focus&&c.focus()})(e,t):u.assign(e)},h=e=>{const t=`https://accounts.spotify.com/login?continue=${encodeURIComponent(m())}`;p(t,{width:500,height:824,toolbar:!1,scrollbars:!0},e)},g=e=>{const t=`https://www.spotify.com/signup?forward_url=${encodeURIComponent(m())}`;p(t,{width:500,height:824,toolbar:!1,scrollbars:!0},e)},f=()=>{window.addEventListener("storage",(e=>{"login_success"===e.key&&(window.focus(),window.localStorage.removeItem("login_success"),u.reload())}))}},70964:(e,t,n)=>{"use strict";n.d(t,{U5:()=>a,dI:()=>r,sH:()=>s,tX:()=>l,xJ:()=>o});var i=n(59043);function r(e){return(new TextDecoder).decode(e)}function s(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);const t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}function a(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}function o(e){if(e.length%2!=0)throw new Error("Invalid encoding!");const t=e.length/2,n=new Array(t);for(let i=0,r=0;i<t;++i,r+=2){const t=parseInt(e.charAt(r),16),s=parseInt(e.charAt(r+1),16);if(Number.isNaN(t)||Number.isNaN(s))throw new Error("Invalid encoding!");n[i]=t<<4|s}return Uint8Array.from(n)}function l(e){const t=new Uint8Array(i.util.base64.length(e));return i.util.base64.decode(e,t,0),t}},16238:(e,t,n)=>{"use strict";function i(e,t){return e.reduce(((e,n)=>{const i=t(n);return(e[i]=e[i]||[]).push(n),e}),{})}n.d(t,{$:()=>i})},37693:(e,t,n)=>{"use strict";function i(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;const n=e?Object.keys(e):[],i=t?Object.keys(t):[];return n.length===i.length&&n.every((n=>Object.prototype.hasOwnProperty.call(t,n)&&e[n]===t[n]))}n.d(t,{a:()=>i})},15552:(e,t,n)=>{"use strict";n.d(t,{ad:()=>r,gD:()=>l,rh:()=>s,s7:()=>o});var i=n(14056);const r=e=>new Date(e),s=(e,t,n,i)=>{const r=6e4*e.getTimezoneOffset(),s=n??{year:"numeric",month:"long",day:"numeric",weekday:"long"};return new Date(e.valueOf()+r).toLocaleDateString(t,o(s,i))},a=["year","month","weekday","day","hour","minute","second"];function o(e,t){if(void 0===t)return e;const n={...e},i=a.indexOf(t);if(-1!==i)for(let e=i+1;e<a.length;e++)delete n[a[e]];return n}const l=(e,t=i.Ru)=>(new Date).getUTCFullYear()===e.getUTCFullYear()?t.formatDate(e,{month:"short",day:"numeric",timeZone:"UTC"}):t.formatDate(e,{month:"short",year:"numeric",timeZone:"UTC"})},62180:(e,t,n)=>{"use strict";function i(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),i=Math.floor(n/60),r=60*i,s=n-r;return{hours:i,minutes:s,seconds:t-60*r-60*s}}n.d(t,{S:()=>i})},45916:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(14056);const r=e=>{if(!Number.isInteger(e))return"";const t=Date.now()-Number(e),n=Math.round(t/1e3/60),r=Math.round(t/1e3/60/60),s=Math.round(t/1e3/60/60/24),a=Math.round(t/1e3/60/60/24/7);return s>=7?i.Ru.get("time.weeks.short",a):r>=24?i.Ru.get("time.days.short",s):n>=60?i.Ru.get("time.hours.short",r):n>0?i.Ru.get("time.minutes.short",n):i.Ru.get("time.now")}},37672:(e,t,n)=>{"use strict";function i(e){return e?e.reduce(((e,t)=>(t.releases.items[0]&&e.push(t.releases.items[0]),e)),[]):[]}n.d(t,{Dh:()=>r,Ey:()=>i,ay:()=>s});const r=e=>`spotify:app:artist:${e}`,s=e=>`spotify:artist:${e}`},87344:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(14056),r=n(68304);function s(e){switch(e){case r.s.SINGLE:return i.Ru.get("single");case r.s.EP:return i.Ru.get("ep");case r.s.COMPILATION:return i.Ru.get("compilation");case r.s.ALBUM:default:return i.Ru.get("album")}}},74089:(e,t,n)=>{"use strict";async function i(e,t=document.body){if("clipboard"in navigator)try{if("string"==typeof e)return await navigator.clipboard.writeText(e);if("undefined"!=typeof ClipboardItem&&navigator.clipboard.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":e.then((e=>new Blob([e],{type:"text/plain"})))})]);const t=await e;return await navigator.clipboard.writeText(t)}catch(e){}if(null===t)throw new Error("Node is null, copy cannot be performed.");let n="";n="string"==typeof e?e:await e;const i=document.createElement("textarea");return i.value=n,i.setAttribute("readonly",""),i.style.position="absolute",i.style.left="-9999px",t.appendChild(i),i.select(),document.execCommand("copy"),t.removeChild(i),Promise.resolve()}n.d(t,{l:()=>i})},85558:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});const i=()=>"undefined"==typeof window},33112:(e,t,n)=>{"use strict";n.d(t,{R:()=>i,d:()=>r});let i=function(e){return e.TEST="test",e.PODCAST_DISCOVERY="show-ilr",e}({}),r=function(e){return e.CONTROL="0",e.VARIANT="1",e}({})},1879:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});const i=e=>(t,n=!1)=>{let i;return(...r)=>{n?n=!1:(clearTimeout(i),i=setTimeout((()=>{e.apply(e,r)}),t))}}},24577:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});const i=(e,{desiredSize:t=Number.MAX_SAFE_INTEGER,desiredHeight:n=t,desiredWidth:i=t,desiredLabel:r=""}={})=>{if(!e||e.length<=0)return;if(r){const[t]=e.filter((e=>e.label===r));if(t)return t}if(1===e.length)return e[0];const[s]=e.map((e=>{const t=[(e.width||0)*(e.height||0),n*i];return{ratio:Math.max(...t)/Math.min(...t),image:e}})).sort(((e,t)=>e.ratio-t.ratio));return s.image}},26903:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var i=n(35828),r=n(77564);const s=({downloadAvailability:e,isExplicit:t,isMOGEFRestricted:n,contentRating:s,isPaywalled:a,isEnhanced:o,hasAssociatedVideo:l})=>{let c=0;const u={download:!1,explicit:!1,nineteen:!1,paid:!1,enhanced:!1,hasAssociatedVideo:!1};return e===r.kw.YES&&(u.download=!0,c++),(t&&!n||s===i.x7.Explicit)&&(u.explicit=!0,c++),(n||s===i.x7.NineteenPlus)&&(u.nineteen=!0,c++),a&&(u.paid=!0,c++),o&&(u.enhanced=!0,c++),l&&(u.hasAssociatedVideo=!0,c++),{badges:u,hasBadges:c>0}}},56029:(e,t,n)=>{"use strict";n.d(t,{k:()=>i});const i=e=>({xsmall:12,small:16,medium:24,large:32,xlarge:48,xxlarge:64}[e])},60786:(e,t,n)=>{"use strict";n.d(t,{CW:()=>l,hF:()=>o,ll:()=>a});var i=n(14056),r=n(52963),s=n(9440);const a=(e,t=!0)=>{const n=t?"/":"";if(!e)return"";const i=e.split("/");return i[1].includes(r.CT)?`${n}${i.slice(2).join("/")}`:e},o=(e,t)=>{const n=t||i.Ru.getLocaleForURLPath();if(!e)return"";const s=e.split("/")[1];if(!n||n===r.Xn||s.includes(r.CT))return e;const a="/"===e?"":e;return`/${r.CT}${n}${a}`},l=e=>{if(!e)return s.c.HOME;const t=e.split("/");return t[1].includes(r.CT)?t[2]||s.c.HOME:t[1]||s.c.HOME}},50783:(e,t,n)=>{"use strict";n.d(t,{p:()=>u,vf:()=>d});var i=n(52963),r=n(9440);const s=[r.c.CONCERT,r.c.CONCERTS],a=(e,t)=>void 0!==t&&e.some((e=>e===t)),o=(e,t,n)=>{const r=n&&s.some((e=>e===n)),o=r?i.r0:i.IU,l=r?i.Xq:i._h,c=a(o,e)&&t,u=a(l,e);return c||u},l=(e,t)=>{if(void 0===e)return!1;const n=""===e;return t.some((t=>t===e))||n},c=(e,t)=>{if(void 0===e)return!1;const n=l(e,i.IH)&&t,r=l(e,i.eA);return n||r},u=({localeFeatureFlag:e,entityFeatureFlag:t,urlLocale:n,entity:i,type:r})=>{switch(r){case"locale":return o(n,e,i);case"route":return c(i,t);case"link":return o(n,e,i)&&c(i,t);default:return!1}},d=e=>["/",...i.NW.map((e=>`/${i.CT}${e}`))].includes(e)},60957:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});const i=({imageUriOrUrl:e="",desiredMosaicSize:t=300}={})=>{if(!e)return"";if(e.startsWith("spotify:")){const[,n,...i]=e.split(":");if("image"===n)return`https://i.scdn.co/image/${i[0]}`;if("mosaic"===n)return`https://mosaic.scdn.co/${t}/${i.join("")}`}return e}},41549:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",ActionBar:"main-actionBar-ActionBar",ActionBarRow:"main-actionBar-ActionBarRow"}},48956:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"main-downloadClient-actionContainer"}},87775:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={card:"main-card-card",cardLink:"main-card-cardLink",type:"main-card-type",dividerAfter:"cCBLuxOGqZvSAQWNkDXw",cardTitle:"main-card-cardTitle",cardTitleWrapper:"Gi6Lr1whYBA2jutvHvjQ",newEpisodeIndicator:"main-card-newEpisodeIndicator",draggable:"main-card-draggable",imageContainer:"main-card-imageContainer",imageContainerOld:"main-card-imageContainerOld",imageContainerSkeleton:"main-card-imageContainerSkeleton",cardMetadata:"main-card-cardMetadata",DownloadStatusIndicator:"main-card-DownloadStatusIndicator",PlayButtonContainer:"main-card-PlayButtonContainer",PlayButtonContainerVisible:"main-card-PlayButtonContainerVisible",cardContainer:"main-card-cardContainer"}},92724:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={imageWrapper:"GOcsybnoHYyJGQGDRuwj",image:"yMQTWVwLJ5bV8VGiaqU3",imagePlaceholder:"IUWOW7ZOUwEs57jTIQRP",circular:"MxmW8QkHqHWtuhO589PV",hero:"CByZAgiDBSO7504EXktW"}},16613:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={menu:"main-contextMenu-menu",menuHeading:"ig17e2GN63Tgv3JeRoJF",menuItemButton:"main-contextMenu-menuItemButton",disabled:"egE6UQjF_UUoCzvMxREj",menuItemStatic:"BmRbu742cR31_QlTDob1",subMenuIcon:"klmTmoDHY2lTsLzlA2qX",subMenuLeading:"lQEXaOyKiOHRJAkTf1EF",menuItem:"main-contextMenu-menuItem",dividerBefore:"vvMORUKtQKpQcpQ992bR",dividerAfter:"Vz3pFUXmll6fKB5Fc4nd",menuItemLabel:"htqz7Vb8mLJvGKTi1vrs",loadingContainer:"eof5OA2Ldhob6LU1jNoF"}},88064:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={addToPlaylistTitle:"main-contextMenu-addToPlaylistTitle",addToPlaylistSubtitle:"main-contextMenu-addToPlaylistSubtitle"}},19080:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={filterPlaylistSearch:"main-contextMenu-filterPlaylistSearch"}},33973:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={menu:"main-contextMenu-menu",menuHeading:"main-contextMenu-menuHeading",menuItemButton:"main-contextMenu-menuItemButton",disabled:"main-contextMenu-disabled",menuItemStatic:"main-contextMenu-menuItemStatic",subMenuIcon:"main-contextMenu-subMenuIcon",subMenuLeading:"main-contextMenu-subMenuLeading",menuItem:"main-contextMenu-menuItem",dividerBefore:"main-contextMenu-dividerBefore",dividerAfter:"main-contextMenu-dividerAfter",menuItemLabel:"main-contextMenu-menuItemLabel",loadingContainer:"main-contextMenu-loadingContainer",filterInputContainer:"main-contextMenu-filterInputContainer",expanded:"main-contextMenu-expanded",expandButton:"main-contextMenu-expandButton",filterInput:"main-contextMenu-filterInput",filterInputFullWidth:"main-contextMenu-filterInputFullWidth",overlay:"main-contextMenu-overlay",expandRight:"main-contextMenu-expandRight",searchIconContainer:"main-contextMenu-searchIconContainer",searchIcon:"main-contextMenu-searchIcon",clearButton:"main-contextMenu-clearButton",filterPlaylistSearchContainer:"main-contextMenu-filterPlaylistSearchContainer",trigger:"main-contextMenu-trigger"}},52503:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",MINIMUM_HEADER_HEIGHT:"250px",MAXIMUM_HEADER_HEIGHT:"400px",IMAGE_SIZE:"192px",IMAGE_SIZE_BIG:"232px",BACKGROUND_HEIGHT_PERCENTAGE:"40vh",container:"main-entityHeader-container",nonWrapped:"main-entityHeader-nonWrapped",largeHeader:"main-entityHeader-largeHeader",xlargeHeader:"bvoBefUu_0EKwyW6ZOsg",withBackgroundImage:"main-entityHeader-withBackgroundImage",smallHeader:"main-entityHeader-smallHeader",backgroundColor:"main-entityHeader-backgroundColor",background:"main-entityHeader-background",overlay:"main-entityHeader-overlay",headerText:"main-entityHeader-headerText",topbarTitle:"main-entityHeader-topbarTitle",topbarContent:"main-entityHeader-topbarContent",topbarContentFadeIn:"main-entityHeader-topbarContentFadeIn",title:"main-entityHeader-title",titleInner:"main-entityHeader-titleInner",titleButton:"main-entityHeader-titleButton",pretitle:"main-entityHeader-pretitle",imageContainer:"main-entityHeader-imageContainer",imageContainerNew:"main-entityHeader-imageContainerNew",imageContainerClickable:"main-entityHeader-imageContainerClickable",theyFollowUs:"main-entityHeader-theyFollowUs",image:"main-entityHeader-image",shadow:"main-entityHeader-shadow",imagePlaceholder:"main-entityHeader-imagePlaceholder",wavesBackground:"main-entityHeader-wavesBackground",roundedCorners:"main-entityHeader-roundedCorners",circle:"main-entityHeader-circle",detailsText:"main-entityHeader-detailsText",uppercase:"main-entityHeader-uppercase",metaData:"main-entityHeader-metaData",creatorWrapper:"main-entityHeader-creatorWrapper",piled:"main-entityHeader-piled",creatorButton:"main-entityHeader-creatorButton",metaDataText:"main-entityHeader-metaDataText",metaDataAuthor:"main-entityHeader-metaDataAuthor",newEntriesIndicator:"main-entityHeader-newEntriesIndicator",divider:"main-entityHeader-divider",smallMadeForIcon:"main-entityHeader-smallMadeForIcon",subtitle:"main-entityHeader-subtitle",subtitleButton:"main-entityHeader-subtitleButton",gradient:"main-entityHeader-gradient"}},73274:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={episodeBlock:"T9iBYqbERZHdwDl0U2tC",isActive:"DS4BYgmEO7Wy5RutUt60",title:"N2Fkohxhgu1_QAWUDc4O",selected:"DaxWgzoBoBnOEj43bZAA",actions:"hGbRiYkIjjy4sJvor0A2",visibleAction:"OgaF7O4ER8AvZfFd6JdJ",metadata:"bdGDIiYj50H66Hx5uevz",imageContainer:"kiT5NMttSzIDbtqBKc1J",showImage:"TG1hsDPHeO5QUf4EQasO",largeImage:"_NdByrVnM0OS7aK_GfRn",videoLabel:"afJf_mGi7ghd5WYQwPLb",badges:"UpgTvLnGW6GFjAUfaPXH",footer:"kxVuYXZ4sVWn6XuJgFhX",showDetailsWithProgress:"UvdRnanMNuY384mjTf2l",contentInformationBanner:"fmu47VumZ84IoKgMK1yU",nextBestEpisode:"dUScIGoP9fWn5IVsztB7"}},92929:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={shortcuts:"view-homeShortcutsGrid-shortcuts",title:"view-homeShortcutsGrid-title",grid:"view-homeShortcutsGrid-grid",gridOf4Columns:"view-homeShortcutsGrid-gridOf4Columns",shortcutLink:"view-homeShortcutsGrid-shortcutLink",shortcut:"view-homeShortcutsGrid-shortcut",draggable:"view-homeShortcutsGrid-draggable",imageContainer:"view-homeShortcutsGrid-imageContainer",imageWrapper:"view-homeShortcutsGrid-imageWrapper",image:"view-homeShortcutsGrid-image",main:"view-homeShortcutsGrid-main",skeletonShortcut:"eisrx2dEtE9CrVWQxu_z",content:"view-homeShortcutsGrid-nameWrapper",nameContainer:"view-homeShortcutsGrid-name",name:"view-homeShortcutsGrid-name",shortcutNewEpisodeIndicator:"view-homeShortcutsGrid-shortcutNewEpisodeIndicator",episodeExtraContent:"view-homeShortcutsGrid-episodeExtraContent",iconDownloaded:"view-homeShortcutsGrid-iconDownloaded",episodeProgressBar:"view-homeShortcutsGrid-episodeProgressBar",trailingIndicator:"view-homeShortcutsGrid-trailingIndicator",PlayButtonContainer:"view-homeShortcutsGrid-PlayButtonContainer",PlayButtonContainerVisible:"view-homeShortcutsGrid-PlayButtonContainerVisible",playButton:"view-homeShortcutsGrid-playButton",equaliser:"view-homeShortcutsGrid-equaliser"}},6021:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={shelf:"main-shelf-shelf",header:"main-shelf-header",fullPage:"yGNmd_gHDqy6we9VwoNj",subHeader:"main-shelf-subHeader",topRow:"main-shelf-topRow",noBottomSpacer:"xInUIK_Gf6Wx_99Lg3LU",sideSpacer:"j8owGOBRuFHRQf2whbdI",titleWrapper:"main-shelf-titleWrapper",title:"main-shelf-title",seeAll:"main-shelf-seeAll",shelfGrid:"main-shelf-shelfGrid",singleRow:"deJGxfMNXUc8uApEGgoQ",withEncoreCards:"MKCgGhu_c8l6hsVuee46",skeletonShelf:"main-shelf-skeletonShelf"}},62415:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",container:"main-topBar-container",withBackgroundBlur:"main-topBar-withBackgroundBlur",background:"main-topBar-background",indicators:"main-actionButtons",overlay:"main-topBar-overlay",loggedOut:"main-topBar-loggedOut",fullscreenHistoryButtons:"main-topBar-fullscreenHistoryButtons",globalNavBarHistoryButtonsContainer:"main-globalNav-historyButtons",globalNavBarHistoryButton:"main-globalNav-icon",historyButtons:"main-topBar-historyButtons",icon:"main-topBar-icon",button:"main-topBar-button",forward:"main-topBar-forward",responsiveForward:"main-topBar-responsiveForward",topbarContentWrapper:"main-topBar-topbarContentWrapper",topbarContent:"main-topBar-topbarContent",topNavBarLinks:"main-topBar-topNavBarLinks",topNavBarSeparator:"main-topBar-topNavBarSeparator",topbarContentRight:"main-topBar-topbarContentRight",topBarRightButtonContainer:"main-actionButtons",expand:"QTj1mCVVUuiwy6mQ0shv",globalNavBar:"LedDBMWCxYhMD20KtPJo",shrink:"MEbEPFcmpW1uJC9VI7He",loginButtons:"main-topBar-loginButtons",signupButton:"main-topBar-signupButton",UpgradeButton:"main-topBar-UpgradeButton",contentArea:"main-topBar-contentArea"}},18039:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",TRACKLIST_HEADER_HEIGHT:"36px",MINMIMUM_COLUMN_WIDTH:"120px",trackList:"main-trackList-trackList",trackListCompactMode:"main-trackList-trackListCompactMode",indexable:"main-trackList-indexable",trackListRowGrid:"main-trackList-trackListRowGrid",rowSectionVariable:"main-trackList-rowSectionVariable",rowSectionStart:"main-trackList-rowSectionStart",rowSectionEnd:"main-trackList-rowSectionEnd",rowFeedback:"ShIWVpkzx2OXiZd_ZLBG",queuePanelTracklist:"nMl3YzolLHtRl3ke__NI",isRecommendedTrackListRow:"main-trackList-isRecommendedTrackListRow",chartTrackList:"UqzBuREVmvcEOZYWEGCM",rowChartStatus:"main-trackList-icon",concertTrackList:"inI9bKU9cOLscnVsSVEV",trackListHeader:"main-trackList-trackListHeader",trackListHeaderRow:"main-trackList-trackListHeaderRow",trackListHeaderStuck:"_2ajKWDiy6YvJu5wo8I1g",trackListRow:"main-trackList-trackListRow",isPreviousRowSelected:"QG4EBrO5IfDeT2JjN9ZQ",isNextRowSelected:"Y5tI0kOsmxcdcipn3RVA",dropTargetBefore:"B8Vman5wYvaxDg4pc1OU",dropTargetAfter:"PQJowUUOfMLl0BzbnRCi",rowHeartButton:"main-trackList-rowHeartButton",curationButton:"main-trackList-curationButton",rowFeedbackButton:"h2UiWIoFN5fXUDD8pzfk",rowMoreButton:"main-trackList-rowMoreButton",disabled:"tH1iuxCV8NexP4pzEBa4",rowPlayPauseButton:"main-trackList-rowImagePlayButton",rowSubTitle:"UudGCx16EmBkuFPllvss",text:"W676nknusnBt8sz19YVV",number:"main-trackList-number",icon:"JqSFL4jZMK1MYKDI8G4R",playingIcon:"main-trackList-playingIcon",selected:"main-trackList-selected",rowMarker:"main-trackList-rowMarker",active:"main-trackList-active",rowTitle:"main-trackList-rowTitle",rowSectionIndex:"main-trackList-rowSectionIndex",showDisabledAsEnabled:"uOmRewhkzJocvvWeWWcF",playsHeader:"main-trackList-playsHeader",column:"main-trackList-column",sortable:"main-trackList-sortable",arrow:"OQc9_giz7hbNqHLZODIx",durationHeader:"main-trackList-durationHeader",actionsHeader:"SLiV_gdSoRxpqv9dgYbw",rowMainContent:"main-trackList-rowMainContent",rowCompactMode:"main-trackList-rowCompactMode",rowMainContentCompact:"main-trackList-rowMainContentCompact",facepile:"t4hXvJdn4nsT3Ub3k5IX",rowBadges:"main-trackList-rowBadges",rowDuration:"main-trackList-rowDuration",nineteen:"Ivj0vCd2s5rj3jsFoYHO",enhanced:"_jJo_XO5bEM6orhffUTw",rowMarkerChartStatus:"main-trackList-rowMarkerChartStatus",statusChangeDown:"main-trackList-statusChangeDown",statusChangeUp:"main-trackList-statusChangeUp",statusChangeNew:"V5ugN_Skngj14FpjqF41",rowImageWithPlay:"main-trackList-rowImageWithPlay",rowImagePlayPauseButton:"main-trackList-rowImagePlayPauseButton",rowPlayCount:"main-trackList-rowPlayCount",ownedBySelf:"main-trackList-ownedBySelf",rowImage:"main-trackList-rowImage",rowImageVideo:"DpagSkj9rm01H_aKy_Dw",rowImageFallback:"main-trackList-rowImageFallback",rowPlayPauseIcon:"main-trackList-rowPlayPauseIcon",placeholder:"T7WHRub8pynnWPXERh8e",placeholderIndex:"teK8wl2D50LT1eQXuxn_",placeholderStart:"jIkZ2Rh9EgRcaDgFo59w",placeholderStartWithCoverImage:"eClbBuaiGMZaigA4bp4e",placeholderEnd:"mfcu2ThWztZhPLI4BmQ7",placeholderVariable:"zhE9ZlvEhcGV1bDmBswy",discTitle:"EWbk59j3MnuB295CqiFg",discRow:"KAmWjX7nGmYCEtoR0EU2",addedBy:"HNrWEnhz87x0iBSI5PCH",facepileAvatar:"CaDisXZP6FboPwLkSkZ4",delayedVisibility:"knVQBhgo7WtejzqNn9SX",eventDate:"FI1uq8ux_Y_ZTzjibtKP",eventVenue:"nmaSdzB7DjwyT2i5C5Ec",eventTicketIcon:"zs8AulJGrH8lvWJ2qUrg",talkIcon:"z412ZWZNa5d7T1QcdK7m",talkSegmentDuration:"_tkrsP9r4Fxm3pP9GaZq",notificationDot:"main-trackList-statusChangeNew",resizeHandle:"I7SbihsVaE4CAUqLMa45",columnResizing:"x15L1JFSJDsSz7tzE69K"}},63265:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={TRACKLIST_HEADER_HEIGHT:"36px",MINMIMUM_COLUMN_WIDTH:"120px"}},27769:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={artistOverviewContent:"XtGI24gayCCOR69pcBao",artistOverviewContainer:"AK5MS4kVmpVJSnAPzApZ",popularTracks:"ih3vZ4qqibfclKQ2r3U8",artistShelfSpacer:"vsqOYUmRYepQ7AgGzPDk",artistShelfRelatedVideos:"Uv9uqBNRy4qsyhPSa7lY",artistSides:"YyjwPfOAdb6z73PerGUF",artistSidesBlock:"pAvBQUDkfvkyO47Kw71y",sideBlock:"PPoC4pYtYLuuzjV0RaQF",popularTracksBlock:"V168frZQBWaJ1OdnyyKO",about:"MZkAAYmEs5kAOXrbrBQQ",events:"IR0gsJCJYP1TqjMi6wUt",merch:"hGJN08YEbxIJ2HaEcHee",merchSmall:"GNdKACg7GTgIv75LT6Gv",overview:"FwIG_h9mHxGOTDxFRnWT",heading:"anPfvyDzeqR3CKW4gHUP",merchShelfContent:"ZpAXOWy3RgYX8ywKZZOI",container:"jW4eWdr_LUeOXwPpKhWG",content:"BPDHTIIFueJMvtDPZttw",backgroundImage:"DRXonbAbVN5Vg9anDL1X",bio:"xbKOOJ_NjLijBvdpAudQ",artistGridContainer:"M0yriEHOsE9ET707IXzC",image:"PwMuGFUCeHPjbHDy8M1T",columnContainer:"y_GaLKy76zj71zPYkLrs",bioContainer:"TV2j1oIRIkKH_6D1xP82",statsContainer:"T_AmQPlZ6wvE819I7A0D",stats:"zQy0G59IX5G4Cc9AtWRT",postedBy:"OyLgnahIHw63684ABRBF",postedByAvatar:"KguYS3oppxDrMNpTUJcB",avatar:"O9QEyBUMktZGNPifQqvY",modal:"JnpOnFaQfrRIA2fYe88A",scrollbars:"cacyLqtJhjhr95qRC_R7",close:"pSxFsY9Fgcj5f8Gf05mh",modalBase:"tsFfFt7SCIoA14JawrRf",modalAfterOpen:"_VADS4mdajCt5Yuf6KjW",modalBeforeClose:"TrS5BnDIiLtqz1i1QBVV",rank:"tLjX9htIKD_OCmEX01UN",cityBlock:"NPv26QCDgdnwsPOlYJmQ"}},91630:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={item:"artist-artistOnTour-item",condensed:"artist-artistOnTour-condensed",date:"artist-artistOnTour-date",elevated:"artist-artistOnTour-elevated",dateMonth:"artist-artistOnTour-dateMonth",dateDay:"artist-artistOnTour-dateDay",info:"artist-artistOnTour-info",title:"artist-artistOnTour-title",time:"artist-artistOnTour-time",timeAndVenue:"artist-artistOnTour-timeAndVenue",seeAll:"main-seeAll-link",timeAndVenueText:"artist-artistOnTour-timeAndVenueText",onTourShelfGrid:"artist-artistOnTour-onTourShelfGrid",metadata:"artist-artistOnTour-metadata",location:"artist-artistOnTour-location",eventName:"artist-artistOnTour-eventName"}},85257:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={home:"UqLpBiryzmdVyUucfSTQ",homeHome:"MYLfS2gPUXjhrDhPCU7h",content:"Le0q6vXGEvilJEjOqgF9",subfeedSection:"LY1UBr8lzr6PSZ6vP8Yk"}},70075:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={albumMerch:"V1660uk_uXXZAMEmV4D4",shelfSpace:"RbnoPhjDDAtbxN8gAiif"}},36753:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"main-trackInfo-container",pretitle:"F1aSUwAFI4YvWoalYJrv",ellipsis:"hKghsAg9t6lgWNvCb_1l",title:"main-trackInfo-name",subtitle:"main-trackInfo-artists",subtitleWithGap:"r6Psl2_K_0vpdX6vFLQd",qualityLabel:"Eu2KnQixAss5VI1CR4Fb",badges:"main-trackInfo-enhanced",xsmallBadges:"main-trackInfo-xsmallBadges"}},10392:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"main-buddyFeed-container",panelTransition:"ijGL1XdddGoxGArhOVxC",scrollBarContainer:"main-buddyFeed-scrollBarContainer",header:"main-buddyFeed-header",closeContainer:"main-buddyFeed-closeContainer",fixedHeader:"ZbDMGdU4aBOnrNLowNRq",contentPadding:"JrMgH1WiJ8l1iOgYiEsS",shadow:"fAte2d0xETy7pnDUAgHY",contentContainer:"JU6OHIZm0rEgWiMcYhvR",content:"main-buddyFeed-content",titleContainer:"pRQgHi0cCpQqKBgSfene",link:"DWdYpXuXxE_QKLQhK2BD",closeButton:"main-buddyFeed-closeButton",actions:"main-buddyFeed-actions"}},2426:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={emptyContainer:"BP2Fv3OX_ZYbjdA4lovg",titleContainer:"Olk6uKV_CIIVtWRrdRJc"}},58276:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"dcSY8Zom_VXgK71Lbym_",button:"nnFPIbw3IAGJZGqI4NqD",switch:"wyd6QhFOJ2Z05gOCbsiE",loading:"lKGbdh7pkRv2AcabYSy6",loadingVisible:"a5FAjheOpWkqsE2by0mD",hidden:"RxYeristNjK4Ih8_s058",spinner:"Rkf_Pdsq1f6cGK9QHcWK",npbSwitchButtonContainer:"ZCq05NqW5PjXZXaY4XEK"}},65790:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={videoPlayerContainer:"ngkFeIGFyNUaxRspbs5H"}},15054:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={coverContainer:"aaasJtK_0Z_ggHet0u6v",yourEpisodesCard:"Iy8zwWQVG_ylQT9GRLhR",coverIcon:"o5KDMPy9Ed_fP0aQ63vd"}},38552:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={entityImage:"GSgVaqJa8VEp5mKoIN0b",pulse:"jf7uliBDj0R3ZjKTPEg_",link:"oaKRK4WllExdXORQIlFZ",subtitle:"iKNK2nAjtbavMKjPPJtJ",titleLink:"UZYGjsTEkEen6hFQe194",icon:"cSWBDsMjkH62GXIXo6mQ",subtitleLeadingWrapper:"Gxl7UDkumVYX3WtQEnb8"}},74892:()=>{},28333:()=>{},15644:()=>{},32941:e=>{e.exports={convertPathToURL:function(e,t){if("1"==={}.IS_SPOTIFY_DESKTOP_APP)return`/${e}`;if("hot"==={}.WEBPACK_BUILD&&e.startsWith("build/")){return`https://${{}.WEBPACK_HOT_HOST}:${{}.WEBPACK_HOT_PORT}/cdn/${e}`}return`${t.cdn_url}/${e}`}}},94758:e=>{e.exports={af:"af-ZA",am:"am-ET",ar:"ar",az:"az-AZ",bg:"bg-BG",bn:"bn-IN",bho:"bp",cs:"cs-CZ",da:"da-DK",de:"de-DE",el:"el-GR",es:"es-ES","es-419":"es-LA",et:"et-EE",fa:"fa-IR",fr:"fr-FR",fi:"fi-FI",fil:"fp-PH","fr-CA":"fr-CA",gu:"gu-IN",hu:"hu-HU",he:"he-IL",hi:"hi-IN",hr:"hr-HR",id:"id-ID",is:"is-IS",it:"it-IT",ja:"ja-JP",kn:"kn-IN",ko:"ko-KR",lt:"lt-LT",lv:"lv-LV",ml:"ml-IN",mr:"mr-IN",ms:"ms-MY",nb:"nb-NO",ne:"ne-NP",nl:"nl-NL",or:"or-IN","pa-IN":"pa-IN","pa-PK":"pa-PK",pl:"pl-PL","pt-PT":"pt-PT","pt-BR":"pt-BR",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",sr:"sr-RS",sv:"sv-SE",sw:"sw",ta:"ta-IN",te:"te-IN",th:"th-TH",tr:"tr-TR",uk:"uk-UA",ur:"ur",vi:"vi-VN","zh-CN":"zh-CN","zh-TW":"zh-TW",zu:"zu-ZA","ar-EG":"ar-EG","ar-MA":"ar-MA","ar-SA":"ar-SA",eu:"eu-ES",bs:"bs-BA",ca:"ca-ES","zh-HK":"zh-HK","en-GB":"en-GB",gl:"gl-ES",mk:"mk-MK","es-AR":"es-AR","es-MX":"es-MX"}}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,l),n.loaded=!0,n.exports}l.m=a,l.amdO={},e=[],l.O=(t,n,i,r)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,i,r]=e[u],a=!0,o=0;o<n.length;o++)(!1&r||s>=r)&&Object.keys(l.O).every((e=>l.O[e](n[o])))?n.splice(o--,1):(a=!1,r<s&&(s=r));if(a){e.splice(u--,1);var c=i();void 0!==c&&(t=c)}}return t}r=r||0;for(var u=e.length;u>0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[n,i,r]},l.F={},l.E=e=>{Object.keys(l.F).map((t=>{l.F[t](e)}))},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,i){if(1&i&&(e=this(e)),8&i)return e;if("object"==typeof e&&e){if(4&i&&e.__esModule)return e;if(16&i&&"function"==typeof e.then)return e}var r=Object.create(null);l.r(r);var s={};t=t||[null,n({}),n([]),n(n)];for(var a=2&i&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,l.d(r,s),r},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,n)=>(l.f[n](e,t),t)),[])),l.u=e=>(({42:"xpui-routes-blend",599:"home-ad-card",983:"xpui-debug-window-contents",1338:"xpui-routes-all-episode-sponsors",1460:"xpui-routes-play-history-page",1621:"home-v2-section",1785:"xpui-desktop-routes-settings",2312:"xpui-routes-all-show-sponsors",2355:"xpui-routes-playlist",2391:"xpui-routes-desktop-settings",2889:"xpui-routes-recent-searches",3417:"xpui-feature-activation",3522:"debug-locales",3569:"xpui-routes-offline-browse",3632:"this-is-playlist-concerts-carousel",3667:"xpui-pip-mini-player",3838:"xpui-routes-cultural-moment-hub",3890:"xpui-routes-track",3934:"dev-playground",4312:"home-hpto",4389:"xpui-routes-collection-local-files",4496:"xpui-routes-create-playlist",4608:"xpui-routes-all-show-sponsors-consolidated",4789:"concerts-on-tour-playlist-card",5783:"xpui-routes-collection-concerts",5885:"home-ads-container",5962:"xpui-routes-album",6080:"xpui-routes-collection-episodes",6266:"browse-v2",6457:"xpui-routes-your-library-x",6505:"xpui-routes-lyrics",6665:"home-ads-visibility-logger",6863:"xpui-routes-track-v2",7067:"lottie-animation",7125:"xpui-routes-search",7170:"home-ads-fetcher",7241:"xpui-routes-venues",7564:"xpui-routes-buddy-feed",7599:"legacy-hpto-compatibility",7790:"xpui-routes-queue-page",8212:"xpui-routes-health-check",8493:"xpui-desktop-modals",8828:"xpui-routes-collection-songs",8860:"xpui-routes-merch-hub",8865:"xpui-routes-album-prerelease",9109:"xpui-playback-handle-icons",9209:"xpui-routes-concert",9319:"home-v2",9480:"xpui-routes-profile",9718:"playlist-leavebehinds"}[e]||e)+".js"),l.miniCssF=e=>(({42:"xpui-routes-blend",599:"home-ad-card",983:"xpui-debug-window-contents",1460:"xpui-routes-play-history-page",1785:"xpui-desktop-routes-settings",2355:"xpui-routes-playlist",2391:"xpui-routes-desktop-settings",2889:"xpui-routes-recent-searches",3417:"xpui-feature-activation",3522:"debug-locales",3569:"xpui-routes-offline-browse",3667:"xpui-pip-mini-player",3838:"xpui-routes-cultural-moment-hub",4312:"home-hpto",4389:"xpui-routes-collection-local-files",4789:"concerts-on-tour-playlist-card",5783:"xpui-routes-collection-concerts",5962:"xpui-routes-album",6080:"xpui-routes-collection-episodes",6266:"browse-v2",6457:"xpui-routes-your-library-x",6863:"xpui-routes-track-v2",7125:"xpui-routes-search",7564:"xpui-routes-buddy-feed",7599:"legacy-hpto-compatibility",7790:"xpui-routes-queue-page",8493:"xpui-desktop-modals",8828:"xpui-routes-collection-songs",8860:"xpui-routes-merch-hub",8865:"xpui-routes-album-prerelease",9209:"xpui-routes-concert",9319:"home-v2",9480:"xpui-routes-profile"}[e]||e)+".css"),l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},r="client-web:",l.l=(e,t,n,s)=>{if(i[e])i[e].push(t);else{var a,o;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+n){a=d;break}}a||(o=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,l.nc&&a.setAttribute("nonce",l.nc),a.setAttribute("data-webpack",r+n),a.src=e),i[e]=[t];var m=(t,n)=>{a.onerror=a.onload=null,clearTimeout(p);var r=i[e];if(delete i[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},p=setTimeout(m.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=m.bind(null,a.onerror),a.onload=m.bind(null,a.onload),o&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),l.p="/",(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((t,n)=>{var i=l.miniCssF(e),r=l.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),i=0;i<n.length;i++){var r=(a=n[i]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(r===e||r===t))return a}var s=document.getElementsByTagName("style");for(i=0;i<s.length;i++){var a;if((r=(a=s[i]).getAttribute("data-href"))===e||r===t)return a}})(i,r))return t();((e,t,n,i,r)=>{var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",l.nc&&(s.nonce=l.nc),s.onerror=s.onload=n=>{if(s.onerror=s.onload=null,"load"===n.type)i();else{var a=n&&n.type,o=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+a+": "+o+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=a,l.request=o,s.parentNode&&s.parentNode.removeChild(s),r(l)}},s.href=t,n?n.parentNode.insertBefore(s,n.nextSibling):document.head.appendChild(s)})(e,r,null,t,n)})),t={9441:0};l.f.miniCss=(n,i)=>{t[n]?i.push(t[n]):0!==t[n]&&{42:1,217:1,599:1,983:1,1460:1,1785:1,2355:1,2391:1,2889:1,3417:1,3522:1,3538:1,3569:1,3667:1,3838:1,4312:1,4389:1,4435:1,4511:1,4789:1,5748:1,5783:1,5962:1,6080:1,6088:1,6266:1,6457:1,6863:1,7125:1,7273:1,7564:1,7599:1,7753:1,7790:1,8493:1,8705:1,8828:1,8839:1,8860:1,8865:1,9209:1,9319:1,9480:1,9664:1,9742:1}[n]&&i.push(t[n]=e(n).then((()=>{t[n]=0}),(e=>{throw delete t[n],e})))},l.F.miniCss=e=>{if(!(l.o(t,e)&&void 0!==t[e]||/^(1(338|576|621|798)|3(6(32|38|54)|890|934)|5(703|747|885|896)|7(067|170|241|462|511|784|968)|8(084|212|792)|9(109|473|718)|(294|650|666)5|2312|4496|4608)$/.test(e))){t[e]=null;var n=document.createElement("link");l.nc&&n.setAttribute("nonce",l.nc),n.rel="prefetch",n.as="style",n.href=l.p+l.miniCssF(e),document.head.appendChild(n)}}}})(),(()=>{var e={9441:0};l.f.j=(t,n)=>{var i=l.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else if(6457!=t){var r=new Promise(((n,r)=>i=e[t]=[n,r]));n.push(i[2]=r);var s=l.p+l.u(t),a=new Error;l.l(s,(n=>{if(l.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",a.name="ChunkLoadError",a.type=r,a.request=s,i[1](a)}}),"chunk-"+t,t)}else e[t]=0},l.F.j=t=>{if((!l.o(e,t)||void 0===e[t])&&6457!=t){e[t]=null;var n=document.createElement("link");l.nc&&n.setAttribute("nonce",l.nc),n.rel="prefetch",n.as="script",n.href=l.p+l.u(t),document.head.appendChild(n)}},l.O.j=t=>0===e[t];var t=(t,n)=>{var i,r,[s,a,o]=n,c=0;if(s.some((t=>0!==e[t]))){for(i in a)l.o(a,i)&&(l.m[i]=a[i]);if(o)var u=o(l)}for(t&&t(n);c<s.length;c++)r=s[c],l.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return l.O(u)},n=("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),l.nc=void 0,s={7170:[4151,599,6665]},l.f.prefetch=(e,t)=>Promise.all(t).then((()=>{var t=s[e];Array.isArray(t)&&t.map(l.E)})),l.O(0,[9441],(()=>{[4151,7784,7125,2945,4312,5885,3569].map(l.E)}),5);var c=l.O(void 0,[4151],(()=>l(28758)));c=l.O(c)})();
+//# sourceMappingURL=xpui.js.map \ No newline at end of file