-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path364.b7599d49bd0ab037.js
1 lines (1 loc) · 74.2 KB
/
364.b7599d49bd0ab037.js
1
"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[364],{4978:(rt,A,r)=>{r.d(A,{m:()=>X});var n=r(4438),h=r(4710),x=r(8010),t=r(6697),G=r(6354);const X=(m,S)=>{const V=(0,n.WQX)(x.uR),y=(0,n.WQX)(h.Ix);return V.isLoggedIn.pipe((0,t.s)(1),(0,G.T)(w=>(w||y.navigate([""]),w)))}},7095:(rt,A,r)=>{r.d(A,{W:()=>T});var n=r(4438),h=r(9417),x=r(177),t=r(4506),G=r(8010),X=r(265),e=r(5416),m=r(5665),S=r(6467),V=r(9631),y=r(9213),w=r(850),u=r(6600),C=r(8834),I=r(9183),$=r(6713),B=r(3840),D=r(7763),U=r(187),j=r(7097),N=r(8925);const K=["autoOption"];function k(f,E){1&f&&(n.qex(0),n.nrm(1,"mat-spinner",6),n.bVm())}function tt(f,E){if(1&f){const l=n.RV6();n.j41(0,"img",41),n.bIt("error",function(M){n.eBV(l);const L=n.XpG(4);return n.Njj(L.handleImageError(M))}),n.k0s()}if(2&f){const l=n.XpG(4);n.FS9("alt",l.selectedCountry.name),n.Y8G("src",l.selectedCountry.flag,n.B4B)}}function et(f,E){if(1&f){const l=n.RV6();n.j41(0,"button",42),n.bIt("click",function(){n.eBV(l);const M=n.XpG(4);return n.Njj(M.clearCountry())}),n.j41(1,"mat-icon",43),n.EFF(2,"delete_outline"),n.k0s()()}}function H(f,E){if(1&f){const l=n.RV6();n.j41(0,"mat-option",44,1)(2,"img",45),n.bIt("error",function(M){n.eBV(l);const L=n.XpG(4);return n.Njj(L.handleImageError(M))}),n.k0s(),n.j41(3,"span",46),n.EFF(4),n.k0s()()}if(2&f){const l=E.$implicit;n.Y8G("value",l),n.R7$(2),n.FS9("alt",l.name),n.Y8G("src",l.flag,n.B4B),n.R7$(2),n.JRh(l.name)}}function nt(f,E){1&f&&(n.j41(0,"mat-error",47),n.EFF(1," Please enter a valid Twitch URL. "),n.k0s())}function Q(f,E){1&f&&(n.j41(0,"mat-error",47),n.EFF(1," Please enter a valid YouTube URL. "),n.k0s())}function Z(f,E){1&f&&(n.j41(0,"mat-error",47),n.EFF(1," Please enter a valid Liquipedia Username. "),n.k0s())}function q(f,E){1&f&&(n.j41(0,"mat-error",47),n.EFF(1," Please enter a valid Discord URL. "),n.k0s())}function z(f,E){if(1&f){const l=n.RV6();n.j41(0,"div",15)(1,"div",16)(2,"div",17),n.EFF(3),n.k0s(),n.j41(4,"mat-form-field",18)(5,"mat-label"),n.EFF(6,"Country Selection"),n.k0s(),n.DNE(7,tt,1,2,"img",19),n.j41(8,"input",20),n.mxI("ngModelChange",function(M){n.eBV(l);const L=n.XpG(3);return n.DH7(L.countryInput,M)||(L.countryInput=M),n.Njj(M)}),n.bIt("input",function(){n.eBV(l);const M=n.XpG(3);return n.Njj(M.onCountryInputChange())}),n.k0s(),n.DNE(9,et,3,0,"button",21),n.j41(10,"mat-autocomplete",22,0),n.bIt("optionSelected",function(M){n.eBV(l);const L=n.XpG(3);return n.Njj(L.onOptionSelected(M))}),n.DNE(12,H,5,4,"mat-option",23),n.k0s()()(),n.j41(13,"div",24)(14,"form",25),n.bIt("ngSubmit",function(){n.eBV(l);const M=n.XpG(3);return n.Njj(M.onSubmit())}),n.j41(15,"div",26)(16,"div",27),n.nrm(17,"img",28),n.j41(18,"mat-form-field",29)(19,"mat-label"),n.EFF(20,"Example: www.twitch.tv/username"),n.k0s(),n.nrm(21,"input",30),n.DNE(22,nt,2,0,"mat-error",31),n.k0s()(),n.j41(23,"div",27),n.nrm(24,"img",32),n.j41(25,"mat-form-field",33)(26,"mat-label"),n.EFF(27,"Example: www.youtube.com/username"),n.k0s(),n.nrm(28,"input",34),n.DNE(29,Q,2,0,"mat-error",31),n.k0s()()(),n.j41(30,"div",35)(31,"div",27),n.nrm(32,"img",36),n.j41(33,"mat-form-field",33)(34,"mat-label"),n.EFF(35,"Example: www.liquipedia.net/ageofempires/username"),n.k0s(),n.nrm(36,"input",37),n.DNE(37,Z,2,0,"mat-error",31),n.k0s()(),n.j41(38,"div",27),n.nrm(39,"img",38),n.j41(40,"mat-form-field",33)(41,"mat-label"),n.EFF(42,"Example: www.discord.gg/server_id"),n.k0s(),n.nrm(43,"input",39),n.DNE(44,q,2,0,"mat-error",31),n.k0s()()()(),n.j41(45,"app-custom-button",40),n.bIt("OnButtonClicked",function(M){n.eBV(l);const L=n.XpG(3);return n.Njj(L.OnClicked(M))}),n.k0s()()()}if(2&f){const l=n.sdS(11),d=n.XpG(3);n.R7$(3),n.SpI(" ",d.getSteamName()," "),n.R7$(4),n.Y8G("ngIf",d.selectedCountry),n.R7$(),n.R50("ngModel",d.countryInput),n.Y8G("matAutocomplete",l),n.R7$(),n.Y8G("ngIf",d.countryInput),n.R7$(3),n.Y8G("ngForOf",d.filteredCountries),n.R7$(2),n.Y8G("formGroup",d.editForm),n.R7$(8),n.Y8G("ngIf",d.editForm.controls.twitchURL.errors&&d.editForm.controls.twitchURL.errors.pattern),n.R7$(7),n.Y8G("ngIf",d.editForm.controls.youtubeURL.errors&&d.editForm.controls.youtubeURL.errors.pattern),n.R7$(8),n.Y8G("ngIf",d.editForm.controls.liquipediaURL.errors&&d.editForm.controls.liquipediaURL.errors.pattern),n.R7$(7),n.Y8G("ngIf",d.editForm.controls.discordURL.errors&&d.editForm.controls.discordURL.errors.pattern),n.R7$(),n.Y8G("InputIndex",2)("Name","Update")("ActiveEnabled",!1)}}function J(f,E){if(1&f&&(n.qex(0),n.nrm(1,"app-player-profile",48)(2,"app-player-matches",48)(3,"app-rating-history",48)(4,"app-winrate-and-game-count",49)(5,"app-winrate-by-matchup",48),n.bVm()),2&f){const l=n.XpG(3);n.R7$(),n.Y8G("idPlayer",l.currentPlayer.playerInfos.idPlayer),n.R7$(),n.Y8G("idPlayer",l.currentPlayer.playerInfos.idPlayer),n.R7$(),n.Y8G("idPlayer",l.currentPlayer.playerInfos.idPlayer),n.R7$(),n.Y8G("idPlayer",l.currentPlayer.playerInfos.idPlayer)("isProfile",!0),n.R7$(),n.Y8G("idPlayer",l.currentPlayer.playerInfos.idPlayer)}}function Y(f,E){if(1&f){const l=n.RV6();n.j41(0,"div",7)(1,"h1",8),n.EFF(2,"User Profile"),n.k0s(),n.j41(3,"div",9)(4,"div",10)(5,"div",11),n.nrm(6,"img",12),n.j41(7,"app-custom-button",13),n.bIt("OnButtonClicked",function(M){n.eBV(l);const L=n.XpG(2);return n.Njj(L.OnClicked(M))}),n.k0s()(),n.DNE(8,z,46,14,"div",14),n.k0s(),n.DNE(9,J,6,6,"ng-container",4),n.k0s()()}if(2&f){const l=n.XpG(2);n.R7$(6),n.Y8G("src",l.getAvatar(),n.B4B),n.R7$(),n.Y8G("InputIndex",1)("Name","Logout")("ActiveEnabled",!1),n.R7$(),n.Y8G("ngIf",l.currentPlayer),n.R7$(),n.Y8G("ngIf",l.checkPlayerInfosReady())}}function ct(f,E){if(1&f&&(n.j41(0,"section",3),n.DNE(1,k,2,0,"ng-container",4)(2,Y,10,6,"div",5),n.k0s()),2&f){const l=n.XpG();n.R7$(),n.Y8G("ngIf",!l.playerSummary||!l.currentPlayer),n.R7$(),n.Y8G("ngIf",l.playerSummary&&l.currentPlayer)}}let T=(()=>{class f{constructor(l,d,M,L,s,v,i){this.countryService=l,this.authService=d,this.profileService=M,this.formBuilder=L,this.snackBar=s,this.steamApiService=v,this.platformId=i,this.subscriptions=[],this.isBrowser=(0,x.UE)(this.platformId),this.twitchPattern="((http|https)://)?(www.)?twitch.tv/.+",this.youtubePattern="((http|https)://)?(www.)?youtube.com/.+",this.liquipediaPattern="((http|https)://)?(www.)?liquipedia.net/ageofempires/.+",this.countries=[],this.filteredCountries=[],this.countryInput="",this.selectedCountry=null,this.editForm=this.formBuilder.group({twitchURL:["",h.k0.pattern(this.twitchPattern)],youtubeURL:["",h.k0.pattern(this.youtubePattern)],liquipediaURL:["",h.k0.pattern(this.liquipediaPattern)],discordURL:["",h.k0.pattern(this.discordPattern)]})}ngOnInit(){this.subscriptions.push(this.countryService.getCountries().subscribe(l=>{this.countries=l,this.filteredCountries=l,this.checkSavedCountry()})),this.subscriptions.push(this.authService.getUserProfile().subscribe(l=>{this.currentUser=l,this.subscriptions.push(this.steamApiService.getPlayerSummaries(this.currentUser.idSteam).subscribe(d=>{d.response.players.length>0?this.playerSummary=d.response.players[0]:console.log("No players found")})),this.subscriptions.push(this.profileService.getProfileList(this.currentUser.idAge).subscribe(d=>{this.currentPlayer=d,this.checkSavedCountry(),this.editForm=this.formBuilder.group({twitchURL:[this.currentPlayer.playerInfos.twitchURL,h.k0.pattern(this.twitchPattern)],youtubeURL:[this.currentPlayer.playerInfos.youtubeURL,h.k0.pattern(this.youtubePattern)],liquipediaURL:[this.currentPlayer.playerInfos.liquipediaURL,h.k0.pattern(this.liquipediaPattern)],discordURL:[this.currentPlayer.playerInfos.discordURL,h.k0.pattern(this.discordPattern)]})}))}))}checkSavedCountry(){if(!this.countries||!this.currentPlayer?.playerInfos)return;var l=this.currentPlayer.playerInfos.country;const d=this.countries.find(M=>M.alpha2Code?.toUpperCase()===l?.toUpperCase());d&&(this.selectedCountry=d,this.countryInput=d.name)}clearCountry(){this.selectedCountry=null,this.countryInput=""}onCountryInputChange(){this.selectedCountry=null;const l=this.countryInput.toLowerCase();this.filteredCountries=this.countries.filter(d=>d.name.toLowerCase().includes(l))}onOptionSelected(l){if(this.selectedCountry=l.option.value,this.selectedCountry){this.countryInput=this.selectedCountry.name;const d={...this.currentPlayer.playerInfos,country:this.selectedCountry.alpha2Code?.toUpperCase()};this.subscriptions.push(this.profileService.updatePlayer(d).subscribe(M=>{this.currentPlayer.playerInfos=M,this.snackBar.open("Country saved, it takes some time before it can show on your profile!","Close",{duration:5e3})}))}}handleImageError(l){l.target.src="assets/icons/no_avatar.jpg"}checkPlayerInfosReady(){return!(!this.currentPlayer.playerInfos||!this.currentPlayer.playerInfos.idPlayer)}getAvatar(){return this.playerSummary.avatarfull?this.playerSummary.avatarfull:"assets/icons/no_avatar.jpg"}getSteamName(){return this.currentPlayer.playerInfos.name?this.currentPlayer.playerInfos.name:""}OnClicked(l){1==l?this.logout():2==l&&this.onSubmit()}onSubmit(){if(this.editForm.valid){const l={...this.currentPlayer.playerInfos,twitchURL:this.editForm.value.twitchURL?.replace("http://","")?.replace("https://",""),youtubeURL:this.editForm.value.youtubeURL?.replace("http://","")?.replace("https://",""),liquipediaURL:this.editForm.value.liquipediaURL?.replace("http://","")?.replace("https://",""),discordURL:this.editForm.value.discordURL?.replace("http://","")?.replace("https://","")};this.subscriptions.push(this.profileService.updatePlayer(l).subscribe(d=>{this.currentPlayer.playerInfos=d,d.twitchURL===l.twitchURL&&d.youtubeURL===l.youtubeURL&&d.liquipediaURL===l.liquipediaURL&&d.discordURL===l.discordURL&&this.snackBar.open("Profile updated successful!","Close",{duration:2e3})}))}}logout(){this.authService.doLogout(),this.snackBar.open("You have been logged out!","Close",{duration:2e3})}ngOnDestroy(){this.subscriptions.forEach(l=>{l.unsubscribe()})}static#t=this.\u0275fac=function(d){return new(d||f)(n.rXU(t.o),n.rXU(G.uR),n.rXU(X.p),n.rXU(h.ok),n.rXU(e.UG),n.rXU(m.m),n.rXU(n.Agw))};static#e=this.\u0275cmp=n.VBU({type:f,selectors:[["app-user-profile"]],viewQuery:function(d,M){if(1&d&&n.GBs(K,5),2&d){let L;n.mGM(L=n.lsd())&&(M.autoOptions=L)}},decls:1,vars:1,consts:[["auto","matAutocomplete"],["autoOption",""],["class","one-column-section",4,"ngIf"],[1,"one-column-section"],[4,"ngIf"],["class","custom-container mb-10",4,"ngIf"],["color","primary",2,"margin","auto"],[1,"custom-container","mb-10"],[1,"main-heading"],[1,"dark-bg","rounded","mb-20"],[1,"profile-card"],[1,"left"],[1,"avatar",3,"src"],[1,"button-logout",3,"OnButtonClicked","InputIndex","Name","ActiveEnabled"],["class","right",4,"ngIf"],[1,"right"],[1,"steam-container"],[1,"steam-name"],["appearance","outline","subscriptSizing","dynamic",1,"wide-form-field","medium"],["matPrefix","","class","flag-icon",3,"src","alt","error",4,"ngIf"],["matInput","","name","country_selection","type","text","aria-label","Country",1,"country-input",3,"ngModelChange","input","ngModel","matAutocomplete"],["matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],[3,"optionSelected"],["class","country-option",3,"value",4,"ngFor","ngForOf"],[1,"mt-10"],[3,"ngSubmit","formGroup"],[1,"rows"],[1,"form-element"],["src","assets/icons/twitch-white-logo.png",1,"media-icon"],["color","accent",1,"form-field"],["matInput","","type","text","formControlName","twitchURL"],["class","mat-error",4,"ngIf"],["src","assets/icons/youtube-white-logo.png",1,"media-icon"],[1,"form-field"],["matInput","","type","text","formControlName","youtubeURL"],[1,"rows","mt-10"],["src","assets/icons/liquipedia-icon-white.png",1,"media-icon"],["matInput","","type","text","formControlName","liquipediaURL"],["src","assets/icons/discord-icon-white.png",1,"media-icon"],["matInput","","type","text","formControlName","discordURL"],[1,"button-update",3,"OnButtonClicked","InputIndex","Name","ActiveEnabled"],["matPrefix","",1,"flag-icon",3,"error","src","alt"],["matSuffix","","mat-icon-button","",3,"click"],["color","warn"],[1,"country-option",3,"value"],[1,"flag-icon",3,"error","src","alt"],[1,"mat-option-text"],[1,"mat-error"],[3,"idPlayer"],[3,"idPlayer","isProfile"]],template:function(d,M){1&d&&n.DNE(0,ct,3,2,"section",2),2&d&&n.Y8G("ngIf",M.isBrowser)},dependencies:[x.Sq,x.bT,S.rl,S.nJ,S.TL,S.JW,S.yw,V.fg,y.An,w.$3,u.wT,w.pN,C.iY,I.LG,$.z,h.qT,h.me,h.BC,h.cb,h.j4,h.JD,h.vS,B.y,D._,U.t,j.A,N.b],styles:[".parent-container[_ngcontent-%COMP%]{width:80%;margin:auto}.profile-card[_ngcontent-%COMP%]{display:flex;border-radius:5px;padding:1rem}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column}.steam-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}.steam-name[_ngcontent-%COMP%]{flex:1;color:var(--yellow-brand);text-shadow:#000000 2px 2px 2px;font-variant:normal;font-family:Trajan Pro;font-size:clamp(1.2rem,4vw,2rem);font-style:normal;font-weight:800}.avatar[_ngcontent-%COMP%]{max-width:15rem;max-height:15rem;min-width:15rem;min-height:15rem;border:1px solid #6dcff6;border-radius:5px;box-shadow:0 0 5px 5px #00000040;align-self:center}.button-logout[_ngcontent-%COMP%]{display:flex;flex:1;margin-top:1rem;max-height:3rem;min-height:3rem}.right[_ngcontent-%COMP%]{display:flex;flex:1;margin-left:2rem;flex-direction:column;justify-content:space-between}.rows[_ngcontent-%COMP%]{display:flex;gap:3%}.form-element[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center}.media-icon[_ngcontent-%COMP%]{max-width:2.5em;max-height:2.5em;min-width:2.5rem;min-height:2.5rem;margin-right:1rem;margin-bottom:1rem}.form-field-container[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center}.form-field[_ngcontent-%COMP%]{flex-grow:1}.form-button[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:1rem}.mat-error[_ngcontent-%COMP%]{margin-top:2px}.button-update[_ngcontent-%COMP%]{display:flex;flex:1;max-height:3rem;min-height:3rem}.wide-form-field[_ngcontent-%COMP%]{width:20rem;white-space:nowrap}.wide-form-field[_ngcontent-%COMP%] .mat-form-field-flex[_ngcontent-%COMP%]{display:flex;align-items:center}.wide-form-field[_ngcontent-%COMP%] .mat-form-field-infix[_ngcontent-%COMP%]{white-space:nowrap}.country-option[_ngcontent-%COMP%]{display:flex;align-items:center;height:1rem;white-space:nowrap;margin-left:-1rem}.mat-option-text[_ngcontent-%COMP%]{flex:1;white-space:nowrap;max-width:calc(100% - 32px)!important;margin-left:.5rem}.country-input[_ngcontent-%COMP%]{margin-left:.2rem}.flag-icon[_ngcontent-%COMP%]{width:24px;height:16px;vertical-align:middle;margin-left:.8rem!important}.mat-autocomplete-panel[_ngcontent-%COMP%]{max-width:100%!important}@media only screen and (min-width: 1000px) and (max-width: 1600px){.parent-container[_ngcontent-%COMP%]{width:95%}}@media only screen and (max-width: 900px){.parent-container[_ngcontent-%COMP%]{width:98%}.avatar[_ngcontent-%COMP%]{max-width:10rem;max-height:10rem;min-width:10rem;min-height:10rem}.rows[_ngcontent-%COMP%]{flex-direction:column}}@media only screen and (max-width: 600px){.profile-card[_ngcontent-%COMP%]{flex-direction:column}.right[_ngcontent-%COMP%]{margin-top:1rem;margin-left:0}.media-icon[_ngcontent-%COMP%]{max-width:1.5em;max-height:1.5em;min-width:1.5rem;min-height:1.5rem}.avatar[_ngcontent-%COMP%]{max-width:6rem;max-height:6rem;min-width:6rem;min-height:6rem}}"]})}return f})()},265:(rt,A,r)=>{r.d(A,{p:()=>t});var n=r(1626),h=r(5440),x=r(4438);let t=(()=>{class G{constructor(e,m){this.httpClient=e,this.zone=m,this.headers=(new n.Lr).set("Content-Type","application/json"),this.api="/player/playerprofile",this.ratinghistoryapi="/ratinghistory",this.apiupdate=h.p+"/user/updateprofile",this.getProfileByNameApi="/player/profilebyexactname"}updatePlayer(e){return this.httpClient.post(this.apiupdate,e)}getProfileList(e){let m=(new n.Nl).set("idPlayer",e);return this.httpClient.get(h.p+this.api,{headers:this.headers,params:m})}getProfileByName(e){let m=(new n.Nl).set("name",e);return this.httpClient.get(h.p+this.getProfileByNameApi,{headers:this.headers,params:m})}getRatingHistory(e){let m=(new n.Nl).set("idPlayer",e);return this.httpClient.get(h.p+this.ratinghistoryapi,{headers:this.headers,params:m})}static#t=this.\u0275fac=function(m){return new(m||G)(x.KVO(n.Qq),x.KVO(x.SKi))};static#e=this.\u0275prov=x.jDH({token:G,factory:G.\u0275fac,providedIn:"root"})}return G})()},7763:(rt,A,r)=>{r.d(A,{_:()=>L});var n=r(467),h=r(6604),x=r(9198),t=r(4438),G=r(728),X=r(14),e=r(78),m=r(4710),S=r(8608);const V=["sizepicker"],y=["modepicker"];function w(s,v){if(1&s&&(t.j41(0,"div"),t.nrm(1,"ng-icon",45),t.j41(2,"span"),t.EFF(3),t.k0s()()),2&s){const i=t.XpG().$implicit,c=t.XpG().$implicit,g=t.XpG(2);t.R7$(),t.Y8G("name",c.isWin?"heroArrowUpRight":"heroArrowDownRight"),t.R7$(2),t.JRh(g.getEloDiffAbsolute(i.eloDiff))}}function u(s,v){1&s&&(t.j41(0,"div"),t.EFF(1,"-"),t.k0s())}function C(s,v){if(1&s&&(t.qex(0),t.j41(1,"div",44),t.DNE(2,w,4,2,"div",9)(3,u,2,0,"div",9),t.k0s(),t.bVm()),2&s){const i=v.$implicit,c=t.XpG().$implicit;t.R7$(),t.AVh("green",c.isWin)("red",!c.isWin),t.R7$(),t.Y8G("ngIf",void 0!==i.eloDiff&&0!==i.eloDiff),t.R7$(),t.Y8G("ngIf",!i.eloDiff||0===i.eloDiff)}}function I(s,v){if(1&s&&(t.qex(0),t.j41(1,"div"),t.nrm(2,"img",46),t.k0s(),t.bVm()),2&s){const i=v.$implicit;t.R7$(2),t.Y8G("src",i.civFlagUrl,t.B4B)}}function $(s,v){if(1&s&&(t.qex(0),t.j41(1,"div"),t.nrm(2,"img",46),t.k0s(),t.bVm()),2&s){const i=v.$implicit;t.R7$(2),t.Y8G("src",i.civFlagUrl,t.B4B)}}function B(s,v){if(1&s&&(t.j41(0,"div"),t.nrm(1,"ng-icon",45),t.j41(2,"span"),t.EFF(3),t.k0s()()),2&s){const i=t.XpG().$implicit,c=t.XpG().$implicit,g=t.XpG(2);t.R7$(),t.Y8G("name",c.isWin?"heroArrowDownRight":"heroArrowUpRight"),t.R7$(2),t.JRh(g.getEloDiffAbsolute(i.eloDiff))}}function D(s,v){1&s&&(t.j41(0,"div"),t.EFF(1,"-"),t.k0s())}function U(s,v){if(1&s&&(t.qex(0),t.j41(1,"div",47),t.DNE(2,B,4,2,"div",9)(3,D,2,0,"div",9),t.k0s(),t.bVm()),2&s){const i=v.$implicit,c=t.XpG().$implicit;t.R7$(),t.AVh("green",!c.isWin)("red",c.isWin),t.R7$(),t.Y8G("ngIf",void 0!==i.eloDiff&&0!==i.eloDiff),t.R7$(),t.Y8G("ngIf",!i.eloDiff||0===i.eloDiff)}}function j(s,v){if(1&s&&t.nrm(0,"img",60),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isHigestScoreTip)}}function N(s,v){if(1&s&&t.nrm(0,"img",61),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isLeastResourcesTip)}}function K(s,v){if(1&s&&t.nrm(0,"img",62),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostImprovementsTip)}}function k(s,v){if(1&s&&t.nrm(0,"img",63),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostKillsTip)}}function tt(s,v){if(1&s&&t.nrm(0,"img",64),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostLossesTip)}}function et(s,v){if(1&s&&t.nrm(0,"img",65),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostMilitaryTip)}}function H(s,v){if(1&s&&t.nrm(0,"img",66),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostResourcesTip)}}function nt(s,v){if(1&s&&t.nrm(0,"img",67),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostTreasuresTip)}}function Q(s,v){if(1&s&&(t.qex(0),t.j41(1,"div",48)(2,"div",49),t.EFF(3),t.k0s(),t.j41(4,"div",50),t.EFF(5),t.k0s(),t.j41(6,"div",50),t.EFF(7),t.k0s(),t.j41(8,"div",50),t.EFF(9),t.k0s(),t.j41(10,"div",50),t.EFF(11),t.k0s(),t.j41(12,"div",50),t.EFF(13),t.k0s(),t.j41(14,"div",50),t.EFF(15),t.k0s(),t.j41(16,"div",50),t.EFF(17),t.k0s(),t.j41(18,"div",50),t.EFF(19),t.k0s(),t.j41(20,"div",51),t.DNE(21,j,1,1,"img",52)(22,N,1,1,"img",53)(23,K,1,1,"img",54)(24,k,1,1,"img",55)(25,tt,1,1,"img",56)(26,et,1,1,"img",57)(27,H,1,1,"img",58)(28,nt,1,1,"img",59),t.k0s()(),t.bVm()),2&s){const i=v.$implicit;t.R7$(3),t.SpI(" ",i.playerName," "),t.R7$(2),t.JRh(i.scoreEconomic),t.R7$(2),t.JRh(i.scoreMilitary),t.R7$(2),t.JRh(i.scoreTotal),t.R7$(2),t.JRh(i.buildingLost),t.R7$(2),t.JRh(i.buildingRazed),t.R7$(2),t.JRh(i.unitsConverted),t.R7$(2),t.JRh(i.unitsKilled),t.R7$(2),t.JRh(i.unitsLost),t.R7$(2),t.Y8G("ngIf",i.isHigestScore),t.R7$(),t.Y8G("ngIf",i.isLeastResources),t.R7$(),t.Y8G("ngIf",i.isMostImprovements),t.R7$(),t.Y8G("ngIf",i.isMostKills),t.R7$(),t.Y8G("ngIf",i.isMostLosses),t.R7$(),t.Y8G("ngIf",i.isMostMilitary),t.R7$(),t.Y8G("ngIf",i.isMostResources),t.R7$(),t.Y8G("ngIf",i.isMostTreasures)}}function Z(s,v){if(1&s&&t.nrm(0,"img",60),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isHigestScoreTip)}}function q(s,v){if(1&s&&t.nrm(0,"img",61),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isLeastResourcesTip)}}function z(s,v){if(1&s&&t.nrm(0,"img",62),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostImprovementsTip)}}function J(s,v){if(1&s&&t.nrm(0,"img",63),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostKillsTip)}}function Y(s,v){if(1&s&&t.nrm(0,"img",64),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostLossesTip)}}function ct(s,v){if(1&s&&t.nrm(0,"img",65),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostMilitaryTip)}}function T(s,v){if(1&s&&t.nrm(0,"img",66),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostResourcesTip)}}function f(s,v){if(1&s&&t.nrm(0,"img",67),2&s){const i=t.XpG(4);t.Y8G("matTooltip",i.isMostTreasuresTip)}}function E(s,v){if(1&s&&(t.qex(0),t.j41(1,"div",48)(2,"div",68),t.EFF(3),t.k0s(),t.j41(4,"div",69),t.EFF(5),t.k0s(),t.j41(6,"div",69),t.EFF(7),t.k0s(),t.j41(8,"div",69),t.EFF(9),t.k0s(),t.j41(10,"div",69),t.EFF(11),t.k0s(),t.j41(12,"div",69),t.EFF(13),t.k0s(),t.j41(14,"div",69),t.EFF(15),t.k0s(),t.j41(16,"div",69),t.EFF(17),t.k0s(),t.j41(18,"div",69),t.EFF(19),t.k0s(),t.j41(20,"div",70),t.DNE(21,Z,1,1,"img",52)(22,q,1,1,"img",53)(23,z,1,1,"img",54)(24,J,1,1,"img",55)(25,Y,1,1,"img",56)(26,ct,1,1,"img",57)(27,T,1,1,"img",58)(28,f,1,1,"img",59),t.k0s()(),t.bVm()),2&s){const i=v.$implicit;t.R7$(3),t.SpI(" ",i.playerName," "),t.R7$(2),t.JRh(i.scoreEconomic),t.R7$(2),t.JRh(i.scoreMilitary),t.R7$(2),t.JRh(i.scoreTotal),t.R7$(2),t.JRh(i.buildingLost),t.R7$(2),t.JRh(i.buildingRazed),t.R7$(2),t.JRh(i.unitsConverted),t.R7$(2),t.JRh(i.unitsKilled),t.R7$(2),t.JRh(i.unitsLost),t.R7$(2),t.Y8G("ngIf",i.isHigestScore),t.R7$(),t.Y8G("ngIf",i.isLeastResources),t.R7$(),t.Y8G("ngIf",i.isMostImprovements),t.R7$(),t.Y8G("ngIf",i.isMostKills),t.R7$(),t.Y8G("ngIf",i.isMostLosses),t.R7$(),t.Y8G("ngIf",i.isMostMilitary),t.R7$(),t.Y8G("ngIf",i.isMostResources),t.R7$(),t.Y8G("ngIf",i.isMostTreasures)}}function l(s,v){if(1&s){const i=t.RV6();t.j41(0,"div",15)(1,"div",16)(2,"div",17)(3,"div",18)(4,"span",19),t.EFF(5),t.k0s(),t.j41(6,"div",20)(7,"span",21)(8,"mat-icon",22),t.EFF(9,"map"),t.k0s(),t.EFF(10),t.k0s(),t.j41(11,"span",23)(12,"mat-icon",22),t.EFF(13,"access_time"),t.k0s(),t.EFF(14),t.k0s()()()(),t.j41(15,"div",24)(16,"div",25),t.nrm(17,"app-match-history-player",26),t.k0s(),t.j41(18,"div",27),t.DNE(19,C,4,6,"ng-container",28),t.k0s(),t.j41(20,"div",29),t.DNE(21,I,3,1,"ng-container",28),t.k0s(),t.j41(22,"div",30)(23,"div"),t.nrm(24,"img",31),t.k0s()(),t.j41(25,"div",32),t.EFF(26,"vs"),t.k0s(),t.j41(27,"div",29),t.DNE(28,$,3,1,"ng-container",28),t.k0s(),t.j41(29,"div",27),t.DNE(30,U,4,6,"ng-container",28),t.k0s(),t.j41(31,"div",33),t.nrm(32,"app-match-history-opponent",34),t.k0s()(),t.j41(33,"div",35)(34,"div",36)(35,"div",37)(36,"span",38),t.EFF(37),t.k0s(),t.j41(38,"span",38),t.EFF(39),t.k0s()(),t.j41(40,"div",39),t.bIt("click",function(){const g=t.eBV(i).$implicit,F=t.XpG(2);return t.Njj(F.comparePlayers(g))}),t.j41(41,"mat-icon",22),t.EFF(42,"compare_arrows"),t.k0s(),t.j41(43,"span"),t.EFF(44,"Compare Players"),t.k0s()(),t.j41(45,"div",39),t.bIt("click",function(){const g=t.eBV(i).index,F=t.XpG(2);return t.Njj(F.showHideRow(g))}),t.j41(46,"mat-icon",22),t.EFF(47,"timeline"),t.k0s(),t.j41(48,"span"),t.EFF(49,"Match Details"),t.k0s()()()()(),t.j41(50,"div",40)(51,"div",41)(52,"div",42),t.EFF(53),t.k0s(),t.j41(54,"div",43),t.EFF(55),t.k0s(),t.j41(56,"div",43),t.EFF(57),t.k0s(),t.j41(58,"div",43),t.EFF(59),t.k0s(),t.j41(60,"div",43),t.EFF(61),t.k0s(),t.j41(62,"div",43),t.EFF(63),t.k0s(),t.j41(64,"div",43),t.EFF(65),t.k0s(),t.j41(66,"div",43),t.EFF(67),t.k0s(),t.j41(68,"div",43),t.EFF(69),t.k0s(),t.j41(70,"div",42),t.EFF(71),t.k0s(),t.DNE(72,Q,29,17,"ng-container",28)(73,E,29,17,"ng-container",28),t.k0s()()()}if(2&s){const i=v.$implicit,c=v.index,g=t.XpG(2);t.R7$(5),t.JRh(g.getGameMode(i.gameMode)),t.R7$(5),t.JRh(i.MapName),t.R7$(4),t.JRh(i.Length),t.R7$(3),t.Y8G("PlayerList",i.PlayerList)("isWin",i.isWin)("idPlayer",g.idPlayer),t.R7$(2),t.Y8G("ngForOf",i.PlayerList),t.R7$(2),t.Y8G("ngForOf",i.PlayerList),t.R7$(3),t.Y8G("src",i.MapUrl,t.B4B),t.R7$(4),t.Y8G("ngForOf",i.OpponentList),t.R7$(2),t.Y8G("ngForOf",i.OpponentList),t.R7$(2),t.Y8G("OpponentList",i.OpponentList)("isWin",!i.isWin)("idPlayer",g.idPlayer),t.R7$(5),t.JRh(g.formatDate(i.StartDate)),t.R7$(2),t.JRh(i.StartDate.toLocaleTimeString("en-GB")),t.R7$(11),t.Y8G("id","hidden_row"+c),t.R7$(3),t.SpI(" ",g.playerNameText," "),t.R7$(2),t.JRh(g.scoreEconomicText),t.R7$(2),t.JRh(g.scoreMilitaryText),t.R7$(2),t.JRh(g.scoreTotalText),t.R7$(2),t.JRh(g.buildingLostText),t.R7$(2),t.JRh(g.buildingRazedText),t.R7$(2),t.JRh(g.unitsConvertedText),t.R7$(2),t.JRh(g.unitsKilledText),t.R7$(2),t.JRh(g.unitsLostText),t.R7$(2),t.SpI(" ",g.trophyText," "),t.R7$(),t.Y8G("ngForOf",i.PlayerList),t.R7$(),t.Y8G("ngForOf",i.OpponentList)}}function d(s,v){if(1&s&&(t.qex(0),t.DNE(1,l,74,29,"div",14),t.bVm()),2&s){const i=t.XpG();t.R7$(),t.Y8G("ngForOf",i.matchArray)}}function M(s,v){1&s&&(t.j41(0,"div",71),t.nrm(1,"mat-progress-spinner",72),t.k0s())}let L=(()=>{class s{constructor(i,c,g,F,P,O){this.stringTableService=i,this.playerMatchsService=c,this.jsonService=g,this.router=F,this.sharedDataService=P,this.cdr=O,this.sizeList=[5,6,7,8,9,10,15,20,30,40,50],this.modeNameList=h.Fy,this.modeValueList=h.nQ,this.displayedColumns=["Date","Player","Map","Opponent","Length"],this.isLoading=!0,this.showUnrated=!1,this.show1v1Ranked=!0,this.showTeamGameRanked=!0,this.maxPage=0,this.totalElements=0,this.page=0,this.size=5,this._selectedValue=0,this.sizeStorageKey="player_matchs_size_storage_key",this.modeStorageKey="player_matches_mode_storage_key",this.isDetailExpanded=!1}ngAfterViewInit(){var i=this;return(0,n.A)(function*(){i.isLoading=!0;var c=localStorage.getItem(i.sizeStorageKey);c&&(i.size=+c,i.sizepicker.updateItem(i.size));var g=localStorage.getItem(i.modeStorageKey);g&&(i._selectedValue=+g,i.modepicker.updateItem(i._selectedValue)),i.cdr.detectChanges(),i.mapInfos=yield(0,x.re)(i.jsonService),i.stringTableService.setLanguage((0,x.xd)()),yield i.stringTableService.loadStringTable(),i.getMatchs(i.page,i.size);let P=yield i.stringTableService.getLocalizedStrings([32710,31560,31389,31395,31457,31394,31559,31558,36490,36491,19060,19070,19068,49322,19067,19069,42314,21255,19830,20513,70752,30078,19103,20510]);i.isHigestScoreTip=P[32710],i.isLeastResourcesTip=P[31560],i.isMostImprovementsTip=P[31389],i.isMostKillsTip=P[31395],i.isMostLossesTip=P[31457],i.isMostMilitaryTip=P[31394],i.isMostResourcesTip=P[31559],i.isMostTreasuresTip=P[31558],i.scoreEconomicText=P[36490],i.scoreMilitaryText=P[36491],i.scoreTotalText=P[19060],i.buildingLostText=P[19070],i.buildingRazedText=P[19068],i.unitsConvertedText=P[49322],i.unitsKilledText=P[19067],i.unitsLostText=P[19069],i.trophyText=P[42314],i.playerNameText=P[21255],i.moreText=P[19830],i.timeText=P[20513],i.alliesText=P[70752],i.mapText=P[30078],i.opponentText=P[19103],i.durationText=P[20510]})()}ngOnChanges(i){this.isLoading||this.ngAfterViewInit()}getMatchs(i,c,g=null){let F;F=g?this.playerMatchsService.getMatchHistoryByName(this.idPlayer,this._selectedValue,g,i,c):this.playerMatchsService.getMatchHistory(this.idPlayer,this._selectedValue,i,c),this.subscription=F.subscribe({next:this.handleResponse.bind(this),error:this.handleError.bind(this)})}comparePlayers(i){var c=i.PlayerList,g=i.OpponentList;c.length==g.length&&(this.sharedDataService.setData({players:c,opponents:g}),this.router.navigate(["/statistics"]))}get pagePlusOne(){return this.page+1}get maxPagePlusOne(){return this.maxPage+1}handleResponse(i){var c=this;return(0,n.A)(function*(){if(c.isLoading=!1,c.totalElements=i.totalElements,c.totalElements>c.size){var g=Math.floor(c.totalElements/c.size);c.maxPage=c.totalElements%c.size==0?g-1:g}else c.maxPage=0;c.matchArray=[],c.detailHeight=[],c.isLoading=!1;let F=i.content;for(let P=0;P<F.length;P++){let mt,O=F[P],dt=[],gt=[];if(!O.matchPlayerInfo||!O.playerCount)continue;for(let W=0;W<O.matchPlayerInfo.length;W++)if(O.matchPlayerInfo[W].idPlayer==c.idPlayer){mt=O.matchPlayerInfo[W].team;break}if(null==mt)continue;let it,st,_t=null,ft=!1;for(let W=0;W<O.matchPlayerInfo.length;W++){let _,a=O.matchPlayerInfo[W],o=a.idCiv,p=a.playerName+"",R="";o?(0,h.JH)(o)?(_=(0,h.JH)(o),R+=(0,h.HH)(o)):(_="CivId: "+o,R+="flag_hc_random.png",p+=" ["+_+"]"):(_="Unknown",o=-1);let b=a.idPlayer==c.idPlayer;b&&(_t=a);let yt={playerName:p,idPlayer:a.idPlayer,civName:_,civFlagUrl:R,elo:a.eloBefore,eloDiff:a.eloAfter-a.eloBefore,isThisPlayer:b,isHigestScore:1==a.isHigestScore,isLeastResources:1==a.isLeastResources,isMostImprovements:1==a.isMostImprovements,isMostKills:1==a.isMostKills,isMostLosses:1==a.isMostLosses,isMostMilitary:1==a.isMostMilitary,isMostResources:1==a.isMostResources,isMostTreasures:1==a.isMostTreasures,scoreEconomic:a.scoreEconomic,scoreMilitary:a.scoreMilitary,scoreTotal:a.scoreTotal,buildingLost:a.buildingLost,buildingRazed:a.buildingRazed,unitsConverted:a.unitsConverted,unitsKilled:a.unitsKilled,unitsLost:a.unitsLost};a.team==mt?dt.push(yt):gt.push(yt)}O.idMap?(0,x.oY)(c.mapInfos,O.idMap)?(it=yield(0,x.Sq)(c.stringTableService,c.mapInfos,O.idMap),st=(0,x.oY)(c.mapInfos,O.idMap)):(it=-1==O.idMap?"":"MapId: "+O.idMap,st=(0,x.MR)(c.mapInfos)):(it=yield(0,x.Sq)(c.stringTableService,c.mapInfos,43),O.idMap=0,st=(0,x.MR)(c.mapInfos)),ft=1==_t?.result;let pt,lt,ot,ht=new Date(O.startDate),ut=new Date(O.endDate);if(pt=!!O.isRanked&&O.isRanked,ot=Math.floor(O.gameLength/60),0==ot)lt=O.gameLength%60+"s";else{let W=Math.floor(ot/60);lt=0==W?`${ot} minutes`:`${W} hrs ${ot} min`}c.matchArray.push({MapName:it,MapUrl:st,StartDate:ht,EndDate:ut,Length:lt,PlayerList:dt,OpponentList:gt,playerCount:O.playerCount,isWin:ft,isRanked:pt,hidden:!1,gameMode:O.gameMode}),c.detailHeight.push(0)}})()}handleError(i){console.error("Error fetching leaderboard data: ",i)}OnPageChanged(i){this.isLoading||(this.page=i,this.goToPage())}OnSizeChanged(i){if(this.isLoading)return;this.size=i,this.page=0,localStorage.setItem(this.sizeStorageKey,this.size.toString()),this.getMatchs(this.page,this.size);let c=document.getElementById("top-of-component");c&&window.scroll({top:c.offsetTop-20,left:0,behavior:"smooth"})}OnModeChanged(i){if(this.isLoading)return;this._selectedValue=i,this.page=0,this.getMatchs(this.page,this.size),localStorage.setItem(this.modeStorageKey,this._selectedValue.toString());let c=document.getElementById("top-of-component");c&&window.scroll({top:c.offsetTop-20,left:0,behavior:"smooth"})}goToPage(){!this.page||this.page<0?this.page=0:this.page>this.maxPage&&(this.page=this.maxPage),this.getMatchs(this.page,this.size)}nextPage(){this.page!=this.maxPage&&(this.page++,this.getMatchs(this.page,this.size))}previousPage(){0!=this.page&&(this.page--,this.getMatchs(this.page,this.size))}lastPage(){this.page=this.maxPage,this.getMatchs(this.page,this.size)}firstPage(){this.page=0,this.getMatchs(this.page,this.size)}showHideRow(i){var c=document.getElementById("hidden_row"+i);this.isDetailExpanded?c&&(c.style.display="none"):c&&(c.style.display=""),this.isDetailExpanded=!this.isDetailExpanded}formatDate(i){const g=i.getDate(),F=i.getMonth(),P=i.getFullYear();return`${g} ${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][F]} ${P}`}getGameMode(i){switch(i){case 1:return"Solo";case 2:return"Team";case 3:return"Treaty";case 4:return"DM";case 5:return"EW Solo";case 6:return"EW Team";case 8:return"2v2";case 9:return"3v3";case 10:return"4v4";default:return""}}getEloDiffAbsolute(i){return Math.abs(i)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static#t=this.\u0275fac=function(c){return new(c||s)(t.rXU(G.N),t.rXU(X.$),t.rXU(e.W),t.rXU(m.Ix),t.rXU(S.H),t.rXU(t.gRc))};static#e=this.\u0275cmp=t.VBU({type:s,selectors:[["app-player-matches"]],viewQuery:function(c,g){if(1&c&&(t.GBs(V,5),t.GBs(y,5)),2&c){let F;t.mGM(F=t.lsd())&&(g.sizepicker=F.first),t.mGM(F=t.lsd())&&(g.modepicker=F.first)}},inputs:{idPlayer:"idPlayer"},features:[t.OA$],decls:16,vars:11,consts:[["sizepicker",""],["modepicker",""],["pagepagination",""],["id","top-of-component",1,"recent-games-container"],[1,"title-container"],[1,"section-title"],[1,"filter-buttons"],[3,"OnPageChanged","Name","List"],[3,"OnPageChanged","Name","List","Values"],[4,"ngIf"],["class","spinner-container",4,"ngIf"],[1,"end-section-container"],[3,"OnPageChanged","Page","MaxPage"],[1,"pager"],["class","match-container",4,"ngFor","ngForOf"],[1,"match-container"],[1,"match-row"],[1,"first-item"],[1,"mode-map-duration"],[1,"mode-text"],[1,"map-duration"],[1,"map-text"],[1,"small-icon"],[1,"duration-text"],[1,"middle-items"],[1,"player-item"],[3,"PlayerList","isWin","idPlayer"],[1,"diff-item"],[4,"ngFor","ngForOf"],[1,"flag-item"],[1,"map-item"],["alt","...",1,"map-icon",3,"src"],[1,"versus"],[1,"player-item",2,"justify-content","flex-end"],[3,"OpponentList","isWin","idPlayer"],[1,"last-item"],[1,"date-time-details"],[1,"date-time"],[1,"date-text"],[1,"match-details-box",3,"click"],[2,"display","none",3,"id"],[1,"grid-container"],[1,"detail-column-header",2,"justify-content","flex-start"],[1,"detail-column-header"],[1,"diff-min"],[3,"name"],["alt","...",1,"flag-min",3,"src"],[1,"diff-min",2,"justify-content","flex-end"],[1,"grid-row"],[1,"detail-text-player","winner"],[1,"detail-text","winner"],[1,"badge-icons","winner"],["src","assets/Data/wpfg/resources/images/icons/post_game/fame.png",3,"matTooltip",4,"ngIf"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_least_resources.png",3,"matTooltip",4,"ngIf"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_tech.png",3,"matTooltip",4,"ngIf"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_kills.png",3,"matTooltip",4,"ngIf"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_losses.png",3,"matTooltip",4,"ngIf"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_largest_army.png",3,"matTooltip",4,"ngIf"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_resources.png",3,"matTooltip",4,"ngIf"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_treasures.png",3,"matTooltip",4,"ngIf"],["src","assets/Data/wpfg/resources/images/icons/post_game/fame.png",3,"matTooltip"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_least_resources.png",3,"matTooltip"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_tech.png",3,"matTooltip"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_kills.png",3,"matTooltip"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_losses.png",3,"matTooltip"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_largest_army.png",3,"matTooltip"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_resources.png",3,"matTooltip"],["src","assets/Data/wpfg/resources/images/icons/post_game/awards_most_treasures.png",3,"matTooltip"],[1,"detail-text-opponent","loser"],[1,"detail-text","loser"],[1,"badge-icons","loser"],[1,"spinner-container"],["strokeWidth","4","diameter","50","color","primary","mode","indeterminate"]],template:function(c,g){if(1&c){const F=t.RV6();t.j41(0,"div",3)(1,"div",4)(2,"div",5),t.EFF(3,"Recent Games"),t.k0s(),t.j41(4,"div",6)(5,"app-picker",7,0),t.bIt("OnPageChanged",function(O){return t.eBV(F),t.Njj(g.OnSizeChanged(O))}),t.k0s(),t.j41(7,"app-picker",8,1),t.bIt("OnPageChanged",function(O){return t.eBV(F),t.Njj(g.OnModeChanged(O))}),t.k0s()()(),t.DNE(9,d,2,1,"ng-container",9)(10,M,2,0,"div",10),t.j41(11,"div",11)(12,"app-pagination",12,2),t.bIt("OnPageChanged",function(){return t.eBV(F),t.Njj(g.OnPageChanged(1))}),t.k0s(),t.j41(14,"div",13),t.EFF(15),t.k0s()()()}2&c&&(t.R7$(5),t.Y8G("Name","Display:")("List",g.sizeList),t.R7$(2),t.Y8G("Name","Mode:")("List",g.modeNameList)("Values",g.modeValueList),t.R7$(2),t.Y8G("ngIf",!g.isLoading),t.R7$(),t.Y8G("ngIf",g.isLoading),t.R7$(2),t.Y8G("Page",g.page)("MaxPage",g.maxPage),t.R7$(3),t.Lme("",g.pagePlusOne," of ",g.maxPagePlusOne," pages"))},styles:['.recent-games-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;font-family:"Source Sans 3"}.title-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-top-left-radius:5px;border-top-right-radius:5px;background-color:#4545454d;box-shadow:0 2px 4px #00000040;padding:1rem;flex-wrap:wrap;gap:1rem}.section-title[_ngcontent-%COMP%]{font-family:Trajan Pro;font-size:clamp(.8rem,4vw,1rem);color:#ddd;text-shadow:2px 2px 4px black}.filter-buttons[_ngcontent-%COMP%]{display:flex;gap:1rem;flex-wrap:wrap}.match-container[_ngcontent-%COMP%]{box-shadow:0 2px 4px #00000040}.match-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:10rem minmax(0,1fr) 3rem 2rem 6rem 2rem 3rem minmax(0,1fr) 10rem;column-gap:.5rem;align-items:center;padding:.5rem 1rem;background-color:#1818181a}.match-row[_ngcontent-%COMP%]{border-bottom:1px solid #454545}.middle-items[_ngcontent-%COMP%]{grid-column:2 / span 7;display:grid;grid-template-columns:minmax(0,1fr) 3rem 2rem 6rem 2rem 3rem minmax(0,1fr);column-gap:.5rem;align-items:center}.middle-items[_ngcontent-%COMP%], .first-item[_ngcontent-%COMP%], .player-item[_ngcontent-%COMP%], .diff-item[_ngcontent-%COMP%], .flag-item[_ngcontent-%COMP%], .map-item[_ngcontent-%COMP%], .last-item[_ngcontent-%COMP%]{background-color:#0000}.mode-map-duration[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:left;letter-spacing:1px}.mode-text[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.9rem;font-weight:700;text-shadow:2px 2px 4px rgba(0,0,0,.25);color:var(--yellow-brand)}.map-duration[_ngcontent-%COMP%]{display:flex;flex-direction:column;line-height:1}.small-icon[_ngcontent-%COMP%]{font-size:1rem;width:auto;height:auto}.map-icon[_ngcontent-%COMP%]{max-width:6rem;max-height:6rem;width:auto;height:auto}.map-text[_ngcontent-%COMP%], .duration-text[_ngcontent-%COMP%], .date-text[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.8rem;text-shadow:2px 2px 4px rgba(0,0,0,.25);gap:.3rem;color:#ddd}.last-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.player-item[_ngcontent-%COMP%], .diff-item[_ngcontent-%COMP%]{align-items:center}.diff-min[_ngcontent-%COMP%]{display:flex;height:2rem;align-items:center}.flag-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center}.flag-min[_ngcontent-%COMP%]{width:2rem;height:2rem}.map-item[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.date-time-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;letter-spacing:1px;line-height:1;gap:.5rem}.date-time[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;gap:.2rem}.date-text[_ngcontent-%COMP%]{text-align:right;font-size:.8rem}.match-details-box[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.8rem;text-shadow:2px 2px 4px rgba(0,0,0,.25);gap:.3rem;background-color:#45454580;border-radius:5px;padding:.2rem .5rem;box-shadow:2px 2px 4px #0000001a;max-width:-moz-fit-content;max-width:fit-content;white-space:nowrap}.match-details-box[_ngcontent-%COMP%]:hover{background-color:var(--yellow-brand-hover);cursor:pointer}.versus[_ngcontent-%COMP%]{display:none}.grid-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:15% 8% 8% 8% 8% 8% 10% 8% 8% minmax(0,1fr);overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--yellow-brand-hover) transparent}.grid-container[_ngcontent-%COMP%]::-webkit-scrollbar{height:6px}.grid-container[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.grid-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:var(--yellow-brand-hover);border-radius:10px;border:1px solid transparent}.grid-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:var(--yellow-brand-hover)}.grid-row[_ngcontent-%COMP%]{display:contents}.grid-row[_ngcontent-%COMP%]:hover > .detail-text[_ngcontent-%COMP%], .grid-row[_ngcontent-%COMP%]:hover > .detail-text-player[_ngcontent-%COMP%], .grid-row[_ngcontent-%COMP%]:hover > .detail-text-opponent[_ngcontent-%COMP%], .grid-row[_ngcontent-%COMP%]:hover > .badge-icons[_ngcontent-%COMP%]{color:#ddd;background-color:var(--yellow-brand-hover);font-weight:700;text-shadow:none}.detail-column-header[_ngcontent-%COMP%], .detail-text[_ngcontent-%COMP%], .badge-icons[_ngcontent-%COMP%]{padding:.5rem;text-align:center}.detail-column-header[_ngcontent-%COMP%]{color:#ddd;text-shadow:2px 2px 4px rgba(0,0,0,.25);font-family:"Source Sans 3";font-weight:700;font-size:.8rem;background-color:#18181880;word-wrap:break-word;display:flex;align-items:end;justify-content:center}.detail-text-player[_ngcontent-%COMP%], .detail-text-opponent[_ngcontent-%COMP%], .detail-text[_ngcontent-%COMP%]{font-size:1rem;letter-spacing:.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:2px 2px 4px rgba(0,0,0,.25)}.detail-text-player[_ngcontent-%COMP%], .detail-text-opponent[_ngcontent-%COMP%]{padding:.5rem;text-align:left;font-weight:700}.detail-text[_ngcontent-%COMP%]{color:#ddd}.winner[_ngcontent-%COMP%]{color:#22c55e;background-color:#22c55e1a}.loser[_ngcontent-%COMP%]{color:#ef4444;background-color:#ef44441a}.badge-icons[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:4px;border:none}.badge-icons[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:20px;height:20px}.end-section-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;background-color:#4545454d;box-shadow:0 -2px 4px #00000040;border-bottom-left-radius:5px;border-bottom-right-radius:5px;padding-top:1rem;padding-right:1rem;padding-bottom:.2rem}.pager[_ngcontent-%COMP%]{color:gray;text-shadow:2px 2px 4px rgba(0,0,0,.25);text-align:right;font-size:.8rem}@media (max-width: 1300px){.recent-games-container[_ngcontent-%COMP%]{padding:1rem}.date-time[_ngcontent-%COMP%]{flex-direction:row!important;gap:.5rem!important}.match-row[_ngcontent-%COMP%]{grid-template-columns:auto auto;grid-template-rows:auto auto}.first-item[_ngcontent-%COMP%], .last-item[_ngcontent-%COMP%]{grid-column:span 1;grid-row:1}.middle-items[_ngcontent-%COMP%]{grid-column:span 2;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) 3rem 2rem 6rem 2rem 3rem minmax(0,1fr)}}@media (max-width: 800px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:8rem 4rem 4rem 4rem 4rem 4rem 4rem 4rem 4rem 8rem}.detail-text-player[_ngcontent-%COMP%], .detail-text-opponent[_ngcontent-%COMP%], .detail-text[_ngcontent-%COMP%]{font-size:.8rem}.badge-icons[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:14px;height:14px}}@media (max-width: 700px){.map-item[_ngcontent-%COMP%]{display:none}.versus[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;color:#ddd}.middle-items[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr) 2rem 1.5rem 2rem 1.5rem 2rem minmax(0,1fr)}.diff-min[_ngcontent-%COMP%], .player-item[_ngcontent-%COMP%]{font-size:.8rem}}@media (max-width: 480px){.diff-item[_ngcontent-%COMP%]{display:none}.middle-items[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr) 1.5rem 2rem 1.5rem minmax(0,1fr)}}']})}return s})()},3840:(rt,A,r)=>{r.d(A,{y:()=>W});var n=r(467),h=r(6604),x=r(9417),t=r(9172),G=r(152),X=r(6354),e=r(4438),m=r(2427),S=r(265),V=r(4710),y=r(4506),w=r(216),u=r(177),C=r(9159),I=r(6467),$=r(9631),B=r(9213),D=r(850),U=r(6600),j=r(4823),N=r(3044);let K=(()=>{class a{transform(o){return o?"#"+o:""}static#t=this.\u0275fac=function(p){return new(p||a)};static#e=this.\u0275pipe=e.EJ8({name:"rankFormat",type:a,pure:!0})}return a})();const k=(a,_)=>({"inactive-icon":a,"active-icon":_});function tt(a,_){if(1&a&&e.nrm(0,"img",42),2&a){const o=e.XpG(2);e.FS9("matTooltip",o.getCountryName()),e.Y8G("src",o.flag,e.B4B)}}function et(a,_){if(1&a){const o=e.RV6();e.j41(0,"div",43),e.bIt("click",function(R){e.eBV(o);const b=e.XpG(2);return e.Njj(b.navigateToClanDetails(b.clan,R))}),e.j41(1,"span",44),e.EFF(2),e.k0s()()}if(2&a){const o=e.XpG(2);e.R7$(2),e.JRh(o.clan)}}function H(a,_){if(1&a&&(e.j41(0,"div",45),e.EFF(1),e.k0s()),2&a){const o=e.XpG(2);e.R7$(),e.SpI(" ",o.clanFullName," ")}}function nt(a,_){if(1&a&&(e.qex(0),e.j41(1,"div",47),e.nrm(2,"img",48),e.j41(3,"div",49),e.EFF(4),e.k0s()(),e.bVm()),2&a){const o=e.XpG(3);e.R7$(2),e.FS9("src",o.civFlagUrl2,e.B4B),e.Mz_("alt","",o.player.rateCiv2,"%"),e.Mz_("title","Usage Percentage: ",o.player.rateCiv2,"%"),e.R7$(2),e.SpI("",o.player.rateCiv2,"%")}}function Q(a,_){if(1&a&&(e.qex(0),e.j41(1,"div",47),e.nrm(2,"img",48),e.j41(3,"div",49),e.EFF(4),e.k0s()(),e.bVm()),2&a){const o=e.XpG(3);e.R7$(2),e.FS9("src",o.civFlagUrl3,e.B4B),e.Mz_("alt","",o.player.rateCiv3,"%"),e.Mz_("title","Usage Percentage: ",o.player.rateCiv3,"%"),e.R7$(2),e.SpI("",o.player.rateCiv3,"%")}}function Z(a,_){if(1&a&&(e.qex(0),e.j41(1,"div",47),e.nrm(2,"img",48),e.j41(3,"div",49),e.EFF(4),e.k0s()(),e.bVm()),2&a){const o=e.XpG(3);e.R7$(2),e.FS9("src",o.civFlagUrl4,e.B4B),e.Mz_("alt","",o.player.rateCiv4,"%"),e.Mz_("title","Usage Percentage: ",o.player.rateCiv4,"%"),e.R7$(2),e.SpI("",o.player.rateCiv4,"%")}}function q(a,_){if(1&a&&(e.qex(0),e.j41(1,"div",47),e.nrm(2,"img",48),e.j41(3,"div",49),e.EFF(4),e.k0s()(),e.bVm()),2&a){const o=e.XpG(3);e.R7$(2),e.FS9("src",o.civFlagUrl5,e.B4B),e.Mz_("alt","",o.player.rateCiv5,"%"),e.Mz_("title","Usage Percentage: ",o.player.rateCiv5,"%"),e.R7$(2),e.SpI("",o.player.rateCiv5,"%")}}function z(a,_){if(1&a&&(e.qex(0),e.j41(1,"div",47),e.nrm(2,"img",48),e.j41(3,"div",49),e.EFF(4),e.k0s()(),e.bVm()),2&a){const o=e.XpG(3);e.R7$(2),e.FS9("src",o.civFlagUrl6,e.B4B),e.Mz_("alt","",o.player.rateCiv6,"%"),e.Mz_("title","Usage Percentage: ",o.player.rateCiv6,"%"),e.R7$(2),e.SpI("",o.player.rateCiv6,"%")}}function J(a,_){if(1&a&&(e.qex(0),e.j41(1,"div",47),e.nrm(2,"img",48),e.j41(3,"div",49),e.EFF(4),e.k0s()(),e.bVm()),2&a){const o=e.XpG(3);e.R7$(2),e.FS9("src",o.civFlagUrl7,e.B4B),e.Mz_("alt","",o.player.rateCiv7,"%"),e.Mz_("title","Usage Percentage: ",o.player.rateCiv7,"%"),e.R7$(2),e.SpI("",o.player.rateCiv7,"%")}}function Y(a,_){if(1&a&&(e.qex(0),e.j41(1,"div",46),e.qex(2),e.j41(3,"div",47),e.nrm(4,"img",48),e.j41(5,"div",49),e.EFF(6),e.k0s()(),e.bVm(),e.DNE(7,nt,5,6,"ng-container",16)(8,Q,5,6,"ng-container",16)(9,Z,5,6,"ng-container",16)(10,q,5,6,"ng-container",16)(11,z,5,6,"ng-container",16)(12,J,5,6,"ng-container",16),e.k0s(),e.bVm()),2&a){const o=e.XpG(2);e.R7$(4),e.FS9("src",o.civFlagUrl1,e.B4B),e.Mz_("alt","",o.player.rateCiv1,"%"),e.Mz_("title","Usage Percentage: ",o.player.rateCiv1,"%"),e.R7$(2),e.SpI("",o.player.rateCiv1,"%"),e.R7$(),e.Y8G("ngIf",o.player.rateCiv2),e.R7$(),e.Y8G("ngIf",o.player.rateCiv3),e.R7$(),e.Y8G("ngIf",o.player.rateCiv4),e.R7$(),e.Y8G("ngIf",o.player.rateCiv5),e.R7$(),e.Y8G("ngIf",o.player.rateCiv6),e.R7$(),e.Y8G("ngIf",o.player.rateCiv7)}}function ct(a,_){if(1&a&&(e.j41(0,"mat-option",50),e.EFF(1),e.k0s()),2&a){const o=_.$implicit;e.Y8G("value",o.name),e.R7$(),e.SpI(" ",o.name," ")}}function T(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Mode"),e.k0s())}function f(a,_){if(1&a&&(e.j41(0,"td",52),e.EFF(1),e.k0s()),2&a){const o=_.$implicit,p=e.XpG(2);e.R7$(),e.SpI(" ",p.getGameMode(o.gameMode)," ")}}function E(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Rank"),e.k0s())}function l(a,_){if(1&a&&(e.j41(0,"td",52),e.EFF(1),e.nI1(2,"rankFormat"),e.k0s()),2&a){const o=_.$implicit;e.R7$(),e.SpI(" ",o.rankActive?e.bMT(2,1,o.rankActive):"-"," ")}}function d(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Rating"),e.k0s())}function M(a,_){if(1&a&&(e.j41(0,"td",52),e.EFF(1),e.k0s()),2&a){const o=_.$implicit;e.R7$(),e.JRh(o.rating||"-")}}function L(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Games"),e.k0s())}function s(a,_){if(1&a&&(e.j41(0,"td",52),e.EFF(1),e.k0s()),2&a){const o=_.$implicit;e.R7$(),e.SpI(" ",o.wins+o.losses+o.disconnections," ")}}function v(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Wins"),e.k0s())}function i(a,_){if(1&a&&(e.j41(0,"td",52),e.EFF(1),e.k0s()),2&a){const o=_.$implicit;e.R7$(),e.JRh(o.wins)}}function c(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Losses"),e.k0s())}function g(a,_){if(1&a&&(e.j41(0,"td",52),e.EFF(1),e.k0s()),2&a){const o=_.$implicit;e.R7$(),e.SpI(" ",o.losses+o.disconnections," ")}}function F(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Streak"),e.k0s())}function P(a,_){if(1&a&&(e.j41(0,"div",54)(1,"span",55),e.nrm(2,"ng-icon",56),e.k0s(),e.EFF(3),e.k0s()),2&a){const o=e.XpG().$implicit;e.R7$(3),e.SpI("",o.streak," ")}}function O(a,_){if(1&a&&(e.j41(0,"div",57)(1,"span",55),e.nrm(2,"ng-icon",58),e.k0s(),e.EFF(3),e.k0s()),2&a){const o=e.XpG().$implicit;e.R7$(3),e.SpI(" ",-o.streak," ")}}function dt(a,_){if(1&a&&(e.j41(0,"td",52),e.DNE(1,P,4,1,"div",53)(2,O,4,1,"ng-template",null,1,e.C5r),e.k0s()),2&a){const o=_.$implicit,p=e.sdS(3);e.R7$(),e.Y8G("ngIf",o.streak>0)("ngIfElse",p)}}function gt(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Win Rate"),e.k0s())}function mt(a,_){if(1&a&&(e.j41(0,"span",54),e.EFF(1),e.k0s()),2&a){const o=e.XpG().$implicit,p=e.XpG(2);e.R7$(),e.SpI(" ",p.getWinRatio(o.wins,o.losses,o.disconnections),"% ")}}function _t(a,_){if(1&a&&(e.j41(0,"div",57),e.EFF(1),e.k0s()),2&a){const o=e.XpG().$implicit,p=e.XpG(2);e.R7$(),e.SpI(" ",p.getWinRatio(o.wins,o.losses,o.disconnections),"% ")}}function ft(a,_){if(1&a&&(e.j41(0,"td",52),e.DNE(1,mt,2,1,"span",59)(2,_t,2,1,"div",60),e.k0s()),2&a){const o=_.$implicit;e.R7$(),e.Y8G("ngIf",o.wins>=o.losses+o.disconnections),e.R7$(),e.Y8G("ngIf",o.wins<o.losses+o.disconnections)}}function it(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Max Elo"),e.k0s())}function st(a,_){if(1&a&&(e.j41(0,"td",52),e.EFF(1),e.k0s()),2&a){const o=_.$implicit;e.R7$(),e.JRh(o.ratingMax)}}function ht(a,_){1&a&&(e.j41(0,"th",51),e.EFF(1,"Max Streak"),e.k0s())}function ut(a,_){if(1&a&&(e.j41(0,"td",52),e.EFF(1),e.k0s()),2&a){const o=_.$implicit;e.R7$(),e.JRh(o.streakMax)}}function pt(a,_){1&a&&e.nrm(0,"tr",61)}function lt(a,_){1&a&&e.nrm(0,"tr",62)}function ot(a,_){if(1&a){const o=e.RV6();e.j41(0,"div",3)(1,"div",4),e.nrm(2,"img",5),e.j41(3,"div",6)(4,"div",7),e.nrm(5,"img",8),e.j41(6,"div",9)(7,"div",10)(8,"div",11),e.DNE(9,tt,1,2,"img",12),e.j41(10,"div"),e.EFF(11),e.k0s()(),e.DNE(12,et,3,1,"div",13),e.k0s(),e.DNE(13,H,2,1,"div",14),e.k0s()(),e.j41(14,"div",15),e.DNE(15,Y,13,12,"ng-container",16),e.k0s()()(),e.j41(16,"div",17)(17,"div",18)(18,"div",19),e.EFF(19,"Current Ratings"),e.k0s(),e.j41(20,"mat-form-field",20)(21,"mat-label"),e.EFF(22,"Search Player"),e.k0s(),e.j41(23,"mat-icon",21),e.EFF(24,"search"),e.k0s(),e.j41(25,"input",22),e.bIt("focus",function(){e.eBV(o);const R=e.XpG();return e.Njj(R.onFocus())})("blur",function(){e.eBV(o);const R=e.XpG();return e.Njj(R.onBlur())})("input",function(R){e.eBV(o);const b=e.XpG();return e.Njj(b.onSearched(R))}),e.k0s(),e.j41(26,"mat-autocomplete",23,0),e.bIt("optionSelected",function(R){e.eBV(o);const b=e.XpG();return e.Njj(b.onPlayerSelected(R.option.value))}),e.DNE(28,ct,2,2,"mat-option",24),e.nI1(29,"async"),e.k0s()()(),e.j41(30,"div",25)(31,"table",26),e.qex(32,27),e.DNE(33,T,2,0,"th",28)(34,f,2,1,"td",29),e.bVm(),e.qex(35,30),e.DNE(36,E,2,0,"th",28)(37,l,3,3,"td",29),e.bVm(),e.qex(38,31),e.DNE(39,d,2,0,"th",28)(40,M,2,1,"td",29),e.bVm(),e.qex(41,32),e.DNE(42,L,2,0,"th",28)(43,s,2,1,"td",29),e.bVm(),e.qex(44,33),e.DNE(45,v,2,0,"th",28)(46,i,2,1,"td",29),e.bVm(),e.qex(47,34),e.DNE(48,c,2,0,"th",28)(49,g,2,1,"td",29),e.bVm(),e.qex(50,35),e.DNE(51,F,2,0,"th",28)(52,dt,4,2,"td",29),e.bVm(),e.qex(53,36),e.DNE(54,gt,2,0,"th",28)(55,ft,3,2,"td",29),e.bVm(),e.qex(56,37),e.DNE(57,it,2,0,"th",28)(58,st,2,1,"td",29),e.bVm(),e.qex(59,38),e.DNE(60,ht,2,0,"th",28)(61,ut,2,1,"td",29),e.bVm(),e.DNE(62,pt,1,0,"tr",39)(63,lt,1,0,"tr",40),e.k0s()(),e.j41(64,"div",41),e.EFF(65,"\xa0"),e.k0s()()()}if(2&a){const o=e.sdS(27),p=e.XpG();e.R7$(2),e.FS9("src",p.avatarlUrl,e.B4B),e.R7$(3),e.FS9("src",p.avatarlUrl,e.B4B),e.R7$(4),e.Y8G("ngIf",p.flag),e.R7$(2),e.JRh(p.name),e.R7$(),e.Y8G("ngIf",p.clan),e.R7$(),e.Y8G("ngIf",p.clanFullName),e.R7$(2),e.Y8G("ngIf",p.player.rateCiv1),e.R7$(8),e.Y8G("ngClass",e.l_i(16,k,!p.isInputActive,p.isInputActive)),e.R7$(2),e.Y8G("formControl",p.searchControl)("matAutocomplete",o),e.R7$(3),e.Y8G("ngForOf",e.bMT(29,14,p.filteredPlayers)),e.R7$(3),e.Y8G("dataSource",p.player.playerElo),e.R7$(31),e.Y8G("matHeaderRowDef",p.displayedColumns),e.R7$(),e.Y8G("matRowDefColumns",p.displayedColumns)}}let W=(()=>{class a{constructor(o,p,R,b,at){this.leaderboardService=o,this.profileService=p,this.router=R,this.countryService=b,this.dialogService=at,this.searchControl=new x.MJ,this.subscriptions=[],this.player={id:0,idPlayer:0,clan:"",name:"",idSteam:"",twitchURL:"",youtubeURL:"",liquipediaURL:"",discordURL:"",country:"",v:-1,twr:-1,wlr:-1,ai:-1,ac:-1,topCiv1:-1,topCiv2:-1,topCiv3:-1,topCiv4:-1,topCiv5:-1,topCiv6:-1,topCiv7:-1,rateCiv1:-1,rateCiv2:-1,rateCiv3:-1,rateCiv4:-1,rateCiv5:-1,rateCiv6:-1,rateCiv7:-1,playerElo:[]},this.displayedColumns=["mode","rank","rating","games","wins","losses","streak","winRate","maxElo","maxStreak"],this.isInputActive=!1,this.playersAll=[],this.search="",this.countries=[],this.flag=""}ngOnChanges(o){this.ngOnInit()}ngOnInit(){var o=this;return(0,n.A)(function*(){o.subscriptions.push(o.countryService.getCountries().subscribe(p=>{o.countries=p,o.getPlayerCountry()})),o.avatarlUrl="",o.subscriptions.push(o.profileService.getProfileList(o.idPlayer).subscribe({next:o.handleResponse.bind(o),error:o.handleError.bind(o)})),o.subscriptions.push(o.leaderboardService.getLeaderboard(1).subscribe(p=>{o.playersAll=p,o.filterData()})),o.filteredPlayers=o.searchControl.valueChanges.pipe((0,t.Z)(""),(0,G.B)(300),(0,X.T)(p=>o._filterPlayers(p)))})()}_filterPlayers(o){if(!this.playersAll||o.length<1)return[];const p=o.toLowerCase();return this.playersAll.filter(R=>R.name.toLowerCase().includes(p))}filterData(){let o=this.search;o&&(this.playersAll=this.playersAll.filter(p=>p.name.toLowerCase().includes(o.toLowerCase())))}getPlayerCountry(){if(!this.countries||!this.player)return;const o=this.countries.find(p=>p.alpha2Code?.toUpperCase()===this.player.country?.toUpperCase());o&&(this.flag=o.flag)}getCountryName(){if(!this.countries||!this.player)return"";const o=this.countries.find(p=>p.alpha2Code?.toUpperCase()===this.player.country?.toUpperCase());return o?o.name:""}onPlayerSelected(o){var R=this.playersAll.find(b=>b.name===o)?.idPlayer;R&&(window.scrollTo(0,0),this.router.navigate(["/profile"],{queryParams:{idPlayer:R}}))}handleResponse(o){if(!o||null==o.playerInfos)return void this.dialogService.showWarning("Player not found","The profile page is available only for active ranked ladder players.","OK",!0);this.player=o.playerInfos,this.getPlayerCountry();const R={};[1,8,9,2,3,4,5,6].forEach((b,at)=>{R[b]=at}),this.player.playerElo.sort((b,at)=>R[b.gameMode]-R[at.gameMode]),this.name=this.player.name,this.clan=this.player.clan,this.clanFullName=o.clanInfo?o.clanInfo.clanFullName:"",this.player.topCiv1&&(0,h.sQ)(this.player.topCiv1)&&(this.civFlagUrl1=(0,h.sQ)(this.player.topCiv1)),this.player.topCiv2&&(0,h.sQ)(this.player.topCiv2)&&(this.civFlagUrl2=(0,h.sQ)(this.player.topCiv2)),this.player.topCiv3&&(0,h.sQ)(this.player.topCiv3)&&(this.civFlagUrl3=(0,h.sQ)(this.player.topCiv3)),this.player.topCiv4&&(0,h.sQ)(this.player.topCiv4)&&(this.civFlagUrl4=(0,h.sQ)(this.player.topCiv4)),this.player.topCiv5&&(0,h.sQ)(this.player.topCiv5)&&(this.civFlagUrl5=(0,h.sQ)(this.player.topCiv5)),this.player.topCiv6&&(0,h.sQ)(this.player.topCiv6)&&(this.civFlagUrl6=(0,h.sQ)(this.player.topCiv6)),this.player.topCiv7&&(0,h.sQ)(this.player.topCiv7)&&(this.civFlagUrl7=(0,h.sQ)(this.player.topCiv7)),this.player.playerElo.forEach(b=>{1==b.gameMode&&(this.Stat1v1rank=b.rankActive,this.Stat1v1rating=b.rating,this.Stat1v1ratingMax=b.ratingMax,this.Stat1v1wins=b.wins,this.Stat1v1losses=b.losses+b.disconnections,this.Stat1v1streak=b.streak,this.Stat1v1streakMax=b.streakMax)}),this.avatarlUrl=(0,h.FA)(this.player.ai,this.player.ac)}handleError(o){console.log("Failed loading profileService",o)}getGameMode(o){switch(o){case 1:return"Solo";case 2:return"Team";case 3:return"Treaty";case 4:return"DM";case 5:return"EW Solo";case 6:return"EW team";case 8:return"2v2";case 9:return"3v3";case 10:return"4v4";default:return"-"}}onlyGameModeOne(){return this.player.playerElo.every(o=>1===o.gameMode)}existsGameModeOne(){return this.player.playerElo.some(o=>1===o.gameMode)}getWinRatio(o,p,R){var b=o+p+R;return b=o/b,b*=100,Math.trunc(b).toString()}navigateToClanDetails(o,p){p.stopPropagation(),this.router.navigate(["/clan-details"],{queryParams:{clanAbbreviation:o}})}onFocus(){this.isInputActive=!0}onBlur(){this.isInputActive=!1}onSearched(o){var R=o.target.value;R.length>=1&&(this.search=R)}ngOnDestroy(){this.subscriptions.forEach(o=>{o.unsubscribe()})}static#t=this.\u0275fac=function(p){return new(p||a)(e.rXU(m.x),e.rXU(S.p),e.rXU(V.Ix),e.rXU(y.o),e.rXU(w.o))};static#e=this.\u0275cmp=e.VBU({type:a,selectors:[["app-player-profile"]],inputs:{idPlayer:"idPlayer",search:"search",autoCompleteSelection:"autoCompleteSelection"},features:[e.OA$],decls:1,vars:1,consts:[["auto","matAutocomplete"],["elseBlock",""],["class","player-container",4,"ngIf"],[1,"player-container"],[2,"display","flex","gap","1rem"],[1,"avatar",3,"src"],[1,"profile-info-container"],[1,"player-clan-container"],[1,"avatar-550",3,"src"],[1,"player-clan-550"],[1,"player-tag-container"],[1,"player-name"],["class","country",3,"src","matTooltip",4,"ngIf"],["class","clan-tag-box",3,"click",4,"ngIf"],["class","clan-full",4,"ngIf"],[1,"civs-container"],[4,"ngIf"],[1,"rating-container"],[1,"title-container"],[1,"section-title"],["appearance","outline","subscriptSizing","dynamic",1,"small"],["matSuffix","",3,"ngClass"],["matInput","",3,"focus","blur","input","formControl","matAutocomplete"],[3,"optionSelected"],[3,"value",4,"ngFor","ngForOf"],[1,"table-overflow"],["mat-table","",3,"dataSource"],["matColumnDef","mode"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","rank"],["matColumnDef","rating"],["matColumnDef","games"],["matColumnDef","wins"],["matColumnDef","losses"],["matColumnDef","streak"],["matColumnDef","winRate"],["matColumnDef","maxElo"],["matColumnDef","maxStreak"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","content-row",4,"matRowDef","matRowDefColumns"],[1,"end-section-container"],[1,"country",3,"src","matTooltip"],[1,"clan-tag-box",3,"click"],[1,"clan-tag"],[1,"clan-full"],[1,"flags"],[1,"flag-container"],[3,"src","alt","title"],[1,"flag-over-text"],[3,"value"],["mat-header-cell",""],["mat-cell",""],["class","up-trend",4,"ngIf","ngIfElse"],[1,"up-trend"],[1,"icon"],["name","heroArrowUpRight"],[1,"down-trend"],["name","heroArrowDownRight"],["class","up-trend",4,"ngIf"],["class","down-trend",4,"ngIf"],["mat-header-row",""],["mat-row","",1,"content-row"]],template:function(p,R){1&p&&e.DNE(0,ot,66,19,"div",2),2&p&&e.Y8G("ngIf",R.player)},dependencies:[u.YU,u.Sq,u.bT,C.Zl,C.tL,C.ji,C.cC,C.YV,C.iL,C.KS,C.$R,C.YZ,C.NB,I.rl,I.nJ,I.yw,$.fg,B.An,D.$3,U.wT,D.pN,j.oV,x.me,x.BC,x.l_,N.$e,u.Jj,K],styles:['.player-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;gap:1rem}.search-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.avatar[_ngcontent-%COMP%]{display:flex;width:clamp(6rem,20vw,15rem);border:1px solid var(--yellow-brand);border-radius:5px;box-shadow:0 0 5px 5px #00000040;align-self:center}.avatar-550[_ngcontent-%COMP%]{display:none}.profile-info-container[_ngcontent-%COMP%]{display:flex;flex:1;flex-direction:column;justify-content:space-between}.player-clan-container[_ngcontent-%COMP%], .player-clan-550[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.player-name[_ngcontent-%COMP%]{display:flex;gap:.2rem;align-items:center;color:#fff;text-shadow:#000000 2px 2px 2px;font-variant:normal;font-family:"Source Sans 3";font-size:clamp(1.2rem,4vw,3.5rem);font-style:normal;font-weight:600;line-height:1}.player-tag-container[_ngcontent-%COMP%]{display:flex;gap:2rem;align-items:center}.country[_ngcontent-%COMP%]{max-width:clamp(2rem,4vw,4rem);min-width:clamp(2rem,4vw,4rem);height:auto;margin-right:.3rem;box-shadow:2px 2px 4px #00000040}.clan-tag-box[_ngcontent-%COMP%]{display:flex;background-color:#4545451a;padding:.2rem .5rem;border-radius:5px;box-shadow:2px 2px 4px #0000001a}.clan-tag-box[_ngcontent-%COMP%]:hover{background-color:var(--yellow-brand-hover);cursor:pointer}.clan-tag-box[_ngcontent-%COMP%]:active{scale:.95}.clan-tag[_ngcontent-%COMP%]{font-family:Trajan Pro;font-size:clamp(.8rem,2vw,1.5rem);animation-name:_ngcontent-%COMP%_change-color;animation-duration:15s;animation-iteration-count:infinite;background:linear-gradient(180deg,#fcf0ae,#ffbe00);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;text-shadow:2px 2px 4px rgba(0,0,0,.25)}.clan-full[_ngcontent-%COMP%]{color:#ccc;font-size:clamp(.5rem,2vw,1.2rem);letter-spacing:1px}.civs-container[_ngcontent-%COMP%]{display:flex}.flags[_ngcontent-%COMP%]{display:flex;gap:clamp(.2rem,20vw,.7rem);margin-top:.3rem;margin-bottom:.3rem}.flag-container[_ngcontent-%COMP%]{position:relative;display:inline-block}.flag-over-text[_ngcontent-%COMP%]{position:absolute;color:#fff;bottom:.1rem;right:.1rem;font-size:clamp(.5rem,20vw,1rem);text-shadow:#000000 2px 2px 2px;font-family:"Source Sans 3";font-weight:500;line-height:1;z-index:1;padding:.3rem .4rem .2rem}.flag-over-text[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;background-color:#535353d0;z-index:-1;border-radius:inherit;border-radius:5px}.flags[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:8rem;height:auto;border-radius:5px;box-shadow:2px 2px 4px #00000040}.inactive-icon[_ngcontent-%COMP%]{color:gray}.active-icon[_ngcontent-%COMP%]{color:var(--yellow-brand)}.rating-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:5px}.title-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;border-top-left-radius:5px;border-top-right-radius:5px;background-color:#4545454d;box-shadow:0 2px 4px #00000040;align-items:center;padding:1rem;flex-wrap:wrap}.section-title[_ngcontent-%COMP%]{font-family:Trajan Pro;font-size:clamp(.8rem,4vw,1rem);color:#ddd;text-shadow:2px 2px 4px black;white-space:nowrap}.table-overflow[_ngcontent-%COMP%]{overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--yellow-brand-hover) transparent}.table-overflow[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar{height:6px}.table-overflow[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.table-overflow[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:var(--yellow-brand-hover);border-radius:10px;border:1px solid transparent}.table-overflow[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:var(--yellow-brand-hover)}table[_ngcontent-%COMP%]{width:100%;table-layout:auto;background-color:#1818181a}th[_ngcontent-%COMP%]{font-family:Trajan Pro;font-size:1rem;color:var(--yellow-brand);text-shadow:2px 2px 4px #00000025;background-color:#1818180d}.content-row[_ngcontent-%COMP%]{font-family:"Source Sans 3";font-size:1rem}.content-row[_ngcontent-%COMP%]:hover{background-color:#a1a19e1a}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{word-wrap:break-word;white-space:nowrap;vertical-align:middle;border:none;text-align:center}.end-section-container[_ngcontent-%COMP%]{background-color:#4545454d;box-shadow:0 -2px 4px #00000040;border-bottom-left-radius:5px;border-bottom-right-radius:5px}@media (max-width: 1300px){.player-container[_ngcontent-%COMP%]{padding:1rem}.player-profile[_ngcontent-%COMP%]{flex-direction:column-reverse}}@media only screen and (max-width: 900px){.player-name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden}}@media only screen and (max-width: 800px){.avatar[_ngcontent-%COMP%]{display:none}.player-clan-container[_ngcontent-%COMP%]{flex-direction:row}.player-clan-550[_ngcontent-%COMP%]{display:flex;flex-direction:column;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar-550[_ngcontent-%COMP%]{display:flex;width:5rem;border:1px solid var(--yellow-brand);border-radius:5px;box-shadow:0 0 5px 5px #00000040}.civs-container[_ngcontent-%COMP%]{margin-top:.5rem}.flag-over-text[_ngcontent-%COMP%]{font-size:.9rem;padding:.2rem .3rem .1rem}}@media only screen and (max-width: 500px){.search-container[_ngcontent-%COMP%]{justify-content:center}.player-tag-container[_ngcontent-%COMP%]{flex-direction:column;gap:.5rem;align-items:flex-start}.flag-over-text[_ngcontent-%COMP%]{font-size:clamp(.7rem,2vw,.8rem);bottom:-.3rem;right:-.3rem}.flag-over-text[_ngcontent-%COMP%]:before{display:inline-block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%}}@keyframes _ngcontent-%COMP%_change-color{0%{color:#feefc6}25%{color:#fdd771}50%{color:var(--yellow-brand)}75%{color:#fdd771}to{color:#feefc6}}']})}return a})()},187:(rt,A,r)=>{r.d(A,{t:()=>V});var n=r(9763);n.t1.register(...n.$L);var x=r(7586),t=r.n(x);const G={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};n.ij._date.override("function"==typeof t()?{_id:"moment",formats:function(){return G},parse:function(y,w){return"string"==typeof y&&"string"==typeof w?y=t()(y,w):y instanceof t()||(y=t()(y)),y.isValid()?y.valueOf():null},format:function(y,w){return t()(y).format(w)},add:function(y,w,u){return t()(y).add(w,u).valueOf()},diff:function(y,w,u){return t()(y).diff(t()(w),u)},startOf:function(y,w,u){return y=t()(y),"isoWeek"===w?(u=Math.trunc(Math.min(Math.max(0,u),6)),y.isoWeekday(u).startOf("day").valueOf()):y.startOf(w).valueOf()},endOf:function(y,w){return t()(y).endOf(w).valueOf()}}:{}),r(1800);var e=r(4438),m=r(265);let V=(()=>{class y{constructor(u){this.profileService=u,this.minElo=3e3,this.maxElo=0,x.locale("en-gb")}ngOnInit(){this.subscription=this.profileService.getRatingHistory(this.idPlayer).subscribe({next:this.handleResponse.bind(this),error:this.handleError.bind(this)})}ngOnChanges(u){this.ngOnInit()}handleResponse(u){let C=[];const I=[...new Set(u.map(D=>D.gameMode))],$={1:{label:"Solo",color:"#FF5733"},8:{label:"2v2",color:"#00FFFF"},9:{label:"3v3",color:"#FFD700"},10:{label:"4v4",color:"#008080"},2:{label:"Team",color:"#00AEEF"},3:{label:"Treaty",color:"#FFC300"},4:{label:"DM",color:"#8B008B"},5:{label:"EW Solo",color:"#00FF7F"},6:{label:"EW Team",color:"#FF1493"}};I.sort((D,U)=>D-U),I.forEach(D=>{if(!$[D])return;let U=u.filter(k=>k.gameMode===D&&null!=k.eloAfter).map(k=>((null===this.minElo||k.eloAfter<this.minElo)&&(this.minElo=k.eloAfter),(null===this.maxElo||k.eloAfter>this.maxElo)&&(this.maxElo=k.eloAfter),{x:k.startDate,y:k.eloAfter})),j=$[D];var K=function S(y,w){return y=y.replace("#",""),"rgba("+parseInt(y.substring(0,2),16)+", "+parseInt(y.substring(2,4),16)+", "+parseInt(y.substring(4,6),16)+", "+w+")"}(j.color,"0.3");C.push({label:j.label,data:U,fill:!1,borderColor:j.color,backgroundColor:K,tension:.1,pointStyle:"rectRounded"})}),this.minElo-=5,this.maxElo+=5;const B=["Solo","2v2","3v3","4v4","Team","Treaty","DM","EW Solo","EW Team"];C.sort((D,U)=>B.indexOf(D.label)-B.indexOf(U.label)),this.ratings=C,this.createChart()}handleError(u){console.log("Failed loading profileService",u)}createChart(){this.chart?.destroy(),this.chart=new n.t1("MyChart",{type:"line",data:{datasets:this.ratings},options:{elements:{point:{borderWidth:0,radius:2,backgroundColor:"#00000000"},line:{borderWidth:window.innerWidth>1e3?3:1}},hover:{intersect:!0},interaction:{intersect:!0},plugins:{legend:{align:"center",title:{display:!0,text:"Game Modes"},labels:{boxWidth:this.calculateBoxWidth(window.innerWidth),usePointStyle:!0,color:"#ffc100",font:{size:this.calculateLegendFontSize(window.innerWidth),weight:"normal",family:"Source Sans 3"},padding:window.innerWidth>1e3?15:5},onClick:(u,C,I)=>{const $=C.datasetIndex;if(void 0===$)return;let B=!1;this.chart.data.datasets.forEach(j=>{j.hidden&&(B=!0)}),this.chart.data.datasets.forEach(!this.chart.data.datasets[$].hidden&&B?j=>{j.hidden=!1}:(j,N)=>{j.hidden=N!==$});const U=this.chart.data.datasets.filter(j=>!j.hidden);if(U.length>0){const j=U.flatMap(z=>z.data.map(J=>J.y)),N=Math.min(...j),K=Math.max(...j),k=100,tt=Math.floor(N/k)*k,et=Math.ceil(K/k)*k;this.chart.options.scales.y.min=tt,this.chart.options.scales.y.max=et;const H=this.chart.options.scales.y.max-this.chart.options.scales.y.min,nt=Math.ceil(N/k)*k,Q=Math.max(Math.ceil(H/k),2),Z=H/Q,q=Array.from({length:Q+1},(z,J)=>nt+J*Z);this.chart.options.scales.y.ticks={...this.chart.options.scales.y.ticks,maxTicksLimit:q.length,stepSize:Z,callback:z=>q.includes(z)?z.toString():""}}this.chart.update()}},tooltip:{callbacks:{label:u=>{if("object"==typeof u.raw&&null!==u.raw&&"x"in u.raw&&"y"in u.raw){const{x:C,y:I}=u.raw,U=window.innerWidth>1e3?"MMM DD YYYY":"DD/MM/YY";return`${u.dataset.label||""}: ${I} (${x(C).format(U)})`}return""}}}},scales:{x:{type:"time",time:{unit:"day",tooltipFormat:"ll",displayFormats:{day:window.innerWidth>1e3?"MMM DD YYYY":"DD/MM/YY",week:window.innerWidth>1e3?"MMM DD YYYY":"DD/MM/YY",month:window.innerWidth>1e3?"MMM YYYY":"MM/YY"}},ticks:{maxTicksLimit:window.innerWidth>1e3?10:5,autoSkip:!0,maxRotation:0,minRotation:0,callback:(u,C,I)=>{const $=x(u),B=x(I[0].value),D=x(I[I.length-1].value),U=x.duration(D.diff(B));return U.asDays()<=120?$.format("DD MMM"):U.asMonths()<=48?$.format("MMM YY"):$.format("YYYY")},font:{size:window.innerWidth>1e3?12:10,family:"Source Sans 3",weight:"bold"},color:"#ffc100"}},y:{min:this.minElo,max:this.maxElo,ticks:{stepSize:100,color:"#ffc100",font:{size:window.innerWidth>1e3?12:10,family:"Source Sans 3",weight:"bold"}}}},responsive:!0,maintainAspectRatio:!1}})}onResize(u){this.createChart()}calculateBoxWidth(u){return u<=480?12:u<=768?15:25}calculateLegendFontSize(u){return u<=480?10:u<=768?12:14}ngOnDestroy(){this.subscription?.unsubscribe()}static#t=this.\u0275fac=function(C){return new(C||y)(e.rXU(m.p))};static#e=this.\u0275cmp=e.VBU({type:y,selectors:[["app-rating-history"]],hostBindings:function(C,I){1&C&&e.bIt("resize",function(B){return I.onResize(B)},!1,e.tSv)},inputs:{idPlayer:"idPlayer"},features:[e.OA$],decls:8,vars:1,consts:[[1,"rating-history-container"],[1,"section-title"],[1,"chart-container"],["id","MyChart",1,"history-chart"],[1,"end-section-container"]],template:function(C,I){1&C&&(e.j41(0,"div",0)(1,"div",1),e.EFF(2,"Rating History"),e.k0s(),e.j41(3,"div",2)(4,"canvas",3),e.EFF(5),e.k0s()(),e.j41(6,"div",4),e.EFF(7,"\xa0"),e.k0s()()),2&C&&(e.R7$(5),e.JRh(I.chart))},styles:['.rating-history-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;font-family:"Source Sans 3"}.section-title[_ngcontent-%COMP%]{font-family:Trajan Pro;font-size:clamp(.8rem,4vw,1rem);color:#ddd;text-shadow:2px 2px 4px black;padding-top:1rem;padding-left:1rem;padding-bottom:1rem;border-top-left-radius:5px;border-top-right-radius:5px;background-color:#4545454d;box-shadow:0 2px 4px #00000040}.chart-container[_ngcontent-%COMP%]{display:flex;background-color:#1818181a;box-shadow:0 2px 4px #00000040;height:clamp(10rem,50vw,50rem)!important}.history-chart[_ngcontent-%COMP%]{display:flex;overflow-x:auto;padding-top:1rem}.end-section-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;background-color:#4545454d;box-shadow:0 -2px 4px #00000040;border-bottom-left-radius:5px;border-bottom-right-radius:5px}@media (max-width: 1300px){.rating-history-container[_ngcontent-%COMP%]{padding:1rem}}']})}return y})()},3364:(rt,A,r)=>{r.r(A),r.d(A,{PlayerProfileModule:()=>J});var n=r(177),h=r(9417),x=r(7315),t=r(7763),G=r(4710),X=r(467),e=r(9198),m=r(4438),S=r(728),V=r(265),y=r(7097),w=r(8925),u=r(3840),C=r(187);const I=["profile"],$=["matchs"];let B=(()=>{class Y{constructor(T,f,E,l){this.stringTableService=T,this.router=f,this.route=E,this.profileService=l,this.subscriptions=[],this.subscriptions.push(this.router.events.subscribe(d=>{d instanceof G.wF&&this.initialiseInvites()}))}ngOnInit(){var T=this;return(0,X.A)(function*(){T.stringTableService.setLanguage((0,e.xd)()),yield T.stringTableService.loadStringTable(),T.subscriptions.push(T.route.queryParams.subscribe(f=>{T.idPlayer=f.idPlayer}))})()}initialiseInvites(){this.subscriptions.push(this.route.queryParams.subscribe(T=>{this.idPlayer=T.idPlayer}))}ngOnDestroy(){this.subscriptions.forEach(T=>{T.unsubscribe()})}onSearchChanged(T){this.search=T}onAutoCompleteSelected(T){this.autoCompleteSelection=T}static#t=this.\u0275fac=function(f){return new(f||Y)(m.rXU(S.N),m.rXU(G.Ix),m.rXU(G.nX),m.rXU(V.p))};static#e=this.\u0275cmp=m.VBU({type:Y,selectors:[["app-player-profile-main"]],viewQuery:function(f,E){if(1&f&&(m.GBs(I,5),m.GBs($,5)),2&f){let l;m.mGM(l=m.lsd())&&(E.profile=l.first),m.mGM(l=m.lsd())&&(E.matchs=l.first)}},decls:22,vars:8,consts:[["profile",""],["matchs",""],[1,"custom-container"],[1,"main-heading-container"],[1,"main-heading"],[1,"dark-bg","rounded"],[3,"idPlayer","search","autoCompleteSelection"],[3,"idPlayer"],[1,"civ-count-container"],[1,"section-title"],[3,"idPlayer","isProfile"],[1,"end-section-container"]],template:function(f,E){1&f&&(m.j41(0,"div",2)(1,"div",3)(2,"h1",4),m.EFF(3,"Player Profile"),m.k0s()(),m.j41(4,"div",5),m.nrm(5,"app-player-profile",6,0)(7,"app-player-matches",7,1)(9,"app-rating-history",7),m.j41(10,"div",8)(11,"div",9),m.EFF(12,"Civilization Game Count"),m.k0s(),m.nrm(13,"app-winrate-and-game-count",10),m.j41(14,"div",11),m.EFF(15,"\xa0"),m.k0s()(),m.j41(16,"div",8)(17,"div",9),m.EFF(18,"Matchups Win Rate"),m.k0s(),m.nrm(19,"app-winrate-by-matchup",7),m.j41(20,"div",11),m.EFF(21,"\xa0"),m.k0s()()()()),2&f&&(m.R7$(5),m.Y8G("idPlayer",E.idPlayer)("search",E.search)("autoCompleteSelection",E.autoCompleteSelection),m.R7$(2),m.Y8G("idPlayer",E.idPlayer),m.R7$(2),m.Y8G("idPlayer",E.idPlayer),m.R7$(4),m.Y8G("idPlayer",E.idPlayer)("isProfile",!1),m.R7$(6),m.Y8G("idPlayer",E.idPlayer))},dependencies:[y.A,w.b,u.y,C.t,t._],styles:['.main-heading-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-wrap:wrap}.search-container[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:.5rem;margin-right:1rem;margin-left:1rem;align-items:end}.civ-count-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;font-family:"Source Sans 3"}.section-title[_ngcontent-%COMP%]{font-family:Trajan Pro;font-size:clamp(.8rem,4vw,1rem);color:#ddd;text-shadow:2px 2px 4px black;padding-top:1rem;padding-left:1rem;padding-bottom:1rem;border-top-left-radius:5px;border-top-right-radius:5px;background-color:#4545454d;box-shadow:0 2px 4px #00000040}.end-section-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;background-color:#4545454d;box-shadow:0 -2px 4px #00000040;border-bottom-left-radius:5px;border-bottom-right-radius:5px}']})}return Y})();var D=r(4978);const j=[{path:"",component:B},{path:"",component:r(7095).W,canActivate:[D.m]}];let N=(()=>{class Y{static#t=this.\u0275fac=function(f){return new(f||Y)};static#e=this.\u0275mod=m.$C({type:Y});static#n=this.\u0275inj=m.G2t({imports:[G.iI.forChild(j),G.iI]})}return Y})();var K=r(4719),k=r(8666),tt=r(9213),et=r(9183),H=r(4823),nt=r(4815),Q=r(5427),Z=r(3044),q=r(9031),z=r(1959);let J=(()=>{class Y{static#t=this.\u0275fac=function(f){return new(f||Y)};static#e=this.\u0275mod=m.$C({type:Y});static#n=this.\u0275inj=m.G2t({imports:[n.MD,N,x.G,K.G,h.YN,k.StatisticsModule]})}return Y})();m.wjB(t._,[n.Sq,n.bT,tt.An,et.LG,H.oV,nt.e,Q.I,Z.$e,q.w,z.Q],[])}}]);