1import{a as tt,b as at}from"./chunk-SKH3BQX6.js";import{a as K,b as nt}from"./chunk-ZEONSQ4A.js";import"./chunk-5PW3IXDN.js";import{c as k,d as it}from"./chunk-WMWTXPHF.js";import"./chunk-P27FRGFY.js";import{a as z,b as ot}from"./chunk-LZ4XC2TM.js";import{B as Z,C as $,c as j,e as R,h as q,k as U,l as H,m as V,o as Q,q as J,t as X,u as Y}from"./chunk-TT2QA5N2.js";import"./chunk-6MOVM5NX.js";import{h as w,i as I,m as D,n as G}from"./chunk-REXD3XXG.js";import"./chunk-XZTRQ27X.js";import{b as L,c as B,e as W,f as N}from"./chunk-OVGYRFXU.js";import{i as F,s as y,z as M}from"./chunk-MZWCCPRN.js";import{Ic as E,Lb as u,Nb as g,Ob as f,Oc as o,Pc as a,Tb as p,Ub as s,Vb as l,Wb as T,Z as S,fc as A,gb as i,hc as _,kb as b,lb as v,nb as d,td as x,ub as P,wc as c,yc as m}from"./chunk-JXIB5BED.js";import{e as et,k as h}from"./chunk-J6LPXIX4.js";function st(e,O){e&1&&(c(0),o(1,"translate")),e&2&&m(" ",a(1,1,"FORGOT_PASSWORD.ERROR_REQUIRED")," ")}function lt(e,O){e&1&&(c(0),o(1,"translate")),e&2&&m(" ",a(1,1,"FORGOT_PASSWORD.ERROR_EMAIL")," ")}function ct(e,O){if(e&1&&(s(0,"p",11),g(1,st,2,3)(2,lt,2,3),l()),e&2){let n=_();i(),f(n.email.errors?.required?1:2)}}function mt(e,O){if(e&1&&(s(0,"p",13),c(1),o(2,"translate"),l()),e&2){let n=_();p("ngClass",n.success?"is-success":"is-danger"),i(),m(" ",a(2,2,n.messageKey)," ")}}var rt,xt,pt=et(()=>{x();M();$();G();N();nt();ot();x();it();G();at();N();M();$();rt=()=>["login"];xt=(()=>{class e{auth;router;recaptcha;translate;form=new V({email:new Q("",{nonNullable:!0,validators:[R.required,R.email]})});messageKey=null;success=!1;loading=!1;seo=S(z);constructor(n,r,t,C){this.auth=n,this.router=r,this.recaptcha=t,this.translate=C}ngOnInit(){this.seo.setRobotsNoindex()}get email(){return this.form.controls.email}currentLang(){return this.translate.currentLang||localStorage.getItem("lang")||"en"}mapError(n){let r=n?.status,t=(n?.error?.detail??"").toString().toLowerCase();return r===400&&(t.includes("recaptcha")||t.includes("score recaptcha")||t.includes("action recaptcha"))?t.includes("trop bas")?"FORGOT_PASSWORD.ERROR_RECAPTCHA_SUSPECT":"FORGOT_PASSWORD.ERROR_RECAPTCHA":"FORGOT_PASSWORD.ERROR_GENERIC"}submit(){return h(this,null,function*(){if(!(this.form.invalid||this.loading)){this.loading=!0,this.messageKey=null,this.success=!1;try{let n=yield this.recaptcha.execute("forgot_password");this.auth.forgotPassword({email:this.email.value,recaptcha_token:n,recaptcha_action:"forgot_password"}).subscribe({next:()=>{this.messageKey="FORGOT_PASSWORD.SUCCESS",this.success=!0,this.loading=!1,setTimeout(()=>{this.router.navigate(["/",this.currentLang(),"login"])},3e3)},error:r=>{this.messageKey=this.mapError(r),this.success=!1,this.loading=!1}})}catch(n){this.loading=!1,this.messageKey="FORGOT_PASSWORD.ERROR_RECAPTCHA",this.success=!1}}})}static \u0275fac=function(r){return new(r||e)(d(k),d(w),d(tt),d(L))};static \u0275cmp=P({type:e,selectors:[["app-forgot-password"]],decls:31,vars:36,consts:[["role","main","aria-labelledby","forgot-password-title",1,"hero-body","mt-5"],[1,"container"],[1,"columns","is-centered"],[1,"column","is-6-desktop","is-6-tablet","is-full-mobile"],["aria-describedby","forgot-password-description",1,"box","mt-5","custom-box",3,"ngSubmit","formGroup"],["id","forgot-password-title",1,"title","is-5","has-text-centered","mb-4"],["id","forgot-password-description",1,"has-text-centered","custom-text","mb-4"],[1,"field"],[1,"label","custom-label"],[1,"control"],["id","email","type","email","formControlName","email","required","",1,"input","custom-input",3,"placeholder"],["id","email-error",1,"help","is-danger","custom-text"],["type","submit",1,"button","is-success","is-fullwidth","custom-button",3,"disabled"],["role","status","aria-live","polite",1,"help","has-text-centered","custom-text",3,"ngClass"],[1,"field","has-text-centered","mt-3","is-size-6","custom-text"],[3,"routerLink"]],template:function(r,t){r&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"form",4),A("ngSubmit",function(){return t.submit()}),s(5,"h1",5),c(6),o(7,"translate"),l(),s(8,"p",6),c(9),o(10,"translate"),l(),s(11,"div",7)(12,"label",8),c(13),o(14,"translate"),l(),s(15,"div",9),T(16,"input",10),o(17,"translate"),b(),l(),g(18,ct,3,1,"p",11),l(),s(19,"div",7)(20,"button",12),c(21),o(22,"translate"),o(23,"translate"),l()(),g(24,mt,3,4,"p",13),s(25,"div",14)(26,"a",15),o(27,"langLink"),o(28,"translate"),c(29),o(30,"translate"),l()()()()()()()),r&2&&(i(4),p("formGroup",t.form),i(2),m(" ",a(7,17,"FORGOT_PASSWORD.TITLE")," "),i(3),m(" ",a(10,19,"FORGOT_PASSWORD.INTRO")," "),i(3),u("for","email"),i(),m(" ",a(14,21,"FORGOT_PASSWORD.EMAIL_LABEL")," "),i(3),p("placeholder",a(17,23,"FORGOT_PASSWORD.EMAIL_PLACEHOLDER")),u("aria-required","true")("aria-invalid",t.email.invalid&&(t.email.dirty||t.email.touched)?"true":"false")("aria-describedby",t.email.invalid&&(t.email.dirty||t.email.touched)?"email-error":null),v(),i(2),f(t.email.invalid&&(t.email.dirty||t.email.touched)?18:-1),i(2),p("disabled",t.form.invali
1d||t.loading),u("aria-busy",t.loading?"true":"false"),i(),m(" ",t.loading?a(22,25,"FORGOT_PASSWORD.LOADING"):a(23,27,"FORGOT_PASSWORD.SUBMIT")," "),i(3),f(t.messageKey?24:-1),i(2),p("routerLink",a(27,29,E(35,rt))),u("aria-label",a(28,31,"FORGOT_PASSWORD.BACK_LOGIN_ARIA")),i(3),m(" ",a(30,33,"FORGOT_PASSWORD.BACK_LOGIN")," "))},dependencies:[y,F,Z,J,j,U,H,q,Y,X,D,I,W,B,K],styles:['@charset "UTF-8";.custom-box[_ngcontent-%COMP%]{padding:2rem}.custom-title[_ngcontent-%COMP%]{font-size:1.5rem}.custom-label[_ngcontent-%COMP%], .custom-input[_ngcontent-%COMP%], .custom-button[_ngcontent-%COMP%]{font-size:1rem}.custom-text[_ngcontent-%COMP%]{font-size:.875rem}.custom-input[_ngcontent-%COMP%]{caret-color:#111}.custom-input[_ngcontent-%COMP%]:-webkit-autofill, .custom-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .custom-input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-text-fill-color:#111!important;caret-color:#111!important}@media screen and (max-width:420px){.custom-box[_ngcontent-%COMP%]{padding:1rem}.custom-title[_ngcontent-%COMP%]{font-size:1.25rem}.custom-label[_ngcontent-%COMP%], .custom-input[_ngcontent-%COMP%], .custom-button[_ngcontent-%COMP%]{font-size:.875rem}.custom-text[_ngcontent-%COMP%]{font-size:.75rem}.mt-5[_ngcontent-%COMP%]{margin-top:1rem!important}}'],changeDetection:1})}return e})()});pt();export{xt as ForgotPasswordComponent};
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.