1import{r,g as $e,j as e}from"./react-vendor-DJyVv-9k.js";import{O as he,s as B,Q as ee,u as Pe,P as Re,B as n,C as I,j as D,N as Ee,k as Te,R as se}from"./index-BIqNRxX9.js";import{b as Fe,L as de}from"./router-CKKuDg_f.js";import{R as ze}from"./RatingDialog-CdFC7v24.js";import{t as Ve,L as P,a as J,H as Ie,R as Oe,w as Ue,M as qe,an as Qe,G as De,_ as He}from"./icons-BX4ctka3.js";import"./capacitor-DHBo0MhY.js";import"./radix-BgH8Shby.js";import"./supabase-D3lgsHDr.js";import"./charts-CPklpUXh.js";import"./react-query-Dh77tccY.js";const Be=v=>{const{user:a}=he(),[b,c]=r.useState({}),[R,_]=r.useState({}),[C,y]=r.useState(!0);return r.useEffect(()=>{if(v.length===0){y(!1);return}(async()=>{try{const{data:f,error:x}=await B.rpc("get_artist_rating_stats",{artist_ids:v});if(x)throw x;const h={};if(f?.forEach(g=>{h[g.artist_id]={total_stars:g.total_stars||0,total_votes:g.total_votes||0,average_rating:g.average_rating||0}}),c(h),a){const{data:g,error:F}=await B.from("artist_ratings").select("artist_id, rating").eq("user_id",a.id).in("artist_id",v);if(F)throw F;const N={};g?.forEach(E=>{N[E.artist_id]=E.rating}),_(N)}}catch(f){console.error("Error fetching artist ratings:",f)}finally{y(!1)}})()},[v.join(","),a?.id]),{ratingStats:b,userRatings:R,loading:C,submitRating:async(p,f)=>
1{if(!a)throw new Error("Must be logged in to rate");try{const{error:x}=await B.from("artist_ratings").upsert({user_id:a.id,artist_id:p,rating:f,updated_at:new Date().toISOString()},{onConflict:"user_id,artist_id"});if(x)throw x;_(g=>({...g,[p]:f}));const{data:h}=await B.rpc("get_artist_rating_stats",{artist_ids:[p]});return h&&h.length>0&&c(g=>({...g,[p]:{total_stars:h[0].total_stars||0,total_votes:h[0].total_votes||0,average_rating:h[0].average_rating||0}})),!0}catch(x){throw console.error("Error submitting artist rating:",x),x}}}},Je=()=>{const v=new Date,a=new Date(v.getFullYear(),v.getMonth(),1),b=new Date(v.getFullYear(),v.getMonth()+1,1);return{start:a.toISOString(),end:b.toISOString()}},te="https://hxkepuufqgihuqzrtukx.supabase.co",me="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh4a2VwdXVmcWdpaHVxenJ0dWt4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTE2NTQ5OTMsImV4cCI6MjA2NzIzMDk5M30.z-L9hjXidZqPszPpicKWDSAToddmhkvFkOMkGLEzTeQ",ae={apikey:me,Authorization:`Bearer ${me}`,Prefer:"count=exact"},Y=(v={})=>{const{pageSize:a=20,letterFilter:b,searchQuery:c,artistsOnly:R=!1,mode:_}=v,[C,y]=r.useState([]),[M,p]=r.useState([]),[f,x]=r.useState(0),[h,g]=r.useState(!0),[F,N]=r.useState(0),[E,O]=r.useState(!0),A=r.useCallback(async(w=!1)=>{g(!0);try{const L=w?0:F;if(R){const i=new URL(`${te}/rest/v1/song_library`);if(i.searchParams.set("select","artist,image_url,artist_spotify_url,title"),i.searchParams.set("order","artist.asc"),i.searchParams.set("is_ad","eq.false"),i.searchParams.set("image_url","not.is.null"),c?.trim()){const l=c.trim();i.searchParams.set("or",`(artist.ilike.*${l}*,title.ilike.*${l}*)`)}if(b&&b!=="All"){const l=b.match(/^([A-Z])-([A-Z])$/);l&&i.searchParams.set("artist",`imatch.^[${l[1]}-${l[2]}]`)}i.searchParams.set("limit","5000");const k=await(await fetch(i.toString(),{headers:ae})).json(),$=l=>l&&l.split(/\s*;\s*|\s+(?:feat\.?|ft\.?|featuring|with|x|&)\s+/i)[0].trim(),S=new Map;
1k.forEach(l=>{const j=$(l.artist);if(ee({title:l.title,artist:j}))return;const u=j.toLowerCase();if(!S.has(u))S.set(u,{artist:j,image_url:l.image_url,artist_spotify_url:l.artist_spotify_url,song_count:1,latest_title:l.title});else{const U=S.get(u);U.song_count++,!U.image_url&&l.image_url&&(U.image_url=l.image_url)}});const d=Array.from(S.values()).sort((l,j)=>l.artist.localeCompare(j.artist)),m=d.slice(0,L+a);w?(p(m),N(a)):(p(m),N(l=>l+a)),x(d.length),O(L+a<d.length)}else if(_==="new"){const i=new URL(`${te}/rest/v1/new_releases`);i.searchParams.set("select","id,title,artist,album,image_url,spotify_url,artist_spotify_url,release_date"),i.searchParams.set("offset",String(L)),i.searchParams.set("limit",String(a)),i.searchParams.set("is_active","eq.true"),i.searchParams.set("order","release_date.desc,artist.asc"),c?.trim()&&i.searchParams.set("or",`(title.ilike.*${c}*,artist.ilike.*${c}*)`);const T=await fetch(i.toString(),{headers:ae}),k=await T.json(),$=T.headers.get("content-range"),S=$?parseInt($.split("/")[1]):k.length,d=k.filter(m=>!ee({title:m.title,artist:m.artist})).map(m=>({id:m.id,title:m.title,artist:m.artist,album:m.album,image_url:m.image_url,spotify_url:m.spotify_url,artist_spotify_url:m.artist_spotify_url,genre:"Gospel",added_at:m.release_date,is_ad:!1}));w?(y(d),N(a)):(y(m=>[...m,...d]),N(m=>m+a)),x(S),O(L+a<S)}else{const i=new URL(`${te}/rest/v1/song_library`);if(i.searchParams.set("select","*"),i.searchParams.set("offset",String(L)),i.searchParams.set("limit",String(a)),i.searchParams.set("is_ad","eq.false"),i.searchParams.set("image_url","not.is.null"),_==="top"){const{start:d}=Je();i.searchParams.append("added_at",`lt.${d}`),i.searchParams.set("order","added_at.asc")}else i.searchParams.set("order","added_at.desc,artist.asc,title.asc");if(b&&b!=="All"){const d=b.match(/^([A-Z])-([A-Z])$/);d&&i.searchParams.set("artist",`imatch.^[${d[1]}-${d[2]}]`)}c?.trim()&&i.searchParams.set("or",`(title.ilike.*${c}*,artist.ilike.*${c}*)`);const T=await fetch(i.toString(),{headers:ae}),k=(await T.json()).filter(d=>!ee({title:d.title,artist:d.artist})),$=T.headers.get("content-range"),S=$?parseInt($.split("/")[1]):k.length;w?(y(k),N(a)):(y(d=>[...d,...k]),N(d=>d+a)),x(S),O(L+a<S)}}catch(L){console.error("Error fetching song library:",L)}finally{g(!1)}},[F,a,b,c,R,_]);r.useEffect(()=>{N(0),y([]),p([]),A(!0)},[b,c,a,R,_]);const H=r.useCallback(()=>{!h&&E&&A(!1)},[h,E,A]);return{songs:C,artists:M,totalCount:f,loading:h,hasMore:E,loadMore:H}},ls=()=>{Pe({title:"Artists You Love - Gospel & Christian Musicians",description:"Discover your favorite gospel artists on My Worship FM. Browse Christian musicians, rate artists, and explore the best in Caribbean and international worship music.",keywords:["gospel artists","Christian musicians","worship artists","Caribbean gospel artists"],url:"https://myworshipfm.com/on-air/artists"});const{user:v}=he(),[a,b]=r.useState(""),[c,R]=r.useState(null),[_,C]=r.useState("All"),[y,M]=r.useState(!1),[p,f]=r.useState(!1),[x,h]=r.useState(!1),[g,F]=r.useState("All"),[N,E]=r.useState("Top Songs"),[O,A]=r.useState(!1),[H,w]=r.useState(!1),[L,i]=r.useState(!1),[T,k]=r.useState(new Set),[$,S]=r.useState(!1),[d,m]=r.useState(1),l=Fe(),j=a.trim().length>0,{songs:u,totalCount:U,loading:z,hasMore:Z,loadMore:re}=Y({pageSize:j?500:60,searchQuery:j?a:void 0}),{artists:G,loading:W,hasMore:ge,loadMore:ue}=Y({pageSize:20,artistsOnly:!0,letterFilter:p?g:void 0,searchQuery:p&&a.trim()?a:void 0}),{songs:ie,loading:xe,hasMore:pe,loadMore:fe}=Y({pageSize:20,mode:"top"}),{songs:le,loading:be,hasMore:je,loadMore:ve}=Y({pageSize:20,mode:"new"}),V=(s,t)=>{const o=`/artist/${encodeURIComponent(s)}${t?`?image=${encodeURIComponent(t)}`:""}`;l(o)},ye=s=>{k(t=>{const o=new Set(t);return o.has(s)?(o.delete(s),se({title:"Removed from favorites"})):(o.add(s),se({title:"Added to favorites!"})),o})},X=s=>T.has(s),K=r.useMemo(()=>u.slice(0,12),[u]),q=r.useMemo(()=>{const s=new Map;return u.forEach(t=>{const o=t.artist.toLowerCase();s.has(o)||s.set(o,t)}),Array.from(s.values()).slice(0,12)},[u]),Ne=r.useMemo(()=>{const s=new Set;q.forEach(o=>
1s.add(o.artist.toLowerCase())),K.forEach(o=>s.add(o.artist.toLowerCase()));const t=new Map;return u.forEach(o=>{const Q=o.artist.toLowerCase();!s.has(Q)&&!t.has(Q)&&t.set(Q,o)}),Array.from(t.values()).slice(0,12)},[u,q,K]),we=r.useMemo(()=>q.map(s=>`artist-${s.artist.toLowerCase().replace(/\s+/g,"-")}`),[q]),{userRatings:oe,submitRating:Se}=Be(we),_e=(s,t)=>{if(!v){se({title:"Login Required",description:"Please log in to rate artists",variant:"destructive"});return}R({id:s,name:t})},Ae=async s=>{c&&await Se(c.id,s)},Ce=(s,t,o)=>{const Q=oe[s]||0,Me=Q>0?Q:t;return Array.from({length:5},(Ye,ce)=>{const Le=ce+1<=Math.floor(Me);return e.jsx("button",{onClick:()=>o&&_e(s,o),className:"transition-transform hover:scale-110 focus:outline-none",children:e.jsx(He,{className:`h-4 w-4 ${Le?"text-yellow-400 fill-current":"text-gray-300"}`})},ce)})};$e.useEffect(()=>{m(1)},[a,_]);const ne=(s,t,o)=>e.jsxs(I,{className:"overflow-hidden hover:shadow-lg transition-shadow cursor-pointer",onClick:()=>V(s.artist,s.image_url),children:[e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:s.image_url,alt:`${s.title} by ${s.artist}`,className:"w-full h-48 object-cover"}),e.jsx(Te,{className:"absolute top-3 left-3 bg-primary text-primary-foreground text-xs",children:"MUSIC"})]}),e.jsxs(D,{className:"p-4",children:[e.jsx("h3",{className:"text-sm font-bold text-foreground mb-1 line-clamp-1",children:s.title}),e.jsxs("p",{className:"text-sm text-muted-foreground mb-2",children:["by ",s.artist]}),s.album&&e.jsx("p",{className:"text-xs text-muted-foreground",children:s.album})]})]},`${o}-${s.id}`),ke=(s,t)=>e.jsxs("div",{className:"group cursor-pointer",onClick:()=>V(s.artist,s.image_url),children:[e.jsxs("div",{className:"relative aspect-square mb-2 overflow-hidden rounded-lg shadow-md",children:[e.jsx("img",{src:s.image_url,alt:s.artist,className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-110"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-all duration-300"})]}),e.jsx("h3",{className:"text-sm font-medium text-center text-foreground group-hover:text-red-600 transition-colors duration-200 line-clamp-2",children:s.artist}),e.jsx("p",{className:"text-xs text-center text-muted-foreground line-clamp-1",children:s.latest_title})]},`artist-grid-${s.artist}-${t}`);return e.jsxs(Re,{title:"Artists You Love",subtitle:"Discover the stories, music, and inspiration behind your favorite Christian artists and worship leaders who are touching hearts worldwide.",backgroundImage:"https://i.postimg.cc/NfMHSQB3/Live-Performers-Under-Warm-Stage-Lights.png",pageTitle:"ARTISTS YOU LOVE",children:[e.jsx("section",{className:"py-16 bg-gradient-to-br from-gray-50 to-white min-h-screen",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-8",children:[e.jsxs("div",{className:"lg:col-span-3",children:[e.jsxs("div",{className:"mb-12",children:[e.jsx("div",{className:"bg-gradient-to-r from-pink-500 via-red-500 to-orange-400 rounded-2xl p-12 text-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[e.jsx("h1",{className:"text-6xl font-bold mb-8 text-radio-white",children:"Music"}),e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"relative max-w-2xl mx-auto",children:[e.jsx("input",{type:"text",placeholder:"Search music content...",value:a,onChange:s=>b(s.target.value),className:"w-full px-6 py-4 rounded-full bg-white text-gray-800 placeholder-gray-500 text-lg focus:outline-none focus:ring-2 focus:ring-white/30"}),e.jsx(Ve,{className:"absolute right-6 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-400"})]})})]})}),e.jsxs("div",{className:"flex justify-center gap-6 mt-8 mb-8 flex-wrap",children:[e.jsx(n,{className:`${_==="All"&&!y&&!p&&!x?"bg-gray-800 text-white":"bg-gray-200 text-gray-700"} hover:bg-gray-300 rounded-full px-8 py-3`,onClick:()=>{C("All"),M(!1),f(!1),h(!1),A(!1),w(!1)},children:"All"}),e.jsx(n,{className:`${y?"bg-gray-800 text-white":"bg-gray-200 text-gray-700"} hover:bg-gray-300 rounded-full px-8 py-3`,onClick:()=>{M(!0),f(!1),h(!1),C(""),A(!1),w(!1)},children:"Music All-Access"}),e.jsx(n,{className:`${p?"bg-gray-800 text-white":"bg-gray-200 text-gray-700"} hover:bg-gray-300 rounded-full px-8 py-3`,onClick:()=>{f(!0),M(!1),h(!1),C("Artists"),A(!1),w(!1)},children:"Artists"}),e.jsx(n,{className:`${x?"bg-gray-800 text-white":"bg-gray-200 text-gray-700"} hover:bg-gray-300 rounded-full px-8 py-3`,onClick:()=>{h(!0),M(!1),f(!1),C("Songs"),A(!1),w(!1)},children:"Songs"}),e.jsx(de,{to:"/music/top-20",children:e.jsx(n,{className:"bg-gray-200 text-gray-700 hover:bg-gray-300 rounded-full px-8 py-3",children:"Top 20 Songs"})})]})]}),j&&e.jsxs("div",{className:"mb-8",children:[e.jsxs("h2",{className:"font-bold text-gray-800 mb
1-2 text-2xl",children:['Search Results for "',a,'"']}),e.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Searching the entire music library â results are not limited by the filter buttons above."}),z&&u.length===0?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(P,{className:"h-8 w-8 animate-spin text-radio-secondary mr-3"}),e.jsx("span",{className:"text-lg text-muted-foreground",children:"Searching music library..."})]}):u.length===0?e.jsx("div",{className:"text-center py-12",children:e.jsxs("p",{className:"text-muted-foreground text-lg",children:['No songs or artists found matching "',a,'".']})}):e.jsxs(e.Fragment,{children:[e.jsxs("h3",{className:"font-bold text-primary mb-4 text-base",children:["Songs (",u.length,Z?"+":"",")"]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:u.map((s,t)=>ne(s,t,"search"))}),Z&&e.jsx("div",{className:"text-center",children:e.jsx(n,{className:"bg-black hover:bg-gray-800 text-white px-8 py-3 rounded-full",onClick:re,disabled:z,children:z?e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"h-4 w-4 animate-spin mr-2"}),"Loading more..."]}):"Load More Results"})})]})]}),!j&&y&&e.jsxs("div",{className:"mb-8",children:[e.jsxs("h2",{className:"text-3xl font-bold text-primary mb-4",children:["Music All-Access (",U," songs)"]}),z&&u.length===0?e.jsxs("div",{className:"flex justify-center items-center py-8",children:[e.jsx(P,{className:"h-8 w-8 animate-spin"}),e.jsx("span",{className:"ml-2",children:"Loading Music All Access..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:u.map((s,t)=>ne(s,t,"maa"))}),Z&&e.jsx("div",{className:"text-center",children:e.jsx(n,{className:"bg-black hover:bg-gray-800 text-white px-8 py-3 rounded-full",onClick:re,disabled:z,children:z?e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"h-4 w-4 animate-spin mr-2"}),"Loading..."]}):`See More (${U-u.length} remaining)`})})]})]}),!j&&p&&e.jsxs("div",{className:"mb-8",children:[e.jsx("div",{className:"flex justify-center gap-4 mb-8 flex-wrap",children:["All","A-E","F-J","K-O","P-T","U-Z"].map(s=>e.jsx(n,{className:`${g===s?"bg-red-600 text-white":"bg-gray-200 text-gray-700"} hover:bg-red-500 hover:text-white rounded-full px-6 py-2 text-sm`,onClick:()=>F(s),children:s},s))}),W&&G.length===0?e.jsxs("div",{className:"flex justify-center items-center py-8",children:[e.jsx(P,{className:"h-8 w-8 animate-spin"}),e.jsx("span",{className:"ml-2",children:"Loading artists..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4 mb-8",children:G.map((s,t)=>ke(s,t))}),G.length===0&&e.jsx("div",{className:"text-center py-12",children:e.jsxs("p",{className:"text-muted-foreground text-lg",children:["No artists found",g!=="All"?` for ${g}`:""]})}),ge&&e.jsx("div",{className:"text-center",children:e.jsx(n,{className:"bg-red-600 hover:bg-red-700 text-white px-8 py-3 rounded-full",onClick:ue,disabled:W,children:W?e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"h-4 w-4 animate-spin mr-2"}),"Loading..."]}):"Load More"})})]})]}),!j&&x&&e.jsxs("div",{className:"mb-8",children:[e.jsx("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-4 mb-8 px-4",children:["Top Songs","New Songs"].map(s=>e.jsx(n,{className:`${N===s?"bg-red-500 text-white":"bg-gray-200 text-gray-700"} hover:bg-red-400 hover:text-white rounded-full px-3 sm:px-6 py-2 text-xs sm:text-sm font-medium transition-all duration-200`,onClick:()=>{E(s),A(s==="Top Songs"),w(s==="New Songs")},children:s},s))}),O&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-2xl font-bold text-primary mb-4",children:"Top Songs"}),xe&&ie.length===0?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(P,{className:"h-8 w-8 animate-spin text-primary mr-3"}),e.jsx("span",{className:"text-lg text-muted-foreground font-medium",children:"Loading top songs..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8",children:ie.map((s,t)=>e.jsxs(I,{className:"overflow-hidden hover:shadow-lg transition-all duration-300 group cursor-pointer",onClick:()=>V(s.artist,s.image_url),children:[e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:s.image_url||"/images/worship-fm-logo.png",alt:s.title,className:"w-full h-64 object-cover transition-transform duration-300 group-hover:scale-105"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/30 transition-all duration-300"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:e.jsx(n,{size:"lg",variant:"secondary",className:"h-16 w-16 rounded-full p-0 shadow-lg",children:e.jsx(J,{className:"h-8 w-8"})})})]}),e.jsxs(D,{className:"p-6",children:[e.jsx("h3",{className:"text-xl font-bold text-foreground mb-2 line-clamp-2",children:s.title}),e.jsxs("p",{className:"text-lg text-muted-foreground mb-2",children:["by ",s.artist]}),s.album&&e.jsx("p",{className:"text-sm text-muted-foreground",children:s.album})]})]},`top-${s.id}`))}),pe&&e.jsx("div",{className:"text-center",children:e.jsx(n,{className:"bg-black hover:bg-gray-800 text-white px-8 py-3 rounded-full",onClick:fe,children:"Load More"})})]})]}),H&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-2xl font-bold text-primary mb-4",children:"New Songs"}),be&&le.length===0?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(P,{className:"h-8 w-8 animate-spin text-primary mr-3"}),e.jsx("span",{className:"text-lg text-muted-foreground font-medium",children:"Loading new songs..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8",children:le.map((s,t)=>e.jsxs(I,{className:"overflow-hidden hover:shadow-lg transition-all duration-300 group cursor-pointer",onClick:()=>V(s.artist,s.image_url),children:[e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:s.image_url||"/images/worship-fm-logo.png",alt:s.title,className:"w-full h-64 object-cover transition-transform duration-300 group-hover:scale-105"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/30 transition-all duration-300"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:e.jsx(n,{size:"lg",variant:"secondary",className:"h-16 w-16 rounded-full p-0 shadow-lg",children:e.jsx(J,{className:"h-8 w-8"})})})]}),e.jsxs(D,{className:"p-6",children:[e.jsx("h3",{className:"text-xl font-bold text-foreground mb-2 line-clamp-2",children:s.title}),e.jsxs("p",{className:"text-lg text-muted-foreground mb-2",children:["by ",s.artist]}),s.album&&e.jsx("p",{className:"text-sm text-muted-foreground",children:s.album})]})]},`new-${s.id}`))}),je&&e.jsx("div",{className:"text-center",children:e.jsx(n,{className:"bg-black hover:bg-gray-800 text-white px-8 py-3 rounded-full",onClick:ve,children:"Load More"})})]})]}),!O&&!H&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:e.jsx("p",{children:'Select "Top Songs" or "New Songs" above to browse.'})})]}),!y&&!p&&!x&&_==="All"&&!j&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-3xl font-bold text-gray-800 mb
1-4",children:"Featured Artists"}),z&&q.length===0?e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(P,{className:"h-8 w-8 animate-spin text-radio-secondary mr-3"}),e.jsx("span",{className:"text-lg text-muted-foreground",children:"Loading artists..."})]}):null]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-12",children:q.map(s=>{const t=`artist-${s.artist.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs(I,{className:"group overflow-hidden border-0 shadow-lg hover:shadow-2xl transition-all duration-500 bg-white hover:-translate-y-2 cursor-pointer",onClick:()=>V(s.artist,s.image_url),children:[e.jsxs("div",{className:"relative overflow-hidden",children:[e.jsx("img",{src:s.image_url||"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=400&h=400&fit=crop",alt:s.artist,className:"w-full h-80 object-cover transition-transform group-hover:scale-110 duration-700"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),e.jsx("div",{className:"absolute bottom-3 left-3 opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:e.jsx("div",{className:"flex items-center gap-1",children:Ce(t,4.5,s.artist)})})]}),e.jsx(D,{className:"p-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-1 group-hover:text-radio-secondary transition-colors line-clamp-1",children:s.artist}),e.jsx("p",{className:"text-gray-600 text-xs line-clamp-2 leading-relaxed mb-2",children:s.title})]}),e.jsx("div",{className:"flex justify-center pt-2",children:e.jsxs(n,{variant:"outline",size:"sm",className:`border-gray-300 text-xs h-7 transition-all duration-200 ${X(t)?"bg-red-50 border-red-300 text-red-600 hover:bg-red-100":"bg-white text-gray-700 hover:bg-radio-secondary hover:text-white hover:border-radio-secondary"}`,onClick:o=>{o.stopPropagation(),ye(t)},children:[e.jsx(Ie,{className:`h-2.5 w-2.5 mr-1 ${X(t)?"fill-current":""}`}),X(t)?"Loved":"Love"]})})]})})]},`featured-${s.id}`)})}),e.jsxs("div",{className:"mb-12 mt-16",children:[e.jsx("div",{className:"mb-8",children:e.jsx("h2",{className:"text-3xl font-bold text-primary mb-2",children:"Popular Artists"})}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-8",children:Ne.map((s,t)=>e.jsxs("div",{className:"group cursor-pointer",onClick:()=>V(s.artist,s.image_url),children:[e.jsxs("div",{className:"relative aspect-square mb-4 overflow-hidden rounded-lg shadow-md",children:[e.jsx("img",{src:s.image_url||"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=400&h=400&fit=crop&crop=face",alt:s.artist,className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-110"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-all duration-300"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:e.jsx(n,{size:"sm",variant:"secondary",className:"h-12 w-12 rounded-full p-0 shadow-lg",children:e.jsx(J,{className:"h-6 w-6"})})})]}),e.jsx("h3",{className:"text-base font-medium text-center text-foreground group-hover:text-primary transition-colors duration-200 line-clamp-2",children:s.artist})]},`popular-${s.id}-${t}`))})]}),e.jsxs("div",{className:"mb-12 mt-16",children:[e.jsx("div",{className:"mb-8",children:e.jsx("h2",{className:"text-3xl font-bold text-primary mb-2",children:"Top Songs"})}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-8",children:K.map((s,t)=>e.jsxs("div",{className:"group cursor-pointer",onClick:()=>V(s.artist,s.image_url),children:[e.jsxs("div",{className:"relative aspect-square mb-4 overflow-hidden rounded-lg shadow-md",children:[e.jsx("img",{src:s.image_url||"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=400&h=400&fit=crop&crop=face",alt:s.title,className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-110"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-all duration-300"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:e.jsx(n,{size:"sm",variant:"secondary",className:"h-12 w-12 rounded-full p-0 shadow-lg",children:e.jsx(J,{className:"h-6 w-6"})})})]}),e.jsx("h3",{className:"text-base font-medium text-center text-foreground group-hover:text-primary transition-colors duration-200 line-clamp-2",children:s.title}),e.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:["by ",s.artist]})]},`topsong-${s.id}-${t}`))}),!$&&u.length>12&&e.jsx("div",{className:"text-center mt-8",children:e.jsx(n,{className:"bg-primary hover:bg-primary/90 text-white px-8 py-3 rounded-full",onClick:()=>S(!0),children:"Load More Songs"})})]})]})]}),e.jsxs("div",{className:"lg:col-span-1 space-y-6",children:[e.jsx("div",{className:"sticky top-24"}),e.jsx(I,{className:"border-0 shadow-lg",children:e.jsxs(D,{className:"p-6",children:[e.jsxs("div",{className:"flex items-center mb-4",children:[e.jsx(Oe,{className:"h-5 w-5 mr-2 text-radio-secondary"}),e.jsx("h3",{className:"text-lg font-bold text-gray-800",children:"Now Playing"})]}),e.jsx(Ee,{showTitle:!1}),e.jsxs(n,{className:"w-full bg-radio-secondary hover:bg-red-700 text-white mt-4",children:[e.jsx(Ue,{className:"h-4 w-4 mr-2"}),"Listen Live"]})]})}),e.jsx(I,{className:"border-0 shadow-lg"}),e.jsx(I,{className:"border-0 shadow-lg",children:e.jsxs(D,{className:"p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-800 mb
1-4",children:"Quick Actions"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs(n,{variant:"outline",className:"w-full border-gray-300 text-gray-700 hover:bg-radio-secondary hover:text-white",onClick:()=>{h(!0),A(!0),w(!1),M(!1),f(!1),C("Songs")},children:[e.jsx(qe,{className:"h-4 w-4 mr-2"}),"Top Songs"]}),e.jsxs(n,{variant:"outline",className:"w-full border-gray-300 text-gray-700 hover:bg-radio-secondary hover:text-white",onClick:()=>{h(!0),w(!0),A(!1),M(!1),f(!1),C("Songs")},children:[e.jsx(Qe,{className:"h-4 w-4 mr-2"}),"New Songs"]}),e.jsx(n,{variant:"outline",className:"w-full border-gray-300 text-gray-700 hover:bg-radio-secondary hover:text-white",asChild:!0,children:e.jsxs(de,{to:"/on-air/schedule",children:[e.jsx(De,{className:"h-4 w-4 mr-2"}),"Program Schedule"]})})]})]})})]})]})})}),e.jsx(ze,{open:!!c,onOpenChange:s=>!s&&R(null),itemName:c?.name||"",itemType:"artist",currentRating:c?oe[c.id]:void 0,onSubmit:Ae})]})};export{ls as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.