PageSourceSearch

https://www.nootropics.com/_next/static/chunks/002im..1k9j8t.js?dpl=dpl_CiSHKrBFLPe8EWKSqeVunY55Y9iP

js nootropics.com collected 2026-09-24 23:32:24 UTC 3,046 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,49049,e=>{"use strict";var a=e.i(43476),r=e.i(71645);let l=[{value:"general",label:"General"},{value:"editorial",label:"Editorial / Correction"},{value:"vendor-verified",label:"Vendor, Verified tier"},{value:"vendor-featured",label:"Vendor, Featured tier"},{value:"partnership",label:"Partnership / Press"}];e.s(["ContactForm",0,function({initialTopic:e="general"}){let[s,o]=(0,r.useState)({name:"",email:"",topic:e,message:""});(0,r.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("topic");e&&l.some(a=>a.value===e)&&o(a=>({...a,topic:e}))},[]);let[t,n]=(0,r.useState)("idle"),[c,i]=(0,r.useState)(null);async function d(a){a.preventDefault(),n("loading"),i(null);try{let a=await fetch("/api/contact",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r?.error||"Send failed");n("ok"),o({name:"",email:"",topic:e,message:""})}catch(e){n("error"),i(e instanceof Error?e.message:"Send failed")}}return(0,a.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,a.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"eyebrow block mb-1.5",children:"Name"}),(0,a.jsx)("input",{type:"text",required:!0,value:s.name,onChange:e=>o({...s,name:e.target.value}),className:"w-full rounded-md border border-[var(--border)] bg-[color:var(--background)] px-3 py-2 text-sm"})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"eyebrow block mb-1.5",children:"Email"}),(0,a.jsx)("input",{type:"email",required:!0,value:s.email,onChange:e=>o({...s,email:e.target.value}),className:"w-full rounded-md border border-[var(--border)] bg-[color:var(--background)] px-3 py-2 text-sm"})]})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"eyebrow block mb-1.5",children:"Topic"}),(0,a.jsx)("select",{value:s.topic,onChange:e=>o({...s,topic:e.target.value}),className:"w-full rounded-md border border-[var(--border)] bg-[color:var(--background)] px-3 py-2 text-sm",children:l.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"eyebrow block mb-1.5",children:"Message"}),(0,a.jsx)("textarea",{required:!0,rows:6,value:s.message,onChange:e=>o({...s,message:e.target.value}),className:"w-full rounded-md border border-[var(--border)] bg-[color:var(--background)] px-3 py-2 text-sm"})]}),(0,a.jsx)("button",{type:"submit",disabled:"loading"===t,className:"btn-primary text-sm disabled:opacity-50",children:"loading"===t?"Sending…":"Send message"}),"ok"===t?(0,a.jsx)("p",{className:"text-sm text-[color:var(--success)]",children:"Message received. We'll reply within 2 business days."}):null,"error"===t&&c?(0,a.jsx)("p",{className:"text-sm text-[color:var(--destructive)]",children:c}):null]})}])}]);

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.