1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2040],{56598:function(e,s,r){"use strict";var i=r(57437),t=r(84425),a=r(20966),l=r.n(a);s.Z=e=>{let{listData:s}=e;return(0,i.jsx)("ul",{className:l()["icon-list"],children:s.map((e,s)=>(0,i.jsxs)("li",{className:l()["icon-list__item"],children:[(0,i.jsx)(t.default,{name:e.icon,className:l()["icon-list__icon"],iconClass:"white"}),e.content]},s))})}},82040:function(e,s,r){"use strict";var i=r(57437),t=r(2265),a=r(21317),l=r(43618),n=r(99746),o=r(11268),c=r(99376),m=r(68194),u=r(55546),d=r(46150),_=r(33145),g=r(26560),h=r(56598),p=r(91206),f=r(61183),x=r(84425),v=r(80712),j=r(92787),w=r(47457),N=r(36356),b=r.n(N);s.default=()=>{let[e]=(0,l.FV)(n.K3),[,s]=(0,t.useState)(null),[r,N]=(0,t.useState)([]),[y,k]=(0,t.useState)(null),[S,C]=(0,t.useState)(!1),[P,I]=(0,t.useState)(null),[E,Z]=(0,t.useState)(!1),[,A]=(0,l.FV)(n.Tj),[L,q]=(0,l.FV)(n.l9),T=(0,c.useRouter)(),B=(0,t.useRef)(null);(0,t.useEffect)(()=>{(0,j.Su)(v.zC,"GET").then(e=>{if(200===e.status){let s=e.data.filter(e=>(null==e?void 0:e.handle)==="register_form");s.length&&I(s[0])}else N("api content error on register page")})},[]);let R=()=>{(0,j.Su)(v.yQ,"GET").then(e=>{if(200!==e.status){console.warn("Something went wrong retrieving company options");return}q(e.data)})};(0,t.useEffect)(()=>{L||R()},[]);let W=e=>e.match(/^\S+@\S+\.\S+$/),D=e=>e.match(/^[0-9-+\s()]*$/),F=async r=>{var i,t,a,l;r.preventDefault(),N(null),k(null);let n=await (null===(i=B.current)||void 0===i?void 0:i.executeAsync());null===(t=B.current)||void 0===t||t.reset();let{firstName:o,lastName:c,password:m,confirmPassword:u,email:d,mobilePhone:_,companyName:g,businessCategory:h,marketingCommunications:p}=r.target;if(!W(d.value)){N({"invalid email":"The email you have entered is not valid"});return}if(!D(_.value)){N({"":"The phone number you have entered is not valid"});return}if(m.value!==u.value){N({"invalid password":"passwords do not match"});return}if(!h.value){N({"Business Area":"Please select your business area"});return}C(!0);let f=sessionStorage.getItem("queryParams");f&&(f=JSON.parse(f));let x=JSON.stringify({firstName:o.value,lastName:c.value,email:d.value,mobilePhone:_.value,password:m.value,companyName:g.value,companyBusinessCategory:parseInt(h.value,10),emailCommunications:p.checked,phoneCommunications:p.checked,campaignToken:null==e?void 0:e.token,isMobile:null!==(l=null===(a=navigator.userAgentData)||void 0===a?void 0:a.mobile)&&void 0!==l?l:/Android|iPhone|iPad|iPod/i.test(navigator.userAgent),captcha:n,...f&&{utm:{...f.utm_medium&&{medium:f.utm_medium},...f.utm_source&&{source:f.utm_source},...f.utm_campaign&&{campaign:f.utm_campaign},...f.utm_term&&{term:f.utm_term},...f.utm_content&&{content:f.utm_content},...f.gclid&&{gclid:f.gclid},...f.referrer&&{referrer:f.referrer}}}});s(d.value),(0,j.Su)("".concat(v.Ip,"?captcha=").concat(n),"POST",x).then(e=>{if(C(!1),![201,200].includes(e.status)){if(400===e.status){var s;N(null!==(s=e.data.violations)&&void 0!==s?s:{Error:"Something went wrong"})}else N({Error:"Something went wrong"});return}if((0,w.e)({event:"accountCreation",step:1}),200===e.status){k("An email has been sent to ".concat(d.value,". Please check to verify your account"));return}A(!0),T.push("/login")}).catch(()=>{N({Error:"Something went wrong"}),C(!1)})},M=()=>{Z(!E)};return(0,i.jsxs)("div",{className:b().register+" mx-auto",children:[(0,i.jsxs)("div",{className:b()["register__left-col"],children:[(0,i.jsx)(_.default,{src:"/assets/images/register-logo.svg",alt:"Leafletdrop",width:212,height:212,className:b().register__logo}),(0,i.jsx)(_.default,{src:"/assets/images/ld-google-reviews.png",alt:"Leafletdrop Google Reviews",width:164,height:28,className:b()["register__google-reviews"]+" mb-3"}),P&&(0,i.jsx)(g.Z,{as:"h2",className:b().register__heading,children:P.content}),P&&(0,i.jsx)("p",{className:b().register__description+" mb-6",children:null==P?void 0:P.subContent}),(0,i.jsxs)("div",{className:b().register__usps,children:[(0,i.jsxs)("div",{className:b()["register__usps-item"],children:[(0,i.jsx)(_.default,{src:"/assets/images/map.jpg",alt:"Leafletdrop Map",width:320,height:200,className:b()["register__usp-item-image"]}),(0,i.jsx)(g.Z,{as:"h4",className:b()["register__usp-item-heading"],children:"1. Where"}),(0,i.jsx)("p",{children:"Select your distribution area"})]}),(0,i.jsxs)("div",{className:b()["register__usps-item"],children:[(0,i.jsx)(_.default,{src:"/assets/images/library.jpg",alt:"Leafletdrop Map",width:320,height:200,className:b()["register__usp-item-image"]}),(0,i.jsx)(g.Z,{as:"h4",className:b()["register__usp-item-heading"],children:"2. What"}),(0,i.jsx)("p",{children:"Upload your leaflet design"})]}),(0,i.jsxs)("div",{className:b()["register__usps-item"],children:[(0,i.jsx)(_.default,{src:"/assets/images/households.jpg",alt:"Leafletdrop Delivery",width:320,height:200,className:b()["register__usp-item-image"]}),(0,i.jsx)(g.Z,{as:"h4",className:b()["register__usp-item-heading"],children:"3. When"}),(0,i.jsx)("p",{children:"Choose your distribution dates"})]})]}),(null==P?void 0:P.children)&&(0,i.jsx)(h.Z,{listData:P.children}),(0,i.jsx)(g.Z,{as:"h4",className:"mt-8 mb-4",children:"The power of leaflets"}),(0,i.jsxs)("div",{className:b()["register__power-items"]+" flex gap-6",children:[(0,i.jsxs)("div",{className:b()["register__power-item"],children:[(0,i.jsx)("span",{className:b()["register__power-item-number"],children:"89%"}),(0,i.jsx)("span",{className:b()["register__power-item-text"],children:"consumers remember it"})]}),(0,i.jsxs)("div",{className:b()["register__power-item"],children:[(0,i.jsx)("span",{className:b()["register__power-item-number"],children:"67%"}),(0,i.jsx)("span",{className:b()["register__power-item-text"],children:"made a purchase"})]})]})]}),(0,i.jsxs)("div",{className:b()["register__right-col"],children:[(0,i.jsx)("p",{className:b().register__subheading+" mb-6",children:"Create your free account in 1 minute, instant access. No card required."}),(0,i.jsxs)("form",{onSubmit:F,children:[(0,i.jsxs)("div",{className:"medium:flex gap-1 mb-5",children:[(0,i.jsx)("div",{className:"w-full mb-4 large:mb-0",children:(0,i.jsx)(m.II,{name:"firstName",label:"Your First Name*",style:"full",placeholder:"Please enter your first name",required:!0})}),(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(m.II,{name:"lastName",label:"Your Last Name*",style:"full",placeholder:"Please enter your last name",required:!0})})]}),(0,i.jsxs)("div",{className:"medium:flex gap-1 mb-5",children:[(0,i.jsx)("div",{className:"w-full mb-4 large:mb-0",children:(0,i.jsx)(m.II,{name:"email",label:"Business email address*",style:"full",placeholder:"Please enter your email address",required:!0})}),(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(m.II,{name:"mobilePhone",label:"Phone number*",style:"full",type:"tel",placeholder:"Please enter your phone number",required:!0})})]}),(0,i.jsxs)("div",{className:"medium:flex gap-1 mb-5",children:[(0,i.jsx)("div",{className:"w-full mb-4 large:mb-0",children:(0,i.jsx)(m.II,{name:"companyName",label:"Business N
1ame*",style:"full",placeholder:"Please enter your business name",required:!0})}),(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(m.Ph,{options:null==L?void 0:L.businessCategories,label:"Business Area*",name:"businessCategory",placeholder:"Select your industry",required:!0})})]}),(0,i.jsxs)("div",{className:"medium:flex gap-1 mb-5",children:[(0,i.jsx)("div",{className:"w-full relative mb-4 large:mb-0",children:(0,i.jsx)(m.II,{type:E?"text":"password",name:"password",label:"Choose a password*",placeholder:"Enter a password",icon:E?"eye-off":"eye",onIconClick:M,required:!0,"data-wc-ignore":"true"})}),(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(m.II,{type:E?"text":"password",name:"confirmPassword",label:"Confirm password*",style:"full",placeholder:"Confirm your password",icon:E?"eye-off":"eye",onIconClick:M,required:!0,"data-wc-ignore":"true"})})]}),(0,i.jsx)(a.Z,{sitekey:"".concat("6Lfm5TQoAAAAAEXQqPN6xcumRnjSwpcuMjkWySjk"),size:"invisible",ref:B,onErrored:()=>{N({Error:"Something went wrong with reCAPTCHA"})}}),(0,i.jsx)("p",{className:"mb-4",children:"Would you like to receive exclusive offers, voucher codes and information from Leafletdrop? We never share customer details with other companies."}),(0,i.jsx)("div",{className:"flex flex-col gap-2 mb-6",children:(0,i.jsx)(m.XZ,{name:"marketingCommunications",label:"Yes please",type:"checkbox"})}),r&&(0,i.jsx)(u.Z,{formErrors:r}),y&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.Z,{message:y,className:"mb-4"}),(0,i.jsx)("p",{className:"text-seaGreen-500 text-sm font-bold mb-4",children:(0,i.jsx)("a",{href:"https://leafletdrop.co.uk",children:"Visit Leafletdrop home"})})]}),(0,i.jsxs)(o.Z,{type:"submit",style:"international-orange",className:"w-full",children:["Create my account",(0,i.jsx)(x.default,{name:"arrow-left",iconClass:"white",className:"w-[22px] rotate-180 "}),S&&(0,i.jsx)(p.Z,{color:"white",size:"small"})]}),(0,i.jsx)("div",{className:"text-center mt-4",children:(0,i.jsx)(f.Z,{href:"/login",children:"Already have an account? Log in"})})]}),(0,i.jsx)("hr",{className:b().register__divider}),(0,i.jsxs)("p",{className:b().register__terms,children:["By creating an account, you agree to our ",(0,i.jsx)("a",{className:b().register__link,href:"https://leafletdrop.co.uk/terms-and-conditions",target:"_blank",children:"terms of service"})," and ",(0,i.jsx)("a",{className:b().register__link,href:"https://leafletdrop.co.uk/privacy-policy",target:"_blank",children:"privacy policy"}),"."]})]})]})}},20966:function(e){e.exports={"icon-list":"icon-list_icon-list__W9dmH","icon-list__item":"icon-list_icon-list__item___iLi2","icon-list__icon":"icon-list_icon-list__icon__Odjt9"}},36356:function(e){e.exports={register:"register_register__u_Fu6","register__left-col":"register_register__left-col__T6MRk","register__right-col":"register_register__right-col__ZR9Hx",register__usps:"register_register__usps__gqOEP","register__usps-item":"register_register__usps-item__e44HD",register__subheading:"register_register__subheading__l1tcp",register__group:"register_register__group__Q8i1e",register__logo:"register_register__logo__Bg9lU","register__power-items":"register_register__power-items__dkzG_","register__power-item":"register_register__power-item__gKKQL","register__power-item-number":"register_register__power-item-number__hYPwE","register__power-item-text":"register_register__power-item-text__mlELk",register__heading:"register_register__heading__dZ9RL",register__description:"register_register__description__M_Hi0",register__divider:"register_register__divider__a_DQY",register__terms:"register_register__terms__J3l66",register__link:"register_register__link__IhX9u"}}}]); 2//# sourceMappingURL=2040-b7515ed76a5e715e.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.