{"version":3,"file":"ngneat-hot-toast.mjs","sources":["../../../../projects/ngneat/hot-toast/src/lib/constants.ts","../../../../projects/ngneat/hot-toast/src/lib/hot-toast-ref.ts","../../../../projects/ngneat/hot-toast/src/lib/utils.ts","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/loader/loader.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/loader/loader.component.html","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/error/error.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/error/error.component.html","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/checkmark/checkmark.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/checkmark/checkmark.component.html","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/warning/warning.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/warning/warning.component.html","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/info/info.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/icons/info/info.component.html","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/indicator.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/indicator/indicator.component.html","../../../../projects/ngneat/hot-toast/src/lib/components/animated-icon/animated-icon.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/animated-icon/animated-icon.component.html","../../../../projects/ngneat/hot-toast/src/lib/components/hot-toast/hot-toast.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/hot-toast/hot-toast.component.html","../../../../projects/ngneat/hot-toast/src/lib/components/hot-toast-container/hot-toast-container.component.ts","../../../../projects/ngneat/hot-toast/src/lib/components/hot-toast-container/hot-toast-container.component.html","../../../../projects/ngneat/hot-toast/src/lib/hot-toast.model.ts","../../../../projects/ngneat/hot-toast/src/lib/hot-toast.service.ts","../../../../projects/ngneat/hot-toast/src/lib/hot-toast.provide.ts","../../../../projects/ngneat/hot-toast/src/public-api.ts","../../../../projects/ngneat/hot-toast/src/ngneat-hot-toast.ts"],"sourcesContent":["import { ToastType } from './hot-toast.model';\n\nexport const HOT_TOAST_DEFAULT_TIMEOUTS: {\n  [key in ToastType]: number;\n} = {\n  blank: 4000,\n  error: 4000,\n  success: 4000,\n  loading: 30000,\n  warning: 4000,\n  info: 4000,\n};\n\nexport const EXIT_ANIMATION_DURATION = 800;\nexport const ENTER_ANIMATION_DURATION = 350;\n\nexport const HOT_TOAST_MARGIN = 8;\n\nexport const HOT_TOAST_DEPTH_SCALE = 0.05;\nexport const HOT_TOAST_DEPTH_SCALE_ADD = 1;","import { Content } from '@ngneat/overview';\nimport { Observable, race, Subject } from 'rxjs';\n\n// This should be a `type` import since it causes `ng-packagr` compilation to fail because of a cyclic dependency.\nimport type { HotToastContainerComponent } from './components/hot-toast-container/hot-toast-container.component';\nimport { HotToastClose, Toast, UpdateToastOptions, HotToastRefProps, DefaultDataType } from './hot-toast.model';\n\nexport class HotToastRef<DataType = DefaultDataType> implements HotToastRefProps<DataType> {\n  updateMessage: (message: Content) => void;\n  updateToast: (options: UpdateToastOptions<DataType>) => void;\n  afterClosed: Observable<HotToastClose>;\n\n  private _dispose: () => void;\n\n  /** Subject for notifying the user that the toast has been closed. */\n  private _onClosed = new Subject<HotToastClose>();\n\n  constructor(private toast: Toast<DataType>) {}\n\n  set data(data: DataType) {\n    this.toast.data = data;\n  }\n\n  get data() {\n    return this.toast.data;\n  }\n\n  set dispose(value: () => void) {\n    this._dispose = value;\n  }\n\n  getToast() {\n    return this.toast;\n  }\n\n  /**Used for internal purpose\n   * Attach ToastRef to container\n   */\n  appendTo(container: HotToastContainerComponent) {\n    const { dispose, updateMessage, updateToast, afterClosed } = container.addToast(this);\n\n    this.dispose = dispose;\n    this.updateMessage = updateMessage;\n    this.updateToast = updateToast;\n    this.afterClosed = race(this._onClosed.asObservable(), afterClosed);\n    return this;\n  }\n\n  /**\n   * Closes the toast\n   *\n   * @param [closeData={ dismissedByAction: false }] -\n   * Make sure to pass { dismissedByAction: true } when closing from template\n   * @memberof HotToastRef\n   */\n  close(closeData: { dismissedByAction: boolean } = { dismissedByAction: false }) {\n    this._dispose();\n    this._onClosed.next({ dismissedByAction: closeData.dismissedByAction, id: this.toast.id });\n    this._onClosed.complete();\n  }\n}\n","export const animate = (element: HTMLElement, value: string) => {\n  element.style.animation = value;\n};\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { IconTheme } from '../../../../hot-toast.model';\n\n@Component({\n  selector: 'hot-toast-loader',\n  templateUrl: './loader.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n  imports: [CommonModule],\n})\nexport class LoaderComponent {\n  @Input() theme: IconTheme;\n}\n","<div\n  class=\"hot-toast-loader-icon\"\n  [ngStyle]=\"{ 'border-color': theme?.primary, 'border-right-color': theme?.secondary }\"\n></div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { IconTheme } from '../../../../hot-toast.model';\n\n@Component({\n  selector: 'hot-toast-error',\n  templateUrl: './error.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n})\nexport class ErrorComponent {\n  @Input() theme: IconTheme;\n}\n","<div\n  class=\"hot-toast-error-icon\"\n  [style.--error-primary]=\"theme?.primary\"\n  [style.--error-secondary]=\"theme?.secondary\"\n></div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { IconTheme } from '../../../../hot-toast.model';\n\n@Component({\n  selector: 'hot-toast-checkmark',\n  templateUrl: './checkmark.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n})\nexport class CheckMarkComponent {\n  @Input() theme: IconTheme;\n}\n","<div\n  class=\"hot-toast-checkmark-icon\"\n  [style.--check-primary]=\"theme?.primary\"\n  [style.--check-secondary]=\"theme?.secondary\"\n></div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { IconTheme } from '../../../../hot-toast.model';\n\n@Component({\n  selector: 'hot-toast-warning',\n  templateUrl: './warning.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n})\nexport class WarningComponent {\n  @Input() theme: IconTheme;\n}\n","<div\n  class=\"hot-toast-warning-icon\"\n  [style.--warn-primary]=\"theme?.primary\"\n  [style.--warn-secondary]=\"theme?.secondary\"\n></div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { IconTheme } from '../../../../hot-toast.model';\n\n@Component({\n  selector: 'hot-toast-info',\n  templateUrl: './info.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n})\nexport class InfoComponent {\n  @Input() theme: IconTheme;\n}\n","<div\n  class=\"hot-toast-info-icon\"\n  [style.--warn-primary]=\"theme?.primary\"\n  [style.--warn-secondary]=\"theme?.secondary\"\n></div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { IconTheme, ToastType } from '../../hot-toast.model';\nimport { LoaderComponent } from './icons/loader/loader.component';\nimport { ErrorComponent } from './icons/error/error.component';\nimport { CheckMarkComponent } from './icons/checkmark/checkmark.component';\nimport { WarningComponent } from './icons/warning/warning.component';\nimport { InfoComponent } from './icons/info/info.component';\n\n@Component({\n  selector: 'hot-toast-indicator',\n  templateUrl: 'indicator.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n  imports: [LoaderComponent, ErrorComponent, CheckMarkComponent, WarningComponent, InfoComponent],\n})\nexport class IndicatorComponent {\n  @Input() theme: IconTheme;\n  @Input() type: ToastType;\n}\n","@if (type !== 'blank') {\n<div class=\"hot-toast-indicator-wrapper\">\n  <hot-toast-loader [theme]=\"theme\"></hot-toast-loader>\n  @if (type !== 'loading') {\n  <div class=\"hot-toast-status-wrapper\">\n    <div>\n      @switch (type) { @case ('error') {\n      <div>\n        <hot-toast-error [theme]=\"theme\"></hot-toast-error>\n      </div>\n      } @case ('success') {\n      <div>\n        <hot-toast-checkmark [theme]=\"theme\"></hot-toast-checkmark>\n      </div>\n      } @case ('warning') {\n      <div>\n        <hot-toast-warning [theme]=\"theme\"></hot-toast-warning>\n      </div>\n      } @case ('info') {\n      <div>\n        <hot-toast-info [theme]=\"theme\"></hot-toast-info>\n      </div>\n      } }\n    </div>\n  </div>\n  }\n</div>\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { IconTheme } from '../../hot-toast.model';\n\n@Component({\n  selector: 'hot-toast-animated-icon',\n  templateUrl: './animated-icon.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n})\nexport class AnimatedIconComponent {\n  @Input() iconTheme: IconTheme;\n}\n","<div class=\"hot-toast-animated-icon\" [style.color]=\"iconTheme?.primary\">\n  <ng-content></ng-content>\n</div>\n","import {\n  AfterViewInit,\n  ChangeDetectionStrategy,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Injector,\n  Input,\n  NgZone,\n  OnChanges,\n  OnDestroy,\n  OnInit,\n  Output,\n  Renderer2,\n  SimpleChanges,\n  ViewChild,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DynamicViewDirective, isComponent, isTemplateRef } from '@ngneat/overview';\n\nimport {\n  ENTER_ANIMATION_DURATION,\n  EXIT_ANIMATION_DURATION,\n  HOT_TOAST_DEPTH_SCALE,\n} from '../../constants';\nimport { HotToastRef } from '../../hot-toast-ref';\nimport { CreateHotToastRef, HotToastClose, Toast, ToastConfig } from '../../hot-toast.model';\nimport { animate } from '../../utils';\nimport { IndicatorComponent } from '../indicator/indicator.component';\nimport { AnimatedIconComponent } from '../animated-icon/animated-icon.component';\n\n@Component({\n  selector: 'hot-toast',\n  templateUrl: 'hot-toast.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n  imports: [CommonModule, DynamicViewDirective, IndicatorComponent, AnimatedIconComponent],\n})\nexport class HotToastComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {\n  @Input() toast: Toast<unknown>;\n  @Input() offset = 0;\n  @Input() defaultConfig: ToastConfig;\n  @Input() toastRef: CreateHotToastRef<unknown>;\n  private _toastsAfter = 0;\n  get toastsAfter() {\n    return this._toastsAfter;\n  }\n  @Input()\n  set toastsAfter(value) {\n    this._toastsAfter = value;\n    if (this.defaultConfig?.visibleToasts > 0) {\n      if (this.toast.autoClose) {\n        // if (value >= this.defaultConfig?.visibleToasts) {\n        //   this.close();\n        // }\n      } else {\n        if (value >= this.defaultConfig?.visibleToasts) {\n          this.softClose();\n        } else if (this.softClosed) {\n          this.softOpen();\n        }\n      }\n    }\n  }\n  @Input() isShowingAllToasts = false;\n\n  @Output() height = new EventEmitter<number>();\n  @Output() beforeClosed = new EventEmitter();\n  @Output() afterClosed = new EventEmitter<HotToastClose>();\n  @Output() showAllToasts = new EventEmitter<boolean>();\n\n  @ViewChild('hotToastBarBase') private toastBarBase: ElementRef<HTMLElement>;\n\n  isManualClose = false;\n  context: Record<string, any>;\n  toastComponentInjector: Injector;\n\n  private unlisteners: VoidFunction[] = [];\n  private softClosed = false;\n\n  constructor(private injector: Injector, private renderer: Renderer2, private ngZone: NgZone) {}\n\n  get toastBarBaseHeight() {\n    return this.toastBarBase.nativeElement.offsetHeight;\n  }\n\n  get scale() {\n    return this.defaultConfig.stacking !== 'vertical' && !this.isShowingAllToasts\n      ? this.toastsAfter * -HOT_TOAST_DEPTH_SCALE + 1\n      : 1;\n  }\n\n  get translateY() {\n    return this.offset * (this.top ? 1 : -1) + 'px';\n  }\n\n  get exitAnimationDelay() {\n    return this.toast.duration + 'ms';\n  }\n\n  get top() {\n    return this.toast.position.includes('top');\n  }\n\n  get containerPositionStyle() {\n    const verticalStyle = this.top ? { top: 0 } : { bottom: 0 };\n    const transform = `translateY(var(--hot-toast-translate-y)) scale(var(--hot-toast-scale))`;\n\n    const horizontalStyle = this.toast.position.includes('left')\n      ? {\n          left: 0,\n        }\n      : this.toast.position.includes('right')\n      ? {\n          right: 0,\n        }\n      : {\n          left: 0,\n          right: 0,\n          justifyContent: 'center',\n        };\n    return {\n      transform,\n      ...verticalStyle,\n      ...horizontalStyle,\n    };\n  }\n\n  get toastBarBaseStyles() {\n    const enterAnimation = `hotToastEnterAnimation${\n      this.top ? 'Negative' : 'Positive'\n    } ${ENTER_ANIMATION_DURATION}ms cubic-bezier(0.21, 1.02, 0.73, 1) forwards`;\n\n    const exitAnimation = `hotToastExitAnimation${\n      this.top ? 'Negative' : 'Positive'\n    } ${EXIT_ANIMATION_DURATION}ms forwards cubic-bezier(0.06, 0.71, 0.55, 1) var(--hot-toast-exit-animation-delay) var(--hot-toast-exit-animation-state)`;\n\n    const animation = this.toast.autoClose ? `${enterAnimation}, ${exitAnimation}` : enterAnimation;\n\n    return { ...this.toast.style, animation };\n  }\n\n  get isIconString() {\n    return typeof this.toast.icon === 'string';\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (changes.toast && !changes.toast.firstChange && changes.toast.currentValue?.message) {\n      requestAnimationFrame(() => {\n        this.height.emit(this.toastBarBase.nativeElement.offsetHeight);\n      });\n    }\n  }\n\n  ngOnInit() {\n    if (isTemplateRef(this.toast.message)) {\n      this.context = { $implicit: this.toastRef };\n    }\n    if (isComponent(this.toast.message)) {\n      this.toastComponentInjector = Injector.create({\n        providers: [\n          {\n            provide: HotToastRef,\n            useValue: this.toastRef,\n          },\n        ],\n        parent: this.toast.injector || this.injector,\n      });\n    }\n  }\n\n  ngAfterViewInit() {\n    const nativeElement = this.toastBarBase.nativeElement;\n    // Caretaker note: accessing `offsetHeight` triggers the whole layout update.\n    // Macro tasks (like `setTimeout`) might be executed within the current rendering frame and cause a frame drop.\n    requestAnimationFrame(() => {\n      this.height.emit(nativeElement.offsetHeight);\n    });\n\n    // Caretaker note: `animationstart` and `animationend` events are event tasks that trigger change detection.\n    // We'd want to trigger the change detection only if it's an exit animation.\n    this.ngZone.runOutsideAngular(() => {\n      this.unlisteners.push(\n        // Caretaker note: we have to remove these event listeners at the end (even if the element is removed from DOM).\n        // zone.js stores its `ZoneTask`s within the `nativeElement[Zone.__symbol__('animationstart') + 'false']` property\n        // with callback that capture `this`.\n        this.renderer.listen(nativeElement, 'animationstart', (event: AnimationEvent) => {\n          if (this.isExitAnimation(event)) {\n            this.ngZone.run(() => this.beforeClosed.emit());\n          }\n        }),\n        this.renderer.listen(nativeElement, 'animationend', (event: AnimationEvent) => {\n          if (this.isExitAnimation(event)) {\n            this.ngZone.run(() => this.afterClosed.emit({ dismissedByAction: this.isManualClose, id: this.toast.id }));\n          }\n        })\n      );\n    });\n\n    this.setToastAttributes();\n  }\n\n  softClose() {\n    const exitAnimation = `hotToastExitSoftAnimation${\n      this.top ? 'Negative' : 'Positive'\n    } ${EXIT_ANIMATION_DURATION}ms forwards cubic-bezier(0.06, 0.71, 0.55, 1)`;\n\n    const nativeElement = this.toastBarBase.nativeElement;\n\n    animate(nativeElement, exitAnimation);\n    this.softClosed = true;\n  }\n  softOpen() {\n    const softEnterAnimation = `hotToastEnterSoftAnimation${\n      top ? 'Negative' : 'Positive'\n    } ${ENTER_ANIMATION_DURATION}ms cubic-bezier(0.21, 1.02, 0.73, 1) forwards`;\n\n    const nativeElement = this.toastBarBase.nativeElement;\n\n    animate(nativeElement, softEnterAnimation);\n    this.softClosed = false;\n  }\n\n  close() {\n    this.isManualClose = true;\n\n    const exitAnimation = `hotToastExitAnimation${\n      this.top ? 'Negative' : 'Positive'\n    } ${EXIT_ANIMATION_DURATION}ms forwards cubic-bezier(0.06, 0.71, 0.55, 1)`;\n\n    const nativeElement = this.toastBarBase.nativeElement;\n\n    animate(nativeElement, exitAnimation);\n  }\n\n  handleMouseEnter() {\n    this.showAllToasts.emit(true);\n  }\n  handleMouseLeave() {\n    this.showAllToasts.emit(false);\n  }\n\n  ngOnDestroy() {\n    this.close();\n    while (this.unlisteners.length) {\n      this.unlisteners.pop()();\n    }\n  }\n\n  private isExitAnimation(ev: AnimationEvent) {\n    return ev.animationName.includes('hotToastExitAnimation');\n  }\n\n  private setToastAttributes() {\n    const toastAttributes: Record<string, string> = this.toast.attributes;\n    for (const [key, value] of Object.entries(toastAttributes)) {\n      this.renderer.setAttribute(this.toastBarBase.nativeElement, key, value);\n    }\n  }\n}\n","<div\n  class=\"hot-toast-bar-base-container\"\n  [ngStyle]=\"containerPositionStyle\"\n  [ngClass]=\"'hot-toast-theme-' + toast.theme\"\n  [style.--hot-toast-scale]=\"scale\"\n  [style.--hot-toast-translate-y]=\"translateY\"\n>\n  <div class=\"hot-toast-bar-base-wrapper\" (mouseenter)=\"handleMouseEnter()\" (mouseleave)=\"handleMouseLeave()\">\n    <div\n      class=\"hot-toast-bar-base\"\n      #hotToastBarBase\n      [ngStyle]=\"toastBarBaseStyles\"\n      [ngClass]=\"toast.className\"\n      [style.--hot-toast-animation-state]=\"isManualClose ? 'running' : 'paused'\"\n      [style.--hot-toast-exit-animation-state]=\"isShowingAllToasts ? 'paused' : 'running'\"\n      [style.--hot-toast-exit-animation-delay]=\"exitAnimationDelay\"\n      [attr.aria-live]=\"toast.ariaLive\"\n      [attr.role]=\"toast.role\"\n    >\n      <div class=\"hot-toast-icon\" aria-hidden=\"true\">\n        @if (toast.icon !== undefined) { @if (isIconString) {\n        <hot-toast-animated-icon [iconTheme]=\"toast.iconTheme\">{{ toast.icon }}</hot-toast-animated-icon>\n        } @else {\n        <div>\n          <ng-container *dynamicView=\"toast.icon\"></ng-container>\n        </div>\n        } } @else {\n        <hot-toast-indicator [theme]=\"toast.iconTheme\" [type]=\"toast.type\"></hot-toast-indicator>\n        }\n      </div>\n\n      <div class=\"hot-toast-message\">\n        <div>\n          <ng-container *dynamicView=\"toast.message; context: context; injector: toastComponentInjector\"></ng-container>\n        </div>\n      </div>\n\n      @if (toast.dismissible) {\n      <button\n        (click)=\"close()\"\n        type=\"button\"\n        class=\"hot-toast-close-btn\"\n        aria-label=\"Close\"\n        [ngStyle]=\"toast.closeStyle\"\n      ></button>\n      }\n    </div>\n  </div>\n</div>\n","import { Component, ChangeDetectionStrategy, ChangeDetectorRef, Input, QueryList, ViewChildren } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport {\n  HotToastClose,\n  Toast,\n  ToastConfig,\n  ToastPosition,\n  UpdateToastOptions,\n  AddToastRef,\n  CreateHotToastRef,\n} from '../../hot-toast.model';\nimport { HotToastRef } from '../../hot-toast-ref';\nimport { filter } from 'rxjs/operators';\nimport { Content } from '@ngneat/overview';\nimport { HotToastComponent } from '../hot-toast/hot-toast.component';\nimport { HOT_TOAST_DEPTH_SCALE, HOT_TOAST_DEPTH_SCALE_ADD, HOT_TOAST_MARGIN } from '../../constants';\n\n@Component({\n  selector: 'hot-toast-container',\n  templateUrl: './hot-toast-container.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  standalone: true,\n  imports: [HotToastComponent],\n})\nexport class HotToastContainerComponent {\n  @Input() defaultConfig: ToastConfig;\n\n  @ViewChildren(HotToastComponent) hotToastComponentList: QueryList<HotToastComponent>;\n\n  toasts: Toast<unknown>[] = [];\n  toastRefs: CreateHotToastRef<unknown>[] = [];\n  isShowingAllToasts = false;\n\n  /** Subject for notifying the user that the toast has been closed. */\n  private _onClosed = new Subject<HotToastClose>();\n\n  private onClosed$ = this._onClosed.asObservable();\n\n  constructor(private cdr: ChangeDetectorRef) {}\n\n  trackById(index: number, toast: Toast<unknown>) {\n    return toast.id;\n  }\n\n  getVisibleToasts(position: ToastPosition) {\n    return this.toasts.filter((t) => t.visible && t.position === position);\n  }\n  calculateOffset(toastId: string, position: ToastPosition) {\n    const visibleToasts = this.getVisibleToasts(position);\n    const index = visibleToasts.findIndex((toast) => toast.id === toastId);\n    const offset =\n      index !== -1\n        ? visibleToasts.slice(...(this.defaultConfig.reverseOrder ? [index + 1] : [0, index])).reduce((acc, t, i) => {\n            const toastsAfter = visibleToasts.length - 1 - i;\n            return this.defaultConfig.visibleToasts !== 0 && i < visibleToasts.length - this.defaultConfig.visibleToasts\n              ? 0\n              : acc +\n                  (this.defaultConfig.stacking === 'vertical' || this.isShowingAllToasts\n                    ? t.height || 0\n                    : toastsAfter * HOT_TOAST_DEPTH_SCALE + HOT_TOAST_DEPTH_SCALE_ADD) +\n                  HOT_TOAST_MARGIN;\n          }, 0)\n        : 0;\n    return offset;\n  }\n\n  updateHeight(height: number, toast: Toast<unknown>) {\n    toast.height = height;\n    this.cdr.detectChanges();\n  }\n\n  addToast<DataType>(ref: HotToastRef): AddToastRef<DataType> {\n    this.toastRefs.push(ref);\n\n    const toast = ref.getToast();\n\n    this.toasts.push(ref.getToast());\n\n    if (this.defaultConfig.visibleToasts !== 0 && this.toasts.length > this.defaultConfig.visibleToasts) {\n      const closeToasts = this.toasts.slice(0, this.toasts.length - this.defaultConfig.visibleToasts);\n      closeToasts.forEach((t) => {\n        if (t.autoClose) {\n          this.closeToast(t.id);\n        }\n      });\n    }\n\n    this.cdr.detectChanges();\n\n    return {\n      dispose: () => {\n        this.closeToast(toast.id);\n      },\n      updateMessage: (message: Content) => {\n        toast.message = message;\n        this.updateToasts(toast);\n        this.cdr.detectChanges();\n      },\n      updateToast: (options: UpdateToastOptions<DataType>) => {\n        this.updateToasts(toast, options);\n        this.cdr.detectChanges();\n      },\n      afterClosed: this.getAfterClosed(toast),\n    };\n  }\n\n  closeToast(id?: string) {\n    if (id) {\n      const comp = this.hotToastComponentList.find((item) => item.toast.id === id);\n      if (comp) {\n        comp.close();\n      }\n    } else {\n      this.hotToastComponentList.forEach((comp) => comp.close());\n    }\n  }\n\n  beforeClosed(toast: Toast<unknown>) {\n    toast.visible = false;\n  }\n\n  afterClosed(closeToast: HotToastClose) {\n    const toastIndex = this.toasts.findIndex((t) => t.id === closeToast.id);\n    if (toastIndex > -1) {\n      this._onClosed.next(closeToast);\n      this.toasts = this.toasts.filter((t) => t.id !== closeToast.id);\n      this.toastRefs = this.toastRefs.filter((t) => t.getToast().id !== closeToast.id);\n      this.cdr.detectChanges();\n    }\n  }\n\n  hasToast(id: string) {\n    return this.toasts.findIndex((t) => t.id === id) > -1;\n  }\n\n  showAllToasts(show: boolean) {\n    this.isShowingAllToasts = show;\n  }\n\n  private getAfterClosed(toast: Toast<unknown>) {\n    return this.onClosed$.pipe(filter((v) => v.id === toast.id));\n  }\n\n  private updateToasts(toast: Toast<unknown>, options?: UpdateToastOptions<unknown>) {\n    this.toasts = this.toasts.map((t) => ({ ...t, ...(t.id === toast.id && { ...toast, ...options }) }));\n  }\n}\n","<div style=\"position: fixed; z-index: 9999; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none\">\n  <div style=\"position: relative; height: 100%\">\n    <div>\n      @for (toast of toasts; track trackById(i, toast); let i = $index) {\n      <hot-toast\n        [toast]=\"toast\"\n        [offset]=\"calculateOffset(toast.id, toast.position)\"\n        [toastRef]=\"toastRefs[i]\"\n        [toastsAfter]=\"(toast.autoClose ? toasts.length : getVisibleToasts(toast.position).length) - 1 - i\"\n        [defaultConfig]=\"defaultConfig\"\n        [isShowingAllToasts]=\"isShowingAllToasts\"\n        (showAllToasts)=\"showAllToasts($event)\"\n        (height)=\"updateHeight($event, toast)\"\n        (beforeClosed)=\"beforeClosed(toast)\"\n        (afterClosed)=\"afterClosed($event)\"\n      ></hot-toast>\n      }\n    </div>\n  </div>\n</div>\n","import { Component, Injector } from '@angular/core';\nimport { Content } from '@ngneat/overview';\nimport { Observable } from 'rxjs';\n\nexport type ToastStacking = 'vertical' | 'depth';\n\nexport class ToastConfig implements DefaultToastOptions {\n  /**\n   * Sets the reverse order for hot-toast stacking\n   *\n   * @default false\n   */\n  reverseOrder = false;\n\n  /**\n   * Sets the number of toasts visible.\n   * 0 will set no limit.\n   * @default 5\n   * @since 6.1.0\n   */\n  visibleToasts = 5;\n\n  /**\n   * Sets the type of stacking\n   * @default \"vertical\"\n   * @since 6.1.0\n   */\n  stacking: ToastStacking = 'vertical';\n\n  ariaLive: ToastAriaLive = 'polite';\n  role: ToastRole = 'status';\n  position: ToastPosition = 'top-center';\n  className: string;\n  closeStyle: any;\n  dismissible: boolean;\n  autoClose = true;\n  duration: number;\n  icon: Content;\n  iconTheme: IconTheme;\n  style: any;\n  theme: ToastTheme = 'toast';\n  attributes: Record<string, string> = {};\n\n  // key in ToastType\n  info: ToastOptions<unknown> & { content?: Content } = { content: '' };\n  success: ToastOptions<unknown> & { content?: Content } = { content: '' };\n  error: ToastOptions<unknown> & { content?: Content } = { content: '' };\n  loading: ToastOptions<unknown> & { content?: Content } = { content: '' };\n  blank: ToastOptions<unknown> & { content?: Content } = { content: '' };\n  warning: ToastOptions<unknown> & { content?: Content } = { content: '' };\n}\n\nexport type ToastType = 'success' | 'error' | 'loading' | 'blank' | 'warning' | 'info';\nexport type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';\n\nexport type IconTheme = {\n  primary: string;\n  secondary?: string;\n};\n\nexport type ToastTheme = 'toast' | 'snackbar';\n\nexport type ValueFunction<TValue, TArg> = (arg: TArg) => TValue;\nexport type ValueOrFunction<TValue, TArg> = TValue | ValueFunction<TValue, TArg>;\n\nconst isFunction = <TValue, TArg>(\n  valOrFunction: ValueOrFunction<TValue, TArg>\n): valOrFunction is ValueFunction<TValue, TArg> => typeof valOrFunction === 'function';\n\nconst isAngularComponent = (arg: any): boolean => {\n  return (\n    typeof arg === 'function' && arg.decorators && arg.decorators.some((decorator) => decorator.type === Component)\n  );\n};\n\nexport const resolveValueOrFunction = <TValue, TArg>(valOrFunction: ValueOrFunction<TValue, TArg>, arg: TArg): TValue =>\n  isAngularComponent(valOrFunction)\n    ? (valOrFunction as TValue)\n    : isFunction(valOrFunction)\n    ? valOrFunction(arg)\n    : valOrFunction;\n\nexport type ToastRole = 'status' | 'alert';\n\nexport type ToastAriaLive = 'assertive' | 'off' | 'polite';\n\nexport interface Toast<DataType> {\n  type: ToastType;\n\n  /**\n   * Unique id to associate with hot-toast.\n   * There can't be multiple hot-toasts opened with same id.\n   *\n   * @default Date.now().toString()\n   */\n  id: string;\n\n  /** The message to show in the hot-toast. */\n  message: Content | undefined;\n\n  /**\n   * Role of the live region.\n   *\n   * @default status\n   */\n  role: ToastRole;\n\n  /** aria-live value for the live region.\n   *\n   * @default polite\n   */\n  ariaLive: ToastAriaLive;\n\n  /**Icon to show in the hot-toast */\n  icon?: Content;\n\n  /**\n   * Duration in milliseconds after which hot-toast will be auto closed.\n   * Can be disabled via `autoClose: false`\n   *\n   * @default 3000 | error = 4000 | loading = 30000\n   */\n  duration?: number;\n\n  /**\n   * Show close button in hot-toast\n   *\n   * @default false\n   */\n  dismissible?: boolean;\n\n  /**\n   * Auto close hot-toast after duration\n   *\n   * @default true\n   */\n  autoClose?: boolean;\n\n  /**Extra styles to apply for hot-toast */\n  style?: any;\n\n  /**Extra CSS classes to be added to the hot toast container. */\n  className?: string;\n\n  /**Extra attribute to be added to the hot toast container. */\n  attributes?: Record<string, string>;\n\n  /**Use this to change icon color */\n  iconTheme?: IconTheme;\n\n  /**\n   * Visual appearance of hot-toast\n   *\n   * @default toast\n   */\n  theme?: ToastTheme;\n\n  /**\n   * The position to place the hot-toast.\n   *\n   *  @default top-center\n   */\n  position?: ToastPosition;\n\n  /**Extra styles to apply for close button */\n  closeStyle?: any;\n\n  createdAt: number;\n  visible: boolean;\n  height?: number;\n\n  observableMessages?: ObservableMessages<unknown, DataType>;\n\n  /**\n   * Useful when you want to keep a persistance for toast based on ids, across sessions.\n   *\n   * @example\n   * // Lets say you want show hot-toast, with a particular id,\n   * // max 3 times to a user irrespective of browser session.\n   * // In this case you will set this as:\n   * { enabled: true, count: 3 }\n   *\n   * @type {ToastPersistConfig}\n   */\n  persist?: ToastPersistConfig;\n\n  /**\n   * Allows you to pass injector for your component\n   *\n   * @since 1.1.0\n   * @type {Injector}\n   * @memberof Toast\n   */\n  injector?: Injector;\n\n  /**\n   * Allows you to pass data for your component/template\n   *\n   * @since 2.0.0\n   * @type {DataType}\n   * @memberof Toast\n   */\n  data?: DataType;\n}\n\nexport type ToastOptions<DataType> = Partial<\n  Pick<\n    Toast<DataType>,\n    | 'id'\n    | 'icon'\n    | 'duration'\n    | 'dismissible'\n    | 'autoClose'\n    | 'role'\n    | 'ariaLive'\n    | 'className'\n    | 'style'\n    | 'iconTheme'\n    | 'theme'\n    | 'position'\n    | 'closeStyle'\n    | 'persist'\n    | 'injector'\n    | 'data'\n    | 'attributes'\n  >\n>;\n\nexport type DefaultToastOptions = ToastOptions<unknown> & {\n  [key in ToastType]?: ToastOptions<unknown> & { content?: Content };\n};\n\nexport type ObservableLoading<DataType> = {\n  content: Content;\n} & ToastOptions<DataType>;\n\nexport type ObservableSuccessOrError<T, DataType> = {\n  content: ValueOrFunction<Content, T>;\n} & ToastOptions<DataType>;\n\nexport type ObservableMessages<T, DataType> = {\n  loading?: Content | ObservableLoading<DataType>;\n  success?: ValueOrFunction<Content, T> | ObservableSuccessOrError<T, DataType>;\n  error?: ValueOrFunction<Content, any> | ObservableSuccessOrError<any, DataType>;\n};\n\nexport interface HotToastServiceMethods {\n  show<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown>;\n  error<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown>;\n  success<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown>;\n  loading<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown>;\n  warning<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown>;\n  observe<T, DataType>(messages: ObservableMessages<T, DataType>): (source: Observable<T>) => Observable<T>;\n  close(id?: string): void;\n}\n\nexport type UpdateToastOptions<DataType> = Partial<\n  Pick<\n    Toast<DataType>,\n    'icon' | 'duration' | 'dismissible' | 'className' | 'style' | 'iconTheme' | 'type' | 'theme' | 'closeStyle'\n  >\n>;\n\nexport interface HotToastRefProps<DataType> {\n  /** Returns all the toast options */\n  getToast: () => Toast<DataType>;\n  dispose: () => void;\n  /**Updates only message */\n  updateMessage: (message: Content) => void;\n  /**Update updatable options of toast */\n  updateToast: (options: UpdateToastOptions<DataType>) => void;\n  /** Observable for notifying the user that the toast has been closed. */\n  afterClosed: Observable<HotToastClose>;\n  /**Closes the toast */\n  close: (closeData?: { dismissedByAction: boolean }) => void;\n  /**\n   * @since 2.0.0\n   */\n  data: DataType;\n}\n\n/** Event that is emitted when a snack bar is dismissed. */\nexport interface HotToastClose {\n  /** Whether the snack bar was dismissed using the action button. */\n  dismissedByAction: boolean;\n  id: string;\n}\n\nexport class ToastPersistConfig {\n  /**\n   *In which storage id vs. counts should be stored\n   *\n   * @type {('local' | 'session')}\n   * @memberof ToastPersistConfig\n   * @default 'local'\n   */\n  storage?: 'local' | 'session' = 'local';\n\n  /**\n   *The key pattern to store object in storage. `${id}` in pattern is replaced with actual toast id.\n   *\n   * @type {('local' | 'session')}\n   * @memberof ToastPersistConfig\n   * @default 'ngneat/hottoast-${id}'\n   */\n  key?: string = 'ngneat/hototast-${id}';\n\n  /**\n   *The number of toasts allowed to show.\n   *\n   * @memberof ToastPersistConfig\n   * @default 1\n   */\n  count? = 1;\n\n  enabled = false;\n}\n\nexport type AddToastRef<DataType> = Pick<\n  HotToastRefProps<DataType>,\n  'afterClosed' | 'dispose' | 'updateMessage' | 'updateToast'\n>;\n\nexport type CreateHotToastRef<DataType> = Omit<Omit<HotToastRefProps<DataType>, 'appendTo'>, 'dispose'>;\n\nexport type DefaultDataType = Record<string, any>;\n","import { isPlatformServer } from '@angular/common';\nimport { Inject, Injectable, Optional, PLATFORM_ID } from '@angular/core';\nimport { CompRef, Content, isComponent, isTemplateRef, ViewService } from '@ngneat/overview';\nimport { defer, Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { HotToastContainerComponent } from './components/hot-toast-container/hot-toast-container.component';\nimport { HOT_TOAST_DEFAULT_TIMEOUTS } from './constants';\nimport { HotToastRef } from './hot-toast-ref';\nimport {\n  CreateHotToastRef,\n  DefaultToastOptions,\n  HotToastServiceMethods,\n  ObservableLoading,\n  ObservableMessages,\n  ObservableSuccessOrError,\n  resolveValueOrFunction,\n  Toast,\n  ToastConfig,\n  ToastOptions,\n  ToastPersistConfig,\n  ToastType,\n  UpdateToastOptions,\n  ValueOrFunction,\n} from './hot-toast.model';\n\n@Injectable({ providedIn: 'root' })\nexport class HotToastService implements HotToastServiceMethods {\n  private _isInitialized = false;\n  private _componentRef: CompRef<HotToastContainerComponent>;\n\n  private _defaultConfig = new ToastConfig();\n  private _defaultPersistConfig = new ToastPersistConfig();\n\n  constructor(\n    private _viewService: ViewService,\n    @Inject(PLATFORM_ID) private platformId: string,\n    @Optional() config: ToastConfig\n  ) {\n    if (config) {\n      this._defaultConfig = {\n        ...this._defaultConfig,\n        ...config,\n      };\n    }\n  }\n\n  get defaultConfig() {\n    return this._defaultConfig;\n  }\n  set defaultConfig(config: ToastConfig) {\n    this._defaultConfig = {\n      ...this._defaultConfig,\n      ...config,\n    };\n    if (this._componentRef) {\n      this._componentRef.setInput('defaultConfig', this._defaultConfig);\n    }\n  }\n\n  /**\n   * Opens up an hot-toast without any pre-configurations\n   *\n   * @param message The message to show in the hot-toast.\n   * @param [options] Additional configuration options for the hot-toast.\n   * @returns\n   * @memberof HotToastService\n   */\n  show<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown> {\n    const toast = this.createToast<DataType>(message || this._defaultConfig.blank.content, 'blank', {\n      ...this._defaultConfig,\n      ...options,\n    });\n\n    return toast;\n  }\n\n  /**\n   * Opens up an hot-toast with pre-configurations for error state\n   *\n   * @param message The message to show in the hot-toast.\n   * @param [options] Additional configuration options for the hot-toast.\n   * @returns\n   * @memberof HotToastService\n   */\n  error<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown> {\n    const toast = this.createToast<DataType>(message || this._defaultConfig.error.content, 'error', {\n      ...this._defaultConfig,\n      ...this._defaultConfig?.error,\n      ...options,\n    });\n\n    return toast;\n  }\n\n  /**\n   * Opens up an hot-toast with pre-configurations for success state\n   *\n   * @param message The message to show in the hot-toast.\n   * @param [options] Additional configuration options for the hot-toast.\n   * @returns\n   * @memberof HotToastService\n   */\n  success<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown> {\n    const toast = this.createToast<DataType>(message || this._defaultConfig.success.content, 'success', {\n      ...this._defaultConfig,\n      ...this._defaultConfig?.success,\n      ...options,\n    });\n\n    return toast;\n  }\n\n  /**\n   * Opens up an hot-toast with pre-configurations for loading state\n   *\n   * @param message The message to show in the hot-toast.\n   * @param [options] Additional configuration options for the hot-toast.\n   * @returns\n   * @memberof HotToastService\n   */\n  loading<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown> {\n    const toast = this.createToast<DataType>(message || this._defaultConfig.loading.content, 'loading', {\n      ...this._defaultConfig,\n      ...this._defaultConfig?.loading,\n      ...options,\n    });\n\n    return toast;\n  }\n\n  /**\n   * Opens up an hot-toast with pre-configurations for warning state\n   *\n   * @param message The message to show in the hot-toast.\n   * @param [options] Additional configuration options for the hot-toast.\n   * @returns\n   * @memberof HotToastService\n   */\n  warning<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown> {\n    const toast = this.createToast<DataType>(message || this._defaultConfig.warning.content, 'warning', {\n      ...this._defaultConfig,\n      ...this._defaultConfig?.warning,\n      ...options,\n    });\n\n    return toast;\n  }\n\n  /**\n   * Opens up an hot-toast with pre-configurations for info state\n   *\n   * @param message The message to show in the hot-toast.\n   * @param [options] Additional configuration options for the hot-toast.\n   * @returns\n   * @memberof HotToastService\n   * @since 3.3.0\n   */\n  info<DataType>(message?: Content, options?: ToastOptions<DataType>): CreateHotToastRef<DataType | unknown> {\n    const toast = this.createToast<DataType>(message || this._defaultConfig.info.content, 'info', {\n      ...this._defaultConfig,\n      ...this._defaultConfig?.info,\n      ...options,\n    });\n\n    return toast;\n  }\n\n  /**\n   *\n   *  Opens up an hot-toast with pre-configurations for loading initially and then changes state based on messages\n   *\n   * @template T Type of observable\n   * @param messages Messages for each state i.e. loading, success and error\n   * @returns\n   * @memberof HotToastService\n   */\n  observe<T = unknown, DataType = unknown>(messages: ObservableMessages<T, DataType>): (source: Observable<T>) => Observable<T> {\n    return (source) => {\n      let toastRef: CreateHotToastRef<DataType | unknown>;\n      let start = 0;\n\n      const loadingContent = messages.loading ?? this._defaultConfig.loading?.content;\n      const successContent = messages.success ?? this._defaultConfig.success?.content;\n      const errorContent = messages.error ?? this._defaultConfig.error?.content;\n\n      return defer(() => {\n        if (loadingContent) {\n          toastRef = this.createLoadingToast<T, DataType>(loadingContent);\n          start = Date.now();\n        }\n        return source.pipe(\n          tap({\n            ...(successContent && {\n              next: (val) => {\n                toastRef = this.createOrUpdateToast<T, DataType | unknown>(\n                  messages,\n                  val,\n                  toastRef,\n                  'success',\n                  start === 0 ? start : Date.now() - start\n                );\n              },\n            }),\n            ...(errorContent && {\n              error: (e) => {\n                toastRef = this.createOrUpdateToast<T, DataType | unknown>(\n                  messages,\n                  e,\n                  toastRef,\n                  'error',\n                  start === 0 ? start : Date.now() - start\n                );\n              },\n            }),\n          })\n        );\n      });\n    };\n  }\n\n  /**\n   * Closes the hot-toast\n   *\n   * @param [id] - ID of the toast\n   * @since 3.0.1 - If ID is not provided, all toasts will be closed\n   */\n  close(id?: string) {\n    if (this._componentRef) {\n      this._componentRef.ref.instance.closeToast(id);\n    }\n  }\n\n  /**\n   * Used for internal purpose only.\n   * Creates a container component and attaches it to document.body.\n   */\n  private init() {\n    if (isPlatformServer(this.platformId)) {\n      return;\n    }\n    this._componentRef = this._viewService\n      .createComponent(HotToastContainerComponent)\n      .setInput('defaultConfig', this._defaultConfig)\n      .appendTo(document.body);\n  }\n\n  private createOrUpdateToast<T, DataType>(\n    messages: ObservableMessages<T, DataType>,\n    val: unknown,\n    toastRef: CreateHotToastRef<DataType>,\n    type: ToastType,\n    diff: number\n  ) {\n    try {\n      let content: Content | ValueOrFunction<Content, T> = null;\n      let options: ToastOptions<DataType | unknown> = {};\n      ({ content, options } = this.getContentAndOptions<any, DataType>(\n        type,\n        messages[type] || (this._defaultConfig[type] ? this._defaultConfig[type].content : '')\n      ));\n      content = resolveValueOrFunction(content, val);\n      if (toastRef) {\n        if (options.data) {\n          toastRef.data = options.data as DataType;\n        }\n        toastRef.updateMessage(content);\n        const updatedOptions: UpdateToastOptions<DataType> = {\n          type,\n          duration: diff + HOT_TOAST_DEFAULT_TIMEOUTS[type],\n          ...options,\n          ...(options.duration && { duration: diff + options.duration }),\n        };\n        toastRef.updateToast(updatedOptions);\n      } else {\n        this.createToast<DataType, T>(content, type, options);\n      }\n      return toastRef;\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  private createToast<DataType, T = unknown>(\n    message: Content,\n    type: ToastType,\n    options?: DefaultToastOptions,\n    observableMessages?: ObservableMessages<T, DataType>\n  ): CreateHotToastRef<DataType | unknown> {\n    if (!this._isInitialized) {\n      this._isInitialized = true;\n      this.init();\n    }\n\n    const now = Date.now();\n    const id = options?.id ?? now.toString();\n\n    if (\n      !this.isDuplicate(id) &&\n      (!options.persist?.enabled || (options.persist?.enabled && this.handleStorageValue(id, options)))\n    ) {\n      const toast: Toast<DataType | unknown> = {\n        ariaLive: options?.ariaLive ?? 'polite',\n        createdAt: now,\n        duration: options?.duration ?? HOT_TOAST_DEFAULT_TIMEOUTS[type],\n        id,\n        message,\n        role: options?.role ?? 'status',\n        type,\n        visible: true,\n        observableMessages: observableMessages ?? undefined,\n        ...options,\n      };\n\n      return new HotToastRef<DataType | unknown>(toast).appendTo(this._componentRef.ref.instance);\n    }\n  }\n\n  /**\n   * Checks whether any toast with same id is present.\n   *\n   * @private\n   * @param id - Toast ID\n   */\n  private isDuplicate(id: string) {\n    return this._componentRef.ref.instance.hasToast(id);\n  }\n\n  /**\n   * Creates an entry in local or session storage with count ${defaultConfig.persist.count}, if not present.\n   * If present in storage, reduces the count\n   * and returns the count.\n   * Count can not be less than 0.\n   */\n  private handleStorageValue(id: string, options: DefaultToastOptions): number {\n    let count = 1;\n    const persist = { ...this._defaultPersistConfig, ...options.persist };\n    const storage: Storage = persist.storage === 'local' ? localStorage : sessionStorage;\n    const key = persist.key.replace(/\\${id}/g, id);\n\n    let item: string | number = storage.getItem(key);\n\n    if (item) {\n      item = parseInt(item, 10);\n      if (item > 0) {\n        count = item - 1;\n      } else {\n        count = item;\n      }\n    } else {\n      count = persist.count;\n    }\n\n    storage.setItem(key, count.toString());\n\n    return count;\n  }\n\n  private getContentAndOptions<T, DataType>(\n    toastType: ToastType,\n    message: Content | ValueOrFunction<Content, T> | ObservableLoading<DataType> | ObservableSuccessOrError<T, DataType>\n  ): { options: ToastOptions<DataType | unknown>; content: Content | ValueOrFunction<Content, T> } {\n    let content: Content | ValueOrFunction<Content, T>;\n    let options: ToastOptions<DataType | unknown> = {\n      ...this._defaultConfig,\n      ...this._defaultConfig[toastType],\n    };\n\n    // typeof message === 'object' won't work, cz TemplateRef's type is object\n    if (typeof message === 'string' || isTemplateRef(message) || isComponent(message)) {\n      content = message;\n    } else {\n      let restOptions: ToastOptions<DataType>;\n      ({ content, ...restOptions } = message as ObservableLoading<DataType> | ObservableSuccessOrError<T, DataType>);\n      options = { ...options, ...restOptions };\n    }\n\n    return { content, options };\n  }\n\n  private createLoadingToast<T, DataType>(messages: Content | ObservableLoading<DataType>) {\n    let content: Content | ValueOrFunction<Content, T> = null;\n    let options: ToastOptions<DataType | unknown> = {};\n\n    ({ content, options } = this.getContentAndOptions<any, DataType>('loading', messages));\n\n    return this.loading(content as Content, options);\n  }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\n\nimport { ToastConfig } from './hot-toast.model';\n\nexport function provideHotToastConfig(config?: Partial<ToastConfig>): EnvironmentProviders {\n  return makeEnvironmentProviders([{ provide: ToastConfig, useValue: config }]);\n}\n","/*\n * Public API Surface of hot-toast\n */\n\nexport * from './lib/hot-toast.service';\nexport * from './lib/hot-toast.provide';\nexport * from './lib/hot-toast.model';\nexport * from './lib/hot-toast-ref';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\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