PageSourceSearch

https://atzuma.co.il/assets/ResetPasswordPage-woHk6pBw.js

js atzuma.co.il collected 2026-10-02 07:47:44 UTC 8,788 bytes, 7 lines download raw bytes

1import{j as r}from"./index-C_Fqshtm.js";import{u as z,d as _,e as E,r as m,L as x}from"./router-BXL9ASSk.js";import"./vendor-BNcAc9ko.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"[email protected]"}}catch{}})();try{(function(){var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},g=new n.Error().stack;g&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[g]="50d25d43-1ab1-4a17-a50e-a6401a142a41",n._sentryDebugIdIdentifier="sentry-dbid-50d25d43-1ab1-4a17-a50e-a6401a142a41")})()}catch{}const A=({language:n})=>{const g=z(),{token:f}=_(),[y]=E(),u=y.get("email")||"",[a,w]=m.useState({password:"",password_confirmation:""}),[d,h]=m.useState(!1),[j,S]=m.useState(!1),[o,l]=m.useState({}),s=n==="he",v={he:{title:"איפוס סיסמה",subtitle:"הכנס את הסיסמה החדשה למטה",passwordLabel:"סיסמה חדשה",passwordPlaceholder:"הכנס את הסיסמה החדשה",confirmLabel:"אימות סיסמה חדשה",confirmPlaceholder:"אשר את הסיסמה החדשה",resetButton:"איפוס סיסמה",resetting:"מאפס...",backToLogin:"חזרה להתחברות",successTitle:"הסיסמה אופסה בהצלחה",successMessage:"הסיסמה שלך אופסה. כעת תוכל להתחבר עם הסיסמה החדשה.",loginNow:"התחבר עכשיו",passwordRequired:"סיסמה נדרשת",passwordMinLength:"הסיסמה חייבת להכיל לפחות 8 תווים",passwordMismatch:"הסיסמאות אינן תואמות",invalidToken:"קישור איפוס לא תקין או פג תוקף",tokenExpired:"הקישור פג תוקף",generalError:"משהו השתבש. אנא נסה שוב.",requestNew:"בקש קישור חדש"}},t=e=>v.he[e]||e;m.useEffect(()=>{(!f||!u)&&l({token:t("invalidToken")})},[f,u,t]);const k=()=>{const e={};return a.password.trim()?a.password.length<8&&(e.password=t("passwordMinLength")):e.password=t("passwordRequired"),a.password!==a.password_confirmation&&(e.password_confirmation=t("passwordMismatch")),l(e),Object.keys(e).length===0},T=async e=>{if(e.preventDefault(),!!k())try{h(!0),l({});const c=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({token:f,email:u,password:a.password,password_confirmation:a.password_confirmation})}),i=await c.json();if(c.ok&&i.success)S(!0),console.log("✅ Password reset successfully");else{const p=i.errors?.email?.[0]||i.errors?.token?.[0]||i.errors?.password?.[0]||i.message||t("generalError");p.includes("expired")||p.includes("Invalid")?l({token:p.includes("expired")?t("tokenExpired"):t("invalidToken")}):l({general:p})}}catch(c){console.error("❌ Error resetting password:",c),l({general:t("generalError")})}finally{h(!1)}},b=(e,c)=>{w(i=>({...i,[e]:c})),o[e]&&l(i=>({...i,[e]:""}))};return j?r.jsx("div",{style:{minHeight:"100vh",background:"linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"Inter, system-ui, -apple-system, sans-serif",direction:s?"rtl":"ltr"},children:r.jsxs("div",{style:{background:"white",borderRadius:"0.75rem",padding:"3rem",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",maxWidth:"500px",width:"100%",margin:"1rem",textAlign:"center"},children:[r.jsx("h1",{style:{fontSize:"1.5rem",fontWeight:"bold",color:"#111827",marginBottom:"1rem"},children:t("successTitle")}),r.jsx("p",{style:{color:"#6b7280",fontSize:"1rem",lineHeight:"1.6",marginBottom:"2rem"},children:t("successMessage")}),r.jsx("button",{onClick:()=>{g("/?login=true")},style:{background:"linear-gradient(135deg, #059669 0%, #047857 100%)",color:"white",padding:"0.75rem 2rem",borderRadius:"0.5rem",border:"none",fontWeight:"600",fontSize:"1rem",cursor:"pointer",transition:"all 0.2s ease"},onMouseOver:e=>{e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(5, 150, 105, 0.3)"},onMouseOut:e=>{e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="none"},children:t("loginNow")})]})}):r.jsx("div",{style:{minHeight:"100vh",background:"linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"Inter, system-ui, -apple-system, sans-serif",direction:s?"rtl":"ltr"},children:r.jsxs("div",{style:{background:"white",borderRadius:"0.75rem",padding:"3rem",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",maxWidth:"400px",
1width:"100%",margin:"1rem"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:"2rem"},children:[r.jsx("h1",{style:{fontSize:"1.5rem",fontWeight:"bold",color:"#111827",marginBottom:"0.5rem"},children:t("title")}),r.jsx("p",{style:{color:"#6b7280",fontSize:"0.875rem"},children:t("subtitle")})]}),(o.general||o.token)&&r.jsxs("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",borderRadius:"0.5rem",padding:"0.75rem",marginBottom:"1.5rem"},children:[r.jsx("p",{style:{color:"#dc2626",fontSize:"0.875rem",textAlign:s?"right":"left"},children:o.general||o.token}),o.token&&r.jsx("div",{style:{marginTop:"1rem",textAlign:"center"},children:r.jsx(x,{to:"/forgot-password",style:{color:"#059669",fontSize:"0.875rem",textDecoration:"underline"},children:t("requestNew")})})]}),!o.token&&r.jsxs("form",{onSubmit:T,children:[r.jsxs("div",{style:{marginBottom:"1.5rem"},children:[r.jsx("label",{style:{display:"block",fontSize:"0.875rem",fontWeight:"500",color:"#374151",marginBottom:"0.5rem",textAlign:s?"right":"left"},children:t("passwordLabel")}),r.jsx("input",{type:"password",value:a.password,onChange:e=>b("password",e.target.value),placeholder:t("passwordPlaceholder"),style:{width:"100%",padding:"0.75rem",border:`1px solid ${o.password?"#f87171":"#d1d5db"}`,borderRadius:"0.5rem",fontSize:"1rem",outline:"none",transition:"border-color 0.2s ease",textAlign:s?"right":"left",boxSizing:"border-box"},onFocus:e=>!o.password&&(e.target.style.borderColor="#059669"),onBlur:e=>!o.password&&(e.target.style.borderColor="#d1d5db"),disabled:d}),o.password&&r.jsx("p",{style:{color:"#dc2626",fontSize:"0.75rem",marginTop:"0.25rem",textAlign:s?"right":"left"},children:o.password})]}),r.jsxs("div",{style:{marginBottom:"2rem"},children:[r.jsx("label",{style:{display:"block",fontSize:"0.875rem",fontWeight:"500",color:"#374151",marginBottom:"0.5rem",textAlign:s?"right":"left"},children:t("confirmLabel")}),r.jsx("input",{type:"password",value:a.password_confirmation,onChange:e=>b("password_confirmation",e.target.value),placeholder:t("confirmPlaceholder"),style:{width:"100%",padding:"0.75rem",border:`1px solid ${o.password_confirmation?"#f87171":"#d1d5db"}`,borderRadius:"0.5rem",fontSize:"1rem",outline:"none",transition:"border-color 0.2s ease",textAlign:s?"right":"left",boxSizing:"border-box"},onFocus:e=>!o.password_confirmation&&(e.target.style.borderColor="#059669"),onBlur:e=>!o.password_confirmation&&(e.target.style.borderColor="#d1d5db"),disabled:d}),o.password_confirmation&&r.jsx("p",{style:{color:"#dc2626",fontSize:"0.75rem",marginTop:"0.25rem",textAlign:s?"right":"left"},children:o.password_confirmation})]}),r.jsxs("button",{type:"submit",disabled:d,style:{width:"100%",background:d?"#9ca3af":"linear-gradient(135deg, #059669 0%, #047857 100%)",color:"white",border:"none",padding:"0.75rem",borderRadius:"0.5rem",fontSize:"1rem",fontWeight:"600",cursor:d?"not-allowed":"pointer",transition:"all 0.2s ease",marginBottom:"1.5rem",display:"flex",alignItems:"center",justifyContent:"center",gap:"0.5rem"},onMouseOver:e=>{d||(e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(5, 150, 105, 0.3)")},onMouseOut:e=>{e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="none"}
1,children:[d&&r.jsx("div",{style:{width:"1rem",height:"1rem",border:"2px solid transparent",borderTop:"2px solid white",borderRadius:"50%",animation:"spin 1s linear infinite"}}),t(d?"resetting":"resetButton")]})]}),r.jsx("div",{style:{textAlign:"center"},children:r.jsxs(x,{to:"/",style:{color:"#6b7280",fontSize:"0.875rem",textDecoration:"none",display:"flex",alignItems:"center",justifyContent:"center",gap:"0.5rem",flexDirection:s?"row-reverse":"row"},onMouseOver:e=>e.currentTarget.style.color="#059669",onMouseOut:e=>e.currentTarget.style.color="#6b7280",children:[r.jsx("span",{children:s?"→":"←"}),t("backToLogin")]})}),r.jsx("style",{children:`
2            @keyframes spin {
3              0% { transform: rotate(0deg); }
4              100% { transform: rotate(360deg); }
5            }
6          `})]})})};export{A as default};
7//# sourceMappingURL=ResetPasswordPage-woHk6pBw.js.map

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.