2 lines
62 KiB
JavaScript
Executable File
2 lines
62 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[3878],{56359:(e,i,a)=>{a.r(i),a.d(i,{ThisIsTourCard:()=>S,default:()=>S,useThisisPlaylistExtensionQuery:()=>g});var n=a(56162),t=a(63082),l=a(3802),s=a(63120),r=a(96170);const d="nX5e9EyU1GmU42OFVHwH",o="pQmF4tvRpUeLWgPKUcW7",c="mGY3ER0iIvb1NbJ1d7X4",m="JHz_5gqDYpq9Lw3pIac_",u="HPCUzqQRn7oae4vJa3y9",k="WO2PkF5DO1fE25IrD2Gy",p="StPcf0AvSM0c18nwF4hJ";var v=a(4637);const S=e=>{const{artistImageUrl:i,artistName:a,artistConcertsUri:S,spec:h}=e,y=(0,r.$P)(),g=(0,r.Wi)(h.concertsCardFactory({identifier:a,uri:S,reason:"This is On Tour phase 1 MVP"}));return i&&a&&S?(0,v.jsxs)("section",{ref:g,className:d,children:[(0,v.jsx)(n.D,{as:"h1",variant:"cello",semanticColor:"textBase",children:l.ag.get("concerts")}),(0,v.jsxs)("div",{className:o,"data-testid":"on-tour-card",children:[(0,v.jsx)("img",{className:c,src:i,alt:""}),(0,v.jsxs)("div",{className:m,children:[(0,v.jsx)(n.D,{as:"p",variant:"mesto",semanticColor:"textSubdued",className:u,children:l.ag.get("concerts_on_tour")}),(0,v.jsx)(n.D,{as:"h1",variant:"cello",className:k,semanticColor:"textBase",children:a}),(0,v.jsx)(s.default,{to:S,className:p,children:(0,v.jsx)(t.P,{as:"span",buttonSize:"sm",onClick:()=>{const e=h.concertsCardFactory({identifier:a,uri:S,reason:"This is On Tour phase 1 MVP"}).hitUiNavigate({destination:S});y.logInteraction(e)},children:l.ag.get("concerts_see_all_events")})})]})]})]}):null};var h=a(72071);const y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"thisisPlaylistExtension"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playlistV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistsOnTour"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"upcomingEventsCount"}}]}}]}}]}}]}}]},g=(e,i)=>(0,h.a)(y,e,i)},54191:(e,i,a)=>{a.r(i),a.d(i,{default:()=>ga});var n=a(59496),t=a(61740),l=a(89605),s=a(56162),r=a(36844),d=a(44501),o=a(50346),c=a(3802),m=a(92403),u=a(462),k=a(4637);const p=(e,i,a)=>({event:e,app_startup_id:null,ad_playback_id:null,ad_id:String(i),lineitem_id:String(a),creative_id:String(i),ad_format:"sponsored playlist",slot:null,in_focus:null,username:null,jsondata:JSON.stringify({platform:"WebPlayer",revision:"1.0.0"})}),v=({clickTracking:e,clickThrough:i,thirdPartyImpression:a,impression:l,logoUrl:r,advertiserName:d,creativeId:o,lineItemId:m})=>{const v=(0,t.I0)(),[S,h]=(0,n.useState)(!1);return(0,n.useEffect)((()=>(v((0,u.Vw)()),v((0,u.kh)(p("event_viewed",o,m))),()=>{v((0,u.AG)())})),[v,o,m]),(0,k.jsxs)("div",{className:"sponsor-container",children:[(0,k.jsx)(s.D,{variant:"minuet",className:"sponsor-text","data-ta-id":"sponsor-text",children:c.ag.get("playlist.presented_by",d)}),(0,k.jsxs)("div",{className:"sponsor-logo",children:[(0,k.jsx)("a",{draggable:!1,className:"sponsor-logo__link",target:"_blank",href:i,onClick:()=>{v((0,u.kh)(p("event_clicked",o,m))),h(!0)},children:(0,k.jsx)("img",{draggable:!1,className:"sponsor-logo__image",src:r,alt:d,"data-ta-id":"sponsor-logo"})}),(0,k.jsx)("img",{className:"sponsor-logo__imp-pixel",src:l,alt:""}),a&&(0,k.jsx)("img",{className:"sponsor-logo__3p-imp-pixel",src:a,alt:""}),S&&(0,k.jsx)("img",{className:"sponsor-logo__click-img-pixel",src:e,alt:""})]})]})},S=({playlistUri:e})=>{const i=(0,t.I0)(),a=(0,t.v9)((i=>i.ads.sponsoredPlaylist.previewAd||i.ads.sponsoredPlaylist.sponsoredPlaylist.get(e)));return(0,n.useEffect)((()=>{a||i((0,u.fd)(e))}),[i,e,a]),a?(0,k.jsx)("div",{children:(0,k.jsx)(v,{...a})}):null},h=({playlistUri:e})=>{const i=(0,t.I0)(),a=(0,t.v9)((e=>e.ads.sponsoredPlaylist.sponsoredPlaylist.get("allSponsorships"))),l=(0,t.v9)((e=>e.ads.sponsoredPlaylist.previewAd));(0,n.useEffect)((()=>{a||i((0,u.z8)())}),[i,a]);const s=l||a&&((e,i)=>{const a=Date.now()/1e3,n=e.split(":"),t=n[n.length-1];return i.some((({playlistId:e,endTime:i,startTime:n})=>e===t&&a>=n&&a<(i||a+1)))})(e,a);return s?(0,k.jsx)(S,{playlistUri:e}):null};var y=a(4270),g=a(14241),N=a(13655),b=a(35394),f=a(73444),x=a(65321),C=a(91703),T=a(49663),j=a(74572),F=a(79475),A=a(66632);const R="hOOwEKqNuXrNvOCB1SgZ",D="csEdkIN9z2LjJIuZraqz",I=({uri:e})=>{const[i,a]=(0,A.Z)(e),t=(0,l.s0)(),r=(0,n.useCallback)((()=>{a(!1),t("/collection/playlists",{replace:!0})}),[t,a]);return(0,k.jsxs)("div",{className:R,children:[(0,k.jsx)(j.l,{iconSize:64}),(0,k.jsxs)("div",{className:D,children:[(0,k.jsx)(s.D,{as:"p",variant:"canon",children:c.ag.get("forbidden-page.title")}),(0,k.jsx)(s.D,{as:"p",variant:"mesto",children:c.ag.get("forbidden-page.description")})]}),i&&(0,k.jsx)(F.D,{colorSet:"invertedLight",onClick:r,children:c.ag.get("remove_from_your_library")})]})};var E=a(23627),L=a(49795),U=a(77312),P=a(18840),_=a(19281),w=a(66806),V=a(29939),M=a(56359),O=a(9877),B=a(28853),W=a(48271),Q=a(6142),K=a(95663),z=a(32812),Z=a(64826),H=a(46895),J=a(80964),G=a(41836),q=a(82108),X=a(69812),Y=a(21524),$=a(67565),ee=a(72071),ie=a(48607),ae=a(68640),ne=a(62134),te=a(12799),le=a(6444),se=a(97411),re=a(96170),de=a(42495),oe=a(53417),ce=a(98340),me=a(831),ue=a(75207);const ke=new Set(V.RJ),pe=new Set([]),ve={column:null,order:oe.kn.NONE},Se=n.memo((function({ariaLabel:e,nrTracks:i,playlistUri:a,rankType:t,scrollToUid:l,usePlayContextItem:s,tracklistDomRef:r}){const d=(0,n.useContext)(ae.ZF),{filter:o,setFilter:c}=(0,n.useContext)(w.fo),m=(0,n.useRef)(null),u=(0,n.useCallback)((()=>{m.current&&m.current.update()}),[]);(0,me.r)(a,u);const{sortState:p,setSortState:v}=(0,n.useContext)(V.Gb),S=(0,n.useCallback)((e=>{v((0,_.VK)(e,p))}),[p,v]);(0,n.useEffect)((()=>{v(ve),c("")}),[a,c,v]),(0,n.useEffect)((()=>{m.current&&l&&m.current.scrollToItem({uid:l})}),[l]);const h=(0,n.useCallback)((async(e,i)=>{const n=await d.getContents(a,{offset:e,limit:i,sort:(0,_._j)(p),filter:o,decorateFormatListData:!0});return{items:n.items,totalLength:n.totalLength}}),[a,d,p,o]),y="plays"===t,g=(0,n.useCallback)(((e,i)=>{const n=(0,ue.X)(e.album?.images,{desiredSize:40,desiredLabel:"small"});return(0,k.jsx)(oe.h_,{index:i,contextUri:a,uri:e.uri,uid:e.uid||void 0,isPlayable:e.isPlayable,duration_ms:e.duration.milliseconds,name:e.name,artists:e.artists,album:e.album,isExplicit:e.isExplicit,isMOGEFRestricted:e.is19PlusOnly,type:e.type,imgUrl:n?.url||"",statusChange:e.formatListAttributes?.status,showPlayCount:y,playCount:parseInt(e.formatListAttributes?.rank||"0",10),usePlayContextItem:s},i+e.uri)}),[a,y,s]),N=(0,n.useMemo)((()=>y?[oe.QD.INDEX,oe.QD.TITLE,oe.QD.PLAYS,oe.QD.ALBUM,oe.QD.DURATION]:[oe.QD.INDEX,oe.QD.TITLE,oe.QD.ALBUM,oe.QD.DURATION]),[y]),b=(0,n.useCallback)((e=>e.uri),[]),f=(0,n.useCallback)((e=>e.id),[]);return(0,k.jsx)(ce.ZP,{value:"chart-tracklist",children:(0,k.jsx)(oe.Pv,{ariaLabel:e,hasHeaderRow:!0,columns:N,sortableColumns:d.getCapabilities().canSort?ke:pe,sortState:p,onSort:S,renderRow:g,resolveUri:b,resolveUid:f,nrTracks:i,fetchTracks:h,limit:100,canFetchAllTracks:d.getCapabilities().canFetchAllTracks,outerRef:m,outerDomRef:r},a)})}));var he=a(74567),ye=a(3289),ge=a(51016);const Ne="x-contributorButton-button",be="x-contributorButton-ContributorButton",fe=({uri:e,label:i,onClick:a,...n})=>{const{onCopyLink:t}=(0,ge.l)({uri:e,permissionLevel:"CONTRIBUTOR"});return(0,k.jsx)(ye._,{label:i,children:(0,k.jsx)("button",{className:Ne,onClick:e=>{a?.(e),t?.()},"aria-label":i,children:(0,k.jsx)(he.t,{...n,className:be,iconSize:32,"aria-hidden":"true"})})})};var xe=a(41987),Ce=a(8930),Te=a(24256),je=a(38440);const Fe=n.memo((({metadata:e,tracklistDomRef:i})=>{const{hasEpisodes:a,isCollaborative:t,formatListData:l,hasDateAdded:s,collaborators:r}=e,d="chart"===l?.type,o="concert-playlist"===l?.type,m="live-streams"===l?.type,u=["blend","celebrity-blend","friends-mix"].indexOf(l?.type||"")>-1,p=!!a,{spec:v,logger:S}=(0,re.fU)(Ce.createDesktopSearchBarEventFactory,{}),h=(0,n.useCallback)((()=>{S.logInteraction(v.filterFieldFactory().keyStrokeFilter())}),[S,v]),y=(0,n.useCallback)((()=>{S.logInteraction(v.filterFieldFactory().hitClearFilter())}),[S,v]),g=(0,n.useCallback)((()=>{S.logInteraction(v.sortButtonFactory().hitSort())}),[S,v]),N=(0,n.useMemo)((()=>((e,i,a,n,t,l,s,r)=>e?V.RJ:(0,_.RG)(i,a,n,t,l,s,r))(d,t,p,s,o,m,u,r?.count??1)),[d,t,p,s,o,m,u,r]);return(0,k.jsxs)("div",{className:P.Z.searchBoxContainer,children:[(0,k.jsx)(n.Suspense,{fallback:null,children:(0,k.jsx)(Te.K,{placeholder:c.ag.get("playlist.search_in_playlist"),onFilter:h,onClear:y,clearOnEscapeInElementRef:i})}),(0,k.jsx)(je.l,{columns:N,onSort:g})]})}));var Ae=a(97355),Re=a(28106),De=a(9374);const Ie="multiUserAttributionDisplayNamesV2";var Ee=a(82849);function Le(e){return(0,Ee.MW)(e)||(0,Ee.JF)(e)}const Ue=new Set(V.zq),Pe=new Set([]),_e=n.memo((function({ariaLabel:e,nrTracks:i,playlistUri:a,playlistName:l,isCollaborative:s,isMixedMedia:r,isLive:d,isBlend:u,isConcert:p,hasDateAdded:v,canEdit:S,scrollToUid:h,feedbackPath:y,deleteFeedbackPath:g,usePlayContextItem:N,tracklistRef:b,tracklistDomRef:f,nrCollaborators:x=1,canRemove:C,spec:T,initialItems:j}){const F=(0,re.$P)(),A=(0,n.useContext)(ae.ZF),{filter:R}=(0,n.useContext)(w.fo),{sortState:D,setSortState:I}=(0,n.useContext)(V.Gb),E=(0,n.useRef)((()=>{})),[L,U]=(0,n.useState)([]),P=(0,t.I0)(),M=(0,n.useCallback)((()=>{b?.current&&b.current.update()}),[b]);(0,ae.rZ)(a,M);const O=(0,n.useCallback)(((e,i)=>{I((0,_.VK)(e,D)),F.logInteraction(T.columnHeaderFactory({identifier:e,position:i||0}).hitSort())}),[I,D,F,T]),B=(0,n.useCallback)((e=>{E.current(),A.remove(a,e)}),[A,a]),W=(0,n.useCallback)(((e,i,a=!1)=>{C&&(E.current=i,e.length>1&&!a?U(e):B(e))}),[C,B]);(0,n.useEffect)((()=>{b?.current&&h&&b.current.scrollToItem({uid:h})}),[h,b]);const K=(0,n.useCallback)((async(e,i)=>{const n=await A.getContents(a,{offset:e,limit:i,sort:(0,_._j)(D),filter:R,decorateFormatListData:!!y||d||u});return{items:n.items,totalLength:n.totalLength}}),[a,A,D,R,y,d,u]),z=(0,n.useCallback)(((e,i,n)=>{if(!b?.current)return;const t=b.current.getRows()[i];t&&(F.logInteraction(T.dragSort()),n===Re.W.Before?A.move(a,e,{before:t}):A.move(a,e,{after:t}))}),[b,F,T,A,a]),Z=(0,n.useCallback)(((e,i,n)=>{if(!b?.current)return;const t=b.current.getRows()[i];t&&(F.logInteraction(T.dragAddToPlaylist({playlist:a,itemToBeAdded:e[0]})),n===Re.W.Before?P((0,m.jV)(a,e,{before:{uri:t.uri,uid:t.uid}})):P((0,m.jV)(a,e,{after:{uri:t.uri,uid:t.uid}})))}),[b,F,T,a,P]),H=(0,n.useCallback)((()=>{A.resync(a)}),[A,a]),J=(0,n.useCallback)(((e,i)=>{let n,t;const c=!!(0,Ee.JF)(e)&&e.podcastSubscription.isUserSubscribed;(0,Ee.JF)(e)?(n=e.show,t=e.images.concat(e.show?.images||[])):(0,Ee.MW)(e)&&(n=e.album,t=e.album?.images);const m=(0,ue.X)(t,{desiredSize:40,desiredLabel:"small"});let v=[];S&&D.order===oe.kn.NONE&&(v=[Q.a[o.JM.TRACK],Q.a[o.JM.LOCAL_TRACK],Q.a[o.JM.EPISODE]]);const h="1"===e?.formatListAttributes?.["dislike-feedback-selected"];let b=!1;(0,Ee.JF)(e)&&e.podcastSubscription.isPaywalled&&!c?b=!0:Le(e)&&(b=e.isPlayable&&!h);const f=u&&((e,i)=>{const a=[];if(!i)return a;const n=i[Ie]?Ie:"multiUserAttributionDisplayNames",t=i?.[n]?.split(","),l=i?.multiUserAttributionImages?.split(",");if(!t||!l)return a;const s=i?.multiUserAttributionUsernamesV2?.split(",")||[],r=i?.multiUserAttributionType?.split(",")||[],d=t.length;for(let e=0;e<d;e++){const i=s[e],n=i&&(0,o.QK)(i).toURI();a.push({username:i,uri:n,displayName:t[e],images:(c=l[e],c.length>1?[{url:c}]:[]),recsplanation:r[e]})}var c;return a.sort(((i,a)=>i.username?i.username===e?.username?-1:a.username===e?.username?1:0:0))})(e.addedBy,e?.formatListAttributes)||e.addedBy&&[e.addedBy]||[];return(0,k.jsx)(oe.dx,{index:i,playIndex:e.playIndex??void 0,contextUri:a,uri:e.uri,uid:e.uid,isPlayable:b,duration_ms:Le(e)?e.duration.milliseconds:0,isPaywalled:!!(0,Ee.JF)(e)&&e.podcastSubscription.isPaywalled,isUserSubscribed:c,name:Le(e)?e.name:"",artists:(0,Ee.MW)(e)?e.artists:void 0,albumOrShow:n,isExplicit:(0,Ee.MW)(e)&&e.isExplicit,isCollaborative:s,nrCollaborators:x,isMixedMedia:r,isLocal:(0,Ee.MW)(e)&&e.isLocal,addedBy:f,hasDecoratedAddedBy:A.getCapabilities().canDecorateAddedBy,dateAdded:e.addedAt,release_date:(0,Ee.JF)(e)&&e.release.date||"",isMOGEFRestricted:((0,Ee.MW)(e)||(0,Ee.JF)(e))&&e.is19PlusOnly,type:e.type,imgUrl:m?.url||"",onMove:z,onInsert:Z,usePlayContextItem:N,allowedDropTypes:v,feedbackPath:y,feedbackUri:e?.formatListAttributes?.feedback_uri,deleteFeedbackPath:g,isDisliked:h,isLive:d,isBlend:u,ticketingSiteURL:e?.formatListAttributes?.ticketingSite,eventDate:e?.formatListAttributes?.eventDate,canRemove:C,onFeedbackClick:H,playlistName:l,isConcert:p,concertURL:e.formatListAttributes?.artist_concerts_uri,concertDate:e.formatListAttributes?.concert_date,concertVenue:e.formatListAttributes?.venue},i+e.uri)}),[S,D.order,u,a,s,x,r,A,z,Z,N,y,g,d,C,H,l,p]);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ce.ZP,{value:"playlist-tracklist",children:(0,k.jsx)(oe.Pv,{testID:"playlist-tracklist",ariaLabel:e,hasHeaderRow:!0,columns:(0,_.RG)(s,r,v,d,p,u,x),sortableColumns:A.getCapabilities().canSort?Ue:Pe,sortState:D,onSort:O,onRemove:W,renderRow:J,resolveUri:e=>e.uri,resolveUid:e=>e.uid,nrTracks:i,fetchTracks:K,limit:100,canFetchAllTracks:A.getCapabilities().canFetchAllTracks,outerRef:b,outerDomRef:f,tracks:j,isConcertPlaylist:p},a)}),(0,k.jsx)(Ae.h,{title:c.ag.get("playlist.remove_from_playlist",l),isOpen:L.length>0,tracks:L,onClose:e=>{e.stopPropagation(),U([])},onRemove:B})]})}));var we=a(30366),Ve=a(54485),Me=a(22669),Oe=a(64250);const Be=n.memo((function({playlistUri:e,playlistLength:i}){const{tracks:a,refresh:t}=((e,i=10)=>{const a=2*i,t=3*i,l=(0,n.useRef)(0),[s,r]=(0,n.useState)(e),[o,c]=(0,n.useState)([]),m=(0,n.useRef)([]),u=(0,n.useContext)(Ve.Z),{spec:k,logger:p}=(0,re.fU)(d.T,{data:{uri:e}}),v=(0,n.useMemo)((()=>k.recommendedFactory()),[k]);(0,n.useEffect)((()=>{const i=u.getEvents(),a=i=>{const a=i.data;a.uri===e&&(a.operation===Oe.If.ADD?c((e=>e.filter((e=>a.uris.every((i=>i!==e.uri)))))):a.operation===Oe.If.REMOVE&&c((e=>e.filter((e=>a.items.every((i=>i.uri!==e.uri)))))))};return i.addListener(Oe.XL.OPERATION_COMPLETE,a),()=>{i.removeListener(Oe.XL.OPERATION_COMPLETE,a)}}),[u,e]),(0,n.useEffect)((()=>(c([]),r(e),m.current=[],l.current=l.current+1,()=>{l.current=l.current+1})),[e]),(0,n.useEffect)((()=>{if(o.length<a){const e=Math.min(a,t-o.length),i=l.current;u.getRecommendedTracks(s,m.current,e).then((a=>{if(i!==l.current)return;const n=a.map((e=>e?.uri&&Me.o.from(e.uri).id)).filter((e=>null!==e));a.length<e&&m.current.length?m.current=[]:m.current=[...m.current,...n],c((e=>[...e,...a]))}))}}),[a,t,u,s,o.length]);const S=(0,n.useCallback)((()=>{if(k){const e=v.refreshButtonFactory().hitRefreshContent();p.logInteraction(e)}c((e=>e.slice(i)))}),[p,v,k,i]);return{tracks:o.slice(0,i),_bufferedTracks:o.slice(i),refresh:S}})(e),l=!i||0===i,{usePlayContextItem:r}=(0,ie.n)({uri:e.replace("spotify:","spotify:internal:recs:"),pages:[{items:a.map((e=>({...e,provider:null,type:De.p.TRACK,uid:null})))}]},{featureIdentifier:"playlist_recommendations"}),o=(0,n.useCallback)(((i,a)=>(0,k.jsx)(oe.cp,{index:a,imgUrl:i.album.imageUrl,contextUri:e.replace("spotify","spotify:internal:recs"),uri:i.uri,isPlayable:!i.isMOGEFRestricted,name:i.name,artists:i.artists,album:{...i.album,imgUrl:i.album.imageUrl},isExplicit:i.explicit,isMOGEFRestricted:i.isMOGEFRestricted,usePlayContextItem:r},`${a}-${i.uri}`)),[e,r]),m=(0,n.useMemo)((()=>[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD]),[]),u=(0,n.useCallback)((e=>e.uri),[]),p=(0,n.useCallback)((e=>e.id),[]),v=(0,n.useMemo)((()=>a.slice(0,Math.min(a.length,10))),[a]);return a.length>0?(0,k.jsxs)("div",{className:P.Z.recommendedTrackList,children:[(0,k.jsx)("div",{className:P.Z.top,children:(0,k.jsxs)("div",{className:P.Z.header,children:[(0,k.jsx)(s.D,{variant:"canon",children:c.ag.get("playlist.extender.recommended.title")}),(0,k.jsx)(s.D,{variant:"mesto",className:P.Z.subtitle,children:l?c.ag.get("playlist.extender.title.in.playlist"):c.ag.get("playlist.extender.songs.in.playlist")})]})}),a.length?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("playlist.extender.recommended.header"),nrTracks:Math.min(a.length,10),rowPlaceholder:oe.hU,tracks:v,renderRow:o,resolveUri:u,resolveUid:p,columns:m},`${e}-recommended`),(0,k.jsx)(we.o,{className:P.Z.refreshButton,onClick:t,children:c.ag.get("playlist.extender.refresh")})]}):null]}):null}));var We=a(24697),Qe=a(95886),Ke=a(38191),ze=a(83680),Ze=a(92650),He=a(58507),Je=a(80912);const Ge={outerBox:"Uw4gqTFuHRLn4VKga_bJ",shareCardContainer:"SdECNwBCnmkKl0Q0mJff",shareCard:"HLkGXLclDq_7guCiD1Xq",shareCardText:"vWR6alsFpTlgXUckErqF",centerStuff:"EbHQLci0cfLjHmS0AKp2",imgContainer:"HzYFPEbZdd6fQW4jfcz4",profileImg:"SQEgwtR2aj51qFj6cMNZ",playlistImg:"aaNtMSjjJ4cClWoe6K0k",container:"BhtBJTnsM9AotmyN0MPr",backButton:"FwoyMQocCMLEafLlvAk5",closeButton:"xcn0geYcJliTHbvcds12",shareButton:"KptBBI16DBjQBjvPQtlH"};function qe(e){const i=(0,n.useRef)(null);return(0,k.jsx)(Qe.Y,{center:!0,onClose:e.onClose,ref:i,withPortal:!0,children:(0,k.jsx)(Ke.l,{className:Ge.outerBox,"aria-label":"Example showing onClose property",body:(0,k.jsxs)("div",{className:Ge.container,children:[(0,k.jsx)(we.o,{buttonSize:"md","aria-label":"IconX",iconOnly:ze.k,onClick:e.onClose,className:Ge.closeButton}),(0,k.jsx)(we.o,{buttonSize:"md","aria-label":"IconArrowLeft",iconOnly:He.D,className:Ge.backButton}),(0,k.jsx)("div",{className:Ge.shareCardContainer,children:(0,k.jsxs)("div",{className:Ge.shareCard,children:[(0,k.jsx)("div",{className:Ge.centerStuff,children:(0,k.jsxs)("div",{className:Ge.imgContainer,children:[(0,k.jsx)(We.E,{className:Ge.profileImg,src:"https://i.scdn.co/image/ab6761610000517469fd2e170a6d290939620b61",alt:"A headshot profile picture of Afrobeats artist Lojay",imageHeight:"150px",imageWidth:"150px",crop:!0,circle:!0}),(0,k.jsx)(We.E,{className:Ge.playlistImg,src:"spotify:image:ab67706c0000da8465307c7864e1e9d53770a94e",alt:"Ginjapiano playlist profile picture",imageHeight:"150px",imageWidth:"150px",crop:!0,circle:!0})]})}),(0,k.jsxs)("div",{className:Ge.shareCardText,children:[(0,k.jsxs)(s.D,{as:"p",variant:"finaleBold",children:[(0,k.jsx)("span",{style:{color:"#dc744d"},children:"4M"})," STREAMED THIS WEEK"]}),(0,k.jsxs)(s.D,{as:"p",variant:"alto",children:["IM IN THE ",(0,k.jsx)("span",{style:{color:"#dc744d"},children:"TOP 21% "}),"OF GINJAPIANO LISTENERS THIS WEEK."]})]}),(0,k.jsx)("div",{className:Ge.centerStuff,children:(0,k.jsx)(Je.V,{iconSize:48})})]})}),(0,k.jsx)("div",{className:Ge.shareButton,children:(0,k.jsx)(F.D,{colorSet:"invertedLight",children:"Share"})})]})})})}const Xe="nTTPGZGk721M6gfldG43",Ye="BFYSUcA4ifYvgDzOQX5Q",$e="el9_37CCpYKxCRKDDyww",ei="FB376b7R1M_0YQZ_SahS",ii="srPBn9_CV0NzQEEzW9f6",ai="te8Z8OuKxZx1gbjb7_ua",ni=n.memo((function({setuserView:e}){const[i,a]=(0,n.useState)(!1);return(0,k.jsxs)(k.Fragment,{children:[i&&(0,k.jsx)(qe,{onClose:()=>{a(!1)}}),(0,k.jsx)(Qe.Y,{center:!0,withPortal:!0,children:(0,k.jsx)(Ke.l,{colorSet:"overMedia","aria-label":"Title",body:(0,k.jsx)("div",{children:(0,k.jsx)(s.D,{as:"p"})}),dialogTitle:(0,k.jsxs)("div",{className:Xe,children:[(0,k.jsxs)("div",{className:$e,children:[(0,k.jsxs)("div",{children:[(0,k.jsx)(We.E,{src:"https://i.scdn.co/image/54470e5e056b93d7022076960d3a6b2267ece226",alt:"A figure sits cross-legged but poised in front of their synthesizer",imageHeight:"20px",imageWidth:"20px",crop:!0,circle:!0}),(0,k.jsx)(We.E,{src:"https://i.scdn.co/image/54470e5e056b93d7022076960d3a6b2267ece226",alt:"A figure sits cross-legged but poised in front of their synthesizer",imageHeight:"30px",imageWidth:"30px",crop:!0,circle:!0})]}),(0,k.jsx)(s.D,{as:"h1",variant:"alto",children:"Rap Caviar"})]}),(0,k.jsxs)("div",{className:Ye,children:[(0,k.jsx)(we.o,{iconOnly:ze.k,onClick:()=>e(!1),className:ii}),(0,k.jsx)(we.o,{iconOnly:Ze.o,className:ai,onClick:()=>{a(!0)}})]}),(0,k.jsx)("div",{className:ei,children:(0,k.jsx)(s.D,{as:"p",variant:"ballad",children:"Hello you made it to the top 10 percent"})})]}),id:"dialogAlert"})})]})})),ti={entrypoint:"__97AKHEfxNtqFsLai1b",imgContainer:"pzFwHV7jvPlWTI6cG5TV",userImage:"iZu1aH8cr2cw98gqmTeo",textContainer:"JRvbfJh7eAZ_1FrQukej"};function li(){const[e,i]=(0,n.useState)(!1);return(0,k.jsxs)(k.Fragment,{children:[e&&(0,k.jsx)(ni,{setuserView:i}),(0,k.jsxs)("button",{className:ti.entrypoint,onClick:()=>i(!0),children:[(0,k.jsxs)("div",{className:ti.imgContainer,children:[(0,k.jsx)(We.E,{className:ti.userImage,src:"https://i.scdn.co/image/54470e5e056b93d7022076960d3a6b2267ece226",alt:"A figure sits cross-legged but poised in front of their synthesizer",imageHeight:"30px",imageWidth:"30px",crop:!0,circle:!0}),(0,k.jsx)(We.E,{className:ti.userImage,src:"https://i.scdn.co/image/54470e5e056b93d7022076960d3a6b2267ece226",alt:"A figure sits cross-legged but poised in front of their synthesizer",imageHeight:"30px",imageWidth:"30px",crop:!0,circle:!0}),(0,k.jsx)(We.E,{className:ti.userImage,src:"https://i.scdn.co/image/54470e5e056b93d7022076960d3a6b2267ece226",alt:"A figure sits cross-legged but poised in front of their synthesizer",imageHeight:"30px",imageWidth:"30px",crop:!0,circle:!0})]}),(0,k.jsxs)("div",{className:ti.textContainer,children:[(0,k.jsx)(s.D,{as:"p",variant:"mestoBold",children:"View employee leaderboard"}),(0,k.jsx)(s.D,{as:"p",variant:"mesto",children:"You're in the top 21% of listeners."})]})]})]})}var si=a(26588),ri=a(79642),di=a(22991),oi=a(79102),ci=a(41921);const mi={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationSearchV2Track"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}}]}}]},ui={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryInlineCurationSearchV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"term"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"5"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"numberOfTopResults"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"term"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"numberOfTopResults"},value:{kind:"Variable",name:{kind:"Name",value:"numberOfTopResults"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"query"}},{kind:"Field",name:{kind:"Name",value:"tracksV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"item"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2TrackWrapper"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2ArtistWrapper"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"albums"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2AlbumWrapper"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"episodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2EpisodesWrapper"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"topResults"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemsV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"item"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2ArtistWrapper"}},{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2EpisodesWrapper"}},{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2AlbumWrapper"}},{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2TrackWrapper"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationSearchV2TrackWrapper"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2Track"}}]}}]}}]}},...mi.definitions,{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationSearchV2ArtistWrapper"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2Artist"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationSearchV2Artist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationSearchV2AlbumWrapper"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2Album"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationSearchV2Album"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationSearchV2EpisodesWrapper"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2Episode"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationSearchV2Episode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},ki={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryInlineCurationSearchAlbum"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albums"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationAlbums"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationAlbums"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uid"}},{kind:"Field",name:{kind:"Name",value:"track"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2Track"}}]}}]}}]}}]}}]}},...mi.definitions]},pi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryInlineCurationSearchArtist"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationArtists"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"inlineCurationArtists"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"discography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"popularReleasesAlbums"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"topTracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uid"}},{kind:"Field",name:{kind:"Name",value:"track"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"inlineCurationSearchV2Track"}}]}}]}}]}}]}}]}}]}},...mi.definitions]};var vi=a(73972),Si=a(9603),hi=a(28418),yi=a(29251);function gi(e){return{type:De.p.ALBUM,uri:e.uri,id:e.id,name:e.name,images:(0,Si.NS)(e.coverArt)}}function Ni(e){if("Album"!==e.data.__typename)return null;return gi(e.data)}function bi(e){if("Artist"!==e.data.__typename)return null;const i=e.data;return{type:De.p.ARTIST,uri:i.uri,id:i.id,name:i.profile.name,images:(0,Si.NS)(i.visuals.avatarImage)}}function fi(e){if("Episode"!==e.data.__typename)return null;const i=e.data,a=i.podcastV2.data;return"Podcast"!==a.__typename?null:{type:De.p.EPISODE,uri:i.uri,id:i.id,name:i.name,images:(0,Si.NS)(i.coverArt),isExplicit:i.contentRating?.label===vi.KS.Explicit,is19PlusOnly:i.contentRating?.label===vi.KS.NineteenPlus,podcast:{id:a.id,uri:a.uri,name:a.name},isPlayable:i.playability.playable}}function xi(e){const i=(0,Si.NS)(e.albumOfTrack?.coverArt||null);return{type:De.p.TRACK,uri:e.uri,id:e.id,name:e.name,album:{name:e.albumOfTrack?.name||"",uri:e.albumOfTrack?.uri||"",imgUrl:i.at(0)?.url||"",id:e.albumOfTrack?.id||""},artists:e.artists.items.map((e=>({id:e.id,name:e.profile.name,uri:e.uri}))),isPlayable:e.playability.playable,isExplicit:e.contentRating?.label===vi.KS.Explicit,is19PlusOnly:e.contentRating?.label===vi.KS.NineteenPlus}}function Ci(e){if("Track"!==e.data.__typename)return null;return xi(e.data)}function Ti(e){return(e?.itemsV2??[]).map((e=>{const i=(0,Si.U2)(e,"item");switch(i.__typename){case"AlbumResponseWrapper":return Ni(i);case"ArtistResponseWrapper":return bi(i);case"EpisodeResponseWrapper":return fi(i);case"TrackResponseWrapper":return Ci(i);default:return(0,yi._)(i),null}})).filter(hi.K)||[]}const ji=async(e,i,a=0,n=10,t=10)=>{const l={term:i,offset:a,limit:n,numberOfTopResults:t},s=await e(ui,l),r=s?.data?.searchV2;return r?(o=i,{albums:(k=(d=r).albums,((k?.items??[]).map((e=>Ni(e))).filter(hi.K)||[])??[]),artists:(u=d.artists,((u?.items??[]).map((e=>bi(e))).filter(hi.K)||[])??[]),episodes:(m=d.episodes,((m?.items??[]).map((e=>fi(e))).filter(hi.K)||[])??[]),tracks:(c=d.tracksV2,((c?.items??[]).map((e=>Ci(e.item))).filter(hi.K)||[])??[]),topResults:Ti(d.topResults)??[],query:o}):null;var d,o,c,m,u,k},Fi=async(e,i,a=50,n=0)=>{const t={uris:[i],limit:a,offset:n},l=await e(ki,t),s=l?.data?.albums;return s?function(e){const i=e.at(0);if(!i)return null;switch(i.__typename){case"Album":return{albums:[],artists:[],episodes:[],tracks:i.tracks.items.map((e=>xi(e.track)))||[],topResults:[]};case"GenericError":case"NotFound":return null;default:return(0,yi._)(i),null}}(s):null},Ai=async(e,i,a=50,n=0)=>{const t={uris:[i],limit:a,offset:n},l=await e(pi,t),s=l?.data?.artists;return s?function(e){const i=e.at(0);if(!i)return null;switch(i.__typename){case"Artist":return{albums:i.discography.popularReleasesAlbums.items.map((e=>gi(e)))||[],artists:[],episodes:[],tracks:i.discography.topTracks.items.map((e=>xi(e.track)))||[],topResults:[]};case"GenericError":case"NotFound":return null;default:return(0,yi._)(i),null}}(s):null};var Ri=a(84875),Di=a.n(Ri),Ii=a(85830),Ei=a(48710);const Li="playlist-inlineSearchBox-filterInputContainer",Ui="playlist-inlineSearchBox-filterInput",Pi="playlist-inlineSearchBox-overlay",_i="playlist-inlineSearchBox-searchIconContainer",wi="playlist-inlineSearchBox-searchIcon",Vi="playlist-inlineSearchBox-clearButton",Mi=n.memo((function({placeholder:e,onChange:i=(()=>{}),onFocus:a=(()=>{})}){const[t,l]=(0,n.useState)(""),r=(0,n.useRef)(null),d=(0,Ii.y1)((e=>{i(e)}),200),o=(0,n.useCallback)((e=>{const i=e.currentTarget.value;l(i),d(i)}),[l,d]),m=(0,n.useCallback)((()=>{r.current&&r.current.focus(),l(""),i("")}),[l,i]),u=(0,n.useCallback)((e=>{"Escape"===e.key&&t&&m()}),[t,m]);return(0,k.jsxs)("div",{className:Li,role:"search",children:[(0,k.jsx)(s.D,{as:"input",variant:"mesto",ref:r,className:Di()(Ui),role:"searchbox",maxLength:80,autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,placeholder:e,onChange:o,onKeyDown:u,onFocus:a,value:t}),(0,k.jsxs)("div",{className:Pi,children:[(0,k.jsx)("span",{className:_i,children:(0,k.jsx)(Ei.j,{iconSize:16,className:wi,"aria-hidden":"true"})}),t&&(0,k.jsx)("button",{className:Vi,onClick:m,"aria-label":c.ag.get("search.a11y.clear-input"),children:(0,k.jsx)(ze.k,{iconSize:16})})]})]})})),Oi=({renderRow:e,searchResults:i,renderSeeAllRow:a,seeAllXList:n})=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("search.title.top-results"),renderRow:e,rowPlaceholder:oe.hU,nrTracks:i.length,tracks:i,resolveUri:e=>e.uri,columns:[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD],testID:"playlist-inline-curation-loaded-results"}),(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("search.title.all"),renderRow:a,rowPlaceholder:oe.hU,nrTracks:n.length,tracks:n,resolveUri:e=>e.uri,columns:[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD],testID:"playlist-inline-curation-see-all-options"})]}),Bi=({renderRow:e,searchResults:i})=>(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("search.title.top-results"),renderRow:e,rowPlaceholder:oe.hU,nrTracks:i.length,tracks:i,resolveUri:e=>e.uri,columns:[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD]}),Wi=({renderRow:e,searchResults:i})=>{const a=i.filter((e=>e.type===De.p.TRACK)),n=i.filter((e=>e.type===De.p.ALBUM));return(0,k.jsxs)("div",{children:[(0,k.jsx)(s.D,{as:"p",variant:"cello",className:P.Z.artistResultListTitle,children:c.ag.get("playlist.curation.popular_songs")}),(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("playlist.curation.popular_songs"),renderRow:e,rowPlaceholder:oe.hU,nrTracks:a.length,tracks:a,resolveUri:e=>e.uri,columns:[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD]}),(0,k.jsx)(s.D,{as:"p",variant:"cello",className:P.Z.artistResultListTitle,children:c.ag.get("playlist.curation.albums")}),(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("playlist.curation.albums"),renderRow:e,rowPlaceholder:oe.hU,nrTracks:n.length,tracks:n,resolveUri:e=>e.uri,columns:[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD]})]})},Qi=({renderRow:e,searchResults:i})=>(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("search.title.top-results"),renderRow:e,rowPlaceholder:oe.hU,nrTracks:i.length,tracks:i,resolveUri:e=>e.uri,columns:[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD]}),Ki=({renderRow:e,searchResults:i})=>(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("search.title.top-results"),renderRow:e,rowPlaceholder:oe.hU,nrTracks:i.length,tracks:i,resolveUri:e=>e.uri,columns:[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD]}),zi=({renderRow:e,searchResults:i})=>(0,k.jsx)(oe.Pv,{ariaLabel:c.ag.get("search.title.top-results"),renderRow:e,rowPlaceholder:oe.hU,nrTracks:i.length,tracks:i,resolveUri:e=>e.uri,columns:[oe.QD.TITLE,oe.QD.ALBUM,oe.QD.ADD]});var Zi=a(3770);const Hi="G2t3w2AAeb5OXp0_GeWs",Ji="saVjTFMyWYUz975_tkQm",Gi="thi8fNCkEhutRkDC90c0",qi="pHVlkChuJpEnBQyU3ADv",Xi="ENWs3JxcqtD98_8fbPz2",Yi="L8IUKEJL6JiTyE_qUVCc",$i="XcyjdXgsNX0DBt72tfiD",ea="VhJnuS7UcUPfIlzD8dlU",ia="He29vQ5anFj_bJ5iEaI2",aa=({searchResult:e,index:i,isRTL:a,onClick:n})=>{const t=e.images.at(0)?.url;return(0,k.jsx)(Zi.RX,{className:Xi,rowIndex:i,"aria-selected":!1,children:(0,k.jsxs)("div",{"aria-label":`${c.ag.get("artist-page.tracks.seemore")} ${e.name}`,className:ia,onClick:n,children:[(0,k.jsxs)(Zi.id,{columnIndex:0,className:Yi,children:[void 0!==t?(0,k.jsx)("img",{className:Gi,src:t,alt:e.name}):null,(0,k.jsxs)("div",{className:$i,children:[(0,k.jsx)(s.D,{as:"p",className:qi,variant:"ballad",children:e.name}),(0,k.jsx)(s.D,{as:"p",variant:"mesto",semanticColor:"textSubdued",children:c.ag.get("album")})]})]}),(0,k.jsx)(Zi.id,{columnIndex:1}),(0,k.jsx)(Zi.id,{columnIndex:2,children:(0,k.jsx)("button",{"data-testid":"top-bar-forward-button","aria-label":`See more from ${e.name}`,className:ea,onClick:n,children:a?(0,k.jsx)(di.e,{}):(0,k.jsx)(ri.V,{})})})]})})};var na=a(74991);const ta=({size:e})=>(0,k.jsx)("div",{className:Ji,children:(0,k.jsx)(na.a,{iconSize:e})}),la=({searchResult:e,index:i,isRTL:a,onClick:n})=>{const t=e.images.at(0)?.url;return(0,k.jsx)(Zi.RX,{className:Xi,rowIndex:i,"aria-selected":!1,children:(0,k.jsxs)("div",{"aria-label":`${c.ag.get("artist-page.tracks.seemore")} ${e.name}`,className:ia,onClick:n,"data-testid":"playlist-inline-curation-artist",children:[(0,k.jsxs)(Zi.id,{columnIndex:0,className:Yi,children:[void 0!==t?(0,k.jsx)("img",{className:Hi,src:t,alt:e.name}):(0,k.jsx)(ta,{size:16}),(0,k.jsxs)("div",{className:$i,children:[(0,k.jsx)(s.D,{as:"p",className:qi,variant:"ballad",children:e.name}),(0,k.jsx)(s.D,{as:"p",variant:"mesto",semanticColor:"textSubdued",children:c.ag.get("artist")})]})]}),(0,k.jsx)(Zi.id,{columnIndex:1}),(0,k.jsx)(Zi.id,{columnIndex:2,children:(0,k.jsx)("button",{"data-testid":"top-bar-forward-button","aria-label":`See more from ${e.name}`,className:ea,onClick:n,children:a?(0,k.jsx)(di.e,{}):(0,k.jsx)(ri.V,{})})})]})})},sa=({episode:e,contextUri:i,index:a,usePlayContextItem:n})=>(0,k.jsx)(oe.YK,{uid:e.id,uri:e.uri,isPlayable:e.isPlayable,isMOGEFRestricted:e.is19PlusOnly,isExplicit:e.isExplicit,contextUri:i,name:e.name,imgUrl:e.images.at(0)?.url??"",index:a,podcast:e.podcast,usePlayContextItem:n}),ra=({label:e,index:i,isRTL:a,onClick:n})=>(0,k.jsx)(Zi.RX,{className:Xi,rowIndex:i,"aria-selected":!1,children:(0,k.jsxs)("div",{"aria-label":e,className:ia,onClick:n,children:[(0,k.jsx)(Zi.id,{columnIndex:0,className:Yi,children:(0,k.jsx)(s.D,{as:"p",className:qi,variant:"ballad",children:e})}),(0,k.jsx)(Zi.id,{columnIndex:1}),(0,k.jsx)(Zi.id,{columnIndex:2,children:(0,k.jsx)("button",{"data-testid":"top-bar-forward-button","aria-label":e,className:ea,onClick:n,children:a?(0,k.jsx)(di.e,{}):(0,k.jsx)(ri.V,{})})})]})}),da=({track:e,contextUri:i,index:a,usePlayContextItem:n})=>(0,k.jsx)(oe.cp,{uid:e.id,uri:e.uri,isPlayable:e.isPlayable,isMOGEFRestricted:e.is19PlusOnly,isExplicit:e.isExplicit,contextUri:i,name:e.name,imgUrl:e.album.imgUrl,index:a,album:e.album,artists:e.artists,usePlayContextItem:n});let oa=function(e){return e[e.SEARCH=0]="SEARCH",e[e.ALBUM=1]="ALBUM",e[e.ARTIST=2]="ARTIST",e[e.PODCAST=3]="PODCAST",e[e.PLAYLIST=4]="PLAYLIST",e[e.ALBUMRESULTS=5]="ALBUMRESULTS",e[e.ARTISTRESULTS=6]="ARTISTRESULTS",e[e.PODCASTRESULTS=7]="PODCASTRESULTS",e[e.EPISODERESULTS=8]="EPISODERESULTS",e[e.TRACKRESULTS=9]="TRACKRESULTS",e}({});const ca=(e,i)=>"GO_BACK"===i.type?1===e.breadcrumbs.length?e:e={...e,breadcrumbs:e.breadcrumbs.slice(0,e.breadcrumbs.length-1)}:"NAV_TO_ENTITY"===i.type?e={...e,breadcrumbs:[...e.breadcrumbs,i.level]}:("NAV_TO_RESULTS"===i.type?e={...e,breadcrumbs:[...e.breadcrumbs,i.level]}:"CHANGE_TERM"===i.type&&(e={term:i.term,breadcrumbs:[{navType:oa.SEARCH,term:i.term,title:""}]}),e),ma=({resultList:e,level:i,isRTL:a,playlistUri:t,navToResults:l,navToEntity:r,term:d})=>{let m=e;const u=(e=>e.filter((e=>e.type===De.p.TRACK||e.type===De.p.EPISODE)).map((({uri:e,id:i})=>({type:(0,o.wj)(e)?De.p.TRACK:De.p.EPISODE,uri:e,uid:i,provider:null}))))(e),{usePlayContextItem:p}=(0,ie.n)({uri:`${t.replace("spotify:","spotify:internal:recs:")}:${encodeURIComponent(d)}:${i?.navType??0}`,pages:[{items:u}]},{featureIdentifier:"search"}),v=(0,n.useCallback)(((e,i)=>(0,k.jsx)(ra,{isRTL:a,index:i,label:e.label,onClick:()=>{l({navType:e.type,term:d,title:e.label})}},e.uri)),[a,l,d]),S=(0,n.useCallback)(((e,i)=>e.type===De.p.ARTIST?(0,k.jsx)(la,{isRTL:a,index:i,searchResult:e,onClick:()=>{r({navType:oa.ARTIST,uri:e.uri,title:e.name})}},e.uri):e.type===De.p.EPISODE?(0,k.jsx)(sa,{index:i,episode:e,contextUri:t.replace("spotify:","spotify:internal:recs:"),usePlayContextItem:p},e.uri):e.type===De.p.TRACK?(0,k.jsx)(da,{index:i,track:e,contextUri:t.replace("spotify:","spotify:internal:recs:"),usePlayContextItem:p},e.uri):(0,k.jsx)(aa,{index:i,isRTL:a,searchResult:e,onClick:()=>{r({navType:oa.ALBUM,uri:e.uri,title:e.name})}},e.uri)),[a,r,t,p]);if(""===d)return(0,k.jsx)("div",{className:P.Z.emptySearchTermContainer});if(!e||0===e?.length)return(0,k.jsxs)("div",{className:P.Z.emptyStateContainer,children:[(0,k.jsx)(s.D,{as:"h1",variant:"canon",children:c.ag.get("search.empty-results-title",d)}),(0,k.jsx)(s.D,{as:"p",variant:"mesto",children:c.ag.get("search.empty-results-text")})]});if(i?.navType===oa.SEARCH){const i=[{type:oa.ARTISTRESULTS,label:c.ag.get("playlist.curation.see_all_artists"),uri:"spotify:internal:recs:see-all-artists"},{type:oa.ALBUMRESULTS,label:c.ag.get("playlist.curation.see_all_album"),uri:"spotify:internal:recs:see-all-albums"},{type:oa.TRACKRESULTS,label:c.ag.get("playlist.curation.see_all_songs"),uri:"spotify:internal:recs:see-all-songs"}];return m=e,(0,k.jsx)(Oi,{renderRow:S,searchResults:m,renderSeeAllRow:v,seeAllXList:i})}return i?.navType===oa.ALBUM?(0,k.jsx)(Bi,{renderRow:S,searchResults:m}):i?.navType===oa.ARTIST?(0,k.jsx)(Wi,{renderRow:S,searchResults:m}):i?.navType===oa.ALBUMRESULTS?(0,k.jsx)(Qi,{renderRow:S,searchResults:m}):i?.navType===oa.TRACKRESULTS?(0,k.jsx)(Ki,{renderRow:S,searchResults:m}):i?.navType===oa.ARTISTRESULTS?(0,k.jsx)(zi,{renderRow:S,searchResults:m}):null},ua=({playlistUri:e,onCurationModeChange:i})=>{const[a,t]=(0,n.useState)([]),[l,r]=(0,n.useState)(),d=(0,oi.S)(),{level:o,changeTerm:m,goBack:u,navToEntity:p,navToResults:v,term:S}=(()=>{const[e,i]=(0,n.useReducer)(ca,{term:"",breadcrumbs:[]}),{breadcrumbs:a,term:t}=e;return{changeTerm:e=>{i({type:"CHANGE_TERM",term:e})},level:a[a.length-1]||null,goBack:()=>{i({type:"GO_BACK"})},navToEntity:e=>{i({type:"NAV_TO_ENTITY",level:e})},navToResults:e=>{i({type:"NAV_TO_RESULTS",level:e})},term:t}})(),{request:h}=(0,n.useContext)(ci.Ax);return(0,n.useEffect)((()=>{let e=!0;return(async()=>{if(o)switch(o.navType){case oa.SEARCH:try{if(!l||l.query!==S&&""!==S){const i=await ji(h,S);e&&r(i)}else""===S&&t([])}catch{t([])}l&&t(l.topResults);break;case oa.ARTISTRESULTS:l&&t(l?.artists);break;case oa.ALBUMRESULTS:l&&t(l?.albums);break;case oa.TRACKRESULTS:l&&t(l?.tracks);break;case oa.EPISODERESULTS:l&&t(l?.episodes);break;case oa.ALBUM:try{const i=await Fi(h,o.uri,100,0);e&&i&&t(i.tracks)}catch{t([])}break;case oa.ARTIST:try{const i=await Ai(h,o.uri,100,0);e&&i&&t([...i.albums,...i.tracks])}catch{t([])}}})(),()=>{e=!1}}),[o,S,l,h]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("section",{className:P.Z.playlistInlineCurationSection,children:[(0,k.jsxs)("div",{className:P.Z.playlistInlineCurationWrapper,children:[(0,k.jsx)(s.D,{as:"h1",className:P.Z.playlistInlineCurationTitle,variant:"canon",children:c.ag.get("playlist.curation.title")}),(0,k.jsx)(n.Suspense,{fallback:null,children:(0,k.jsx)(Mi,{placeholder:c.ag.get("playlist.curation.search_placeholder"),onFocus:()=>{i(!0)},onChange:e=>{m(e)}})})]}),(0,k.jsx)("button",{className:P.Z.playlistInlineCurationCloseButton,onClick:()=>i(!1),children:(0,k.jsx)(ze.k,{"aria-label":c.ag.get("close")})})]}),null!==o&&o.navType!==oa.SEARCH?(0,k.jsxs)("button",{className:P.Z.playlistInlineCurationBackButton,onClick:()=>u(),children:[d?(0,k.jsx)(ri.V,{"aria-label":c.ag.get("navbar.go-back"),className:P.Z.icon}):(0,k.jsx)(di.e,{"aria-label":c.ag.get("navbar.go-back"),className:P.Z.icon}),(0,k.jsx)(s.D,{as:"p",variant:"cello",children:o.title})]}):null,(0,k.jsx)("div",{className:P.Z.searchResultListContainer,"data-testid":"playlist-inline-curation-results",children:(0,k.jsx)(ma,{playlistUri:e,term:S,level:o,resultList:a,navToEntity:p,navToResults:v,isRTL:d})})]})},ka=n.lazy((()=>Promise.all([a.e(1814),a.e(6639),a.e(7405)]).then(a.bind(a,86639)))),pa=n.lazy((()=>a.e(7427).then(a.bind(a,97245)))),va=n.lazy((()=>a.e(7427).then(a.bind(a,56359)))),Sa=n.lazy((()=>a.e(5457).then(a.bind(a,86226)))),ha=n.memo((function({playlist:e,capabilities:i}){const{metadata:{uri:a,name:u,images:p,totalLength:v,unfilteredTotalLength:S,isOwnedBySelf:j,isCollaborative:F,hasEpisodes:R,hasSpotifyTracks:D,canAdd:I,canRemove:E,canPlay:W,formatListData:$,hasDateAdded:ae,collaborators:te,isPublished:se},contents:{items:oe}}=e,{spec:ce,logger:me,UBIFragment:ue}=(0,re.fU)(d.T,{data:{uri:a}}),ke=(0,z.k)(),pe=(0,r.W6)(de.OC,{loadingValue:!1}),ve=n.useMemo((()=>ce.headerFactory()),[ce]),he=n.useMemo((()=>ce.tracklistFactory()),[ce]),ye="chart"===$?.type,ge="concert-playlist"===$?.type&&pe,Ne="live-streams"===$?.type,be=["blend","celebrity-blend","friends-mix"].indexOf($?.type||"")>-1,Ce=!!R,Te="artistsets"===$?.type||"this-is"===$?.attributes["editorial.series"],je=$?.attributes||{},Ae=je.header_image_url_desktop||je.image_url||null,Re=I&&E,{inlineCurationModeIsOn:De,handleInlineCurationModeChange:Ie}=((e,i)=>{const[a,t]=(0,n.useState)(e&&0===i),{scrollNodeChildRef:l}=(0,n.useContext)(Y.VX),s=(0,n.useRef)(a);return(0,n.useEffect)((()=>{const e=!s.current;l&&e&&a&&l.current?.scrollIntoView({block:"end",behavior:"smooth"}),s.current=a}),[l,a]),{inlineCurationModeIsOn:a,handleInlineCurationModeChange:e=>{t(e)}}})(Re,S),Ee=i.canFilter&&S>0,Le=i.canSort&&S>0,Ue=S>0,{productState:Pe}=(0,t.v9)(q.Gg),we=!!Pe&&parseInt(Pe.ads,10)>0,Ve=(0,t.I0)(),Me=(0,l.ur)(),Oe=(0,l.TH)(),We=(0,r.W6)(G.v8),Qe=(0,r.W6)(G.XP,{loadingValue:!1}),Ke=(0,r.W6)(de.NC,{loadingValue:!1}),ze=(0,r.W6)(G.wA,{loadingValue:!1}),Ze=(0,M.useThisisPlaylistExtensionQuery)({uri:a},{cacheTime:5*ee.y,enabled:Ke&&Te}).data?.playlistV2,He="Playlist"===Ze?.__typename?Ze.artistsOnTour?.[0]:null,Je="POP"!==Me?new URLSearchParams(Oe.search).get("uid"):null,[Ge,qe]=(0,A.Z)(a),Xe=(0,K.o)(),{filter:Ye}=(0,n.useContext)(w.fo),{sortState:$e}=(0,n.useContext)(V.Gb),ei=(0,n.useRef)(null),ii=(0,n.useRef)(null),[ai]=p,ni=(0,Z.Z)(null!==Ae?Ae:ai?.url||null),ti=n.useMemo((()=>ce.actionBarFactory()),[ce]),{isPlaying:si,isActive:ri,togglePlay:di,usePlayContextItem:oi}=(0,ie.n)((0,ne.U)(a,(0,_._j)($e),Ye),{featureIdentifier:"playlist"}),ci=(0,n.useCallback)((()=>{const e=(0,J.aK)({isPlaying:si,isActive:ri,spec:ti.playButtonFactory(),logger:me,uri:a});di({loggingParams:e})}),[si,ri,di,ti,me,a]),mi=(0,n.useCallback)((async()=>{Xe({targetUri:a,intent:Ge?"unsave":"save",type:"click"});try{await qe(!Ge)}catch{}}),[Ge,Xe,qe,a]),ui=(0,n.useCallback)((()=>{const e=ti.shareButtonFactory().hitShare({entityToBeShared:a,shareId:""});me.logInteraction(e)}),[ti,me,a]),ki=(0,n.useCallback)((()=>{let e;const i=ti.heartButtonFactory();e=Ge?i.hitUnfollow({itemToBeUnfollowed:a}):i.hitFollow({itemToBeFollowed:a}),me.logInteraction(e),mi()}),[ti,mi,Ge,me,a]),pi=(0,n.useCallback)((e=>{const i=e.split(/[\r\n]+/g).map((e=>(0,o.EC)(e))).filter((e=>(0,o.wj)(e)||(0,o.hn)(e)||(0,o.dB)(e)));if(i.length>0&&I){const e=i.map((e=>e.toURI())),n=ei.current?.getSelected()?.slice(-1)?.[0],t={after:n??"end"};Ve((0,m.jV)(a,e,t))}}),[I,Ve,a]);(0,H.aw)(pi);const vi=(0,n.useCallback)(((e,i)=>{const n=[...i[Q.a[o.JM.TRACK]]||[],...i[Q.a[o.JM.LOCAL_TRACK]]||[],...i[Q.a[o.JM.EPISODE]]||[],...i[Q.a[o.JM.ALBUM]]||[]];n.length>0&&I&&(me.logInteraction(ce.dragAddToPlaylist({playlist:a,itemToBeAdded:n[0]})),Ve((0,m.jV)(a,n)),Xe({targetUri:a,intent:"add",type:"drop"}))}),[I,me,ce,a,Ve,Xe]);return(0,k.jsxs)(n.Suspense,{fallback:null,children:[(0,k.jsx)(C.$,{children:(0,le.T5)({playlistName:u,userName:e.metadata.owner.displayName||"",isSpotifyOwned:"spotify"===e.metadata.owner.username})}),(0,k.jsx)(x.Z,{types:[Q.a[o.JM.TRACK],Q.a[o.JM.LOCAL_TRACK],Q.a[o.JM.EPISODE],Q.a[o.JM.ALBUM]],onDrop:vi,children:(0,k.jsxs)("section",{role:"presentation",className:P.Z.playlist,"data-testid":"playlist-page","data-test-uri":a,children:[(0,k.jsx)(xe.s,{metadata:e.metadata,isPlaying:si,isPublished:se,togglePlay:ci,backgroundColor:ni,spec:ve}),(0,k.jsxs)("div",{className:P.Z.playlistContent,children:[(0,k.jsxs)(y.o,{backgroundColor:ni,children:[(0,k.jsxs)(y.F,{children:[W?(0,k.jsx)(U.$,{onClick:ci,isPlaying:si,size:"lg",uri:a,ariaPlayLabel:c.ag.get("playlist.a11y.play",u),ariaPauseLabel:c.ag.get("playlist.a11y.pause",u)}):null,j&&D&&(0,k.jsx)(B.v,{uri:a,renderEnabled:()=>(0,k.jsx)(O.v,{uri:a})}),j?null:(0,k.jsx)(T.r,{children:(0,k.jsx)(g.H,{isAdded:!!Ge,onClick:ki,size:g.q.md})}),(0,k.jsx)(N.o,{uri:a,isFollowing:!!Ge,canDownload:Ue,onClick:(e,i)=>(0,J.l7)(i,ti.downloadButtonFactory(),me,a),onFollow:mi,size:N.q.md}),(0,k.jsx)(L.F,{property:G.bM,renderNewExperience:()=>e.metadata.permissions?.canAdministratePermissions&&ke?(0,k.jsx)(fe,{onClick:ui,label:c.ag.get("permissions.invite-collaborators",u),uri:a}):null}),(0,k.jsx)(X.y,{onShow:()=>(0,J.qq)(ti,me),menu:(0,k.jsx)(f.X,{uri:a,isPublished:se}),children:(0,k.jsx)(b.z,{label:c.ag.get("more.label.context",u)})}),Ee&&Le&&(0,k.jsx)(ue,{spec:ti,children:(0,k.jsx)(Fe,{metadata:e.metadata,tracklistDomRef:ii})})]}),We&&(0,k.jsx)(li,{})]}),(0,k.jsx)(n.Suspense,{fallback:null,children:(0,k.jsx)(pa,{formatListData:e.metadata.formatListData})}),He?.upcomingEventsCount?(0,k.jsx)(va,{artistConcertsUri:He.uri||"",artistImageUrl:He.imageUrl||"",artistName:He.title||"",spec:ce}):null,(0,k.jsxs)("div",{className:"contentSpacing",children:[we?(0,k.jsx)(h,{playlistUri:a}):null,Qe&&we?(0,k.jsx)(Sa,{playlistUri:a,playlistName:u}):null,e.metadata.hasSpotifyAudiobooks&&ze&&(0,k.jsxs)("div",{className:P.Z.noBooklistSupportContainer,children:[(0,k.jsx)(s.D,{variant:"cello",semanticColor:"textBase",children:"Available in your mobile app"}),(0,k.jsx)(s.D,{variant:"ballad",semanticColor:"textSubdued",children:"Audiobooks playlist are coming soon, text to be changed later."})]}),v>0&&(0,k.jsx)(n.Suspense,{fallback:null,children:(0,k.jsx)(ue,{spec:he,children:ye?(0,k.jsx)(Se,{ariaLabel:u,nrTracks:v,playlistUri:a,rankType:je.rank_type||"",scrollToUid:Je,usePlayContextItem:oi,tracklistDomRef:ii},a):(0,k.jsx)(_e,{ariaLabel:u,nrTracks:v,playlistUri:a,playlistName:u,hasDateAdded:ae,isCollaborative:F,isMixedMedia:Ce,isLive:Ne,isConcert:ge,isBlend:be,canEdit:Re,scrollToUid:Je,feedbackPath:je["dislike-endpoint"],deleteFeedbackPath:je["delete-endpoint"],usePlayContextItem:oi,tracklistRef:ei,tracklistDomRef:ii,nrCollaborators:te?.count,canRemove:E,spec:he,initialItems:oe},a)})}),j&&ke&&(0,k.jsx)(n.Suspense,{fallback:null,children:De?(0,k.jsx)(ua,{playlistUri:a,onCurationModeChange:Ie}):(0,k.jsx)("button",{className:P.Z.seeMore,onClick:()=>{Ie(!0)},children:(0,k.jsx)(s.D,{as:"div",variant:"mestoBold",children:c.ag.get("playlist.curation.find_more")})})}),Re&&!De&&ke?(0,k.jsx)(Be,{playlistUri:a,playlistLength:e.metadata.unfilteredTotalLength}):null]})]})]})})]})})),ya=n.memo((function({uri:e}){const i=(0,l.TH)(),a=(0,n.useContext)(ae.ZF).getCapabilities(),{isAnonymous:s}=(0,t.v9)(q.Gg),{isEnhanced:r}=(0,W.U)(e),{filter:d}=(0,n.useContext)(w.fo),{sortState:o}=(0,n.useContext)(V.Gb),{metadataOptions:m,contentsOptions:u}=(0,si.d)(o,d),p=(0,te.Z)(e,m,u);return(0,n.useEffect)((()=>{const a=new URLSearchParams(i.search).get("prid");if(!s&&a){const i=`https://spclient.wg.spotify.com/algotorial-sharing-service/v1/shared?playlistId=${e}&sharedEntityUri=${a}`;(0,se.k)().request(i,{method:"POST",authorize:!0,allowOffline:!0})}}),[e,s,i.search]),p?p.metadata.permissions&&!p.metadata.permissions.canView?(0,k.jsx)(I,{uri:e}):(0,k.jsx)(B.v,{uri:e,renderEnabled:()=>r?(0,k.jsx)(n.Suspense,{fallback:null,children:(0,k.jsx)(ka,{metadata:p.metadata,capabilities:a,featureIdentifier:"playlist"})}):(0,k.jsx)(ha,{playlist:p,capabilities:a}),renderDisabled:()=>(0,k.jsx)(ha,{playlist:p,capabilities:a})}):(0,k.jsx)(E.h,{hasError:!1,errorMessage:c.ag.get("error.not_found.title.playlist"),loadOffline:a.canModifyOffline})})),ga=()=>{const{playlistId:e}=(0,l.UO)(),i=(0,o.FW)((e||"").split("&")[0]).toURI();return(0,k.jsx)($.fd,{surface:$.Tg.PLAYLIST,uris:[i],children:(0,k.jsx)(V.kz,{uri:i,children:(0,k.jsx)(w.hz,{uri:i,children:(0,k.jsx)(ya,{uri:i})})})})}}}]);
|
|
//# sourceMappingURL=xpui-routes-playlist.js.map
|