PageSourceSearch

https://chess-enigma-app.web.app/chunk-CPC5DCPF.js

js chess-enigma-app.web.app collected 2026-10-03 12:20:59 UTC 12,803 bytes, 3 lines download raw bytes

1import{a as ne}from"./chunk-5AJMMMCR.js";import{a as re}from"./chunk-SUJNDEWL.js";import{a as oe}from"./chunk-LR2X2PXY.js";import{d as ie}from"./chunk-UGYLZX3C.js";import"./chunk-7CQFGAAH.js";import"./chunk-XF3IBSZZ.js";import{a as te}from"./chunk-3JUORT54.js";import{a as Z}from"./chunk-CXFGPPIY.js";import{b as X,c as Y}from"./chunk-3QXL4HOC.js";import"./chunk-F45QDOS3.js";import"./chunk-JRZPIXE7.js";import"./chunk-KBACV6BQ.js";import"./chunk-YGNLY3E7.js";import{a as ee}from"./chunk-ZRS3HHTF.js";import"./chunk-XIWGCBY5.js";import"./chunk-V7Q5PJVD.js";import"./chunk-GME4YNVY.js";import"./chunk-Q5YRW222.js";import"./chunk-A5WLW2G4.js";import"./chunk-R44JDMJH.js";import"./chunk-PUOSSHJC.js";import{a as K}from"./chunk-PK5PD4UC.js";import"./chunk-OBXOIUL2.js";import"./chunk-VSM6V6ZC.js";import"./chunk-UGEWXZEJ.js";import"./chunk-VOLWE5DR.js";import"./chunk-KFNULHLS.js";import"./chunk-XBVAR2YW.js";import{a as J}from"./chunk-HAL2GSEO.js";import{a as H}from"./chunk-BTE4ZAUF.js";import"./chunk-Y4PVHYT7.js";import"./chunk-SDIFHJKO.js";import"./chunk-A4YL573F.js";import"./chunk-HZVWDVS2.js";import"./chunk-M7TYEF7H.js";import"./chunk-2WK4TXPQ.js";import"./chunk-DR76WQJQ.js";import"./chunk-FNJW4ZTD.js";import"./chunk-SPI3GMXG.js";import{h as V,i as O}from"./chunk-6BYSG5EZ.js";import"./chunk-UGIFNT3X.js";import"./chunk-4DHQWB75.js";import"./chunk-R7ADOXKV.js";import{a as N}from"./chunk-ALBVXH6G.js";import"./chunk-EOJJDWTI.js";import"./chunk-DPAD4UIL.js";import"./chunk-GMYZCGXV.js";import"./chunk-WKWY7JHI.js";import"./chunk-GAFVUD4K.js";import{k as j,l as Q}from"./chunk-2KXKJSUE.js";import"./chunk-LC6KWAXX.js";import"./chunk-ZDJJSUDB.js";import"./chunk-53NTHUG6.js";import"./chunk-RNVU3LRT.js";import"./chunk-C4QNY2AB.js";import"./chunk-MZIRWHHJ.js";import"./chunk-EQROQCMY.js";import"./chunk-TMX2E5KG.js";import"./chunk-EO7VI4QD.js";import"./chunk-I4HNPVCL.js";import"./chunk-G2E2DNTZ.js";import"./chunk-4PYZEU7N.js";import"./chunk-JBJSGCYH.js";import"./chunk-CR7BHW3F.js";import"./chunk-I5HEW3IT.js";import"./chunk-XF5YVPYW.js";import"./chunk-CFQEG5TK.js";import"./chunk-YJJVETWH.js";import"./chunk-BNYYUCHE.js";import{E as z,d as h,g as R,t as $}from"./chunk-GVDE5OFA.js";import{b as L}from"./chunk-V3IAXK5A.js";import"./chunk-67HD4ZJV.js";import"./chunk-TB3DALIN.js";import"./chunk-PU3PPWPM.js";import{mc as q}from"./chunk-BU5XIOZD.js";import"./chunk-MNI4OXUN.js";import{c as P,f as k}from"./chunk-2NHBOERL.js";import"./chunk-SLCQ2VJK.js";import"./chunk-AVLXS3R5.js";import{a as G}from"./chunk-3R2OZJRH.js";import"./chunk-2I4F4LE4.js";import{f as W}from"./chunk-OGD4AQBU.js";import"./chunk-KRTPX3ZP.js";import"./chunk-SILQNNZP.js";import"./chunk-IQGMUASG.js";import"./chunk-RI6NV5IB.js";import"./chunk-TNS4L7RB.js";import"./chunk-YYMR3JOT.js";import"./chunk-SAMSZ2TJ.js";import"./chunk-VOSR76PC.js";import{Dc as g,Fc as c,Ka as I,Kb as T,Pb as A,Qa as U,Uc as a,Vc as S,Wc as v,hd as B,ic as d,id as D,jc as u,mc as F,nc as y,oc as l,pc as r,pd as M,qc as n,qd as w,rc as f,sa as x,tb as i,ya as b,yc as C,za as _}from"./chunk-X6INATCZ.js";import"./chunk-U3SD5ENI.js";var se=o=>({enabled:o,objectName:"al usuario",toastMessage:"Usuario eliminado"}),ce=()=>["name"],ae=(o,s)=>s.id;function me(o,s){o&1&&f(0,"bop-preloader",1),o&2&&l("position","absolute")}function pe(o,s){if(o&1){let e=C();r(0,"div",10)(1,"div",11)(2,"span",12),a(3),n(),r(4,"div",13),f(5,"mat-progress-bar",14),r(6,"span",15),a(7),n()()(),r(8,"button",16),g("click",function(){let t=b(e).$implicit,p=c(2);return _(p.resetCourseProgress(t))}),f(9,"bop-icon",17),n()()}if(o&2){let e=s.$implicit,m=c(2);i(3),S(e.name),i(2),l("color","accent")("mode","determinate")("value",e.completedPercentage),i(2),v("",e.completedPercentage,"%"),i(),l("disabled",e.completedPercentage==="0.00"),i(),l("path",m.restartIcon)}}function de(o,s){if(o&1&&(r(0,"bop-dialog-section")(1,"h3"),a(2,"Cursos"),n(),F(3,pe,10,7,"div",10,ae),n()),o&2){let e=c();i(3),y(e.selectedModel.userCoursesProgress)}}function ue(o,s){if(o&1&&(r(0,"mat-chip"),a(1),n()),o&2){let e=s.$implicit;i(),S(e.tag)}}function fe(o,s){if(o&1&&(r(0,"div",18)(1,"p",19),a(2,"Tags ActiveCampaign"),n(),r(3,"p",20)(4,"mat-chip-set",24),F(5,ue,2,1,"mat-chip",null,ae),n()()()),o&2){let e=c(2);i(5),y(e.selectedModel.activeCampaignTags)}}function ge(o,s){if(o&1){let e=C();r(0,"span",25),a(1,"ACTIVO"),n(),r(2,"button",26),g("click",function(){b(e);let t=c(2);return _(t.changeUserStatus())}),a(3," Bloquear usuario "),n()}if(o&2){let e=c(2);i(2),l("disabled",e.changingStatus())}}function be(o,s){if(o&1){let e=C();r(0,"span",27),a(1,"BLOQUEADO"),n(),r(2,"button",28),g("click",function(){b(e);let t=c(2);return _(t.changeUserStatus())}),a(3," Activar usuario "),n()}if(o&2){let e=c(2);i(2),l("disabled",e.changingStatus())}}function _e(o,s){if(o&1){let e=C();r(0,"button",29),g("click",function(){b(e);let t=c(2);return _(t.impersonateUser())}),a(1," Impersonar usuario "),n()}}function Ce(o,s){if(o&1&&(r(0,"bop-dialog-section")(1,"h3"),a(2,"Informaci\xF3n adicional"),n(),r(3,"div",18)(4,"p",19),a(5,"ID Wordpress"),n(),r(6,"p",20),a(7),M(8,"bopAlt"),n()(),r(9,"div",18)(10,"p",19),a(11,"ID ActiveCampaign"),n(),r(12,"p",20),a(13),M(14,"bopAlt"),n()(),d(15,fe,7,0,"div",18),r(16,"div",21),d(17,ge,4,1)(18,be,4,1),n(),d(19,_e,2,0,"button",22),n(),f(20,"bop-model-info",23)),o&2){let e=c();i(7),v(" ",w(8,7,e.selectedModel.corcelUserId)," "),i(6),v(" ",w(14,9,e.selectedModel.acContactId)," "),i(2),u(e.selectedModel.activeCampaignTags.length?15:-1),i(2),u(e.selectedModel.isActive?17:18),i(2),u(e.selectedModel?19:-1),i(),l("appearance","dialog-section")("model",e.selectedModel)}}var je=(()=>{class o extends ee{constructor(){super(...arguments),this.globalArraysService=x(re),this.authService=x(O),this.laboratoryAccessService=x(V),this.changingStatus=I(!1),this.apiRoute="users",this.modelClass=N,this.myForm=this.fb.group({profileImage:this.fb.control(null),name:this.fb.control(null),socialNickname:this.fb.control(null),email:this.fb.nonNullable.control("",[j.email,h.required],J("users/check-email")),roleId:this.fb.nonNullable.control("",h.required),password:this.fb.nonNullable.control("",[h.minLength(6),h.maxLength(30)]),isFirstLogin:this.fb.nonNullable.control(!0),observations:this.fb.control(null)}),this.restartIcon=q}changeUserStatus(){this.changingStatus.set(!0);let e=this.selectedModel.isActive?"deactivate":"activate";this.httpClient.patch(`users/${this.modelId}/${e}`,null).subscribe(()=>{this.selectedModel.isActive=!this.selectedModel.isActive,this.postSubmitEmitter.emit(!0),this.changingStatus.set(!1)})}resetCourseProgress(e){if(!confirm(`\xBFReiniciar el progreso de "${e.name}"?
2
3Esta acci\xF3n no se puede deshacer.`))return;let t=`users/${this.selectedModel.id}/courses/${e.id}/reset`;this.httpClient.post(t,{}).subscribe({next:p=>{let E=this.selectedModel.userCoursesProgress.find(le=>le.id===e.id);E&&(E.completedPercentage="0.00")},error:p=>{console.error("Error resetting course progress:",p),alert("Error al reiniciar el progreso.")}})}impersonateUser(){let e=this.myForm.controls.email.value;e&&this.authService.impersonate(e).subscribe(()=>{this.laboratoryAccessService.invalidate(),this.formChanged.set(!1),this.router.navigate(["/panel/academy/products"]),this.closeDialog()})}static{this.\u0275fac=(()=>{let e;return function(t){return(e||(e=U(o)))(t||o)}})()}static{this.\u0275cmp=T({type:o,selectors:[["admin-app-user-form"]],features:[A],decls:17,vars:67,c
3onsts:[[3,"afterDelete","afterSubmit","closeDialogContainer","apiRoute","bopFormGroup","centeredTitle","defaultErrorMessage","deleteConfiguration","disabledClauses","method","redirectAfterSubmit","saveButtonText","title","toastMessage"],[3,"position"],[1,"flex-60","flex-lt-sm-100","flex-row-wrap","flex-space-between-center","gap-4"],[1,"flex-50","flex-lt-sm-100",3,"autocomplete","bopFormControl","id","label","maxLength","passwordManagersIgnored","placeholder"],[1,"flex-50","flex-lt-sm-100",3,"autocomplete","bopFormControl","id","label","maxLength","minLength","passwordManagersIgnored","placeholder","type"],[1,"flex-50","flex-lt-sm-100",3,"autocomplete","bopFormControl","id","label","maxLength","placeholder"],[1,"flex-50","flex-lt-sm-100",3,"formControl","id","label","optionLabelFormats","placeholder","route"],[3,"bopFormControl","id","label","placeholder","subscriptSizing","textAreaMinRows","type"],[1,"flex-40","flex-lt-sm-100","flex-row-wrap","flex-start-start","gap-4"],[3,"aspectRatio","bopFormControl","category","displayMode","inputText","maxFileSize","placeholderImageUrl","previewWidth","title"],[1,"course-item","flex-100","flex-row-wrap","flex-start-end","gap-4"],[1,"course-info"],[1,"course-name"],[1,"progress-container"],[1,"progress-bar",3,"color","mode","value"],[1,"progress-text"],["mat-icon-button","","matTooltip","Reiniciar progreso",1,"btn-reset",3,"click","disabled"],[3,"path"],[1,"info-container","flex-50","flex-lt-sm-100"],[1,"info-header"],[1,"info-content"],[1,"flex-100","flex-row","flex-space-between-center","mb-2"],["color","primary","matButton","","type","button",1,"with-border"],[3,"appearance","model"],["aria-label","Tags ActiveCampaign"],[1,"green"],["color","warn","mat-button","","type","button",3,"click","disabled"],[1,"red"],["color","primary","mat-button","","type","button",3,"click","disabled"],["color","primary","matButton","","type","button",1,"with-border",3,"click"]],template:function(m,t){m&1&&(r(0,"bop-form",0),g("afterDelete",function(){return t.onPostDelete()})("afterSubmit",function(){return t.onPostSubmit()})("closeDialogContainer",function(){return t.closeDialog()}),d(1,me,1,1,"bop-preloader",1),r(2,"div",2)(3,"bop-dialog-section")(4,"h3"),a(5,"Informaci\xF3n general"),n(),f(6,"bop-form-item",3)(7,"bop-form-item",4)(8,"bop-form-item",5)(9,"bop-form-item",5)(10,"bop-selector",6)(11,"bop-form-item",7),n(),d(12,de,5,0,"bop-dialog-section"),n(),r(13,"div",8)(14,"bop-dialog-section"),f(15,"bop-file-uploader",9),n(),d(16,Ce,21,11),n()()),m&2&&(l("apiRoute",t.apiRoute)("bopFormGroup",t.myForm)("centeredTitle",!0)("defaultErrorMessage",(t.selectedModel?"Error al editar":"Error al crear")+" el usuario, int\xE9ntalo de nuevo")("deleteConfiguration",D(64,se,t.canDelete))("disabledClauses",!t.formChanged())("method",t.method)("redirectAfterSubmit",t.redirectAfterSubmit)("saveButtonText",t.selectedModel?"Guardar cambios":"Crear usuario")("title",t.selectedModel?"Usuario: "+t.myForm.controls.email.value:"Nuevo usuario")("toastMessage",t.selectedModel?"Usuario editado con \xE9xito":"Usuario creado con \xE9xito"),i(),u(t.loaded()?-1:1),i(5),l("autocomplete","off")("bopFormControl",t.myForm.controls.email)("id","email")("label","Email")("maxLength",200)("passwordManagersIgnored",!0)("placeholder","Introduce su email"),i(),l("autocomplete","off")("bopFormControl",t.myForm.controls.password)("id","password")("label","Nueva contrase\xF1a")("maxLength",30)("minLength",6)("passwordManagersIgnored",!0)("placeholder","Introduce una nueva contrase\xF1a")("type","password"),i(),l("autocomplete","off")("bopFormControl",t.myForm.controls.name)("id","name")("label","Nombre")("maxLength",80)("placeholder","Introduce su nombre"),i(),l("autocomplete","off")("bopFormControl",t.myForm.controls.socialNickname)("id","social-nickname")("label","Nickname")("maxLength",80)("placeholder","Introduce tu nick"),i(),l("formControl",t.myForm.controls.roleId)("id","roleId")("label","Rol de usuario")("optionLabelFormats",B(66,ce))("placeholder","Selecciona un rol")("route","roles"),i(),l("bopFormControl",t.myForm.controls.observations)("id","observations")("label","Observaciones")("placeholder","Introduce sus observaciones")("subscriptSizing","dynamic")("textAreaMinRows",2)("type","textarea"),i(),u(t.selectedModel?12:-1),i(3),l("aspectRatio",1)("bopFormControl",t.myForm.controls.profileImage)("category","profile_image")("displayMode","circle")("inputText","Elegir imagen")("maxFileSize",3e6)("placeholderImageUrl","app/shared/assets/images/avatar-placeholder.png")("previewWidth","120px")("title","Foto de perfil"),i(),u(t.selectedModel?16:-1))},dependencies:[z,R,$,k,H,L,Q,ie,oe,te,Y,X,K,Z,G,P,W,ne],styles:[".course-item[_ngcontent-%COMP%]{padding:8px;border-bottom:1px solid #e0e0e0}.course-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.course-info[_ngcontent-%COMP%]{display:flex;flex:1;flex-direction:column;gap:4px}
3.course-name[_ngcontent-%COMP%]{font-weight:500;color:#000000de}.progress-container[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.progress-bar[_ngcontent-%COMP%]{flex:1}.progress-text[_ngcontent-%COMP%]{min-width:50px;font-weight:500;color:#000000de;text-align:right}.btn-reset[_ngcontent-%COMP%]{color:#f44336}.btn-reset[_ngcontent-%COMP%]:disabled{cursor:not-allowed;color:#00000042}"],changeDetection:0})}}return o})();export{je as UserFormComponent};

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.