PageSourceSearch

https://laprensatexas.com/assets/NewsletterSignup-oHS77B-n.js

js laprensatexas.com collected 2026-10-02 12:40:49 UTC 3,783 bytes, 1 lines download raw bytes

1import{K as e,U as t,s as n,t as r}from"./link-DWghAheB.js";import{t as i}from"./useServerFn-pr_eiGP2.js";import{n as a,r as o}from"./newsletter.functions-CcHw3lVm.js";import{S as s}from"./index-Bbp8Tcfr.js";var c=e(t(),1),l=n();function u({source:e,interests:t=[],eyebrow:n=`Newsletter`,heading:u=`Get La Prensa Texas in your inbox`,blurb:d=`Weekly bilingual headlines, community events, Gala news and We The Women updates. Join 2,390+ subscribers.`,tone:f=`light`}){let[p,m]=(0,c.useState)(``),[h,g]=(0,c.useState)(``),[_,v]=(0,c.useState)(`en`),y=i(a),b=o({mutationFn:n=>y({data:{email:n.email,name:n.name||null,language:n.language,source:e,interests:t}}),onSuccess:()=>{s.success(`You're on the list`,{description:`Look for La Prensa Texas in your inbox each week.`}),m(``),g(``)},onError:()=>{s.error(`We couldn't add you just now`,{description:`Please try again, or email [email protected].`})}}),x=f===`ink`;return(0,l.jsx)(`section`,{className:x?`bg-band px-6 py-12 text-band-foreground`:`border border-border bg-sienna-sand/40 px-6 py-12`,children:(0,l.jsxs)(`div`,{className:`mx-auto grid max-w-5xl gap-8 md:grid-cols-[1.1fr_1fr] md:items-center`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`p`,{className:x?`eyebrow text-sienna-sand`:`eyebrow text-sienna-clay`,children:n}),(0,l.jsx)(`h2`,{className:`mt-2 font-serif text-3xl leading-tight md:text-4xl`,children:u}),(0,l.jsx)(`p`,{className:x?`mt-3 max-w-md text-sm leading-relaxed text-band-foreground/85`:`mt-3 max-w-md text-sm leading-relaxed text-muted-foreground`,children:d})]}),(0,l.jsxs)(`form`,{className:`space-y-3`,onSubmit:e=>{e.preventDefault(),p.trim()&&b.mutate({email:p.trim(),name:h.trim(),language:_})},children:[(0,l.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,l.jsxs)(`label`,{className:`block`,children:[(0,l.jsx)(`span`,{className:`sr-only`,children:`Your name`}),(0,l.jsx)(`input`,{type:`text`,value:h,onChange:e=>g(e.target.value),placeholder:`First name (optional)`,autoComplete:`given-name`,className:`w-full border border-border bg-background px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-sienna-clay focus:outline-none`})]}),(0,l.jsxs)(`label`,{className:`block`,children:[(0,l.jsx)(`span`,{className:`sr-only`,children:`Email address`}),(0,l.jsx)(`input`,{type:`email`,required:!0,value:p,onChange:e=>m(e.target.value),placeholder:`[email protected]`,autoComplete:`email`,className:`w-full border border-border bg-background px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-sienna-clay focus:outline-none`})]})]}),(0,l.jsxs)(`fieldset`,{className:`flex items-center gap-4 text-xs`,children:[(0,l.jsx)(`legend`,{className:`sr-only`,children:`Preferred language`}),[{value:`en`,label:`English`},{value:`es`,label:`Español`}].map(t=>(0,l.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`input`,{type:`radio`,name:`newsletter-language-${e}`,value:t.value,checked:_===t.value,onChange:()=>v(t.value),className:`accent-sienna-clay`}),(0,l.jsx)(`span`,{className:x?`text-band-foreground/85`:`text-muted-foreground`,children:t.label})]},t.value))]}),(0,l.jsx)(`button`,{type:`submit`,disabled:b.isPending,className:`w-full bg-primary px-5 py-3 text-xs font-semibold tracking-widest text-primary-foreground uppercase transition-colors hover:bg-primary/90 disabled:opacity-60`,children:b.isPending?`Subscribing…`:`Subscribe free`}),(0,l.jsxs)(`p`,{className:x?`text-[0.7rem] text-band-foreground/75`:`text-[0.7rem] text-muted-foreground`,children:[`We never sell your address.`,` `,(0,l.jsx)(r,{to:`/newsletter/consent`,className:`underline decoration-sienna-clay underline-offset-2 hover:text-sienna-clay`,children:`Consent, privacy & unsubscribe`}),`.`]})]})]})})}export{u as t};

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.