HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/www/7855.6da21d0c39902a4e.js
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[7855],{56261:(v,M,_)=>{_.d(M,{I:()=>h});var t=_(2978),e=_(22882),D=_(56610),g=_(77897),T=_(37222);function I(u,f){if(1&u&&(t.j41(0,"ion-select-option",7),t.EFF(1),t.k0s()),2&u){const r=f.$implicit;t.Y8G("value",r),t.R7$(1),t.JRh(r)}}function p(u,f){if(1&u&&(t.j41(0,"ion-select-option",7),t.EFF(1),t.k0s()),2&u){const r=f.$implicit,d=t.XpG();t.Y8G("value",d.allMonths.indexOf(r)),t.R7$(1),t.JRh(r)}}function C(u,f){if(1&u&&(t.j41(0,"ion-select-option",7),t.EFF(1),t.k0s()),2&u){const r=f.$implicit;t.Y8G("value",r),t.R7$(1),t.JRh(r)}}let h=(()=>{class u{constructor(r){this.translateService=r,this.defaultDate=[],this.date=new t.bkB,this.days=[],this.allMonths=[],this.months=[],this.years=[],this.currentYear=(new Date).getFullYear(),this.yearRange=100}ngOnInit(){this.setDays(),this.setMonths(),this.setYears()}ngOnChanges(r){if(r.defaultDate&&r.defaultDate.currentValue){let d=this.defaultDate.split(this.defaultDate.includes("-")?"-":"/");this.year=Number(d[0]),this.month=Number(d[1])-1,this.day=Number(d[2])}r.minDate&&r.minDate.currentValue&&(this.yearRange=this.currentYear-this.minDate.getFullYear()),this.setDays(),this.setMonths(),this.setYears()}setDays(r=1){this.days=this.buildNumberArray(r,31)}setMonths(r=0){this.allMonths=Array.from({length:12},(d,c)=>new Date(0,c).toLocaleString(window.navigator.language,{month:"long"})),this.months=this.allMonths.slice(r,12)}setYears(){const r=this.minDate?this.minDate.getFullYear():this.currentYear-this.yearRange,d=this.maxDate?this.maxDate.getFullYear():this.currentYear;this.years=this.buildNumberArray(r,d).reverse()}buildNumberArray(r,d){return[...Array(d-r+1).keys()].map(c=>c+r)}changeDate(){this.day&&null!=this.month&&this.year&&this.date.emit(new Date(this.year+"/"+(this.month+1)+"/"+this.day).toJSON().slice(0,10).replace(/-/g,"/"))}changeYear(){this.minDate&&this.minDate.getFullYear()==this.year&&this.setMonths(this.minDate.getMonth()),this.changeDate()}changeMonth(){this.minDate&&this.minDate.getMonth()==this.month&&this.setDays(this.minDate.getDate()),this.changeDate()}static#e=this.\u0275fac=function(d){return new(d||u)(t.rXU(e.c$))};static#t=this.\u0275cmp=t.VBU({type:u,selectors:[["app-date-picker"]],inputs:{defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate"},outputs:{date:"date"},features:[t.OA$],decls:23,vars:33,consts:[[1,"ion-no-padding","ion-no-margin"],["lines","none",1,"ion-no-padding","ion-no-margin"],["interface","popover","name","year","required","",1,"ion-text-center","placeholder-select",3,"placeholder","okText","cancelText","ngModel","ngModelChange","ionChange"],[3,"value",4,"ngFor","ngForOf"],["interface","popover","name","month","required","",1,"ion-text-center","placeholder-select",3,"placeholder","okText","cancelText","ngModel","ngModelChange","ionChange"],["lines","none",1,"ion-no-padding","ion-no-margin","no-inner-padding"],["interface","popover","name","day","required","",1,"ion-text-center","placeholder-select",3,"placeholder","okText","cancelText","ngModel","ngModelChange","ionChange"],[3,"value"]],template:function(d,c){1&d&&(t.j41(0,"ion-grid",0)(1,"ion-row",0)(2,"ion-col",0)(3,"ion-item",1)(4,"ion-select",2),t.bIt("ngModelChange",function(m){return c.year=m})("ionChange",function(){return c.changeYear()}),t.nI1(5,"translate"),t.nI1(6,"translate"),t.nI1(7,"translate"),t.DNE(8,I,2,2,"ion-select-option",3),t.k0s()()(),t.j41(9,"ion-col",0)(10,"ion-item",1)(11,"ion-select",4),t.bIt("ngModelChange",function(m){return c.month=m})("ionChange",function(){return c.changeMonth()}),t.nI1(12,"translate"),t.nI1(13,"translate"),t.nI1(14,"translate"),t.DNE(15,p,2,2,"ion-select-option",3),t.k0s()()(),t.j41(16,"ion-col",0)(17,"ion-item",5)(18,"ion-select",6),t.bIt("ngModelChange",function(m){return c.day=m})("ionChange",function(){return c.changeDate()}),t.nI1(19,"translate"),t.nI1(20,"translate"),t.nI1(21,"translate"),t.DNE(22,C,2,2,"ion-select-option",3),t.k0s()()()()()),2&d&&(t.R7$(4),t.FS9("placeholder",t.bMT(5,15,"YEAR")),t.FS9("okText",t.bMT(6,17,"TEXT_OK_SELECT")),t.FS9("cancelText",t.bMT(7,19,"TEXT_CANCEL_SELECT")),t.Y8G("ngModel",c.year),t.R7$(4),t.Y8G("ngForOf",c.years),t.R7$(3),t.FS9("placeholder",t.bMT(12,21,"MONTH")),t.FS9("okText",t.bMT(13,23,"TEXT_OK_SELECT")),t.FS9("cancelText",t.bMT(14,25,"TEXT_CANCEL_SELECT")),t.Y8G("ngModel",c.month),t.R7$(4),t.Y8G("ngForOf",c.months),t.R7$(3),t.FS9("placeholder",t.bMT(19,27,"DAY")),t.FS9("okText",t.bMT(20,29,"TEXT_OK_SELECT")),t.FS9("cancelText",t.bMT(21,31,"TEXT_CANCEL_SELECT")),t.Y8G("ngModel",c.day),t.R7$(4),t.Y8G("ngForOf",c.days))},dependencies:[D.Sq,g.hU,g.lO,g.uz,g.ln,g.Nm,g.Ip,g.Je,T.BC,T.YS,T.vS,e.D9],styles:[".placeholder-select[_ngcontent-%COMP%]{border:1px solid #dedede;border-radius:5px;width:-webkit-fill-available;font-size:14px!important;text-align:justify!important;--padding-start: 15px;--placeholder-opacity: .5}.no-inner-padding[_ngcontent-%COMP%]{--inner-padding-end: 0px}"]})}return u})()},47855:(v,M,_)=>{_.d(M,{r:()=>c});var t=_(73308),e=_(2978),D=_(54171),g=_(57291),T=_(22882),I=_(29885),p=_(77897),C=_(56610),h=_(37222),u=_(56261);function f(l,m){if(1&l&&(e.j41(0,"ion-select-option",27),e.EFF(1),e.k0s()),2&l){const i=m.$implicit;e.Y8G("value",i.id),e.R7$(1),e.SpI(" ",i.name," ")}}function r(l,m){if(1&l&&(e.j41(0,"p",28),e.EFF(1),e.k0s()),2&l){const i=e.XpG();e.R7$(1),e.JRh(i.documentInvalid)}}function d(l,m){if(1&l&&(e.j41(0,"ion-select-option",27),e.EFF(1),e.k0s()),2&l){const i=m.$implicit;e.Y8G("value",i.id),e.R7$(1),e.SpI(" ",i.name," ")}}let c=(()=>{class l{constructor(i,o,n,E,s,a){this.utilsService=i,this.storage=o,this.translateService=n,this.userProvider=E,this.alertController=s,this.location=a,this.closeModal=new e.bkB,this.inputPattern="/^[0-9]{3,12}$/",this.documentInvalid=""}ngOnInit(){this.userProvider.getSexType(),this.storage.get("token").then(i=>{this.token=i,this.userProvider._documentType?this.accountUser&&this.accountUser.document_type_id&&this.changeDocumentType(this.accountUser.document_type_id):this.userProvider.getDocumentType(i.access_token,{showIn:"adult"}).then(o=>{this.accountUser&&this.accountUser.document_type_id&&this.changeDocumentType(this.accountUser.document_type_id)})})}updateInfoUser(i){if(this.validateFormData(i)){let o=i.value;o.birthdate=this.accountUser.user_info.dob,this.utilsService.presentLoading(this.translateService.instant("all.loading")),this.token&&(o.birthdate=o.birthdate.slice(0,10),this.userProvider.updateInfoUser(o,this.accountUser.password,this.token.access_token).then(n=>{this.closeModal.emit(),this.utilsService.dismissLoading(),this.presentConfirmationAlert(n.m??this.translateService.instant("PROFILE_UPDATED"))},n=>{this.utilsService.dismissLoading(),console.log("error updateInfoUser: ",n)}))}}clearSpecialChars(i){let o=!1;switch(i.type){case"text":o=/^[0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc ]+$/i.test(i.value),o||(i.value=i.value.replace(/[^0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc ]+/g,"").trim()),"first_name"==i.name&&(document.getElementsByClassName("textImageUserProfile")[0].innerHTML="Hola, "+i.value);break;case"email":o=/^[0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc@.!#$%&'*/=?^_+-`{|}~]+$/i.test(i.value),o&&(i.value=i.value.replace(/[^0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc@.!#$%&'*/=?^_+-`{|}~]+/g,"").trim());break;case"tel":o=/^[0-9]+$/i.test(i.value),o&&(i.value=i.value.replace(/[^0-9]+/g,"").trim())}}avoidSpecialChars(i){let o=!1,n=String.fromCharCode(i.charCode?i.charCode:i.which);switch(i.target.type){case"text":if(o=/^[0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc ]+$/i.test(n),o)return!0;break;case"email":if(o=/^[0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc@.!#$%&'*/=?^_+-`{|}~]+$/i.test(n),o)return!0;break;case"tel":if(o=/^[0-9]+$/i.test(n),o)return!0}return i.preventDefault(),!1}onPaste(i){return i.preventDefault(),!1}validateFormData(i){let o=i.value;return o.first_name&&""!=o.first_name.trim()?o.last_name&&""!=o.last_name.trim()?o.document?""!=this.documentInvalid?(this.showWarning("DOCUMENT_NOT_VALID"),!1):this.accountUser.user_info.dob?o.document_type?!!o.sex||(this.showWarning("SEX_PROFILE_REQUIRED"),!1):(this.showWarning("DOCUMENT_TYPE_PROFILE_REQUIRED"),!1):(this.showWarning("BIRTHDATE_PROFILE_REQUIRED"),!1):(this.showWarning("DOCUMENT_PROFILE_REQUIRED"),!1):(this.showWarning("LAST_NAME_PROFILE_REQUIRED"),!1):(this.showWarning("FIRST_NAME_PROFILE_REQUIRED"),!1)}showWarning(i){this.utilsService.presentToast(3e3,"warning","top",this.translateService.instant(i))}presentConfirmationAlert(i){var o=this;return(0,t.A)(function*(){yield(yield o.alertController.create({header:"Mensaje",message:i,backdropDismiss:!1,buttons:[{text:o.translateService.instant("all.accept"),handler:()=>{o.location.back()}}]})).present()})()}setDate(i){this.accountUser.user_info.dob=i}changeDocumentType(i){let n=this.userProvider._documentType.find(E=>E.id==i).pattern;n&&(this.inputPattern=n,this.validateInput(this.accountUser.document))}validateInput(i){this.documentInvalid="";const o=new RegExp(this.inputPattern.replaceAll("/",""));(!i||!o.test(i))&&(this.documentInvalid=this.translateService.instant("DOCUMENT_NOT_VALID"))}getMaxAdultDate(){const i=(new Date).getFullYear();return new Date(i-18,11,31)}static#e=this.\u0275fac=function(o){return new(o||l)(e.rXU(D.T),e.rXU(g.n),e.rXU(T.c$),e.rXU(I.D),e.rXU(p.hG),e.rXU(C.aZ))};static#t=this.\u0275cmp=e.VBU({type:l,selectors:[["app-edit-profile"]],inputs:{accountUser:"accountUser"},outputs:{closeModal:"closeModal"},decls:58,vars:72,consts:[["lines","none",1,"ion-text-center"],[1,"ion-text-center",2,"width","100%"],[1,"textImageUserProfile"],[3,"ngSubmit"],["formEditInfoUser","ngForm"],["lines","none",1,"inputBorderRadius","ion-margin-top"],["type","text","name","first_name","maxlength","191","required","",1,"ion-text-center",3,"placeholder","ngModel","ngModelChange","change","input","keypress","paste"],["first_name","ngModel"],["type","text","name","last_name","maxlength","191","required","",1,"ion-text-center",3,"placeholder","ngModel","ngModelChange","change","input","keypress","paste"],["last_name","ngModel"],["lines","none",1,"inputBorderRadius","notEdit","ion-margin-top"],["type","email","name","email","readonly","",1,"ion-text-center","readonly",3,"placeholder","ngModel","ngModelChange"],["email","ngModel"],["type","tel","name","phone","maxlength","191",1,"ion-text-center",3,"placeholder","ngModel","ngModelChange","change","input","keypress","paste"],["phone","ngModel"],["interface","popover","name","document_type","required","",1,"ion-text-center",3,"ngModel","okText","cancelText","value","ngModelChange"],["documentType","ngModel"],["class","ion-text-center",3,"value",4,"ngFor","ngForOf"],["lines","none",1,"inputBorderRadius","ion-margin-top",3,"disabled"],["type","text","name","document","required","",1,"ion-text-center",3,"placeholder","ngModel","pattern","ngModelChange"],["document","ngModel"],["class","ion-text-center","style","color: red;",4,"ngIf"],["position","fixed"],[2,"width","100%",3,"defaultDate","maxDate","date"],["interface","popover","name","sex","required","",1,"ion-text-center",3,"ngModel","okText","cancelText","value","ngModelChange"],["sexType","ngModel"],["type","submit","color","primary","shape","round","expand","block","fill","solid",3,"disabled"],[1,"ion-text-center",3,"value"],[1,"ion-text-center",2,"color","red"]],template:function(o,n){if(1&o){const E=e.RV6();e.j41(0,"ion-item",0)(1,"div",1)(2,"h2",2),e.EFF(3),e.k0s()()(),e.j41(4,"form",3,4),e.bIt("ngSubmit",function(){e.eBV(E);const a=e.sdS(5);return e.Njj(n.updateInfoUser(a))}),e.j41(6,"ion-item",5)(7,"ion-input",6,7),e.bIt("ngModelChange",function(a){return n.accountUser.first_name=a})("change",function(a){return n.clearSpecialChars(a.target)})("input",function(a){return n.avoidSpecialChars(a)})("keypress",function(a){return n.avoidSpecialChars(a)})("paste",function(a){return n.onPaste(a)})("ngModelChange",function(a){e.eBV(E);const P=e.sdS(5);return e.Njj(n.utilsService.omitSpecialChar("first_name",P,a))}),e.nI1(9,"translate"),e.nI1(10,"translate"),e.k0s()(),e.j41(11,"ion-item",5)(12,"ion-input",8,9),e.bIt("ngModelChange",function(a){return n.accountUser.last_name=a})("change",function(a){return n.clearSpecialChars(a.target)})("input",function(a){return n.avoidSpecialChars(a)})("keypress",function(a){return n.avoidSpecialChars(a)})("paste",function(a){return n.onPaste(a)})("ngModelChange",function(a){e.eBV(E);const P=e.sdS(5);return e.Njj(n.utilsService.omitSpecialChar("last_name",P,a))}),e.nI1(14,"translate"),e.nI1(15,"translate"),e.k0s()(),e.j41(16,"ion-item",10)(17,"ion-input",11,12),e.bIt("ngModelChange",function(a){return n.accountUser.email=a}),e.nI1(19,"translate"),e.nI1(20,"translate"),e.k0s()(),e.j41(21,"ion-item",5)(22,"ion-input",13,14),e.bIt("ngModelChange",function(a){return n.accountUser.phone=a})("change",function(a){return n.clearSpecialChars(a.target)})("input",function(a){return n.avoidSpecialChars(a)})("keypress",function(a){return n.avoidSpecialChars(a)})("paste",function(a){return n.onPaste(a)}),e.nI1(24,"translate"),e.nI1(25,"translate"),e.k0s()(),e.j41(26,"ion-item",5)(27,"ion-label"),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"ion-select",15,16),e.bIt("ngModelChange",function(a){return n.accountUser.document_type_id=a})("ngModelChange",function(a){return n.changeDocumentType(a)}),e.nI1(32,"translate"),e.nI1(33,"translate"),e.DNE(34,f,2,2,"ion-select-option",17),e.k0s()(),e.j41(35,"ion-item",18)(36,"ion-input",19,20),e.bIt("ngModelChange",function(a){return n.accountUser.document=a})("ngModelChange",function(a){return n.validateInput(a)}),e.nI1(38,"translate"),e.nI1(39,"translate"),e.k0s()(),e.DNE(40,r,2,1,"p",21),e.j41(41,"ion-item",5)(42,"ion-label",22),e.EFF(43),e.nI1(44,"translate"),e.k0s(),e.j41(45,"app-date-picker",23),e.bIt("date",function(a){return n.setDate(a)}),e.k0s()(),e.j41(46,"ion-item",5)(47,"ion-label"),e.EFF(48),e.nI1(49,"translate"),e.k0s(),e.j41(50,"ion-select",24,25),e.bIt("ngModelChange",function(a){return n.accountUser.user_info.sex=a}),e.nI1(52,"translate"),e.nI1(53,"translate"),e.DNE(54,d,2,2,"ion-select-option",17),e.k0s()(),e.j41(55,"ion-button",26),e.EFF(56),e.nI1(57,"translate"),e.k0s()()}2&o&&(e.R7$(3),e.SpI("Hola, ",n.accountUser.first_name,""),e.R7$(4),e.FCK("placeholder","",e.bMT(9,36,"NAME")," ",e.bMT(10,38,"REQUIRED_SYMBOL"),""),e.Y8G("ngModel",n.accountUser.first_name),e.R7$(5),e.FCK("placeholder","",e.bMT(14,40,"LAST_NAME")," ",e.bMT(15,42,"REQUIRED_SYMBOL"),""),e.Y8G("ngModel",n.accountUser.last_name),e.R7$(5),e.FCK("placeholder","",e.bMT(19,44,"EMAIL")," ",e.bMT(20,46,"REQUIRED_SYMBOL"),""),e.Y8G("ngModel",n.accountUser.email),e.R7$(5),e.FCK("placeholder","",e.bMT(24,48,"CELL_PHONE")," (",e.bMT(25,50,"OPTIONAL"),")"),e.Y8G("ngModel",n.accountUser.phone),e.R7$(6),e.JRh(e.bMT(29,52,"document_type")),e.R7$(2),e.FS9("okText",e.bMT(32,54,"TEXT_OK_SELECT")),e.FS9("cancelText",e.bMT(33,56,"TEXT_CANCEL_SELECT")),e.Y8G("ngModel",n.accountUser.document_type_id)("value",n.accountUser.document_type_id),e.R7$(4),e.Y8G("ngForOf",n.userProvider._documentType),e.R7$(1),e.Y8G("disabled",!n.accountUser.document_type_id),e.R7$(1),e.FCK("placeholder","",e.bMT(38,58,"IDENTIFICATION_CARD")," ",e.bMT(39,60,"REQUIRED_SYMBOL"),""),e.Y8G("ngModel",n.accountUser.document)("pattern",n.inputPattern),e.R7$(4),e.Y8G("ngIf",n.documentInvalid),e.R7$(3),e.JRh(e.bMT(44,62,"birth_date")),e.R7$(2),e.Y8G("defaultDate",n.accountUser.user_info.dob)("maxDate",n.getMaxAdultDate()),e.R7$(3),e.JRh(e.bMT(49,64,"sex_type")),e.R7$(2),e.FS9("okText",e.bMT(52,66,"TEXT_OK_SELECT")),e.FS9("cancelText",e.bMT(53,68,"TEXT_CANCEL_SELECT")),e.Y8G("ngModel",n.accountUser.user_info.sex)("value",n.accountUser.user_info.sex),e.R7$(4),e.Y8G("ngForOf",n.userProvider._sexType),e.R7$(1),e.Y8G("disabled",""!==n.documentInvalid),e.R7$(1),e.SpI(" ",e.bMT(57,70,"BUTTON_SAVE_USER_PROFILE")," "))},dependencies:[C.Sq,C.bT,p.Jm,p.$w,p.uz,p.he,p.Nm,p.Ip,p.Je,p.Gw,h.qT,h.BC,h.cb,h.YS,h.tU,h.R_,h.vS,h.cV,u.I,T.D9],styles:['ion-item[_ngcontent-%COMP%]{--background: transparent}ion-col[_ngcontent-%COMP%]{--ion-background-color: transparent !important}ion-label[_ngcontent-%COMP%]:after{content:"*";color:red;font-weight:700}.form-field-label[_ngcontent-%COMP%]{font-size:17px;padding-left:20px}.readonly[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}']})}return l})()}}]);