PageSourceSearch

https://capetownjazzfest.com/_next/static/chunks/app/contact/page-3a86d41c9a636c2f.js

js capetownjazzfest.com collected 2026-10-02 05:04:04 UTC 5,631 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[977],{2356:(e,s,t)=>{"use strict";t.d(s,{default:()=>i});var a=t(3406),n=t(7409),l=t(1550);let r={name:"",email:"",phone:"",subject:"",message:"",nickname:""};function i(){let[e,s]=(0,l.useState)(r),[t,i]=(0,l.useState)(!1),[o,c]=(0,l.useState)({type:"idle",message:""}),d=e=>{let{name:t,value:a}=e.target;s(e=>({...e,[t]:a}))},m=async t=>{t.preventDefault(),i(!0),c({type:"idle",message:""});try{let t=await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();if(!t.ok||!(null==a?void 0:a.success))throw Error((null==a?void 0:a.error)||"Unable to send your message right now.");(0,n.sendGTMEvent)({event:"form_submit",form_name:"contact",form_status:"success"}),c({type:"success",message:"Thanks for reaching out. We will reply within 2 business days."}),s(r)}catch(e){(0,n.sendGTMEvent)({event:"form_submit",form_name:"contact",form_status:"error"}),c({type:"error",message:e instanceof Error?e.message:"Something went wrong. Please try again later."})}finally{i(!1)}},u="mt-2 w-full rounded-lg border border-black/10 bg-white px-4 py-3 text-sm text-black shadow-sm outline-none transition focus:border-brand-burnt focus:ring-2 focus:ring-brand-burnt/20";return(0,a.jsxs)("div",{className:"space-y-6",children:[o.message?(0,a.jsx)("p",{className:"rounded-lg border px-4 py-3 text-sm font-semibold ".concat("success"===o.type?"border-brand-lime bg-brand-lime/20 text-brand-lime":"border-brand-rose bg-brand-rose/20 text-brand-burnt"),role:"status","aria-live":"polite",children:o.message}):null,(0,a.jsxs)("form",{className:"grid gap-5",onSubmit:m,children:[(0,a.jsx)("div",{className:"sr-only","aria-hidden":!0,children:(0,a.jsxs)("label",{children:["Leave this field empty",(0,a.jsx)("input",{type:"text",name:"nickname",value:e.nickname,onChange:d,tabIndex:-1,autoComplete:"off",className:"hidden"})]})}),(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,a.jsxs)("label",{className:"text-sm font-semibold text-[#FFF8EE]",children:["Name *",(0,a.jsx)("input",{type:"text",name:"name",value:e.name,onChange:d,autoComplete:"name",placeholder:"Your name",required:!0,className:u})]}),(0,a.jsxs)("label",{className:"text-sm font-semibold text-[#FFF8EE]",children:["Email *",(0,a.jsx)("input",{type:"email",name:"email",value:e.email,onChange:d,autoComplete:"email",placeholder:"[email protected]",required:!0,className:u})]})]}),(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,a.jsxs)("label",{className:"text-sm font-semibold text-[#FFF8EE]",children:["Phone",(0,a.jsx)("input",{type:"tel",name:"phone",value:e.phone,onChange:d,autoComplete:"tel",placeholder:"Optional",className:u})]}),(0,a.jsxs)("label",{className:"text-sm font-semibold text-[#FFF8EE]",children:["Subject",(0,a.jsx)("input",{type:"text",name:"subject",value:e.subject,onChange:d,placeholder:"What is this about?",className:u})]})]}),(0,a.jsxs)("label",{className:"text-sm font-semibold text-[#FFF8EE]",children:["Message *",(0,a.jsx)("textarea",{name:"message",value:e.message,onChange:d,placeholder:"Tell us how we can help.",required:!0,rows:6,className:"".concat(u," resize-none")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("div",{"aria-hidden":!0}),(0,a.jsx)("button",{type:"submit",disabled:t,className:"inline-flex items-center justify-center rounded-full bg-brand-burnt px-6 py-3 text-sm font-semibold uppercase tracking-wide text-white transition hover:bg-black disabled:cursor-not-allowed disabled:opacity-60",children:t?"Sending...":"Send message"})]})]})]})}},5049:(e,s,t)=>{"use strict";t.d(s,{NewsletterOverlay:()=>l});var a=t(3406),n=t(1550);function l(){let[e,s]=(0,n.useState)(""),[t,l]=(0,n.useState)(!1),[r,i]=(0,n.useState)({type:"idle",message:""}),o=async t=>{t.preventDefault(),l(!0),i({type:"idle",message:""});try{let t=await fetch("/api/mailchimp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})}),a=await t.json();if(!t.ok||!(null==a?void 0:a.success))throw Error((null==a?void 0:a.error)||"Unable to sign you up right now.");i({type:"success",message:"You are on the list. Watch your inbox for a confirmation email."}),s("")}catch(e){i({type:"error",message:e instanceof Error?e.message:"Something went wrong. Please try again later."})}finally{l(!1)}};return(0,a.jsxs)("form",{onSubmit:o,className:"flex flex-col gap-2 lg:gap-3",children:[(0,a.jsx)("input",{type:"email",value:e,onCh
1ange:e=>s(e.target.value),placeholder:"your email address",required:!0,disabled:t,className:"w-full px-3 py-2 lg:px-4 lg:py-3 bg-white text-[#280F0F] placeholder:text-[#280F0F]/50 outline-none font-neue disabled:opacity-60",style:{fontSize:"14px"}}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("button",{type:"submit",disabled:t,className:"font-neue text-white flex items-center justify-center shrink-0 disabled:opacity-60 disabled:cursor-not-allowed h-9 w-[140px] lg:h-[51px] lg:w-[213px]",style:{backgroundColor:"#CC5309",fontSize:"14px"},children:t?"subscribing...":"subscribe"})}),r.message?(0,a.jsx)("p",{className:"font-neue",style:{fontSize:"10px",color:"success"===r.type?"#280F0F":"#CC5309",fontWeight:600},role:"status","aria-live":"polite",children:r.message}):null]})}},7943:(e,s,t)=>{Promise.resolve().then(t.bind(t,2356)),Promise.resolve().then(t.bind(t,5049)),Promise.resolve().then(t.t.bind(t,9156,23)),Promise.resolve().then(t.t.bind(t,8997,23))}},e=>{e.O(0,[8997,9156,7409,4040,3862,7358],()=>e(e.s=7943)),_N_E=e.O()}]);

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.