1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4718],{75778:function(e){e.exports={initialize:function(e){var a,l;window.clevertap={event:[],profile:[],account:[],onUserLogin:[],notifications:[]},window.clevertap.account.push({id:e}),(a=document.createElement("script")).type="text/javascript",a.async=!0,a.src=("https:"==document.location.protocol?"https://d2r1yp2w7bby2u.cloudfront.net":"http://static.clevertap.com")+"/js/a.js",(l=document.getElementsByTagName("script")[0]).parentNode.insertBefore(a,l)},event:function(e,a){a?window.clevertap.event.push(e,a):window.clevertap.event.push(e)},profile:function(e){window.clevertap.profile.push(e)},logout:function(){window.clevertap.logout()}}},69174:function(e){"use strict";function commaNumber(e,a,l){let n;let r=l||".";{let a;switch(typeof e){case"string":if(e.length<("-"===e[0]?5:4))return e;n=e,a=Number("."!==r?n.replace(r,"."):n);break;case"number":n=String(e),a=e,"."===r||Number.isInteger(e)||(n=n.replace(".",r));break;default:return e}if(-1e3<a&&a<1e3||isNaN(a)||!isFinite(a))return n}{let e;let l=n.lastIndexOf(r);l>-1&&(e=n.slice(l),n=n.slice(0,l));let o=function(e,a){let l=(e.length-1)%3+1;1===l&&"-"===e[0]&&(l=4);let n=[e.slice(0,l)];for(;l<e.length;l+=3)n.push(a,e.substr(l,3));return n}(n,a||",");return e&&o.push(e),o.join("")}}e.exports=commaNumber,e.exports.bindWith=function(e,a){return function(l){return commaNumber(l,e,a)}}},76726:function(e,a,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/settings",function(){return l(3594)}])},64198:function(e,a,l){"use strict";var n=l(85893);l(67294);var r=l(62286),o=l.n(r);let s="/auth";a.Z=e=>{let hocComponent=a=>{let{...l}=a;return(0,n.jsx)(e,{...l})};return hocComponent.getInitialProps=async a=>{let l=o().get(a).access_token;if(l){if(e.getInitialProps){let n=await e.getInitialProps({...a,auth:l});return{...n,userAuth:l}}}else if(a.res){var n,r,t,i;a.query.redirect?(null===(n=a.res)||void 0===n||n.writeHead(302,{Location:s}),null===(r=a.res)||void 0===r||r.end()):(null===(t=a.res)||void 0===t||t.writeHead(302,{Location:s}),null===(i=a.res)||void 0===i||i.end())}return{userAuth:l}},hocComponent}},3594:function(e,a,l){"use strict";l.r(a),l.d(a,{default:function(){return x}});var n=l(85893),r=l(67294),o=l(87452),s=l(28889),t=l(35343),i=l(16310),d=l(61178),u=l(36525),c=l(50319),p=l(45007),m=l(77050),h=l(4656),v=l(23048),b=l(38227);let g=[{label:"January",value:"01"},{label:"February",value:"02"},{label:"March",value:"03"},{label:"April",value:"04"},{label:"May",value:"05"},{label:"June",value:"06"},{label:"July",value:"07"},{label:"August",value:"08"}
1,{label:"September",value:"09"},{label:"Oktober",value:"10"},{label:"November",value:"11"},{label:"December",value:"12"}],days=e=>[...Array(e)].map((e,a)=>({value:a<9?"0"+(a+1).toString():(a+1).toString(),label:(a+1).toString()})),years=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date().getFullYear(),l=[];for(let n=e;n<parseInt(a);n++)l.push({label:n.toString(),value:n.toString()});return l};var w=l(5679);let FormAccountSettings=e=>{let{touched:a,errors:l,handleSubmit:o,loading:s,values:t,setFieldTouched:i,handleChange:u,setFieldValue:f,statusMessage:y,message:x,isSubscribe:j,setIsSubscribe:N,isSubmitting:S}=e,[P,_]=(0,r.useState)(),C=(0,p.I0)(),[T,k]=(0,c.D)(d.oi,{errorPolicy:"all"}),[I,E]=r.useState(!1),[L,F]=r.useState({old:null,password:null,confirm_password:null}),[D,M]=r.useState({old:!1,password:!1,confirm_password:!1}),handleChangePassword=e=>F({...L,[e.target.name]:e.target.value}),handleUpdatePassword=async e=>{e.preventDefault(),_("accountSettings")},handleSendUpdate=async e=>{e.preventDefault(),E(!0);let{old:a,password:l,confirm_password:n}=L,{data:r,errors:o}=await T({variables:{old_password:a,password:l,password_confirmation:n}});r?(E(!1),C({type:m.SET_TOAST,payload:{message:"Password Updated!",status:!0,type:"success"}}),_(null)):o&&(E(!1),(0,w.q)("","general",C))};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("form",{onSubmit:o,children:[(0,n.jsx)("div",{className:"form-group",children:(0,n.jsx)(h.II,{formik:!0,id:"name",name:"name",placeholder:"Full Name",label:"Full Name",variant:"underline",touched:a,errors:l,disabled:s,value:t.name,floatingLabel:!0,onChange:u})}),(0,n.jsx)("div",{className:"form-group",children:(0,n.jsx)(h.II,{formik:!0,id:"phone",type:"number",name:"phone",label:"Mobile number (optional)",placeholder:"Mobile number (optional)",variant:"underline",touched:a,errors:l,value:"0"===t.phone?"":t.phone,floatingLabel:!0,disabled:!0,onChange:u})}),(0,n.jsxs)("div",{className:"form-row",children:[(0,n.jsx)("div",{className:"col-12",children:(0,n.jsx)("label",{className:"form-text",children:"Date of Birth"})}),(0,n.jsx)("div",{className:"form-group col-md-4",children:(0,n.jsx)(h.Ph,{name:"day",id:"day",variant:"underline",placeholder:"Date",label:"Date",options:days(30),touched:a,errors:l,onBlur:i,isSearchable:!0,onChange:f,value:t.day,floatingLabel:!0})}),(0,n.jsx)("div",{className:"form-group col-md-4",children:(0,n.jsx)(h.Ph,{name:"month",id:"month",variant:"underline",placeholder:"Month",label:"Month",options:g,touched:a,errors:l,onBlur:i,isSearchable:!0,onChange:f,value:t.month,floatingLabel:!0})}),(0,n.jsx)("div",{className:"form-group col-md-4",children:(0,n.jsx)(h.Ph,{name:"year",id:"year",variant:"underline",placeholder:"Year",label:"Year",options:years(1950),touched:a,errors:l,onBlur:i,isSearchable:!0,onChange:f,value:t.year,floatingLabel:!0})})]}),(0,n.jsx)("div",{className:"form-group",children:(0,n.jsxs)("div",{className:"input-group",children:[(0,n.jsx)(h.II,{id:"old_password",name:"old",label:"Password",placeholder:"*************",variant:"underline",touched:a,errors:l,disabled:s,type:"password",floatingLabel:!0,value:"********"}),(0,n.jsx)("div",{className:"input-group-append ml-3",children:(0,n.jsx)(v.z,{onClick:handleUpdatePassword,variant:"secondary",children:"Edit Password"})})]})}),(0,n.jsx)("div",{className:"form-group mb-4",children:(0,n.jsx)(h.Jr,{onChange:()=>N(!j),checked:j?1:0,value:j,id:"subscribe-id",label:"Send me latest info & promotions on Make Over products"})}),(0,n.jsx)(v.z,{loader:!0,type:"submit",variant:"secondary",className:"w-100 ".concat(S&&"loading"),children:"Save Changes"})]}),(0,n.jsxs)(b.u,{id:"accountSettings",isShowing:P,className:"modal-review",hide:()=>_(null),overlay:!0,children:[(0,n.jsx)("h2",{children:"Change Password"}),(0,n.jsx)("p",{children:"Please enter old password to change it."}),(0,n.jsxs)("form",{onSubmit:handleSendUpdate,children:[(0,n.jsx)("div",{className:"form-group",children:(0,n.jsx)(h.oH,{id:"oldPassword",inputType:"password",variant:"underline",placeholder:"Old password",label:"Old password",toggle:"Show",name:"old",handleChangeNewPassword:handleChangePassword,isPassword:!0,floatingLabel:!0})}),(0,n.jsx)("div",{className:"form-group",children:(0,n.jsx)(h.oH,{id:"newPassword",name:"password",inputType:"password",variant:"underline",placeholder:"New password",label:"New password",toggle:"Show",formText:'Minimum 12 characters. For stronger password, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & )',handleChangeNewPassword:handleChangePassword,isPassword:!0,floatingLabel:!0})}),(0,n.jsx)("div",{className:"form-group",children:(0,n.jsx)(h.oH,{id:"confirmNewPassword",name:"confirm_password",inputType:"password",variant:"underline",placeholder:"Confirm new password",label:"Confirm new password",toggle:"Show",handleChangeNewPassword:handleChangePassword,isPassword:!0,floatingLabel:!0})}),(0,n.jsx)("div",{className:"form-group",children:(0,n.jsx)(v.z,{loader:!0,type:"submit",variant:"secondary",className:"w-100 ".concat(I&&"loading"),children:"Change Password"})})]})]})]})};var account_settings_form=()=>{var e,a,l;let o=(0,p.I0)(),{user_data:s}=(0,p.v9)(e=>({user_data:e.authReducer.user_data}),p.wU),[h,v]=(0,c.D)(d.tk,{errorPolicy:"all"}),[b,f]=r.useState((null==s?void 0:s.is_subscribe)?null==s?void 0:s.is_subscribe:null),[y,x]=(0,r.useState)({name:null==s?void 0:s.name,phone:s?s.phone:null==s?void 0:s.phone,day:null!==(e=days(30).find(e=>{var a;return e.value===(null==s?void 0:null===(a=s.dob)||void 0===a?void 0:a.split("-")[2])}))&&void 0!==e?e:{label:"1",value:"1"},month:null!==(a=g.find(e=>{var a;return e.value===(null==s?void 0:null===(a=s.dob)||void 0===a?void 0:a.split("-")[1])}
1))&&void 0!==a?a:{label:"January",value:"01"},year:null!==(l=years(1950).find(e=>{var a;return e.value===(null==s?void 0:null===(a=s.dob)||void 0===a?void 0:a.split("-")[0])}))&&void 0!==l?l:{label:"1950",value:"1950"}});r.useEffect(()=>{if(s){var e,a,l;x({name:null==s?void 0:s.name,phone:s?s.phone:null==s?void 0:s.phone,day:null!==(e=days(30).find(e=>{var a;return e.value===(null==s?void 0:null===(a=s.dob)||void 0===a?void 0:a.split("-")[2])}))&&void 0!==e?e:{label:"1",value:"1"},month:null!==(a=g.find(e=>{var a;return e.value==(null==s?void 0:null===(a=s.dob)||void 0===a?void 0:a.split("-")[1])}))&&void 0!==a?a:{label:"January",value:"01"},year:null!==(l=years(1950).find(e=>{var a;return e.value==(null==s?void 0:null===(a=s.dob)||void 0===a?void 0:a.split("-")[0])}))&&void 0!==l?l:{label:"1950",value:"1950"}})}},[s]);let[j,{data:N,loading:S}]=(0,c.D)(u.ow),handleSubmit=async(e,a)=>{let{setSubmitting:l}=a,n={name:e.name,dob:[e.year.value,e.month.value,e.day.value].join("-"),phone:e.phone},{data:r,errors:s}=await h({variables:n});r?(o({type:m.SET_USER,payload:r.updateUser}),o({type:m.SET_TOAST,payload:{message:"Profile updated!",status:!0,type:"success"}}),window.scrollTo(0,0)):s&&(0,w.q)("","general",o)},P=(0,t.j0)({validationSchema:i.Ry().shape({name:i.Z_().required("Review is required!")}),mapPropsToValues(e){let{name:a,email:l,phone:n,day:r,month:o,year:s}=e;return{name:y.name,phone:y.phone,day:y.day,month:y.month,year:y.year}},handleSubmit:handleSubmit})(FormAccountSettings),_=r.useMemo(()=>(0,n.jsx)(P,{loading:S,isSubscribe:b,setIsSubscribe:f}),[s,b,S,y]);return(0,n.jsx)(n.Fragment,{children:_})},settings=()=>(0,n.jsx)(s.Z,{children:(0,n.jsx)("div",{className:"container",children:(0,n.jsx)("div",{className:"col-md-10 col-12 mx-auto",children:(0,n.jsxs)("div",{className:"mw-md mx-auto py-5",children:[(0,n.jsx)("p",{className:"mw-sm mx-auto pb-5 text-center",children:"Manage your account here"}),(0,n.jsx)(account_settings_form,{})]})})})}),f=l(64198),y=l(14633),x=(0,f.Z)(()=>{let{clevertapFunc:e}=(0,p.v9)(e=>e.generalReducer);return r.useEffect(()=>{(0,y.gW)()},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{title:"Account Settings"}),(0,n.jsx)(settings,{})]})})}},function(e){e.O(0,[6812,539,5343,1692,6310,3748,7758,4656,2261,25,8889,9774,2888,179],function(){return e(e.s=76726)}),_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.