1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1762],{71762:(nt,m,o)=>{o.r(m),o.d(m,{CompetitionScraperACBModule:()=>w});var f=o(11890),g=o(49189),t=o(73664),r=o(2615),S=o(27468),b=o(60152),_=o(25615),x=o(26742),B=o(89128),A=o(82e3),j=o(69915),$=o(36229),M=o(18594),T=o(72200),F=o(88834),R=o(23768),y=o(82765),I=o(81074),V=o(33746),p=o(23620),d=o(25596),u=o(89417),L=o(53986),k=o(82966),X=o(49255),G=o(68018);const N=(e,l,n)=>({topbar:e,bread:l,topbread:n}),h=()=>({standalone:!0});function E(e,l){1&e&&(t.nrm(0,"app-alerts",1),t.nI1(1,"translate")),2&e&&t.Y8G("mensaje",t.bMT(1,1,"module.competition.no_data_to_show"))}function U(e,l){1&e&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e&&(t.R7$(),t.JRh(t.bMT(2,1,"global.button.save_changes")))}function Y(e,l){1&e&&(t.j41(0,"div",7)(1,"span",11),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&e&&(t.R7$(2),t.SpI("",t.bMT(3,1,"global.button.saving"),"..."))}function J(e,l){if(1&e){const n=t.RV6();t.j41(0,"button",17),t.bIt("click",function(){r.eBV(n);const i=t.XpG().$index,s=t.XpG(2);return s.clubSearch[i]=null,r.Njj(s.onSelectClub({},i))}),t.j41(1,"mat-icon"),t.nrm(2,"i",18),t.k0s()()}}function O(e,l){1&e&&(t.j41(0,"div"),t.nrm(1,"app-skeleton-block"),t.k0s())}function z(e,l){if(1&e){const n=t.RV6();t.j41(0,"mat-card",20),t.bIt("click",function(){const i=r.eBV(n).$implicit,s=t.XpG(2).$index,c=t.XpG(2);return r.Njj(c.onSelectClub(i,s))}),t.j41(1,"mat-card-header")(2,"div",21),t.nrm(3,"img",22),t.k0s(),t.j41(4,"mat-card-title",23),t.EFF(5),t.k0s()()()}if(2&e){const n=l.$implicit,a=t.XpG(4);t.Y8G("id",n.id),t.R7$(3),t.Y8G("src",a.imagesService.getCustomClubImage(n.id),t.B4B),t.R7$(2),t.JRh(a.clubsService.getClubPublicName(n))}}function D(e,l){if(1&e&&(t.j41(0,"div"),t.Z7z(1,z,6,3,"mat-card",19,t.fX1),t.k0s()),2&e){const n=t.XpG(3);t.R7$(),t.Dyx(n.clubs)}}function Z(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",10)(1,"div",12),t.EFF(2),t.k0s(),t.j41(3,"mat-form-field")(4,"input",13),t.nI1(5,"translate"),t.bIt("ngModelChange",function(i){const s=r.eBV(n).$implicit;
1return r.Njj(s.clubAssociate=i)})("keyup",function(i){const s=r.eBV(n).$index,c=t.XpG(2);return r.Njj(c.onKeySearch(i,s))}),t.k0s(),t.nVh(6,J,3,0,"button",14),t.j41(7,"mat-error",15),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.nVh(10,O,2,0,"div"),t.nVh(11,D,3,0,"div"),t.k0s(),t.j41(12,"mat-checkbox",16),t.bIt("ngModelChange",function(i){const s=r.eBV(n).$implicit;return r.Njj(s.createNew=i)})("change",function(){const i=r.eBV(n).$index,s=t.XpG(2);return s.clubSearch[i]=null,r.Njj(s.onSelectClub({},i))}),t.k0s()()}if(2&e){const n=l.$implicit,a=l.$index,i=t.XpG(2);t.R7$(2),t.JRh(n.name),t.R7$(2),t.Y8G("value",t.mNQ(i.clubSearch[a]))("placeholder",t.bMT(5,14,"global.placeholder.club"))("ngModelOptions",t.lJ4(18,h))("disabled",n.createNew)("ngModel",n.clubAssociate),t.R7$(2),t.vxM(null!=i.clubSearch[a]?6:-1),t.R7$(2),t.Lme("",(null==i.clubsSearched?null:i.clubsSearched.length)||0," ",t.bMT(9,16,"module.competition.scraper_search_result")),t.R7$(2),t.vxM(i.clubsLoaded?-1:10),t.R7$(),t.vxM(i.clubsLoaded&&a==i.clubEdit?11:-1),t.R7$(),t.Y8G("ngModelOptions",t.lJ4(19,h))("ngModel",n.createNew)}}function P(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",2)(1,"div",3)(2,"h1",4),t.EFF(3,"Scraper ACB"),t.k0s()(),t.j41(4,"div",5)(5,"button",6),t.bIt("click",function(){r.eBV(n);const i=t.XpG();return r.Njj(i.submit())}),t.nVh(6,U,3,3,"span"),t.nVh(7,Y,4,3,"div",7),t.k0s(),t.j41(8,"div",8)(9,"div",9)(10,"span"),t.EFF(11,"Nombre de club ACB"),t.k0s(),t.j41(12,"span"),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"span"),t.EFF(16),t.nI1(17,"translate"),t.k0s()(),t.Z7z(18,Z,13,20,"div",10,t.fX1),t.k0s()()()}if(2&e){const n=t.XpG();t.R7$(5),t.Y8G("disabled",n.isSubmiting||0==n.clubsScraper.length),t.R7$(),t.vxM(n.isSubmiting?-1:6),t.R7$(),t.vxM(n.isSubmiting?7:-1),t.R7$(6),t.JRh(t.bMT(14,5,"global.common.clubClupik")),t.R7$(3),t.JRh(t.bMT(17,7,"global.common.create_club")),t.R7$(2),t.Dyx(n.scraper)}}function K(e,l){1&e&&t.nrm(0,"app-skeleton-block")}let Q=(()=>{class e{globalVars;clubService;successDialog;appService;imagesService;apiClubsService;clubsService;breadCrumbs;apiCompetitionService;title;scraper;isLoaded=!1;allClubs;clubs;clubSearch;clubEdit="-1";clubsScraper;clubsLoaded;isSubmiting=!1;successAlert=!1;errorAlert=!1;constructor(n,a,i,s,c,q,tt,et,it){this.globalVars=n,this.clubService=a,this.successDialog=i,this.appService=s,this.imagesService=c,this.apiClubsService=q,this.clubsService=tt,this.breadCrumbs=et,this.apiCompetitionService=it,this.breadCrumbs.pushBread("/"+this.clubService.getLanguageInUseCode()+"/admin/clupik","Clupik")}ngOnInit(){this.clubsScraper=[],this.isLoaded=!1,this.title="global.navigation.competition_scraper_acb",this.globalVars.navbarTop.image=null,this.globalVars.navbarTop.bgClass="bg-primary",this.globalVars.navbarTop.backLink=!0,this.globalVars.navbarTop.customLink=null,this.globalVars.navbarTop.rightIcon=null,this.globalVars.navbarTop.rightLink=null,(0,S.p)([this.apiCompetitionService.getACBScraper(),this.apiClubsService.getAllClubs()]).subscribe(n=>{this.scraper=n[0],this.allClubs=n[1],this.clubSearch=new Array(this.scraper.length),this.isLoaded=!0,this.clubsLoaded=!0}),setTimeout(()=>{this.globalVars.navbarTop.title=this.title})}onSelectClub(n,a){if(n.name||this.scraper[a].createNew){n.name&&(this.clubSearch[a]=this.clubsService.getClubPublicName(n));let i={id:n.id,acbId:this.scraper[a].acbId};if(this.scraper[a].createNew&&delete i.id,null!=this.clubsScraper){let s=this.clubsScraper.findIndex(c=>c.acbId==this.scraper[a].acbId);s>-1?this.clubsScraper[s]=i:this.clubsScraper.push(i)}else this.clubsScraper.push(i)}else if(null!=this.clubsScraper){let i=this.clubsScraper.findIndex(s=>s.acbId==this.scraper[a].acbId);i>-1&&this.clubsScraper.splice(i,1)}this.clubs=[]}onKeySearch(n,a){this.clubEdit=a;const i=n.target.value;this.clubsLoaded=!1,this.clubs=i.length>2?Object.assign([],this.allClubs).filter(s=>s.name.toLowerCase().indexOf(i.toLowerCase())>-1):[],this.clubsLoaded=!0}submit(){this.isSubmiting=!0,this.apiCompetitionService.vinculateACBScraper(this.clubsScraper).subscribe(()=>{this.successAlert=!0,this.errorAlert=!1,this.isSubmiting=!1,this.ngOnInit(),this.appService.broadcast("showAlert",{state:"success",mainTitle:"",autoHide:!0})},()=>{this.isSubmiting=!1,this.successAlert=!1,this.errorAlert=!0,this.appService.broadcast("showAlert",{state:"danger",mainTitle:"",autoHide:!0})})}static \u0275fac=function(a){return new(a||e)(t.rXU(_.Y),t.rXU(b.X),t.rXU($.h),t.rXU(j.d),t.rXU(x.M),t.rXU(B.P),t.rXU(b.X),t.rXU(M.E),t.rXU(A.Y))};static \u0275cmp=t.VBU({type:e,selectors:[["app-competition-scraper-acb"]],standalone:!1,decls:4,vars:8,consts:[[1,"admin-dashboard","white",3,"ngClass"],["type","info",3,"mensaje"],[1,"dashboard"],[1,"section-header"],[1,"title"],[1,"content"],["mat-raised-button","",1,"middle-btn","btn-sm","btn-primary",3,"click","disabled"],[1,"spinner-xxs"],[1,"table-form"],[1,"table-form-row","heading"],[1,"table-form-row"],[1,"message"],[1,"nameClupik"],["id","clubName","matInput","","type","text",3,"ngModelChange","keyup","placeholder","ngModelOptions","disabled","ngModel","value"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear"],["align","end"],["type","checkbox",3,"ngModelChange","change","ngModelOptions","ngModel"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"fa-light","fa-times"],["fxLayout","row","fxLayoutAlign","start center","fxLayoutWrap","wrap",1,"list-stadium",3,"id"],["fxLayout","row","fxLayoutAlign","start center","fxLayoutWrap","wrap",1,"list-stadium",3,"click","id"],["mat-card-avatar",""],["appLazyLoadImage","","type","club",3,"src"],[1,"name"]],template:function(a,i){1&a&&(t.j41(0,"div",0),t.nVh(1,E,2,3,"app-alerts",1),t.nVh(2,P,20,9,"div",2),t.nVh(3,K,1,0,"app-skeleton-block"),t.k0s()),2&a&&(t.Y8G("ngClass",t.sMw(4,N,i.clubService.isTopBar()&&!i.breadCrumbs.hasBreadcrumbs(),i.breadCrumbs.hasBreadcrumbs()&&i.clubService.onlyBread(),i.breadCrumbs.hasBreadcrumbs()&&i.clubService.isTopBar())),t.R7$(),t.vxM(i.isLoaded&&0==i.scraper.length?1:-1),t.R7$(),t.vxM(i.isLoaded&&i.scraper.length>0?2:-1),t.R7$(),t.vxM(i.isLoaded?-1:3))},dependencies:[T.YU,F.$z,R.M,y.So,I.An,V.fg,p.j,p.b,p.g,d.RN,d.QG,d.MM,d.dh,u.me,u.BC,u.vS,L.J,k.K,X.Z,G.D9],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column}"]})}return e})(),W=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=t.$C({type:e});
1static \u0275inj=r.G2t({imports:[g.G,f.g]})}return e})();var C=o(38132);const H=[{path:"",component:Q}];let v=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=t.$C({type:e});static \u0275inj=r.G2t({imports:[C.iI.forChild(H),C.iI]})}return e})(),w=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=t.$C({type:e});static \u0275inj=r.G2t({imports:[W,v,v]})}return 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.