1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3557],{29626:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/account",function(){return i(6337)}])},6337:function(e,n,i){"use strict";i.r(n),i.d(n,{__N_SSP:function(){return Y},default:function(){return J}});var t=i(47568),l=i(14924),o=i(26042),r=i(69396),s=i(97582),a=i(85893),d=i(80419),u=i(39653),c=i(48641),p=i(23887),m=i(47741),h=i(36158),x=i(52494),v=i(82175),g=i(89583),f=i(31955),b=i(67294),y=i(74861),j=function(e){var n=e.length,i=e.isActive,t=e.progress,l=e.isCompleted,o=e.isLastStep,r=e.children;return(0,a.jsxs)(c.Kq,{spacing:"6px",width:"200px",direction:{sm:"row",md:"column"},alignItems:"center",flex:"1",position:"relative",children:[(0,a.jsxs)(c.Kq,{ml:{sm:"0",md:"200px"},spacing:"0",alignItems:"center",width:{sm:"auto",md:"100%"},direction:{sm:"column",md:"row"},position:"relative",children:[(0,a.jsx)(y.Z,{isActive:i,isCompleted:l}),!o&&(0,a.jsx)(c.xu,{width:{sm:"6px",md:"100%"},height:{sm:"80px",md:"8px"},bg:"#e2e8f0",position:"relative",children:(0,a.jsx)(c.xu,{width:{sm:"6px",md:"".concat(t,"%")},height:{sm:"".concat(t,"%"),md:"8px"},bg:"brand.400"})}),(0,a.jsx)(c.Kq,{display:{sm:"none",md:"flex"},width:"100%",spacing:"opx",position:"absolute",top:"42px",left:"-".concat(n>=3?42:14*n,"%"),children:r})]}),(0,a.jsx)(c.Kq,{display:{sm:"flex",md:"none"},width:"100%",spacing:"opx",position:{sm:"absolute",md:"unset"},top:"3px",left:"36px",children:r})]})},_=i(41664),C=i.n(_),w=i(74231),N=i(58971),Z=i.n(N),S=i(48046),k=i(89530),A=i(21949),q=i(35119),O=i(32469),z=i(29141),P=i(98087),U=function(e){var n,i,t,l,o=e.disabled,r=e.isOpen,s=e.onClose,d=e.description,u=e.title,p=(0,b.useContext)(P.Z).cms,m=(null===(i=null==p?void 0:null===(n=p.globals)||void 0===n?void 0:n.settings[0])||void 0===i?void 0:i.mode)||"light";return null===(l=null==p?void 0:null===(t=p.globals)||void 0===t?void 0:t.settings[0])||void 0===l||l.primaryColor,(0,a.jsxs)(z.u_,{isCentered:!0,isOpen:r,onClose:s,children:[(0,a.jsx)(z.ZA,{}),(0,a.jsx)(z.hz,{width:{sm:"92%",md:"100%"},children:(0,a.jsxs)(z.fe,{opacity:void 0!==o&&o?".7":"1",borderRadius:"6px",boxShadow:"dark"===m?"rgba(255, 255, 255) 0px 1px 3px":"rgba(0, 0, 0, 0.16) 0px 1px 4px",background:"brand.400",color:"#fff",position:"relative",children:[(0,a.jsx)(z.ol,{cursor:"pointer",onClick:function(){return s()}}),(0,a.jsx)(c.xu,{padding:"32px 16px",width:"100%",children:(0,a.jsxs)(c.Kq,{spacing:"6px",alignContent:"flex-start",justifyContent:"flex-start",children:[(0,a.jsx)(c.xv,{textAlign:"center",width:"100%",variant:"pageTitle",children:u}),(0,a.jsxs)(c.xv,{fontSize:"14px",children:[" ",(0,a.jsx)("p",{dangerouslySetInnerHTML:{__html:d}})]})]})})]})})]})},D=i(11163),I=i(91640),L=i(46524),T=i(36273),K=i(83234),R=i(35610),W=i(17405),E=w.Ry().shape({otp:w.Z_().matches(/^[0-9]+$/,"OTP must contain only numbers").length(6,"OTP must be exactly 6 digits").required("OTP is required")}),B=function(e){var n=e.handleSuccess,i=e.data,l=e.sendOtpAgain,o=void 0===l?function(){}:l,r=(0,b.useState)(!1),u=r[0],p=r[1],h=(0,b.useState)(!0),x=h[0],g=h[1],f=(0,d.pm)();(0,b.useRef)(null);var y,j=function(){g(!0),o()},_=(y=(0,t.Z)(function(e,t){var l,o,r;return(0,s.__generator)(this,function(s){switch(s.label){case 0:console.log("values iss",e,i),p(!0),s.label=1;case 1:return s.trys.push([1,3,4,5]),l={},(null==i?void 0:i.type)==="email"?(l.email=null==i?void 0:i.value,l.otp=e.otp):(l.phoneNumber=null==i?void 0:i.value,l.phone_prefix=null==i?void 0:i.phonePrefix,l.otp=e.otp),[4,q.Z.verifymergeUserOtp(l)];case 2:return(null==(o=s.sent())?void 0:o.message)&&n(null==o?void 0:o.warnings),[3,5];case 3:return f({title:r=s.sent(),position:"bottom",description:null==r?void 0:r.message,status:"info",duration:3e3,isClosable:!0}),[3,5];case 4:return t.setSubmitting(!1),[7];case 5:return p(!1),[2]}})}),function(e,n){return y.apply(this,arguments)});return(0,a.jsx)(v.J9,{initialValues:{otp:""},validationSchema:E,onSubmit:_,children:function(e){return(0,a.jsx)(v.l0,{children:(0,a.jsxs)(c.gC,{spacing:8,align:"center",w:"100%",maxW:"md",mx:"auto",children:[(0,a.jsxs)(K.NI,{isInvalid:e.errors.otp&&e.touched.otp,isRequired:!0,children:[(0,a.jsx)(c.Ug,{justify:"center",spacing:4,children:(0,a.jsx)(S.Z,{label:null,padding:"1.5rem",placeholder:"One time code",name:"otp",value:e.values.otp})}),(0,a.jsx)(c.Ug,{mt:"4",justifyContent:"flex-end",children:(0,a.jsxs)(m.zx,{variant:"link",fontSize:"xs",isDisabled:x||u,onClick:function(){j()},children:["Send Again\xa0 ",x?(0,a.jsx)(W.Z,{onFinish:function(){return g(!1)}}):""]})}),(0,a.jsx)(K.J1,{justifyContent:"center",children:e.errors.otp})]}),(0,a.jsxs)(m.zx,{type:"submit",display:"flex",alignItems:"center",gap:"5",w:"full",disabled:u,variant:"primary",maxW:"200px",children:[u?"Verifying":"Verify OTP",u&&(0,a.jsx)(R.$,{})]})]})})}})},H=function(e){var n,i=e.isVisible,l=e.onClose,o=e.data,r=e.handleOnMerge,u=(0,b.useState)("alert"),p=u[0],h=u[1],x=(0,b.useState)([{entity:"User Loyalty Campaign",message:"You may lose your secondary account's campaign progress due to merger"},{entity:"User Loyalty Campaign",message:"You may lose your secondary account's campaign progress due to merger"},{entity:"User Loyalty Campaign",message:"You may lose your secondary account's campaign progress due to merger"},]),v=x[0],g=x[1],f=(0,d.pm)();console.log("data iss",o);var y,j=(n=(0,t.Z)(function(){var e,n;return(0,s.__generator)(this,function(i){switch(i.label){case 0:return e={},(null==o?void 0:o.type)==="email"?e.email=null==o?void 0:o.value:(e.ph
1oneNumber=null==o?void 0:o.value,e.phone_prefix=null==o?void 0:o.phonePrefix),[4,q.Z.sendmergeUserOtp(e)];case 1:return n=i.sent(),console.log("res isss",n),(null==n?void 0:n.message)&&(f({title:null==n?void 0:n.message,position:"bottom",status:"success",duration:3e3,isClosable:!0}),h("otpInput")),[2]}})}),function(){return n.apply(this,arguments)}),_=(y=(0,t.Z)(function(){var e,n,i;return(0,s.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e={},(null==o?void 0:o.type)==="email"?e.email=null==o?void 0:o.value:(e.phoneNumber=null==o?void 0:o.value,e.phone_prefix=null==o?void 0:o.phonePrefix),(null==o?void 0:o.firstName)&&(e.firstName=null==o?void 0:o.firstName),(null==o?void 0:o.lastName)&&(e.lastName=null==o?void 0:o.lastName),[4,q.Z.mergeAccount(e)];case 1:return(null==(n=i.sent())?void 0:n.message)&&(f({title:"Your accounts were merged successfully!",position:"bottom",status:"success",duration:1e4,isClosable:!0}),r(),l()),[3,3];case 2:return f({title:i.sent(),position:"bottom",status:"info",duration:3e3,isClosable:!0}),[3,3];case 3:return[2]}})}),function(){return y.apply(this,arguments)}),C=function(e){(null==e?void 0:e.length)?(g(e),h("warning")):_()},w=function(){return(0,a.jsxs)(c.gC,{spacing:5,width:"100%",children:[(0,a.jsxs)(c.gC,{spacing:1,children:[(0,a.jsx)(c.xv,{textAlign:"center",fontWeight:"500",variant:"sectionHeading",fontSize:"1.2rem",children:"Account already exist"}),(0,a.jsx)(c.xv,{textAlign:"center",variant:"detail",children:"An account with ".concat(null==o?void 0:o.value," already exists. Please verify it with a one-time-code to claim it yours.")})]}),(0,a.jsx)(m.zx,{onClick:function(){return j()},variant:"primary",children:"Send one time code"})]})},N=function(){return(0,a.jsxs)(c.gC,{spacing:7,children:[(0,a.jsxs)(c.gC,{spacing:1,children:[(0,a.jsx)(c.xv,{textAlign:"center",fontWeight:"500",variant:"sectionHeading",fontSize:"1.2rem",children:"Enter one time code"}),(0,a.jsx)(c.xv,{textAlign:"center",variant:"detail",children:"sent on ".concat(null==o?void 0:o.value)})]}),(0,a.jsx)(B,{data:o,sendOtpAgain:function(){return j()},handleSuccess:function(e){return C(e)}})]})},Z=function(){return(0,a.jsx)(c.gC,{spacing:7,children:(0,a.jsxs)(c.gC,{spacing:7,children:[(0,a.jsx)(c.xv,{textAlign:"center",fontWeight:"500",variant:"sectionHeading",fontSize:"1.2rem",children:"Warnings"}),(0,a.jsx)(c.Kq,{spacing:5,children:null==v?void 0:v.map(function(e,n){return(0,a.jsxs)(c.Ug,{alignItems:"flex-start",children:[(0,a.jsx)(c.xu,{display:"flex",justifyContent:"center",alignItems:"center",width:"27px",padding:"2px",border:"1px solid",borderRadius:"50%",borderColor:"color",children:(0,a.jsx)(c.xv,{fontSize:"12px",fontWeight:"400",variant:"detail",children:n+1})}),(0,a.jsxs)(c.Kq,{spacing:1,children:[(0,a.jsx)(c.xv,{fontSize:"14px",fontWeight:"500",variant:"detail",children:e.entity}),(0,a.jsx)(c.xv,{fontSize:"12px",lineHeight:"1.4",variant:"detail",children:e.message})]})]},e.entity)})}),(0,a.jsx)(m.zx,{onClick:function(){return _()},variant:"primary",maxW:"160px",alignItems:"center",children:"Merge Account"})]})})};return(0,a.jsxs)(z.u_,{isCentered:!0,isOpen:i,onClose:l,closeOnOverlayClick:!0,size:"md",children:[(0,a.jsx)(z.ZA,{backdropFilter:"auto",backdropBlur:"7px"}),(0,a.jsxs)(z.hz,{marginLeft:"10px",marginRight:"10px",borderRadius:"2xl",mx:"4",children:[(0,a.jsx)(z.ol,{color:"color"}),(0,a.jsx)(z.fe,{bg:"secondary",color:"color",p:{base:"8px"},children:(0,a.jsx)(c.Kq,{padding:{sm:"12px 16px",md:"16px 16px 21p"},spacing:{base:"8",md:"8"},children:function(){switch(p){case"alert":default:return(0,a.jsx)(w,{});case"otpInput":return(0,a.jsx)(N,{});case"warning":return(0,a.jsx)(Z,{})}}()})})]})]})},Y=!0,J=function(e){var n,i,y,_,N,z,P,K,R,W,E,B,Y,J,M,V=e.brandLoyalityDetails,F=function(e){return parseFloat(e.toFixed(1)).toString()},$=(0,b.useState)({}),X=$[0],G=$[1],Q=(0,b.useState)({loading:!1,data:{}}),ee=Q[0],en=Q[1],ei=(0,b.useContext)(k.Z),et=(0,b.useState)(!1),el=et[0],eo=et[1],er=(0,b.useState)({type:"",value:""}),es=er[0],ea=er[1],ed=(0,b.useState)(""),eu=ed[0],ec=ed[1];(null==ei?void 0:null===(n=ei.phonePrefix)||void 0===n?void 0:n.length)||null==e
1i||null===(i=ei.phoneNumber)||void 0===i||i.length;var ep=null==ei?void 0:ei.phone_prefix,em=(0,b.useContext)(A.Z),eh=em.phonePrefix,ex=em.currency,ev=em.tierInPoints,eg=em.showPass,ef=void 0!==eg&&eg,eb=em.profileLayoutType,ey=em.showProfilePicture,ej=(0,b.useState)(ep||eh),e_=ej[0];ej[1];var eC,ew=(0,d.pm)(),eN=(0,u.qY)(),eZ=eN.isOpen,eS=eN.onOpen,ek=eN.onClose,eA=(0,u.qY)(),eq=eA.isOpen,eO=eA.onOpen,ez=eA.onClose,eP=null==V?void 0:null===(y=V.brand_levels)||void 0===y?void 0:y.findIndex(function(e){return e.id===(null==ei?void 0:ei.current_level)}),eU=(0,D.useRouter)(),eD=w.Ry().shape({firstName:w.Z_().nullable().required("first name is requried"),lastName:w.Z_().nullable().required("last name is requried"),phoneNumber:w.Z_().nullable().matches(/^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/,"Phone number is not valid")}),eI=Z().get("apiKey"),eL=Z().get("token"),eT=(eC=(0,t.Z)(function(){var e;return(0,s.__generator)(this,function(n){switch(n.label){case 0:return en(function(e){return(0,r.Z)((0,o.Z)({},e),{loading:!0})}),[4,q.Z.getPass("loyalty",null==ei?void 0:ei.userId)];case 1:return(null==(e=n.sent())?void 0:e.google_wallet_link)?en(function(n){return(0,r.Z)((0,o.Z)({},n),{loading:!1,data:e})}):en(function(e){return(0,r.Z)((0,o.Z)({},e),{loading:!1})}),[2]}})}),function(){return eC.apply(this,arguments)});(0,b.useEffect)(function(){(null==ei?void 0:ei.userId)&&(null==ei?void 0:ei.isLoyaltyUser)&&(null==eW?void 0:eW.hasLoyalty)&&ef&&eT()},[null==ei?void 0:ei.userId]);var eK,eR=f.Z.get("brandDetails"),eW=eR?JSON.parse(eR):null,eE=(eK=(0,t.Z)(function(){var e;return(0,s.__generator)(this,function(n){switch(n.label){case 0:return[4,q.Z.getUserDetails({"api-key":eI,Authorization:"Bearer ".concat(eL)})];case 1:return(null==(e=n.sent())?void 0:e.forceLogin)&&(Z().remove("token"),f.Z.remove("token"),(0,L.Z)(),ei.setUser({isAuthenticated:!1,addresses:[]}),eU.push("/login")),(null==e?void 0:e.userId)&&(ei.setUser((0,o.Z)({isAuthenticated:!0},e)),eo(!0)),e||(Z().remove("token"),f.Z.remove("token"),(0,L.Z)(),null==ei||ei.setUser({isAuthenticated:!1}),eU.push("/")),[2]}})}),function(){return eK.apply(this,arguments)});(0,b.useEffect)(function(){eL?eE():(Z().remove("token"),(0,L.Z)(),f.Z.remove("token"),ei.setUser({isAuthenticated:!1,addresses:[]}),eU.push("/login"))},[]);var eB,eH=null==V?void 0:V.brand_levels,eY=(null==eH?void 0:eH.length)&&(null===(_=eH[0])||void 0===_?void 0:_.threshold_type)==="points_earned"?null==ei?void 0:null===(N=ei.user_points)||void 0===N?void 0:N.points_earned:null==ei?void 0:null===(z=ei.user_points)||void 0===z?void 0:z.total,eJ=null==ei?void 0:null===(P=ei.user_points)||void 0===P?void 0:P.total_order,eM=null==ei?void 0:null===(K=ei.user_points)||void 0===K?void 0:K.total,eV=function(e){var n,i,t,l;return(null===(n=eH[e-1])||void 0===n?void 0:n.min_threshold)>eY?0:(eY-(null===(i=eH[e-1])||void 0===i?void 0:i.min_threshold))/((null===(t=eH[e])||void 0===t?void 0:t.min_threshold)-(null===(l=eH[e-1])||void 0===l?void 0:l.min_threshold))*100};return(0,a.jsxs)(c.xu,{width:"100%",children:["type2"===(void 0===eb?"type1":eb)?(0,a.jsx)(O.Z,{type:"layout2",pageTitle:"My Details",children:(0,a.jsxs)(c.kC,{flexDir:"column",gap:{sm:"2rem",md:"4rem"},width:"100%",children:[(0,a.jsxs)(c.Ug,{bg:"secondary",padding:{sm:"1rem",md:"2rem"},borderRadius:"16px",spacing:"5",justifyContent:"space-between",width:{sm:"100%",md:"100%"},children:[(0,a.jsxs)(c.Ug,{spacing:{sm:"3",md:"5"},children:[void 0===ey||ey?(0,a.jsx)(p.Ee,{width:{sm:"32px",md:"64px"},src:"https://res.cloudinary.com/dcwq74lfg/image/upload/v1741768980/Ellipse_31.svg"}):null,(0,a.jsx)(c.xv,{variant:"pageSubTitle",fontSize:{sm:"1rem",md:"2rem"},children:"".concat(ei.firstName||""," ").concat(ei.lastName||"")})]}),(null==ei?void 0:null===(R=ei.brand)||void 0===R?void 0:R.hasLoyalty)&&(0,a.jsxs)(c.gC,{alignItems:"flex-end",justifyContent:"flex-end",spacing:{sm:"2",md:"3"},children:[(0,a.jsx)(c.xv,{variant:"pageSubTitle",fontSize:{sm:"10px",md:"12px"},opacity:.7,color:"color",children:"Current Points"}),(0,a.jsxs)(c.Ug,{alignItems:"center",children:[(0,a.jsx)(p.Ee,{src:"https://res.cloudinary.com/dcwq74lfg/image/upload/v1741769637/Subtract.svg",width:{sm:"16px",md:"42px"}}),(0,a.jsx)(c.xv,{lineHeight:1,fontSize:{sm:"16px",md:"42px"},children:eM||"0"})]})]})]}),(0,a.jsxs)(c.Kq,{spacing:"5",width:{sm:"100%",md:"100%"},children:[(0,a.jsx)(c.xv,{variant:"pageSubTitle",children:"Account Details"}),(0,a.jsx)(c.xu,{maxW:"100%",width:"100%",children:(0,a.jsx)(v.J9,{enableReinitialize:!0,initialValues:{firstName:ei.firstName,lastName:ei.lastName,email:ei.email,phone_prefix:(null==ei?void 0:ei.phone_prefix)||e_,phoneNumber:(null==ei?void 0:ei.phoneNumber)||""},validationSchema:eD,onSubmit:(0,t.Z)(function(){var e,n,i;return(0,s.__generator)(this,function(t){switch(t.label){case 0:e=(0,o.Z)({}
1,X),(null==X?void 0:X.phoneNumber)!==""&&(null==X?void 0:X.phoneNumber)&&(e.phoneNumber="".concat(null==X?void 0:X.phoneNumber),e.phone_prefix=(null==X?void 0:X.phone_prefix)||e_),!(null==X?void 0:X.phoneNumber)&&(null==X?void 0:X.phone_prefix)&&(e.phoneNumber="".concat(null==ei?void 0:ei.phoneNumber),e.phone_prefix=null==X?void 0:X.phone_prefix),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,q.Z.updateUserDetails(e,{"api-key":Z().get("apiKey")})];case 2:return(null==(n=t.sent())?void 0:n.success)?(eE(),ew({title:"Succesfully updated your details",status:"success",position:"top-right",duration:3e3,isClosable:!0}),G({})):(console.log("message iss",null==n?void 0:n.error),(null==n?void 0:n.error)==="Email or PhoneNumber is already taken."&&(i={},(null==X?void 0:X.email)?(i.type="email",i.value=X.email):(i.type="phone",i.phonePrefix=e_,i.value=X.phoneNumber),(null==X?void 0:X.firstName)&&(i.firstName=null==X?void 0:X.firstName),(null==X?void 0:X.lastName)&&(i.lastName=null==X?void 0:X.lastName),ea(i),eO()),ew({title:(null==n?void 0:n.error.includes('child "email" fails because'))?"you can not delete email":(null==n?void 0:n.error.includes('child "phoneNumber" fails because'))?"you can not delete phone":null==n?void 0:n.error,status:"info",position:"top-right",duration:3e3,isClosable:!0})),[3,4];case 3:return t.sent(),ew({title:"Sorry, failed to update your details",status:"info",position:"top-right",duration:3e3,isClosable:!0}),[3,4];case 4:return[2]}})}),children:function(e){var n,i=e.handleChange,t=e.handleSubmit,s=e.values,d=function(e){G(function(n){return(0,r.Z)((0,o.Z)({},n),(0,l.Z)({},e.target.name,e.target.value))}),i(e)};return(0,a.jsx)("form",{onSubmit:t,children:(0,a.jsxs)(c.Kq,{spacing:8,children:[(0,a.jsxs)(c.kC,{flexDir:{sm:"column",md:"row"},gap:"16px",children:[(0,a.jsx)(S.Z,{label:"",padding:"1.5rem",placeholder:"First Name",type:"text",errorBorderColor:"red.300",name:"firstName",onChange:d}),(0,a.jsx)(S.Z,{label:"",padding:"1.5rem",placeholder:"Last Name",type:"text",errorBorderColor:"red.300",name:"lastName",onChange:d})]}),(0,a.jsxs)(c.kC,{flexDir:{sm:"column",md:"row"},gap:"16px",children:[(0,a.jsx)(S.Z,{label:"",padding:"1.5rem",placeholder:"Your email ",type:"email",name:"email",onChange:d}),(0,a.jsx)(S.Z,{label:"",placeholder:"phone number",type:"tel",onChange:d,suffix:(0,a.jsx)(I.Z,{defaultCode:(null==s?void 0:null===(n=s.phone_prefix)||void 0===n?void 0:n.slice(1))||1,handleChange:function(e){G(function(n){return(0,r.Z)((0,o.Z)({},n),{phone_prefix:e})})}}),errorBorderColor:"red.300",name:"phoneNumber"})]}),(0,a.jsx)(c.Kq,{spacing:"6",children:(0,a.jsx)(m.zx,{width:"100%",maxW:{sm:"100%",md:"210px"},isDisabled:!Object.keys(X).length,type:"submit",variant:"primary",children:"Save changes"})})]})})}},el?"userLoaded":"loading")})]})]})}):(0,a.jsx)(O.Z,{pageTitle:"My Details",rightElement:(null==eW?void 0:eW.hasLoyalty)&&(null==eW?void 0:eW.active)&&ei.isLoyaltyUser?(0,a.jsxs)(c.xv,{fontWeight:"600",fontSize:"1.5rem",lineHeight:"27px",children:["".concat(eM||0),(null==V?void 0:V.point_icon)?(null==V?void 0:null===(eB=V.point_icon)||void 0===eB?void 0:eB.includes("http"))?(0,a.jsx)(p.Ee,{ml:"6px",display:"inline",width:"32px",src:null==V?void 0:V.point_icon}):(0,a.jsx)(c.xv,{ml:"6px",display:"inline",variant:"pageHeading",children:null==V?void 0:V.point_icon}):(0,a.jsx)("span",{style:{fontSize:"16px",marginLeft:"6px"},children:(null==V?void 0:V.point_name)||"pts"})]}):"",children:(0,a.jsxs)(c.kC,{flexDirection:"column-reverse",gap:"21px",width:"100%",children:[(0,a.jsxs)(c.kC,{flexDir:{sm:"column-reverse",md:"row"},gap:"21px",width:"100%",children:[(0,a.jsxs)(c.Kq,{bg:"secondary",padding:"1.5rem",borderRadius:"12px",spacing:"5",width:{sm:"100%",md:"63%"},children:[(0,a.jsx)(c.xv,{variant:"pageSubTitle",children:"Account Details"}),(0,a.jsx)(c.xu,{maxW:"720px",width:"100%",children:(0,a.jsx)(v.J9,{enableReinitialize:!0,initialValues:{firstName:ei.firstName,lastName:ei.lastName,email:ei.email,phone_prefix:(null==ei?void 0:ei.phone_prefix)||e_,phoneNumber:(null==ei?void 0:ei.phoneNumber)||""},validationSchema:eD,onSubmit:(0,t.Z)(function(){var e,n,i;return(0,s.__generator)(this,function(t){switch(t.label){case 0:e=(0,o.Z)({}
1,X),(null==X?void 0:X.phoneNumber)!==""&&(null==X?void 0:X.phoneNumber)&&(e.phoneNumber="".concat(null==X?void 0:X.phoneNumber),e.phone_prefix=(null==X?void 0:X.phone_prefix)||e_),!(null==X?void 0:X.phoneNumber)&&(null==X?void 0:X.phone_prefix)&&(e.phoneNumber="".concat(null==ei?void 0:ei.phoneNumber),e.phone_prefix=null==X?void 0:X.phone_prefix),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,q.Z.updateUserDetails(e,{"api-key":Z().get("apiKey")})];case 2:return(null==(n=t.sent())?void 0:n.success)?(eE(),ew({title:"Succesfully updated your details",status:"success",position:"top-right",duration:3e3,isClosable:!0}),G({})):(console.log("message iss",null==n?void 0:n.error),(null==n?void 0:n.error)==="Email or PhoneNumber is already taken."&&(i={},(null==X?void 0:X.email)?(i.type="email",i.value=X.email):(i.type="phone",i.phonePrefix=e_,i.value=X.phoneNumber),(null==X?void 0:X.firstName)&&(i.firstName=null==X?void 0:X.firstName),(null==X?void 0:X.lastName)&&(i.lastName=null==X?void 0:X.lastName),ea(i),eO()),ew({title:(null==n?void 0:n.error.includes('child "email" fails because'))?"you can not delete email":(null==n?void 0:n.error.includes('child "phoneNumber" fails because'))?"you can not delete phone":null==n?void 0:n.error,status:"info",position:"top-right",duration:3e3,isClosable:!0})),[3,4];case 3:return t.sent(),ew({title:"Sorry, failed to update your details",status:"info",position:"top-right",duration:3e3,isClosable:!0}),[3,4];case 4:return[2]}})}),children:function(e){var n,i=e.handleChange,t=e.handleSubmit,s=e.values,d=function(e){G(function(n){return(0,r.Z)((0,o.Z)({},n),(0,l.Z)({},e.target.name,e.target.value))}),i(e)};return(0,a.jsx)("form",{onSubmit:t,children:(0,a.jsxs)(c.Kq,{spacing:8,children:[(0,a.jsxs)(c.kC,{flexDir:{sm:"column",md:"row"},gap:"16px",children:[(0,a.jsx)(S.Z,{label:"",padding:"1.5rem",placeholder:"First Name",type:"text",errorBorderColor:"red.300",name:"firstName",onChange:d}),(0,a.jsx)(S.Z,{label:"",padding:"1.5rem",placeholder:"Last Name",type:"text",errorBorderColor:"red.300",name:"lastName",onChange:d})]}),(0,a.jsxs)(c.kC,{flexDir:{sm:"column",md:"row"},gap:"16px",children:[(0,a.jsx)(S.Z,{label:"",padding:"1.5rem",placeholder:"Your email ",type:"email",name:"email",onChange:d}),(0,a.jsx)(S.Z,{label:"",placeholder:"phone number",type:"tel",onChange:d,suffix:(0,a.jsx)(I.Z,{defaultCode:(null==s?void 0:null===(n=s.phone_prefix)||void 0===n?void 0:n.slice(1))||1,handleChange:function(e){G(function(n){return(0,r.Z)((0,o.Z)({},n),{phone_prefix:e})})}}),errorBorderColor:"red.300",name:"phoneNumber"})]}),(0,a.jsx)(c.Kq,{spacing:"6",children:(0,a.jsx)(m.zx,{width:"100%",maxW:{sm:"100%",md:"210px"},isDisabled:!Object.keys(X).length,type:"submit",variant:"primary",children:"Save changes"})})]})})}},el?"userLoaded":"loading")})]}),((null==ei?void 0:ei.isLoyaltyUser)&&(null==eW?void 0:eW.hasLoyalty)&&(null===(W=ee.data)||void 0===W?void 0:W.apple_wallet_link)&&(null===(E=ee.data)||void 0===E?void 0:E.google_wallet_link)||(null==ee?void 0:ee.loading))&&(0,a.jsxs)(c.gC,{borderRadius:"12px",bg:"secondary",alignItems:"baseline",padding:"1.5rem",width:{sm:"100%",md:"35%"},spacing:"10",children:[(0,a.jsx)(c.xv,{variant:"pageSubTitle",children:"My Passes"}),(0,a.jsxs)(c.gC,{width:"100%",spacing:6,children:[(null==ee?void 0:ee.loading)?(0,a.jsxs)(c.gC,{spacing:"4",children:[(0,a.jsx)(h.Od,{width:"140px",borderRadius:"21px",height:"42px"}),(0,a.jsx)(c.xv,{children:"or"}),(0,a.jsx)(h.Od,{width:"140px",borderRadius:"21px",height:"42px"})]}):(0,a.jsxs)(c.gC,{spacing:4,children:[" ",(0,a.jsx)(C(),{href:(null===(B=ee.data)||void 0===B?void 0:B.apple_wallet_link)||"",target:"_blank",children:(0,a.jsx)(p.Ee,{cursor:"pointer",width:"140px",src:"https://res.cloudinary.com/dcwq74lfg/image/upload/v1710336430/US-UK_Add_to_Apple_Wallet_RGB_101421.svg"})}),(0,a.jsx)(c.xv,{children:"or"}),(0,a.jsx)(C(),{href:(null===(Y=ee.data)||void 0===Y?void 0:Y.google_wallet_link)||"",target:"_blank",children:(0,a.jsx)(p.Ee,{width:"140px",cursor:"pointer",src:"https://res.cloudinary.com/dcwq74lfg/image/upload/v1710753242/enIN_add_to_google_wallet_add-wallet-badge.png"})})]}),(0,a.jsx)(c.xv,{variant:"pageTextDim",children:"Save your passes ticket into your wallet"})]})]})]}),(null==eW?void 0:eW.hasLoyalty)&&(null==eW?void 0:eW.active)&&ei.isLoyaltyUser&&(null==V?void 0:null===(J=V.brand_levels)||void 0===J?void 0:J.length)&&(0,a.jsxs)(c.Kq,{bg:"secondary",padding:{sm:"1.5rem 1.5rem 5.5rem",md:"1.5rem"},borderRadius:"12px",spacing:"5",width:"100%",children:[(0,a.jsx)(c.xv,{variant:"pageSubTitle",children:"Account Tiers"}),(0,a.jsx)(c.xu,{position:"relative",children:(0,a.jsx)(c.Kq,{width:"100%",alignItems:"flex-start",spacing:"0px",flexDir:{sm:"column",md:"row"},gap:"0px",minH:{sm:"unset",md:"170px"},className:"hideScrollBar",overflow:{sm:"unset",md:"scroll"},children:null==V?void 0:null===(M=V.brand_levels)||void 0===M?void 0:M.map(function(e,n){var i,t,l,o,r,s;return(0,a.jsx)(j,{isActive:"",length:null==V?void 0:null===(i=V.brand_levels)||void 0===i?void 0:i.length,isCompleted:eP>=n,progress:eP>=n+1?100:eV(n+1),isLastStep:(null==V?void 0:null===(t=V.brand_levels)||void 0===t?void 0:t.length)===n+1,children:(0,a.jsxs)(c.Kq,{justifyContent:{small:"flex-start",md:"center"},alignItems:{sm:"flex-start",md:"center"},spacing:"4px",textAlign:"center",maxW:{sm:"100%",md:"280px"},children:[(0,a.jsx)(c.xv,{variant:"pageSubTitle",children:e.name}),(0,a.jsx)(c.xv,{onClick:function(){ec(e),eS()},cursor:"pointer",variant:"pageText",textDecor:"underline",children:"".concat(eP<n?"Preview":"See your"," benefits")}),eP<n&&(0,a.jsxs)(c.Ug,{maxW:"180px",justifyContent:"center",opacity:".7",alignItems:"flex-start",children:[(0,a.jsx)(x.JO,{width:"14px",height:"14px",as:g.kUi}),(0,a.jsx)(c.xv,{textAlign:{sm:"initial",md:"unset"},variant:"pageTextDim",children:(l=null==e?void 0:e.threshold_type,o=null==e?void 0:e.min_threshold,r=null==e?void 0:e.name,s=null==e?void 0:e.point_ratio,"points_earned"===l?ev?"".concat(o-eY," points remaining to unlock ").concat(r):"Spend ".concat((0,T.Z)(F((o-eY)/s),{currency:ex})," to unlock ").concat(r):"points"===l?"Spend ".concat((0,T.Z)(F((o-eY)/s),{currency:ex})," to unlock ").concat(r):"Complete ".concat(eJ-o," orders to unlock ").concat(r))})]})]})},e.name)})})})]})]})}),(0,a.jsx)(H,{handleOnMerge:function(){G({}),eE()},isVisible:eq,onClose:ez,data:es}),(0,a.jsx)(U,{title:null==eu?void 0:eu.name,description:null==eu?void 0:eu.de
1scription,isOpen:eZ,onClose:ek})]})}},74861:function(e,n,i){"use strict";var t=i(26042),l=i(69396),o=i(99534),r=i(85893);i(67294);var s=i(48641),a=i(52494),d=i(53854),u=function(e){var n=e.title,i=e.isCompleted,u=e.isActive,c=(0,o.Z)(e,["title","isCompleted","isActive"]);return(0,r.jsxs)(s.gC,{spacing:"0",gap:2,flexDir:{sm:"row",md:"column"},children:[(0,r.jsx)(s.Cd,(0,l.Z)((0,t.Z)({size:"8",bg:i?"accent":"bgColor",borderWidth:i?"0":"2px",borderColor:u?"accent":"inherit"},c),{children:i?(0,r.jsx)(a.JO,{as:d.dZ6,color:"inverted",boxSize:"5"}):(0,r.jsx)(s.Cd,{bg:u?"accent":"border",size:"3"})})),n&&(0,r.jsx)(s.xv,{textAlign:"center",textDecor:{sm:"underline",md:"auto"},variant:"pageText",width:"fit-content",children:n})]})};n.Z=u}},function(e){e.O(0,[1228,5445,8907,9866,6556,2469,9774,2888,179],function(){return e(e.s=29626)}),_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.