-
Notifications
You must be signed in to change notification settings - Fork 0
/
main-es5.js.map
1 lines (1 loc) · 292 KB
/
main-es5.js.map
1
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACAA;AACA;AACE,SAJF;AAKA;;AACAC;AAA6C;AAAA,OAA7C;;AACAA;AACAA;AACAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRO,UAAMC,OAAM,GAAW,CAC5B;AAAEC,YAAI,EAAE,EAAR;AAAYC,kBAAU,EAAE,cAAxB;AAAwCC,iBAAS,EAAE;AAAnD,OAD4B,EAE5B;AAAEF,YAAI,EAAE,MAAR;AAAgBG,oBAAY,EAAE;AAAA,iBAAMC;AAAA;AAAA;AAAA;AAAA,kBAA6BC,IAA7B,CAAkC,WAAC;AAAA,mBAAIC,CAAC,CAACC,UAAN;AAAA,WAAnC,CAAN;AAAA;AAA9B,OAF4B,EAG5B;AAAEP,YAAI,EAAE,OAAR;AAAiBG,oBAAY,EAAE;AAAA,iBAAMK;AAAA;AAAA;AAAA;AAAA,kBAA+BH,IAA/B,CAAoC,WAAC;AAAA,mBAAIC,CAAC,CAACG,WAAN;AAAA,WAArC,CAAN;AAAA,SAA/B;AAA8FC,mBAAW,EAAE,CAACC,uDAAD;AAA3G,OAH4B,EAI5B;AAAEX,YAAI,EAAE,SAAR;AAAmBG,oBAAY,EAAE;AAAA,iBAAMC;AAAA;AAAA;AAAA;AAAA,kBAAmCC,IAAnC,CAAwC,WAAC;AAAA,mBAAIC,CAAC,CAACM,aAAN;AAAA,WAAzC,CAAN;AAAA,SAAjC;AAAsGF,mBAAW,EAAE,CAACC,uDAAD;AAAnH,OAJ4B,EAK5B;AAAEX,YAAI,EAAE,IAAR;AAAcC,kBAAU,EAAE;AAA1B,OAL4B,CAAvB;;UAmBMY;;;;;yBAAAA;AAAgB;;;cAAhBA;;;kBAVF,CACPC,kEAA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5QA;AA6QA,wBA7QA;AA8QA;AA9QA;;AAkRA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA11B;AACA;AACA;;AACA;AACA;;AACA21B;AACA;AACA,OAFA;;AAGAA;AACAz1B;AACAy1B;;;;;;;;;;;;;;;;;;;;;;;;","names":["e","webpackEmptyAsyncContext","module","routes","path","redirectTo","pathMatch","loadChildren","Promise","then","m","UserModule","__webpack_require__","WorldModule","canActivate","_user_auth_guard__WEBPACK_IMPORTED_MODULE_0__","KingdomModule","AppRoutingModule","_angular_router__WEBPACK_IMPORTED_MODULE_2__","scrollPositionRestoration","onSameUrlNavigation","anchorScrolling","imports","exports","_angular_core__WEBPACK_IMPORTED_MODULE_6__","AppComponent","firebaseService","loadingService","tutorialService","router","platformId","events","subscribe","event","_angular_router__WEBPACK_IMPORTED_MODULE_7__","url","localStorage","setItem","anchor","setTimeout","document","querySelector","window","scrollTo","top","behavior","scrollIntoView","initialize","loadFixtures","_services_cache_service__WEBPACK_IMPORTED_MODULE_0__","selectors","decls","vars","consts","template","httpLoaderFactory","http","_ngx_translate_http_loader__WEBPACK_IMPORTED_MODULE_8__","appInitializerFactory","translateService","setDefaultLang","use","toPromise","AppModule","bootstrap","_app_component__WEBPACK_IMPORTED_MODULE_1__","provide","_angular_material_core__WEBPACK_IMPORTED_MODULE_10__","useClass","_angular_material_paginator__WEBPACK_IMPORTED_MODULE_11__","_shared_custom_paginator_intl__WEBPACK_IMPORTED_MODULE_7__","_angular_core__WEBPACK_IMPORTED_MODULE_9__","useFactory","deps","_ngx_translate_core__WEBPACK_IMPORTED_MODULE_12__","multi","_angular_platform_browser__WEBPACK_IMPORTED_MODULE_13__","_app_routing_module__WEBPACK_IMPORTED_MODULE_0__","_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_14__","_shared_shared_module__WEBPACK_IMPORTED_MODULE_2__","_angular_fire__WEBPACK_IMPORTED_MODULE_15__","_environments_environment__WEBPACK_IMPORTED_MODULE_3__","_angular_fire_auth__WEBPACK_IMPORTED_MODULE_16__","_angular_fire_firestore__WEBPACK_IMPORTED_MODULE_17__","_angular_fire_database__WEBPACK_IMPORTED_MODULE_18__","loader","_angular_common_http__WEBPACK_IMPORTED_MODULE_19__","isolate","_ngxs_store__WEBPACK_IMPORTED_MODULE_4__","_shared_auth_auth_state__WEBPACK_IMPORTED_MODULE_6__","developmentMode","_ngxs_devtools_plugin__WEBPACK_IMPORTED_MODULE_5__","name","disabled","ngx_ui_tour_md_menu__WEBPACK_IMPORTED_MODULE_20__","ngx_currency__WEBPACK_IMPORTED_MODULE_21__","ngx_disqus__WEBPACK_IMPORTED_MODULE_22__","declarations","_angular_core__WEBPACK_IMPORTED_MODULE_11__","family_r10","skill_r11","category_r12","category_r14","family_r24","skill_r25","category_r26","category_r28","troop_r18","family_r36","skill_r37","category_r38","category_r40","troop_r30","family_r48","skill_r49","category_r50","category_r52","TroopAssignmentType","MAXIMUM_TROOPS","ArmyComponent","angularFirestore","notificationService","store","dialog","apiService","selectSnapshot","src_app_shared_auth_auth_state__WEBPACK_IMPORTED_MODULE_0__","collection","uid","valueChanges","idField","ref","where","pipe","troops","units","kingdomTroops","filter","troop","assignment","NONE","sort","a","b","attackTroops","ATTACK","defenseTroops","DEFENSE","recruitUnits","gold","$event","container","Number","id","previousContainer","data","length","previousIndex","currentIndex","updateArmy","warning","startLoading","army","forEach","kingdomTroop","index","push","troopId","fid","attackTroop","defenseTroop","assignArmy","assigned","success","console","error","stopLoading","unit","dialogRef","open","_recruit_component__WEBPACK_IMPORTED_MODULE_1__","panelClass","_disband_component__WEBPACK_IMPORTED_MODULE_2__","ctx","duration","delay","_angular_core__WEBPACK_IMPORTED_MODULE_7__","family_r8","skill_r9","category_r10","DisbandComponent","formBuilder","form","group","quantity","_angular_forms__WEBPACK_IMPORTED_MODULE_8__","close","valid","disbandTroop","value","disbanded","_angular_material_dialog__WEBPACK_IMPORTED_MODULE_10__","family_r5","skill_r6","category_r7","category_r9","RecruitComponent","Math","floor","kingdomGold","recruitUnit","recruited","IconPipe","domSanitizer","text","object","terms","skills","families","categories","resources","spells","adjacents","opposites","resistances","reduce","concat","term","replace","instant","image","bypassSecurityTrustHtml","_angular_core__WEBPACK_IMPORTED_MODULE_0__","pure","LegendaryPipe","legendary","LongPipe","decimals","undefined","toLocaleString","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","ShortPipe","isNaN","toString","suffixes","exp","log","pow","toFixed","TurnPipe","timestamp","max","ratio","clock$","calculate","toMillis","time","state","auth","clock","from","to","start","moment__WEBPACK_IMPORTED_MODULE_0__","end","minutes","diff","asMinutes","min","ApiService","httpClient","kingdomId","factionId","latitude","longitude","post","src_environments_environment__WEBPACK_IMPORTED_MODULE_0__","turns","get","unitId","contractId","charmId","patch","targetId","artifactId","request","auctionId","godId","buildingId","assignmentId","itemId","battleId","storeType","put","locationType","subject","message","fromId","letterId","letterIds","body","guildId","description","clanId","incantationId","enchantmentId","shopId","collectionId","dealId","questId","tree","gems","_angular_core__WEBPACK_IMPORTED_MODULE_1__","factory","providedIn","CollectionType","CacheService","PACKS","getPacks","GUILDS","getGuilds","ATTACKS","getAttacks","SKILLS","getSkills","FACTIONS","getFactions","UNITS","getUnits","FAMILIES","getFamilies","SPELLS","getSpells","STRUCTURES","getStructures","CATEGORIES","getCategories","GODS","getGods","HEROES","getHeroes","RESOURCES","getResources","ITEMS","getItems","STORES","getStores","LOCATIONS","getLocations","PERKS","getPerks","getItem","snapshot","factions","docs","map","faction","JSON","stringify","parse","packs","attacks","attack","guilds","guild","stores","resource","structures","structure","heroes","hero","gods","god","skill","category","family","locations","location","spell","items","item","perks","perk","ComponentService","injector","componentFactoryResolver","applicationRef","component","propertySetter","componentFactory","resolveComponentFactory","componentRef","create","instance","attachView","hostView","div","createElement","appendChild","nativeElement","html","DomService","$element","block","inline","scroll","FirebaseService","angularFireAuth","element","joinObject","joinedFactions","joinedUnits","joinedSpells","subCollection","recursive","Array","subElement","subElementIndex","subElementArray","find","el","slice","localeCompare","legends","elements","batch","random","toDate","set","doc","fixtures","authState","user","firestore","readFixtures","joinFixtures","includes","_cache_service__WEBPACK_IMPORTED_MODULE_1__","importFixtures","joinedAttacks","joinedGuilds","joinedFamilies","joinedCategories","joinedGods","joinedResources","joinedStructures","joinedSkills","joinedItems","joinedHeroes","joinedStores","joinedLocations","quest","joinedLegends","legend","joinedPerks","joinedPacks","pack","commit","_angular_core__WEBPACK_IMPORTED_MODULE_3__","LoadingService","loading","MapboxService","componentService","mapbox_gl__WEBPACK_IMPORTED_MODULE_1__","_shared_auth_auth_state__WEBPACK_IMPORTED_MODULE_5__","mapbox","accessToken","_environments_environment__WEBPACK_IMPORTED_MODULE_0__","primaryColor","getComputedStyle","getPropertyValue","style","center","pitch","zoom","antialias","dragPan","dragRotate","attributionControl","interactive","once","setFog","range","color","addSource","type","tileSize","maxzoom","setTerrain","source","exaggeration","addLayer","paint","on","refreshMarkers","marker","lngLat","getLngLat","lat","lng","getBounds","contains","markers","getZoom","markerVisible","getElement","display","radius","fly","removeMarker","size","_shared_type_common_type__WEBPACK_IMPORTED_MODULE_6__","injectComponent","_world_marker_marker_component__WEBPACK_IMPORTED_MODULE_3__","Object","setLngLat","coordinates","addTo","p","s","setPopup","offset","closeButton","closeOnClick","closeOnMove","maxWidth","className","setDOMContent","_world_popup_popup_component__WEBPACK_IMPORTED_MODULE_4__","changeDetectorRef","detectChanges","getPopup","opened","asObservable","resolve","easeTo","target","clientHeight","destroy","unsubscribe","circle","mapbox_gl_circle__WEBPACK_IMPORTED_MODULE_2___default","power","editable","fillColor","fillOpacity","strokeColor","strokeWeight","strokeOpacity","refineStroke","goTo","flyTo","essential","findIndex","found","remove","splice","resize","addKingdom","substring","addShop","addQuest","populateMap","clearMarkers","_angular_core__WEBPACK_IMPORTED_MODULE_13__","SnackBarType","NotificationService","snackBar","horizontalPosition","verticalPosition","rxjs__WEBPACK_IMPORTED_MODULE_1__","snackBarQueue","rxjs__WEBPACK_IMPORTED_MODULE_2__","snackBarQueue$","queue","showing","updatedQueue","next","ngDestroy","notification","showSnackbar","matSnackBarRef","SUCCESS","options","WARNING","ERROR","removeDismissedSnackBar","afterDismissed","shift","variable","keys","key","_pipes_long_pipe__WEBPACK_IMPORTED_MODULE_0__","transform","TutorialService","tourService","route","waitingSteps","steps","step","waitingStep","waitFor","startAt","preventScrolling","enableBackdrop","disableHotkeys","stepId","anchorId","title","content","SetUserAction","SetKingdomAction","SetKingdomSuppliesAction","SetKingdomBuildingsAction","LoginWithGoogleAction","LogoutAction","initial","kingdom","supplies","buildings","logged","popup","AuthState","setInterval","patchState","Date","dispatch","_auth_actions__WEBPACK_IMPORTED_MODULE_1__","parseUrl","fragment","queryParams","navigate","signInWithPopup","firebase_app__WEBPACK_IMPORTED_MODULE_2__","signOut","getState","setState","payload","supply","kingdomTurn","seconds","now","building","guilded","clan","defaults","PaginatorIntl","translateParser","page","pageSize","total","interpolate","rangeLabelIntl","onLangChange","getTranslations","translation","itemsPerPageLabel","nextPageLabel","previousPageLabel","firstPageLabel","lastPageLabel","changes","_angular_material_paginator__WEBPACK_IMPORTED_MODULE_0__","httpTranslateLoader","components","_shell_shell_component__WEBPACK_IMPORTED_MODULE_0__","_pipes_short_pipe__WEBPACK_IMPORTED_MODULE_1__","_pipes_icon_pipe__WEBPACK_IMPORTED_MODULE_2__","_pipes_long_pipe__WEBPACK_IMPORTED_MODULE_3__","_pipes_legendary_pipe__WEBPACK_IMPORTED_MODULE_4__","_pipes_turn_pipe__WEBPACK_IMPORTED_MODULE_5__","_tour_tour_component__WEBPACK_IMPORTED_MODULE_7__","modules","_angular_common__WEBPACK_IMPORTED_MODULE_9__","_angular_router__WEBPACK_IMPORTED_MODULE_10__","_angular_material_toolbar__WEBPACK_IMPORTED_MODULE_11__","_angular_material_icon__WEBPACK_IMPORTED_MODULE_12__","_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_13__","_angular_material_button__WEBPACK_IMPORTED_MODULE_14__","_angular_material_sidenav__WEBPACK_IMPORTED_MODULE_15__","_angular_material_list__WEBPACK_IMPORTED_MODULE_16__","_angular_material_menu__WEBPACK_IMPORTED_MODULE_17__","_angular_material_card__WEBPACK_IMPORTED_MODULE_18__","_angular_material_form_field__WEBPACK_IMPORTED_MODULE_19__","_angular_material_input__WEBPACK_IMPORTED_MODULE_20__","_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_21__","_angular_flex_layout__WEBPACK_IMPORTED_MODULE_22__","_angular_material_chips__WEBPACK_IMPORTED_MODULE_23__","_angular_material_table__WEBPACK_IMPORTED_MODULE_24__","_angular_material_paginator__WEBPACK_IMPORTED_MODULE_25__","_angular_material_sort__WEBPACK_IMPORTED_MODULE_26__","_angular_common_http__WEBPACK_IMPORTED_MODULE_27__","_angular_material_select__WEBPACK_IMPORTED_MODULE_28__","_angular_material_tabs__WEBPACK_IMPORTED_MODULE_29__","_angular_material_badge__WEBPACK_IMPORTED_MODULE_30__","_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_31__","_angular_material_progress_bar__WEBPACK_IMPORTED_MODULE_32__","_angular_material_dialog__WEBPACK_IMPORTED_MODULE_33__","_angular_forms__WEBPACK_IMPORTED_MODULE_34__","_angular_material_checkbox__WEBPACK_IMPORTED_MODULE_35__","_angular_material_datepicker__WEBPACK_IMPORTED_MODULE_36__","_angular_material_core__WEBPACK_IMPORTED_MODULE_37__","_angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_38__","_angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_39__","_angular_material_expansion__WEBPACK_IMPORTED_MODULE_40__","_angular_material_tooltip__WEBPACK_IMPORTED_MODULE_41__","SharedModule","_ngx_translate_core__WEBPACK_IMPORTED_MODULE_43__","ngx_ui_tour_md_menu__WEBPACK_IMPORTED_MODULE_44__","ngx_currency__WEBPACK_IMPORTED_MODULE_45__","align","allowNegative","allowZero","decimal","precision","prefix","suffix","thousands","nullable","inputMode","_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_46__","_shell_status_component__WEBPACK_IMPORTED_MODULE_6__","_angular_core__WEBPACK_IMPORTED_MODULE_10__","ctx_r12","l_r11","link_r16","supply_r20","i_r21","ShellComponent","breakpointObserver","mapboxService","domService","bottomSheet","lang","links","_angular_router__WEBPACK_IMPORTED_MODULE_12__","groups","link","observe","_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_14__","result","matches","addLangs","langs","l","browser","getBrowserLang","select","_auth_auth_state__WEBPACK_IMPORTED_MODULE_2__","x","oldReports","reports","drawer","toggle","resizeMap","isHandset$","isHandset","currentLang","scrollToTop","_auth_auth_actions__WEBPACK_IMPORTED_MODULE_1__","sheetRef","_status_component__WEBPACK_IMPORTED_MODULE_3__","kingdomSupplies$","viewQuery","_angular_material_sidenav__WEBPACK_IMPORTED_MODULE_21__","_r8","_angular_core__WEBPACK_IMPORTED_MODULE_2__","supply_r1","StatusComponent","_angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__","ctx_r3","ctx_r5","ctx_r6","TourComponent","MarkerType","PopupType","StoreType","LocationType","FactionType","LANDING_ROUTE","AuthGuard","_shared_auth_auth_state__WEBPACK_IMPORTED_MODULE_0__","ctx_r0","MarkerComponent","src_app_shared_type_common_type__WEBPACK_IMPORTED_MODULE_0__","AdventureComponent","adventureQuest","dealt","_angular_core__WEBPACK_IMPORTED_MODULE_8__","_angular_material_dialog__WEBPACK_IMPORTED_MODULE_9__","DealComponent","deal","shop","tradeDeal","family_r18","skill_r19","category_r20","category_r22","family_r35","skill_r36","category_r37","category_r39","family_r60","skill_r61","category_r62","category_r64","PopupComponent","src_app_shared_auth_auth_state__WEBPACK_IMPORTED_MODULE_5__","rxjs__WEBPACK_IMPORTED_MODULE_12__","checkRefresh","src_app_kingdom_army_army_component__WEBPACK_IMPORTED_MODULE_4__","canAttack","contracts","artifacts","charms","shopContracts","shopTroops","shopArtifacts","shopCharms","questTroops","questContracts","questArtifacts","visited","moment__WEBPACK_IMPORTED_MODULE_3__","isAfter","join","_deal_component__WEBPACK_IMPORTED_MODULE_2__","reward","_adventure_component__WEBPACK_IMPORTED_MODULE_1__","environment","production","hmr","firebase","apiKey","authDomain","databaseURL","projectId","storageBucket","messagingSenderId","appId","token","functions","hmrBootstrap","ngModule","hot","accept","mod","dispose","appRef","c","makeVisible","_environments_environment__WEBPACK_IMPORTED_MODULE_1__","_angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__","bootstrapModule","_app_app_module__WEBPACK_IMPORTED_MODULE_0__","err","webpackContext"],"sources":["webpack:///$_lazy_route_resources|lazy|groupOptions:%20%7B%7D|namespace%20object","webpack:///src/app/app-routing.module.ts","webpack:///src/app/app.component.html","webpack:///src/app/app.component.ts","webpack:///src/app/app.module.ts","webpack:///src/app/kingdom/army/army.component.html","webpack:///src/app/kingdom/army/army.component.ts","webpack:///src/app/kingdom/army/disband.component.ts","webpack:///src/app/kingdom/army/recruit.component.ts","webpack:///src/app/pipes/icon.pipe.ts","webpack:///src/app/pipes/legendary.pipe.ts","webpack:///src/app/pipes/long.pipe.ts","webpack:///src/app/pipes/short.pipe.ts","webpack:///src/app/pipes/turn.pipe.ts","webpack:///src/app/services/api.service.ts","webpack:///src/app/services/cache.service.ts","webpack:///src/app/services/component.service.ts","webpack:///src/app/services/dom.service.ts","webpack:///src/app/services/firebase.service.ts","webpack:///src/app/services/loading.service.ts","webpack:///src/app/services/mapbox.service.ts","webpack:///src/app/services/notification.service.ts","webpack:///src/app/services/tutorial.service.ts","webpack:///src/app/shared/auth/auth.actions.ts","webpack:///src/app/shared/auth/auth.state.ts","webpack:///src/app/shared/custom/paginator.intl.ts","webpack:///src/app/shared/shared.module.ts","webpack:///src/app/shared/shell/shell.component.html","webpack:///src/app/shared/shell/shell.component.ts","webpack:///src/app/shared/shell/status.component.ts","webpack:///src/app/shared/tour/tour.component.html","webpack:///src/app/shared/tour/tour.component.ts","webpack:///src/app/shared/type/common.type.ts","webpack:///src/app/user/auth.guard.ts","webpack:///src/app/world/marker/marker.component.html","webpack:///src/app/world/marker/marker.component.ts","webpack:///src/app/world/popup/adventure.component.ts","webpack:///src/app/world/popup/deal.component.ts","webpack:///src/app/world/popup/popup.component.html","webpack:///src/app/world/popup/popup.component.ts","webpack:///src/environments/environment.ts","webpack:///src/hmr.ts","webpack:///src/main.ts","webpack:///node_modules/moment/locale|sync|/^/.*$"],"sourcesContent":["function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 98255;\nmodule.exports = webpackEmptyAsyncContext;","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthGuard } from './user/auth.guard';\r\n\r\nexport const routes: Routes = [\r\n { path: '', redirectTo: 'user/landing', pathMatch: 'full' },\r\n { path: 'user', loadChildren: () => import('./user/user.module').then(m => m.UserModule) },\r\n { path: 'world', loadChildren: () => import('./world/world.module').then(m => m.WorldModule), canActivate: [AuthGuard] },\r\n { path: 'kingdom', loadChildren: () => import('./kingdom/kingdom.module').then(m => m.KingdomModule), canActivate: [AuthGuard] },\r\n { path: '**', redirectTo: '' },\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n RouterModule.forRoot(routes, {\r\n scrollPositionRestoration: 'top',\r\n // relativeLinkResolution: 'legacy',\r\n onSameUrlNavigation: 'reload',\r\n anchorScrolling: 'enabled', // not working https://github.com/angular/angular/issues/33240\r\n }),\r\n ],\r\n exports: [RouterModule],\r\n})\r\nexport class AppRoutingModule { }\r\n","<!-- tour -->\r\n<app-tour></app-tour>\r\n<!-- loading -->\r\n<div class=\"loading-screen\" *ngIf=\"loadingService.loading\">\r\n <mat-progress-spinner mode=\"indeterminate\"></mat-progress-spinner>\r\n</div>\r\n<!-- shell -->\r\n<app-shell>\r\n <!-- router -->\r\n <router-outlet></router-outlet>\r\n</app-shell>\r\n","import { Component, OnInit, Inject, PLATFORM_ID } from '@angular/core';\r\nimport { LoadingService } from './services/loading.service';\r\nimport { FirebaseService } from './services/firebase.service';\r\nimport { TutorialService } from './services/tutorial.service';\r\nimport { Router, Scroll, RouterEvent, NavigationEnd } from '@angular/router';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport { CollectionType } from './services/cache.service';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss'],\r\n})\r\nexport class AppComponent implements OnInit {\r\n\r\n constructor(\r\n private firebaseService: FirebaseService,\r\n public loadingService: LoadingService,\r\n private tutorialService: TutorialService,\r\n private router: Router,\r\n @Inject(PLATFORM_ID) private platformId: any,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n // anchors\r\n this.router.events.subscribe((event: RouterEvent) => {\r\n if (event instanceof NavigationEnd && event.url !== '/user/landing') {\r\n localStorage.setItem('route', event.url);\r\n }\r\n if (event instanceof Scroll && event.anchor && isPlatformBrowser(this.platformId)) {\r\n setTimeout(() => {\r\n const anchor = document.querySelector('#' + event.anchor);\r\n if (!anchor) {\r\n window.scrollTo({ top: 0, behavior: 'smooth' });\r\n } else {\r\n anchor.scrollIntoView({ behavior: 'smooth' });\r\n }\r\n }, 1000);\r\n }\r\n });\r\n // fixtures\r\n this.tutorialService.initialize();\r\n this.firebaseService.loadFixtures([\r\n // CollectionType.FACTIONS,\r\n // CollectionType.ATTACKS,\r\n // CollectionType.CATEGORIES,\r\n // CollectionType.FAMILIES,\r\n // CollectionType.GODS,\r\n // CollectionType.GUILDS,\r\n // CollectionType.RESOURCES,\r\n // CollectionType.STRUCTURES,\r\n // CollectionType.SKILLS,\r\n CollectionType.UNITS,\r\n CollectionType.SPELLS,\r\n CollectionType.ITEMS,\r\n // CollectionType.HEROES,\r\n // CollectionType.STORES,\r\n // CollectionType.LOCATIONS,\r\n // CollectionType.LEGENDS,\r\n // CollectionType.PERKS,\r\n // CollectionType.PACKS,\r\n ]);\r\n }\r\n}\r\n","import { BrowserModule } from '@angular/platform-browser';\r\nimport { NgModule, APP_INITIALIZER } from '@angular/core';\r\nimport { AppRoutingModule } from './app-routing.module';\r\nimport { AppComponent } from './app.component';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { SharedModule } from './shared/shared.module';\r\nimport { environment } from '../environments/environment';\r\nimport { AngularFireModule } from '@angular/fire';\r\nimport { AngularFirestoreModule } from '@angular/fire/firestore';\r\nimport { AngularFireAuthModule } from '@angular/fire/auth';\r\nimport { AngularFireDatabaseModule } from '@angular/fire/database';\r\nimport { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { TranslateHttpLoader } from '@ngx-translate/http-loader';\r\nimport { ErrorStateMatcher, ShowOnDirtyErrorStateMatcher } from '@angular/material/core';\r\nimport { NgxsModule } from '@ngxs/store';\r\nimport { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin';\r\nimport { AuthState } from './shared/auth/auth.state';\r\nimport { TourMatMenuModule } from 'ngx-ui-tour-md-menu';\r\nimport { MatPaginatorIntl } from '@angular/material/paginator';\r\nimport { PaginatorIntl } from './shared/custom/paginator.intl';\r\nimport { NgxCurrencyModule } from 'ngx-currency';\r\nimport { DisqusModule } from \"ngx-disqus\";\r\n\r\n// AOT compilation support\r\nexport function httpLoaderFactory(http: HttpClient) {\r\n return new TranslateHttpLoader(http);\r\n}\r\n\r\n// i18n initializer to force translations to be loaded before startup\r\nexport function appInitializerFactory(translateService: TranslateService): () => Promise<any> {\r\n return () => {\r\n translateService.setDefaultLang('es');\r\n return translateService.use('es').toPromise();\r\n };\r\n}\r\n\r\n@NgModule({\r\n declarations: [\r\n AppComponent,\r\n ],\r\n imports: [\r\n BrowserModule,\r\n AppRoutingModule,\r\n BrowserAnimationsModule,\r\n SharedModule,\r\n AngularFireModule.initializeApp(environment.firebase),\r\n AngularFireAuthModule,\r\n AngularFirestoreModule,\r\n AngularFireDatabaseModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: httpLoaderFactory,\r\n deps: [HttpClient],\r\n },\r\n isolate: false,\r\n }),\r\n NgxsModule.forRoot(\r\n [AuthState],\r\n { developmentMode: !environment.production },\r\n ),\r\n NgxsReduxDevtoolsPluginModule.forRoot({\r\n name: 'Legendarium',\r\n disabled: environment.production,\r\n }),\r\n TourMatMenuModule.forRoot(),\r\n NgxCurrencyModule,\r\n DisqusModule.forRoot('legendarium-test'),\r\n ],\r\n providers: [\r\n { provide: ErrorStateMatcher, useClass: ShowOnDirtyErrorStateMatcher },\r\n { provide: MatPaginatorIntl, useClass: PaginatorIntl },\r\n { provide: APP_INITIALIZER, useFactory: appInitializerFactory, deps: [TranslateService], multi: true },\r\n ],\r\n bootstrap: [\r\n AppComponent,\r\n ],\r\n})\r\nexport class AppModule { }\r\n","<div class=\"kingdom-army\" fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\" cdkDropListGroup [@fadeInOnEnter]>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/army.png\" [alt]=\"'kingdom.army.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.army.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.army.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.army')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_9_plus</mat-icon>{{ 'kingdom.army.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.troops' | translate }}:</div>\r\n <mat-action-list dense class=\"dotted\" id=\"0\" tourAnchor=\"tour.army\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignTroop($event)\" [cdkDropListData]=\"kingdomTroops\">\r\n <button mat-list-item *ngFor=\"let troop of kingdomTroops\" cdkDrag class=\"handle\" [id]=\"troop.fid\" (click)=\"openDisbandDialog(troop)\" [ngClass]=\"[troop.unit.faction.id, troop.unit.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"troop.quantity | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"troop.unit.image\" [alt]=\"troop.unit.name | translate\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"troop.unit.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n <mat-icon>open_with</mat-icon>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.army.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n <div fxFlex.xl=\"66\" fxFlex.lg=\"66\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\">\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/attack.png\" [alt]=\"'kingdom.attack.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.attack.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.attack.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.attack')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_5</mat-icon>{{ 'kingdom.attack.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.troops' | translate }}:</div>\r\n <mat-list dense class=\"dotted\" id=\"1\" tourAnchor=\"tour.attack\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignTroop($event)\" [cdkDropListData]=\"attackTroops\">\r\n <mat-list-item *ngFor=\"let troop of attackTroops\" cdkDrag class=\"handle\" [id]=\"troop.fid\" [ngClass]=\"troop.unit.faction.id\">\r\n <div mat-list-avatar [matBadge]=\"troop.quantity | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"troop.unit.image\" [alt]=\"troop.unit.name | translate\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"troop.unit.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n <mat-icon>open_with</mat-icon>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.attack.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/defense.png\" [alt]=\"'kingdom.defense.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.defense.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.defense.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.defense')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_5</mat-icon>{{ 'kingdom.defense.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.troops' | translate }}:</div>\r\n <mat-list dense class=\"dotted\" id=\"2\" tourAnchor=\"tour.defense\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignTroop($event)\" [cdkDropListData]=\"defenseTroops\">\r\n <mat-list-item *ngFor=\"let troop of defenseTroops\" cdkDrag class=\"handle\" [id]=\"troop.fid\" [ngClass]=\"troop.unit.faction.id\">\r\n <div mat-list-avatar [matBadge]=\"troop.quantity | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"troop.unit.image\" [alt]=\"troop.unit.name | translate\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"troop.unit.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n <mat-icon>open_with</mat-icon>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.defense.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/recruit.png\" [alt]=\"'kingdom.recruit.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.recruit.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.recruit.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.recruit')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>list</mat-icon>{{ recruitUnits.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.troops' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.recruit\">\r\n <button mat-list-item *ngFor=\"let unit of recruitUnits\" (click)=\"openRecruitDialog(unit)\" class=\"common\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"unit.image\" [alt]=\"unit.name | translate\">\r\n </div>\r\n <div mat-line>{{ unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of unit.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of unit.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of unit.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"unit.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"unit.resistances && unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of unit.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"unit.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\" [alt]=\"'resource.gold.name' | translate\"> [alt]=\"'resource.gold.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.recruit.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n</div>\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { fadeInOnEnterAnimation } from 'angular-animations';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { RecruitComponent } from './recruit.component';\r\nimport { DisbandComponent } from './disband.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { combineLatest } from 'rxjs';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\n\r\nexport enum TroopAssignmentType {\r\n NONE,\r\n ATTACK,\r\n DEFENSE,\r\n}\r\n\r\nconst MAXIMUM_TROOPS = 5;\r\n\r\n@Component({\r\n selector: 'app-army',\r\n templateUrl: './army.component.html',\r\n styleUrls: ['./army.component.scss'],\r\n animations: [fadeInOnEnterAnimation({ duration: 250, delay: 250 })],\r\n})\r\n@UntilDestroy()\r\nexport class ArmyComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomTroops: any[] = [];\r\n attackTroops: any[] = [];\r\n defenseTroops: any[] = [];\r\n recruitUnits: any[] = [];\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private dialog: MatDialog,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n public tutorialService: TutorialService,\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n combineLatest([\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/troops`).valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`units`, ref => ref.where('recruitable', '==', true)).valueChanges({ idField: 'fid' }),\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(([troops, units]) => {\r\n this.kingdomTroops = troops.filter(troop => troop.assignment === TroopAssignmentType.NONE || !troop.assignment).sort((a, b) => a.sort - b.sort);\r\n this.attackTroops = troops.filter(troop => troop.assignment === TroopAssignmentType.ATTACK).sort((a, b) => a.sort - b.sort);\r\n this.defenseTroops = troops.filter(troop => troop.assignment === TroopAssignmentType.DEFENSE).sort((a, b) => a.sort - b.sort);\r\n this.recruitUnits = units.sort((a, b) => a.gold - b.gold);\r\n });\r\n }\r\n\r\n async assignTroop($event: CdkDragDrop<any>) {\r\n if ($event.container && (Number($event.container.id) === 0 || $event.previousContainer === $event.container || $event.container.data.length < MAXIMUM_TROOPS)) {\r\n if ($event.previousContainer === $event.container) {\r\n moveItemInArray($event.container.data, $event.previousIndex, $event.currentIndex);\r\n } else {\r\n transferArrayItem($event.previousContainer.data, $event.container.data, $event.previousIndex, $event.currentIndex);\r\n }\r\n await this.updateArmy();\r\n } else {\r\n this.notificationService.warning('kingdom.army.maximum');\r\n }\r\n }\r\n\r\n async updateArmy() {\r\n this.loadingService.startLoading();\r\n try {\r\n const army = [];\r\n this.kingdomTroops.forEach((kingdomTroop, index) => {\r\n army.push({ troopId: kingdomTroop.fid, sort: 1000 + index, assignment: TroopAssignmentType.NONE });\r\n });\r\n this.attackTroops.forEach((attackTroop, index) => {\r\n army.push({ troopId: attackTroop.fid, sort: 2000 + index, assignment: TroopAssignmentType.ATTACK });\r\n });\r\n this.defenseTroops.forEach((defenseTroop, index) => {\r\n army.push({ troopId: defenseTroop.fid, sort: 3000 + index, assignment: TroopAssignmentType.DEFENSE });\r\n });\r\n const assigned = await this.apiService.assignArmy(this.uid, army);\r\n this.notificationService.success('kingdom.army.success');\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.army.error');\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n\r\n openRecruitDialog(unit: any): void {\r\n const dialogRef = this.dialog.open(RecruitComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: unit,\r\n });\r\n }\r\n\r\n openDisbandDialog(troop: any): void {\r\n const dialogRef = this.dialog.open(DisbandComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: troop,\r\n });\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-disband',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.disband.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.disband.description' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.disband.troop' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[troop.unit.faction.id, troop.unit.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"troop.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"troop.unit.image\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"troop.unit.legendary\" src=\"/assets/images/icons/legendary.png\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\">\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"0\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.disband.platoon' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.disband.quantity' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'kingdom.disband.quantity' | translate }}\" matInput formControlName=\"quantity\">\r\n <mat-hint>{{ 'kingdom.disband.hint' | translate }}</mat-hint>\r\n <mat-error>{{ 'kingdom.disband.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.disband.maintenances' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected *ngIf=\"troop.unit.goldMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/gold.png\">{{ 'user.tome.goldMaintenance' | translate:{ number: (troop.unit.goldMaintenance * troop.quantity) | long } }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"troop.unit.manaMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/mana.png\">{{ 'user.tome.manaMaintenance' | translate:{ number: (troop.unit.manaMaintenance * troop.quantity) | long } }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"troop.unit.populationMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/population.png\">{{ 'user.tome.populationMaintenance' | translate:{ number: (troop.unit.populationMaintenance * troop.quantity) | long } }}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.disband.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid || troop.unit.populationMaintenance > 0\" (click)=\"disband()\">{{ 'kingdom.disband.disband' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class DisbandComponent implements OnInit {\r\n\r\n form: FormGroup = null;\r\n uid = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public troop: any,\r\n private dialogRef: MatDialogRef<DisbandComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n quantity: [this.troop.quantity, [Validators.required, Validators.min(1), Validators.max(this.troop.quantity)]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async disband() {\r\n if (this.form.valid) {\r\n this.loadingService.startLoading();\r\n try {\r\n const disbanded = await this.apiService.disbandTroop(this.uid, this.troop.fid, this.form.value.quantity);\r\n this.notificationService.success('kingdom.disband.success', disbanded);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.disband.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.disband.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-recruit',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.recruit.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.recruit.help' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.recruit.troop' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[unit.faction.id, unit.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"unit.image\">\r\n </div>\r\n <div mat-line>{{ unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of unit.families\" [src]=\"family.image\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of unit.skills\" [src]=\"skill.image\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of unit.categories\" [src]=\"category.image\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"unit.legendary\" src=\"/assets/images/icons/legendary.png\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"unit.resistances && unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of unit.resistances\" [src]=\"category.image\">\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"unit.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.recruit.platoon' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.recruit.quantity' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'kingdom.recruit.quantity' | translate }}\" matInput formControlName=\"quantity\">\r\n <mat-hint>{{ 'kingdom.recruit.hint' | translate }}</mat-hint>\r\n <mat-error>{{ 'kingdom.recruit.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.recruit.costs' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/gold.png\">{{ gold() | long}}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.recruit.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"recruit()\">{{ 'kingdom.recruit.recruit' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class RecruitComponent implements OnInit {\r\n\r\n form: FormGroup = null;\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomGold: any = this.store.selectSnapshot(AuthState.getKingdomGold);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public unit: any,\r\n private dialogRef: MatDialogRef<RecruitComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n quantity: [null, [Validators.required, Validators.min(1), Validators.max(Math.floor(this.kingdomGold.quantity / this.unit.gold))]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n gold(): number {\r\n return this.form.value.quantity * this.unit.gold;\r\n }\r\n\r\n async recruit() {\r\n if (this.form.valid && this.gold() <= this.kingdomGold.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const recruited = await this.apiService.recruitUnit(this.uid, this.unit.id, this.form.value.quantity);\r\n this.notificationService.success('kingdom.recruit.success', recruited);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.recruit.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.recruit.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n@Pipe({\r\n name: 'icon',\r\n})\r\nexport class IconPipe implements PipeTransform {\r\n\r\n constructor(\r\n private domSanitizer: DomSanitizer,\r\n private translateService: TranslateService,\r\n ) {}\r\n\r\n transform(text: string = '', object?: any): SafeHtml {\r\n if (text && object) {\r\n const terms = [object.skills || [], object.families || [], object.categories || [], object.units || [], object.resources || [], object.spells || [], object.adjacents || [], object.opposites || [], object.resistances || []].reduce((a, b) => a.concat(b), []);\r\n terms.forEach((term: any) => text = text.replace(`<${term.id}>`, `<img class=\"icon\" title=\"${this.translateService.instant(term.name)}\" src=\"${term.image}\">`));\r\n }\r\n text = (text || '')\r\n .replace(/<gold>/g, `<img class=\"icon\" title=\"${this.translateService.instant('resource.gold.name')}\" src=\"/assets/images/resources/gold.png\">`)\r\n .replace(/<mana>/g, `<img class=\"icon\" title=\"${this.translateService.instant('resource.mana.name')}\" src=\"/assets/images/resources/mana.png\">`)\r\n .replace(/<population>/g, `<img class=\"icon\" title=\"${this.translateService.instant('resource.population.name')}\" src=\"/assets/images/resources/population.png\">`)\r\n .replace(/<land>/g, `<img class=\"icon\" title=\"${this.translateService.instant('resource.land.name')}\" src=\"/assets/images/resources/land.png\">`)\r\n .replace(/<turn>/g, `<img class=\"icon\" title=\"${this.translateService.instant('resource.turn.name')}\" src=\"/assets/images/resources/turn.png\">`)\r\n .replace(/<gem>/g, `<img class=\"icon\" title=\"${this.translateService.instant('resource.gem.name')}\" src=\"/assets/images/resources/gem.png\">`)\r\n .replace(/<power>/g, `<img class=\"icon\" title=\"${this.translateService.instant('icon.power.name')}\" src=\"/assets/images/icons/power.png\">`)\r\n .replace(/<attack>/g, `<img class=\"icon\" title=\"${this.translateService.instant('type.attack.name')}\" src=\"/assets/images/icons/attack.png\">`)\r\n .replace(/<defense>/g, `<img class=\"icon\" title=\"${this.translateService.instant('type.defense.name')}\" src=\"/assets/images/icons/defense.png\">`)\r\n .replace(/<health>/g, `<img class=\"icon\" title=\"${this.translateService.instant('type.health.name')}\" src=\"/assets/images/icons/health.png\">`)\r\n .replace(/<initiative>/g, `<img class=\"icon\" title=\"${this.translateService.instant('type.initiative.name')}\" src=\"/assets/images/icons/initiative.png\">`)\r\n .replace(/<skeleton>/g, `<img class=\"icon\" title=\"${this.translateService.instant('unit.skeleton.name')}\" src=\"/assets/images/units/black/skeleton.png\">`)\r\n .replace(/<sheep>/g, `<img class=\"icon\" title=\"${this.translateService.instant('unit.sheep.name')}\" src=\"/assets/images/units/grey/sheep.png\">`);\r\n return this.domSanitizer.bypassSecurityTrustHtml(text);\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'legendary',\r\n})\r\nexport class LegendaryPipe implements PipeTransform {\r\n\r\n transform(object: any): boolean {\r\n // return object && object.categories && object.categories.length && object.categories.find((category: any) => category.id === 'legendary') !== undefined;\r\n return object && object.legendary;\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'long',\r\n})\r\nexport class LongPipe implements PipeTransform {\r\n\r\n constructor() {}\r\n\r\n transform(value: number, decimals: number = 2): string {\r\n return value !== undefined && value !== null\r\n ? value.toLocaleString('de-DE', { // de-DE is the only locale that allows showing a thousand separator under 10.000\r\n useGrouping: true,\r\n minimumIntegerDigits: 1,\r\n minimumFractionDigits: value % 1 !== 0 ? decimals : 0,\r\n maximumFractionDigits: value % 1 !== 0 ? decimals : 0,\r\n })\r\n : '';\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'short',\r\n})\r\nexport class ShortPipe implements PipeTransform {\r\n\r\n transform(value: number, decimals: number = 1): string {\r\n if (Number.isNaN(value)) return null;\r\n if (value < 1000) return value.toString();\r\n const suffixes = ['K', 'M', 'G', 'T', 'P', 'E'];\r\n const exp = Math.floor(Math.log(value) / Math.log(1000));\r\n return (value / Math.pow(1000, exp)).toFixed(decimals) + suffixes[exp - 1];\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport * as moment from 'moment';\r\nimport { Select } from '@ngxs/store';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n@Pipe({\r\n name: 'turn',\r\n})\r\nexport class TurnPipe implements PipeTransform {\r\n\r\n @Select((state: any) => state.auth.clock) clock$: Observable<Date>;\r\n\r\n transform(timestamp: any, max: number, ratio: number): Observable<number> {\r\n return this.clock$.pipe(\r\n map(time => {\r\n return calculate(timestamp.toMillis(), time, max, ratio);\r\n }),\r\n );\r\n }\r\n\r\n}\r\n\r\nexport const calculate = (from: any, to: any, max: number, ratio: number): number => {\r\n const start = moment(from);\r\n const end = moment(to);\r\n const minutes = moment.duration(end.diff(start)).asMinutes();\r\n return max\r\n ? Math.min(max, Math.floor(minutes / ratio))\r\n : Math.floor(minutes / ratio);\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from 'src/environments/environment';\r\nimport { StoreType, LocationType, FactionType } from 'src/app/shared/type/common.type';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ApiService {\r\n\r\n constructor(\r\n private httpClient: HttpClient,\r\n ) { }\r\n\r\n createKingdom(kingdomId: string, factionId: string, name: string, latitude: number, longitude: number): Promise<any> {\r\n return this.httpClient.post(`${environment.functions.url}/world/kingdom`, {\r\n kingdomId: kingdomId,\r\n name: name,\r\n factionId: factionId,\r\n latitude: latitude,\r\n longitude: longitude,\r\n }).toPromise();\r\n }\r\n\r\n exploreLand(kingdomId: string, turns: number): Promise<any> {\r\n return this.httpClient.get(`${environment.functions.url}/kingdom/${kingdomId}/explore/${turns}`).toPromise();\r\n }\r\n\r\n chargeMana(kingdomId: string, turns: number): Promise<any> {\r\n return this.httpClient.get(`${environment.functions.url}/kingdom/${kingdomId}/charge/${turns}`).toPromise();\r\n }\r\n\r\n taxGold(kingdomId: string, turns: number): Promise<any> {\r\n return this.httpClient.get(`${environment.functions.url}/kingdom/${kingdomId}/tax/${turns}`).toPromise();\r\n }\r\n\r\n recruitUnit(kingdomId: string, unitId: string, quantity: number): Promise<any> {\r\n return this.httpClient.get(`${environment.functions.url}/kingdom/${kingdomId}/army/${unitId}/recruit/${quantity}`).toPromise();\r\n }\r\n\r\n disbandTroop(kingdomId: string, troopId: string, quantity: number): Promise<any> {\r\n return this.httpClient.delete(`${environment.functions.url}/kingdom/${kingdomId}/army/${troopId}/disband/${quantity}`, undefined).toPromise();\r\n }\r\n\r\n dischargeContract(kingdomId: string, contractId: string): Promise<any> {\r\n return this.httpClient.delete(`${environment.functions.url}/kingdom/${kingdomId}/tavern/${contractId}/discharge`, undefined).toPromise();\r\n }\r\n\r\n researchCharm(kingdomId: string, charmId: string, turns: number): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/sorcery/${charmId}/research/${turns}`, undefined).toPromise();\r\n }\r\n\r\n conjureCharm(kingdomId: string, charmId: string, targetId: string): Promise<any> {\r\n return this.httpClient.post(`${environment.functions.url}/kingdom/${kingdomId}/sorcery/${charmId}/conjure/${targetId}`, undefined).toPromise();\r\n }\r\n\r\n activateArtifact(kingdomId: string, artifactId: string, targetId: string): Promise<any> {\r\n return this.httpClient.request('delete', `${environment.functions.url}/kingdom/${kingdomId}/sorcery/${artifactId}/activate/${targetId}`, undefined).toPromise();\r\n }\r\n\r\n bidAuction(kingdomId: string, auctionId: string, gold: number): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/auction/${auctionId}/bid/${gold}`, undefined).toPromise();\r\n }\r\n\r\n offerGod(kingdomId: string, godId: string, gold: number): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/temple/${godId}/offer/${gold}`, undefined).toPromise();\r\n }\r\n\r\n buildStructure(kingdomId: string, buildingId: string, quantity: number): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/city/${buildingId}/build/${quantity}`, undefined).toPromise();\r\n }\r\n\r\n demolishStructure(kingdomId: string, buildingId: string, quantity: number): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/city/${buildingId}/demolish/${quantity}`, undefined).toPromise();\r\n }\r\n\r\n assignContract(kingdomId: string, contractId: string, assignmentId: number): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/tavern/${contractId}/assign/${assignmentId}`, undefined).toPromise();\r\n }\r\n\r\n assignArmy(kingdomId: string, army: any[]): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/army`, {\r\n army: army,\r\n }).toPromise();\r\n }\r\n\r\n buyEmporium(kingdomId: string, itemId: string): Promise<any> {\r\n return this.httpClient.get(`${environment.functions.url}/kingdom/${kingdomId}/emporium/${itemId}`).toPromise();\r\n }\r\n\r\n battleKingdom(kingdomId: string, targetId: string, battleId: number ): Promise<any> {\r\n return this.httpClient.post(`${environment.functions.url}/kingdom/${kingdomId}/battle/${battleId}/target/${targetId}`, undefined).toPromise();\r\n }\r\n\r\n populateMap(latitude: number, longitude: number): Promise<any> {\r\n return this.httpClient.post(`${environment.functions.url}/world/map`, {\r\n latitude: latitude,\r\n longitude: longitude,\r\n }).toPromise();\r\n }\r\n\r\n addKingdom(kingdomId: string, factionId: FactionType, latitude: number, longitude: number, name: string): Promise<any> {\r\n return this.httpClient.post(`${environment.functions.url}/world/kingdom`, {\r\n kingdomId: kingdomId,\r\n factionId: factionId,\r\n latitude: latitude,\r\n longitude: longitude,\r\n name: name,\r\n }).toPromise();\r\n }\r\n\r\n addShop(fid: string, storeType: StoreType, latitude?: number, longitude?: number, name?: string): Promise<any> {\r\n return this.httpClient.put(`${environment.functions.url}/world/shop`, {\r\n fid: fid,\r\n storeType: storeType,\r\n latitude: latitude,\r\n longitude: longitude,\r\n name: name,\r\n }).toPromise();\r\n }\r\n\r\n addQuest(fid: string, locationType: LocationType, latitude?: number, longitude?: number, name?: string): Promise<any> {\r\n return this.httpClient.put(`${environment.functions.url}/world/quest`, {\r\n fid: fid,\r\n locationType: locationType,\r\n latitude: latitude,\r\n longitude: longitude,\r\n name: name,\r\n }).toPromise();\r\n }\r\n\r\n refreshAuction(): Promise<any> {\r\n return this.httpClient.put(`${environment.functions.url}/world/auction`, undefined).toPromise();\r\n }\r\n\r\n sendLetter(kingdomId: string, subject: string, message: string, fromId: string): Promise<any> {\r\n return this.httpClient.post(`${environment.functions.url}/kingdom/${kingdomId}/archive`, {\r\n subject: subject,\r\n message: message,\r\n fromId: fromId,\r\n }).toPromise();\r\n }\r\n\r\n readLetter(kingdomId: string, letterId: string): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/archive/${letterId}`, undefined).toPromise();\r\n }\r\n\r\n removeLetters(kingdomId: string, letterIds: string[]): Promise<any> {\r\n return this.httpClient.delete(`${environment.functions.url}/kingdom/${kingdomId}/archive`, {\r\n body: {\r\n letterIds: letterIds,\r\n },\r\n }).toPromise();\r\n }\r\n\r\n favorGuild(kingdomId: string, guildId: string): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/guild/${guildId}`, undefined).toPromise();\r\n }\r\n\r\n foundateClan(kingdomId: string, name: string, description: string, image: string): Promise<any> {\r\n return this.httpClient.put(`${environment.functions.url}/world/clan`, {\r\n kingdomId: kingdomId,\r\n name: name,\r\n description: description,\r\n image: image,\r\n }).toPromise();\r\n }\r\n\r\n joinClan(kingdomId: string, clanId: string): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/clan/${clanId}/join`, undefined).toPromise();\r\n }\r\n\r\n leaveClan(kingdomId: string, clanId: string): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/clan/${clanId}/leave`, undefined).toPromise();\r\n }\r\n\r\n assignCharm(kingdomId: string, charmId: string, assignmentId: number): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/sorcery/charm/${charmId}/assign/${assignmentId}`, undefined).toPromise();\r\n }\r\n\r\n assignArtifact(kingdomId: string, artifactId: string, assignmentId: number): Promise<any> {\r\n return this.httpClient.patch(`${environment.functions.url}/kingdom/${kingdomId}/sorcery/artifact/${artifactId}/assign/${assignmentId}`, undefined).toPromise();\r\n }\r\n\r\n dispelIncantation(kingdomId: string, incantationId: string): Promise<any> {\r\n return this.httpClient.delete(`${environment.functions.url}/kingdom/${kingdomId}/temple/${incantationId}/dispel`, undefined).toPromise();\r\n }\r\n\r\n breakEnchantment(kingdomId: string, enchantmentId: string): Promise<any> {\r\n return this.httpClient.delete(`${environment.functions.url}/kingdom/${kingdomId}/temple/${enchantmentId}/break`, undefined).toPromise();\r\n }\r\n\r\n tradeDeal(kingdomId: string, shopId: string, collectionId: string, dealId: string): Promise<any> {\r\n return this.httpClient.get(`${environment.functions.url}/kingdom/${kingdomId}/world/shop/${shopId}/${collectionId}/${dealId}`).toPromise();\r\n }\r\n\r\n adventureQuest(kingdomId: string, questId: string): Promise<any> {\r\n return this.httpClient.post(`${environment.functions.url}/kingdom/${kingdomId}/world/quest/${questId}`, undefined).toPromise();\r\n }\r\n\r\n plantTree(kingdomId: string, tree: any, gems: number): Promise<any> {\r\n return this.httpClient.put(`${environment.functions.url}/kingdom/${kingdomId}/tree`, {\r\n tree: tree,\r\n gems: gems,\r\n }).toPromise();\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\n\r\nexport enum CollectionType {\r\n 'SKILLS' = 'skills',\r\n 'FACTIONS' = 'factions',\r\n 'UNITS' = 'units',\r\n 'FAMILIES' = 'families',\r\n 'SPELLS' = 'spells',\r\n 'STRUCTURES' = 'structures',\r\n 'CATEGORIES' = 'categories',\r\n 'GODS' = 'gods',\r\n 'HEROES' = 'heroes',\r\n 'RESOURCES' = 'resources',\r\n 'ITEMS' = 'items',\r\n 'STORES' = 'stores',\r\n 'LOCATIONS' = 'locations',\r\n 'PACKS' = 'packs',\r\n 'GUILDS' = 'guilds',\r\n 'ATTACKS' = 'attacks',\r\n 'LEGENDS' = 'legends',\r\n 'PERKS' = 'perks',\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class CacheService {\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n ) { }\r\n\r\n get(collection: string) {\r\n switch (collection) {\r\n case CollectionType.PACKS:\r\n return this.getPacks();\r\n case CollectionType.GUILDS:\r\n return this.getGuilds();\r\n case CollectionType.ATTACKS:\r\n return this.getAttacks();\r\n case CollectionType.SKILLS:\r\n return this.getSkills();\r\n case CollectionType.FACTIONS:\r\n return this.getFactions();\r\n case CollectionType.UNITS:\r\n return this.getUnits();\r\n case CollectionType.FAMILIES:\r\n return this.getFamilies();\r\n case CollectionType.SPELLS:\r\n return this.getSpells();\r\n case CollectionType.STRUCTURES:\r\n return this.getStructures();\r\n case CollectionType.CATEGORIES:\r\n return this.getCategories();\r\n case CollectionType.GODS:\r\n return this.getGods();\r\n case CollectionType.HEROES:\r\n return this.getHeroes();\r\n case CollectionType.RESOURCES:\r\n return this.getResources();\r\n case CollectionType.ITEMS:\r\n return this.getItems();\r\n case CollectionType.STORES:\r\n return this.getStores();\r\n case CollectionType.LOCATIONS:\r\n return this.getLocations();\r\n case CollectionType.PERKS:\r\n return this.getPerks();\r\n }\r\n }\r\n\r\n async getFactions(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.FACTIONS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.FACTIONS).get().toPromise();\r\n const factions = snapshot.docs.map((faction: any) => faction.data());\r\n localStorage.setItem(CollectionType.FACTIONS, JSON.stringify([...factions]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.FACTIONS));\r\n }\r\n\r\n async getPacks(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.PACKS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.PACKS).get().toPromise();\r\n const packs = snapshot.docs.map((faction: any) => faction.data());\r\n localStorage.setItem(CollectionType.PACKS, JSON.stringify([...packs]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.PACKS));\r\n }\r\n\r\n async getAttacks(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.ATTACKS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.ATTACKS).get().toPromise();\r\n const attacks = snapshot.docs.map((attack: any) => attack.data());\r\n localStorage.setItem(CollectionType.ATTACKS, JSON.stringify([...attacks]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.ATTACKS));\r\n }\r\n\r\n async getGuilds(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.GUILDS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.GUILDS).get().toPromise();\r\n const guilds = snapshot.docs.map((guild: any) => guild.data());\r\n localStorage.setItem(CollectionType.GUILDS, JSON.stringify([...guilds]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.GUILDS));\r\n }\r\n\r\n async getStores(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.STORES)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.STORES).get().toPromise();\r\n const stores = snapshot.docs.map((store: any) => store.data());\r\n localStorage.setItem(CollectionType.STORES, JSON.stringify([...stores]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.STORES));\r\n }\r\n\r\n async getResources(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.RESOURCES)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.RESOURCES).get().toPromise();\r\n const resources = snapshot.docs.map((resource: any) => resource.data());\r\n localStorage.setItem(CollectionType.RESOURCES, JSON.stringify([...resources]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.RESOURCES));\r\n }\r\n\r\n async getStructures(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.STRUCTURES)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.STRUCTURES).get().toPromise();\r\n const structures = snapshot.docs.map((structure: any) => structure.data());\r\n localStorage.setItem(CollectionType.STRUCTURES, JSON.stringify([...structures]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.STRUCTURES));\r\n }\r\n\r\n async getHeroes(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.HEROES)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.HEROES).get().toPromise();\r\n const heroes = snapshot.docs.map((hero: any) => hero.data());\r\n localStorage.setItem(CollectionType.HEROES, JSON.stringify([...heroes]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.HEROES));\r\n }\r\n\r\n async getGods(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.GODS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.GODS).get().toPromise();\r\n const gods = snapshot.docs.map((god: any) => god.data());\r\n localStorage.setItem(CollectionType.GODS, JSON.stringify([...gods]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.GODS));\r\n }\r\n\r\n async getSkills(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.SKILLS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.SKILLS).get().toPromise();\r\n const skills = snapshot.docs.map((skill: any) => skill.data());\r\n localStorage.setItem(CollectionType.SKILLS, JSON.stringify([...skills]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.SKILLS));\r\n }\r\n\r\n async getCategories(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.CATEGORIES)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.CATEGORIES).get().toPromise();\r\n const categories = snapshot.docs.map((category: any) => category.data());\r\n localStorage.setItem(CollectionType.CATEGORIES, JSON.stringify([...categories]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.CATEGORIES));\r\n }\r\n\r\n async getFamilies(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.FAMILIES)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.FAMILIES).get().toPromise();\r\n const families = snapshot.docs.map((family: any) => family.data());\r\n localStorage.setItem(CollectionType.FAMILIES, JSON.stringify([...families]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.FAMILIES));\r\n }\r\n\r\n async getLocations(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.LOCATIONS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.LOCATIONS).get().toPromise();\r\n const locations = snapshot.docs.map((location: any) => location.data());\r\n localStorage.setItem(CollectionType.LOCATIONS, JSON.stringify([...locations]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.LOCATIONS));\r\n }\r\n\r\n async getUnits(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.UNITS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.UNITS).get().toPromise();\r\n const units = snapshot.docs.map((unit: any) => unit.data());\r\n localStorage.setItem(CollectionType.UNITS, JSON.stringify([...units]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.UNITS));\r\n }\r\n\r\n async getSpells(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.SPELLS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.SPELLS).get().toPromise();\r\n const spells = snapshot.docs.map((spell: any) => spell.data());\r\n localStorage.setItem(CollectionType.SPELLS, JSON.stringify([...spells]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.SPELLS));\r\n }\r\n\r\n async getItems(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.ITEMS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.ITEMS).get().toPromise();\r\n const items = snapshot.docs.map((item: any) => item.data());\r\n localStorage.setItem(CollectionType.ITEMS, JSON.stringify([...items]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.ITEMS));\r\n }\r\n\r\n async getPerks(): Promise<any[]> {\r\n if (!localStorage.getItem(CollectionType.PERKS)) {\r\n const snapshot = await this.angularFirestore.collection<any>(CollectionType.PERKS).get().toPromise();\r\n const perks = snapshot.docs.map((perk: any) => perk.data());\r\n localStorage.setItem(CollectionType.PERKS, JSON.stringify([...perks]));\r\n }\r\n return JSON.parse(localStorage.getItem(CollectionType.PERKS));\r\n }\r\n}\r\n","import { Injectable, Injector, ApplicationRef, ComponentFactoryResolver, ComponentRef, Type } from '@angular/core';\r\nimport { UntilDestroy } from '@ngneat/until-destroy';\r\n\r\nexport interface InjectableHTML {\r\n html: HTMLDivElement;\r\n ref: ComponentRef<any>;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ComponentService {\r\n\r\n private componentRef: ComponentRef<any>;\r\n\r\n constructor(\r\n private injector: Injector,\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n private applicationRef: ApplicationRef,\r\n ) { }\r\n\r\n public injectComponent<T>(component: Type<T>, propertySetter?: (type: T) => void): InjectableHTML {\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(component);\r\n UntilDestroy()(component);\r\n this.componentRef = componentFactory.create(this.injector);\r\n if (propertySetter) propertySetter(this.componentRef.instance);\r\n this.applicationRef.attachView(this.componentRef.hostView);\r\n const div = document.createElement('div');\r\n div.appendChild(this.componentRef.location.nativeElement);\r\n return {\r\n html: div,\r\n ref: this.componentRef,\r\n };\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DomService {\r\n\r\n constructor() { }\r\n\r\n public scrollToElement($element: HTMLElement) {\r\n $element.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'nearest' });\r\n }\r\n\r\n public scrollToTop($element: HTMLElement = null) {\r\n if ($element) {\r\n $element.scroll(0, 0);\r\n } else {\r\n window.scroll(0, 0);\r\n }\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport * as firebase from 'firebase';\r\nimport { AngularFireAuth } from '@angular/fire/auth';\r\nimport * as moment from 'moment';\r\nimport { CollectionType } from './cache.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FirebaseService {\r\n\r\n attacks: any[] = [];\r\n factions: any[] = [];\r\n families: any[] = [];\r\n categories: any[] = [];\r\n gods: any[] = [];\r\n resources: any[] = [];\r\n skills: any[] = [];\r\n structures: any[] = [];\r\n guilds: any[] = [];\r\n units: any[] = [];\r\n items: any[] = [];\r\n stores: any[] = [];\r\n locations: any[] = [];\r\n spells: any[] = [];\r\n heroes: any[] = [];\r\n kingdoms: any[] = [];\r\n legends: any[] = [];\r\n perks: any[] = [];\r\n packs: any[] = [];\r\n\r\n joinedAttacks: any[] = [];\r\n joinedFactions: any[] = [];\r\n joinedFamilies: any[] = [];\r\n joinedCategories: any[] = [];\r\n joinedGods: any[] = [];\r\n joinedResources: any[] = [];\r\n joinedSkills: any[] = [];\r\n joinedStructures: any[] = [];\r\n joinedGuilds: any[] = [];\r\n joinedUnits: any[] = [];\r\n joinedItems: any[] = [];\r\n joinedStores: any[] = [];\r\n joinedLocations: any[] = [];\r\n joinedSpells: any[] = [];\r\n joinedHeroes: any[] = [];\r\n joinedLegends: any[] = [];\r\n joinedPerks: any[] = [];\r\n joinedPacks: any[] = [];\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n private angularFireAuth: AngularFireAuth,\r\n private httpClient: HttpClient,\r\n ) { }\r\n\r\n async joinFixtures(element: any) {\r\n // if (element.store) this.joinObject(element, 'store', await this.cacheService.getStores());\r\n if (element.faction) this.joinObject(element, 'faction', this.joinedFactions);\r\n if (element.adjacents) this.joinObject(element, 'adjacents', this.factions);\r\n if (element.opposites) this.joinObject(element, 'opposites', this.factions);\r\n // if (element.location) this.joinObject(element, 'location', await this.cacheService.getLocations());\r\n if (element.skills) this.joinObject(element, 'skills', this.skills);\r\n if (element.unit) this.joinObject(element, 'unit', this.joinedUnits);\r\n if (element.units) this.joinObject(element, 'units', this.joinedUnits);\r\n if (element.categories) this.joinObject(element, 'categories', this.categories);\r\n if (element.resistances) this.joinObject(element, 'resistances', this.categories);\r\n if (element.families) this.joinObject(element, 'families', this.families);\r\n if (element.spell) this.joinObject(element, 'spell', this.joinedSpells);\r\n if (element.spells) this.joinObject(element, 'spells', this.joinedSpells);\r\n // if (element.hero) this.joinObject(element, 'hero', await this.cacheService.getHeroes());\r\n // if (element.item) this.joinObject(element, 'item', await this.cacheService.getItems());\r\n // if (element.items) this.joinObject(element, 'items', await this.cacheService.getItems());\r\n if (element.resources) this.joinObject(element, 'resources', this.resources);\r\n if (element.perks) this.joinObject(element, 'perks', this.perks, true);\r\n }\r\n\r\n joinObject(element: any, subCollection: string, collection: any[], recursive: boolean = false) {\r\n if (element[subCollection] instanceof Array) {\r\n element[subCollection].forEach((subElement: any, subElementIndex: number, subElementArray: any[]) => {\r\n if (typeof subElement === 'string') {\r\n element[subCollection][subElementIndex] = JSON.parse(JSON.stringify(collection.find(el => el['id'] === subElement.replace(/^\\+|^\\-|^\\//g, ''))));\r\n if (recursive) {\r\n this.joinObject(element[subCollection][subElementIndex], 'perks', this.perks, true);\r\n }\r\n }\r\n });\r\n element[subCollection] = recursive\r\n ? element[subCollection].slice().sort((a: any, b: any) => a?.sort - b?.sort)\r\n : element[subCollection].slice().sort((a: any, b: any) => a?.name.localeCompare(b?.name));\r\n }\r\n if (typeof element[subCollection] === 'string') {\r\n element[subCollection] = JSON.parse(JSON.stringify(collection.find(el => el['id'] === element[subCollection].replace(/^\\+|^\\-|^\\//g, ''))));\r\n }\r\n }\r\n\r\n async readFixtures() {\r\n this.attacks = await this.httpClient.get<any[]>('assets/fixtures/attacks.json').toPromise();\r\n this.factions = await this.httpClient.get<any[]>('assets/fixtures/factions.json').toPromise();\r\n this.families = await this.httpClient.get<any[]>('assets/fixtures/families.json').toPromise();\r\n this.categories = await this.httpClient.get<any[]>('assets/fixtures/categories.json').toPromise();\r\n this.gods = await this.httpClient.get<any[]>('assets/fixtures/gods.json').toPromise();\r\n this.resources = await this.httpClient.get<any[]>('assets/fixtures/resources.json').toPromise();\r\n this.skills = await this.httpClient.get<any[]>('assets/fixtures/skills.json').toPromise();\r\n this.structures = await this.httpClient.get<any[]>('assets/fixtures/structures.json').toPromise();\r\n this.guilds = await this.httpClient.get<any[]>('assets/fixtures/guilds.json').toPromise();\r\n this.units = await this.httpClient.get<any[]>('assets/fixtures/units.json').toPromise();\r\n this.items = await this.httpClient.get<any[]>('assets/fixtures/items.json').toPromise();\r\n this.stores = await this.httpClient.get<any[]>('assets/fixtures/stores.json').toPromise();\r\n this.locations = await this.httpClient.get<any[]>('assets/fixtures/locations.json').toPromise();\r\n this.spells = await this.httpClient.get<any[]>('assets/fixtures/spells.json').toPromise();\r\n this.heroes = await this.httpClient.get<any[]>('assets/fixtures/heroes.json').toPromise();\r\n this.legends = await this.httpClient.get<any[]>('assets/fixtures/legends.json').toPromise();\r\n this.perks = await this.httpClient.get<any[]>('assets/fixtures/perks.json').toPromise();\r\n this.packs = await this.httpClient.get<any[]>('assets/fixtures/packs.json').toPromise();\r\n }\r\n\r\n async importFixtures(collection: string, elements: any[], batch: firebase.firestore.WriteBatch) {\r\n elements.forEach((element: any, index: number) => {\r\n element.random = index;\r\n if (element.timestamp) {\r\n element.timestamp = moment(element.timestamp, 'DD/MM/YYYY', true).toDate();\r\n }\r\n batch.set(this.angularFirestore.collection(collection).doc(element.id).ref, element);\r\n });\r\n }\r\n\r\n loadFixtures(fixtures: CollectionType[]) {\r\n this.angularFireAuth.authState.subscribe(async user => {\r\n if (user && fixtures.length) {\r\n const batch = this.angularFirestore.firestore.batch();\r\n await this.readFixtures();\r\n this.joinedFactions = JSON.parse(JSON.stringify(this.factions));\r\n this.joinedFactions.forEach(faction => this.joinFixtures(faction));\r\n if (fixtures.includes(CollectionType.FACTIONS)) {\r\n console.log(`Loading ${CollectionType.FACTIONS}...`);\r\n this.importFixtures(CollectionType.FACTIONS, this.joinedFactions, batch);\r\n }\r\n this.joinedAttacks = JSON.parse(JSON.stringify(this.attacks));\r\n this.joinedAttacks.forEach(attack => this.joinFixtures(attack));\r\n if (fixtures.includes(CollectionType.ATTACKS)) {\r\n console.log(`Loading ${CollectionType.ATTACKS}...`);\r\n this.importFixtures(CollectionType.ATTACKS, this.joinedAttacks, batch);\r\n }\r\n this.joinedGuilds = JSON.parse(JSON.stringify(this.guilds));\r\n this.joinedGuilds.forEach(guild => this.joinFixtures(guild));\r\n if (fixtures.includes(CollectionType.GUILDS)) {\r\n console.log(`Loading ${CollectionType.GUILDS}...`);\r\n this.importFixtures(CollectionType.GUILDS, this.joinedGuilds, batch);\r\n }\r\n this.joinedFamilies = JSON.parse(JSON.stringify(this.families));\r\n this.joinedFamilies.forEach(family => this.joinFixtures(family));\r\n if (fixtures.includes(CollectionType.FAMILIES)) {\r\n console.log(`Loading ${CollectionType.FAMILIES}...`);\r\n this.importFixtures(CollectionType.FAMILIES, this.joinedFamilies, batch);\r\n }\r\n this.joinedCategories = JSON.parse(JSON.stringify(this.categories));\r\n this.joinedCategories.forEach(category => this.joinFixtures(category));\r\n if (fixtures.includes(CollectionType.CATEGORIES)) {\r\n console.log(`Loading ${CollectionType.CATEGORIES}...`);\r\n this.importFixtures(CollectionType.CATEGORIES, this.joinedCategories, batch);\r\n }\r\n this.joinedGods = JSON.parse(JSON.stringify(this.gods));\r\n this.joinedGods.forEach(god => this.joinFixtures(god));\r\n if (fixtures.includes(CollectionType.GODS)) {\r\n console.log(`Loading ${CollectionType.GODS}...`);\r\n this.importFixtures(CollectionType.GODS, this.joinedGods, batch);\r\n }\r\n this.joinedResources = JSON.parse(JSON.stringify(this.resources));\r\n this.joinedResources.forEach(resource => this.joinFixtures(resource));\r\n if (fixtures.includes(CollectionType.RESOURCES)) {\r\n console.log(`Loading ${CollectionType.RESOURCES}...`);\r\n this.importFixtures(CollectionType.RESOURCES, this.joinedResources, batch);\r\n }\r\n this.joinedStructures = JSON.parse(JSON.stringify(this.structures));\r\n this.joinedStructures.forEach(structure => this.joinFixtures(structure));\r\n if (fixtures.includes(CollectionType.STRUCTURES)) {\r\n console.log(`Loading ${CollectionType.STRUCTURES}...`);\r\n this.importFixtures(CollectionType.STRUCTURES, this.joinedStructures, batch);\r\n }\r\n this.joinedSkills = JSON.parse(JSON.stringify(this.skills));\r\n this.joinedSkills.forEach(skill => this.joinFixtures(skill));\r\n if (fixtures.includes(CollectionType.SKILLS)) {\r\n console.log(`Loading ${CollectionType.SKILLS}...`);\r\n this.importFixtures(CollectionType.SKILLS, this.joinedSkills, batch);\r\n }\r\n this.joinedUnits = JSON.parse(JSON.stringify(this.units));\r\n this.joinedUnits.forEach(unit => this.joinFixtures(unit));\r\n if (fixtures.includes(CollectionType.UNITS)) {\r\n console.log(`Loading ${CollectionType.UNITS}...`);\r\n this.importFixtures(CollectionType.UNITS, this.joinedUnits, batch);\r\n }\r\n this.joinedSpells = JSON.parse(JSON.stringify(this.spells));\r\n this.joinedSpells.forEach(spell => this.joinFixtures(spell));\r\n if (fixtures.includes(CollectionType.SPELLS)) {\r\n console.log(`Loading ${CollectionType.SPELLS}...`);\r\n this.importFixtures(CollectionType.SPELLS, this.joinedSpells, batch);\r\n }\r\n this.joinedItems = JSON.parse(JSON.stringify(this.items));\r\n this.joinedItems.forEach(item => this.joinFixtures(item));\r\n if (fixtures.includes(CollectionType.ITEMS)) {\r\n console.log(`Loading ${CollectionType.ITEMS}...`);\r\n this.importFixtures(CollectionType.ITEMS, this.joinedItems, batch);\r\n }\r\n this.joinedHeroes = JSON.parse(JSON.stringify(this.heroes));\r\n this.joinedHeroes.forEach(hero => this.joinFixtures(hero));\r\n if (fixtures.includes(CollectionType.HEROES)) {\r\n console.log(`Loading ${CollectionType.HEROES}...`);\r\n this.importFixtures(CollectionType.HEROES, this.joinedHeroes, batch);\r\n }\r\n this.joinedStores = JSON.parse(JSON.stringify(this.stores));\r\n this.joinedStores.forEach(store => this.joinFixtures(store));\r\n if (fixtures.includes(CollectionType.STORES)) {\r\n console.log(`Loading ${CollectionType.STORES}...`);\r\n this.importFixtures(CollectionType.STORES, this.joinedStores, batch);\r\n }\r\n this.joinedLocations = JSON.parse(JSON.stringify(this.locations));\r\n this.joinedLocations.forEach(quest => this.joinFixtures(quest));\r\n if (fixtures.includes(CollectionType.LOCATIONS)) {\r\n console.log(`Loading ${CollectionType.LOCATIONS}...`);\r\n this.importFixtures(CollectionType.LOCATIONS, this.joinedLocations, batch);\r\n }\r\n this.joinedLegends = JSON.parse(JSON.stringify(this.legends));\r\n this.joinedLegends.forEach(legend => this.joinFixtures(legend));\r\n if (fixtures.includes(CollectionType.LEGENDS)) {\r\n console.log(`Loading ${CollectionType.LEGENDS}...`);\r\n this.importFixtures(CollectionType.LEGENDS, this.joinedLegends, batch);\r\n }\r\n this.joinedPerks = JSON.parse(JSON.stringify(this.perks));\r\n this.joinedPerks.forEach(perk => this.joinFixtures(perk));\r\n if (fixtures.includes(CollectionType.PERKS)) {\r\n console.log(`Loading ${CollectionType.PERKS}...`);\r\n this.importFixtures(CollectionType.PERKS, this.joinedPerks, batch);\r\n }\r\n this.joinedPacks = JSON.parse(JSON.stringify(this.packs));\r\n this.joinedPacks.forEach(pack => this.joinFixtures(pack));\r\n if (fixtures.includes(CollectionType.PACKS)) {\r\n console.log(`Loading ${CollectionType.PACKS}...`);\r\n this.importFixtures(CollectionType.PACKS, this.joinedPacks, batch);\r\n }\r\n await batch.commit();\r\n console.log('Fixtures loaded!');\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class LoadingService {\r\n\r\n public loading: boolean = false; // spinner\r\n\r\n constructor() { }\r\n\r\n startLoading(): void {\r\n this.loading = true;\r\n }\r\n\r\n stopLoading(): void {\r\n this.loading = false;\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { environment } from '../../environments/environment';\r\nimport * as mapboxgl from 'mapbox-gl';\r\nimport { ComponentService, InjectableHTML } from '../services/component.service';\r\nimport MapboxCircle from 'mapbox-gl-circle';\r\nimport { MarkerComponent } from '../world/marker/marker.component';\r\nimport { PopupComponent } from '../world/popup/popup.component';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from '../shared/auth/auth.state';\r\nimport { ApiService } from './api.service';\r\nimport * as _ from 'lodash';\r\nimport { MarkerType, FactionType, StoreType, LocationType } from '../shared/type/common.type';\r\nimport { NotificationService } from './notification.service';\r\nimport { distinctUntilChanged } from 'rxjs/operators';\r\nimport { Subscription } from 'rxjs';\r\n\r\nexport interface Marker {\r\n id: string;\r\n type: MarkerType;\r\n marker: mapboxgl.Marker;\r\n circle: MapboxCircle;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class MapboxService {\r\n\r\n private mapbox = (mapboxgl as typeof mapboxgl);\r\n public map: mapboxgl.Map = null;\r\n public markers: Marker[] = [];\r\n private offset: number = 10;\r\n private uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n private primaryColor: string = null;\r\n\r\n constructor(\r\n private componentService: ComponentService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private notificationService: NotificationService,\r\n ) {\r\n this.mapbox.accessToken = environment.mapbox.token;\r\n }\r\n\r\n initialize(container: string | HTMLElement) {\r\n this.primaryColor = window.getComputedStyle(document.body).getPropertyValue('--primary-color');\r\n this.map = new mapboxgl.Map({\r\n container: container,\r\n style: environment.mapbox.style + '?optimize=true',\r\n center: [environment.mapbox.lng, environment.mapbox.lat],\r\n pitch: environment.mapbox.pitch,\r\n zoom: environment.mapbox.zoom,\r\n antialias: false,\r\n dragPan: true,\r\n dragRotate: true,\r\n attributionControl: true,\r\n interactive: true,\r\n });\r\n this.map.once('load', () => {\r\n // add fog https://docs.mapbox.com/mapbox-gl-js/example/add-fog/\r\n this.map.setFog({\r\n range: [0.5, 10.0],\r\n color: '#FFFFFF',\r\n 'horizon-blend': 0.1,\r\n });\r\n // add the DEM source as a terrain layer\r\n this.map.addSource('mapbox-dem', {\r\n type: 'raster-dem',\r\n url: 'mapbox://mapbox.terrain-rgb',\r\n tileSize: 512,\r\n maxzoom: environment.mapbox.zoom,\r\n });\r\n // add the DEM source as a terrain layer with exaggerated height\r\n this.map.setTerrain({\r\n source: 'mapbox-dem',\r\n exaggeration: 3,\r\n });\r\n // add a sky layer that will show when the map is highly pitched\r\n this.map.addLayer({\r\n id: 'sky-day',\r\n type: 'sky',\r\n paint: {\r\n 'sky-type': 'gradient',\r\n },\r\n });\r\n });\r\n this.map.on('moveend', () => this.refreshMarkers());\r\n }\r\n\r\n markerVisible(marker: Marker): boolean {\r\n const lngLat: mapboxgl.LngLat = marker.marker.getLngLat();\r\n return lngLat && lngLat.lat && lngLat.lng\r\n ? this.map.getBounds().contains(lngLat)\r\n : false;\r\n }\r\n\r\n refreshMarkers(): void {\r\n this.markers.forEach((marker: Marker) => {\r\n console.log(marker, this.uid)\r\n if (marker.id !== this.uid && (this.map.getZoom() < environment.mapbox.zoom || !this.markerVisible(marker))) {\r\n marker.marker.getElement().style.display = 'none';\r\n } else {\r\n marker.marker.getElement().style.display = 'block';\r\n }\r\n });\r\n }\r\n\r\n addMarker(data: any, type: MarkerType, radius: boolean = false, fly: boolean = false): mapboxgl.Marker {\r\n // remove the old one\r\n this.removeMarker(data.id);\r\n // size\r\n const size = type === MarkerType.KINGDOM ? 70 : 44;\r\n // marker\r\n const m: InjectableHTML = this.componentService.injectComponent(MarkerComponent, component => component.data = { ...data, size: size, type: type });\r\n let marker = new mapboxgl.Marker(m.html, { anchor: 'bottom' })\r\n .setLngLat({ lat: data.coordinates.latitude, lng: data.coordinates.longitude })\r\n .addTo(this.map);\r\n // popup\r\n let p: InjectableHTML = null;\r\n let s: Subscription = null;\r\n marker = marker.setPopup(new mapboxgl.Popup({\r\n offset: [0, -(size + this.offset)],\r\n anchor: 'bottom',\r\n closeButton: false,\r\n closeOnClick: true,\r\n closeOnMove: false,\r\n maxWidth: 'none',\r\n className: 'dialog-responsive',\r\n })\r\n .setDOMContent(document.createElement('div') as HTMLDivElement)\r\n // open\r\n .on('open', ($event: any) => {\r\n p = this.componentService.injectComponent(PopupComponent, component => component.data = { ...data, type: type });\r\n p.ref.changeDetectorRef.detectChanges();\r\n marker.getPopup().setDOMContent(p.html);\r\n s = (p.ref.instance as PopupComponent).opened\r\n .asObservable()\r\n .pipe(distinctUntilChanged())\r\n .subscribe(async (open: boolean) => {\r\n if (open) {\r\n await new Promise(resolve => setTimeout(resolve, 500));\r\n this.map.easeTo({\r\n center: $event.target.getLngLat(),\r\n offset: [0, ($event.target.getElement().clientHeight / 2) + this.offset],\r\n });\r\n }\r\n });\r\n })\r\n // close\r\n .on('close', () => {\r\n marker.getPopup().setDOMContent(document.createElement('div') as HTMLDivElement);\r\n if (p && p.ref) {\r\n p.ref.destroy();\r\n p = null;\r\n }\r\n if (s) {\r\n s.unsubscribe();\r\n s = null;\r\n }\r\n }));\r\n // radius\r\n let circle = null;\r\n if (radius) {\r\n circle = new MapboxCircle({ lat: data.coordinates.latitude, lng: data.coordinates.longitude }, Math.max(1000, data.power), {\r\n editable: false,\r\n fillColor: this.primaryColor,\r\n fillOpacity: 0.2,\r\n strokeColor: this.primaryColor,\r\n strokeWeight: 1,\r\n strokeOpacity: 1,\r\n refineStroke : false,\r\n });\r\n circle.addTo(this.map);\r\n }\r\n // center\r\n if (fly) {\r\n this.goTo(data.coordinates.latitude, data.coordinates.longitude, true);\r\n }\r\n // add to list for future disposal\r\n this.markers.push({ id: data.id, marker: marker, circle: circle, type: type });\r\n // return\r\n return marker;\r\n }\r\n\r\n goTo(lat: number, lng: number, fly: boolean = false): void {\r\n if (fly) {\r\n this.map.flyTo({\r\n center: [lng, lat],\r\n essential: true,\r\n });\r\n } else {\r\n this.map.easeTo({\r\n center: [lng, lat],\r\n essential: true,\r\n });\r\n }\r\n }\r\n\r\n removeMarker(id: string): void {\r\n const index = this.markers.findIndex(item => item.id === id);\r\n if (index !== -1) {\r\n const found = this.markers[index];\r\n if (found.marker) found.marker.remove();\r\n if (found.circle) found.circle.remove();\r\n this.markers.splice(index, 1);\r\n }\r\n }\r\n\r\n clearMarkers(type: MarkerType = null): void {\r\n if (type) {\r\n this.markers.filter((marker: Marker) => marker.type === type).slice(0).forEach((marker: Marker) => this.removeMarker(marker.id));\r\n } else {\r\n this.markers.slice(0).forEach((marker: Marker) => this.removeMarker(marker.id));\r\n }\r\n }\r\n\r\n resizeMap() {\r\n if (this.map) {\r\n this.map.resize();\r\n }\r\n }\r\n\r\n addKingdomByClick(type: FactionType): void {\r\n this.map.once('click', async ($event: mapboxgl.MapMouseEvent) => {\r\n await this.apiService.addKingdom(null, type, $event.lngLat.lat, $event.lngLat.lng, 'bot-' + (Math.random() + 1).toString(36).substring(7));\r\n this.notificationService.warning('world.map.update');\r\n });\r\n }\r\n\r\n addShopByClick(type: StoreType): void {\r\n this.map.once('click', async ($event: mapboxgl.MapMouseEvent) => {\r\n await this.apiService.addShop(null, type, $event.lngLat.lat, $event.lngLat.lng, 'shop-' + (Math.random() + 1).toString(36).substring(7));\r\n this.notificationService.warning('world.map.update');\r\n });\r\n }\r\n\r\n addQuestByClick(type: LocationType): void {\r\n this.map.once('click', async ($event: mapboxgl.MapMouseEvent) => {\r\n await this.apiService.addQuest(null, type, $event.lngLat.lat, $event.lngLat.lng, 'quest-' + (Math.random() + 1).toString(36).substring(7));\r\n this.notificationService.warning('world.map.update');\r\n });\r\n }\r\n\r\n populateMapByClick(): void {\r\n this.map.once('click', async ($event: mapboxgl.MapMouseEvent) => {\r\n await this.apiService.populateMap($event.lngLat.lat, $event.lngLat.lng);\r\n this.notificationService.warning('world.map.update');\r\n });\r\n }\r\n\r\n terminalize(): void {\r\n this.clearMarkers();\r\n this.map.remove();\r\n this.map = null;\r\n this.markers = [];\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { MatSnackBar, MatSnackBarConfig, MatSnackBarDismiss, MatSnackBarRef } from '@angular/material/snack-bar';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { LongPipe } from '../pipes/long.pipe';\r\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\r\nimport { filter, tap, map, takeUntil, delay, take } from 'rxjs/operators';\r\n\r\nenum SnackBarType {\r\n SUCCESS = 'success',\r\n WARNING = 'warning',\r\n ERROR = 'error',\r\n}\r\n\r\ninterface SnackBarQueueItem {\r\n message: string;\r\n showing: boolean;\r\n type: SnackBarType;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class NotificationService {\r\n\r\n private options: MatSnackBarConfig = {\r\n duration: 2500,\r\n horizontalPosition: 'right',\r\n verticalPosition: 'top',\r\n };\r\n private readonly snackBarQueue = new BehaviorSubject<SnackBarQueueItem[]>([]);\r\n private readonly snackBarQueue$ = this.snackBarQueue.asObservable();\r\n private readonly ngDestroy = new Subject();\r\n\r\n constructor(\r\n private snackBar: MatSnackBar,\r\n private translateService: TranslateService,\r\n ) {\r\n this.snackBarQueue$\r\n .pipe(\r\n filter((queue: SnackBarQueueItem[]) => queue.length > 0 && !queue[0].showing),\r\n tap(() => {\r\n const updatedQueue = this.snackBarQueue.value;\r\n updatedQueue[0].showing = true;\r\n this.snackBarQueue.next(updatedQueue);\r\n }),\r\n map(queue => queue[0]),\r\n takeUntil(this.ngDestroy),\r\n ).subscribe((notification: SnackBarQueueItem) => this.showSnackbar(notification.message, notification.type));\r\n }\r\n\r\n private showSnackbar(message: string, type: SnackBarType): void {\r\n let matSnackBarRef: MatSnackBarRef<any> = null;\r\n switch (type) {\r\n case SnackBarType.SUCCESS:\r\n matSnackBarRef = this.snackBar.open(message, '✔️', {...this.options, panelClass: ['mat-toolbar', 'mat-accent']});\r\n break;\r\n case SnackBarType.WARNING:\r\n matSnackBarRef = this.snackBar.open(message, '⚠️', {...this.options, panelClass: ['mat-toolbar', 'mat-primary']});\r\n break;\r\n case SnackBarType.ERROR:\r\n matSnackBarRef = this.snackBar.open(message, '❌', {...this.options, panelClass: ['mat-toolbar', 'mat-warn']});\r\n break;\r\n }\r\n if (matSnackBarRef) this.removeDismissedSnackBar(matSnackBarRef.afterDismissed());\r\n }\r\n\r\n private removeDismissedSnackBar(snackBar: Observable<MatSnackBarDismiss>): void {\r\n snackBar\r\n .pipe(\r\n delay(50),\r\n take(1),\r\n )\r\n .subscribe(() => {\r\n const updatedQueue = this.snackBarQueue.value;\r\n if (updatedQueue[0].showing) updatedQueue.shift();\r\n this.snackBarQueue.next(updatedQueue);\r\n });\r\n }\r\n\r\n success(text: string, variable?: any): void {\r\n if (variable) {\r\n Object.keys(variable).forEach((key, index) => {\r\n if (typeof variable[key] === 'number') variable[key] = new LongPipe().transform(variable[key]);\r\n if (typeof variable[key] === 'string' && variable[key].includes('.')) variable[key] = this.translateService.instant(variable[key]);\r\n });\r\n }\r\n const message = this.translateService.instant(text, variable);\r\n const type = SnackBarType.SUCCESS;\r\n this.snackBarQueue.next(this.snackBarQueue.value.concat([{ message, type, showing: false }]));\r\n }\r\n\r\n warning(text: string): void {\r\n const message = this.translateService.instant(text);\r\n const type = SnackBarType.WARNING;\r\n this.snackBarQueue.next(this.snackBarQueue.value.concat([{ message, type, showing: false }]));\r\n }\r\n\r\n error(text: string): void {\r\n const message = this.translateService.instant(text);\r\n const type = SnackBarType.ERROR;\r\n this.snackBarQueue.next(this.snackBarQueue.value.concat([{ message, type, showing: false }]));\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { TourService } from 'ngx-ui-tour-md-menu';\r\nimport { ReplaySubject } from 'rxjs';\r\nimport { IStepOption } from 'ngx-ui-tour-core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class TutorialService {\r\n\r\n constructor(\r\n private tourService: TourService,\r\n ) { }\r\n\r\n ready(route: string) {\r\n const waitingSteps = this.tourService.steps.filter(step => (step.route as string).includes(route));\r\n waitingSteps.forEach(waitingStep => (waitingStep.waitFor as ReplaySubject<void>).next());\r\n }\r\n\r\n start(step?: string | undefined) {\r\n if (step) this.tourService.startAt(step);\r\n else this.tourService.start();\r\n }\r\n\r\n initialize() {\r\n const options: IStepOption = {\r\n preventScrolling: false,\r\n enableBackdrop: true,\r\n // waitFor: new ReplaySubject<void>(),\r\n };\r\n this.tourService.disableHotkeys();\r\n this.tourService.initialize([\r\n { route: '/kingdom/city', stepId: 'tour.supplies', anchorId: 'tour.supplies', title: 'kingdom.supplies.name', content: 'kingdom.supplies.tour' },\r\n { route: '/kingdom/city', stepId: 'tour.city', anchorId: 'tour.city', title: 'kingdom.city.name', content: 'kingdom.city.tour' },\r\n { route: '/kingdom/city', stepId: 'tour.tax', anchorId: 'tour.tax', title: 'kingdom.tax.name', content: 'kingdom.tax.tour' },\r\n { route: '/kingdom/city', stepId: 'tour.charge', anchorId: 'tour.charge', title: 'kingdom.charge.name', content: 'kingdom.charge.tour' },\r\n { route: '/kingdom/city', stepId: 'tour.explore', anchorId: 'tour.explore', title: 'kingdom.explore.name', content: 'kingdom.explore.tour' },\r\n { route: '/kingdom/auction', stepId: 'tour.auction', anchorId: 'tour.auction', title: 'kingdom.auction.name', content: 'kingdom.auction.tour' },\r\n { route: '/kingdom/auction', stepId: 'tour.bid', anchorId: 'tour.bid', title: 'kingdom.bid.name', content: 'kingdom.bid.tour' },\r\n { route: '/kingdom/emporium', stepId: 'tour.emporium', anchorId: 'tour.emporium', title: 'kingdom.emporium.name', content: 'kingdom.emporium.tour' },\r\n { route: '/kingdom/emporium', stepId: 'tour.tree', anchorId: 'tour.tree', title: 'kingdom.tree.name', content: 'kingdom.tree.tour' },\r\n { route: '/kingdom/emporium', stepId: 'tour.mining', anchorId: 'tour.mining', title: 'kingdom.mining.name', content: 'kingdom.mining.tour' },\r\n { route: '/kingdom/army', stepId: 'tour.army', anchorId: 'tour.army', title: 'kingdom.army.name', content: 'kingdom.army.tour' },\r\n { route: '/kingdom/army', stepId: 'tour.attack', anchorId: 'tour.attack', title: 'kingdom.attack.name', content: 'kingdom.attack.tour' },\r\n { route: '/kingdom/army', stepId: 'tour.defense', anchorId: 'tour.defense', title: 'kingdom.defense.name', content: 'kingdom.defense.tour' },\r\n { route: '/kingdom/army', stepId: 'tour.recruit', anchorId: 'tour.recruit', title: 'kingdom.recruit.name', content: 'kingdom.recruit.tour' },\r\n { route: '/kingdom/tavern', stepId: 'tour.tavern', anchorId: 'tour.tavern', title: 'kingdom.tavern.name', content: 'kingdom.tavern.tour' },\r\n { route: '/kingdom/tavern', stepId: 'tour.leadership', anchorId: 'tour.leadership', title: 'kingdom.leadership.name', content: 'kingdom.leadership.tour' },\r\n { route: '/kingdom/tavern', stepId: 'tour.guard', anchorId: 'tour.guard', title: 'kingdom.guard.name', content: 'kingdom.guard.tour' },\r\n { route: '/kingdom/census', stepId: 'tour.census', anchorId: 'tour.census', title: 'kingdom.census.name', content: 'kingdom.census.tour' },\r\n { route: '/kingdom/census', stepId: 'tour.kingdom', anchorId: 'tour.kingdom', title: 'kingdom.kingdom.name', content: 'kingdom.kingdom.tour' },\r\n { route: '/kingdom/archive', stepId: 'tour.archive', anchorId: 'tour.archive', title: 'kingdom.archive.name', content: 'kingdom.archive.tour' },\r\n { route: '/kingdom/clan', stepId: 'tour.clan', anchorId: 'tour.clan', title: 'kingdom.clan.name', content: 'kingdom.clan.tour' },\r\n { route: '/kingdom/clan', stepId: 'tour.guild', anchorId: 'tour.guild', title: 'kingdom.guild.name', content: 'kingdom.guild.tour' },\r\n { route: '/kingdom/sorcery', stepId: 'tour.sorcery', anchorId: 'tour.sorcery', title: 'kingdom.sorcery.name', content: 'kingdom.sorcery.tour' },\r\n { route: '/kingdom/sorcery', stepId: 'tour.arcanism', anchorId: 'tour.arcanism', title: 'kingdom.arcanism.name', content: 'kingdom.arcanism.tour' },\r\n { route: '/kingdom/sorcery', stepId: 'tour.protection', anchorId: 'tour.protection', title: 'kingdom.protection.name', content: 'kingdom.protection.tour' },\r\n { route: '/kingdom/temple', stepId: 'tour.temple', anchorId: 'tour.temple', title: 'kingdom.temple.name', content: 'kingdom.temple.tour' },\r\n { route: '/kingdom/temple', stepId: 'tour.break', anchorId: 'tour.break', title: 'kingdom.break.name', content: 'kingdom.break.tour' },\r\n { route: '/kingdom/temple', stepId: 'tour.dispel', anchorId: 'tour.dispel', title: 'kingdom.dispel.name', content: 'kingdom.dispel.tour' },\r\n { route: '/user/encyclopedia', stepId: 'tour.encyclopedia', anchorId: 'tour.encyclopedia', title: 'user.encyclopedia.name', content: 'user.encyclopedia.tour' },\r\n ], options);\r\n }\r\n}\r\n","export class SetUserAction {\r\n public static readonly type = '[User] Set User';\r\n constructor(public uid: string) {}\r\n}\r\n\r\nexport class SetKingdomAction {\r\n public static readonly type = '[User] Set Kingdom';\r\n constructor(public uid: string) {}\r\n}\r\n\r\nexport class SetKingdomSuppliesAction {\r\n public static readonly type = '[User] Set Kingdom supplies';\r\n constructor(public uid: string) {}\r\n}\r\n\r\nexport class SetKingdomBuildingsAction {\r\n public static readonly type = '[User] Set Kingdom buildings';\r\n constructor(public uid: string) {}\r\n}\r\n\r\nexport class LoginWithGoogleAction {\r\n public static readonly type = '[User] Login with google';\r\n constructor() {}\r\n}\r\n\r\nexport class LogoutAction {\r\n public static readonly type = '[User] Logout user';\r\n constructor() {}\r\n}\r\n","import { State, Action, Selector, StateContext, NgxsOnInit } from '@ngxs/store';\r\nimport { SetUserAction, SetKingdomAction, SetKingdomSuppliesAction, SetKingdomBuildingsAction, LoginWithGoogleAction, LogoutAction } from './auth.actions';\r\nimport { auth } from 'firebase/app';\r\nimport { AngularFireAuth } from '@angular/fire/auth';\r\nimport { Injectable } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { tap } from 'rxjs/operators';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { calculate } from 'src/app/pipes/turn.pipe';\r\n\r\nexport interface AuthStateModel {\r\n kingdom: any;\r\n uid: string | null;\r\n supplies: any[];\r\n buildings: any[];\r\n logged: boolean;\r\n clock: Date | null;\r\n popup: string | null;\r\n}\r\n\r\nexport const initial: AuthStateModel = {\r\n uid: null,\r\n kingdom: null,\r\n supplies: [],\r\n buildings: [],\r\n logged: false,\r\n clock: null,\r\n popup: null,\r\n};\r\n\r\n@State<AuthStateModel>({\r\n name: 'auth',\r\n defaults: initial,\r\n})\r\n@Injectable()\r\nexport class AuthState implements NgxsOnInit {\r\n\r\n @Selector()\r\n public static getUserUID(state: AuthStateModel): string {\r\n return state && state.uid;\r\n }\r\n\r\n @Selector()\r\n public static getKingdomSupplies(state: AuthStateModel): any[] {\r\n return state && state.supplies;\r\n }\r\n\r\n @Selector()\r\n public static getKingdomGem(state: AuthStateModel): any {\r\n return state && state.supplies.find(supply => supply.id === 'gem');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomTurn(state: AuthStateModel): any {\r\n const turns = state.supplies.find(supply => supply.id === 'turn');\r\n if (state && turns) {\r\n const kingdomTurn = JSON.parse(JSON.stringify(turns));\r\n kingdomTurn.quantity = calculate(kingdomTurn.timestamp.seconds * 1000, Date.now(), kingdomTurn.resource.max, kingdomTurn.resource.ratio);\r\n return kingdomTurn;\r\n }\r\n return null;\r\n }\r\n\r\n @Selector()\r\n public static getKingdomLand(state: AuthStateModel): any {\r\n return state && state.supplies.find(supply => supply.id === 'land');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomGold(state: AuthStateModel): any {\r\n return state && state.supplies.find(supply => supply.id === 'gold');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomMana(state: AuthStateModel): any {\r\n return state && state.supplies.find(supply => supply.id === 'mana');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomPopulation(state: AuthStateModel): any {\r\n return state && state.supplies.find(supply => supply.id === 'population');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomBuildings(state: AuthStateModel): any[] {\r\n return state && state.buildings;\r\n }\r\n\r\n @Selector()\r\n public static getKingdomVillage(state: AuthStateModel): any {\r\n return state && state.buildings.find(building => building.id === 'village');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomNode(state: AuthStateModel): any {\r\n return state && state.buildings.find(building => building.id === 'node');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomWorkshop(state: AuthStateModel): any {\r\n return state && state.buildings.find(building => building.id === 'workshop');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomAcademy(state: AuthStateModel): any {\r\n return state && state.buildings.find(building => building.id === 'academy');\r\n }\r\n\r\n @Selector()\r\n public static getKingdomGuild(state: AuthStateModel): string | boolean {\r\n return state && state.kingdom && JSON.stringify({ guild: state.kingdom.guild, guilded: state.kingdom.guilded.toMillis() });\r\n }\r\n\r\n @Selector()\r\n public static getKingdomClan(state: AuthStateModel): any {\r\n return state && state.kingdom && state.kingdom.clan;\r\n }\r\n\r\n @Selector()\r\n public static getKingdomTree(state: AuthStateModel): any {\r\n return state && state.kingdom && state.kingdom.tree;\r\n }\r\n\r\n @Selector()\r\n public static getKingdom(state: AuthStateModel): any {\r\n return state && state.kingdom;\r\n }\r\n\r\n @Selector()\r\n public static getUserLoggedIn(state: AuthStateModel): boolean {\r\n return state && state.logged;\r\n }\r\n\r\n @Selector()\r\n public static getAuthState(state: AuthStateModel): AuthStateModel {\r\n return state;\r\n }\r\n\r\n @Selector()\r\n public static getClock(state: AuthStateModel): Date {\r\n return state && state.clock;\r\n }\r\n\r\n constructor(\r\n private angularFireAuth: AngularFireAuth,\r\n private angularFirestore: AngularFirestore,\r\n private router: Router,\r\n private notificationService: NotificationService,\r\n ) { }\r\n\r\n ngxsOnInit(ctx: StateContext<AuthStateModel>) {\r\n setInterval(() => {\r\n ctx.patchState({\r\n clock: new Date(),\r\n });\r\n }, 1000);\r\n this.angularFireAuth.authState.subscribe((user: any) => {\r\n if (user) {\r\n ctx.dispatch(new SetUserAction(user.uid));\r\n ctx.dispatch(new SetKingdomAction(user.uid));\r\n ctx.dispatch(new SetKingdomSuppliesAction(user.uid));\r\n ctx.dispatch(new SetKingdomBuildingsAction(user.uid));\r\n this.notificationService.success('user.auth.authorized');\r\n const route = localStorage.getItem('route') || '/kingdom/city';\r\n // fix to use #fragments\r\n const tree = this.router.parseUrl(route);\r\n const fragment = tree.fragment;\r\n tree.queryParams = {};\r\n tree.fragment = null;\r\n this.router.navigate([tree.toString()], { fragment: fragment });\r\n } else {\r\n this.router.navigate(['/user/landing']);\r\n }\r\n });\r\n }\r\n\r\n @Action(LoginWithGoogleAction)\r\n async loginWithGoogle(ctx: StateContext<AuthStateModel>) {\r\n await this.angularFireAuth.signInWithPopup(new auth.GoogleAuthProvider());\r\n }\r\n\r\n @Action(LogoutAction)\r\n async logout(ctx: StateContext<AuthStateModel>) {\r\n await this.angularFireAuth.signOut();\r\n const state = ctx.getState();\r\n ctx.setState({\r\n ...state,\r\n uid: null,\r\n kingdom: null,\r\n supplies: [],\r\n buildings: [],\r\n logged: false,\r\n clock: null,\r\n });\r\n }\r\n\r\n @Action(SetUserAction)\r\n setUser(ctx: StateContext<AuthStateModel>, payload: SetUserAction) {\r\n const state = ctx.getState();\r\n ctx.setState({\r\n ...state,\r\n uid: payload.uid,\r\n logged: true,\r\n });\r\n }\r\n\r\n @Action(SetKingdomAction)\r\n setKingdom(ctx: StateContext<AuthStateModel>, payload: SetKingdomAction) {\r\n return this.angularFirestore.doc<any>(`kingdoms/${payload.uid}`).valueChanges().pipe(\r\n tap((kingdom: any) => {\r\n const state = ctx.getState();\r\n ctx.setState({\r\n ...state,\r\n kingdom: kingdom,\r\n });\r\n }),\r\n );\r\n }\r\n\r\n @Action(SetKingdomSuppliesAction)\r\n setKingdomSupplies(ctx: StateContext<AuthStateModel>, payload: SetKingdomSuppliesAction) {\r\n return this.angularFirestore.collection<any>(`kingdoms/${payload.uid}/supplies`).valueChanges({ idField: 'fid' }).pipe(\r\n tap((supplies: any[]) => {\r\n const state = ctx.getState();\r\n ctx.setState({\r\n ...state,\r\n supplies: supplies.sort((a, b) => a.resource.sort - b.resource.sort),\r\n });\r\n }),\r\n );\r\n }\r\n\r\n @Action(SetKingdomBuildingsAction)\r\n setKingdomBuildings(ctx: StateContext<AuthStateModel>, payload: SetKingdomBuildingsAction) {\r\n return this.angularFirestore.collection<any>(`kingdoms/${payload.uid}/buildings`).valueChanges({ idField: 'fid' }).pipe(\r\n tap((buildings: any[]) => {\r\n const state = ctx.getState();\r\n ctx.setState({\r\n ...state,\r\n buildings: buildings,\r\n });\r\n }),\r\n );\r\n }\r\n\r\n}\r\n","import { MatPaginatorIntl } from '@angular/material/paginator';\r\nimport { TranslateParser, TranslateService } from '@ngx-translate/core';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class PaginatorIntl extends MatPaginatorIntl {\r\n\r\n private rangeLabelIntl: string;\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private translateParser: TranslateParser,\r\n ) {\r\n super();\r\n this.translateService.onLangChange.subscribe((e: Event) => this.getTranslations());\r\n this.getTranslations();\r\n }\r\n\r\n getTranslations() {\r\n this.translateService.get([\r\n 'paginator.itemsPerPageLabel',\r\n 'paginator.nextPageLabel',\r\n 'paginator.previousPageLabel',\r\n 'paginator.firstPageLabel',\r\n 'paginator.lastPageLabel',\r\n 'paginator.rangeLabelIntl',\r\n ]).subscribe((translation: any) => {\r\n this.itemsPerPageLabel = translation['paginator.itemsPerPageLabel'];\r\n this.nextPageLabel = translation['paginator.nextPageLabel'];\r\n this.previousPageLabel = translation['paginator.previousPageLabel'];\r\n this.firstPageLabel = translation['paginator.firstPageLabel'];\r\n this.lastPageLabel = translation['paginator.lastPageLabel'];\r\n this.rangeLabelIntl = translation['paginator.rangeLabelIntl'];\r\n this.changes.next();\r\n });\r\n }\r\n\r\n getRangeLabel = (page: number, pageSize: number, length: number) => {\r\n const total = Math.max(length, 0);\r\n const start = page * pageSize;\r\n const end = start < length\r\n ? Math.min(start + pageSize, length)\r\n : start + pageSize;\r\n return this.translateParser.interpolate(this.rangeLabelIntl, { start: start, end: end, length: total });\r\n }\r\n\r\n}\r\n","// angular\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { LayoutModule } from '@angular/cdk/layout';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { TranslateLoader, TranslateModule } from '@ngx-translate/core';\r\nimport { TranslateHttpLoader } from '@ngx-translate/http-loader';\r\nimport { HttpClient, HttpClientModule } from '@angular/common/http';\r\n// material\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatSidenavModule } from '@angular/material/sidenav';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatMenuModule } from '@angular/material/menu';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatPaginatorModule } from '@angular/material/paginator';\r\nimport { MatSortModule } from '@angular/material/sort';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatTabsModule } from '@angular/material/tabs';\r\nimport { MatBadgeModule } from '@angular/material/badge';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatNativeDateModule } from '@angular/material/core';\r\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n// plugins\r\nimport { TourMatMenuModule } from 'ngx-ui-tour-md-menu';\r\nimport { NgxCurrencyModule, CurrencyMaskInputMode } from 'ngx-currency';\r\n// components\r\nimport { ShellComponent } from './shell/shell.component';\r\n// pipes\r\nimport { ShortPipe } from '../pipes/short.pipe';\r\nimport { IconPipe } from '../pipes/icon.pipe';\r\nimport { LongPipe } from '../pipes/long.pipe';\r\nimport { LegendaryPipe } from '../pipes/legendary.pipe';\r\nimport { TurnPipe } from '../pipes/turn.pipe';\r\nimport { ScrollingModule } from '@angular/cdk/scrolling';\r\nimport { StatusComponent } from './shell/status.component';\r\nimport { TourComponent } from './tour/tour.component';\r\n\r\n// AOT compilation support\r\nexport function httpTranslateLoader(http: HttpClient) {\r\n return new TranslateHttpLoader(http);\r\n}\r\n\r\nconst components = [\r\n ShellComponent,\r\n ShortPipe,\r\n IconPipe,\r\n LongPipe,\r\n LegendaryPipe,\r\n TurnPipe,\r\n TourComponent,\r\n];\r\nconst modules = [\r\n CommonModule,\r\n RouterModule,\r\n MatToolbarModule,\r\n MatIconModule,\r\n LayoutModule,\r\n MatButtonModule,\r\n MatSidenavModule,\r\n MatListModule,\r\n MatMenuModule,\r\n MatIconModule,\r\n MatCardModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatSnackBarModule,\r\n FlexLayoutModule,\r\n MatChipsModule,\r\n MatTableModule,\r\n MatPaginatorModule,\r\n MatSortModule,\r\n HttpClientModule,\r\n MatSelectModule,\r\n MatTabsModule,\r\n MatBadgeModule,\r\n DragDropModule,\r\n MatProgressBarModule,\r\n MatDialogModule,\r\n FormsModule,\r\n MatCheckboxModule,\r\n MatFormFieldModule,\r\n ReactiveFormsModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatProgressSpinnerModule,\r\n MatBottomSheetModule,\r\n MatExpansionModule,\r\n MatTooltipModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components,\r\n StatusComponent,\r\n ],\r\n imports: [\r\n ...modules,\r\n TranslateModule.forChild({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: httpTranslateLoader,\r\n deps: [HttpClient],\r\n },\r\n isolate: false,\r\n }),\r\n TourMatMenuModule,\r\n NgxCurrencyModule.forRoot({\r\n align: 'right',\r\n allowNegative: false,\r\n allowZero: true,\r\n decimal: ',',\r\n precision: 0,\r\n prefix: '',\r\n suffix: '',\r\n thousands: '.',\r\n nullable: true,\r\n min: null,\r\n max: null,\r\n inputMode: CurrencyMaskInputMode.FINANCIAL,\r\n }),\r\n ScrollingModule,\r\n ],\r\n exports: [\r\n ...components,\r\n ...modules,\r\n TranslateModule,\r\n ],\r\n})\r\nexport class SharedModule { }\r\n","<mat-sidenav-container class=\"app-shell sidenav-container\" autosize [hasBackdrop]=\"(isHandset$ | async)\">\r\n <!-- sidenav -->\r\n <mat-sidenav\r\n #drawer\r\n class=\"sidenav\"\r\n fixedInViewport\r\n [attr.role]=\"(isHandset$ | async) ? 'dialog' : 'navigation'\"\r\n [mode]=\"(isHandset$ | async) ? 'over' : 'side'\"\r\n [opened]=\"(angularFireAuth.authState | async)\">\r\n <mat-toolbar>\r\n <!-- toggler -->\r\n <button type=\"button\" aria-label=\"toggle\" mat-icon-button (click)=\"toggle()\">\r\n <mat-icon aria-label=\"menu\">menu</mat-icon>\r\n </button>\r\n <!-- title -->\r\n <span class=\"fill-space\"></span>\r\n <span class=\"logo\">{{ ((link$ | async)?.name || 'landing.title.name') | translate }}</span>\r\n <span class=\"fill-space\"></span>\r\n <!-- language -->\r\n <button mat-icon-button [matMenuTriggerFor]=\"language\">\r\n <img [src]=\"getLang()?.image\" [alt]=\"getLang()?.lang\">\r\n </button>\r\n <mat-menu #language=\"matMenu\">\r\n <a mat-menu-item *ngFor=\"let l of langs\" [ngClass]=\"{ 'active': translateService.currentLang === l.lang }\" (click)=\"translateService.use(l.lang)\" class=\"flag-menu\">\r\n <img [src]=\"l.image\" [alt]=\"l.lang\">\r\n <span>{{ l.lang.toString().toUpperCase() }}</span>\r\n </a>\r\n </mat-menu>\r\n </mat-toolbar>\r\n <!-- scroll container -->\r\n <div class=\"scroll-container\" [ngStyle]=\"{ height: (isHandset$ | async) === false ? 'calc(100% - 64px)' : 'calc(100% - 56px)' }\">\r\n <!-- links -->\r\n <mat-nav-list dense class=\"router-list\">\r\n <ng-container *ngFor=\"let group of groups\">\r\n <div matSubheader>\r\n <img [src]=\"group.image\" [alt]=\"group.name | translate\">\r\n <span>{{ group.name | translate }}</span>\r\n </div>\r\n <ng-container *ngFor=\"let link of group.links\">\r\n <a mat-list-item\r\n [disabled]=\"(angularFireAuth.authState | async) === (false || null || undefined)\"\r\n (click)=\"close()\"\r\n [routerLink]=\"link.url ? link.url : null\"\r\n [routerLinkActive]=\"link.url ? ['active'] : []\"\r\n [routerLinkActiveOptions]=\"{ exact: true }\">\r\n <div mat-list-avatar [matBadge]=\"link.name === 'kingdom.archive.name' && reports ? reports : undefined\">\r\n <img mat-list-avatar [src]=\"link.image\" [alt]=\"link.name | translate\">\r\n </div>\r\n <div mat-line>{{ link.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ link.description | translate }}</div>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </mat-nav-list>\r\n </div>\r\n </mat-sidenav>\r\n <!-- sidenav content -->\r\n <mat-sidenav-content>\r\n <mat-toolbar class=\"mat-elevation-z8\">\r\n <!-- toggler -->\r\n <button type=\"button\" aria-label=\"toggle\" mat-icon-button (click)=\"toggle()\">\r\n <mat-icon aria-label=\"menu\">{{ drawer.opened ? 'first_page' : 'last_page' }}</mat-icon>\r\n </button>\r\n <span class=\"fill-space\"></span>\r\n <!-- title -->\r\n <span class=\"logo\" *ngIf=\"!(angularFireAuth.authState | async)\">{{ 'landing.title.name' | translate }}</span>\r\n <!-- supply list -->\r\n <mat-nav-list dense class=\"supply-list\" role=\"navigation\" *ngIf=\"(angularFireAuth.authState | async)\" tourAnchor=\"tour.supplies\">\r\n <mat-list-item *ngFor=\"let supply of kingdomSupplies$ | async; let i = index\" (click)=\"openStatusSheet()\">\r\n <div mat-list-avatar\r\n [matTooltip]=\"supply.resource.name | translate\"\r\n matTooltipPosition=\"below\"\r\n [matBadge]=\"supply.timestamp ? (supply.timestamp | turn:supply.resource.max:supply.resource.ratio | async) : (supply.quantity | short)\"\r\n [matBadgeColor]=\"supply.balance === 0 ? 'primary' : supply.balance > 0 ? 'accent' : 'warn'\"\r\n [matBadgePosition]=\"i % 2 === 0 ? 'below before' : 'above before'\"\r\n matBadgeOverlap=\"true\">\r\n <img mat-list-avatar [src]=\"supply.resource.image\" [alt]=\"supply.resource.name | translate\">\r\n </div>\r\n </mat-list-item>\r\n </mat-nav-list>\r\n <!-- auth -->\r\n <span class=\"fill-space\"></span>\r\n <button mat-icon-button [matMenuTriggerFor]=\"auth\">\r\n <mat-icon>account_circle</mat-icon>\r\n </button>\r\n <mat-menu #auth=\"matMenu\">\r\n <ng-container *ngIf=\"(angularFireAuth.authState | async); else notLogged\">\r\n <a mat-menu-item routerLink=\"/user/encyclopedia\" fragment=\"help\"><mat-icon>help</mat-icon>{{ 'user.menu.help' | translate }}</a>\r\n <a mat-menu-item (click)=\"tour()\"><mat-icon>map</mat-icon>{{ 'user.menu.tour' | translate }}</a>\r\n <a mat-menu-item routerLink=\"/kingdom/emporium\"><mat-icon>local_mall</mat-icon>{{ 'user.menu.store' | translate }}</a>\r\n <a mat-menu-item routerLink=\"/user/encyclopedia\" fragment=\"changelog\"><mat-icon>description</mat-icon>{{ 'user.menu.changelog' | translate }}</a>\r\n <a mat-menu-item routerLink=\"/user/encyclopedia\" fragment=\"bonfire\"><mat-icon>question_answer</mat-icon>{{ 'user.menu.bonfire' | translate }}</a>\r\n <a mat-menu-item routerLink=\"/user/landing\" fragment=\"legend\"><mat-icon>equalizer</mat-icon>{{ 'user.menu.legend' | translate }}</a>\r\n <a mat-menu-item (click)=\"logout()\"><mat-icon>lock</mat-icon>{{ 'user.menu.logout' | translate }}</a>\r\n </ng-container>\r\n <ng-template #notLogged>\r\n <a mat-menu-item (click)=\"login(main)\"><mat-icon>lock_open</mat-icon>{{ 'user.menu.login' | translate }}</a>\r\n </ng-template>\r\n </mat-menu>\r\n </mat-toolbar>\r\n <!-- main content -->\r\n <main\r\n #main\r\n class=\"main-content\"\r\n id=\"scroll\"\r\n cdkScrollable\r\n [ngStyle]=\"{ height: (isHandset$ | async) === false ? 'calc(100vh - 64px)' : 'calc(100vh - 56px)', width: (isHandset$ | async) === false && drawer.opened ? 'calc(100vw - 300px)' : '100vw' }\">\r\n <ng-content></ng-content>\r\n </main>\r\n </mat-sidenav-content>\r\n</mat-sidenav-container>\r\n","import { Component, ViewChild, OnInit } from '@angular/core';\r\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\r\nimport { Observable } from 'rxjs';\r\nimport { map, shareReplay, filter } from 'rxjs/operators';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { AngularFireAuth } from '@angular/fire/auth';\r\nimport { Router, NavigationEnd, RouterEvent } from '@angular/router';\r\nimport { MatSidenav } from '@angular/material/sidenav';\r\nimport { MapboxService } from 'src/app/services/mapbox.service';\r\nimport { Store, Select } from '@ngxs/store';\r\nimport { LogoutAction } from '../auth/auth.actions';\r\nimport { DomService } from 'src/app/services/dom.service';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { AuthState } from '../auth/auth.state';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\nimport { StatusComponent } from './status.component';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\n\r\n@Component({\r\n selector: 'app-shell',\r\n templateUrl: './shell.component.html',\r\n styleUrls: ['./shell.component.scss'],\r\n})\r\nexport class ShellComponent implements OnInit {\r\n\r\n langs: any[] = [\r\n { lang: 'es', image: '/assets/images/languages/es.png' },\r\n { lang: 'en', image: '/assets/images/languages/en.png' },\r\n { lang: 'fr', image: '/assets/images/languages/fr.png' },\r\n ];\r\n groups: any[] = [\r\n { name: 'shell.group.merchant', image: '/assets/images/cards/merchant.png', links: [\r\n { url: '/kingdom/city', name: 'kingdom.city.name', description: 'kingdom.city.description', image: '/assets/images/cards/city.png' },\r\n { url: '/kingdom/auction', name: 'kingdom.auction.name', description: 'kingdom.auction.description', image: '/assets/images/cards/auction.png' },\r\n { url: '/kingdom/emporium', name: 'kingdom.emporium.name', description: 'kingdom.emporium.description', image: '/assets/images/cards/emporium.png' },\r\n ],\r\n },\r\n { name: 'shell.group.militia', image: '/assets/images/cards/militia.png', links: [\r\n { url: '/world/map', name: 'world.map.name', description: 'world.map.description', image: '/assets/images/cards/map.png' },\r\n { url: '/kingdom/army', name: 'kingdom.army.name', description: 'kingdom.army.description', image: '/assets/images/cards/army.png' },\r\n { url: '/kingdom/tavern', name: 'kingdom.tavern.name', description: 'kingdom.tavern.description', image: '/assets/images/cards/tavern.png' },\r\n ],\r\n },\r\n { name: 'shell.group.spy', image: '/assets/images/cards/spy.png', links: [\r\n { url: '/kingdom/census', name: 'kingdom.census.name', description: 'kingdom.census.description', image: '/assets/images/cards/census.png' },\r\n { url: '/kingdom/archive', name: 'kingdom.archive.name', description: 'kingdom.archive.description', image: '/assets/images/cards/archive.png' },\r\n { url: '/kingdom/clan', name: 'kingdom.clan.name', description: 'kingdom.clan.description', image: '/assets/images/cards/clan.png' },\r\n ],\r\n },\r\n { name: 'shell.group.scholar', image: '/assets/images/cards/scholar.png', links: [\r\n { url: '/kingdom/sorcery', name: 'kingdom.sorcery.name', description: 'kingdom.sorcery.description', image: '/assets/images/cards/sorcery.png' },\r\n { url: '/kingdom/temple', name: 'kingdom.temple.name', description: 'kingdom.temple.description', image: '/assets/images/cards/temple.png' },\r\n { url: '/user/encyclopedia', name: 'user.encyclopedia.name', description: 'user.encyclopedia.description', image: '/assets/images/cards/encyclopedia.png' },\r\n ],\r\n },\r\n ];\r\n @Select((state: any) => state.auth.supplies) kingdomSupplies$: Observable<any[]>;\r\n link$: Observable<any> = this.router.events\r\n .pipe(\r\n filter((event: RouterEvent): event is NavigationEnd => event instanceof NavigationEnd),\r\n map((event: NavigationEnd) => {\r\n return this.groups.reduce((a, b) => a.concat(b.links), []).find((link: any) => event.url.includes(link.url));\r\n }),\r\n );\r\n isHandset$: Observable<boolean> = this.breakpointObserver.observe([Breakpoints.Handset])\r\n .pipe(\r\n map((result: any) => result.matches),\r\n shareReplay(),\r\n );\r\n public reports: number = 0;\r\n @ViewChild(MatSidenav, {static: true}) drawer: MatSidenav;\r\n\r\n constructor(\r\n private breakpointObserver: BreakpointObserver,\r\n public translateService: TranslateService,\r\n public angularFireAuth: AngularFireAuth,\r\n private router: Router,\r\n private mapboxService: MapboxService,\r\n private store: Store,\r\n private tutorialService: TutorialService,\r\n private domService: DomService,\r\n private angularFirestore: AngularFirestore,\r\n private notificationService: NotificationService,\r\n private bottomSheet: MatBottomSheet,\r\n ) {\r\n // i18n\r\n this.translateService.addLangs(this.langs.map(l => l.lang));\r\n const browser = this.translateService.getBrowserLang();\r\n this.translateService.use(this.langs.map(l => l.lang).includes(browser) ? browser : this.langs[0].lang);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.store.select(AuthState.getUserUID).subscribe(uid => {\r\n if (uid) {\r\n this.angularFirestore.collection<any>(`kingdoms/${uid}/letters`, x => x.where('read', '==', false)).valueChanges().subscribe(reports => {\r\n const oldReports = this.reports;\r\n this.reports = reports.length;\r\n if (this.reports > oldReports) this.notificationService.warning('kingdom.archive.new');\r\n });\r\n }\r\n });\r\n }\r\n\r\n async toggle() {\r\n await this.drawer.toggle();\r\n this.mapboxService.resizeMap();\r\n }\r\n\r\n close() {\r\n this.isHandset$.subscribe(async isHandset => {\r\n if (isHandset) {\r\n await this.drawer.close();\r\n }\r\n });\r\n }\r\n\r\n getLang(): any {\r\n return this.langs.find(l => l.lang === this.translateService.currentLang);\r\n }\r\n\r\n tour() {\r\n this.tutorialService.start();\r\n }\r\n\r\n login($element: any) {\r\n this.domService.scrollToTop($element);\r\n this.router.navigate(['/user/landing']);\r\n }\r\n\r\n logout() {\r\n this.store.dispatch(new LogoutAction());\r\n }\r\n\r\n openStatusSheet() {\r\n const sheetRef = this.bottomSheet.open(StatusComponent, {\r\n data: this.kingdomSupplies$,\r\n });\r\n }\r\n\r\n}\r\n","import { Component, Inject } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';\r\n\r\n@Component({\r\n selector: 'app-status',\r\n template: `\r\n <div matSubheader>{{ 'card.list.resources' | translate }}:<span class=\"fill-space\"></span>{{ 'card.list.production' | translate }}:</div>\r\n <mat-list dense class=\"app-status\">\r\n <ng-container *ngFor=\"let supply of kingdomSupplies$ | async; let i = index\">\r\n <mat-list-item>\r\n <div mat-list-avatar\r\n [matBadge]=\"supply.max ? (supply.timestamp ? (supply.timestamp | turn:supply.resource.max:supply.resource.ratio | async) : (supply.quantity | short)) + ' / ' + (supply.max | short) : supply.quantity | short\"\r\n matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"supply.resource.image\">\r\n </div>\r\n <div mat-line>{{ supply.resource.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ supply.resource.description | translate }}</div>\r\n <div mat-line *ngIf=\"supply.max\">\r\n <mat-progress-bar [value]=\"(supply.timestamp ? (supply.timestamp | turn:supply.resource.max:supply.resource.ratio | async) : supply.quantity) * 100 / supply.max\"></mat-progress-bar>\r\n </div>\r\n <div mat-list-avatar\r\n [matBadge]=\"(supply.balance | short) + ('resource.turn.ratio' | translate)\"\r\n [matBadgeColor]=\"supply.balance === 0 ? 'primary' : supply.balance > 0 ? 'accent' : 'warn'\"\r\n matBadgePosition=\"above after\">\r\n <img mat-list-avatar [src]=\"supply.status\">\r\n </div>\r\n </mat-list-item>\r\n </ng-container>\r\n </mat-list>\r\n `,\r\n styles: [`\r\n .app-status.mat-list.mat-list-base {\r\n max-height: 100%;\r\n }\r\n `],\r\n})\r\nexport class StatusComponent {\r\n\r\n constructor(\r\n @Inject(MAT_BOTTOM_SHEET_DATA) public kingdomSupplies$: Observable<any[]>,\r\n ) { }\r\n\r\n}\r\n","<tour-step-template>\r\n <ng-template let-step=\"step\">\r\n <mat-card (click)=\"$event.stopPropagation()\">\r\n <mat-card-title>{{ step?.title | translate }}</mat-card-title>\r\n <mat-card-content [innerHtml]=\"step?.content | translate | icon\"></mat-card-content>\r\n <mat-card-actions>\r\n <button mat-icon-button [disabled]=\"!tourService.hasPrev(step)\" (click)=\"tourService.prev()\"><mat-icon>chevron_left</mat-icon></button>\r\n <button mat-icon-button [disabled]=\"!tourService.hasNext(step)\" (click)=\"tourService.next()\"><mat-icon>chevron_right</mat-icon></button>\r\n <button mat-icon-button (click)=\"tourService.end()\"><mat-icon>close</mat-icon></button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </ng-template>\r\n</tour-step-template>\r\n","import { Component, ViewEncapsulation } from '@angular/core';\r\nimport { TourService } from 'ngx-ui-tour-md-menu';\r\n\r\n@Component({\r\n selector: 'app-tour',\r\n templateUrl: './tour.component.html',\r\n styleUrls: ['./tour.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class TourComponent {\r\n\r\n constructor(\r\n public tourService: TourService,\r\n ) { }\r\n\r\n}\r\n","export enum MarkerType {\r\n KINGDOM = 'kingdom',\r\n SHOP = 'shop',\r\n QUEST = 'quest',\r\n}\r\n\r\nexport enum PopupType {\r\n KINGDOM = 'kingdom',\r\n SHOP = 'shop',\r\n QUEST = 'quest',\r\n}\r\n\r\nexport enum StoreType {\r\n INN = 'inn',\r\n MERCENARY = 'mercenary',\r\n SORCERER = 'sorcerer',\r\n MERCHANT = 'merchant',\r\n}\r\n\r\nexport enum LocationType {\r\n CAVE = 'cave',\r\n GRAVEYARD = 'graveyard',\r\n DUNGEON = 'dungeon',\r\n MINE = 'mine',\r\n FOREST = 'forest',\r\n CATHEDRAL = 'cathedral',\r\n MOUNTAIN = 'mountain',\r\n VOLCANO = 'volcano',\r\n LAKE = 'lake',\r\n NEST = 'nest',\r\n CASTLE = 'castle',\r\n BARRACK = 'barrack',\r\n ISLAND = 'island',\r\n MONOLITH = 'monolith',\r\n RUIN = 'ruin',\r\n SHIP = 'ship',\r\n TOWN = 'town',\r\n SHRINE = 'shrine',\r\n TOTEM = 'totem',\r\n PYRAMID = 'pyramid',\r\n}\r\n\r\nexport enum FactionType {\r\n RED = 'red',\r\n WHITE = 'white',\r\n GREEN = 'green',\r\n BLUE = 'blue',\r\n BLACK = 'black',\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, NavigationEnd } from '@angular/router';\r\nimport { NotificationService } from '../services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from '../shared/auth/auth.state';\r\nimport { filter } from 'rxjs/operators';\r\n\r\nconst LANDING_ROUTE: string = '/user/landing';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AuthGuard implements CanActivate {\r\n\r\n constructor(\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private router: Router,\r\n ) { }\r\n\r\n canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n const logged = this.store.selectSnapshot(AuthState.getUserLoggedIn);\r\n if (!logged) {\r\n this.notificationService.error('user.auth.unauthorized');\r\n this.router.navigate([LANDING_ROUTE]);\r\n }\r\n return logged;\r\n }\r\n\r\n}\r\n","<div class=\"map-marker\">\r\n\r\n <!-- kingdom -->\r\n <button *ngIf=\"data.type === MarkerType.KINGDOM\" mat-fab color=\"primary\" class=\"marker animated bounceIn\">\r\n <img [src]=\"data.faction.marker\" [alt]=\"data.name\">\r\n </button>\r\n\r\n <!-- shop -->\r\n <button *ngIf=\"data.type === MarkerType.SHOP\" mat-mini-fab color=\"accent\" class=\"marker animated bounceIn\">\r\n <img [src]=\"data.store.image\" [alt]=\"data.store.name | translate\">\r\n </button>\r\n\r\n <!-- quest -->\r\n <button *ngIf=\"data.type === MarkerType.QUEST\" mat-mini-fab color=\"warn\" class=\"marker animated bounceIn\">\r\n <img [src]=\"data.location.image\" [alt]=\"data.location.name | translate\">\r\n </button>\r\n\r\n</div>\r\n","import { Component } from '@angular/core';\r\nimport { MarkerType } from 'src/app/shared/type/common.type';\r\n\r\n@Component({\r\n selector: 'app-marker',\r\n templateUrl: './marker.component.html',\r\n styleUrls: ['./marker.component.scss'],\r\n})\r\nexport class MarkerComponent {\r\n\r\n data: any = null;\r\n MarkerType: typeof MarkerType = MarkerType;\r\n\r\n}\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-adventure',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'world.adventure.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'world.adventure.description' | translate }}</p>\r\n <div matSubheader>{{ 'card.list.rewards' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[data.reward.item.faction.id, data.reward.item.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"data.reward.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"data.reward.item.image\">\r\n </div>\r\n <div mat-line>{{ data.reward.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"data.reward.item.description | translate | icon:data.reward.item\"></div>\r\n <div mat-list-avatar [matBadge]=\"data.quest.turns | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'world.adventure.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"adventure()\" cdkFocusInitial>{{ 'world.adventure.start' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [\r\n ],\r\n})\r\nexport class AdventureComponent implements OnInit {\r\n\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: {\r\n reward: any,\r\n quest: any,\r\n },\r\n private dialogRef: MatDialogRef<AdventureComponent>,\r\n private notificationService: NotificationService,\r\n private apiService: ApiService,\r\n private store: Store,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async adventure() {\r\n if (this.data.quest.turns <= this.kingdomTurn.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const dealt = await this.apiService.adventureQuest(this.uid, this.data.quest.id);\r\n this.notificationService.success('world.adventure.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('world.adventure.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('world.adventure.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-deal',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'world.deal.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'world.deal.description' | translate }}</p>\r\n <div matSubheader>{{ 'card.list.goods' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[data.deal.join.faction.id, data.deal.join.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"data.deal.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"data.deal.join.image\">\r\n </div>\r\n <div mat-line>{{ data.deal.join.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['god', 'family', 'skill', 'resource', 'category'].includes(data.deal.join.type)\">{{ data.deal.join.description | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['spell', 'structure', 'location', 'hero', 'item'].includes(data.deal.join.type)\" [innerHTML]=\"data.deal.join.description | translate | icon:data.deal.join\"></div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['unit'].includes(data.deal.join.type)\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of data.deal.join.families\" [src]=\"family.image\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of data.deal.join.skills\" [src]=\"skill.image\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of data.deal.join.categories\" [src]=\"category.image\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"data.deal.join.legendary\" src=\"/assets/images/icons/legendary.png\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['unit'].includes(data.deal.join.type) && data.deal.join.categories && data.deal.join.categories.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of data.deal.join.resistances\" [src]=\"category.image\">\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"data.deal.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'world.deal.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"deal()\" cdkFocusInitial>{{ 'world.deal.trade' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [\r\n ],\r\n})\r\nexport class DealComponent implements OnInit {\r\n\r\n kingdomGold: any = this.store.selectSnapshot(AuthState.getKingdomGold);\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: {\r\n deal: any,\r\n shop: any,\r\n },\r\n private dialogRef: MatDialogRef<DealComponent>,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async deal(): Promise<void> {\r\n if (this.data.deal.gold <= this.kingdomGold.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const collection = this.data.shop.store.id === 'mercenary'\r\n ? 'troops'\r\n : this.data.shop.store.id === 'inn'\r\n ? 'contracts'\r\n : this.data.shop.store.id === 'merchant'\r\n ? 'artifacts'\r\n : 'charms';\r\n const dealt = await this.apiService.tradeDeal(this.uid, this.data.shop.id, collection, this.data.deal.fid);\r\n this.notificationService.success('world.deal.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('world.deal.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('world.deal.error');\r\n }\r\n }\r\n\r\n}\r\n","<mat-card class=\"map-popup animated bounceIn mat-elevation-z4\">\r\n\r\n <!-- kingdom -->\r\n <mat-card-header *ngIf=\"data.type === PopupType.KINGDOM\">\r\n <img mat-card-avatar [src]=\"data.faction.marker\" [alt]=\"data.faction.name | translate\">\r\n <mat-card-title>{{ data.name }}</mat-card-title>\r\n <mat-card-subtitle>{{ data.faction.name | translate }}</mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <!-- shop -->\r\n <mat-card-header *ngIf=\"data.type === PopupType.SHOP\">\r\n <img mat-card-avatar [src]=\"data.store.image\" [alt]=\"data.store.name | translate\">\r\n <mat-card-title>{{ data.store.name | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ data.name }}</mat-card-subtitle>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" class=\"clock\" selected><mat-icon>update</mat-icon>{{ data.visited.toMillis() | date:('dateformat.short' | translate) }}</mat-chip>\r\n </mat-chip-list>\r\n </mat-card-header>\r\n\r\n <!-- quest -->\r\n <mat-card-header *ngIf=\"data.type === PopupType.QUEST\">\r\n <img mat-card-avatar [src]=\"data.location.image\" [alt]=\"data.location.name | translate\">\r\n <mat-card-title>{{ data.location.name | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ data.name }}</mat-card-subtitle>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" class=\"clock\" selected><mat-icon>update</mat-icon>{{ data.visited.toMillis() | date:('dateformat.short' | translate) }}</mat-chip>\r\n </mat-chip-list>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <!-- kingdom troops -->\r\n <ng-template [ngIf]=\"kingdomTroops.length\">\r\n <div matSubheader>{{ 'card.list.troops' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let troop of kingdomTroops\" [ngClass]=\"[troop.unit.faction.id, troop.unit.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"troop.unit.image\" [alt]=\"troop.unit.name | translate\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"troop.unit.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </ng-template>\r\n\r\n <!-- shop contracts -->\r\n <ng-template [ngIf]=\"shopContracts.length\">\r\n <div matSubheader>{{ 'card.list.contracts' | translate }}:</div>\r\n <mat-action-list dense>\r\n <button mat-list-item *ngFor=\"let contract of shopContracts\" [ngClass]=\"[contract.hero.faction.id, contract.hero.legendary ? 'legendary' : 'common']\" (click)=\"openDealDialog(contract)\">\r\n <div mat-list-avatar [matBadge]=\"contract.level\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"contract.hero.image\" [alt]=\"contract.hero.name | translate\">\r\n </div>\r\n <div mat-line>{{ contract.hero.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"contract.hero.description | translate | icon:contract.hero\"></div>\r\n <div mat-list-avatar [matBadge]=\"contract.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\" [alt]=\"'resource.gold.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </ng-template>\r\n\r\n <!-- shop troops -->\r\n <ng-template [ngIf]=\"shopTroops.length\">\r\n <div matSubheader>{{ 'card.list.troops' | translate }}:</div>\r\n <mat-action-list dense>\r\n <button mat-list-item *ngFor=\"let troop of shopTroops\" [ngClass]=\"[troop.unit.faction.id, troop.unit.legendary ? 'legendary' : 'common']\" (click)=\"openDealDialog(troop)\">\r\n <div mat-list-avatar [matBadge]=\"troop.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"troop.unit.image\" [alt]=\"troop.unit.name | translate\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"troop.unit.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"troop.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\" [alt]=\"'resource.gold.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </ng-template>\r\n\r\n <!-- shop artifacts -->\r\n <ng-template [ngIf]=\"shopArtifacts.length\">\r\n <div matSubheader>{{ 'card.list.artifacts' | translate }}:</div>\r\n <mat-action-list dense>\r\n <button mat-list-item *ngFor=\"let artifact of shopArtifacts\" [ngClass]=\"[artifact.item.faction.id, artifact.item.legendary ? 'legendary' : 'common']\" (click)=\"openDealDialog(artifact)\">\r\n <div mat-list-avatar [matBadge]=\"artifact.quantity\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"artifact.item.image\" [alt]=\"artifact.item.name | translate\">\r\n </div>\r\n <div mat-line>{{ artifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"artifact.item.description | translate | icon:artifact.item\"></div>\r\n <div mat-list-avatar [matBadge]=\"artifact.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\" [alt]=\"'resource.gold.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </ng-template>\r\n\r\n <!-- shop spells -->\r\n <ng-template [ngIf]=\"shopCharms.length\">\r\n <div matSubheader>{{ 'card.list.charms' | translate }}:</div>\r\n <mat-action-list dense>\r\n <button mat-list-item *ngFor=\"let charm of shopCharms\" [ngClass]=\"[charm.spell.faction.id, charm.spell.legendary ? 'legendary' : 'common']\" (click)=\"openDealDialog(charm)\">\r\n <div mat-list-avatar [matBadge]=\"charm.level\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"charm.spell.image\" [alt]=\"charm.spell.name | translate\">\r\n </div>\r\n <div mat-line>{{ charm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"charm.spell.description | translate | icon:charm.spell\"></div>\r\n <div mat-list-avatar [matBadge]=\"charm.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\" [alt]=\"'resource.gold.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </ng-template>\r\n\r\n <!-- quest contracts -->\r\n <ng-template [ngIf]=\"questContracts.length\">\r\n <div matSubheader>{{ 'card.list.contracts' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let contract of questContracts\" [ngClass]=\"[contract.hero.faction.id, contract.hero.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"contract.hero.image\" [alt]=\"contract.hero.name | translate\">\r\n </div>\r\n <div mat-line>{{ contract.hero.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"contract.hero.description | translate | icon:contract.hero\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n </ng-template>\r\n\r\n <!-- quest troops -->\r\n <ng-template [ngIf]=\"questTroops.length\">\r\n <div matSubheader>{{ 'card.list.troops' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let troop of questTroops\" [ngClass]=\"[troop.unit.faction.id, troop.unit.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"troop.unit.image\" [alt]=\"troop.unit.name | translate\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"troop.unit.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </ng-template>\r\n\r\n <!-- quest artifacts (rewards) -->\r\n <ng-template [ngIf]=\"questArtifacts.length\">\r\n <div matSubheader>{{ 'card.list.rewards' | translate }}:</div>\r\n <mat-action-list dense>\r\n <button mat-list-item *ngFor=\"let artifact of questArtifacts\" [ngClass]=\"[artifact.item.faction.id, artifact.item.legendary ? 'legendary' : 'common']\" (click)=\"openAdventureDialog(artifact)\" [disabled]=\"!canAttack\">\r\n <div mat-list-avatar [matBadge]=\"artifact.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"artifact.item.image\" [alt]=\"artifact.item.name | translate\">\r\n </div>\r\n <div mat-line>{{ artifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"artifact.item.description | translate | icon:artifact.item\"></div>\r\n <div mat-list-avatar [matBadge]=\"data.turns | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </ng-template>\r\n\r\n </mat-card-content>\r\n</mat-card>\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { PopupType } from 'src/app/shared/type/common.type';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { AdventureComponent } from './adventure.component';\r\nimport { DealComponent } from './deal.component';\r\nimport { BehaviorSubject, combineLatest } from 'rxjs';\r\nimport * as moment from 'moment';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { TroopAssignmentType } from 'src/app/kingdom/army/army.component';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-popup',\r\n templateUrl: './popup.component.html',\r\n styleUrls: ['./popup.component.scss'],\r\n})\r\nexport class PopupComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n opened: BehaviorSubject<boolean> = new BehaviorSubject(false);\r\n data: any = null;\r\n shopContracts: any[] = [];\r\n shopArtifacts: any[] = [];\r\n shopTroops: any[] = [];\r\n kingdomTroops: any[] = [];\r\n shopCharms: any[] = [];\r\n questContracts: any[] = [];\r\n questTroops: any[] = [];\r\n questArtifacts: any[] = [];\r\n PopupType: typeof PopupType = PopupType;\r\n canAttack: boolean = false;\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n private dialog: MatDialog,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n private store: Store,\r\n ) { }\r\n\r\n async ngOnInit() {\r\n // check refresh\r\n await this.checkRefresh();\r\n // attack enabled\r\n this.canAttack = (await this.angularFirestore.collection<any>(`kingdoms/${this.uid}/troops`, ref => ref.where('assignment', '==', TroopAssignmentType.ATTACK)).get().toPromise()).docs.length !== 0;\r\n // kingdoms\r\n if (this.data.type === PopupType.KINGDOM) {\r\n combineLatest([\r\n this.angularFirestore.collection<any>(`kingdoms/${this.data.id}/troops`, ref => ref.where('assignment', '==', TroopAssignmentType.DEFENSE)).valueChanges({ idField: 'fid' }),\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(([troops]) => {\r\n this.kingdomTroops = troops.sort((a, b) => a.sort - b.sort);\r\n this.opened.next(true);\r\n });\r\n }\r\n // shop\r\n if (this.data.type === PopupType.SHOP) {\r\n combineLatest([\r\n this.angularFirestore.collection<any>(`shops/${this.data.id}/contracts`).valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`shops/${this.data.id}/troops`).valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`shops/${this.data.id}/artifacts`).valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`shops/${this.data.id}/charms`).valueChanges({ idField: 'fid' }),\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(([contracts, troops, artifacts, charms]) => {\r\n this.shopContracts = contracts;\r\n this.shopTroops = troops;\r\n this.shopArtifacts = artifacts;\r\n this.shopCharms = charms;\r\n this.opened.next(true);\r\n });\r\n }\r\n // quest\r\n if (this.data.type === PopupType.QUEST) {\r\n combineLatest([\r\n this.angularFirestore.collection<any>(`quests/${this.data.id}/troops`, ref => ref.where('assignment', '==', TroopAssignmentType.DEFENSE)).valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`quests/${this.data.id}/contracts`).valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`quests/${this.data.id}/artifacts`).valueChanges({ idField: 'fid' }),\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(([troops, contracts, artifacts]) => {\r\n this.questTroops = troops.sort((a, b) => a.sort - b.sort);\r\n this.questContracts = contracts;\r\n this.questArtifacts = artifacts;\r\n this.opened.next(true);\r\n });\r\n }\r\n }\r\n\r\n async checkRefresh() {\r\n if (this.data.type !== PopupType.KINGDOM && this.data.visited && moment().isAfter(moment(this.data.visited.toMillis()))) {\r\n this.loadingService.startLoading();\r\n try {\r\n await this.data.type === PopupType.SHOP\r\n ? this.apiService.addShop(this.data.id, this.data.store.id)\r\n : this.apiService.addQuest(this.data.id, this.data.location.id);\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n }\r\n\r\n openDealDialog(deal: any): void {\r\n deal.join = deal.hero || deal.item || deal.spell || deal.unit;\r\n const dialogRef = this.dialog.open(DealComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: {\r\n deal: deal,\r\n shop: this.data,\r\n },\r\n });\r\n }\r\n\r\n openAdventureDialog(reward: any): void {\r\n const dialogRef = this.dialog.open(AdventureComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: {\r\n reward: reward,\r\n quest: this.data,\r\n },\r\n });\r\n }\r\n\r\n}\r\n","// This file can be replaced during build by using the `fileReplacements` array.\r\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\r\n// The list of file replacements can be found in `angular.json`.\r\n\r\nexport const environment = {\r\n production: false,\r\n hmr: false,\r\n firebase: {\r\n apiKey: 'AIzaSyCSVr_n7Ced40pw2qHEhnr3G09UILvB_zc',\r\n authDomain: 'mage-c4259.firebaseapp.com',\r\n databaseURL: 'https://mage-c4259.firebaseio.com',\r\n projectId: 'mage-c4259',\r\n storageBucket: 'mage-c4259.appspot.com',\r\n messagingSenderId: '210042498621',\r\n appId: '1:210042498621:web:c4a21bc796b32d8bf40454',\r\n },\r\n mapbox: {\r\n style: 'mapbox://styles/fergardi/ckacdomo73idr1is4dkj2kfil',\r\n token: 'pk.eyJ1IjoiZmVyZ2FyZGkiLCJhIjoiY2lxdWl1enJiMDAzaWh4bTNwY3F6MnNwdiJ9.fPkJoOfrARPtZWCj1ehyCQ',\r\n lat: 42.618060799999995,\r\n lng: -5.5508992,\r\n zoom: 12,\r\n pitch: 80,\r\n },\r\n functions: {\r\n url: 'http://localhost:5001/mage-c4259/europe-west1/api',\r\n },\r\n};\r\n\r\n/*\r\n * For easier debugging in development mode, you can import the following file\r\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\r\n *\r\n * This import should be commented out in production mode because it will have a negative impact\r\n * on performance if an error is thrown.\r\n */\r\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\r\n","import { NgModuleRef, ApplicationRef } from '@angular/core';\r\nimport { createNewHosts } from '@angularclass/hmr';\r\n\r\nexport const hmrBootstrap = (module: any, bootstrap: () => Promise<NgModuleRef<any>>) => {\r\n let ngModule: NgModuleRef<any>;\r\n module.hot.accept();\r\n bootstrap().then(mod => ngModule = mod);\r\n module.hot.dispose(() => {\r\n const appRef: ApplicationRef = ngModule.injector.get(ApplicationRef);\r\n const elements = appRef.components.map(c => c.location.nativeElement);\r\n const makeVisible = createNewHosts(elements);\r\n ngModule.destroy();\r\n makeVisible();\r\n });\r\n};\r\n","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from './environments/environment';\r\nimport { hmrBootstrap } from './hmr';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nconst bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule);\r\n\r\nif (environment.hmr) {\r\n if (module['hot']) {\r\n hmrBootstrap(module, bootstrap);\r\n } else {\r\n console.error('HMR is not enabled for webpack-dev-server!');\r\n console.log('Are you using the --hmr flag for ng serve?');\r\n }\r\n} else {\r\n bootstrap().catch(err => console.error(err));\r\n}\r\n\r\n","var map = {\n\t\"./af\": 62275,\n\t\"./af.js\": 62275,\n\t\"./ar\": 90857,\n\t\"./ar-dz\": 11218,\n\t\"./ar-dz.js\": 11218,\n\t\"./ar-kw\": 14754,\n\t\"./ar-kw.js\": 14754,\n\t\"./ar-ly\": 66680,\n\t\"./ar-ly.js\": 66680,\n\t\"./ar-ma\": 92178,\n\t\"./ar-ma.js\": 92178,\n\t\"./ar-sa\": 56522,\n\t\"./ar-sa.js\": 56522,\n\t\"./ar-tn\": 95682,\n\t\"./ar-tn.js\": 95682,\n\t\"./ar.js\": 90857,\n\t\"./az\": 70164,\n\t\"./az.js\": 70164,\n\t\"./be\": 79774,\n\t\"./be.js\": 79774,\n\t\"./bg\": 60947,\n\t\"./bg.js\": 60947,\n\t\"./bm\": 21832,\n\t\"./bm.js\": 21832,\n\t\"./bn\": 89650,\n\t\"./bn-bd\": 74477,\n\t\"./bn-bd.js\": 74477,\n\t\"./bn.js\": 89650,\n\t\"./bo\": 66005,\n\t\"./bo.js\": 66005,\n\t\"./br\": 98492,\n\t\"./br.js\": 98492,\n\t\"./bs\": 70534,\n\t\"./bs.js\": 70534,\n\t\"./ca\": 52061,\n\t\"./ca.js\": 52061,\n\t\"./cs\": 84737,\n\t\"./cs.js\": 84737,\n\t\"./cv\": 61167,\n\t\"./cv.js\": 61167,\n\t\"./cy\": 77996,\n\t\"./cy.js\": 77996,\n\t\"./da\": 9528,\n\t\"./da.js\": 9528,\n\t\"./de\": 14540,\n\t\"./de-at\": 49430,\n\t\"./de-at.js\": 49430,\n\t\"./de-ch\": 67978,\n\t\"./de-ch.js\": 67978,\n\t\"./de.js\": 14540,\n\t\"./dv\": 83426,\n\t\"./dv.js\": 83426,\n\t\"./el\": 6616,\n\t\"./el.js\": 6616,\n\t\"./en-au\": 63816,\n\t\"./en-au.js\": 63816,\n\t\"./en-ca\": 32162,\n\t\"./en-ca.js\": 32162,\n\t\"./en-gb\": 83305,\n\t\"./en-gb.js\": 83305,\n\t\"./en-ie\": 61954,\n\t\"./en-ie.js\": 61954,\n\t\"./en-il\": 43060,\n\t\"./en-il.js\": 43060,\n\t\"./en-in\": 59923,\n\t\"./en-in.js\": 59923,\n\t\"./en-nz\": 13540,\n\t\"./en-nz.js\": 13540,\n\t\"./en-sg\": 16505,\n\t\"./en-sg.js\": 16505,\n\t\"./eo\": 41907,\n\t\"./eo.js\": 41907,\n\t\"./es\": 86640,\n\t\"./es-do\": 41246,\n\t\"./es-do.js\": 41246,\n\t\"./es-mx\": 56131,\n\t\"./es-mx.js\": 56131,\n\t\"./es-us\": 36430,\n\t\"./es-us.js\": 36430,\n\t\"./es.js\": 86640,\n\t\"./et\": 62551,\n\t\"./et.js\": 62551,\n\t\"./eu\": 32711,\n\t\"./eu.js\": 32711,\n\t\"./fa\": 54572,\n\t\"./fa.js\": 54572,\n\t\"./fi\": 33390,\n\t\"./fi.js\": 33390,\n\t\"./fil\": 87860,\n\t\"./fil.js\": 87860,\n\t\"./fo\": 48216,\n\t\"./fo.js\": 48216,\n\t\"./fr\": 99291,\n\t\"./fr-ca\": 98527,\n\t\"./fr-ca.js\": 98527,\n\t\"./fr-ch\": 58407,\n\t\"./fr-ch.js\": 58407,\n\t\"./fr.js\": 99291,\n\t\"./fy\": 47054,\n\t\"./fy.js\": 47054,\n\t\"./ga\": 49540,\n\t\"./ga.js\": 49540,\n\t\"./gd\": 73917,\n\t\"./gd.js\": 73917,\n\t\"./gl\": 51486,\n\t\"./gl.js\": 51486,\n\t\"./gom-deva\": 56245,\n\t\"./gom-deva.js\": 56245,\n\t\"./gom-latn\": 48868,\n\t\"./gom-latn.js\": 48868,\n\t\"./gu\": 59652,\n\t\"./gu.js\": 59652,\n\t\"./he\": 89019,\n\t\"./he.js\": 89019,\n\t\"./hi\": 42040,\n\t\"./hi.js\": 42040,\n\t\"./hr\": 63402,\n\t\"./hr.js\": 63402,\n\t\"./hu\": 79322,\n\t\"./hu.js\": 79322,\n\t\"./hy-am\": 27609,\n\t\"./hy-am.js\": 27609,\n\t\"./id\": 57942,\n\t\"./id.js\": 57942,\n\t\"./is\": 98275,\n\t\"./is.js\": 98275,\n\t\"./it\": 73053,\n\t\"./it-ch\": 4378,\n\t\"./it-ch.js\": 4378,\n\t\"./it.js\": 73053,\n\t\"./ja\": 46176,\n\t\"./ja.js\": 46176,\n\t\"./jv\": 679,\n\t\"./jv.js\": 679,\n\t\"./ka\": 92726,\n\t\"./ka.js\": 92726,\n\t\"./kk\": 72953,\n\t\"./kk.js\": 72953,\n\t\"./km\": 86957,\n\t\"./km.js\": 86957,\n\t\"./kn\": 59181,\n\t\"./kn.js\": 59181,\n\t\"./ko\": 47148,\n\t\"./ko.js\": 47148,\n\t\"./ku\": 27752,\n\t\"./ku.js\": 27752,\n\t\"./ky\": 65675,\n\t\"./ky.js\": 65675,\n\t\"./lb\": 41263,\n\t\"./lb.js\": 41263,\n\t\"./lo\": 65746,\n\t\"./lo.js\": 65746,\n\t\"./lt\": 11143,\n\t\"./lt.js\": 11143,\n\t\"./lv\": 38753,\n\t\"./lv.js\": 38753,\n\t\"./me\": 44054,\n\t\"./me.js\": 44054,\n\t\"./mi\": 31573,\n\t\"./mi.js\": 31573,\n\t\"./mk\": 30202,\n\t\"./mk.js\": 30202,\n\t\"./ml\": 68523,\n\t\"./ml.js\": 68523,\n\t\"./mn\": 79794,\n\t\"./mn.js\": 79794,\n\t\"./mr\": 56681,\n\t\"./mr.js\": 56681,\n\t\"./ms\": 56975,\n\t\"./ms-my\": 39859,\n\t\"./ms-my.js\": 39859,\n\t\"./ms.js\": 56975,\n\t\"./mt\": 3691,\n\t\"./mt.js\": 3691,\n\t\"./my\": 5152,\n\t\"./my.js\": 5152,\n\t\"./nb\": 7607,\n\t\"./nb.js\": 7607,\n\t\"./ne\": 21526,\n\t\"./ne.js\": 21526,\n\t\"./nl\": 86368,\n\t\"./nl-be\": 40076,\n\t\"./nl-be.js\": 40076,\n\t\"./nl.js\": 86368,\n\t\"./nn\": 68420,\n\t\"./nn.js\": 68420,\n\t\"./oc-lnc\": 51906,\n\t\"./oc-lnc.js\": 51906,\n\t\"./pa-in\": 94504,\n\t\"./pa-in.js\": 94504,\n\t\"./pl\": 54721,\n\t\"./pl.js\": 54721,\n\t\"./pt\": 74645,\n\t\"./pt-br\": 54548,\n\t\"./pt-br.js\": 54548,\n\t\"./pt.js\": 74645,\n\t\"./ro\": 71977,\n\t\"./ro.js\": 71977,\n\t\"./ru\": 26042,\n\t\"./ru.js\": 26042,\n\t\"./sd\": 78849,\n\t\"./sd.js\": 78849,\n\t\"./se\": 27739,\n\t\"./se.js\": 27739,\n\t\"./si\": 50084,\n\t\"./si.js\": 50084,\n\t\"./sk\": 92449,\n\t\"./sk.js\": 92449,\n\t\"./sl\": 23086,\n\t\"./sl.js\": 23086,\n\t\"./sq\": 33139,\n\t\"./sq.js\": 33139,\n\t\"./sr\": 30607,\n\t\"./sr-cyrl\": 30063,\n\t\"./sr-cyrl.js\": 30063,\n\t\"./sr.js\": 30607,\n\t\"./ss\": 40131,\n\t\"./ss.js\": 40131,\n\t\"./sv\": 21665,\n\t\"./sv.js\": 21665,\n\t\"./sw\": 5642,\n\t\"./sw.js\": 5642,\n\t\"./ta\": 33622,\n\t\"./ta.js\": 33622,\n\t\"./te\": 74825,\n\t\"./te.js\": 74825,\n\t\"./tet\": 48336,\n\t\"./tet.js\": 48336,\n\t\"./tg\": 39238,\n\t\"./tg.js\": 39238,\n\t\"./th\": 99463,\n\t\"./th.js\": 99463,\n\t\"./tk\": 39986,\n\t\"./tk.js\": 39986,\n\t\"./tl-ph\": 29672,\n\t\"./tl-ph.js\": 29672,\n\t\"./tlh\": 40043,\n\t\"./tlh.js\": 40043,\n\t\"./tr\": 51212,\n\t\"./tr.js\": 51212,\n\t\"./tzl\": 50110,\n\t\"./tzl.js\": 50110,\n\t\"./tzm\": 80482,\n\t\"./tzm-latn\": 38309,\n\t\"./tzm-latn.js\": 38309,\n\t\"./tzm.js\": 80482,\n\t\"./ug-cn\": 42495,\n\t\"./ug-cn.js\": 42495,\n\t\"./uk\": 54157,\n\t\"./uk.js\": 54157,\n\t\"./ur\": 80984,\n\t\"./ur.js\": 80984,\n\t\"./uz\": 64141,\n\t\"./uz-latn\": 43662,\n\t\"./uz-latn.js\": 43662,\n\t\"./uz.js\": 64141,\n\t\"./vi\": 12607,\n\t\"./vi.js\": 12607,\n\t\"./x-pseudo\": 66460,\n\t\"./x-pseudo.js\": 66460,\n\t\"./yo\": 92948,\n\t\"./yo.js\": 92948,\n\t\"./zh-cn\": 62658,\n\t\"./zh-cn.js\": 62658,\n\t\"./zh-hk\": 39352,\n\t\"./zh-hk.js\": 39352,\n\t\"./zh-mo\": 38274,\n\t\"./zh-mo.js\": 38274,\n\t\"./zh-tw\": 98451,\n\t\"./zh-tw.js\": 98451\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 46700;"]}