1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[95],{27724:function(e,r,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/personal",function(){return s(91821)}])},2565:function(e,r,s){"use strict";var a=s(35250),n=s(75360),t=s(96684),l=s.n(t);r.Z=({className:e,id:r="",children:s,variant:t="black",name:c,value:i,required:o,defaultChecked:u,labelClassName:d,onChange:m})=>(0,a.jsxs)("div",{className:(0,n.cn)(e,l().checkbox),children:[(0,a.jsx)("input",{className:l().input,id:r||c,name:c,value:i,defaultChecked:u,type:"checkbox",required:o,"aria-required":o,onChange:m}),(0,a.jsxs)("label",{className:(0,n.cn)(d||"mono-10",l().label),htmlFor:r||c,children:[(0,a.jsx)("span",{"aria-hidden":!0,"aria-label":"checkbox button",role:"checkbox","aria-checked":u,className:(0,n.cn)(l().box,l()[t])}),(0,a.jsx)("span",{children:s})]})]})},44396:function(e,r,s){"use strict";s.d(r,{l:function(){return p}});var a,n,t=s(35250),l=s(70079),c=s(43647),i=s(18595),o=s(75360),u=s(50064),d=s(89135),m=s.n(d);function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}var f=e=>l.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",role:"presentation"},e),a||(a=l.createElement("mask",{id:"a",width:13,height:12,x:0,y:0,maskUnits:"userSpaceOnUse"},l.createElement("path",{fill:"#d9d9d9",d:"M.5 0h12v12H.5z"}))),n||(n=l.createElement("g",{mask:"url(#a)"},l.createElement("path",{fill:"#eb5757",d:"M6.5 8.5q.213 0 .356-.144C7 8.212 7 8.142 7 8s-.048-.26-.144-.356S6.642 7.5 6.5 7.5s-.26.048-.356.144S6 7.858 6 8s.048.26.144.356.214.144.356.144m-.5-2h1v-3H6zm.5 4.5a4.9 4.9 0 0 1-1.95-.394q-.912-.394-1.587-1.069c-.676-.675-.807-.979-1.07-1.587S1.5 6.692 1.5 6s.131-1.342.394-1.95.618-1.138 1.069-1.588.979-.806 1.587-1.068S5.808 1 6.5 1s1.342.131 1.95.394 1.138.618 1.588 1.068.806.98 1.068 1.588q.394.912.394 1.95c0 1.038-.131 1.342-.394 1.95q-.394.912-1.069 1.587c-.675.675-.979.807-1.587 1.07A4.9 4.9 0 0 1 6.5 11m0-1q1.675 0 2.838-1.162C10.5 7.676 10.5 7.117 10.5 6s-.387-2.062-1.162-2.837S7.617 2 6.5 2s-2.062.388-2.837 1.163S2.5 4.883 2.5 6s.388 2.063 1.163 2.838S5.383 10 6.5 10"}))));let p=(0,l.forwardRef)(({className:e,children:r,errors:s,submitLabel:a,buttonClassName:n,messageClassName:d,successMessage:h,buttonVariant:p,onSubmit:x,hideFormOnSuccess:g,style:j},v)=>{let[_,b]=(0,l.useState)(null),[w,N]=(0,l.useState)(null),[k,y]=(0,l.useState)(!1),[S,Z]=(0,l.useState)(!1),E=(0,i.Z)(),C=(0,l.useRef)(E("An error occured, please try again later")),R=async e=>{e.preventDefault(),Z(!0),y(!0),b(null),N(null);let r=e.currentTarget,a=new FormData(r),n=Array.from(a.entries()).reduce((e,[r,s])=>({...e,[r]:s}),{}),t=await x(a,r,n);try{if(t?.errors?.length){let e=t.errors[0],r=e.code,a=e.message;b(r&&s?.[r]||a||C.current)}else t?.success&&(N(h||t?.success),y(!1),r.reset())}catch(r){let e=r&&JSON.parse(JSON.stringify(r,void 0,2));b(e?.response?.errors?.[0]?.message||C.current)}Z(!1)};return(0,t.jsx)("form",{ref:v,className:(0,o.cn)(m().form,e),style:j,onInvalid:e=>{e.preventDefault(),y(!0),b(null)},onSubmit:R,children:(0,t.jsxs)(c.Z.Provider,{value:{hasValidation:k,isLoading:S},children:[(0,t.jsxs)("div",{className:g&&w&&m().hidden,children:[r,(0,t.jsx)("div",{className:m().wrapper,children:(0,t.jsx)(u.Z,{type:"submit",variant:p||"secondary",className:(0,o.cn)("w-full overflow-hidden",n),children:a})})]}),(_||w)&&(0,t.jsxs)("div",{className:(0,o.cn)("p-13",m().message,g&&m().noMargin,d,w&&m().success,_&&m().error),"data-test":"test",children:[!w&&(0,t.jsx)(f,{}),_||w]})]})})})},98715:function(e,r,s){"use strict";s.d(r,{u:function(){return c}});var a=s(35250),n=s(77145),t=s(18595),l=s(70079);let c=({form:e,onChange:r,inputClassName:s,theme:c="dark"})=>{let i=(0,t.Z)(),o=(0,l.useRef)(null),u=(0,l.useRef)(null),[d,m]=(0,l.useState)(!1),h=(0,l.useRef)(!1),f=()=>{if(h.current){let e=o?.current?.value!==u?.current?.value;m(e),r&&r(e)}};return(0,l.useEffect)(()=>{let r=()=>{h.current=!0,f()};return e.current?.addEventListener("submit",r),()=>{e.current?.removeEventListener("submit",r)}},[e]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{className:s,inputRef:o,type:"password",name:"password",autoComplete:"password",required:!0,theme:c,onKeyUp:f,"aria-label":i("Password"),placeholder:i("Password")}),(0,a.jsx)(n.Z,{className:s,inputRef:u,type:"password",name:"password-confirm",autoComplete:"password",required:!0,theme:c,errored:d,onKeyUp:f,"aria-label":i("Password confirmation"),placeholder:i("Password confirmation")})]})}},52426:function(e,r,s){"use strict";s.d(r,{Z:function(){return b}});var a,n,t=s(35250),l=s(78808),c=s(15610),i=s(70079),o=s(99067),u=s.n(o),d=s(39539),m=s(37367),h=s(93967),f=s(79038);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}var x=e=>i.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",width:15,height:15,fill:"none",viewBox:"0 0 15 15",role:"presentation"},e),i.createElement("mask",{id:"a",width:25,height:25,x:0,y:-10,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},a||(a=i.createElement("path",{fill:"#828282",d:"M.446 14.427v-24h24v24z"}))),n||(n=i.createElement("g",{fill:"#696969",mask:"url(#a)"},i.createElement("path",{d:"m9.71 7.54-2.49 2.49-.633-.614 1.438-1.439h-4.9v-.875h4.9L6.587 5.
1664l.633-.614zM11.875 11.915H11v-8.75h.875z"})))),g=s(34742),j=s(69041),v=s(74862),_=s(75360),b=({children:e,title:r,titleClassName:s,heroImage:a})=>{let[n,o,p]=(0,h.vM)(e=>[e.customer,e.signOut,e.getRechargeCustomer]),b=(0,c.useRouter)(),w=(0,m.Z)(!0),N=(0,i.useRef)(null);(0,j.Z)(N),(0,i.useEffect)(()=>{h.vM.getState().customerAccessToken||b.replace("/auth/sign-in")},[]);let k=async()=>{await o(),b.replace("/auth/sign-in")};return(0,t.jsxs)(l.ZP,{childClassName:u().account,children:[(0,t.jsx)("header",{className:u().header,ref:N,children:(0,t.jsxs)("div",{className:"container",children:[(0,t.jsxs)("h2",{className:"h-serif-20 lg:h-serif-60",children:[(0,t.jsx)(f.Z,{children:"Hello"})," ",(0,t.jsx)("span",{className:"lg-max:block",children:w&&n?.firstName})]}),a&&(0,t.jsx)(g.d,{priority:!0,image:a,layout:"fill",objectFit:"cover",className:u().background})]})}),(0,t.jsxs)("section",{className:(0,_.cn)("container",u().container),children:[(0,t.jsx)("aside",{children:(0,t.jsx)("nav",{children:(0,t.jsxs)("ol",{className:"mono-12 bold",children:[(0,t.jsx)("li",{children:(0,t.jsx)(v.Z,{href:"/account/personal",variant:"underlinedReversed",children:(0,t.jsx)(f.Z,{children:"Personal information"})})}),(0,t.jsx)("li",{children:(0,t.jsx)(v.Z,{href:"/account/addresses",variant:"underlinedReversed",children:(0,t.jsx)(f.Z,{children:"Address book"})})}),(0,t.jsx)("li",{children:(0,t.jsx)(v.Z,{href:"/account/orders",variant:"underlinedReversed",children:(0,t.jsx)(f.Z,{children:"Orders"})})}),(0,t.jsx)("li",{children:(0,t.jsx)(v.Z,{href:"/account/subscriptions",variant:"underlinedReversed",children:(0,t.jsx)(f.Z,{children:"Subscriptions"})})}),(0,t.jsx)("li",{children:(0,t.jsx)(v.Z,{href:"/account/payments",variant:"underlinedReversed",children:(0,t.jsx)(f.Z,{children:"Payment methods"})})}),(0,t.jsx)("li",{children:(0,t.jsxs)(d.Z,{className:"mono-12 bold",onClick:k,children:[(0,t.jsx)(x,{})," ",(0,t.jsx)(f.Z,{children:"Log out"})]})})]})})}),(0,t.jsxs)("main",{children:[r&&(0,t.jsx)("header",{className:s,children:(0,t.jsx)("h1",{className:"mono-16 bold",children:r})}),e]})]})]})}},91821:function(e,r,s){"use strict";s.r(r),s.d(r,{__N_SSG:function(){return _},default:function(){return b}});var a=s(35250),n=s(75360),t=s(15631),l=s.n(t);let c=({children:e,title:r,className:s,titleClassName:t})=>(0,a.jsxs)("section",{className:(0,n.cn)(l().section,s),children:[r&&(0,a.jsx)("h2",{className:(0,n.cn)("mono-16 bold",t),children:r}),(0,a.jsx)("div",{className:l().wrapper,children:e})]});var i=s(2565),o=s(44396),u=s(77145),d=s(79038),m=s(98715),h=s(18595),f=s(52426),p=s(15610),x=s(70079),g=s(93967),j=s(58774),v=s.n(j),_=!0,b=({heroBackground:e})=>{let r=(0,h.Z)(),[s,n]=(0,g.vM)(e=>[e.customer,e.updateDetails]),t=(0,x.useRef)(null),l=(0,p.useRouter)(),j=async e=>{let r=await n({firstName:e.get("firstname")?.toString(),lastName:e.get("lastname")?.toString(),email:e.get("email")?.toString(),acceptsMarketing:"on"===e.get("acceptsMarketing")});return r?.customerUserErrors?.length?{errors:r.customerUserErrors}:{success:!0}},_=async e=>{let r=e.get("password")?.toString();if(r!==e.get("password-confirm")?.toString())return{errors:[{code:"MISMATCH"}]};let s=await n({password:r});if(s?.customerUserErrors?.length)return{errors:s.customerUserErrors};await l.push("/auth/sign-in")};return(0,a.jsxs)(f.Z,{title:r("Personal information"),titleClassName:v().title,heroImage:e,children:[(0,a.jsx)(o.l,{submitLabel:r("save changes"),onSubmit:j,buttonClassName:"lg:span-w-7",children:(0,a.jsxs)(c,{title:r("Contact information"),children:[(0,a.jsx)(u.Z,{name:"firstname",required:!0,defaultValue:s?.firstName||void 0,className:"lg:span-w-7","aria-label":r("First name"),label:r("First name")}),(0,a.jsx)(u.Z,{name:"lastname",required:!0,className:"lg:span-w-7",defaultValue:s?.lastName||void 0,"aria-label":r("Last name"),label:r("Last name")}
1),(0,a.jsx)(u.Z,{type:"email",name:"email",required:!0,className:"lg:span-w-7",defaultValue:s?.email||void 0,"aria-label":r("Email"),label:r("Email")}),(0,a.jsx)(i.Z,{name:"acceptsMarketing",className:v().cb,value:"on",defaultChecked:s?.acceptsMarketing,children:(0,a.jsx)(d.Z,{children:"I agree to receive occasional updates about Neoplants."})})]})}),(0,a.jsx)(o.l,{submitLabel:r("Save changes"),onSubmit:_,buttonClassName:"lg:span-w-7",children:(0,a.jsx)(c,{title:r("Change password"),className:"mt-40",children:(0,a.jsx)(m.u,{inputClassName:"lg:span-w-7",form:t})})})]})}},15631:function(e){e.exports={section:"accountFormSection_section__TicHv",wrapper:"accountFormSection_wrapper__qULUN"}},96684:function(e){e.exports={checkbox:"checkbox_checkbox__pXUu8",input:"checkbox_input__FsyC4",label:"checkbox_label__Yj_Ab",box:"checkbox_box__vpMVc",black:"checkbox_black__qnoeF"}},89135:function(e){e.exports={form:"form_form__jakRN",message:"form_message__JVyWl",error:"form_error__K60gz",success:"form_success__UrrOb",noMargin:"form_noMargin__1IQOh",hidden:"form_hidden__yGj0F"}},99067:function(e){e.exports={account:"accountLayout_account__xPIUf",header:"accountLayout_header__P12IA",container:"accountLayout_container__ateUf"}},58774:function(e){e.exports={title:"personal_title__ImTxF",cb:"personal_cb__kQ1KX"}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=27724)}),_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.