PageSourceSearch

https://j2proxy.vn/_next/static/chunks/13904-2b7591633a7ded8e.js

js j2proxy.vn collected 2026-10-02 02:14:02 UTC 41,109 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[13904],{13904:(e,l,s)=>{s.d(l,{A:()=>$});var t=s(95155),r=s(20865),a=s(39180),n=s(86456),i=s(50846),o=s(8948),d=s(58247),c=s(66942),x=s(52056),h=s(12115),p=s(22544),m=s(18720),u=s(15653);let g=(0,s(25959).v)()(e=>({user:null,setUser:l=>e({user:l}),updateCoin:l=>e(e=>({user:e.user?{...e.user,coin:Number(e.user.coin)+l}:null})),clearUser:()=>e({user:null})}));var f=s(13744),C=s(60919),w=s(61362),j=s(1141),b=s(83303);let v="auth-input-template-10 h-11 flex-1 border-0 bg-transparent p-0 text-[14px] leading-[18px] font-normal text-black placeholder:text-black/60 focus-visible:ring-0 focus-visible:ring-offset-0",N="".concat(v," shadow-none");var k=s(66654);let y=u.z.object({hash:u.z.string().nonempty("M\xe3 l\xe0 bắt buộc"),email:k.rK,password:k.$w,confirmPassword:k.$w}),F={invalidEmail:"Email kh\xf4ng hợp lệ",emailNotExists:"Email kh\xf4ng tồn tại",invalidHash:"M\xe3 kh\xf4ng tồn tại"};function B(e){let{setFormType:l,onClose:s}=e,[r,d]=(0,h.useState)(!1),[u,g]=(0,h.useState)(""),[k,B]=(0,h.useState)(""),L=(0,p.mN)({resolver:(0,c.u)(y),values:{password:"",confirmPassword:"",hash:"",email:""},mode:"onChange"}),{formState:{isSubmitting:M,isValid:S},setError:E}=L,R=L.watch("email"),z=(0,a.r)(e=>e.config);async function A(e){try{if(!u)return void B("Vui l\xf2ng x\xe1c nhận bạn kh\xf4ng phải l\xe0 người m\xe1y");await f.A.postApi("/api/v1/auth/reset/password",e,"",{headers:{"x-merchant-id":null==z?void 0:z.merchantId}}),m.toast.success("Đặt lại mật khẩu th\xe0nh c\xf4ng",{duration:5e3,icon:(0,t.jsx)(w.A,{className:"text-success h-4 w-4"})}),l("login")}catch(e){if(e instanceof C.pe){var s,r,a;let l=null==(s=e.response)?void 0:s.data;if(null==l?void 0:l.errors)for(let[e,s]of Object.entries(l.errors))E(e,{type:"server",message:null!=(a=null==F?void 0:F[null!=(r=null==s?void 0:s.key)?r:s])?a:s})}else m.toast.error("Đặt lại mật khẩu lỗi",{description:"Lỗi kết nối đến m\xe1y chủ.",duration:5e3,icon:(0,t.jsx)(x.A,{className:"text-error h-4 w-4"})})}}async function I(e){try{e.preventDefault(),d(!0),await L.trigger("email")&&(await f.A.postApi("/api/v1/auth/forgot/password",{email:R},"",{headers:{"x-merchant-id":null==z?void 0:z.merchantId}}),m.toast.success("Gửi m\xe3 th\xe0nh c\xf4ng",{duration:5e3,icon:(0,t.jsx)(w.A,{className:"text-success h-4 w-4"})}))}catch(e){if(e instanceof C.pe){var l,s,r,a;let n=null==(l=e.response)?void 0:l.data;if(null==n?void 0:n.errors)for(let[e,l]of Object.entries(n.errors))E(e,{type:"server",message:null!=(a=null==F?void 0:F[null!=(r=null==l?void 0:l.key)?r:l])?a:l});else m.toast.error("Gửi m\xe3 lỗi",{description:null!=(s=null==n?void 0:n.message)?s:"Lỗi kết nối đến m\xe1y chủ.",duration:5e3,icon:(0,t.jsx)(x.A,{className:"text-error h-4 w-4"})})}else m.toast.error("Gửi m\xe3 lỗi",{description:"Lỗi kết nối đến m\xe1y chủ.",duration:5e3,icon:(0,t.jsx)(x.A,{className:"text-error h-4 w-4"})})}finally{d(!1)}}return(0,t.jsx)("div",{className:"rounded-lg bg-white p-2.5 md:w-[667px]",children:(0,t.jsxs)("div",{className:"no-scrollbar relative max-h-[80vh] w-full overflow-x-hidden overflow-y-auto rounded-lg p-6",style:{backgroundImage:"url('/images/images-template-10/background-form.webp')",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",filter:"drop-shadow(-4px 0px 6px rgba(0, 0, 0, 0.1))"},children:[(0,t.jsx)("button",{type:"button",onClick:s,className:"absolute top-3.5 right-3.5 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full",style:{background:"rgba(255, 255, 255, 0.52)"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"var(--primary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsxs)("div",{className:"flex w-full max-w-[647px] flex-col items-start gap-4",children:[(0,t.jsx)("h1",{className:"text-[20px] leading-[24px] font-semibold text-black",children:"Qu\xean mật khẩu"}),(0,t.jsx)("div",{className:"flex w-full flex-col items-start gap-2.5 rounded p-4",style:{background:"rgba(244, 239, 255, 0.2)",border:"1px solid rgba(123, 73, 206, 0.2)"},children:(0,t.jsx)(i.lV,{...L,children:(0,t.jsxs)("form",{onSubmit:L.handleSubmit(A),className:"flex w-full flex-col items-start gap-4",children:[(0,t.jsx)(i.zB,{control:L.control,name:"email",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"Email"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:[(0,t.jsx)("path",{d:"M2.00333 5.88355L9.99995 9.88186L17.9967 5.88355C17.9363 5.37428 17.6979 4.90313 17.3249 4.55647C16.9519 4.2098 16.4683 4.0102 15.9567 4H4.04328C3.53168 4.0102 3.0481 4.2098 2.67507 4.55647C2.30204 4.90313 2.0636 5.37428 2.00333 5.88355Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M18 8.11816L10 12.1165L2 8.11816V14C2 14.5304 2.21071 15.0391 2.58579 15.4142C2.96086 15.7893 3.46957 16 4 16H16C16.5304 16 17.0391 15.7893 17.4142 15.4142C17.7893 15.0391 18 14.5304 18 14V8.11816Z",fill:"currentColor"})]})}),(0,t.jsx)(o.p,{autoComplete:"email",type:"email",placeholder:"Nhập email của bạn...",className:v,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsx)(i.zB,{control:L.control,name:"hash",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"M\xe3 OTP"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex w-full flex-row items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex h-11 flex-1 flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 6.99988C8.00023 5.95096 8.33033 4.92868 8.94359 4.0777C9.55684 3.22673 10.4222 2.59018 11.4172 2.25812C12.4121 1.92607 13.4864 1.91534 14.4878 2.22745C15.4892 2.53956 16.3671 3.1587 16.9972 3.99725C17.6273 4.8358 17.9778 5.85129 17.999 6.89999C18.0202 7.9487 17.711 8.97751 17.1152 9.84083C16.5195 10.7041 15.6673 11.3582 14.6793 11.7105C13.6913 12.0628 12.6176 12.0955 11.61 11.8039L9.707 13.7069C9.51951 13.8944 9.26519 13.9998 9 13.9999H8V14.9999C8 15.2651 7.89464 15.5195 7.70711 15.707C7.51957 15.8945 7.26522 15.9999 7 15.9999H6V16.9999C6 17.2651 5.89464 17.5195 5.70711 17.707C5.51957 17.8945 5.26522 17.9999 5 17.9999H3C2.73478 17.9999 2.48043 17.8945 2.29289 17.707C2.10536 17.5195 2 17.2651 2 16.9999V14.9999C2.00006 14.7347 2.10545 14.4804 2.293 14.2929L8.196 8.38988C8.06565 7.93807 7.99967 7.47013 8 6.99988ZM13 3.99988
1C12.8011 3.99988 12.6103 4.0789 12.4697 4.21955C12.329 4.3602 12.25 4.55097 12.25 4.74988C12.25 4.94879 12.329 5.13956 12.4697 5.28021C12.6103 5.42086 12.8011 5.49988 13 5.49988C13.3978 5.49988 13.7794 5.65792 14.0607 5.93922C14.342 6.22053 14.5 6.60206 14.5 6.99988C14.5 7.19879 14.579 7.38956 14.7197 7.53021C14.8603 7.67086 15.0511 7.74988 15.25 7.74988C15.4489 7.74988 15.6397 7.67086 15.7803 7.53021C15.921 7.38956 16 7.19879 16 6.99988C16 6.20423 15.6839 5.44117 15.1213 4.87856C14.5587 4.31595 13.7956 3.99988 13 3.99988Z",fill:"currentColor"})})}),(0,t.jsx)(o.p,{autoComplete:"one-time-code",type:"text",placeholder:"Nhập m\xe3 OTP...",className:v,...l})]}),(0,t.jsx)(n.$,{onClick:I,className:"bg-primary hover:bg-primary/90 h-11 cursor-pointer rounded-lg px-4 py-2 text-[14px] leading-[18px] font-bold text-white",disabled:r||!R||""===R,type:"button",children:"Gửi"})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsx)(i.zB,{control:L.control,name:"password",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"Mật khẩu mới"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 6.99988C8.00023 5.95096 8.33033 4.92868 8.94359 4.0777C9.55684 3.22673 10.4222 2.59018 11.4172 2.25812C12.4121 1.92607 13.4864 1.91534 14.4878 2.22745C15.4892 2.53956 16.3671 3.1587 16.9972 3.99725C17.6273 4.8358 17.9778 5.85129 17.999 6.89999C18.0202 7.9487 17.711 8.97751 17.1152 9.84083C16.5195 10.7041 15.6673 11.3582 14.6793 11.7105C13.6913 12.0628 12.6176 12.0955 11.61 11.8039L9.707 13.7069C9.51951 13.8944 9.26519 13.9998 9 13.9999H8V14.9999C8 15.2651 7.89464 15.5195 7.70711 15.707C7.51957 15.8945 7.26522 15.9999 7 15.9999H6V16.9999C6 17.2651 5.89464 17.5195 5.70711 17.707C5.51957 17.8945 5.26522 17.9999 5 17.9999H3C2.73478 17.9999 2.48043 17.8945 2.29289 17.707C2.10536 17.5195 2 17.2651 2 16.9999V14.9999C2.00006 14.7347 2.10545 14.4804 2.293 14.2929L8.196 8.38988C8.06565 7.93807 7.99967 7.47013 8 6.99988ZM13 3.99988C12.8011 3.99988 12.6103 4.0789 12.4697 4.21955C12.329 4.3602 12.25 4.55097 12.25 4.74988C12.25 4.94879 12.329 5.13956 12.4697 5.28021C12.6103 5.42086 12.8011 5.49988 13 5.49988C13.3978 5.49988 13.7794 5.65792 14.0607 5.93922C14.342 6.22053 14.5 6.60206 14.5 6.99988C14.5 7.19879 14.579 7.38956 14.7197 7.53021C14.8603 7.67086 15.0511 7.74988 15.25 7.74988C15.4489 7.74988 15.6397 7.67086 15.7803 7.53021C15.921 7.38956 16 7.19879 16 6.99988C16 6.20423 15.6839 5.44117 15.1213 4.87856C14.5587 4.31595 13.7956 3.99988 13 3.99988Z",fill:"currentColor"})})}),(0,t.jsx)(b.c,{autoComplete:"new-password",type:"password",hideKeyIcon:!0,placeholder:"Nhập mật khẩu mới...",className:N,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsx)(i.zB,{control:L.control,name:"confirmPassword",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"X\xe1c nhận mật khẩu"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 6.99988C8.00023 5.95096 8.33033 4.92868 8.94359 4.0777C9.55684 3.22673 10.4222 2.59018 11.4172 2.25812C12.4121 1.92607 13.4864 1.91534 14.4878 2.22745C15.4892 2.53956 16.3671 3.1587 16.9972 3.99725C17.6273 4.8358 17.9778 5.85129 17.999 6.89999C18.0202 7.9487 17.711 8.97751 17.1152 9.84083C16.5195 10.7041 15.6673 11.3582 14.6793 11.7105C13.6913 12.0628 12.6176 12.0955 11.61 11.8039L9.707 13.7069C9.51951 13.8944 9.26519 13.9998 9 13.9999H8V14.9999C8 15.2651 7.89464 15.5195 7.70711 15.707C7.51957 15.8945 7.26522 15.9999 7 15.9999H6V16.9999C6 17.2651 5.89464 17.5195 5.70711 17.707C5.51957 17.8945 5.26522 17.9999 5 17.9999H3C2.73478 17.9999 2.48043 17.8945 2.29289 17.707C2.10536 17.5195 2 17.2651 2 16.9999V14.9999C2.00006 14.7347 2.10545 14.4804 2.293 14.2929L8.196 8.38988C8.06565 7.93807 7.99967 7.47013 8 6.99988ZM13 3.99988
1C12.8011 3.99988 12.6103 4.0789 12.4697 4.21955C12.329 4.3602 12.25 4.55097 12.25 4.74988C12.25 4.94879 12.329 5.13956 12.4697 5.28021C12.6103 5.42086 12.8011 5.49988 13 5.49988C13.3978 5.49988 13.7794 5.65792 14.0607 5.93922C14.342 6.22053 14.5 6.60206 14.5 6.99988C14.5 7.19879 14.579 7.38956 14.7197 7.53021C14.8603 7.67086 15.0511 7.74988 15.25 7.74988C15.4489 7.74988 15.6397 7.67086 15.7803 7.53021C15.921 7.38956 16 7.19879 16 6.99988C16 6.20423 15.6839 5.44117 15.1213 4.87856C14.5587 4.31595 13.7956 3.99988 13 3.99988Z",fill:"currentColor"})})}),(0,t.jsx)(b.c,{autoComplete:"new-password",type:"password",hideKeyIcon:!0,placeholder:"X\xe1c nhận mật khẩu mới...",className:N,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsxs)("div",{className:"flex w-full flex-col items-start justify-start gap-2 px-2",children:[(0,t.jsx)("div",{className:"w-full overflow-hidden",children:(0,t.jsx)(j.A,{sitekey:"6LcpBJ0pAAAAAP1Tf9GVLbiodi69ko_XQCP6Kqvx",onChange:e=>{e&&(g(e),k&&B(""))},onExpired:()=>g(""),theme:"light",size:"normal"})}),k&&(0,t.jsx)("span",{className:"text-xs text-red-500",children:k})]})]})})}),(0,t.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[14px] leading-[18px] font-normal text-white",children:"Đ\xe3 nhớ mật khẩu ?"}),(0,t.jsx)("span",{className:"text-primary cursor-pointer text-[14px] leading-[18px] font-bold",onClick:()=>l("login"),children:"Đăng nhập"})]}),(0,t.jsx)(n.$,{className:"bg-primary flex h-[34px] w-full cursor-pointer items-center justify-center gap-3 rounded-full px-4 py-2",disabled:M||!S,type:"submit",onClick:L.handleSubmit(A),children:(0,t.jsx)("span",{className:"text-[14px] leading-[18px] font-bold",style:{color:"#F3EFFF"},children:"Đặt lại mật khẩu"})})]})]})})}var L=s(95307),M=s(35652);let S=u.z.object({firstName:k.fV,lastName:k.tM,email:k.rK,phone:k.KA,password:k.$w}),E={invalidPhone:"Số điện thoại kh\xf4ng hợp lệ",phoneExists:"Số điện thoại đ\xe3 tồn tại"};function R(e){let{setFormType:l}=e,s=(0,p.mN)({resolver:(0,c.u)(S),values:{email:"",password:"",firstName:"",lastName:"",phone:""},mode:"onChange"}),{formState:{isSubmitting:d,isValid:u},setError:g}=s,k=(0,a.r)(e=>e.config),[y,F]=(0,h.useState)(""),[B,R]=(0,h.useState)("");async function z(e){try{if(!y)return void R("Vui l\xf2ng x\xe1c nhận bạn kh\xf4ng phải l\xe0 người m\xe1y");let l=(0,L.G2)(),s=(0,r.mD)(),a={...e,...s&&{domainSource:s},...l&&{refClickId:l}};await f.A.postApi("/api/v1/auth/register",a,"",{headers:{"x-merchant-id":null==k?void 0:k.merchantId}}),l&&(0,L.p7)(),m.toast.success("Đăng k\xfd th\xe0nh c\xf4ng",{duration:5e3,icon:(0,t.jsx)(w.A,{className:"text-success h-4 w-4"})}),await (0,r.Jv)("credentials",{phone:e.phone,password:e.password,merchantId:null==k?void 0:k.merchantId,redirect:!1}),(0,M.E)(),(0,r.IL)()||(window.location.href=(0,r.LN)())}catch(e){if(e instanceof C.pe){var l,s,a;let t=null==(l=e.response)?void 0:l.data;if(null==t?void 0:t.errors)for(let[e,l]of Object.entries(t.errors))g(e,{type:"server",message:null!=(a=null==E?void 0:E[null!=(s=null==l?void 0:l.key)?s:l])?a:l})}else m.toast.error("Đăng k\xfd lỗi",{description:"Lỗi kết nối đến m\xe1y chủ.",duration:5e3,icon:(0,t.jsx)(x.A,{className:"text-error h-4 w-4"})})}}return(0,t.jsx)("div",{className:"rounded-lg bg-white p-2.5 md:w-[667px]",children:(0,t.jsxs)("div",{className:"no-scrollbar relative max-h-[80vh] w-full overflow-x-hidden overflow-y-auto rounded-lg p-6",style:{backgroundImage:"url('/images/images-template-10/background-form.webp')",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",filter:"drop-shadow(-4px 0px 6px rgba(0, 0, 0, 0.1))"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>l("login"),className:"absolute top-3.5 right-3.5 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full",style:{background:"rgba(255, 255, 255, 0.52)"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"var(--primary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsxs)("div",{className:"flex w-full max-w-[647px] flex-col items-start gap-4",children:[(0,t.jsx)("h1",{className:"text-[20px] leading-[24px] font-semibold text-black",children:"Đăng k\xfd t\xe0i khoản mới"}),(0,t.jsx)("div",{className:"flex w-full flex-col items-start gap-2.5 rounded p-4",style:{background:"rgba(244, 239, 255, 0.2)",border:"1px solid rgba(123, 73, 206, 0.2)"},children:(0,t.jsx)(i.lV,{...s,children:(0,t.jsxs)("form",{onSubmit:s.handleSubmit(z),className:"flex w-full flex-col items-start gap-4",children:[(0,t.jsx)(i.zB,{control:s.control,name:"firstName",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"Họ"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.25024 5C6.25024 4.00544 6.64533 3.05161 7.34859 2.34835C8.05185 1.64509 9.00568 1.25 10.0002 1.25C10.9948 1.25 11.9486 1.64509 12.6519 2.34835C13.3552 3.05161 13.7502 4.00544 13.7502 5C13.7502 5.99456 13.3552 6.94839 12.6519 7.65165C11.9486 8.35491 10.9948 8.75 10.0002 8.75C9.00568 8.75 8.05185 8.35491 7.34859 7.65165C6.64533 6.94839 6.25024 5.99456 6.25024 5ZM3.12608 16.7542C3.15418 14.9496 3.89078 13.2284 5.17688 11.9622C6.46298 10.6959 8.19542 9.98621 10.0002 9.98621C11.8051 9.98621 13.5375 10.6959 14.8236 11.9622C16.1097 13.2284 16.8463 14.9496 16.8744 16.7542C16.8766 16.8757 16.8433 16.9951 16.7786 17.098C16.7139 17.2009 16.6207 17.2826 16.5102 17.3333C14.4679 18.2698 12.247 18.753 10.0002 18.75C7.67858 18.75 5.47274 18.2433 3.49024 17.3333C3.37981 17.2826 3.28656 17.2009 3.22188 17.098C3.1572 16.9951 3.12391 16.8757 3.12608 16.7542Z",fill:"currentColor"})})}),(0,t.jsx)(o.p,{autoComplete:"given-name",type:"text",placeholder:"Nhập họ...",className:v,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsx)(i.zB,{control:s.control,name:"lastName",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"T\xean"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.25024 5C6.25024 4.00544 6.64533 3.05161 7.34859 2.34835C8.05185 1.64509 9.00568 1.25 10.0002 1.25C10.9948 1.25 11.9486 1.64509 12.6519 2.34835C13.3552 3.05161 13.7502 4.00544 13.7502 5C13.7502 5.99456 13.3552 6.94839 12.6519 7.65165C11.9486 8.35491 10.9948 8.75 10.0002 8.75C9.00568 8.75 8.05185 8.35491 7.34859 7.65165C6.64533 6.94839 6.25024 5.99456 6.25024 5ZM3.12608 16.7542C3.15418 14.9496 3.89078 13.2284 5.17688 11.9622C6.46298 10.6959 8.19542 9.98621 10.0002 9.98621C11.8051 9.98621 13.5375 10.6959 14.8236 11.9622C16.1097 13.2284 16.8463 14.9496 16.8744 16.7542C16.8766 16.8757 16.8433 16.9951 16.7786 17.098C16.7139 17.2009 16.6207 17.2826 16.5102 17.3333C14.4679 18.2698 12.247 18.753 10.0002 18.75C7.67858 18.75 5.47274 18.2433 3.49024 17.3333C3.37981 17.2826 3.28656 17.2009 3.22188 17.098C3.1572 16.9951 3.12391 16.8757 3.12608 16.7542Z",fill:"currentColor"})})}),(0,t.jsx)(o.p,{autoComplete:"family-name",type:"text",placeholder:"Nhập t\xean...",className:v,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsx)(i.zB,{control:s.control,name:"email",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"Email"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:[(0,t.jsx)("path",{d:"M2.00333 5.88355L9.99995 9.88186L17.9967 5.88355C17.9363 5.37428 17.6979 4.90313 17.3249 4.55647C16.9519 4.2098 16.4683 4.0102 15.9567 4H4.04328C3.53168 4.0102 3.0481 4.2098 2.67507 4.55647C2.30204 4.90313 2.0636 5.37428 2.00333 5.88355Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M18 8.11816L10 12.1165L2 8.11816V14C2 14.5304 2.21071 15.0391 2.58579 15.4142C2.96086 15.7893 3.46957 16 4 16H16C16.5304 16 17.0391 15.7893 17.4142 15.4142C17.7893 15.0391 18 14.5304 18 14V8.11816Z",fill:"currentColor"})]})}),(0,t.jsx)(o.p,{autoComplete:"email",type:"email",placeholder:"Nhập email của bạn...",className:v,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsx)(i.zB,{control:s.control,name:"phone",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"Số điện thoại"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 3.5C2 3.10218 2.15804 2.72064 2.43934 2.43934C2.72065 2.15804 3.10218 2 3.5 2H4.648C4.98947 1.99986 5.32076 2.11622 5.58714 2.32987C5.85351 2.54351 6.03902 2.84165 6.113 3.175L6.829 6.398C6.91176 6.77112 6.84897 7.16176 6.65346 7.49015C6.45795 7.81854 6.14446 8.05992 5.777 8.165L4.844 8.432C4.434 8.549 4.201 8.987 4.364 9.382C4.94408 10.7844 5.79505 12.0587 6.86819 13.1318C7.94134 14.205 9.21558 15.0559 10.618 15.636C11.013 15.799 11.451 15.566 11.568 15.156L11.835 14.223C11.9401 13.8555 12.1815 13.5421 12.5099 13.3465C12.8382 13.151 13.2289 13.0882 13.602 13.171L16.825 13.887C17.1584 13.961 17.4565 14.1465 17.6701 14.4129C17.8838 14.6792 18.0001 15.0105 18 15.352V16.5C18 16.8978 17.842 17.2794 17.5607 17.5607C17.2794 17.842 16.8978 18 16.5 18H15C13.851 18 12.737 17.85 11.674 17.57C9.45506 16.9808 7.43133 15.8155 5.80794 14.1921C4.18454 12.5687 3.01919 10.5449 2.43 8.326C2.14388 7.24051 1.99934 
16.12257 2 5V3.5Z",fill:"currentColor"})})}),(0,t.jsx)(o.p,{autoComplete:"tel",type:"tel",placeholder:"Nhập số điện thoại...",className:v,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsx)(i.zB,{control:s.control,name:"password",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"Nhập mật khẩu"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 6.99988C8.00023 5.95096 8.33033 4.92868 8.94359 4.0777C9.55684 3.22673 10.4222 2.59018 11.4172 2.25812C12.4121 1.92607 13.4864 1.91534 14.4878 2.22745C15.4892 2.53956 16.3671 3.1587 16.9972 3.99725C17.6273 4.8358 17.9778 5.85129 17.999 6.89999C18.0202 7.9487 17.711 8.97751 17.1152 9.84083C16.5195 10.7041 15.6673 11.3582 14.6793 11.7105C13.6913 12.0628 12.6176 12.0955 11.61 11.8039L9.707 13.7069C9.51951 13.8944 9.26519 13.9998 9 13.9999H8V14.9999C8 15.2651 7.89464 15.5195 7.70711 15.707C7.51957 15.8945 7.26522 15.9999 7 15.9999H6V16.9999C6 17.2651 5.89464 17.5195 5.70711 17.707C5.51957 17.8945 5.26522 17.9999 5 17.9999H3C2.73478 17.9999 2.48043 17.8945 2.29289 17.707C2.10536 17.5195 2 17.2651 2 16.9999V14.9999C2.00006 14.7347 2.10545 14.4804 2.293 14.2929L8.196 8.38988C8.06565 7.93807 7.99967 7.47013 8 6.99988ZM13 3.99988C12.8011 3.99988 12.6103 4.0789 12.4697 4.21955C12.329 4.3602 12.25 4.55097 12.25 4.74988C12.25 4.94879 12.329 5.13956 12.4697 5.28021C12.6103 5.42086 12.8011 5.49988 13 5.49988C13.3978 5.49988 13.7794 5.65792 14.0607 5.93922C14.342 6.22053 14.5 6.60206 14.5 6.99988C14.5 7.19879 14.579 7.38956 14.7197 7.53021C14.8603 7.67086 15.0511 7.74988 15.25 7.74988C15.4489 7.74988 15.6397 7.67086 15.7803 7.53021C15.921 7.38956 16 7.19879 16 6.99988C16 6.20423 15.6839 5.44117 15.1213 4.87856C14.5587 4.31595 13.7956 3.99988 13 3.99988Z",fill:"currentColor"})})}),(0,t.jsx)(b.c,{autoComplete:"new-password",type:"password",hideKeyIcon:!0,placeholder:"Nhập mật khẩu...",className:N,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsxs)("div",{className:"flex w-full flex-col items-start justify-start gap-2 px-2",children:[(0,t.jsx)("div",{className:"w-full overflow-hidden",children:(0,t.jsx)(j.A,{sitekey:"6LcpBJ0pAAAAAP1Tf9GVLbiodi69ko_XQCP6Kqvx",onChange:e=>{e&&(F(e),B&&R(""))},theme:"light",size:"normal"})}),B&&(0,t.jsx)("span",{className:"text-xs text-red-500",children:B})]})]})})}),(0,t.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[14px] leading-[18px] font-normal text-white",children:"Bạn đ\xe3 c\xf3 t\xe0i khoản ?"}),(0,t.jsx)("span",{className:"text-primary cursor-pointer text-[14px] leading-[18px] font-bold",onClick:()=>l("login"),children:"Đăng nhập"})]}),(0,t.jsx)(n.$,{className:"bg-primary flex h-[34px] w-full cursor-pointer items-center justify-center gap-3 rounded-full px-4 py-2",disabled:d||!u,type:"submit",onClick:s.handleSubmit(z),children:(0,t.jsx)("span",{className:"text-[14px] leading-[18px] font-bold",style:{color:"#F3EFFF"},children:"Tạo t\xe0i khoản"})})]})]})})}var z=s(86948),A=s(41052),I=s(65142),V=s(80389),H=s(76444),P=s(96199),D=s(15239);let J=u.z.object({password:u.z.string().optional(),firstName:u.z.string().min(2,"Họ tối thiểu 2 k\xed tự").optional(),lastName:u.z.string().min(2,"T\xean tối thiểu 2 k\xed tự").optional(),email:u.z.string().optional(),oldPassword:u.z.string().optional()}),Z={invalidPhone:"Số điện thoại kh\xf4ng hợp lệ",phoneNotExists:"Số điện thoại kh\xf4ng tồn tại",incorrectOldPassword:"Mật khẩu cũ kh\xf4ng ch\xednh x\xe1c"};function T(e){var l,s,i,o;let{onCallBack:d=()=>{}}=e,{data:h}=(0,P.wV)(),{user:u,setUser:j}=g(),b={firstName:null!=(i=null==u?void 0:u.firstName)?i:"",lastName:null!=(o=null==u?void 0:u.lastName)?o:"",email:null==u?void 0:u.email,password:"",oldPassword:""},v=(0,p.mN)({resolver:(0,c.u)(J),values:b}),{formState:{isSubmitting:N},setError:k}=v,y=(0,a.r)(e=>e.config);async function F(e){try{let l={...e};(null==e?void 0:e.password)||delete e.password,(null==e?void 0:e.oldPassword)||delete e.oldPassword;let s=await f.A.patchApi("/api/v1/auth/me",e,null==h?void 0:h.accessToken).then(e=>e.data);
1l.password?(0,r.CI)({callbackUrl:new URL("/",window.location.href).href,redirect:!0}):j(s),m.toast.success("Cập nhật th\xf4ng tin th\xe0nh c\xf4ng",{duration:5e3,icon:(0,t.jsx)(w.A,{className:"h-4 w-4 text-green-600"})}),d()}catch(e){if(e instanceof C.pe){var l,s,a;let t=null==(l=e.response)?void 0:l.data;if(null==t?void 0:t.errors)for(let[e,l]of Object.entries(t.errors))k(e,{type:"server",message:null!=(a=null==Z?void 0:Z[null!=(s=null==l?void 0:l.key)?s:l])?a:l})}else m.toast.error("Cập nhật th\xf4ng tin lỗi",{description:"Lỗi kết nối đến m\xe1y chá»§.",duration:5e3,icon:(0,t.jsx)(x.A,{className:"h-4 w-4 text-red-500"})})}}return(0,t.jsxs)(z.Zp,{className:"mx-auto w-full gap-4 border-none shadow-none",children:[(0,t.jsxs)(z.aR,{className:"gap-8",children:[(0,t.jsx)(z.ZB,{className:"text-center",children:(null==y||null==(l=y.theme)?void 0:l.logo)&&(0,t.jsx)(D.default,{className:"mx-auto",src:y.theme.logo.replace("/api/v1",""),alt:"",width:88,height:88})}),(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)("h3",{className:"text-2xl font-semibold",children:"Cập nhật th\xf4ng tin"})})]}),(0,t.jsx)(z.Wu,{children:(0,t.jsx)(A.lV,{...v,children:(0,t.jsxs)("form",{onSubmit:v.handleSubmit(F),className:"space-y-5",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsx)(A.zB,{control:v.control,name:"firstName",render:e=>{let{field:l}=e;return(0,t.jsxs)(A.eI,{children:[(0,t.jsx)(A.lR,{children:"Họ"}),(0,t.jsx)(A.MJ,{children:(0,t.jsx)(I.p,{autoComplete:"given-name",placeholder:"Nhập họ",className:"h-10",...l})}),(0,t.jsx)(A.C5,{})]})}}),(0,t.jsx)(A.zB,{control:v.control,name:"lastName",render:e=>{let{field:l}=e;return(0,t.jsxs)(A.eI,{children:[(0,t.jsx)(A.lR,{children:"T\xean"}),(0,t.jsx)(A.MJ,{children:(0,t.jsx)(I.p,{autoComplete:"family-name",placeholder:"Nhập t\xean",className:"h-10",...l})}),(0,t.jsx)(A.C5,{})]})}})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(H.J,{children:"Số điện thoại"}),(0,t.jsx)(I.p,{disabled:!0,className:"h-10",value:null==h||null==(s=h.user)?void 0:s.phone})]}),(0,t.jsx)(A.zB,{control:v.control,name:"email",render:e=>{let{field:l}=e;return(0,t.jsxs)(A.eI,{children:[(0,t.jsx)(A.lR,{children:"Email"}),(0,t.jsx)(A.MJ,{children:(0,t.jsx)(I.p,{autoComplete:"email",type:"email",placeholder:"Nhập email",className:"h-10",...l})}),(0,t.jsx)(A.C5,{})]})}}),(0,t.jsx)(A.zB,{control:v.control,name:"oldPassword",render:e=>{let{field:l}=e;return(0,t.jsxs)(A.eI,{children:[(0,t.jsx)(A.lR,{children:"Mật khẩu cÅ©"}),(0,t.jsx)(A.MJ,{children:(0,t.jsx)(V.c,{className:"h-10",placeholder:"Nhập mật khẩu",autoComplete:"current-password",...l})}),(0,t.jsx)(A.C5,{})]})}}),(0,t.jsx)(A.zB,{control:v.control,name:"password",render:e=>{let{field:l}=e;return(0,t.jsxs)(A.eI,{children:[(0,t.jsx)(A.lR,{children:"Mật khẩu"}),(0,t.jsx)(A.MJ,{children:(0,t.jsx)(V.c,{className:"h-10",placeholder:"Nhập mật khẩu",autoComplete:"new-password",...l})}),(0,t.jsx)(A.C5,{})]})}})]}),(0,t.jsx)(n.$,{className:"h-12 w-full",size:"lg",disabled:N,type:"submit",children:"X\xe1c nhận"})]})})})]})}let K=u.z.object({phone:k.KA,password:k.$w}),O={incorrectPassword:"Mật khẩu kh\xf4ng ch\xednh x\xe1c",notFound:"Số điện thoại kh\xf4ng tồn tại",invalidPhone:"Số điện thoại kh\xf4ng hợp lệ"};function $(e){let{initFormType:l="login",onCallBack:s=()=>{}}=e,u=(0,p.mN)({resolver:(0,c.u)(K),values:{phone:"",password:""},mode:"onChange"}),{formState:{isSubmitting:f,isValid:C},setError:w}=u,j=(0,a.r)(e=>e.config),k=g(e=>e.user);async function y(e){try{let t=await (0,r.Jv)("credentials",{...e,merchantId:null==j?void 0:j.merchantId,redirect:!1});if(t.code||t.error){let e=JSON.parse(t.code);if(null==e?void 0:e.errors)for(let[s,t]of Object.entries(e.errors)){var l,a;w(s,{type:"server",message:null!=(a=null==O?void 0:O[null!=(l=null==t?void 0:t.key)?l:t])?a:t})}}else(0,r.IL)()?s():window.location.href=(0,r.LN)()}catch(e){m.toast.error("Đăng Nhập lỗi",{description:"Lỗi kết nối đến m\xe1y chá»
1§.",duration:5e3,icon:(0,t.jsx)(x.A,{className:"text-error h-4 w-4"})})}}let[F,L]=(0,h.useState)(!0);(0,h.useEffect)(()=>{(null==k?void 0:k.id)&&L(!1)},[null==k?void 0:k.id]);let[M,S]=(0,h.useState)(l);return(0,h.useLayoutEffect)(()=>()=>{L(!0)},[]),(0,t.jsxs)(d.a,{title:"",titleClassName:"hidden",description:"",isOpen:F,onClose:()=>{L(!1),s()},closeClassName:"text-white hover:text-white/80",headerClassName:"!bg-transparent !h-auto !absolute !right-2 !top-2 !w-auto !p-0 !z-[100]",className:"!h-fit !w-[calc(100%-2rem)] !max-w-[500px] !overflow-visible !rounded-none !border-0 !bg-transparent !p-0 !shadow-none",children:["login"==M&&(0,t.jsx)("div",{className:"rounded-lg bg-white p-2.5 md:w-[667px]",children:(0,t.jsxs)("div",{className:"relative w-full overflow-hidden rounded-lg p-6",style:{backgroundImage:"url('/images/images-template-10/background-form.webp')",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",filter:"drop-shadow(-4px 0px 6px rgba(0, 0, 0, 0.1))"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>{L(!1),s()},className:"absolute top-3.5 right-3.5 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full",style:{background:"rgba(255, 255, 255, 0.52)"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"var(--primary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsxs)("div",{className:"flex w-full max-w-[647px] flex-col items-start gap-4",children:[(0,t.jsx)("h1",{className:"text-[20px] leading-[24px] font-semibold text-black",children:"Đăng nhập"}),(0,t.jsx)("div",{className:"flex w-full flex-col items-start gap-2.5 rounded p-4",style:{background:"rgba(244, 239, 255, 0.2)",border:"1px solid rgba(123, 73, 206, 0.2)"},children:(0,t.jsx)(i.lV,{...u,children:(0,t.jsxs)("form",{onSubmit:u.handleSubmit(y),className:"flex w-full flex-col items-start gap-4",children:[(0,t.jsx)(i.zB,{control:u.control,name:"phone",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"Số điện thoại"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 3.5C2 3.10218 2.15804 2.72064 2.43934 2.43934C2.72065 2.15804 3.10218 2 3.5 2H4.648C4.98947 1.99986 5.32076 2.11622 5.58714 2.32987C5.85351 2.54351 6.03902 2.84165 6.113 3.175L6.829 6.398C6.91176 6.77112 6.84897 7.16176 6.65346 7.49015C6.45795 7.81854 6.14446 8.05992 5.777 8.165L4.844 8.432C4.434 8.549 4.201 8.987 4.364 9.382C4.94408 10.7844 5.79505 12.0587 6.86819 13.1318C7.94134 14.205 9.21558 15.0559 10.618 15.636C11.013 15.799 11.451 15.566 11.568 15.156L11.835 14.223C11.9401 13.8555 12.1815 13.5421 12.5099 13.3465C12.8382 13.151 13.2289 13.0882 13.602 13.171L16.825 13.887C17.1584 13.961 17.4565 14.1465 17.6701 14.4129C17.8838 14.6792 18.0001 15.0105 18 15.352V16.5C18 16.8978 17.842 17.2794 17.5607 17.5607C17.2794 17.842 16.8978 18 16.5 18H15C13.851 18 12.737 17.85 11.674 17.57C9.45506 16.9808 7.43133 15.8155 5.80794 14.1921C4.18454 12.5687 3.01919 10.5449 2.43 8.326C2.14388 7.24051 1.99934 6.12257 2 5V3.5Z",fill:"#462E90"})})}),(0,t.jsx)(o.p,{autoComplete:"username",type:"tel",placeholder:"Nhập số điện thoại...",className:v,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}}),(0,t.jsx)(i.zB,{control:u.control,name:"password",render:e=>{let{field:l}=e;return(0,t.jsxs)(i.eI,{className:"flex w-full flex-col items-start gap-1 px-2",children:[(0,t.jsx)("label",{className:"text-[14px] leading-[18px] font-bold text-black",children:"Nhập mật khẩu"}),(0,t.jsx)(i.MJ,{children:(0,t.jsxs)("div",{className:"flex h-11 w-full flex-row items-center gap-1 rounded-lg px-2 py-3",style:{background:"#F3EFFF",border:"1px solid #DBD7FF",boxShadow:"0px 2px 6px rgba(153, 113, 234, 0.2)"},children:[(0,t.jsx)("div",{className:"flex h-5 w-6 flex-shrink-0 items-center gap-2.5 pr-1",style:{borderRight:"1px solid #C4BEFB"},children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-primary h-5 w-5",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 6.99988C8.00023 5.95096 8.33033 4.92868 8.94359 4.0777C9.55684 3.22673 10.4222 2.59018 11.4172 2.25812C12.4121 1.92607 13.4864 1.91534 14.4878 2.22745C15.4892 2.53956 16.3671 3.1587 16.9972 3.99725C17.6273 4.8358 17.9778 5.85129 17.999 6.89999C18.0202 7.9487 17.711 8.97751 17.1152 9.84083C16.5195 10.7041 15.6673 11.3582 14.6793 11.7105C13.6913 12.0628 12.6176 12.0955 11.61 11.8039L9.707 13.7069C9.51951 13.8944 9.26519 13.9998 9 13.9999H8V14.9999C8 15.2651 7.89464 15.5195 7.70711 15.707C7.51957 15.8945 7.26522 15.9999 7 15.9999H6V16.9999C6 17.2651 5.89464 17.5195 5.70711 17.707C5.51957 17.8945 5.26522 17.9999 5 17.9999H3C2.73478 17.9999 2.48043 17.8945 2.29289 17.707C2.10536 17.5195 2 17.2651 2 16.9999V14.9999C2.00006 14.7347 2.10545 14.4804 2.293 14.2929L8.196 8.38988C8.06565 7.93807 7.99967 7.47013 8 6.99988ZM13 3.99988
1C12.8011 3.99988 12.6103 4.0789 12.4697 4.21955C12.329 4.3602 12.25 4.55097 12.25 4.74988C12.25 4.94879 12.329 5.13956 12.4697 5.28021C12.6103 5.42086 12.8011 5.49988 13 5.49988C13.3978 5.49988 13.7794 5.65792 14.0607 5.93922C14.342 6.22053 14.5 6.60206 14.5 6.99988C14.5 7.19879 14.579 7.38956 14.7197 7.53021C14.8603 7.67086 15.0511 7.74988 15.25 7.74988C15.4489 7.74988 15.6397 7.67086 15.7803 7.53021C15.921 7.38956 16 7.19879 16 6.99988C16 6.20423 15.6839 5.44117 15.1213 4.87856C14.5587 4.31595 13.7956 3.99988 13 3.99988Z",fill:"currentColor"})})}),(0,t.jsx)(b.c,{autoComplete:"current-password",type:"password",hideKeyIcon:!0,placeholder:"Nhập mật khẩu...",className:N,...l})]})}),(0,t.jsx)(i.C5,{className:"mt-1 text-xs text-red-500"})]})}})]})})}),(0,t.jsxs)("div",{className:"flex w-full flex-col items-center justify-between md:flex-row",children:[(0,t.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[14px] leading-[18px] font-normal text-white",children:"Bạn chưa c\xf3 t\xe0i khoản ?"}),(0,t.jsx)("span",{className:"text-primary cursor-pointer text-[14px] leading-[18px] font-bold",onClick:()=>S("register"),children:"Đăng k\xfd"})]}),(0,t.jsx)("span",{onClick:()=>S("forgotPassword"),className:"text-primary cursor-pointer text-[14px] leading-[18px] font-bold hover:underline",children:"Qu\xean mật khẩu"})]}),(0,t.jsx)(n.$,{className:"bg-primary flex h-[34px] w-full cursor-pointer items-center justify-center gap-3 rounded-full px-4 py-2",disabled:f||!C,type:"submit",onClick:u.handleSubmit(y),children:(0,t.jsx)("span",{className:"text-[14px] leading-[18px] font-bold",style:{color:"#F3EFFF"},children:"Đăng nhập"})})]})]})}),"register"==M&&(0,t.jsx)(R,{setFormType:S}),"forgotPassword"==M&&(0,t.jsx)(B,{setFormType:S,onClose:()=>{L(!1),s()}}),"updateProfile"==M&&(0,t.jsx)(T,{onCallBack:s})]})}}}]);

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.