1var f=(a,x,o)=>new Promise((t,i)=>{var m=r=>{try{s(o.next(r))}catch(l){i(l)}},p=r=>{try{s(o.throw(r))}catch(l){i(l)}},s=r=>r.done?t(r.value):Promise.resolve(r.value).then(m,p);s((o=o.apply(a,x)).next())});import{u as b,r as c,j as e,N as y,af as j,L as u,A as w}from"./index-BFJMlFdP.js";import{T as N}from"./TopNav-CwFnLeUo.js";import{c as v,l as S}from"./soapHistory-CHHHR4H1.js";import{A as $}from"./arrow-left-DijVZ6wR.js";import{C as k}from"./calendar-fi9bOUh_.js";import{S as L}from"./share-2-DCvsHqwn.js";function D(){const{slug:a}=b(),[x,o]=c.useState("news"),[t,i]=c.useState(null),[m,p]=c.useState(!0);if(c.useEffect(()=>{if(!a)return;let n=!0;return v(a).then(d=>n&&i(d)).finally(()=>n&&p(!1)),()=>{n=!1}},[a]),!a)return e.jsx(y,{to:"/soap-history",replace:!0});const s=t?S(t.soap_name):"",r=t?t.yearsAgo===1?"One year ago today":"".concat(t.yearsAgo," years ago today"):"",l=t?new Date(t.published_at).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}):"",h=t?"".concat(r," â ").concat(s,": ").concat(t.title," | Soapland TV"):"This Day in Soap History | Soapland TV",g=()=>f(this,null,function*(){if(!t)return;const n="".concat(window.location.origin).concat(t.url),d="".concat(r," â ").concat(s,": ").concat(t.title);if(navigator.share)try{yield navigator.share({title:d,url:n});return}catch(A){}window.open("https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(d),"&url=").concat(encodeURIComponent(n)),"_blank","noopener,noreferrer")});return e.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[e.jsxs(j,{children:[e.jsx("title",{children:h}),(t==null?void 0:t.excerpt)&&e.jsx("meta",{name:"description",content:t.excerpt}),e.jsx("link",{rel:"canonical",href:"https://www.soaplandtv.co.uk/soap-history/".concat(a)})]}),e.jsx(N,{active:x,onChange:o}),e.jsxs("main",{className:"mx-auto w-full max-w-3xl px-4 py-10 md:py-14",children:[e.jsxs(u,{to:"/soap-history",className:"inline-flex items-center gap-1.5 text-sm font-semibold text-muted-foreground hover:text-foreground mb-6",children:[e.jsx($,{size:14})," Back to Soap History"]}),m?e.jsx("p",{className:"text-muted-foreground",children:"Loadingâ¦"}):t?e.jsxs("article",{className:"rounded-2xl border border-border bg-card p-6 md:p-8",style:{borderLeft:"4px solid #b8860b"},children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[11px] font-bold uppercase tracking-wider",style:{background:"rgba(184,134,11,0.15)",color:"#d9a23a"},children:[e.jsx(k,{size:12})," ",l]}
1),e.jsx("span",{className:"rounded-full bg-foreground/10 px-2.5 py-1 text-[10px] font-bold uppercase tracking-wider",children:s})]}),e.jsxs("h1",{className:"text-2xl md:text-3xl font-extrabold leading-tight",children:[r," â ",t.title]}),t.excerpt&&e.jsx("p",{className:"mt-4 text-base text-muted-foreground",children:t.excerpt}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[t.articleHref&&e.jsxs(u,{to:t.articleHref,className:"inline-flex items-center gap-1.5 rounded-full bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground hover:opacity-90",children:["Read the full article ",e.jsx(w,{size:14})]}),e.jsxs("button",{onClick:g,className:"inline-flex items-center gap-1.5 rounded-full border border-border px-4 py-2 text-sm font-semibold text-foreground/80 hover:bg-muted",children:[e.jsx(L,{size:14})," Share this moment"]})]})]}):e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-8 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Moment not found"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"This historical soap moment isn't available â try browsing the full archive."}),e.jsx(u,{to:"/soap-history",className:"text-primary font-semibold hover:underline",children:"View all soap history â"})]})]})]})}export{D 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.