1"use strict";(self.webpackChunks3987=self.webpackChunks3987||[]).push([[6763],{39:(T,d,a)=>{a.r(d),a.d(d,{RegistrationModule:()=>ne});var l=a(6895),f=a(1315),v=a(148),c=a(9116),o=a(4006),y=a(7957),e=a(4650),p=a(5938),m=a(1481),u=a(3189),I=a(1739);let S=(()=>{class n{constructor(t,r,i){this.dialogRef=t,this.data=r,this.sanitizer=i,this.sanitizedDocument=this.sanitizer.sanitize(e.SecurityContext.HTML,r.legalDocument)||""}close(){this.dialogRef.close()}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(p.so),e.\u0275\u0275directiveInject(p.WI),e.\u0275\u0275directiveInject(m.H7))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["app-terms-modal"]],decls:6,vars:4,consts:[[1,"d-flex","justify-content-between","align-items-start"],["mat-dialog-title",""],[1,"i-matcha-action_close",2,"cursor","pointer",3,"click"],["mat-dialog-content","",3,"innerHTML"]],template:function(t,r){1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"h1",1),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"app-icon",2),e.\u0275\u0275listener("click",function(){return r.close()}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(5,"div",3)),2&t&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,2,"auth.registration.accept-terms.privacy-policy-terms")),e.\u0275\u0275advance(3),e.\u0275\u0275property("innerHTML",r.sanitizedDocument,e.\u0275\u0275sanitizeHtml))}
1,directives:[p.uh,u.o,p.xY],pipes:[I.X$],styles:[""]}),n})();var w=a(5689),g=a(2126),R=a(6518),B=a(4799),F=a(5472),M=a(3173),P=a(8471),C=a(9549),L=a(4144),D=a(3910),O=a(899),k=a(8573),x=a(6709),j=a(266),N=a(9062);const b=["autocomplete"];function V(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"mat-error"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,t.getErrorMessage(t.registerForm.get("first_name")))," ")}}function U(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"mat-error"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,t.getErrorMessage(t.registerForm.get("last_name")))," ")}}function z(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"mat-error"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,t.getErrorMessage(t.registerForm.get("email")))," ")}}function A(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"mat-error"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,t.getErrorMessage(t.registerForm.get("phone")))," ")}}function $(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"mat-error"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(2,1,t.passwordError.key,t.passwordError.params)," ")}}function G(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"mat-form-field",3)(1,"mat-label"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"input",20),e.\u0275\u0275template(5,$,3,4,"mat-error",5),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,2,"auth.registration.fields.password")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",t.passwordError)}}function J(n,s){if(1&n&&e.\u0275\u0275element(0,"app-password-requirements",21),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("control",t.registerForm.get("password"))}}function Q(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"mat-error"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,t.getErrorMessage(t.registerForm.get("confirm_password")))," ")}}function H(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"mat-form-field",3)(1,"mat-label"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"input",22),e.\u0275\u0275template(5,Q,3,3,"mat-error",5),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,2,"auth.registration.fields.confirm-password")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",t.registerForm.get("confirm_password").invalid)}}function W(n,s){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"app-select-church",23),e.\u0275\u0275listener("newItem",function(i){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().selectTertiarygroup(i)}),e.\u0275\u0275elementEnd()}2&n&&e.\u0275\u0275property("component","registration")}function K(n,s){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",24),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().openTermsModal()}),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()}2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,"auth.registration.accept-terms.privacy-policy-terms")))}function X(n,s){1&n&&(e.\u0275\u0275elementStart(0,"a",25),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,"auth.registration.accept-terms.privacy-policy-terms")))}const Y=function(n){return{"error-phone":n}},q=c.Bz.forChild([{path:"",component:(()=>{class n{constructor(t,r,i,h,ae,oe,ie,se){this.fb=t,this.authService=r,this.tertiaryGroupService=i,this.storage=h,this.router=ae,this.snackService=oe,this.activatedRoute=ie,this.dialog=se,this.tertiarygroupId=localStorage.getItem("tertiarygroup")?localStorage.getItem("tertiarygroup"):JSON.parse(localStorage.getItem("selectChurch"))?.id,this.tertiarygroup=this.tertiarygroupId,this.tertiarygroups=JSON.parse(localStorage.getItem("tertiarygroups")),this.hidePass=!1,this.tertiarygroupCtrl=new o.NI,this.loading=!1,this.breadcrumb=[{route:"/",label:"auth.registration.breadcrumb.home"},{route:"/registrar",label:"auth.registration.breadcrumb.register"}],this.legalDocument=null,this.separateDialCode=!0;const _=this.activatedRoute.snapshot.queryParams;Object.keys(_).length>0&&_.r&&(this.returnURL=atob(_.r)),this.state=this.router.getCurrentNavigation()?.extras?.state,this.facebookState=this.state?this.state.facebook:{},this.registerForm=this.fb.group({email:[this.facebookState.email,o.kI.compose([o.kI.required,o.kI.email])],first_name:[this.facebookState.firstName,o.kI.required],last_name:["",o.kI.required],password:["",[o.kI.required,g.zw]],phone:["",o.kI.required],confirm_password:["",o.kI.required],tertiarygroupCtrl:[""],has_consent:["",o.kI.required]}),this.state&&(this.hidePass=!0,this.registerForm.get("password").setValidators(null),this.registerForm.get("confirm_password").setValidators(null),this.registerForm.get("password").disable(),this.registerForm.get("confirm_password").disable()),this.tertiarygroupCtrl.setValidators(o.kI.required),this.password=this.registerForm.controls.password,this.confirmPassword=this.registerForm.controls.confirm_password,this.confirmPassword.setValidators(o.kI.compose([o.kI.required,this.passwordValidator(this.password)])
1),this.password.valueChanges.subscribe(()=>this.confirmPassword.updateValueAndValidity({emitEvent:!1})),this.tertiaryGroupService.tertiarygroup$.subscribe(E=>{const le=this.tertiarygroup;if(this.tertiarygroup=E.id?E.id.toString():le,!this.tertiarygroup){const pe=JSON.parse(localStorage.getItem("tertiarygroups"));this.tertiarygroup=pe[0].id}})}createTertiarygroupObj(t,r){return{subgroup:r.subgroup,tertiarygroup:r.resource_uri,regional:r.regional,...t}}registerAPI(t){this.authService.register(t).subscribe({next:()=>{this.snackService.snackMessage("auth.registration.success","success");const r=this.storage.getItem("newTertiarygroup");r&&(this.storage.setItem("tertiarygroup",r),this.storage.removeItem("newTertiarygroup")),localStorage.setItem("temp_email",t.user.email);const i=this.returnURL?`/login?r=${btoa(this.returnURL)}`:"/login";this.router.navigateByUrl(i)},complete:()=>this.loading=!1,error:r=>{this.loading=!1;const i=(0,w.e)(r,"auth.registration.generic-error");this.snackService.snackMessage(i,"error")}})}ngOnInit(){this.loadLegalDocument()}loadLegalDocument(){this.tertiaryGroupService.getSubgroupByAppId().subscribe(t=>{const r=t?.legal_document?.trim();this.legalDocument=r||null})}openTermsModal(){!this.legalDocument||this.dialog.open(S,{width:"600px",maxWidth:"90vw",data:{legalDocument:this.legalDocument}})}getErrorMessage(t){return t.hasError("required")||t.hasError("pattern")?"auth.registration.errors.required":t.hasError("email")?"auth.registration.errors.email":t.hasError("password")?"auth.registration.errors.password":void 0}get passwordError(){return(0,g.Ps)(this.password,this.getErrorMessage(this.password))}passwordValidator(t){return r=>r.value!==t.value?{password:!0}:null}getTooltip(){const r=this.registerForm.controls.confirm_password.errors||{};return(this.registerForm.controls.password.errors||{}).required&&r.required?"auth.registration.tooltip-button-1":(0,g.AO)(this.password)?`${g.Di}.tooltip`:r.password&&!r.required?"auth.registration.tooltip-button-2":void 0}selectTertiarygroup(t){this.tertiarygroup=t}register(t){this.loading=!0;let r={};r=this.state?{access_token:this.facebookState.authToken}:{user:{first_name:t.value.first_name,last_name:t.value.last_name,email:t.value.email,password:t.value.password,is_active:!0},mobile_phone:t.value.phone,has_consent:t.value.has_consent,send_welcome_email:!1,user_type:"inradar_user",group:"/api/v1/group/1/"},this.tertiarygroup&&this.tertiaryGroupService.getTertiaryGroupById(this.tertiarygroup).subscribe(i=>this.registerAPI(this.createTertiarygroupObj(r,i)))}routerLink(t){this.router.navigateByUrl(`${t}?r=${btoa(this.returnURL)}`)}onChangeCellNaturalPhone(t){this.registerForm.controls.phone.setValue(t)}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(o.qu),e.\u0275\u0275directiveInject(R.C),e.\u0275\u0275directiveInject(B.p),e.\u0275\u0275directiveInject(F.F),e.\u0275\u0275directiveInject(c.F0),e.\u0275\u0275directiveInject(M.f),e.\u0275\u0275directiveInject(c.gz),e.\u0275\u0275directiveInject(p.uw))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["app-registration"]],viewQuery:function(t,r){if(1&t&&(e.\u0275\u0275viewQuery(b,7),e.\u0275\u0275viewQuery(b,7,y.ZL)),2&t){let i;e.\u0275\u0275queryRefresh(i=e.\u0275\u0275loadQuery())&&(r.autocompleteElem=i.first),e.\u0275\u0275queryRefresh(i=e.\u0275\u0275loadQuery())&&(r.autoComplete=i.first)}},decls:44,vars:39,consts:[[3,"title","breadcrumb"],[1,"section-auth","section-register-auth"],[3,"formGroup","submit"],["appearance","outline"],["matInput","","type","text","formControlName","first_name","required","","pattern","[^\\s].{2,}"],[4,"ngIf"],["matInput","","type","text","formControlName","last_name","required","","pattern","[^\\s].{2,}"],["matInput","","type","email","formControlName","email","required","","pattern","[^\\s].{2,}"],[1,"phone-intl","col-md-12",3,"ngClass"],[3,"value","onChange"],["appearance","outline",4,"ngIf"],[3,"control",4,"ngIf"],[3,"component","newItem",4,"ngIf"],[1,"terms","d-flex","align-items-center","justify-content-center"],["formControlName","has_consent","value","true","required","",2,"margin-right","8px"],["style","cursor: pointer;",3,"click",4,"ngIf"],["href","https://inchurch.com.br/pp","target","_blank",4,"ngIf"],[1,"form-buttom-wrapper",3,"matTooltip","matTooltipDisabled"],["type","submit","appButton","","color","primary",3,"disabled"],[3,"click"],["matInput","","type","password","formControlName","password","required",""],[3,"control"],["matInput","","type","password","formControlName","confirm_password","required",""],[3,"component","newItem"],[2,"cursor","pointer",3,"click"],["href","https://inchurch.com.br/pp","target","_blank"]],template:function(t,r){1&t&&(e.\u0275\u0275element(0,"app-section-banner",0),e.\u0275\u0275pipe(1,"translate"),e.\u0275\u0275elementStart(2,"section",1)(3,"form",2),e.\u0275\u0275listener("submit",function(){return r.register(r.registerForm)}),e.\u0275\u0275elementStart(4,"mat-form-field",3)(5,"mat-label"),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(8,"input",4),e.\u0275\u0275template(9,V,3,3,"mat-error",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"mat-form-field",3)(11,"mat-label"),e.\u0275\u0275text(12,"Sobrenome"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(13,"input",6),e.\u0275\u0275template(14,U,3,3,"mat-error",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(15,"mat-form-field",3)(16,"mat-label"),e.\u0275\u0275text(17),e.\u0275\u0275pipe(18,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(19,"input",7),e.\u0275\u0275template(20,z,3,3,"mat-error",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(21,"div",8)(22,"matcha-input-phone",9),e.\u0275\u0275listener("onChange",function(h){return r.onChangeCellNaturalPhone(h)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(23,A,3,3,"mat-error",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(24,G,6,4,"mat-form-field",10),e.\u0275\u0275template(25,J,1,1,"app-password-requirements",11),e.\u0275\u0275template(26,H,6,4,"mat-form-field",10),e.\u0275\u0275template(27,W,1,1,"app-select-church",12),e.\u0275\u0275elementStart(28,"p",13),e.\u0275\u0275element(29,"mat-checkbox",14),e.\u0275\u0275elementStart(30,"span"),e.\u0275\u0275text(31),e.\u0275\u0275pipe(32,"translate"),e.\u0275\u0275template(33,K,3,3,"a",15),e.\u0275\u0275template(34,X,3,3,"a",16),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(35,"div",17),e.\u0275\u0275pipe(36,"translate"),e.\u0275\u0275elementStart(37,"button",18),e.\u0275\u0275text(38),e.\u0275\u0275pipe(39,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(40,"p")(41,"a",19),e.\u0275\u0275listener("click",function(){return r.routerLink("/login")}),e.\u0275\u0275text(42),e.\u0275\u0275pipe(43,"translate"),e.\u0275\u0275elementEnd()()()()),2&t&&(e.\u0275\u0275property("title",e.\u0275\u0275pipeBind1(1,23,"auth.registration.banner"))("breadcrumb",r.breadcrumb),e.\u0275\u0275advance(3),e.\u0275\u0275property("formGroup",r.registerForm),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,25,"auth.registration.fields.first-name")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",r.registerForm.get("first_name").invalid),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",r.registerForm.get("last_name").invalid),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(18,27,"auth.registration.fields.email")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",r.registerForm.get("email").invalid),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(37,Y,r.registerForm.get("phone").invalid&&r.registerForm.controls.phone.touched)),e.\u0275\u0275advance(1),e.\u0275\u0275property("value",r.registerForm.get("phone").value),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",r.registerForm.get("phone").invalid&&r.registerForm.controls.phone.touched),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!r.hidePass),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!r.hidePass),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!r.hidePass),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",r.tertiarygroups.length>1),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(32,29,"auth.registration.accept-terms.read-terms")," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",r.legalDocument),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!r.legalDocument),e.\u0275\u0275advance(1),e.\u0275\u0275property("matTooltip",e.\u0275\u0275pipeBind1(36,31,r.getTooltip()))("matTooltipDisabled",r.registerForm.valid),e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",r.registerForm.invali
1d||r.loading),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(39,33,"auth.registration.button")," "),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(43,35,"auth.registration.back-to-login")))},directives:[P.u,o._Y,o.JL,o.sg,C.KE,C.hX,L.Nt,o.Fj,o.JJ,o.u,o.Q7,o.c5,l.O5,C.TO,l.mk,D.C,O.I,k.Y,x.oG,x.e_,j.gM,N.J],pipes:[I.X$],styles:[""]}),n})(),data:{meta:{title:"auth.registration.meta.title",override:!0}}}]);var ee=a(3277),te=a(1256),re=a(6001);let ne=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[[l.ez,I.aw,f.E,q,re.m,te.q,ee.s,v.U]]}),n})()},2102:(T,d,a)=>{a.d(d,{L:()=>y});var l=a(4650),f=a(6895),v=a(9116),c=a(1739);function o(e,p){if(1&e&&(l.\u0275\u0275elementStart(0,"a",1),l.\u0275\u0275text(1),l.\u0275\u0275pipe(2,"translate"),l.\u0275\u0275elementEnd()),2&e){const m=p.$implicit;l.\u0275\u0275property("routerLink",m.route),l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind1(2,2,m.label))}}let y=(()=>{class e{constructor(){this.class=!0}ngOnInit(){}}return e.\u0275fac=function(m){return new(m||e)},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["app-breadcrumb"]],hostVars:2,hostBindings:function(m,u){2&m&&l.\u0275\u0275classProp("breadcrumbs",u.class)},inputs:{breadcrumbList:"breadcrumbList"},decls:1,vars:1,consts:[["class","breadcrumb",3,"routerLink",4,"ngFor","ngForOf"],[1,"breadcrumb",3,"routerLink"]],template:function(m,u){1&m&&l.\u0275\u0275template(0,o,3,4,"a",0),2&m&&l.\u0275\u0275property("ngForOf",u.breadcrumbList)},directives:[f.sg,v.yS],pipes:[c.X$],styles:[""]}),e})()}}]);
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.