1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1687],{1687:(e,t,r)=>{r.d(t,{A:()=>T});var l=r(95155),a=r(20865),s=r(39180),n=r(25559),i=r(40649),o=r(96017),c=r(44774),d=r(49150),u=r(50313),m=r(66942),p=r(52056),x=r(12115),h=r(22544),f=r(18720),b=r(15653);let g=(0,r(25959).v)()(e=>({user:null,setUser:t=>e({user:t}),updateCoin:t=>e(e=>({user:e.user?{...e.user,coin:Number(e.user.coin)+t}:null})),clearUser:()=>e({user:null})}));var v=r(13744),w=r(60919),j=r(61362),y=r(1141),N=r(15239);function _(e){let{children:t}=e;return(0,l.jsxs)("div",{className:"flex w-full items-stretch gap-4 rounded-[32px] bg-white p-1 lg:grid lg:grid-cols-[300px_minmax(0,1fr)] 2xl:min-h-[367px]",children:[(0,l.jsx)("div",{className:"relative hidden self-stretch overflow-hidden rounded-[32px] lg:block",children:(0,l.jsx)(N.default,{className:"h-full min-h-[359px] w-[300px] rounded-[32px] object-cover 2xl:min-h-0",src:"/images/images-template-6/bannerAuth.webp",alt:"Server Illustration",width:300,height:359,priority:!0})}),(0,l.jsx)("div",{className:"h-full min-w-0 flex-1",children:t})]})}var k=r(66654);let C=b.z.object({hash:b.z.string().nonempty("M\xe3 l\xe0 bắt buá»c"),email:k.rK,password:k.$w,confirmPassword:k.$w}),z={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 I(e){let{setFormType:t,onClose:r}=e,[a,d]=(0,x.useState)(!1),[u,b]=(0,x.useState)(""),[g,N]=(0,x.useState)(""),k=(0,h.mN)({resolver:(0,m.u)(C),values:{password:"",confirmPassword:"",hash:"",email:""},mode:"onChange"}),{formState:{isSubmitting:I,isValid:A},setError:M}=k,E=k.watch("email"),F=(0,s.r)(e=>e.config);async function S(e){try{if(!u)return void N("Vui l\xf2ng x\xe1c nháºn bạn kh\xf4ng phải l\xe0 ngưá»i m\xe1y");await v.A.postApi("/api/v1/auth/reset/password",e,"",{headers:{"x-merchant-id":null==F?void 0:F.merchantId}}),f.toast.success("Äặt lại máºt khẩu th\xe0nh c\xf4ng",{duration:5e3,icon:(0,l.jsx)(j.A,{className:"text-success h-4 w-4"})})}catch(e){if(e instanceof w.pe){var t,r,a;let l=null==(t=e.response)?void 0:t.data;if(null==l?void 0:l.errors)for(let[e,t]of Object.entries(l.errors))M(e,{type:"server",message:null!=(a=null==z?void 0:z[null!=(r=null==t?void 0:t.key)?r:t])?a:t})}else f.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,l.jsx)(p.A,{className:"text-error h-4 w-4"})})}}async function B(e){try{e.preventDefault(),d(!0),await k.trigger("email")&&(await v.A.postApi("/api/v1/auth/forgot/password",{email:E},"",{headers:{"x-merchant-id":null==F?void 0:F.merchantId}}),f.toast.success("Gá»i m\xe3 th\xe0nh c\xf4ng",{duration:5e3,icon:(0,l.jsx)(j.A,{className:"text-success h-4 w-4"})}))}catch(e){if(e instanceof w.pe){var t,r,a,s;let n=null==(t=e.response)?void 0:t.data;if(null==n?void 0:n.errors)for(let[e,t]of Object.entries(n.errors))M(e,{type:"server",message:null!=(s=null==z?void 0:z[null!=(a=null==t?void 0:t.key)?a:t])?s:t});else f.toast.error("Gá»i m\xe3 lá»i",{description:null!=(r=null==n?void 0:n.message)?r:"Lá»i kết ná»i Äến m\xe1y chá»§.",duration:5e3,icon:(0,l.jsx)(p.A,{className:"text-error h-4 w-4"})})}else f.toast.error("Gá»i m\xe3 lá»i",{description:"Lá»i kết ná»i Äến m\xe1y chá»§.",duration:5e3,icon:(0,l.jsx)(p.A,{className:"text-error h-4 w-4"})})}finally{d(!1)}}return(0,l.jsx)(_,{children:(0,l.jsxs)("div",{className:"z-[6] flex h-auto w-full max-w-full flex-col items-start gap-2 px-3 py-6 sm:max-w-[360px] sm:gap-3 sm:overflow-y-auto sm:px-4 sm:py-8",children:[(0,l.jsx)("h1",{className:"text-primary text-xl font-bold",children:"Qu\xean máºt khẩu"}),(0,l.jsx)(i.lV,{...k,children:(0,l.jsxs)("form",{onSubmit:k.handleSubmit(S),className:"flex w-full max-w-[340px] flex-col items-start gap-2 sm:gap-2.5",children:[(0,l.jsx)(i.zB,{control:k.control,name:"email",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 w-full",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsxs)("div",{className:"relative w-full max-w-[340px]",children:[(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"pointer-events-none absolute top-1/2 left-4 !h-5 !w-5 -translate-y-1/2 transition-colors ".concat(t.value?"text-primary":"text-[#393D46]"),children:(0,l.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z",fill:"
1currentColor"})}),(0,l.jsx)(o.p,{autoComplete:"email",type:"email",placeholder:"Email",className:"auth-input-white border-border-template-4 focus-visible:border-primary h-[40px] w-full rounded-[8px] border pl-[48px] text-base leading-[130%] font-normal placeholder:text-[#9E9E9F] focus-visible:ring-0 focus-visible:ring-offset-0 ".concat(t.value?"text-primary":"text-text-normal-template-4"),...t})]})}),(0,l.jsx)(i.C5,{})]})}}),(0,l.jsxs)("div",{className:"z-10 flex w-full max-w-[340px] flex-row gap-3",children:[(0,l.jsx)(i.zB,{control:k.control,name:"hash",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"flex-1",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsx)(o.p,{autoComplete:"one-time-code",type:"text",placeholder:"M\xe3 OTP",className:"auth-input-white border-border-template-4 focus-visible:border-primary h-[40px] w-full rounded-[8px] border px-4 text-base leading-[130%] font-normal placeholder:text-[#9E9E9F] focus-visible:ring-0 focus-visible:ring-offset-0 ".concat(t.value?"text-primary":"text-text-normal-template-4"),...t})}),(0,l.jsx)(i.C5,{})]})}}),(0,l.jsx)(n.$,{onClick:B,className:"bg-primary hover:bg-primary/90 h-[40px] rounded-[8px] px-6 text-base leading-[130%] font-semibold text-white",disabled:a||!E||""===E,type:"button",children:"Gá»i"})]}),(0,l.jsx)(i.zB,{control:k.control,name:"password",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 w-full",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsx)(c.c,{autoComplete:"new-password",placeholder:"Máºt khẩu má»i",hasValue:!!t.value,className:"auth-input-white border-border-template-4 focus-visible:border-primary h-[40px] w-full max-w-[340px] rounded-[8px] border pl-12 text-base leading-[130%] font-normal placeholder:text-[#9E9E9F] focus-visible:ring-0 focus-visible:ring-offset-0 [&::-ms-clear]:hidden [&::-ms-reveal]:hidden [&::-webkit-contacts-auto-fill-button]:hidden [&::-webkit-credentials-auto-fill-button]:hidden ".concat(t.value?"text-primary":"text-text-normal-template-4"),...t})}),(0,l.jsx)(i.C5,{})]})}}),(0,l.jsx)(i.zB,{control:k.control,name:"confirmPassword",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 w-full",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsx)(c.c,{autoComplete:"new-password",placeholder:"X\xe1c nháºn máºt khẩu má»i",hasValue:!!t.value,className:"auth-input-white border-border-template-4 focus-visible:border-primary h-[40px] w-full max-w-[340px] rounded-[8px] border pl-12 text-base leading-[130%] font-normal placeholder:text-[#9E9E9F] focus-visible:ring-0 focus-visible:ring-offset-0 ".concat(t.value?"text-primary":"text-text-normal-template-4"),...t})}),(0,l.jsx)(i.C5,{})]})}}),(0,l.jsxs)("div",{className:"z-10 w-full max-w-[340px]",children:[(0,l.jsx)(y.A,{sitekey:"6LcpBJ0pAAAAAP1Tf9GVLbiodi69ko_XQCP6Kqvx",onChange:e=>{e&&(b(e),g&&N(""))},onExpired:()=>b(""),hl:"vi",className:"w-full origin-top-left scale-[0.70] sm:scale-[0.98]"}),g&&(0,l.jsx)("span",{className:"text-base leading-[130%] font-normal text-[#DC2626]",children:g})]}),(0,l.jsx)(n.$,{className:"hover:bg-primary/90 z-10 flex h-9 w-full max-w-[340px] flex-row items-center justify-center gap-2 rounded-[8px] px-8 py-2 text-base font-semibold ".concat(A?"bg-primary text-white":"bg-[#D7D9DF] text-white"),disabled:I||!A,type:"submit",children:"Äặt lại máºt khẩu"}),(0,l.jsxs)("div",{className:"flex items-center text-base leading-[130%] font-normal text-black",children:["Bạn Ä\xe3 t\xecm lại ÄÆ°á»£c máºt khẩu?"," ",(0,l.jsx)(n.$,{onClick:()=>t("login"),type:"button",variant:"link",className:"p-0 pl-1 text-base font-normal text-[rgb(from_var(--primary)_calc(r_-_30)_calc(g_-_40)_calc(b_-_28))]",children:"ÄÄng nháºp ngay"})]})]})})]})})}var A=r(95307),M=r(35652);let E="h-10 w-full rounded-lg border border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] bg-white py-2.5 text-sm leading-[19px] font-normal text-black shadow-none placeholder:text-[rgb(from_var(--primary)_calc(r+92)_calc(g+54)_calc(b+40))] focus-visible:border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:shadow-[0px_2px_6px_0px_rgb(from_var(--primary)_r_g_b_/_0.25)]",F="pointer-events-none absolute top-1/2 left-3 !h-4 !w-4 -translate-y-1/2 text-[rgb(from_var(--primary)_calc(r+78)_calc(g+68)_calc(b+65))]",S=b.z.object({firstName:k.fV,lastName:k.tM,email:k.rK,phone:k.KA,password:k.$w}),B={invalidPhone:"Sá» Äiá»n thoại kh\xf4ng hợp lá»",phoneExists:"Sá» Äiá»n thoại Ä\xe3 tá»n tại"};function L(e){let{setFormType:t}=e,r=(0,h.mN)({resolver:(0,m.u)(S),values:{email:"",password:"",firstName:"",lastName:"",phone:""},mode:"onChange"}),{formState:{isSubmitting:d,isValid:x},setError:b}=r,g=(0,s.r)(e=>e.config);async function y(e){try{let t=(0,A.G2)(),r=(0,a.mD)(),s={...e,...r&&{domainSource:r},...t&&{refClickId:t}};await v.A.postApi("/api/v1/auth/register",s,"",{headers:{"x-merchant-id":null==g?void 0:g.merchantId}}),t&&(0,A.p7)(),f.toast.success("ÄÄng k\xfd th\xe0nh c\xf4ng",{duration:5e3,icon:(0,l.jsx)(j.A,{className:"text-success h-4 w-4"})}),await (0,a.Jv)("credentials",{phone:e.phone,password:e.password,merchantId:null==g?void 0:g.merchantId,redirect:!1}),(0,M.E)(),(0,a.IL)()||(window.location.href=(0,a.LN)())}catch(e){if(e instanceof w.pe){var t,r,s;let l=null==(t=e.response)?void 0:t.data;if(null==l?void 0:l.errors)for(let[e,t]of Object.entries(l.errors))b(e,{type:"server",message:null!=(s=null==B?void 0:B[null!=(r=null==t?void 0:t.key)?r:t])?s:t})}else f.toast.error("ÄÄng k\xfd lá»i",{description:"Lá»i kết ná»i Äến m\xe1y chá»
1§.",duration:5e3,icon:(0,l.jsx)(p.A,{className:"text-error h-4 w-4"})})}}return(0,l.jsx)(_,{children:(0,l.jsxs)("div",{className:"z-[6] flex h-full w-full max-w-full flex-col items-start gap-4 overflow-y-auto p-3 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[(0,l.jsx)("div",{className:"w-full border-b pb-2 ".concat("border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]"),children:(0,l.jsx)("h1",{className:"text-primary text-xl leading-[27px] font-bold",children:"Tạo t\xe0i khoản má»i"})}),(0,l.jsx)(i.lV,{...r,children:(0,l.jsxs)("form",{onSubmit:r.handleSubmit(y),className:"flex w-full flex-col items-start gap-4",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col items-end gap-3",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-3 sm:flex-row",children:[(0,l.jsx)(i.zB,{control:r.control,name:"firstName",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 flex-1",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsx)(o.p,{autoComplete:"given-name",placeholder:"Nguyá»
n VÄn",className:"auth-input-white ".concat(E," px-3"),...t})}),(0,l.jsx)(i.C5,{})]})}}),(0,l.jsx)(i.zB,{control:r.control,name:"lastName",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 flex-1",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsx)(o.p,{autoComplete:"family-name",placeholder:"T\xean",className:"auth-input-white ".concat(E," px-3"),...t})}),(0,l.jsx)(i.C5,{})]})}})]}),(0,l.jsx)(i.zB,{control:r.control,name:"phone",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 w-full",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)(u.F.PhoneIcon,{className:F}),(0,l.jsx)(o.p,{autoComplete:"tel",type:"tel",placeholder:"Sá» Äiá»n thoại",className:"auth-input-white ".concat(E," pr-3 pl-9"),...t})]})}),(0,l.jsx)(i.C5,{})]})}}),(0,l.jsx)(i.zB,{control:r.control,name:"email",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 w-full",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",className:F,"aria-hidden":"true",children:(0,l.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z",fill:"currentColor"})}),(0,l.jsx)(o.p,{autoComplete:"email",type:"email",placeholder:"Email",className:"auth-input-white ".concat(E," pr-3 pl-9"),...t})]})}),(0,l.jsx)(i.C5,{})]})}}),(0,l.jsx)(i.zB,{control:r.control,name:"password",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 w-full",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsx)(c.c,{autoComplete:"new-password",placeholder:"Máºt khẩu",hasValue:!!t.value,keyIconClassName:"top-1/2 left-3 !h-4 !w-4 text-[rgb(from_var(--primary)_calc(r+78)_calc(g+68)_calc(b+65))]",toggleClassName:"right-3",toggleIconClassName:"!h-4 !w-4 text-[rgb(from_var(--primary)_calc(r+78)_calc(g+68)_calc(b+65))]",className:"auth-input-white ".concat(E," pr-9 pl-9"),...t})}),(0,l.jsx)(i.C5,{})]})}})]}),(0,l.jsx)(n.$,{className:"bg-primary z-10 flex h-9 w-full flex-row items-center justify-center gap-2 rounded-lg px-2 py-2 text-base leading-[22px] font-bold text-white transition-colors duration-200 hover:bg-[rgb(from_var(--primary)_calc(r+49)_calc(g+45)_calc(b+45))] disabled:bg-[rgb(from_var(--primary)_calc(r+176)_calc(g+136)_calc(b+120))]",disabled:d||!x,type:"submit",children:"Tạo t\xe0i khoản"}),(0,l.jsxs)("div",{className:"flex w-full items-center text-sm leading-[19px] font-normal text-black",children:["Bạn Ä\xe3 c\xf3 t\xe0i khoản?"," ",(0,l.jsx)(n.$,{onClick:()=>t("login"),type:"button",variant:"link",className:"text-primary h-auto p-0 pl-1 text-sm leading-[19px] font-bold",children:"ÄÄng nháºp"})]})]})})]})})}var J=r(77516);let V=b.z.object({phone:k.KA,password:k.$w}),P="h-10 w-full rounded-lg border border-[rgb(from_var(--primary)_calc(r+176)_calc(g+136)_calc(b+120))] bg-white py-2.5 pl-9 pr-3 text-sm leading-[19px] font-normal text-black shadow-none placeholder:text-[rgb(from_var(--primary)_calc(r+92)_calc(g+54)_calc(b+40))]",D={incorrectPassword:"Máºt khẩu kh\xf4ng ch\xednh x\xe1c",notFound:"Sá» Äiá»n thoại kh\xf4ng tá»n tại",invali
1dPhone:"Sá» Äiá»n thoại kh\xf4ng hợp lá»"};function T(e){let{initFormType:t="login",onCallBack:r=()=>{}}=e,b=(0,h.mN)({resolver:(0,m.u)(V),values:{phone:"",password:""},mode:"onChange"}),{formState:{isSubmitting:v,isValid:w},setError:j}=b,y=(0,s.r)(e=>e.config),N=g(e=>e.user);async function k(e){try{let l=await (0,a.Jv)("credentials",{...e,merchantId:null==y?void 0:y.merchantId,redirect:!1});if(l.code||l.error){let e=JSON.parse(l.code);if(null==e?void 0:e.errors)for(let[r,l]of Object.entries(e.errors)){var t,s;j(r,{type:"server",message:null!=(s=null==D?void 0:D[null!=(t=null==l?void 0:l.key)?t:l])?s:l})}}else(0,a.IL)()?r():window.location.href=(0,a.LN)()}catch(e){f.toast.error("ÄÄng Nháºp lá»i",{description:"Lá»i kết ná»i Äến m\xe1y chá»§.",duration:5e3,icon:(0,l.jsx)(p.A,{className:"text-error h-4 w-4"})})}}let[C,z]=(0,x.useState)(!0);(0,x.useEffect)(()=>{(null==N?void 0:N.id)&&z(!1)},[null==N?void 0:N.id]);let[A,M]=(0,x.useState)(t);return(0,x.useLayoutEffect)(()=>()=>{z(!0)},[]),(0,l.jsxs)(d.a,{title:"",titleClassName:"hidden",description:"",isOpen:C,onClose:()=>{z(!1),r()},headerClassName:"!bg-transparent !h-auto !absolute !top-0 !right-0 !w-auto !p-0 !z-[100]",closeButtonClassName:"top-[7px] right-[13px] h-9 w-9 rounded-lg bg-transparent p-2 shadow-none hover:bg-[rgb(from_var(--primary)_calc(r+192)_calc(g+150)_calc(b+128))]",closeClassName:"!h-5 !w-5 text-[rgb(from_var(--primary)_calc(r+103)_calc(g+62)_calc(b+45))]",className:"!h-auto !w-[calc(100%-2rem)] !max-w-[calc(100%-2rem)] !overflow-visible !rounded-[32px] !bg-white !p-0 sm:!w-[420px] lg:!w-[702px]",children:["login"==A&&(0,l.jsx)(_,{children:(0,l.jsxs)("div",{className:"flex h-full w-full max-w-full flex-col items-start justify-center gap-4 px-3 py-16",children:[(0,l.jsx)("div",{className:"w-full border-b pb-2 ".concat("border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]"),children:(0,l.jsx)("h1",{className:"text-primary text-xl leading-[27px] font-bold",children:"ÄÄng nháºp t\xe0i khoản"})}),(0,l.jsx)(i.lV,{...b,children:(0,l.jsxs)("form",{onSubmit:b.handleSubmit(k),className:"flex w-full max-w-full flex-col items-start gap-4",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-3",children:[(0,l.jsx)(i.zB,{control:b.control,name:"phone",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 w-full",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)(u.F.PhoneIcon,{className:"pointer-events-none absolute top-1/2 left-3 !h-4 !w-4 -translate-y-1/2 text-[rgb(from_var(--primary)_calc(r+78)_calc(g+68)_calc(b+65))]"}),(0,l.jsx)(o.p,{autoComplete:"username",type:"tel",placeholder:"Sá» Äiá»n thoại",className:"auth-input-white ".concat(P," focus-visible:ring-0 focus-visible:ring-offset-0"),...t})]})}),(0,l.jsx)(i.C5,{})]})}}),(0,l.jsx)(i.zB,{control:b.control,name:"password",render:e=>{let{field:t}=e;return(0,l.jsxs)(i.eI,{className:"z-10 w-full",children:[(0,l.jsx)(i.MJ,{children:(0,l.jsx)(c.c,{autoComplete:"current-password",placeholder:"Máºt khẩu",hasValue:!!t.value,keyIconClassName:"top-1/2 left-3 !h-4 !w-4 text-[rgb(from_var(--primary)_calc(r+78)_calc(g+68)_calc(b+65))]",toggleClassName:"right-3",toggleIconClassName:"!h-4 !w-4 text-[rgb(from_var(--primary)_calc(r+78)_calc(g+68)_calc(b+65))]",className:"auth-input-white ".concat(P," pr-9 focus-visible:ring-0 focus-visible:ring-offset-0 [&::-ms-clear]:hidden [&::-ms-reveal]:hidden [&::-webkit-contacts-auto-fill-button]:hidden [&::-webkit-credentials-auto-fill-button]:hidden"),...t})}),(0,l.jsx)(i.C5,{})]})}})]}),(0,l.jsx)(n.$,{className:"z-10 flex h-9 w-full flex-row items-center justify-center gap-2 rounded-lg px-2 py-2 text-base leading-[22px] font-bold text-white transition-colors duration-200 ".concat(w?"bg-primary hover:bg-[rgb(from_var(--primary)_calc(r+49)_calc(g+45)_calc(b+45))]":"bg-[rgb(from_var(--primary)_calc(r+176)_calc(g+136)_calc(b+120))]"),disabled:v||!w,type:"submit",children:"ÄÄng nháºp"}),(0,l.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-x-2 text-sm leading-[19px] font-normal text-black",children:[(0,l.jsxs)("span",{className:"flex items-center",children:["Bạn chưa c\xf3 t\xe0i khoản?"," ",(0,l.jsx)(n.$,{onClick:()=>M("register"),type:"button",variant:"link",className:"text-primary h-auto p-0 pl-1 text-sm leading-[19px] font-bold",children:"ÄÄng k\xfd"})]}),(0,l.jsx)(n.$,{onClick:()=>M("forgotPassword"),type:"button",variant:"link",className:"text-primary h-auto p-0 text-sm leading-[19px] font-bold hover:no-underline",children:"Qu\xean máºt khẩu"})]})]})})]})}),"register"==A&&(0,l.jsx)(L,{setFormType:M}),"forgotPassword"==A&&(0,l.jsx)(I,{setFormType:M,onClose:()=>{z(!1),r()}}),"updateProfile"==A&&(0,l.jsx)(J.A,{onCallBack:r})]})}},25559:(e,t,r)=>{r.d(t,{$:()=>o,r:()=>i});var l=r(95155);r(12115);var a=r(32467),s=r(83101),n=r(64269);let i=(0,s.F)("inline-flex items-center hover:cursor-pointer justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[1px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border border-primary bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 text-primary data-[active=true]:text-primary data-[active=true]:border-primary data-[active=true]:bg-primary/10",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-primary-hover hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-lg gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-lg px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:r,size:s,asChild:o=!1,...c}=e,d=o?a.DX:"button";return(0,l.jsx)(d,{"data-slot":"button",className:(0,n.cn)(i({variant:r,size:s,className:t})),...c})}},40649:(e,t,r)=>{r.d(t,{C5:()=>b,MJ:()=>f,eI:()=>x,lR:()=>h,lV:()=>c,zB:()=>u});var l=r(95155),a=r(12115),s=r(32467),n=r(22544),i=r(64269),o=r(76444);let c=n.Op,d=a.createContext({}),u=e=>{let{...t}=e;return(0,l.jsx)(d.Provider,{value:{name:t.name},children:(0,l.jsx)(n.xI,{...t})})},m=()=>{let e=a.useContext(d),t=a.useContext(p),{getFieldState:r,formState:l}=(0,n.xW)(),s=r(e.name,l);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...s}},p=a.createContext({}),x=a.forwardRef((e,t)=>
1{let{className:r,...s}=e,n=a.useId();return(0,l.jsx)(p.Provider,{value:{id:n},children:(0,l.jsx)("div",{ref:t,className:(0,i.cn)("flex w-full flex-col gap-2",r),...s})})});x.displayName="FormItem";let h=a.forwardRef((e,t)=>{let{className:r,...a}=e,{error:s,formItemId:n}=m();return(0,l.jsx)(o.J,{ref:t,className:(0,i.cn)(s&&"text-text-normal","h-[17px]",r),htmlFor:n,...a})});h.displayName="FormLabel";let f=a.forwardRef((e,t)=>{let{...r}=e,{error:a,formItemId:n,formDescriptionId:i,formMessageId:o}=m();return(0,l.jsx)(s.DX,{ref:t,id:n,"aria-describedby":a?"".concat(i," ").concat(o):"".concat(i),"aria-invalid":!!a,...r})});f.displayName="FormControl",a.forwardRef((e,t)=>{let{className:r,...a}=e,{formDescriptionId:s}=m();return(0,l.jsx)("p",{ref:t,id:s,className:(0,i.cn)("text-muted-foreground text-[0.8rem]",r),...a})}).displayName="FormDescription";let b=a.forwardRef((e,t)=>{var r;let{className:a,children:s,...n}=e,{error:o,formMessageId:c}=m(),d=o?String(null!=(r=null==o?void 0:o.message)?r:""):s;return d?(0,l.jsx)("p",{ref:t,id:c,className:(0,i.cn)("text-error text-sm font-medium",a),...n,children:d}):null});b.displayName="FormMessage"},44774:(e,t,r)=>{r.d(t,{c:()=>i});var l=r(95155);r(12115);var a=r(55817),s=r(64269),n=r(50313);function i(e){let{className:t,hideKeyIcon:r=!1,hasValue:i=!1,keyIconClassName:o,toggleClassName:c,toggleIconClassName:d,...u}=e,m=(0,s.cn)("!h-6 !w-6 text-[#7595A8]",d);return(0,l.jsx)(a.bL,{children:(0,l.jsxs)("div",{className:"relative w-full",children:[!r&&(0,l.jsx)("div",{className:(0,s.cn)("absolute top-1/2 left-5 !h-7 !w-7 -translate-y-1/2 transition-colors",i?"text-primary":"text-[#7595A8]",o),children:(0,l.jsx)(n.F.KeyIcon,{className:"pointer-events-none !h-full !w-full"})}),(0,l.jsx)(a.pd,{className:(0,s.cn)("placeholder:text-icon selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 gap-2 rounded-lg border bg-transparent px-3 py-2.5 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-primary focus-visible:ring-primary/20 hover:border-primary/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","pr-[40px] [&::-ms-clear]:hidden [&::-ms-reveal]:hidden [&::-webkit-contacts-auto-fill-button]:hidden [&::-webkit-credentials-auto-fill-button]:hidden",!r&&"pl-[56px]","truncate overflow-hidden text-ellipsis whitespace-nowrap",t),...u}),(0,l.jsx)(a.lM,{id:u.id+"btn-toggle",className:(0,s.cn)("absolute top-1/2 right-5 -translate-y-1/2 text-gray-500 hover:cursor-pointer hover:text-gray-700",c),children:(0,l.jsx)(a.In,{visible:(0,l.jsx)(n.F.EyeOpenIcon,{className:m}),hidden:(0,l.jsx)(n.F.EyeCloseIcon,{className:m})})})]})})}},49150:(e,t,r)=>{r.d(t,{a:()=>i});var l=r(95155),a=r(64269),s=r(50313),n=r(66219);let i=e=>{let{title:t,description:r,isOpen:i,onClose:o,children:c,className:d,titleClassName:u,headerClassName:m,closeClassName:p,closeButtonClassName:x}=e;return(0,l.jsx)(n.lG,{open:i,onOpenChange:e=>{e||o()},children:(0,l.jsxs)(n.Cf,{className:d,title:t,description:r,titleClassName:null!=u?u:"",headerClassName:null!=m?m:"",onOpenAutoFocus:e=>{e.preventDefault()},showCloseButton:!1,children:[(0,l.jsx)("button",{type:"button",onClick:o,"aria-label":"Ä\xf3ng",className:(0,a.cn)("absolute top-4 right-4 z-[100] flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-[#5C6268] shadow-[0_2px_6px_rgba(0,0,0,0.18)] transition-colors hover:bg-[#484D52] focus:outline-none",x),children:(0,l.jsx)(s.F.CloseIcon,{className:(0,a.cn)("!h-4 !w-4 text-white",p)})}),(0,l.jsx)("div",{className:"flex h-full min-h-0 flex-col",children:c})]})})}},66219:(e,t,r)=>{r.d(t,{Cf:()=>d,lG:()=>i});var l=r(95155),a=r(89511);r(12115);var s=r(64269),n=r(48636);function i(e){let{...t}=e;return(0,l.jsx)(a.bL,{"data-slot":"dialog",...t})}function o(e){let{...t}=e;return(0,l.jsx)(a.ZL,{"data-slot":"dialog-portal",...t})}function c(e){let{className:t,...r}=e;return(0,l.jsx)(a.hJ,{"data-slot":"dialog-overlay",className:(0,s.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...r})}function d(e){let{className:t,children:r,showCloseButton:i=!0,title:d,description:x,titleClassName:h="",headerClassName:f="",...b}=e;return(0,l.jsxs)(o,{"data-slot":"dialog-portal",children:[(0,l.jsx)(c,{}),(0,l.jsxs)(a.UC,{"data-slot":"dialog-content",className:(0,s.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex w-auto max-w-[583px] translate-x-[-50%] translate-y-[-50%] flex-col rounded-[24px] border-none shadow-[0_2px_4px_0_var(--shadow-modal)] duration-200 sm:max-w-[886px]",t),...b,children:[(0,l.jsxs)(u,{className:f,children:[(0,l.jsx)(m,{className:d?"text-text-normal-template-3 h-full align-middle text-[20px] leading-[22px] font-semibold ".concat(h," "):"hidden",children:d}),x&&(0,l.jsx)(p,{children:x}),i&&(0,l.jsxs)(a.bm,{"data-slot":"dialog-close",className:"sticky-0 focus:ring-primary data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-[60] rounded-xs transition-opacity hover:cursor-pointer hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,l.jsx)(n.F.CloseIcon,{className:"!text-primary !h-6 !w-6"}),(0,l.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r]})]})}function u(e){let{className:t,...r}=e;return(0,l.jsx)("div",{"data-slot":"dialog-header",className:(0,s.cn)("sticky top-0 z-50 flex h-14 w-auto flex-row items-center justify-between gap-24 rounded-t-2xl bg-[#F3EAE2] px-8 py-4 text-center sm:text-left",t),...r})}function m(e){let{className:t,...r}=e;return(0,l.jsx)(a.hE,{"data-slot":"dialog-title",className:(0,s.cn)("text-normal text-base leading-none font-semibold",t),...r})}function p(e){let{className:t,...r}=e;return(0,l.jsx)(a.VY,{"data-slot":"dialog-description",className:(0,s.cn)("text-muted-foreground text-sm",t),...r})}},75746:(e,t,r)=>{r.d(t,{k:()=>l});let l=(0,r(25959).v)()(e=>({user:null,setUser:t=>e({user:t}),updateCoin:t=>e(e=>({user:e.user?{...e.user,coin:Number(e.user.coin)+t}:null})),clearUser:()=>e({user:null})}))},76444:(e,t,r)=>{r.d(t,{J:()=>n});var l=r(95155);r(12115);var a=r(10489),s=r(64269);function n(e){let{className:t,...r}=e;return(0,l.jsx)(a.b,{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}},77516:(e,t,r)=>{r.d(t,{A:()=>k});var l=r(95155),a=r(40649),s=r(96017),n=r(50313),i=r(13744),o=r(66942),c=r(60919),d=r(61362),u=r(52056),m=r(96199),p=r(15239),x=r(22544),h=r(18720),f=r(15653),b=r(25559),g=r(75746);let v=f.z.object({firstName:f.z.string().min(2,"Há» tá»i thiá»u 2 k\xed tá»±").optional(),lastName:f.z.string().min(2,"T\xean tá»i thiá»u 2 k\xed tá»±").optional(),email:f.z.string().optional()}),w={invalidPhone:"Sá» Äiá»n thoại kh\xf4ng hợp lá»",phoneNotExists:"Sá» Äiá»n thoại kh\xf4ng tá»n tại"},j="border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]",y="h-10 w-full rounded-lg border border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] bg-white py-2.5 pr-3 pl-9 text-sm leading-[19px] font-normal text-black shadow-none placeholder:text-[rgb(from_var(--primary)_calc(r+103)_calc(g+62)_calc(b+45))] focus-visible:ring-0 focus-visible:ring-offset-0",N="h-10 w-full rounded-lg border border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] bg-white px-3 py-2.5 text-sm leading-[19px] font-normal text-black shadow-none placeholder:text-[rgb(from_var(--primary)_calc(r+103)_calc(g+62)_calc(b+45))] focus-visible:ring-0 focus-visible:ring-offset-0",_="pointer-events-none absolute top-1/2 left-3 !h-4 !w-4 -translate-y-1/2 text-[rgb(from_var(--primary)_calc(r+78)_calc(g+68)_calc(b+65))]";function k(e){var t,r,f,k;let{onCallBack:C=()=>{}}=e,{data:z}=(0,m.wV)(),{user:I,setUser:A}=(0,g.k)(),M={firstName:null!=(r=null==I?void 0:I.firstName)?r:"",lastName:null!=(f=null==I?void 0:I.lastName)?f:"",email:null==I?void 0:I.email},E=(0,x.mN)({resolver:(0,o.u)(v),values:M}),{formState:{isSubmitting:F},setError:S}=E;async function B(e){try{let t=await i.A.patchApi("/api/v1/auth/me",e,null==z?void 0:z.accessToken).then(e=>e.data);
1A(t),h.toast.success("Cáºp nháºt th\xf4ng tin th\xe0nh c\xf4ng",{duration:5e3,icon:(0,l.jsx)(d.A,{className:"h-4 w-4 text-green-600"})}),C()}catch(e){if(e instanceof c.pe){var t,r,a;let l=null==(t=e.response)?void 0:t.data;if(null==l?void 0:l.errors)for(let[e,t]of Object.entries(l.errors))S(e,{type:"server",message:null!=(a=null==w?void 0:w[null!=(r=null==t?void 0:t.key)?r:t])?a:t})}else h.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,l.jsx)(u.A,{className:"h-4 w-4 text-red-500"})})}}let L=[null==I?void 0:I.firstName,null==I?void 0:I.lastName].filter(Boolean).join(" ")||"â";return(0,l.jsxs)("div",{className:"font-nunito flex h-full w-full flex-col items-start gap-6 px-4 py-6",children:[(0,l.jsxs)("div",{className:"flex h-9 shrink-0 items-center gap-2 rounded-[999px] border py-1 pr-3 pl-1 ".concat(j),children:[(0,l.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[999px] bg-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] p-1.5",children:(0,l.jsx)(n.F.PersonSolidIcon,{className:"!h-4 !w-4 text-white"})}),(0,l.jsx)("span",{className:"text-sm leading-[19px] font-bold whitespace-nowrap text-black",children:"Th\xf4ng tin c\xe1 nh\xe2n"})]}),(0,l.jsxs)("div",{className:"border-border-template-6 flex w-full items-center gap-3 rounded-2xl border bg-[rgb(from_var(--primary)_calc(r+202)_calc(g+170)_calc(b+152))] p-4",children:[(0,l.jsx)(p.default,{src:"/images/images-template-6/userTemplate6.svg",alt:L,width:48,height:48,className:"border-primary h-12 w-12 shrink-0 rounded-full border-[3px] object-cover"}),(0,l.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,l.jsx)("span",{className:"truncate text-base leading-[22px] font-bold text-black",children:L}),(0,l.jsx)("span",{className:"truncate text-sm leading-[19px] font-normal text-black",children:null==I?void 0:I.email})]})]}),(0,l.jsx)(a.lV,{...E,children:(0,l.jsxs)("form",{onSubmit:E.handleSubmit(B),className:"flex w-full flex-1 flex-col justify-between gap-6",children:[(0,l.jsx)("div",{className:"flex w-full flex-col gap-4 roun
1ded-2xl border border-[rgb(from_var(--primary)_calc(r+176)_calc(g+136)_calc(b+120))] p-4",children:(0,l.jsxs)("div",{className:"flex w-full flex-col items-end gap-3",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-3 sm:flex-row",children:[(0,l.jsx)(a.zB,{control:E.control,name:"firstName",render:e=>{let{field:t}=e;return(0,l.jsxs)(a.eI,{className:"flex-1",children:[(0,l.jsx)(a.MJ,{children:(0,l.jsx)(s.p,{autoComplete:"given-name",placeholder:"Nháºp há»",className:N,...t})}),(0,l.jsx)(a.C5,{})]})}}),(0,l.jsx)(a.zB,{control:E.control,name:"lastName",render:e=>{let{field:t}=e;return(0,l.jsxs)(a.eI,{className:"flex-1",children:[(0,l.jsx)(a.MJ,{children:(0,l.jsx)(s.p,{autoComplete:"family-name",placeholder:"Nháºp t\xean",className:N,...t})}),(0,l.jsx)(a.C5,{})]})}})]}),(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)(n.F.PhoneIcon,{className:_}),(0,l.jsx)(s.p,{disabled:!0,className:y,value:null!=(k=null==z||null==(t=z.user)?void 0:t.phone)?k:"",readOnly:!0})]}),(0,l.jsx)(a.zB,{control:E.control,name:"email",render:e=>{let{field:t}=e;return(0,l.jsxs)(a.eI,{className:"w-full",children:[(0,l.jsx)(a.MJ,{children:(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",className:_,"aria-hidden":"true",children:(0,l.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z",fill:"currentColor"})}),(0,l.jsx)(s.p,{autoComplete:"email",type:"email",placeholder:"Nháºp email",className:y,...t})]})}),(0,l.jsx)(a.C5,{})]})}})]})}),(0,l.jsx)("div",{className:"w-full border-t pt-6 ".concat(j),children:(0,l.jsx)(b.$,{className:"bg-primary h-9 w-full rounded-lg text-base leading-[22px] font-bold text-white transition-colors duration-200 hover:bg-[rgb(from_var(--primary)_calc(r+49)_calc(g+45)_calc(b+45))]",disabled:F,type:"submit",children:"Cáºp nháºt th\xf4ng tin"})})]})})]})}},96017:(e,t,r)=>{r.d(t,{p:()=>i});var l=r(95155);r(12115);var a=r(64269);function s(e){let{direction:t}=e;return(0,l.jsx)("svg",{width:"24",height:"12",viewBox:"0 0 24 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,l.jsx)("path",{d:"up"===t?"M7 9L12 4L17 9":"M7 3L12 8L17 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function n(e,t){var r;let l=null==(r=e.closest('[data-slot="input-stepper"]'))?void 0:r.querySelector("input");l&&("up"===t?l.stepUp():l.stepDown(),l.dispatchEvent(new Event("input",{bubbles:!0})))}function i(e){let{className:t,type:r,useCustomStepper:i=!1,disabled:o=!1,...c}=e,d="number"===r;return d&&i?(0,l.jsxs)("div",{"data-slot":"input-stepper",className:"group relative w-full",children:[(0,l.jsx)("input",{type:r,"data-slot":"input",disabled:o,className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 text-normal flex h-10 w-full min-w-0 bg-transparent shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","placeholder:text-icon placeholder:text-sm placeholder:font-normal","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","border-border-input gap-2 rounded-lg border px-3 py-2.5 shadow-none","focus-visible:border-primary focus-visible:ring-primary/20 hover:border-primary/50 focus-visible:ring-[3px]","[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",d&&"w-full",t,"pr-8"),...c}),d&&!1===o&&(0,l.jsxs)("div",{className:(0,a.cn)("pointer-events-none absolute top-1/2 right-2 flex h-6 w-6 -translate-y-1/2 flex-col items-center justify-center opacity-0 transition-opacity duration-150","group-hover:pointer-events-auto group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:opacity-100"),children:[(0,l.jsx)("button",{type:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault(),"aria-label":"TÄng",className:"flex h-3 w-6 cursor-pointer items-center justify-center text-black transition-opacity hover:opacity-70",onClick:e=>n(e.currentTarget,"up"),children:(0,l.jsx)(s,{direction:"up"})}),(0,l.jsx)("button",{type:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault(),"aria-label":"Giảm",className:"flex h-3 w-6 cursor-pointer items-center justify-center text-[rgb(from_var(--primary)_calc(r+75)_calc(g+35)_calc(b+18))] transition-opacity hover:opacity-70",onClick:e=>n(e.currentTarget,"down"),children:(0,l.jsx)(s,{direction:"down"})})]})]}):(0,l.jsx)("input",{type:r,"data-slot":"input",disabled:o,className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 text-normal flex h-10 w-full min-w-0 bg-transparent shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed md:text-sm","placeholder:text-icon placeholder:text-sm placeholder:font-normal","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","border-border-template-5 gap-2 rounded-lg border px-3 py-2.5 shadow-none","focus-visible:border-primary focus-visible:ring-primary/20 hover:border-primary/50 focus-visible:ring-[3px]","truncate overflow-hidden text-ellipsis whitespace-nowrap",t),...c})}}}]);
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.