1import{a as G,b as y}from"./chunk-EWJQF5OG.js";import{a as N}from"./chunk-72KYAKUG.js";import{k as B}from"./chunk-STNFFWJM.js";import{a as j,b as z}from"./chunk-WDX75O73.js";import{a as D,e as O,h as P,m as R}from"./chunk-ZM4G45VJ.js";import"./chunk-VXXGCG3D.js";import"./chunk-ZYG53WLM.js";import{b as u}from"./chunk-QAZFE7LR.js";import{Ab as x,Ac as I,Da as H,Na as C,Oa as f,Ob as F,Ta as d,Ua as t,Va as i,Wa as g,Y as m,aa as w,ba as _,bb as M,ca as v,da as E,db as S,f as L,fb as p,jc as Z,o as V,rb as l,sb as h,ua as r,wb as k,xb as b,xc as T,yb as A,zc as W}from"./chunk-DMOAUQEG.js";var J=()=>["/"],U=()=>["/auth"];function q(n,s){n&1&&(t(0,"div",11),v(),t(1,"svg",14),g(2,"path",15)(3,"path",16),i(),E(),t(4,"p",17),l(5,"Se confirm\u0103 contul dumneavoastr\u0103..."),i()())}function K(n,s){if(n&1&&(t(0,"div",12)(1,"h1",18),l(2,"Confirmare e\u0219uat\u0103"),i(),t(3,"p",17),l(4),i(),g(5,"app-button",19),i()),n&2){let o=p();r(4),h(o.confirmError),r(),d("rounded",!0)("fullWidth",!0)("routerLink",x(4,J))}}function Q(n,s){if(n&1&&(t(0,"p",29),l(1),i()),n&2){let o=p(2);r(),h(o.loginError)}}function X(n,s){if(n&1){let o=M();t(0,"section",13)(1,"h1",20),l(2," Felicit\u0103ri, contul t\u0103u "),t(3,"span",21),l(4,"Laziar"),i(),l(5," a fost confirmat "),i(),t(6,"div",22)(7,"div",23),l(8," Pentru autentificare folose\u0219ti emailul: "),i(),t(9,"div",24),l(10),i()(),t(11,"div",25)(12,"app-input-field",26),A("ngModelChange",function(a){w(o);let c=p();return b(c.password,a)||(c.password=a),_(a)}),i(),t(13,"div",27),l(14," Ai uitat parola? "),t(15,"a",28),l(16," Reseteaz\u0103 parola "),i()(),C(17,Q,2,1,"p",29),t(18,"app-button",30),S("click",function(){w(o);let a=p();return _(a.login())}),i()()()}if(n&2){let o=p();r(10),h(o.email),r(2),k("ngModel",o.password),d("error",!!o.loginError),r(3),d("routerLink",x(9,U)),r(2),f(o.loginError?17:-1),r(),d("label",o.loginLoading?"Se conecteaz\u0103...":"Autentificare")("rounded",!0)("fullWidth",!0)("disabled",!o.password||o.loginLoading)}}var C1=(()=>{let s=class s{constructor(){this.cdr=m(F),this.route=m(T),this.httpClient=m(Z),this.router=m(W),this.principal=m(z),this.eventManager=m(j),this.token=null,this.email=null,this.loading=!0,this.confirmError=null,this.password="",this.loginLoading=!1,this.loginError=""}ngOnInit(){this.route.paramMap.subscribe(e=>{this.token=e.get("token"),this.cdr.markForCheck(),this.confirm().catch(a=>console.log(a))})}confirm(){return L(this,null,function*(){this.loading=!0,this.confirmError=null;try{let e=yield V(this.httpClient.post(u.apiEndpoint+"/auth/confirm",{code:this.token},u.getHttpOptions()));if(e?.expired||!e?.email){yield this.router.navigate(["/"]);return}this.email=e.email}catch(e){this.confirmError=y(e)??"A ap\u0103rut o eroare. V\u0103 rug\u0103m s\u0103 \xEEncerca\u021Bi din nou."}finally{this.loading=!1,this.cdr.markForCheck()}})}login(){return L(this,null,function*(){this.loginLoading=!0,this.loginError="";try{let e=yield V(this.httpClient.post(u.apiEndpoint+"/auth/login",JSON.stringify({email:this.email,password:this.password}),u.getHttpOptions()));e?.access_token?(u.setTwj(e.access_token),yield this.principal.getUserValue(!0),this.eventManager.broadcast({name:"authenticationSuccess",content:"Sending Authentication Success"}),yield this.router.navigate(["/"])):this.loginError=G(e?.message)??"Autentificare e\u0219uat\u0103."}catch(e){this.loginError=y(e)??"Autentificare e\u0219uat\u0103."}finally{this.loginLoading=!1,this.cdr.markForCheck()}})}};s.\u0275fac=function(a){return new(a||s)},s.\u0275cmp=H({type:s,selectors:[["app-confirm-account"]],decls:15,vars:5,consts:[[1,"min-h-screen","bg-cFFFFFA","text-c121212","flex","flex-col"],[1,"h-[72px]","border-b","border-gray-900/10","flex","items-center","justify-center","px-4","shrink-0"],[3,"routerLink"],["width","78","height","32","viewBox","0 0 78 32","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M0 25.9162V24.1687L2.26243 23.7796L5.41597 7.87154L3.15354 7.48243V5.7207H10.4139V7.48243L8.15143 7.87154L4.99789 23.8226H12.1459L12.466 20.6333H14.5612V25.9185H0V25.9162Z","fill","#121212"],["d","M20.5806 26.4981C19.0158 26.4981 17.826 26.1162 17.0138 25.3547C16.1991 24.5908 15.793 23.5166 15.793 22.1296C15.793 20.7427 16.3759 19.561 17.5418 18.6969C18.7076 17.8327 20.3274 17.4007 22.4011 17.4007H25.0792V15.9302C25.0792 15.023 24.8045 14.3212 24.2526 13.8223C23.7007 13.3234 22.9267 13.0727 21.928 13.0727C21.2997 13.0727 20.7526 13.1491 20.2892 13.3019C19.8257 13.4547 19.4052 13.6647 19.0253 13.9321L18.7339 16.0256H16.6244V12.5857C17.3005 12.0391 18.0865 11.6261 18.9847 11.3444C19.883 11.0627 20.8769 10.9219 21.9687 10.9219C23.7915 10.9219 25.2225 11.3563 26.2594 12.2253C27.2962 13.0942 27.8147 14.3379 27.8147 15.9564V23.1824C27.8147 23.3757 27.8147 23.5667 27.8218 23.7505C27.8266 23.9367 27.8385 24.1205 27.8553 24.3043L29.3126 24.4571V26.2045H25.385C25.3014 25.7987 25.2369 25.4335 25.1915 25.1088C25.1461 24.7842 25.1126 24.4619 25.0935 24.1372C24.5655 24.8128 23.9062 25.3738 23.1154 25.8226C22.3246 26.2714 21.4789 26.4958 20.583 26.4958L20.5806 26.4981ZM20.982 24.2089C21.8898 24.2089 22.7164 23.9916 23.4666 23.5572C24.2167 23.1227 24.7519 22.5999 25.0768 21.9888V19.2698H22.3007C21.0417 19.2698 20.098 19.5706 19.4697 20.1722C18.8414 20.7737 18.526 21.4445 18.526 22.1845C18.526 22.841 18.7291 23.3423 19.1376 23.6885C19.5438 24.0346 20.1601 24.2089 20.9844 24.2089H20.982Z","fill","#121212"],["d","M30.1914 26.2078V24.0164L38.1589 13.7229H33.4525L33.0511 16.2748H30.4542V11.1973H42.3923V13.4866L34.647 23.6535H39.8121L40.3114 20.9775H42.8104V26.2078H30.1914Z","fill","#121212"],["d","M43.886 26.2076V24.0711L45.9692 23.6557V13.7657L43.7617 13.3503V11.1995H49.4668V23.6557L51.5357 24.0711V26.2076H43.886ZM45.8282 7.80015V4.57031H49.4644V7.80254H45.8282V7.80015Z","fill","#121212"],["d","M57.2239 26.4981C55.6973 26.4981 54.5075 26.1043 53.657 25.3189C52.8042 24.5335 52.3789 23.4521 52.3789 22.0723C52.3789 20.6926 52.9571 19.5109 54.1134 18.6324C55.2697 17.754 56.9229 17.3147 59.0682 17.3147H61.3593V16.0519C61.3593 15.257 61.
11204 14.622 60.645 14.1517C60.1672 13.6791 59.4768 13.4451 58.5689 13.4451C58.0505 13.4451 57.5918 13.5072 57.1952 13.6313C56.7963 13.7554 56.4403 13.9345 56.1273 14.166L55.8072 16.1904H53.239L53.2103 12.4879C53.9509 12.008 54.7751 11.6261 55.6806 11.3444C56.5884 11.0627 57.5966 10.9219 58.7075 10.9219C60.614 10.9219 62.1143 11.3683 63.2132 12.2611C64.3098 13.1539 64.8569 14.431 64.8569 16.0973V22.7145C64.8569 22.9174 64.8569 23.1155 64.8641 23.3113C64.8712 23.507 64.8808 23.6956 64.8999 23.8794L66.4265 24.0728V26.2093H61.8586C61.7655 25.8846 61.6795 25.5719 61.603 25.2664C61.5242 24.9608 61.4668 24.6553 61.4286 24.3521C60.9293 24.9799 60.3249 25.4955 59.6177 25.899C58.9106 26.3024 58.1126 26.5029 57.2239 26.5029V26.4981ZM58.0147 23.7935C58.717 23.7935 59.3764 23.6288 59.9856 23.3017C60.5948 22.9747 61.0535 22.5593 61.3593 22.0604V19.5491H59.0276C57.9812 19.5491 57.1928 19.7926 56.6601 20.2772C56.1273 20.7618 55.8621 21.3299 55.8621 21.9769C55.8621 22.5593 56.0461 23.0081 56.4164 23.3232C56.7867 23.6383 57.3195 23.7959 58.0123 23.7959L58.0147 23.7935Z","fill","#121212"],["d","M67.4458 26.2069V24.0704L69.5291 23.655V13.765L67.3359 13.3496V11.1988H72.7495L72.9287 13.0846L72.9574 13.3902C73.354 12.5953 73.8437 11.9842 74.4219 11.5592C75 11.
11343 75.6785 10.9219 76.4549 10.9219C76.7129 10.9219 76.9901 10.9457 77.2815 10.9911C77.573 11.0365 77.8119 11.089 77.9959 11.1439L77.5945 14.3761L75.6379 14.2663C75 14.2305 74.4744 14.3546 74.0635 14.6411C73.6526 14.9275 73.3062 15.3262 73.029 15.8347V23.6574L75.1123 24.0728V26.2093H67.4482L67.4458 26.2069Z","fill","#121212"],[1,"flex","flex-grow","items-start","justify-center","px-4","py-10"],[1,"flex","flex-col","items-center","justify-center","gap-5","mt-24"],[1,"text-center","mt-24","max-w-sm","w-full","grid","gap-4"],[1,"w-full","max-w-[448px]","mt-8"],["aria-hidden","true","viewBox","0 0 100 101","fill","none","xmlns","http://www.w3.org/2000/svg",1,"w-12","h-12","animate-spin"],["d","M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z","fill","#E8E8E8"],["d","M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z","fill","#121212"],[1,"text-sm","font-onest","text-gray-500"],[1,"font-lora","text-2xl","font-medium","text-gray-900"],["label","\xCEnapoi la pagina principal\u0103","variant","outline","size","lg",3,"rounded","fullWidth","routerLink"],[1,"font-lora","text-3xl","text-gray-900","font-medium","mb-2"],[1,"italic"],[1,"mt-2","mb-8"],[1,"text-sm","leading-5","font-onest","text-gray-900"],[1,"font-semibold","font-onest","text-gray-900","text-sm","leading-8"],[1,"grid","gap-4"],["label","Parola","type","password","placeholder","Introduce parola ta","name","password",3,"ngModelChange","ngModel","error"],[1,"text-sm","leading-5","font-onest","text-gray-500"],[1,"underline","font-semibold","text-gray-800","ml-1",3,"routerLink"],[1,"text-sm","font-onest","text-red-500"],["variant","primary","size","lg",3,"click","label","rounded","fullWidth","disabled"]],template:function(a,c){a&1&&(t(0,"div",0)(1,"header",1)(2,"a",2),v(),t(3,"svg",3),g(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9),i()()(),E(),t(10,"main",10),C(11,q,6,0,"div",11),C(12,K,6,5,"div",12),C(13,X,19,10,"section",13),i(),g(14,"app-auth-footer"),i()),a&2&&(r(2),d("routerLink",x(4,J)),r(9),f(c.loading?11:-1),r(),f(!c.loading&&c.confirmError?12:-1),r(),f(!c.loading&&!c.confirmError?13:-1))},dependencies:[I,R,O,P,D,B,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0});let n=s;return n})();export{C1 as ConfirmAccountComponent};
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.