PageSourceSearch

https://my.findypet.app/_nuxt/B10MD-ll.js

js findypet.app collected 2026-10-02 01:14:11 UTC 5,113 bytes, 1 lines download raw bytes

1import{d as B,u as D,J as E,o as U,c as r,e as t,j as s,k as _,l as h,F as $,D as z,a4 as N,t as y,g as H,h as F,m as f,G as I,r as u,z as K,H as T,q as v,b as i,i as b,s as Z}from"./Dy_z768-.js";import{_ as j}from"./Bony5lcG.js";import{u as G}from"./gJWYy34S.js";import{u as J}from"./CZ5DNh5E.js";const O={class:"auth-page"},Q={class:"auth-card"},W={key:0,class:"state-center"},X={key:1,class:"state-center"},Y={class:"auth-form"},ee={class:"form-group"},se={class:"input-with-toggle"},te=["type"],oe={key:0,class:"strength-indicator"},ae={class:"strength-bar"},ne={class:"form-group"},re={class:"input-with-toggle"},ie=["type"],le={key:0,class:"field-error"},de=["disabled"],ue={key:0,class:"loader-spinner white"},pe={key:1},ce={key:0,class:"error-message"},fe={key:3,class:"state-center"},ve={key:4,class:"auth-footer"},me=B({__name:"reset-password",setup(we){D({title:"Reinitialiser le mot de passe - FindyPet"});const{post:x}=G(),{error:L}=J(),R=E(),n=u("loading"),p=u(!1),m=u(""),w=u(!1),g=u(!1),l=u(0),k=v(()=>{const a=R.query.token;return typeof a=="string"?a:""}),o=T({password:"",confirmPassword:""}),C=v(()=>o.password===o.confirmPassword),V=v(()=>o.password.length>=6&&o.confirmPassword.length>0&&C.value),P=v(()=>l.value<=1?"weak":l.value<=2?"fair":l.value<=3?"good":"strong"),q=v(()=>l.value<=1?"Faible":l.value<=2?"Moyen":l.value<=3?"Bon":l.value<=4?"Fort":"Excellent");function A(){let a=0;const e=o.password;e.length>=6&&a++,e.length>=8&&a++,/[a-z]/.test(e)&&/[A-Z]/.test(e)&&a++,/\d/.test(e)&&a++,/[^a-zA-Z0-9]/.test(e)&&a++,l.value=a}async function S(){if(!k.value){n.value="invalid-token";return}try{await x("/verify-reset-token",{token:k.value}),n.value="form"}catch{n.value="invalid-token"}}async function M(){if(!(!V.value||p.value)){p.value=!0,m.value="";try{await x("/reset-password",{token:k.value,new_password:o.password}),n.value="success"}catch(a){const e=a,d=e.data?.error||e.data?.message||"";d.toLowerCase().includes("expired")||d.toLowerCase().includes("invalid")?n.value="invalid-token":(m.value="Une erreur est survenue. Veuillez reessayer.",L())}finally{p.value=!1}}}return U(()=>{S()}),(a,e)=>{const d=K;return i(),r("div",O,[t("div",Q,[e[17]||(e[17]=t("div",{class:"auth-logo"},[t("img",{src:j,alt:"FindyPet",class:"logo-img"})],-1)),s(n)==="loading"?(i(),r("div",W,[...e[4]||(e[4]=[t("div",{class:"loader-spinner lg"},null,-1),t("p",{class:"state-text"},"Verification du lien...",-1)])])):s(n)==="invalid-token"?(i(),r("div",X,[e[6]||(e[6]=t("div",{class:"error-icon"},"✗",-1)),e[7]||(e[7]=t("h2",{class:"state-title"},"Lien invalide ou expire",-1)),e[8]||(e[8]=t("p",{class:"state-text"}," Ce lien de reinitialisation est invalide ou a expire. Veuillez faire une nouvelle demande. ",-1)),_(d,{to:"/forgot-password",class:"btn-primary action-btn"},{default:h(()=>[...e[5]||(e[5]=[b(" Nouvelle demande ",-1)])]),_:1})])):s(n)==="form"?(i(),r($,{key:2},[e[11]||(e[11]=t("h1",{class:"auth-title"},"Nouveau mot de passe",-1)),t("div",Y,[t("div",ee,[e[9]||(e[9]=t("label",{for:"password"},"Nouveau mot de passe",-1)),t("div",se,[z(t("input",{id:"password","onUpdate:modelValue":e[0]||(e[0]=c=>s(o).password=c),type:s(w)?"text":"password",placeholder:"Minimum 6 caracteres",autocomplete:"new-password",onInput:A},null,40,te),[[N,s(o).password]]),t("button",{type:"button",class:"toggle-password",onClick:e[1]||(e[1]=c=>w.value=!s(w))},y(s(w)?"Masquer":"Afficher"),1)]),s(o).password.length>0?(i(),r("div",oe,[t("div",ae,[t("div",{class:F(["strength-fill",s(P)]),style:H({width:`${s(l)/5*100}%`})},null,6)]),t("span",{class:F(["strength-label",s(P)])},y(s(q)),3)])):f("",!0)]),t("div",ne,[e[10]||(e[10]=t("label",{for:"confirm-password"},"Confirmer le mot de passe",-1)),t("div",re,[z(t("input",{id:"confirm-password","onUpdate:modelValue":e[2]||(e[2]=c=>s(o).confirmPassword=c),type:s(g)?"text":"password",placeholder:"Retapez votre mot de passe",autocomplete:"new-password",onKeydown:I(M,["enter"])},null,40,ie),[[N,s(o).confirmPassword]]),t("button",{type:"button",class:"toggle-password",onClick:e[3]||(e[3]=c=>g.value=!s(g))},y(s(g)?"Masquer":"Afficher"),1)]),s(o).confirmPassword&&!s(C)?(i(),r("p",le," Les mots de passe ne correspondent pas ")):f("",!0)]),t("button",{class:"btn-primary submit-btn",disabled:!s(V)||s(p),onClick:M},[s(p)?(i(),r("span",ue)):(i(),r("span",pe,"Reinitialiser le mot de passe"))],8,de),s(m)?(i(),r("p",ce,y(s(m)),1)):f("",!0)])],64)):s(n)==="success"?(i(),r("div",fe,[e[13]||(e[13]=t("div",{class:"success-icon"},"✓",-1)),e[14]||(e[14]=t("h2",{class:"state-title"},"Mot de passe modifie !",-1)),e[15]||(e[15]=t("p",{class:"state-text"}," Votre mot de passe a ete reinitialise avec succes. Vous pouvez maintenant vous connecter avec votre nouveau mot de passe. ",-1)),_(d,{to:"/login",class:"btn-primary action-btn"},{default:h(()=>[...e[12]||(e[12]=[b(" Se connecter ",-1)])]),_:1})])):f("",!0),s(n)!=="success"&&s(n)!=="loading"?(i(),r("p",ve,[_(d,{to:"/login",class:"auth-link"},{default:h(()=>[...e[16]||(e[16]=[b("Retour a la connexion",-1)])]),_:1})])):f("",!0)])])}}}),he=Z(me,[["__scopeId","data-v-8649db05"]]);export{he as default};

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.