PageSourceSearch

https://angelsagainstabuse.org/assets/NewsletterIssuePage-B1nucwhe.js

js angelsagainstabuse.org collected 2026-10-09 03:57:00 UTC 12,079 bytes, 1 lines download raw bytes

1import{ar as I,u as C,r as i,j as e,J as L,L as n,a6 as v,o as S,at as j,H as k,A as c,U as E,E as $}from"./vendor-react-Dnf50kmN.js";import{u as P,s as N,N as b,F as p,C as H}from"./index-BSH40KiC.js";import"./vendor-supabase-BEioi4Lp.js";function q(t){i.useEffect(()=>{if(!t)return;const a=document.title;document.title=`${t.month_label} Newsletter | Angels Against Abuse`;const s=document.querySelector('meta[name="description"]'),h=(s==null?void 0:s.content)??"";s&&(s.content=t.preview_text?`${t.preview_text} — Angels Against Abuse monthly newsletter serving Pinellas County, FL.`:`The ${t.month_label} newsletter from Angels Against Abuse — program updates, community partner spotlights, and upcoming events in Pinellas County.`);const u=[{"@context":"https://schema.org","@type":"NewsArticle",headline:t.subject_line||`${t.month_label} Newsletter — Angels Against Abuse`,description:t.preview_text||`The ${t.month_label} newsletter from Angels Against Abuse.`,datePublished:t.published_at,image:t.cover_image_url||void 0,url:`https://www.angelsagainstabuse.org/newsletter/${t.slug}`,publisher:{"@type":"NGO",name:"Angels Against Abuse, Inc.",url:"https://www.angelsagainstabuse.org",logo:{"@type":"ImageObject",url:"https://www.angelsagainstabuse.org/Angels-Logo.png"}}},{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://www.angelsagainstabuse.org"},{"@type":"ListItem",position:2,name:"Newsletter",item:"https://www.angelsagainstabuse.org/newsletter"},{"@type":"ListItem",position:3,name:t.month_label,item:`https://www.angelsagainstabuse.org/newsletter/${t.slug}`}]}].map(o=>{const r=document.createElement("script");return r.type="application/ld+json",r.textContent=JSON.stringify(o),document.head.appendChild(r),r});return()=>{document.title=a,s&&(s.content=h),u.forEach(o=>o.remove())}},[t])}function B({section:t}){return e.jsxs("div",{className:"bg-warm-50 rounded-2xl border border-warm-200 p-6 sm:p-8",children:[t.heading&&e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-navy-900 mb-4",children:t.heading}),t.body&&e.jsx("p",{className:"text-warm-700 leading-relaxed text-base whitespace-pre-line",children:t.body})]})}function F({section:t}){return e.jsx("div",{className:"bg-white rounded-2xl border border-warm-200 overflow-hidden",children:e.jsxs("div",{className:"border-l-4 border-gold-300 p-6 sm:p-8",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 mb-4",children:[t.heading&&e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-navy-900 leading-tight",children:t.heading}),t.badge&&e.jsx("span",{className:"shrink-0 px-3 py-1.5 bg-gold-50 text-gold-700 text-sm font-bold rounded-full border border-gold-200",children:t.badge})]}),t.body&&e.jsx("p",{className:"text-warm-700 leading-relaxed text-base mb-5 whitespace-pre-line",children:t.body}),t.cta_label&&t.cta_url&&e.jsxs("a",{href:t.cta_url,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-navy-800 text-white text-sm font-semibold rounded-full hover:bg-navy-700 transition-all duration-200 hover:-translate-y-0.5",children:[t.cta_label,e.jsx(c,{className:"w-4 h-4"})]})]})})}function O({partner:t}){return e.jsxs("div",{className:"bg-white rounded-xl border border-warm-200 p-5 hover:border-navy-300 hover:shadow-md transition-all duration-200",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-navy-50 flex items-center justify-center shrink-0 mt-0.5",children:e.jsx(E,{className:"w-4 h-4 text-navy-600"})}),e.jsx("h3",{className:"font-bold text-navy-900 text-sm leading-snug",children:t.name})]}),e.jsx("p",{className:"text-warm-600 text-sm leading-relaxed mb-3",children:t.mission}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.url&&e.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-semibold text-navy-700 hover:text-gold-600 transition-colors",children:["Visit Website",e.jsx($,{className:"w-3 h-3"})]}),t.email&&e.jsx("a",{href:`mailto:${t.email}`,className:"inline-flex items-center gap-1.5 text-xs font-semibold text-navy-700 hover:text-gold-600 transition-colors",children:t.email}),t.phone&&!t.url&&!t.email&&e.jsx("span",{className:"text-xs text-warm-500",children:t.phone})]})]})}function V({section:t}){return e.jsxs("div",{children:[t.heading&&e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-navy-900 mb-2",children:t.heading}),t.body&&e.jsx("p",{className:"text-warm-600 leading-relaxed text-sm",children:t.body})]}),t.items&&t.items.length>0&&e.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:t.items.map((a,s)=>e.jsx(O,{partner:a}
1,s))})]})}function R({section:t}){return e.jsxs("div",{className:"bg-navy-900 rounded-2xl p-6 sm:p-8 text-center",children:[t.heading&&e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-3",children:t.heading}),t.body&&e.jsx("p",{className:"text-softblue-200/80 leading-relaxed text-sm mb-5 max-w-xl mx-auto",children:t.body}),t.cta_label&&t.cta_url&&e.jsxs("a",{href:t.cta_url,className:"inline-flex items-center gap-2 px-6 py-3 bg-gold-300 text-navy-900 font-bold rounded-full hover:bg-gold-400 transition-all duration-200 hover:-translate-y-0.5",children:[t.cta_label,e.jsx(c,{className:"w-4 h-4"})]})]})}function D(t,a){switch(t.type){case"intro":return e.jsx(B,{section:t},a);case"event":return e.jsx(F,{section:t},a);case"partners":return e.jsx(V,{section:t},a);case"cta":return e.jsx(R,{section:t},a);case"text":return e.jsxs("div",{className:"bg-white rounded-2xl border border-warm-200 p-6 sm:p-8",children:[t.heading&&e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-navy-900 mb-4",children:t.heading}),t.body&&e.jsx("p",{className:"text-warm-700 leading-relaxed text-base whitespace-pre-line",children:t.body})]},a);default:return null}}function U(){const{slug:t}=I(),a=C(),[s,h]=i.useState(null),[l,u]=i.useState({prev:null,next:null}),[o,r]=i.useState(!0),[f,w]=i.useState(""),{ref:y,isInView:_}=P();return q(s),i.useEffect(()=>
1{t&&(r(!0),w(""),(async()=>{const{data:d,error:g}=await N.from("newsletters").select("*").eq("slug",t).eq("published",!0).maybeSingle();if(g||!d){w("Newsletter issue not found."),r(!1);return}h(d);const{data:x}=await N.from("newsletters").select("slug, month_label, published_at").eq("published",!0).order("published_at",{ascending:!1});if(x){const m=x.findIndex(A=>A.slug===t);u({next:m>0?x[m-1]:null,prev:m<x.length-1?x[m+1]:null})}r(!1)})())},[t]),o?e.jsxs("div",{className:"min-h-screen bg-warm-50",children:[e.jsx(b,{}),e.jsx("div",{className:"flex justify-center items-center min-h-screen",children:e.jsx(L,{className:"w-10 h-10 text-navy-400 animate-spin"})}),e.jsx(p,{})]}):f||!s?e.jsxs("div",{className:"min-h-screen bg-warm-50",children:[e.jsx(b,{}),e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen gap-4",children:[e.jsx("p",{className:"text-warm-600",children:f||"Issue not found."}),e.jsx("button",{onClick:()=>a("/newsletter"),className:"text-navy-700 font-semibold text-sm hover:underline",children:"Back to Newsletter Archive"})]}),e.jsx(p,{})]}):e.jsxs("div",{className:"min-h-screen bg-warm-50",children:[e.jsx(b,{}),e.jsxs("div",{className:"relative overflow-hidden bg-navy-900 pt-20",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-navy-950 via-navy-900 to-navy-800"}),s.cover_image_url&&e.jsx("img",{src:s.cover_image_url,alt:s.month_label,className:"absolute inset-0 w-full h-full object-cover opacity-20",loading:"eager",fetchPriority:"high"}),e.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-gold-300/10 rounded-full blur-3xl -translate-y-1/2 translate-x-1/3"}),e.jsxs("div",{ref:y,className:`relative z-10 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-20 sm:py-24 text-center transition-all duration-700 ${_?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:[e.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex items-center justify-center gap-1.5 text-softblue-300/70 text-xs mb-6",children:[e.jsx(n,{to:"/",className:"hover:text-softblue-200 transition-colors",children:"Home"}),e.jsx(v,{className:"w-3 h-3"}),e.jsx(n,{to:"/newsletter",className:"hover:text-softblue-200 transition-colors",children:"Newsletter"}),e.jsx(v,{className:"w-3 h-3"}),e.jsx("span",{className:"text-softblue-200",children:s.month_label})]}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-gold-300/20 border border-gold-300/30 rounded-full text-gold-300 text-xs font-bold uppercase tracking-widest mb-5",children:[e.jsx(S,{className:"w-3 h-3"}),s.month_label]}),e.jsx("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4 leading-tight",children:s.subject_line}),e.jsx("p",{className:"text-softblue-100/80 text-base sm:text-lg leading-relaxed max-w-2xl mx-auto",children:s.preview_text})]})]}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 sm:py-16",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row gap-10",children:[e.jsx("main",{className:"flex-1 min-w-0 space-y-8",children:s.content_sections.map((d,g)=>D(d,g))}),e.jsxs("aside",{className:"lg:w-80 shrink-0 space-y-6",children:[e.jsx(H,{}),e.jsxs("div",{className:"bg-white rounded-2xl border border-warm-200 p-6",children:[e.jsx("h3",{className:"font-bold text-navy-900 text-sm mb-3",children:"Newsletter Archive"}),e.jsx("p",{className:"text-warm-500 text-sm mb-4",children:"Browse all past issues of the Angel News newsletter."}),e.jsxs(n,{to:"/newsletter",className:"inline-flex items-center gap-1.5 text-sm font-semibold text-navy-700 hover:text-navy-900 transition-colors",children:[e.jsx(j,{className:"w-3.5 h-3.5"}),"View All Issues"]})]}),e.jsxs("div",{className:"bg-navy-900 rounded-2xl p-6 text-center",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-gold-300/20 flex items-center justify-center mx-auto mb-3",children:e.jsx(k,{className:"w-5 h-5 text-gold-300"})}),e.jsx("h3",{className:"font-bold text-white text-sm mb-2",children:"Support Our Mission"}),e.jsx("p",{className:"text-softblue-300/70 text-xs leading-relaxed mb-4",children:"Your donation helps us advocate for children and families in Pinellas County."}),e.jsxs(n,{to:"/#donate",className:"inline-flex items-center gap-1.5 px-4 py-2.5 bg-gold-300 text-navy-900 text-sm font-bold rounded-full hover:bg-gold-400 transition-all duration-200",children:["Donate Now",e.jsx(c,{className:"w-3.5 h-3.5"})]})]})]})]}),(l.prev||l.next)&&e.jsxs("nav",{className:"mt-14 pt-8 border-t border-warm-200 flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-4",children:[l.prev?e.jsxs(n,{to:`/newsletter/${l.prev.slug}`,className:"group flex items-center gap-3 px-5 py-4 bg-white rounded-xl border border-warm-200 hover:border-navy-300 hover:shadow-md transition-all duration-200 flex-1 sm:flex-initial",children:[e.jsx(j,{className:"w-4 h-4 text-navy-400 group-hover:text-navy-700 transition-colors shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-warm-400 mb-0.5",children:"Previous Issue"}),e.jsx("p",{className:"text-sm font-semibold text-navy-800 group-hover:text-navy-700 transition-colors",children:l.prev.month_label})]})]}):e.jsx("div",{className:"flex-1 sm:flex-initial"}),l.next?e.jsxs(n,{to:`/newsletter/${l.next.slug}`,className:"group flex items-center gap-3 px-5 py-4 bg-white rounded-xl border border-warm-200 hover:border-navy-300 hover:shadow-md transition-all duration-200 flex-1 sm:flex-initial text-right sm:flex-row-reverse",children:[e.jsx(c,{className:"w-4 h-4 text-navy-400 group-hover:text-navy-700 transition-colors shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-warm-400 mb-0.5",children:"Next Issue"}),e.jsx("p",{className:"text-sm font-semibold text-navy-800 group-hover:text-navy-700 transition-colors",children:l.next.month_label})]})]}):e.jsx("div",{className:"flex-1 sm:flex-initial"})]})]}),e.jsx(p,{})]})}
1export{U 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.