PageSourceSearch

https://www.starlight.org/_next/static/chunks/1011.79605a6c3266f5c6.js

js starlight.org collected 2026-09-24 18:20:19 UTC 6,157 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1011],{1011:(e,t,a)=>{a.r(t),a.d(t,{FundProgramForm:()=>g});var s=a(41996),l=a(41728),i=a(75580),r=a(29286),n=a(4912),o=a(94908),d=a(5571),m=a(93052),c=a(47845),x=a(17225);function u(e){let{title:t,cost:a,unitDescription:i,step:r,onQuantityUpdate:n,image:d,onUnitAmountChange:m}=e,[c,u]=l.useState(0),h=l.useCallback(e=>{e.preventDefault();let t=c+r;u(t),n("add",a*r),m(t)},[a,n,m,r,c]),g=l.useCallback(e=>{e.preventDefault();let t=c-r;if(t<0)return!1;u(t),n("subtract",a*r),m(t)},[a,n,m,r,c]);return(0,s.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,s.jsx)("div",{className:"leading-0 relative mb-4 w-32 lg:w-36",children:(0,s.jsx)(x.default,{alt:t,className:"h-auto max-w-full rounded-full",height:152,src:d,width:152})}),(0,s.jsx)("h4",{className:"title-sm mb-2",children:t}),(0,s.jsxs)("div",{className:"text-muted-foreground mb-4",children:[(0,o.vv)(a)," ",i]}),(0,s.jsxs)("div",{className:"text-blue mt-auto flex items-center justify-between",children:[(0,s.jsx)("button",{className:"border-blue focus:outline-hidden active:bg-blue h-8 w-8 appearance-none rounded-full border-2 bg-white text-2xl active:text-white",onClick:g,children:"-"}),(0,s.jsx)("span",{className:"font-greycliff-extrabold w-20 text-2xl ",children:c}),(0,s.jsx)("input",{name:"vr",type:"hidden",value:c}),(0,s.jsx)("button",{className:"border-blue focus:outline-hidden active:bg-blue h-8 w-8 appearance-none rounded-full border-2 bg-white text-2xl active:text-white",onClick:h,children:"+"})]})]})}var h=a(21791);function g(){let e=l.useRef(null),[t,a]=l.useState(0),{setValue:x,register:g,handleSubmit:p,formState:f}=(0,r.mN)({defaultValues:{gaming_units:0,gaming_total:(0,o.vv)(0),gaming_handheld_units:0,gaming_handheld_total:(0,o.vv)(0),toys_units:0,toys_total:(0,o.vv)(0),total:(0,o.vv)(0),first_name:"",last_name:"",email:"",phone:"",zip_code:""}}),[b,j]=(0,i.mN)(n.pi),v=l.useCallback((e,s)=>"add"===e?a(t+s):a(t-s),[t]);return b.succeeded?(0,s.jsxs)("div",{className:"mx-auto mb-8 flex max-w-xl flex-col items-center gap-3 lg:mb-16",children:[(0,s.jsx)(m.I,{className:"text-yellow",height:40,use:"flare",width:80}),(0,s.jsx)("h2",{className:"display-sm text-foreground text-center",children:"Thank you for your pledge!"}),(0,s.jsx)("div",{className:"text-muted-foreground text-center text-base lg:text-lg",children:"A Starlight staff member will be reaching out to you shortly with next steps."})]}):(0,s.jsxs)("section",{className:"mx-auto max-w-3xl px-6 sm:px-12 md:max-w-6xl",children:[(0,s.jsxs)("section",{className:"mb-16",ref:e,children:[(0,s.jsxs)("div",{className:"mx-auto mb-8 flex max-w-xl flex-col items-center gap-3 lg:mb-16",children:[(0,s.jsx)(m.I,{className:"text-yellow",height:40,use:"flare",width:80}),(0,s.jsx)("h2",{className:"display-sm text-foreground text-center",children:"Which program would you like to fund?"})]}),(0,s.jsxs)("div",{className:"grid gap-5 gap-y-12 sm:grid-cols-2 lg:grid-cols-3",children:[(0,s.jsx)(u,{cost:5e3,image:"/img/hospital-sponsorship/gaming.jpg",onQuantityUpdate:v,onUnitAmountChange:e=>{x("gaming_units",e),x("gaming_total",(0,o.vv)(5e3*e))},step:1,title:"Starlight Nintendo Switch",unitDescription:"to fund"}),(0,s.jsx)(u,{cost:1600,image:"/img/hospital-sponsorship/gaming-handheld.jpg",onQuantityUpdate:v,onUnitAmountChange:e=>{x("gaming_handheld_units",e),x("gaming_handheld_total",(0,o.vv)(1600*e))},step:1,title:"Starlight Nintendo Switch, Handheld",unitDescription:"to fund"}),(0,s.jsx)(u,{cost:400,image:"/img/hospital-sponsorship/toys.jpg",onQuantityUpdate:v,onUnitAmountChange:e=>{x("toys_units",e),x("toys_total",(0,o.vv)(400*e))},step:1,title:"Starlight Bundle of 75 Toy Sets",unitDescription:"to fund"})]})]}),(0,s.jsxs)("section",{className:"mx-auto flex max-w-2xl flex-col items-center px-6",children:[(0,s.jsx)("div",{className:"bg-muted h-2 w-12"}),(0,s.jsx)("h3",{className:"display-base text-foreground mx-0 mt-3 text-center md:mt-8 md:text-5xl lg:mt-10",children:(0,s.jsx)("small",{className:"block text-xs md:text-lg lg:mb-2 lg:text-2xl",children:"Your funding pledge:"})}),(0,s.jsx)("div",{className:"display-base text-foreground mx-0 mb-8 text-center md:mb-8 md:text-5xl lg:mb-10",children:(0,o.vv)(t)}),(0,s.jsx)("p",{className:"mb-12 text-base md:text-xl",children:"Please complete the form below and a Starlight staff member will c
1ontact you to get started with the process of funding a Starlight program. Want your program to make an impact in your community? Provide your zip code and we will work with you to identify a local hospital in need of Starlight programs."}),(0,s.jsxs)("form",{className:"grid gap-8",onSubmit:p(j),children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-8",children:[(0,s.jsx)(c.p,{"aria-label":"First Name",placeholder:"First name",required:!0,type:"text",...g("first_name",{required:!0})}),(0,s.jsx)(i.yI,{errors:b.errors,field:"first_name",prefix:"First Name"}),(0,s.jsx)(c.p,{"aria-label":"Last Name",placeholder:"Last name",required:!0,type:"text",...g("last_name",{required:!0})}),(0,s.jsx)(i.yI,{errors:b.errors,field:"last_name",prefix:"Last Name"}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(c.p,{"aria-label":"Email",placeholder:"Email address",required:!0,type:"text",...g("email",{required:!0,pattern:{value:/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,message:"Invalid email address"}})}),(0,s.jsx)(i.yI,{errors:b.errors,field:"email",prefix:"Email address"})]}),(0,s.jsx)(c.p,{"aria-label":"Phone",placeholder:"Phone number",required:!0,type:"text",...g("phone",{required:!0})}),(0,s.jsx)(i.yI,{errors:b.errors,field:"phone",prefix:"Phone Number"}),(0,s.jsx)(c.p,{"aria-label":"Zip code",placeholder:"Zip code",required:!0,type:"text",...g("zip_code",{required:!0})}),(0,s.jsx)(i.yI,{errors:b.errors,field:"zip_code",prefix:"Zip Code"})]}),(0,s.jsxs)(d.$,{className:"bg-primary text-primary-foreground",disabled:0===t||b.submitting,onClick:()=>x("total",(0,o.vv)(t)),type:"submit",children:["Pledge ",(0,o.vv)(t)]})]})]}),(0,s.jsx)(h.a,{})]})}}}]);
2//# sourceMappingURL=1011.79605a6c3266f5c6.js.map

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.