PageSourceSearch

https://etreprof.fr/_nuxt/B5ZrNis1.js

js etreprof.fr collected 2026-10-03 21:21:50 UTC 8,235 bytes, 1 lines download raw bytes

1import{b6 as j,eo as z,b8 as H,bg as i,bh as h,bn as W,bi as e,bl as l,bj as r,bk as O,bm as n,bp as G,bu as x,bA as F,bq as I,bo as _,bv as X,c2 as Z,ba as d,eu as ee,b7 as ae,cy as te,da as se,bI as oe,ev as re,ew as ne,bN as ie}from"./Bl3OJams.js";import{_ as le}from"./DDYRHuTb.js";import{_ as ce}from"./DZtkuQr8.js";import{_ as de}from"./Dxgf9W-B.js";import{_ as ue}from"./DJ_JQNV1.js";import{z as N}from"./DLar8UVw.js";import{u as me,P as fe}from"./Cv6y3l6q.js";import{P as M}from"./CgiLXlYt.js";import{u as pe}from"./BRu0BVqo.js";import{r as D,e as L}from"./Dn9cS6go.js";import"./B44bGjKH.js";import"./rg4swsKP.js";import"./BTR9LiPw.js";import"./BK2mxcHb.js";import"./CqC93lJa.js";import"./CwUiy5mE.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new m.Error().stack;a&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[a]="49db5cb2-bbce-4e78-9cd3-d3aa5633ded1",m._sentryDebugIdIdentifier="sentry-dbid-49db5cb2-bbce-4e78-9cd3-d3aa5633ded1")}catch{}})();const he={"auth/expired-action-code":"actionExpiredCode","auth/invalid-action-code":"actionInvalidCode","auth/user-disabled":"userDisabled","auth/user-not-found":"userNotFound","auth/weak-password":"weakPassword","auth/too-many-requests":"tooManyRequests","auth/network-request-failed":"networkError"};function K(m,a){const s=m?.code;return typeof s!="string"?a:he[s]??a}const we={key:0,class:"text-center w-full"},be={class:"bg-green-50 text-green-700 p-4 rounded-md mb-6 flex flex-col items-center gap-2"},_e={class:"font-medium"},ve={class:"w-full"},ge={class:"mb-4 text-center text-neutral-600"},ye={class:"font-semibold"},xe=j({__name:"PasswordResetForm",props:{resetEmail:{},oobCode:{}},setup(m){const{$auth:a}=z(),{t:s}=H();pe("auth");const{passwordPolicy:A,loadingPasswordPolicy:u,passwordValidationSchema:p}=me(s),k=N.object({password:N.string(s("validation.passwordRequired")),confirmPassword:N.string(s("validation.confirmPasswordRequired"))}).refine(t=>t.password===t.confirmPassword,{message:s("validation.passwordsMismatch"),path:["confirmPassword"]}),V=X(()=>k.clone().safeExtend({password:p.value})),c=Z({password:void 0,confirmPassword:void 0}),w=d(!1),b=d(""),v=d("");async function C(t){b.value="",w.value=!0;try{if(!a)throw new Error("Firebase Auth is not initialized");await ee(a,m.oobCode,t.data.password),v.value=s("auth.resetPasswordSuccess"),b.value=""}catch(f){console.error("Reset password error:",f),b.value=s(`auth.${K(f,"resetPasswordError")}`)}finally{w.value=!1}}return(t,f)=>{const $=O,g=G,U=ce,E=de,y=ue;return i(),h(W,null,[e(v)?(i(),h("div",we,[l("div",be,[r($,{name:"i-heroicons-check-circle",class:"text-4xl text-green-500"}),l("p",_e,n(e(v)),1)]),r(g,{to:"/espace-enseignant",color:"primary",block:"",icon:"i-heroicons-arrow-right-on-rectangle",label:t.$t("auth.backToLogin")},null,8,["label"])])):x("",!0),l("div",ve,[l("p",ge,[F(n(t.$t("auth.resetPasswordFor"))+" ",1),l("span",ye,n(m.resetEmail),1)]),e(b)?(i(),I(U,{key:0,color:"error",variant:"subtle",class:"mb-4",description:e(b)},null,8,["description"])):x("",!0),e(v)?x("",!0):(i(),I(y,{key:1,schema:e(V),state:e(c),class:"flex flex-col gap-4",onSubmit:C},{default:_(()=>[r(E,{label:t.$t("auth.newPassword"),name:"password"},{default:_(()=>[r(M,{class:"w-full",modelValue:e(c).password,"onUpdate:modelValue":f[0]||(f[0]=R=>e(c).password=R),placeholder:t.$t("auth.newPasswordPlaceholder"),required:"",autocomplete:"new-password"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(E,{label:t.$t("auth.confirmPassword"),name:"confirmPassword"},{default:_(()=>[r(M,{class:"w-full",modelValue:e(c).confirmPassword,"onUpdate:modelValue":f[1]||(f[1]=R=>e(c).confirmPassword=R),placeholder:t.$t("auth.confirmPasswordPlaceholder"),required:"",autocomplete:"new-password"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(fe,{loading:e(u),"password-policy":e(A)},null,8,["loading","password-policy"]),r(g,{type:"submit",label:t.$t("auth.resetPasswordSubmit"),block:"",loading:e(w)},null,8,["label","loading"])]),_:1},8,["schema","state"]))])],64)}}}),Pe=Object.assign(xe,{__name:"AuthPasswordResetForm"}),ke={class:"flex min-h-screen items-center justify-center bg-neutral-50 px-4"},Ee={class:"text-2xl font-heading font-bold text-center text-primary-700"},Re={key:0},Ve={key:1},Ce={key:2},$e={class:"flex flex-col items-center justify-center gap-6"},Ue={key:0,class:"flex flex-col items-center text-neutral-600"},Fe={key:1,class:"text-center w-full"},Ie={class:"bg-red-50 text-red-600 p-4 rounded-md mb-6 flex flex-col items-center gap-2"},Ae={key:2,class:"text-center w-full"},Se={class:"bg-green-50 text-green-700 p-4 rounded-md mb-6 flex flex-col items-center gap-2"},qe={class:"font-medium"},Ne={key:4,class:"text-center w-full"},Te={class:"text-neutral-500 italic mb-6"},ea=j({__name:"action",setup(m){const{t:a}=H(),s=ae(),A=z(),u=d(!0),p=d(""),k=d(""),V=d("/espace-enseignant"),c=d(s.query.mode),w=d(s.query.oobCode),b=d(!1),v=d(!1),C=d(""),{refreshUser:t,waitForAuthReady:f,user:$}=te(),{currentUser:g,isNewUser:U,isV1Creating:E}=se(),y=d(!1);oe(async()=>{const o=A.$auth;if(!o){p.value=a("auth.actionAuthInitError"),u.value=!1;return}try{if((!c.value||c.value==="verifyEmail")&&!w.value){await Y(o);return}if(!c.value||!w.value){p.value=a("auth.actionInvalidLink"),u.value=!1;return}switch(c.value){case"verifyEmail":await R(o);break;case"resetPassword":await Q(o);break;
1case"recoverEmail":b.value=!0,u.value=!1;break;case"verifyAndChangeEmail":b.value=!0,u.value=!1;break;default:p.value=a("auth.actionUnknown"),u.value=!1}}catch(P){console.error("Firebase action error:",P),p.value=a(`auth.${K(P,"actionGenericError")}`),u.value=!1}});async function R(o){try{await re(o,w.value)}catch(P){if(await t(),P?.code!=="auth/invalid-action-code"||!o.currentUser?.emailVerified)throw P}await T()}async function Y(o){if(await f(),await t(),!o.currentUser?.emailVerified){p.value=a("auth.actionInvalidLink"),u.value=!1;return}await T()}async function T(){await f(),await t(),await g.refresh(),V.value=D({hasFirebaseSession:!!$.value,isNewUser:U.value,isV1Creating:E.value,onboardingCompleted:g.data.value?.onboardingCompleted??null,pendingRedirect:L(s.query.redirect)}),k.value=a("auth.actionEmailVerified"),u.value=!1}async function J(){if(!y.value){y.value=!0;try{await f(),await t(),await g.refresh();const o=D({hasFirebaseSession:!!$.value,isNewUser:U.value,isV1Creating:E.value,onboardingCompleted:g.data.value?.onboardingCompleted??null,pendingRedirect:L(s.query.redirect)});V.value=o,await ie(o)}finally{y.value=!1}}}async function Q(o){C.value=await ne(o,w.value),v.value=!0,u.value=!1}return(o,P)=>{const S=O,B=le,q=G;return i(),h("div",ke,[r(B,{class:"w-full max-w-md"},{header:_(()=>[l("h1",Ee,[e(c)==="verifyEmail"?(i(),h("span",Re,n(e(a)("auth.actionVerifyEmailTitle")),1)):e(c)==="resetPassword"?(i(),h("span",Ve,n(e(a)("auth.actionResetPasswordTitle")),1)):(i(),h("span",Ce,n(e(a)("auth.actionRequired")),1))])]),default:_(()=>[l("div",$e,[e(u)?(i(),h("div",Ue,[r(S,{name:"i-lucide-loader-circle",class:"animate-spin text-4xl mb-4 text-primary-500"}),l("p",null,n(e(a)("auth.actionProcessing")),1)])):e(p)?(i(),h("div",Fe,[l("div",Ie,[r(S,{name:"i-lucide-circle-alert",class:"text-4xl"}),l("p",null,n(e(p)),1)]),e(p)&&e(c)==="verifyEmail"?(i(),I(B,{key:0,class:"bg-ui-bg-elevated mb-6"},{default:_(()=>[l("p",null,n(e(a)("auth.actionResendSuggestion",{resendLink:e(a)("auth.resendVerification")})),1)]),_:1})):x("",!0),r(q,{to:"/auth/login",color:"primary",variant:"solid",block:""},{default:_(()=>[F(n(e(a)("auth.backToLogin")),1)]),_:1})])):e(k)?(i(),h("div",Ae,[l("div",Se,[r(S,{name:"i-lucide-shield-check",class:"text-4xl text-green-500"}),l("p",qe,n(e(k)),1)]),r(q,{color:"primary",block:"",loading:e(y),disabled:e(y),onClick:J},{default:_(()=>[F(n(e(a)("auth.actionContinue")),1)]),_:1},8,["loading","disabled"])])):x("",!0),e(v)?(i(),I(Pe,{key:3,"reset-email":e(C),"oob-code":e(w)},null,8,["reset-email","oob-code"])):x("",!0),e(b)?(i(),h("div",Ne,[l("p",Te,n(e(a)("auth.actionUnsupported")),1),r(q,{to:"/",color:"primary",variant:"ghost"},{default:_(()=>[F(n(e(a)("common.backToHome")),1)]),_:1})])):x("",!0)])]),_:1})])}}});export{ea 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.