Files
kapp/1654.aca41631de96f13a.js
T
2026-05-21 11:19:10 -03:00

1 line
8.2 KiB
JavaScript

(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1654],{11654:(H,m,n)=>{n.r(m),n.d(m,{IdentityInsertPasswordPageModule:()=>_});var f=n(90944),i=n(24006),I=n(61380),d=n(90603),P=n(69270),y=n(15861),e=n(45449),o=n(47898),S=n(33159),C=n(99826);const b=["pin"],M=function(t){return{"min-height":t,position:"relative"}},O=[{path:"",component:(()=>{class t{constructor(r,s,u,w,x,T,R,k,E,N,j,F,D,A){var g=this;this.formBuilder=r,this.api=s,this.platform=u,this.notificatorService=w,this.activatedRoute=x,this.loadingService=T,this.keyboardService=R,this.deviceInfoService=k,this.navigationService=E,this.lockService=N,this.translateConfigService=j,this.authService=F,this.storageService=D,this.saveFlowStorageResetKeyService=A,this.focusInput=()=>{this.pinInputElement.nativeElement.focus()},this.onPinChange=()=>{this.lockService.isLock("updating-pin-value")||(this.shouldSubmit()?setTimeout(this.onSubmit,250):this.lockService.unlock("updating-pin-value"))},this.shouldSubmit=()=>4===this.pinForm.controls.pin.value.length,this.resetPin=()=>{this.pinForm.controls.pin.setValue("")},this.onSubmit=()=>{const a=this.pinForm.controls.pin.value;if(this.validateInput(a)){let l=null;const h=()=>{l&&l.unsubscribe(),this.resetPin(),this.lockService.unlock("updating-pin-value"),this.navigationService.forward(["/identity-insert-password-confirmation"],{queryParams:{uuid:this.uuid,document:this.document,pin:a,foreign:this.foreign}})};l=this.keyboardService.onHideObservable?.subscribe(h),this.keyboardService.isVisible()?this.keyboardService.hide():h()}else{this.keyboardService.hide(),this.resetPin(),this.lockService.unlock("updating-pin-value");const l=this.translateConfigService.translate("PG_IDENTIFY_INSERT_PASSWORD_TOAST_INVALID_DATA_TITLE"),h=this.translateConfigService.translate("PG_IDENTIFY_INSERT_PASSWORD_TOAST_INVALID_DATA_MESSAGE");this.notificatorService.notify({title:l,message:h,type:"error"})}},this.validateInput=a=>!(!a||"string"!=typeof a||!/^\d+$/.test(a)||4!==a.length),this.goOneStepBack=()=>{this.navigationService.root(["/home"]),this.saveFlowStorageResetKeyService.clearAllDataResetKeyInit()},this.activatedRoute.queryParams.subscribe(function(){var a=(0,y.Z)(function*(c){let l=null;(yield g.storageService.ready())&&(l=yield g.authService.getUUID()),g.uuid=l||(c.uuid?c.uuid:""),g.document=c.document?c.document:"",g.foreign="true"===c.foreign});return function(c){return a.apply(this,arguments)}}())}ngOnInit(){this.pinForm=this.formBuilder.group({pin:[""]})}ionViewDidEnter(){setTimeout(()=>{this.focusInput(),this.platform.is("android")&&this.keyboardService.show()},250)}}return t.\u0275fac=function(r){return new(r||t)(e.\u0275\u0275directiveInject(i.UntypedFormBuilder),e.\u0275\u0275directiveInject(o.sM),e.\u0275\u0275directiveInject(d.Platform),e.\u0275\u0275directiveInject(o.V6),e.\u0275\u0275directiveInject(I.ActivatedRoute),e.\u0275\u0275directiveInject(o.bz),e.\u0275\u0275directiveInject(o.i8),e.\u0275\u0275directiveInject(o.Hc),e.\u0275\u0275directiveInject(o.f5),e.\u0275\u0275directiveInject(o.We),e.\u0275\u0275directiveInject(o.wK),e.\u0275\u0275directiveInject(o.e8),e.\u0275\u0275directiveInject(o.V1),e.\u0275\u0275directiveInject(o.RQ))},t.\u0275cmp=e.\u0275\u0275defineComponent({type:t,selectors:[["app-identity-insert-password"]],viewQuery:function(r,s){if(1&r&&e.\u0275\u0275viewQuery(b,5),2&r){let u;e.\u0275\u0275queryRefresh(u=e.\u0275\u0275loadQuery())&&(s.pinInputElement=u.first)}},decls:21,vars:13,consts:[[1,"ion-no-border",2,"height","0"],[3,"ngStyle"],[1,"ion-margin-vertical"],[1,"flex-auto"],[1,"input-holder"],["for","pin"],[3,"formGroup","ngSubmit"],["id","pin","type","password","formControlName","pin","maxlength","4","pattern","[0-9]*","inputmode","numeric",3,"placeholder","input"],["pin",""],[1,"button-holder"],["type","button",1,"back",3,"click"]],template:function(r,s){1&r&&(e.\u0275\u0275element(0,"ion-header",0),e.\u0275\u0275elementStart(1,"ion-content")(2,"ion-grid",1)(3,"ion-row")(4,"ion-col",2),e.\u0275\u0275element(5,"app-full-logo"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"ion-row",3)(7,"ion-col",2)(8,"form")(9,"div",4)(10,"label",5),e.\u0275\u0275text(11),e.\u0275\u0275pipe(12,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"form",6),e.\u0275\u0275listener("ngSubmit",function(){return s.onSubmit()}),e.\u0275\u0275elementStart(14,"input",7,8),e.\u0275\u0275listener("input",function(){return s.onPinChange()}),e.\u0275\u0275pipe(16,"translate"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(17,"div",9)(18,"button",10),e.\u0275\u0275listener("click",function(){return s.goOneStepBack()}),e.\u0275\u0275text(19),e.\u0275\u0275pipe(20,"translate"),e.\u0275\u0275elementEnd()()()()()()()),2&r&&(e.\u0275\u0275advance(2),e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction1(11,M,s.deviceInfoService.getDeviceHeight()+"px")),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(12,5,"PG_IDENTIFY_INSERT_PASSWORD_TEXT")," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("formGroup",s.pinForm),e.\u0275\u0275advance(1),e.\u0275\u0275property("placeholder",e.\u0275\u0275pipeBind1(16,7,"PG_IDENTIFY_INSERT_PASSWORD_INPUT")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(20,9,"PG_IDENTIFY_INSERT_PASSWORD_BTN_EXIT")," "))},dependencies:[f.NgStyle,d.IonCol,d.IonContent,d.IonGrid,d.IonHeader,d.IonRow,i.\u0275NgNoValidate,i.DefaultValueAccessor,i.NgControlStatus,i.NgControlStatusGroup,i.MaxLengthValidator,i.PatternValidator,i.FormGroupDirective,i.FormControlName,i.NgForm,S.R,C.X$],styles:[".input-holder[_ngcontent-%COMP%]{text-align:center;width:95%}.input-holder[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{height:0;width:0;padding:0;margin:0;border:none}.input-holder[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center}.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;margin-top:36px}.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%]{position:relative;width:70px;height:70px}.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] .bullet[_ngcontent-%COMP%]{position:absolute;top:35px;left:35px;height:0;width:0;background-color:#fff;border-radius:70px;box-shadow:0 0 rgba(0,0,0,0);transition:top .25s ease,left .25s ease,height .25s ease,width .25s ease,box-shadow .25s ease}.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] .bullet.valid[_ngcontent-%COMP%]{top:17px;left:17px;height:35px;width:35px;box-shadow:0 0 8px rgba(0,0,0,.3);transition:top .25s ease,left .25s ease,height .25s ease,width .25s ease,box-shadow .25s ease}.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] input.lonely-input[_ngcontent-%COMP%]{margin-top:0;width:70px;height:70px;border-radius:70px;padding:0;text-align:center;line-height:36px;font-size:1.75em;background-color:#eee;transition:background-color .25s ease;box-shadow:inset 0 0 8px rgba(122,122,122,.1);border:none;color:transparent;caret-color:transparent}.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] input.lonely-input[_ngcontent-%COMP%]:focus{outline:none}.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] input.lonely-input.current[_ngcontent-%COMP%]{animation-name:current-input;animation-duration:1.25s;animation-iteration-count:infinite}@keyframes current-input{0%{background-color:#eee}50%{background-color:#ccc}to{background-color:#eee}}.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] input.lonely-input.valid[_ngcontent-%COMP%]{background-color:#0ec254;transition:background-color .25s ease}.button-holder[_ngcontent-%COMP%]{margin-top:48px;justify-content:center}"]}),t})()}];let _=(()=>{class t{}return t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=e.\u0275\u0275defineNgModule({type:t}),t.\u0275inj=e.\u0275\u0275defineInjector({imports:[P.I,f.CommonModule,i.ReactiveFormsModule,i.FormsModule,d.IonicModule,I.RouterModule.forChild(O)]}),t})()}}]);