| 
						
						
						
					 | 
				
				 | 
				
					@ -1,13 +1,24 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { publicRoutes } from '@ghostfolio/common/routes/routes'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { GfMembershipCardComponent } from '@ghostfolio/ui/membership-card'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { CommonModule } from '@angular/common'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  ChangeDetectionStrategy, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  ChangeDetectorRef, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  Component, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  CUSTOM_ELEMENTS_SCHEMA, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  Inject, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  OnInit | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} from '@angular/core'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { MatButtonModule } from '@angular/material/button'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  MAT_DIALOG_DATA, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  MatDialogModule, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  MatDialogRef | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} from '@angular/material/dialog'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { RouterModule } from '@angular/router'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { IonIcon } from '@ionic/angular/standalone'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { addIcons } from 'ionicons'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { arrowForwardOutline, checkmarkCircleOutline } from 'ionicons/icons'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import ms from 'ms'; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -19,17 +30,26 @@ import { SubscriptionInterstitialDialogParams } from './interfaces/interfaces'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@Component({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  changeDetection: ChangeDetectionStrategy.OnPush, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  host: { class: 'd-flex flex-column flex-grow-1 h-100' }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  imports: [ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    CommonModule, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    GfMembershipCardComponent, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    GfPremiumIndicatorComponent, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    IonIcon, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    MatButtonModule, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    MatDialogModule, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    RouterModule | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  ], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  schemas: [CUSTOM_ELEMENTS_SCHEMA], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  selector: 'gf-subscription-interstitial-dialog', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  styleUrls: ['./subscription-interstitial-dialog.scss'], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  templateUrl: 'subscription-interstitial-dialog.html', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  standalone: false | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  templateUrl: 'subscription-interstitial-dialog.html' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					export class SubscriptionInterstitialDialog implements OnInit { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					export class GfSubscriptionInterstitialDialogComponent implements OnInit { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  private static readonly SKIP_BUTTON_DELAY_IN_SECONDS = 5; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  private static readonly VARIANTS_COUNT = 2; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  private static readonly VARIANTS_COUNT = 4; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  public remainingSkipButtonDelay = | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    SubscriptionInterstitialDialog.SKIP_BUTTON_DELAY_IN_SECONDS; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    GfSubscriptionInterstitialDialogComponent.SKIP_BUTTON_DELAY_IN_SECONDS; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  public routerLinkPricing = publicRoutes.pricing.routerLink; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  public variantIndex: number; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -38,10 +58,10 @@ export class SubscriptionInterstitialDialog implements OnInit { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  public constructor( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private changeDetectorRef: ChangeDetectorRef, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Inject(MAT_DIALOG_DATA) public data: SubscriptionInterstitialDialogParams, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public dialogRef: MatDialogRef<SubscriptionInterstitialDialog> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public dialogRef: MatDialogRef<GfSubscriptionInterstitialDialogComponent> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  ) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.variantIndex = Math.floor( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Math.random() * SubscriptionInterstitialDialog.VARIANTS_COUNT | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Math.random() * GfSubscriptionInterstitialDialogComponent.VARIANTS_COUNT | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    ); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    addIcons({ arrowForwardOutline, checkmarkCircleOutline }); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -50,7 +70,9 @@ export class SubscriptionInterstitialDialog implements OnInit { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  public ngOnInit() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    interval(ms('1 second')) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      .pipe( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        take(SubscriptionInterstitialDialog.SKIP_BUTTON_DELAY_IN_SECONDS), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        take( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          GfSubscriptionInterstitialDialogComponent.SKIP_BUTTON_DELAY_IN_SECONDS | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        tap(() => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.remainingSkipButtonDelay--; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |