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EAAPC,wCAAOD,EAAU,0BAAVA,gCAPTE,KACAC,IACAC,cAAsBP,GACtBQ,IACAC","names":["HomeService","constructor","http","appService","this","GetHomePageCustomization","labsiteCode","get","baseApiUrlForCore","GetHomePageCustomizationFromBlob","infoType","urlParams","AppConstants","isPublicWebSiteSyncronizerEnabled","publicFileUrl","_HomeService","core","factory","i0","HomeComponent","userLoginService","dialog","domSanitizer","spinner","globalRepositoryService","messageService","translateService","homeService","router","loggingService","ROUTE_ANIMATIONS_ELEMENTS","Subject","ngOnInit","labSiteCode","getLabsiteCode","getHomePageCustomization","volunteerCode","getVolunteerCode","isAuthenticated","IsVolunteerCodeModified","subscribe","isUpdated","OnVolunteerCodeModified","logPageView","onSignupClick","open","DisclaimerComponent","data","autoFocus","disableClose","afterClosed","popupResponse","onSignUpClick","ngOnDestroy","_destroying$","next","undefined","complete","show","volunteerEmailId","result","isError","alert","instant","homePageCustomization","doHomePageCustomization","onActiveStudiesClick","navigate","homePageTopSectionText","topSectionText","bypassSecurityTrustHtml","homePageMiddleSectionText","middleSectionText","middleSectionSlideShow","filter","s","fileId","videoURL","canShowMiddleSection","length","canHideMidSecImgNavigators","forEach","element","mediaTypeEnum","bypassSecurityTrustResourceUrl","homePageBottomSectionText","bottomSectionText","bottomSectionSlideShow","canShowBottomSection","canHideBotSecImgNavigators","_HomeComponent","selectors","ctx","routes","path","component","HomeModule","_HomeModule","CommonModule","SharedModule","RouterModule","MaterialModule","TranslateModule"],"sourceRoot":"webpack:///","sources":["./projects/vr-public-website/src/app/features/home/home.service.ts","./projects/vr-public-website/src/app/features/home/home.component.html","./projects/vr-public-website/src/app/features/home/home.component.ts","./projects/vr-public-website/src/app/features/home/home.module.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { AppSettingsService } from '../../core/core.module';\r\nimport { AppConstants } from '../../shared/constants/app-constants';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\n\r\nexport class HomeService {\r\n\r\n constructor(public http: HttpClient, public appService: AppSettingsService) { }\r\n \r\n public GetHomePageCustomization(labsiteCode: string): Observable {\r\n return this.http.get(this.appService.baseApiUrlForCore + 'labsites/GetHomePageCustomization/' + labsiteCode);\r\n }\r\n\r\n public GetHomePageCustomizationFromBlob(labsiteCode: string, infoType: string): Observable {\r\n let urlParams: string = labsiteCode + '/' + AppConstants.Blob.LabSite + '/' + AppConstants.Blob.LabSite+'/' + infoType;\r\n if(this.appService.isPublicWebSiteSyncronizerEnabled){\r\n urlParams = labsiteCode + '/' + AppConstants.Blob.LabSite + '/' + AppConstants.Blob.LabsiteByPublicSynchronizer+'/' + infoType;\r\n }\r\n return this.http.get(this.appService.publicFileUrl + 'Files/downloadSpecific/' + urlParams);\r\n }\r\n}","\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n


\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ROUTE_ANIMATIONS_ELEMENTS } from '../../core/core.module';\r\nimport { Subject } from 'rxjs';\r\nimport { UserLoginService } from '../../userLogin.service';\r\nimport { DisclaimerComponent } from '../disclaimer/disclaimer.component';\r\nimport { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';\r\nimport { GlobalRepositoryService } from '../../core/repository/global-repository.service';\r\nimport { SpinnerService } from '../../core/spinner/spinner.service';\r\nimport { MessageService } from '../../main/services/message.service';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { HomeService } from './home.service';\r\nimport { HomePageCustomization, HomePageSlideShow } from './home.model';\r\nimport { AppConstants } from '../../shared/constants/app-constants';\r\nimport { Router } from '@angular/router';\r\nimport { LoggingService } from '../../main/services/logging.service';\r\n\r\n@Component({\r\n selector: 'anms-app-home',\r\n templateUrl: './home.component.html',\r\n styleUrls: ['./home.component.scss'],\r\n})\r\nexport class HomeComponent implements OnInit {\r\n routeAnimationsElements = ROUTE_ANIMATIONS_ELEMENTS;\r\n releaseButler = 'assets/release-butler.png';\r\n\r\n // userData$!: Observable;\r\n userData$: any;\r\n isAuthenticated = false;\r\n labSiteCode?: string;\r\n homePageCustomization?: HomePageCustomization;\r\n topSectionText: any;\r\n middleSectionText: any;\r\n bottomSectionText: any;\r\n middleSectionSlideShow?: HomePageSlideShow[];\r\n bottomSectionSlideShow?: HomePageSlideShow[];\r\n canShowMiddleSection: boolean = false;\r\n canShowBottomSection: boolean = false;\r\n canHideMidSecImgNavigators: boolean = true;\r\n canHideBotSecImgNavigators: boolean = true;\r\n mediaTypeVideo = AppConstants.HomePageMediaTypes.Video;\r\n\r\n private readonly _destroying$ = new Subject();\r\n\r\n constructor(\r\n private userLoginService: UserLoginService,\r\n public dialog: MatDialog,\r\n private domSanitizer: DomSanitizer,\r\n public spinner: SpinnerService,\r\n public globalRepositoryService: GlobalRepositoryService,\r\n public messageService: MessageService,\r\n public translateService: TranslateService,\r\n public homeService: HomeService,\r\n public router: Router,\r\n public loggingService: LoggingService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.labSiteCode = this.globalRepositoryService.getLabsiteCode();\r\n this.getHomePageCustomization();\r\n const volunteerCode = this.globalRepositoryService.getVolunteerCode();\r\n if (volunteerCode !== null && !!volunteerCode && volunteerCode !== '') {\r\n this.isAuthenticated = true;\r\n }\r\n\r\n this.globalRepositoryService\r\n .IsVolunteerCodeModified()\r\n .subscribe((isUpdated) => this.OnVolunteerCodeModified(isUpdated));\r\n\r\n this.loggingService.logPageView(AppConstants.Pages.Home, this.labSiteCode);\r\n }\r\n\r\n OnVolunteerCodeModified(isUpdated: boolean) {\r\n if (isUpdated) {\r\n this.isAuthenticated = true;\r\n }\r\n }\r\n\r\n onSignupClick() {\r\n const dialogRef = this.dialog.open(DisclaimerComponent, {\r\n data: {\r\n },\r\n autoFocus: false,\r\n disableClose: true\r\n });\r\n dialogRef.afterClosed().subscribe(popupResponse => {\r\n if (popupResponse == true) {\r\n this.userLoginService.onSignUpClick();\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._destroying$.next(undefined);\r\n this._destroying$.complete();\r\n }\r\n\r\n getHomePageCustomization() {\r\n\r\n if (this.labSiteCode) {\r\n this.spinner.show(true);\r\n if (!this.globalRepositoryService.volunteerEmailId) {\r\n this.homeService.GetHomePageCustomizationFromBlob(this.labSiteCode, AppConstants.Blob.Home)\r\n .subscribe((result: HomePageCustomization) => {\r\n if (result) {\r\n this.homePageCustomization = result;\r\n this.doHomePageCustomization();\r\n this.spinner.show(false);\r\n }\r\n }, () => {\r\n this.messageService.alert(this.translateService.instant('Home.FetchError'), true);\r\n this.spinner.show(false);\r\n });\r\n } else {\r\n this.homeService.GetHomePageCustomization(this.labSiteCode)\r\n .subscribe((result: HomePageCustomization) => {\r\n if (!result?.isError) {\r\n this.homePageCustomization = result;\r\n this.doHomePageCustomization();\r\n this.spinner.show(false);\r\n } else {\r\n this.messageService.alert(this.translateService.instant('Home.FetchError'), true);\r\n this.spinner.show(false);\r\n }\r\n }, () => {\r\n this.messageService.alert(this.translateService.instant('Home.FetchError'), true);\r\n this.spinner.show(false);\r\n });\r\n }\r\n }\r\n }\r\n\r\n onActiveStudiesClick() {\r\n this.router.navigate(['activeStudies']);\r\n }\r\n\r\n doHomePageCustomization() {\r\n if (this.homePageCustomization) {\r\n if (this.homePageCustomization.homePageTopSectionText && this.homePageCustomization.homePageTopSectionText != '') {\r\n this.topSectionText = this.domSanitizer.bypassSecurityTrustHtml(this.homePageCustomization.homePageTopSectionText);\r\n }\r\n if (this.homePageCustomization.homePageMiddleSectionText && this.homePageCustomization.homePageMiddleSectionText != '') {\r\n this.middleSectionText = this.domSanitizer.bypassSecurityTrustHtml(this.homePageCustomization.homePageMiddleSectionText);\r\n this.middleSectionSlideShow = this.homePageCustomization.middleSectionSlideShow?.filter(s => s.fileId != AppConstants.emptyGUID || s.videoURL != null);\r\n\r\n this.canShowMiddleSection = (this.middleSectionSlideShow && this.middleSectionSlideShow.length > 0) ? true : false;\r\n\r\n if (this.canShowMiddleSection) {\r\n this.canHideMidSecImgNavigators = (this.middleSectionSlideShow && this.middleSectionSlideShow.length > 1) ? false : true;\r\n this.middleSectionSlideShow?.forEach((element: HomePageSlideShow) => {\r\n if (element.mediaTypeEnum == AppConstants.HomePageMediaTypes.Video) {\r\n element.videoURL = this.domSanitizer.bypassSecurityTrustResourceUrl(element.videoURL);\r\n }\r\n });\r\n }\r\n }\r\n if (this.homePageCustomization.homePageBottomSectionText && this.homePageCustomization.homePageBottomSectionText != '') {\r\n this.bottomSectionText = this.domSanitizer.bypassSecurityTrustHtml(this.homePageCustomization.homePageBottomSectionText);\r\n this.bottomSectionSlideShow = this.homePageCustomization.bottomSectionSlideShow?.filter(s => s.fileId != AppConstants.emptyGUID || s.videoURL != null);\r\n\r\n this.canShowBottomSection = (this.bottomSectionSlideShow && this.bottomSectionSlideShow.length > 0) ? true : false;\r\n\r\n if (this.canShowBottomSection) {\r\n this.canHideBotSecImgNavigators = (this.bottomSectionSlideShow && this.bottomSectionSlideShow.length > 1) ? false : true;\r\n this.bottomSectionSlideShow?.forEach((element: HomePageSlideShow) => {\r\n if (element.mediaTypeEnum == AppConstants.HomePageMediaTypes.Video) {\r\n element.videoURL = this.domSanitizer.bypassSecurityTrustResourceUrl(element.videoURL);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SharedModule } from '../../shared/shared.module';\r\nimport { HomeComponent } from './home.component';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { MaterialModule } from '../../shared/material.module';\r\n\r\nimport {\r\n TranslateModule\r\n} from '@ngx-translate/core';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: HomeComponent\r\n }\r\n];\r\n\r\n@NgModule({\r\n declarations: [HomeComponent],\r\n imports: [ \r\n CommonModule,\r\n SharedModule,\r\n RouterModule.forChild(routes), \r\n MaterialModule,\r\n TranslateModule\r\n ]\r\n})\r\nexport class HomeModule {\r\n}\r\n"],"x_google_ignoreList":[]}