(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[192],{1110:(e,t,r)=>{"use strict";r.d(t,{L:()=>c});var s=r(95155),a=r(12115),n=r(65142),i=r(76444),l=r(52508);function c(e){let{value:t,onChange:r,label:c="شماره موبایل",placeholder:d="09123456789",error:o,disabled:u=!1,autoFocus:h=!1,required:x=!0}=e,[m,g]=(0,a.useState)(!1),p=(0,a.useCallback)(e=>{let t=e.replace(/\D/g,"").substring(0,11);return t.length<=4?t:t.length<=7?"".concat(t.substring(0,4)," ").concat(t.substring(4)):"".concat(t.substring(0,4)," ").concat(t.substring(4,7)," ").concat(t.substring(7))},[])(t);return(0,s.jsxs)("div",{className:"space-y-2",children:[c&&(0,s.jsxs)(i.J,{htmlFor:"phone",className:"text-white",children:[c,x&&(0,s.jsx)("span",{className:"text-red-400 mr-1",children:"*"})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(n.p,{id:"phone",type:"tel",dir:"ltr",value:p,onChange:e=>{let t=e.target.value.replace(/\D/g,"");t.length<=11&&r(t)},onFocus:()=>g(!0),onBlur:()=>g(!1),disabled:u,autoFocus:h,autoComplete:"off",placeholder:d,className:"\n            bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10\n            text-left font-mono\n            ".concat(o?"border-red-500":"","\n            ").concat(m?"ring-2 ring-purple-500":"","\n          ")}),(0,s.jsx)(l.A,{className:"\n            absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4\n            ".concat(o?"text-red-400":m?"text-purple-400":"text-gray-400","\n          ")})]}),o&&(0,s.jsx)("p",{className:"text-sm text-red-400 mt-1",children:o}),(0,s.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"شماره موبایل باید با 09 شروع شود"})]})}},3998:(e,t,r)=>{"use strict";r.d(t,{$:()=>c});var s=r(95155);r(12115);var a=r(32467),n=r(83101),i=r(64269);let l=(0,n.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_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-[3px] 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 hover:bg-primary/90",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 bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent 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-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function c(e){let{className:t,variant:r,size:n,asChild:c=!1,...d}=e,o=c?a.DX:"button";return(0,s.jsx)(o,{"data-slot":"button",className:(0,i.cn)(l({variant:r,size:n,className:t})),...d})}},4076:(e,t,r)=>{Promise.resolve().then(r.bind(r,49253))},5917:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},6168:(e,t,r)=>{"use strict";r.d(t,{l:()=>c});var s=r(95155),a=r(12115),n=r(3998),i=r(26983),l=r(89559);function c(e){let{duration:t,onResend:r,disabled:c=!1}=e,[d,o]=(0,a.useState)(t),[u,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(d<=0||c)return;let e=setInterval(()=>{o(t=>t<=1?(clearInterval(e),0):t-1)},1e3);return()=>clearInterval(e)},[d,c]);let x=async()=>{h(!0);try{await r(),o(t)}finally{h(!1)}},m=0===d&&!u&&!c;return(0,s.jsx)("div",{className:"flex flex-col items-center gap-3",children:d>0?(0,s.jsxs)("div",{className:"flex items-center gap-2 text-gray-300",children:[(0,s.jsx)(i.A,{className:"h-4 w-4"}),(0,s.jsxs)("span",{className:"text-sm",children:["ارسال مجدد کد در ",(e=>{let t=Math.floor(e/60);return"".concat(t,":").concat((e%60).toString().padStart(2,"0"))})(d)]})]}):(0,s.jsx)(n.$,{type:"button",variant:"outline",onClick:x,disabled:!m,className:"bg-white/5 border-white/30 text-white hover:bg-white/10 disabled:opacity-50 disabled:cursor-not-allowed",children:u?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.A,{className:"h-4 w-4 ml-2 animate-spin"}),"در حال ارسال..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.A,{className:"h-4 w-4 ml-2"}),"ارسال مجدد کد"]})})})}},10489:(e,t,r)=>{"use strict";r.d(t,{b:()=>l});var s=r(12115),a=r(97602),n=r(95155),i=s.forwardRef((e,t)=>(0,n.jsx)(a.sG.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null==(r=e.onMouseDown)||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label";var l=i},17910:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},18332:(e,t,r)=>{"use strict";r.d(t,{Fc:()=>c,TN:()=>d});var s=r(95155),a=r(12115),n=r(83101),i=r(64269);let l=(0,n.F)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:right-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pr-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),c=a.forwardRef((e,t)=>{let{className:r,variant:a,...n}=e;return(0,s.jsx)("div",{ref:t,role:"alert",className:(0,i.cn)(l({variant:a}),r),...n})});c.displayName="Alert",a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("h5",{ref:t,className:(0,i.cn)("mb-1 font-medium leading-none tracking-tight",r),...a})}).displayName="AlertTitle";let d=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,i.cn)("text-sm [&_p]:leading-relaxed",r),...a})});d.displayName="AlertDescription"},23327:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},26983:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},37861:(e,t,r)=>{"use strict";r.d(t,{g:()=>d,u:()=>c});var s=r(95155),a=r(23327),n=r(5917),i=r(65229),l=r(76343);function c(e){let{password:t,showGuide:r=!0}=e,c=(0,l.mH)(t),d=(0,l.Oj)(t);return r?(0,s.jsxs)("div",{className:"mt-2 p-3 sm:p-4 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 space-x-reverse mb-3",children:[(0,s.jsx)(a.A,{className:"h-4 w-4 text-blue-500"}),(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"شرایط رمز عبور امن"})]}),(0,s.jsx)("div",{className:"space-y-2",children:c.map(e=>(0,s.jsxs)("div",{className:"flex items-center space-x-2 space-x-reverse",children:[e.met?(0,s.jsx)(n.A,{className:"h-3 w-3 text-green-500 flex-shrink-0"}):(0,s.jsx)(i.A,{className:"h-3 w-3 text-red-500 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs sm:text-sm ".concat(e.met?"text-green-700":"text-gray-600"),children:e.text})]},e.id))}),t.length>0&&(0,s.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("span",{className:"text-xs sm:text-sm text-gray-600",children:"قدرت رمز عبور:"}),(0,s.jsx)("span",{className:"text-xs sm:text-sm font-medium ".concat((0,l.Cb)(d.strength)),children:(0,l.uA)(d.strength)})]}),(0,s.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,s.jsx)("div",{className:"h-1.5 rounded-full transition-all duration-300 ".concat("strong"===d.strength?"bg-green-500 w-full":"medium"===d.strength?"bg-yellow-500 w-2/3":"bg-red-500 w-1/3")})})]})]}):null}function d(e){let{password:t,className:r=""}=e,a=(0,l.Oj)(t);return 0===t.length?null:(0,s.jsxs)("div",{className:"flex items-center space-x-1 space-x-reverse ".concat(r),children:[(0,s.jsx)("span",{className:"text-xs sm:text-sm text-gray-500",children:"قدرت:"}),(0,s.jsx)("span",{className:"text-xs sm:text-sm font-medium ".concat((0,l.Cb)(a.strength)),children:(0,l.uA)(a.strength)})]})}},39137:(e,t,r)=>{"use strict";function s(e){let t=e.replace(/[\s\-()]/g,"");return/^09\d{9}$/.test(t)?{isValid:!0,normalized:t}:{isValid:!1,message:"شماره موبایل باید با 09 شروع شود و 11 رقم باشد (مثال: 09123456789)"}}function a(e){let t=e.replace(/[\s\-()]/g,"");return 11===t.length&&t.startsWith("09")?"".concat(t.substring(0,4)," ").concat(t.substring(4,7)," ").concat(t.substring(7)):e}r.d(t,{FI:()=>a,To:()=>s})},42529:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},47231:(e,t,r)=>{"use strict";r.d(t,{w:()=>c});var s=r(95155),a=r(12115),n=r(65142),i=r(76444),l=r(17910);function c(e){let{length:t=5,value:r,onChange:c,onComplete:d,label:o="کد تأیید",error:u,disabled:h=!1,autoFocus:x=!0}=e,[m,g]=(0,a.useState)(!1),p=(0,a.useRef)([]);(0,a.useEffect)(()=>{p.current=p.current.slice(0,t)},[t]),(0,a.useEffect)(()=>{x&&p.current[0]&&p.current[0].focus()},[x]),(0,a.useEffect)(()=>{r.length===t&&d&&d(r)},[r,t,d]);let b=(0,a.useCallback)((e,s)=>{var a,n,i;let l=s.replace(/\D/g,"");if(0===l.length){c(r.substring(0,e)+r.substring(e+1)),e>0&&p.current[e-1]&&(null==(a=p.current[e-1])||a.focus());return}if(l.length>1){let e=(r+l).substring(0,t);c(e);let s=Math.min(e.length,t-1);null==(n=p.current[s])||n.focus();return}c((r.substring(0,e)+l+r.substring(e+1)).substring(0,t)),e<t-1&&p.current[e+1]&&(null==(i=p.current[e+1])||i.focus())},[r,t,c]),f=(0,a.useCallback)((e,s)=>{var a,n,i;"Backspace"===s.key&&!r[e]&&e>0?null==(a=p.current[e-1])||a.focus():"ArrowLeft"===s.key?(s.preventDefault(),e>0&&(null==(n=p.current[e-1])||n.focus())):"ArrowRight"===s.key&&(s.preventDefault(),e<t-1&&(null==(i=p.current[e+1])||i.focus()))},[r,t]),v=(0,a.useCallback)(e=>{var r;e.preventDefault();let s=e.clipboardData.getData("text").replace(/\D/g,"").substring(0,t);c(s);let a=Math.min(s.length,t-1);null==(r=p.current[a])||r.focus()},[t,c]);return(0,s.jsxs)("div",{className:"space-y-4",children:[o&&(0,s.jsxs)(i.J,{className:"text-white flex items-center gap-2",children:[(0,s.jsx)(l.A,{className:"h-4 w-4"}),o]}),(0,s.jsx)("div",{className:"flex justify-center gap-2",dir:"ltr",children:Array.from({length:t},(e,t)=>(0,s.jsx)(n.p,{ref:e=>{p.current[t]=e},type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,value:r[t]||"",onChange:e=>b(t,e.target.value),onKeyDown:e=>f(t,e),onPaste:v,onFocus:()=>g(!0),onBlur:()=>g(!1),disabled:h,className:"\n              w-12 h-14 text-center text-2xl font-bold\n              bg-white/10 border-white/30 text-white\n              ".concat(u?"border-red-500":"","\n              ").concat(m?"ring-2 ring-purple-500":"","\n              transition-all\n            ")},t))}),u&&(0,s.jsx)("p",{className:"text-sm text-red-400 text-center mt-2",children:u})]})}},49253:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>A});var s=r(95155),a=r(12115),n=r(52619),i=r.n(n),l=r(3998),c=r(55010),d=r(76444),o=r(18332),u=r(71871),h=r(52987),x=r(52508),m=r(99708),g=r(70532),p=r(57828),b=r(42529),f=r(1110),v=r(47231),y=r(6168),w=r(39137),j=r(76343),N=r(37861);function k(){let[e,t]=(0,a.useState)("phone"),[r,n]=(0,a.useState)(""),[k,A]=(0,a.useState)(""),[C,M]=(0,a.useState)(""),[S,T]=(0,a.useState)(""),[E,L]=(0,a.useState)(!1),[F,z]=(0,a.useState)(!1),[D,O]=(0,a.useState)(!1),[P,R]=(0,a.useState)(!1),[_,B]=(0,a.useState)(!1),[$,J]=(0,a.useState)(!1),[q,V]=(0,a.useState)(""),[I,Z]=(0,a.useState)(""),H={background:"from-emerald-900 via-teal-900 to-cyan-900",iconBg:"from-emerald-600 to-teal-600",buttonBg:"from-emerald-600 to-teal-600 hover:from-emerald-700 hover:to-teal-700",backLink:"/auth/business/signin",title:"فراموشی رمز عبور کسب‌وکار",icon:u.A,backText:"بازگشت به ورود کسب‌وکار"},W=async e=>{if(e.preventDefault(),V(""),Z(""),!(0,w.To)(r))return void V("شماره تلفن معتبر نیست");R(!0);try{let e=await fetch("/api/auth/otp/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:r,mode:"reset",userRole:"CAFE_OWNER"})}),s=await e.json();if(!e.ok||!s.success)throw Error(s.message||"ارسال کد ناموفق بود");t("otp")}catch(e){V(e instanceof Error?e.message:"خطا در ارسال کد")}finally{R(!1)}},G=async e=>{if(!$&&5===e.length){V(""),R(!0),J(!0);try{let s=await fetch("/api/auth/otp/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:r,code:e})}),a=await s.json();if(!s.ok||!a.success)throw Error(a.message||"کد نامعتبر است");A(e),t("password")}catch(e){V(e instanceof Error?e.message:"خطا در تأیید کد"),A("")}finally{J(!1),R(!1)}}},K=async e=>{e.preventDefault(),V("");let s=(0,j.Oj)(C);if(!s.isValid)return void V(s.errors[0]);if(C!==S)return void V("رمز عبور و تأیید آن مطابقت ندارند");R(!0);try{let e=await fetch("/api/auth/otp/reset-password-simple",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:r,code:k,newPassword:C})}),s=await e.json();if(!e.ok||!s.success)throw Error(s.message||"تغییر رمز عبور ناموفق بود");t("success")}catch(e){V(e instanceof Error?e.message:"خطا در تغییر رمز عبور")}finally{R(!1)}},Q=async()=>{V(""),B(!0);try{let e=await fetch("/api/auth/otp/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:r,mode:"reset",userRole:"CAFE_OWNER"})}),t=await e.json();if(!e.ok||!t.success)throw Error(t.message||"ارسال مجدد ناموفق بود");Z("کد جدید ارسال شد"),A("")}catch(e){V(e instanceof Error?e.message:"خطا در ارسال مجدد")}finally{B(!1)}},X=H.icon;return"phone"===e?(0,s.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br ".concat(H.background," p-4"),children:(0,s.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-xl border border-white/20 p-8",children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"flex justify-center mb-4",children:(0,s.jsx)("div",{className:"p-3 bg-gradient-to-r ".concat(H.iconBg," rounded-full"),children:(0,s.jsx)(X,{className:"h-8 w-8 text-white"})})}),(0,s.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:H.title})]}),q&&(0,s.jsx)(o.Fc,{className:"border-red-500/50 bg-red-500/10 text-red-200",children:(0,s.jsx)(o.TN,{children:q})}),(0,s.jsxs)("form",{onSubmit:W,className:"space-y-6",children:[(0,s.jsx)("div",{children:(0,s.jsx)(f.L,{value:r,onChange:n,disabled:P})}),(0,s.jsx)(l.$,{type:"submit",disabled:P||!(0,w.To)(r),className:"w-full bg-gradient-to-r ".concat(H.buttonBg," text-white font-medium py-3"),children:P?"در حال ارسال...":"ارسال کد تأیید"}),(0,s.jsx)("div",{className:"text-center",children:(0,s.jsxs)(i(),{href:H.backLink,className:"text-sm text-gray-300 hover:text-white hover:underline inline-flex items-center",children:[(0,s.jsx)(h.A,{className:"ml-1 h-3 w-3"}),H.backText]})})]})]})}):"otp"===e?(0,s.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br ".concat(H.background," p-4"),children:(0,s.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-xl border border-white/20 p-8",children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"flex justify-center mb-4",children:(0,s.jsx)("div",{className:"p-3 bg-gradient-to-r ".concat(H.iconBg," rounded-full"),children:(0,s.jsx)(x.A,{className:"h-8 w-8 text-white"})})}),(0,s.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:"تأیید شماره تلفن"}),(0,s.jsx)("p",{className:"text-gray-300 mb-2",children:"کد تأیید ارسال شده را وارد کنید"}),(0,s.jsx)("p",{className:"text-sm text-gray-400",dir:"ltr",children:(0,w.FI)(r)})]}),q&&(0,s.jsx)(o.Fc,{className:"border-red-500/50 bg-red-500/10 text-red-200",children:(0,s.jsx)(o.TN,{children:q})}),I&&(0,s.jsx)(o.Fc,{className:"border-green-500/50 bg-green-500/10 text-green-200",children:(0,s.jsx)(o.TN,{children:I})}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(v.w,{value:k,onChange:A,onComplete:G,disabled:P||$}),(0,s.jsxs)("div",{className:"bg-blue-500/10 border border-blue-500/30 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-sm text-blue-200 text-right mb-3",children:"کد تأیید 5 رقمی را وارد کنید"}),(0,s.jsx)(y.l,{duration:120,onResend:Q,disabled:_||$})]}),(0,s.jsx)(l.$,{onClick:()=>G(k),disabled:P||$||5!==k.length,className:"w-full bg-gradient-to-r ".concat(H.buttonBg," text-white font-medium py-3"),children:P?"در حال تأیید...":"تأیید کد"}),(0,s.jsx)("div",{className:"text-center",children:(0,s.jsxs)("button",{type:"button",onClick:()=>{t("phone"),n(""),A(""),V("")},className:"text-sm text-gray-300 hover:text-white hover:underline inline-flex items-center",children:[(0,s.jsx)(h.A,{className:"ml-1 h-3 w-3"}),"تغییر شماره تلفن"]})})]})]})}):"password"===e?(0,s.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br ".concat(H.background," p-4"),children:(0,s.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-xl border border-white/20 p-8",children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"flex justify-center mb-4",children:(0,s.jsx)("div",{className:"p-3 bg-gradient-to-r ".concat(H.iconBg," rounded-full"),children:(0,s.jsx)(m.A,{className:"h-8 w-8 text-white"})})}),(0,s.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:"رمز عبور جدید"}),(0,s.jsx)("p",{className:"text-gray-300",children:"رمز عبور جدید خود را وارد کنید"})]}),q&&(0,s.jsx)(o.Fc,{className:"border-red-500/50 bg-red-500/10 text-red-200",children:(0,s.jsx)(o.TN,{children:q})}),(0,s.jsxs)("form",{onSubmit:K,className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(d.J,{htmlFor:"newPassword",className:"text-white",children:"رمز عبور جدید"}),(0,s.jsxs)("div",{className:"relative mt-1",children:[(0,s.jsx)(c.y,{id:"newPassword",name:"newPassword",type:E?"text":"password",required:!0,value:C,onChange:e=>M(e.target.value),onFocus:()=>O(!0),className:"bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10 pl-10",placeholder:"رمز عبور امن وارد کنید",disabled:P}),(0,s.jsx)(m.A,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,s.jsx)("button",{type:"button",onClick:()=>L(!E),className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-white",children:E?(0,s.jsx)(g.A,{className:"h-4 w-4"}):(0,s.jsx)(p.A,{className:"h-4 w-4"})})]}),D&&(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(N.u,{password:C})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(d.J,{htmlFor:"confirmPassword",className:"text-white",children:"تأیید رمز عبور"}),(0,s.jsxs)("div",{className:"relative mt-1",children:[(0,s.jsx)(c.y,{id:"confirmPassword",name:"confirmPassword",type:F?"text":"password",required:!0,value:S,onChange:e=>T(e.target.value),className:"bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10 pl-10",placeholder:"رمز عبور را مجدداً وارد کنید",disabled:P}),(0,s.jsx)(m.A,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,s.jsx)("button",{type:"button",onClick:()=>z(!F),className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-white",children:F?(0,s.jsx)(g.A,{className:"h-4 w-4"}):(0,s.jsx)(p.A,{className:"h-4 w-4"})})]})]}),(0,s.jsx)(l.$,{type:"submit",disabled:P,className:"w-full bg-gradient-to-r ".concat(H.buttonBg," text-white font-medium py-3"),children:P?"در حال تغییر رمز...":"تغییر رمز عبور"})]})]})}):"success"===e?(0,s.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br ".concat(H.background," p-4"),children:(0,s.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-xl border border-white/20 p-8",children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"flex justify-center mb-4",children:(0,s.jsx)("div",{className:"p-3 bg-gradient-to-r from-green-600 to-teal-600 rounded-full",children:(0,s.jsx)(b.A,{className:"h-8 w-8 text-white"})})}),(0,s.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:"رمز عبور تغییر یافت"}),(0,s.jsx)("p",{className:"text-gray-300 mb-6",children:"رمز عبور شما با موفقیت تغییر یافته است. می‌توانید با رمز عبور جدید وارد شوید."})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.$,{asChild:!0,className:"w-full bg-gradient-to-r ".concat(H.buttonBg),children:(0,s.jsxs)(i(),{href:H.backLink,children:[(0,s.jsx)(h.A,{className:"ml-2 h-4 w-4"}),H.backText]})}),(0,s.jsx)(l.$,{variant:"outline",onClick:()=>{n(""),A(""),M(""),T(""),t("phone"),V("")},className:"w-full bg-white/10 border-white/30 text-white hover:bg-white/20",children:"بازنشانی مجدد رمز عبور"})]})]})}):null}function A(){return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)("div",{children:"Loading..."}),children:(0,s.jsx)(k,{})})}},52508:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]])},52987:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},55010:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});var s=r(95155);r(12115);var a=r(64269);function n(e){let{className:t,type:r="password",...n}=e;return(0,s.jsx)("input",{type:r,"data-slot":"input",lang:"en",inputMode:"text",autoCapitalize:"none",autoCorrect:"off",autoComplete:(()=>{var e,t;if(n.autoComplete)return n.autoComplete;let r=(null==(e=n.placeholder)?void 0:e.toString())||"",s=(null==(t=n.name)?void 0:t.toString())||"";return r.includes("جدید")||r.includes("new")||s.includes("new")?"new-password":(r.includes("فعلی")||r.includes("current")||s.includes("current"),"current-password")})(),className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base 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","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),onInput:e=>{let t=e.currentTarget,r=t.value,s=r.replace(/[^a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\s]/g,"");if(r!==s&&(t.value=s,n.onChange)){let r={...e,target:{...t,value:s}};n.onChange(r)}},...n})}},57828:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},64269:(e,t,r)=>{"use strict";r.d(t,{cn:()=>n});var s=r(2821),a=r(75889);function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,s.$)(t))}},65142:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var s=r(95155);r(12115);var a=r(64269);function n(e){let{className:t,type:r,...n}=e;return(0,s.jsx)("input",{type:r,"data-slot":"input",className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base 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","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}},65229:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},70532:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},71871:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("building",[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]])},76343:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>i,Oj:()=>a,mH:()=>n,uA:()=>l});let s={minLength:6,requireLetter:!0,requireNumbers:!0};function a(e){let t=[];e.length<s.minLength&&t.push("رمز عبور باید حداقل ".concat(s.minLength," کاراکتر باشد")),s.requireLetter&&!/[a-zA-Z]/.test(e)&&t.push("رمز عبور باید حداقل یک حرف انگلیسی داشته باشد"),s.requireNumbers&&!/[0-9]/.test(e)&&t.push("رمز عبور باید حداقل یک عدد داشته باشد");let r="weak";return 0===t.length&&(e.length>=10?r="strong":e.length>=8&&(r="medium")),{isValid:0===t.length,errors:t,strength:r}}function n(e){return[{id:"length",text:"حداقل ".concat(s.minLength," کاراکتر"),regex:new RegExp(".{".concat(s.minLength,",}")),met:e.length>=s.minLength},{id:"letter",text:"حداقل یک حرف انگلیسی",regex:/[a-zA-Z]/,met:/[a-zA-Z]/.test(e)},{id:"numbers",text:"حداقل یک عدد (0-9)",regex:/[0-9]/,met:/[0-9]/.test(e)}]}function i(e){switch(e){case"weak":return"text-red-500";case"medium":return"text-yellow-500";case"strong":return"text-green-500";default:return"text-gray-500"}}function l(e){switch(e){case"weak":return"ضعیف";case"medium":return"متوسط";case"strong":return"قوی";default:return""}}},76444:(e,t,r)=>{"use strict";r.d(t,{J:()=>i});var s=r(95155);r(12115);var a=r(10489),n=r(64269);function i(e){let{className:t,...r}=e;return(0,s.jsx)(a.b,{"data-slot":"label",className:(0,n.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})}},89559:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},97602:(e,t,r)=>{"use strict";r.d(t,{hO:()=>c,sG:()=>l});var s=r(12115),a=r(47650),n=r(32467),i=r(95155),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,n.TL)(`Primitive.${t}`),a=s.forwardRef((e,s)=>{let{asChild:a,...n}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(a?r:t,{...n,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function c(e,t){e&&a.flushSync(()=>e.dispatchEvent(t))}},99708:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])}},e=>{e.O(0,[4909,7055,4623,7358],()=>e(e.s=4076)),_N_E=e.O()}]);