PageSourceSearch

https://cantera.haris.es/18.aa1fa3c90cb1278f.js

js haris.es collected 2026-10-03 00:13:47 UTC 11,683 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[18],{18:(I,u,s)=>{s.d(u,{G:()=>b});var r=s(33142),d=s(49189),p=s(50630),h=s(23574),v=s(35745),g=s(73664),f=s(2615);s(240);let b=(()=>{class c{static \u0275fac=function(E){return new(E||c)};static \u0275mod=g.$C({type:c});static \u0275inj=f.G2t({imports:[d.G,h.X,r.v,p.j,v.C]})}return c})()},240:(I,u,s)=>{s.d(u,{o:()=>W});var r=s(10467),d=s(60152),p=s(6961),h=s(51589),v=s(45276),g=s(68010),f=s(70843),O=s(69915),b=s(25615),c=s(13961),D=s(71985),S=s(27468),E=s(67201),T=s(14934),P=s(3356),G=s(61048),R=s(7044),t=s(73664),C=s(36229),y=s(91029),U=s(74173),A=s(85340),L=s(68018);let W=(()=>{class _{apiOrganizationsService;addDialog;apiGamesService;clubsService;translationService;teamService;Dialog;competitionsService;appService;globalVars;router;authService;hasDateRange=!1;descriptionWeek;games;allGames;currentFilter="all";stats;canAddGame;subscription=new c.yU;gamesTable;type;id;object;sections;season;gamesSubscription=new c.yU;tableSettings={class:"competition-max-height-table",paginator:{size:7,paginatorType:"vertical"},serverFiltered:!1,showTotalResults:!1,title:"games",noDataMessage:"no_game_competition",columns:{actions:{stickedFront:!0,hideSticky:!0,noExport:!0,title:"",type:"custom",renderComponent:R.H,actionsData:{actions:[{icon:"fa-light fa-link",text:"module.competition.show_game",condition:e=>!0,disabled:e=>!1,event:(e,a)=>this.router.navigate([`/games/${a.id}`])},{icon:"fa-light fa-edit",text:"module.competition.edit_game",condition:e=>this.checkUserPermission(e),disabled:e=>!1,event:(e,a)=>this.onEditGame(a)},{icon:"fa-light fa-trash",text:"module.competition.remove_game",condition:e=>this.checkUserPermission(e),disabled:e=>!1,event:(e,a)=>this.onDeleteGame(a)}]}},clubImage:{title:"",type:"image",imageType:"organization",hidden:!0},date:{filterType:{type:"date"},title:"date",type:"date",dateFormat:"L - LT",ignoreMidDay:!0},localTeam:{title:"local",type:"text"},localTeamImage:{type:"image",imageType:"club"},result:{title:"result",type:"text"},visitorTeamImage:{type:"image",imageType:"club"},visitorTeam:{title:"visitor",type:"text"}}};moment;currentDate;constructor(e,a,i,o,n,l,m,B,k,K,w,F){this.apiOrganizationsService=e,this.addDialog=a,this.apiGamesService=i,this.clubsService=o,this.translationService=n,this.teamService=l,this.Dialog=m,this.competitionsService=B,this.appService=k,this.globalVars=K,this.router=w,this.authService=F,this.moment=this.globalVars.getMoment(),this.subscription.add(this.appService.subscribe("edit-game",M=>{this.openEditCompetitionGameDialog(M)})),this.subscription.add(this.appService.subscribe("delete-game",M=>{this.openDeleteCompetitionGameDialog(M)})),this.subscription.add(this.appService.subscribe("openaddGame",()=>{this.addGame()}))}ngOnInit(){var e=this;return(0,r.A)(function*(){"organization"===e.type&&(e.tableSettings.columns.clubImage.hidden=!1),e.canAddGame=e.authService.isCoach()||e.authService.isEditor()||e.authService.isAdministrator()||e.authService.isSuperAdmin(),e.currentDate=e.moment().startOf("week"),e.prevNextWeek(e.currentDate,"true")})()}ngOnDestroy(){this.subscription.unsubscribe(),this.gamesSubscription.unsubscribe()}openEditCompetitionGameDialog(e){var a=this;this.addDialog.open(T.S,{data:{game:e.game}}).afterClosed().subscribe(function(){var o=(0,r.A)(function*(n){if("object"==typeof n){let m=yield a.apiGamesService.getGameById(n.id);var l=a.generateRowGame(m);a.gamesTable.tableDataSource.update(e.rowData,l)}});return function(n){return o.apply(this,arguments)}}())}changeWeek(e){var a=this;return(0,r.A)(function*(){let i=a.moment(a.currentDate).add(e,"weeks");a.prevNextWeek(i,"false")})()}ngOnChanges(){var e=this;return(0,r.A)(function*(){e.currentDate=e.moment().startOf("week"),e.prevNextWeek(e.currentDate,"true")})()}prevNextWeek(e,a){var i=this;return(0,r.A)(function*(){i.currentDate=e;const o=i.moment(e).startOf("day"),n=i.moment(e).endOf("week").endOf("day");i.gamesSubscription.unsubscribe(),i.gamesSubscription=i.getGames(a,o.toISOString(),n.toISOString()).subscribe((0,r.A)(function*(){"true"===a&&i.games.length>0?(i.currentDate=i.moment(i.stats.from).startOf("week"),yield i.setDescriptionText(i.moment(i.stats.from),i.moment(i.stats.to))):yield i.setDescriptionText(o,n)}))})()}setDescriptionText(e,a){var i=this;return(0,r.A)(function*(){const o={from:e.format("DD"),fromMonth:e.format("MMMM"),to:a.format("DD"),month:a.format("MMMM"),year:a.format("YYYY")};i.descriptionWeek=yield i.translationService.getTranslation("module.admin.from_to_week",{dayFrom:o.from,dayTo:o.to,month:o.month,year:o.year})})()}getGames(e,a,i){return new D.c("organization"===this.type?o=>{this.apiOrganizationsService.getOrganizationsStats(void 0,this.sections?this.sections.map(n=>n.id):void 0,void 0,e,this.season?this.season.id:void 0,a,i).subscribe(n=>{this.stats=n,this.allGames=this.stats.games,this.filter(this.currentFilter),o.next(null),o.complete()})}:o=>{let n=[this.apiOrganizationsService.getOrganizationsStats(void 0,this.sections?this.sections.map(l=>
1l.id):void 0,{idType:this.type,value:this.id},e,this.season?this.season.id:void 0,a,i),"group"===this.type?this.apiGamesService.getGamesByClub(this.clubsService.getClubId(),null,a,i,e,null,null,this.id,null,this.clubsService.getClubId()):new D.c(l=>{l.next([]),l.complete()})];(0,S.p)(n).subscribe(l=>{this.stats=l[0],l[1]&&l[1].games?(this.allGames=l[1].games,this.stats.from=l[1].from,this.stats.to=l[1].to):this.allGames=this.stats.games,this.filter(this.currentFilter),o.next(null),o.complete()})})}generateRowGames(e){let a=[];return e.forEach(i=>{a.push(this.generateRowGame(i)),a=a.filter(o=>null!=o)}),a}generateRowGame(e){if(null==e.localTeam.clubId&&null==e.localTeam.club||null==e.visitorTeam.clubId&&null==e.visitorTeam.club)return null;null==e.localTeam.teamClub&&null!=e.localTeam.club&&(e.localTeam.clubId=e.localTeam.club.id),null==e.visitorTeam.teamClub&&null!=e.visitorTeam.club&&(e.visitorTeam.clubId=e.visitorTeam.club.id);let i="-";return i=null!=e.competition.leveradeCompetition?null!=e.localScore&&null!=e.visitorScore?`${e.localScore} - ${e.visitorScore}`:"-":"pending"===e.status?"-":`${null!=e.localScore?`${e.localScore} `:""}- ${null!=e.visitorScore?` ${e.visitorScore}`:""}`,{id:e.id,game:e,clubImage:{id:e.organizationId},date:e.date,localTeam:this.teamService.getCustomTeamName(e.localTeam),localTeamImage:{id:e.localTeam.clubId?e.localTeam.clubId:e.localTeam.club.id,src:null!=e.localTeam.shieldUrl&&"leverade"==e.localTeam.imgType?e.localTeam.shieldUrl:null},result:i,visitorTeamImage:{id:e.visitorTeam.clubId?e.visitorTeam.clubId:e.visitorTeam.club.id,src:null!=e.visitorTeam.shieldUrl&&"leverade"==e.visitorTeam.imgType?e.visitorTeam.shieldUrl:null},visitorTeam:this.teamService.getCustomTeamName(e.visitorTeam),actions:JSON.stringify({fromGamesGroup:!1,game:e})}}filter(e){switch(this.currentFilter=e,this.currentFilter){case"all":this.games=this.allGames?this.generateRowGames(this.allGames):[];break;case"local":this.games=this.allGames?this.generateRowGames(this.allGames.filter(a=>a.localTeam.clubId===this.clubsService.getClubId())):[];break;case"visitor":this.games=this.allGames?this.generateRowGames(this.allGames.filter(a=>a.visitorTeam.clubId===this.clubsService.getClubId())):[]}}addGame(){var e=this;let i,a=null;this.object&&("competition"===this.type?a={competition:this.object}:"group"===this.type&&(a={group:this.object})),i=a?this.Dialog.open(T.S,{data:a}):this.Dialog.open(T.S),i.afterClosed().subscribe(function(){var o=(0,r.A)(function*(n){if("object"==typeof n){let m=yield e.apiGamesService.getGameById(n.id);var l=e.generateRowGame(m);e.gamesTable.tableDataSource.add(l)}});return function(n){return o.apply(this,arguments)}}())}goToGames(){this.router.navigate(["/admin/competitions/games"],{queryParams:{from:this.moment(this.currentDate).startOf("week").toISOString(),to:this.moment(this.currentDate).endOf("week").toISOString()}})}openDeleteCompetitionGameDialog(e){this.Dialog.open(E.w,{panelClass:"modal-md",data:{type:"delete-game"}}).afterClosed().subscribe(i=>{!0===i&&this.apiGamesService.deleteGame(e.gameId).subscribe(()=>{this.competitionsService.broadcast("refresh",null),this.gamesTable.tableDataSource.remove(e.rowData)},o=>{console.error(o)})})}checkUserPermission(e){let a=!1;return this.authService.isSuperAdmin()?(a=!0,a):this.authService.hasSomeRole(["ADM","COO","COA"])}onEditGame(e){this.openEditCompetitionGameDialog({game:e.game,rowData:e})}onDeleteGame(e){this.openDeleteCompetitionGameDialog({gameId:e.game.id,rowData:e})}static \u0275fac=function(a){return new(a||_)(t.rXU(G.k),t.rXU(C.h),t.rXU(P.n),t.rXU(d.X),t.rXU(p.T),t.rXU(h.n),t.rXU(C.h),t.rXU(v.u),t.rXU(O.d),t.rXU(b.Y),t.rXU(y.Ix),t.rXU(g.u))};static \u0275cmp=t.VBU({type:_,selectors:[["app-competition-game-list"]],viewQuery:function(a,i){if(1&a&&t.GBs(f.YT,5),2&a){let o;t.mGM(o=t.lsd())&&(i.gamesTable=o.first)}},inputs:{type:"type",id:"id",object:"object",sections:"sections",season:"season"},standalone:!1,features:[t.OA$],decls:34,vars:34,consts:[["id","competition-game-list"],[1,"item-content"],[1,"clupik-navtabs"],["role","button","tabindex","0",1,"tab-button",3,"click"],[1,"button-text","sm"],[1,"week-navbar"],[1,"weekPrev"],[3,"click"],[1,"fa","fa-angle-left"],[1,"weekDescription"],["fxShow","fxShow","fxHide.lt-md","fxHide.lt-md"],[1,"weekNext"],[1,"fa","fa-angle-right"],[3,"settings","source"],[1,"actions-right"],["size","sm","config","main",3,"buttonAction","label","type","iconRight","icon"]],template:function(a,i){1&a&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.nI1(4,"translate"),t.bIt("click",function(){return i.filter("all")}),t.j41(5,"div",4),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.j41(8,"div",3),t.nI1(9,"translate"),t.bIt("click",function(){return i.filter("local")}),t.j41(10,"div",4),t.EFF(11),t.nI1(12,"translate"),t.k0s()(),t.j41(13,"div",3),t.nI1(14,"translate"),t.bIt("click",function(){return i.filter("visitor")}),t.j41(15,"div",4),t.EFF(16),t.nI1(17,"translate"),t.k0s()()(),t.j41(18,"div",5)(19,"div",6)(20,"div")(21,"a",7),t.bIt("click",function(){return i.changeWeek(-1)}),t.nrm(22,"div",8),t.k0s()()(),t.j41(23,"div",9)(24,"div",10)(25,"span"),t.EFF(26),t.k0s()()(),t.j41(27,"div",11)(28,"div")(29,"a",7),t.bIt("click",function(){return i.changeWeek(1)}),t.nrm(30,"div",12),t.k0s()()()(),t.nrm(31,"app-clupik-table",13),t.j41(32,"div",14)(33,"app-clupik-button",15),t.bIt("buttonAction",function(){return i.goToGames()}
1),t.k0s()()()()),2&a&&(t.R7$(3),t.AVh("active","all"===i.currentFilter),t.BMQ("aria-label",t.bMT(4,22,"global.common.all"))("aria-pressed","all"===i.currentFilter),t.R7$(3),t.SpI("",t.bMT(7,24,"global.common.all")," "),t.R7$(2),t.AVh("active","local"===i.currentFilter),t.BMQ("aria-label",t.bMT(9,26,"module.competition.local"))("aria-pressed","local"===i.currentFilter),t.R7$(3),t.JRh(t.bMT(12,28,"module.competition.local")),t.R7$(2),t.AVh("active","visitor"===i.currentFilter),t.BMQ("aria-label",t.bMT(14,30,"module.competition.visitor"))("aria-pressed","visitor"===i.currentFilter),t.R7$(3),t.JRh(t.bMT(17,32,"module.competition.visitor")),t.R7$(10),t.JRh(i.descriptionWeek),t.R7$(5),t.Y8G("settings",i.tableSettings)("source",i.games),t.R7$(2),t.Y8G("label","global.common.games")("type","link")("iconRight",!0)("icon","fa-light fa-arrow-right"))},dependencies:[U.YT,A.U,L.D9],styles:['.selector-row[_ngcontent-%COMP%]{margin-bottom:15px}.selector-row[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:not(:last-child){margin-right:15px}.selector-row[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:not(:last-child):after{content:"|";margin-left:15px}.week-navbar[_ngcontent-%COMP%]{margin-right:12px}']})}return _})()}}]);

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.