PageSourceSearch

https://balkanposao.com/chunk-WSCZUHGS.js

js balkanposao.com collected 2026-10-02 00:48:03 UTC 9,506 bytes, 1 lines download raw bytes

1import{a as W}from"./chunk-B6NIK2IQ.js";import{a as ie,b as ne}from"./chunk-6FT3Z2QS.js";import{b as se,c as pe}from"./chunk-NPNEQ563.js";import{a as oe,b as re,h as ae,i as le}from"./chunk-IWVFE4C4.js";import{c as H,e as _,h as J,i as K,n as Q,q as Y,r as Z,u as ee,w as te}from"./chunk-BS6VDA53.js";import{e as z,f as j}from"./chunk-OLYVH4LJ.js";import{b as U}from"./chunk-NEU3AIY4.js";import"./chunk-3YKS3WAI.js";import"./chunk-3CNSZUCB.js";import{a as X}from"./chunk-EJN3B4FQ.js";import{e as $}from"./chunk-5FR5Y2FV.js";import"./chunk-4NGTKQFK.js";import"./chunk-YQN7OWPA.js";import"./chunk-H4SBBTHV.js";import"./chunk-5CO3BQT7.js";import{b as q,c as A,d as G}from"./chunk-Z7UBMJKQ.js";import{$ as v,$a as T,Ab as m,Ba as n,Bb as d,Jc as F,Ka as S,Mb as R,Mc as V,Nc as N,Pb as p,Qa as b,Qb as c,Rc as D,W as g,Xa as y,Ya as w,aa as C,ab as E,bb as u,cb as a,db as l,eb as M,ib as O,ja as k,kb as h,lb as f,oc as B,wc as L,zb as s}from"./chunk-4JQKKPIE.js";import{h as P}from"./chunk-QWWW7GFA.js";var me=e=>({redirectTo:e}),de=(e,i)=>i.id;function ue(e,i){e&1&&(a(0,"mat-error"),s(1),p(2,"translate"),l()),e&2&&(n(),d(" ",c(2,1,"auth.password_mismatch")," "))}function ge(e,i){e&1&&(a(0,"p",8),s(1),p(2,"translate"),l()),e&2&&(n(),m(c(2,1,"common.loading")))}function fe(e,i){e&1&&(s(0),p(1,"translate")),e&2&&d(" ",c(1,1,"common.terms_label")," ")}function _e(e,i){e&1&&(s(0),p(1,"translate")),e&2&&d(" ",c(1,1,"common.privacy_policy_label")," ")}function he(e,i){if(e&1&&s(0),e&2){let t=f().$implicit;d(" ",t.type," ")}}function xe(e,i){e&1&&(a(0,"p",17),s(1),p(2,"translate"),l()),e&2&&(n(),m(c(2,1,"common.privacy_required")))}function ve(e,i){if(e&1&&(a(0,"div")(1,"mat-checkbox",15),s(2),p(3,"translate"),a(4,"a",16)(5,"strong"),y(6,fe,2,3)(7,_e,2,3)(8,he,1,1),l()(),s(9,"* "),l(),y(10,xe,3,3,"p",17),l()),e&2){let t,o=i.$implicit,r=f(2);n(),u("formControlName",o.id),n(),d(" ",c(3,5,"common.privacy_accept")," "),n(2),u("routerLink",r.getLegalUrl(o.type)),n(2),w(o.type==="terms"?6:o.type==="privacy_policy"?7:8),n(4),w((t=r.form.get(o.id))!=null&&t.invalid&&((t=r.form.get(o.id))!=null&&t.touched)?10:-1)}}function Ce(e,i){if(e&1&&(T(0,ve,11,7,"div",null,de),a(2,"mat-checkbox",14),s(3),p(4,"translate"),l()),e&2){let t=f();E(t.legalDocuments),n(3),d(" ",c(4,1,"common.marketing_consent")," ")}}function be(e,i){if(e&1&&(a(0,"p",18),s(1),l()),e&2){let t=f();n(),m(t.error)}}function ye(e,i){if(e&1){let t=O();a(0,"div",19),h("click",function(){v(t);let r=f();return C(r.closeInfo())}),a(1,"div",20),h("click",function(r){return v(t),C(r.stopPropagation())}),a(2,"p",21),s(3),l(),a(4,"div",22)(5,"button",23),h("click",function(){v(t);let r=f();return C(r.closeInfo())}),s(6),p(7,"translate"),l()()()()}if(e&2){let t=f();n(3),m(t.info),n(3),d(" ",c(7,2,"common.close")," ")}}function we(e){let i=e.get("password"),t=e.get("confirmPassword");return!i||!t||i.value===t.value?null:{passwordMismatch:!0}}var ce=class e{fb=g(ee);auth=g($);router=g(V);route=g(F);legalService=g(W);localeService=g(X);translate=g(q);form=this.fb.group({email:["",[_.required,_.email]],password:["",[_.required,_.minLength(6)]],confirmPassword:["",[_.required]],marketingConsent:[!1]},{validators:we});loading=!1;error=null;info=null;docsLoading=k(!0);legalDocuments=[];get lang(){return this.localeService.getCurrentLocale()}get redirectTo(){return this.route.snapshot.queryParamMap.get("redirectTo")}getLegalUrl(i){return i==="terms"?this.localeService.getTermsPath():i==="privacy_policy"?this.localeService.getPrivacyPath():"#"}ngOnInit(){this.legalService.getCurrentDocuments(this.lang).subscribe({next:i=>{this.legalDocuments=i.filter(t=>t.binding),this.legalDocuments.forEach(t=>{this.form.addControl(t.id,this.fb.control(!1,_.requiredTrue))}),this.docsLoading.set(!1)},error:()=>this.docsLoading.set(!1)})}register(){return P(this,null,function*(){if(this.form.invalid)return;this.loading=!0,this.error=null,this.info=null;let{email:i,password:t}=this.form.value,o=this.lang;try{let r=this.legalDocuments.filter(x=>this.form.value[x.id]===!0).map(x=>({documentType:x.type,documentVersion:x.version,languagePresented:o}));this.form.value.marketingConsent&&r.push({documentType:"marketing",documentVersion:"opt-in",languagePresented:o});let{outcome:I}=yield this.auth.registerBalkanposao({email:i,password:t,language:o,consents:r});if(I==="EXISTING_PROFILE"||I==="ACCOUNT_EXISTS"){this.info=this.translate.instant("auth.existing_account_reset_sent");return}yield this.auth.signInWithEmail(i,t),yield this.auth.sendVerificationEmailViaBrevo(o).catch(()=>{}),this.router.navigate(["/verify-email"],{queryParams:{redirectTo:this.redirectTo||"/"}})}catch(r){this.error=this.humanizeError(r?.status??r?.code??r?.message??"")}finally{this.loading=!1}})}closeInfo(){this.info=null}humanizeError(i){let t=String(i);return t==="409"||t.includes("auth/email-already-in-use")?this.translate.instant("auth.register_err.email_in_use"):t.includes("auth/weak-password")?this.translate.instant("auth.register_err.weak_password"):this.translate.instant("auth.register_err.generic")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=S({type:e,selectors:[["app-register"]],decls:35,vars:30,consts:[[1,"auth-page","mt-24"],[1,"container","auth-card"],[3,"ngSubmit","formGroup"],["appearance","fill",1,"full"],["matInput","","type","email","formControlName","email"],["matInput","","type","password","formControlName","password"],["matInput","","type","password","formControlName","confirmPassword"],[4,"ngIf"],[1,"text-sm","opacity-70"],["mat-raised-button","","color","primary",1,"w-full",3,"disabled"],["class","error",4,"ngIf"],[1,"hint","mt-2"],["routerLink","/login",3,"queryParams"],["class","info-modal-backdrop",3,"click",4,"ngIf"],["formControlName","marketingConsent"],[3,"formControlName"],["target","_blank","rel","noopener",3,"routerLink"],[1,"error","text-xs"],[1,"error"],[1,"info-modal-backdrop",3,"click"],["role","dialog","aria-modal","true",1,"info-modal",3,"click"],[1,"info-modal__text"],[1,"info-modal__actions"],["mat-flat-button","","color","primary","type","button",3,"click"]],template:function(t,o){if(t&1&&(a(0,"section",0)(1,"div",1)(2,"h1"),s(3),p(4,"translate"),l(),a(5,"form",2),h("ngSubmit",function(){return o.register()}),a(6,"mat-form-field",3)(7,"mat-label"),s(8),p(9,"translate"),l(),M(10,"input",4),l(),a(11,"mat-form-field",3)(12,"mat-label"),s(13),p(14,"translate"),l(),M(15,"input",5),l(),a(16,"mat-form-field",3)(17,"mat-label"),s(18),p(19,"translate"),l(),M(20,"input",6),b(21,ue,3,3,"mat-error",7),l(),y(22,ge,3,3,"p",8)(23,Ce,5,3),a(24,"button",9),s(25),p(26,"translate"),l()(),b(27,be,2,1,"p",10),a(28,"p",11),s(29),p(30,"translate"),a(31,"a",12),s(32),p(33,"translate"),l()()()(),b(34,ye,8,4,"div",13)),t&2){let r;n(3),m(c(4,14,"auth.register_title")),n(2),u("formGroup",o.form),n(3),m(c(9,16,"auth.email_label")),n(5),m(c(14,18,"auth.password_label")),n(5),m(c(19,20,"auth.confirm_password_label")),n(3),u("ngIf",o.form.hasError("passwordMismatch")&&((r=o.form.get("confirmPassword"))==null?null:r.touched)),n(),w(o.docsLoading()?22:23),n(2),u("disabled",o.loading||o.docsLoading()),n(),d(" ",c(26,22,"auth.create_account_btn")," "),n(2),u("ngIf",o.error),n(2),d(" ",c(30,24,"auth.have_account")," "),n(2),u("queryParams",R(28,me,o.redirectTo)),n(),m(c(33,26,"auth.login_link")),n(2),u("ngIf",o.info)}},dependencies:[L,B,te,Q,H,J,K,Y,Z,D,N,le,ae,oe,re,pe,se,j,z,ne,ie,U,G,A],styles:['.auth-page[_ngcontent-%COMP%]{padding:2rem 0}.auth-card[_ngcontent-%COMP%]{max-width:420px;margin:0 auto}.divider[_ngcontent-%COMP%]{text-align:center;margin:1rem 0;color:#999;position:relative}.divider[_ngcontent-%COMP%]:before, .divider[_ngcontent-%COMP%]:after{content:"";position:absolute;top:50%;width:calc(50% - 30px);height:1px;background:#e0e0e0}.divider[_ngcontent-%COMP%]:before{left:0}.divider[_ngcontent-%COMP%]:after{right:0}.forgot-row[_ngcontent-%COMP%]{text-align:right;margin:-.25rem 0 .75rem;font-size:.875rem}.error[_ngcontent-%COMP%]{color:#b00020;margin-top:.5rem}.hint[_ngcontent-%COMP%]{margin-top:1rem}.google-btn[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center;gap:12px;padding:12px 24px;border:1px solid #dadce0;border-radius:12px;background:#fff;color:#3c4043;font-family:Roboto,Arial,sans-serif;font-size:14px;font-weight:500;line-height:20px;cursor:pointer;transition:all .2s ease;box-shadow:0 1px 2px #3c404314}.google-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#f8f9fa;border-color:#d2d3d4;box-shadow:0 1px 3px #3c404326}.google-btn[_ngcontent-%COMP%]:active:not(:disabled){background:#f1f3f4;border-color:#d2d3d4;box-shadow:0 1px 2px #3c404314}.google-btn[_ngcontent-%COMP%]:focus{outline:none;border-color:#4285f4;box-shadow:0 0 0 3px #4285f41a}.google-btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.google-btn[_ngcontent-%COMP%]   .google-icon[_ngcontent-%COMP%]{width:20px;height:20px;flex-shrink:0}.google-btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{flex-grow:1;text-align:center}.info-modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:1rem;background:#00000080}.info-modal[_ngcontent-%COMP%]{width:100%;max-width:420px;background:#fff;border-radius:12px;padding:1.5rem;box-shadow:0 10px 30px #0003}.info-modal__text[_ngcontent-%COMP%]{margin:0 0 1.25rem;line-height:1.5;color:#222}.info-modal__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}']})};export{ce as RegisterComponent};

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.