1var f=(x,t,s)=>new Promise((i,o)=>{var m=r=>{try{d(s.next(r))}catch(a){o(a)}},h=r=>{try{d(s.throw(r))}catch(a){o(a)}},d=r=>r.done?i(r.value):Promise.resolve(r.value).then(m,h);d((s=s.apply(x,t)).next())});import{u as N,r as c,s as v,j as e,N as k,S as y,L as u,q as j}from"./index-BFJMlFdP.js";import{i as w}from"./internalArticleLink-CBi71dUH.js";import{e as $}from"./eventsCatalog-wZMztd57.js";import{s as S}from"./adminConstants-rcZFhgyb.js";import{A as _}from"./arrow-left-DijVZ6wR.js";import{R as L}from"./radio-D36DTdpi.js";import{C}from"./calendar-fi9bOUh_.js";const E=x=>{const[t,s]=c.useState(()=>Date.now());c.useEffect(()=>{const o=setInterval(()=>s(Date.now()),6e4);return()=>clearInterval(o)},[]);const i=Math.max(0,new Date(x).getTime()-t);return{days:Math.floor(i/864e5),hours:Math.floor(i%864e5/36e5),live:i===0}},z=()=>{var b;const{slug:x=""}=N(),t=$(x),[s,i]=c.useState([]),[o,m]=c.useState(!0),{days:h,hours:d,live:r}=E((b=t==null?void 0:t.startISO)!=null?b:new Date().toISOString());c.useEffect(()=>{if(!t)return;let l=!1;return f(void 0,null,function*(){m(!0);const{data:p}=yield v.from("articles").select("id, title, slug, excerpt, image_url, rss_image_url, soap_name, published_at").in("source",["internal","ghost"]).eq("status","published").eq("soap_name",t.tag).order("published_at",{ascending:!1}).limit(60);l||(i(p!=null?p:[]),m(!1))}),()=>{l=!0}},[t]);const a=c.useMemo(()=>S(t==null?void 0:t.tag),[t]);if(!t)return e.jsx(k,{to:"/events-hub",replace:!0});const[n,...g]=s;return e.jsxs(e.Fragment,{children:[e.jsx(y,{title:"".concat(t.title," â Live Hub, News & Fan Reactions | Soapland TV"),description:"The Soapland TV ".concat(t.title," hub: ").concat(t.blurb),canonical:"https://soaplandtv.co.uk/events-hub/".concat(t.slug)}),e.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[e.jsxs("header",{className:"relative overflow-hidden border-b border-white/10",style:{background:"linear-gradient(135deg, ".concat(t.accent,"26, ").concat(t.accent2,"1a)"),boxShadow:"0 8px 60px ".concat(t.glow)},children:[e.jsx("div",{className:"absolute -top-20 -right-20 w-96 h-96 rounded-full blur-3xl op
1acity-30 pointer-events-none",style:{background:t.accent},"aria-hidden":!0}),e.jsxs("div",{className:"app-shell px-4 md:px-6 py-10 md:py-14 relative",children:[e.jsxs(u,{to:"/events-hub",className:"inline-flex items-center gap-1.5 text-xs font-bold uppercase tracking-wider text-white/70 hover:text-white mb-4",children:[e.jsx(_,{size:14})," All events"]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("span",{className:"w-16 h-16 md:w-20 md:h-20 rounded-2xl flex items-center justify-center text-4xl md:text-5xl shrink-0",style:{background:"".concat(t.accent,"33"),border:"1px solid ".concat(t.accent,"77")},"aria-hidden":!0,children:t.emoji}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h1",{className:"text-3xl md:text-5xl font-extrabold tracking-tight text-white leading-tight",children:t.title}),e.jsx("p",{className:"text-sm md:text-base text-white/70 mt-2 max-w-2xl",children:t.blurb}),e.jsx("div",{className:"mt-3 inline-flex items-center gap-2 text-xs font-bold uppercase tracking-wider px-3 py-1.5 rounded-full",style:{background:"".concat(t.accent,"26"),color:t.accent,border:"1px solid ".concat(t.accent,"66")},children:r?e.jsxs(e.Fragment,{children:[e.jsx(L,{size:12,className:"animate-pulse"})," Live now"]}):e.jsxs(e.Fragment,{children:[e.jsx(C,{size:12})," ",h>0?"".concat(h,"d ").concat(d,"h to go"):"".concat(d,"h to go")]})})]})]})]})]}),e.jsxs("main",{className:"app-shell px-4 md:px-6 py-8 md:py-12",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-5",children:[e.jsxs("h2",{className:"text-xl md:text-2xl font-extrabold",children:[t.title," Latest"]}),e.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-white/50",children:"Newest first"})]}),o&&e.jsx("div",{className:"text-muted-foreground text-sm",children:"Loading articlesâ¦"}),!o&&s.length===0&&e.jsxs("div",{className:"rounded-2xl border border-border/40 p-10 text-center text-muted-foreground",children:["No articles tagged with ",e.jsx("span",{className:"font-semibold text-foreground",children:t.tag})," yet. Check back as the event approaches."]}),n&&e.jsxs(u,{to:w(n)||"#",className:"group block rounded-2xl overflow-hidden border border-border/40 hover:border-border transition mb-6",style:{boxShadow:"0 8px 40px ".concat(t.glow)},children:[e.jsx("div",{className:"h-[220px] sm:h-[260px] overflow-hidden bg-background",children:e.jsx(j,{src:n.image_url||n.rss_image_url,alt:n.title,className:"w-full h-full transition-opacity duration-500"})}),e.jsxs("div",{className:"p-5 md:p-6",children:[e.jsx("span",{className:"inline-block text-[10px] font-black uppercase tracking-wider px-2 py-0.5 rounded mb-2",style:{background:"".concat(a,"26"),color:a,border:"1px solid ".concat(a,"66")},children:t.tag}),e.jsx("h3",{className:"text-xl md:text-2xl font-extrabold leading-tight",children:n.title}),n.excerpt&&e.jsx("p",{className:"text-sm text-muted-foreground mt-2 line-clamp-2",children:n.excerpt})]})]}),g.length>0&&e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-5",children:g.map(l=>e.jsxs(u,{to:w(l)||"#",className:"group block rounded-xl overflow-hidden border border-border/40 hover:border-border transition bg-card",children:[e.jsx("div",{className:"h-[200px] sm:h-[240px] overflow-hidden bg-background",children:e.jsx(j,{src:l.image_url||l.rss_image_url,alt:l.title,className:"w-full h-full transition-opacity duration-500"})}),e.jsxs("div",{className:"p-4",children:[e.jsx("span",{className:"inline-block text-[9px] font-black uppercase tracking-wider px-1.5 py-0.5 rounded mb-1.5",style:{background:"".concat(a,"26"),color:a},children:t.tag}),e.jsx("h4",{className:"text-sm font-bold leading-snug line-clamp-3",children:l.title})]})]},l.id))})]})]})]})};export{z 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.