Files
dotfiles/.config/spicetify/Extracted/Themed/xpui/xpui-routes-concert.js
T
2024-05-05 19:02:45 +02:00

2 lines
44 KiB
JavaScript
Executable File

"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[7288],{4576:(e,i,n)=>{n.d(i,{T:()=>u});var t=n(50959),a=n(82187),s=n.n(a),l=n(40763),r=n(85648),o=n(55842),d=n(74713);const c="pvGZ831aNzHTQMZ8CA_u";var m=n(11527);const u=(0,t.memo)((function({onClick:e=(()=>{}),size:i,className:n,uri:a,sharingInfo:u,interactionData:k,ariaLabel:v=r.ag.get("mwp.list.item.share"),condensedAll:g}){const{onCopyLink:h}=(0,d.y)({sharingInfo:u,uri:a,interactionData:k}),x=(0,t.useCallback)((()=>{h(),e()}),[e,h]);return(0,m.jsx)(o.E,{ariaLabel:v,size:i,onClick:x,className:s()(c,n),icon:l.M,condensedAll:g,condensed:!0})}))},29390:(e,i,n)=>{n.d(i,{w:()=>y});var t=n(50959),a=n(82187),s=n.n(a),l=n(43183),r=n.n(l),o=n(69736),d=n(77581);n(86277);const c=/(\((?:[0-9]{1,3}:){1,2}[0-9]{2}\))/g;var m=n(60046),u=n(11527);const k=/((?:(?: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,v=/^https?:\/\//;function g(e){return"string"==typeof e?(0,u.jsx)(u.Fragment,{children:e.split(k).map(((e,i)=>i%2?(0,u.jsx)(m.Link,{to:`${v.test(e)?"":"https://"}${e}`,children:e},i):e))}):e}const h="playlist-playlist-heading",x="playlist-playlist-playlistDescription",N="playlist-playlist-list",S="playlist-playlist-listItem",p="playlist-playlist-paragraph",y=t.memo((function({html:e,onTimeStampClick:i,enableTimestamps:n=!1,enableAutomaticLinkification:a=!1,semanticColor:l="textSubdued",className:o,asTextContent:d=!1}){const m=(0,t.useMemo)((()=>{const t=n?e.split(c).map((e=>e.match(c)?`(<time>${e.replace("(","").replace(")","")}</time>)`:e)).join(""):e;let s;try{s=r()(t,{transform:j(i,l,a,d),dangerouslySetChildren:[]})}catch{s=e}return s}),[n,a,e,i,l,d]);return(0,u.jsx)("div",{className:s()(x,o),children:m})}));function j(e=(()=>{}),i,n,a){let s=0;const l={_:(e,i,l)=>{const r=void 0===i?e:l;return(0,u.jsx)(t.Fragment,{children:n&&!a?g(r):r},"fragment"+s++)}};if(a)return l;return{...l,p:e=>(0,u.jsx)(o.x,{as:"p",variant:"bodyMedium",semanticColor:i,className:p,children:n?g(e.children):e.children}),a:i=>i.href?.startsWith("#t=")?(0,u.jsx)(d.E,{onClick:e,children:i.children}):i.href?(0,u.jsx)(m.Link,{to:i.href,children:i.children}):(0,u.jsx)(u.Fragment,{children:i.children}),ul:e=>(0,u.jsx)("ul",{className:N,children:e.children}),ol:e=>(0,u.jsx)("ol",{className:N,children:e.children}),li:e=>(0,u.jsx)(o.x,{as:"li",variant:"bodyMedium",semanticColor:i,className:S,children:n?g(e.children):e.children}),br:()=>(0,u.jsx)("br",{}),h1:e=>(0,u.jsx)(o.x,{as:"h1",variant:"bodyMediumBold",semanticColor:i,className:h,children:e.children}),h2:e=>(0,u.jsx)(o.x,{as:"h2",variant:"bodyMediumBold",semanticColor:i,className:h,children:e.children}),h3:e=>(0,u.jsx)(o.x,{as:"h3",variant:"bodyMediumBold",semanticColor:i,className:h,children:e.children}),h4:e=>(0,u.jsx)(o.x,{as:"h4",variant:"bodyMediumBold",semanticColor:i,className:h,children:e.children}),h5:e=>(0,u.jsx)(o.x,{as:"h5",variant:"bodyMediumBold",semanticColor:i,className:h,children:e.children}),h6:e=>(0,u.jsx)(o.x,{as:"h6",variant:"bodyMediumBold",semanticColor:i,className:h,children:e.children}),time:i=>(0,u.jsx)(d.E,{onClick:e,children:i.children})}}},25847:(e,i,n)=>{n.d(i,{Z:()=>S});var t=n(50959),a=n(69736),s=n(60702),l=n(60046),r=n(56146),o=n(5863);const d="MUiWCNTfb6FcSwVPvQ1V",c="UAk3bMhekwJTV_wIyfsT",m="X9w6LPfKsZHMCs38sVIQ",u="NXn5KjeUOjLGlAfS1Gao",k="N0wgFMDDvCiby4QB5kLJ",v="nloNe2BLRHjz9dxlwfLU",g="FyD0hF1e2PKzRxQ6sYDQ",h="JzXND83mXvcEuntCNR34",x="GR08E4L_rOGljyQQX30R";var N=n(11527);const S=(0,t.memo)((e=>{const{uri:i,title:n,imageUrl:t,date:S,location:p,firstParty:y,onClick:j}=e,f=(0,o.CH)(S);return(0,N.jsxs)(l.Link,{to:i,className:d,"data-testid":"concert-card",onClick:j,children:[t&&(0,N.jsx)(r.Z,{children:(0,N.jsx)("div",{role:"img",className:x,style:{backgroundImage:`linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, rgba(6, 6, 6, 0.6) 60%, rgba(0, 0, 0, 0.7) 100%), url(${t})`}})}),(0,N.jsx)("time",{className:c,dateTime:S,children:(0,N.jsx)(a.x,{as:"div",variant:"bodySmallBold",children:(0,o.jx)(f)})}),(0,N.jsxs)("div",{className:m,dir:"auto",children:[(0,N.jsx)(a.x,{as:"p",className:h,variant:"bodySmall",children:[(0,o.FO)(f),(0,o.hK)(f)].join(" • ")}),(0,N.jsx)(a.x,{as:"h2",variant:"bodyMediumBold",className:u,children:n}),(0,N.jsxs)("div",{className:k,children:[y&&(0,N.jsx)("span",{className:g,children:(0,N.jsx)(s.V,{size:"small"})}),(0,N.jsx)(a.x,{as:"span",className:v,variant:"bodySmall","data-testid":"location-name",children:p})]})]})]})}))},88993:(e,i,n)=>{n.d(i,{Z:()=>c});var t=n(50959),a=n(11317),s=n(85648),l=n(50554),r=n(43827),o=n(25847),d=n(11527);const c=(0,t.memo)((e=>{const{concert:i,isVirtual:n,onClick:t}=e,{venue:c,location:m}=i,u=i.artists[0];return(0,d.jsx)(o.Z,{uri:(0,a.g3)(i.id).toURI(),title:(0,r.ij)(i),imageUrl:u.imageUri,date:i.startDate.localDate,location:n?c:[c,m].join(s.ag.getSeparator()),firstParty:(0,l.$R)(i),onClick:t})}))},50554:(e,i,n)=>{n.d(i,{$R:()=>o,DF:()=>u,Vv:()=>c,ie:()=>k,k9:()=>r,pm:()=>m,sk:()=>d,yI:()=>s});n(46758),n(39301);var t=n(44242),a=n(16012);const s=(e,i)=>{if(!e)return"/concerts";const n=i?.normalize().replaceAll(/\W+/g,"-");return n?`/concerts/location/${e}-${n}`:`/concerts/location/${e}`},l=10;function r(e){if(0===e.length)return[];if(0===e[0].events.length)return[];const i=[];let n={date:e[0].events[0].openingDate.slice(0,l),events:[]};for(const t of e)for(const e of t.events){const t=e.openingDate.slice(0,l);n.date!==t&&(i.push(n),n={date:t,events:[]}),n.events.push(e)}return i.push(n),i}const o=e=>e.ticketers.some((e=>"spotify"===e.partnerDisplayName.toLowerCase())),d=e=>e.concerts.some((({concert:e})=>o(e))),c=e=>{const i=new Date(e);i.setDate(e.getDate()+(6-e.getDay()));const n=new Date(i);return n.setDate(i.getDate()+1),{from:i,to:n}},m=e=>{const i=new Date(e);i.setDate(e.getDate()+(6-e.getDay()));const n=new Date(i);n.setDate(i.getDate()+7);const t=new Date(n);return t.setDate(n.getDate()+1),{from:n,to:t}},u=(e,i)=>!!(e?.from&&e?.to&&i?.from&&i?.to)&&((0,t.K)(e.from,i.from)&&(0,t.K)(e.to,i.to)),k=e=>(0,a.c)(e,{representation:"date"})},14755:(e,i,n)=>{n.d(i,{w:()=>r});var t=n(41194),a=n(13188),s=n(70867);const l=e=>{const[i,{username:n,concertUri:t}]=e.queryKey;return(async(e,i)=>{const n=await(0,s.A0)(a.b.getInstance(),e,i);return n.body?.found[0]})(n,t)},r=e=>{const i=["concertInCollection",e];return(0,t.a)({queryKey:i,queryFn:l,retry:!1,enabled:!!e.username})}},74806:(e,i,n)=>{n.r(i),n.d(i,{default:()=>Pi});var t=n(50959),a=n(10226),s=n(17676),l=n(41194),r=n(35869),o=n(75802),d=n(85648),c=n(91643),m=n(14755),u=n(87350),k=n(13188),v=n(70867),g=n(69736),h=n(51164),x=n(37335),N=n(41038),S=n(97922),p=n(81639),y=n(16118),j=n(98716),f=n(80626),F=(n(86277),n(82187)),C=n.n(F),b=n(6370),_=n(6487),D=n(27376),I=n(97013),w=n(4576),M=n(20580),P=n(6807),U=n(45438),T=n(94452),A=n(2017),L=n(76281),B=n(11527);const R=t.memo((function({uri:e}){const{spec:i}=(0,T.T)(e);return(0,B.jsx)(U.JL,{value:"concert",children:(0,B.jsxs)(P.v,{children:[(0,B.jsx)(A.q,{children:(0,B.jsx)(L.Jx,{spec:i,uri:e,displayText:d.ag.get("context-menu.copy-concert-link")})}),(0,B.jsx)(L.h$,{spec:i,uri:e})]})})}));var E=n(12618),V=n(60046);const z=(0,t.memo)((e=>{const{locationName:i,latitude:n,longitude:t,onClick:a}=e,s=new URL("https://maps.google.com/");return s.searchParams.set("q",i),n&&t&&s.searchParams.set("ll",`${n},${t}`),(0,B.jsx)("a",{href:s.href,target:"_blank",onClick:()=>a?.(s.href),children:(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",children:i})})}));var O=n(19039),K=n(5863),W=n(72228),$=n(13734),q=n(85039),Y=n(3533),Z=n(77725);const Q="JRuVlk6wpKk6ok7zuW6l",G="YpfopxY2udneDY34uzRN",J="KI_0F1jtTR5tWgl7gZ1E",H="gKtc3TdowDTXBaVESi1D",X="V8TIr8yJq4tYZfPEzm12",ee="rWFRSaU8daVvtbWEjvp7",ie="VvL91cIRcCi1hJh0K845",ne="vKcnOO1GNYoLKHg4T4lK",te="LdW0YNvo_Y77hgqhL4zY",ae="cTkykhjfHxkEGKbxSxXw",se="MaK8gvvxEqNafaMwXWWM",le="XgeTnLs82tTjczDR6oKn",re="P3fE7wn6Tqnibn3gljKV",oe="b3qjYcKXwrvfkQkOLMhZ",de="A8LG_5Dvp7IiXDtdR571",ce="O0PSSw8ttrMn9lzq_L16",me="D_ffrfn62aOgZKOFfZVr",ue="OH4mOZCual2ejIodzIkL",ke="se_ixDV6hBf7lve861oU",ve="YDAJHPP5lDmg71SdvJZC",ge="lKQxSRsi8KcoYx5D7mjh",he="LUMel_X4gQK0J1i6X0sC",xe="rvw6x7R5AiAT48dSkFl9",Ne="eIA_y6wnyKS7F4BkMraV",Se="CKbduoHBINBakBcguVzi",pe="oCmeNmHdfNzMD6n4mSqw",ye="l6M4kfGer7xxBaIPco5p",je="r5hQwOq0RGo1ptvIthJ0",fe="HRKlEfCQE6VjdRRg0NRf",Fe="GWAqJBkan0flx0gBI92h",Ce="YDoK0ksaHmDfScvMhW4l",be=(0,t.memo)((e=>{const{soldOut:i,futureSaleDate:n,firstParty:t,onRemindMe:a}=e;return i?null:n?(0,B.jsx)(Y.D,{className:Ne,size:"small",onClick:a,children:d.ag.get("concerts.remind_me")}):(0,B.jsx)(Y.D,{className:Ne,iconTrailing:Z.h,size:"small",children:t?d.ag.get("concert_buy_tickets"):d.ag.get("concert_find_tickets")})})),_e=(0,t.memo)((e=>{const{saleType:i,soldOut:n,futureSaleDate:t,minPrice:a,firstParty:s}=e;if(n)return(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textSubdued",className:je,children:d.ag.get("concerts.soldout")});if(t)return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:pe,children:d.ag.get("concerts.tickets_on_sale_soon")}),(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:Fe,children:d.ag.get("concerts.ticket_date_time",(0,K.xE)(t),(0,K.hK)(t))})]});const l={"on-sale":d.ag.get("concerts.on_sale"),presale:d.ag.get("concerts.presale")};return(0,B.jsxs)(B.Fragment,{children:[l[i]&&(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:pe,children:l[i]}),s&&a&&(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:Se,children:d.ag.get("concerts.ticket_price",a)})]})})),De=(0,t.memo)((e=>{const{ticketListSpec:i,providerName:n,providerImageUrl:a,url:s,position:l,onRemindMe:r}=e,o=(0,f.$P)(),d=(0,$.o)(),c=(0,t.useMemo)((()=>i?.ticketProviderCellFactory({identifier:n,position:l,uri:s})),[i,n,l,s]),m=(0,f.Wi)(c),u=new Date,k=e.saleStartDate&&new Date(e.saleStartDate),v=e.saleEndDate&&new Date(e.saleEndDate),h=e.soldOut||v&&u>v||!1,x=k&&k>u?k:void 0,N="spotify"===n.toLowerCase(),S=(0,t.useCallback)((()=>{const e=c?.hitNavigateToExternalUri({destination:s});e&&o.logInteraction(e),d({targetUri:s,intent:"find-concert",type:"click"})}),[c,o,d,s]),p=x?void 0:s;return(0,B.jsxs)("a",{ref:m,href:p,target:"_blank",onClick:S,className:le,children:[(0,B.jsx)("div",{className:re,children:(0,B.jsx)(q.Ee,{loading:"eager",src:a,height:"100%",width:"100%",className:oe,children:(0,B.jsx)(W.i,{className:de,size:"medium"})})}),(0,B.jsxs)("div",{className:ce,children:[(0,B.jsxs)("div",{dir:"auto",className:ye,children:[(0,B.jsx)(_e,{saleType:e.saleType,soldOut:h,futureSaleDate:x,minPrice:e.minPrice,firstParty:N}),(0,B.jsx)(g.x,{as:"p",semanticColor:"textSubdued",children:n})]}),(0,B.jsx)(be,{soldOut:h,futureSaleDate:x,firstParty:N,onRemindMe:r})]})]})})),Ie=(0,t.memo)((e=>{const{ticketListSpec:i,providerName:n,url:a,position:s}=e,l=(0,f.$P)(),r=(0,$.o)(),o=(0,t.useMemo)((()=>i?.ticketProviderCellFactory({identifier:n,position:s,uri:a})),[i,n,s,a]),c=(0,f.Wi)(o),m=(0,t.useCallback)((()=>{const e=o?.hitNavigateToExternalUri({destination:a});e&&l.logInteraction(e),r({targetUri:a,intent:"find-concert",type:"click"})}),[o,l,r,a]);return(0,B.jsxs)("a",{href:a,className:le,onClick:m,target:"_blank",ref:c,children:[(0,B.jsx)("div",{className:re,children:(0,B.jsx)(W.i,{className:de,size:"medium"})}),(0,B.jsxs)("div",{className:ce,children:[(0,B.jsx)("div",{dir:"auto",className:ye,children:(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:pe,children:d.ag.get("concerts.on_sale")})}),(0,B.jsx)(Y.D,{className:Ne,iconTrailing:Z.h,size:"small",children:d.ag.get("concert_find_tickets")})]})]})})),we=(0,t.memo)((e=>{const{concert:i,ticketAvailabilityTranslated:n,entitySpec:l,isConcertSaved:r,isAnonymous:o}=e,{enqueueSnackbar:c}=(0,O.D)(),m=(0,K.CH)(i.date),u=`spotify:concert:${i.id}`,h=(0,t.useMemo)((()=>l.ticketProviderListFactory()),[l]),x=(0,f.$P)(),N=(0,f.Wi)(h),S=(0,t.useMemo)((()=>l.interestedButtonFactory()),[l]),p=(0,f.Wi)(S),y=(0,t.useMemo)((()=>l.shareEventButtonFactory({uri:u})),[l,u]),j=(0,f.Wi)(y),[F,P]=(0,t.useState)(r),U=(0,a.W6)(s.tpg),T=1===i.ticketers.length&&"Spotify"===i.ticketers[0].partnerDisplayName,A=!!i.ticketers[0].endDate&&(i.ticketers[0].soldOut||(0,K.OF)(i.ticketers[0].endDate?.localDate)),L=T&&A&&i.ticketers[0].partnerURL;if(0===i.ticketers.length)return null;if((0,K.OF)(i.date))return(0,B.jsxs)("div",{className:te,children:[(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",children:d.ag.get("concert_event_ended")}),(0,B.jsx)(g.x,{variant:"bodyMedium",children:(0,B.jsx)(V.default,{to:"spotify:concerts",children:d.ag.get("concert_past_message")})})]});const W=()=>{const e=S.hitUiElementToggle();x.logInteraction(e),(0,v.l7)(k.b.getInstance(),i.id),c(d.ag.get("concerts_added-to-your-saved-events")),x.logInteraction(S.hitAddInterest()),P(!0)};return(0,B.jsxs)("div",{className:te,ref:N,children:[(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",className:fe,children:"ONLINE"===i.category?(0,B.jsx)("span",{children:i.venue}):(0,B.jsx)(z,{locationName:[i.venue,i.location].join(d.ag.getSeparator()),onClick:e=>{const i=l.venueMapLinkFactory().hitNavigateToExternalUri({destination:e});x.logInteraction(i)}})}),(0,B.jsxs)(g.x,{as:"h3",variant:"bodySmall",className:ve,children:[(0,K.xE)(m)," • ",(0,K.hK)(m)]}),n&&(0,B.jsx)(g.x,{as:"h3",className:ne,variant:"bodySmall",children:n}),(0,B.jsxs)("div",{className:Q,children:[!o&&U&&(0,B.jsx)(E.ws,{label:d.ag.get("concerts_interested_tooltip"),placement:"top-end",children:(0,B.jsx)(b.P,{size:"small",iconLeading:F?_.N:D.S,className:C()(he,{[xe]:F}),onClick:()=>{const e=S.hitUiElementToggle();x.logInteraction(e),F?((0,v.FB)(k.b.getInstance(),i.id),c(d.ag.get("concerts_removed-from-your-saved-events")),x.logInteraction(S.hitRemoveInterest())):((0,v.l7)(k.b.getInstance(),i.id),c(d.ag.get("concerts_added-to-your-saved-events")),x.logInteraction(S.hitAddInterest())),P(!F)},ref:p,children:d.ag.get("concerts_interested")})}),(0,B.jsx)("div",{ref:j,children:(0,B.jsx)(w.T,{uri:u,sharingInfo:null,interactionData:{intent:"share",type:"click"},onClick:()=>{x.logInteraction(l.shareEventButtonFactory({uri:u}).hitShare({entityToBeShared:u,shareId:i.id}))},className:Ce,ariaLabel:d.ag.get("concerts_share_with_friends")})}),(0,B.jsx)(M.yj,{menu:(0,B.jsx)(R,{uri:u}),onShow:()=>{const e=l.contextMenuButtonFactory().hitUiReveal();x.logInteraction(e)},children:(0,B.jsx)(I.z,{size:I.q.md})})]}),(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",children:d.ag.get("concert.header.available_tickets_from")}),(0,B.jsxs)("div",{className:ae,children:[i.ticketers.map(((e,i)=>(0,B.jsx)(De,{concertUri:u,position:i,url:e.url,providerName:e.partnerDisplayName,providerImageUrl:e.imageURL,saleType:e.type,soldOut:e.soldOut,saleStartDate:e.startDate?.localDate,saleEndDate:e.endDate?.localDate,minPrice:e.minPrice,ticketListSpec:h,onRemindMe:W},e.url))),L&&i.ticketers[0]?.partnerURL&&(0,B.jsx)(Ie,{url:i.ticketers[0].partnerURL,providerName:i.ticketers[0].partnerDisplayName,position:i.ticketers.length,ticketListSpec:h},i.ticketers[0].partnerURL)]})]})}));n(46758),n(27082);var Me=n(72543),Pe=n(70930),Ue=n(91991),Te=n(56146);const Ae="eDtH0zY130pQDgDZ4CPX",Le="bnxKFmECExdcmyBXx9f_",Be="alGaeB59BYqDPQkX0woz",Re="UrPgHWUndGwAWPfONuwd",Ee="pF2W693VDIpPdVTVCsDg",Ve="YGVuy3Qzaam0CJPc_s4K",ze="r5Kj2xQVLHK0hf_J00US",Oe="qCN2f5PHVrzAPLvQ0lNc",Ke=(0,t.memo)((e=>{const{imageUri:i,name:n,uri:t,headliner:l,onClick:r}=e,o=(0,a.W6)(s.WDb),c=(0,B.jsxs)(V.Link,{to:t,className:C()(Le,{[Be]:!o}),onClick:r,children:[i?(0,B.jsx)(Te.Z,{children:(0,B.jsx)("div",{"data-testid":"image-container",className:Oe,style:{backgroundImage:`linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, rgba(18, 18, 18, 0.5) 50.52%, rgba(18, 18, 18, 0.7) 100%), url(${i})`}})}):null,(0,B.jsxs)("div",{className:Re,children:[l&&(0,B.jsx)("div",{className:Ve,children:(0,B.jsx)(g.x,{as:"h4",variant:"bodySmallBold",className:ze,children:d.ag.get("concert.label.headliner")})}),(0,B.jsx)(g.x,{as:"h2",variant:"titleMedium",className:Ee,children:n})]})]});return o?(0,B.jsx)("div",{className:Ae,children:c}):c})),We=Ke,$e=(0,t.memo)((e=>{const{artist:i,albums:n,position:a,lineupArtistsSpec:s}=e,l=(0,t.useMemo)((()=>s.artistRowFactory({position:a,uri:i.uri})),[s,a,i.uri]),r=(0,f.$P)(),o=0===a,c=`${(0,Ue.GJ)(i.id)}:discography`;return(0,B.jsx)(U.JL,{value:"headered-grid",index:a,children:(0,B.jsx)(f.Nh,{spec:l||null,children:(0,B.jsx)(Pe.P,{title:o?d.ag.get("concert_lineup"):"",total:n.length+2,seeAllUri:c,seeAllLabel:d.ag.get("artist-page.show-discography"),onClickShelfSeeAll:()=>{const e=l.seeDiscographyLinkFactory().hitUiNavigate({destination:c});r.logInteraction(e)},removeOffsetMargin:!0,children:[(0,B.jsx)(We,{uri:i.uri,name:i.name,imageUri:i.imageUri,headliner:o,onClick:()=>{const e=l.artistCardFactory().hitUiNavigate({destination:i.uri});r.logInteraction(e)}},`ConcertArtistCard-${i.id}`),null,...n.map(((e,n)=>(0,B.jsx)(Me.r,{index:n,artists:[{uri:i.uri,name:i.name}],images:[{url:e.imageUri,width:100,height:100}],name:e.name,uri:e.uri,sharingInfo:null},e.uri)))]})})},i.uri)})),qe=(0,t.memo)((e=>{const{albums:i,artists:n,entitySpec:a}=e,s=(0,t.useMemo)((()=>a.lineupArtistsFactory()),[a]),l=(0,f.Wi)(s),r=(0,t.useMemo)((()=>{const e={};return i.forEach((i=>{const n=i.artistName;e[n]?e[n].push(i):e[n]=[i]})),e}),[i]);return(0,B.jsx)("div",{className:me,ref:l,"data-testid":"concert-lineup",children:n.map(((e,i)=>(0,B.jsx)($e,{artist:e,albums:r[e.name]||[],position:i,lineupArtistsSpec:s},e.uri)))})}));var Ye=n(36353);const Ze="y4xsX4QR_wfM40vOhsQ4",Qe="TPdGbM0PhSqxmhkxP9n2",Ge="y33j8HV43EGq3BPkZrLA",Je=(0,t.memo)((e=>(0,B.jsxs)(V.Link,{to:"spotify:concerts",className:Ze,onClick:e.onClick,children:[(0,B.jsx)(Te.Z,{children:(0,B.jsx)("div",{className:Ge,style:{backgroundImage:"linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, rgba(18, 18, 18, 0.5) 50.52%, rgba(18, 18, 18, 0.7) 100%), url(https://concerts.spotifycdn.com/ConcertHubCard.png)"}})}),(0,B.jsx)("div",{className:Qe,children:(0,B.jsx)(g.x,{as:"h2",variant:"titleSmall",children:d.ag.get("concerts_browse_more")})})]})));var He=n(88993);const Xe=(0,t.memo)((e=>{const i=(0,t.useMemo)((()=>e.entitySpec.recommendedConcertsFactory()),[e.entitySpec]),n=(0,f.$P)(),a=(0,f.Wi)(i),s=e.upcomingConcerts;if(!s||s.length<1)return null;const l=s.map(((e,t)=>{const a=`spotify:concert:${e.concert.id}`;return(0,B.jsx)(He.Z,{concert:e.concert,onClick:()=>{const e=i.concertCardFactory({position:t,uri:a}).hitUiNavigate({destination:a});n.logInteraction(e)}},e.concert.id)}));return(0,B.jsx)("div",{className:ke,ref:a,"data-testid":"concert-recommendations",children:(0,B.jsx)(U.JL,{value:"headered-grid",children:(0,B.jsxs)(Pe.P,{title:d.ag.get("concerts_more_events"),total:s.length+1,className:ge,showSeeAll:!0,seeAllUri:"spotify:concerts",seeAllLabel:d.ag.get("view.see-all"),colGap:Ye.g4,removeOffsetMargin:!0,children:[(0,B.jsx)(Je,{onClick:()=>{const e=i.browseCardFactory().hitUiNavigate({destination:"spotify:concerts"});n.logInteraction(e)}}),l]})})})}));var ei=n(43827);const ii=(0,t.memo)((e=>{const{data:i,isAnonymous:n,isConcertSaved:t}=e,{artists:a,albums:s,upcomingConcerts:l}=i,r=i.concert.concert,{spec:o}=(0,f.fU)(h.q,{data:{identifier:r.id,uri:`spotify:concert:${r.id}`}});return(0,j.Y)(i.color),(0,B.jsxs)("section",{className:X,children:[(0,B.jsx)(N.$,{children:d.ag.get("concert.entity_metadata.title",r.title,r.location,r.venue)}),(0,B.jsxs)(S.gF,{backgroundImages:[{url:i.headerImageUri,width:100,height:100}],backgroundColor:i.color,children:[(0,B.jsxs)(S.sP,{children:[(0,B.jsx)(S.T0,{children:(0,B.jsx)("div",{className:G,children:(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",className:J,children:(0,K.jx)((0,K.CH)(r.date))})})}),(0,B.jsx)(S.xd,{className:ee,children:(0,ei.Yl)(r)})]}),(0,B.jsx)(p.W,{children:(0,B.jsx)("div",{className:ue,children:(0,B.jsx)(y.i,{text:(0,ei.Yl)(r)})})})]}),(0,B.jsxs)("div",{className:H,children:[(0,B.jsx)(x.I,{backgroundColor:i.color}),(0,B.jsxs)("div",{className:ie,children:[(0,B.jsx)(we,{concert:r,ticketAvailabilityTranslated:i.ticketAvailabilityTranslated,entitySpec:o,isAnonymous:n,isConcertSaved:t}),(0,B.jsx)(g.x,{variant:"marginal",semanticColor:"textSubdued",children:d.ag.get("events_page.disclaimer")}),(0,B.jsx)(qe,{artists:a,albums:s,entitySpec:o}),(0,B.jsx)(Xe,{upcomingConcerts:l,entitySpec:o})]})]})]})})),ni=async e=>{const[i,n]=e.queryKey;return(await(0,v.gq)(k.b.getInstance(),n)).body},ti=()=>{const{concertId:e=""}=(0,o.UO)(),{data:i,isLoading:n}=(0,l.a)({queryKey:["concert",e],queryFn:ni,staleTime:6e5}),t=(0,r.v9)(u.n5),a=(0,m.w)({username:t,concertUri:`spotify:concert:${e}`}),s=a?.data||!1,{isAnonymous:k}=(0,r.v9)(u.Gg);return n?(0,B.jsx)(c.h,{hasError:!1,errorMessage:""}):i?(0,B.jsx)(ii,{data:i,isAnonymous:k,isConcertSaved:s}):(0,B.jsx)(c.h,{hasError:!0,errorMessage:d.ag.get("concert.error.concert_not_found_title")})};n(55115);var ai=n(11317),si=n(47262),li=n(80524),ri=n(21165),oi=n(29390);const di="my1OfSffsBBzVaY0CAnx",ci="G8dXfUfFJmGQQiyFEgTb",mi="MxwU7pYeMkLJoTSukM8c",ui="cFJ3zd0eZteC05aAkurV",ki="zDAE8Fy28LxnUBVzFvQw",vi="xrXxgPjjuSYP9s68FYhY",gi=(0,t.memo)((e=>{const{location:i,showTime:n,ageRestriction:t,htmlDescription:a,doorsOpenTime:s}=e;return(0,B.jsxs)("div",{className:di,children:[a?.trim()&&(0,B.jsxs)("div",{className:ci,children:[(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",className:mi,children:d.ag.get("artist.about")}),(0,B.jsx)(oi.w,{html:a,onTimeStampClick:()=>{}})]}),(0,B.jsxs)("div",{className:ci,children:[(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",className:mi,children:d.ag.get("tracklist.header.venue")}),(0,B.jsxs)("div",{className:vi,children:[(0,B.jsx)(li.n,{className:ui}),(0,B.jsxs)("div",{children:[(0,B.jsx)(g.x,{as:"h4",variant:"bodyMediumBold",className:ki,children:i.name}),(0,B.jsx)(g.x,{as:"p",variant:"bodyMedium",children:(0,ei.xe)({...i,name:""})})]})]}),(0,B.jsxs)("div",{className:vi,children:[(0,B.jsx)(ri.W,{className:ui}),(0,B.jsxs)("div",{children:[(0,B.jsxs)(g.x,{as:"h4",variant:"bodyMediumBold",className:ki,children:[s&&d.ag.get("concert.door_time",d.ag.formatDate(s,{timeStyle:"short"})),s&&" • ",d.ag.get("concert.show_time",d.ag.formatDate(n,{timeStyle:"short"}))]}),t?.trim()&&(0,B.jsx)(g.x,{as:"p",variant:"bodyMedium",children:t})]})]})]})]})}));var hi=n(50540);const xi=(0,t.memo)((e=>{const{concertUri:i,entitySpec:n}=e,a=(0,t.useMemo)((()=>n.interestedButtonFactory()),[n]),s=(0,f.Wi)(a),l=(0,f.$P)(),{enqueueSnackbar:o}=(0,O.D)(),c=(0,r.v9)(u.n5),{data:g,isLoading:h}=(0,m.w)({username:c,concertUri:i}),[x,N]=(0,t.useState)(),S=void 0===x?g:x,p=(0,ai.EC)(i);return(0,B.jsx)(E.ws,{label:d.ag.get("concerts_interested_tooltip"),placement:"top-end",children:(0,B.jsx)(b.P,{ref:s,size:"small",iconLeading:S?_.N:D.S,className:he,"aria-checked":S,disabled:h,onClick:()=>{if(!h)if(S){const e=a.hitRemoveInterest();e&&l.logInteraction(e),N(!1),o(d.ag.get("concerts_removed-from-your-saved-events")),(0,v.FB)(k.b.getInstance(),p.id)}else{const e=a.hitAddInterest();e&&l.logInteraction(e),N(!0),o(d.ag.get("concerts_added-to-your-saved-events")),(0,v.l7)(k.b.getInstance(),p.id)}},children:d.ag.get("concerts_interested")})})})),Ni=(0,t.memo)((e=>{const{concertUri:i,offer:n,position:a,spec:s,onRemindMe:l}=e,r=n.soldOut||(0,K.OF)(n.endDateIsoString),o="Spotify"===n.providerName,c=(0,K.ek)(n.startDateIsoString),m=c?void 0:n.url,u=(0,f.$P)(),k=(0,$.o)(),v=(0,t.useMemo)((()=>s.ticketProviderCellFactory({identifier:n.providerName,position:a,uri:n.url})),[s,n.providerName,a,n.url]),h=(0,f.Wi)(v),x=(0,t.useMemo)((()=>{if(r)return(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textSubdued",className:je,children:d.ag.get("concerts.soldout")});if(c){const e=n.startDateIsoString&&new Date(n.startDateIsoString);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:pe,children:d.ag.get("concerts.tickets_on_sale_soon")}),e&&(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:Fe,children:d.ag.get("concerts.ticket_date_time",(0,K.xE)(e),(0,K.hK)(e))})]})}const e={"on-sale":d.ag.get("concerts.on_sale"),presale:d.ag.get("concerts.presale")};return(0,B.jsxs)(B.Fragment,{children:[e[n.saleType]&&(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:pe,children:e[n.saleType]}),o&&n.minPrice&&(0,B.jsx)(g.x,{as:"p",variant:"bodyMediumBold",semanticColor:"textPositive",className:Se,children:d.ag.get("concerts.ticket_price",n.minPrice)})]})}),[r,c,n.saleType,n.minPrice,n.startDateIsoString,o]),N=(0,t.useMemo)((()=>r?null:(c&&(Y.D,d.ag.get("concerts.remind_me")),(0,B.jsx)(Y.D,{className:Ne,iconTrailing:Z.h,size:"small",children:o?d.ag.get("concert_buy_tickets"):d.ag.get("concert_find_tickets")}))),[r,c,o,l]);return(0,B.jsxs)("a",{href:m,className:le,target:"_blank",ref:h,onClick:()=>{const e=v.hitNavigateToExternalUri({destination:n.url});e&&u.logInteraction(e),k({targetUri:i,intent:"find-concert",type:"click"})},children:[(0,B.jsx)("div",{className:re,children:(0,B.jsx)(q.Ee,{loading:"eager",src:n.providerImageUrl,height:"100%",width:"100%",className:oe,children:(0,B.jsx)(W.i,{className:de,size:"medium"})})}),(0,B.jsxs)("div",{className:ce,children:[(0,B.jsxs)("div",{dir:"auto",className:ye,children:[x,(0,B.jsx)(g.x,{as:"p",semanticColor:"textSubdued",children:n.providerName})]}),N]})]})})),Si=(0,t.memo)((e=>{const{concertUri:i,offers:n,entitySpec:a}=e,s=(0,t.useMemo)((()=>a.ticketProviderListFactory()),[a]),l=(0,f.Wi)(s);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",children:d.ag.get("concert.header.available_tickets_from")}),(0,B.jsx)("div",{ref:l,className:ae,children:n.map(((e,n)=>(0,B.jsx)(Ni,{concertUri:i,offer:e,position:n,onRemindMe:()=>{},spec:s},e.url)))}),(0,B.jsx)(g.x,{as:"p",variant:"marginal",semanticColor:"textSubdued",className:se,children:d.ag.get("events_page.disclaimer")})]})})),pi=(0,t.memo)((e=>{const{concert:i,entitySpec:n}=e,t=(0,f.$P)(),a=(0,hi.g)(),s=(0,K.CH)(i.startDateIsoString);if((0,K.OF)(i.startDateIsoString))return(0,B.jsxs)("div",{className:te,children:[(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",children:d.ag.get("concert_event_ended")}),(0,B.jsx)(g.x,{variant:"bodyMedium",children:(0,B.jsx)(V.default,{to:"spotify:concerts",children:d.ag.get("concert_past_message")})})]});return(0,B.jsxs)("div",{className:te,children:[(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",className:fe,children:(0,B.jsx)(z,{locationName:(0,ei.xe)(i.location),latitude:i.location.coordinates?.latitude,longitude:i.location.coordinates?.longitude})}),(0,B.jsx)(g.x,{as:"h3",variant:"bodySmall",className:ve,children:[(0,K.xE)(s),(0,K.hK)(s)].join(" • ")}),(0,B.jsxs)("div",{className:Q,children:[!a&&(0,B.jsx)(xi,{concertUri:i.uri,entitySpec:n}),(0,B.jsx)(w.T,{uri:i.uri,sharingInfo:null,interactionData:{intent:"share",type:"click"},onClick:()=>{const e=n.shareEventButtonFactory({uri:i.uri}).hitShare({entityToBeShared:i.uri,shareId:i.uri});e&&t.logInteraction(e)},className:Ce,ariaLabel:d.ag.get("concerts_share_with_friends")}),(0,B.jsx)(M.yj,{menu:(0,B.jsx)(R,{uri:i.uri}),onShow:()=>{const e=n.contextMenuButtonFactory().hitUiReveal();e&&t.logInteraction(e)},children:(0,B.jsx)(I.z,{size:"large"})})]}),(0,B.jsx)(Si,{concertUri:i.uri,offers:i.offers.items,entitySpec:n})]})}));var yi=n(87964);const ji=(0,t.memo)((e=>{const{artist:i,position:n,lineupSpec:a}=e,s=(0,t.useMemo)((()=>a.artistRowFactory({position:n,uri:i.uri})),[a,n,i.uri]),l=(0,f.$P)(),r=i.relatedContent.featuringV2.items.flatMap((e=>{const{data:i}=e;return"Playlist"===i.__typename&&"artistsets"===i.format?[i]:[]})),o=i.discography.popularReleasesAlbums.items,c=i.visuals.avatarImage?.sources?.[0],m=(0,B.jsx)(We,{uri:i.uri,name:i.profile.name,imageUri:c?.url,headliner:0===n,onClick:()=>{const e=s?.artistCardFactory().hitUiNavigate({destination:i.uri});e&&l.logInteraction(e)}},i.uri),u=r.map(((e,i)=>{const n="User"===e.ownerV2.data.__typename&&e.ownerV2.data.name||e.name;return(0,B.jsx)(yi.Z,{index:i,uri:e.uri,name:e.name,images:e.images.items[0]?.sources,description:e.description||"",authorName:n},e.uri)})),k=o.map(((e,i)=>{const n=e.artists.items.map((e=>({uri:e.uri,name:e.profile.name})));return(0,B.jsx)(Me.r,{uri:e.uri,index:i,artists:n,images:e.coverArt?.sources||[],name:e.name,sharingInfo:e.sharingInfo},e.uri)}));return(0,B.jsx)(U.JL,{value:"headered-grid",index:n,children:(0,B.jsx)(Pe.P,{title:0===n?d.ag.get("concert_lineup"):"",total:2+u.length+k.length,seeAllUri:i.uri,seeAllLabel:d.ag.get("view.see-all"),onClickShelfSeeAll:()=>{const e=s?.seeDiscographyLinkFactory().hitUiNavigate({destination:i.uri});e&&l.logInteraction(e)},showSeeAll:!0,alwaysShowSeeAll:!0,children:[m,null,...u,...k]})},i.uri)})),fi=(0,t.memo)((e=>{const{artists:i,entitySpec:n}=e,a=(0,t.useMemo)((()=>n.lineupArtistsFactory()),[n]),s=(0,f.Wi)(a);return(0,B.jsx)("div",{ref:s,className:me,children:i.flatMap(((e,i)=>{if("Artist"!==e.data.__typename)return[];const n=e.data;return[(0,B.jsx)(ji,{artist:n,position:i,lineupSpec:a},n.uri)]}))})}));var Fi=n(25847);const Ci=(0,t.memo)((e=>{const{concert:i,position:n,recommendedSpec:t}=e,a=(0,f.$P)(),s=i.artists.items.flatMap((e=>"Artist"===e.data.__typename?[e.data]:[])),l=s.map((e=>e.profile.name)),r=(0,ei.y0)(i.title,i.festival,l)?i.title:(0,ei.gU)(l),o=s[0]?.visuals.avatarImage?.sources[0];return(0,B.jsx)(Fi.Z,{uri:i.uri,title:r,date:i.startDateIsoString,location:(0,ei.xe)(i.location),imageUrl:o?.url,firstParty:i.firstParty,onClick:()=>{const e=t?.concertCardFactory({position:n,uri:i.uri}).hitUiNavigate({destination:i.uri});e&&a.logInteraction(e)}})})),bi=(0,t.memo)((e=>{const{relatedConcerts:i,entitySpec:n}=e,a=(0,t.useMemo)((()=>n.recommendedConcertsFactory()),[n]),s=(0,f.$P)(),l=(0,f.Wi)(a),r=i.items.flatMap((e=>"ConcertV2"===e.data.__typename?[e.data]:[]));if(0===r.length)return null;return(0,B.jsx)("div",{ref:l,className:ke,"data-testid":"concert-recommendations",children:(0,B.jsx)(U.JL,{value:"headered-grid",children:(0,B.jsxs)(Pe.P,{title:d.ag.get("concerts_more_events"),total:i.totalCount,className:ge,showSeeAll:!0,alwaysShowSeeAll:!0,seeAllUri:"spotify:concerts",seeAllLabel:d.ag.get("view.see-all"),children:[(0,B.jsx)(Je,{onClick:()=>{const e=a?.browseCardFactory().hitUiNavigate({destination:"spotify:concerts"});e&&s.logInteraction(e)}},"browse"),r.map(((e,i)=>(0,B.jsx)(Ci,{position:i,concert:e,recommendedSpec:a},e.uri)))]})})})}));var _i=n(20069);const Di={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"concert"},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:"concert"},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:"ConcertV2"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"concertEntity"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"GenericError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"NotFound"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"concertEntity"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConcertV2"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"artists"},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:"_uri"}},{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:"detailedArtist"}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"location"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"locationInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"offers"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"offerInfo"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"festival"}},{kind:"Field",name:{kind:"Name",value:"startDateIsoString"}},{kind:"Field",name:{kind:"Name",value:"htmlDescription"}},{kind:"Field",name:{kind:"Name",value:"ageRestriction"}},{kind:"Field",name:{kind:"Name",value:"doorsOpenTimeIsoString"}},{kind:"Field",name:{kind:"Name",value:"relatedConcerts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],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:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"relatedConcert"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"detailedArtist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"simpleArtist"}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"headerImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}}]}},{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:"limit"},value:{kind:"IntValue",value:"4"}}],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:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",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:"profile"},selectionSet:{kind:"SelectionSet",selections:[{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:"sharingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"relatedContent"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"featuringV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],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:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistResponseWrapper"}},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:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"format"}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},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:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"images"},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:"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:"simpleArtist"},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:"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:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"locationInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConcertLocation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"region"}},{kind:"Field",name:{kind:"Name",value:"country"}},{kind:"Field",name:{kind:"Name",value:"coordinates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"latitude"}},{kind:"Field",name:{kind:"Name",value:"longitude"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"offerInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConcertOffer"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"providerName"}},{kind:"Field",name:{kind:"Name",value:"providerImageUrl"}},{kind:"Field",name:{kind:"Name",value:"saleType"}},{kind:"Field",name:{kind:"Name",value:"firstParty"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"soldOut"}},{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"minPrice"}},{kind:"Field",name:{kind:"Name",value:"maxPrice"}},{kind:"Field",name:{kind:"Name",value:"startDateIsoString"}},{kind:"Field",name:{kind:"Name",value:"endDateIsoString"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"relatedConcert"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConcertV2"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"festival"}},{kind:"Field",name:{kind:"Name",value:"startDateIsoString"}},{kind:"Field",name:{kind:"Name",value:"artists"},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:"_uri"}},{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:"simpleArtist"}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"headerImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"location"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"locationInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"firstParty"}}]}}]},Ii=e=>{const{concert:i}=e,{spec:n}=(0,f.fU)(h.q,{data:{identifier:(0,ai.EC)(i.uri)?.id,uri:i.uri}}),t=i.artists.items.flatMap((e=>"Artist"===e.data.__typename?[e.data]:[])),a=t[0].visuals.headerImage;(0,si.Y5)(a?.extractedColors?.colorDark.hex);const s=t.map((e=>e.profile.name)),l=(0,ei.y0)(i.title,i.festival,s)?i.title:(0,ei.Jn)(s),r=(0,K.CH)(i.startDateIsoString);return(0,B.jsxs)("section",{className:X,children:[(0,B.jsx)(N.$,{children:d.ag.get("concert.entity_metadata.title",i.title,i.location.city,i.location.name)}),(0,B.jsxs)(S.gF,{backgroundImages:a?.sources,children:[(0,B.jsxs)(S.sP,{children:[(0,B.jsx)(S.T0,{children:(0,B.jsx)("div",{className:G,children:(0,B.jsx)(g.x,{as:"h3",variant:"titleSmall",className:J,children:(0,K.jx)(r)})})}),(0,B.jsx)(S.xd,{className:ee,children:l})]}),(0,B.jsx)(p.W,{children:(0,B.jsx)("div",{className:ue,children:(0,B.jsx)(y.i,{text:l})})})]}),(0,B.jsxs)("div",{className:H,children:[(0,B.jsx)(x.I,{backgroundColor:a?.extractedColors?.colorDark.hex}),(0,B.jsxs)("div",{className:ie,children:[(0,B.jsx)(pi,{concert:i,entitySpec:n}),(0,B.jsx)(fi,{artists:i.artists.items,entitySpec:n}),(0,B.jsx)(gi,{location:i.location,showTime:r,htmlDescription:i.htmlDescription,ageRestriction:i.ageRestriction,doorsOpenTime:i.doorsOpenTimeIsoString?(0,K.CH)(i.doorsOpenTimeIsoString):null}),(0,B.jsx)(bi,{relatedConcerts:i.relatedConcerts,entitySpec:n})]})]})]})},wi=()=>{const{concertId:e}=(0,o.UO)(),i=`spotify:concert:${e}`,{loading:n,error:t,data:a}=(s={uri:i},(0,_i.a)(Di,s,l));var s,l;return n?(0,B.jsx)(c.h,{hasError:!1,errorMessage:""}):t||"ConcertV2"!==a?.concert.__typename?(0,B.jsx)(c.h,{hasError:!0,errorMessage:d.ag.get("concert.error.concert_not_found_title")}):(0,B.jsx)(Ii,{concert:a.concert})},Mi=()=>(0,a.W6)(s.pjZ)?(0,B.jsx)(wi,{}):(0,B.jsx)(ti,{}),Pi=()=>(0,B.jsx)(t.Suspense,{fallback:!0,children:(0,B.jsx)(Mi,{})})}}]);
//# sourceMappingURL=xpui-routes-concert.js.map