import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{T as t,r as n}from"./vendor-primevue-DxVRNMbC.js";import{A as r,D as i,Dt as a,F as o,I as s,It as c,O as l,R as u,Rt as d,S as f,Vt as p,et as m,gt as h,j as g}from"./vendor-vue-core-X6q-rGJs.js";import{n as _}from"./vendor-i18n-B5g6Drzm.js";var v={class:`mb-2 flex items-center justify-between`},y={class:`text-base font-medium opacity-80`,for:`comfy-org-sign-up-password`},b={class:`flex flex-col gap-1`},x={key:0,class:`text-sm`},S={class:`mt-1 space-y-1`},C={class:`mb-2 text-base font-medium opacity-80`,for:`comfy-org-sign-up-confirm-password`},w={key:0,class:`text-red-500`},T=u({__name:`PasswordFields`,setup(e){let{t:u}=_(),T=a(``),E=i(()=>({length:T.value.length>=8&&T.value.length<=32,uppercase:/[A-Z]/.test(T.value),lowercase:/[a-z]/.test(T.value),number:/\d/.test(T.value),special:/[^A-Za-z0-9]/.test(T.value)}));return(e,i)=>(m(),g(f,null,[s(c(n),{name:`password`,class:`flex flex-col gap-2`},{default:h(e=>[l(`div`,v,[l(`label`,y,p(c(u)(`auth.signup.passwordLabel`)),1)]),s(c(t),{modelValue:T.value,"onUpdate:modelValue":i[0]||=e=>T.value=e,"input-id":`comfy-org-sign-up-password`,"pt:pc-input-text:root:autocomplete":`new-password`,name:`password`,feedback:!1,"toggle-mask":``,placeholder:c(u)(`auth.signup.passwordPlaceholder`),class:d([{"p-invalid":e.invalid},`h-10`]),fluid:``},null,8,[`modelValue`,`placeholder`,`class`]),l(`div`,b,[e.dirty||e.invalid?(m(),g(`small`,x,[o(p(c(u)(`validation.password.requirements`))+`: `,1),l(`ul`,S,[l(`li`,{class:d({"text-red-500":!E.value.length})},p(c(u)(`validation.password.minLength`)),3),l(`li`,{class:d({"text-red-500":!E.value.uppercase})},p(c(u)(`validation.password.uppercase`)),3),l(`li`,{class:d({"text-red-500":!E.value.lowercase})},p(c(u)(`validation.password.lowercase`)),3),l(`li`,{class:d({"text-red-500":!E.value.number})},p(c(u)(`validation.password.number`)),3),l(`li`,{class:d({"text-red-500":!E.value.special})},p(c(u)(`validation.password.special`)),3)])])):r(``,!0)])]),_:1}),s(c(n),{name:`confirmPassword`,class:`flex flex-col gap-2`},{default:h(e=>[l(`label`,C,p(c(u)(`auth.login.confirmPasswordLabel`)),1),s(c(t),{name:`confirmPassword`,"input-id":`comfy-org-sign-up-confirm-password`,"pt:pc-input-text:root:autocomplete":`new-password`,feedback:!1,"toggle-mask":``,placeholder:c(u)(`auth.login.confirmPasswordPlaceholder`),class:d([{"p-invalid":e.invalid},`h-10`]),fluid:``},null,8,[`placeholder`,`class`]),e.error?(m(),g(`small`,w,p(e.error.message),1)):r(``,!0)]),_:1})],64))}});export{T as t};
//# sourceMappingURL=PasswordFields-BcC2Idys.js.map