-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6892.js
1 lines (1 loc) · 13.6 KB
/
6892.js
1
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[6892],{52662:(e,s,i)=>{i.d(s,{j:()=>o});var r=i(92907),a=i(30848),t=i(36776),n=i(86070);const o=({name:e,uri:s,images:i,isHero:o,testId:l,description:d,index:c,requestId:u,color:m,variant:x})=>(0,n.jsx)(r.Z,{variant:x,index:c,featureIdentifier:"artist_concerts",headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,n.jsx)(a.M,{isHero:o,images:i,color:m}),renderSubHeaderContent:()=>(0,n.jsx)(t.c,{isHero:o,children:(0,n.jsx)("span",{children:d||""})}),testId:l,requestId:u})},87854:(e,s,i)=>{i.d(s,{I:()=>T});var r=i(30758),a=i(13505),t=i(24587),n=i(90082),o=i(75229),l=i(58294),d=i(3607),c=i(53726),u=i(65717),m=i(93492),x=i(82362),g=i(95717);const I="qFPnB4YPwJKBtmDadHJw",p="L1GB_UgpHH55rJC7bJSu",h="lwTOVx_hzbLLqRQNjpWq",j="fBzAZ8QqBJZ7jOCE9rR0",C="Cy4PWlzIF5qb7_LdHssZ";var y=i(86070);const b=({contentV2:e})=>(0,y.jsxs)(a.E,{as:"p",semanticColor:"textBrightAccent",className:C,children:[(0,y.jsx)(t.D,{size:"small"}),e]}),f=({contentV2:e})=>(0,y.jsxs)(a.E,{as:"p",semanticColor:"textBrightAccent",className:C,children:[(0,y.jsx)(n.M,{size:"small"}),e]}),H=({contentV2:e})=>(0,y.jsx)(a.E,{as:"p",className:C,children:e}),v=e=>{switch(e.typeV2){case"SPOTIFY_EXCLUSIVE":return(0,y.jsx)(b,{...e});case"TOP_FANS_EXCLUSIVE":case"TOP_FANS_DISCOUNT":case"LIMITED_EDITION":return(0,y.jsx)(f,{...e});default:return(0,y.jsx)(H,{...e})}},k=({price:e,salePrice:s})=>s?(0,y.jsxs)("div",{children:[(0,y.jsxs)(a.E,{variant:"bodySmall",semanticColor:"textBrightAccent",children:[s," "]}),(0,y.jsx)(a.E,{variant:"bodySmall",style:{textDecoration:"line-through"},children:e})]}):(0,y.jsx)(a.E,{variant:"bodySmall",children:e}),T=({name:e,uri:s,href:i,images:a,index:t,price:n,testId:C,salePrice:b,label:f,artists:H})=>{const T=(0,r.useMemo)((()=>H.items.map((e=>"profile"in e.data?e.data.profile.name:"")).join(m.Ru.getSeparator())),[H.items]),{spec:E,logger:P}=(0,x.r)(u.y,{data:{position:t,uri:s,reason:f?.typeV2||""}}),S=(0,g.g)(a,{desiredSize:300}),q=(0,r.useCallback)((()=>{P.logInteraction(E.cardLinkFactory({position:0}).hitNavigateToExternalUri({destination:i})),window.open(i,"_blank")}),[i,P,E]);return(0,y.jsx)(o.Z,{id:s,"data-testid":C,title:(0,y.jsx)(l.Z,{className:j,children:e}),pretitle:f&&(0,y.jsx)(v,{typeV2:f.typeV2,contentV2:f.contentV2}),media:(0,y.jsx)("div",{className:I,children:S?(0,y.jsx)(d.M,{size:"sm",src:S?.url,alt:e??""}):(0,y.jsx)("div",{className:p,children:(0,y.jsx)("div",{className:h,children:(0,y.jsx)(c.E,{size:"xxlarge","aria-hidden":!0,"data-testid":"card-image-fallback"})})})}),onClick:q,size:"md",subtitle:(0,y.jsx)(k,{price:n,salePrice:b}),body:T},s)}},17136:(e,s,i)=>{i.d(s,{a:()=>g});var r=i(30758),a=i(26411),t=i(93492),n=i(92907),o=i(30848),l=i(36776),d=i(61894),c=i(60452),u=i(12367),m=i(34855),x=i(86070);const g=r.memo((function({images:e,name:s,uri:i,onClick:g,isHero:I,testId:p,index:h,requestId:j,color:C,variant:y,logCardImpressions:b=!1}){let f;const H=(0,r.useCallback)((()=>(0,x.jsx)(o.M,{isCircular:!0,isHero:I,images:e,color:C,FallbackComponent:e=>(0,x.jsx)(a.r,{size:"xxlarge",...e})})),[C,e,I]),v=(0,r.useCallback)((()=>(0,x.jsx)(l.c,{isHero:I,children:I?(0,x.jsx)(c.t,{children:t.Ru.get("card.tag.profile")}):t.Ru.get("card.tag.profile")})),[I]);return f=I?(0,x.jsx)(d.A,{index:h,onClick:g,headerText:s,featureIdentifier:"profile",uri:i,isPlayable:!1,renderCardImage:H,renderSubHeaderContent:v,testId:p,requestId:j,logCardImpressions:b}):(0,x.jsx)(n.Z,{variant:y,index:h,onClick:g,headerText:s,featureIdentifier:"profile",uri:i,isPlayable:!1,renderCardImage:H,renderSubHeaderContent:v,testId:p,requestId:j,logCardImpressions:b}),(0,x.jsx)(u.h,{menu:(0,x.jsx)(m.B,{uri:i}),children:f})}))},16892:(e,s,i)=>{i.d(s,{Q:()=>ee});var r=i(3118),a=i(54916),t=i(60308),n=i(2055),o=i(72574),l=i(52662),d=i(60236),c=i(93492),u=i(92907),m=i(30848),x=i(36776),g=i(61894),I=i(60452),p=i(86070);const h=({name:e,uri:s,images:i,isHero:r,onClick:a,testId:t,description:n,index:o,requestId:l,color:d,variant:h,logCardImpressions:j=!1})=>r?(0,p.jsx)(g.A,{featureIdentifier:"genre",index:o,onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i,color:d}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{isHero:!0,children:(0,p.jsx)(I.t,{children:n||c.Ru.get("card.tag.genre")})}),testId:t,requestId:l,logCardImpressions:j}):(0,p.jsx)(u.Z,{variant:h,index:o,featureIdentifier:"genre",onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i,color:d}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{children:(0,p.jsx)("span",{children:n||""})}),testId:t,requestId:l,logCardImpressions:j});var j=i(87854),C=i(74918),y=i(17136),b=i(84736),f=i(10893);const H=({name:e="",uri:s="",images:i=[],isHero:r,onClick:a,testId:t,index:n,variant:o})=>r?(0,p.jsx)(g.A,{featureIdentifier:"unknown",index:n,onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{isHero:!0,children:(0,p.jsx)(I.t,{})}),testId:t}):(0,p.jsx)(u.Z,{variant:o,index:n,featureIdentifier:"unknown",onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{children:(0,p.jsx)("span",{})}),testId:t});var v=i(67047),k=i(1526),T=i(69778);const E=({entity:e,index:s,testId:i,isHero:r=!1,variant:n})=>{const c=((0,o.o_h)(e.uri)||{}).type;if(("string"==typeof e.uri||e.uri instanceof String)&&e.uri.startsWith("spotify:merch:")){const r=e.description?e.description.split("•")[0]:"";return(0,p.jsx)(j.I,{testId:i,index:s,name:e.name,uri:e.uri,href:e.href,images:e.images,price:r,artists:e.artists||{items:[]},label:null,salePrice:null})}if(("string"==typeof e.uri||e.uri instanceof String)&&e.uri.startsWith("spotify:artist:")&&e.uri.endsWith(":concerts"))return(0,p.jsx)(l.j,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images,description:e.description});switch(c){case o.NQG.ALBUM:case o.NQG.COLLECTION_ALBUM:{const t=e;return(0,p.jsx)(a.a,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:t.name,uri:t.uri,images:t.images,artists:t.artists})}case o.NQG.ARTIST:{const a=e;return(0,p.jsx)(t.a,{testId:i,isHero:r,index:s,variant:n,name:a.name,uri:a.uri,images:a.images})}case o.NQG.EPISODE:{const a=e;return(0,p.jsx)(d.U,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.images,showImages:a.show?.images||[],durationMilliseconds:a.duration_ms,releaseDate:a.release_date,resume_point:a.resume_point,description:a.description,isExplicit:a.explicit,is19PlusOnly:!!a.tags?.includes("MOGEF-19+")})}case o.NQG.PLAYLIST:case o.NQG.PLAYLIST_V2:{const a=e,t=a.owner?.display_name||e.owner?.displayName||"";return(0,p.jsx)(C.B,{testId:i,isHero:r,index:s,variant:n,name:a.name,uri:a.uri,images:a.images,description:a.description,authorName:t})}case o.NQG.PROFILE:return(0,p.jsx)(y.a,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images});case o.NQG.SHOW:{const a=e;return(0,p.jsx)(b.o,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.images,publisher:a.publisher,mediaType:{audio:T.Q.AUDIO,video:T.Q.VIDEO,mixed:T.Q.MIXED}[a.media_type]??T.Q.AUDIO})}case o.NQG.APPLICATION:return(0,p.jsx)(h,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images,description:e.description});case o.NQG.TRACK:{const a=e;return(0,p.jsx)(f.w,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.album?.images||[],artists:a.artists,album:a.album,isExplicit:a.explicit,is19PlusOnly:a.tags?.includes("MOGEF-19+")})}case o.NQG.COLLECTION:return e.uri.endsWith("your-episodes")?(0,p.jsx)(k.e,{variant:n,index:s}):(0,p.jsx)(v.o,{variant:n,index:s});default:return console.warn("Rendering a generic Card for unknown type:",c),(0,p.jsx)(H,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images})}};var P=i(97500),S=i.n(P),q=i(13505),N=i(36625),O=i(14064),L=i(12367),A=i(30758),R=i(55669),w=i(42026),_=i(2082),M=i(48785),U=i(24395),D=i(69611);const Q=A.memo((function({uri:e,sharingInfo:s}){const{spec:i}=(0,D.o)(e);return(0,p.jsx)(U.pZ,{value:"album",children:(0,p.jsxs)(R.W,{children:[(0,p.jsx)(M.h,{divider:"before",children:(0,p.jsx)(w.m,{uri:e,spec:i,sharingInfo:s,displayText:c.Ru.get("context-menu.copy-album-link")})}),(0,p.jsx)(_.q,{spec:i,divider:"before",uri:e})]})})}));var V=i(26923),z=i(53780),B=i(87950);const G=({artists:e,logger:s,spec:i})=>(0,p.jsx)("span",{children:e.map(((e,r)=>[r>0&&c.Ru.getSeparator(),(0,p.jsx)(O.m,{artist:e,index:r,logger:s,spec:i},e.uri)]))}),F=({artists:e,release:s,releaseTimezone:i})=>(0,p.jsx)(q.E,{variant:"bodySmall",semanticColor:"textSubdued",className:S()({[B.A.dividerAfter]:e.length>0}),children:(0,p.jsx)("span",{children:c.Ru.get("web-player.prerelease.releases_on",{date:c.Ru.formatDate((0,z.ad)(s.isoString),(0,z.s7)({month:"long",day:"numeric",year:"numeric",timeZone:i},s.precision))})})}),Z=({name:e,uri:s,images:i,artists:r=[],sharingInfo:a,isHero:t=!1,onClick:n,testId:o,index:l,requestId:d,color:h,release:j,releaseTimezone:C,variant:y,logCardImpressions:b=!1})=>{let f;const{playUri:H,playOptions:v}=(0,V.J)(s),k=()=>r.map((e=>e.name)).join(c.Ru.getSeparator());return f=t?(0,p.jsx)(g.A,{isPlayable:!1,index:l,onClick:n,headerText:e,featureIdentifier:"album",uri:s,playUri:H,playOptions:v,ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,k()),ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,k()),renderCardImage:()=>(0,p.jsx)(m.M,{isHero:!0,images:i,color:h,FallbackComponent:e=>(0,p.jsx)(N.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,s)=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(I.t,{children:c.Ru.get("card.tag.album")}),(0,p.jsx)(G,{logger:e,spec:s,artists:r})]}),getSignifierContent:()=>(0,p.jsx)(F,{artists:r,release:j,releaseTimezone:C}),testId:o,requestId:d,logCardImpressions:b}):(0,p.jsx)(u.Z,{variant:y,isPlayable:!1,onClick:n,headerText:e,featureIdentifier:"album",uri:s,playUri:H,playOptions:v,ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,k()),index:l,ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,k()),renderCardImage:()=>(0,p.jsx)(m.M,{isHero:t,images:i,color:h,FallbackComponent:e=>(0,p.jsx)(N.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,s)=>(0,p.jsxs)(x.c,{children:[(0,p.jsx)(F,{artists:r,release:j,releaseTimezone:C}),(0,p.jsx)(G,{logger:e,spec:s,artists:r})]}),testId:o,requestId:d,logCardImpressions:b}),(0,p.jsx)(L.h,{menu:(0,p.jsx)(Q,{uri:s,artistUri:r?.[0]?.uri,sharingInfo:a}),children:f})};var W=i(95059),J=i(90630),Y=i(19665),K=i(88176),X=i(78172),$=i(72242);const ee=({entity:e,index:s,testId:i,onClick:o,isHero:l=!1})=>{const c=(0,W.c)(),u=(0,r.NC)(J.LX5),m=(0,r.NC)(J.QTs);switch(e.type){case X.c.ALBUM:return(0,p.jsx)(a.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,artists:e.artists,year:e.year,sharingInfo:null,requestId:e.requestId,color:e.color,isPlayable:e.isPlayable,isRestricted:e.playabilityReason===K.$c.CatalogueRestricted,logCardImpressions:m,albumType:e.albumType},e.uri);case X.c.ARTIST:return(0,p.jsx)(t.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case X.c.AUDIOBOOK:return(0,p.jsx)(n.M,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,isPlayable:e.isPlayable,consumptionCapExplanation:e.consumptionCapExplanation,images:e.images,authorName:e.authorName,requestId:e.requestId,color:e.color,signifierText:e.signifierText,isPreRelease:e.isPreRelease,publishDate:e.publishDate,logCardImpressions:m},e.uri);case X.c.EPISODE:return(0,p.jsx)(d.U,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,showImages:e.show?.images||[],durationMilliseconds:e.duration.milliseconds,releaseDate:e.release.isoString,resume_point:null,description:e.description,isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly,sharingInfo:null,requestId:e.requestId,color:e.color,episodeShow:e.show,logCardImpressions:m,hasAssociatedVideo:e.mediaType?.includes($.C.Video)},e.uri);case X.c.GENRE:return(0,p.jsx)(h,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case X.c.PLAYLIST:return(0,p.jsx)(C.B,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,description:"",authorName:e.owner.displayName,authorUri:e.owner.uri,requestId:e.requestId,color:e.color,isPlayable:!(0,Y.p)(e.formatListData?.attributes),logCardImpressions:m,leaveTitleVisible:!0},e.uri);case X.c.USER:return(0,p.jsx)(y.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case X.c.SHOW:return(0,p.jsx)(b.o,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,publisher:e.publisher,sharingInfo:null,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case X.c.TRACK:return(0,p.jsx)(f.w,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.album?.images||[],artists:e.artists,album:c?null:e.album,isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly,sharingInfo:null,requestId:e.requestId,isLyricsMatch:e.isLyricsMatch,color:e.color,hasAssociatedVideo:e.hasAssociatedVideo&&u,logCardImpressions:m},e.uri);case X.c.PRE_RELEASE_ALBUM:return(0,p.jsx)(Z,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,artists:e.artists,sharingInfo:null,requestId:e.requestId,color:e.color,release:e.release,releaseTimezone:e.releaseTimezone,logCardImpressions:m},e.uri);default:return console.warn('Rendering SearchEntityCard using the old method <DeprecatedEntityCardByUriType /> as the entity doesn\'t contain the new "type" EntityType enum.'),(0,p.jsx)(E,{testId:i,onClick:o,isHero:l,index:s,entity:e})}}}}]);