dotfiles/.config/spicetify/Extracted/Themed/xpui/3706.js

2 lines
8.7 KiB
JavaScript
Executable File

"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[3706],{37120:(e,i,r)=>{r.d(i,{Z:()=>t});var s=r(24952),n=r(96768),a=r(4637);const t=({name:e,uri:i,images:r,isHero:t,testId:o,description:d,index:u,requestId:c,color:l})=>(0,a.jsx)(s.C,{index:u,featureIdentifier:"artist_concerts",headerText:e,uri:i,isPlayable:!1,renderCardImage:()=>(0,a.jsx)(n.x,{isHero:t,images:r,color:l}),renderSubHeaderContent:()=>(0,a.jsx)("span",{children:d||""}),testId:o,requestId:c})},84871:(e,i,r)=>{r.d(i,{q:()=>H});var s=r(50346),n=r(22548),a=r(24952),t=r(96768),o=r(20920),d=r(88794),u=r(4637);const c=({name:e="",uri:i="",images:r=[],isHero:s,onClick:n,testId:c,index:l})=>s?(0,u.jsx)(o.Z,{featureIdentifier:"unknown",index:l,onClick:n,headerText:e,uri:i,isPlayable:!1,renderCardImage:()=>(0,u.jsx)(t.x,{isHero:s,images:r}),renderSubHeaderContent:()=>(0,u.jsx)(d.k,{}),testId:c}):(0,u.jsx)(a.C,{index:l,featureIdentifier:"unknown",onClick:n,headerText:e,uri:i,isPlayable:!1,renderCardImage:()=>(0,u.jsx)(t.x,{isHero:s,images:r}),renderSubHeaderContent:()=>(0,u.jsx)("span",{}),testId:c});var l=r(40408),m=r(12741),x=r(28604),g=r(79823),I=r(37120),p=r(78677),C=r(87956),h=r(75523),j=r(3511),f=r(36876),y=r(58089),b=r(16500),k=r(22981);const H=({entity:e,index:i,testId:r,isHero:a=!1})=>{const t=((0,s.EC)(e.uri)||{}).type,o={testId:r,isHero:a,index:i,sharingInfo:e.sharingInfo};if(("string"==typeof e.uri||e.uri instanceof String)&&e.uri.startsWith("spotify:merch:"))return(0,u.jsx)(C.T,{...o,name:e.name,uri:e.uri,href:e.href,images:e.images,description:e.description});if(("string"==typeof e.uri||e.uri instanceof String)&&e.uri.startsWith("spotify:artist:")&&e.uri.endsWith(":concerts"))return(0,u.jsx)(I.Z,{...o,name:e.name,uri:e.uri,images:e.images,description:e.description});switch(t){case s.JM.ALBUM:case s.JM.COLLECTION_ALBUM:{const i=e;return(0,u.jsx)(x.r,{...o,name:i.name,uri:i.uri,images:i.images,artists:i.artists})}case s.JM.ARTIST:{const i=e;return(0,u.jsx)(g.I,{...o,name:i.name,uri:i.uri,images:i.images})}case s.JM.EPISODE:{const i=e;return(0,u.jsx)(p.B,{...o,name:i.name,uri:i.uri,images:i.images,showImages:i.show?.images||[],durationMilliseconds:i.duration_ms,releaseDate:i.release_date,resume_point:i.resume_point,description:i.description,isExplicit:i.explicit,is19PlusOnly:!!i.tags?.includes("MOGEF-19+")})}case s.JM.PLAYLIST:case s.JM.PLAYLIST_V2:{const i=e,r=i.owner?.display_name||e.owner?.displayName||"";return(0,u.jsx)(h.Z,{...o,name:i.name,uri:i.uri,images:i.images,description:i.description,authorName:r})}case s.JM.PROFILE:return(0,u.jsx)(j.P,{...o,name:e.name,uri:e.uri,images:e.images});case s.JM.SHOW:{const i=e;return(0,u.jsx)(y._,{...o,name:i.name,uri:i.uri,images:i.images,publisher:i.publisher,mediaType:{audio:m.E.AUDIO,video:m.E.VIDEO,mixed:m.E.MIXED}[i.media_type]??m.E.AUDIO})}case s.JM.APPLICATION:return(0,u.jsx)(n.s,{...o,name:e.name,uri:e.uri,images:e.images,description:e.description});case s.JM.RADIO:return(0,u.jsx)(f.I,{testId:r,index:i,name:e.name,uri:e.uri,images:e.images});case s.JM.TRACK:{const i=e;return(0,u.jsx)(b.G,{...o,name:i.name,uri:i.uri,images:i.album?.images||[],artists:i.artists,album:i.album,isExplicit:i.explicit,is19PlusOnly:i.tags?.includes("MOGEF-19+")})}case s.JM.COLLECTION:return e.uri.endsWith("your-episodes")?(0,u.jsx)(k.T,{index:i}):(0,u.jsx)(l.p,{index:i});default:return console.warn("Rendering a generic Card for unknown type:",t),(0,u.jsx)(c,{...o,name:e.name,uri:e.uri,images:e.images})}}},22548:(e,i,r)=>{r.d(i,{s:()=>u});var s=r(3802),n=r(24952),a=r(96768),t=r(20920),o=r(88794),d=r(4637);const u=({name:e,uri:i,images:r,isHero:u,onClick:c,testId:l,description:m,index:x,requestId:g,color:I})=>u?(0,d.jsx)(t.Z,{featureIdentifier:"genre",index:x,onClick:c,headerText:e,uri:i,isPlayable:!1,renderCardImage:()=>(0,d.jsx)(a.x,{isHero:u,images:r,color:I}),renderSubHeaderContent:()=>(0,d.jsx)(o.k,{children:m||s.ag.get("card.tag.genre")}),testId:l,requestId:g}):(0,d.jsx)(n.C,{index:x,featureIdentifier:"genre",onClick:c,headerText:e,uri:i,isPlayable:!1,renderCardImage:()=>(0,d.jsx)(a.x,{isHero:u,images:r,color:I}),renderSubHeaderContent:()=>(0,d.jsx)("span",{children:m||""}),testId:l,requestId:g})},87956:(e,i,r)=>{r.d(i,{T:()=>t});var s=r(24952),n=r(96768),a=r(4637);const t=({name:e,uri:i,href:r,images:t,isHero:o,testId:d,description:u,index:c,requestId:l,color:m})=>(0,a.jsx)(s.C,{index:c,featureIdentifier:"merch",onClick:()=>{window.open(r,"_blank")},headerText:e,uri:i,isPlayable:!1,renderCardImage:()=>(0,a.jsx)(n.x,{isHero:o,images:t,color:m}),renderSubHeaderContent:()=>(0,a.jsx)("span",{children:u||""}),testId:d,requestId:l,delegateNavigation:!0})},3511:(e,i,r)=>{r.d(i,{P:()=>x});var s=r(59496),n=r(74991),a=r(3802),t=r(54299),o=r(24952),d=r(96768),u=r(20920),c=r(88794),l=r(68776),m=r(4637);const x=s.memo((function(e){const{images:i,name:r,uri:x,onClick:g,isHero:I,testId:p,index:C,requestId:h,color:j}=e;let f;const y=(0,s.useCallback)((()=>(0,m.jsx)(d.x,{isCircular:!0,isHero:I,images:i,color:j,FallbackComponent:e=>(0,m.jsx)(n.a,{iconSize:64,...e})})),[j,i,I]),b=(0,s.useCallback)((()=>I?(0,m.jsx)(c.k,{children:a.ag.get("card.tag.profile")}):a.ag.get("card.tag.profile")),[I]);return f=I?(0,m.jsx)(u.Z,{index:C,onClick:g,headerText:r,featureIdentifier:"profile",uri:x,isPlayable:!1,renderCardImage:y,renderSubHeaderContent:b,testId:p,requestId:h}):(0,m.jsx)(o.C,{index:C,onClick:g,headerText:r,featureIdentifier:"profile",uri:x,isPlayable:!1,renderCardImage:y,renderSubHeaderContent:b,testId:p,requestId:h}),(0,m.jsx)(t._,{menu:(0,m.jsx)(l.I,{uri:x}),children:f})}))},52543:(e,i,r)=>{r.d(i,{h:()=>p});var s=r(28604),n=r(79823),a=r(79351),t=r(84871),o=r(78677),d=r(22548),u=r(75523),c=r(3511),l=r(58089),m=r(16500),x=r(9374),g=r(72171),I=r(4637);const p=({entity:e,index:i,testId:r,onClick:p,isHero:C=!1})=>{const h=(0,g.E)();switch(e.type){case x.p.ALBUM:return(0,I.jsx)(s.r,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.images,artists:e.artists,year:e.year,sharingInfo:null,requestId:e.requestId,color:e.color},e.uri);case x.p.ARTIST:return(0,I.jsx)(n.I,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color},e.uri);case x.p.AUDIOBOOK:return(0,I.jsx)(a.c,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.images,authorName:e.authorName,requestId:e.requestId,color:e.color,gatedContentAccessReason:e.gatedContentAccessReason},e.uri);case x.p.EPISODE:return(0,I.jsx)(o.B,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.images,showImages:e.show?.images||[],durationMilliseconds:e.duration.milliseconds,releaseDate:e.release.date,resume_point:null,description:e.description,isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly,sharingInfo:null,requestId:e.requestId,color:e.color},e.uri);case x.p.GENRE:return(0,I.jsx)(d.s,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color},e.uri);case x.p.PLAYLIST:return(0,I.jsx)(u.Z,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.images,description:"",authorName:e.owner.displayName,requestId:e.requestId,color:e.color},e.uri);case x.p.USER:return(0,I.jsx)(c.P,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color},e.uri);case x.p.SHOW:return(0,I.jsx)(l._,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.images,publisher:e.publisher,sharingInfo:null,requestId:e.requestId,color:e.color},e.uri);case x.p.TRACK:return(0,I.jsx)(m.G,{testId:r,onClick:p,isHero:C,index:i,name:e.name,uri:e.uri,images:e.album?.images||[],artists:e.artists,album:h?null:e.album,isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly,sharingInfo:null,requestId:e.requestId,isLyricsMatch:e.isLyricsMatch,color:e.color},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,I.jsx)(t.q,{testId:r,onClick:p,isHero:C,index:i,entity:e})}}},92211:(e,i,r)=>{r.d(i,{q:()=>c});var s=r(83680),n=r(3802),a=r(52543);const t="x-searchHistoryEntries-searchHistoryEntry",o="x-searchHistoryEntries-clearSingleSearchHistory",d="x-searchHistoryEntries-clearSingleSearchHistoryButton";var u=r(4637);const c=({entity:e,index:i,clearSearchHistory:r})=>(0,u.jsxs)("div",{className:t,children:[(0,u.jsx)(a.h,{entity:{...e,requestId:void 0},index:i}),(0,u.jsx)("div",{className:o,children:(0,u.jsx)("button",{className:d,onClick:()=>r(e.uri),"aria-label":n.ag.get("remove"),children:(0,u.jsx)(s.k,{iconSize:16})})})]},e.uri)},73616:(e,i,r)=>{r.d(i,{Z:()=>s});const s={searchPageGrid:"search-recentSearches-searchPageGrid",narrowPage:"search-recentSearches-narrowPage"}}}]);
//# sourceMappingURL=3706.js.map