PageSourceSearch

https://www.chcarpesa.es/22889.5357078c6b0f4198.js

js chcarpesa.es collected 2026-10-09 17:21:12 UTC 5,332 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[22889],{22889:(k,u,e)=>{e.r(u),e.d(u,{LopdConfigModule:()=>z});var d=e(72200),p=e(49189),c=e(38132),f=e(93795),v=e(19890),g=e(24757),h=e(22152),C=e(10467),a=e(89417),b=e(89128),T=e(69915),S=e(6961),y=e(25615),x=e(70152),G=e(23294),E=e(88141),t=e(73664),s=e(2615),M=e(18594),L=e(83037),V=e(95064),R=e(89902),j=e(89792),F=e(68018);const B=i=>({label:"module.store.returns.config_section",checked:i,labelPlacement:"end",justify:"start",allowed:!0,disabled:!1}),U=i=>({"force-hidden":i});function X(i,r){1&i&&t.nrm(0,"app-skeleton-table")}function $(i,r){1&i&&(t.j41(0,"div",4)(1,"div",8),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&i&&(t.R7$(2),t.JRh(t.bMT(3,1,"module.lopd.custom_text")))}function P(i,r){1&i&&t.nrm(0,"app-clupik-state-bar",7),2&i&&t.Y8G("mainTitle","module.lopd.quill_error")}function I(i,r){if(1&i){const o=t.RV6();t.j41(0,"form",1),t.bIt("ngSubmit",function(){s.eBV(o);const n=t.XpG();return s.Njj(n.onSubmit(n.formGroup))}),t.nrm(1,"app-input",2),t.j41(2,"div",3),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.nVh(5,$,4,3,"div",4),t.j41(6,"div",5),t.nrm(7,"div",6),t.k0s(),t.nVh(8,P,1,1,"app-clupik-state-bar",7),t.k0s()}if(2&i){const o=t.XpG();t.Y8G("formGroup",o.formGroup),t.R7$(),t.Y8G("toggle",t.eq3(8,B,o.formGroup.get("type").value)),t.R7$(2),t.JRh(t.bMT(4,6,"module.lopd.sale_conditions_help")),t.R7$(2),t.vxM(o.formGroup.get("type").value?5:-1),t.R7$(),t.Y8G("ngClass",t.eq3(10,U,!o.formGroup.get("type").value)),t.R7$(2),t.vxM(o.formGroup.hasError("quillError")&&o.formGroup.get("type").value?8:-1)}}const A=[{path:"",component:f.f,children:[{path:"",redirectTo:"legal_notice",pathMatch:"full"},{path:"legal_notice",component:v.b},{path:"privacy_policy",component:g.M},{path:"cookies",component:h.r},{path:"sale_conditions",component:(()=>{class i{apiClubsService;formBuilder;breadCrumbs;appService;translate;globalVars;infoLoaded;legalConfig;formGroup;quillEditor;submitting=!1;successSaving=!1;errorSaving=!1;quillLiteral;_quillEvent;constructor(o,l,n,m,W,Z){this.apiClubsService=o,this.formBuilder=l,this.breadCrumbs=n,this.appService=m,this.translate=W,this.globalVars=Z}ngOnInit(){this.breadCrumbs.setBreadAction({action:o=>this.onSubmit(this.formGroup),tooltip:()=>"",disabled:()=>!1,actionTitle:"global.button.save",cancelTitle:"global.button.cancel",cancel:o=>this.breadCrumbs.goBack()}),this.infoLoaded=!1,this.apiClubsService.getLegalConfigAdmin().subscribe(o=>{this.legalConfig=o.legalConfig,this.buildForm(),this.legalConfig?.saleConditionsPol&&setTimeout(()=>this.createQuill(),200),this.infoLoaded=!0})}createQuill(){var o=this;return(0,C.A)(function*(){o.quillEditor||(o.quillLiteral=yield o.translate.getTranslation("module.lopd.custom_text"),o.quillEditor=o.globalVars.getNewQuillSimple(!1)("#quill-sale-conditions",o.legalConfig?.saleConditionsText),o._quillEvent=o.quillEditor?.on("text-change",(l,n,m)=>{o.formGroup.get("customText").setValue(o.quillEditor?.root?.innerHTML)}))})()}buildForm(){this.formGroup=this.formBuilder.group({type:[!!this.legalConfig?.saleConditionsPol],customText:[this.legalConfig?this.legalConfig.saleConditionsText:null,[a.k0.required]]},{validators:this.formValidator}),this.formGroup.controls.type.valueChanges.pipe((0,x.B)(100),(0,G.F)(),(0,E.M)(o=>{o?this.createQuill():this.formGroup.get("customText").disable()})).subscribe()}formValidator(o){return!o.value.type||null!=o.value.customText&&""!==o.value.customText?null:{quillError:!0}}onSubmit(o){if(this.successSaving=!1,this.errorSaving=!1,o.hasError("quillError")&&o.value.type)return;this.submitting=!0;let l={saleConditionsPol:o.value.type};o.value.type&&(l.saleConditionsText=o.value.customText),this.apiClubsService.setLegalConfig(l).subscribe({next:n=>{this.appService.broadcast("showAlert",{state:"success",mainTitle:"",autoHide:!0}),this.successSaving=!0,this.submitting=!1},error:n=>{this.appService.broadcast("showAlert",{state:"danger",mainTitle:"",autoHide:!0}),this.errorSaving=!0,this.submitting=!1}})}static \u0275fac=function(l){return new(l||i)(t.rXU(b.P),t.rXU(a.ok),t.rXU(M.E),t.rXU(T.d),t.rXU(S.T),t.rXU(y.Y))};static \u0275cmp=t.VBU({type:i,selectors:[["app-sale-conditions"]],standalone:!1,decls:2,vars:2,consts:[[1,"full-width-form",3,"formGroup"],[1,"full-width-form",3,"ngSubmit","formGroup"],["type","toggle","formControlName","type",3,"toggle"],[1,"text","md","gray"],[1,"subsection-header"],["ion-input-scroll-into-view","",1,"clupik-quill",3,"ngClass"],["
1id","quill-sale-conditions"],["state","danger","direction","row",3,"mainTitle"],[1,"clupik-title-h4"]],template:function(l,n){1&l&&(t.nVh(0,X,1,0,"app-skeleton-table"),t.nVh(1,I,9,12,"form",0)),2&l&&(t.vxM(n.infoLoaded?-1:0),t.R7$(),t.vxM(n.infoLoaded?1:-1))},dependencies:[d.YU,a.qT,a.BC,a.cb,a.j4,a.JD,L.K,V.X,R.S,j.a,F.D9],styles:[".subsection-header[_ngcontent-%COMP%]{margin-bottom:12px!important}"]})}return i})()}]}];let D=(()=>{class i{static \u0275fac=function(l){return new(l||i)};static \u0275mod=t.$C({type:i});static \u0275inj=s.G2t({imports:[c.iI.forChild(A),c.iI]})}return i})();var Q=e(10290),J=e(41850),H=e(11487),N=e(32951),O=e(19348),K=e(35375);let z=(()=>{class i{static \u0275fac=function(l){return new(l||i)};static \u0275mod=t.$C({type:i});static \u0275inj=s.G2t({imports:[d.MD,p.G,Q.P,J.Qs,H._,N.S,O.x,K.J,D]})}return i})()}}]);

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.