1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6238],{16484:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/current-member-sms",function(){return a(51242)}])},51242:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>m});var i=a(37876),s=a(14232),r=a(8145),n=a.n(r),l=a(89099),o=a(88992),c=a(46462);let d=JSON.parse('{"title":[{"type":"heading1","text":"SMS Signup","spans":[],"direction":"ltr"}],"description":[{"type":"paragraph","text":"Stay up to date and be the first to know about specials, savings, and customization periods!","spans":[],"direction":"ltr"}],"background_image":{"dimensions":{"width":1600,"height":736},"alt":"SMS collection form background","copyright":null,"url":"https://images.prismic.io/birchbox/ZhRIzhrFxhpPBYTn_sms-background.jpg?auto=format%2Ccompress&rect=0%2C0%2C1843%2C848&w=1600&h=736","id":"ZhRIzhrFxhpPBYTn","edit":{"x":0,"y":0,"zoom":1,"background":"transparent"}},"background_image_mobile":{"dimensions":{"width":583,"height":778},"alt":null,"copyright":null,"url":"https://images.prismic.io/birchbox/ZhRvMxrFxhpPBYcf_mobile-image.jpg?auto=format,compress","id":"ZhRvMxrFxhpPBYcf","edit":{"x":0,"y":0,"zoom":1,"background":"transparent"}},"small_print":[{"type":"paragraph","text":"By submitting this form, you confirm you want to receive automated promotional and personalized marketing text messages (e.g. cart reminders) from Birchbox at the cell number used when signing up. Consent is not a condition of any purchase. Reply HELP for help and STOP to cancel. Message frequency varies. Message & data rates may apply. View Privacy Policy & Terms.","spans":[{"start":344,"end":358,"type":"hyperlink","data":{"link_type":"Web","url":"https://www.birchbox.com/privacy-policy","target":"_blank"}},{"start":361,"end":366,"type":"hyperlink","data":{"link_type":"Web","url":"https://www.birchbox.com/terms-conditions","target":"_blank"}}],"direction":"ltr"}],"confirmation_header":[{"type":"paragraph","text":"Check your phone!","spans":[],"direction":"ltr"}],"confirmation_summary":[{"type":"paragraph","text":"We sent a text to your number. Reply Y to confirm your opt-in and start receiving updates about customization windows, exclusive deals, and more.","spans":[],"direction":"ltr"}],"braze_subscription_group":[{"type":"paragraph","text":"056b9729-188b-4068-b507-a4def52fc533","spans":[],"direction":"ltr"}],"braze_custom_event_name":[{"type":"paragraph","text":"current-member-sms-signup","spans":[],"direction":"ltr"}]}');
1function m(){let e=(0,l.useRouter)(),[t,a]=(0,s.useState)(""),[r,m]=(0,s.useState)(""),[u,p]=(0,s.useState)(""),[h,b]=(0,s.useState)(""),[x]=(0,s.useState)(d.braze_subscription_group[0].text),[g]=(0,s.useState)(d.braze_custom_event_name[0].text),[y,f]=(0,s.useState)(!1),[_,v]=(0,s.useState)(!1),[w,j]=(0,s.useState)("");(0,s.useEffect)(()=>{window.location.host.includes(".co.uk")?b("GB"):b("US")},[]),(0,s.useEffect)(()=>{var e,t;window.innerWidth<=600?j(null==d||null==(e=d.background_image_mobile)?void 0:e.url):j(null==d||null==(t=d.background_image)?void 0:t.url)},[]),(0,s.useEffect)(()=>{e.query.email&&a(e.query.email)},[e.query.email]);let{handleSubmit:N}=(0,o.mN)({mode:"onChange"});return(0,i.jsx)("section",{id:"current_member_sms",style:{backgroundImage:"url(".concat(w,")"),backgroundSize:"cover"},className:"pb-[16vh] pt-[8vh]",children:(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"container flex justify-center",children:(0,i.jsx)("div",{className:"content-wrapper flex flex-col justify-center items-center text-center px-10 lg:px-14 md:px-14 max-w-[500px] py-14 lg:py-16 bg-white rounded shadow-bbx-lg border border-gray-200 mx-1.5",children:y?(0,i.jsxs)("div",{id:"form_success",children:[(0,i.jsxs)("h1",{className:"text-2xl font-medium md:text-3xl mb-8",children:[d.confirmation_header[0].text,"!"]}),(0,i.jsx)("div",{className:"mb-8",children:(0,i.jsx)("svg",{className:"mobile-phone-icon",width:"62",height:"128",viewBox:"0 0 62 128","aria-labelledby":"phoneSvgLabel","aria-hidden":"true",fill:"#000000",role:"img","data-attn-element-id":"E5vE",children:(0,i.jsx)("path",{fillRule:"nonzero",d:"M53.496 0C58.193 0 61.999 3.831 62 8.559v110.884c0 4.726-3.806 8.557-8.503 8.557H8.503C3.806 128 0 124.169 0 119.443V8.557C0 3.831 3.806 0 8.503 0zM15.759 3.813h-5.603c-3.192 0-5.78 2.604-5.78 5.816V117.88c0 3.212 2.588 5.816 5.78 5.816h41.613c3.192 0 5.78-2.604 5.78-5.816V9.63c0-3.212-2.587-5.816-5.779-5.816h-4.645c-.204.317-.237.786-.242 1.17v.303c0 .623-.885 2.198-2.348 2.377-1.392.169-12.006.017-13.092.001-1.088.016-11.703.168-13.09-.001-1.467-.179-2.351-1.754-2.351-2.377 0-.408.021-1.065-.243-1.473zM48 16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2V18a2 2 0 0 1 2-2h34zm-3 10H17a1 1 0 0 0-.993.883L16 27v2a1 1 0 0 0 .883.993L17 30h28a1 1 0 0 0 .993-.883L46 29v-2a1 1 0 0 0-1-1zm-18-6H17a1 1 0 0 0-.993.883L16 21v2a1 1 0 0 0 .883.993L17 24h10a1 1 0 0 0 .993-.883L28 23v-2a1 1 0 0 0-1-1z"})})}),(0,i.jsx)("p",{className:"justify-center mb-6",children:d.confirmation_summary[0].text})]}):(0,i.jsxs)("div",{id:"form_data",children:[(0,i.jsx)("h1",{className:"text-2xl font-medium md:text-3xl mb-4",children:d.title[0].text}),(0,i.jsx)("p",{className:"justify-center mb-6",children:d.description[0].text}),(0,i.jsxs)("form",{onSubmit:N(()=>{let e=t||r;v(!0),n().post("/api/braze/sms-opt-in",{email:e,phone:u,subscribeType:"sms",subscriptionGroupId:x,countryCode:h,eventName:g}).then(e=>{console.log(e.data),f(!0)}).catch(e=>console.error("Error:",e)).finally(()=>v(!1))}),className:"w-full mb-4",children:[(0,i.jsxs)("div",{className:"form-control mb-2",children:[(0,i.jsx)("input",{id:"signUpModalPhone",required:!0,className:"input ".concat(u?"is-filled":""),type:"tel",value:u,onChange:e=>p(e.target.value),pattern:"^\\d{10}$",title:"Please enter a valid 10-digit phone number."}),(0,i.jsx)("label",{htmlFor:"signUpModalPhone",className:"label",children:"Phone Number"})]}),t?(0,i.jsx)("input",{id:"signUpModalEmail",type:"hidden",value:t}):(0,i.jsxs)("div",{id:"customer_email_address",className:"mb-4",children:[(0,i.jsxs)("div",{className:"form-control",children:[(0,i.jsx)("input",{id:"signUpModalEmail",required:!0,className:"input ".concat(r?"is-filled":""),type:"email",value:r,onChange:e=>m(e.target.value)}),(0,i.jsx)("label",{htmlFor:"signUpModalEmail",className:"label",children:"Email"})]}),(0,i.jsx)("small",{className:"bg-gray-150 p-4 block text-gray-500 text-left",children:"Email address is used to connect your phone number to your subscription account"})]}),(0,i.jsx)("button",{type:"submit",className:"button button-primary w-full",disabled:_,children:_?"Sending...":"Submit"})]}),(0,i.jsx)("small",{className:"text-left",children:(0,i.jsx)(c.$,{field:d.small_print})})]})})})})})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=16484)),_N_E=e.O()}]); 2//# sourceMappingURL=current-member-sms-869210a59cb46cbc.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.