PageSourceSearch

https://stopantisemitism.org/assets/report-incident-B13UESeV.js

js stopantisemitism.org collected 2026-09-24 20:39:14 UTC 13,217 bytes, 1 lines download raw bytes

1import{c as u,d as I,e as P,r as x,j as e,t as c}from"./index-DxbgSn94.js";import{T as S}from"./triangle-alert-CNvgRAfj.js";import{L as C,S as F}from"./shield-check-DNYycT7Q.js";import{M as T}from"./mail-CIzW6ddA.js";const A=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],_=u("circle-check",A);const D=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],$=u("file-text",D);const H=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],q=u("upload",H);const U=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],B=u("user",U);I({method:"GET"}).handler(P("e73608c3976cc2c333e78a0b5747f9fea06da057fdb61967dc6a63e46593404f"));const Y=I({method:"POST"}).handler(P("1d78d21e74d3f49b1561d5ec3590ed21e144a850c58c836fa56ec3e50917f230"));function i({label:l,required:d,children:m,hint:t}){return e.jsxs("label",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 flex items-center gap-1 text-sm font-semibold text-brand-navy",children:[l,d&&e.jsx("span",{className:"text-brand-red",children:"*"})]}),m,t?e.jsx("span",{className:"mt-1 block text-xs text-neutral-500",children:t}):null]})}function g({icon:l,step:d,title:m,description:t}){return e.jsxs("div",{className:"mb-5 flex items-start gap-3 border-b border-neutral-200 pb-4",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-brand-red/10 text-brand-red",children:e.jsx(l,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-brand-red",children:d}),e.jsx("h2",{className:"text-lg font-bold text-brand-navy",children:m}),t?e.jsx("p",{className:"mt-0.5 text-sm text-neutral-600",children:t}):null]})]})}const n="w-full rounded-md border border-neutral-300 bg-white px-3 py-2.5 text-sm text-brand-navy shadow-sm transition focus:border-brand-red focus:outline-none focus:ring-2 focus:ring-brand-red/20";function K(){const[l,d]=x.useState(!1),[m,t]=x.useState(!1),[j,o]=x.useState(null),v=x.useRef(Date.now());x.useEffect(()=>{v.current=Date.now()},[]);async function L(y){y.preventDefault();const p=y.currentTarget,s=new FormData(p);o(null);const E=["date","location","description","firstName","lastName","email","phone"];for(const r of E){const a=s.get(r);if(!a||String(a).trim()===""){t(!1),o("Please complete all required fields."),c.error("Please complete all required fields.");return}}const w=String(s.get("email")||"");if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(w)){t(!1),o("Please enter a valid email address."),c.error("Please enter a valid email address.");return}const M=50*1024*1024,b=10,N=p.elements.namedItem("files"),f=N?.files?Array.from(N.files).filter(r=>r.size>0):[];if(f.length===0){o("Please attach at least one screenshot or supporting file as evidence."),c.error("Please attach at least one screenshot or supporting file as evidence.");return}if(f.length>b){o(`Please attach no more than ${b} files.`),c.error(`Please attach no more than ${b} files.`);return}d(!0),t(!1);try{const r=[];for(const a of f){if(a.size===0)continue;if(a.size>M)throw new Error(`"${a.name}" is larger than 50 MB.`);const k=new FormData;k.append("file",a);const h=await fetch("/api/public/incident-upload",{method:"POST",body:k});if(!h.ok){const z=await h.text().catch(()=>"");throw new Error(`Failed to upload "${a.name}": ${z||h.status}`)}const R=await h.json();r.push(R)}await Y({data:{date:String(s.get("date")||""),location:String(s.get("location")||""),description:String(s.get("description")||""),url:String(s.get("url")||""),firstName:String(s.get("firstName")||""),lastName:String(s.get("lastName")||""),email:w,phone:String(s.get("phone")||""),zip:String(s.get("zip")||""),evidenceFiles:r,hp:String(s.get("hp")||""),formOpenedAt:v.current}}
1),t(!0),c.success("Thank you. Your report has been submitted."),p.reset()}catch(r){console.error(r);const a=r instanceof Error&&r.message?r.message:null;t(!1),o(a||"Sorry, we couldn't submit your report. Please try again or email [email protected]."),c.error(a||"Sorry, we couldn't submit your report. Please try again or email [email protected].")}finally{d(!1)}}return e.jsxs("main",{className:"bg-gradient-to-b from-neutral-100 via-neutral-50 to-white",children:[e.jsxs("section",{className:"relative overflow-hidden bg-brand-navy text-white",children:[e.jsx("div",{className:"pointer-events-none absolute -top-32 -left-24 h-96 w-96 rounded-full bg-brand-red/30 blur-3xl","aria-hidden":!0}),e.jsx("div",{className:"pointer-events-none absolute -bottom-40 -right-24 h-[28rem] w-[28rem] rounded-full bg-blue-500/20 blur-3xl","aria-hidden":!0}),e.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-[0.07]",style:{backgroundImage:"linear-gradient(to right, white 1px, transparent 1px), linear-gradient(to bottom, white 1px, transparent 1px)",backgroundSize:"48px 48px"},"aria-hidden":!0}),e.jsxs("div",{className:"relative mx-auto max-w-5xl px-6 py-16 md:px-10 md:py-24",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-white/15 bg-white/5 px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-white/80 backdrop-blur",children:[e.jsx(S,{className:"h-3.5 w-3.5 text-brand-red"}),"Confidential Reporting"]}),e.jsxs("h1",{className:"mt-5 text-4xl font-bold uppercase tracking-tight md:text-6xl",children:["Report an ",e.jsx("span",{className:"text-brand-red",children:"Incident"})]}),e.jsx("p",{className:"mt-5 max-w-2xl text-base leading-relaxed text-white/85 md:text-lg",children:"If you have witnessed antisemitism, please let StopAntisemitism know by submitting the form below. Your report helps us document and respond to hate in real time."}),e.jsxs("div",{className:"mt-8 grid gap-3 sm:grid-cols-3",children:[e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-white/10 bg-white/[0.04] p-4 backdrop-blur",children:[e.jsx(C,{className:"mt-0.5 h-5 w-5 shrink-0 text-brand-red"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:"Anonymous"}),e.jsx("div",{className:"text-xs text-white/70",children:"Identity is never shared."})]})]}),e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-white/10 bg-white/[0.04] p-4 backdrop-blur",children:[e.jsx(F,{className:"mt-0.5 h-5 w-5 shrink-0 text-brand-red"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:"Secure"}),e.jsx("div",{className:"text-xs text-white/70",children:"Encrypted submission."})]})]}),e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-white/10 bg-white/[0.04] p-4 backdrop-blur",children:[e.jsx(S,{className:"mt-0.5 h-5 w-5 shrink-0 text-brand-red"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:"Emergency?"}),e.jsx("div",{className:"text-xs text-white/70",children:"Call 911 immediately."})]})]})]}),e.jsx("p",{className:"mt-6 text-xs font-semibold uppercase tracking-wider text-brand-red",children:"*We are unable to process incidents outside of the United States."})]})]}),e.jsx("section",{className:"relative -mt-10 pb-16 md:-mt-14 md:pb-24",children:e.jsxs("div",{className:"mx-auto max-w-3xl px-6 md:px-10",children:[m?e.jsxs("div",{role:"status","aria-live":"polite",className:"mb-6 flex items-start gap-3 rounded-xl border border-green-200 bg-green-50 px-5 py-4 text-sm font-semibold text-green-900 shadow-sm",children:[e.jsx(_,{className:"mt-0.5 h-5 w-5 shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{children:"Thank you for your submission."}),e.jsx("div",{className:"font-normal text-green-800/80",children:"Your report has been received and will be reviewed by our team."})]})]}):null,j?e.jsx("div",{role:"alert",className:"mb-6 rounded-xl border border-brand-red/30 bg-brand-red/10 px-5 py-4 text-sm font-semibold text-brand-red shadow-sm",children:j}):null,e.jsxs("form",{onSubmit:L,className:"overflow-hidden rounded-2xl border border-neutral-200 bg-white shadow-xl shadow-brand-navy
1/5",children:[e.jsx("div",{className:"border-b border-neutral-200 bg-gradient-to-br from-neutral-50 to-white px-6 py-5 md:px-8",children:e.jsxs("p",{className:"text-xs text-neutral-600",children:[e.jsx("span",{className:"font-semibold text-brand-red",children:"*"})," indicates a required field"]})}),e.jsxs("div",{className:"space-y-10 px-6 py-8 md:px-8 md:py-10",children:[e.jsxs("div",{children:[e.jsx(g,{icon:$,step:"Step 01",title:"Incident Details",description:"Tell us what happened, where, and when."}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsx(i,{label:"Date",required:!0,children:e.jsx("input",{type:"date",name:"date",required:!0,className:n})}),e.jsx(i,{label:"Where it happened",required:!0,children:e.jsx("input",{type:"text",name:"location",required:!0,maxLength:200,className:n,placeholder:"City, State, venue, etc."})})]}),e.jsx(i,{label:"Incident description",required:!0,hint:"Be as specific as possible. Include names, quotes, and context.",children:e.jsx("textarea",{name:"description",required:!0,maxLength:5e3,rows:6,className:n})}),e.jsx(i,{label:"Related URL",hint:"Link to a social media post, news article, or other online reference.",children:e.jsx("input",{type:"url",name:"url",maxLength:500,className:n,placeholder:"https://..."})})]})]}),e.jsxs("div",{children:[e.jsx(g,{icon:B,step:"Step 02",title:"Your Information",description:"Kept strictly confidential. Used only if we need to follow up."}),e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsx(i,{label:"First Name",required:!0,children:e.jsx("input",{type:"text",name:"firstName",required:!0,maxLength:100,className:n})}),e.jsx(i,{label:"Last Name",required:!0,children:e.jsx("input",{type:"text",name:"lastName",required:!0,maxLength:100,className:n})}),e.jsx(i,{label:"Email",required:!0,children:e.jsx("input",{type:"email",name:"email",required:!0,maxLength:255,className:n})}),e.jsx(i,{label:"Phone",required:!0,children:e.jsx("input",{type:"tel",name:"phone",required:!0,maxLength:30,className:n})}),e.jsx(i,{label:"ZIP Code",children:e.jsx("input",{type:"text",name:"zip",maxLength:10,className:n})})]})]}),e.jsxs("div",{children:[e.jsx(g,{icon:q,step:"Step 03",title:"Evidence (Required)",description:"Screenshots, photos, video, or PDFs documenting the incident are required."}),e.jsx("label",{className:"block",children:e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border-2 border-dashed border-neutral-300 bg-neutral-50/60 px-6 py-8 text-center transition hover:border-brand-red/50 hover:bg-brand-red/[0.03]",children:[e.jsx(q,{className:"mb-2 h-7 w-7 text-neutral-400"}),e.jsxs("div",{className:"text-sm font-semibold text-brand-navy",children:["Click to upload files ",e.jsx("span",{className:"text-brand-red",children:"*"})]}),e.jsx("div",{className:"mt-1 text-xs text-neutral-500",children:"Images, video, or PDF · Max 50 MB per file · Up to 10 files"}),e.jsx("input",{type:"file",name:"files",required:!0,multiple:!0,accept:"image/*,video/*,application/pdf",className:"mt-4 block w-full max-w-xs text-xs text-brand-navy file:mr-3 file:rounded-md file:border-0 file:bg-brand-navy file:px-3 file:py-1.5 file:text-[11px] file:font-bold file:uppercase file:tracking-wider file:text-white hover:file:bg-brand-navy/90"})]})})]}),e.jsx("div",{"aria-hidden":"true",style:{position:"absolute",left:"-10000px",width:1,height:1,overflow:"hidden"},children:e.jsxs("label",{children:["Leave this field empty",e.jsx("input",{type:"text",name:"hp",tabIndex:-1,autoComplete:"off"})]})}),e.jsxs("div",{className:"flex flex-col items-start gap-3 border-t border-neutral-200 pt-6 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("p",{className:"text-xs text-neutral-500",children:"By submitting, you confirm that the information provided is accurate to the best of your knowledge."}),e.jsx("button",{type:"submit",disabled:l,className:"inline-flex w-full items-center justify-center gap-2 rounded-md bg-brand-red px-8 py-3 text-sm font-bold uppercase tracking-wider text-white shadow-md shadow-brand-red/20 transition hover:bg-brand-red-hover hover:shadow-lg disabled:cursor-not-allowed disabled:opacity-60 sm:w-auto",children:l?"Submitting...":"Submit Report"})]})]})]}),e.jsxs("p",{className:"mt-6 flex items-center justify-center gap-2 text-center text-sm text-neutral-600",children:[e.jsx(T,{className:"h-4 w-4 shrink-0 text-brand-red"}),e.jsxs("span",{children:["Any questions? email us at"," ",e.jsx("a",{href:"mailto:[email protected]?subject=Incident%20Report",className:"font-semibold text-brand-navy underline underline-offset-4 transition hover:text-brand-red",children:"[email protected]"})]})]})]})})]})}export{K as component};

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.